@doppelgangerdev/doppelganger 0.5.6 → 0.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,19 @@
1
+ (function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))u(f);new MutationObserver(f=>{for(const p of f)if(p.type==="childList")for(const m of p.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&u(m)}).observe(document,{childList:!0,subtree:!0});function d(f){const p={};return f.integrity&&(p.integrity=f.integrity),f.referrerPolicy&&(p.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?p.credentials="include":f.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function u(f){if(f.ep)return;f.ep=!0;const p=d(f);fetch(f.href,p)}})();function rp(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var fu={exports:{}},Si={};var zh;function P0(){if(zh)return Si;zh=1;var i=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function d(u,f,p){var m=null;if(p!==void 0&&(m=""+p),f.key!==void 0&&(m=""+f.key),"key"in f){p={};for(var w in f)w!=="key"&&(p[w]=f[w])}else p=f;return f=p.ref,{$$typeof:i,type:u,key:m,ref:f!==void 0?f:null,props:p}}return Si.Fragment=c,Si.jsx=d,Si.jsxs=d,Si}var Oh;function ex(){return Oh||(Oh=1,fu.exports=P0()),fu.exports}var r=ex(),hu={exports:{}},je={};var Dh;function tx(){if(Dh)return je;Dh=1;var i=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),m=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),k=Symbol.iterator;function q(v){return v===null||typeof v!="object"?null:(v=k&&v[k]||v["@@iterator"],typeof v=="function"?v:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,O={};function U(v,B,I){this.props=v,this.context=B,this.refs=O,this.updater=I||_}U.prototype.isReactComponent={},U.prototype.setState=function(v,B){if(typeof v!="object"&&typeof v!="function"&&v!=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,v,B,"setState")},U.prototype.forceUpdate=function(v){this.updater.enqueueForceUpdate(this,v,"forceUpdate")};function Y(){}Y.prototype=U.prototype;function $(v,B,I){this.props=v,this.context=B,this.refs=O,this.updater=I||_}var ne=$.prototype=new Y;ne.constructor=$,j(ne,U.prototype),ne.isPureReactComponent=!0;var ee=Array.isArray;function te(){}var P={H:null,A:null,T:null,S:null},fe=Object.prototype.hasOwnProperty;function ie(v,B,I){var Z=I.ref;return{$$typeof:i,type:v,key:B,ref:Z!==void 0?Z:null,props:I}}function le(v,B){return ie(v.type,B,v.props)}function Ye(v){return typeof v=="object"&&v!==null&&v.$$typeof===i}function ye(v){var B={"=":"=0",":":"=2"};return"$"+v.replace(/[=:]/g,function(I){return B[I]})}var nt=/\/+/g;function Te(v,B){return typeof v=="object"&&v!==null&&v.key!=null?ye(""+v.key):B.toString(36)}function Fe(v){switch(v.status){case"fulfilled":return v.value;case"rejected":throw v.reason;default:switch(typeof v.status=="string"?v.then(te,te):(v.status="pending",v.then(function(B){v.status==="pending"&&(v.status="fulfilled",v.value=B)},function(B){v.status==="pending"&&(v.status="rejected",v.reason=B)})),v.status){case"fulfilled":return v.value;case"rejected":throw v.reason}}throw v}function D(v,B,I,Z,ce){var he=typeof v;(he==="undefined"||he==="boolean")&&(v=null);var be=!1;if(v===null)be=!0;else switch(he){case"bigint":case"string":case"number":be=!0;break;case"object":switch(v.$$typeof){case i:case c:be=!0;break;case C:return be=v._init,D(be(v._payload),B,I,Z,ce)}}if(be)return ce=ce(v),be=Z===""?"."+Te(v,0):Z,ee(ce)?(I="",be!=null&&(I=be.replace(nt,"$&/")+"/"),D(ce,B,I,"",function(kt){return kt})):ce!=null&&(Ye(ce)&&(ce=le(ce,I+(ce.key==null||v&&v.key===ce.key?"":(""+ce.key).replace(nt,"$&/")+"/")+be)),B.push(ce)),1;be=0;var $e=Z===""?".":Z+":";if(ee(v))for(var Ue=0;Ue<v.length;Ue++)Z=v[Ue],he=$e+Te(Z,Ue),be+=D(Z,B,I,he,ce);else if(Ue=q(v),typeof Ue=="function")for(v=Ue.call(v),Ue=0;!(Z=v.next()).done;)Z=Z.value,he=$e+Te(Z,Ue++),be+=D(Z,B,I,he,ce);else if(he==="object"){if(typeof v.then=="function")return D(Fe(v),B,I,Z,ce);throw B=String(v),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(v).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return be}function H(v,B,I){if(v==null)return v;var Z=[],ce=0;return D(v,Z,"","",function(he){return B.call(I,he,ce++)}),Z}function J(v){if(v._status===-1){var B=v._result;B=B(),B.then(function(I){(v._status===0||v._status===-1)&&(v._status=1,v._result=I)},function(I){(v._status===0||v._status===-1)&&(v._status=2,v._result=I)}),v._status===-1&&(v._status=0,v._result=B)}if(v._status===1)return v._result.default;throw v._result}var de=typeof reportError=="function"?reportError:function(v){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof v=="object"&&v!==null&&typeof v.message=="string"?String(v.message):String(v),error:v});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",v);return}console.error(v)},me={map:H,forEach:function(v,B,I){H(v,function(){B.apply(this,arguments)},I)},count:function(v){var B=0;return H(v,function(){B++}),B},toArray:function(v){return H(v,function(B){return B})||[]},only:function(v){if(!Ye(v))throw Error("React.Children.only expected to receive a single React element child.");return v}};return je.Activity=S,je.Children=me,je.Component=U,je.Fragment=d,je.Profiler=f,je.PureComponent=$,je.StrictMode=u,je.Suspense=b,je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,je.__COMPILER_RUNTIME={__proto__:null,c:function(v){return P.H.useMemoCache(v)}},je.cache=function(v){return function(){return v.apply(null,arguments)}},je.cacheSignal=function(){return null},je.cloneElement=function(v,B,I){if(v==null)throw Error("The argument must be a React element, but you passed "+v+".");var Z=j({},v.props),ce=v.key;if(B!=null)for(he in B.key!==void 0&&(ce=""+B.key),B)!fe.call(B,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&B.ref===void 0||(Z[he]=B[he]);var he=arguments.length-2;if(he===1)Z.children=I;else if(1<he){for(var be=Array(he),$e=0;$e<he;$e++)be[$e]=arguments[$e+2];Z.children=be}return ie(v.type,ce,Z)},je.createContext=function(v){return v={$$typeof:m,_currentValue:v,_currentValue2:v,_threadCount:0,Provider:null,Consumer:null},v.Provider=v,v.Consumer={$$typeof:p,_context:v},v},je.createElement=function(v,B,I){var Z,ce={},he=null;if(B!=null)for(Z in B.key!==void 0&&(he=""+B.key),B)fe.call(B,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(ce[Z]=B[Z]);var be=arguments.length-2;if(be===1)ce.children=I;else if(1<be){for(var $e=Array(be),Ue=0;Ue<be;Ue++)$e[Ue]=arguments[Ue+2];ce.children=$e}if(v&&v.defaultProps)for(Z in be=v.defaultProps,be)ce[Z]===void 0&&(ce[Z]=be[Z]);return ie(v,he,ce)},je.createRef=function(){return{current:null}},je.forwardRef=function(v){return{$$typeof:w,render:v}},je.isValidElement=Ye,je.lazy=function(v){return{$$typeof:C,_payload:{_status:-1,_result:v},_init:J}},je.memo=function(v,B){return{$$typeof:g,type:v,compare:B===void 0?null:B}},je.startTransition=function(v){var B=P.T,I={};P.T=I;try{var Z=v(),ce=P.S;ce!==null&&ce(I,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(te,de)}catch(he){de(he)}finally{B!==null&&I.types!==null&&(B.types=I.types),P.T=B}},je.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},je.use=function(v){return P.H.use(v)},je.useActionState=function(v,B,I){return P.H.useActionState(v,B,I)},je.useCallback=function(v,B){return P.H.useCallback(v,B)},je.useContext=function(v){return P.H.useContext(v)},je.useDebugValue=function(){},je.useDeferredValue=function(v,B){return P.H.useDeferredValue(v,B)},je.useEffect=function(v,B){return P.H.useEffect(v,B)},je.useEffectEvent=function(v){return P.H.useEffectEvent(v)},je.useId=function(){return P.H.useId()},je.useImperativeHandle=function(v,B,I){return P.H.useImperativeHandle(v,B,I)},je.useInsertionEffect=function(v,B){return P.H.useInsertionEffect(v,B)},je.useLayoutEffect=function(v,B){return P.H.useLayoutEffect(v,B)},je.useMemo=function(v,B){return P.H.useMemo(v,B)},je.useOptimistic=function(v,B){return P.H.useOptimistic(v,B)},je.useReducer=function(v,B,I){return P.H.useReducer(v,B,I)},je.useRef=function(v){return P.H.useRef(v)},je.useState=function(v){return P.H.useState(v)},je.useSyncExternalStore=function(v,B,I){return P.H.useSyncExternalStore(v,B,I)},je.useTransition=function(){return P.H.useTransition()},je.version="19.2.3",je}var kh;function zu(){return kh||(kh=1,hu.exports=tx()),hu.exports}var x=zu();const ax=rp(x);var pu={exports:{}},ji={},mu={exports:{}},xu={};var Uh;function lx(){return Uh||(Uh=1,(function(i){function c(D,H){var J=D.length;D.push(H);e:for(;0<J;){var de=J-1>>>1,me=D[de];if(0<f(me,H))D[de]=H,D[J]=me,J=de;else break e}}function d(D){return D.length===0?null:D[0]}function u(D){if(D.length===0)return null;var H=D[0],J=D.pop();if(J!==H){D[0]=J;e:for(var de=0,me=D.length,v=me>>>1;de<v;){var B=2*(de+1)-1,I=D[B],Z=B+1,ce=D[Z];if(0>f(I,J))Z<me&&0>f(ce,I)?(D[de]=ce,D[Z]=J,de=Z):(D[de]=I,D[B]=J,de=B);else if(Z<me&&0>f(ce,J))D[de]=ce,D[Z]=J,de=Z;else break e}}return H}function f(D,H){var J=D.sortIndex-H.sortIndex;return J!==0?J:D.id-H.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var p=performance;i.unstable_now=function(){return p.now()}}else{var m=Date,w=m.now();i.unstable_now=function(){return m.now()-w}}var b=[],g=[],C=1,S=null,k=3,q=!1,_=!1,j=!1,O=!1,U=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function ne(D){for(var H=d(g);H!==null;){if(H.callback===null)u(g);else if(H.startTime<=D)u(g),H.sortIndex=H.expirationTime,c(b,H);else break;H=d(g)}}function ee(D){if(j=!1,ne(D),!_)if(d(b)!==null)_=!0,te||(te=!0,ye());else{var H=d(g);H!==null&&Fe(ee,H.startTime-D)}}var te=!1,P=-1,fe=5,ie=-1;function le(){return O?!0:!(i.unstable_now()-ie<fe)}function Ye(){if(O=!1,te){var D=i.unstable_now();ie=D;var H=!0;try{e:{_=!1,j&&(j=!1,Y(P),P=-1),q=!0;var J=k;try{t:{for(ne(D),S=d(b);S!==null&&!(S.expirationTime>D&&le());){var de=S.callback;if(typeof de=="function"){S.callback=null,k=S.priorityLevel;var me=de(S.expirationTime<=D);if(D=i.unstable_now(),typeof me=="function"){S.callback=me,ne(D),H=!0;break t}S===d(b)&&u(b),ne(D)}else u(b);S=d(b)}if(S!==null)H=!0;else{var v=d(g);v!==null&&Fe(ee,v.startTime-D),H=!1}}break e}finally{S=null,k=J,q=!1}H=void 0}}finally{H?ye():te=!1}}}var ye;if(typeof $=="function")ye=function(){$(Ye)};else if(typeof MessageChannel<"u"){var nt=new MessageChannel,Te=nt.port2;nt.port1.onmessage=Ye,ye=function(){Te.postMessage(null)}}else ye=function(){U(Ye,0)};function Fe(D,H){P=U(function(){D(i.unstable_now())},H)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(D){D.callback=null},i.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):fe=0<D?Math.floor(1e3/D):5},i.unstable_getCurrentPriorityLevel=function(){return k},i.unstable_next=function(D){switch(k){case 1:case 2:case 3:var H=3;break;default:H=k}var J=k;k=H;try{return D()}finally{k=J}},i.unstable_requestPaint=function(){O=!0},i.unstable_runWithPriority=function(D,H){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var J=k;k=D;try{return H()}finally{k=J}},i.unstable_scheduleCallback=function(D,H,J){var de=i.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?de+J:de):J=de,D){case 1:var me=-1;break;case 2:me=250;break;case 5:me=1073741823;break;case 4:me=1e4;break;default:me=5e3}return me=J+me,D={id:C++,callback:H,priorityLevel:D,startTime:J,expirationTime:me,sortIndex:-1},J>de?(D.sortIndex=J,c(g,D),d(b)===null&&D===d(g)&&(j?(Y(P),P=-1):j=!0,Fe(ee,J-de))):(D.sortIndex=me,c(b,D),_||q||(_=!0,te||(te=!0,ye()))),D},i.unstable_shouldYield=le,i.unstable_wrapCallback=function(D){var H=k;return function(){var J=k;k=H;try{return D.apply(this,arguments)}finally{k=J}}}})(xu)),xu}var Lh;function nx(){return Lh||(Lh=1,mu.exports=lx()),mu.exports}var gu={exports:{}},zt={};var Hh;function ix(){if(Hh)return zt;Hh=1;var i=zu();function c(b){var g="https://react.dev/errors/"+b;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var C=2;C<arguments.length;C++)g+="&args[]="+encodeURIComponent(arguments[C])}return"Minified React error #"+b+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var u={d:{f:d,r:function(){throw Error(c(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},f=Symbol.for("react.portal");function p(b,g,C){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:S==null?null:""+S,children:b,containerInfo:g,implementation:C}}var m=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function w(b,g){if(b==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return zt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,zt.createPortal=function(b,g){var C=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(c(299));return p(b,g,null,C)},zt.flushSync=function(b){var g=m.T,C=u.p;try{if(m.T=null,u.p=2,b)return b()}finally{m.T=g,u.p=C,u.d.f()}},zt.preconnect=function(b,g){typeof b=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,u.d.C(b,g))},zt.prefetchDNS=function(b){typeof b=="string"&&u.d.D(b)},zt.preinit=function(b,g){if(typeof b=="string"&&g&&typeof g.as=="string"){var C=g.as,S=w(C,g.crossOrigin),k=typeof g.integrity=="string"?g.integrity:void 0,q=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;C==="style"?u.d.S(b,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:S,integrity:k,fetchPriority:q}):C==="script"&&u.d.X(b,{crossOrigin:S,integrity:k,fetchPriority:q,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},zt.preinitModule=function(b,g){if(typeof b=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var C=w(g.as,g.crossOrigin);u.d.M(b,{crossOrigin:C,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&u.d.M(b)},zt.preload=function(b,g){if(typeof b=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var C=g.as,S=w(C,g.crossOrigin);u.d.L(b,C,{crossOrigin:S,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},zt.preloadModule=function(b,g){if(typeof b=="string")if(g){var C=w(g.as,g.crossOrigin);u.d.m(b,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:C,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else u.d.m(b)},zt.requestFormReset=function(b){u.d.r(b)},zt.unstable_batchedUpdates=function(b,g){return b(g)},zt.useFormState=function(b,g,C){return m.H.useFormState(b,g,C)},zt.useFormStatus=function(){return m.H.useHostTransitionStatus()},zt.version="19.2.3",zt}var Bh;function sx(){if(Bh)return gu.exports;Bh=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(c){console.error(c)}}return i(),gu.exports=ix(),gu.exports}var qh;function rx(){if(qh)return ji;qh=1;var i=nx(),c=zu(),d=sx();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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 f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function p(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function m(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 w(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function b(e){if(p(e)!==e)throw Error(u(188))}function g(e){var t=e.alternate;if(!t){if(t=p(e),t===null)throw Error(u(188));return t!==e?null:e}for(var a=e,l=t;;){var n=a.return;if(n===null)break;var s=n.alternate;if(s===null){if(l=n.return,l!==null){a=l;continue}break}if(n.child===s.child){for(s=n.child;s;){if(s===a)return b(n),e;if(s===l)return b(n),t;s=s.sibling}throw Error(u(188))}if(a.return!==l.return)a=n,l=s;else{for(var o=!1,h=n.child;h;){if(h===a){o=!0,a=n,l=s;break}if(h===l){o=!0,l=n,a=s;break}h=h.sibling}if(!o){for(h=s.child;h;){if(h===a){o=!0,a=s,l=n;break}if(h===l){o=!0,l=s,a=n;break}h=h.sibling}if(!o)throw Error(u(189))}}if(a.alternate!==l)throw Error(u(190))}if(a.tag!==3)throw Error(u(188));return a.stateNode.current===a?e:t}function C(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=C(e),t!==null)return t;e=e.sibling}return null}var S=Object.assign,k=Symbol.for("react.element"),q=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),$=Symbol.for("react.context"),ne=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),te=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),Ye=Symbol.iterator;function ye(e){return e===null||typeof e!="object"?null:(e=Ye&&e[Ye]||e["@@iterator"],typeof e=="function"?e:null)}var nt=Symbol.for("react.client.reference");function Te(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===nt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case U:return"Profiler";case O:return"StrictMode";case ee:return"Suspense";case te:return"SuspenseList";case ie:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _:return"Portal";case $:return e.displayName||"Context";case Y:return(e._context.displayName||"Context")+".Consumer";case ne:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:Te(e.type)||"Memo";case fe:t=e._payload,e=e._init;try{return Te(e(t))}catch{}}return null}var Fe=Array.isArray,D=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={pending:!1,data:null,method:null,action:null},de=[],me=-1;function v(e){return{current:e}}function B(e){0>me||(e.current=de[me],de[me]=null,me--)}function I(e,t){me++,de[me]=e.current,e.current=t}var Z=v(null),ce=v(null),he=v(null),be=v(null);function $e(e,t){switch(I(he,t),I(ce,e),I(Z,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?th(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=th(t),e=ah(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(Z),I(Z,e)}function Ue(){B(Z),B(ce),B(he)}function kt(e){e.memoizedState!==null&&I(be,e);var t=Z.current,a=ah(t,e.type);t!==a&&(I(ce,e),I(Z,a))}function Wt(e){ce.current===e&&(B(Z),B(ce)),be.current===e&&(B(be),yi._currentValue=J)}var Ea,Ja;function wt(e){if(Ea===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ea=t&&t[1]||"",Ja=-1<a.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Ea+e+Ja}var ca=!1;function ma(e,t){if(!e||ca)return"";ca=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(L){var z=L}Reflect.construct(e,[],X)}else{try{X.call()}catch(L){z=L}e.call(X.prototype)}}else{try{throw Error()}catch(L){z=L}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(L){if(L&&z&&typeof L.stack=="string")return[L.stack,z.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=l.DetermineComponentFrameRoot(),o=s[0],h=s[1];if(o&&h){var y=o.split(`
4
+ `),M=h.split(`
5
+ `);for(n=l=0;l<y.length&&!y[l].includes("DetermineComponentFrameRoot");)l++;for(;n<M.length&&!M[n].includes("DetermineComponentFrameRoot");)n++;if(l===y.length||n===M.length)for(l=y.length-1,n=M.length-1;1<=l&&0<=n&&y[l]!==M[n];)n--;for(;1<=l&&0<=n;l--,n--)if(y[l]!==M[n]){if(l!==1||n!==1)do if(l--,n--,0>n||y[l]!==M[n]){var V=`
6
+ `+y[l].replace(" at new "," at ");return e.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",e.displayName)),V}while(1<=l&&0<=n);break}}}finally{ca=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?wt(a):""}function xa(e,t){switch(e.tag){case 26:case 27:case 5:return wt(e.type);case 16:return wt("Lazy");case 13:return e.child!==t&&t!==null?wt("Suspense Fallback"):wt("Suspense");case 19:return wt("SuspenseList");case 0:case 15:return ma(e.type,!1);case 11:return ma(e.type.render,!1);case 1:return ma(e.type,!0);case 31:return wt("Activity");default:return""}}function se(e){try{var t="",a=null;do t+=xa(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
7
+ Error generating stack: `+l.message+`
8
+ `+l.stack}}var xe=Object.prototype.hasOwnProperty,ue=i.unstable_scheduleCallback,Se=i.unstable_cancelCallback,At=i.unstable_shouldYield,ua=i.unstable_requestPaint,Nt=i.unstable_now,wl=i.unstable_getCurrentPriorityLevel,Ut=i.unstable_ImmediatePriority,Wa=i.unstable_UserBlockingPriority,Ca=i.unstable_NormalPriority,Vl=i.unstable_LowPriority,Aa=i.unstable_IdlePriority,De=i.log,Yl=i.unstable_setDisableYieldValue,Ta=null,ht=null;function Q(e){if(typeof De=="function"&&Yl(e),ht&&typeof ht.setStrictMode=="function")try{ht.setStrictMode(Ta,e)}catch{}}var W=Math.clz32?Math.clz32:Ge,ae=Math.log,pe=Math.LN2;function Ge(e){return e>>>=0,e===0?32:31-(ae(e)/pe|0)|0}var Ie=256,et=262144,Xe=4194304;function ot(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function oa(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var n=0,s=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var h=l&134217727;return h!==0?(l=h&~s,l!==0?n=ot(l):(o&=h,o!==0?n=ot(o):a||(a=h&~e,a!==0&&(n=ot(a))))):(h=l&~s,h!==0?n=ot(h):o!==0?n=ot(o):a||(a=l&~e,a!==0&&(n=ot(a)))),n===0?0:t!==0&&t!==n&&(t&s)===0&&(s=n&-n,a=t&-t,s>=a||s===32&&(a&4194048)!==0)?t:n}function A(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function N(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 K(){var e=Xe;return Xe<<=1,(Xe&62914560)===0&&(Xe=4194304),e}function we(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ce(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function He(e,t,a,l,n,s){var o=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var h=e.entanglements,y=e.expirationTimes,M=e.hiddenUpdates;for(a=o&~a;0<a;){var V=31-W(a),X=1<<V;h[V]=0,y[V]=-1;var z=M[V];if(z!==null)for(M[V]=null,V=0;V<z.length;V++){var L=z[V];L!==null&&(L.lane&=-536870913)}a&=~X}l!==0&&pt(e,l,0),s!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=s&~(o&~t))}function pt(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-W(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function ga(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-W(a),n=1<<l;n&t|e[l]&t&&(e[l]|=t),a&=~n}}function Sl(e,t){var a=t&-t;return a=(a&42)!==0?1:jl(a),(a&(e.suspendedLanes|t))!==0?0:a}function jl(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 F(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Le(){var e=H.p;return e!==0?e:(e=window.event,e===void 0?32:Eh(e.type))}function mt(e,t){var a=H.p;try{return H.p=e,t()}finally{H.p=a}}var rt=Math.random().toString(36).slice(2),tt="__reactFiber$"+rt,xt="__reactProps$"+rt,Me="__reactContainer$"+rt,da="__reactEvents$"+rt,zn="__reactListeners$"+rt,Gp="__reactHandles$"+rt,qu="__reactResources$"+rt,On="__reactMarker$"+rt;function nr(e){delete e[tt],delete e[xt],delete e[da],delete e[zn],delete e[Gp]}function Gl(e){var t=e[tt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Me]||a[tt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=uh(e);e!==null;){if(a=e[tt])return a;e=uh(e)}return t}e=a,a=e.parentNode}return null}function Xl(e){if(e=e[tt]||e[Me]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Dn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function Ql(e){var t=e[qu];return t||(t=e[qu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Et(e){e[On]=!0}var Vu=new Set,Yu={};function Nl(e,t){Zl(e,t),Zl(e+"Capture",t)}function Zl(e,t){for(Yu[e]=t,e=0;e<t.length;e++)Vu.add(t[e])}var Xp=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]*$"),Gu={},Xu={};function Qp(e){return xe.call(Xu,e)?!0:xe.call(Gu,e)?!1:Xp.test(e)?Xu[e]=!0:(Gu[e]=!0,!1)}function zi(e,t,a){if(Qp(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Oi(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function _a(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function Ft(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Qu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Zp(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var n=l.get,s=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(o){a=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(o){a=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ir(e){if(!e._valueTracker){var t=Qu(e)?"checked":"value";e._valueTracker=Zp(e,t,""+e[t])}}function Zu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Qu(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function Di(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var $p=/[\n"\\]/g;function It(e){return e.replace($p,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function sr(e,t,a,l,n,s,o,h){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ft(t)):e.value!==""+Ft(t)&&(e.value=""+Ft(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?rr(e,o,Ft(t)):a!=null?rr(e,o,Ft(a)):l!=null&&e.removeAttribute("value"),n==null&&s!=null&&(e.defaultChecked=!!s),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+Ft(h):e.removeAttribute("name")}function $u(e,t,a,l,n,s,o,h){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||a!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){ir(e);return}a=a!=null?""+Ft(a):"",t=t!=null?""+Ft(t):a,h||t===e.value||(e.value=t),e.defaultValue=t}l=l??n,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=h?e.checked:!!l,e.defaultChecked=!!l,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),ir(e)}function rr(e,t,a){t==="number"&&Di(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function $l(e,t,a,l){if(e=e.options,t){t={};for(var n=0;n<a.length;n++)t["$"+a[n]]=!0;for(a=0;a<e.length;a++)n=t.hasOwnProperty("$"+e[a].value),e[a].selected!==n&&(e[a].selected=n),n&&l&&(e[a].defaultSelected=!0)}else{for(a=""+Ft(a),t=null,n=0;n<e.length;n++){if(e[n].value===a){e[n].selected=!0,l&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function Ku(e,t,a){if(t!=null&&(t=""+Ft(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ft(a):""}function Ju(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(u(92));if(Fe(l)){if(1<l.length)throw Error(u(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=Ft(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),ir(e)}function Kl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Kp=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 Wu(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||Kp.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Fu(e,t,a){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var n in t)l=t[n],t.hasOwnProperty(n)&&a[n]!==l&&Wu(e,n,l)}else for(var s in t)t.hasOwnProperty(s)&&Wu(e,s,t[s])}function cr(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 Jp=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"]]),Wp=/^[\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 ki(e){return Wp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ra(){}var ur=null;function or(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jl=null,Wl=null;function Iu(e){var t=Xl(e);if(t&&(e=t.stateNode)){var a=e[xt]||null;e:switch(e=t.stateNode,t.type){case"input":if(sr(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+It(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var n=l[xt]||null;if(!n)throw Error(u(90));sr(l,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&Zu(l)}break e;case"textarea":Ku(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&$l(e,!!a.multiple,t,!1)}}}var dr=!1;function Pu(e,t,a){if(dr)return e(t,a);dr=!0;try{var l=e(t);return l}finally{if(dr=!1,(Jl!==null||Wl!==null)&&(Ss(),Jl&&(t=Jl,e=Wl,Wl=Jl=null,Iu(t),e)))for(t=0;t<e.length;t++)Iu(e[t])}}function kn(e,t){var a=e.stateNode;if(a===null)return null;var l=a[xt]||null;if(l===null)return null;a=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(u(231,t,typeof a));return a}var Ma=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fr=!1;if(Ma)try{var Un={};Object.defineProperty(Un,"passive",{get:function(){fr=!0}}),window.addEventListener("test",Un,Un),window.removeEventListener("test",Un,Un)}catch{fr=!1}var Fa=null,hr=null,Ui=null;function eo(){if(Ui)return Ui;var e,t=hr,a=t.length,l,n="value"in Fa?Fa.value:Fa.textContent,s=n.length;for(e=0;e<a&&t[e]===n[e];e++);var o=a-e;for(l=1;l<=o&&t[a-l]===n[s-l];l++);return Ui=n.slice(e,1<l?1-l:void 0)}function Li(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 Hi(){return!0}function to(){return!1}function Lt(e){function t(a,l,n,s,o){this._reactName=a,this._targetInst=n,this.type=l,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(a=e[h],this[h]=a?a(s):s[h]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Hi:to,this.isPropagationStopped=to,this}return S(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Hi)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Hi)},persist:function(){},isPersistent:Hi}),t}var El={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bi=Lt(El),Ln=S({},El,{view:0,detail:0}),Fp=Lt(Ln),pr,mr,Hn,qi=S({},Ln,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gr,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!==Hn&&(Hn&&e.type==="mousemove"?(pr=e.screenX-Hn.screenX,mr=e.screenY-Hn.screenY):mr=pr=0,Hn=e),pr)},movementY:function(e){return"movementY"in e?e.movementY:mr}}),ao=Lt(qi),Ip=S({},qi,{dataTransfer:0}),Pp=Lt(Ip),em=S({},Ln,{relatedTarget:0}),xr=Lt(em),tm=S({},El,{animationName:0,elapsedTime:0,pseudoElement:0}),am=Lt(tm),lm=S({},El,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),nm=Lt(lm),im=S({},El,{data:0}),lo=Lt(im),sm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rm={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"},cm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function um(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=cm[e])?!!t[e]:!1}function gr(){return um}var om=S({},Ln,{key:function(e){if(e.key){var t=sm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Li(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?rm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gr,charCode:function(e){return e.type==="keypress"?Li(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Li(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),dm=Lt(om),fm=S({},qi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),no=Lt(fm),hm=S({},Ln,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gr}),pm=Lt(hm),mm=S({},El,{propertyName:0,elapsedTime:0,pseudoElement:0}),xm=Lt(mm),gm=S({},qi,{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}),ym=Lt(gm),vm=S({},El,{newState:0,oldState:0}),bm=Lt(vm),wm=[9,13,27,32],yr=Ma&&"CompositionEvent"in window,Bn=null;Ma&&"documentMode"in document&&(Bn=document.documentMode);var Sm=Ma&&"TextEvent"in window&&!Bn,io=Ma&&(!yr||Bn&&8<Bn&&11>=Bn),so=" ",ro=!1;function co(e,t){switch(e){case"keyup":return wm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fl=!1;function jm(e,t){switch(e){case"compositionend":return uo(t);case"keypress":return t.which!==32?null:(ro=!0,so);case"textInput":return e=t.data,e===so&&ro?null:e;default:return null}}function Nm(e,t){if(Fl)return e==="compositionend"||!yr&&co(e,t)?(e=eo(),Ui=hr=Fa=null,Fl=!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 io&&t.locale!=="ko"?null:t.data;default:return null}}var Em={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 oo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Em[e.type]:t==="textarea"}function fo(e,t,a,l){Jl?Wl?Wl.push(l):Wl=[l]:Jl=l,t=_s(t,"onChange"),0<t.length&&(a=new Bi("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var qn=null,Vn=null;function Cm(e){Jf(e,0)}function Vi(e){var t=Dn(e);if(Zu(t))return e}function ho(e,t){if(e==="change")return t}var po=!1;if(Ma){var vr;if(Ma){var br="oninput"in document;if(!br){var mo=document.createElement("div");mo.setAttribute("oninput","return;"),br=typeof mo.oninput=="function"}vr=br}else vr=!1;po=vr&&(!document.documentMode||9<document.documentMode)}function xo(){qn&&(qn.detachEvent("onpropertychange",go),Vn=qn=null)}function go(e){if(e.propertyName==="value"&&Vi(Vn)){var t=[];fo(t,Vn,e,or(e)),Pu(Cm,t)}}function Am(e,t,a){e==="focusin"?(xo(),qn=t,Vn=a,qn.attachEvent("onpropertychange",go)):e==="focusout"&&xo()}function Tm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Vi(Vn)}function _m(e,t){if(e==="click")return Vi(t)}function Rm(e,t){if(e==="input"||e==="change")return Vi(t)}function Mm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Gt=typeof Object.is=="function"?Object.is:Mm;function Yn(e,t){if(Gt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var n=a[l];if(!xe.call(t,n)||!Gt(e[n],t[n]))return!1}return!0}function yo(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vo(e,t){var a=yo(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=yo(a)}}function bo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Di(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Di(e.document)}return t}function wr(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 zm=Ma&&"documentMode"in document&&11>=document.documentMode,Il=null,Sr=null,Gn=null,jr=!1;function So(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;jr||Il==null||Il!==Di(l)||(l=Il,"selectionStart"in l&&wr(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Gn&&Yn(Gn,l)||(Gn=l,l=_s(Sr,"onSelect"),0<l.length&&(t=new Bi("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=Il)))}function Cl(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Pl={animationend:Cl("Animation","AnimationEnd"),animationiteration:Cl("Animation","AnimationIteration"),animationstart:Cl("Animation","AnimationStart"),transitionrun:Cl("Transition","TransitionRun"),transitionstart:Cl("Transition","TransitionStart"),transitioncancel:Cl("Transition","TransitionCancel"),transitionend:Cl("Transition","TransitionEnd")},Nr={},jo={};Ma&&(jo=document.createElement("div").style,"AnimationEvent"in window||(delete Pl.animationend.animation,delete Pl.animationiteration.animation,delete Pl.animationstart.animation),"TransitionEvent"in window||delete Pl.transitionend.transition);function Al(e){if(Nr[e])return Nr[e];if(!Pl[e])return e;var t=Pl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in jo)return Nr[e]=t[a];return e}var No=Al("animationend"),Eo=Al("animationiteration"),Co=Al("animationstart"),Om=Al("transitionrun"),Dm=Al("transitionstart"),km=Al("transitioncancel"),Ao=Al("transitionend"),To=new Map,Er="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(" ");Er.push("scrollEnd");function fa(e,t){To.set(e,t),Nl(t,[e])}var Yi=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)},Pt=[],en=0,Cr=0;function Gi(){for(var e=en,t=Cr=en=0;t<e;){var a=Pt[t];Pt[t++]=null;var l=Pt[t];Pt[t++]=null;var n=Pt[t];Pt[t++]=null;var s=Pt[t];if(Pt[t++]=null,l!==null&&n!==null){var o=l.pending;o===null?n.next=n:(n.next=o.next,o.next=n),l.pending=n}s!==0&&_o(a,n,s)}}function Xi(e,t,a,l){Pt[en++]=e,Pt[en++]=t,Pt[en++]=a,Pt[en++]=l,Cr|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Ar(e,t,a,l){return Xi(e,t,a,l),Qi(e)}function Tl(e,t){return Xi(e,null,null,t),Qi(e)}function _o(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var n=!1,s=e.return;s!==null;)s.childLanes|=a,l=s.alternate,l!==null&&(l.childLanes|=a),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(n=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,n&&t!==null&&(n=31-W(a),e=s.hiddenUpdates,l=e[n],l===null?e[n]=[t]:l.push(t),t.lane=a|536870912),s):null}function Qi(e){if(50<di)throw di=0,Uc=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var tn={};function Um(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xt(e,t,a,l){return new Um(e,t,a,l)}function Tr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function za(e,t){var a=e.alternate;return a===null?(a=Xt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Ro(e,t){e.flags&=65011714;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Zi(e,t,a,l,n,s){var o=0;if(l=e,typeof e=="function")Tr(e)&&(o=1);else if(typeof e=="string")o=V0(e,a,Z.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ie:return e=Xt(31,a,t,n),e.elementType=ie,e.lanes=s,e;case j:return _l(a.children,n,s,t);case O:o=8,n|=24;break;case U:return e=Xt(12,a,t,n|2),e.elementType=U,e.lanes=s,e;case ee:return e=Xt(13,a,t,n),e.elementType=ee,e.lanes=s,e;case te:return e=Xt(19,a,t,n),e.elementType=te,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $:o=10;break e;case Y:o=9;break e;case ne:o=11;break e;case P:o=14;break e;case fe:o=16,l=null;break e}o=29,a=Error(u(130,e===null?"null":typeof e,"")),l=null}return t=Xt(o,a,t,n),t.elementType=e,t.type=l,t.lanes=s,t}function _l(e,t,a,l){return e=Xt(7,e,l,t),e.lanes=a,e}function _r(e,t,a){return e=Xt(6,e,null,t),e.lanes=a,e}function Mo(e){var t=Xt(18,null,null,0);return t.stateNode=e,t}function Rr(e,t,a){return t=Xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var zo=new WeakMap;function ea(e,t){if(typeof e=="object"&&e!==null){var a=zo.get(e);return a!==void 0?a:(t={value:e,source:t,stack:se(t)},zo.set(e,t),t)}return{value:e,source:t,stack:se(t)}}var an=[],ln=0,$i=null,Xn=0,ta=[],aa=0,Ia=null,ya=1,va="";function Oa(e,t){an[ln++]=Xn,an[ln++]=$i,$i=e,Xn=t}function Oo(e,t,a){ta[aa++]=ya,ta[aa++]=va,ta[aa++]=Ia,Ia=e;var l=ya;e=va;var n=32-W(l)-1;l&=~(1<<n),a+=1;var s=32-W(t)+n;if(30<s){var o=n-n%5;s=(l&(1<<o)-1).toString(32),l>>=o,n-=o,ya=1<<32-W(t)+n|a<<n|l,va=s+e}else ya=1<<s|a<<n|l,va=e}function Mr(e){e.return!==null&&(Oa(e,1),Oo(e,1,0))}function zr(e){for(;e===$i;)$i=an[--ln],an[ln]=null,Xn=an[--ln],an[ln]=null;for(;e===Ia;)Ia=ta[--aa],ta[aa]=null,va=ta[--aa],ta[aa]=null,ya=ta[--aa],ta[aa]=null}function Do(e,t){ta[aa++]=ya,ta[aa++]=va,ta[aa++]=Ia,ya=t.id,va=t.overflow,Ia=e}var Tt=null,at=null,ke=!1,Pa=null,la=!1,Or=Error(u(519));function el(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Qn(ea(t,e)),Or}function ko(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[tt]=e,t[xt]=l,a){case"dialog":Re("cancel",t),Re("close",t);break;case"iframe":case"object":case"embed":Re("load",t);break;case"video":case"audio":for(a=0;a<hi.length;a++)Re(hi[a],t);break;case"source":Re("error",t);break;case"img":case"image":case"link":Re("error",t),Re("load",t);break;case"details":Re("toggle",t);break;case"input":Re("invalid",t),$u(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Re("invalid",t);break;case"textarea":Re("invalid",t),Ju(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Pf(t.textContent,a)?(l.popover!=null&&(Re("beforetoggle",t),Re("toggle",t)),l.onScroll!=null&&Re("scroll",t),l.onScrollEnd!=null&&Re("scrollend",t),l.onClick!=null&&(t.onclick=Ra),t=!0):t=!1,t||el(e,!0)}function Uo(e){for(Tt=e.return;Tt;)switch(Tt.tag){case 5:case 31:case 13:la=!1;return;case 27:case 3:la=!0;return;default:Tt=Tt.return}}function nn(e){if(e!==Tt)return!1;if(!ke)return Uo(e),ke=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Fc(e.type,e.memoizedProps)),a=!a),a&&at&&el(e),Uo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));at=ch(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));at=ch(e)}else t===27?(t=at,pl(e.type)?(e=au,au=null,at=e):at=t):at=Tt?ia(e.stateNode.nextSibling):null;return!0}function Rl(){at=Tt=null,ke=!1}function Dr(){var e=Pa;return e!==null&&(Vt===null?Vt=e:Vt.push.apply(Vt,e),Pa=null),e}function Qn(e){Pa===null?Pa=[e]:Pa.push(e)}var kr=v(null),Ml=null,Da=null;function tl(e,t,a){I(kr,t._currentValue),t._currentValue=a}function ka(e){e._currentValue=kr.current,B(kr)}function Ur(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Lr(e,t,a,l){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var s=n.dependencies;if(s!==null){var o=n.child;s=s.firstContext;e:for(;s!==null;){var h=s;s=n;for(var y=0;y<t.length;y++)if(h.context===t[y]){s.lanes|=a,h=s.alternate,h!==null&&(h.lanes|=a),Ur(s.return,a,e),l||(o=null);break e}s=h.next}}else if(n.tag===18){if(o=n.return,o===null)throw Error(u(341));o.lanes|=a,s=o.alternate,s!==null&&(s.lanes|=a),Ur(o,a,e),o=null}else o=n.child;if(o!==null)o.return=n;else for(o=n;o!==null;){if(o===e){o=null;break}if(n=o.sibling,n!==null){n.return=o.return,o=n;break}o=o.return}n=o}}function sn(e,t,a,l){e=null;for(var n=t,s=!1;n!==null;){if(!s){if((n.flags&524288)!==0)s=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var o=n.alternate;if(o===null)throw Error(u(387));if(o=o.memoizedProps,o!==null){var h=n.type;Gt(n.pendingProps.value,o.value)||(e!==null?e.push(h):e=[h])}}else if(n===be.current){if(o=n.alternate,o===null)throw Error(u(387));o.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(yi):e=[yi])}n=n.return}e!==null&&Lr(t,e,a,l),t.flags|=262144}function Ki(e){for(e=e.firstContext;e!==null;){if(!Gt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function zl(e){Ml=e,Da=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function _t(e){return Lo(Ml,e)}function Ji(e,t){return Ml===null&&zl(e),Lo(e,t)}function Lo(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Da===null){if(e===null)throw Error(u(308));Da=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Da=Da.next=t;return a}var Lm=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Hm=i.unstable_scheduleCallback,Bm=i.unstable_NormalPriority,gt={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Hr(){return{controller:new Lm,data:new Map,refCount:0}}function Zn(e){e.refCount--,e.refCount===0&&Hm(Bm,function(){e.controller.abort()})}var $n=null,Br=0,rn=0,cn=null;function qm(e,t){if($n===null){var a=$n=[];Br=0,rn=Yc(),cn={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Br++,t.then(Ho,Ho),t}function Ho(){if(--Br===0&&$n!==null){cn!==null&&(cn.status="fulfilled");var e=$n;$n=null,rn=0,cn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Vm(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(n){a.push(n)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var n=0;n<a.length;n++)(0,a[n])(t)},function(n){for(l.status="rejected",l.reason=n,n=0;n<a.length;n++)(0,a[n])(void 0)}),l}var Bo=D.S;D.S=function(e,t){jf=Nt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&qm(e,t),Bo!==null&&Bo(e,t)};var Ol=v(null);function qr(){var e=Ol.current;return e!==null?e:Pe.pooledCache}function Wi(e,t){t===null?I(Ol,Ol.current):I(Ol,t.pool)}function qo(){var e=qr();return e===null?null:{parent:gt._currentValue,pool:e}}var un=Error(u(460)),Vr=Error(u(474)),Fi=Error(u(542)),Ii={then:function(){}};function Vo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Yo(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ra,Ra),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Xo(e),e;default:if(typeof t.status=="string")t.then(Ra,Ra);else{if(e=Pe,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=l}},function(l){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Xo(e),e}throw kl=t,un}}function Dl(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(kl=a,un):a}}var kl=null;function Go(){if(kl===null)throw Error(u(459));var e=kl;return kl=null,e}function Xo(e){if(e===un||e===Fi)throw Error(u(483))}var on=null,Kn=0;function Pi(e){var t=Kn;return Kn+=1,on===null&&(on=[]),Yo(on,e,t)}function Jn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function es(e,t){throw t.$$typeof===k?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Qo(e){function t(T,E){if(e){var R=T.deletions;R===null?(T.deletions=[E],T.flags|=16):R.push(E)}}function a(T,E){if(!e)return null;for(;E!==null;)t(T,E),E=E.sibling;return null}function l(T){for(var E=new Map;T!==null;)T.key!==null?E.set(T.key,T):E.set(T.index,T),T=T.sibling;return E}function n(T,E){return T=za(T,E),T.index=0,T.sibling=null,T}function s(T,E,R){return T.index=R,e?(R=T.alternate,R!==null?(R=R.index,R<E?(T.flags|=67108866,E):R):(T.flags|=67108866,E)):(T.flags|=1048576,E)}function o(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function h(T,E,R,G){return E===null||E.tag!==6?(E=_r(R,T.mode,G),E.return=T,E):(E=n(E,R),E.return=T,E)}function y(T,E,R,G){var ge=R.type;return ge===j?V(T,E,R.props.children,G,R.key):E!==null&&(E.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===fe&&Dl(ge)===E.type)?(E=n(E,R.props),Jn(E,R),E.return=T,E):(E=Zi(R.type,R.key,R.props,null,T.mode,G),Jn(E,R),E.return=T,E)}function M(T,E,R,G){return E===null||E.tag!==4||E.stateNode.containerInfo!==R.containerInfo||E.stateNode.implementation!==R.implementation?(E=Rr(R,T.mode,G),E.return=T,E):(E=n(E,R.children||[]),E.return=T,E)}function V(T,E,R,G,ge){return E===null||E.tag!==7?(E=_l(R,T.mode,G,ge),E.return=T,E):(E=n(E,R),E.return=T,E)}function X(T,E,R){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=_r(""+E,T.mode,R),E.return=T,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case q:return R=Zi(E.type,E.key,E.props,null,T.mode,R),Jn(R,E),R.return=T,R;case _:return E=Rr(E,T.mode,R),E.return=T,E;case fe:return E=Dl(E),X(T,E,R)}if(Fe(E)||ye(E))return E=_l(E,T.mode,R,null),E.return=T,E;if(typeof E.then=="function")return X(T,Pi(E),R);if(E.$$typeof===$)return X(T,Ji(T,E),R);es(T,E)}return null}function z(T,E,R,G){var ge=E!==null?E.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return ge!==null?null:h(T,E,""+R,G);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case q:return R.key===ge?y(T,E,R,G):null;case _:return R.key===ge?M(T,E,R,G):null;case fe:return R=Dl(R),z(T,E,R,G)}if(Fe(R)||ye(R))return ge!==null?null:V(T,E,R,G,null);if(typeof R.then=="function")return z(T,E,Pi(R),G);if(R.$$typeof===$)return z(T,E,Ji(T,R),G);es(T,R)}return null}function L(T,E,R,G,ge){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return T=T.get(R)||null,h(E,T,""+G,ge);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case q:return T=T.get(G.key===null?R:G.key)||null,y(E,T,G,ge);case _:return T=T.get(G.key===null?R:G.key)||null,M(E,T,G,ge);case fe:return G=Dl(G),L(T,E,R,G,ge)}if(Fe(G)||ye(G))return T=T.get(R)||null,V(E,T,G,ge,null);if(typeof G.then=="function")return L(T,E,R,Pi(G),ge);if(G.$$typeof===$)return L(T,E,R,Ji(E,G),ge);es(E,G)}return null}function re(T,E,R,G){for(var ge=null,Be=null,oe=E,Ae=E=0,Oe=null;oe!==null&&Ae<R.length;Ae++){oe.index>Ae?(Oe=oe,oe=null):Oe=oe.sibling;var qe=z(T,oe,R[Ae],G);if(qe===null){oe===null&&(oe=Oe);break}e&&oe&&qe.alternate===null&&t(T,oe),E=s(qe,E,Ae),Be===null?ge=qe:Be.sibling=qe,Be=qe,oe=Oe}if(Ae===R.length)return a(T,oe),ke&&Oa(T,Ae),ge;if(oe===null){for(;Ae<R.length;Ae++)oe=X(T,R[Ae],G),oe!==null&&(E=s(oe,E,Ae),Be===null?ge=oe:Be.sibling=oe,Be=oe);return ke&&Oa(T,Ae),ge}for(oe=l(oe);Ae<R.length;Ae++)Oe=L(oe,T,Ae,R[Ae],G),Oe!==null&&(e&&Oe.alternate!==null&&oe.delete(Oe.key===null?Ae:Oe.key),E=s(Oe,E,Ae),Be===null?ge=Oe:Be.sibling=Oe,Be=Oe);return e&&oe.forEach(function(vl){return t(T,vl)}),ke&&Oa(T,Ae),ge}function ve(T,E,R,G){if(R==null)throw Error(u(151));for(var ge=null,Be=null,oe=E,Ae=E=0,Oe=null,qe=R.next();oe!==null&&!qe.done;Ae++,qe=R.next()){oe.index>Ae?(Oe=oe,oe=null):Oe=oe.sibling;var vl=z(T,oe,qe.value,G);if(vl===null){oe===null&&(oe=Oe);break}e&&oe&&vl.alternate===null&&t(T,oe),E=s(vl,E,Ae),Be===null?ge=vl:Be.sibling=vl,Be=vl,oe=Oe}if(qe.done)return a(T,oe),ke&&Oa(T,Ae),ge;if(oe===null){for(;!qe.done;Ae++,qe=R.next())qe=X(T,qe.value,G),qe!==null&&(E=s(qe,E,Ae),Be===null?ge=qe:Be.sibling=qe,Be=qe);return ke&&Oa(T,Ae),ge}for(oe=l(oe);!qe.done;Ae++,qe=R.next())qe=L(oe,T,Ae,qe.value,G),qe!==null&&(e&&qe.alternate!==null&&oe.delete(qe.key===null?Ae:qe.key),E=s(qe,E,Ae),Be===null?ge=qe:Be.sibling=qe,Be=qe);return e&&oe.forEach(function(I0){return t(T,I0)}),ke&&Oa(T,Ae),ge}function We(T,E,R,G){if(typeof R=="object"&&R!==null&&R.type===j&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case q:e:{for(var ge=R.key;E!==null;){if(E.key===ge){if(ge=R.type,ge===j){if(E.tag===7){a(T,E.sibling),G=n(E,R.props.children),G.return=T,T=G;break e}}else if(E.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===fe&&Dl(ge)===E.type){a(T,E.sibling),G=n(E,R.props),Jn(G,R),G.return=T,T=G;break e}a(T,E);break}else t(T,E);E=E.sibling}R.type===j?(G=_l(R.props.children,T.mode,G,R.key),G.return=T,T=G):(G=Zi(R.type,R.key,R.props,null,T.mode,G),Jn(G,R),G.return=T,T=G)}return o(T);case _:e:{for(ge=R.key;E!==null;){if(E.key===ge)if(E.tag===4&&E.stateNode.containerInfo===R.containerInfo&&E.stateNode.implementation===R.implementation){a(T,E.sibling),G=n(E,R.children||[]),G.return=T,T=G;break e}else{a(T,E);break}else t(T,E);E=E.sibling}G=Rr(R,T.mode,G),G.return=T,T=G}return o(T);case fe:return R=Dl(R),We(T,E,R,G)}if(Fe(R))return re(T,E,R,G);if(ye(R)){if(ge=ye(R),typeof ge!="function")throw Error(u(150));return R=ge.call(R),ve(T,E,R,G)}if(typeof R.then=="function")return We(T,E,Pi(R),G);if(R.$$typeof===$)return We(T,E,Ji(T,R),G);es(T,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,E!==null&&E.tag===6?(a(T,E.sibling),G=n(E,R),G.return=T,T=G):(a(T,E),G=_r(R,T.mode,G),G.return=T,T=G),o(T)):a(T,E)}return function(T,E,R,G){try{Kn=0;var ge=We(T,E,R,G);return on=null,ge}catch(oe){if(oe===un||oe===Fi)throw oe;var Be=Xt(29,oe,null,T.mode);return Be.lanes=G,Be.return=T,Be}}}var Ul=Qo(!0),Zo=Qo(!1),al=!1;function Yr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gr(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 ll(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function nl(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ve&2)!==0){var n=l.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),l.pending=t,t=Qi(e),_o(e,null,a),t}return Xi(e,l,t,a),Qi(e)}function Wn(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,ga(e,a)}}function Xr(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var n=null,s=null;if(a=a.firstBaseUpdate,a!==null){do{var o={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};s===null?n=s=o:s=s.next=o,a=a.next}while(a!==null);s===null?n=s=t:s=s.next=t}else n=s=t;a={baseState:l.baseState,firstBaseUpdate:n,lastBaseUpdate:s,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Qr=!1;function Fn(){if(Qr){var e=cn;if(e!==null)throw e}}function In(e,t,a,l){Qr=!1;var n=e.updateQueue;al=!1;var s=n.firstBaseUpdate,o=n.lastBaseUpdate,h=n.shared.pending;if(h!==null){n.shared.pending=null;var y=h,M=y.next;y.next=null,o===null?s=M:o.next=M,o=y;var V=e.alternate;V!==null&&(V=V.updateQueue,h=V.lastBaseUpdate,h!==o&&(h===null?V.firstBaseUpdate=M:h.next=M,V.lastBaseUpdate=y))}if(s!==null){var X=n.baseState;o=0,V=M=y=null,h=s;do{var z=h.lane&-536870913,L=z!==h.lane;if(L?(ze&z)===z:(l&z)===z){z!==0&&z===rn&&(Qr=!0),V!==null&&(V=V.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var re=e,ve=h;z=t;var We=a;switch(ve.tag){case 1:if(re=ve.payload,typeof re=="function"){X=re.call(We,X,z);break e}X=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=ve.payload,z=typeof re=="function"?re.call(We,X,z):re,z==null)break e;X=S({},X,z);break e;case 2:al=!0}}z=h.callback,z!==null&&(e.flags|=64,L&&(e.flags|=8192),L=n.callbacks,L===null?n.callbacks=[z]:L.push(z))}else L={lane:z,tag:h.tag,payload:h.payload,callback:h.callback,next:null},V===null?(M=V=L,y=X):V=V.next=L,o|=z;if(h=h.next,h===null){if(h=n.shared.pending,h===null)break;L=h,h=L.next,L.next=null,n.lastBaseUpdate=L,n.shared.pending=null}}while(!0);V===null&&(y=X),n.baseState=y,n.firstBaseUpdate=M,n.lastBaseUpdate=V,s===null&&(n.shared.lanes=0),ul|=o,e.lanes=o,e.memoizedState=X}}function $o(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function Ko(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)$o(a[e],t)}var dn=v(null),ts=v(0);function Jo(e,t){e=Xa,I(ts,e),I(dn,t),Xa=e|t.baseLanes}function Zr(){I(ts,Xa),I(dn,dn.current)}function $r(){Xa=ts.current,B(dn),B(ts)}var Qt=v(null),na=null;function il(e){var t=e.alternate;I(dt,dt.current&1),I(Qt,e),na===null&&(t===null||dn.current!==null||t.memoizedState!==null)&&(na=e)}function Kr(e){I(dt,dt.current),I(Qt,e),na===null&&(na=e)}function Wo(e){e.tag===22?(I(dt,dt.current),I(Qt,e),na===null&&(na=e)):sl()}function sl(){I(dt,dt.current),I(Qt,Qt.current)}function Zt(e){B(Qt),na===e&&(na=null),B(dt)}var dt=v(0);function as(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||eu(a)||tu(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ua=0,Ee=null,Ke=null,yt=null,ls=!1,fn=!1,Ll=!1,ns=0,Pn=0,hn=null,Ym=0;function ct(){throw Error(u(321))}function Jr(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Gt(e[a],t[a]))return!1;return!0}function Wr(e,t,a,l,n,s){return Ua=s,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?Od:dc,Ll=!1,s=a(l,n),Ll=!1,fn&&(s=Io(t,a,l,n)),Fo(e),s}function Fo(e){D.H=ai;var t=Ke!==null&&Ke.next!==null;if(Ua=0,yt=Ke=Ee=null,ls=!1,Pn=0,hn=null,t)throw Error(u(300));e===null||vt||(e=e.dependencies,e!==null&&Ki(e)&&(vt=!0))}function Io(e,t,a,l){Ee=e;var n=0;do{if(fn&&(hn=null),Pn=0,fn=!1,25<=n)throw Error(u(301));if(n+=1,yt=Ke=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}D.H=Dd,s=t(a,l)}while(fn);return s}function Gm(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?ei(t):t,e=e.useState()[0],(Ke!==null?Ke.memoizedState:null)!==e&&(Ee.flags|=1024),t}function Fr(){var e=ns!==0;return ns=0,e}function Ir(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Pr(e){if(ls){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ls=!1}Ua=0,yt=Ke=Ee=null,fn=!1,Pn=ns=0,hn=null}function Ot(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yt===null?Ee.memoizedState=yt=e:yt=yt.next=e,yt}function ft(){if(Ke===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=Ke.next;var t=yt===null?Ee.memoizedState:yt.next;if(t!==null)yt=t,Ke=e;else{if(e===null)throw Ee.alternate===null?Error(u(467)):Error(u(310));Ke=e,e={memoizedState:Ke.memoizedState,baseState:Ke.baseState,baseQueue:Ke.baseQueue,queue:Ke.queue,next:null},yt===null?Ee.memoizedState=yt=e:yt=yt.next=e}return yt}function is(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ei(e){var t=Pn;return Pn+=1,hn===null&&(hn=[]),e=Yo(hn,e,t),t=Ee,(yt===null?t.memoizedState:yt.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?Od:dc),e}function ss(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ei(e);if(e.$$typeof===$)return _t(e)}throw Error(u(438,String(e)))}function ec(e){var t=null,a=Ee.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=Ee.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=is(),Ee.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=le;return t.index++,a}function La(e,t){return typeof t=="function"?t(e):t}function rs(e){var t=ft();return tc(t,Ke,e)}function tc(e,t,a){var l=e.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=a;var n=e.baseQueue,s=l.pending;if(s!==null){if(n!==null){var o=n.next;n.next=s.next,s.next=o}t.baseQueue=n=s,l.pending=null}if(s=e.baseState,n===null)e.memoizedState=s;else{t=n.next;var h=o=null,y=null,M=t,V=!1;do{var X=M.lane&-536870913;if(X!==M.lane?(ze&X)===X:(Ua&X)===X){var z=M.revertLane;if(z===0)y!==null&&(y=y.next={lane:0,revertLane:0,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null}),X===rn&&(V=!0);else if((Ua&z)===z){M=M.next,z===rn&&(V=!0);continue}else X={lane:0,revertLane:M.revertLane,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},y===null?(h=y=X,o=s):y=y.next=X,Ee.lanes|=z,ul|=z;X=M.action,Ll&&a(s,X),s=M.hasEagerState?M.eagerState:a(s,X)}else z={lane:X,revertLane:M.revertLane,gesture:M.gesture,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},y===null?(h=y=z,o=s):y=y.next=z,Ee.lanes|=X,ul|=X;M=M.next}while(M!==null&&M!==t);if(y===null?o=s:y.next=h,!Gt(s,e.memoizedState)&&(vt=!0,V&&(a=cn,a!==null)))throw a;e.memoizedState=s,e.baseState=o,e.baseQueue=y,l.lastRenderedState=s}return n===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function ac(e){var t=ft(),a=t.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=e;var l=a.dispatch,n=a.pending,s=t.memoizedState;if(n!==null){a.pending=null;var o=n=n.next;do s=e(s,o.action),o=o.next;while(o!==n);Gt(s,t.memoizedState)||(vt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),a.lastRenderedState=s}return[s,l]}function Po(e,t,a){var l=Ee,n=ft(),s=ke;if(s){if(a===void 0)throw Error(u(407));a=a()}else a=t();var o=!Gt((Ke||n).memoizedState,a);if(o&&(n.memoizedState=a,vt=!0),n=n.queue,ic(ad.bind(null,l,n,e),[e]),n.getSnapshot!==t||o||yt!==null&&yt.memoizedState.tag&1){if(l.flags|=2048,pn(9,{destroy:void 0},td.bind(null,l,n,a,t),null),Pe===null)throw Error(u(349));s||(Ua&127)!==0||ed(l,t,a)}return a}function ed(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ee.updateQueue,t===null?(t=is(),Ee.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function td(e,t,a,l){t.value=a,t.getSnapshot=l,ld(t)&&nd(e)}function ad(e,t,a){return a(function(){ld(t)&&nd(e)})}function ld(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Gt(e,a)}catch{return!0}}function nd(e){var t=Tl(e,2);t!==null&&Yt(t,e,2)}function lc(e){var t=Ot();if(typeof e=="function"){var a=e;if(e=a(),Ll){Q(!0);try{a()}finally{Q(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:e},t}function id(e,t,a,l){return e.baseState=a,tc(e,Ke,typeof l=="function"?l:La)}function Xm(e,t,a,l,n){if(os(e))throw Error(u(485));if(e=t.action,e!==null){var s={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){s.listeners.push(o)}};D.T!==null?a(!0):s.isTransition=!1,l(s),a=t.pending,a===null?(s.next=t.pending=s,sd(t,s)):(s.next=a.next,t.pending=a.next=s)}}function sd(e,t){var a=t.action,l=t.payload,n=e.state;if(t.isTransition){var s=D.T,o={};D.T=o;try{var h=a(n,l),y=D.S;y!==null&&y(o,h),rd(e,t,h)}catch(M){nc(e,t,M)}finally{s!==null&&o.types!==null&&(s.types=o.types),D.T=s}}else try{s=a(n,l),rd(e,t,s)}catch(M){nc(e,t,M)}}function rd(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){cd(e,t,l)},function(l){return nc(e,t,l)}):cd(e,t,a)}function cd(e,t,a){t.status="fulfilled",t.value=a,ud(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,sd(e,a)))}function nc(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,ud(t),t=t.next;while(t!==l)}e.action=null}function ud(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function od(e,t){return t}function dd(e,t){if(ke){var a=Pe.formState;if(a!==null){e:{var l=Ee;if(ke){if(at){t:{for(var n=at,s=la;n.nodeType!==8;){if(!s){n=null;break t}if(n=ia(n.nextSibling),n===null){n=null;break t}}s=n.data,n=s==="F!"||s==="F"?n:null}if(n){at=ia(n.nextSibling),l=n.data==="F!";break e}}el(l)}l=!1}l&&(t=a[0])}}return a=Ot(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:od,lastRenderedState:t},a.queue=l,a=Rd.bind(null,Ee,l),l.dispatch=a,l=lc(!1),s=oc.bind(null,Ee,!1,l.queue),l=Ot(),n={state:t,dispatch:null,action:e,pending:null},l.queue=n,a=Xm.bind(null,Ee,n,s,a),n.dispatch=a,l.memoizedState=e,[t,a,!1]}function fd(e){var t=ft();return hd(t,Ke,e)}function hd(e,t,a){if(t=tc(e,t,od)[0],e=rs(La)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=ei(t)}catch(o){throw o===un?Fi:o}else l=t;t=ft();var n=t.queue,s=n.dispatch;return a!==t.memoizedState&&(Ee.flags|=2048,pn(9,{destroy:void 0},Qm.bind(null,n,a),null)),[l,s,e]}function Qm(e,t){e.action=t}function pd(e){var t=ft(),a=Ke;if(a!==null)return hd(t,a,e);ft(),t=t.memoizedState,a=ft();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function pn(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=Ee.updateQueue,t===null&&(t=is(),Ee.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function md(){return ft().memoizedState}function cs(e,t,a,l){var n=Ot();Ee.flags|=e,n.memoizedState=pn(1|t,{destroy:void 0},a,l===void 0?null:l)}function us(e,t,a,l){var n=ft();l=l===void 0?null:l;var s=n.memoizedState.inst;Ke!==null&&l!==null&&Jr(l,Ke.memoizedState.deps)?n.memoizedState=pn(t,s,a,l):(Ee.flags|=e,n.memoizedState=pn(1|t,s,a,l))}function xd(e,t){cs(8390656,8,e,t)}function ic(e,t){us(2048,8,e,t)}function Zm(e){Ee.flags|=4;var t=Ee.updateQueue;if(t===null)t=is(),Ee.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function gd(e){var t=ft().memoizedState;return Zm({ref:t,nextImpl:e}),function(){if((Ve&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function yd(e,t){return us(4,2,e,t)}function vd(e,t){return us(4,4,e,t)}function bd(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function wd(e,t,a){a=a!=null?a.concat([e]):null,us(4,4,bd.bind(null,t,e),a)}function sc(){}function Sd(e,t){var a=ft();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&Jr(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function jd(e,t){var a=ft();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&Jr(t,l[1]))return l[0];if(l=e(),Ll){Q(!0);try{e()}finally{Q(!1)}}return a.memoizedState=[l,t],l}function rc(e,t,a){return a===void 0||(Ua&1073741824)!==0&&(ze&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Ef(),Ee.lanes|=e,ul|=e,a)}function Nd(e,t,a,l){return Gt(a,t)?a:dn.current!==null?(e=rc(e,a,l),Gt(e,t)||(vt=!0),e):(Ua&42)===0||(Ua&1073741824)!==0&&(ze&261930)===0?(vt=!0,e.memoizedState=a):(e=Ef(),Ee.lanes|=e,ul|=e,t)}function Ed(e,t,a,l,n){var s=H.p;H.p=s!==0&&8>s?s:8;var o=D.T,h={};D.T=h,oc(e,!1,t,a);try{var y=n(),M=D.S;if(M!==null&&M(h,y),y!==null&&typeof y=="object"&&typeof y.then=="function"){var V=Vm(y,l);ti(e,t,V,Jt(e))}else ti(e,t,l,Jt(e))}catch(X){ti(e,t,{then:function(){},status:"rejected",reason:X},Jt())}finally{H.p=s,o!==null&&h.types!==null&&(o.types=h.types),D.T=o}}function $m(){}function cc(e,t,a,l){if(e.tag!==5)throw Error(u(476));var n=Cd(e).queue;Ed(e,n,t,J,a===null?$m:function(){return Ad(e),a(l)})}function Cd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:J},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ad(e){var t=Cd(e);t.next===null&&(t=e.alternate.memoizedState),ti(e,t.next.queue,{},Jt())}function uc(){return _t(yi)}function Td(){return ft().memoizedState}function _d(){return ft().memoizedState}function Km(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Jt();e=ll(a);var l=nl(t,e,a);l!==null&&(Yt(l,t,a),Wn(l,t,a)),t={cache:Hr()},e.payload=t;return}t=t.return}}function Jm(e,t,a){var l=Jt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},os(e)?Md(t,a):(a=Ar(e,t,a,l),a!==null&&(Yt(a,e,l),zd(a,t,l)))}function Rd(e,t,a){var l=Jt();ti(e,t,a,l)}function ti(e,t,a,l){var n={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(os(e))Md(t,n);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,h=s(o,a);if(n.hasEagerState=!0,n.eagerState=h,Gt(h,o))return Xi(e,t,n,0),Pe===null&&Gi(),!1}catch{}if(a=Ar(e,t,n,l),a!==null)return Yt(a,e,l),zd(a,t,l),!0}return!1}function oc(e,t,a,l){if(l={lane:2,revertLane:Yc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},os(e)){if(t)throw Error(u(479))}else t=Ar(e,a,l,2),t!==null&&Yt(t,e,2)}function os(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function Md(e,t){fn=ls=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function zd(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,ga(e,a)}}var ai={readContext:_t,use:ss,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useLayoutEffect:ct,useInsertionEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useSyncExternalStore:ct,useId:ct,useHostTransitionStatus:ct,useFormState:ct,useActionState:ct,useOptimistic:ct,useMemoCache:ct,useCacheRefresh:ct};ai.useEffectEvent=ct;var Od={readContext:_t,use:ss,useCallback:function(e,t){return Ot().memoizedState=[e,t===void 0?null:t],e},useContext:_t,useEffect:xd,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,cs(4194308,4,bd.bind(null,t,e),a)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var a=Ot();t=t===void 0?null:t;var l=e();if(Ll){Q(!0);try{e()}finally{Q(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Ot();if(a!==void 0){var n=a(t);if(Ll){Q(!0);try{a(t)}finally{Q(!1)}}}else n=t;return l.memoizedState=l.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},l.queue=e,e=e.dispatch=Jm.bind(null,Ee,e),[l.memoizedState,e]},useRef:function(e){var t=Ot();return e={current:e},t.memoizedState=e},useState:function(e){e=lc(e);var t=e.queue,a=Rd.bind(null,Ee,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:sc,useDeferredValue:function(e,t){var a=Ot();return rc(a,e,t)},useTransition:function(){var e=lc(!1);return e=Ed.bind(null,Ee,e.queue,!0,!1),Ot().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=Ee,n=Ot();if(ke){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),Pe===null)throw Error(u(349));(ze&127)!==0||ed(l,t,a)}n.memoizedState=a;var s={value:a,getSnapshot:t};return n.queue=s,xd(ad.bind(null,l,s,e),[e]),l.flags|=2048,pn(9,{destroy:void 0},td.bind(null,l,s,a,t),null),a},useId:function(){var e=Ot(),t=Pe.identifierPrefix;if(ke){var a=va,l=ya;a=(l&~(1<<32-W(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=ns++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Ym++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:uc,useFormState:dd,useActionState:dd,useOptimistic:function(e){var t=Ot();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=oc.bind(null,Ee,!0,a),a.dispatch=t,[e,t]},useMemoCache:ec,useCacheRefresh:function(){return Ot().memoizedState=Km.bind(null,Ee)},useEffectEvent:function(e){var t=Ot(),a={impl:e};return t.memoizedState=a,function(){if((Ve&2)!==0)throw Error(u(440));return a.impl.apply(void 0,arguments)}}},dc={readContext:_t,use:ss,useCallback:Sd,useContext:_t,useEffect:ic,useImperativeHandle:wd,useInsertionEffect:yd,useLayoutEffect:vd,useMemo:jd,useReducer:rs,useRef:md,useState:function(){return rs(La)},useDebugValue:sc,useDeferredValue:function(e,t){var a=ft();return Nd(a,Ke.memoizedState,e,t)},useTransition:function(){var e=rs(La)[0],t=ft().memoizedState;return[typeof e=="boolean"?e:ei(e),t]},useSyncExternalStore:Po,useId:Td,useHostTransitionStatus:uc,useFormState:fd,useActionState:fd,useOptimistic:function(e,t){var a=ft();return id(a,Ke,e,t)},useMemoCache:ec,useCacheRefresh:_d};dc.useEffectEvent=gd;var Dd={readContext:_t,use:ss,useCallback:Sd,useContext:_t,useEffect:ic,useImperativeHandle:wd,useInsertionEffect:yd,useLayoutEffect:vd,useMemo:jd,useReducer:ac,useRef:md,useState:function(){return ac(La)},useDebugValue:sc,useDeferredValue:function(e,t){var a=ft();return Ke===null?rc(a,e,t):Nd(a,Ke.memoizedState,e,t)},useTransition:function(){var e=ac(La)[0],t=ft().memoizedState;return[typeof e=="boolean"?e:ei(e),t]},useSyncExternalStore:Po,useId:Td,useHostTransitionStatus:uc,useFormState:pd,useActionState:pd,useOptimistic:function(e,t){var a=ft();return Ke!==null?id(a,Ke,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:ec,useCacheRefresh:_d};Dd.useEffectEvent=gd;function fc(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:S({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var hc={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=Jt(),n=ll(l);n.payload=t,a!=null&&(n.callback=a),t=nl(e,n,l),t!==null&&(Yt(t,e,l),Wn(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=Jt(),n=ll(l);n.tag=1,n.payload=t,a!=null&&(n.callback=a),t=nl(e,n,l),t!==null&&(Yt(t,e,l),Wn(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Jt(),l=ll(a);l.tag=2,t!=null&&(l.callback=t),t=nl(e,l,a),t!==null&&(Yt(t,e,a),Wn(t,e,a))}};function kd(e,t,a,l,n,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,s,o):t.prototype&&t.prototype.isPureReactComponent?!Yn(a,l)||!Yn(n,s):!0}function Ud(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&hc.enqueueReplaceState(t,t.state,null)}function Hl(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=S({},a));for(var n in e)a[n]===void 0&&(a[n]=e[n])}return a}function Ld(e){Yi(e)}function Hd(e){console.error(e)}function Bd(e){Yi(e)}function ds(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function qd(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function pc(e,t,a){return a=ll(a),a.tag=3,a.payload={element:null},a.callback=function(){ds(e,t)},a}function Vd(e){return e=ll(e),e.tag=3,e}function Yd(e,t,a,l){var n=a.type.getDerivedStateFromError;if(typeof n=="function"){var s=l.value;e.payload=function(){return n(s)},e.callback=function(){qd(t,a,l)}}var o=a.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){qd(t,a,l),typeof n!="function"&&(ol===null?ol=new Set([this]):ol.add(this));var h=l.stack;this.componentDidCatch(l.value,{componentStack:h!==null?h:""})})}function Wm(e,t,a,l,n){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&sn(t,a,n,!0),a=Qt.current,a!==null){switch(a.tag){case 31:case 13:return na===null?js():a.alternate===null&&ut===0&&(ut=3),a.flags&=-257,a.flags|=65536,a.lanes=n,l===Ii?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Bc(e,l,n)),!1;case 22:return a.flags|=65536,l===Ii?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),Bc(e,l,n)),!1}throw Error(u(435,a.tag))}return Bc(e,l,n),js(),!1}if(ke)return t=Qt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,l!==Or&&(e=Error(u(422),{cause:l}),Qn(ea(e,a)))):(l!==Or&&(t=Error(u(423),{cause:l}),Qn(ea(t,a))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,l=ea(l,a),n=pc(e.stateNode,l,n),Xr(e,n),ut!==4&&(ut=2)),!1;var s=Error(u(520),{cause:l});if(s=ea(s,a),oi===null?oi=[s]:oi.push(s),ut!==4&&(ut=2),t===null)return!0;l=ea(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=n&-n,a.lanes|=e,e=pc(a.stateNode,l,e),Xr(a,e),!1;case 1:if(t=a.type,s=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(ol===null||!ol.has(s))))return a.flags|=65536,n&=-n,a.lanes|=n,n=Vd(n),Yd(n,e,a,l),Xr(a,n),!1}a=a.return}while(a!==null);return!1}var mc=Error(u(461)),vt=!1;function Rt(e,t,a,l){t.child=e===null?Zo(t,null,a,l):Ul(t,e.child,a,l)}function Gd(e,t,a,l,n){a=a.render;var s=t.ref;if("ref"in l){var o={};for(var h in l)h!=="ref"&&(o[h]=l[h])}else o=l;return zl(t),l=Wr(e,t,a,o,s,n),h=Fr(),e!==null&&!vt?(Ir(e,t,n),Ha(e,t,n)):(ke&&h&&Mr(t),t.flags|=1,Rt(e,t,l,n),t.child)}function Xd(e,t,a,l,n){if(e===null){var s=a.type;return typeof s=="function"&&!Tr(s)&&s.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=s,Qd(e,t,s,l,n)):(e=Zi(a.type,null,l,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!jc(e,n)){var o=s.memoizedProps;if(a=a.compare,a=a!==null?a:Yn,a(o,l)&&e.ref===t.ref)return Ha(e,t,n)}return t.flags|=1,e=za(s,l),e.ref=t.ref,e.return=t,t.child=e}function Qd(e,t,a,l,n){if(e!==null){var s=e.memoizedProps;if(Yn(s,l)&&e.ref===t.ref)if(vt=!1,t.pendingProps=l=s,jc(e,n))(e.flags&131072)!==0&&(vt=!0);else return t.lanes=e.lanes,Ha(e,t,n)}return xc(e,t,a,l,n)}function Zd(e,t,a,l){var n=l.children,s=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(s=s!==null?s.baseLanes|a:a,e!==null){for(l=t.child=e.child,n=0;l!==null;)n=n|l.lanes|l.childLanes,l=l.sibling;l=n&~s}else l=0,t.child=null;return $d(e,t,s,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Wi(t,s!==null?s.cachePool:null),s!==null?Jo(t,s):Zr(),Wo(t);else return l=t.lanes=536870912,$d(e,t,s!==null?s.baseLanes|a:a,a,l)}else s!==null?(Wi(t,s.cachePool),Jo(t,s),sl(),t.memoizedState=null):(e!==null&&Wi(t,null),Zr(),sl());return Rt(e,t,n,a),t.child}function li(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function $d(e,t,a,l,n){var s=qr();return s=s===null?null:{parent:gt._currentValue,pool:s},t.memoizedState={baseLanes:a,cachePool:s},e!==null&&Wi(t,null),Zr(),Wo(t),e!==null&&sn(e,t,l,!0),t.childLanes=n,null}function fs(e,t){return t=ps({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Kd(e,t,a){return Ul(t,e.child,null,a),e=fs(t,t.pendingProps),e.flags|=2,Zt(t),t.memoizedState=null,e}function Fm(e,t,a){var l=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ke){if(l.mode==="hidden")return e=fs(t,l),t.lanes=536870912,li(null,e);if(Kr(t),(e=at)?(e=rh(e,la),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ia!==null?{id:ya,overflow:va}:null,retryLane:536870912,hydrationErrors:null},a=Mo(e),a.return=t,t.child=a,Tt=t,at=null)):e=null,e===null)throw el(t);return t.lanes=536870912,null}return fs(t,l)}var s=e.memoizedState;if(s!==null){var o=s.dehydrated;if(Kr(t),n)if(t.flags&256)t.flags&=-257,t=Kd(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(vt||sn(e,t,a,!1),n=(a&e.childLanes)!==0,vt||n){if(l=Pe,l!==null&&(o=Sl(l,a),o!==0&&o!==s.retryLane))throw s.retryLane=o,Tl(e,o),Yt(l,e,o),mc;js(),t=Kd(e,t,a)}else e=s.treeContext,at=ia(o.nextSibling),Tt=t,ke=!0,Pa=null,la=!1,e!==null&&Do(t,e),t=fs(t,l),t.flags|=4096;return t}return e=za(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function hs(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(u(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function xc(e,t,a,l,n){return zl(t),a=Wr(e,t,a,l,void 0,n),l=Fr(),e!==null&&!vt?(Ir(e,t,n),Ha(e,t,n)):(ke&&l&&Mr(t),t.flags|=1,Rt(e,t,a,n),t.child)}function Jd(e,t,a,l,n,s){return zl(t),t.updateQueue=null,a=Io(t,l,a,n),Fo(e),l=Fr(),e!==null&&!vt?(Ir(e,t,s),Ha(e,t,s)):(ke&&l&&Mr(t),t.flags|=1,Rt(e,t,a,s),t.child)}function Wd(e,t,a,l,n){if(zl(t),t.stateNode===null){var s=tn,o=a.contextType;typeof o=="object"&&o!==null&&(s=_t(o)),s=new a(l,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=hc,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=l,s.state=t.memoizedState,s.refs={},Yr(t),o=a.contextType,s.context=typeof o=="object"&&o!==null?_t(o):tn,s.state=t.memoizedState,o=a.getDerivedStateFromProps,typeof o=="function"&&(fc(t,a,o,l),s.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(o=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),o!==s.state&&hc.enqueueReplaceState(s,s.state,null),In(t,l,s,n),Fn(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){s=t.stateNode;var h=t.memoizedProps,y=Hl(a,h);s.props=y;var M=s.context,V=a.contextType;o=tn,typeof V=="object"&&V!==null&&(o=_t(V));var X=a.getDerivedStateFromProps;V=typeof X=="function"||typeof s.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,V||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(h||M!==o)&&Ud(t,s,l,o),al=!1;var z=t.memoizedState;s.state=z,In(t,l,s,n),Fn(),M=t.memoizedState,h||z!==M||al?(typeof X=="function"&&(fc(t,a,X,l),M=t.memoizedState),(y=al||kd(t,a,y,l,z,M,o))?(V||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=M),s.props=l,s.state=M,s.context=o,l=y):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{s=t.stateNode,Gr(e,t),o=t.memoizedProps,V=Hl(a,o),s.props=V,X=t.pendingProps,z=s.context,M=a.contextType,y=tn,typeof M=="object"&&M!==null&&(y=_t(M)),h=a.getDerivedStateFromProps,(M=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==X||z!==y)&&Ud(t,s,l,y),al=!1,z=t.memoizedState,s.state=z,In(t,l,s,n),Fn();var L=t.memoizedState;o!==X||z!==L||al||e!==null&&e.dependencies!==null&&Ki(e.dependencies)?(typeof h=="function"&&(fc(t,a,h,l),L=t.memoizedState),(V=al||kd(t,a,V,l,z,L,y)||e!==null&&e.dependencies!==null&&Ki(e.dependencies))?(M||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(l,L,y),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(l,L,y)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=L),s.props=l,s.state=L,s.context=y,l=V):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),l=!1)}return s=l,hs(e,t),l=(t.flags&128)!==0,s||l?(s=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&l?(t.child=Ul(t,e.child,null,n),t.child=Ul(t,null,a,n)):Rt(e,t,a,n),t.memoizedState=s.state,e=t.child):e=Ha(e,t,n),e}function Fd(e,t,a,l){return Rl(),t.flags|=256,Rt(e,t,a,l),t.child}var gc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function yc(e){return{baseLanes:e,cachePool:qo()}}function vc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Kt),e}function Id(e,t,a){var l=t.pendingProps,n=!1,s=(t.flags&128)!==0,o;if((o=s)||(o=e!==null&&e.memoizedState===null?!1:(dt.current&2)!==0),o&&(n=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(ke){if(n?il(t):sl(),(e=at)?(e=rh(e,la),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ia!==null?{id:ya,overflow:va}:null,retryLane:536870912,hydrationErrors:null},a=Mo(e),a.return=t,t.child=a,Tt=t,at=null)):e=null,e===null)throw el(t);return tu(e)?t.lanes=32:t.lanes=536870912,null}var h=l.children;return l=l.fallback,n?(sl(),n=t.mode,h=ps({mode:"hidden",children:h},n),l=_l(l,n,a,null),h.return=t,l.return=t,h.sibling=l,t.child=h,l=t.child,l.memoizedState=yc(a),l.childLanes=vc(e,o,a),t.memoizedState=gc,li(null,l)):(il(t),bc(t,h))}var y=e.memoizedState;if(y!==null&&(h=y.dehydrated,h!==null)){if(s)t.flags&256?(il(t),t.flags&=-257,t=wc(e,t,a)):t.memoizedState!==null?(sl(),t.child=e.child,t.flags|=128,t=null):(sl(),h=l.fallback,n=t.mode,l=ps({mode:"visible",children:l.children},n),h=_l(h,n,a,null),h.flags|=2,l.return=t,h.return=t,l.sibling=h,t.child=l,Ul(t,e.child,null,a),l=t.child,l.memoizedState=yc(a),l.childLanes=vc(e,o,a),t.memoizedState=gc,t=li(null,l));else if(il(t),tu(h)){if(o=h.nextSibling&&h.nextSibling.dataset,o)var M=o.dgst;o=M,l=Error(u(419)),l.stack="",l.digest=o,Qn({value:l,source:null,stack:null}),t=wc(e,t,a)}else if(vt||sn(e,t,a,!1),o=(a&e.childLanes)!==0,vt||o){if(o=Pe,o!==null&&(l=Sl(o,a),l!==0&&l!==y.retryLane))throw y.retryLane=l,Tl(e,l),Yt(o,e,l),mc;eu(h)||js(),t=wc(e,t,a)}else eu(h)?(t.flags|=192,t.child=e.child,t=null):(e=y.treeContext,at=ia(h.nextSibling),Tt=t,ke=!0,Pa=null,la=!1,e!==null&&Do(t,e),t=bc(t,l.children),t.flags|=4096);return t}return n?(sl(),h=l.fallback,n=t.mode,y=e.child,M=y.sibling,l=za(y,{mode:"hidden",children:l.children}),l.subtreeFlags=y.subtreeFlags&65011712,M!==null?h=za(M,h):(h=_l(h,n,a,null),h.flags|=2),h.return=t,l.return=t,l.sibling=h,t.child=l,li(null,l),l=t.child,h=e.child.memoizedState,h===null?h=yc(a):(n=h.cachePool,n!==null?(y=gt._currentValue,n=n.parent!==y?{parent:y,pool:y}:n):n=qo(),h={baseLanes:h.baseLanes|a,cachePool:n}),l.memoizedState=h,l.childLanes=vc(e,o,a),t.memoizedState=gc,li(e.child,l)):(il(t),a=e.child,e=a.sibling,a=za(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=a,t.memoizedState=null,a)}function bc(e,t){return t=ps({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ps(e,t){return e=Xt(22,e,null,t),e.lanes=0,e}function wc(e,t,a){return Ul(t,e.child,null,a),e=bc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Pd(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Ur(e.return,t,a)}function Sc(e,t,a,l,n,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:n,treeForkCount:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=l,o.tail=a,o.tailMode=n,o.treeForkCount=s)}function ef(e,t,a){var l=t.pendingProps,n=l.revealOrder,s=l.tail;l=l.children;var o=dt.current,h=(o&2)!==0;if(h?(o=o&1|2,t.flags|=128):o&=1,I(dt,o),Rt(e,t,l,a),l=ke?Xn:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Pd(e,a,t);else if(e.tag===19)Pd(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(n){case"forwards":for(a=t.child,n=null;a!==null;)e=a.alternate,e!==null&&as(e)===null&&(n=a),a=a.sibling;a=n,a===null?(n=t.child,t.child=null):(n=a.sibling,a.sibling=null),Sc(t,!1,n,a,s,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&as(e)===null){t.child=n;break}e=n.sibling,n.sibling=a,a=n,n=e}Sc(t,!0,a,null,s,l);break;case"together":Sc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Ha(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),ul|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(sn(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,a=za(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=za(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function jc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ki(e)))}function Im(e,t,a){switch(t.tag){case 3:$e(t,t.stateNode.containerInfo),tl(t,gt,e.memoizedState.cache),Rl();break;case 27:case 5:kt(t);break;case 4:$e(t,t.stateNode.containerInfo);break;case 10:tl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Kr(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(il(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Id(e,t,a):(il(t),e=Ha(e,t,a),e!==null?e.sibling:null);il(t);break;case 19:var n=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(sn(e,t,a,!1),l=(a&t.childLanes)!==0),n){if(l)return ef(e,t,a);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),I(dt,dt.current),l)break;return null;case 22:return t.lanes=0,Zd(e,t,a,t.pendingProps);case 24:tl(t,gt,e.memoizedState.cache)}return Ha(e,t,a)}function tf(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)vt=!0;else{if(!jc(e,a)&&(t.flags&128)===0)return vt=!1,Im(e,t,a);vt=(e.flags&131072)!==0}else vt=!1,ke&&(t.flags&1048576)!==0&&Oo(t,Xn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Dl(t.elementType),t.type=e,typeof e=="function")Tr(e)?(l=Hl(e,l),t.tag=1,t=Wd(null,t,e,l,a)):(t.tag=0,t=xc(null,t,e,l,a));else{if(e!=null){var n=e.$$typeof;if(n===ne){t.tag=11,t=Gd(null,t,e,l,a);break e}else if(n===P){t.tag=14,t=Xd(null,t,e,l,a);break e}}throw t=Te(e)||e,Error(u(306,t,""))}}return t;case 0:return xc(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,n=Hl(l,t.pendingProps),Wd(e,t,l,n,a);case 3:e:{if($e(t,t.stateNode.containerInfo),e===null)throw Error(u(387));l=t.pendingProps;var s=t.memoizedState;n=s.element,Gr(e,t),In(t,l,null,a);var o=t.memoizedState;if(l=o.cache,tl(t,gt,l),l!==s.cache&&Lr(t,[gt],a,!0),Fn(),l=o.element,s.isDehydrated)if(s={element:l,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=Fd(e,t,l,a);break e}else if(l!==n){n=ea(Error(u(424)),t),Qn(n),t=Fd(e,t,l,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,at=ia(e.firstChild),Tt=t,ke=!0,Pa=null,la=!0,a=Zo(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Rl(),l===n){t=Ha(e,t,a);break e}Rt(e,t,l,a)}t=t.child}return t;case 26:return hs(e,t),e===null?(a=hh(t.type,null,t.pendingProps,null))?t.memoizedState=a:ke||(a=t.type,e=t.pendingProps,l=Rs(he.current).createElement(a),l[tt]=t,l[xt]=e,Mt(l,a,e),Et(l),t.stateNode=l):t.memoizedState=hh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return kt(t),e===null&&ke&&(l=t.stateNode=oh(t.type,t.pendingProps,he.current),Tt=t,la=!0,n=at,pl(t.type)?(au=n,at=ia(l.firstChild)):at=n),Rt(e,t,t.pendingProps.children,a),hs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ke&&((n=l=at)&&(l=T0(l,t.type,t.pendingProps,la),l!==null?(t.stateNode=l,Tt=t,at=ia(l.firstChild),la=!1,n=!0):n=!1),n||el(t)),kt(t),n=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,l=s.children,Fc(n,s)?l=null:o!==null&&Fc(n,o)&&(t.flags|=32),t.memoizedState!==null&&(n=Wr(e,t,Gm,null,null,a),yi._currentValue=n),hs(e,t),Rt(e,t,l,a),t.child;case 6:return e===null&&ke&&((e=a=at)&&(a=_0(a,t.pendingProps,la),a!==null?(t.stateNode=a,Tt=t,at=null,e=!0):e=!1),e||el(t)),null;case 13:return Id(e,t,a);case 4:return $e(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Ul(t,null,l,a):Rt(e,t,l,a),t.child;case 11:return Gd(e,t,t.type,t.pendingProps,a);case 7:return Rt(e,t,t.pendingProps,a),t.child;case 8:return Rt(e,t,t.pendingProps.children,a),t.child;case 12:return Rt(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,tl(t,t.type,l.value),Rt(e,t,l.children,a),t.child;case 9:return n=t.type._context,l=t.pendingProps.children,zl(t),n=_t(n),l=l(n),t.flags|=1,Rt(e,t,l,a),t.child;case 14:return Xd(e,t,t.type,t.pendingProps,a);case 15:return Qd(e,t,t.type,t.pendingProps,a);case 19:return ef(e,t,a);case 31:return Fm(e,t,a);case 22:return Zd(e,t,a,t.pendingProps);case 24:return zl(t),l=_t(gt),e===null?(n=qr(),n===null&&(n=Pe,s=Hr(),n.pooledCache=s,s.refCount++,s!==null&&(n.pooledCacheLanes|=a),n=s),t.memoizedState={parent:l,cache:n},Yr(t),tl(t,gt,n)):((e.lanes&a)!==0&&(Gr(e,t),In(t,null,null,a),Fn()),n=e.memoizedState,s=t.memoizedState,n.parent!==l?(n={parent:l,cache:l},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),tl(t,gt,l)):(l=s.cache,tl(t,gt,l),l!==n.cache&&Lr(t,[gt],a,!0))),Rt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function Ba(e){e.flags|=4}function Nc(e,t,a,l,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(_f())e.flags|=8192;else throw kl=Ii,Vr}else e.flags&=-16777217}function af(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!yh(t))if(_f())e.flags|=8192;else throw kl=Ii,Vr}function ms(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?K():536870912,e.lanes|=t,yn|=t)}function ni(e,t){if(!ke)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function lt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var n=e.child;n!==null;)a|=n.lanes|n.childLanes,l|=n.subtreeFlags&65011712,l|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)a|=n.lanes|n.childLanes,l|=n.subtreeFlags,l|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function Pm(e,t,a){var l=t.pendingProps;switch(zr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(t),null;case 1:return lt(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),ka(gt),Ue(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(nn(t)?Ba(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Dr())),lt(t),null;case 26:var n=t.type,s=t.memoizedState;return e===null?(Ba(t),s!==null?(lt(t),af(t,s)):(lt(t),Nc(t,n,null,l,a))):s?s!==e.memoizedState?(Ba(t),lt(t),af(t,s)):(lt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Ba(t),lt(t),Nc(t,n,e,l,a)),null;case 27:if(Wt(t),a=he.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Ba(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return lt(t),null}e=Z.current,nn(t)?ko(t):(e=oh(n,l,a),t.stateNode=e,Ba(t))}return lt(t),null;case 5:if(Wt(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Ba(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return lt(t),null}if(s=Z.current,nn(t))ko(t);else{var o=Rs(he.current);switch(s){case 1:s=o.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:s=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":s=o.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":s=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":s=o.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof l.is=="string"?o.createElement("select",{is:l.is}):o.createElement("select"),l.multiple?s.multiple=!0:l.size&&(s.size=l.size);break;default:s=typeof l.is=="string"?o.createElement(n,{is:l.is}):o.createElement(n)}}s[tt]=t,s[xt]=l;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)s.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=s;e:switch(Mt(s,n,l),n){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Ba(t)}}return lt(t),Nc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Ba(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(u(166));if(e=he.current,nn(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,n=Tt,n!==null)switch(n.tag){case 27:case 5:l=n.memoizedProps}e[tt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Pf(e.nodeValue,a)),e||el(t,!0)}else e=Rs(e).createTextNode(l),e[tt]=t,t.stateNode=e}return lt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=nn(t),a!==null){if(e===null){if(!l)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[tt]=t}else Rl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;lt(t),e=!1}else a=Dr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Zt(t),t):(Zt(t),null);if((t.flags&128)!==0)throw Error(u(558))}return lt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=nn(t),l!==null&&l.dehydrated!==null){if(e===null){if(!n)throw Error(u(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(u(317));n[tt]=t}else Rl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;lt(t),n=!1}else n=Dr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(Zt(t),t):(Zt(t),null)}return Zt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,n=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(n=l.alternate.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==n&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),ms(t,t.updateQueue),lt(t),null);case 4:return Ue(),e===null&&Zc(t.stateNode.containerInfo),lt(t),null;case 10:return ka(t.type),lt(t),null;case 19:if(B(dt),l=t.memoizedState,l===null)return lt(t),null;if(n=(t.flags&128)!==0,s=l.rendering,s===null)if(n)ni(l,!1);else{if(ut!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=as(e),s!==null){for(t.flags|=128,ni(l,!1),e=s.updateQueue,t.updateQueue=e,ms(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Ro(a,e),a=a.sibling;return I(dt,dt.current&1|2),ke&&Oa(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Nt()>bs&&(t.flags|=128,n=!0,ni(l,!1),t.lanes=4194304)}else{if(!n)if(e=as(s),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,ms(t,e),ni(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!ke)return lt(t),null}else 2*Nt()-l.renderingStartTime>bs&&a!==536870912&&(t.flags|=128,n=!0,ni(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(e=l.last,e!==null?e.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Nt(),e.sibling=null,a=dt.current,I(dt,n?a&1|2:a&1),ke&&Oa(t,l.treeForkCount),e):(lt(t),null);case 22:case 23:return Zt(t),$r(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(lt(t),t.subtreeFlags&6&&(t.flags|=8192)):lt(t),a=t.updateQueue,a!==null&&ms(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&B(Ol),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ka(gt),lt(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function e0(e,t){switch(zr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ka(gt),Ue(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Wt(t),null;case 31:if(t.memoizedState!==null){if(Zt(t),t.alternate===null)throw Error(u(340));Rl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Zt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Rl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(dt),null;case 4:return Ue(),null;case 10:return ka(t.type),null;case 22:case 23:return Zt(t),$r(),e!==null&&B(Ol),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ka(gt),null;case 25:return null;default:return null}}function lf(e,t){switch(zr(t),t.tag){case 3:ka(gt),Ue();break;case 26:case 27:case 5:Wt(t);break;case 4:Ue();break;case 31:t.memoizedState!==null&&Zt(t);break;case 13:Zt(t);break;case 19:B(dt);break;case 10:ka(t.type);break;case 22:case 23:Zt(t),$r(),e!==null&&B(Ol);break;case 24:ka(gt)}}function ii(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var n=l.next;a=n;do{if((a.tag&e)===e){l=void 0;var s=a.create,o=a.inst;l=s(),o.destroy=l}a=a.next}while(a!==n)}}catch(h){Ze(t,t.return,h)}}function rl(e,t,a){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var s=n.next;l=s;do{if((l.tag&e)===e){var o=l.inst,h=o.destroy;if(h!==void 0){o.destroy=void 0,n=t;var y=a,M=h;try{M()}catch(V){Ze(n,y,V)}}}l=l.next}while(l!==s)}}catch(V){Ze(t,t.return,V)}}function nf(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Ko(t,a)}catch(l){Ze(e,e.return,l)}}}function sf(e,t,a){a.props=Hl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Ze(e,t,l)}}function si(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(n){Ze(e,t,n)}}function ba(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(n){Ze(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(n){Ze(e,t,n)}else a.current=null}function rf(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(n){Ze(e,e.return,n)}}function Ec(e,t,a){try{var l=e.stateNode;S0(l,e.type,a,t),l[xt]=t}catch(n){Ze(e,e.return,n)}}function cf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&pl(e.type)||e.tag===4}function Cc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||cf(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&&pl(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 Ac(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Ra));else if(l!==4&&(l===27&&pl(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Ac(e,t,a),e=e.sibling;e!==null;)Ac(e,t,a),e=e.sibling}function xs(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&pl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(xs(e,t,a),e=e.sibling;e!==null;)xs(e,t,a),e=e.sibling}function uf(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Mt(t,l,a),t[tt]=e,t[xt]=a}catch(s){Ze(e,e.return,s)}}var qa=!1,bt=!1,Tc=!1,of=typeof WeakSet=="function"?WeakSet:Set,Ct=null;function t0(e,t){if(e=e.containerInfo,Jc=Ls,e=wo(e),wr(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var n=l.anchorOffset,s=l.focusNode;l=l.focusOffset;try{a.nodeType,s.nodeType}catch{a=null;break e}var o=0,h=-1,y=-1,M=0,V=0,X=e,z=null;t:for(;;){for(var L;X!==a||n!==0&&X.nodeType!==3||(h=o+n),X!==s||l!==0&&X.nodeType!==3||(y=o+l),X.nodeType===3&&(o+=X.nodeValue.length),(L=X.firstChild)!==null;)z=X,X=L;for(;;){if(X===e)break t;if(z===a&&++M===n&&(h=o),z===s&&++V===l&&(y=o),(L=X.nextSibling)!==null)break;X=z,z=X.parentNode}X=L}a=h===-1||y===-1?null:{start:h,end:y}}else a=null}a=a||{start:0,end:0}}else a=null;for(Wc={focusedElem:e,selectionRange:a},Ls=!1,Ct=t;Ct!==null;)if(t=Ct,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ct=e;else for(;Ct!==null;){switch(t=Ct,s=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)n=e[a],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&s!==null){e=void 0,a=t,n=s.memoizedProps,s=s.memoizedState,l=a.stateNode;try{var re=Hl(a.type,n);e=l.getSnapshotBeforeUpdate(re,s),l.__reactInternalSnapshotBeforeUpdate=e}catch(ve){Ze(a,a.return,ve)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Pc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Pc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(u(163))}if(e=t.sibling,e!==null){e.return=t.return,Ct=e;break}Ct=t.return}}function df(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Ya(e,a),l&4&&ii(5,a);break;case 1:if(Ya(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(o){Ze(a,a.return,o)}else{var n=Hl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Ze(a,a.return,o)}}l&64&&nf(a),l&512&&si(a,a.return);break;case 3:if(Ya(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Ko(e,t)}catch(o){Ze(a,a.return,o)}}break;case 27:t===null&&l&4&&uf(a);case 26:case 5:Ya(e,a),t===null&&l&4&&rf(a),l&512&&si(a,a.return);break;case 12:Ya(e,a);break;case 31:Ya(e,a),l&4&&pf(e,a);break;case 13:Ya(e,a),l&4&&mf(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=o0.bind(null,a),R0(e,a))));break;case 22:if(l=a.memoizedState!==null||qa,!l){t=t!==null&&t.memoizedState!==null||bt,n=qa;var s=bt;qa=l,(bt=t)&&!s?Ga(e,a,(a.subtreeFlags&8772)!==0):Ya(e,a),qa=n,bt=s}break;case 30:break;default:Ya(e,a)}}function ff(e){var t=e.alternate;t!==null&&(e.alternate=null,ff(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&nr(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 it=null,Ht=!1;function Va(e,t,a){for(a=a.child;a!==null;)hf(e,t,a),a=a.sibling}function hf(e,t,a){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(Ta,a)}catch{}switch(a.tag){case 26:bt||ba(a,t),Va(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:bt||ba(a,t);var l=it,n=Ht;pl(a.type)&&(it=a.stateNode,Ht=!1),Va(e,t,a),mi(a.stateNode),it=l,Ht=n;break;case 5:bt||ba(a,t);case 6:if(l=it,n=Ht,it=null,Va(e,t,a),it=l,Ht=n,it!==null)if(Ht)try{(it.nodeType===9?it.body:it.nodeName==="HTML"?it.ownerDocument.body:it).removeChild(a.stateNode)}catch(s){Ze(a,t,s)}else try{it.removeChild(a.stateNode)}catch(s){Ze(a,t,s)}break;case 18:it!==null&&(Ht?(e=it,ih(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Cn(e)):ih(it,a.stateNode));break;case 4:l=it,n=Ht,it=a.stateNode.containerInfo,Ht=!0,Va(e,t,a),it=l,Ht=n;break;case 0:case 11:case 14:case 15:rl(2,a,t),bt||rl(4,a,t),Va(e,t,a);break;case 1:bt||(ba(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&sf(a,t,l)),Va(e,t,a);break;case 21:Va(e,t,a);break;case 22:bt=(l=bt)||a.memoizedState!==null,Va(e,t,a),bt=l;break;default:Va(e,t,a)}}function pf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Cn(e)}catch(a){Ze(t,t.return,a)}}}function mf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Cn(e)}catch(a){Ze(t,t.return,a)}}function a0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new of),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new of),t;default:throw Error(u(435,e.tag))}}function gs(e,t){var a=a0(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var n=d0.bind(null,e,l);l.then(n,n)}})}function Bt(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var n=a[l],s=e,o=t,h=o;e:for(;h!==null;){switch(h.tag){case 27:if(pl(h.type)){it=h.stateNode,Ht=!1;break e}break;case 5:it=h.stateNode,Ht=!1;break e;case 3:case 4:it=h.stateNode.containerInfo,Ht=!0;break e}h=h.return}if(it===null)throw Error(u(160));hf(s,o,n),it=null,Ht=!1,s=n.alternate,s!==null&&(s.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)xf(t,e),t=t.sibling}var ha=null;function xf(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Bt(t,e),qt(e),l&4&&(rl(3,e,e.return),ii(3,e),rl(5,e,e.return));break;case 1:Bt(t,e),qt(e),l&512&&(bt||a===null||ba(a,a.return)),l&64&&qa&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var n=ha;if(Bt(t,e),qt(e),l&512&&(bt||a===null||ba(a,a.return)),l&4){var s=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,n=n.ownerDocument||n;t:switch(l){case"title":s=n.getElementsByTagName("title")[0],(!s||s[On]||s[tt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=n.createElement(l),n.head.insertBefore(s,n.querySelector("head > title"))),Mt(s,l,a),s[tt]=e,Et(s),l=s;break e;case"link":var o=xh("link","href",n).get(l+(a.href||""));if(o){for(var h=0;h<o.length;h++)if(s=o[h],s.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&s.getAttribute("rel")===(a.rel==null?null:a.rel)&&s.getAttribute("title")===(a.title==null?null:a.title)&&s.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){o.splice(h,1);break t}}s=n.createElement(l),Mt(s,l,a),n.head.appendChild(s);break;case"meta":if(o=xh("meta","content",n).get(l+(a.content||""))){for(h=0;h<o.length;h++)if(s=o[h],s.getAttribute("content")===(a.content==null?null:""+a.content)&&s.getAttribute("name")===(a.name==null?null:a.name)&&s.getAttribute("property")===(a.property==null?null:a.property)&&s.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&s.getAttribute("charset")===(a.charSet==null?null:a.charSet)){o.splice(h,1);break t}}s=n.createElement(l),Mt(s,l,a),n.head.appendChild(s);break;default:throw Error(u(468,l))}s[tt]=e,Et(s),l=s}e.stateNode=l}else gh(n,e.type,e.stateNode);else e.stateNode=mh(n,l,e.memoizedProps);else s!==l?(s===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):s.count--,l===null?gh(n,e.type,e.stateNode):mh(n,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Ec(e,e.memoizedProps,a.memoizedProps)}break;case 27:Bt(t,e),qt(e),l&512&&(bt||a===null||ba(a,a.return)),a!==null&&l&4&&Ec(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Bt(t,e),qt(e),l&512&&(bt||a===null||ba(a,a.return)),e.flags&32){n=e.stateNode;try{Kl(n,"")}catch(re){Ze(e,e.return,re)}}l&4&&e.stateNode!=null&&(n=e.memoizedProps,Ec(e,n,a!==null?a.memoizedProps:n)),l&1024&&(Tc=!0);break;case 6:if(Bt(t,e),qt(e),l&4){if(e.stateNode===null)throw Error(u(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(re){Ze(e,e.return,re)}}break;case 3:if(Os=null,n=ha,ha=Ms(t.containerInfo),Bt(t,e),ha=n,qt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Cn(t.containerInfo)}catch(re){Ze(e,e.return,re)}Tc&&(Tc=!1,gf(e));break;case 4:l=ha,ha=Ms(e.stateNode.containerInfo),Bt(t,e),qt(e),ha=l;break;case 12:Bt(t,e),qt(e);break;case 31:Bt(t,e),qt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,gs(e,l)));break;case 13:Bt(t,e),qt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(vs=Nt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,gs(e,l)));break;case 22:n=e.memoizedState!==null;var y=a!==null&&a.memoizedState!==null,M=qa,V=bt;if(qa=M||n,bt=V||y,Bt(t,e),bt=V,qa=M,qt(e),l&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(a===null||y||qa||bt||Bl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){y=a=t;try{if(s=y.stateNode,n)o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{h=y.stateNode;var X=y.memoizedProps.style,z=X!=null&&X.hasOwnProperty("display")?X.display:null;h.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(re){Ze(y,y.return,re)}}}else if(t.tag===6){if(a===null){y=t;try{y.stateNode.nodeValue=n?"":y.memoizedProps}catch(re){Ze(y,y.return,re)}}}else if(t.tag===18){if(a===null){y=t;try{var L=y.stateNode;n?sh(L,!0):sh(y.stateNode,!1)}catch(re){Ze(y,y.return,re)}}}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;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,gs(e,a))));break;case 19:Bt(t,e),qt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,gs(e,l)));break;case 30:break;case 21:break;default:Bt(t,e),qt(e)}}function qt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(cf(l)){a=l;break}l=l.return}if(a==null)throw Error(u(160));switch(a.tag){case 27:var n=a.stateNode,s=Cc(e);xs(e,s,n);break;case 5:var o=a.stateNode;a.flags&32&&(Kl(o,""),a.flags&=-33);var h=Cc(e);xs(e,h,o);break;case 3:case 4:var y=a.stateNode.containerInfo,M=Cc(e);Ac(e,M,y);break;default:throw Error(u(161))}}catch(V){Ze(e,e.return,V)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;gf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ya(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)df(e,t.alternate,t),t=t.sibling}function Bl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:rl(4,t,t.return),Bl(t);break;case 1:ba(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&sf(t,t.return,a),Bl(t);break;case 27:mi(t.stateNode);case 26:case 5:ba(t,t.return),Bl(t);break;case 22:t.memoizedState===null&&Bl(t);break;case 30:Bl(t);break;default:Bl(t)}e=e.sibling}}function Ga(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,n=e,s=t,o=s.flags;switch(s.tag){case 0:case 11:case 15:Ga(n,s,a),ii(4,s);break;case 1:if(Ga(n,s,a),l=s,n=l.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(M){Ze(l,l.return,M)}if(l=s,n=l.updateQueue,n!==null){var h=l.stateNode;try{var y=n.shared.hiddenCallbacks;if(y!==null)for(n.shared.hiddenCallbacks=null,n=0;n<y.length;n++)$o(y[n],h)}catch(M){Ze(l,l.return,M)}}a&&o&64&&nf(s),si(s,s.return);break;case 27:uf(s);case 26:case 5:Ga(n,s,a),a&&l===null&&o&4&&rf(s),si(s,s.return);break;case 12:Ga(n,s,a);break;case 31:Ga(n,s,a),a&&o&4&&pf(n,s);break;case 13:Ga(n,s,a),a&&o&4&&mf(n,s);break;case 22:s.memoizedState===null&&Ga(n,s,a),si(s,s.return);break;case 30:break;default:Ga(n,s,a)}t=t.sibling}}function _c(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Zn(a))}function Rc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zn(e))}function pa(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)yf(e,t,a,l),t=t.sibling}function yf(e,t,a,l){var n=t.flags;switch(t.tag){case 0:case 11:case 15:pa(e,t,a,l),n&2048&&ii(9,t);break;case 1:pa(e,t,a,l);break;case 3:pa(e,t,a,l),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zn(e)));break;case 12:if(n&2048){pa(e,t,a,l),e=t.stateNode;try{var s=t.memoizedProps,o=s.id,h=s.onPostCommit;typeof h=="function"&&h(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(y){Ze(t,t.return,y)}}else pa(e,t,a,l);break;case 31:pa(e,t,a,l);break;case 13:pa(e,t,a,l);break;case 23:break;case 22:s=t.stateNode,o=t.alternate,t.memoizedState!==null?s._visibility&2?pa(e,t,a,l):ri(e,t):s._visibility&2?pa(e,t,a,l):(s._visibility|=2,mn(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),n&2048&&_c(o,t);break;case 24:pa(e,t,a,l),n&2048&&Rc(t.alternate,t);break;default:pa(e,t,a,l)}}function mn(e,t,a,l,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,o=t,h=a,y=l,M=o.flags;switch(o.tag){case 0:case 11:case 15:mn(s,o,h,y,n),ii(8,o);break;case 23:break;case 22:var V=o.stateNode;o.memoizedState!==null?V._visibility&2?mn(s,o,h,y,n):ri(s,o):(V._visibility|=2,mn(s,o,h,y,n)),n&&M&2048&&_c(o.alternate,o);break;case 24:mn(s,o,h,y,n),n&&M&2048&&Rc(o.alternate,o);break;default:mn(s,o,h,y,n)}t=t.sibling}}function ri(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,n=l.flags;switch(l.tag){case 22:ri(a,l),n&2048&&_c(l.alternate,l);break;case 24:ri(a,l),n&2048&&Rc(l.alternate,l);break;default:ri(a,l)}t=t.sibling}}var ci=8192;function xn(e,t,a){if(e.subtreeFlags&ci)for(e=e.child;e!==null;)vf(e,t,a),e=e.sibling}function vf(e,t,a){switch(e.tag){case 26:xn(e,t,a),e.flags&ci&&e.memoizedState!==null&&Y0(a,ha,e.memoizedState,e.memoizedProps);break;case 5:xn(e,t,a);break;case 3:case 4:var l=ha;ha=Ms(e.stateNode.containerInfo),xn(e,t,a),ha=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=ci,ci=16777216,xn(e,t,a),ci=l):xn(e,t,a));break;default:xn(e,t,a)}}function bf(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 ui(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];Ct=l,Sf(l,e)}bf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)wf(e),e=e.sibling}function wf(e){switch(e.tag){case 0:case 11:case 15:ui(e),e.flags&2048&&rl(9,e,e.return);break;case 3:ui(e);break;case 12:ui(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ys(e)):ui(e);break;default:ui(e)}}function ys(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];Ct=l,Sf(l,e)}bf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:rl(8,t,t.return),ys(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,ys(t));break;default:ys(t)}e=e.sibling}}function Sf(e,t){for(;Ct!==null;){var a=Ct;switch(a.tag){case 0:case 11:case 15:rl(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Zn(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,Ct=l;else e:for(a=e;Ct!==null;){l=Ct;var n=l.sibling,s=l.return;if(ff(l),l===a){Ct=null;break e}if(n!==null){n.return=s,Ct=n;break e}Ct=s}}}var l0={getCacheForType:function(e){var t=_t(gt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return _t(gt).controller.signal}},n0=typeof WeakMap=="function"?WeakMap:Map,Ve=0,Pe=null,_e=null,ze=0,Qe=0,$t=null,cl=!1,gn=!1,Mc=!1,Xa=0,ut=0,ul=0,ql=0,zc=0,Kt=0,yn=0,oi=null,Vt=null,Oc=!1,vs=0,jf=0,bs=1/0,ws=null,ol=null,St=0,dl=null,vn=null,Qa=0,Dc=0,kc=null,Nf=null,di=0,Uc=null;function Jt(){return(Ve&2)!==0&&ze!==0?ze&-ze:D.T!==null?Yc():Le()}function Ef(){if(Kt===0)if((ze&536870912)===0||ke){var e=et;et<<=1,(et&3932160)===0&&(et=262144),Kt=e}else Kt=536870912;return e=Qt.current,e!==null&&(e.flags|=32),Kt}function Yt(e,t,a){(e===Pe&&(Qe===2||Qe===9)||e.cancelPendingCommit!==null)&&(bn(e,0),fl(e,ze,Kt,!1)),Ce(e,a),((Ve&2)===0||e!==Pe)&&(e===Pe&&((Ve&2)===0&&(ql|=a),ut===4&&fl(e,ze,Kt,!1)),wa(e))}function Cf(e,t,a){if((Ve&6)!==0)throw Error(u(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||A(e,t),n=l?r0(e,t):Hc(e,t,!0),s=l;do{if(n===0){gn&&!l&&fl(e,t,0,!1);break}else{if(a=e.current.alternate,s&&!i0(a)){n=Hc(e,t,!1),s=!1;continue}if(n===2){if(s=t,e.errorRecoveryDisabledLanes&s)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var h=e;n=oi;var y=h.current.memoizedState.isDehydrated;if(y&&(bn(h,o).flags|=256),o=Hc(h,o,!1),o!==2){if(Mc&&!y){h.errorRecoveryDisabledLanes|=s,ql|=s,n=4;break e}s=Vt,Vt=n,s!==null&&(Vt===null?Vt=s:Vt.push.apply(Vt,s))}n=o}if(s=!1,n!==2)continue}}if(n===1){bn(e,0),fl(e,t,0,!0);break}e:{switch(l=e,s=n,s){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:fl(l,t,Kt,!cl);break e;case 2:Vt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(n=vs+300-Nt(),10<n)){if(fl(l,t,Kt,!cl),oa(l,0,!0)!==0)break e;Qa=t,l.timeoutHandle=lh(Af.bind(null,l,a,Vt,ws,Oc,t,Kt,ql,yn,cl,s,"Throttled",-0,0),n);break e}Af(l,a,Vt,ws,Oc,t,Kt,ql,yn,cl,s,null,-0,0)}}break}while(!0);wa(e)}function Af(e,t,a,l,n,s,o,h,y,M,V,X,z,L){if(e.timeoutHandle=-1,X=t.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ra},vf(t,s,X);var re=(s&62914560)===s?vs-Nt():(s&4194048)===s?jf-Nt():0;if(re=G0(X,re),re!==null){Qa=s,e.cancelPendingCommit=re(kf.bind(null,e,t,s,a,l,n,o,h,y,V,X,null,z,L)),fl(e,s,o,!M);return}}kf(e,t,s,a,l,n,o,h,y)}function i0(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var n=a[l],s=n.getSnapshot;n=n.value;try{if(!Gt(s(),n))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 fl(e,t,a,l){t&=~zc,t&=~ql,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var n=t;0<n;){var s=31-W(n),o=1<<s;l[s]=-1,n&=~o}a!==0&&pt(e,a,t)}function Ss(){return(Ve&6)===0?(fi(0),!1):!0}function Lc(){if(_e!==null){if(Qe===0)var e=_e.return;else e=_e,Da=Ml=null,Pr(e),on=null,Kn=0,e=_e;for(;e!==null;)lf(e.alternate,e),e=e.return;_e=null}}function bn(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,E0(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Qa=0,Lc(),Pe=e,_e=a=za(e.current,null),ze=t,Qe=0,$t=null,cl=!1,gn=A(e,t),Mc=!1,yn=Kt=zc=ql=ul=ut=0,Vt=oi=null,Oc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var n=31-W(l),s=1<<n;t|=e[n],l&=~s}return Xa=t,Gi(),a}function Tf(e,t){Ee=null,D.H=ai,t===un||t===Fi?(t=Go(),Qe=3):t===Vr?(t=Go(),Qe=4):Qe=t===mc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,$t=t,_e===null&&(ut=1,ds(e,ea(t,e.current)))}function _f(){var e=Qt.current;return e===null?!0:(ze&4194048)===ze?na===null:(ze&62914560)===ze||(ze&536870912)!==0?e===na:!1}function Rf(){var e=D.H;return D.H=ai,e===null?ai:e}function Mf(){var e=D.A;return D.A=l0,e}function js(){ut=4,cl||(ze&4194048)!==ze&&Qt.current!==null||(gn=!0),(ul&134217727)===0&&(ql&134217727)===0||Pe===null||fl(Pe,ze,Kt,!1)}function Hc(e,t,a){var l=Ve;Ve|=2;var n=Rf(),s=Mf();(Pe!==e||ze!==t)&&(ws=null,bn(e,t)),t=!1;var o=ut;e:do try{if(Qe!==0&&_e!==null){var h=_e,y=$t;switch(Qe){case 8:Lc(),o=6;break e;case 3:case 2:case 9:case 6:Qt.current===null&&(t=!0);var M=Qe;if(Qe=0,$t=null,wn(e,h,y,M),a&&gn){o=0;break e}break;default:M=Qe,Qe=0,$t=null,wn(e,h,y,M)}}s0(),o=ut;break}catch(V){Tf(e,V)}while(!0);return t&&e.shellSuspendCounter++,Da=Ml=null,Ve=l,D.H=n,D.A=s,_e===null&&(Pe=null,ze=0,Gi()),o}function s0(){for(;_e!==null;)zf(_e)}function r0(e,t){var a=Ve;Ve|=2;var l=Rf(),n=Mf();Pe!==e||ze!==t?(ws=null,bs=Nt()+500,bn(e,t)):gn=A(e,t);e:do try{if(Qe!==0&&_e!==null){t=_e;var s=$t;t:switch(Qe){case 1:Qe=0,$t=null,wn(e,t,s,1);break;case 2:case 9:if(Vo(s)){Qe=0,$t=null,Of(t);break}t=function(){Qe!==2&&Qe!==9||Pe!==e||(Qe=7),wa(e)},s.then(t,t);break e;case 3:Qe=7;break e;case 4:Qe=5;break e;case 7:Vo(s)?(Qe=0,$t=null,Of(t)):(Qe=0,$t=null,wn(e,t,s,7));break;case 5:var o=null;switch(_e.tag){case 26:o=_e.memoizedState;case 5:case 27:var h=_e;if(o?yh(o):h.stateNode.complete){Qe=0,$t=null;var y=h.sibling;if(y!==null)_e=y;else{var M=h.return;M!==null?(_e=M,Ns(M)):_e=null}break t}}Qe=0,$t=null,wn(e,t,s,5);break;case 6:Qe=0,$t=null,wn(e,t,s,6);break;case 8:Lc(),ut=6;break e;default:throw Error(u(462))}}c0();break}catch(V){Tf(e,V)}while(!0);return Da=Ml=null,D.H=l,D.A=n,Ve=a,_e!==null?0:(Pe=null,ze=0,Gi(),ut)}function c0(){for(;_e!==null&&!At();)zf(_e)}function zf(e){var t=tf(e.alternate,e,Xa);e.memoizedProps=e.pendingProps,t===null?Ns(e):_e=t}function Of(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Jd(a,t,t.pendingProps,t.type,void 0,ze);break;case 11:t=Jd(a,t,t.pendingProps,t.type.render,t.ref,ze);break;case 5:Pr(t);default:lf(a,t),t=_e=Ro(t,Xa),t=tf(a,t,Xa)}e.memoizedProps=e.pendingProps,t===null?Ns(e):_e=t}function wn(e,t,a,l){Da=Ml=null,Pr(t),on=null,Kn=0;var n=t.return;try{if(Wm(e,n,t,a,ze)){ut=1,ds(e,ea(a,e.current)),_e=null;return}}catch(s){if(n!==null)throw _e=n,s;ut=1,ds(e,ea(a,e.current)),_e=null;return}t.flags&32768?(ke||l===1?e=!0:gn||(ze&536870912)!==0?e=!1:(cl=e=!0,(l===2||l===9||l===3||l===6)&&(l=Qt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Df(t,e)):Ns(t)}function Ns(e){var t=e;do{if((t.flags&32768)!==0){Df(t,cl);return}e=t.return;var a=Pm(t.alternate,t,Xa);if(a!==null){_e=a;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);ut===0&&(ut=5)}function Df(e,t){do{var a=e0(e.alternate,e);if(a!==null){a.flags&=32767,_e=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){_e=e;return}_e=e=a}while(e!==null);ut=6,_e=null}function kf(e,t,a,l,n,s,o,h,y){e.cancelPendingCommit=null;do Es();while(St!==0);if((Ve&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(s=t.lanes|t.childLanes,s|=Cr,He(e,a,s,o,h,y),e===Pe&&(_e=Pe=null,ze=0),vn=t,dl=e,Qa=a,Dc=s,kc=n,Nf=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,f0(Ca,function(){return qf(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=D.T,D.T=null,n=H.p,H.p=2,o=Ve,Ve|=4;try{t0(e,t,a)}finally{Ve=o,H.p=n,D.T=l}}St=1,Uf(),Lf(),Hf()}}function Uf(){if(St===1){St=0;var e=dl,t=vn,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=D.T,D.T=null;var l=H.p;H.p=2;var n=Ve;Ve|=4;try{xf(t,e);var s=Wc,o=wo(e.containerInfo),h=s.focusedElem,y=s.selectionRange;if(o!==h&&h&&h.ownerDocument&&bo(h.ownerDocument.documentElement,h)){if(y!==null&&wr(h)){var M=y.start,V=y.end;if(V===void 0&&(V=M),"selectionStart"in h)h.selectionStart=M,h.selectionEnd=Math.min(V,h.value.length);else{var X=h.ownerDocument||document,z=X&&X.defaultView||window;if(z.getSelection){var L=z.getSelection(),re=h.textContent.length,ve=Math.min(y.start,re),We=y.end===void 0?ve:Math.min(y.end,re);!L.extend&&ve>We&&(o=We,We=ve,ve=o);var T=vo(h,ve),E=vo(h,We);if(T&&E&&(L.rangeCount!==1||L.anchorNode!==T.node||L.anchorOffset!==T.offset||L.focusNode!==E.node||L.focusOffset!==E.offset)){var R=X.createRange();R.setStart(T.node,T.offset),L.removeAllRanges(),ve>We?(L.addRange(R),L.extend(E.node,E.offset)):(R.setEnd(E.node,E.offset),L.addRange(R))}}}}for(X=[],L=h;L=L.parentNode;)L.nodeType===1&&X.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<X.length;h++){var G=X[h];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}Ls=!!Jc,Wc=Jc=null}finally{Ve=n,H.p=l,D.T=a}}e.current=t,St=2}}function Lf(){if(St===2){St=0;var e=dl,t=vn,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=D.T,D.T=null;var l=H.p;H.p=2;var n=Ve;Ve|=4;try{df(e,t.alternate,t)}finally{Ve=n,H.p=l,D.T=a}}St=3}}function Hf(){if(St===4||St===3){St=0,ua();var e=dl,t=vn,a=Qa,l=Nf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?St=5:(St=0,vn=dl=null,Bf(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(ol=null),F(a),t=t.stateNode,ht&&typeof ht.onCommitFiberRoot=="function")try{ht.onCommitFiberRoot(Ta,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=D.T,n=H.p,H.p=2,D.T=null;try{for(var s=e.onRecoverableError,o=0;o<l.length;o++){var h=l[o];s(h.value,{componentStack:h.stack})}}finally{D.T=t,H.p=n}}(Qa&3)!==0&&Es(),wa(e),n=e.pendingLanes,(a&261930)!==0&&(n&42)!==0?e===Uc?di++:(di=0,Uc=e):di=0,fi(0)}}function Bf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Zn(t)))}function Es(){return Uf(),Lf(),Hf(),qf()}function qf(){if(St!==5)return!1;var e=dl,t=Dc;Dc=0;var a=F(Qa),l=D.T,n=H.p;try{H.p=32>a?32:a,D.T=null,a=kc,kc=null;var s=dl,o=Qa;if(St=0,vn=dl=null,Qa=0,(Ve&6)!==0)throw Error(u(331));var h=Ve;if(Ve|=4,wf(s.current),yf(s,s.current,o,a),Ve=h,fi(0,!1),ht&&typeof ht.onPostCommitFiberRoot=="function")try{ht.onPostCommitFiberRoot(Ta,s)}catch{}return!0}finally{H.p=n,D.T=l,Bf(e,t)}}function Vf(e,t,a){t=ea(a,t),t=pc(e.stateNode,t,2),e=nl(e,t,2),e!==null&&(Ce(e,2),wa(e))}function Ze(e,t,a){if(e.tag===3)Vf(e,e,a);else for(;t!==null;){if(t.tag===3){Vf(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ol===null||!ol.has(l))){e=ea(a,e),a=Vd(2),l=nl(t,a,2),l!==null&&(Yd(a,l,t,e),Ce(l,2),wa(l));break}}t=t.return}}function Bc(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new n0;var n=new Set;l.set(t,n)}else n=l.get(t),n===void 0&&(n=new Set,l.set(t,n));n.has(a)||(Mc=!0,n.add(a),e=u0.bind(null,e,t,a),t.then(e,e))}function u0(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Pe===e&&(ze&a)===a&&(ut===4||ut===3&&(ze&62914560)===ze&&300>Nt()-vs?(Ve&2)===0&&bn(e,0):zc|=a,yn===ze&&(yn=0)),wa(e)}function Yf(e,t){t===0&&(t=K()),e=Tl(e,t),e!==null&&(Ce(e,t),wa(e))}function o0(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Yf(e,a)}function d0(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,n=e.memoizedState;n!==null&&(a=n.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(u(314))}l!==null&&l.delete(t),Yf(e,a)}function f0(e,t){return ue(e,t)}var Cs=null,Sn=null,qc=!1,As=!1,Vc=!1,hl=0;function wa(e){e!==Sn&&e.next===null&&(Sn===null?Cs=Sn=e:Sn=Sn.next=e),As=!0,qc||(qc=!0,p0())}function fi(e,t){if(!Vc&&As){Vc=!0;do for(var a=!1,l=Cs;l!==null;){if(e!==0){var n=l.pendingLanes;if(n===0)var s=0;else{var o=l.suspendedLanes,h=l.pingedLanes;s=(1<<31-W(42|e)+1)-1,s&=n&~(o&~h),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(a=!0,Zf(l,s))}else s=ze,s=oa(l,l===Pe?s:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(s&3)===0||A(l,s)||(a=!0,Zf(l,s));l=l.next}while(a);Vc=!1}}function h0(){Gf()}function Gf(){As=qc=!1;var e=0;hl!==0&&N0()&&(e=hl);for(var t=Nt(),a=null,l=Cs;l!==null;){var n=l.next,s=Xf(l,t);s===0?(l.next=null,a===null?Cs=n:a.next=n,n===null&&(Sn=a)):(a=l,(e!==0||(s&3)!==0)&&(As=!0)),l=n}St!==0&&St!==5||fi(e),hl!==0&&(hl=0)}function Xf(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,n=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var o=31-W(s),h=1<<o,y=n[o];y===-1?((h&a)===0||(h&l)!==0)&&(n[o]=N(h,t)):y<=t&&(e.expiredLanes|=h),s&=~h}if(t=Pe,a=ze,a=oa(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Qe===2||Qe===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Se(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||A(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&Se(l),F(a)){case 2:case 8:a=Wa;break;case 32:a=Ca;break;case 268435456:a=Aa;break;default:a=Ca}return l=Qf.bind(null,e),a=ue(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&Se(l),e.callbackPriority=2,e.callbackNode=null,2}function Qf(e,t){if(St!==0&&St!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Es()&&e.callbackNode!==a)return null;var l=ze;return l=oa(e,e===Pe?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Cf(e,l,t),Xf(e,Nt()),e.callbackNode!=null&&e.callbackNode===a?Qf.bind(null,e):null)}function Zf(e,t){if(Es())return null;Cf(e,t,!0)}function p0(){C0(function(){(Ve&6)!==0?ue(Ut,h0):Gf()})}function Yc(){if(hl===0){var e=rn;e===0&&(e=Ie,Ie<<=1,(Ie&261888)===0&&(Ie=256)),hl=e}return hl}function $f(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ki(""+e)}function Kf(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function m0(e,t,a,l,n){if(t==="submit"&&a&&a.stateNode===n){var s=$f((n[xt]||null).action),o=l.submitter;o&&(t=(t=o[xt]||null)?$f(t.formAction):o.getAttribute("formAction"),t!==null&&(s=t,o=null));var h=new Bi("action","action",null,l,n);e.push({event:h,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(hl!==0){var y=o?Kf(n,o):new FormData(n);cc(a,{pending:!0,data:y,method:n.method,action:s},null,y)}}else typeof s=="function"&&(h.preventDefault(),y=o?Kf(n,o):new FormData(n),cc(a,{pending:!0,data:y,method:n.method,action:s},s,y))},currentTarget:n}]})}}for(var Gc=0;Gc<Er.length;Gc++){var Xc=Er[Gc],x0=Xc.toLowerCase(),g0=Xc[0].toUpperCase()+Xc.slice(1);fa(x0,"on"+g0)}fa(No,"onAnimationEnd"),fa(Eo,"onAnimationIteration"),fa(Co,"onAnimationStart"),fa("dblclick","onDoubleClick"),fa("focusin","onFocus"),fa("focusout","onBlur"),fa(Om,"onTransitionRun"),fa(Dm,"onTransitionStart"),fa(km,"onTransitionCancel"),fa(Ao,"onTransitionEnd"),Zl("onMouseEnter",["mouseout","mouseover"]),Zl("onMouseLeave",["mouseout","mouseover"]),Zl("onPointerEnter",["pointerout","pointerover"]),Zl("onPointerLeave",["pointerout","pointerover"]),Nl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Nl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Nl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Nl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Nl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Nl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hi="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(" "),y0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(hi));function Jf(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],n=l.event;l=l.listeners;e:{var s=void 0;if(t)for(var o=l.length-1;0<=o;o--){var h=l[o],y=h.instance,M=h.currentTarget;if(h=h.listener,y!==s&&n.isPropagationStopped())break e;s=h,n.currentTarget=M;try{s(n)}catch(V){Yi(V)}n.currentTarget=null,s=y}else for(o=0;o<l.length;o++){if(h=l[o],y=h.instance,M=h.currentTarget,h=h.listener,y!==s&&n.isPropagationStopped())break e;s=h,n.currentTarget=M;try{s(n)}catch(V){Yi(V)}n.currentTarget=null,s=y}}}}function Re(e,t){var a=t[da];a===void 0&&(a=t[da]=new Set);var l=e+"__bubble";a.has(l)||(Wf(t,e,2,!1),a.add(l))}function Qc(e,t,a){var l=0;t&&(l|=4),Wf(a,e,l,t)}var Ts="_reactListening"+Math.random().toString(36).slice(2);function Zc(e){if(!e[Ts]){e[Ts]=!0,Vu.forEach(function(a){a!=="selectionchange"&&(y0.has(a)||Qc(a,!1,e),Qc(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ts]||(t[Ts]=!0,Qc("selectionchange",!1,t))}}function Wf(e,t,a,l){switch(Eh(t)){case 2:var n=Z0;break;case 8:n=$0;break;default:n=ru}a=n.bind(null,t,a,e),n=void 0,!fr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),l?n!==void 0?e.addEventListener(t,a,{capture:!0,passive:n}):e.addEventListener(t,a,!0):n!==void 0?e.addEventListener(t,a,{passive:n}):e.addEventListener(t,a,!1)}function $c(e,t,a,l,n){var s=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var o=l.tag;if(o===3||o===4){var h=l.stateNode.containerInfo;if(h===n)break;if(o===4)for(o=l.return;o!==null;){var y=o.tag;if((y===3||y===4)&&o.stateNode.containerInfo===n)return;o=o.return}for(;h!==null;){if(o=Gl(h),o===null)return;if(y=o.tag,y===5||y===6||y===26||y===27){l=s=o;continue e}h=h.parentNode}}l=l.return}Pu(function(){var M=s,V=or(a),X=[];e:{var z=To.get(e);if(z!==void 0){var L=Bi,re=e;switch(e){case"keypress":if(Li(a)===0)break e;case"keydown":case"keyup":L=dm;break;case"focusin":re="focus",L=xr;break;case"focusout":re="blur",L=xr;break;case"beforeblur":case"afterblur":L=xr;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":L=ao;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=Pp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=pm;break;case No:case Eo:case Co:L=am;break;case Ao:L=xm;break;case"scroll":case"scrollend":L=Fp;break;case"wheel":L=ym;break;case"copy":case"cut":case"paste":L=nm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=no;break;case"toggle":case"beforetoggle":L=bm}var ve=(t&4)!==0,We=!ve&&(e==="scroll"||e==="scrollend"),T=ve?z!==null?z+"Capture":null:z;ve=[];for(var E=M,R;E!==null;){var G=E;if(R=G.stateNode,G=G.tag,G!==5&&G!==26&&G!==27||R===null||T===null||(G=kn(E,T),G!=null&&ve.push(pi(E,G,R))),We)break;E=E.return}0<ve.length&&(z=new L(z,re,null,a,V),X.push({event:z,listeners:ve}))}}if((t&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",L=e==="mouseout"||e==="pointerout",z&&a!==ur&&(re=a.relatedTarget||a.fromElement)&&(Gl(re)||re[Me]))break e;if((L||z)&&(z=V.window===V?V:(z=V.ownerDocument)?z.defaultView||z.parentWindow:window,L?(re=a.relatedTarget||a.toElement,L=M,re=re?Gl(re):null,re!==null&&(We=p(re),ve=re.tag,re!==We||ve!==5&&ve!==27&&ve!==6)&&(re=null)):(L=null,re=M),L!==re)){if(ve=ao,G="onMouseLeave",T="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(ve=no,G="onPointerLeave",T="onPointerEnter",E="pointer"),We=L==null?z:Dn(L),R=re==null?z:Dn(re),z=new ve(G,E+"leave",L,a,V),z.target=We,z.relatedTarget=R,G=null,Gl(V)===M&&(ve=new ve(T,E+"enter",re,a,V),ve.target=R,ve.relatedTarget=We,G=ve),We=G,L&&re)t:{for(ve=v0,T=L,E=re,R=0,G=T;G;G=ve(G))R++;G=0;for(var ge=E;ge;ge=ve(ge))G++;for(;0<R-G;)T=ve(T),R--;for(;0<G-R;)E=ve(E),G--;for(;R--;){if(T===E||E!==null&&T===E.alternate){ve=T;break t}T=ve(T),E=ve(E)}ve=null}else ve=null;L!==null&&Ff(X,z,L,ve,!1),re!==null&&We!==null&&Ff(X,We,re,ve,!0)}}e:{if(z=M?Dn(M):window,L=z.nodeName&&z.nodeName.toLowerCase(),L==="select"||L==="input"&&z.type==="file")var Be=ho;else if(oo(z))if(po)Be=Rm;else{Be=Tm;var oe=Am}else L=z.nodeName,!L||L.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?M&&cr(M.elementType)&&(Be=ho):Be=_m;if(Be&&(Be=Be(e,M))){fo(X,Be,a,V);break e}oe&&oe(e,z,M),e==="focusout"&&M&&z.type==="number"&&M.memoizedProps.value!=null&&rr(z,"number",z.value)}switch(oe=M?Dn(M):window,e){case"focusin":(oo(oe)||oe.contentEditable==="true")&&(Il=oe,Sr=M,Gn=null);break;case"focusout":Gn=Sr=Il=null;break;case"mousedown":jr=!0;break;case"contextmenu":case"mouseup":case"dragend":jr=!1,So(X,a,V);break;case"selectionchange":if(zm)break;case"keydown":case"keyup":So(X,a,V)}var Ae;if(yr)e:{switch(e){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else Fl?co(e,a)&&(Oe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Oe="onCompositionStart");Oe&&(io&&a.locale!=="ko"&&(Fl||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&Fl&&(Ae=eo()):(Fa=V,hr="value"in Fa?Fa.value:Fa.textContent,Fl=!0)),oe=_s(M,Oe),0<oe.length&&(Oe=new lo(Oe,e,null,a,V),X.push({event:Oe,listeners:oe}),Ae?Oe.data=Ae:(Ae=uo(a),Ae!==null&&(Oe.data=Ae)))),(Ae=Sm?jm(e,a):Nm(e,a))&&(Oe=_s(M,"onBeforeInput"),0<Oe.length&&(oe=new lo("onBeforeInput","beforeinput",null,a,V),X.push({event:oe,listeners:Oe}),oe.data=Ae)),m0(X,e,M,a,V)}Jf(X,t)})}function pi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function _s(e,t){for(var a=t+"Capture",l=[];e!==null;){var n=e,s=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||s===null||(n=kn(e,a),n!=null&&l.unshift(pi(e,n,s)),n=kn(e,t),n!=null&&l.push(pi(e,n,s))),e.tag===3)return l;e=e.return}return[]}function v0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ff(e,t,a,l,n){for(var s=t._reactName,o=[];a!==null&&a!==l;){var h=a,y=h.alternate,M=h.stateNode;if(h=h.tag,y!==null&&y===l)break;h!==5&&h!==26&&h!==27||M===null||(y=M,n?(M=kn(a,s),M!=null&&o.unshift(pi(a,M,y))):n||(M=kn(a,s),M!=null&&o.push(pi(a,M,y)))),a=a.return}o.length!==0&&e.push({event:t,listeners:o})}var b0=/\r\n?/g,w0=/\u0000|\uFFFD/g;function If(e){return(typeof e=="string"?e:""+e).replace(b0,`
9
+ `).replace(w0,"")}function Pf(e,t){return t=If(t),If(e)===t}function Je(e,t,a,l,n,s){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Kl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Kl(e,""+l);break;case"className":Oi(e,"class",l);break;case"tabIndex":Oi(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Oi(e,a,l);break;case"style":Fu(e,l,s);break;case"data":if(t!=="object"){Oi(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=ki(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof s=="function"&&(a==="formAction"?(t!=="input"&&Je(e,t,"name",n.name,n,null),Je(e,t,"formEncType",n.formEncType,n,null),Je(e,t,"formMethod",n.formMethod,n,null),Je(e,t,"formTarget",n.formTarget,n,null)):(Je(e,t,"encType",n.encType,n,null),Je(e,t,"method",n.method,n,null),Je(e,t,"target",n.target,n,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=ki(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Ra);break;case"onScroll":l!=null&&Re("scroll",e);break;case"onScrollEnd":l!=null&&Re("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(a=l.__html,a!=null){if(n.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=ki(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":Re("beforetoggle",e),Re("toggle",e),zi(e,"popover",l);break;case"xlinkActuate":_a(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":_a(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":_a(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":_a(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":_a(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":_a(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":_a(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":_a(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":_a(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":zi(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Jp.get(a)||a,zi(e,a,l))}}function Kc(e,t,a,l,n,s){switch(a){case"style":Fu(e,l,s);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(a=l.__html,a!=null){if(n.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"children":typeof l=="string"?Kl(e,l):(typeof l=="number"||typeof l=="bigint")&&Kl(e,""+l);break;case"onScroll":l!=null&&Re("scroll",e);break;case"onScrollEnd":l!=null&&Re("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Ra);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yu.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(n=a.endsWith("Capture"),t=a.slice(2,n?a.length-7:void 0),s=e[xt]||null,s=s!=null?s[a]:null,typeof s=="function"&&e.removeEventListener(t,s,n),typeof l=="function")){typeof s!="function"&&s!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,n);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):zi(e,a,l)}}}function Mt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",e),Re("load",e);var l=!1,n=!1,s;for(s in a)if(a.hasOwnProperty(s)){var o=a[s];if(o!=null)switch(s){case"src":l=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Je(e,t,s,o,a,null)}}n&&Je(e,t,"srcSet",a.srcSet,a,null),l&&Je(e,t,"src",a.src,a,null);return;case"input":Re("invalid",e);var h=s=o=n=null,y=null,M=null;for(l in a)if(a.hasOwnProperty(l)){var V=a[l];if(V!=null)switch(l){case"name":n=V;break;case"type":o=V;break;case"checked":y=V;break;case"defaultChecked":M=V;break;case"value":s=V;break;case"defaultValue":h=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(u(137,t));break;default:Je(e,t,l,V,a,null)}}$u(e,s,h,y,M,o,n,!1);return;case"select":Re("invalid",e),l=o=s=null;for(n in a)if(a.hasOwnProperty(n)&&(h=a[n],h!=null))switch(n){case"value":s=h;break;case"defaultValue":o=h;break;case"multiple":l=h;default:Je(e,t,n,h,a,null)}t=s,a=o,e.multiple=!!l,t!=null?$l(e,!!l,t,!1):a!=null&&$l(e,!!l,a,!0);return;case"textarea":Re("invalid",e),s=n=l=null;for(o in a)if(a.hasOwnProperty(o)&&(h=a[o],h!=null))switch(o){case"value":l=h;break;case"defaultValue":n=h;break;case"children":s=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(u(91));break;default:Je(e,t,o,h,a,null)}Ju(e,l,n,s);return;case"option":for(y in a)a.hasOwnProperty(y)&&(l=a[y],l!=null)&&(y==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Je(e,t,y,l,a,null));return;case"dialog":Re("beforetoggle",e),Re("toggle",e),Re("cancel",e),Re("close",e);break;case"iframe":case"object":Re("load",e);break;case"video":case"audio":for(l=0;l<hi.length;l++)Re(hi[l],e);break;case"image":Re("error",e),Re("load",e);break;case"details":Re("toggle",e);break;case"embed":case"source":case"link":Re("error",e),Re("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(M in a)if(a.hasOwnProperty(M)&&(l=a[M],l!=null))switch(M){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Je(e,t,M,l,a,null)}return;default:if(cr(t)){for(V in a)a.hasOwnProperty(V)&&(l=a[V],l!==void 0&&Kc(e,t,V,l,a,void 0));return}}for(h in a)a.hasOwnProperty(h)&&(l=a[h],l!=null&&Je(e,t,h,l,a,null))}function S0(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,s=null,o=null,h=null,y=null,M=null,V=null;for(L in a){var X=a[L];if(a.hasOwnProperty(L)&&X!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":y=X;default:l.hasOwnProperty(L)||Je(e,t,L,null,l,X)}}for(var z in l){var L=l[z];if(X=a[z],l.hasOwnProperty(z)&&(L!=null||X!=null))switch(z){case"type":s=L;break;case"name":n=L;break;case"checked":M=L;break;case"defaultChecked":V=L;break;case"value":o=L;break;case"defaultValue":h=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(u(137,t));break;default:L!==X&&Je(e,t,z,L,l,X)}}sr(e,o,h,y,M,V,s,n);return;case"select":L=o=h=z=null;for(s in a)if(y=a[s],a.hasOwnProperty(s)&&y!=null)switch(s){case"value":break;case"multiple":L=y;default:l.hasOwnProperty(s)||Je(e,t,s,null,l,y)}for(n in l)if(s=l[n],y=a[n],l.hasOwnProperty(n)&&(s!=null||y!=null))switch(n){case"value":z=s;break;case"defaultValue":h=s;break;case"multiple":o=s;default:s!==y&&Je(e,t,n,s,l,y)}t=h,a=o,l=L,z!=null?$l(e,!!a,z,!1):!!l!=!!a&&(t!=null?$l(e,!!a,t,!0):$l(e,!!a,a?[]:"",!1));return;case"textarea":L=z=null;for(h in a)if(n=a[h],a.hasOwnProperty(h)&&n!=null&&!l.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:Je(e,t,h,null,l,n)}for(o in l)if(n=l[o],s=a[o],l.hasOwnProperty(o)&&(n!=null||s!=null))switch(o){case"value":z=n;break;case"defaultValue":L=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(u(91));break;default:n!==s&&Je(e,t,o,n,l,s)}Ku(e,z,L);return;case"option":for(var re in a)z=a[re],a.hasOwnProperty(re)&&z!=null&&!l.hasOwnProperty(re)&&(re==="selected"?e.selected=!1:Je(e,t,re,null,l,z));for(y in l)z=l[y],L=a[y],l.hasOwnProperty(y)&&z!==L&&(z!=null||L!=null)&&(y==="selected"?e.selected=z&&typeof z!="function"&&typeof z!="symbol":Je(e,t,y,z,l,L));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 ve in a)z=a[ve],a.hasOwnProperty(ve)&&z!=null&&!l.hasOwnProperty(ve)&&Je(e,t,ve,null,l,z);for(M in l)if(z=l[M],L=a[M],l.hasOwnProperty(M)&&z!==L&&(z!=null||L!=null))switch(M){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(u(137,t));break;default:Je(e,t,M,z,l,L)}return;default:if(cr(t)){for(var We in a)z=a[We],a.hasOwnProperty(We)&&z!==void 0&&!l.hasOwnProperty(We)&&Kc(e,t,We,void 0,l,z);for(V in l)z=l[V],L=a[V],!l.hasOwnProperty(V)||z===L||z===void 0&&L===void 0||Kc(e,t,V,z,l,L);return}}for(var T in a)z=a[T],a.hasOwnProperty(T)&&z!=null&&!l.hasOwnProperty(T)&&Je(e,t,T,null,l,z);for(X in l)z=l[X],L=a[X],!l.hasOwnProperty(X)||z===L||z==null&&L==null||Je(e,t,X,z,l,L)}function eh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function j0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var n=a[l],s=n.transferSize,o=n.initiatorType,h=n.duration;if(s&&h&&eh(o)){for(o=0,h=n.responseEnd,l+=1;l<a.length;l++){var y=a[l],M=y.startTime;if(M>h)break;var V=y.transferSize,X=y.initiatorType;V&&eh(X)&&(y=y.responseEnd,o+=V*(y<h?1:(h-M)/(y-M)))}if(--l,t+=8*(s+o)/(n.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Jc=null,Wc=null;function Rs(e){return e.nodeType===9?e:e.ownerDocument}function th(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 ah(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 Fc(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 Ic=null;function N0(){var e=window.event;return e&&e.type==="popstate"?e===Ic?!1:(Ic=e,!0):(Ic=null,!1)}var lh=typeof setTimeout=="function"?setTimeout:void 0,E0=typeof clearTimeout=="function"?clearTimeout:void 0,nh=typeof Promise=="function"?Promise:void 0,C0=typeof queueMicrotask=="function"?queueMicrotask:typeof nh<"u"?function(e){return nh.resolve(null).then(e).catch(A0)}:lh;function A0(e){setTimeout(function(){throw e})}function pl(e){return e==="head"}function ih(e,t){var a=t,l=0;do{var n=a.nextSibling;if(e.removeChild(a),n&&n.nodeType===8)if(a=n.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(n),Cn(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")mi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,mi(a);for(var s=a.firstChild;s;){var o=s.nextSibling,h=s.nodeName;s[On]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&s.rel.toLowerCase()==="stylesheet"||a.removeChild(s),s=o}}else a==="body"&&mi(e.ownerDocument.body);a=n}while(a);Cn(t)}function sh(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function Pc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Pc(a),nr(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function T0(e,t,a,l){for(;e.nodeType===1;){var n=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[On])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=ia(e.nextSibling),e===null)break}return null}function _0(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=ia(e.nextSibling),e===null))return null;return e}function rh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ia(e.nextSibling),e===null))return null;return e}function eu(e){return e.data==="$?"||e.data==="$~"}function tu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function R0(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function ia(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var au=null;function ch(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return ia(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function uh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function oh(e,t,a){switch(t=Rs(a),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function mi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);nr(e)}var sa=new Map,dh=new Set;function Ms(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Za=H.d;H.d={f:M0,r:z0,D:O0,C:D0,L:k0,m:U0,X:H0,S:L0,M:B0};function M0(){var e=Za.f(),t=Ss();return e||t}function z0(e){var t=Xl(e);t!==null&&t.tag===5&&t.type==="form"?Ad(t):Za.r(e)}var jn=typeof document>"u"?null:document;function fh(e,t,a){var l=jn;if(l&&typeof t=="string"&&t){var n=It(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof a=="string"&&(n+='[crossorigin="'+a+'"]'),dh.has(n)||(dh.add(n),e={rel:e,crossOrigin:a,href:t},l.querySelector(n)===null&&(t=l.createElement("link"),Mt(t,"link",e),Et(t),l.head.appendChild(t)))}}function O0(e){Za.D(e),fh("dns-prefetch",e,null)}function D0(e,t){Za.C(e,t),fh("preconnect",e,t)}function k0(e,t,a){Za.L(e,t,a);var l=jn;if(l&&e&&t){var n='link[rel="preload"][as="'+It(t)+'"]';t==="image"&&a&&a.imageSrcSet?(n+='[imagesrcset="'+It(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(n+='[imagesizes="'+It(a.imageSizes)+'"]')):n+='[href="'+It(e)+'"]';var s=n;switch(t){case"style":s=Nn(e);break;case"script":s=En(e)}sa.has(s)||(e=S({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),sa.set(s,e),l.querySelector(n)!==null||t==="style"&&l.querySelector(xi(s))||t==="script"&&l.querySelector(gi(s))||(t=l.createElement("link"),Mt(t,"link",e),Et(t),l.head.appendChild(t)))}}function U0(e,t){Za.m(e,t);var a=jn;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+It(l)+'"][href="'+It(e)+'"]',s=n;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=En(e)}if(!sa.has(s)&&(e=S({rel:"modulepreload",href:e},t),sa.set(s,e),a.querySelector(n)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(gi(s)))return}l=a.createElement("link"),Mt(l,"link",e),Et(l),a.head.appendChild(l)}}}function L0(e,t,a){Za.S(e,t,a);var l=jn;if(l&&e){var n=Ql(l).hoistableStyles,s=Nn(e);t=t||"default";var o=n.get(s);if(!o){var h={loading:0,preload:null};if(o=l.querySelector(xi(s)))h.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},a),(a=sa.get(s))&&lu(e,a);var y=o=l.createElement("link");Et(y),Mt(y,"link",e),y._p=new Promise(function(M,V){y.onload=M,y.onerror=V}),y.addEventListener("load",function(){h.loading|=1}),y.addEventListener("error",function(){h.loading|=2}),h.loading|=4,zs(o,t,l)}o={type:"stylesheet",instance:o,count:1,state:h},n.set(s,o)}}}function H0(e,t){Za.X(e,t);var a=jn;if(a&&e){var l=Ql(a).hoistableScripts,n=En(e),s=l.get(n);s||(s=a.querySelector(gi(n)),s||(e=S({src:e,async:!0},t),(t=sa.get(n))&&nu(e,t),s=a.createElement("script"),Et(s),Mt(s,"link",e),a.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(n,s))}}function B0(e,t){Za.M(e,t);var a=jn;if(a&&e){var l=Ql(a).hoistableScripts,n=En(e),s=l.get(n);s||(s=a.querySelector(gi(n)),s||(e=S({src:e,async:!0,type:"module"},t),(t=sa.get(n))&&nu(e,t),s=a.createElement("script"),Et(s),Mt(s,"link",e),a.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(n,s))}}function hh(e,t,a,l){var n=(n=he.current)?Ms(n):null;if(!n)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Nn(a.href),a=Ql(n).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Nn(a.href);var s=Ql(n).hoistableStyles,o=s.get(e);if(o||(n=n.ownerDocument||n,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,o),(s=n.querySelector(xi(e)))&&!s._p&&(o.instance=s,o.state.loading=5),sa.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},sa.set(e,a),s||q0(n,e,a,o.state))),t&&l===null)throw Error(u(528,""));return o}if(t&&l!==null)throw Error(u(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=En(a),a=Ql(n).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function Nn(e){return'href="'+It(e)+'"'}function xi(e){return'link[rel="stylesheet"]['+e+"]"}function ph(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function q0(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Mt(t,"link",a),Et(t),e.head.appendChild(t))}function En(e){return'[src="'+It(e)+'"]'}function gi(e){return"script[async]"+e}function mh(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+It(a.href)+'"]');if(l)return t.instance=l,Et(l),l;var n=S({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Et(l),Mt(l,"style",n),zs(l,a.precedence,e),t.instance=l;case"stylesheet":n=Nn(a.href);var s=e.querySelector(xi(n));if(s)return t.state.loading|=4,t.instance=s,Et(s),s;l=ph(a),(n=sa.get(n))&&lu(l,n),s=(e.ownerDocument||e).createElement("link"),Et(s);var o=s;return o._p=new Promise(function(h,y){o.onload=h,o.onerror=y}),Mt(s,"link",l),t.state.loading|=4,zs(s,a.precedence,e),t.instance=s;case"script":return s=En(a.src),(n=e.querySelector(gi(s)))?(t.instance=n,Et(n),n):(l=a,(n=sa.get(s))&&(l=S({},a),nu(l,n)),e=e.ownerDocument||e,n=e.createElement("script"),Et(n),Mt(n,"link",l),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,zs(l,a.precedence,e));return t.instance}function zs(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=l.length?l[l.length-1]:null,s=n,o=0;o<l.length;o++){var h=l[o];if(h.dataset.precedence===t)s=h;else if(s!==n)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function lu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function nu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Os=null;function xh(e,t,a){if(Os===null){var l=new Map,n=Os=new Map;n.set(a,l)}else n=Os,l=n.get(a),l||(l=new Map,n.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),n=0;n<a.length;n++){var s=a[n];if(!(s[On]||s[tt]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var o=s.getAttribute(t)||"";o=e+o;var h=l.get(o);h?h.push(s):l.set(o,[s])}}return l}function gh(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function V0(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function yh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Y0(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var n=Nn(l.href),s=t.querySelector(xi(n));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ds.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=s,Et(s);return}s=t.ownerDocument||t,l=ph(l),(n=sa.get(n))&&lu(l,n),s=s.createElement("link"),Et(s);var o=s;o._p=new Promise(function(h,y){o.onload=h,o.onerror=y}),Mt(s,"link",l),a.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Ds.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var iu=0;function G0(e,t){return e.stylesheets&&e.count===0&&Us(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Us(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&iu===0&&(iu=62500*j0());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Us(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>iu?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(n)}}:null}function Ds(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Us(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ks=null;function Us(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ks=new Map,t.forEach(X0,e),ks=null,Ds.call(e))}function X0(e,t){if(!(t.state.loading&4)){var a=ks.get(e);if(a)var l=a.get(null);else{a=new Map,ks.set(e,a);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<n.length;s++){var o=n[s];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(a.set(o.dataset.precedence,o),l=o)}l&&a.set(null,l)}n=t.instance,o=n.getAttribute("data-precedence"),s=a.get(o)||l,s===l&&a.set(null,n),a.set(o,n),this.count++,l=Ds.bind(this),n.addEventListener("load",l),n.addEventListener("error",l),s?s.parentNode.insertBefore(n,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var yi={$$typeof:$,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function Q0(e,t,a,l,n,s,o,h,y){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=we(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=we(0),this.hiddenUpdates=we(null),this.identifierPrefix=l,this.onUncaughtError=n,this.onCaughtError=s,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=y,this.incompleteTransitions=new Map}function vh(e,t,a,l,n,s,o,h,y,M,V,X){return e=new Q0(e,t,a,o,y,M,V,X,h),t=1,s===!0&&(t|=24),s=Xt(3,null,null,t),e.current=s,s.stateNode=e,t=Hr(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:l,isDehydrated:a,cache:t},Yr(s),e}function bh(e){return e?(e=tn,e):tn}function wh(e,t,a,l,n,s){n=bh(n),l.context===null?l.context=n:l.pendingContext=n,l=ll(t),l.payload={element:a},s=s===void 0?null:s,s!==null&&(l.callback=s),a=nl(e,l,t),a!==null&&(Yt(a,e,t),Wn(a,e,t))}function Sh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function su(e,t){Sh(e,t),(e=e.alternate)&&Sh(e,t)}function jh(e){if(e.tag===13||e.tag===31){var t=Tl(e,67108864);t!==null&&Yt(t,e,67108864),su(e,67108864)}}function Nh(e){if(e.tag===13||e.tag===31){var t=Jt();t=jl(t);var a=Tl(e,t);a!==null&&Yt(a,e,t),su(e,t)}}var Ls=!0;function Z0(e,t,a,l){var n=D.T;D.T=null;var s=H.p;try{H.p=2,ru(e,t,a,l)}finally{H.p=s,D.T=n}}function $0(e,t,a,l){var n=D.T;D.T=null;var s=H.p;try{H.p=8,ru(e,t,a,l)}finally{H.p=s,D.T=n}}function ru(e,t,a,l){if(Ls){var n=cu(l);if(n===null)$c(e,t,l,Hs,a),Ch(e,l);else if(J0(n,e,t,a,l))l.stopPropagation();else if(Ch(e,l),t&4&&-1<K0.indexOf(e)){for(;n!==null;){var s=Xl(n);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var o=ot(s.pendingLanes);if(o!==0){var h=s;for(h.pendingLanes|=2,h.entangledLanes|=2;o;){var y=1<<31-W(o);h.entanglements[1]|=y,o&=~y}wa(s),(Ve&6)===0&&(bs=Nt()+500,fi(0))}}break;case 31:case 13:h=Tl(s,2),h!==null&&Yt(h,s,2),Ss(),su(s,2)}if(s=cu(l),s===null&&$c(e,t,l,Hs,a),s===n)break;n=s}n!==null&&l.stopPropagation()}else $c(e,t,l,null,a)}}function cu(e){return e=or(e),uu(e)}var Hs=null;function uu(e){if(Hs=null,e=Gl(e),e!==null){var t=p(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=m(t),e!==null)return e;e=null}else if(a===31){if(e=w(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Hs=e,null}function Eh(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(wl()){case Ut:return 2;case Wa:return 8;case Ca:case Vl:return 32;case Aa:return 268435456;default:return 32}default:return 32}}var ou=!1,ml=null,xl=null,gl=null,vi=new Map,bi=new Map,yl=[],K0="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 Ch(e,t){switch(e){case"focusin":case"focusout":ml=null;break;case"dragenter":case"dragleave":xl=null;break;case"mouseover":case"mouseout":gl=null;break;case"pointerover":case"pointerout":vi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bi.delete(t.pointerId)}}function wi(e,t,a,l,n,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:s,targetContainers:[n]},t!==null&&(t=Xl(t),t!==null&&jh(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function J0(e,t,a,l,n){switch(t){case"focusin":return ml=wi(ml,e,t,a,l,n),!0;case"dragenter":return xl=wi(xl,e,t,a,l,n),!0;case"mouseover":return gl=wi(gl,e,t,a,l,n),!0;case"pointerover":var s=n.pointerId;return vi.set(s,wi(vi.get(s)||null,e,t,a,l,n)),!0;case"gotpointercapture":return s=n.pointerId,bi.set(s,wi(bi.get(s)||null,e,t,a,l,n)),!0}return!1}function Ah(e){var t=Gl(e.target);if(t!==null){var a=p(t);if(a!==null){if(t=a.tag,t===13){if(t=m(a),t!==null){e.blockedOn=t,mt(e.priority,function(){Nh(a)});return}}else if(t===31){if(t=w(a),t!==null){e.blockedOn=t,mt(e.priority,function(){Nh(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Bs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=cu(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);ur=l,a.target.dispatchEvent(l),ur=null}else return t=Xl(a),t!==null&&jh(t),e.blockedOn=a,!1;t.shift()}return!0}function Th(e,t,a){Bs(e)&&a.delete(t)}function W0(){ou=!1,ml!==null&&Bs(ml)&&(ml=null),xl!==null&&Bs(xl)&&(xl=null),gl!==null&&Bs(gl)&&(gl=null),vi.forEach(Th),bi.forEach(Th)}function qs(e,t){e.blockedOn===t&&(e.blockedOn=null,ou||(ou=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,W0)))}var Vs=null;function _h(e){Vs!==e&&(Vs=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Vs===e&&(Vs=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],n=e[t+2];if(typeof l!="function"){if(uu(l||a)===null)continue;break}var s=Xl(a);s!==null&&(e.splice(t,3),t-=3,cc(s,{pending:!0,data:n,method:a.method,action:l},l,n))}}))}function Cn(e){function t(y){return qs(y,e)}ml!==null&&qs(ml,e),xl!==null&&qs(xl,e),gl!==null&&qs(gl,e),vi.forEach(t),bi.forEach(t);for(var a=0;a<yl.length;a++){var l=yl[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<yl.length&&(a=yl[0],a.blockedOn===null);)Ah(a),a.blockedOn===null&&yl.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var n=a[l],s=a[l+1],o=n[xt]||null;if(typeof s=="function")o||_h(a);else if(o){var h=null;if(s&&s.hasAttribute("formAction")){if(n=s,o=s[xt]||null)h=o.formAction;else if(uu(n)!==null)continue}else h=o.action;typeof h=="function"?a[l+1]=h:(a.splice(l,3),l-=3),_h(a)}}}function Rh(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(o){return n=o})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function du(e){this._internalRoot=e}Ys.prototype.render=du.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var a=t.current,l=Jt();wh(a,l,e,t,null,null)},Ys.prototype.unmount=du.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;wh(e.current,2,null,e,null,null),Ss(),t[Me]=null}};function Ys(e){this._internalRoot=e}Ys.prototype.unstable_scheduleHydration=function(e){if(e){var t=Le();e={blockedOn:null,target:e,priority:t};for(var a=0;a<yl.length&&t!==0&&t<yl[a].priority;a++);yl.splice(a,0,e),a===0&&Ah(e)}};var Mh=c.version;if(Mh!=="19.2.3")throw Error(u(527,Mh,"19.2.3"));H.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=g(t),e=e!==null?C(e):null,e=e===null?null:e.stateNode,e};var F0={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gs.isDisabled&&Gs.supportsFiber)try{Ta=Gs.inject(F0),ht=Gs}catch{}}return ji.createRoot=function(e,t){if(!f(e))throw Error(u(299));var a=!1,l="",n=Ld,s=Hd,o=Bd;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=vh(e,1,!1,null,null,a,l,null,n,s,o,Rh),e[Me]=t.current,Zc(e),new du(t)},ji.hydrateRoot=function(e,t,a){if(!f(e))throw Error(u(299));var l=!1,n="",s=Ld,o=Hd,h=Bd,y=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(n=a.identifierPrefix),a.onUncaughtError!==void 0&&(s=a.onUncaughtError),a.onCaughtError!==void 0&&(o=a.onCaughtError),a.onRecoverableError!==void 0&&(h=a.onRecoverableError),a.formState!==void 0&&(y=a.formState)),t=vh(e,1,!0,t,a??null,l,n,y,s,o,h,Rh),t.context=bh(null),a=t.current,l=Jt(),l=jl(l),n=ll(l),n.callback=null,nl(a,n,l),a=l,t.current.lanes=a,Ce(t,a),wa(t),e[Me]=t.current,Zc(e),new Ys(t)},ji.version="19.2.3",ji}var Vh;function cx(){if(Vh)return pu.exports;Vh=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(c){console.error(c)}}return i(),pu.exports=rx(),pu.exports}var ux=cx();const ox=rp(ux);var Yh="popstate";function dx(i={}){function c(u,f){let{pathname:p,search:m,hash:w}=u.location;return Cu("",{pathname:p,search:m,hash:w},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function d(u,f){return typeof f=="string"?f:Ci(f)}return hx(c,d,null,i)}function st(i,c){if(i===!1||i===null||typeof i>"u")throw new Error(c)}function ja(i,c){if(!i){typeof console<"u"&&console.warn(c);try{throw new Error(c)}catch{}}}function fx(){return Math.random().toString(36).substring(2,10)}function Gh(i,c){return{usr:i.state,key:i.key,idx:c}}function Cu(i,c,d=null,u){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof c=="string"?_n(c):c,state:d,key:c&&c.key||u||fx()}}function Ci({pathname:i="/",search:c="",hash:d=""}){return c&&c!=="?"&&(i+=c.charAt(0)==="?"?c:"?"+c),d&&d!=="#"&&(i+=d.charAt(0)==="#"?d:"#"+d),i}function _n(i){let c={};if(i){let d=i.indexOf("#");d>=0&&(c.hash=i.substring(d),i=i.substring(0,d));let u=i.indexOf("?");u>=0&&(c.search=i.substring(u),i=i.substring(0,u)),i&&(c.pathname=i)}return c}function hx(i,c,d,u={}){let{window:f=document.defaultView,v5Compat:p=!1}=u,m=f.history,w="POP",b=null,g=C();g==null&&(g=0,m.replaceState({...m.state,idx:g},""));function C(){return(m.state||{idx:null}).idx}function S(){w="POP";let O=C(),U=O==null?null:O-g;g=O,b&&b({action:w,location:j.location,delta:U})}function k(O,U){w="PUSH";let Y=Cu(j.location,O,U);g=C()+1;let $=Gh(Y,g),ne=j.createHref(Y);try{m.pushState($,"",ne)}catch(ee){if(ee instanceof DOMException&&ee.name==="DataCloneError")throw ee;f.location.assign(ne)}p&&b&&b({action:w,location:j.location,delta:1})}function q(O,U){w="REPLACE";let Y=Cu(j.location,O,U);g=C();let $=Gh(Y,g),ne=j.createHref(Y);m.replaceState($,"",ne),p&&b&&b({action:w,location:j.location,delta:0})}function _(O){return px(O)}let j={get action(){return w},get location(){return i(f,m)},listen(O){if(b)throw new Error("A history only accepts one active listener");return f.addEventListener(Yh,S),b=O,()=>{f.removeEventListener(Yh,S),b=null}},createHref(O){return c(f,O)},createURL:_,encodeLocation(O){let U=_(O);return{pathname:U.pathname,search:U.search,hash:U.hash}},push:k,replace:q,go(O){return m.go(O)}};return j}function px(i,c=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),st(d,"No window.location.(origin|href) available to create URL");let u=typeof i=="string"?i:Ci(i);return u=u.replace(/ $/,"%20"),!c&&u.startsWith("//")&&(u=d+u),new URL(u,d)}function cp(i,c,d="/"){return mx(i,c,d,!1)}function mx(i,c,d,u){let f=typeof c=="string"?_n(c):c,p=Ka(f.pathname||"/",d);if(p==null)return null;let m=up(i);xx(m);let w=null;for(let b=0;w==null&&b<m.length;++b){let g=Ax(p);w=Ex(m[b],g,u)}return w}function up(i,c=[],d=[],u="",f=!1){let p=(m,w,b=f,g)=>{let C={relativePath:g===void 0?m.path||"":g,caseSensitive:m.caseSensitive===!0,childrenIndex:w,route:m};if(C.relativePath.startsWith("/")){if(!C.relativePath.startsWith(u)&&b)return;st(C.relativePath.startsWith(u),`Absolute route path "${C.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),C.relativePath=C.relativePath.slice(u.length)}let S=$a([u,C.relativePath]),k=d.concat(C);m.children&&m.children.length>0&&(st(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${S}".`),up(m.children,c,k,S,b)),!(m.path==null&&!m.index)&&c.push({path:S,score:jx(S,m.index),routesMeta:k})};return i.forEach((m,w)=>{if(m.path===""||!m.path?.includes("?"))p(m,w);else for(let b of op(m.path))p(m,w,!0,b)}),c}function op(i){let c=i.split("/");if(c.length===0)return[];let[d,...u]=c,f=d.endsWith("?"),p=d.replace(/\?$/,"");if(u.length===0)return f?[p,""]:[p];let m=op(u.join("/")),w=[];return w.push(...m.map(b=>b===""?p:[p,b].join("/"))),f&&w.push(...m),w.map(b=>i.startsWith("/")&&b===""?"/":b)}function xx(i){i.sort((c,d)=>c.score!==d.score?d.score-c.score:Nx(c.routesMeta.map(u=>u.childrenIndex),d.routesMeta.map(u=>u.childrenIndex)))}var gx=/^:[\w-]+$/,yx=3,vx=2,bx=1,wx=10,Sx=-2,Xh=i=>i==="*";function jx(i,c){let d=i.split("/"),u=d.length;return d.some(Xh)&&(u+=Sx),c&&(u+=vx),d.filter(f=>!Xh(f)).reduce((f,p)=>f+(gx.test(p)?yx:p===""?bx:wx),u)}function Nx(i,c){return i.length===c.length&&i.slice(0,-1).every((u,f)=>u===c[f])?i[i.length-1]-c[c.length-1]:0}function Ex(i,c,d=!1){let{routesMeta:u}=i,f={},p="/",m=[];for(let w=0;w<u.length;++w){let b=u[w],g=w===u.length-1,C=p==="/"?c:c.slice(p.length)||"/",S=er({path:b.relativePath,caseSensitive:b.caseSensitive,end:g},C),k=b.route;if(!S&&g&&d&&!u[u.length-1].route.index&&(S=er({path:b.relativePath,caseSensitive:b.caseSensitive,end:!1},C)),!S)return null;Object.assign(f,S.params),m.push({params:f,pathname:$a([p,S.pathname]),pathnameBase:Mx($a([p,S.pathnameBase])),route:k}),S.pathnameBase!=="/"&&(p=$a([p,S.pathnameBase]))}return m}function er(i,c){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[d,u]=Cx(i.path,i.caseSensitive,i.end),f=c.match(d);if(!f)return null;let p=f[0],m=p.replace(/(.)\/+$/,"$1"),w=f.slice(1);return{params:u.reduce((g,{paramName:C,isOptional:S},k)=>{if(C==="*"){let _=w[k]||"";m=p.slice(0,p.length-_.length).replace(/(.)\/+$/,"$1")}const q=w[k];return S&&!q?g[C]=void 0:g[C]=(q||"").replace(/%2F/g,"/"),g},{}),pathname:p,pathnameBase:m,pattern:i}}function Cx(i,c=!1,d=!0){ja(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let u=[],f="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,w,b)=>(u.push({paramName:w,isOptional:b!=null}),b?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return i.endsWith("*")?(u.push({paramName:"*"}),f+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?f+="\\/*$":i!==""&&i!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,c?void 0:"i"),u]}function Ax(i){try{return i.split("/").map(c=>decodeURIComponent(c).replace(/\//g,"%2F")).join("/")}catch(c){return ja(!1,`The URL path "${i}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${c}).`),i}}function Ka(i,c){if(c==="/")return i;if(!i.toLowerCase().startsWith(c.toLowerCase()))return null;let d=c.endsWith("/")?c.length-1:c.length,u=i.charAt(d);return u&&u!=="/"?null:i.slice(d)||"/"}var Tx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function _x(i,c="/"){let{pathname:d,search:u="",hash:f=""}=typeof i=="string"?_n(i):i,p;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?p=Qh(d.substring(1),"/"):p=Qh(d,c)):p=c,{pathname:p,search:zx(u),hash:Ox(f)}}function Qh(i,c){let d=c.replace(/\/+$/,"").split("/");return i.split("/").forEach(f=>{f===".."?d.length>1&&d.pop():f!=="."&&d.push(f)}),d.length>1?d.join("/"):"/"}function yu(i,c,d,u){return`Cannot include a '${i}' character in a manually specified \`to.${c}\` field [${JSON.stringify(u)}]. Please separate it out to the \`to.${d}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Rx(i){return i.filter((c,d)=>d===0||c.route.path&&c.route.path.length>0)}function dp(i){let c=Rx(i);return c.map((d,u)=>u===c.length-1?d.pathname:d.pathnameBase)}function fp(i,c,d,u=!1){let f;typeof i=="string"?f=_n(i):(f={...i},st(!f.pathname||!f.pathname.includes("?"),yu("?","pathname","search",f)),st(!f.pathname||!f.pathname.includes("#"),yu("#","pathname","hash",f)),st(!f.search||!f.search.includes("#"),yu("#","search","hash",f)));let p=i===""||f.pathname==="",m=p?"/":f.pathname,w;if(m==null)w=d;else{let S=c.length-1;if(!u&&m.startsWith("..")){let k=m.split("/");for(;k[0]==="..";)k.shift(),S-=1;f.pathname=k.join("/")}w=S>=0?c[S]:"/"}let b=_x(f,w),g=m&&m!=="/"&&m.endsWith("/"),C=(p||m===".")&&d.endsWith("/");return!b.pathname.endsWith("/")&&(g||C)&&(b.pathname+="/"),b}var $a=i=>i.join("/").replace(/\/\/+/g,"/"),Mx=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),zx=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,Ox=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i,Dx=class{constructor(i,c,d,u=!1){this.status=i,this.statusText=c||"",this.internal=u,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function kx(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}function Ux(i){return i.map(c=>c.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var hp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function pp(i,c){let d=i;if(typeof d!="string"||!Tx.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let u=d,f=!1;if(hp)try{let p=new URL(window.location.href),m=d.startsWith("//")?new URL(p.protocol+d):new URL(d),w=Ka(m.pathname,c);m.origin===p.origin&&w!=null?d=w+m.search+m.hash:f=!0}catch{ja(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:u,isExternal:f,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var mp=["POST","PUT","PATCH","DELETE"];new Set(mp);var Lx=["GET",...mp];new Set(Lx);var Rn=x.createContext(null);Rn.displayName="DataRouter";var tr=x.createContext(null);tr.displayName="DataRouterState";var Hx=x.createContext(!1),xp=x.createContext({isTransitioning:!1});xp.displayName="ViewTransition";var Bx=x.createContext(new Map);Bx.displayName="Fetchers";var qx=x.createContext(null);qx.displayName="Await";var ra=x.createContext(null);ra.displayName="Navigation";var _i=x.createContext(null);_i.displayName="Location";var Na=x.createContext({outlet:null,matches:[],isDataRoute:!1});Na.displayName="Route";var Ou=x.createContext(null);Ou.displayName="RouteError";var gp="REACT_ROUTER_ERROR",Vx="REDIRECT",Yx="ROUTE_ERROR_RESPONSE";function Gx(i){if(i.startsWith(`${gp}:${Vx}:{`))try{let c=JSON.parse(i.slice(28));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string"&&typeof c.location=="string"&&typeof c.reloadDocument=="boolean"&&typeof c.replace=="boolean")return c}catch{}}function Xx(i){if(i.startsWith(`${gp}:${Yx}:{`))try{let c=JSON.parse(i.slice(40));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string")return new Dx(c.status,c.statusText,c.data)}catch{}}function Qx(i,{relative:c}={}){st(Ri(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:u}=x.useContext(ra),{hash:f,pathname:p,search:m}=Mi(i,{relative:c}),w=p;return d!=="/"&&(w=p==="/"?d:$a([d,p])),u.createHref({pathname:w,search:m,hash:f})}function Ri(){return x.useContext(_i)!=null}function bl(){return st(Ri(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(_i).location}var yp="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function vp(i){x.useContext(ra).static||x.useLayoutEffect(i)}function Mn(){let{isDataRoute:i}=x.useContext(Na);return i?ng():Zx()}function Zx(){st(Ri(),"useNavigate() may be used only in the context of a <Router> component.");let i=x.useContext(Rn),{basename:c,navigator:d}=x.useContext(ra),{matches:u}=x.useContext(Na),{pathname:f}=bl(),p=JSON.stringify(dp(u)),m=x.useRef(!1);return vp(()=>{m.current=!0}),x.useCallback((b,g={})=>{if(ja(m.current,yp),!m.current)return;if(typeof b=="number"){d.go(b);return}let C=fp(b,JSON.parse(p),f,g.relative==="path");i==null&&c!=="/"&&(C.pathname=C.pathname==="/"?c:$a([c,C.pathname])),(g.replace?d.replace:d.push)(C,g.state,g)},[c,d,p,f,i])}x.createContext(null);function bp(){let{matches:i}=x.useContext(Na),c=i[i.length-1];return c?c.params:{}}function Mi(i,{relative:c}={}){let{matches:d}=x.useContext(Na),{pathname:u}=bl(),f=JSON.stringify(dp(d));return x.useMemo(()=>fp(i,JSON.parse(f),u,c==="path"),[i,f,u,c])}function $x(i,c){return wp(i,c)}function wp(i,c,d,u,f){st(Ri(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:p}=x.useContext(ra),{matches:m}=x.useContext(Na),w=m[m.length-1],b=w?w.params:{},g=w?w.pathname:"/",C=w?w.pathnameBase:"/",S=w&&w.route;{let Y=S&&S.path||"";jp(g,!S||Y.endsWith("*")||Y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${Y}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
+
11
+ Please change the parent <Route path="${Y}"> to <Route path="${Y==="/"?"*":`${Y}/*`}">.`)}let k=bl(),q;if(c){let Y=typeof c=="string"?_n(c):c;st(C==="/"||Y.pathname?.startsWith(C),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${C}" but pathname "${Y.pathname}" was given in the \`location\` prop.`),q=Y}else q=k;let _=q.pathname||"/",j=_;if(C!=="/"){let Y=C.replace(/^\//,"").split("/");j="/"+_.replace(/^\//,"").split("/").slice(Y.length).join("/")}let O=cp(i,{pathname:j});ja(S||O!=null,`No routes matched location "${q.pathname}${q.search}${q.hash}" `),ja(O==null||O[O.length-1].route.element!==void 0||O[O.length-1].route.Component!==void 0||O[O.length-1].route.lazy!==void 0,`Matched leaf route at location "${q.pathname}${q.search}${q.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let U=Ix(O&&O.map(Y=>Object.assign({},Y,{params:Object.assign({},b,Y.params),pathname:$a([C,p.encodeLocation?p.encodeLocation(Y.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathname]),pathnameBase:Y.pathnameBase==="/"?C:$a([C,p.encodeLocation?p.encodeLocation(Y.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathnameBase])})),m,d,u,f);return c&&U?x.createElement(_i.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...q},navigationType:"POP"}},U):U}function Kx(){let i=lg(),c=kx(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),d=i instanceof Error?i.stack:null,u="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:u},p={padding:"2px 4px",backgroundColor:u},m=null;return console.error("Error handled by React Router default ErrorBoundary:",i),m=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:p},"ErrorBoundary")," or"," ",x.createElement("code",{style:p},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},c),d?x.createElement("pre",{style:f},d):null,m)}var Jx=x.createElement(Kx,null),Sp=class extends x.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,c){return c.location!==i.location||c.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:c.error,location:c.location,revalidation:i.revalidation||c.revalidation}}componentDidCatch(i,c){this.props.onError?this.props.onError(i,c):console.error("React Router caught the following error during render",i)}render(){let i=this.state.error;if(this.context&&typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){const d=Xx(i.digest);d&&(i=d)}let c=i!==void 0?x.createElement(Na.Provider,{value:this.props.routeContext},x.createElement(Ou.Provider,{value:i,children:this.props.component})):this.props.children;return this.context?x.createElement(Wx,{error:i},c):c}};Sp.contextType=Hx;var vu=new WeakMap;function Wx({children:i,error:c}){let{basename:d}=x.useContext(ra);if(typeof c=="object"&&c&&"digest"in c&&typeof c.digest=="string"){let u=Gx(c.digest);if(u){let f=vu.get(c);if(f)throw f;let p=pp(u.location,d);if(hp&&!vu.get(c))if(p.isExternal||u.reloadDocument)window.location.href=p.absoluteURL||p.to;else{const m=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(p.to,{replace:u.replace}));throw vu.set(c,m),m}return x.createElement("meta",{httpEquiv:"refresh",content:`0;url=${p.absoluteURL||p.to}`})}}return i}function Fx({routeContext:i,match:c,children:d}){let u=x.useContext(Rn);return u&&u.static&&u.staticContext&&(c.route.errorElement||c.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=c.route.id),x.createElement(Na.Provider,{value:i},d)}function Ix(i,c=[],d=null,u=null,f=null){if(i==null){if(!d)return null;if(d.errors)i=d.matches;else if(c.length===0&&!d.initialized&&d.matches.length>0)i=d.matches;else return null}let p=i,m=d?.errors;if(m!=null){let C=p.findIndex(S=>S.route.id&&m?.[S.route.id]!==void 0);st(C>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),p=p.slice(0,Math.min(p.length,C+1))}let w=!1,b=-1;if(d)for(let C=0;C<p.length;C++){let S=p[C];if((S.route.HydrateFallback||S.route.hydrateFallbackElement)&&(b=C),S.route.id){let{loaderData:k,errors:q}=d,_=S.route.loader&&!k.hasOwnProperty(S.route.id)&&(!q||q[S.route.id]===void 0);if(S.route.lazy||_){w=!0,b>=0?p=p.slice(0,b+1):p=[p[0]];break}}}let g=d&&u?(C,S)=>{u(C,{location:d.location,params:d.matches?.[0]?.params??{},unstable_pattern:Ux(d.matches),errorInfo:S})}:void 0;return p.reduceRight((C,S,k)=>{let q,_=!1,j=null,O=null;d&&(q=m&&S.route.id?m[S.route.id]:void 0,j=S.route.errorElement||Jx,w&&(b<0&&k===0?(jp("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),_=!0,O=null):b===k&&(_=!0,O=S.route.hydrateFallbackElement||null)));let U=c.concat(p.slice(0,k+1)),Y=()=>{let $;return q?$=j:_?$=O:S.route.Component?$=x.createElement(S.route.Component,null):S.route.element?$=S.route.element:$=C,x.createElement(Fx,{match:S,routeContext:{outlet:C,matches:U,isDataRoute:d!=null},children:$})};return d&&(S.route.ErrorBoundary||S.route.errorElement||k===0)?x.createElement(Sp,{location:d.location,revalidation:d.revalidation,component:j,error:q,children:Y(),routeContext:{outlet:null,matches:U,isDataRoute:!0},onError:g}):Y()},null)}function Du(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Px(i){let c=x.useContext(Rn);return st(c,Du(i)),c}function eg(i){let c=x.useContext(tr);return st(c,Du(i)),c}function tg(i){let c=x.useContext(Na);return st(c,Du(i)),c}function ku(i){let c=tg(i),d=c.matches[c.matches.length-1];return st(d.route.id,`${i} can only be used on routes that contain a unique "id"`),d.route.id}function ag(){return ku("useRouteId")}function lg(){let i=x.useContext(Ou),c=eg("useRouteError"),d=ku("useRouteError");return i!==void 0?i:c.errors?.[d]}function ng(){let{router:i}=Px("useNavigate"),c=ku("useNavigate"),d=x.useRef(!1);return vp(()=>{d.current=!0}),x.useCallback(async(f,p={})=>{ja(d.current,yp),d.current&&(typeof f=="number"?await i.navigate(f):await i.navigate(f,{fromRouteId:c,...p}))},[i,c])}var Zh={};function jp(i,c,d){!c&&!Zh[i]&&(Zh[i]=!0,ja(!1,d))}x.memo(ig);function ig({routes:i,future:c,state:d,onError:u}){return wp(i,void 0,d,u,c)}function Sa(i){st(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function sg({basename:i="/",children:c=null,location:d,navigationType:u="POP",navigator:f,static:p=!1,unstable_useTransitions:m}){st(!Ri(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let w=i.replace(/^\/*/,"/"),b=x.useMemo(()=>({basename:w,navigator:f,static:p,unstable_useTransitions:m,future:{}}),[w,f,p,m]);typeof d=="string"&&(d=_n(d));let{pathname:g="/",search:C="",hash:S="",state:k=null,key:q="default"}=d,_=x.useMemo(()=>{let j=Ka(g,w);return j==null?null:{location:{pathname:j,search:C,hash:S,state:k,key:q},navigationType:u}},[w,g,C,S,k,q,u]);return ja(_!=null,`<Router basename="${w}"> is not able to match the URL "${g}${C}${S}" because it does not start with the basename, so the <Router> won't render anything.`),_==null?null:x.createElement(ra.Provider,{value:b},x.createElement(_i.Provider,{children:c,value:_}))}function rg({children:i,location:c}){return $x(Au(i),c)}function Au(i,c=[]){let d=[];return x.Children.forEach(i,(u,f)=>{if(!x.isValidElement(u))return;let p=[...c,f];if(u.type===x.Fragment){d.push.apply(d,Au(u.props.children,p));return}st(u.type===Sa,`[${typeof u.type=="string"?u.type:u.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),st(!u.props.index||!u.props.children,"An index route cannot have child routes.");let m={id:u.props.id||p.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,middleware:u.props.middleware,loader:u.props.loader,action:u.props.action,hydrateFallbackElement:u.props.hydrateFallbackElement,HydrateFallback:u.props.HydrateFallback,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.hasErrorBoundary===!0||u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(m.children=Au(u.props.children,p)),d.push(m)}),d}var Is="get",Ps="application/x-www-form-urlencoded";function ar(i){return typeof HTMLElement<"u"&&i instanceof HTMLElement}function cg(i){return ar(i)&&i.tagName.toLowerCase()==="button"}function ug(i){return ar(i)&&i.tagName.toLowerCase()==="form"}function og(i){return ar(i)&&i.tagName.toLowerCase()==="input"}function dg(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function fg(i,c){return i.button===0&&(!c||c==="_self")&&!dg(i)}var Xs=null;function hg(){if(Xs===null)try{new FormData(document.createElement("form"),0),Xs=!1}catch{Xs=!0}return Xs}var pg=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function bu(i){return i!=null&&!pg.has(i)?(ja(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ps}"`),null):i}function mg(i,c){let d,u,f,p,m;if(ug(i)){let w=i.getAttribute("action");u=w?Ka(w,c):null,d=i.getAttribute("method")||Is,f=bu(i.getAttribute("enctype"))||Ps,p=new FormData(i)}else if(cg(i)||og(i)&&(i.type==="submit"||i.type==="image")){let w=i.form;if(w==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let b=i.getAttribute("formaction")||w.getAttribute("action");if(u=b?Ka(b,c):null,d=i.getAttribute("formmethod")||w.getAttribute("method")||Is,f=bu(i.getAttribute("formenctype"))||bu(w.getAttribute("enctype"))||Ps,p=new FormData(w,i),!hg()){let{name:g,type:C,value:S}=i;if(C==="image"){let k=g?`${g}.`:"";p.append(`${k}x`,"0"),p.append(`${k}y`,"0")}else g&&p.append(g,S)}}else{if(ar(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Is,u=null,f=Ps,m=i}return p&&f==="text/plain"&&(m=p,p=void 0),{action:u,method:d.toLowerCase(),encType:f,formData:p,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Uu(i,c){if(i===!1||i===null||typeof i>"u")throw new Error(c)}function xg(i,c,d,u){let f=typeof i=="string"?new URL(i,typeof window>"u"?"server://singlefetch/":window.location.origin):i;return d?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${u}`:f.pathname=`${f.pathname}.${u}`:f.pathname==="/"?f.pathname=`_root.${u}`:c&&Ka(f.pathname,c)==="/"?f.pathname=`${c.replace(/\/$/,"")}/_root.${u}`:f.pathname=`${f.pathname.replace(/\/$/,"")}.${u}`,f}async function gg(i,c){if(i.id in c)return c[i.id];try{let d=await import(i.module);return c[i.id]=d,d}catch(d){return console.error(`Error loading route module \`${i.module}\`, reloading page...`),console.error(d),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function yg(i){return i==null?!1:i.href==null?i.rel==="preload"&&typeof i.imageSrcSet=="string"&&typeof i.imageSizes=="string":typeof i.rel=="string"&&typeof i.href=="string"}async function vg(i,c,d){let u=await Promise.all(i.map(async f=>{let p=c.routes[f.route.id];if(p){let m=await gg(p,d);return m.links?m.links():[]}return[]}));return jg(u.flat(1).filter(yg).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function $h(i,c,d,u,f,p){let m=(b,g)=>d[g]?b.route.id!==d[g].route.id:!0,w=(b,g)=>d[g].pathname!==b.pathname||d[g].route.path?.endsWith("*")&&d[g].params["*"]!==b.params["*"];return p==="assets"?c.filter((b,g)=>m(b,g)||w(b,g)):p==="data"?c.filter((b,g)=>{let C=u.routes[b.route.id];if(!C||!C.hasLoader)return!1;if(m(b,g)||w(b,g))return!0;if(b.route.shouldRevalidate){let S=b.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:d[0]?.params||{},nextUrl:new URL(i,window.origin),nextParams:b.params,defaultShouldRevalidate:!0});if(typeof S=="boolean")return S}return!0}):[]}function bg(i,c,{includeHydrateFallback:d}={}){return wg(i.map(u=>{let f=c.routes[u.route.id];if(!f)return[];let p=[f.module];return f.clientActionModule&&(p=p.concat(f.clientActionModule)),f.clientLoaderModule&&(p=p.concat(f.clientLoaderModule)),d&&f.hydrateFallbackModule&&(p=p.concat(f.hydrateFallbackModule)),f.imports&&(p=p.concat(f.imports)),p}).flat(1))}function wg(i){return[...new Set(i)]}function Sg(i){let c={},d=Object.keys(i).sort();for(let u of d)c[u]=i[u];return c}function jg(i,c){let d=new Set;return new Set(c),i.reduce((u,f)=>{let p=JSON.stringify(Sg(f));return d.has(p)||(d.add(p),u.push({key:p,link:f})),u},[])}function Np(){let i=x.useContext(Rn);return Uu(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function Ng(){let i=x.useContext(tr);return Uu(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var Lu=x.createContext(void 0);Lu.displayName="FrameworkContext";function Ep(){let i=x.useContext(Lu);return Uu(i,"You must render this element inside a <HydratedRouter> element"),i}function Eg(i,c){let d=x.useContext(Lu),[u,f]=x.useState(!1),[p,m]=x.useState(!1),{onFocus:w,onBlur:b,onMouseEnter:g,onMouseLeave:C,onTouchStart:S}=c,k=x.useRef(null);x.useEffect(()=>{if(i==="render"&&m(!0),i==="viewport"){let j=U=>{U.forEach(Y=>{m(Y.isIntersecting)})},O=new IntersectionObserver(j,{threshold:.5});return k.current&&O.observe(k.current),()=>{O.disconnect()}}},[i]),x.useEffect(()=>{if(u){let j=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(j)}}},[u]);let q=()=>{f(!0)},_=()=>{f(!1),m(!1)};return d?i!=="intent"?[p,k,{}]:[p,k,{onFocus:Ni(w,q),onBlur:Ni(b,_),onMouseEnter:Ni(g,q),onMouseLeave:Ni(C,_),onTouchStart:Ni(S,q)}]:[!1,k,{}]}function Ni(i,c){return d=>{i&&i(d),d.defaultPrevented||c(d)}}function Cg({page:i,...c}){let{router:d}=Np(),u=x.useMemo(()=>cp(d.routes,i,d.basename),[d.routes,i,d.basename]);return u?x.createElement(Tg,{page:i,matches:u,...c}):null}function Ag(i){let{manifest:c,routeModules:d}=Ep(),[u,f]=x.useState([]);return x.useEffect(()=>{let p=!1;return vg(i,c,d).then(m=>{p||f(m)}),()=>{p=!0}},[i,c,d]),u}function Tg({page:i,matches:c,...d}){let u=bl(),{future:f,manifest:p,routeModules:m}=Ep(),{basename:w}=Np(),{loaderData:b,matches:g}=Ng(),C=x.useMemo(()=>$h(i,c,g,p,u,"data"),[i,c,g,p,u]),S=x.useMemo(()=>$h(i,c,g,p,u,"assets"),[i,c,g,p,u]),k=x.useMemo(()=>{if(i===u.pathname+u.search+u.hash)return[];let j=new Set,O=!1;if(c.forEach(Y=>{let $=p.routes[Y.route.id];!$||!$.hasLoader||(!C.some(ne=>ne.route.id===Y.route.id)&&Y.route.id in b&&m[Y.route.id]?.shouldRevalidate||$.hasClientLoader?O=!0:j.add(Y.route.id))}),j.size===0)return[];let U=xg(i,w,f.unstable_trailingSlashAwareDataRequests,"data");return O&&j.size>0&&U.searchParams.set("_routes",c.filter(Y=>j.has(Y.route.id)).map(Y=>Y.route.id).join(",")),[U.pathname+U.search]},[w,f.unstable_trailingSlashAwareDataRequests,b,u,p,C,c,i,m]),q=x.useMemo(()=>bg(S,p),[S,p]),_=Ag(S);return x.createElement(x.Fragment,null,k.map(j=>x.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...d})),q.map(j=>x.createElement("link",{key:j,rel:"modulepreload",href:j,...d})),_.map(({key:j,link:O})=>x.createElement("link",{key:j,nonce:d.nonce,...O,crossOrigin:O.crossOrigin??d.crossOrigin})))}function _g(...i){return c=>{i.forEach(d=>{typeof d=="function"?d(c):d!=null&&(d.current=c)})}}var Rg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Rg&&(window.__reactRouterVersion="7.13.0")}catch{}function Mg({basename:i,children:c,unstable_useTransitions:d,window:u}){let f=x.useRef();f.current==null&&(f.current=dx({window:u,v5Compat:!0}));let p=f.current,[m,w]=x.useState({action:p.action,location:p.location}),b=x.useCallback(g=>{d===!1?w(g):x.startTransition(()=>w(g))},[d]);return x.useLayoutEffect(()=>p.listen(b),[p,b]),x.createElement(sg,{basename:i,children:c,location:m.location,navigationType:m.action,navigator:p,unstable_useTransitions:d})}var Cp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ap=x.forwardRef(function({onClick:c,discover:d="render",prefetch:u="none",relative:f,reloadDocument:p,replace:m,state:w,target:b,to:g,preventScrollReset:C,viewTransition:S,unstable_defaultShouldRevalidate:k,...q},_){let{basename:j,unstable_useTransitions:O}=x.useContext(ra),U=typeof g=="string"&&Cp.test(g),Y=pp(g,j);g=Y.to;let $=Qx(g,{relative:f}),[ne,ee,te]=Eg(u,q),P=kg(g,{replace:m,state:w,target:b,preventScrollReset:C,relative:f,viewTransition:S,unstable_defaultShouldRevalidate:k,unstable_useTransitions:O});function fe(le){c&&c(le),le.defaultPrevented||P(le)}let ie=x.createElement("a",{...q,...te,href:Y.absoluteURL||$,onClick:Y.isExternal||p?c:fe,ref:_g(_,ee),target:b,"data-discover":!U&&d==="render"?"true":void 0});return ne&&!U?x.createElement(x.Fragment,null,ie,x.createElement(Cg,{page:$})):ie});Ap.displayName="Link";var zg=x.forwardRef(function({"aria-current":c="page",caseSensitive:d=!1,className:u="",end:f=!1,style:p,to:m,viewTransition:w,children:b,...g},C){let S=Mi(m,{relative:g.relative}),k=bl(),q=x.useContext(tr),{navigator:_,basename:j}=x.useContext(ra),O=q!=null&&qg(S)&&w===!0,U=_.encodeLocation?_.encodeLocation(S).pathname:S.pathname,Y=k.pathname,$=q&&q.navigation&&q.navigation.location?q.navigation.location.pathname:null;d||(Y=Y.toLowerCase(),$=$?$.toLowerCase():null,U=U.toLowerCase()),$&&j&&($=Ka($,j)||$);const ne=U!=="/"&&U.endsWith("/")?U.length-1:U.length;let ee=Y===U||!f&&Y.startsWith(U)&&Y.charAt(ne)==="/",te=$!=null&&($===U||!f&&$.startsWith(U)&&$.charAt(U.length)==="/"),P={isActive:ee,isPending:te,isTransitioning:O},fe=ee?c:void 0,ie;typeof u=="function"?ie=u(P):ie=[u,ee?"active":null,te?"pending":null,O?"transitioning":null].filter(Boolean).join(" ");let le=typeof p=="function"?p(P):p;return x.createElement(Ap,{...g,"aria-current":fe,className:ie,ref:C,style:le,to:m,viewTransition:w},typeof b=="function"?b(P):b)});zg.displayName="NavLink";var Og=x.forwardRef(({discover:i="render",fetcherKey:c,navigate:d,reloadDocument:u,replace:f,state:p,method:m=Is,action:w,onSubmit:b,relative:g,preventScrollReset:C,viewTransition:S,unstable_defaultShouldRevalidate:k,...q},_)=>{let{unstable_useTransitions:j}=x.useContext(ra),O=Hg(),U=Bg(w,{relative:g}),Y=m.toLowerCase()==="get"?"get":"post",$=typeof w=="string"&&Cp.test(w),ne=ee=>{if(b&&b(ee),ee.defaultPrevented)return;ee.preventDefault();let te=ee.nativeEvent.submitter,P=te?.getAttribute("formmethod")||m,fe=()=>O(te||ee.currentTarget,{fetcherKey:c,method:P,navigate:d,replace:f,state:p,relative:g,preventScrollReset:C,viewTransition:S,unstable_defaultShouldRevalidate:k});j&&d!==!1?x.startTransition(()=>fe()):fe()};return x.createElement("form",{ref:_,method:Y,action:U,onSubmit:u?b:ne,...q,"data-discover":!$&&i==="render"?"true":void 0})});Og.displayName="Form";function Dg(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Tp(i){let c=x.useContext(Rn);return st(c,Dg(i)),c}function kg(i,{target:c,replace:d,state:u,preventScrollReset:f,relative:p,viewTransition:m,unstable_defaultShouldRevalidate:w,unstable_useTransitions:b}={}){let g=Mn(),C=bl(),S=Mi(i,{relative:p});return x.useCallback(k=>{if(fg(k,c)){k.preventDefault();let q=d!==void 0?d:Ci(C)===Ci(S),_=()=>g(i,{replace:q,state:u,preventScrollReset:f,relative:p,viewTransition:m,unstable_defaultShouldRevalidate:w});b?x.startTransition(()=>_()):_()}},[C,g,S,d,u,c,i,f,p,m,w,b])}var Ug=0,Lg=()=>`__${String(++Ug)}__`;function Hg(){let{router:i}=Tp("useSubmit"),{basename:c}=x.useContext(ra),d=ag(),u=i.fetch,f=i.navigate;return x.useCallback(async(p,m={})=>{let{action:w,method:b,encType:g,formData:C,body:S}=mg(p,c);if(m.navigate===!1){let k=m.fetcherKey||Lg();await u(k,d,m.action||w,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:C,body:S,formMethod:m.method||b,formEncType:m.encType||g,flushSync:m.flushSync})}else await f(m.action||w,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:C,body:S,formMethod:m.method||b,formEncType:m.encType||g,replace:m.replace,state:m.state,fromRouteId:d,flushSync:m.flushSync,viewTransition:m.viewTransition})},[u,f,c,d])}function Bg(i,{relative:c}={}){let{basename:d}=x.useContext(ra),u=x.useContext(Na);st(u,"useFormAction must be used inside a RouteContext");let[f]=u.matches.slice(-1),p={...Mi(i||".",{relative:c})},m=bl();if(i==null){p.search=m.search;let w=new URLSearchParams(p.search),b=w.getAll("index");if(b.some(C=>C==="")){w.delete("index"),b.filter(S=>S).forEach(S=>w.append("index",S));let C=w.toString();p.search=C?`?${C}`:""}}return(!i||i===".")&&f.route.index&&(p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(p.pathname=p.pathname==="/"?d:$a([d,p.pathname])),Ci(p)}function qg(i,{relative:c}={}){let d=x.useContext(xp);st(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=Tp("useViewTransitionState"),f=Mi(i,{relative:c});if(!d.isTransitioning)return!1;let p=Ka(d.currentLocation.pathname,u)||d.currentLocation.pathname,m=Ka(d.nextLocation.pathname,u)||d.nextLocation.pathname;return er(f.pathname,m)!=null||er(f.pathname,p)!=null}const Vg=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Yg=i=>i.replace(/^([A-Z])|[\s-_]+(\w)/g,(c,d,u)=>u?u.toUpperCase():d.toLowerCase()),Kh=i=>{const c=Yg(i);return c.charAt(0).toUpperCase()+c.slice(1)},_p=(...i)=>i.filter((c,d,u)=>!!c&&c.trim()!==""&&u.indexOf(c)===d).join(" ").trim(),Gg=i=>{for(const c in i)if(c.startsWith("aria-")||c==="role"||c==="title")return!0};var Xg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Qg=x.forwardRef(({color:i="currentColor",size:c=24,strokeWidth:d=2,absoluteStrokeWidth:u,className:f="",children:p,iconNode:m,...w},b)=>x.createElement("svg",{ref:b,...Xg,width:c,height:c,stroke:i,strokeWidth:u?Number(d)*24/Number(c):d,className:_p("lucide",f),...!p&&!Gg(w)&&{"aria-hidden":"true"},...w},[...m.map(([g,C])=>x.createElement(g,C)),...Array.isArray(p)?p:[p]]));const Ne=(i,c)=>{const d=x.forwardRef(({className:u,...f},p)=>x.createElement(Qg,{ref:p,iconNode:c,className:_p(`lucide-${Vg(Kh(i))}`,`lucide-${i}`,u),...f}));return d.displayName=Kh(i),d};const Zg=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]],$g=Ne("arrow-down-up",Zg);const Kg=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],Rp=Ne("camera",Kg);const Jg=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ai=Ne("check",Jg);const Wg=[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Fg=Ne("circle-play",Wg);const Ig=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]],Pg=Ne("clipboard-copy",Ig);const ey=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ty=Ne("clock",ey);const ay=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],ly=Ne("cloud",ay);const ny=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],iy=Ne("code",ny);const sy=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Ti=Ne("copy",sy);const ry=[["path",{d:"m10 15 5 5 5-5",key:"1hpjnr"}],["path",{d:"M4 4h7a4 4 0 0 1 4 4v12",key:"wcbgct"}]],cy=Ne("corner-right-down",ry);const uy=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Mp=Ne("database",uy);const oy=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],dy=Ne("download",oy);const fy=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],hy=Ne("eye-off",fy);const py=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],my=Ne("eye",py);const xy=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],gy=Ne("globe",xy);const yy=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],zp=Ne("history",yy);const vy=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],by=Ne("house",vy);const wy=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],Sy=Ne("keyboard",wy);const jy=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Ny=Ne("layers",jy);const Ey=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],Cy=Ne("list",Ey);const Ay=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Ty=Ne("log-out",Ay);const _y=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Ry=Ne("monitor",_y);const My=[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]],zy=Ne("mouse-pointer-2",My);const Oy=[["path",{d:"M6 8L2 12L6 16",key:"kyvwex"}],["path",{d:"M2 12H22",key:"1m8cig"}]],Dy=Ne("move-left",Oy);const ky=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Uy=Ne("play",ky);const Ly=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Hy=Ne("plus",Ly);const By=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Op=Ne("refresh-cw",By);const qy=[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]],Vy=Ne("repeat",qy);const Yy=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],Gy=Ne("rocket",Yy);const Xy=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Qy=Ne("settings",Xy);const Zy=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],$y=Ne("shield-check",Zy);const Ky=[["path",{d:"M16 3h5v5",key:"1806ms"}],["path",{d:"M8 3H3v5",key:"15dfkv"}],["path",{d:"M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3",key:"1qrqzj"}],["path",{d:"m15 9 6-6",key:"ko1vev"}]],Jy=Ne("split",Ky);const Wy=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Jh=Ne("square",Wy);const Fy=[["path",{d:"M8.34 8.34 2 9.27l5 4.87L5.82 21 12 17.77 18.18 21l-.59-3.43",key:"16m0ql"}],["path",{d:"M18.42 12.76 22 9.27l-6.91-1L12 2l-1.44 2.91",key:"1vt8nq"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]],Iy=Ne("star-off",Fy);const Py=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],ev=Ne("star",Py);const tv=[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]],av=Ne("table",tv);const lv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],nv=Ne("target",lv);const iv=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],sv=Ne("terminal",iv);const rv=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Hu=Ne("trash-2",rv);const cv=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],uv=Ne("triangle-alert",cv);const ov=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]],dv=Ne("type",ov);const fv=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],hv=Ne("upload",fv);const pv=[["path",{d:"M8 21s-4-3-4-9 4-9 4-9",key:"uto9ud"}],["path",{d:"M16 3s4 3 4 9-4 9-4 9",key:"4w2vsq"}],["line",{x1:"15",x2:"9",y1:"9",y2:"15",key:"f7djnv"}],["line",{x1:"9",x2:"15",y1:"9",y2:"15",key:"1shsy8"}]],mv=Ne("variable",pv);const xv=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Bu=Ne("x",xv),gv=({onNavigate:i,onNewTask:c,onLogout:d,currentScreen:u})=>r.jsxs("aside",{className:"w-20 h-full border-r border-white/10 glass flex flex-col items-center py-8 shrink-0 z-50",children:[r.jsx("button",{onClick:()=>i("dashboard"),className:"mb-12 hover:opacity-80 transition-opacity",children:r.jsx("img",{src:"/icon.png",alt:"Logo",className:"w-10 h-10",onError:f=>{f.currentTarget.src="/icon.png"}})}),r.jsxs("div",{className:"flex-1 flex flex-col gap-6",children:[r.jsx("button",{onClick:c,className:"w-12 h-12 rounded-2xl flex items-center justify-center text-white bg-white/5 hover:bg-white/10 transition-all",title:"New Task",children:r.jsx(Hy,{className:"w-6 h-6"})}),r.jsx("button",{onClick:()=>i("dashboard"),className:`w-12 h-12 rounded-2xl flex items-center justify-center transition-all ${u==="dashboard"?"bg-white/10 text-white":"text-gray-500 hover:bg-white/5 hover:text-white"}`,title:"Dashboard",children:r.jsx(by,{className:"w-6 h-6"})}),r.jsx("button",{onClick:()=>i("settings"),className:`w-12 h-12 rounded-2xl flex items-center justify-center transition-all ${u==="settings"?"bg-white/10 text-white":"text-gray-500 hover:bg-white/5 hover:text-white"}`,title:"Settings",children:r.jsx(Qy,{className:"w-6 h-6"})}),r.jsx("button",{onClick:()=>i("executions"),className:`w-12 h-12 rounded-2xl flex items-center justify-center transition-all ${u==="executions"?"bg-white/10 text-white":"text-gray-500 hover:bg-white/5 hover:text-white"}`,title:"Executions",children:r.jsx(zp,{className:"w-6 h-6"})}),r.jsx("button",{onClick:()=>i("captures"),className:`w-12 h-12 rounded-2xl flex items-center justify-center transition-all ${u==="captures"?"bg-white/10 text-white":"text-gray-500 hover:bg-white/5 hover:text-white"}`,title:"Captures",children:r.jsx(Rp,{className:"w-6 h-6"})})]}),r.jsx("button",{onClick:d,className:"w-12 h-12 rounded-2xl flex items-center justify-center text-gray-500 hover:bg-red-500/10 hover:text-red-500 transition-all",title:"Logout",children:r.jsx(Ty,{className:"w-6 h-6"})})]}),yv=({status:i,onSubmit:c,error:d,busy:u=!1})=>{const[f,p]=x.useState(""),[m,w]=x.useState(""),[b,g]=x.useState(""),[C,S]=x.useState(""),k=()=>{c(m,b,f,C)},q=i==="setup"?u?"Creating account...":"Create Account":u?"Authenticating...":"Authenticate";return r.jsxs("div",{className:"fixed inset-0 z-[100] bg-[#020202] flex items-center justify-center",children:[r.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none",style:{backgroundImage:"radial-gradient(#fff 1px, transparent 1px)",backgroundSize:"40px 40px"}}),r.jsxs("div",{className:"w-[400px] glass-card p-10 rounded-[48px] space-y-8 relative",children:[r.jsxs("div",{className:"text-center space-y-2",children:[r.jsx("h1",{className:"text-2xl font-bold tracking-tighter text-white uppercase",children:"Doppelganger"}),r.jsx("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-[0.3em]",children:i==="setup"?"Initializing System":"Access Restricted"})]}),r.jsxs("div",{className:"space-y-4",children:[i==="setup"&&r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Name"}),r.jsx("input",{type:"text",value:f,onChange:_=>p(_.target.value),placeholder:"Full Name",className:"w-full bg-white/[0.05] border border-white/10 rounded-2xl px-5 py-4 text-sm focus:outline-none focus:border-white/30 transition-all placeholder:text-gray-600"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Email"}),r.jsx("input",{type:"email",value:m,onChange:_=>w(_.target.value),placeholder:"user@example.com",className:"w-full bg-white/[0.05] border border-white/10 rounded-2xl px-5 py-4 text-sm focus:outline-none focus:border-white/30 transition-all placeholder:text-gray-600"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Password"}),r.jsx("input",{type:"password",value:b,onChange:_=>g(_.target.value),placeholder:"••••••••",className:"w-full bg-white/[0.05] border border-white/10 rounded-2xl px-5 py-4 text-sm focus:outline-none focus:border-white/30 transition-all placeholder:text-gray-600"})]}),i==="setup"&&r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Confirm Password"}),r.jsx("input",{type:"password",value:C,onChange:_=>S(_.target.value),placeholder:"••••••••",className:"w-full bg-white/[0.05] border border-white/10 rounded-2xl px-5 py-4 text-sm focus:outline-none focus:border-white/30 transition-all placeholder:text-gray-600"})]})]}),r.jsx("button",{onClick:k,disabled:u,className:"shine-effect w-full bg-white text-black py-4 rounded-2xl font-bold text-[10px] tracking-[0.3em] uppercase hover:scale-[1.02] active:scale-[0.98] transition-all disabled:opacity-60 disabled:cursor-default",children:q}),d&&r.jsx("div",{className:"text-[9px] font-bold text-red-500 text-center uppercase tracking-widest",children:d})]})]})},Wh=({tasks:i,onNewTask:c,onEditTask:d,onDeleteTask:u,onExportTasks:f,onImportTasks:p})=>{const m=x.useRef(null),w=C=>{try{return C?`https://www.google.com/s2/favicons?domain=${new URL(C).hostname}&sz=64`:null}catch{return null}},b=()=>{m.current?.click()},g=C=>{const S=C.target.files?.[0];S&&p(S),C.target.value=""};return r.jsx("div",{className:"flex-1 overflow-hidden animate-in fade-in duration-500",children:r.jsxs("div",{className:"h-full flex flex-col px-12 py-12 max-w-7xl mx-auto space-y-12 w-full",children:[r.jsxs("div",{className:"flex items-end justify-between",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("p",{className:"text-[10px] font-bold text-blue-500 uppercase tracking-[0.4em]",children:"Status"}),r.jsx("h2",{className:"text-4xl font-bold tracking-tighter text-white",children:"Dashboard"})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("button",{onClick:f,className:"px-4 py-3 rounded-2xl border border-white/10 text-white text-[9px] font-bold uppercase tracking-[0.3em] hover:bg-white/5 transition-all",children:[r.jsx(dy,{className:"w-4 h-4 inline-block mr-2"}),"Export"]}),r.jsxs("button",{onClick:b,className:"px-4 py-3 rounded-2xl border border-white/10 text-white text-[9px] font-bold uppercase tracking-[0.3em] hover:bg-white/5 transition-all",children:[r.jsx(hv,{className:"w-4 h-4 inline-block mr-2"}),"Import"]}),r.jsx("button",{onClick:c,className:"shine-effect bg-white text-black px-8 py-3 rounded-2xl font-bold text-[10px] tracking-[0.2em] uppercase transition-all hover:scale-105 active:scale-95",children:"+ New Task"}),r.jsx("input",{ref:m,type:"file",accept:"application/json",className:"hidden",onChange:g})]})]}),r.jsxs("div",{className:"relative flex-1 min-h-0",children:[r.jsx("div",{className:"pointer-events-none absolute top-0 left-0 right-0 h-10 bg-gradient-to-b from-[#050505] via-[#050505]/50 to-transparent z-10"}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-6 overflow-y-auto custom-scrollbar pb-12 pr-4 h-full",children:i.map(C=>{const S=w(C.url);return r.jsxs("div",{className:"glass-card p-8 rounded-[40px] flex flex-col gap-6 group hover:-translate-y-1",children:[r.jsxs("div",{className:"flex justify-between items-start",children:[r.jsx("div",{className:"w-12 h-12 rounded-2xl bg-white/5 border border-white/10 flex items-center justify-center overflow-hidden",children:S?r.jsx("img",{src:S,alt:"",className:"w-6 h-6 object-contain",onError:k=>{k.target.style.display="none"}}):r.jsx(gy,{className:"w-5 h-5 text-gray-500"})}),r.jsx("div",{className:"px-3 py-1 rounded-full bg-white/5 text-[7px] font-bold uppercase tracking-widest text-gray-500",children:C.mode})]}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-bold text-white truncate",children:C.name||"Untitled"}),r.jsx("p",{className:"text-[10px] text-gray-600 font-mono truncate mt-1",children:C.url||"Target undefined"})]}),r.jsxs("div",{className:"flex gap-3 pt-4 border-t border-white/5",children:[r.jsx("button",{onClick:()=>d(C),className:"flex-1 py-2 rounded-xl bg-white text-black text-[9px] font-bold uppercase tracking-widest hover:scale-105 transition-all",children:"Edit Task"}),r.jsx("button",{onClick:()=>u(C.id),className:"w-10 h-10 rounded-xl bg-white/5 border border-white/10 flex items-center justify-center hover:bg-red-500/10 hover:text-red-500 transition-all",children:r.jsx(Bu,{className:"w-4 h-4"})})]})]},C.id)})})]}),i.length===0&&r.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center space-y-6 opacity-20",children:[r.jsx("div",{className:"w-20 h-20 border-2 border-dashed border-white rounded-[40px] flex items-center justify-center text-3xl",children:r.jsx(Gy,{className:"w-8 h-8 text-white/70"})}),r.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.3em]",children:"No Tasks Found"})]})]})})},jt=i=>i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),vv=new Set(["const","let","var","function","return","if","else","for","while","do","switch","case","break","continue","try","catch","finally","throw","new","class","extends","super","import","from","export","default","await","async","typeof","instanceof","in","of","this"]),Dp=(i,c)=>{const d=/\{\$(\w+)\}/g;let u="",f=0,p;const m=b=>!!c&&(b in c||b==="now"),w=b=>{if(b==="now")return!0;const g=c?c[b]:void 0;return g&&g.value!==""&&g.value!==void 0&&g.value!==null};for(;(p=d.exec(i))!==null;){p.index>f&&(u+=jt(i.substring(f,p.index)));const b=p[1],g=m(b),C=w(b);u+=`<span class="${g?C?"var-highlight-default":"var-highlight":"var-highlight-undefined"}">${jt(p[0])}</span>`,f=d.lastIndex}return u+=jt(i.substring(f)),u},bv=i=>{const c=/("(?:\\.|[^"\\])*")|(-?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b)|\b(true|false|null)\b/g;let d="",u=0,f;for(;(f=c.exec(i))!==null;){f.index>u&&(d+=jt(i.substring(u,f.index)));const p=f[0];if(f[1]){let m=!1,w=f.index+p.length;for(;w<i.length&&/\s/.test(i[w]);)w+=1;i[w]===":"&&(m=!0),d+=`<span class="${m?"code-token-key":"code-token-string"}">${jt(p)}</span>`}else f[2]?d+=`<span class="code-token-number">${jt(p)}</span>`:d+=`<span class="code-token-boolean">${jt(p)}</span>`;u=c.lastIndex}return d+=jt(i.substring(u)),d},wv=(i,c)=>{const d=/(\{\$\w+\})|(\/\/[^\n]*|\/\*[\s\S]*?\*\/)|("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|`(?:\\.|[^`\\])*`)|(\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b)|(\btrue\b|\bfalse\b|\bnull\b|\bundefined\b)|(\b[A-Za-z_]\w*\b)/g;let u="",f=0,p;for(;(p=d.exec(i))!==null;){p.index>f&&(u+=jt(i.substring(f,p.index)));const m=p[0];if(p[1])u+=Dp(m,c);else if(p[2])u+=`<span class="code-token-comment">${jt(m)}</span>`;else if(p[3])u+=`<span class="code-token-string">${jt(m)}</span>`;else if(p[4])u+=`<span class="code-token-number">${jt(m)}</span>`;else if(p[5])u+=`<span class="code-token-boolean">${jt(m)}</span>`;else if(p[6]){const w=vv.has(m)?"code-token-keyword":"code-token-identifier";u+=`<span class="${w}">${jt(m)}</span>`}else u+=jt(m);f=d.lastIndex}return u+=jt(i.substring(f)),u},Sv=i=>{const c=/<\/?[^>]+>/g;let d="",u=0,f;for(;(f=c.exec(i))!==null;){f.index>u&&(d+=jt(i.substring(u,f.index)));const p=f[0];let m=jt(p);m=m.replace(/^(&lt;\/?)([A-Za-z0-9-]+)/,'$1<span class="code-token-tag">$2</span>'),m=m.replace(/(\s)([A-Za-z0-9-:]+)(=)/g,'$1<span class="code-token-attr">$2</span>$3'),m=m.replace(/(&quot;.*?&quot;|&#39;.*?&#39;)/g,'<span class="code-token-string">$1</span>'),d+=`<span class="code-token-punct">${m}</span>`,u=c.lastIndex}return d+=jt(i.substring(u)),d},kp=(i,c,d)=>c==="javascript"?wv(i,d):c==="json"?bv(i):c==="html"?Sv(i):Dp(i,d),Dt=({value:i,onChange:c,placeholder:d,variables:u,className:f,syntax:p="plain"})=>{const m=x.useRef(null);return x.useEffect(()=>{if(m.current){const w=m.current.innerHTML,b=kp(i,p,u);if(w!==b){const g=window.getSelection();let C=0;if(g&&g.rangeCount>0){const S=g.getRangeAt(0),k=S.cloneRange();k.selectNodeContents(m.current),k.setEnd(S.endContainer,S.endOffset),C=k.toString().length}if(m.current.innerHTML=b,C>0){const S=document.createTreeWalker(m.current,NodeFilter.SHOW_TEXT);let k=0,q=S.nextNode();for(;q;){const _=q.textContent?.length||0;if(k+_>=C){const j=document.createRange();j.setStart(q,C-k),j.collapse(!0),g?.removeAllRanges(),g?.addRange(j);break}k+=_,q=S.nextNode()}}}}},[i,u]),r.jsx("div",{ref:m,contentEditable:!0,className:`rich-input-content w-full bg-transparent focus:outline-none text-white min-h-[1.5rem] ${f}`,"data-placeholder":d,onInput:w=>c(w.currentTarget.textContent||""),onBlur:w=>c(w.currentTarget.textContent||"")})},Tn=({value:i,onChange:c,language:d,placeholder:u,className:f,readOnly:p,variables:m})=>{const w=x.useRef(null),b=x.useRef(null),g=i||u||"",C=!i&&!!u,S=x.useMemo(()=>kp(g,d,m),[g,d,m]);return x.useEffect(()=>{const k=w.current,q=b.current;if(!k||!q)return;const _=()=>{q.scrollTop=k.scrollTop,q.scrollLeft=k.scrollLeft};return k.addEventListener("scroll",_),()=>{k.removeEventListener("scroll",_)}},[]),r.jsxs("div",{className:`code-editor ${f||""}`,onWheel:k=>{const q=w.current;q&&(q.scrollHeight<=q.clientHeight||(q.scrollTop+=k.deltaY,q.scrollLeft+=k.deltaX,q.focus(),k.preventDefault()))},children:[r.jsx("pre",{ref:b,className:`code-editor-pre ${C?"code-editor-placeholder":""}`,"aria-hidden":!0,dangerouslySetInnerHTML:{__html:S}}),r.jsx("textarea",{ref:w,value:i,onChange:k=>c?.(k.target.value),spellCheck:!1,wrap:"off",readOnly:p,className:`code-editor-textarea ${p?"code-editor-textarea-readonly":""}`,"aria-label":"Code editor",tabIndex:p?-1:0})]})},Tu=[{type:"click",label:"Click",description:"Click an element"},{type:"type",label:"Type",description:"Type text into a field"},{type:"hover",label:"Hover",description:"Hover an element"},{type:"press",label:"Press",description:"Press a key"},{type:"wait",label:"Wait",description:"Pause for seconds"},{type:"scroll",label:"Scroll",description:"Scroll the page or container"},{type:"javascript",label:"JavaScript",description:"Run custom JS"},{type:"csv",label:"CSV",description:"Parse CSV into rows"},{type:"merge",label:"Merge",description:"Merge inputs into a single output"},{type:"screenshot",label:"Screenshot",description:"Capture a screenshot"},{type:"if",label:"If",description:"Conditional block start"},{type:"else",label:"Else",description:"Conditional alternate path"},{type:"end",label:"End Block",description:"Close a block"},{type:"while",label:"While",description:"Loop while condition true"},{type:"repeat",label:"Repeat N",description:"Repeat block N times"},{type:"foreach",label:"For Each",description:"Loop through items"},{type:"set",label:"Set Variable",description:"Update variable value"},{type:"stop",label:"Stop Task",description:"Stop task with status"},{type:"on_error",label:"On Error",description:"Run on failure"},{type:"start",label:"Start Task",description:"Run another task"}],jv=({open:i,query:c,onQueryChange:d,onClose:u,onSelect:f})=>{const p=x.useRef(null),m=x.useMemo(()=>{const w=c.trim().toLowerCase();return w?Tu.filter(b=>b.label.toLowerCase().includes(w)||b.description.toLowerCase().includes(w)):Tu},[c]);return i?r.jsx("div",{className:"fixed inset-0 z-[190] flex items-center justify-center bg-black/70 backdrop-blur-sm px-6",onClick:u,children:r.jsxs("div",{className:"glass-card w-full max-w-xl rounded-[28px] border border-white/10 p-6 shadow-2xl",onClick:w=>w.stopPropagation(),children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-[9px] font-bold uppercase tracking-[0.4em] text-gray-500",children:"Add Block"}),r.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Search actions and control flow blocks."})]}),r.jsx("button",{onClick:u,className:"p-2 rounded-xl border border-white/10 text-white/70 hover:text-white hover:bg-white/5 transition-all","aria-label":"Close",children:r.jsx(Bu,{className:"w-4 h-4"})})]}),r.jsx("input",{ref:w=>{p.current=w,w&&w.focus()},value:c,onChange:w=>d(w.target.value),placeholder:"Type to filter (e.g., if, click, loop)",className:"w-full rounded-xl bg-black/40 border border-white/10 px-4 py-3 text-sm text-white placeholder:text-gray-600 focus:outline-none focus:border-white/30"}),r.jsxs("div",{className:"mt-4 max-h-[320px] overflow-y-auto custom-scrollbar space-y-2",children:[m.map(w=>r.jsxs("button",{onClick:()=>f(w.type),className:"w-full text-left px-4 py-3 rounded-xl border border-white/5 bg-white/[0.02] hover:bg-white/[0.06] transition-all",children:[r.jsx("div",{className:"text-[10px] font-bold uppercase tracking-widest text-white",children:w.label}),r.jsx("div",{className:"text-[9px] text-gray-500 mt-1",children:w.description})]},w.type)),m.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No matches."})]})]})}):null},Nv=({task:i,onChange:c,onCopy:d,copiedId:u})=>{const[f,p]=x.useState(()=>JSON.stringify(i,null,2)),[m,w]=x.useState(!1),b=g=>{const C=i,S={...C,...g&&typeof g=="object"?g:{}};return(!S.name||typeof S.name!="string")&&(S.name=C.name||"Task"),(!S.mode||!["scrape","agent","headful"].includes(S.mode))&&(S.mode=C.mode||"agent"),typeof S.wait!="number"&&(S.wait=typeof C.wait=="number"?C.wait:3),S.stealth||(S.stealth=C.stealth),(!S.variables||Array.isArray(S.variables))&&(S.variables=C.variables||{}),Array.isArray(S.actions)||(S.actions=C.actions||[]),S.extractionFormat||(S.extractionFormat=C.extractionFormat||"json"),S.includeShadowDom===void 0&&(S.includeShadowDom=C.includeShadowDom??!0),C.id&&S.id!==C.id&&(S.id=C.id),delete S.versions,delete S.last_opened,S};return x.useEffect(()=>{m||p(JSON.stringify(i,null,2))},[i,m]),r.jsxs("div",{className:"h-full flex flex-col min-h-0",children:[r.jsxs("div",{className:"flex items-center justify-between mb-3",children:[r.jsx("span",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest",children:"Protocol JSON"}),r.jsxs("button",{onClick:()=>{d(JSON.stringify(i,null,2),"json")},className:`px-4 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 ${u==="json"?"bg-green-500/10 border-green-500/20 text-green-400":"bg-white/5 border-white/10 text-white hover:bg-white/10"}`,children:[u==="json"?r.jsx(Ai,{className:"w-3 h-3"}):r.jsx(Ti,{className:"w-3 h-3"}),u==="json"?"Copied":"Copy"]})]}),r.jsx(Tn,{value:f,onChange:g=>{p(g);try{const C=JSON.parse(g),S=b(C);c(S),w(!1)}catch{w(!0)}},language:"json",className:"flex-1 min-h-0"})]})};function _u(){return _u=Object.assign?Object.assign.bind():function(i){for(var c=1;c<arguments.length;c++){var d=arguments[c];for(var u in d)({}).hasOwnProperty.call(d,u)&&(i[u]=d[u])}return i},_u.apply(null,arguments)}function Fh(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Ru(i,c){return Ru=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,u){return d.__proto__=u,d},Ru(i,c)}function Ev(i,c){i.prototype=Object.create(c.prototype),i.prototype.constructor=i,Ru(i,c)}var Ih=Number.isNaN||function(c){return typeof c=="number"&&c!==c};function Cv(i,c){return!!(i===c||Ih(i)&&Ih(c))}function Av(i,c){if(i.length!==c.length)return!1;for(var d=0;d<i.length;d++)if(!Cv(i[d],c[d]))return!1;return!0}function wu(i,c){c===void 0&&(c=Av);var d,u=[],f,p=!1;function m(){for(var w=[],b=0;b<arguments.length;b++)w[b]=arguments[b];return p&&d===this&&c(w,u)||(f=i.apply(this,w),p=!0,d=this,u=w),f}return m}var Tv=typeof performance=="object"&&typeof performance.now=="function",Ph=Tv?function(){return performance.now()}:function(){return Date.now()};function ep(i){cancelAnimationFrame(i.id)}function _v(i,c){var d=Ph();function u(){Ph()-d>=c?i.call(null):f.id=requestAnimationFrame(u)}var f={id:requestAnimationFrame(u)};return f}var Su=-1;function tp(i){if(i===void 0&&(i=!1),Su===-1||i){var c=document.createElement("div"),d=c.style;d.width="50px",d.height="50px",d.overflow="scroll",document.body.appendChild(c),Su=c.offsetWidth-c.clientWidth,document.body.removeChild(c)}return Su}var An=null;function ap(i){if(i===void 0&&(i=!1),An===null||i){var c=document.createElement("div"),d=c.style;d.width="50px",d.height="50px",d.overflow="scroll",d.direction="rtl";var u=document.createElement("div"),f=u.style;return f.width="100px",f.height="100px",c.appendChild(u),document.body.appendChild(c),c.scrollLeft>0?An="positive-descending":(c.scrollLeft=1,c.scrollLeft===0?An="negative":An="positive-ascending"),document.body.removeChild(c),An}return An}var Rv=150,Mv=function(c,d){return c};function zv(i){var c,d=i.getItemOffset,u=i.getEstimatedTotalSize,f=i.getItemSize,p=i.getOffsetForIndexAndAlignment,m=i.getStartIndexForOffset,w=i.getStopIndexForStartIndex,b=i.initInstanceProps,g=i.shouldResetStyleCacheOnItemSizeChange,C=i.validateProps;return c=(function(S){Ev(k,S);function k(_){var j;return j=S.call(this,_)||this,j._instanceProps=b(j.props,Fh(j)),j._outerRef=void 0,j._resetIsScrollingTimeoutId=null,j.state={instance:Fh(j),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof j.props.initialScrollOffset=="number"?j.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},j._callOnItemsRendered=void 0,j._callOnItemsRendered=wu(function(O,U,Y,$){return j.props.onItemsRendered({overscanStartIndex:O,overscanStopIndex:U,visibleStartIndex:Y,visibleStopIndex:$})}),j._callOnScroll=void 0,j._callOnScroll=wu(function(O,U,Y){return j.props.onScroll({scrollDirection:O,scrollOffset:U,scrollUpdateWasRequested:Y})}),j._getItemStyle=void 0,j._getItemStyle=function(O){var U=j.props,Y=U.direction,$=U.itemSize,ne=U.layout,ee=j._getItemStyleCache(g&&$,g&&ne,g&&Y),te;if(ee.hasOwnProperty(O))te=ee[O];else{var P=d(j.props,O,j._instanceProps),fe=f(j.props,O,j._instanceProps),ie=Y==="horizontal"||ne==="horizontal",le=Y==="rtl",Ye=ie?P:0;ee[O]=te={position:"absolute",left:le?void 0:Ye,right:le?Ye:void 0,top:ie?0:P,height:ie?"100%":fe,width:ie?fe:"100%"}}return te},j._getItemStyleCache=void 0,j._getItemStyleCache=wu(function(O,U,Y){return{}}),j._onScrollHorizontal=function(O){var U=O.currentTarget,Y=U.clientWidth,$=U.scrollLeft,ne=U.scrollWidth;j.setState(function(ee){if(ee.scrollOffset===$)return null;var te=j.props.direction,P=$;if(te==="rtl")switch(ap()){case"negative":P=-$;break;case"positive-descending":P=ne-Y-$;break}return P=Math.max(0,Math.min(P,ne-Y)),{isScrolling:!0,scrollDirection:ee.scrollOffset<P?"forward":"backward",scrollOffset:P,scrollUpdateWasRequested:!1}},j._resetIsScrollingDebounced)},j._onScrollVertical=function(O){var U=O.currentTarget,Y=U.clientHeight,$=U.scrollHeight,ne=U.scrollTop;j.setState(function(ee){if(ee.scrollOffset===ne)return null;var te=Math.max(0,Math.min(ne,$-Y));return{isScrolling:!0,scrollDirection:ee.scrollOffset<te?"forward":"backward",scrollOffset:te,scrollUpdateWasRequested:!1}},j._resetIsScrollingDebounced)},j._outerRefSetter=function(O){var U=j.props.outerRef;j._outerRef=O,typeof U=="function"?U(O):U!=null&&typeof U=="object"&&U.hasOwnProperty("current")&&(U.current=O)},j._resetIsScrollingDebounced=function(){j._resetIsScrollingTimeoutId!==null&&ep(j._resetIsScrollingTimeoutId),j._resetIsScrollingTimeoutId=_v(j._resetIsScrolling,Rv)},j._resetIsScrolling=function(){j._resetIsScrollingTimeoutId=null,j.setState({isScrolling:!1},function(){j._getItemStyleCache(-1,null)})},j}k.getDerivedStateFromProps=function(j,O){return Ov(j,O),C(j),null};var q=k.prototype;return q.scrollTo=function(j){j=Math.max(0,j),this.setState(function(O){return O.scrollOffset===j?null:{scrollDirection:O.scrollOffset<j?"forward":"backward",scrollOffset:j,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},q.scrollToItem=function(j,O){O===void 0&&(O="auto");var U=this.props,Y=U.itemCount,$=U.layout,ne=this.state.scrollOffset;j=Math.max(0,Math.min(j,Y-1));var ee=0;if(this._outerRef){var te=this._outerRef;$==="vertical"?ee=te.scrollWidth>te.clientWidth?tp():0:ee=te.scrollHeight>te.clientHeight?tp():0}this.scrollTo(p(this.props,j,O,ne,this._instanceProps,ee))},q.componentDidMount=function(){var j=this.props,O=j.direction,U=j.initialScrollOffset,Y=j.layout;if(typeof U=="number"&&this._outerRef!=null){var $=this._outerRef;O==="horizontal"||Y==="horizontal"?$.scrollLeft=U:$.scrollTop=U}this._callPropsCallbacks()},q.componentDidUpdate=function(){var j=this.props,O=j.direction,U=j.layout,Y=this.state,$=Y.scrollOffset,ne=Y.scrollUpdateWasRequested;if(ne&&this._outerRef!=null){var ee=this._outerRef;if(O==="horizontal"||U==="horizontal")if(O==="rtl")switch(ap()){case"negative":ee.scrollLeft=-$;break;case"positive-ascending":ee.scrollLeft=$;break;default:var te=ee.clientWidth,P=ee.scrollWidth;ee.scrollLeft=P-te-$;break}else ee.scrollLeft=$;else ee.scrollTop=$}this._callPropsCallbacks()},q.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&ep(this._resetIsScrollingTimeoutId)},q.render=function(){var j=this.props,O=j.children,U=j.className,Y=j.direction,$=j.height,ne=j.innerRef,ee=j.innerElementType,te=j.innerTagName,P=j.itemCount,fe=j.itemData,ie=j.itemKey,le=ie===void 0?Mv:ie,Ye=j.layout,ye=j.outerElementType,nt=j.outerTagName,Te=j.style,Fe=j.useIsScrolling,D=j.width,H=this.state.isScrolling,J=Y==="horizontal"||Ye==="horizontal",de=J?this._onScrollHorizontal:this._onScrollVertical,me=this._getRangeToRender(),v=me[0],B=me[1],I=[];if(P>0)for(var Z=v;Z<=B;Z++)I.push(x.createElement(O,{data:fe,key:le(Z,fe),index:Z,isScrolling:Fe?H:void 0,style:this._getItemStyle(Z)}));var ce=u(this.props,this._instanceProps);return x.createElement(ye||nt||"div",{className:U,onScroll:de,ref:this._outerRefSetter,style:_u({position:"relative",height:$,width:D,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:Y},Te)},x.createElement(ee||te||"div",{children:I,ref:ne,style:{height:J?"100%":ce,pointerEvents:H?"none":void 0,width:J?ce:"100%"}}))},q._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var j=this.props.itemCount;if(j>0){var O=this._getRangeToRender(),U=O[0],Y=O[1],$=O[2],ne=O[3];this._callOnItemsRendered(U,Y,$,ne)}}if(typeof this.props.onScroll=="function"){var ee=this.state,te=ee.scrollDirection,P=ee.scrollOffset,fe=ee.scrollUpdateWasRequested;this._callOnScroll(te,P,fe)}},q._getRangeToRender=function(){var j=this.props,O=j.itemCount,U=j.overscanCount,Y=this.state,$=Y.isScrolling,ne=Y.scrollDirection,ee=Y.scrollOffset;if(O===0)return[0,0,0,0];var te=m(this.props,ee,this._instanceProps),P=w(this.props,te,ee,this._instanceProps),fe=!$||ne==="backward"?Math.max(1,U):1,ie=!$||ne==="forward"?Math.max(1,U):1;return[Math.max(0,te-fe),Math.max(0,Math.min(O-1,P+ie)),te,P]},k})(x.PureComponent),c.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},c}var Ov=function(c,d){c.children,c.direction,c.height,c.layout,c.innerTagName,c.outerTagName,c.width,d.instance},lr=zv({getItemOffset:function(c,d){var u=c.itemSize;return d*u},getItemSize:function(c,d){var u=c.itemSize;return u},getEstimatedTotalSize:function(c){var d=c.itemCount,u=c.itemSize;return u*d},getOffsetForIndexAndAlignment:function(c,d,u,f,p,m){var w=c.direction,b=c.height,g=c.itemCount,C=c.itemSize,S=c.layout,k=c.width,q=w==="horizontal"||S==="horizontal",_=q?k:b,j=Math.max(0,g*C-_),O=Math.min(j,d*C),U=Math.max(0,d*C-_+C+m);switch(u==="smart"&&(f>=U-_&&f<=O+_?u="auto":u="center"),u){case"start":return O;case"end":return U;case"center":{var Y=Math.round(U+(O-U)/2);return Y<Math.ceil(_/2)?0:Y>j+Math.floor(_/2)?j:Y}default:return f>=U&&f<=O?f:f<U?U:O}},getStartIndexForOffset:function(c,d){var u=c.itemCount,f=c.itemSize;return Math.max(0,Math.min(u-1,Math.floor(d/f)))},getStopIndexForStartIndex:function(c,d,u){var f=c.direction,p=c.height,m=c.itemCount,w=c.itemSize,b=c.layout,g=c.width,C=f==="horizontal"||b==="horizontal",S=d*w,k=C?g:p,q=Math.ceil((k+u-S)/w);return Math.max(0,Math.min(m-1,d+q-1))},initInstanceProps:function(c){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(c){c.itemSize}});const Up=({capture:i,onDelete:c})=>r.jsxs("div",{className:"rounded-2xl border border-white/10 bg-white/[0.02] overflow-hidden",children:[r.jsxs("div",{className:"p-3 border-b border-white/10 flex items-center justify-between",children:[r.jsx("div",{className:"text-[9px] font-bold text-white uppercase tracking-widest",children:i.type==="recording"?"Recording":"Screenshot"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("a",{href:i.url,target:"_blank",rel:"noreferrer",className:"text-[9px] font-bold uppercase tracking-widest text-blue-300 hover:text-blue-200",children:"Open"}),c&&r.jsx("button",{onClick:()=>c(i.name),className:"text-[9px] font-bold uppercase tracking-widest text-red-300 hover:text-red-200",children:"Delete"})]})]}),r.jsx("div",{className:"bg-black",children:i.type==="recording"?r.jsx("video",{src:i.url,controls:!0,className:"w-full h-64 object-contain bg-black"}):r.jsx("img",{src:i.url,className:"w-full h-64 object-contain bg-black"})}),r.jsx("div",{className:"p-3 text-[9px] text-gray-500 uppercase tracking-widest",children:i.name})]}),Qs=6e4,ju=200,lp=200,Ei=1e6,Nu=2e3,Eu=2e3,Dv=360,Lp=12,Zs=Dv+Lp,kv=4,Uv=4,Lv=({index:i,style:c,data:d})=>{const u=d[i];return u?r.jsx("div",{style:{...c,paddingBottom:Lp},children:r.jsx(Up,{capture:u})}):null},Hv=i=>`${(i/(1024*1024)).toFixed(2)} MB`,Bv=i=>{if(typeof i=="boolean")return i;if(typeof i=="string"){const c=i.trim().toLowerCase();if(c==="true")return!0;if(c==="false")return!1}return null},$s=(i,c)=>i.length<=c?{text:i,truncated:!1}:{text:i.slice(0,c),truncated:!0},qv=i=>!i||i.data===void 0||i.data===null?{reason:"No data to copy."}:{raw:i.data},Ks=(i,c,d)=>i.length<=c?i:(d.push(`first ${c.toLocaleString()} chars`),i.slice(0,c)),Vv=i=>{const c=[];if(typeof i=="string")return{text:Ks(i,Ei,c),truncated:c.length>0,reason:c.join(", ")};if(Array.isArray(i)){let u=i;i.length>Nu&&(u=i.slice(0,Nu),c.push(`first ${Nu.toLocaleString()} items`));let f="";try{f=JSON.stringify(u,null,2)}catch{f=String(u)}return f=Ks(f,Ei,c),{text:f,truncated:c.length>0,reason:c.join(", ")}}if(i&&typeof i=="object"){let u=i;const f=Object.keys(i);f.length>Eu&&(u=f.slice(0,Eu).reduce((m,w)=>(m[w]=i[w],m),{}),c.push(`first ${Eu.toLocaleString()} keys`));let p="";try{p=JSON.stringify(u,null,2)}catch{p=String(u)}return p=Ks(p,Ei,c),{text:p,truncated:c.length>0,reason:c.join(", ")}}return{text:Ks(String(i),Ei,c),truncated:c.length>0,reason:c.join(", ")}},Yv=i=>{if(typeof i=="string")return i;try{return JSON.stringify(i,null,2)}catch{return String(i)}},np=i=>{if(!i||i.data===void 0||i.data===null||i.data==="")return{text:"",truncated:!1,language:"plain"};const c=i.data;if(typeof c=="string"){const u=c.trim(),f=u.startsWith("<")&&u.includes(">")?"html":u.startsWith("{")||u.startsWith("[")?"json":"plain",p=$s(c,Qs);return{text:p.text,truncated:p.truncated,language:f}}if(Array.isArray(c)){const u=c.length>ju?c.slice(0,ju):c,f=JSON.stringify(u,null,2),p=$s(f,Qs);return{text:p.text,truncated:p.truncated||c.length>ju,language:"json"}}if(c&&typeof c=="object"){const u=Object.keys(c);let f=c,p=!1;u.length>lp&&(p=!0,f=u.slice(0,lp).reduce((b,g)=>(b[g]=c[g],b),{}));const m=JSON.stringify(f,null,2),w=$s(m,Qs);return{text:w.text,truncated:w.truncated||p,language:"json"}}const d=$s(String(c),Qs);return{text:d.text,truncated:d.truncated,language:"plain"}},Gv=i=>{const c=[];let d=[],u="",f=!1;for(let p=0;p<i.length;p+=1){const m=i[p];f?m==='"'?i[p+1]==='"'?(u+='"',p+=1):f=!1:u+=m:m==='"'?f=!0:m===","?(d.push(u),u=""):m===`
12
+ `?(d.push(u),c.push(d),d=[],u=""):m==="\r"||(u+=m)}return d.push(u),(d.length>1||d[0]!==""||c.length>0)&&c.push(d),c},Xv=i=>{if(!i)return null;if(typeof i=="string"){const c=i.trim();if(!c.includes(",")||!c.includes(`
13
+ `))return null;const d=Gv(c).filter(p=>p.some(m=>String(m||"").trim()!==""));if(d.length<2)return null;const u=d[0].map((p,m)=>String(p||"").trim()||`column_${m+1}`),f=d.slice(1);return u.length<2?null:{headers:u,rows:f}}if(Array.isArray(i)){if(i.length===0)return null;if(i.every(c=>c&&typeof c=="object"&&!Array.isArray(c))){const c=[];if(i.forEach(u=>{Object.keys(u).forEach(f=>{c.includes(f)||c.push(f)})}),c.length===0)return null;const d=i.map(u=>c.map(f=>u[f]??""));return{headers:c,rows:d}}if(i.every(c=>Array.isArray(c))){const c=Math.max(...i.map(u=>u.length));return{headers:Array.from({length:c},(u,f)=>`column_${f+1}`),rows:i}}return null}if(i&&typeof i=="object"){const c=Object.keys(i);return c.length===0?null:{headers:c,rows:[c.map(d=>i[d]??"")]}}return null},Qv=(i,c)=>i==null?null:typeof i=="string"?c?{content:i,mime:"text/csv",ext:"csv"}:{content:i,mime:"application/json",ext:"json"}:{content:JSON.stringify(i,null,2),mime:"application/json",ext:"json"},Zv=(i,c,d)=>{const u=new Blob([c],{type:d}),f=URL.createObjectURL(u),p=document.createElement("a");p.href=f,p.download=i,document.body.appendChild(p),p.click(),p.remove(),URL.revokeObjectURL(f)},Hp=({results:i,pinnedResults:c,isExecuting:d,isHeadful:u,runId:f,onConfirm:p,onNotify:m,onPin:w,onUnpin:b,fullWidth:g})=>{const[C,S]=x.useState(null),[k,q]=x.useState("raw"),[_,j]=x.useState(()=>c&&!i?"pinned":"latest"),[O,U]=x.useState("checking"),[Y,$]=x.useState(!1),[ne,ee]=x.useState(!1),[te,P]=x.useState([]),fe=x.useRef(null),ie=_==="pinned"&&c?c:i,le=Xv(ie?.data),Ye=ie&&ie.data!==void 0&&ie.data!==null&&ie.data!==""?np(ie):null,ye=ie?.screenshotUrl?`${ie.screenshotUrl}${_==="latest"?`?t=${Date.now()}`:""}`:null,nt=H=>{const J=Bv(H);return J!==null?J?r.jsx(Ai,{className:"w-3 h-3 text-blue-400"}):"":H??""},Te=async()=>{ee(!0);try{const H=f?`?runId=${encodeURIComponent(f)}`:"",J=await fetch(`/api/data/captures${H}`),de=J.ok?await J.json():{captures:[]};P(Array.isArray(de.captures)?de.captures:[])}catch{P([])}finally{ee(!1)}};x.useEffect(()=>{q(le?"table":"raw")},[ie]),x.useEffect(()=>{if(i){j("latest");return}c&&j("pinned")},[i,c]),x.useEffect(()=>{!c&&_==="pinned"&&j("latest")},[c,_]),x.useEffect(()=>{if(!u||_!=="latest")return;let H=!1;return(async()=>{try{const de=await fetch("/novnc/core/rfb.js",{method:"HEAD",cache:"no-store"});H||U(de.ok?"novnc":"native")}catch{H||U("native")}})(),()=>{H=!0}},[u,_]);const Fe=async(H,J,de)=>{if(!H){m("Nothing to copy.","error");return}let me=H;try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(me);else{const v=document.createElement("textarea");v.value=me,v.style.position="fixed",v.style.left="-999999px",v.style.top="-999999px",document.body.appendChild(v),v.focus(),v.select(),document.execCommand("copy"),v.remove()}S(J),setTimeout(()=>S(null),2e3),de?.truncatedNotice?m("Copied truncated data.","success"):me.length!==H.length&&m("Copied a truncated preview.","success")}catch(v){console.error("Copy failed:",v),m("Copy failed.","error")}};if(u&&_==="latest"){const{origin:H,hostname:J}=window.location,de=`${H}/novnc.html?host=${J}&path=websockify`,me=()=>{const v=fe.current;if(v){if(document.fullscreenElement){document.exitFullscreen().catch(()=>{});return}v.requestFullscreen?.().catch(()=>{})}};return O==="native"?r.jsx("div",{className:"glass-card rounded-[32px] overflow-hidden h-[80vh] w-full relative flex items-center justify-center",children:r.jsx("div",{className:"text-[10px] font-bold uppercase tracking-widest text-gray-500",children:"Headful session running in a native browser window."})}):O==="checking"?r.jsx("div",{className:"glass-card rounded-[32px] overflow-hidden h-[80vh] w-full relative flex items-center justify-center",children:r.jsx("div",{className:"text-[10px] font-bold uppercase tracking-widest text-gray-500",children:"Checking headful viewer..."})}):r.jsxs("div",{ref:fe,className:"glass-card rounded-[32px] overflow-hidden h-[80vh] w-full relative",children:[r.jsx("button",{type:"button",onClick:me,className:"absolute top-4 right-4 z-10 px-3 py-2 rounded-xl border border-white/20 bg-black/40 text-[9px] font-bold uppercase tracking-widest text-white/80 hover:bg-black/60 transition-all",title:"Toggle fullscreen",children:"Fullscreen"}),r.jsx("iframe",{src:de,className:"absolute inset-0 w-full h-full",title:"Headful Browser"})]})}if(!ie&&!(d&&_==="latest"))return r.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center space-y-4 opacity-20",children:[r.jsx("div",{className:"w-16 h-16 border border-white/10 rounded-full flex items-center justify-center",children:r.jsx(sv,{className:"w-6 h-6 text-white"})}),r.jsx("p",{className:"text-[9px] font-bold uppercase tracking-[0.3em]",children:"Ready"})]});const D=g?"space-y-12 relative z-10 w-full":"space-y-12 relative z-10 max-w-5xl mx-auto";return r.jsxs("div",{className:D,children:[r.jsxs("div",{className:"flex items-end justify-between border-b border-white/5 pb-10",children:[r.jsxs("div",{className:"space-y-4",children:[r.jsx("p",{className:"text-[9px] font-bold text-gray-500 uppercase tracking-[0.3em]",children:"Preview"}),r.jsx("h2",{className:"text-xl font-mono text-white truncate max-w-xl tracking-tight italic",children:ie?.finalUrl||ie?.url||""})]}),r.jsx("div",{className:`px-4 py-2 rounded-xl text-[9px] font-bold uppercase tracking-[0.2em] ${_==="pinned"?"bg-amber-500/10 text-amber-300":d?"bg-blue-500/10 text-blue-400 animate-pulse":"bg-green-500/10 text-green-400"}`,children:_==="pinned"?"Pinned":d?"Running":"Finished"})]}),r.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-8",children:[r.jsxs("div",{className:"glass-card rounded-[32px] overflow-hidden flex flex-col min-h-[400px]",children:[r.jsxs("div",{className:"p-6 border-b border-white/5 flex items-center justify-between text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:[r.jsx("span",{children:"Screenshot"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-white/20",children:ie?.timestamp||"--:--:--"}),r.jsx("button",{type:"button",onClick:()=>{$(!0),Te()},className:"px-3 py-2 rounded-xl border border-white/10 text-[8px] font-bold uppercase tracking-widest text-white/70 hover:text-white hover:bg-white/5 transition-all",children:"View All Captures"})]})]}),r.jsx("div",{className:"relative bg-black flex-1 flex items-center justify-center overflow-hidden",children:ye?r.jsx("img",{src:ye,className:"absolute inset-0 w-full h-full object-contain transition-opacity duration-1000"}):r.jsx("div",{className:"text-[8px] font-bold text-white/5 uppercase tracking-widest",children:"Waiting for Frame..."})})]}),r.jsxs("div",{className:"glass-card rounded-[32px] p-8 flex flex-col h-[400px]",children:[r.jsx("span",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest mb-6 border-b border-white/5 pb-4",children:"Activity Log"}),r.jsxs("div",{className:"flex-1 font-mono text-[10px] text-gray-400 space-y-2 overflow-y-auto custom-scrollbar pr-2",children:[ie?.logs?.map((H,J)=>r.jsxs("div",{className:"flex gap-2",children:[r.jsx("span",{className:"text-white/10 shrink-0",children:"›"})," ",r.jsx("span",{children:H})]},J)),d&&_==="latest"&&(!ie?.logs||ie?.logs.length===0)&&r.jsx("div",{className:"animate-pulse",children:"Connecting to kernel..."})]})]})]}),Y&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/70 flex items-center justify-center p-6",children:r.jsxs("div",{className:"glass-card rounded-[32px] w-full max-w-5xl max-h-[85vh] overflow-hidden flex flex-col",children:[r.jsxs("div",{className:"p-6 border-b border-white/10 flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("div",{className:"text-[9px] font-bold text-gray-500 uppercase tracking-widest",children:"Captures"}),r.jsx("div",{className:"text-sm font-bold text-white",children:"Recordings and Screenshots"})]}),r.jsx("button",{onClick:()=>$(!1),className:"px-3 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all bg-white/5 border-white/10 text-white hover:bg-white/10",children:"Close"})]}),r.jsxs("div",{className:"p-6 overflow-y-auto custom-scrollbar",children:[ne&&r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading captures..."}),!ne&&te.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No captures found."}),!ne&&te.length>0&&r.jsx(lr,{height:Math.min(Math.max(Zs,te.length*Zs),Zs*kv),width:"100%",itemCount:te.length,itemSize:Zs,overscanCount:Uv,itemData:te,children:Lv})]})]})}),r.jsxs("div",{className:"glass-card rounded-[32px] p-8 flex flex-col relative",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-white/5 pb-4 mb-6",children:[r.jsx("span",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:"Data"}),r.jsxs("div",{className:"flex items-center gap-2",children:[c&&r.jsx("div",{className:"flex bg-white/5 rounded-lg p-0.5 border border-white/10",children:["latest","pinned"].map(H=>r.jsx("button",{onClick:()=>j(H),className:`px-3 py-1 rounded text-[8px] font-bold uppercase tracking-widest transition-all ${_===H?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:H},H))}),le&&r.jsx("div",{className:"flex bg-white/5 rounded-lg p-0.5 border border-white/10",children:["table","raw"].map(H=>r.jsx("button",{onClick:()=>q(H),className:`px-3 py-1 rounded text-[8px] font-bold uppercase tracking-widest transition-all ${k===H?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:H},H))}),_==="pinned"?r.jsx("button",{onClick:()=>{b?.(),j("latest")},className:"px-3 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 bg-white/5 border-white/10 text-amber-200 hover:bg-white/10",title:"Unpin data",children:"Unpin"}):r.jsx("button",{onClick:()=>{if(!ie){m("No data to pin.","error");return}w?.(ie),j("pinned")},className:"px-3 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 bg-white/5 border-white/10 text-white hover:bg-white/10",title:"Pin data",children:c?"Update Pin":"Pin"}),r.jsx("button",{onClick:()=>{const H=Qv(ie?.data,le);if(!H){m("No data to export.","error");return}const J=`doppelganger-data-${new Date().toISOString().replace(/[:.]/g,"-")}.${H.ext}`;Zv(J,H.content,H.mime),m(`Exported ${H.ext.toUpperCase()}.`,"success")},className:"px-3 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 bg-white/5 border-white/10 text-white hover:bg-white/10",title:"Export extracted data",children:"Export"}),r.jsxs("button",{onClick:async()=>{const H=qv(ie);if(H.reason){m(H.reason||"Data too large to copy safely.","error");return}const J=np(ie);let me=Yv(H.raw),v=!1;J.truncated&&(await p({message:"Preview is truncated for performance.",confirmLabel:"Copy full",cancelLabel:"Copy preview"})||(me=J.text||"",v=!0)),me.length>Ei&&(await p({message:`Copying ${Hv(me.length)} may freeze your browser.`,confirmLabel:"Copy full",cancelLabel:v?"Copy preview":"Copy truncated"})||(me=Vv(H.raw).text,v=!0)),Fe(me,"data",{skipSizeConfirm:!0,truncatedNotice:v})},className:`px-3 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 ${C==="data"?"bg-green-500/10 border-green-500/20 text-green-400":"bg-white/5 border-white/10 text-white hover:bg-white/10"}`,title:"Copy extracted data",children:[C==="data"?r.jsx(Ai,{className:"w-3 h-3"}):r.jsx(Ti,{className:"w-3 h-3"}),C==="data"?"Copied":"Copy"]})]})]}),Ye?.truncated&&r.jsx("button",{type:"button",onClick:()=>m("Preview truncated for performance.","error"),className:"absolute top-5 right-5 h-2.5 w-2.5 rounded-full bg-amber-400 shadow-[0_0_8px_rgba(251,191,36,0.6)]",title:"Preview truncated"}),r.jsx("div",{className:"max-h-[70vh] overflow-y-auto custom-scrollbar pr-2 relative",children:d&&_==="latest"&&(!ie||ie.data===void 0)?r.jsx("pre",{className:"font-mono text-[10px] text-blue-300/60 whitespace-pre-wrap leading-relaxed",children:"Buffering data stream..."}):!ie||ie.data===void 0||ie.data===null||ie.data===""?r.jsx("pre",{className:"font-mono text-[10px] text-blue-300/60 whitespace-pre-wrap leading-relaxed",children:"No data available."}):r.jsx("div",{children:le&&k==="table"?r.jsx("div",{className:"overflow-auto custom-scrollbar rounded-2xl border border-white/10",children:r.jsxs("table",{className:"min-w-full table-auto text-[10px] text-left text-white/80 font-mono",children:[r.jsx("thead",{className:"bg-white/5 text-[9px] uppercase tracking-widest text-white/50",children:r.jsx("tr",{children:le.headers.map(H=>r.jsx("th",{className:"px-3 py-2 border-b border-white/10 whitespace-nowrap",children:H},H))})}),r.jsx("tbody",{children:le.rows.map((H,J)=>r.jsx("tr",{className:"odd:bg-white/[0.02]",children:le.headers.map((de,me)=>r.jsx("td",{className:"px-3 py-2 border-b border-white/5 align-top whitespace-normal break-words",children:nt(H[me])},`${J}-${me}`))},J))})]})}):r.jsx(Tn,{readOnly:!0,value:Ye?.text||"",language:Ye?.language||"plain"})})})]})]})},$v=[{value:"Control",label:"Ctrl"},{value:"Shift",label:"Shift"},{value:"Alt",label:"Alt"},{value:"Meta",label:"Meta"}],Kv=["Enter","Tab","Escape","Space","Backspace","Delete","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown","F1","F2","F3","F4","F5"].concat([...Array(10)].map((i,c)=>`${c}`)).concat(Array.from({length:26},(i,c)=>String.fromCharCode(65+c))),Jv=[{value:"replace",label:"Replace Text"},{value:"append",label:"Append Text"}],Wv=i=>{if(!i)return{modifiers:[],baseKey:""};const c=i.split("+"),d=c.pop()||"";return{modifiers:c,baseKey:d}},ip=(i,c)=>[...i.filter(Boolean),c].filter(Boolean).join("+"),Fv=({name:i,def:c,updateVariable:d,removeVariable:u})=>{const[f,p]=x.useState(i);return x.useEffect(()=>{p(i)},[i]),r.jsxs("div",{className:"flex gap-2 items-center",children:[r.jsx("input",{type:"text",value:f,onChange:m=>p(m.target.value),onBlur:()=>{f!==i&&d(i,f,c.type,c.value)},className:"var-name flex-1 bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"}),r.jsxs("select",{value:c.type,onChange:m=>d(i,i,m.target.value,c.value),className:"custom-select var-type bg-white/[0.05] border border-white/10 rounded-xl px-2 py-2 text-[8px] font-bold uppercase text-white/40",children:[r.jsx("option",{value:"string",children:"STR"}),r.jsx("option",{value:"number",children:"NUM"}),r.jsx("option",{value:"boolean",children:"BOOL"})]}),r.jsx("div",{className:"flex-1",children:c.type==="boolean"?r.jsxs("select",{value:String(c.value),onChange:m=>d(i,i,c.type,m.target.value),className:"custom-select w-full bg-white/[0.05] border border-white/10 rounded-xl px-3 py-2 text-[10px] text-white",children:[r.jsx("option",{value:"true",children:"True"}),r.jsx("option",{value:"false",children:"False"})]}):r.jsx("input",{type:c.type==="number"?"number":"text",value:c.value,onChange:m=>d(i,i,c.type,m.target.value),className:"w-full bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"})}),r.jsx("button",{onClick:()=>u(i),className:"p-2 text-red-500 hover:text-red-400",children:"×"})]})},Bp=({currentTask:i,setCurrentTask:c,tasks:d=[],editorView:u,setEditorView:f,isExecuting:p,onSave:m,onRun:w,results:b,pinnedResults:g,saveMsg:C,onConfirm:S,onNotify:k,onPinResults:q,onUnpinResults:_,onRunSnapshot:j,runId:O,onStop:U,hasUnsavedChanges:Y})=>{const[$,ne]=x.useState(null),[ee,te]=x.useState(null),P=x.useRef(null),fe=x.useRef(null),[,ie]=x.useState(null),[le,Ye]=x.useState(null),[ye,nt]=x.useState(null),[Te,Fe]=x.useState([]),[D,H]=x.useState(!1),[J,de]=x.useState(!1),[me,v]=x.useState(""),[B,I]=x.useState(null),[Z,ce]=x.useState(null),[he,be]=x.useState(!1),[$e,Ue]=x.useState({}),[kt,Wt]=x.useState([]),[Ea,Ja]=x.useState(!1),wt=()=>{try{const A=localStorage.getItem("doppelganger.layout.leftWidthPct");if(!A)return .3;const N=parseFloat(A);return Number.isNaN(N)?.3:Math.min(.75,Math.max(.25,N))}catch{return .3}},ca=A=>{const K=Math.floor(window.innerWidth*.8);return Math.max(320,Math.min(K,A))},[ma,xa]=x.useState(()=>{if(typeof window>"u")return 360;const A=wt();return ca(Math.round(window.innerWidth*A))}),se=x.useRef(!1),xe=d.filter(A=>String(A.id||"")!==String(i.id||"")),ue=Ea&&kt.length===1&&kt[0]?.id==="host",Se=1e6,At=A=>`${(A/(1024*1024)).toFixed(2)} MB`,ua=async(A,N,K)=>{if(!A){k("Nothing to copy.","error");return}let we=A;A.length>Se&&(await S({message:`Copying ${At(A.length)} may freeze your browser.`,confirmLabel:"Copy full",cancelLabel:"Copy segment"})||(we=A.slice(0,Se)));try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(we);else{const Ce=document.createElement("textarea");Ce.value=we,Ce.style.position="fixed",Ce.style.left="-999999px",Ce.style.top="-999999px",document.body.appendChild(Ce),Ce.focus(),Ce.select(),document.execCommand("copy"),Ce.remove()}ne(N),setTimeout(()=>ne(null),2e3),K?.truncatedNotice||we.length!==A.length&&k("Copied a truncated preview.","success")}catch(Ce){console.error("Copy failed:",Ce),k("Copy failed.","error")}};x.useEffect(()=>{let A=!1;return(async()=>{try{const K=await fetch("/api/settings/proxies",{credentials:"include"});if(!K.ok)throw new Error("Failed to load proxies");const we=await K.json();if(A)return;Wt(Array.isArray(we.proxies)?we.proxies:[])}catch{A||Wt([])}finally{A||Ja(!0)}})(),()=>{A=!0}},[]),x.useEffect(()=>{ue&&i.rotateProxies&&c({...i,rotateProxies:!1})},[ue,i,c]);const Nt=new Set(["if","while","repeat","foreach","on_error"]),wl=A=>{const N=(A||"").trim(),K=N.match(/^\{\$([\w.]+)\}$/);return K?K[1]:N},Ut={string:[{value:"equals",label:"Equals"},{value:"not_equals",label:"Not equal"},{value:"contains",label:"Contains"},{value:"starts_with",label:"Starts with"},{value:"ends_with",label:"Ends with"},{value:"matches",label:"Matches regex"}],number:[{value:"equals",label:"Equals"},{value:"not_equals",label:"Not equal"},{value:"gt",label:"Greater than"},{value:"gte",label:"Greater or equal"},{value:"lt",label:"Less than"},{value:"lte",label:"Less or equal"}],boolean:[{value:"is_true",label:"Is true"},{value:"is_false",label:"Is false"}]},Wa=A=>{let N=0;return A.map(K=>{(K.type==="else"||K.type==="end")&&(N=Math.max(0,N-1));const we=N;return(K.type==="else"||Nt.has(K.type))&&(N+=1),we})},Ca=A=>{const N={id:"act_"+Date.now(),type:A,selector:"",value:""};A==="set"&&(N.varName=""),A==="merge"&&(N.varName=""),A==="start"&&(N.value=""),A==="type"&&(N.typeMode="replace"),A==="if"&&(N.conditionVar="",N.conditionVarType="string",N.conditionOp="equals",N.conditionValue=""),A==="while"&&(N.conditionVar="",N.conditionVarType="string",N.conditionOp="equals",N.conditionValue=""),c({...i,actions:[...i.actions,N]})},Vl=A=>{de(!0),v(""),I(A||null)},Aa=A=>{c({...i,actions:i.actions.filter(N=>N.id!==A)})},De=(A,N)=>{c({...i,actions:i.actions.map(K=>K.id===A?{...K,...N}:K)})},Yl=(A,N)=>{if(A===N)return;const K=[...i.actions],we=K.findIndex(pt=>pt.id===A),Ce=K.findIndex(pt=>pt.id===N);if(we===-1||Ce===-1)return;const[He]=K.splice(we,1);K.splice(Ce,0,He),c({...i,actions:K})},Ta=A=>!A||!(A instanceof HTMLElement)?!1:!!A.closest('input, textarea, select, button, a, [contenteditable="true"], [data-no-drag="true"]'),ht=(A,N,K,we)=>{if(K!==void 0&&we!==void 0&&Math.abs(A-we)<14)return K;const Ce=i.actions;let He=Ce.length-1;for(let pt=0;pt<Ce.length;pt++){if(Ce[pt].id===N)continue;const ga=document.getElementById(`action-${Ce[pt].id}`);if(!ga)continue;const Sl=ga.getBoundingClientRect(),jl=Sl.top+Sl.height*.4;if(A<jl){He=pt;break}}return He},Q=()=>{if(le){if(ye!==null&&ye!==le.index){const A=i.actions[ye]?.id;A&&Yl(le.id,A)}Ye(null),nt(null),P.current=null}};x.useEffect(()=>{if(!le)return;const A=K=>{if(P.current!==null&&K.pointerId!==P.current)return;if(fe.current){const He=fe.current.getBoundingClientRect();K.clientY<He.top+28&&(fe.current.scrollTop-=14),K.clientY>He.bottom-28&&(fe.current.scrollTop+=14)}const we=le.originTop+le.height/2,Ce=ht(K.clientY,le.id,le.index,we);Ye(He=>He&&{...He,currentY:K.clientY}),nt(Ce)},N=K=>{P.current!==null&&K.pointerId!==P.current||Q()};return window.addEventListener("pointermove",A),window.addEventListener("pointerup",N),window.addEventListener("pointercancel",N),()=>{window.removeEventListener("pointermove",A),window.removeEventListener("pointerup",N),window.removeEventListener("pointercancel",N)}},[le,ye,i.actions]);const W=()=>{const A="var_"+Date.now().toString().slice(-4);c({...i,variables:{...i.variables,[A]:{type:"string",value:""}}})},ae=A=>({...A,id:"act_"+Date.now()+"_"+Math.floor(Math.random()*1e3)}),pe=(A,N)=>{A.preventDefault();const K=8,we=200,Ce=190,He=Math.min(Math.max(A.clientX+12,K),window.innerWidth-we-K),pt=Math.min(Math.max(A.clientY+12,K),window.innerHeight-Ce-K);te({id:N,x:He,y:pt})},Ge=()=>te(null);x.useEffect(()=>{if(!ee)return;const A=K=>{K.target?.closest(".action-context-menu")||te(null)},N=K=>{K.key==="Escape"&&te(null)};return window.addEventListener("mousedown",A),window.addEventListener("keydown",N),window.addEventListener("scroll",A,!0),()=>{window.removeEventListener("mousedown",A),window.removeEventListener("keydown",N),window.removeEventListener("scroll",A,!0)}},[ee]),x.useEffect(()=>{if(!O||i.mode!=="agent")return;Ue({});const A=new EventSource(`/api/executions/stream?runId=${encodeURIComponent(O)}`,{withCredentials:!0});return A.onmessage=N=>{if(N.data)try{const K=JSON.parse(N.data);K&&K.actionId&&K.status&&Ue(we=>({...we,[K.actionId]:K.status}))}catch{}},A.addEventListener("ready",()=>{}),A.onopen=()=>{},A.onerror=()=>{A.close()},()=>{A.close()}},[O,i.mode]),x.useEffect(()=>{if(typeof window>"u")return;const A=wt();xa(ca(Math.round(window.innerWidth*A)))},[]),x.useEffect(()=>{const A=K=>{if(!se.current)return;const we=ca(K.clientX);xa(we)},N=()=>{se.current=!1,document.body.style.cursor="",document.body.style.userSelect=""};return window.addEventListener("pointermove",A),window.addEventListener("pointerup",N),window.addEventListener("pointercancel",N),()=>{window.removeEventListener("pointermove",A),window.removeEventListener("pointerup",N),window.removeEventListener("pointercancel",N)}},[]);const Ie=A=>{const N={...i.variables};delete N[A],c({...i,variables:N})},et=(A,N,K,we)=>{const Ce={...i.variables};delete Ce[A];let He=we;K==="number"&&(He=parseFloat(we)||0),K==="boolean"&&(He=we==="true"||we===!0),Ce[N]={type:K,value:He},c({...i,variables:Ce})},Xe=async()=>{if(i.id){H(!0);try{const A=await fetch(`/api/tasks/${i.id}/versions`);if(!A.ok)throw new Error("Failed to load versions");const N=await A.json();Fe(Array.isArray(N.versions)?N.versions:[])}catch{Fe([])}finally{H(!1)}}},ot=async A=>{if(!(!i.id||!await S("Rollback to this version? Current changes will be saved as a new version.")))try{const K=await fetch(`/api/tasks/${i.id}/rollback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({versionId:A})});if(!K.ok)throw new Error("Rollback failed");const we=await K.json();c(we),k("Rolled back to selected version.","success"),Xe()}catch{k("Rollback failed.","error")}},oa=async A=>{if(i.id){be(!0);try{const N=await fetch(`/api/tasks/${i.id}/versions/${A}`);if(!N.ok)throw new Error("Failed to load version");const K=await N.json();if(!K?.snapshot)throw new Error("Missing snapshot");ce({id:K.metadata?.id||A,timestamp:K.metadata?.timestamp||Date.now(),snapshot:K.snapshot})}catch{k("Failed to load version snapshot.","error")}finally{be(!1)}}};return x.useEffect(()=>{u==="history"&&Xe()},[u,i.id]),r.jsxs("div",{className:"flex-1 flex overflow-hidden animate-in fade-in slide-in-from-bottom-4 duration-500",children:[r.jsxs("aside",{className:"glass border-r border-white/10 flex flex-col shrink-0 overflow-hidden",style:{width:ma},children:[r.jsxs("div",{className:"p-8 border-b border-white/10 space-y-6 shrink-0",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("input",{type:"text",value:i.name,onChange:A=>c({...i,name:A.target.value}),placeholder:"Task Name...",className:"bg-transparent text-xl font-bold tracking-tight text-white focus:outline-none border-none p-0 w-full placeholder:text-white/10"}),r.jsxs("div",{className:"flex items-center gap-6",children:[r.jsx("button",{onClick:()=>f("history"),className:"w-8 h-8 rounded-full text-gray-400 hover:text-white hover:bg-white/5 transition-all flex items-center justify-center",title:"Task History",children:r.jsx(zp,{className:"w-3.5 h-3.5"})}),r.jsx("button",{onClick:m,disabled:!Y,className:`px-4 py-2 text-[9px] font-bold rounded-full uppercase tracking-widest transition-all ${C==="SAVED"?"text-green-400 border border-green-400/20":"bg-blue-500/10 border border-white/10 text-blue-400"} ${Y?"hover:bg-blue-500/20":"opacity-50 cursor-not-allowed"}`,children:C==="SAVED"?"SAVED":"SAVE"})]})]}),r.jsx("div",{className:"bg-white/5 p-1 rounded-xl flex gap-1 border border-white/5",children:["scrape","agent","headful"].map(A=>r.jsx("button",{onClick:()=>c({...i,mode:A}),className:`flex-1 py-2 text-[9px] font-bold uppercase tracking-widest rounded-lg transition-all ${i.mode===A?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:A==="scrape"?"Scraper":A==="agent"?"Agent":"Headful"},A))}),r.jsxs("div",{className:"flex items-center justify-between px-2",children:[r.jsx("span",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest",children:"Interface Mode"}),r.jsx("div",{className:"flex bg-white/5 rounded-lg p-0.5 border border-white/5",children:["visual","json","api"].map(A=>r.jsx("button",{onClick:()=>f(A),className:`px-3 py-1 rounded text-[8px] font-bold uppercase tracking-widest transition-all ${u===A?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:A},A))})]})]}),r.jsxs("div",{className:`flex-1 p-8 min-h-0 relative ${u==="json"?"overflow-hidden":"overflow-y-auto custom-scrollbar"} ${u==="visual"?"space-y-8":""}`,children:[u==="visual"&&r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Target URL"}),r.jsx("div",{className:"w-full bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-sm focus-within:border-white/30 transition-all",children:r.jsx(Dt,{value:i.url,onChange:A=>c({...i,url:A}),variables:i.variables,placeholder:"https://..."})})]}),r.jsx("div",{className:"grid grid-cols-2 gap-4",children:r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Wait (Sec)"}),r.jsx("input",{type:"number",value:i.wait,onChange:A=>c({...i,wait:parseFloat(A.target.value)||0}),className:"w-full bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-white/30 transition-all text-white"})]})}),i.mode==="agent"&&r.jsxs("div",{className:"space-y-6 order-1",children:[r.jsxs("div",{className:"space-y-3",ref:fe,children:[(()=>{const A=Wa(i.actions);return i.actions.map((N,K)=>{const we=le?.id===N.id,He=le&&ye!==null&&le.index!==ye&&N.id!==le.id&&(le.index<ye&&K>le.index&&K<=ye||le.index>ye&&K<le.index&&K>=ye)?(le?.height||0)*(le.index<(ye??0)?-1:1):0,pt=A[K]||0,ga=N.disabled?"skipped":$e[N.id],Sl=ga==="running"?"border-yellow-400/60":ga==="success"?"border-green-400/60":ga==="error"?"border-red-400/70":ga==="skipped"?"border-gray-500/40":"",jl=F=>{const Le="w-3 h-3";return F==="if"||F==="else"?r.jsx(Jy,{className:`${Le} text-blue-400`}):F==="end"?r.jsx(cy,{className:`${Le} text-gray-500`}):F==="while"||F==="repeat"?r.jsx(Vy,{className:`${Le} text-amber-400`}):F==="foreach"?r.jsx(Cy,{className:`${Le} text-amber-300`}):F==="on_error"?r.jsx(uv,{className:`${Le} text-red-400`}):F==="set"?r.jsx(mv,{className:`${Le} text-green-400`}):F==="stop"?r.jsx(Jh,{className:`${Le} text-red-400`}):F==="click"?r.jsx(zy,{className:`${Le} text-blue-300`}):F==="type"?r.jsx(dv,{className:`${Le} text-green-300`}):F==="hover"?r.jsx(nv,{className:`${Le} text-purple-300`}):F==="press"?r.jsx(Sy,{className:`${Le} text-amber-300`}):F==="wait"?r.jsx(ty,{className:`${Le} text-slate-300`}):F==="scroll"?r.jsx($g,{className:`${Le} text-cyan-300`}):F==="javascript"?r.jsx(iy,{className:`${Le} text-yellow-300`}):F==="csv"?r.jsx(av,{className:`${Le} text-emerald-300`}):F==="merge"?r.jsx(Ny,{className:`${Le} text-emerald-200`}):F==="screenshot"?r.jsx(Rp,{className:`${Le} text-emerald-300`}):F==="start"?r.jsx(Fg,{className:`${Le} text-emerald-300`}):r.jsx("span",{className:"text-[9px] text-white/20",children:"|"})};return r.jsxs("div",{id:`action-${N.id}`,onPointerDown:F=>{if(Ta(F.target)||F.button!==0)return;F.preventDefault();const Le=F.currentTarget.getBoundingClientRect(),mt=F.clientY-Le.top;P.current=F.pointerId,F.currentTarget.setPointerCapture(F.pointerId),Ye({id:N.id,startY:F.clientY,currentY:F.clientY,height:Le.height,index:K,originTop:Le.top,pointerOffset:mt}),nt(K)},onPointerUp:F=>{P.current!==null&&F.pointerId!==P.current||Q()},onContextMenu:F=>pe(F,N.id),className:`glass-card p-5 rounded-2xl space-y-4 group/item relative transition-[transform,box-shadow,opacity,filter,background-color,border-color] duration-150 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-transform select-none touch-none ${Sl} ${we?"ring-2 ring-white/40 scale-[1.02] -translate-y-0.5 shadow-[0_30px_80px_rgba(0,0,0,0.45)] opacity-85 z-20":""} ${ye===K&&!we?"ring-2 ring-blue-400/60 bg-blue-500/5":""} ${N.disabled?"opacity-40 grayscale":""}`,style:{transform:we?`translateY(${(le?.currentY||0)-(le?.pointerOffset||0)-(le?.originTop||0)}px)`:He?`translateY(${He}px)`:void 0,marginLeft:pt?pt*12:void 0},children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"text-[8px] font-bold text-white/20 font-mono tracking-tighter",children:(K+1).toString().padStart(2,"0")}),r.jsx("div",{className:"w-4 h-4 flex items-center justify-center",children:jl(N.type)}),r.jsx("button",{onClick:()=>Vl(N.id),className:"action-type-select text-[10px] font-bold uppercase tracking-[0.2em] text-blue-400 focus:outline-none cursor-pointer",children:Tu.find(F=>F.type===N.type)?.label||N.type})]}),r.jsx("button",{"data-no-drag":"true",onClick:()=>Aa(N.id),className:"text-gray-600 hover:text-red-500 transition-colors opacity-0 group-hover/item:opacity-100",children:r.jsx(Bu,{className:"w-4 h-4"})})]}),(N.type==="click"||N.type==="type"||N.type==="hover")&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Selector"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Dt,{value:N.selector||"",onChange:F=>De(N.id,{selector:F}),variables:i.variables,placeholder:".btn-primary"})})]}),N.type==="scroll"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Selector (Optional)"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Dt,{value:N.selector||"",onChange:F=>De(N.id,{selector:F}),variables:i.variables,placeholder:".scroll-container or leave empty"})})]}),N.type==="scroll"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Scroll Speed (ms)"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Dt,{value:N.key||"",onChange:F=>De(N.id,{key:F}),variables:i.variables,placeholder:"500"})})]}),(N.type==="type"||N.type==="wait"||N.type==="scroll"||N.type==="javascript"||N.type==="csv")&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:N.type==="type"?"Content":N.type==="wait"?"Seconds":N.type==="scroll"?"Pixels":N.type==="csv"?"CSV Input":"Script"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:N.type==="javascript"?r.jsx(Tn,{value:N.value||"",onChange:F=>De(N.id,{value:F}),language:"javascript",variables:i.variables,className:"min-h-[120px]",placeholder:"return document.title"}):N.type==="csv"?r.jsx(Tn,{value:N.value||"",onChange:F=>De(N.id,{value:F}),language:"plain",variables:i.variables,className:"min-h-[120px]",placeholder:"name,age\\nAda,31"}):r.jsx(Dt,{value:N.value||"",onChange:F=>De(N.id,{value:F}),variables:i.variables,placeholder:N.type==="type"?"Search keywords":N.type==="wait"?"3":"400"})}),N.type==="type"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Mode"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx("select",{value:N.typeMode||"replace",onChange:F=>De(N.id,{typeMode:F.target.value}),className:"custom-select w-full bg-transparent border-none px-0 py-0 text-[11px] text-white",children:Jv.map(F=>r.jsx("option",{value:F.value,children:F.label},F.value))})})]})]}),N.type==="screenshot"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Label (Optional)"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Dt,{value:N.value||"",onChange:F=>De(N.id,{value:F}),variables:i.variables,placeholder:"checkout-step"})})]}),N.type==="press"&&(()=>{const{modifiers:F,baseKey:Le}=Wv(N.key);return r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Key"}),r.jsx("div",{className:"grid grid-cols-2 gap-1 text-[10px] text-white",children:$v.map(mt=>r.jsxs("label",{className:"inline-flex items-center space-x-1",children:[r.jsx("input",{type:"checkbox",checked:F.includes(mt.value),onChange:rt=>{const tt=rt.target.checked?[...F,mt.value]:F.filter(xt=>xt!==mt.value);De(N.id,{key:ip(tt,Le)})},className:"h-3 w-3 rounded border border-white/30 bg-black/80"}),r.jsx("span",{className:"uppercase text-[9px] text-white/70",children:mt.label})]},mt.value))}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsxs("select",{value:Le,onChange:mt=>De(N.id,{key:ip(F,mt.target.value)}),className:"custom-select w-full bg-transparent border-none px-0 py-0 text-[11px] text-white",children:[r.jsx("option",{value:"",children:"Select key"}),Kv.map(mt=>r.jsx("option",{value:mt,children:mt},mt))]})})]})})(),N.type==="if"&&(()=>{const F=Object.keys(i.variables||{}),Le=wl(N.conditionVar||""),mt=Le&&i.variables?.[Le]?.type,rt=N.conditionVarType||mt||"string",tt=Ut[rt]||Ut.string,xt=N.conditionOp||tt[0].value;return r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Condition"}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Variable"}),r.jsx("input",{type:"text",list:`if-var-${N.id}`,value:N.conditionVar||"",onChange:Me=>De(N.id,{conditionVar:Me.target.value}),placeholder:"variable name",className:"w-full bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"}),F.length>0&&r.jsx("datalist",{id:`if-var-${N.id}`,children:F.map(Me=>r.jsx("option",{value:Me},Me))})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Type"}),r.jsxs("select",{value:rt,onChange:Me=>{const da=Me.target.value,zn=Ut[da]||Ut.string;De(N.id,{conditionVarType:da,conditionOp:zn[0].value,conditionValue:da==="boolean"?"":N.conditionValue||""})},className:"custom-select w-full bg-white/[0.05] border border-white/10 rounded-xl px-3 py-2 text-[8px] font-bold uppercase text-white/60",children:[r.jsx("option",{value:"string",children:"String"}),r.jsx("option",{value:"number",children:"Number"}),r.jsx("option",{value:"boolean",children:"Boolean"})]})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Relation"}),r.jsx("select",{value:xt,onChange:Me=>De(N.id,{conditionOp:Me.target.value}),className:"custom-select w-full bg-white/[0.05] border border-white/10 rounded-xl px-3 py-2 text-[8px] font-bold uppercase text-white/60",children:tt.map(Me=>r.jsx("option",{value:Me.value,children:Me.label},Me.value))})]})]}),rt!=="boolean"&&r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Value"}),r.jsx("input",{type:rt==="number"?"number":"text",value:N.conditionValue||"",onChange:Me=>De(N.id,{conditionValue:Me.target.value}),placeholder:rt==="number"?"0":"value",className:"w-full bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"})]})]})})(),N.type==="while"&&(()=>{const F=Object.keys(i.variables||{}),Le=wl(N.conditionVar||""),mt=Le&&i.variables?.[Le]?.type,rt=N.conditionVarType||mt||"string",tt=Ut[rt]||Ut.string,xt=N.conditionOp||tt[0].value;return r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Condition"}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Variable"}),r.jsx("input",{type:"text",list:`while-var-${N.id}`,value:N.conditionVar||"",onChange:Me=>De(N.id,{conditionVar:Me.target.value}),placeholder:"variable name",className:"w-full bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"}),F.length>0&&r.jsx("datalist",{id:`while-var-${N.id}`,children:F.map(Me=>r.jsx("option",{value:Me},Me))})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Type"}),r.jsxs("select",{value:rt,onChange:Me=>{const da=Me.target.value,zn=Ut[da]||Ut.string;De(N.id,{conditionVarType:da,conditionOp:zn[0].value,conditionValue:da==="boolean"?"":N.conditionValue||""})},className:"custom-select w-full bg-white/[0.05] border border-white/10 rounded-xl px-3 py-2 text-[8px] font-bold uppercase text-white/60",children:[r.jsx("option",{value:"string",children:"String"}),r.jsx("option",{value:"number",children:"Number"}),r.jsx("option",{value:"boolean",children:"Boolean"})]})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Relation"}),r.jsx("select",{value:xt,onChange:Me=>De(N.id,{conditionOp:Me.target.value}),className:"custom-select w-full bg-white/[0.05] border border-white/10 rounded-xl px-3 py-2 text-[8px] font-bold uppercase text-white/60",children:tt.map(Me=>r.jsx("option",{value:Me.value,children:Me.label},Me.value))})]})]}),rt!=="boolean"&&r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Value"}),r.jsx("input",{type:rt==="number"?"number":"text",value:N.conditionValue||"",onChange:Me=>De(N.id,{conditionValue:Me.target.value}),placeholder:rt==="number"?"0":"value",className:"w-full bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"})]})]})})(),N.type==="repeat"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Times"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Dt,{value:N.value||"",onChange:F=>De(N.id,{value:F}),variables:i.variables,placeholder:"3"})})]}),N.type==="foreach"&&r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Selector (Optional)"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Dt,{value:N.selector||"",onChange:F=>De(N.id,{selector:F}),variables:i.variables,placeholder:".list-item"})})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Variable (Array Name)"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Dt,{value:N.varName||"",onChange:F=>De(N.id,{varName:F}),variables:i.variables,placeholder:"items"})})]})]}),N.type==="set"&&r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Variable Name"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Dt,{value:N.varName||"",onChange:F=>De(N.id,{varName:F}),variables:i.variables,placeholder:"status"})})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Value"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Dt,{value:N.value||"",onChange:F=>De(N.id,{value:F}),variables:i.variables,placeholder:"ready"})})]})]}),N.type==="merge"&&r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Sources"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Dt,{value:N.value||"",onChange:F=>De(N.id,{value:F}),variables:i.variables,placeholder:"items, extraItems, {$block.output}"})})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Target Variable (Optional)"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Dt,{value:N.varName||"",onChange:F=>De(N.id,{varName:F}),variables:i.variables,placeholder:"allItems"})})]})]}),N.type==="stop"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Outcome"}),r.jsxs("select",{value:N.value||"success",onChange:F=>De(N.id,{value:F.target.value}),className:"custom-select w-full bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[9px] font-bold uppercase tracking-[0.2em] text-white/70 focus:outline-none",children:[r.jsx("option",{value:"success",children:"Success"}),r.jsx("option",{value:"error",children:"Error"})]})]}),N.type==="on_error"&&r.jsx("div",{className:"text-[8px] text-gray-600 uppercase tracking-widest",children:"Runs if any action fails."}),N.type==="start"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Task"}),r.jsxs("select",{value:N.value||"",onChange:F=>De(N.id,{value:F.target.value}),className:"custom-select w-full bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[9px] font-bold uppercase tracking-[0.2em] text-white/70 focus:outline-none",children:[r.jsx("option",{value:"",disabled:!0,children:"Select task"}),xe.length===0&&r.jsx("option",{value:"",disabled:!0,children:"No other tasks"}),xe.map(F=>r.jsx("option",{value:F.id,children:F.name||F.id},F.id))]})]})]},N.id)})})(),ee&&(()=>{const A=i.actions.findIndex(K=>K.id===ee.id),N=i.actions[A];return N?r.jsxs("div",{className:"action-context-menu fixed z-50 w-[200px] bg-[#0b0b0b] border border-white/10 rounded-xl shadow-2xl p-2 text-[10px] font-bold uppercase tracking-widest text-white/80",style:{left:ee.x,top:ee.y},children:[r.jsx("button",{onClick:()=>{De(N.id,{disabled:!N.disabled}),Ge()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors",children:N.disabled?"Enable":"Disable"}),r.jsx("button",{onClick:()=>{Aa(N.id),Ge()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors text-red-400",children:"Delete"}),r.jsx("button",{onClick:()=>{ie(ae(N)),Aa(N.id),Ge()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors",children:"Cut"}),r.jsx("button",{onClick:()=>{ie(ae(N)),Ge()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors",children:"Copy"}),r.jsx("button",{onClick:()=>{const K=ae(N),we=[...i.actions];we.splice(A+1,0,K),c({...i,actions:we}),Ge()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors",children:"Duplicate"})]}):null})(),r.jsx("button",{onClick:()=>Vl(),className:"w-full py-3 border border-dashed border-white/20 rounded-xl text-[9px] font-bold uppercase tracking-widest text-gray-500 hover:text-white transition-all bg-white/[0.02]",children:"+ Append Action Seq"})]}),r.jsxs("div",{className:"bg-white/5 rounded-xl p-4 border border-white/5 space-y-4",children:[r.jsx("h4",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest border-b border-white/5 pb-2",children:"Behavior Config"}),r.jsx("div",{className:"grid grid-cols-2 gap-3",children:Object.entries(i.stealth).map(([A,N])=>r.jsxs("label",{className:"flex items-center gap-3 cursor-pointer group",children:[r.jsx("input",{type:"checkbox",checked:N,onChange:K=>c({...i,stealth:{...i.stealth,[A]:K.target.checked},humanTyping:A==="naturalTyping"?K.target.checked:i.humanTyping}),className:"w-3 h-3 rounded bg-transparent border-white/20"}),r.jsx("span",{className:"text-[9px] font-bold text-gray-500 group-hover:text-white transition-all",children:A.replace(/([A-Z])/g," $1").toUpperCase()})]},A))})]})]}),r.jsxs("details",{className:"border-t border-white/10 pt-6 font-sans",children:[r.jsx("summary",{className:"cursor-pointer text-[9px] font-bold text-gray-500 uppercase tracking-[0.2em] hover:text-gray-400 transition-all",children:"Variables (Injectable)"}),r.jsxs("div",{className:"space-y-3 mt-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("p",{className:"text-[8px] text-gray-600",children:"Dynamic Params"}),r.jsx("button",{onClick:W,className:"px-3 py-1 bg-white/5 border border-white/10 text-white text-[8px] font-bold rounded-lg uppercase tracking-widest hover:bg-white/10 transition-all",children:"+ Add"})]}),r.jsx("div",{className:"space-y-2",children:Object.entries(i.variables).map(([A,N])=>r.jsx(Fv,{name:A,def:N,updateVariable:et,removeVariable:Ie},A))})]})]}),r.jsxs("details",{className:"border-t border-white/10 pt-6 font-sans",children:[r.jsx("summary",{className:"cursor-pointer text-[9px] font-bold text-gray-500 uppercase tracking-[0.2em] hover:text-gray-400 transition-all",children:"Extraction Script"}),r.jsxs("div",{className:"space-y-3 mt-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-[8px] text-gray-600 uppercase tracking-widest",children:"Output format"}),r.jsxs("select",{value:i.extractionFormat||"json",onChange:A=>c({...i,extractionFormat:A.target.value}),className:"custom-select bg-white/[0.05] border border-white/10 rounded-xl px-3 py-2 text-[8px] font-bold uppercase text-white/60",children:[r.jsx("option",{value:"json",children:"JSON"}),r.jsx("option",{value:"csv",children:"CSV"})]})]}),r.jsxs("p",{className:"text-[8px] text-gray-600",children:["Process scraped HTML with JavaScript. Use ",r.jsx("code",{className:"text-blue-400 bg-white/5 px-1 py-0.5 rounded",children:"$$data.html()"})," to access the raw HTML."]}),r.jsx("div",{className:"w-full bg-[#050505] border border-white/10 rounded-xl p-4 font-mono text-xs text-green-300 focus-within:border-white/30 resize-none custom-scrollbar leading-relaxed min-h-[200px] whitespace-pre-wrap",children:r.jsx(Dt,{value:i.extractionScript||"",onChange:A=>c({...i,extractionScript:A}),variables:i.variables,syntax:"javascript",placeholder:`// Example: Extract all links
14
+ const html = $$data.html();
15
+ const parser = new DOMParser();
16
+ const doc = parser.parseFromString(html, 'text/html');
17
+ const links = Array.from(doc.querySelectorAll('a')).map(a => a.href);
18
+ return JSON.stringify(links, null, 2);`})})]})]}),i.mode==="scrape"&&r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Selector Filter"}),r.jsx("div",{className:"w-full bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-sm focus-within:border-white/30 transition-all",children:r.jsx(Dt,{value:i.selector||"",onChange:A=>c({...i,selector:A}),variables:i.variables,placeholder:".main-content"})})]}),r.jsxs("div",{className:"pt-4 border-t border-white/10 space-y-3",children:[r.jsxs("label",{className:"flex items-center gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 hover:bg-white/[0.05] transition-all cursor-pointer group",children:[r.jsx("input",{type:"checkbox",checked:i.rotateUserAgents,onChange:A=>c({...i,rotateUserAgents:A.target.checked}),className:"w-4 h-4 rounded border-white/20 bg-transparent"}),r.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Rotate UA"})]}),r.jsxs("label",{className:`flex items-center gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 transition-all ${ue?"opacity-50 cursor-not-allowed":"hover:bg-white/[0.05] cursor-pointer group"}`,title:ue?"Configure proxies in Settings → Proxies to enable rotation.":"Rotate proxies per task.",children:[r.jsx("input",{type:"checkbox",checked:i.rotateProxies,onChange:A=>c({...i,rotateProxies:A.target.checked}),disabled:ue,className:"w-4 h-4 rounded border-white/20 bg-transparent"}),r.jsx("span",{className:`text-[10px] font-bold text-gray-500 uppercase tracking-widest ${ue?"":"group-hover:text-white"}`,children:"Rotate Proxies"})]}),r.jsxs("label",{className:"flex items-center gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 hover:bg-white/[0.05] transition-all cursor-pointer group",children:[r.jsx("input",{type:"checkbox",checked:i.rotateViewport,onChange:A=>c({...i,rotateViewport:A.target.checked}),className:"w-4 h-4 rounded border-white/20 bg-transparent"}),r.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Rotate Viewport"})]}),r.jsxs("label",{className:"flex items-center gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 hover:bg-white/[0.05] transition-all cursor-pointer group",children:[r.jsx("input",{type:"checkbox",checked:i.includeShadowDom!==!1,onChange:A=>c({...i,includeShadowDom:A.target.checked}),className:"w-4 h-4 rounded border-white/20 bg-transparent"}),r.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Include Shadow DOM in HTML"})]}),r.jsxs("label",{className:"flex items-center gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 hover:bg-white/[0.05] transition-all cursor-pointer group",children:[r.jsx("input",{type:"checkbox",checked:!!i.disableRecording,onChange:A=>c({...i,disableRecording:A.target.checked}),className:"w-4 h-4 rounded border-white/20 bg-transparent"}),r.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Disable automated recording"})]}),r.jsxs("label",{className:"flex items-center gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 hover:bg-white/[0.05] transition-all cursor-pointer group",children:[r.jsx("input",{type:"checkbox",checked:!!i.statelessExecution,onChange:A=>c({...i,statelessExecution:A.target.checked}),className:"w-4 h-4 rounded border-white/20 bg-transparent"}),r.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Stateless execution (no shared cookies)"})]})]})]}),u==="json"&&r.jsx(Nv,{task:i,onChange:c,onCopy:(A,N)=>{ua(A,N)},copiedId:$}),u==="api"&&r.jsxs("div",{className:"h-full flex flex-col",children:[r.jsxs("div",{className:"space-y-6 flex-1 flex flex-col min-h-0",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Deployment Endpoint"}),r.jsxs("div",{className:"flex gap-2 items-center",children:[r.jsx("input",{type:"text",readOnly:!0,value:i.id?`${window.location.origin}/tasks/${i.id}/api`:"Save task to view endpoint",className:"flex-1 bg-[#050505] border border-white/10 rounded-xl px-4 py-2 font-mono text-xs text-green-300 focus:outline-none"}),r.jsxs("button",{onClick:()=>{const A=i.id?`${window.location.origin}/tasks/${i.id}/api`:"";A&&ua(A,"endpoint")},className:`px-4 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 ${$==="endpoint"?"bg-green-500/10 border-green-500/20 text-green-400":"bg-white/5 border-white/10 text-white hover:bg-white/10"}`,children:[$==="endpoint"?r.jsx(Ai,{className:"w-3 h-3"}):r.jsx(Ti,{className:"w-3 h-3"}),$==="endpoint"?"Copied":"Copy"]})]})]}),r.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest",children:"Override Variables (JSON)"}),r.jsxs("button",{onClick:()=>{const A={};Object.entries(i.variables).forEach(([N,K])=>A[N]=K.value),ua(JSON.stringify({variables:A},null,2),"vars")},className:`px-4 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 ${$==="vars"?"bg-green-500/10 border-green-500/20 text-green-400":"bg-white/5 border-white/10 text-white hover:bg-white/10"}`,children:[$==="vars"?r.jsx(Ai,{className:"w-3 h-3"}):r.jsx(Ti,{className:"w-3 h-3"}),$==="vars"?"Copied":"Copy"]})]}),r.jsx(Tn,{readOnly:!0,value:(()=>{const A={};return Object.entries(i.variables).forEach(([N,K])=>A[N]=K.value),JSON.stringify({variables:A},null,2)})(),language:"json",className:"flex-1"})]})]}),r.jsx("p",{className:"text-[8px] text-gray-600 mt-4 font-mono uppercase tracking-widest leading-loose",children:"Automate via HTTP POST to the above endpoint with your API key in the headers."})]}),u==="history"&&r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest",children:"Task Versions"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{onClick:Xe,className:"px-4 py-2 border border-white/10 text-[9px] font-bold rounded-xl uppercase tracking-widest text-white hover:bg-white/5 transition-all",children:"Refresh"}),r.jsx("button",{onClick:async()=>{if(!i.id||!await S("Clear all task versions?"))return;(await fetch(`/api/tasks/${i.id}/versions/clear`,{method:"POST"})).ok?(k("Version history cleared.","success"),Xe()):k("Clear failed.","error")},className:"px-4 py-2 border border-red-500/20 text-[9px] font-bold rounded-xl uppercase tracking-widest text-red-300 hover:bg-red-500/10 transition-all",children:"Clear"})]})]}),D&&r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading versions..."}),!D&&Te.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No versions yet. Save changes to create history."}),r.jsx("div",{className:"space-y-3",children:Te.map(A=>r.jsxs("div",{className:"glass-card p-4 rounded-2xl flex items-center justify-between",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest",children:A.name}),r.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[new Date(A.timestamp).toLocaleString()," | ",A.mode]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{onClick:()=>oa(A.id),disabled:he,className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:he?"Loading...":"View"}),r.jsx("button",{onClick:()=>ot(A.id),className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all",children:"Rollback"})]})]},A.id))})]})]}),r.jsx(jv,{open:J,query:me,onQueryChange:v,onClose:()=>de(!1),onSelect:A=>{B?A==="if"?De(B,{type:A,conditionVar:"",conditionVarType:"string",conditionOp:"equals",conditionValue:""}):A==="while"?De(B,{type:A,conditionVar:"",conditionVarType:"string",conditionOp:"equals",conditionValue:""}):De(B,{type:A}):Ca(A),de(!1)}}),r.jsx("div",{className:"p-8 border-t border-white/10 backdrop-blur-xl shrink-0",children:r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("button",{onClick:w,disabled:p&&i.mode!=="headful",className:"shine-effect flex-1 bg-white text-black py-4 rounded-2xl font-bold text-[10px] tracking-[0.3em] uppercase transition-all shadow-xl shadow-white/5 flex items-center justify-center gap-3 disabled:opacity-50",children:[p&&i.mode!=="headful"?r.jsx("div",{className:"w-3 h-3 border-2 border-black/20 border-t-black rounded-full animate-spin"}):r.jsx(Uy,{className:"w-3 h-3 fill-black"}),r.jsx("span",{children:p&&i.mode==="headful"?"Stop Headful":p?"Running...":"Run Task"})]}),p&&r.jsx("button",{onClick:()=>U?.(),className:"w-12 h-12 rounded-2xl border border-white/10 text-white/80 hover:text-white hover:bg-white/10 transition-all flex items-center justify-center",title:"Stop task",children:r.jsx(Jh,{className:"w-4 h-4"})})]})})]}),r.jsx("div",{className:"w-2 cursor-col-resize bg-white/5 hover:bg-white/10 transition-colors",onPointerDown:A=>{A.preventDefault(),se.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none"}}),r.jsxs("main",{className:"flex-1 overflow-y-auto custom-scrollbar bg-[#020202] p-12 relative",children:[r.jsx("div",{className:"absolute inset-0 opacity-[0.02] pointer-events-none",style:{backgroundImage:"radial-gradient(#fff 1px, transparent 1px)",backgroundSize:"40px 40px"}}),r.jsx(Hp,{results:b,pinnedResults:g,isExecuting:p,isHeadful:i.mode==="headful",runId:O,onConfirm:S,onNotify:k,onPin:q,onUnpin:_,fullWidth:i.mode==="headful"}),Z&&r.jsx("div",{className:"fixed inset-0 z-[210] flex items-center justify-center bg-black/70 backdrop-blur-sm px-6",children:r.jsxs("div",{className:"glass-card w-full max-w-6xl rounded-[32px] border border-white/10 p-8 shadow-2xl flex flex-col max-h-[90vh]",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-white/5 pb-4 mb-6",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("div",{className:"text-[9px] font-bold text-gray-500 uppercase tracking-[0.3em]",children:"Task Snapshot"}),r.jsx("div",{className:"text-lg font-bold text-white",children:Z.snapshot.name}),r.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[new Date(Z.timestamp).toLocaleString()," | ",Z.snapshot.mode]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{onClick:()=>ce(null),className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all",children:"Close"}),r.jsx("button",{onClick:()=>{j&&j(Z.snapshot),ce(null)},className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white text-black hover:bg-white/90 transition-all",children:"Run Version"})]})]}),r.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6 overflow-y-auto custom-scrollbar pr-2 flex-1 min-h-0",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("div",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:"Snapshot JSON"}),r.jsx(Tn,{readOnly:!0,value:JSON.stringify(Z.snapshot,null,2),language:"json",className:"min-h-[320px]"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("div",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:"Output"}),r.jsx("div",{className:"glass-card rounded-2xl p-6 border border-white/10 text-[10px] text-gray-500",children:"No output captured for this snapshot yet. Run this version to see results."})]})]})]})})]})]})},Iv=({apiKey:i,loading:c,saving:d,onRegenerate:u,onCopy:f})=>{const[p,m]=x.useState(!1);return r.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[r.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[r.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:r.jsx(Mp,{className:"w-5 h-5"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"API Key"}),r.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Manage task API access"})]})]}),r.jsxs("div",{className:"flex flex-col gap-4",children:[r.jsxs("div",{className:"rounded-2xl bg-black/40 border border-white/10 px-4 py-3 font-mono text-[10px] text-blue-200/80 break-all min-h-[44px] flex items-center justify-between gap-3",children:[r.jsx("span",{className:i&&!p?"text-[14px] leading-none":void 0,children:c?"Loading...":i?p?i:"••••••••••••••••••••••••••••••••••••••••":"No API key set"}),r.jsx("button",{onClick:()=>m(w=>!w),disabled:!i,className:"p-2 rounded-xl border border-white/10 text-white/70 hover:text-white hover:bg-white/5 transition-all disabled:opacity-50",title:p?"Hide key":"Show key","aria-label":p?"Hide key":"Show key",children:p?r.jsx(hy,{className:"w-4 h-4"}):r.jsx(my,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"flex gap-3",children:[r.jsx("button",{onClick:u,disabled:d,className:"flex-1 px-6 py-3 rounded-2xl text-[9px] font-bold uppercase tracking-widest bg-white text-black hover:scale-105 transition-all disabled:opacity-60 disabled:hover:scale-100",children:i?"Rotate Key":"Generate Key"}),r.jsxs("button",{onClick:f,disabled:!i,className:"flex-1 px-6 py-3 rounded-2xl text-[9px] font-bold uppercase tracking-widest border border-white/10 text-white hover:bg-white/5 transition-all disabled:opacity-50 inline-flex items-center justify-center gap-2",children:[r.jsx(Ti,{className:"w-4 h-4"}),"Copy Key"]})]}),r.jsx("p",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"Use this key in `key`, `x-api-key`, or `Authorization: Bearer` headers."})]})]})},Pv=({onClearStorage:i})=>r.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[r.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[r.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:r.jsx(Hu,{className:"w-5 h-5"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Storage"}),r.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Manage stored data"})]})]}),r.jsxs("div",{className:"flex gap-4",children:[r.jsx("button",{onClick:()=>i("screenshots"),className:"flex-1 px-6 py-4 bg-red-500/5 border border-red-500/10 text-red-400 rounded-2xl text-[9px] font-bold uppercase tracking-widest hover:bg-red-500/10 transition-all",children:"Clear Captures"}),r.jsx("button",{onClick:()=>i("cookies"),className:"flex-1 px-6 py-4 bg-yellow-500/5 border border-yellow-500/10 text-yellow-400 rounded-2xl text-[9px] font-bold uppercase tracking-widest hover:bg-yellow-500/10 transition-all",children:"Reset Cookies"})]})]}),eb=72,qp=6,Js=eb+qp,tb=5,ab=2,lb=({index:i,style:c,data:d})=>{const u=d.captures[i];return u?r.jsx("div",{style:{...c,paddingBottom:qp},children:r.jsxs("div",{className:"flex items-center justify-between gap-4 p-4 rounded-2xl border border-white/10 bg-white/[0.02]",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest",children:u.type==="recording"?"Recording":"Screenshot"}),r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:u.name})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("a",{href:u.url,target:"_blank",rel:"noreferrer",className:"px-3 py-2 rounded-xl border border-white/10 text-[9px] font-bold uppercase tracking-widest text-white hover:bg-white/5 transition-all","aria-label":`Open ${u.name}`,children:"Open"}),r.jsx("button",{onClick:()=>d.onDelete(u.name),className:"px-3 py-2 rounded-xl border border-red-500/20 text-[9px] font-bold uppercase tracking-widest text-red-300 hover:bg-red-500/10 transition-all",children:"Delete"})]})]})}):null},nb=({captures:i,loading:c,onRefresh:d,onDelete:u})=>{const f=Math.min(Math.max(Js,i.length*Js),Js*tb);return r.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Captures"}),r.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Recordings and screenshots"})]}),r.jsx("button",{onClick:d,disabled:c,className:"px-4 py-2 border border-white/10 text-[9px] font-bold rounded-xl uppercase tracking-widest text-white/70 hover:text-white hover:bg-white/5 transition-all disabled:opacity-50",children:"Refresh"})]}),c&&r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading captures..."}),!c&&i.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No captures found."}),!c&&i.length>0&&r.jsx(lr,{height:f,width:"100%",itemCount:i.length,itemSize:Js,overscanCount:ab,itemData:{captures:i,onDelete:u},children:lb})]})},ib=({cookies:i,originsCount:c,loading:d,onClear:u,onDelete:f})=>{const[p,m]=x.useState({}),[w,b]=x.useState({}),g=_=>`${_.name}|${_.domain||""}|${_.path||""}|${_.expires||""}`,C=_=>{if(!_)return!1;let j=0;for(let O=0;O<_.length;O+=1){const U=_.charCodeAt(O);(U===9||U===10||U===13||U>=32&&U<=126)&&(j+=1)}return j/_.length>=.85},S=_=>{if(!_)return null;if(/%[0-9A-Fa-f]{2}/.test(_))try{const j=decodeURIComponent(_);if(j!==_&&C(j))return{value:j,kind:"URL"}}catch{}if(/^[A-Za-z0-9+/=]+$/.test(_)&&_.length>=12&&_.length%4===0)try{const j=atob(_);if(j&&C(j))return{value:j,kind:"Base64"}}catch{}return null},k=_=>{const j=g(_);m(O=>({...O,[j]:!O[j]}))},q=_=>{const j=g(_);b(O=>({...O,[j]:!O[j]}))};return r.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:r.jsx(Mp,{className:"w-5 h-5"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Cookies"}),r.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Browser storage state"})]})]}),r.jsx("button",{onClick:u,className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-yellow-500/5 border border-yellow-500/10 text-yellow-400 hover:bg-yellow-500/10 transition-all",children:"Clear Cookies"})]}),d&&r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading data..."}),!d&&i.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No cookies found."}),r.jsx("div",{className:"space-y-3",children:i.map(_=>{const j=g(_),O=!!p[j],U=_.value||"",Y=S(U),$=!!Y&&!!w[j],ne=$&&Y?Y.value:U,ee=O||ne.length<=120?ne:`${ne.slice(0,120)}...`;return r.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-2xl p-4 space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between gap-4",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest truncate",children:_.name}),r.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[_.domain||"local"," | ",_.path||"/",_.expires?` | ${new Date(_.expires*1e3).toLocaleString()}`:""]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[Y&&r.jsx("button",{onClick:()=>q(_),className:"px-3 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl border border-white/10 text-white/70 hover:text-white hover:bg-white/5 transition-all",children:$?"Show Raw":`Decode ${Y.kind}`}),r.jsx("button",{onClick:()=>f(_),className:"px-3 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-red-500/5 border border-red-500/10 text-red-400 hover:bg-red-500/10 transition-all",children:"Delete"})]})]}),r.jsx("div",{onClick:()=>k(_),className:"cursor-pointer rounded-xl bg-black/40 border border-white/10 px-3 py-2 font-mono text-[10px] text-blue-200/80 whitespace-pre-wrap break-words",title:"Click to expand/collapse",children:ee||"(empty)"})]},j)})}),!d&&c>0&&r.jsxs("div",{className:"pt-2 text-[8px] text-gray-600 uppercase tracking-widest",children:["Origins stored: ",c]})]})},sb=({tab:i,onTabChange:c})=>r.jsxs("div",{className:"flex items-end justify-between mb-8",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("p",{className:"text-[10px] font-bold text-purple-500 uppercase tracking-[0.4em]",children:"System"}),r.jsx("h2",{className:"text-4xl font-bold tracking-tighter text-white",children:"Settings"})]}),r.jsx("div",{className:"flex bg-white/5 rounded-xl p-1 border border-white/5",children:["system","data","proxies"].map(d=>r.jsx("button",{onClick:()=>c(d),className:`px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-lg transition-all ${i===d?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:d},d))})]}),rb=({splitPercent:i,onChange:c,onReset:d})=>{const u=Number.isFinite(i)?Math.min(75,Math.max(25,i)):30;return r.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Layout"}),r.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Default editor split"})]}),r.jsx("button",{onClick:d,className:"px-4 py-2 border border-white/10 text-[9px] font-bold rounded-xl uppercase tracking-widest text-white/70 hover:text-white hover:bg-white/5 transition-all",children:"Reset 30/70"})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between text-[9px] font-bold uppercase tracking-widest text-gray-500",children:[r.jsx("span",{children:"Editor"}),r.jsxs("span",{children:[u,"%"]})]}),r.jsx("input",{type:"range",min:25,max:75,step:5,value:u,onChange:f=>c(Math.min(75,Math.max(25,Number(f.target.value)))),className:"w-full accent-white"}),r.jsxs("div",{className:"flex items-center justify-between text-[9px] font-bold uppercase tracking-widest text-gray-500",children:[r.jsx("span",{children:"Preview"}),r.jsxs("span",{children:[100-u,"%"]})]})]})]})},cb=({proxies:i,defaultProxyId:c,includeDefaultInRotation:d,rotationMode:u,loading:f,onRefresh:p,onAdd:m,onImport:w,onUpdate:b,onDelete:g,onSetDefault:C,onToggleIncludeDefault:S,onRotationModeChange:k})=>{const[q,_]=x.useState(""),[j,O]=x.useState(""),[U,Y]=x.useState(""),[$,ne]=x.useState(""),[ee,te]=x.useState(null),[P,fe]=x.useState(""),[ie,le]=x.useState(""),[Ye,ye]=x.useState(""),[nt,Te]=x.useState(""),[Fe,D]=x.useState(""),H=x.useRef(null),J=()=>{q.trim()&&(m({server:q.trim(),username:j.trim()||void 0,password:U.trim()||void 0,label:$.trim()||void 0}),_(""),O(""),Y(""),ne(""))},de=Z=>{te(Z.id),fe(Z.server),le(Z.username||""),ye(""),Te(Z.label||"")},me=()=>{te(null),fe(""),le(""),ye(""),Te("")},v=()=>{!ee||!P.trim()||(b(ee,{server:P.trim(),username:ie.trim()||void 0,password:Ye.trim()||void 0,label:nt.trim()||void 0}),me())},B=Z=>{const ce=Z.trim();if(!ce)return null;if(ce.includes("://"))return{server:ce};const he=ce.split(":");if(he.length<2)return null;const be=he[0]?.trim(),$e=he[1]?.trim();if(!be||!$e)return null;const Ue=he[2]?he[2].trim():"",kt=he.length>3?he.slice(3).join(":").trim():"";return{server:`${be}:${$e}`,username:Ue||void 0,password:kt||void 0}},I=async Z=>{const ce=Array.from(Z.target.files||[]);if(ce.length)try{const $e=(await Promise.all(ce.map(Ue=>Ue.text()))).join(`
19
+ `).split(/\r?\n/).flatMap(Ue=>Ue.split(/[,;]+/)).map(B).filter(Boolean);if($e.length===0){D("No valid proxies found in file.");return}D(""),w($e)}catch{D("Failed to read file.")}finally{H.current&&(H.current.value="")}};return r.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[r.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[r.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:r.jsx($y,{className:"w-5 h-5"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Proxies"}),r.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Set defaults and rotate per task"})]}),r.jsx("div",{className:"ml-auto",children:r.jsxs("button",{onClick:p,disabled:f,className:"px-4 py-2 rounded-xl border border-white/10 text-[9px] font-bold uppercase tracking-widest text-white hover:bg-white/5 transition-all disabled:opacity-50 inline-flex items-center gap-2",children:[r.jsx(Op,{className:`w-3 h-3 ${f?"animate-spin":""}`}),"Refresh"]})})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsx("input",{type:"text",placeholder:"Proxy server (host:port or scheme://host:port)",value:q,onChange:Z=>_(Z.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white"}),r.jsx("input",{type:"text",placeholder:"Label (optional)",value:$,onChange:Z=>ne(Z.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white"}),r.jsx("input",{type:"text",placeholder:"Username (optional)",value:j,onChange:Z=>O(Z.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white"}),r.jsx("input",{type:"password",placeholder:"Password (optional)",value:U,onChange:Z=>Y(Z.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white"})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("button",{onClick:J,className:"px-6 py-3 rounded-2xl text-[9px] font-bold uppercase tracking-widest bg-white text-black hover:scale-105 transition-all",children:"Add Proxy"}),r.jsx("button",{onClick:()=>H.current?.click(),className:"px-6 py-3 rounded-2xl text-[9px] font-bold uppercase tracking-widest border border-white/10 text-white hover:bg-white/5 transition-all",children:"Import"}),r.jsx("button",{onClick:()=>C("host"),className:`px-6 py-3 rounded-2xl text-[9px] font-bold uppercase tracking-widest border border-white/10 transition-all ${c?"text-white hover:bg-white/5":"bg-white/10 text-white"}`,children:"Use Host IP"})]}),r.jsx("input",{ref:H,type:"file",accept:".txt,text/plain",onChange:I,className:"hidden"}),Fe&&r.jsx("div",{className:"text-[9px] text-red-400 uppercase tracking-widest",children:Fe}),r.jsxs("label",{className:"flex items-center justify-between gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 hover:bg-white/[0.05] transition-all group",children:[r.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Rotation mode"}),r.jsxs("select",{value:u,onChange:Z=>k(Z.target.value==="random"?"random":"round-robin"),className:"bg-white/[0.05] border border-white/10 rounded-xl px-3 py-2 text-[10px] text-white uppercase tracking-widest",children:[r.jsx("option",{value:"round-robin",children:"Round robin"}),r.jsx("option",{value:"random",children:"Random"})]})]}),r.jsxs("label",{className:"flex items-center gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 hover:bg-white/[0.05] transition-all cursor-pointer group",children:[r.jsx("input",{type:"checkbox",checked:d,onChange:Z=>S(Z.target.checked),className:"w-4 h-4 rounded border-white/20 bg-transparent"}),r.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Include default IP in rotation pool"})]}),r.jsxs("div",{className:"space-y-3",children:[f&&r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading proxies..."}),!f&&i.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No proxies saved yet."}),!f&&i.map(Z=>{const ce=Z.id===c,he=Z.id===ee;return r.jsx("div",{className:"flex items-center justify-between gap-4 p-4 rounded-2xl border border-white/10 bg-white/[0.02]",children:he?r.jsxs("div",{className:"w-full space-y-3",children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[r.jsx("input",{type:"text",value:P,onChange:be=>fe(be.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-2 text-[10px] text-white"}),r.jsx("input",{type:"text",value:nt,onChange:be=>Te(be.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-2 text-[10px] text-white"}),r.jsx("input",{type:"text",value:ie,onChange:be=>le(be.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-2 text-[10px] text-white"}),r.jsx("input",{type:"password",value:Ye,onChange:be=>ye(be.target.value),placeholder:"Password (leave blank to keep)",className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-2 text-[10px] text-white"})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{onClick:v,className:"px-3 py-2 rounded-xl border border-white/10 text-[9px] font-bold uppercase tracking-widest text-white hover:bg-white/5 transition-all",children:"Save"}),r.jsx("button",{onClick:me,className:"px-3 py-2 rounded-xl border border-white/10 text-[9px] font-bold uppercase tracking-widest text-white/70 hover:bg-white/5 transition-all",children:"Cancel"})]})]}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest",children:Z.label||Z.server}),r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:Z.server})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("button",{onClick:()=>C(Z.id),className:`px-3 py-2 rounded-xl border text-[9px] font-bold uppercase tracking-widest transition-all inline-flex items-center gap-2 ${ce?"bg-white text-black border-white":"border-white/10 text-white hover:bg-white/5"}`,children:[ce?r.jsx(ev,{className:"w-3 h-3"}):r.jsx(Iy,{className:"w-3 h-3"}),ce?"Default":"Set Default"]}),Z.id!=="host"&&r.jsxs(r.Fragment,{children:[r.jsx("button",{onClick:()=>de(Z),className:"px-3 py-2 rounded-xl border border-white/10 text-[9px] font-bold uppercase tracking-widest text-white hover:bg-white/5 transition-all",children:"Edit"}),r.jsxs("button",{onClick:()=>g(Z.id),className:"px-3 py-2 rounded-xl border border-red-500/20 text-[9px] font-bold uppercase tracking-widest text-red-300 hover:bg-red-500/10 transition-all inline-flex items-center gap-2",children:[r.jsx(Hu,{className:"w-3 h-3"}),"Delete"]})]})]})]})},Z.id)})]})]})},ub=({selection:i,options:c,loading:d,onChange:u})=>r.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-4",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"User Agent"}),r.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Default browser identity"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsxs("select",{value:i,onChange:f=>u(f.target.value),disabled:d,className:"w-full bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white uppercase tracking-widest disabled:opacity-60",children:[r.jsx("option",{value:"system",children:"System user agent (default)"}),c.map(f=>r.jsx("option",{value:f,children:f},f))]}),r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Applies when rotate UA is disabled in tasks."})]})]}),ob=({version:i})=>{const[c,d]=x.useState(!1),u=i?`v${i}`:"Unknown",f=async()=>{const p=i||u;try{if(typeof navigator<"u"&&navigator.clipboard&&typeof window<"u"&&window.isSecureContext)await navigator.clipboard.writeText(p);else if(typeof document<"u"){const w=document.createElement("textarea");w.value=p,w.style.position="fixed",w.style.opacity="0",document.body.appendChild(w),w.select(),document.execCommand("copy"),document.body.removeChild(w)}d(!0),setTimeout(()=>d(!1),1500)}catch{d(!1)}};return r.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[r.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[r.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:r.jsx(Pg,{className:"w-5 h-5"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Version"}),r.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Package metadata"})]})]}),r.jsxs("div",{className:"flex items-center justify-between gap-4",children:[r.jsx("div",{className:"text-[9px] font-bold uppercase tracking-[0.3em] text-white",children:u}),r.jsx("button",{onClick:f,className:"px-4 py-2 rounded-xl border border-white/10 text-[9px] font-bold uppercase tracking-widest text-white hover:bg-white/5 transition-all",type:"button",children:c?"Copied":"Copy version"})]})]})},db="0.5.6",fb={version:db},hb=fb.version,pb=({onClearStorage:i,onConfirm:c,onNotify:d})=>{const[u,f]=x.useState("system"),[p,m]=x.useState([]),[w,b]=x.useState([]),[g,C]=x.useState([]),[S,k]=x.useState(!1),[q,_]=x.useState(null),[j,O]=x.useState(!1),[U,Y]=x.useState(!1),[$,ne]=x.useState(30),[ee,te]=x.useState([]),[P,fe]=x.useState(null),[ie,le]=x.useState(!1),[Ye,ye]=x.useState("round-robin"),[nt,Te]=x.useState(!1),[Fe,D]=x.useState("system"),[H,J]=x.useState([]),[de,me]=x.useState(!1),v="doppelganger.layout.leftWidthPct";x.useEffect(()=>{try{const se=localStorage.getItem(v);if(se){const xe=Math.min(75,Math.max(25,Math.round(parseFloat(se)*100)));Number.isNaN(xe)||ne(xe)}}catch{}},[]);const B=async()=>{k(!0);try{const[se,xe]=await Promise.all([fetch("/api/data/captures"),fetch("/api/data/cookies")]),ue=se.ok?await se.json():{captures:[]},Se=xe.ok?await xe.json():{cookies:[],origins:[]};m(Array.isArray(ue.captures)?ue.captures:[]),b(Array.isArray(Se.cookies)?Se.cookies:[]),C(Array.isArray(Se.origins)?Se.origins:[])}catch{m([]),b([]),C([])}finally{k(!1)}},I=async se=>{if(!await c(`Delete capture ${se}?`))return;(await fetch(`/api/data/captures/${encodeURIComponent(se)}`,{method:"DELETE"})).ok?(d("Capture deleted.","success"),B()):d("Delete failed.","error")},Z=async se=>{if(!await c(`Delete cookie ${se.name}?`))return;(await fetch("/api/data/cookies/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:se.name,domain:se.domain,path:se.path})})).ok?(d("Cookie deleted.","success"),B()):d("Delete failed.","error")},ce=async()=>{O(!0);try{const se=await fetch("/api/settings/api-key",{credentials:"include"});if(!se.ok){se.status===401&&d("Session expired. Please log in again.","error"),_(null);return}const xe=await se.json();_(xe.apiKey||null)}catch{_(null)}finally{O(!1)}},he=async()=>{Te(!0);try{const se=await fetch("/api/settings/proxies",{credentials:"include"});if(!se.ok){se.status===401&&d("Session expired. Please log in again.","error"),te([]),fe(null),ye("round-robin");return}const xe=await se.json();te(Array.isArray(xe.proxies)?xe.proxies:[]),fe(xe.defaultProxyId||null),le(!!xe.includeDefaultInRotation),ye(xe.rotationMode==="random"?"random":"round-robin")}catch{te([]),fe(null),le(!1),ye("round-robin")}finally{Te(!1)}},be=async se=>{Te(!0);try{const xe=await fetch("/api/settings/proxies",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(se)});if(!xe.ok){let Se="";try{const At=await xe.json();Se=At?.error||At?.message||""}catch{Se=""}d(`Failed to add proxy${Se?`: ${Se}`:""}.`,"error");return}const ue=await xe.json();te(Array.isArray(ue.proxies)?ue.proxies:[]),fe(ue.defaultProxyId||null),le(!!ue.includeDefaultInRotation),ye(ue.rotationMode==="random"?"random":"round-robin"),d("Proxy added.","success")}catch{d("Failed to add proxy.","error")}finally{Te(!1)}},$e=async()=>{me(!0);try{const se=await fetch("/api/settings/user-agent",{credentials:"include"});if(!se.ok){se.status===401&&d("Session expired. Please log in again.","error"),D("system"),J([]);return}const xe=await se.json();D(xe.selection==="system"?"system":String(xe.selection||"system")),J(Array.isArray(xe.userAgents)?xe.userAgents:[])}catch{D("system"),J([])}finally{me(!1)}},Ue=async se=>{me(!0);try{const xe=await fetch("/api/settings/user-agent",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({selection:se})});if(!xe.ok){d("Failed to update user agent.","error");return}const ue=await xe.json();D(ue.selection==="system"?"system":String(ue.selection||"system")),J(Array.isArray(ue.userAgents)?ue.userAgents:[]),d("User agent updated.","success")}catch{d("Failed to update user agent.","error")}finally{me(!1)}},kt=async se=>{if(!se.length){d("No valid proxies found in file.","error");return}Te(!0);try{const xe=await fetch("/api/settings/proxies/import",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({proxies:se})});if(!xe.ok){let Se="";try{const At=await xe.json();Se=At?.error||At?.message||""}catch{Se=""}d(`Failed to import proxies${Se?`: ${Se}`:""}.`,"error");return}const ue=await xe.json();te(Array.isArray(ue.proxies)?ue.proxies:[]),fe(ue.defaultProxyId||null),le(!!ue.includeDefaultInRotation),ye(ue.rotationMode==="random"?"random":"round-robin"),d("Proxies imported.","success")}catch{d("Failed to import proxies.","error")}finally{Te(!1)}},Wt=async(se,xe)=>{Te(!0);try{const ue=await fetch(`/api/settings/proxies/${encodeURIComponent(se)}`,{method:"PUT",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(xe)});if(!ue.ok){let At="";try{const ua=await ue.json();At=ua?.error||ua?.message||""}catch{At=""}d(`Failed to update proxy${At?`: ${At}`:""}.`,"error");return}const Se=await ue.json();te(Array.isArray(Se.proxies)?Se.proxies:[]),fe(Se.defaultProxyId||null),le(!!Se.includeDefaultInRotation),ye(Se.rotationMode==="random"?"random":"round-robin"),d("Proxy updated.","success")}catch{d("Failed to update proxy.","error")}finally{Te(!1)}},Ea=async se=>{if(!(se==="host"||!await c("Delete this proxy?"))){Te(!0);try{const ue=await fetch(`/api/settings/proxies/${encodeURIComponent(se)}`,{method:"DELETE",credentials:"include"});if(!ue.ok){d("Delete failed.","error");return}const Se=await ue.json();te(Array.isArray(Se.proxies)?Se.proxies:[]),fe(Se.defaultProxyId||null),le(!!Se.includeDefaultInRotation),ye(Se.rotationMode==="random"?"random":"round-robin"),d("Proxy deleted.","success")}catch{d("Delete failed.","error")}finally{Te(!1)}}},Ja=async se=>{const xe=se==="host"?null:se;Te(!0);try{const ue=await fetch("/api/settings/proxies/default",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({id:xe})});if(!ue.ok){d("Failed to set default.","error");return}const Se=await ue.json();te(Array.isArray(Se.proxies)?Se.proxies:[]),fe(Se.defaultProxyId||null),le(!!Se.includeDefaultInRotation),ye(Se.rotationMode==="random"?"random":"round-robin"),d("Default proxy updated.","success")}catch{d("Failed to set default.","error")}finally{Te(!1)}},wt=async se=>{Te(!0);try{const xe=await fetch("/api/settings/proxies/rotation",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({includeDefaultInRotation:se})});if(!xe.ok){d("Failed to update rotation setting.","error");return}const ue=await xe.json();te(Array.isArray(ue.proxies)?ue.proxies:[]),fe(ue.defaultProxyId||null),le(!!ue.includeDefaultInRotation),ye(ue.rotationMode==="random"?"random":"round-robin"),d("Rotation setting updated.","success")}catch{d("Failed to update rotation setting.","error")}finally{Te(!1)}},ca=async se=>{Te(!0);try{const xe=await fetch("/api/settings/proxies/rotation",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({rotationMode:se})});if(!xe.ok){d("Failed to update rotation mode.","error");return}const ue=await xe.json();te(Array.isArray(ue.proxies)?ue.proxies:[]),fe(ue.defaultProxyId||null),le(!!ue.includeDefaultInRotation),ye(ue.rotationMode==="random"?"random":"round-robin"),d("Rotation mode updated.","success")}catch{d("Failed to update rotation mode.","error")}finally{Te(!1)}},ma=async()=>{Y(!0);try{const se=await fetch("/api/settings/api-key",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include"});if(!se.ok){let ue="";try{const Se=await se.json();ue=Se?.error||Se?.message||""}catch{ue=""}se.status===401?d("Session expired. Please log in again.","error"):d(`Failed to generate API key${ue?`: ${ue}`:""}.`,"error");return}const xe=await se.json();_(xe.apiKey||null),d("API key generated.","success")}catch{d("Failed to generate API key.","error")}finally{Y(!1)}},xa=async()=>{if(q)try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(q);else{const se=document.createElement("textarea");se.value=q,se.style.position="fixed",se.style.opacity="0",document.body.appendChild(se),se.select();const xe=document.execCommand("copy");if(document.body.removeChild(se),!xe)throw new Error("Copy failed")}d("API key copied.","success")}catch{d("Copy failed.","error")}};return x.useEffect(()=>{u==="data"&&B(),u==="system"&&(ce(),$e()),u==="proxies"&&he()},[u]),x.useEffect(()=>{try{localStorage.setItem(v,String($/100))}catch{}},[$]),r.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:r.jsxs("div",{className:"max-w-3xl mx-auto space-y-8",children:[r.jsx(sb,{tab:u,onTabChange:f}),u==="system"&&r.jsxs(r.Fragment,{children:[r.jsx(Iv,{apiKey:q,loading:j,saving:U,onRegenerate:ma,onCopy:xa}),r.jsx(ub,{selection:Fe,options:H,loading:de,onChange:Ue}),r.jsx(rb,{splitPercent:$,onChange:ne,onReset:()=>ne(30)}),r.jsx(ob,{version:hb}),r.jsx(Pv,{onClearStorage:i})]}),u==="data"&&r.jsxs(r.Fragment,{children:[r.jsx(nb,{captures:p,loading:S,onRefresh:B,onDelete:I}),r.jsx(ib,{cookies:w,originsCount:g.length,loading:S,onClear:()=>i("cookies"),onDelete:Z})]}),u==="proxies"&&r.jsx(cb,{proxies:ee,defaultProxyId:P,includeDefaultInRotation:ie,rotationMode:Ye,loading:nt,onRefresh:he,onAdd:be,onImport:kt,onUpdate:Wt,onDelete:Ea,onSetDefault:Ja,onToggleIncludeDefault:wt,onRotationModeChange:ca})]})})},Mu=({title:i="Loading",subtitle:c})=>r.jsxs("div",{className:"fixed inset-0 z-[80] bg-[#020202] flex items-center justify-center",children:[r.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none",style:{backgroundImage:"radial-gradient(#fff 1px, transparent 1px)",backgroundSize:"40px 40px"}}),r.jsxs("div",{className:"glass-card p-10 rounded-[40px] text-center space-y-4",children:[r.jsx("div",{className:"w-12 h-12 mx-auto rounded-full border border-white/10 flex items-center justify-center",children:r.jsx("div",{className:"w-5 h-5 border-2 border-white/20 border-t-white rounded-full animate-spin"})}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.4em] text-gray-500",children:i}),c&&r.jsx("p",{className:"text-xs font-mono text-white/80",children:c})]})]})]}),Ws=140,mb=6,xb=4,gb=({index:i,style:c,data:d})=>{const u=d.items[i];return u?r.jsxs("div",{style:c,onClick:()=>d.navigate(`/executions/${u.id}`),onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),d.navigate(`/executions/${u.id}`))},role:"button",tabIndex:0,className:"glass-card w-full rounded-2xl p-5 flex items-center gap-4 text-left hover:bg-white/[0.06] transition-all cursor-pointer",children:[r.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:u.source==="api"?r.jsx(ly,{className:"w-5 h-5"}):r.jsx(Ry,{className:"w-5 h-5"})}),r.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[r.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest truncate",children:u.taskName||u.mode}),r.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[new Date(u.timestamp).toLocaleString()," | ",u.source," | ",u.mode," | ",u.status," | ",u.durationMs,"ms"]}),u.url&&r.jsx("div",{className:"text-[9px] text-white/50 truncate font-mono",children:u.url})]}),r.jsx("button",{onClick:f=>{f.stopPropagation(),d.deleteExecution(u.id)},className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-red-500/5 border border-red-500/10 text-red-400 hover:bg-red-500/10 transition-all",children:"Delete"})]}):null},yb=({onConfirm:i,onNotify:c})=>{const d=Mn(),[u,f]=x.useState([]),[p,m]=x.useState("all"),[w,b]=x.useState(!1),g=x.useCallback(async()=>{b(!0);try{const q=await fetch("/api/executions");if(!q.ok)throw new Error("Failed to load");const _=await q.json();f(Array.isArray(_.executions)?_.executions:[])}catch{f([])}finally{b(!1)}},[]),C=x.useCallback(async()=>{if(!await i("Clear all executions?"))return;(await fetch("/api/executions/clear",{method:"POST"})).ok?(c("Executions cleared.","success"),g()):c("Clear failed.","error")},[g,i,c]),S=x.useCallback(async q=>{if(!await i("Delete this execution?"))return;(await fetch(`/api/executions/${q}`,{method:"DELETE"})).ok?(c("Execution deleted.","success"),f(O=>O.filter(U=>U.id!==q))):c("Delete failed.","error")},[i,c]);x.useEffect(()=>{g()},[g]);const k=x.useMemo(()=>u.filter(q=>p==="all"?!0:q.source===p),[u,p]);return r.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:r.jsxs("div",{className:"max-w-6xl mx-auto space-y-8",children:[r.jsxs("div",{className:"flex items-end justify-between",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("p",{className:"text-[10px] font-bold text-blue-400 uppercase tracking-[0.4em]",children:"Executions"}),r.jsx("h2",{className:"text-4xl font-bold tracking-tighter text-white",children:"Run History"})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"flex bg-white/5 rounded-xl p-1 border border-white/5",children:["all","editor","api"].map(q=>r.jsx("button",{onClick:()=>m(q),className:`px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-lg transition-all ${p===q?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:q},q))}),r.jsx("button",{onClick:g,className:"w-10 h-10 rounded-2xl border border-white/10 text-gray-400 hover:text-white hover:bg-white/5 transition-all flex items-center justify-center",title:"Refresh",children:r.jsx(Op,{className:"w-4 h-4"})}),r.jsx("button",{onClick:C,className:"w-10 h-10 rounded-2xl border border-red-500/20 text-red-400 hover:bg-red-500/10 transition-all flex items-center justify-center",title:"Clear all",children:r.jsx(Hu,{className:"w-4 h-4"})})]})]}),w&&r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading executions..."}),!w&&k.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No executions found."}),!w&&k.length>0&&r.jsx(lr,{height:Math.min(Math.max(Ws,k.length*Ws),Ws*mb),itemCount:k.length,itemSize:Ws,width:"100%",overscanCount:xb,itemData:{items:k,deleteExecution:S,navigate:d},children:gb})]})})},vb=i=>{if(!i.result)return null;const c=i.result||{};return{url:i.url||c.url||"",finalUrl:c.final_url||c.finalUrl,html:c.html,data:c.data??c.html??"",screenshotUrl:c.screenshot_url||c.screenshotUrl,logs:c.logs||[],timestamp:new Date(i.timestamp).toLocaleTimeString()}},bb=({onConfirm:i,onNotify:c})=>{const{id:d}=bp(),u=Mn(),[f,p]=x.useState(null),[m,w]=x.useState(!1);if(x.useEffect(()=>{(async()=>{if(d){w(!0);try{const C=await fetch(`/api/executions/${d}`);if(!C.ok)throw new Error("Failed to load execution");const S=await C.json();p(S.execution||null)}catch{p(null)}finally{w(!1)}}})()},[d]),m)return r.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:r.jsx("div",{className:"max-w-6xl mx-auto text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading execution..."})});if(!f)return r.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:r.jsxs("div",{className:"max-w-6xl mx-auto space-y-6",children:[r.jsx("button",{onClick:()=>u("/executions"),className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all",children:"Back"}),r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"Execution not found."})]})});const b=vb(f);return r.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:r.jsxs("div",{className:"max-w-6xl mx-auto space-y-8",children:[r.jsxs("div",{className:"flex items-end justify-between",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("p",{className:"text-[10px] font-bold text-blue-400 uppercase tracking-[0.4em]",children:"Execution"}),r.jsx("h2",{className:"text-3xl font-bold tracking-tighter text-white",children:f.taskName||f.mode}),r.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[new Date(f.timestamp).toLocaleString()," | ",f.source," | ",f.mode," | ",f.status," | ",f.durationMs,"ms"]})]}),r.jsx("button",{onClick:()=>u("/executions"),className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all",children:"Back"})]}),r.jsxs("div",{className:"glass-card rounded-[32px] p-8 flex flex-col min-h-[420px]",children:[r.jsx("div",{className:"flex items-center justify-between border-b border-white/5 pb-4 mb-6",children:r.jsx("span",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:"Output"})}),b?r.jsx(Hp,{results:b,isExecuting:!1,onConfirm:i,onNotify:c,fullWidth:!0}):r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"No output captured."})]})]})})},wb=360,Vp=12,Fs=wb+Vp,Sb=6,jb=4,Nb=({index:i,style:c,data:d})=>{const u=d.captures[i];return u?r.jsx("div",{style:{...c,paddingBottom:Vp},children:r.jsx(Up,{capture:u,onDelete:d.onDelete})}):null},Eb=({onConfirm:i,onNotify:c})=>{const d=Mn(),[u,f]=x.useState([]),[p,m]=x.useState(!1),w=async()=>{m(!0);try{const g=await fetch("/api/data/captures"),C=g.ok?await g.json():{captures:[]};f(Array.isArray(C.captures)?C.captures:[])}catch{f([])}finally{m(!1)}},b=x.useCallback(async g=>{if(!await i(`Delete capture ${g}?`))return;(await fetch(`/api/data/captures/${encodeURIComponent(g)}`,{method:"DELETE"})).ok?(f(k=>k.filter(q=>q.name!==g)),c("Capture deleted.","success")):c("Delete failed.","error")},[i,c]);return x.useEffect(()=>{w()},[]),r.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:r.jsxs("div",{className:"max-w-6xl mx-auto space-y-8",children:[r.jsxs("div",{className:"flex items-end justify-between",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("p",{className:"text-[10px] font-bold text-blue-400 uppercase tracking-[0.4em]",children:"Captures"}),r.jsx("h2",{className:"text-3xl font-bold tracking-tighter text-white",children:"All Captures"}),r.jsx("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:"Recordings and screenshots from every run"})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{onClick:w,className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all",children:"Refresh"}),r.jsx("button",{onClick:()=>d("/executions"),className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all",children:"Executions"})]})]}),r.jsxs("div",{className:"glass-card rounded-[32px] p-8",children:[p&&r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading captures..."}),!p&&u.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No captures found."}),!p&&u.length>0&&r.jsx("div",{className:"space-y-4",children:r.jsx(lr,{height:Math.min(Math.max(Fs,u.length*Fs),Fs*Sb),width:"100%",itemCount:u.length,itemSize:Fs,overscanCount:jb,itemData:{captures:u,onDelete:b},children:Nb})})]})]})})},Yp=({title:i="Not Found",subtitle:c="The page you requested does not exist.",onBack:d})=>r.jsx("div",{className:"h-full flex items-center justify-center px-10",children:r.jsxs("div",{className:"glass-card w-full max-w-2xl rounded-[40px] border border-white/10 p-10 text-center space-y-6",children:[r.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.4em] text-gray-500",children:"404"}),r.jsx("h2",{className:"text-3xl font-bold tracking-tighter text-white",children:i}),r.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.25em] text-gray-500",children:c}),d&&r.jsxs("button",{onClick:d,className:"mt-2 inline-flex items-center gap-2 px-6 py-3 rounded-2xl bg-white text-black text-[9px] font-bold uppercase tracking-[0.3em] hover:scale-105 transition-all",children:[r.jsx(Dy,{className:"w-4 h-4"}),"Back"]})]})}),Cb=({message:i,tone:c,onClose:d})=>{const[u,f]=x.useState(!1);return x.useEffect(()=>{const p=setTimeout(()=>{f(!0)},2500);return()=>clearTimeout(p)},[]),x.useEffect(()=>{if(!u)return;const p=setTimeout(()=>d(),240);return()=>clearTimeout(p)},[u,d]),r.jsx("div",{className:`fixed bottom-6 right-6 z-[220] max-w-sm w-full ${u?"animate-out fade-out slide-out-to-bottom-3 duration-200":"animate-in fade-in slide-in-from-bottom-3 duration-300"}`,children:r.jsxs("div",{className:`glass-card rounded-2xl border border-white/10 p-4 shadow-2xl flex items-start gap-3 ${u?"animate-out fade-out zoom-out-95 duration-200":"animate-in fade-in zoom-in-95 duration-300"}`,children:[r.jsx("div",{className:`mt-1 h-2.5 w-2.5 rounded-full ${c==="error"?"bg-red-400":"bg-emerald-400"}`}),r.jsxs("div",{className:"flex-1",children:[r.jsx("p",{className:"text-[8px] font-bold uppercase tracking-[0.35em] text-gray-500",children:"Notification"}),r.jsx("p",{className:"mt-2 font-mono text-[11px] text-white leading-relaxed",children:i})]}),r.jsx("button",{onClick:()=>f(!0),className:"px-2 py-1 text-[8px] font-bold uppercase tracking-[0.2em] text-white/60 hover:text-white",children:"Close"})]})})},Ab=({request:i,onResolve:c})=>r.jsx("div",{className:"fixed inset-0 z-[201] flex items-center justify-center bg-black/70 backdrop-blur-sm px-6",children:r.jsxs("div",{className:"glass-card w-full max-w-md rounded-[32px] border border-white/10 p-8 text-center shadow-2xl",children:[r.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.4em] text-gray-500",children:i.title??"Confirm"}),r.jsx("p",{className:"mt-4 font-mono text-sm text-white",children:i.message}),r.jsxs("div",{className:"mt-6 flex gap-4",children:[r.jsx("button",{onClick:()=>c(!1),className:"w-full rounded-2xl px-6 py-3 text-[9px] font-bold uppercase tracking-[0.3em] transition-all bg-white/5 border border-white/10 text-gray-300 hover:bg-white/10",children:i.cancelLabel??"Cancel"}),r.jsx("button",{onClick:()=>c(!0),className:"w-full rounded-2xl px-6 py-3 text-[9px] font-bold uppercase tracking-[0.3em] transition-all bg-white text-black hover:scale-105 shadow-xl shadow-white/10",children:i.confirmLabel??"Confirm"})]})]})}),Tb=({tasks:i,loadTasks:c,touchTask:d,currentTask:u,setCurrentTask:f,hasUnsavedChanges:p,onTaskLoaded:m,...w})=>{const{id:b}=bp(),g=Mn(),[C,S]=x.useState(!1),[k,q]=x.useState(!1);return x.useEffect(()=>{(async()=>{if(u?.id===b)return;S(!0),q(!1);let j=i;i.length===0&&(j=await c());const O=j.find(U=>String(U.id)===String(b));if(O){const U={...O};(!U.variables||Array.isArray(U.variables))&&(U.variables={}),U.stealth||(U.stealth={allowTypos:!1,idleMovements:!1,overscroll:!1,deadClicks:!1,fatigue:!1,naturalTyping:!1}),Array.isArray(U.actions)&&(U.actions=U.actions.map((Y,$)=>Y&&Y.id?Y:{...Y,id:`act_${Date.now()}_${$}_${Math.floor(Math.random()*1e3)}`})),U.includeShadowDom===void 0&&(U.includeShadowDom=!0),f(U),m?.(U),b&&d(b)}else q(!0);S(!1)})()},[b,i]),k?r.jsx(Yp,{title:"Task Not Found",subtitle:"This task does not exist or was deleted.",onBack:()=>g("/dashboard")}):C||!u||String(u.id)!==String(b)?r.jsx(Mu,{title:"Loading Mission Data",subtitle:"Syncing task payload"}):r.jsx(Bp,{currentTask:u,setCurrentTask:f,tasks:i,hasUnsavedChanges:p,...w})},sp=i=>{if(!i)return"";const c=JSON.parse(JSON.stringify(i));return delete c.last_opened,JSON.stringify(c)};function _b(){const i=Mn(),c=bl(),[,d]=x.useState(null),[u,f]=x.useState("checking"),[p,m]=x.useState(!1),w=x.useRef(""),[b,g]=x.useState(""),[C,S]=x.useState(!1),[k,q]=x.useState([]),[_,j]=x.useState(null),[O,U]=x.useState("visual"),[Y,$]=x.useState(!1),[ne,ee]=x.useState(null),[te,P]=x.useState({}),[fe,ie]=x.useState(""),[le,Ye]=x.useState(null),[ye,nt]=x.useState(null),[Te,Fe]=x.useState(null),D=x.useRef(null),H=x.useRef(null),J=(Q,W="success")=>{nt({message:Q,tone:W}),W==="success"&&setTimeout(()=>{nt(ae=>ae&&ae.message===Q?null:ae)},2e3)},de=Q=>new Promise(W=>{D.current=W,Fe(typeof Q=="string"?{message:Q}:Q)}),me=Q=>{const W=D.current;D.current=null,Fe(null),W&&W(Q)},v=Q=>Q&&Q[0].toUpperCase()+Q.slice(1),B=Q=>{if(typeof Q=="boolean")return Q;if(Q==null)return!1;const W=String(Q).toLowerCase();return W==="true"||W==="1"},I=Q=>{if(!Q.actions||!Array.isArray(Q.actions))return Q;let W=!1;const ae=Q.actions.map((pe,Ge)=>pe.id?pe:(W=!0,{...pe,id:`act_${Date.now()}_${Ge}_${Math.floor(Math.random()*1e3)}`}));return W?{...Q,actions:ae}:Q},Z="doppelganger.pinnedResults",he=(Q=>Q?.id?String(Q.id):"new")(_),be=_&&te[he]||null,$e=(Q,W)=>{const ae=String(Q||"").trim();if(!ae)return"Execution failed.";const pe=ae.toLowerCase();if(W==="headful"){if(pe.includes("missing x server")||pe.includes("$display"))return"Headful browser could not start because no display server is available.";if(pe.includes("failed to connect to the bus"))return"Headful browser could not start due to missing system services."}let Ge=ae;const Ie=Ge.indexOf("--disable-");return Ie>0&&(Ge=Ge.slice(0,Ie).trim()),Ge.length>240&&(Ge=`${Ge.slice(0,240)}...`),Ge||"Execution failed."},Ue=Q=>{const W=String(Q||"").toLowerCase();return W.includes("missing x server")||W.includes("$display")||W.includes("platform failed to initialize")||W.includes("no display server")},kt=()=>({name:"Imported Task",url:"",mode:"scrape",wait:3,selector:"",rotateUserAgents:!1,rotateProxies:!1,rotateViewport:!1,humanTyping:!1,stealth:{allowTypos:!1,idleMovements:!1,overscroll:!1,deadClicks:!1,fatigue:!1,naturalTyping:!1},actions:[],variables:{},includeShadowDom:!0,disableRecording:!1,statelessExecution:!1});x.useEffect(()=>{Wt()},[]),x.useEffect(()=>{try{const Q=localStorage.getItem(Z);if(Q){const W=JSON.parse(Q);W&&typeof W=="object"&&P(W)}}catch{}},[]),x.useEffect(()=>{try{localStorage.setItem(Z,JSON.stringify(te))}catch{}},[te]),x.useEffect(()=>{!c.pathname.startsWith("/tasks")&&O==="history"&&U("visual")},[c.pathname,O]),x.useEffect(()=>{if(c.pathname==="/tasks/new"&&!_){const Q=ma();j(Q),ee(null)}},[c.pathname,_]),x.useEffect(()=>{if(!_){m(!1);return}const Q=sp(_);m(Q!==w.current)},[_]),x.useEffect(()=>{if(typeof window>"u")return;const Q=W=>{p&&(W.preventDefault(),W.returnValue="")};return window.addEventListener("beforeunload",Q),()=>window.removeEventListener("beforeunload",Q)},[p]);const Wt=async()=>{try{const W=await(await fetch("/api/auth/me",{credentials:"include"})).json();if(W.authenticated)return d(W.user),f("authenticated"),wt(),!0;const pe=await(await fetch("/api/auth/check-setup",{credentials:"include"})).json();f(pe.setupRequired?"setup":"login")}catch{f("login")}return!1},Ea=(Q,W)=>{if(typeof Q!="string"||!Q)return W;switch(Q){case"ALREADY_SETUP":return"An account already exists";case"INVALID":return"Invalid credentials";case"SESSION_SAVE_FAILED":return"Unable to persist your session";default:{const ae=Q.toLowerCase().replace(/_/g," ");return ae.charAt(0).toUpperCase()+ae.slice(1)}}},Ja=async(Q,W,ae,pe)=>{if(!Q||!W){g("Email and password are required");return}if(u==="setup"&&(!ae||W!==pe)){g(ae?"Passwords do not match":"Name required");return}if(C)return;const Ge=u==="setup"?"/api/auth/setup":"/api/auth/login",Ie=u==="setup"?{name:ae,email:Q,password:W}:{email:Q,password:W};S(!0);try{const et=await fetch(Ge,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(Ie)}),Xe=await et.json().catch(()=>({}));if(et.ok)g(""),f("checking"),await Wt()?i("/"):(g("Authentication failed"),f("login"));else{const ot=u==="setup"?"Setup failed":"Invalid credentials";g(Ea(Xe?.error,ot))}}catch{g("Network error")}finally{S(!1)}},wt=async()=>{try{const ae=[...await(await fetch("/api/tasks",{credentials:"include"})).json()].sort((pe,Ge)=>(Ge.last_opened||0)-(pe.last_opened||0));return q(ae),ae}catch(Q){return console.error("Failed to load tasks",Q),[]}},ca=async()=>{await de("Are you sure you want to log out?")&&(await fetch("/api/auth/logout",{method:"POST",credentials:"include"}),d(null),f("login"),i("/"),J("Logged out.","success"))};function ma(){return{name:"Task "+Math.floor(Math.random()*100),url:"",mode:"agent",wait:3,selector:"",rotateUserAgents:!1,rotateProxies:!1,rotateViewport:!1,humanTyping:!1,stealth:{allowTypos:!1,idleMovements:!1,overscroll:!1,deadClicks:!1,fatigue:!1,naturalTyping:!1},actions:[],variables:{},extractionFormat:"json",includeShadowDom:!0,disableRecording:!1,statelessExecution:!1}}const xa=()=>{const Q=ma();w.current="",m(!0),j(Q),ee(null),i("/tasks/new")},se=Q=>{_&&P(W=>({...W,[he]:Q}))},xe=()=>{_&&P(Q=>{const W={...Q};return delete W[he],W})},ue=async Q=>{try{await fetch(`/api/tasks/${Q}/touch`,{method:"POST"}),wt()}catch(W){console.error("Failed to touch task",W)}},Se=Q=>{w.current=sp(Q),m(!1)},At=Q=>{const W={...Q};(!W.variables||Array.isArray(W.variables))&&(W.variables={}),W.stealth||(W.stealth={allowTypos:!1,idleMovements:!1,overscroll:!1,deadClicks:!1,fatigue:!1,naturalTyping:!1}),W.rotateProxies===void 0&&(W.rotateProxies=!1),W.rotateViewport===void 0&&(W.rotateViewport=!1),W.extractionFormat||(W.extractionFormat="json"),W.includeShadowDom===void 0&&(W.includeShadowDom=!0),W.disableRecording===void 0&&(W.disableRecording=!1),W.disableRecording=B(W.disableRecording),W.statelessExecution===void 0&&(W.statelessExecution=!1),W.statelessExecution=B(W.statelessExecution);const ae=I(W);j(ae),Se(ae),ee(null),i(`/tasks/${Q.id}`),Q.id&&ue(Q.id)},ua=async Q=>{await de("Are you sure you want to delete this task?")&&(await fetch(`/api/tasks/${Q}`,{method:"DELETE"}),wt(),c.pathname.includes(Q)&&i("/dashboard"))},Nt=async()=>{if(!_)return;const Q={..._,last_opened:Date.now()},ae=await(await fetch("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Q)})).json();j(ae),ie("SAVED"),setTimeout(()=>ie(""),2e3),Se(ae),wt(),c.pathname.includes("new")&&i(`/tasks/${ae.id}`,{replace:!0})},wl=async()=>{try{await fetch("/headful/stop",{method:"POST"})}catch(Q){console.error("Failed to stop headful session",Q)}finally{$(!1)}},Ut=async()=>{if(_?.mode==="headful"){await wl();return}if(le)try{await fetch("/api/executions/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runId:le})})}catch(Q){console.error("Failed to request stop",Q)}H.current&&H.current.abort(),$(!1)},Wa=async Q=>{const W=Q||_;if(!W||!W.url)return;const ae=I(W);_&&ae!==_&&j(ae);const pe=`run_${Date.now()}_${Math.floor(Math.random()*1e3)}`;if(Ye(pe),Y&&ae.mode==="headful"){await wl();return}$(!0),ee({url:ae.url,logs:[],timestamp:"Running..."});let Ge=null;try{const Ie={};Object.entries(ae.variables).forEach(([K,we])=>{Ie[K]=we.value});const et=K=>K.replace(/\{\$(\w+)\}/g,(we,Ce)=>{if(Ce==="now")return new Date().toISOString();const He=Ie[Ce];return He==null||He===""?"":String(He)}),Xe=K=>typeof K!="string"?K:et(K),ot=ae.mode!=="agent";Ge={...{...ae,url:ot?et(ae.url||""):ae.url||"",selector:ot?Xe(ae.selector):ae.selector,actions:ot?ae.actions.map(K=>({...K,selector:Xe(K.selector),value:Xe(K.value),key:Xe(K.key)})):ae.actions},taskVariables:Ie,variables:Ie,runSource:"editor",taskId:ae.id,taskName:ae.name,taskSnapshot:ae,runId:pe};const N=await(async K=>{const we=new AbortController;H.current=we;const Ce=await fetch(`/${K}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ge),signal:we.signal});if(!Ce.ok){let He=null;try{He=await Ce.json()}catch{He=null}const pt=new Error(He?.details||He?.error||"Request failed");throw pt.code=He?.error,pt}return Ce.json()})(ae.mode);ee({url:ae.url,finalUrl:N.final_url,html:N.html,data:N.data??N.html??"No data captured.",screenshotUrl:N.screenshot_url,logs:N.logs||[],timestamp:new Date().toLocaleTimeString()})}catch(Ie){if(Ie?.name==="AbortError"){J("Execution stopped.","success"),$(!1);return}if(ae?.mode==="headful"&&Ge&&(Ie?.code==="HEADFUL_DISPLAY_UNAVAILABLE"||Ue(Ie?.message||String(Ie))))try{const Xe=await(async()=>{const ot=new AbortController;H.current=ot;const oa=await fetch("/scrape",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ge),signal:ot.signal});if(!oa.ok){const A=await oa.json();throw new Error(A.details||A.error||"Request failed")}return oa.json()})();Xe.logs=["Headful display unavailable; ran headless instead.",...Xe.logs||[]],ee({url:ae.url,finalUrl:Xe.final_url,html:Xe.html,data:Xe.data??Xe.html??"No data captured.",screenshotUrl:Xe.screenshot_url,logs:Xe.logs||[],timestamp:new Date().toLocaleTimeString()}),$(!1);return}catch(Xe){const ot=$e(Xe?.message||String(Xe),ae?.mode);J(`Execution crash: ${ot}`,"error"),$(!1);return}const et=$e(Ie?.message||String(Ie),ae?.mode);J(`Execution crash: ${et}`,"error"),ae?.mode==="headful"&&$(!1)}finally{H.current=null,ae.mode!=="headful"&&$(!1)}},Ca=async()=>{await Wa()},Vl=async Q=>{if(!await de(`Delete all ${Q}?`))return;await fetch(Q==="screenshots"?"/api/clear-screenshots":"/api/clear-cookies",{method:"POST"}),J(`${v(Q)} cleared.`,"success")},Aa=()=>{const Q={exportedAt:new Date().toISOString(),tasks:k},W=new Blob([JSON.stringify(Q,null,2)],{type:"application/json"}),ae=URL.createObjectURL(W),pe=document.createElement("a"),Ge=new Date().toISOString().slice(0,10);pe.href=ae,pe.download=`doppelganger-tasks-${Ge}.json`,document.body.appendChild(pe),pe.click(),pe.remove(),URL.revokeObjectURL(ae),J("Tasks exported.","success")},De=(Q,W)=>{if(!Q||typeof Q!="object")return null;const ae=kt(),pe={...ae,...Q};return(!pe.name||typeof pe.name!="string")&&(pe.name=`Imported Task ${W+1}`),(!pe.mode||!["scrape","agent","headful"].includes(pe.mode))&&(pe.mode="scrape"),typeof pe.wait!="number"&&(pe.wait=3),pe.stealth||(pe.stealth=ae.stealth),(!pe.variables||Array.isArray(pe.variables))&&(pe.variables={}),Array.isArray(pe.actions)||(pe.actions=[]),pe.rotateProxies===void 0&&(pe.rotateProxies=!1),pe.disableRecording===void 0&&(pe.disableRecording=!1),pe.disableRecording=B(pe.disableRecording),pe.statelessExecution===void 0&&(pe.statelessExecution=!1),pe.statelessExecution=B(pe.statelessExecution),delete pe.versions,delete pe.last_opened,pe},Yl=async Q=>{try{const W=await Q.text(),ae=JSON.parse(W),pe=Array.isArray(ae)?ae:ae?.tasks;if(!Array.isArray(pe)){J("Invalid import file.","error");return}const Ge=Date.now(),Ie=pe.map((et,Xe)=>De(et,Xe)).filter(et=>!!et).map(et=>et.id?et:{...et,id:`task_${Ge}`});if(Ie.length===0){J("No tasks to import.","error");return}await Promise.all(Ie.map(et=>fetch("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(et)}))),await wt(),J(`Imported ${Ie.length} task(s).`,"success")}catch(W){J(`Import failed: ${W.message||"Unknown error"}`,"error")}},Ta=()=>c.pathname.startsWith("/tasks")?"editor":c.pathname==="/settings"?"settings":c.pathname==="/executions"?"executions":c.pathname==="/captures"?"captures":"dashboard";let ht;return u==="login"||u==="setup"?ht=r.jsx(yv,{status:u,onSubmit:Ja,error:b,busy:C}):u==="checking"?ht=r.jsx(Mu,{title:"Authenticating",subtitle:"Verifying session state"}):ht=r.jsxs("div",{className:"h-full flex flex-row overflow-hidden bg-[#020202]",children:[r.jsx(gv,{onNavigate:Q=>{Q==="dashboard"?i("/dashboard"):Q==="settings"?i("/settings"):Q==="executions"?i("/executions"):Q==="captures"&&i("/captures")},onNewTask:xa,onLogout:ca,currentScreen:Ta()}),r.jsxs(rg,{children:[r.jsx(Sa,{path:"/",element:r.jsx(Wh,{tasks:k,onNewTask:xa,onEditTask:At,onDeleteTask:ua,onExportTasks:Aa,onImportTasks:Yl})}),r.jsx(Sa,{path:"/dashboard",element:r.jsx(Wh,{tasks:k,onNewTask:xa,onEditTask:At,onDeleteTask:ua,onExportTasks:Aa,onImportTasks:Yl})}),r.jsx(Sa,{path:"/tasks/new",element:_?r.jsx(Bp,{currentTask:_,setCurrentTask:j,tasks:k,editorView:O,setEditorView:U,isExecuting:Y,onSave:Nt,onRun:Ca,onRunSnapshot:Wa,results:ne,pinnedResults:be,saveMsg:fe,onConfirm:de,onNotify:J,onPinResults:se,onUnpinResults:xe,runId:le,onStop:Ut,hasUnsavedChanges:p}):r.jsx(Mu,{title:"Initializing",subtitle:"Preparing task workspace"})}),r.jsx(Sa,{path:"/tasks/:id",element:r.jsx(Tb,{tasks:k,loadTasks:wt,touchTask:ue,currentTask:_,setCurrentTask:j,editorView:O,setEditorView:U,isExecuting:Y,onSave:Nt,onRun:Ca,onRunSnapshot:Wa,results:ne,pinnedResults:be,saveMsg:fe,onConfirm:de,onNotify:J,onPinResults:se,onUnpinResults:xe,runId:le,onStop:Ut,hasUnsavedChanges:p,onTaskLoaded:Se})}),r.jsx(Sa,{path:"/settings",element:r.jsx(pb,{onClearStorage:Vl,onConfirm:de,onNotify:J})}),r.jsx(Sa,{path:"/executions",element:r.jsx(yb,{onConfirm:de,onNotify:J})}),r.jsx(Sa,{path:"/executions/:id",element:r.jsx(bb,{onConfirm:de,onNotify:J})}),r.jsx(Sa,{path:"/captures",element:r.jsx(Eb,{onConfirm:de,onNotify:J})}),r.jsx(Sa,{path:"*",element:r.jsx(Yp,{onBack:()=>i("/dashboard")})})]})]}),r.jsxs("div",{className:"h-full",children:[ye&&r.jsx(Cb,{message:ye.message,tone:ye.tone,onClose:()=>nt(null)}),Te&&r.jsx(Ab,{request:Te,onResolve:me}),ht]})}ox.createRoot(document.getElementById("root")).render(r.jsx(ax.StrictMode,{children:r.jsx(Mg,{children:r.jsx(_b,{})})}));