leglas 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +434 -35
- package/dist/index.js +434 -35
- package/dist/shell/assets/{index-CuUL6FpW.js → index-DbONqSbP.js} +8 -8
- package/dist/shell/index.html +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))r(d);new MutationObserver(d=>{for(const g of d)if(g.type==="childList")for(const b of g.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&r(b)}).observe(document,{childList:!0,subtree:!0});function f(d){const g={};return d.integrity&&(g.integrity=d.integrity),d.referrerPolicy&&(g.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?g.credentials="include":d.crossOrigin==="anonymous"?g.credentials="omit":g.credentials="same-origin",g}function r(d){if(d.ep)return;d.ep=!0;const g=f(d);fetch(d.href,g)}})();var Fo={exports:{}},xu={};var F0;function Nm(){if(F0)return xu;F0=1;var u=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function f(r,d,g){var b=null;if(g!==void 0&&(b=""+g),d.key!==void 0&&(b=""+d.key),"key"in d){g={};for(var C in d)C!=="key"&&(g[C]=d[C])}else g=d;return d=g.ref,{$$typeof:u,type:r,key:b,ref:d!==void 0?d:null,props:g}}return xu.Fragment=s,xu.jsx=f,xu.jsxs=f,xu}var W0;function Tm(){return W0||(W0=1,Fo.exports=Nm()),Fo.exports}var o=Tm(),Wo={exports:{}},Ne={};var I0;function Dm(){if(I0)return Ne;I0=1;var u=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),b=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),K=Symbol.iterator;function G(v){return v===null||typeof v!="object"?null:(v=K&&v[K]||v["@@iterator"],typeof v=="function"?v:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ne=Object.assign,oe={};function Z(v,L,F){this.props=v,this.context=L,this.refs=oe,this.updater=F||R}Z.prototype.isReactComponent={},Z.prototype.setState=function(v,L){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,L,"setState")},Z.prototype.forceUpdate=function(v){this.updater.enqueueForceUpdate(this,v,"forceUpdate")};function X(){}X.prototype=Z.prototype;function W(v,L,F){this.props=v,this.context=L,this.refs=oe,this.updater=F||R}var ie=W.prototype=new X;ie.constructor=W,ne(ie,Z.prototype),ie.isPureReactComponent=!0;var ue=Array.isArray;function p(){}var I={H:null,A:null,T:null,S:null},fe=Object.prototype.hasOwnProperty;function me(v,L,F){var ee=F.ref;return{$$typeof:u,type:v,key:L,ref:ee!==void 0?ee:null,props:F}}function ge(v,L){return me(v.type,L,v.props)}function Me(v){return typeof v=="object"&&v!==null&&v.$$typeof===u}function he(v){var L={"=":"=0",":":"=2"};return"$"+v.replace(/[=:]/g,function(F){return L[F]})}var qe=/\/+/g;function Ae(v,L){return typeof v=="object"&&v!==null&&v.key!=null?he(""+v.key):L.toString(36)}function Be(v){switch(v.status){case"fulfilled":return v.value;case"rejected":throw v.reason;default:switch(typeof v.status=="string"?v.then(p,p):(v.status="pending",v.then(function(L){v.status==="pending"&&(v.status="fulfilled",v.value=L)},function(L){v.status==="pending"&&(v.status="rejected",v.reason=L)})),v.status){case"fulfilled":return v.value;case"rejected":throw v.reason}}throw v}function D(v,L,F,ee,ce){var ve=typeof v;(ve==="undefined"||ve==="boolean")&&(v=null);var U=!1;if(v===null)U=!0;else switch(ve){case"bigint":case"string":case"number":U=!0;break;case"object":switch(v.$$typeof){case u:case s:U=!0;break;case O:return U=v._init,D(U(v._payload),L,F,ee,ce)}}if(U)return ce=ce(v),U=ee===""?"."+Ae(v,0):ee,ue(ce)?(F="",U!=null&&(F=U.replace(qe,"$&/")+"/"),D(ce,L,F,"",function(le){return le})):ce!=null&&(Me(ce)&&(ce=ge(ce,F+(ce.key==null||v&&v.key===ce.key?"":(""+ce.key).replace(qe,"$&/")+"/")+U)),L.push(ce)),1;U=0;var V=ee===""?".":ee+":";if(ue(v))for(var J=0;J<v.length;J++)ee=v[J],ve=V+Ae(ee,J),U+=D(ee,L,F,ve,ce);else if(J=G(v),typeof J=="function")for(v=J.call(v),J=0;!(ee=v.next()).done;)ee=ee.value,ve=V+Ae(ee,J++),U+=D(ee,L,F,ve,ce);else if(ve==="object"){if(typeof v.then=="function")return D(Be(v),L,F,ee,ce);throw L=String(v),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(v).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return U}function Q(v,L,F){if(v==null)return v;var ee=[],ce=0;return D(v,ee,"","",function(ve){return L.call(F,ve,ce++)}),ee}function te(v){if(v._status===-1){var L=v._result;L=L(),L.then(function(F){(v._status===0||v._status===-1)&&(v._status=1,v._result=F)},function(F){(v._status===0||v._status===-1)&&(v._status=2,v._result=F)}),v._status===-1&&(v._status=0,v._result=L)}if(v._status===1)return v._result.default;throw v._result}var xe=typeof reportError=="function"?reportError:function(v){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=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(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",v);return}console.error(v)},Ce={map:Q,forEach:function(v,L,F){Q(v,function(){L.apply(this,arguments)},F)},count:function(v){var L=0;return Q(v,function(){L++}),L},toArray:function(v){return Q(v,function(L){return L})||[]},only:function(v){if(!Me(v))throw Error("React.Children.only expected to receive a single React element child.");return v}};return Ne.Activity=_,Ne.Children=Ce,Ne.Component=Z,Ne.Fragment=f,Ne.Profiler=d,Ne.PureComponent=W,Ne.StrictMode=r,Ne.Suspense=w,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(v){return I.H.useMemoCache(v)}},Ne.cache=function(v){return function(){return v.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(v,L,F){if(v==null)throw Error("The argument must be a React element, but you passed "+v+".");var ee=ne({},v.props),ce=v.key;if(L!=null)for(ve in L.key!==void 0&&(ce=""+L.key),L)!fe.call(L,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&L.ref===void 0||(ee[ve]=L[ve]);var ve=arguments.length-2;if(ve===1)ee.children=F;else if(1<ve){for(var U=Array(ve),V=0;V<ve;V++)U[V]=arguments[V+2];ee.children=U}return me(v.type,ce,ee)},Ne.createContext=function(v){return v={$$typeof:b,_currentValue:v,_currentValue2:v,_threadCount:0,Provider:null,Consumer:null},v.Provider=v,v.Consumer={$$typeof:g,_context:v},v},Ne.createElement=function(v,L,F){var ee,ce={},ve=null;if(L!=null)for(ee in L.key!==void 0&&(ve=""+L.key),L)fe.call(L,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(ce[ee]=L[ee]);var U=arguments.length-2;if(U===1)ce.children=F;else if(1<U){for(var V=Array(U),J=0;J<U;J++)V[J]=arguments[J+2];ce.children=V}if(v&&v.defaultProps)for(ee in U=v.defaultProps,U)ce[ee]===void 0&&(ce[ee]=U[ee]);return me(v,ve,ce)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(v){return{$$typeof:C,render:v}},Ne.isValidElement=Me,Ne.lazy=function(v){return{$$typeof:O,_payload:{_status:-1,_result:v},_init:te}},Ne.memo=function(v,L){return{$$typeof:x,type:v,compare:L===void 0?null:L}},Ne.startTransition=function(v){var L=I.T,F={};I.T=F;try{var ee=v(),ce=I.S;ce!==null&&ce(F,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(p,xe)}catch(ve){xe(ve)}finally{L!==null&&F.types!==null&&(L.types=F.types),I.T=L}},Ne.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},Ne.use=function(v){return I.H.use(v)},Ne.useActionState=function(v,L,F){return I.H.useActionState(v,L,F)},Ne.useCallback=function(v,L){return I.H.useCallback(v,L)},Ne.useContext=function(v){return I.H.useContext(v)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(v,L){return I.H.useDeferredValue(v,L)},Ne.useEffect=function(v,L){return I.H.useEffect(v,L)},Ne.useEffectEvent=function(v){return I.H.useEffectEvent(v)},Ne.useId=function(){return I.H.useId()},Ne.useImperativeHandle=function(v,L,F){return I.H.useImperativeHandle(v,L,F)},Ne.useInsertionEffect=function(v,L){return I.H.useInsertionEffect(v,L)},Ne.useLayoutEffect=function(v,L){return I.H.useLayoutEffect(v,L)},Ne.useMemo=function(v,L){return I.H.useMemo(v,L)},Ne.useOptimistic=function(v,L){return I.H.useOptimistic(v,L)},Ne.useReducer=function(v,L,F){return I.H.useReducer(v,L,F)},Ne.useRef=function(v){return I.H.useRef(v)},Ne.useState=function(v){return I.H.useState(v)},Ne.useSyncExternalStore=function(v,L,F){return I.H.useSyncExternalStore(v,L,F)},Ne.useTransition=function(){return I.H.useTransition()},Ne.version="19.2.8",Ne}var P0;function vr(){return P0||(P0=1,Wo.exports=Dm()),Wo.exports}var M=vr(),Io={exports:{}},Su={},Po={exports:{}},er={};var e1;function zm(){return e1||(e1=1,(function(u){function s(D,Q){var te=D.length;D.push(Q);e:for(;0<te;){var xe=te-1>>>1,Ce=D[xe];if(0<d(Ce,Q))D[xe]=Q,D[te]=Ce,te=xe;else break e}}function f(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var Q=D[0],te=D.pop();if(te!==Q){D[0]=te;e:for(var xe=0,Ce=D.length,v=Ce>>>1;xe<v;){var L=2*(xe+1)-1,F=D[L],ee=L+1,ce=D[ee];if(0>d(F,te))ee<Ce&&0>d(ce,F)?(D[xe]=ce,D[ee]=te,xe=ee):(D[xe]=F,D[L]=te,xe=L);else if(ee<Ce&&0>d(ce,te))D[xe]=ce,D[ee]=te,xe=ee;else break e}}return Q}function d(D,Q){var te=D.sortIndex-Q.sortIndex;return te!==0?te:D.id-Q.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var g=performance;u.unstable_now=function(){return g.now()}}else{var b=Date,C=b.now();u.unstable_now=function(){return b.now()-C}}var w=[],x=[],O=1,_=null,K=3,G=!1,R=!1,ne=!1,oe=!1,Z=typeof setTimeout=="function"?setTimeout:null,X=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function ie(D){for(var Q=f(x);Q!==null;){if(Q.callback===null)r(x);else if(Q.startTime<=D)r(x),Q.sortIndex=Q.expirationTime,s(w,Q);else break;Q=f(x)}}function ue(D){if(ne=!1,ie(D),!R)if(f(w)!==null)R=!0,p||(p=!0,he());else{var Q=f(x);Q!==null&&Be(ue,Q.startTime-D)}}var p=!1,I=-1,fe=5,me=-1;function ge(){return oe?!0:!(u.unstable_now()-me<fe)}function Me(){if(oe=!1,p){var D=u.unstable_now();me=D;var Q=!0;try{e:{R=!1,ne&&(ne=!1,X(I),I=-1),G=!0;var te=K;try{t:{for(ie(D),_=f(w);_!==null&&!(_.expirationTime>D&&ge());){var xe=_.callback;if(typeof xe=="function"){_.callback=null,K=_.priorityLevel;var Ce=xe(_.expirationTime<=D);if(D=u.unstable_now(),typeof Ce=="function"){_.callback=Ce,ie(D),Q=!0;break t}_===f(w)&&r(w),ie(D)}else r(w);_=f(w)}if(_!==null)Q=!0;else{var v=f(x);v!==null&&Be(ue,v.startTime-D),Q=!1}}break e}finally{_=null,K=te,G=!1}Q=void 0}}finally{Q?he():p=!1}}}var he;if(typeof W=="function")he=function(){W(Me)};else if(typeof MessageChannel<"u"){var qe=new MessageChannel,Ae=qe.port2;qe.port1.onmessage=Me,he=function(){Ae.postMessage(null)}}else he=function(){Z(Me,0)};function Be(D,Q){I=Z(function(){D(u.unstable_now())},Q)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(D){D.callback=null},u.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},u.unstable_getCurrentPriorityLevel=function(){return K},u.unstable_next=function(D){switch(K){case 1:case 2:case 3:var Q=3;break;default:Q=K}var te=K;K=Q;try{return D()}finally{K=te}},u.unstable_requestPaint=function(){oe=!0},u.unstable_runWithPriority=function(D,Q){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var te=K;K=D;try{return Q()}finally{K=te}},u.unstable_scheduleCallback=function(D,Q,te){var xe=u.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?xe+te:xe):te=xe,D){case 1:var Ce=-1;break;case 2:Ce=250;break;case 5:Ce=1073741823;break;case 4:Ce=1e4;break;default:Ce=5e3}return Ce=te+Ce,D={id:O++,callback:Q,priorityLevel:D,startTime:te,expirationTime:Ce,sortIndex:-1},te>xe?(D.sortIndex=te,s(x,D),f(w)===null&&D===f(x)&&(ne?(X(I),I=-1):ne=!0,Be(ue,te-xe))):(D.sortIndex=Ce,s(w,D),R||G||(R=!0,p||(p=!0,he()))),D},u.unstable_shouldYield=ge,u.unstable_wrapCallback=function(D){var Q=K;return function(){var te=K;K=Q;try{return D.apply(this,arguments)}finally{K=te}}}})(er)),er}var t1;function Om(){return t1||(t1=1,Po.exports=zm()),Po.exports}var tr={exports:{}},Qt={};var n1;function Rm(){if(n1)return Qt;n1=1;var u=vr();function s(w){var x="https://react.dev/errors/"+w;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var O=2;O<arguments.length;O++)x+="&args[]="+encodeURIComponent(arguments[O])}return"Minified React error #"+w+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(){}var r={d:{f,r:function(){throw Error(s(522))},D:f,C:f,L:f,m:f,X:f,S:f,M:f},p:0,findDOMNode:null},d=Symbol.for("react.portal");function g(w,x,O){var _=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:_==null?null:""+_,children:w,containerInfo:x,implementation:O}}var b=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function C(w,x){if(w==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return Qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Qt.createPortal=function(w,x){var O=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(s(299));return g(w,x,null,O)},Qt.flushSync=function(w){var x=b.T,O=r.p;try{if(b.T=null,r.p=2,w)return w()}finally{b.T=x,r.p=O,r.d.f()}},Qt.preconnect=function(w,x){typeof w=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,r.d.C(w,x))},Qt.prefetchDNS=function(w){typeof w=="string"&&r.d.D(w)},Qt.preinit=function(w,x){if(typeof w=="string"&&x&&typeof x.as=="string"){var O=x.as,_=C(O,x.crossOrigin),K=typeof x.integrity=="string"?x.integrity:void 0,G=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;O==="style"?r.d.S(w,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:_,integrity:K,fetchPriority:G}):O==="script"&&r.d.X(w,{crossOrigin:_,integrity:K,fetchPriority:G,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},Qt.preinitModule=function(w,x){if(typeof w=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var O=C(x.as,x.crossOrigin);r.d.M(w,{crossOrigin:O,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&r.d.M(w)},Qt.preload=function(w,x){if(typeof w=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var O=x.as,_=C(O,x.crossOrigin);r.d.L(w,O,{crossOrigin:_,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},Qt.preloadModule=function(w,x){if(typeof w=="string")if(x){var O=C(x.as,x.crossOrigin);r.d.m(w,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:O,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else r.d.m(w)},Qt.requestFormReset=function(w){r.d.r(w)},Qt.unstable_batchedUpdates=function(w,x){return w(x)},Qt.useFormState=function(w,x,O){return b.H.useFormState(w,x,O)},Qt.useFormStatus=function(){return b.H.useHostTransitionStatus()},Qt.version="19.2.8",Qt}var l1;function _m(){if(l1)return tr.exports;l1=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(s){console.error(s)}}return u(),tr.exports=Rm(),tr.exports}var a1;function Lm(){if(a1)return Su;a1=1;var u=Om(),s=vr(),f=_m();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function g(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function b(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 C(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 w(e){if(g(e)!==e)throw Error(r(188))}function x(e){var t=e.alternate;if(!t){if(t=g(e),t===null)throw Error(r(188));return t!==e?null:e}for(var n=e,l=t;;){var a=n.return;if(a===null)break;var i=a.alternate;if(i===null){if(l=a.return,l!==null){n=l;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return w(a),e;if(i===l)return w(a),t;i=i.sibling}throw Error(r(188))}if(n.return!==l.return)n=a,l=i;else{for(var c=!1,m=a.child;m;){if(m===n){c=!0,n=a,l=i;break}if(m===l){c=!0,l=a,n=i;break}m=m.sibling}if(!c){for(m=i.child;m;){if(m===n){c=!0,n=i,l=a;break}if(m===l){c=!0,l=i,n=a;break}m=m.sibling}if(!c)throw Error(r(189))}}if(n.alternate!==l)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function O(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=O(e),t!==null)return t;e=e.sibling}return null}var _=Object.assign,K=Symbol.for("react.element"),G=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),ne=Symbol.for("react.fragment"),oe=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),X=Symbol.for("react.consumer"),W=Symbol.for("react.context"),ie=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),me=Symbol.for("react.activity"),ge=Symbol.for("react.memo_cache_sentinel"),Me=Symbol.iterator;function he(e){return e===null||typeof e!="object"?null:(e=Me&&e[Me]||e["@@iterator"],typeof e=="function"?e:null)}var qe=Symbol.for("react.client.reference");function Ae(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===qe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ne:return"Fragment";case Z:return"Profiler";case oe:return"StrictMode";case ue:return"Suspense";case p:return"SuspenseList";case me:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case W:return e.displayName||"Context";case X:return(e._context.displayName||"Context")+".Consumer";case ie:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case I:return t=e.displayName||null,t!==null?t:Ae(e.type)||"Memo";case fe:t=e._payload,e=e._init;try{return Ae(e(t))}catch{}}return null}var Be=Array.isArray,D=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},xe=[],Ce=-1;function v(e){return{current:e}}function L(e){0>Ce||(e.current=xe[Ce],xe[Ce]=null,Ce--)}function F(e,t){Ce++,xe[Ce]=e.current,e.current=t}var ee=v(null),ce=v(null),ve=v(null),U=v(null);function V(e,t){switch(F(ve,t),F(ce,e),F(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?b0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=b0(t),e=x0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(ee),F(ee,e)}function J(){L(ee),L(ce),L(ve)}function le(e){e.memoizedState!==null&&F(U,e);var t=ee.current,n=x0(t,e.type);t!==n&&(F(ce,e),F(ee,n))}function Le(e){ce.current===e&&(L(ee),L(ce)),U.current===e&&(L(U),pu._currentValue=te)}var Ze,Ye;function Ve(e){if(Ze===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ze=t&&t[1]||"",Ye=-1<n.stack.indexOf(`
|
|
1
|
+
(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))r(d);new MutationObserver(d=>{for(const g of d)if(g.type==="childList")for(const v of g.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&r(v)}).observe(document,{childList:!0,subtree:!0});function f(d){const g={};return d.integrity&&(g.integrity=d.integrity),d.referrerPolicy&&(g.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?g.credentials="include":d.crossOrigin==="anonymous"?g.credentials="omit":g.credentials="same-origin",g}function r(d){if(d.ep)return;d.ep=!0;const g=f(d);fetch(d.href,g)}})();var Fo={exports:{}},xu={};var I0;function Om(){if(I0)return xu;I0=1;var u=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function f(r,d,g){var v=null;if(g!==void 0&&(v=""+g),d.key!==void 0&&(v=""+d.key),"key"in d){g={};for(var M in d)M!=="key"&&(g[M]=d[M])}else g=d;return d=g.ref,{$$typeof:u,type:r,key:v,ref:d!==void 0?d:null,props:g}}return xu.Fragment=s,xu.jsx=f,xu.jsxs=f,xu}var P0;function Rm(){return P0||(P0=1,Fo.exports=Om()),Fo.exports}var o=Rm(),Wo={exports:{}},Ne={};var e1;function _m(){if(e1)return Ne;e1=1;var u=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),v=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),k=Symbol.iterator;function q(b){return b===null||typeof b!="object"?null:(b=k&&b[k]||b["@@iterator"],typeof b=="function"?b:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ee=Object.assign,se={};function V(b,L,F){this.props=b,this.context=L,this.refs=se,this.updater=F||O}V.prototype.isReactComponent={},V.prototype.setState=function(b,L){if(typeof b!="object"&&typeof b!="function"&&b!=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,b,L,"setState")},V.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function Q(){}Q.prototype=V.prototype;function W(b,L,F){this.props=b,this.context=L,this.refs=se,this.updater=F||O}var ie=W.prototype=new Q;ie.constructor=W,ee(ie,V.prototype),ie.isPureReactComponent=!0;var ue=Array.isArray;function p(){}var I={H:null,A:null,T:null,S:null},fe=Object.prototype.hasOwnProperty;function me(b,L,F){var te=F.ref;return{$$typeof:u,type:b,key:L,ref:te!==void 0?te:null,props:F}}function ge(b,L){return me(b.type,L,b.props)}function Me(b){return typeof b=="object"&&b!==null&&b.$$typeof===u}function he(b){var L={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(F){return L[F]})}var qe=/\/+/g;function Ae(b,L){return typeof b=="object"&&b!==null&&b.key!=null?he(""+b.key):L.toString(36)}function Be(b){switch(b.status){case"fulfilled":return b.value;case"rejected":throw b.reason;default:switch(typeof b.status=="string"?b.then(p,p):(b.status="pending",b.then(function(L){b.status==="pending"&&(b.status="fulfilled",b.value=L)},function(L){b.status==="pending"&&(b.status="rejected",b.reason=L)})),b.status){case"fulfilled":return b.value;case"rejected":throw b.reason}}throw b}function D(b,L,F,te,oe){var ve=typeof b;(ve==="undefined"||ve==="boolean")&&(b=null);var U=!1;if(b===null)U=!0;else switch(ve){case"bigint":case"string":case"number":U=!0;break;case"object":switch(b.$$typeof){case u:case s:U=!0;break;case R:return U=b._init,D(U(b._payload),L,F,te,oe)}}if(U)return oe=oe(b),U=te===""?"."+Ae(b,0):te,ue(oe)?(F="",U!=null&&(F=U.replace(qe,"$&/")+"/"),D(oe,L,F,"",function(le){return le})):oe!=null&&(Me(oe)&&(oe=ge(oe,F+(oe.key==null||b&&b.key===oe.key?"":(""+oe.key).replace(qe,"$&/")+"/")+U)),L.push(oe)),1;U=0;var K=te===""?".":te+":";if(ue(b))for(var J=0;J<b.length;J++)te=b[J],ve=K+Ae(te,J),U+=D(te,L,F,ve,oe);else if(J=q(b),typeof J=="function")for(b=J.call(b),J=0;!(te=b.next()).done;)te=te.value,ve=K+Ae(te,J++),U+=D(te,L,F,ve,oe);else if(ve==="object"){if(typeof b.then=="function")return D(Be(b),L,F,te,oe);throw L=String(b),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return U}function Z(b,L,F){if(b==null)return b;var te=[],oe=0;return D(b,te,"","",function(ve){return L.call(F,ve,oe++)}),te}function ne(b){if(b._status===-1){var L=b._result;L=L(),L.then(function(F){(b._status===0||b._status===-1)&&(b._status=1,b._result=F)},function(F){(b._status===0||b._status===-1)&&(b._status=2,b._result=F)}),b._status===-1&&(b._status=0,b._result=L)}if(b._status===1)return b._result.default;throw b._result}var xe=typeof reportError=="function"?reportError:function(b){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof b=="object"&&b!==null&&typeof b.message=="string"?String(b.message):String(b),error:b});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",b);return}console.error(b)},Ce={map:Z,forEach:function(b,L,F){Z(b,function(){L.apply(this,arguments)},F)},count:function(b){var L=0;return Z(b,function(){L++}),L},toArray:function(b){return Z(b,function(L){return L})||[]},only:function(b){if(!Me(b))throw Error("React.Children.only expected to receive a single React element child.");return b}};return Ne.Activity=_,Ne.Children=Ce,Ne.Component=V,Ne.Fragment=f,Ne.Profiler=d,Ne.PureComponent=W,Ne.StrictMode=r,Ne.Suspense=E,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(b){return I.H.useMemoCache(b)}},Ne.cache=function(b){return function(){return b.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(b,L,F){if(b==null)throw Error("The argument must be a React element, but you passed "+b+".");var te=ee({},b.props),oe=b.key;if(L!=null)for(ve in L.key!==void 0&&(oe=""+L.key),L)!fe.call(L,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&L.ref===void 0||(te[ve]=L[ve]);var ve=arguments.length-2;if(ve===1)te.children=F;else if(1<ve){for(var U=Array(ve),K=0;K<ve;K++)U[K]=arguments[K+2];te.children=U}return me(b.type,oe,te)},Ne.createContext=function(b){return b={$$typeof:v,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null},b.Provider=b,b.Consumer={$$typeof:g,_context:b},b},Ne.createElement=function(b,L,F){var te,oe={},ve=null;if(L!=null)for(te in L.key!==void 0&&(ve=""+L.key),L)fe.call(L,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(oe[te]=L[te]);var U=arguments.length-2;if(U===1)oe.children=F;else if(1<U){for(var K=Array(U),J=0;J<U;J++)K[J]=arguments[J+2];oe.children=K}if(b&&b.defaultProps)for(te in U=b.defaultProps,U)oe[te]===void 0&&(oe[te]=U[te]);return me(b,ve,oe)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(b){return{$$typeof:M,render:b}},Ne.isValidElement=Me,Ne.lazy=function(b){return{$$typeof:R,_payload:{_status:-1,_result:b},_init:ne}},Ne.memo=function(b,L){return{$$typeof:x,type:b,compare:L===void 0?null:L}},Ne.startTransition=function(b){var L=I.T,F={};I.T=F;try{var te=b(),oe=I.S;oe!==null&&oe(F,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(p,xe)}catch(ve){xe(ve)}finally{L!==null&&F.types!==null&&(L.types=F.types),I.T=L}},Ne.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},Ne.use=function(b){return I.H.use(b)},Ne.useActionState=function(b,L,F){return I.H.useActionState(b,L,F)},Ne.useCallback=function(b,L){return I.H.useCallback(b,L)},Ne.useContext=function(b){return I.H.useContext(b)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(b,L){return I.H.useDeferredValue(b,L)},Ne.useEffect=function(b,L){return I.H.useEffect(b,L)},Ne.useEffectEvent=function(b){return I.H.useEffectEvent(b)},Ne.useId=function(){return I.H.useId()},Ne.useImperativeHandle=function(b,L,F){return I.H.useImperativeHandle(b,L,F)},Ne.useInsertionEffect=function(b,L){return I.H.useInsertionEffect(b,L)},Ne.useLayoutEffect=function(b,L){return I.H.useLayoutEffect(b,L)},Ne.useMemo=function(b,L){return I.H.useMemo(b,L)},Ne.useOptimistic=function(b,L){return I.H.useOptimistic(b,L)},Ne.useReducer=function(b,L,F){return I.H.useReducer(b,L,F)},Ne.useRef=function(b){return I.H.useRef(b)},Ne.useState=function(b){return I.H.useState(b)},Ne.useSyncExternalStore=function(b,L,F){return I.H.useSyncExternalStore(b,L,F)},Ne.useTransition=function(){return I.H.useTransition()},Ne.version="19.2.8",Ne}var t1;function xr(){return t1||(t1=1,Wo.exports=_m()),Wo.exports}var C=xr(),Io={exports:{}},Su={},Po={exports:{}},er={};var n1;function Lm(){return n1||(n1=1,(function(u){function s(D,Z){var ne=D.length;D.push(Z);e:for(;0<ne;){var xe=ne-1>>>1,Ce=D[xe];if(0<d(Ce,Z))D[xe]=Z,D[ne]=Ce,ne=xe;else break e}}function f(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var Z=D[0],ne=D.pop();if(ne!==Z){D[0]=ne;e:for(var xe=0,Ce=D.length,b=Ce>>>1;xe<b;){var L=2*(xe+1)-1,F=D[L],te=L+1,oe=D[te];if(0>d(F,ne))te<Ce&&0>d(oe,F)?(D[xe]=oe,D[te]=ne,xe=te):(D[xe]=F,D[L]=ne,xe=L);else if(te<Ce&&0>d(oe,ne))D[xe]=oe,D[te]=ne,xe=te;else break e}}return Z}function d(D,Z){var ne=D.sortIndex-Z.sortIndex;return ne!==0?ne:D.id-Z.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var g=performance;u.unstable_now=function(){return g.now()}}else{var v=Date,M=v.now();u.unstable_now=function(){return v.now()-M}}var E=[],x=[],R=1,_=null,k=3,q=!1,O=!1,ee=!1,se=!1,V=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function ie(D){for(var Z=f(x);Z!==null;){if(Z.callback===null)r(x);else if(Z.startTime<=D)r(x),Z.sortIndex=Z.expirationTime,s(E,Z);else break;Z=f(x)}}function ue(D){if(ee=!1,ie(D),!O)if(f(E)!==null)O=!0,p||(p=!0,he());else{var Z=f(x);Z!==null&&Be(ue,Z.startTime-D)}}var p=!1,I=-1,fe=5,me=-1;function ge(){return se?!0:!(u.unstable_now()-me<fe)}function Me(){if(se=!1,p){var D=u.unstable_now();me=D;var Z=!0;try{e:{O=!1,ee&&(ee=!1,Q(I),I=-1),q=!0;var ne=k;try{t:{for(ie(D),_=f(E);_!==null&&!(_.expirationTime>D&&ge());){var xe=_.callback;if(typeof xe=="function"){_.callback=null,k=_.priorityLevel;var Ce=xe(_.expirationTime<=D);if(D=u.unstable_now(),typeof Ce=="function"){_.callback=Ce,ie(D),Z=!0;break t}_===f(E)&&r(E),ie(D)}else r(E);_=f(E)}if(_!==null)Z=!0;else{var b=f(x);b!==null&&Be(ue,b.startTime-D),Z=!1}}break e}finally{_=null,k=ne,q=!1}Z=void 0}}finally{Z?he():p=!1}}}var he;if(typeof W=="function")he=function(){W(Me)};else if(typeof MessageChannel<"u"){var qe=new MessageChannel,Ae=qe.port2;qe.port1.onmessage=Me,he=function(){Ae.postMessage(null)}}else he=function(){V(Me,0)};function Be(D,Z){I=V(function(){D(u.unstable_now())},Z)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(D){D.callback=null},u.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},u.unstable_getCurrentPriorityLevel=function(){return k},u.unstable_next=function(D){switch(k){case 1:case 2:case 3:var Z=3;break;default:Z=k}var ne=k;k=Z;try{return D()}finally{k=ne}},u.unstable_requestPaint=function(){se=!0},u.unstable_runWithPriority=function(D,Z){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var ne=k;k=D;try{return Z()}finally{k=ne}},u.unstable_scheduleCallback=function(D,Z,ne){var xe=u.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?xe+ne:xe):ne=xe,D){case 1:var Ce=-1;break;case 2:Ce=250;break;case 5:Ce=1073741823;break;case 4:Ce=1e4;break;default:Ce=5e3}return Ce=ne+Ce,D={id:R++,callback:Z,priorityLevel:D,startTime:ne,expirationTime:Ce,sortIndex:-1},ne>xe?(D.sortIndex=ne,s(x,D),f(E)===null&&D===f(x)&&(ee?(Q(I),I=-1):ee=!0,Be(ue,ne-xe))):(D.sortIndex=Ce,s(E,D),O||q||(O=!0,p||(p=!0,he()))),D},u.unstable_shouldYield=ge,u.unstable_wrapCallback=function(D){var Z=k;return function(){var ne=k;k=Z;try{return D.apply(this,arguments)}finally{k=ne}}}})(er)),er}var l1;function Um(){return l1||(l1=1,Po.exports=Lm()),Po.exports}var tr={exports:{}},Qt={};var a1;function km(){if(a1)return Qt;a1=1;var u=xr();function s(E){var x="https://react.dev/errors/"+E;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var R=2;R<arguments.length;R++)x+="&args[]="+encodeURIComponent(arguments[R])}return"Minified React error #"+E+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(){}var r={d:{f,r:function(){throw Error(s(522))},D:f,C:f,L:f,m:f,X:f,S:f,M:f},p:0,findDOMNode:null},d=Symbol.for("react.portal");function g(E,x,R){var _=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:_==null?null:""+_,children:E,containerInfo:x,implementation:R}}var v=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function M(E,x){if(E==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return Qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Qt.createPortal=function(E,x){var R=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(s(299));return g(E,x,null,R)},Qt.flushSync=function(E){var x=v.T,R=r.p;try{if(v.T=null,r.p=2,E)return E()}finally{v.T=x,r.p=R,r.d.f()}},Qt.preconnect=function(E,x){typeof E=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,r.d.C(E,x))},Qt.prefetchDNS=function(E){typeof E=="string"&&r.d.D(E)},Qt.preinit=function(E,x){if(typeof E=="string"&&x&&typeof x.as=="string"){var R=x.as,_=M(R,x.crossOrigin),k=typeof x.integrity=="string"?x.integrity:void 0,q=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;R==="style"?r.d.S(E,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:_,integrity:k,fetchPriority:q}):R==="script"&&r.d.X(E,{crossOrigin:_,integrity:k,fetchPriority:q,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},Qt.preinitModule=function(E,x){if(typeof E=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var R=M(x.as,x.crossOrigin);r.d.M(E,{crossOrigin:R,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&r.d.M(E)},Qt.preload=function(E,x){if(typeof E=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var R=x.as,_=M(R,x.crossOrigin);r.d.L(E,R,{crossOrigin:_,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},Qt.preloadModule=function(E,x){if(typeof E=="string")if(x){var R=M(x.as,x.crossOrigin);r.d.m(E,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:R,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else r.d.m(E)},Qt.requestFormReset=function(E){r.d.r(E)},Qt.unstable_batchedUpdates=function(E,x){return E(x)},Qt.useFormState=function(E,x,R){return v.H.useFormState(E,x,R)},Qt.useFormStatus=function(){return v.H.useHostTransitionStatus()},Qt.version="19.2.8",Qt}var i1;function Bm(){if(i1)return tr.exports;i1=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(s){console.error(s)}}return u(),tr.exports=km(),tr.exports}var u1;function Hm(){if(u1)return Su;u1=1;var u=Um(),s=xr(),f=Bm();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function g(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function v(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 M(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 E(e){if(g(e)!==e)throw Error(r(188))}function x(e){var t=e.alternate;if(!t){if(t=g(e),t===null)throw Error(r(188));return t!==e?null:e}for(var n=e,l=t;;){var a=n.return;if(a===null)break;var i=a.alternate;if(i===null){if(l=a.return,l!==null){n=l;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return E(a),e;if(i===l)return E(a),t;i=i.sibling}throw Error(r(188))}if(n.return!==l.return)n=a,l=i;else{for(var c=!1,m=a.child;m;){if(m===n){c=!0,n=a,l=i;break}if(m===l){c=!0,l=a,n=i;break}m=m.sibling}if(!c){for(m=i.child;m;){if(m===n){c=!0,n=i,l=a;break}if(m===l){c=!0,l=i,n=a;break}m=m.sibling}if(!c)throw Error(r(189))}}if(n.alternate!==l)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function R(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=R(e),t!==null)return t;e=e.sibling}return null}var _=Object.assign,k=Symbol.for("react.element"),q=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),ee=Symbol.for("react.fragment"),se=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),W=Symbol.for("react.context"),ie=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),me=Symbol.for("react.activity"),ge=Symbol.for("react.memo_cache_sentinel"),Me=Symbol.iterator;function he(e){return e===null||typeof e!="object"?null:(e=Me&&e[Me]||e["@@iterator"],typeof e=="function"?e:null)}var qe=Symbol.for("react.client.reference");function Ae(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===qe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ee:return"Fragment";case V:return"Profiler";case se:return"StrictMode";case ue:return"Suspense";case p:return"SuspenseList";case me:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case O:return"Portal";case W:return e.displayName||"Context";case Q:return(e._context.displayName||"Context")+".Consumer";case ie:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case I:return t=e.displayName||null,t!==null?t:Ae(e.type)||"Memo";case fe:t=e._payload,e=e._init;try{return Ae(e(t))}catch{}}return null}var Be=Array.isArray,D=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},xe=[],Ce=-1;function b(e){return{current:e}}function L(e){0>Ce||(e.current=xe[Ce],xe[Ce]=null,Ce--)}function F(e,t){Ce++,xe[Ce]=e.current,e.current=t}var te=b(null),oe=b(null),ve=b(null),U=b(null);function K(e,t){switch(F(ve,t),F(oe,e),F(te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?S0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=S0(t),e=E0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(te),F(te,e)}function J(){L(te),L(oe),L(ve)}function le(e){e.memoizedState!==null&&F(U,e);var t=te.current,n=E0(t,e.type);t!==n&&(F(oe,e),F(te,n))}function Le(e){oe.current===e&&(L(te),L(oe)),U.current===e&&(L(U),pu._currentValue=ne)}var Ze,Ye;function Ve(e){if(Ze===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ze=t&&t[1]||"",Ye=-1<n.stack.indexOf(`
|
|
2
2
|
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+Ze+e+Ye}var ze=!1;function $e(e,t){if(!e||ze)return"";ze=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var
|
|
3
|
+
`+Ze+e+Ye}var ze=!1;function $e(e,t){if(!e||ze)return"";ze=!0;var n=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(z){var T=z}Reflect.construct(e,[],X)}else{try{X.call()}catch(z){T=z}e.call(X.prototype)}}else{try{throw Error()}catch(z){T=z}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(z){if(z&&T&&typeof z.stack=="string")return[z.stack,T.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=l.DetermineComponentFrameRoot(),c=i[0],m=i[1];if(c&&m){var y=c.split(`
|
|
4
4
|
`),N=m.split(`
|
|
5
|
-
`);for(a=l=0;l<y.length&&!y[l].includes("DetermineComponentFrameRoot");)l++;for(;a<N.length&&!N[a].includes("DetermineComponentFrameRoot");)a++;if(l===y.length||a===N.length)for(l=y.length-1,a=N.length-1;1<=l&&0<=a&&y[l]!==N[a];)a--;for(;1<=l&&0<=a;l--,a--)if(y[l]!==N[a]){if(l!==1||a!==1)do if(l--,a--,0>a||y[l]!==N[a]){var
|
|
6
|
-
`+y[l].replace(" at new "," at ");return e.displayName&&
|
|
5
|
+
`);for(a=l=0;l<y.length&&!y[l].includes("DetermineComponentFrameRoot");)l++;for(;a<N.length&&!N[a].includes("DetermineComponentFrameRoot");)a++;if(l===y.length||a===N.length)for(l=y.length-1,a=N.length-1;1<=l&&0<=a&&y[l]!==N[a];)a--;for(;1<=l&&0<=a;l--,a--)if(y[l]!==N[a]){if(l!==1||a!==1)do if(l--,a--,0>a||y[l]!==N[a]){var H=`
|
|
6
|
+
`+y[l].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=l&&0<=a);break}}}finally{ze=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Ve(n):""}function nt(e,t){switch(e.tag){case 26:case 27:case 5:return Ve(e.type);case 16:return Ve("Lazy");case 13:return e.child!==t&&t!==null?Ve("Suspense Fallback"):Ve("Suspense");case 19:return Ve("SuspenseList");case 0:case 15:return $e(e.type,!1);case 11:return $e(e.type.render,!1);case 1:return $e(e.type,!0);case 31:return Ve("Activity");default:return""}}function ft(e){try{var t="",n=null;do t+=nt(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
|
|
7
7
|
Error generating stack: `+l.message+`
|
|
8
|
-
`+l.stack}}var Mt=Object.prototype.hasOwnProperty,Wt=u.unstable_scheduleCallback,Yn=u.unstable_cancelCallback,yl=u.unstable_shouldYield,Wl=u.unstable_requestPaint,yt=u.unstable_now,Il=u.unstable_getCurrentPriorityLevel,Pl=u.unstable_ImmediatePriority,ea=u.unstable_UserBlockingPriority,vl=u.unstable_NormalPriority,Da=u.unstable_LowPriority,Gn=u.unstable_IdlePriority,Xn=u.log,Ct=u.unstable_setDisableYieldValue,It=null,Tt=null;function Zt(e){if(typeof Xn=="function"&&Ct(e),Tt&&typeof Tt.setStrictMode=="function")try{Tt.setStrictMode(It,e)}catch{}}var ct=Math.clz32?Math.clz32:ji,ta=Math.log,bl=Math.LN2;function ji(e){return e>>>=0,e===0?32:31-(ta(e)/bl|0)|0}var Vt=256,k=262144,P=4194304;function be(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 Se(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var a=0,i=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var m=l&134217727;return m!==0?(l=m&~i,l!==0?a=be(l):(c&=m,c!==0?a=be(c):n||(n=m&~e,n!==0&&(a=be(n))))):(m=l&~i,m!==0?a=be(m):c!==0?a=be(c):n||(n=l&~e,n!==0&&(a=be(n)))),a===0?0:t!==0&&t!==a&&(t&i)===0&&(i=a&-a,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:a}function we(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function st(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 We(){var e=P;return P<<=1,(P&62914560)===0&&(P=4194304),e}function dt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Kt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Mu(e,t,n,l,a,i){var c=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var m=e.entanglements,y=e.expirationTimes,N=e.hiddenUpdates;for(n=c&~n;0<n;){var B=31-ct(n),Y=1<<B;m[B]=0,y[B]=-1;var T=N[B];if(T!==null)for(N[B]=null,B=0;B<T.length;B++){var z=T[B];z!==null&&(z.lane&=-536870913)}n&=~Y}l!==0&&Ot(e,l,0),i!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=i&~(c&~t))}function Ot(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-ct(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function xl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-ct(n),a=1<<l;a&t|e[l]&t&&(e[l]|=t),n&=~a}}function qt(e,t){var n=t&-t;return n=(n&42)!==0?1:Sl(n),(n&(e.suspendedLanes|t))!==0?0:n}function Sl(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 na(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Qn(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:X0(e.type))}function la(e,t){var n=Q.p;try{return Q.p=e,t()}finally{Q.p=n}}var $t=Math.random().toString(36).slice(2),vt="__reactFiber$"+$t,Rt="__reactProps$"+$t,Zn="__reactContainer$"+$t,za="__reactEvents$"+$t,aa="__reactListeners$"+$t,Cu="__reactHandles$"+$t,ju="__reactResources$"+$t,ia="__reactMarker$"+$t;function Ai(e){delete e[vt],delete e[Rt],delete e[za],delete e[aa],delete e[Cu]}function Vn(e){var t=e[vt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Zn]||n[vt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=A0(e);e!==null;){if(n=e[vt])return n;e=A0(e)}return t}e=n,n=e.parentNode}return null}function El(e){if(e=e[vt]||e[Zn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Kn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Yt(e){var t=e[ju];return t||(t=e[ju]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ht(e){e[ia]=!0}var Au=new Set,Nu={};function Dt(e,t){$n(e,t),$n(e+"Capture",t)}function $n(e,t){for(Nu[e]=t,e=0;e<t.length;e++)Au.add(t[e])}var wl=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]*$"),Tu={},gn={};function Zs(e){return Mt.call(gn,e)?!0:Mt.call(Tu,e)?!1:wl.test(e)?gn[e]=!0:(Tu[e]=!0,!1)}function Oa(e,t,n){if(Zs(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){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,""+n)}}function Ra(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function _t(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+l)}}function Gt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Pt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _a(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var a=l.get,i=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(c){n=""+c,i.call(this,c)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(c){n=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function La(e){if(!e._valueTracker){var t=Pt(e)?"checked":"value";e._valueTracker=_a(e,t,""+e[t])}}function Ua(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=Pt(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function ka(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 Jn=/[\n"\\]/g;function Ge(e){return e.replace(Jn,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ba(e,t,n,l,a,i,c,m){e.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.type=c:e.removeAttribute("type"),t!=null?c==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Gt(t)):e.value!==""+Gt(t)&&(e.value=""+Gt(t)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),t!=null?An(e,c,Gt(t)):n!=null?An(e,c,Gt(n)):l!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+Gt(m):e.removeAttribute("name")}function Ha(e,t,n,l,a,i,c,m){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){La(e);return}n=n!=null?""+Gt(n):"",t=t!=null?""+Gt(t):n,m||t===e.value||(e.value=t),e.defaultValue=t}l=l??a,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=m?e.checked:!!l,e.defaultChecked=!!l,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.name=c),La(e)}function An(e,t,n){t==="number"&&ka(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Ln(e,t,n,l){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&l&&(e[n].defaultSelected=!0)}else{for(n=""+Gt(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,l&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function Lt(e,t,n){if(t!=null&&(t=""+Gt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Gt(n):""}function qa(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(r(92));if(Be(l)){if(1<l.length)throw Error(r(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=Gt(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),La(e)}function Ml(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var je=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 Du(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||je.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Ni(e,t,n){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var a in t)l=t[a],t.hasOwnProperty(a)&&n[a]!==l&&Du(e,a,l)}else for(var i in t)t.hasOwnProperty(i)&&Du(e,i,t[i])}function Cl(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 Vs=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"]]),zu=/^[\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 Ya(e){return zu.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Nn(){}var Ti=null;function Di(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var jl=null,Fn=null;function Ga(e){var t=El(e);if(t&&(e=t.stateNode)){var n=e[Rt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ba(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Ge(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var a=l[Rt]||null;if(!a)throw Error(r(90));Ba(l,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&Ua(l)}break e;case"textarea":Lt(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Ln(e,!!n.multiple,t,!1)}}}var zi=!1;function Ou(e,t,n){if(zi)return e(t,n);zi=!0;try{var l=e(t);return l}finally{if(zi=!1,(jl!==null||Fn!==null)&&(ps(),jl&&(t=jl,e=Fn,Fn=jl=null,Ga(t),e)))for(t=0;t<e.length;t++)Ga(e[t])}}function Wn(e,t){var n=e.stateNode;if(n===null)return null;var l=n[Rt]||null;if(l===null)return null;n=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(n&&typeof n!="function")throw Error(r(231,t,typeof n));return n}var Tn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xa=!1;if(Tn)try{var Dn={};Object.defineProperty(Dn,"passive",{get:function(){Xa=!0}}),window.addEventListener("test",Dn,Dn),window.removeEventListener("test",Dn,Dn)}catch{Xa=!1}var Un=null,Oi=null,ua=null;function sa(){if(ua)return ua;var e,t=Oi,n=t.length,l,a="value"in Un?Un.value:Un.textContent,i=a.length;for(e=0;e<n&&t[e]===a[e];e++);var c=n-e;for(l=1;l<=c&&t[n-l]===a[i-l];l++);return ua=a.slice(e,1<l?1-l:void 0)}function ca(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 Qa(){return!0}function In(){return!1}function Xt(e){function t(n,l,a,i,c){this._reactName=n,this._targetInst=a,this.type=l,this.nativeEvent=i,this.target=c,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(n=e[m],this[m]=n?n(i):i[m]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Qa:In,this.isPropagationStopped=In,this}return _(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Qa)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Qa)},persist:function(){},isPersistent:Qa}),t}var Pn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Za=Xt(Pn),oa=_({},Pn,{view:0,detail:0}),Ks=Xt(oa),Va,Ri,zn,en=_({},oa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ki,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!==zn&&(zn&&e.type==="mousemove"?(Va=e.screenX-zn.screenX,Ri=e.screenY-zn.screenY):Ri=Va=0,zn=e),Va)},movementY:function(e){return"movementY"in e?e.movementY:Ri}}),Ru=Xt(en),Ka=_({},en,{dataTransfer:0}),_i=Xt(Ka),Li=_({},oa,{relatedTarget:0}),$a=Xt(Li),_u=_({},Pn,{animationName:0,elapsedTime:0,pseudoElement:0}),$s=Xt(_u),Js=_({},Pn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Fs=Xt(Js),Ws=_({},Pn,{data:0}),Ui=Xt(Ws),Is={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ps={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"},ec={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tc(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ec[e])?!!t[e]:!1}function ki(){return tc}var h=_({},oa,{key:function(e){if(e.key){var t=Is[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ca(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ps[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ki,charCode:function(e){return e.type==="keypress"?ca(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ca(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),j=Xt(h),H=_({},en,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$=Xt(H),ae=_({},oa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ki}),re=Xt(ae),pe=_({},Pn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Oe=Xt(pe),Jt=_({},en,{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}),jt=Xt(Jt),sn=_({},Pn,{newState:0,oldState:0}),bt=Xt(sn),el=[9,13,27,32],it=Tn&&"CompositionEvent"in window,ra=null;Tn&&"documentMode"in document&&(ra=document.documentMode);var W1=Tn&&"TextEvent"in window&&!ra,Mr=Tn&&(!it||ra&&8<ra&&11>=ra),Cr=" ",jr=!1;function Ar(e,t){switch(e){case"keyup":return el.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nr(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ja=!1;function I1(e,t){switch(e){case"compositionend":return Nr(t);case"keypress":return t.which!==32?null:(jr=!0,Cr);case"textInput":return e=t.data,e===Cr&&jr?null:e;default:return null}}function P1(e,t){if(Ja)return e==="compositionend"||!it&&Ar(e,t)?(e=sa(),ua=Oi=Un=null,Ja=!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 Mr&&t.locale!=="ko"?null:t.data;default:return null}}var eh={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 Tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!eh[e.type]:t==="textarea"}function Dr(e,t,n,l){jl?Fn?Fn.push(l):Fn=[l]:jl=l,t=ws(t,"onChange"),0<t.length&&(n=new Za("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var Bi=null,Hi=null;function th(e){h0(e,0)}function Lu(e){var t=Kn(e);if(Ua(t))return e}function zr(e,t){if(e==="change")return t}var Or=!1;if(Tn){var nc;if(Tn){var lc="oninput"in document;if(!lc){var Rr=document.createElement("div");Rr.setAttribute("oninput","return;"),lc=typeof Rr.oninput=="function"}nc=lc}else nc=!1;Or=nc&&(!document.documentMode||9<document.documentMode)}function _r(){Bi&&(Bi.detachEvent("onpropertychange",Lr),Hi=Bi=null)}function Lr(e){if(e.propertyName==="value"&&Lu(Hi)){var t=[];Dr(t,Hi,e,Di(e)),Ou(th,t)}}function nh(e,t,n){e==="focusin"?(_r(),Bi=t,Hi=n,Bi.attachEvent("onpropertychange",Lr)):e==="focusout"&&_r()}function lh(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Lu(Hi)}function ah(e,t){if(e==="click")return Lu(t)}function ih(e,t){if(e==="input"||e==="change")return Lu(t)}function uh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var cn=typeof Object.is=="function"?Object.is:uh;function qi(e,t){if(cn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var a=n[l];if(!Mt.call(t,a)||!cn(e[a],t[a]))return!1}return!0}function Ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function kr(e,t){var n=Ur(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ur(n)}}function Br(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Br(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ka(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ka(e.document)}return t}function ac(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 sh=Tn&&"documentMode"in document&&11>=document.documentMode,Fa=null,ic=null,Yi=null,uc=!1;function qr(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;uc||Fa==null||Fa!==ka(l)||(l=Fa,"selectionStart"in l&&ac(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}),Yi&&qi(Yi,l)||(Yi=l,l=ws(ic,"onSelect"),0<l.length&&(t=new Za("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=Fa)))}function fa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Wa={animationend:fa("Animation","AnimationEnd"),animationiteration:fa("Animation","AnimationIteration"),animationstart:fa("Animation","AnimationStart"),transitionrun:fa("Transition","TransitionRun"),transitionstart:fa("Transition","TransitionStart"),transitioncancel:fa("Transition","TransitionCancel"),transitionend:fa("Transition","TransitionEnd")},sc={},Yr={};Tn&&(Yr=document.createElement("div").style,"AnimationEvent"in window||(delete Wa.animationend.animation,delete Wa.animationiteration.animation,delete Wa.animationstart.animation),"TransitionEvent"in window||delete Wa.transitionend.transition);function da(e){if(sc[e])return sc[e];if(!Wa[e])return e;var t=Wa[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Yr)return sc[e]=t[n];return e}var Gr=da("animationend"),Xr=da("animationiteration"),Qr=da("animationstart"),ch=da("transitionrun"),oh=da("transitionstart"),rh=da("transitioncancel"),Zr=da("transitionend"),Vr=new Map,cc="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(" ");cc.push("scrollEnd");function On(e,t){Vr.set(e,t),Dt(t,[e])}var Uu=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)},pn=[],Ia=0,oc=0;function ku(){for(var e=Ia,t=oc=Ia=0;t<e;){var n=pn[t];pn[t++]=null;var l=pn[t];pn[t++]=null;var a=pn[t];pn[t++]=null;var i=pn[t];if(pn[t++]=null,l!==null&&a!==null){var c=l.pending;c===null?a.next=a:(a.next=c.next,c.next=a),l.pending=a}i!==0&&Kr(n,a,i)}}function Bu(e,t,n,l){pn[Ia++]=e,pn[Ia++]=t,pn[Ia++]=n,pn[Ia++]=l,oc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function rc(e,t,n,l){return Bu(e,t,n,l),Hu(e)}function ha(e,t){return Bu(e,null,null,t),Hu(e)}function Kr(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var a=!1,i=e.return;i!==null;)i.childLanes|=n,l=i.alternate,l!==null&&(l.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(a=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,a&&t!==null&&(a=31-ct(n),e=i.hiddenUpdates,l=e[a],l===null?e[a]=[t]:l.push(t),t.lane=n|536870912),i):null}function Hu(e){if(50<ou)throw ou=0,xo=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Pa={};function fh(e,t,n,l){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function on(e,t,n,l){return new fh(e,t,n,l)}function fc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function tl(e,t){var n=e.alternate;return n===null?(n=on(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function $r(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function qu(e,t,n,l,a,i){var c=0;if(l=e,typeof e=="function")fc(e)&&(c=1);else if(typeof e=="string")c=pm(e,n,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case me:return e=on(31,n,t,a),e.elementType=me,e.lanes=i,e;case ne:return ma(n.children,a,i,t);case oe:c=8,a|=24;break;case Z:return e=on(12,n,t,a|2),e.elementType=Z,e.lanes=i,e;case ue:return e=on(13,n,t,a),e.elementType=ue,e.lanes=i,e;case p:return e=on(19,n,t,a),e.elementType=p,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case W:c=10;break e;case X:c=9;break e;case ie:c=11;break e;case I:c=14;break e;case fe:c=16,l=null;break e}c=29,n=Error(r(130,e===null?"null":typeof e,"")),l=null}return t=on(c,n,t,a),t.elementType=e,t.type=l,t.lanes=i,t}function ma(e,t,n,l){return e=on(7,e,l,t),e.lanes=n,e}function dc(e,t,n){return e=on(6,e,null,t),e.lanes=n,e}function Jr(e){var t=on(18,null,null,0);return t.stateNode=e,t}function hc(e,t,n){return t=on(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Fr=new WeakMap;function yn(e,t){if(typeof e=="object"&&e!==null){var n=Fr.get(e);return n!==void 0?n:(t={value:e,source:t,stack:ft(t)},Fr.set(e,t),t)}return{value:e,source:t,stack:ft(t)}}var ei=[],ti=0,Yu=null,Gi=0,vn=[],bn=0,Al=null,kn=1,Bn="";function nl(e,t){ei[ti++]=Gi,ei[ti++]=Yu,Yu=e,Gi=t}function Wr(e,t,n){vn[bn++]=kn,vn[bn++]=Bn,vn[bn++]=Al,Al=e;var l=kn;e=Bn;var a=32-ct(l)-1;l&=~(1<<a),n+=1;var i=32-ct(t)+a;if(30<i){var c=a-a%5;i=(l&(1<<c)-1).toString(32),l>>=c,a-=c,kn=1<<32-ct(t)+a|n<<a|l,Bn=i+e}else kn=1<<i|n<<a|l,Bn=e}function mc(e){e.return!==null&&(nl(e,1),Wr(e,1,0))}function gc(e){for(;e===Yu;)Yu=ei[--ti],ei[ti]=null,Gi=ei[--ti],ei[ti]=null;for(;e===Al;)Al=vn[--bn],vn[bn]=null,Bn=vn[--bn],vn[bn]=null,kn=vn[--bn],vn[bn]=null}function Ir(e,t){vn[bn++]=kn,vn[bn++]=Bn,vn[bn++]=Al,kn=t.id,Bn=t.overflow,Al=e}var Ut=null,lt=null,He=!1,Nl=null,xn=!1,pc=Error(r(519));function Tl(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Xi(yn(t,e)),pc}function Pr(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[vt]=e,t[Rt]=l,n){case"dialog":_e("cancel",t),_e("close",t);break;case"iframe":case"object":case"embed":_e("load",t);break;case"video":case"audio":for(n=0;n<fu.length;n++)_e(fu[n],t);break;case"source":_e("error",t);break;case"img":case"image":case"link":_e("error",t),_e("load",t);break;case"details":_e("toggle",t);break;case"input":_e("invalid",t),Ha(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":_e("invalid",t);break;case"textarea":_e("invalid",t),qa(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||y0(t.textContent,n)?(l.popover!=null&&(_e("beforetoggle",t),_e("toggle",t)),l.onScroll!=null&&_e("scroll",t),l.onScrollEnd!=null&&_e("scrollend",t),l.onClick!=null&&(t.onclick=Nn),t=!0):t=!1,t||Tl(e,!0)}function ef(e){for(Ut=e.return;Ut;)switch(Ut.tag){case 5:case 31:case 13:xn=!1;return;case 27:case 3:xn=!0;return;default:Ut=Ut.return}}function ni(e){if(e!==Ut)return!1;if(!He)return ef(e),He=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Lo(e.type,e.memoizedProps)),n=!n),n&<&&Tl(e),ef(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));lt=j0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));lt=j0(e)}else t===27?(t=lt,Xl(e.type)?(e=qo,qo=null,lt=e):lt=t):lt=Ut?En(e.stateNode.nextSibling):null;return!0}function ga(){lt=Ut=null,He=!1}function yc(){var e=Nl;return e!==null&&(an===null?an=e:an.push.apply(an,e),Nl=null),e}function Xi(e){Nl===null?Nl=[e]:Nl.push(e)}var vc=v(null),pa=null,ll=null;function Dl(e,t,n){F(vc,t._currentValue),t._currentValue=n}function al(e){e._currentValue=vc.current,L(vc)}function bc(e,t,n){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===n)break;e=e.return}}function xc(e,t,n,l){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var i=a.dependencies;if(i!==null){var c=a.child;i=i.firstContext;e:for(;i!==null;){var m=i;i=a;for(var y=0;y<t.length;y++)if(m.context===t[y]){i.lanes|=n,m=i.alternate,m!==null&&(m.lanes|=n),bc(i.return,n,e),l||(c=null);break e}i=m.next}}else if(a.tag===18){if(c=a.return,c===null)throw Error(r(341));c.lanes|=n,i=c.alternate,i!==null&&(i.lanes|=n),bc(c,n,e),c=null}else c=a.child;if(c!==null)c.return=a;else for(c=a;c!==null;){if(c===e){c=null;break}if(a=c.sibling,a!==null){a.return=c.return,c=a;break}c=c.return}a=c}}function li(e,t,n,l){e=null;for(var a=t,i=!1;a!==null;){if(!i){if((a.flags&524288)!==0)i=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var c=a.alternate;if(c===null)throw Error(r(387));if(c=c.memoizedProps,c!==null){var m=a.type;cn(a.pendingProps.value,c.value)||(e!==null?e.push(m):e=[m])}}else if(a===U.current){if(c=a.alternate,c===null)throw Error(r(387));c.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(pu):e=[pu])}a=a.return}e!==null&&xc(t,e,n,l),t.flags|=262144}function Gu(e){for(e=e.firstContext;e!==null;){if(!cn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ya(e){pa=e,ll=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function kt(e){return tf(pa,e)}function Xu(e,t){return pa===null&&ya(e),tf(e,t)}function tf(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ll===null){if(e===null)throw Error(r(308));ll=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ll=ll.next=t;return n}var dh=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},hh=u.unstable_scheduleCallback,mh=u.unstable_NormalPriority,xt={$$typeof:W,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sc(){return{controller:new dh,data:new Map,refCount:0}}function Qi(e){e.refCount--,e.refCount===0&&hh(mh,function(){e.controller.abort()})}var Zi=null,Ec=0,ai=0,ii=null;function gh(e,t){if(Zi===null){var n=Zi=[];Ec=0,ai=jo(),ii={status:"pending",value:void 0,then:function(l){n.push(l)}}}return Ec++,t.then(nf,nf),t}function nf(){if(--Ec===0&&Zi!==null){ii!==null&&(ii.status="fulfilled");var e=Zi;Zi=null,ai=0,ii=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ph(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(l.status="rejected",l.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),l}var lf=D.S;D.S=function(e,t){Yd=yt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&gh(e,t),lf!==null&&lf(e,t)};var va=v(null);function wc(){var e=va.current;return e!==null?e:tt.pooledCache}function Qu(e,t){t===null?F(va,va.current):F(va,t.pool)}function af(){var e=wc();return e===null?null:{parent:xt._currentValue,pool:e}}var ui=Error(r(460)),Mc=Error(r(474)),Zu=Error(r(542)),Vu={then:function(){}};function uf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function sf(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Nn,Nn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,of(e),e;default:if(typeof t.status=="string")t.then(Nn,Nn);else{if(e=tt,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=l}},function(l){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,of(e),e}throw xa=t,ui}}function ba(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(xa=n,ui):n}}var xa=null;function cf(){if(xa===null)throw Error(r(459));var e=xa;return xa=null,e}function of(e){if(e===ui||e===Zu)throw Error(r(483))}var si=null,Vi=0;function Ku(e){var t=Vi;return Vi+=1,si===null&&(si=[]),sf(si,e,t)}function Ki(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function $u(e,t){throw t.$$typeof===K?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function rf(e){function t(E,S){if(e){var A=E.deletions;A===null?(E.deletions=[S],E.flags|=16):A.push(S)}}function n(E,S){if(!e)return null;for(;S!==null;)t(E,S),S=S.sibling;return null}function l(E){for(var S=new Map;E!==null;)E.key!==null?S.set(E.key,E):S.set(E.index,E),E=E.sibling;return S}function a(E,S){return E=tl(E,S),E.index=0,E.sibling=null,E}function i(E,S,A){return E.index=A,e?(A=E.alternate,A!==null?(A=A.index,A<S?(E.flags|=67108866,S):A):(E.flags|=67108866,S)):(E.flags|=1048576,S)}function c(E){return e&&E.alternate===null&&(E.flags|=67108866),E}function m(E,S,A,q){return S===null||S.tag!==6?(S=dc(A,E.mode,q),S.return=E,S):(S=a(S,A),S.return=E,S)}function y(E,S,A,q){var ye=A.type;return ye===ne?B(E,S,A.props.children,q,A.key):S!==null&&(S.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===fe&&ba(ye)===S.type)?(S=a(S,A.props),Ki(S,A),S.return=E,S):(S=qu(A.type,A.key,A.props,null,E.mode,q),Ki(S,A),S.return=E,S)}function N(E,S,A,q){return S===null||S.tag!==4||S.stateNode.containerInfo!==A.containerInfo||S.stateNode.implementation!==A.implementation?(S=hc(A,E.mode,q),S.return=E,S):(S=a(S,A.children||[]),S.return=E,S)}function B(E,S,A,q,ye){return S===null||S.tag!==7?(S=ma(A,E.mode,q,ye),S.return=E,S):(S=a(S,A),S.return=E,S)}function Y(E,S,A){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=dc(""+S,E.mode,A),S.return=E,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case G:return A=qu(S.type,S.key,S.props,null,E.mode,A),Ki(A,S),A.return=E,A;case R:return S=hc(S,E.mode,A),S.return=E,S;case fe:return S=ba(S),Y(E,S,A)}if(Be(S)||he(S))return S=ma(S,E.mode,A,null),S.return=E,S;if(typeof S.then=="function")return Y(E,Ku(S),A);if(S.$$typeof===W)return Y(E,Xu(E,S),A);$u(E,S)}return null}function T(E,S,A,q){var ye=S!==null?S.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return ye!==null?null:m(E,S,""+A,q);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case G:return A.key===ye?y(E,S,A,q):null;case R:return A.key===ye?N(E,S,A,q):null;case fe:return A=ba(A),T(E,S,A,q)}if(Be(A)||he(A))return ye!==null?null:B(E,S,A,q,null);if(typeof A.then=="function")return T(E,S,Ku(A),q);if(A.$$typeof===W)return T(E,S,Xu(E,A),q);$u(E,A)}return null}function z(E,S,A,q,ye){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return E=E.get(A)||null,m(S,E,""+q,ye);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case G:return E=E.get(q.key===null?A:q.key)||null,y(S,E,q,ye);case R:return E=E.get(q.key===null?A:q.key)||null,N(S,E,q,ye);case fe:return q=ba(q),z(E,S,A,q,ye)}if(Be(q)||he(q))return E=E.get(A)||null,B(S,E,q,ye,null);if(typeof q.then=="function")return z(E,S,A,Ku(q),ye);if(q.$$typeof===W)return z(E,S,A,Xu(S,q),ye);$u(S,q)}return null}function se(E,S,A,q){for(var ye=null,Xe=null,de=S,De=S=0,ke=null;de!==null&&De<A.length;De++){de.index>De?(ke=de,de=null):ke=de.sibling;var Qe=T(E,de,A[De],q);if(Qe===null){de===null&&(de=ke);break}e&&de&&Qe.alternate===null&&t(E,de),S=i(Qe,S,De),Xe===null?ye=Qe:Xe.sibling=Qe,Xe=Qe,de=ke}if(De===A.length)return n(E,de),He&&nl(E,De),ye;if(de===null){for(;De<A.length;De++)de=Y(E,A[De],q),de!==null&&(S=i(de,S,De),Xe===null?ye=de:Xe.sibling=de,Xe=de);return He&&nl(E,De),ye}for(de=l(de);De<A.length;De++)ke=z(de,E,De,A[De],q),ke!==null&&(e&&ke.alternate!==null&&de.delete(ke.key===null?De:ke.key),S=i(ke,S,De),Xe===null?ye=ke:Xe.sibling=ke,Xe=ke);return e&&de.forEach(function($l){return t(E,$l)}),He&&nl(E,De),ye}function Ee(E,S,A,q){if(A==null)throw Error(r(151));for(var ye=null,Xe=null,de=S,De=S=0,ke=null,Qe=A.next();de!==null&&!Qe.done;De++,Qe=A.next()){de.index>De?(ke=de,de=null):ke=de.sibling;var $l=T(E,de,Qe.value,q);if($l===null){de===null&&(de=ke);break}e&&de&&$l.alternate===null&&t(E,de),S=i($l,S,De),Xe===null?ye=$l:Xe.sibling=$l,Xe=$l,de=ke}if(Qe.done)return n(E,de),He&&nl(E,De),ye;if(de===null){for(;!Qe.done;De++,Qe=A.next())Qe=Y(E,Qe.value,q),Qe!==null&&(S=i(Qe,S,De),Xe===null?ye=Qe:Xe.sibling=Qe,Xe=Qe);return He&&nl(E,De),ye}for(de=l(de);!Qe.done;De++,Qe=A.next())Qe=z(de,E,De,Qe.value,q),Qe!==null&&(e&&Qe.alternate!==null&&de.delete(Qe.key===null?De:Qe.key),S=i(Qe,S,De),Xe===null?ye=Qe:Xe.sibling=Qe,Xe=Qe);return e&&de.forEach(function(Am){return t(E,Am)}),He&&nl(E,De),ye}function et(E,S,A,q){if(typeof A=="object"&&A!==null&&A.type===ne&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case G:e:{for(var ye=A.key;S!==null;){if(S.key===ye){if(ye=A.type,ye===ne){if(S.tag===7){n(E,S.sibling),q=a(S,A.props.children),q.return=E,E=q;break e}}else if(S.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===fe&&ba(ye)===S.type){n(E,S.sibling),q=a(S,A.props),Ki(q,A),q.return=E,E=q;break e}n(E,S);break}else t(E,S);S=S.sibling}A.type===ne?(q=ma(A.props.children,E.mode,q,A.key),q.return=E,E=q):(q=qu(A.type,A.key,A.props,null,E.mode,q),Ki(q,A),q.return=E,E=q)}return c(E);case R:e:{for(ye=A.key;S!==null;){if(S.key===ye)if(S.tag===4&&S.stateNode.containerInfo===A.containerInfo&&S.stateNode.implementation===A.implementation){n(E,S.sibling),q=a(S,A.children||[]),q.return=E,E=q;break e}else{n(E,S);break}else t(E,S);S=S.sibling}q=hc(A,E.mode,q),q.return=E,E=q}return c(E);case fe:return A=ba(A),et(E,S,A,q)}if(Be(A))return se(E,S,A,q);if(he(A)){if(ye=he(A),typeof ye!="function")throw Error(r(150));return A=ye.call(A),Ee(E,S,A,q)}if(typeof A.then=="function")return et(E,S,Ku(A),q);if(A.$$typeof===W)return et(E,S,Xu(E,A),q);$u(E,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,S!==null&&S.tag===6?(n(E,S.sibling),q=a(S,A),q.return=E,E=q):(n(E,S),q=dc(A,E.mode,q),q.return=E,E=q),c(E)):n(E,S)}return function(E,S,A,q){try{Vi=0;var ye=et(E,S,A,q);return si=null,ye}catch(de){if(de===ui||de===Zu)throw de;var Xe=on(29,de,null,E.mode);return Xe.lanes=q,Xe.return=E,Xe}}}var Sa=rf(!0),ff=rf(!1),zl=!1;function Cc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function jc(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 Ol(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Rl(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ke&2)!==0){var a=l.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),l.pending=t,t=Hu(e),Kr(e,null,n),t}return Bu(e,l,t,n),Hu(e)}function $i(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,xl(e,n)}}function Ac(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var c={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?a=i=c:i=i.next=c,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Nc=!1;function Ji(){if(Nc){var e=ii;if(e!==null)throw e}}function Fi(e,t,n,l){Nc=!1;var a=e.updateQueue;zl=!1;var i=a.firstBaseUpdate,c=a.lastBaseUpdate,m=a.shared.pending;if(m!==null){a.shared.pending=null;var y=m,N=y.next;y.next=null,c===null?i=N:c.next=N,c=y;var B=e.alternate;B!==null&&(B=B.updateQueue,m=B.lastBaseUpdate,m!==c&&(m===null?B.firstBaseUpdate=N:m.next=N,B.lastBaseUpdate=y))}if(i!==null){var Y=a.baseState;c=0,B=N=y=null,m=i;do{var T=m.lane&-536870913,z=T!==m.lane;if(z?(Ue&T)===T:(l&T)===T){T!==0&&T===ai&&(Nc=!0),B!==null&&(B=B.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var se=e,Ee=m;T=t;var et=n;switch(Ee.tag){case 1:if(se=Ee.payload,typeof se=="function"){Y=se.call(et,Y,T);break e}Y=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=Ee.payload,T=typeof se=="function"?se.call(et,Y,T):se,T==null)break e;Y=_({},Y,T);break e;case 2:zl=!0}}T=m.callback,T!==null&&(e.flags|=64,z&&(e.flags|=8192),z=a.callbacks,z===null?a.callbacks=[T]:z.push(T))}else z={lane:T,tag:m.tag,payload:m.payload,callback:m.callback,next:null},B===null?(N=B=z,y=Y):B=B.next=z,c|=T;if(m=m.next,m===null){if(m=a.shared.pending,m===null)break;z=m,m=z.next,z.next=null,a.lastBaseUpdate=z,a.shared.pending=null}}while(!0);B===null&&(y=Y),a.baseState=y,a.firstBaseUpdate=N,a.lastBaseUpdate=B,i===null&&(a.shared.lanes=0),Bl|=c,e.lanes=c,e.memoizedState=Y}}function df(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function hf(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)df(n[e],t)}var ci=v(null),Ju=v(0);function mf(e,t){e=hl,F(Ju,e),F(ci,t),hl=e|t.baseLanes}function Tc(){F(Ju,hl),F(ci,ci.current)}function Dc(){hl=Ju.current,L(ci),L(Ju)}var rn=v(null),Sn=null;function _l(e){var t=e.alternate;F(mt,mt.current&1),F(rn,e),Sn===null&&(t===null||ci.current!==null||t.memoizedState!==null)&&(Sn=e)}function zc(e){F(mt,mt.current),F(rn,e),Sn===null&&(Sn=e)}function gf(e){e.tag===22?(F(mt,mt.current),F(rn,e),Sn===null&&(Sn=e)):Ll()}function Ll(){F(mt,mt.current),F(rn,rn.current)}function fn(e){L(rn),Sn===e&&(Sn=null),L(mt)}var mt=v(0);function Fu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Bo(n)||Ho(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var il=0,Te=null,Ie=null,St=null,Wu=!1,oi=!1,Ea=!1,Iu=0,Wi=0,ri=null,yh=0;function ot(){throw Error(r(321))}function Oc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cn(e[n],t[n]))return!1;return!0}function Rc(e,t,n,l,a,i){return il=i,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?If:$c,Ea=!1,i=n(l,a),Ea=!1,oi&&(i=yf(t,n,l,a)),pf(e),i}function pf(e){D.H=eu;var t=Ie!==null&&Ie.next!==null;if(il=0,St=Ie=Te=null,Wu=!1,Wi=0,ri=null,t)throw Error(r(300));e===null||Et||(e=e.dependencies,e!==null&&Gu(e)&&(Et=!0))}function yf(e,t,n,l){Te=e;var a=0;do{if(oi&&(ri=null),Wi=0,oi=!1,25<=a)throw Error(r(301));if(a+=1,St=Ie=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}D.H=Pf,i=t(n,l)}while(oi);return i}function vh(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?Ii(t):t,e=e.useState()[0],(Ie!==null?Ie.memoizedState:null)!==e&&(Te.flags|=1024),t}function _c(){var e=Iu!==0;return Iu=0,e}function Lc(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Uc(e){if(Wu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Wu=!1}il=0,St=Ie=Te=null,oi=!1,Wi=Iu=0,ri=null}function Ft(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return St===null?Te.memoizedState=St=e:St=St.next=e,St}function gt(){if(Ie===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var t=St===null?Te.memoizedState:St.next;if(t!==null)St=t,Ie=e;else{if(e===null)throw Te.alternate===null?Error(r(467)):Error(r(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},St===null?Te.memoizedState=St=e:St=St.next=e}return St}function Pu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ii(e){var t=Wi;return Wi+=1,ri===null&&(ri=[]),e=sf(ri,e,t),t=Te,(St===null?t.memoizedState:St.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?If:$c),e}function es(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ii(e);if(e.$$typeof===W)return kt(e)}throw Error(r(438,String(e)))}function kc(e){var t=null,n=Te.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=Te.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Pu(),Te.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=ge;return t.index++,n}function ul(e,t){return typeof t=="function"?t(e):t}function ts(e){var t=gt();return Bc(t,Ie,e)}function Bc(e,t,n){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=n;var a=e.baseQueue,i=l.pending;if(i!==null){if(a!==null){var c=a.next;a.next=i.next,i.next=c}t.baseQueue=a=i,l.pending=null}if(i=e.baseState,a===null)e.memoizedState=i;else{t=a.next;var m=c=null,y=null,N=t,B=!1;do{var Y=N.lane&-536870913;if(Y!==N.lane?(Ue&Y)===Y:(il&Y)===Y){var T=N.revertLane;if(T===0)y!==null&&(y=y.next={lane:0,revertLane:0,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),Y===ai&&(B=!0);else if((il&T)===T){N=N.next,T===ai&&(B=!0);continue}else Y={lane:0,revertLane:N.revertLane,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},y===null?(m=y=Y,c=i):y=y.next=Y,Te.lanes|=T,Bl|=T;Y=N.action,Ea&&n(i,Y),i=N.hasEagerState?N.eagerState:n(i,Y)}else T={lane:Y,revertLane:N.revertLane,gesture:N.gesture,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},y===null?(m=y=T,c=i):y=y.next=T,Te.lanes|=Y,Bl|=Y;N=N.next}while(N!==null&&N!==t);if(y===null?c=i:y.next=m,!cn(i,e.memoizedState)&&(Et=!0,B&&(n=ii,n!==null)))throw n;e.memoizedState=i,e.baseState=c,e.baseQueue=y,l.lastRenderedState=i}return a===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Hc(e){var t=gt(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var l=n.dispatch,a=n.pending,i=t.memoizedState;if(a!==null){n.pending=null;var c=a=a.next;do i=e(i,c.action),c=c.next;while(c!==a);cn(i,t.memoizedState)||(Et=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,l]}function vf(e,t,n){var l=Te,a=gt(),i=He;if(i){if(n===void 0)throw Error(r(407));n=n()}else n=t();var c=!cn((Ie||a).memoizedState,n);if(c&&(a.memoizedState=n,Et=!0),a=a.queue,Gc(Sf.bind(null,l,a,e),[e]),a.getSnapshot!==t||c||St!==null&&St.memoizedState.tag&1){if(l.flags|=2048,fi(9,{destroy:void 0},xf.bind(null,l,a,n,t),null),tt===null)throw Error(r(349));i||(il&127)!==0||bf(l,t,n)}return n}function bf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Te.updateQueue,t===null?(t=Pu(),Te.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function xf(e,t,n,l){t.value=n,t.getSnapshot=l,Ef(t)&&wf(e)}function Sf(e,t,n){return n(function(){Ef(t)&&wf(e)})}function Ef(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!cn(e,n)}catch{return!0}}function wf(e){var t=ha(e,2);t!==null&&un(t,e,2)}function qc(e){var t=Ft();if(typeof e=="function"){var n=e;if(e=n(),Ea){Zt(!0);try{n()}finally{Zt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ul,lastRenderedState:e},t}function Mf(e,t,n,l){return e.baseState=n,Bc(e,Ie,typeof l=="function"?l:ul)}function bh(e,t,n,l,a){if(as(e))throw Error(r(485));if(e=t.action,e!==null){var i={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(c){i.listeners.push(c)}};D.T!==null?n(!0):i.isTransition=!1,l(i),n=t.pending,n===null?(i.next=t.pending=i,Cf(t,i)):(i.next=n.next,t.pending=n.next=i)}}function Cf(e,t){var n=t.action,l=t.payload,a=e.state;if(t.isTransition){var i=D.T,c={};D.T=c;try{var m=n(a,l),y=D.S;y!==null&&y(c,m),jf(e,t,m)}catch(N){Yc(e,t,N)}finally{i!==null&&c.types!==null&&(i.types=c.types),D.T=i}}else try{i=n(a,l),jf(e,t,i)}catch(N){Yc(e,t,N)}}function jf(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){Af(e,t,l)},function(l){return Yc(e,t,l)}):Af(e,t,n)}function Af(e,t,n){t.status="fulfilled",t.value=n,Nf(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Cf(e,n)))}function Yc(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,Nf(t),t=t.next;while(t!==l)}e.action=null}function Nf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Tf(e,t){return t}function Df(e,t){if(He){var n=tt.formState;if(n!==null){e:{var l=Te;if(He){if(lt){t:{for(var a=lt,i=xn;a.nodeType!==8;){if(!i){a=null;break t}if(a=En(a.nextSibling),a===null){a=null;break t}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){lt=En(a.nextSibling),l=a.data==="F!";break e}}Tl(l)}l=!1}l&&(t=n[0])}}return n=Ft(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tf,lastRenderedState:t},n.queue=l,n=Jf.bind(null,Te,l),l.dispatch=n,l=qc(!1),i=Kc.bind(null,Te,!1,l.queue),l=Ft(),a={state:t,dispatch:null,action:e,pending:null},l.queue=a,n=bh.bind(null,Te,a,i,n),a.dispatch=n,l.memoizedState=e,[t,n,!1]}function zf(e){var t=gt();return Of(t,Ie,e)}function Of(e,t,n){if(t=Bc(e,t,Tf)[0],e=ts(ul)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Ii(t)}catch(c){throw c===ui?Zu:c}else l=t;t=gt();var a=t.queue,i=a.dispatch;return n!==t.memoizedState&&(Te.flags|=2048,fi(9,{destroy:void 0},xh.bind(null,a,n),null)),[l,i,e]}function xh(e,t){e.action=t}function Rf(e){var t=gt(),n=Ie;if(n!==null)return Of(t,n,e);gt(),t=t.memoizedState,n=gt();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function fi(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=Te.updateQueue,t===null&&(t=Pu(),Te.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function _f(){return gt().memoizedState}function ns(e,t,n,l){var a=Ft();Te.flags|=e,a.memoizedState=fi(1|t,{destroy:void 0},n,l===void 0?null:l)}function ls(e,t,n,l){var a=gt();l=l===void 0?null:l;var i=a.memoizedState.inst;Ie!==null&&l!==null&&Oc(l,Ie.memoizedState.deps)?a.memoizedState=fi(t,i,n,l):(Te.flags|=e,a.memoizedState=fi(1|t,i,n,l))}function Lf(e,t){ns(8390656,8,e,t)}function Gc(e,t){ls(2048,8,e,t)}function Sh(e){Te.flags|=4;var t=Te.updateQueue;if(t===null)t=Pu(),Te.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Uf(e){var t=gt().memoizedState;return Sh({ref:t,nextImpl:e}),function(){if((Ke&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function kf(e,t){return ls(4,2,e,t)}function Bf(e,t){return ls(4,4,e,t)}function Hf(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function qf(e,t,n){n=n!=null?n.concat([e]):null,ls(4,4,Hf.bind(null,t,e),n)}function Xc(){}function Yf(e,t){var n=gt();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&Oc(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function Gf(e,t){var n=gt();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&Oc(t,l[1]))return l[0];if(l=e(),Ea){Zt(!0);try{e()}finally{Zt(!1)}}return n.memoizedState=[l,t],l}function Qc(e,t,n){return n===void 0||(il&1073741824)!==0&&(Ue&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Xd(),Te.lanes|=e,Bl|=e,n)}function Xf(e,t,n,l){return cn(n,t)?n:ci.current!==null?(e=Qc(e,n,l),cn(e,t)||(Et=!0),e):(il&42)===0||(il&1073741824)!==0&&(Ue&261930)===0?(Et=!0,e.memoizedState=n):(e=Xd(),Te.lanes|=e,Bl|=e,t)}function Qf(e,t,n,l,a){var i=Q.p;Q.p=i!==0&&8>i?i:8;var c=D.T,m={};D.T=m,Kc(e,!1,t,n);try{var y=a(),N=D.S;if(N!==null&&N(m,y),y!==null&&typeof y=="object"&&typeof y.then=="function"){var B=ph(y,l);Pi(e,t,B,mn(e))}else Pi(e,t,l,mn(e))}catch(Y){Pi(e,t,{then:function(){},status:"rejected",reason:Y},mn())}finally{Q.p=i,c!==null&&m.types!==null&&(c.types=m.types),D.T=c}}function Eh(){}function Zc(e,t,n,l){if(e.tag!==5)throw Error(r(476));var a=Zf(e).queue;Qf(e,a,t,te,n===null?Eh:function(){return Vf(e),n(l)})}function Zf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ul,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ul,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Vf(e){var t=Zf(e);t.next===null&&(t=e.alternate.memoizedState),Pi(e,t.next.queue,{},mn())}function Vc(){return kt(pu)}function Kf(){return gt().memoizedState}function $f(){return gt().memoizedState}function wh(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=mn();e=Ol(n);var l=Rl(t,e,n);l!==null&&(un(l,t,n),$i(l,t,n)),t={cache:Sc()},e.payload=t;return}t=t.return}}function Mh(e,t,n){var l=mn();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},as(e)?Ff(t,n):(n=rc(e,t,n,l),n!==null&&(un(n,e,l),Wf(n,t,l)))}function Jf(e,t,n){var l=mn();Pi(e,t,n,l)}function Pi(e,t,n,l){var a={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(as(e))Ff(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var c=t.lastRenderedState,m=i(c,n);if(a.hasEagerState=!0,a.eagerState=m,cn(m,c))return Bu(e,t,a,0),tt===null&&ku(),!1}catch{}if(n=rc(e,t,a,l),n!==null)return un(n,e,l),Wf(n,t,l),!0}return!1}function Kc(e,t,n,l){if(l={lane:2,revertLane:jo(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},as(e)){if(t)throw Error(r(479))}else t=rc(e,n,l,2),t!==null&&un(t,e,2)}function as(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function Ff(e,t){oi=Wu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Wf(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,xl(e,n)}}var eu={readContext:kt,use:es,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useLayoutEffect:ot,useInsertionEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useSyncExternalStore:ot,useId:ot,useHostTransitionStatus:ot,useFormState:ot,useActionState:ot,useOptimistic:ot,useMemoCache:ot,useCacheRefresh:ot};eu.useEffectEvent=ot;var If={readContext:kt,use:es,useCallback:function(e,t){return Ft().memoizedState=[e,t===void 0?null:t],e},useContext:kt,useEffect:Lf,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,ns(4194308,4,Hf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ns(4194308,4,e,t)},useInsertionEffect:function(e,t){ns(4,2,e,t)},useMemo:function(e,t){var n=Ft();t=t===void 0?null:t;var l=e();if(Ea){Zt(!0);try{e()}finally{Zt(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Ft();if(n!==void 0){var a=n(t);if(Ea){Zt(!0);try{n(t)}finally{Zt(!1)}}}else a=t;return l.memoizedState=l.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},l.queue=e,e=e.dispatch=Mh.bind(null,Te,e),[l.memoizedState,e]},useRef:function(e){var t=Ft();return e={current:e},t.memoizedState=e},useState:function(e){e=qc(e);var t=e.queue,n=Jf.bind(null,Te,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Xc,useDeferredValue:function(e,t){var n=Ft();return Qc(n,e,t)},useTransition:function(){var e=qc(!1);return e=Qf.bind(null,Te,e.queue,!0,!1),Ft().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=Te,a=Ft();if(He){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),tt===null)throw Error(r(349));(Ue&127)!==0||bf(l,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,Lf(Sf.bind(null,l,i,e),[e]),l.flags|=2048,fi(9,{destroy:void 0},xf.bind(null,l,i,n,t),null),n},useId:function(){var e=Ft(),t=tt.identifierPrefix;if(He){var n=Bn,l=kn;n=(l&~(1<<32-ct(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Iu++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=yh++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Vc,useFormState:Df,useActionState:Df,useOptimistic:function(e){var t=Ft();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Kc.bind(null,Te,!0,n),n.dispatch=t,[e,t]},useMemoCache:kc,useCacheRefresh:function(){return Ft().memoizedState=wh.bind(null,Te)},useEffectEvent:function(e){var t=Ft(),n={impl:e};return t.memoizedState=n,function(){if((Ke&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},$c={readContext:kt,use:es,useCallback:Yf,useContext:kt,useEffect:Gc,useImperativeHandle:qf,useInsertionEffect:kf,useLayoutEffect:Bf,useMemo:Gf,useReducer:ts,useRef:_f,useState:function(){return ts(ul)},useDebugValue:Xc,useDeferredValue:function(e,t){var n=gt();return Xf(n,Ie.memoizedState,e,t)},useTransition:function(){var e=ts(ul)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:Ii(e),t]},useSyncExternalStore:vf,useId:Kf,useHostTransitionStatus:Vc,useFormState:zf,useActionState:zf,useOptimistic:function(e,t){var n=gt();return Mf(n,Ie,e,t)},useMemoCache:kc,useCacheRefresh:$f};$c.useEffectEvent=Uf;var Pf={readContext:kt,use:es,useCallback:Yf,useContext:kt,useEffect:Gc,useImperativeHandle:qf,useInsertionEffect:kf,useLayoutEffect:Bf,useMemo:Gf,useReducer:Hc,useRef:_f,useState:function(){return Hc(ul)},useDebugValue:Xc,useDeferredValue:function(e,t){var n=gt();return Ie===null?Qc(n,e,t):Xf(n,Ie.memoizedState,e,t)},useTransition:function(){var e=Hc(ul)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:Ii(e),t]},useSyncExternalStore:vf,useId:Kf,useHostTransitionStatus:Vc,useFormState:Rf,useActionState:Rf,useOptimistic:function(e,t){var n=gt();return Ie!==null?Mf(n,Ie,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:kc,useCacheRefresh:$f};Pf.useEffectEvent=Uf;function Jc(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:_({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Fc={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=mn(),a=Ol(l);a.payload=t,n!=null&&(a.callback=n),t=Rl(e,a,l),t!==null&&(un(t,e,l),$i(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=mn(),a=Ol(l);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=Rl(e,a,l),t!==null&&(un(t,e,l),$i(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=mn(),l=Ol(n);l.tag=2,t!=null&&(l.callback=t),t=Rl(e,l,n),t!==null&&(un(t,e,n),$i(t,e,n))}};function ed(e,t,n,l,a,i,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,i,c):t.prototype&&t.prototype.isPureReactComponent?!qi(n,l)||!qi(a,i):!0}function td(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&Fc.enqueueReplaceState(t,t.state,null)}function wa(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=_({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function nd(e){Uu(e)}function ld(e){console.error(e)}function ad(e){Uu(e)}function is(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function id(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Wc(e,t,n){return n=Ol(n),n.tag=3,n.payload={element:null},n.callback=function(){is(e,t)},n}function ud(e){return e=Ol(e),e.tag=3,e}function sd(e,t,n,l){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var i=l.value;e.payload=function(){return a(i)},e.callback=function(){id(t,n,l)}}var c=n.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(e.callback=function(){id(t,n,l),typeof a!="function"&&(Hl===null?Hl=new Set([this]):Hl.add(this));var m=l.stack;this.componentDidCatch(l.value,{componentStack:m!==null?m:""})})}function Ch(e,t,n,l,a){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&li(t,n,a,!0),n=rn.current,n!==null){switch(n.tag){case 31:case 13:return Sn===null?ys():n.alternate===null&&rt===0&&(rt=3),n.flags&=-257,n.flags|=65536,n.lanes=a,l===Vu?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),wo(e,l,a)),!1;case 22:return n.flags|=65536,l===Vu?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),wo(e,l,a)),!1}throw Error(r(435,n.tag))}return wo(e,l,a),ys(),!1}if(He)return t=rn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,l!==pc&&(e=Error(r(422),{cause:l}),Xi(yn(e,n)))):(l!==pc&&(t=Error(r(423),{cause:l}),Xi(yn(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,l=yn(l,n),a=Wc(e.stateNode,l,a),Ac(e,a),rt!==4&&(rt=2)),!1;var i=Error(r(520),{cause:l});if(i=yn(i,n),cu===null?cu=[i]:cu.push(i),rt!==4&&(rt=2),t===null)return!0;l=yn(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Wc(n.stateNode,l,e),Ac(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Hl===null||!Hl.has(i))))return n.flags|=65536,a&=-a,n.lanes|=a,a=ud(a),sd(a,e,n,l),Ac(n,a),!1}n=n.return}while(n!==null);return!1}var Ic=Error(r(461)),Et=!1;function Bt(e,t,n,l){t.child=e===null?ff(t,null,n,l):Sa(t,e.child,n,l)}function cd(e,t,n,l,a){n=n.render;var i=t.ref;if("ref"in l){var c={};for(var m in l)m!=="ref"&&(c[m]=l[m])}else c=l;return ya(t),l=Rc(e,t,n,c,i,a),m=_c(),e!==null&&!Et?(Lc(e,t,a),sl(e,t,a)):(He&&m&&mc(t),t.flags|=1,Bt(e,t,l,a),t.child)}function od(e,t,n,l,a){if(e===null){var i=n.type;return typeof i=="function"&&!fc(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,rd(e,t,i,l,a)):(e=qu(n.type,null,l,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!uo(e,a)){var c=i.memoizedProps;if(n=n.compare,n=n!==null?n:qi,n(c,l)&&e.ref===t.ref)return sl(e,t,a)}return t.flags|=1,e=tl(i,l),e.ref=t.ref,e.return=t,t.child=e}function rd(e,t,n,l,a){if(e!==null){var i=e.memoizedProps;if(qi(i,l)&&e.ref===t.ref)if(Et=!1,t.pendingProps=l=i,uo(e,a))(e.flags&131072)!==0&&(Et=!0);else return t.lanes=e.lanes,sl(e,t,a)}return Pc(e,t,n,l,a)}function fd(e,t,n,l){var a=l.children,i=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(i=i!==null?i.baseLanes|n:n,e!==null){for(l=t.child=e.child,a=0;l!==null;)a=a|l.lanes|l.childLanes,l=l.sibling;l=a&~i}else l=0,t.child=null;return dd(e,t,i,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Qu(t,i!==null?i.cachePool:null),i!==null?mf(t,i):Tc(),gf(t);else return l=t.lanes=536870912,dd(e,t,i!==null?i.baseLanes|n:n,n,l)}else i!==null?(Qu(t,i.cachePool),mf(t,i),Ll(),t.memoizedState=null):(e!==null&&Qu(t,null),Tc(),Ll());return Bt(e,t,a,n),t.child}function tu(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function dd(e,t,n,l,a){var i=wc();return i=i===null?null:{parent:xt._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&Qu(t,null),Tc(),gf(t),e!==null&&li(e,t,l,!0),t.childLanes=a,null}function us(e,t){return t=cs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function hd(e,t,n){return Sa(t,e.child,null,n),e=us(t,t.pendingProps),e.flags|=2,fn(t),t.memoizedState=null,e}function jh(e,t,n){var l=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(He){if(l.mode==="hidden")return e=us(t,l),t.lanes=536870912,tu(null,e);if(zc(t),(e=lt)?(e=C0(e,xn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Al!==null?{id:kn,overflow:Bn}:null,retryLane:536870912,hydrationErrors:null},n=Jr(e),n.return=t,t.child=n,Ut=t,lt=null)):e=null,e===null)throw Tl(t);return t.lanes=536870912,null}return us(t,l)}var i=e.memoizedState;if(i!==null){var c=i.dehydrated;if(zc(t),a)if(t.flags&256)t.flags&=-257,t=hd(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(Et||li(e,t,n,!1),a=(n&e.childLanes)!==0,Et||a){if(l=tt,l!==null&&(c=qt(l,n),c!==0&&c!==i.retryLane))throw i.retryLane=c,ha(e,c),un(l,e,c),Ic;ys(),t=hd(e,t,n)}else e=i.treeContext,lt=En(c.nextSibling),Ut=t,He=!0,Nl=null,xn=!1,e!==null&&Ir(t,e),t=us(t,l),t.flags|=4096;return t}return e=tl(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ss(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(r(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Pc(e,t,n,l,a){return ya(t),n=Rc(e,t,n,l,void 0,a),l=_c(),e!==null&&!Et?(Lc(e,t,a),sl(e,t,a)):(He&&l&&mc(t),t.flags|=1,Bt(e,t,n,a),t.child)}function md(e,t,n,l,a,i){return ya(t),t.updateQueue=null,n=yf(t,l,n,a),pf(e),l=_c(),e!==null&&!Et?(Lc(e,t,i),sl(e,t,i)):(He&&l&&mc(t),t.flags|=1,Bt(e,t,n,i),t.child)}function gd(e,t,n,l,a){if(ya(t),t.stateNode===null){var i=Pa,c=n.contextType;typeof c=="object"&&c!==null&&(i=kt(c)),i=new n(l,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Fc,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=l,i.state=t.memoizedState,i.refs={},Cc(t),c=n.contextType,i.context=typeof c=="object"&&c!==null?kt(c):Pa,i.state=t.memoizedState,c=n.getDerivedStateFromProps,typeof c=="function"&&(Jc(t,n,c,l),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(c=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),c!==i.state&&Fc.enqueueReplaceState(i,i.state,null),Fi(t,l,i,a),Ji(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){i=t.stateNode;var m=t.memoizedProps,y=wa(n,m);i.props=y;var N=i.context,B=n.contextType;c=Pa,typeof B=="object"&&B!==null&&(c=kt(B));var Y=n.getDerivedStateFromProps;B=typeof Y=="function"||typeof i.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,B||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(m||N!==c)&&td(t,i,l,c),zl=!1;var T=t.memoizedState;i.state=T,Fi(t,l,i,a),Ji(),N=t.memoizedState,m||T!==N||zl?(typeof Y=="function"&&(Jc(t,n,Y,l),N=t.memoizedState),(y=zl||ed(t,n,y,l,T,N,c))?(B||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=N),i.props=l,i.state=N,i.context=c,l=y):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{i=t.stateNode,jc(e,t),c=t.memoizedProps,B=wa(n,c),i.props=B,Y=t.pendingProps,T=i.context,N=n.contextType,y=Pa,typeof N=="object"&&N!==null&&(y=kt(N)),m=n.getDerivedStateFromProps,(N=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==Y||T!==y)&&td(t,i,l,y),zl=!1,T=t.memoizedState,i.state=T,Fi(t,l,i,a),Ji();var z=t.memoizedState;c!==Y||T!==z||zl||e!==null&&e.dependencies!==null&&Gu(e.dependencies)?(typeof m=="function"&&(Jc(t,n,m,l),z=t.memoizedState),(B=zl||ed(t,n,B,l,T,z,y)||e!==null&&e.dependencies!==null&&Gu(e.dependencies))?(N||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(l,z,y),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(l,z,y)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=z),i.props=l,i.state=z,i.context=y,l=B):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),l=!1)}return i=l,ss(e,t),l=(t.flags&128)!==0,i||l?(i=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&l?(t.child=Sa(t,e.child,null,a),t.child=Sa(t,null,n,a)):Bt(e,t,n,a),t.memoizedState=i.state,e=t.child):e=sl(e,t,a),e}function pd(e,t,n,l){return ga(),t.flags|=256,Bt(e,t,n,l),t.child}var eo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function to(e){return{baseLanes:e,cachePool:af()}}function no(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=hn),e}function yd(e,t,n){var l=t.pendingProps,a=!1,i=(t.flags&128)!==0,c;if((c=i)||(c=e!==null&&e.memoizedState===null?!1:(mt.current&2)!==0),c&&(a=!0,t.flags&=-129),c=(t.flags&32)!==0,t.flags&=-33,e===null){if(He){if(a?_l(t):Ll(),(e=lt)?(e=C0(e,xn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Al!==null?{id:kn,overflow:Bn}:null,retryLane:536870912,hydrationErrors:null},n=Jr(e),n.return=t,t.child=n,Ut=t,lt=null)):e=null,e===null)throw Tl(t);return Ho(e)?t.lanes=32:t.lanes=536870912,null}var m=l.children;return l=l.fallback,a?(Ll(),a=t.mode,m=cs({mode:"hidden",children:m},a),l=ma(l,a,n,null),m.return=t,l.return=t,m.sibling=l,t.child=m,l=t.child,l.memoizedState=to(n),l.childLanes=no(e,c,n),t.memoizedState=eo,tu(null,l)):(_l(t),lo(t,m))}var y=e.memoizedState;if(y!==null&&(m=y.dehydrated,m!==null)){if(i)t.flags&256?(_l(t),t.flags&=-257,t=ao(e,t,n)):t.memoizedState!==null?(Ll(),t.child=e.child,t.flags|=128,t=null):(Ll(),m=l.fallback,a=t.mode,l=cs({mode:"visible",children:l.children},a),m=ma(m,a,n,null),m.flags|=2,l.return=t,m.return=t,l.sibling=m,t.child=l,Sa(t,e.child,null,n),l=t.child,l.memoizedState=to(n),l.childLanes=no(e,c,n),t.memoizedState=eo,t=tu(null,l));else if(_l(t),Ho(m)){if(c=m.nextSibling&&m.nextSibling.dataset,c)var N=c.dgst;c=N,l=Error(r(419)),l.stack="",l.digest=c,Xi({value:l,source:null,stack:null}),t=ao(e,t,n)}else if(Et||li(e,t,n,!1),c=(n&e.childLanes)!==0,Et||c){if(c=tt,c!==null&&(l=qt(c,n),l!==0&&l!==y.retryLane))throw y.retryLane=l,ha(e,l),un(c,e,l),Ic;Bo(m)||ys(),t=ao(e,t,n)}else Bo(m)?(t.flags|=192,t.child=e.child,t=null):(e=y.treeContext,lt=En(m.nextSibling),Ut=t,He=!0,Nl=null,xn=!1,e!==null&&Ir(t,e),t=lo(t,l.children),t.flags|=4096);return t}return a?(Ll(),m=l.fallback,a=t.mode,y=e.child,N=y.sibling,l=tl(y,{mode:"hidden",children:l.children}),l.subtreeFlags=y.subtreeFlags&65011712,N!==null?m=tl(N,m):(m=ma(m,a,n,null),m.flags|=2),m.return=t,l.return=t,l.sibling=m,t.child=l,tu(null,l),l=t.child,m=e.child.memoizedState,m===null?m=to(n):(a=m.cachePool,a!==null?(y=xt._currentValue,a=a.parent!==y?{parent:y,pool:y}:a):a=af(),m={baseLanes:m.baseLanes|n,cachePool:a}),l.memoizedState=m,l.childLanes=no(e,c,n),t.memoizedState=eo,tu(e.child,l)):(_l(t),n=e.child,e=n.sibling,n=tl(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(c=t.deletions,c===null?(t.deletions=[e],t.flags|=16):c.push(e)),t.child=n,t.memoizedState=null,n)}function lo(e,t){return t=cs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function cs(e,t){return e=on(22,e,null,t),e.lanes=0,e}function ao(e,t,n){return Sa(t,e.child,null,n),e=lo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function vd(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),bc(e.return,t,n)}function io(e,t,n,l,a,i){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:a,treeForkCount:i}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=l,c.tail=n,c.tailMode=a,c.treeForkCount=i)}function bd(e,t,n){var l=t.pendingProps,a=l.revealOrder,i=l.tail;l=l.children;var c=mt.current,m=(c&2)!==0;if(m?(c=c&1|2,t.flags|=128):c&=1,F(mt,c),Bt(e,t,l,n),l=He?Gi:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&vd(e,n,t);else if(e.tag===19)vd(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&Fu(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),io(t,!1,a,n,i,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Fu(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}io(t,!0,n,null,i,l);break;case"together":io(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function sl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Bl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(li(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=tl(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=tl(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function uo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Gu(e)))}function Ah(e,t,n){switch(t.tag){case 3:V(t,t.stateNode.containerInfo),Dl(t,xt,e.memoizedState.cache),ga();break;case 27:case 5:le(t);break;case 4:V(t,t.stateNode.containerInfo);break;case 10:Dl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,zc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(_l(t),t.flags|=128,null):(n&t.child.childLanes)!==0?yd(e,t,n):(_l(t),e=sl(e,t,n),e!==null?e.sibling:null);_l(t);break;case 19:var a=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(li(e,t,n,!1),l=(n&t.childLanes)!==0),a){if(l)return bd(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),F(mt,mt.current),l)break;return null;case 22:return t.lanes=0,fd(e,t,n,t.pendingProps);case 24:Dl(t,xt,e.memoizedState.cache)}return sl(e,t,n)}function xd(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Et=!0;else{if(!uo(e,n)&&(t.flags&128)===0)return Et=!1,Ah(e,t,n);Et=(e.flags&131072)!==0}else Et=!1,He&&(t.flags&1048576)!==0&&Wr(t,Gi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=ba(t.elementType),t.type=e,typeof e=="function")fc(e)?(l=wa(e,l),t.tag=1,t=gd(null,t,e,l,n)):(t.tag=0,t=Pc(null,t,e,l,n));else{if(e!=null){var a=e.$$typeof;if(a===ie){t.tag=11,t=cd(null,t,e,l,n);break e}else if(a===I){t.tag=14,t=od(null,t,e,l,n);break e}}throw t=Ae(e)||e,Error(r(306,t,""))}}return t;case 0:return Pc(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,a=wa(l,t.pendingProps),gd(e,t,l,a,n);case 3:e:{if(V(t,t.stateNode.containerInfo),e===null)throw Error(r(387));l=t.pendingProps;var i=t.memoizedState;a=i.element,jc(e,t),Fi(t,l,null,n);var c=t.memoizedState;if(l=c.cache,Dl(t,xt,l),l!==i.cache&&xc(t,[xt],n,!0),Ji(),l=c.element,i.isDehydrated)if(i={element:l,isDehydrated:!1,cache:c.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=pd(e,t,l,n);break e}else if(l!==a){a=yn(Error(r(424)),t),Xi(a),t=pd(e,t,l,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,lt=En(e.firstChild),Ut=t,He=!0,Nl=null,xn=!0,n=ff(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ga(),l===a){t=sl(e,t,n);break e}Bt(e,t,l,n)}t=t.child}return t;case 26:return ss(e,t),e===null?(n=z0(t.type,null,t.pendingProps,null))?t.memoizedState=n:He||(n=t.type,e=t.pendingProps,l=Ms(ve.current).createElement(n),l[vt]=t,l[Rt]=e,Ht(l,n,e),ht(l),t.stateNode=l):t.memoizedState=z0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return le(t),e===null&&He&&(l=t.stateNode=N0(t.type,t.pendingProps,ve.current),Ut=t,xn=!0,a=lt,Xl(t.type)?(qo=a,lt=En(l.firstChild)):lt=a),Bt(e,t,t.pendingProps.children,n),ss(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&He&&((a=l=lt)&&(l=lm(l,t.type,t.pendingProps,xn),l!==null?(t.stateNode=l,Ut=t,lt=En(l.firstChild),xn=!1,a=!0):a=!1),a||Tl(t)),le(t),a=t.type,i=t.pendingProps,c=e!==null?e.memoizedProps:null,l=i.children,Lo(a,i)?l=null:c!==null&&Lo(a,c)&&(t.flags|=32),t.memoizedState!==null&&(a=Rc(e,t,vh,null,null,n),pu._currentValue=a),ss(e,t),Bt(e,t,l,n),t.child;case 6:return e===null&&He&&((e=n=lt)&&(n=am(n,t.pendingProps,xn),n!==null?(t.stateNode=n,Ut=t,lt=null,e=!0):e=!1),e||Tl(t)),null;case 13:return yd(e,t,n);case 4:return V(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Sa(t,null,l,n):Bt(e,t,l,n),t.child;case 11:return cd(e,t,t.type,t.pendingProps,n);case 7:return Bt(e,t,t.pendingProps,n),t.child;case 8:return Bt(e,t,t.pendingProps.children,n),t.child;case 12:return Bt(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,Dl(t,t.type,l.value),Bt(e,t,l.children,n),t.child;case 9:return a=t.type._context,l=t.pendingProps.children,ya(t),a=kt(a),l=l(a),t.flags|=1,Bt(e,t,l,n),t.child;case 14:return od(e,t,t.type,t.pendingProps,n);case 15:return rd(e,t,t.type,t.pendingProps,n);case 19:return bd(e,t,n);case 31:return jh(e,t,n);case 22:return fd(e,t,n,t.pendingProps);case 24:return ya(t),l=kt(xt),e===null?(a=wc(),a===null&&(a=tt,i=Sc(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=n),a=i),t.memoizedState={parent:l,cache:a},Cc(t),Dl(t,xt,a)):((e.lanes&n)!==0&&(jc(e,t),Fi(t,null,null,n),Ji()),a=e.memoizedState,i=t.memoizedState,a.parent!==l?(a={parent:l,cache:l},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Dl(t,xt,l)):(l=i.cache,Dl(t,xt,l),l!==a.cache&&xc(t,[xt],n,!0))),Bt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function cl(e){e.flags|=4}function so(e,t,n,l,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(Kd())e.flags|=8192;else throw xa=Vu,Mc}else e.flags&=-16777217}function Sd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!U0(t))if(Kd())e.flags|=8192;else throw xa=Vu,Mc}function os(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?We():536870912,e.lanes|=t,gi|=t)}function nu(e,t){if(!He)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function at(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags&65011712,l|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags,l|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function Nh(e,t,n){var l=t.pendingProps;switch(gc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return at(t),null;case 1:return at(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),al(xt),J(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ni(t)?cl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,yc())),at(t),null;case 26:var a=t.type,i=t.memoizedState;return e===null?(cl(t),i!==null?(at(t),Sd(t,i)):(at(t),so(t,a,null,l,n))):i?i!==e.memoizedState?(cl(t),at(t),Sd(t,i)):(at(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&cl(t),at(t),so(t,a,e,l,n)),null;case 27:if(Le(t),n=ve.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&cl(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return at(t),null}e=ee.current,ni(t)?Pr(t):(e=N0(a,l,n),t.stateNode=e,cl(t))}return at(t),null;case 5:if(Le(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&cl(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return at(t),null}if(i=ee.current,ni(t))Pr(t);else{var c=Ms(ve.current);switch(i){case 1:i=c.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=c.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=c.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=c.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=c.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?c.createElement("select",{is:l.is}):c.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?c.createElement(a,{is:l.is}):c.createElement(a)}}i[vt]=t,i[Rt]=l;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=i;e:switch(Ht(i,a,l),a){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&cl(t)}}return at(t),so(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&cl(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=ve.current,ni(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,a=Ut,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}e[vt]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||y0(e.nodeValue,n)),e||Tl(t,!0)}else e=Ms(e).createTextNode(l),e[vt]=t,t.stateNode=e}return at(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=ni(t),n!==null){if(e===null){if(!l)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[vt]=t}else ga(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),e=!1}else n=yc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(fn(t),t):(fn(t),null);if((t.flags&128)!==0)throw Error(r(558))}return at(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ni(t),l!==null&&l.dehydrated!==null){if(e===null){if(!a)throw Error(r(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));a[vt]=t}else ga(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),a=!1}else a=yc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(fn(t),t):(fn(t),null)}return fn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,a=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(a=l.alternate.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==a&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),os(t,t.updateQueue),at(t),null);case 4:return J(),e===null&&Do(t.stateNode.containerInfo),at(t),null;case 10:return al(t.type),at(t),null;case 19:if(L(mt),l=t.memoizedState,l===null)return at(t),null;if(a=(t.flags&128)!==0,i=l.rendering,i===null)if(a)nu(l,!1);else{if(rt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Fu(e),i!==null){for(t.flags|=128,nu(l,!1),e=i.updateQueue,t.updateQueue=e,os(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)$r(n,e),n=n.sibling;return F(mt,mt.current&1|2),He&&nl(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&yt()>ms&&(t.flags|=128,a=!0,nu(l,!1),t.lanes=4194304)}else{if(!a)if(e=Fu(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,os(t,e),nu(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!He)return at(t),null}else 2*yt()-l.renderingStartTime>ms&&n!==536870912&&(t.flags|=128,a=!0,nu(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(e=l.last,e!==null?e.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=yt(),e.sibling=null,n=mt.current,F(mt,a?n&1|2:n&1),He&&nl(t,l.treeForkCount),e):(at(t),null);case 22:case 23:return fn(t),Dc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(at(t),t.subtreeFlags&6&&(t.flags|=8192)):at(t),n=t.updateQueue,n!==null&&os(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&L(va),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),al(xt),at(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Th(e,t){switch(gc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return al(xt),J(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Le(t),null;case 31:if(t.memoizedState!==null){if(fn(t),t.alternate===null)throw Error(r(340));ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(mt),null;case 4:return J(),null;case 10:return al(t.type),null;case 22:case 23:return fn(t),Dc(),e!==null&&L(va),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return al(xt),null;case 25:return null;default:return null}}function Ed(e,t){switch(gc(t),t.tag){case 3:al(xt),J();break;case 26:case 27:case 5:Le(t);break;case 4:J();break;case 31:t.memoizedState!==null&&fn(t);break;case 13:fn(t);break;case 19:L(mt);break;case 10:al(t.type);break;case 22:case 23:fn(t),Dc(),e!==null&&L(va);break;case 24:al(xt)}}function lu(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var a=l.next;n=a;do{if((n.tag&e)===e){l=void 0;var i=n.create,c=n.inst;l=i(),c.destroy=l}n=n.next}while(n!==a)}}catch(m){Fe(t,t.return,m)}}function Ul(e,t,n){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var i=a.next;l=i;do{if((l.tag&e)===e){var c=l.inst,m=c.destroy;if(m!==void 0){c.destroy=void 0,a=t;var y=n,N=m;try{N()}catch(B){Fe(a,y,B)}}}l=l.next}while(l!==i)}}catch(B){Fe(t,t.return,B)}}function wd(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{hf(t,n)}catch(l){Fe(e,e.return,l)}}}function Md(e,t,n){n.props=wa(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){Fe(e,t,l)}}function au(e,t){try{var n=e.ref;if(n!==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 n=="function"?e.refCleanup=n(l):n.current=l}}catch(a){Fe(e,t,a)}}function Hn(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(a){Fe(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){Fe(e,t,a)}else n.current=null}function Cd(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(a){Fe(e,e.return,a)}}function co(e,t,n){try{var l=e.stateNode;Wh(l,e.type,n,t),l[Rt]=t}catch(a){Fe(e,e.return,a)}}function jd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Xl(e.type)||e.tag===4}function oo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jd(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&&Xl(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 ro(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Nn));else if(l!==4&&(l===27&&Xl(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(ro(e,t,n),e=e.sibling;e!==null;)ro(e,t,n),e=e.sibling}function rs(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&Xl(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(rs(e,t,n),e=e.sibling;e!==null;)rs(e,t,n),e=e.sibling}function Ad(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);Ht(t,l,n),t[vt]=e,t[Rt]=n}catch(i){Fe(e,e.return,i)}}var ol=!1,wt=!1,fo=!1,Nd=typeof WeakSet=="function"?WeakSet:Set,zt=null;function Dh(e,t){if(e=e.containerInfo,Ro=zs,e=Hr(e),ac(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var a=l.anchorOffset,i=l.focusNode;l=l.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var c=0,m=-1,y=-1,N=0,B=0,Y=e,T=null;t:for(;;){for(var z;Y!==n||a!==0&&Y.nodeType!==3||(m=c+a),Y!==i||l!==0&&Y.nodeType!==3||(y=c+l),Y.nodeType===3&&(c+=Y.nodeValue.length),(z=Y.firstChild)!==null;)T=Y,Y=z;for(;;){if(Y===e)break t;if(T===n&&++N===a&&(m=c),T===i&&++B===l&&(y=c),(z=Y.nextSibling)!==null)break;Y=T,T=Y.parentNode}Y=z}n=m===-1||y===-1?null:{start:m,end:y}}else n=null}n=n||{start:0,end:0}}else n=null;for(_o={focusedElem:e,selectionRange:n},zs=!1,zt=t;zt!==null;)if(t=zt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,zt=e;else for(;zt!==null;){switch(t=zt,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,n=t,a=i.memoizedProps,i=i.memoizedState,l=n.stateNode;try{var se=wa(n.type,a);e=l.getSnapshotBeforeUpdate(se,i),l.__reactInternalSnapshotBeforeUpdate=e}catch(Ee){Fe(n,n.return,Ee)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ko(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ko(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(r(163))}if(e=t.sibling,e!==null){e.return=t.return,zt=e;break}zt=t.return}}function Td(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:fl(e,n),l&4&&lu(5,n);break;case 1:if(fl(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(c){Fe(n,n.return,c)}else{var a=wa(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(c){Fe(n,n.return,c)}}l&64&&wd(n),l&512&&au(n,n.return);break;case 3:if(fl(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{hf(e,t)}catch(c){Fe(n,n.return,c)}}break;case 27:t===null&&l&4&&Ad(n);case 26:case 5:fl(e,n),t===null&&l&4&&Cd(n),l&512&&au(n,n.return);break;case 12:fl(e,n);break;case 31:fl(e,n),l&4&&Od(e,n);break;case 13:fl(e,n),l&4&&Rd(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Hh.bind(null,n),im(e,n))));break;case 22:if(l=n.memoizedState!==null||ol,!l){t=t!==null&&t.memoizedState!==null||wt,a=ol;var i=wt;ol=l,(wt=t)&&!i?dl(e,n,(n.subtreeFlags&8772)!==0):fl(e,n),ol=a,wt=i}break;case 30:break;default:fl(e,n)}}function Dd(e){var t=e.alternate;t!==null&&(e.alternate=null,Dd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ai(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 ut=null,tn=!1;function rl(e,t,n){for(n=n.child;n!==null;)zd(e,t,n),n=n.sibling}function zd(e,t,n){if(Tt&&typeof Tt.onCommitFiberUnmount=="function")try{Tt.onCommitFiberUnmount(It,n)}catch{}switch(n.tag){case 26:wt||Hn(n,t),rl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:wt||Hn(n,t);var l=ut,a=tn;Xl(n.type)&&(ut=n.stateNode,tn=!1),rl(e,t,n),hu(n.stateNode),ut=l,tn=a;break;case 5:wt||Hn(n,t);case 6:if(l=ut,a=tn,ut=null,rl(e,t,n),ut=l,tn=a,ut!==null)if(tn)try{(ut.nodeType===9?ut.body:ut.nodeName==="HTML"?ut.ownerDocument.body:ut).removeChild(n.stateNode)}catch(i){Fe(n,t,i)}else try{ut.removeChild(n.stateNode)}catch(i){Fe(n,t,i)}break;case 18:ut!==null&&(tn?(e=ut,w0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),wi(e)):w0(ut,n.stateNode));break;case 4:l=ut,a=tn,ut=n.stateNode.containerInfo,tn=!0,rl(e,t,n),ut=l,tn=a;break;case 0:case 11:case 14:case 15:Ul(2,n,t),wt||Ul(4,n,t),rl(e,t,n);break;case 1:wt||(Hn(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&Md(n,t,l)),rl(e,t,n);break;case 21:rl(e,t,n);break;case 22:wt=(l=wt)||n.memoizedState!==null,rl(e,t,n),wt=l;break;default:rl(e,t,n)}}function Od(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{wi(e)}catch(n){Fe(t,t.return,n)}}}function Rd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{wi(e)}catch(n){Fe(t,t.return,n)}}function zh(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Nd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Nd),t;default:throw Error(r(435,e.tag))}}function fs(e,t){var n=zh(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var a=qh.bind(null,e,l);l.then(a,a)}})}function nn(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var a=n[l],i=e,c=t,m=c;e:for(;m!==null;){switch(m.tag){case 27:if(Xl(m.type)){ut=m.stateNode,tn=!1;break e}break;case 5:ut=m.stateNode,tn=!1;break e;case 3:case 4:ut=m.stateNode.containerInfo,tn=!0;break e}m=m.return}if(ut===null)throw Error(r(160));zd(i,c,a),ut=null,tn=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_d(t,e),t=t.sibling}var Rn=null;function _d(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:nn(t,e),ln(e),l&4&&(Ul(3,e,e.return),lu(3,e),Ul(5,e,e.return));break;case 1:nn(t,e),ln(e),l&512&&(wt||n===null||Hn(n,n.return)),l&64&&ol&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var a=Rn;if(nn(t,e),ln(e),l&512&&(wt||n===null||Hn(n,n.return)),l&4){var i=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(l){case"title":i=a.getElementsByTagName("title")[0],(!i||i[ia]||i[vt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(l),a.head.insertBefore(i,a.querySelector("head > title"))),Ht(i,l,n),i[vt]=e,ht(i),l=i;break e;case"link":var c=_0("link","href",a).get(l+(n.href||""));if(c){for(var m=0;m<c.length;m++)if(i=c[m],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){c.splice(m,1);break t}}i=a.createElement(l),Ht(i,l,n),a.head.appendChild(i);break;case"meta":if(c=_0("meta","content",a).get(l+(n.content||""))){for(m=0;m<c.length;m++)if(i=c[m],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){c.splice(m,1);break t}}i=a.createElement(l),Ht(i,l,n),a.head.appendChild(i);break;default:throw Error(r(468,l))}i[vt]=e,ht(i),l=i}e.stateNode=l}else L0(a,e.type,e.stateNode);else e.stateNode=R0(a,l,e.memoizedProps);else i!==l?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,l===null?L0(a,e.type,e.stateNode):R0(a,l,e.memoizedProps)):l===null&&e.stateNode!==null&&co(e,e.memoizedProps,n.memoizedProps)}break;case 27:nn(t,e),ln(e),l&512&&(wt||n===null||Hn(n,n.return)),n!==null&&l&4&&co(e,e.memoizedProps,n.memoizedProps);break;case 5:if(nn(t,e),ln(e),l&512&&(wt||n===null||Hn(n,n.return)),e.flags&32){a=e.stateNode;try{Ml(a,"")}catch(se){Fe(e,e.return,se)}}l&4&&e.stateNode!=null&&(a=e.memoizedProps,co(e,a,n!==null?n.memoizedProps:a)),l&1024&&(fo=!0);break;case 6:if(nn(t,e),ln(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(se){Fe(e,e.return,se)}}break;case 3:if(As=null,a=Rn,Rn=Cs(t.containerInfo),nn(t,e),Rn=a,ln(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{wi(t.containerInfo)}catch(se){Fe(e,e.return,se)}fo&&(fo=!1,Ld(e));break;case 4:l=Rn,Rn=Cs(e.stateNode.containerInfo),nn(t,e),ln(e),Rn=l;break;case 12:nn(t,e),ln(e);break;case 31:nn(t,e),ln(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,fs(e,l)));break;case 13:nn(t,e),ln(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(hs=yt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,fs(e,l)));break;case 22:a=e.memoizedState!==null;var y=n!==null&&n.memoizedState!==null,N=ol,B=wt;if(ol=N||a,wt=B||y,nn(t,e),wt=B,ol=N,ln(e),l&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||y||ol||wt||Ma(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){y=n=t;try{if(i=y.stateNode,a)c=i.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none";else{m=y.stateNode;var Y=y.memoizedProps.style,T=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;m.style.display=T==null||typeof T=="boolean"?"":(""+T).trim()}}catch(se){Fe(y,y.return,se)}}}else if(t.tag===6){if(n===null){y=t;try{y.stateNode.nodeValue=a?"":y.memoizedProps}catch(se){Fe(y,y.return,se)}}}else if(t.tag===18){if(n===null){y=t;try{var z=y.stateNode;a?M0(z,!0):M0(y.stateNode,!1)}catch(se){Fe(y,y.return,se)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,fs(e,n))));break;case 19:nn(t,e),ln(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,fs(e,l)));break;case 30:break;case 21:break;default:nn(t,e),ln(e)}}function ln(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(jd(l)){n=l;break}l=l.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var a=n.stateNode,i=oo(e);rs(e,i,a);break;case 5:var c=n.stateNode;n.flags&32&&(Ml(c,""),n.flags&=-33);var m=oo(e);rs(e,m,c);break;case 3:case 4:var y=n.stateNode.containerInfo,N=oo(e);ro(e,N,y);break;default:throw Error(r(161))}}catch(B){Fe(e,e.return,B)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ld(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ld(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function fl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Td(e,t.alternate,t),t=t.sibling}function Ma(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ul(4,t,t.return),Ma(t);break;case 1:Hn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Md(t,t.return,n),Ma(t);break;case 27:hu(t.stateNode);case 26:case 5:Hn(t,t.return),Ma(t);break;case 22:t.memoizedState===null&&Ma(t);break;case 30:Ma(t);break;default:Ma(t)}e=e.sibling}}function dl(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,a=e,i=t,c=i.flags;switch(i.tag){case 0:case 11:case 15:dl(a,i,n),lu(4,i);break;case 1:if(dl(a,i,n),l=i,a=l.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(N){Fe(l,l.return,N)}if(l=i,a=l.updateQueue,a!==null){var m=l.stateNode;try{var y=a.shared.hiddenCallbacks;if(y!==null)for(a.shared.hiddenCallbacks=null,a=0;a<y.length;a++)df(y[a],m)}catch(N){Fe(l,l.return,N)}}n&&c&64&&wd(i),au(i,i.return);break;case 27:Ad(i);case 26:case 5:dl(a,i,n),n&&l===null&&c&4&&Cd(i),au(i,i.return);break;case 12:dl(a,i,n);break;case 31:dl(a,i,n),n&&c&4&&Od(a,i);break;case 13:dl(a,i,n),n&&c&4&&Rd(a,i);break;case 22:i.memoizedState===null&&dl(a,i,n),au(i,i.return);break;case 30:break;default:dl(a,i,n)}t=t.sibling}}function ho(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Qi(n))}function mo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Qi(e))}function _n(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ud(e,t,n,l),t=t.sibling}function Ud(e,t,n,l){var a=t.flags;switch(t.tag){case 0:case 11:case 15:_n(e,t,n,l),a&2048&&lu(9,t);break;case 1:_n(e,t,n,l);break;case 3:_n(e,t,n,l),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Qi(e)));break;case 12:if(a&2048){_n(e,t,n,l),e=t.stateNode;try{var i=t.memoizedProps,c=i.id,m=i.onPostCommit;typeof m=="function"&&m(c,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(y){Fe(t,t.return,y)}}else _n(e,t,n,l);break;case 31:_n(e,t,n,l);break;case 13:_n(e,t,n,l);break;case 23:break;case 22:i=t.stateNode,c=t.alternate,t.memoizedState!==null?i._visibility&2?_n(e,t,n,l):iu(e,t):i._visibility&2?_n(e,t,n,l):(i._visibility|=2,di(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),a&2048&&ho(c,t);break;case 24:_n(e,t,n,l),a&2048&&mo(t.alternate,t);break;default:_n(e,t,n,l)}}function di(e,t,n,l,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,c=t,m=n,y=l,N=c.flags;switch(c.tag){case 0:case 11:case 15:di(i,c,m,y,a),lu(8,c);break;case 23:break;case 22:var B=c.stateNode;c.memoizedState!==null?B._visibility&2?di(i,c,m,y,a):iu(i,c):(B._visibility|=2,di(i,c,m,y,a)),a&&N&2048&&ho(c.alternate,c);break;case 24:di(i,c,m,y,a),a&&N&2048&&mo(c.alternate,c);break;default:di(i,c,m,y,a)}t=t.sibling}}function iu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,a=l.flags;switch(l.tag){case 22:iu(n,l),a&2048&&ho(l.alternate,l);break;case 24:iu(n,l),a&2048&&mo(l.alternate,l);break;default:iu(n,l)}t=t.sibling}}var uu=8192;function hi(e,t,n){if(e.subtreeFlags&uu)for(e=e.child;e!==null;)kd(e,t,n),e=e.sibling}function kd(e,t,n){switch(e.tag){case 26:hi(e,t,n),e.flags&uu&&e.memoizedState!==null&&ym(n,Rn,e.memoizedState,e.memoizedProps);break;case 5:hi(e,t,n);break;case 3:case 4:var l=Rn;Rn=Cs(e.stateNode.containerInfo),hi(e,t,n),Rn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=uu,uu=16777216,hi(e,t,n),uu=l):hi(e,t,n));break;default:hi(e,t,n)}}function Bd(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 su(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];zt=l,qd(l,e)}Bd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Hd(e),e=e.sibling}function Hd(e){switch(e.tag){case 0:case 11:case 15:su(e),e.flags&2048&&Ul(9,e,e.return);break;case 3:su(e);break;case 12:su(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ds(e)):su(e);break;default:su(e)}}function ds(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];zt=l,qd(l,e)}Bd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ul(8,t,t.return),ds(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,ds(t));break;default:ds(t)}e=e.sibling}}function qd(e,t){for(;zt!==null;){var n=zt;switch(n.tag){case 0:case 11:case 15:Ul(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Qi(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,zt=l;else e:for(n=e;zt!==null;){l=zt;var a=l.sibling,i=l.return;if(Dd(l),l===n){zt=null;break e}if(a!==null){a.return=i,zt=a;break e}zt=i}}}var Oh={getCacheForType:function(e){var t=kt(xt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return kt(xt).controller.signal}},Rh=typeof WeakMap=="function"?WeakMap:Map,Ke=0,tt=null,Re=null,Ue=0,Je=0,dn=null,kl=!1,mi=!1,go=!1,hl=0,rt=0,Bl=0,Ca=0,po=0,hn=0,gi=0,cu=null,an=null,yo=!1,hs=0,Yd=0,ms=1/0,gs=null,Hl=null,At=0,ql=null,pi=null,ml=0,vo=0,bo=null,Gd=null,ou=0,xo=null;function mn(){return(Ke&2)!==0&&Ue!==0?Ue&-Ue:D.T!==null?jo():Qn()}function Xd(){if(hn===0)if((Ue&536870912)===0||He){var e=k;k<<=1,(k&3932160)===0&&(k=262144),hn=e}else hn=536870912;return e=rn.current,e!==null&&(e.flags|=32),hn}function un(e,t,n){(e===tt&&(Je===2||Je===9)||e.cancelPendingCommit!==null)&&(yi(e,0),Yl(e,Ue,hn,!1)),Kt(e,n),((Ke&2)===0||e!==tt)&&(e===tt&&((Ke&2)===0&&(Ca|=n),rt===4&&Yl(e,Ue,hn,!1)),qn(e))}function Qd(e,t,n){if((Ke&6)!==0)throw Error(r(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||we(e,t),a=l?Uh(e,t):Eo(e,t,!0),i=l;do{if(a===0){mi&&!l&&Yl(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!_h(n)){a=Eo(e,t,!1),i=!1;continue}if(a===2){if(i=t,e.errorRecoveryDisabledLanes&i)var c=0;else c=e.pendingLanes&-536870913,c=c!==0?c:c&536870912?536870912:0;if(c!==0){t=c;e:{var m=e;a=cu;var y=m.current.memoizedState.isDehydrated;if(y&&(yi(m,c).flags|=256),c=Eo(m,c,!1),c!==2){if(go&&!y){m.errorRecoveryDisabledLanes|=i,Ca|=i,a=4;break e}i=an,an=a,i!==null&&(an===null?an=i:an.push.apply(an,i))}a=c}if(i=!1,a!==2)continue}}if(a===1){yi(e,0),Yl(e,t,0,!0);break}e:{switch(l=e,i=a,i){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Yl(l,t,hn,!kl);break e;case 2:an=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(a=hs+300-yt(),10<a)){if(Yl(l,t,hn,!kl),Se(l,0,!0)!==0)break e;ml=t,l.timeoutHandle=S0(Zd.bind(null,l,n,an,gs,yo,t,hn,Ca,gi,kl,i,"Throttled",-0,0),a);break e}Zd(l,n,an,gs,yo,t,hn,Ca,gi,kl,i,null,-0,0)}}break}while(!0);qn(e)}function Zd(e,t,n,l,a,i,c,m,y,N,B,Y,T,z){if(e.timeoutHandle=-1,Y=t.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Nn},kd(t,i,Y);var se=(i&62914560)===i?hs-yt():(i&4194048)===i?Yd-yt():0;if(se=vm(Y,se),se!==null){ml=i,e.cancelPendingCommit=se(Pd.bind(null,e,t,i,n,l,a,c,m,y,B,Y,null,T,z)),Yl(e,i,c,!N);return}}Pd(e,t,i,n,l,a,c,m,y)}function _h(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var a=n[l],i=a.getSnapshot;a=a.value;try{if(!cn(i(),a))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Yl(e,t,n,l){t&=~po,t&=~Ca,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var a=t;0<a;){var i=31-ct(a),c=1<<i;l[i]=-1,a&=~c}n!==0&&Ot(e,n,t)}function ps(){return(Ke&6)===0?(ru(0),!1):!0}function So(){if(Re!==null){if(Je===0)var e=Re.return;else e=Re,ll=pa=null,Uc(e),si=null,Vi=0,e=Re;for(;e!==null;)Ed(e.alternate,e),e=e.return;Re=null}}function yi(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,em(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ml=0,So(),tt=e,Re=n=tl(e.current,null),Ue=t,Je=0,dn=null,kl=!1,mi=we(e,t),go=!1,gi=hn=po=Ca=Bl=rt=0,an=cu=null,yo=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var a=31-ct(l),i=1<<a;t|=e[a],l&=~i}return hl=t,ku(),n}function Vd(e,t){Te=null,D.H=eu,t===ui||t===Zu?(t=cf(),Je=3):t===Mc?(t=cf(),Je=4):Je=t===Ic?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,dn=t,Re===null&&(rt=1,is(e,yn(t,e.current)))}function Kd(){var e=rn.current;return e===null?!0:(Ue&4194048)===Ue?Sn===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?e===Sn:!1}function $d(){var e=D.H;return D.H=eu,e===null?eu:e}function Jd(){var e=D.A;return D.A=Oh,e}function ys(){rt=4,kl||(Ue&4194048)!==Ue&&rn.current!==null||(mi=!0),(Bl&134217727)===0&&(Ca&134217727)===0||tt===null||Yl(tt,Ue,hn,!1)}function Eo(e,t,n){var l=Ke;Ke|=2;var a=$d(),i=Jd();(tt!==e||Ue!==t)&&(gs=null,yi(e,t)),t=!1;var c=rt;e:do try{if(Je!==0&&Re!==null){var m=Re,y=dn;switch(Je){case 8:So(),c=6;break e;case 3:case 2:case 9:case 6:rn.current===null&&(t=!0);var N=Je;if(Je=0,dn=null,vi(e,m,y,N),n&&mi){c=0;break e}break;default:N=Je,Je=0,dn=null,vi(e,m,y,N)}}Lh(),c=rt;break}catch(B){Vd(e,B)}while(!0);return t&&e.shellSuspendCounter++,ll=pa=null,Ke=l,D.H=a,D.A=i,Re===null&&(tt=null,Ue=0,ku()),c}function Lh(){for(;Re!==null;)Fd(Re)}function Uh(e,t){var n=Ke;Ke|=2;var l=$d(),a=Jd();tt!==e||Ue!==t?(gs=null,ms=yt()+500,yi(e,t)):mi=we(e,t);e:do try{if(Je!==0&&Re!==null){t=Re;var i=dn;t:switch(Je){case 1:Je=0,dn=null,vi(e,t,i,1);break;case 2:case 9:if(uf(i)){Je=0,dn=null,Wd(t);break}t=function(){Je!==2&&Je!==9||tt!==e||(Je=7),qn(e)},i.then(t,t);break e;case 3:Je=7;break e;case 4:Je=5;break e;case 7:uf(i)?(Je=0,dn=null,Wd(t)):(Je=0,dn=null,vi(e,t,i,7));break;case 5:var c=null;switch(Re.tag){case 26:c=Re.memoizedState;case 5:case 27:var m=Re;if(c?U0(c):m.stateNode.complete){Je=0,dn=null;var y=m.sibling;if(y!==null)Re=y;else{var N=m.return;N!==null?(Re=N,vs(N)):Re=null}break t}}Je=0,dn=null,vi(e,t,i,5);break;case 6:Je=0,dn=null,vi(e,t,i,6);break;case 8:So(),rt=6;break e;default:throw Error(r(462))}}kh();break}catch(B){Vd(e,B)}while(!0);return ll=pa=null,D.H=l,D.A=a,Ke=n,Re!==null?0:(tt=null,Ue=0,ku(),rt)}function kh(){for(;Re!==null&&!yl();)Fd(Re)}function Fd(e){var t=xd(e.alternate,e,hl);e.memoizedProps=e.pendingProps,t===null?vs(e):Re=t}function Wd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=md(n,t,t.pendingProps,t.type,void 0,Ue);break;case 11:t=md(n,t,t.pendingProps,t.type.render,t.ref,Ue);break;case 5:Uc(t);default:Ed(n,t),t=Re=$r(t,hl),t=xd(n,t,hl)}e.memoizedProps=e.pendingProps,t===null?vs(e):Re=t}function vi(e,t,n,l){ll=pa=null,Uc(t),si=null,Vi=0;var a=t.return;try{if(Ch(e,a,t,n,Ue)){rt=1,is(e,yn(n,e.current)),Re=null;return}}catch(i){if(a!==null)throw Re=a,i;rt=1,is(e,yn(n,e.current)),Re=null;return}t.flags&32768?(He||l===1?e=!0:mi||(Ue&536870912)!==0?e=!1:(kl=e=!0,(l===2||l===9||l===3||l===6)&&(l=rn.current,l!==null&&l.tag===13&&(l.flags|=16384))),Id(t,e)):vs(t)}function vs(e){var t=e;do{if((t.flags&32768)!==0){Id(t,kl);return}e=t.return;var n=Nh(t.alternate,t,hl);if(n!==null){Re=n;return}if(t=t.sibling,t!==null){Re=t;return}Re=t=e}while(t!==null);rt===0&&(rt=5)}function Id(e,t){do{var n=Th(e.alternate,e);if(n!==null){n.flags&=32767,Re=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Re=e;return}Re=e=n}while(e!==null);rt=6,Re=null}function Pd(e,t,n,l,a,i,c,m,y){e.cancelPendingCommit=null;do bs();while(At!==0);if((Ke&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(i=t.lanes|t.childLanes,i|=oc,Mu(e,n,i,c,m,y),e===tt&&(Re=tt=null,Ue=0),pi=t,ql=e,ml=n,vo=i,bo=a,Gd=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Yh(vl,function(){return a0(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=D.T,D.T=null,a=Q.p,Q.p=2,c=Ke,Ke|=4;try{Dh(e,t,n)}finally{Ke=c,Q.p=a,D.T=l}}At=1,e0(),t0(),n0()}}function e0(){if(At===1){At=0;var e=ql,t=pi,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=D.T,D.T=null;var l=Q.p;Q.p=2;var a=Ke;Ke|=4;try{_d(t,e);var i=_o,c=Hr(e.containerInfo),m=i.focusedElem,y=i.selectionRange;if(c!==m&&m&&m.ownerDocument&&Br(m.ownerDocument.documentElement,m)){if(y!==null&&ac(m)){var N=y.start,B=y.end;if(B===void 0&&(B=N),"selectionStart"in m)m.selectionStart=N,m.selectionEnd=Math.min(B,m.value.length);else{var Y=m.ownerDocument||document,T=Y&&Y.defaultView||window;if(T.getSelection){var z=T.getSelection(),se=m.textContent.length,Ee=Math.min(y.start,se),et=y.end===void 0?Ee:Math.min(y.end,se);!z.extend&&Ee>et&&(c=et,et=Ee,Ee=c);var E=kr(m,Ee),S=kr(m,et);if(E&&S&&(z.rangeCount!==1||z.anchorNode!==E.node||z.anchorOffset!==E.offset||z.focusNode!==S.node||z.focusOffset!==S.offset)){var A=Y.createRange();A.setStart(E.node,E.offset),z.removeAllRanges(),Ee>et?(z.addRange(A),z.extend(S.node,S.offset)):(A.setEnd(S.node,S.offset),z.addRange(A))}}}}for(Y=[],z=m;z=z.parentNode;)z.nodeType===1&&Y.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<Y.length;m++){var q=Y[m];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}zs=!!Ro,_o=Ro=null}finally{Ke=a,Q.p=l,D.T=n}}e.current=t,At=2}}function t0(){if(At===2){At=0;var e=ql,t=pi,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=D.T,D.T=null;var l=Q.p;Q.p=2;var a=Ke;Ke|=4;try{Td(e,t.alternate,t)}finally{Ke=a,Q.p=l,D.T=n}}At=3}}function n0(){if(At===4||At===3){At=0,Wl();var e=ql,t=pi,n=ml,l=Gd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?At=5:(At=0,pi=ql=null,l0(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(Hl=null),na(n),t=t.stateNode,Tt&&typeof Tt.onCommitFiberRoot=="function")try{Tt.onCommitFiberRoot(It,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=D.T,a=Q.p,Q.p=2,D.T=null;try{for(var i=e.onRecoverableError,c=0;c<l.length;c++){var m=l[c];i(m.value,{componentStack:m.stack})}}finally{D.T=t,Q.p=a}}(ml&3)!==0&&bs(),qn(e),a=e.pendingLanes,(n&261930)!==0&&(a&42)!==0?e===xo?ou++:(ou=0,xo=e):ou=0,ru(0)}}function l0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Qi(t)))}function bs(){return e0(),t0(),n0(),a0()}function a0(){if(At!==5)return!1;var e=ql,t=vo;vo=0;var n=na(ml),l=D.T,a=Q.p;try{Q.p=32>n?32:n,D.T=null,n=bo,bo=null;var i=ql,c=ml;if(At=0,pi=ql=null,ml=0,(Ke&6)!==0)throw Error(r(331));var m=Ke;if(Ke|=4,Hd(i.current),Ud(i,i.current,c,n),Ke=m,ru(0,!1),Tt&&typeof Tt.onPostCommitFiberRoot=="function")try{Tt.onPostCommitFiberRoot(It,i)}catch{}return!0}finally{Q.p=a,D.T=l,l0(e,t)}}function i0(e,t,n){t=yn(n,t),t=Wc(e.stateNode,t,2),e=Rl(e,t,2),e!==null&&(Kt(e,2),qn(e))}function Fe(e,t,n){if(e.tag===3)i0(e,e,n);else for(;t!==null;){if(t.tag===3){i0(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Hl===null||!Hl.has(l))){e=yn(n,e),n=ud(2),l=Rl(t,n,2),l!==null&&(sd(n,l,t,e),Kt(l,2),qn(l));break}}t=t.return}}function wo(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new Rh;var a=new Set;l.set(t,a)}else a=l.get(t),a===void 0&&(a=new Set,l.set(t,a));a.has(n)||(go=!0,a.add(n),e=Bh.bind(null,e,t,n),t.then(e,e))}function Bh(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,tt===e&&(Ue&n)===n&&(rt===4||rt===3&&(Ue&62914560)===Ue&&300>yt()-hs?(Ke&2)===0&&yi(e,0):po|=n,gi===Ue&&(gi=0)),qn(e)}function u0(e,t){t===0&&(t=We()),e=ha(e,t),e!==null&&(Kt(e,t),qn(e))}function Hh(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),u0(e,n)}function qh(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),u0(e,n)}function Yh(e,t){return Wt(e,t)}var xs=null,bi=null,Mo=!1,Ss=!1,Co=!1,Gl=0;function qn(e){e!==bi&&e.next===null&&(bi===null?xs=bi=e:bi=bi.next=e),Ss=!0,Mo||(Mo=!0,Xh())}function ru(e,t){if(!Co&&Ss){Co=!0;do for(var n=!1,l=xs;l!==null;){if(e!==0){var a=l.pendingLanes;if(a===0)var i=0;else{var c=l.suspendedLanes,m=l.pingedLanes;i=(1<<31-ct(42|e)+1)-1,i&=a&~(c&~m),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,r0(l,i))}else i=Ue,i=Se(l,l===tt?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||we(l,i)||(n=!0,r0(l,i));l=l.next}while(n);Co=!1}}function Gh(){s0()}function s0(){Ss=Mo=!1;var e=0;Gl!==0&&Ph()&&(e=Gl);for(var t=yt(),n=null,l=xs;l!==null;){var a=l.next,i=c0(l,t);i===0?(l.next=null,n===null?xs=a:n.next=a,a===null&&(bi=n)):(n=l,(e!==0||(i&3)!==0)&&(Ss=!0)),l=a}At!==0&&At!==5||ru(e),Gl!==0&&(Gl=0)}function c0(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var c=31-ct(i),m=1<<c,y=a[c];y===-1?((m&n)===0||(m&l)!==0)&&(a[c]=st(m,t)):y<=t&&(e.expiredLanes|=m),i&=~m}if(t=tt,n=Ue,n=Se(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(Je===2||Je===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Yn(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||we(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&Yn(l),na(n)){case 2:case 8:n=ea;break;case 32:n=vl;break;case 268435456:n=Gn;break;default:n=vl}return l=o0.bind(null,e),n=Wt(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&Yn(l),e.callbackPriority=2,e.callbackNode=null,2}function o0(e,t){if(At!==0&&At!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(bs()&&e.callbackNode!==n)return null;var l=Ue;return l=Se(e,e===tt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Qd(e,l,t),c0(e,yt()),e.callbackNode!=null&&e.callbackNode===n?o0.bind(null,e):null)}function r0(e,t){if(bs())return null;Qd(e,t,!0)}function Xh(){tm(function(){(Ke&6)!==0?Wt(Pl,Gh):s0()})}function jo(){if(Gl===0){var e=ai;e===0&&(e=Vt,Vt<<=1,(Vt&261888)===0&&(Vt=256)),Gl=e}return Gl}function f0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ya(""+e)}function d0(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Qh(e,t,n,l,a){if(t==="submit"&&n&&n.stateNode===a){var i=f0((a[Rt]||null).action),c=l.submitter;c&&(t=(t=c[Rt]||null)?f0(t.formAction):c.getAttribute("formAction"),t!==null&&(i=t,c=null));var m=new Za("action","action",null,l,a);e.push({event:m,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Gl!==0){var y=c?d0(a,c):new FormData(a);Zc(n,{pending:!0,data:y,method:a.method,action:i},null,y)}}else typeof i=="function"&&(m.preventDefault(),y=c?d0(a,c):new FormData(a),Zc(n,{pending:!0,data:y,method:a.method,action:i},i,y))},currentTarget:a}]})}}for(var Ao=0;Ao<cc.length;Ao++){var No=cc[Ao],Zh=No.toLowerCase(),Vh=No[0].toUpperCase()+No.slice(1);On(Zh,"on"+Vh)}On(Gr,"onAnimationEnd"),On(Xr,"onAnimationIteration"),On(Qr,"onAnimationStart"),On("dblclick","onDoubleClick"),On("focusin","onFocus"),On("focusout","onBlur"),On(ch,"onTransitionRun"),On(oh,"onTransitionStart"),On(rh,"onTransitionCancel"),On(Zr,"onTransitionEnd"),$n("onMouseEnter",["mouseout","mouseover"]),$n("onMouseLeave",["mouseout","mouseover"]),$n("onPointerEnter",["pointerout","pointerover"]),$n("onPointerLeave",["pointerout","pointerover"]),Dt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Dt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Dt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Dt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Dt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Dt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fu="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(" "),Kh=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(fu));function h0(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],a=l.event;l=l.listeners;e:{var i=void 0;if(t)for(var c=l.length-1;0<=c;c--){var m=l[c],y=m.instance,N=m.currentTarget;if(m=m.listener,y!==i&&a.isPropagationStopped())break e;i=m,a.currentTarget=N;try{i(a)}catch(B){Uu(B)}a.currentTarget=null,i=y}else for(c=0;c<l.length;c++){if(m=l[c],y=m.instance,N=m.currentTarget,m=m.listener,y!==i&&a.isPropagationStopped())break e;i=m,a.currentTarget=N;try{i(a)}catch(B){Uu(B)}a.currentTarget=null,i=y}}}}function _e(e,t){var n=t[za];n===void 0&&(n=t[za]=new Set);var l=e+"__bubble";n.has(l)||(m0(t,e,2,!1),n.add(l))}function To(e,t,n){var l=0;t&&(l|=4),m0(n,e,l,t)}var Es="_reactListening"+Math.random().toString(36).slice(2);function Do(e){if(!e[Es]){e[Es]=!0,Au.forEach(function(n){n!=="selectionchange"&&(Kh.has(n)||To(n,!1,e),To(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Es]||(t[Es]=!0,To("selectionchange",!1,t))}}function m0(e,t,n,l){switch(X0(t)){case 2:var a=Sm;break;case 8:a=Em;break;default:a=Zo}n=a.bind(null,t,n,e),a=void 0,!Xa||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),l?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function zo(e,t,n,l,a){var i=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var c=l.tag;if(c===3||c===4){var m=l.stateNode.containerInfo;if(m===a)break;if(c===4)for(c=l.return;c!==null;){var y=c.tag;if((y===3||y===4)&&c.stateNode.containerInfo===a)return;c=c.return}for(;m!==null;){if(c=Vn(m),c===null)return;if(y=c.tag,y===5||y===6||y===26||y===27){l=i=c;continue e}m=m.parentNode}}l=l.return}Ou(function(){var N=i,B=Di(n),Y=[];e:{var T=Vr.get(e);if(T!==void 0){var z=Za,se=e;switch(e){case"keypress":if(ca(n)===0)break e;case"keydown":case"keyup":z=j;break;case"focusin":se="focus",z=$a;break;case"focusout":se="blur",z=$a;break;case"beforeblur":case"afterblur":z=$a;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":z=Ru;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=_i;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=re;break;case Gr:case Xr:case Qr:z=$s;break;case Zr:z=Oe;break;case"scroll":case"scrollend":z=Ks;break;case"wheel":z=jt;break;case"copy":case"cut":case"paste":z=Fs;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=$;break;case"toggle":case"beforetoggle":z=bt}var Ee=(t&4)!==0,et=!Ee&&(e==="scroll"||e==="scrollend"),E=Ee?T!==null?T+"Capture":null:T;Ee=[];for(var S=N,A;S!==null;){var q=S;if(A=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||A===null||E===null||(q=Wn(S,E),q!=null&&Ee.push(du(S,q,A))),et)break;S=S.return}0<Ee.length&&(T=new z(T,se,null,n,B),Y.push({event:T,listeners:Ee}))}}if((t&7)===0){e:{if(T=e==="mouseover"||e==="pointerover",z=e==="mouseout"||e==="pointerout",T&&n!==Ti&&(se=n.relatedTarget||n.fromElement)&&(Vn(se)||se[Zn]))break e;if((z||T)&&(T=B.window===B?B:(T=B.ownerDocument)?T.defaultView||T.parentWindow:window,z?(se=n.relatedTarget||n.toElement,z=N,se=se?Vn(se):null,se!==null&&(et=g(se),Ee=se.tag,se!==et||Ee!==5&&Ee!==27&&Ee!==6)&&(se=null)):(z=null,se=N),z!==se)){if(Ee=Ru,q="onMouseLeave",E="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(Ee=$,q="onPointerLeave",E="onPointerEnter",S="pointer"),et=z==null?T:Kn(z),A=se==null?T:Kn(se),T=new Ee(q,S+"leave",z,n,B),T.target=et,T.relatedTarget=A,q=null,Vn(B)===N&&(Ee=new Ee(E,S+"enter",se,n,B),Ee.target=A,Ee.relatedTarget=et,q=Ee),et=q,z&&se)t:{for(Ee=$h,E=z,S=se,A=0,q=E;q;q=Ee(q))A++;q=0;for(var ye=S;ye;ye=Ee(ye))q++;for(;0<A-q;)E=Ee(E),A--;for(;0<q-A;)S=Ee(S),q--;for(;A--;){if(E===S||S!==null&&E===S.alternate){Ee=E;break t}E=Ee(E),S=Ee(S)}Ee=null}else Ee=null;z!==null&&g0(Y,T,z,Ee,!1),se!==null&&et!==null&&g0(Y,et,se,Ee,!0)}}e:{if(T=N?Kn(N):window,z=T.nodeName&&T.nodeName.toLowerCase(),z==="select"||z==="input"&&T.type==="file")var Xe=zr;else if(Tr(T))if(Or)Xe=ih;else{Xe=lh;var de=nh}else z=T.nodeName,!z||z.toLowerCase()!=="input"||T.type!=="checkbox"&&T.type!=="radio"?N&&Cl(N.elementType)&&(Xe=zr):Xe=ah;if(Xe&&(Xe=Xe(e,N))){Dr(Y,Xe,n,B);break e}de&&de(e,T,N),e==="focusout"&&N&&T.type==="number"&&N.memoizedProps.value!=null&&An(T,"number",T.value)}switch(de=N?Kn(N):window,e){case"focusin":(Tr(de)||de.contentEditable==="true")&&(Fa=de,ic=N,Yi=null);break;case"focusout":Yi=ic=Fa=null;break;case"mousedown":uc=!0;break;case"contextmenu":case"mouseup":case"dragend":uc=!1,qr(Y,n,B);break;case"selectionchange":if(sh)break;case"keydown":case"keyup":qr(Y,n,B)}var De;if(it)e:{switch(e){case"compositionstart":var ke="onCompositionStart";break e;case"compositionend":ke="onCompositionEnd";break e;case"compositionupdate":ke="onCompositionUpdate";break e}ke=void 0}else Ja?Ar(e,n)&&(ke="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(ke="onCompositionStart");ke&&(Mr&&n.locale!=="ko"&&(Ja||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&Ja&&(De=sa()):(Un=B,Oi="value"in Un?Un.value:Un.textContent,Ja=!0)),de=ws(N,ke),0<de.length&&(ke=new Ui(ke,e,null,n,B),Y.push({event:ke,listeners:de}),De?ke.data=De:(De=Nr(n),De!==null&&(ke.data=De)))),(De=W1?I1(e,n):P1(e,n))&&(ke=ws(N,"onBeforeInput"),0<ke.length&&(de=new Ui("onBeforeInput","beforeinput",null,n,B),Y.push({event:de,listeners:ke}),de.data=De)),Qh(Y,e,N,n,B)}h0(Y,t)})}function du(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ws(e,t){for(var n=t+"Capture",l=[];e!==null;){var a=e,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=Wn(e,n),a!=null&&l.unshift(du(e,a,i)),a=Wn(e,t),a!=null&&l.push(du(e,a,i))),e.tag===3)return l;e=e.return}return[]}function $h(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function g0(e,t,n,l,a){for(var i=t._reactName,c=[];n!==null&&n!==l;){var m=n,y=m.alternate,N=m.stateNode;if(m=m.tag,y!==null&&y===l)break;m!==5&&m!==26&&m!==27||N===null||(y=N,a?(N=Wn(n,i),N!=null&&c.unshift(du(n,N,y))):a||(N=Wn(n,i),N!=null&&c.push(du(n,N,y)))),n=n.return}c.length!==0&&e.push({event:t,listeners:c})}var Jh=/\r\n?/g,Fh=/\u0000|\uFFFD/g;function p0(e){return(typeof e=="string"?e:""+e).replace(Jh,`
|
|
9
|
-
`).replace(Fh,"")}function y0(e,t){return t=p0(t),p0(e)===t}function Pe(e,t,n,l,a,i){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Ml(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Ml(e,""+l);break;case"className":Ra(e,"class",l);break;case"tabIndex":Ra(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ra(e,n,l);break;case"style":Ni(e,l,i);break;case"data":if(t!=="object"){Ra(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=Ya(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&Pe(e,t,"name",a.name,a,null),Pe(e,t,"formEncType",a.formEncType,a,null),Pe(e,t,"formMethod",a.formMethod,a,null),Pe(e,t,"formTarget",a.formTarget,a,null)):(Pe(e,t,"encType",a.encType,a,null),Pe(e,t,"method",a.method,a,null),Pe(e,t,"target",a.target,a,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=Ya(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Nn);break;case"onScroll":l!=null&&_e("scroll",e);break;case"onScrollEnd":l!=null&&_e("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(r(60));e.innerHTML=n}}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}n=Ya(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""+l):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":_e("beforetoggle",e),_e("toggle",e),Oa(e,"popover",l);break;case"xlinkActuate":_t(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":_t(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":_t(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":_t(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":_t(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":_t(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":_t(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":_t(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":_t(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Oa(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Vs.get(n)||n,Oa(e,n,l))}}function Oo(e,t,n,l,a,i){switch(n){case"style":Ni(e,l,i);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"children":typeof l=="string"?Ml(e,l):(typeof l=="number"||typeof l=="bigint")&&Ml(e,""+l);break;case"onScroll":l!=null&&_e("scroll",e);break;case"onScrollEnd":l!=null&&_e("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Nn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Nu.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),i=e[Rt]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,a),typeof l=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,a);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):Oa(e,n,l)}}}function Ht(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_e("error",e),_e("load",e);var l=!1,a=!1,i;for(i in n)if(n.hasOwnProperty(i)){var c=n[i];if(c!=null)switch(i){case"src":l=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Pe(e,t,i,c,n,null)}}a&&Pe(e,t,"srcSet",n.srcSet,n,null),l&&Pe(e,t,"src",n.src,n,null);return;case"input":_e("invalid",e);var m=i=c=a=null,y=null,N=null;for(l in n)if(n.hasOwnProperty(l)){var B=n[l];if(B!=null)switch(l){case"name":a=B;break;case"type":c=B;break;case"checked":y=B;break;case"defaultChecked":N=B;break;case"value":i=B;break;case"defaultValue":m=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(137,t));break;default:Pe(e,t,l,B,n,null)}}Ha(e,i,m,y,N,c,a,!1);return;case"select":_e("invalid",e),l=c=i=null;for(a in n)if(n.hasOwnProperty(a)&&(m=n[a],m!=null))switch(a){case"value":i=m;break;case"defaultValue":c=m;break;case"multiple":l=m;default:Pe(e,t,a,m,n,null)}t=i,n=c,e.multiple=!!l,t!=null?Ln(e,!!l,t,!1):n!=null&&Ln(e,!!l,n,!0);return;case"textarea":_e("invalid",e),i=a=l=null;for(c in n)if(n.hasOwnProperty(c)&&(m=n[c],m!=null))switch(c){case"value":l=m;break;case"defaultValue":a=m;break;case"children":i=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(r(91));break;default:Pe(e,t,c,m,n,null)}qa(e,l,a,i);return;case"option":for(y in n)n.hasOwnProperty(y)&&(l=n[y],l!=null)&&(y==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Pe(e,t,y,l,n,null));return;case"dialog":_e("beforetoggle",e),_e("toggle",e),_e("cancel",e),_e("close",e);break;case"iframe":case"object":_e("load",e);break;case"video":case"audio":for(l=0;l<fu.length;l++)_e(fu[l],e);break;case"image":_e("error",e),_e("load",e);break;case"details":_e("toggle",e);break;case"embed":case"source":case"link":_e("error",e),_e("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(N in n)if(n.hasOwnProperty(N)&&(l=n[N],l!=null))switch(N){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Pe(e,t,N,l,n,null)}return;default:if(Cl(t)){for(B in n)n.hasOwnProperty(B)&&(l=n[B],l!==void 0&&Oo(e,t,B,l,n,void 0));return}}for(m in n)n.hasOwnProperty(m)&&(l=n[m],l!=null&&Pe(e,t,m,l,n,null))}function Wh(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,c=null,m=null,y=null,N=null,B=null;for(z in n){var Y=n[z];if(n.hasOwnProperty(z)&&Y!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":y=Y;default:l.hasOwnProperty(z)||Pe(e,t,z,null,l,Y)}}for(var T in l){var z=l[T];if(Y=n[T],l.hasOwnProperty(T)&&(z!=null||Y!=null))switch(T){case"type":i=z;break;case"name":a=z;break;case"checked":N=z;break;case"defaultChecked":B=z;break;case"value":c=z;break;case"defaultValue":m=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(137,t));break;default:z!==Y&&Pe(e,t,T,z,l,Y)}}Ba(e,c,m,y,N,B,i,a);return;case"select":z=c=m=T=null;for(i in n)if(y=n[i],n.hasOwnProperty(i)&&y!=null)switch(i){case"value":break;case"multiple":z=y;default:l.hasOwnProperty(i)||Pe(e,t,i,null,l,y)}for(a in l)if(i=l[a],y=n[a],l.hasOwnProperty(a)&&(i!=null||y!=null))switch(a){case"value":T=i;break;case"defaultValue":m=i;break;case"multiple":c=i;default:i!==y&&Pe(e,t,a,i,l,y)}t=m,n=c,l=z,T!=null?Ln(e,!!n,T,!1):!!l!=!!n&&(t!=null?Ln(e,!!n,t,!0):Ln(e,!!n,n?[]:"",!1));return;case"textarea":z=T=null;for(m in n)if(a=n[m],n.hasOwnProperty(m)&&a!=null&&!l.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:Pe(e,t,m,null,l,a)}for(c in l)if(a=l[c],i=n[c],l.hasOwnProperty(c)&&(a!=null||i!=null))switch(c){case"value":T=a;break;case"defaultValue":z=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(r(91));break;default:a!==i&&Pe(e,t,c,a,l,i)}Lt(e,T,z);return;case"option":for(var se in n)T=n[se],n.hasOwnProperty(se)&&T!=null&&!l.hasOwnProperty(se)&&(se==="selected"?e.selected=!1:Pe(e,t,se,null,l,T));for(y in l)T=l[y],z=n[y],l.hasOwnProperty(y)&&T!==z&&(T!=null||z!=null)&&(y==="selected"?e.selected=T&&typeof T!="function"&&typeof T!="symbol":Pe(e,t,y,T,l,z));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 Ee in n)T=n[Ee],n.hasOwnProperty(Ee)&&T!=null&&!l.hasOwnProperty(Ee)&&Pe(e,t,Ee,null,l,T);for(N in l)if(T=l[N],z=n[N],l.hasOwnProperty(N)&&T!==z&&(T!=null||z!=null))switch(N){case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(r(137,t));break;default:Pe(e,t,N,T,l,z)}return;default:if(Cl(t)){for(var et in n)T=n[et],n.hasOwnProperty(et)&&T!==void 0&&!l.hasOwnProperty(et)&&Oo(e,t,et,void 0,l,T);for(B in l)T=l[B],z=n[B],!l.hasOwnProperty(B)||T===z||T===void 0&&z===void 0||Oo(e,t,B,T,l,z);return}}for(var E in n)T=n[E],n.hasOwnProperty(E)&&T!=null&&!l.hasOwnProperty(E)&&Pe(e,t,E,null,l,T);for(Y in l)T=l[Y],z=n[Y],!l.hasOwnProperty(Y)||T===z||T==null&&z==null||Pe(e,t,Y,T,l,z)}function v0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ih(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var a=n[l],i=a.transferSize,c=a.initiatorType,m=a.duration;if(i&&m&&v0(c)){for(c=0,m=a.responseEnd,l+=1;l<n.length;l++){var y=n[l],N=y.startTime;if(N>m)break;var B=y.transferSize,Y=y.initiatorType;B&&v0(Y)&&(y=y.responseEnd,c+=B*(y<m?1:(m-N)/(y-N)))}if(--l,t+=8*(i+c)/(a.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 Ro=null,_o=null;function Ms(e){return e.nodeType===9?e:e.ownerDocument}function b0(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 x0(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 Lo(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 Uo=null;function Ph(){var e=window.event;return e&&e.type==="popstate"?e===Uo?!1:(Uo=e,!0):(Uo=null,!1)}var S0=typeof setTimeout=="function"?setTimeout:void 0,em=typeof clearTimeout=="function"?clearTimeout:void 0,E0=typeof Promise=="function"?Promise:void 0,tm=typeof queueMicrotask=="function"?queueMicrotask:typeof E0<"u"?function(e){return E0.resolve(null).then(e).catch(nm)}:S0;function nm(e){setTimeout(function(){throw e})}function Xl(e){return e==="head"}function w0(e,t){var n=t,l=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(a),wi(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")hu(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,hu(n);for(var i=n.firstChild;i;){var c=i.nextSibling,m=i.nodeName;i[ia]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=c}}else n==="body"&&hu(e.ownerDocument.body);n=a}while(n);wi(t)}function M0(e,t){var n=e;e=0;do{var l=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function ko(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":ko(n),Ai(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function lm(e,t,n,l){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ia])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=En(e.nextSibling),e===null)break}return null}function am(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=En(e.nextSibling),e===null))return null;return e}function C0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=En(e.nextSibling),e===null))return null;return e}function Bo(e){return e.data==="$?"||e.data==="$~"}function Ho(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function im(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function En(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 qo=null;function j0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return En(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function A0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function N0(e,t,n){switch(t=Ms(n),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function hu(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ai(e)}var wn=new Map,T0=new Set;function Cs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var gl=Q.d;Q.d={f:um,r:sm,D:cm,C:om,L:rm,m:fm,X:hm,S:dm,M:mm};function um(){var e=gl.f(),t=ps();return e||t}function sm(e){var t=El(e);t!==null&&t.tag===5&&t.type==="form"?Vf(t):gl.r(e)}var xi=typeof document>"u"?null:document;function D0(e,t,n){var l=xi;if(l&&typeof t=="string"&&t){var a=Ge(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),T0.has(a)||(T0.add(a),e={rel:e,crossOrigin:n,href:t},l.querySelector(a)===null&&(t=l.createElement("link"),Ht(t,"link",e),ht(t),l.head.appendChild(t)))}}function cm(e){gl.D(e),D0("dns-prefetch",e,null)}function om(e,t){gl.C(e,t),D0("preconnect",e,t)}function rm(e,t,n){gl.L(e,t,n);var l=xi;if(l&&e&&t){var a='link[rel="preload"][as="'+Ge(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+Ge(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+Ge(n.imageSizes)+'"]')):a+='[href="'+Ge(e)+'"]';var i=a;switch(t){case"style":i=Si(e);break;case"script":i=Ei(e)}wn.has(i)||(e=_({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),wn.set(i,e),l.querySelector(a)!==null||t==="style"&&l.querySelector(mu(i))||t==="script"&&l.querySelector(gu(i))||(t=l.createElement("link"),Ht(t,"link",e),ht(t),l.head.appendChild(t)))}}function fm(e,t){gl.m(e,t);var n=xi;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+Ge(l)+'"][href="'+Ge(e)+'"]',i=a;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ei(e)}if(!wn.has(i)&&(e=_({rel:"modulepreload",href:e},t),wn.set(i,e),n.querySelector(a)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(gu(i)))return}l=n.createElement("link"),Ht(l,"link",e),ht(l),n.head.appendChild(l)}}}function dm(e,t,n){gl.S(e,t,n);var l=xi;if(l&&e){var a=Yt(l).hoistableStyles,i=Si(e);t=t||"default";var c=a.get(i);if(!c){var m={loading:0,preload:null};if(c=l.querySelector(mu(i)))m.loading=5;else{e=_({rel:"stylesheet",href:e,"data-precedence":t},n),(n=wn.get(i))&&Yo(e,n);var y=c=l.createElement("link");ht(y),Ht(y,"link",e),y._p=new Promise(function(N,B){y.onload=N,y.onerror=B}),y.addEventListener("load",function(){m.loading|=1}),y.addEventListener("error",function(){m.loading|=2}),m.loading|=4,js(c,t,l)}c={type:"stylesheet",instance:c,count:1,state:m},a.set(i,c)}}}function hm(e,t){gl.X(e,t);var n=xi;if(n&&e){var l=Yt(n).hoistableScripts,a=Ei(e),i=l.get(a);i||(i=n.querySelector(gu(a)),i||(e=_({src:e,async:!0},t),(t=wn.get(a))&&Go(e,t),i=n.createElement("script"),ht(i),Ht(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function mm(e,t){gl.M(e,t);var n=xi;if(n&&e){var l=Yt(n).hoistableScripts,a=Ei(e),i=l.get(a);i||(i=n.querySelector(gu(a)),i||(e=_({src:e,async:!0,type:"module"},t),(t=wn.get(a))&&Go(e,t),i=n.createElement("script"),ht(i),Ht(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function z0(e,t,n,l){var a=(a=ve.current)?Cs(a):null;if(!a)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Si(n.href),n=Yt(a).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Si(n.href);var i=Yt(a).hoistableStyles,c=i.get(e);if(c||(a=a.ownerDocument||a,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,c),(i=a.querySelector(mu(e)))&&!i._p&&(c.instance=i,c.state.loading=5),wn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},wn.set(e,n),i||gm(a,e,n,c.state))),t&&l===null)throw Error(r(528,""));return c}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ei(n),n=Yt(a).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Si(e){return'href="'+Ge(e)+'"'}function mu(e){return'link[rel="stylesheet"]['+e+"]"}function O0(e){return _({},e,{"data-precedence":e.precedence,precedence:null})}function gm(e,t,n,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}),Ht(t,"link",n),ht(t),e.head.appendChild(t))}function Ei(e){return'[src="'+Ge(e)+'"]'}function gu(e){return"script[async]"+e}function R0(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Ge(n.href)+'"]');if(l)return t.instance=l,ht(l),l;var a=_({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),ht(l),Ht(l,"style",a),js(l,n.precedence,e),t.instance=l;case"stylesheet":a=Si(n.href);var i=e.querySelector(mu(a));if(i)return t.state.loading|=4,t.instance=i,ht(i),i;l=O0(n),(a=wn.get(a))&&Yo(l,a),i=(e.ownerDocument||e).createElement("link"),ht(i);var c=i;return c._p=new Promise(function(m,y){c.onload=m,c.onerror=y}),Ht(i,"link",l),t.state.loading|=4,js(i,n.precedence,e),t.instance=i;case"script":return i=Ei(n.src),(a=e.querySelector(gu(i)))?(t.instance=a,ht(a),a):(l=n,(a=wn.get(i))&&(l=_({},n),Go(l,a)),e=e.ownerDocument||e,a=e.createElement("script"),ht(a),Ht(a,"link",l),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,js(l,n.precedence,e));return t.instance}function js(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=l.length?l[l.length-1]:null,i=a,c=0;c<l.length;c++){var m=l[c];if(m.dataset.precedence===t)i=m;else if(i!==a)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Yo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Go(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var As=null;function _0(e,t,n){if(As===null){var l=new Map,a=As=new Map;a.set(n,l)}else a=As,l=a.get(n),l||(l=new Map,a.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var i=n[a];if(!(i[ia]||i[vt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var c=i.getAttribute(t)||"";c=e+c;var m=l.get(c);m?m.push(i):l.set(c,[i])}}return l}function L0(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function pm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function U0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function ym(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var a=Si(l.href),i=t.querySelector(mu(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ns.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,ht(i);return}i=t.ownerDocument||t,l=O0(l),(a=wn.get(a))&&Yo(l,a),i=i.createElement("link"),ht(i);var c=i;c._p=new Promise(function(m,y){c.onload=m,c.onerror=y}),Ht(i,"link",l),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Ns.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Xo=0;function vm(e,t){return e.stylesheets&&e.count===0&&Ds(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&Ds(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Xo===0&&(Xo=62500*Ih());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ds(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Xo?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(a)}}:null}function Ns(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ds(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ts=null;function Ds(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ts=new Map,t.forEach(bm,e),Ts=null,Ns.call(e))}function bm(e,t){if(!(t.state.loading&4)){var n=Ts.get(e);if(n)var l=n.get(null);else{n=new Map,Ts.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var c=a[i];(c.nodeName==="LINK"||c.getAttribute("media")!=="not all")&&(n.set(c.dataset.precedence,c),l=c)}l&&n.set(null,l)}a=t.instance,c=a.getAttribute("data-precedence"),i=n.get(c)||l,i===l&&n.set(null,a),n.set(c,a),this.count++,l=Ns.bind(this),a.addEventListener("load",l),a.addEventListener("error",l),i?i.parentNode.insertBefore(a,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var pu={$$typeof:W,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function xm(e,t,n,l,a,i,c,m,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=dt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dt(0),this.hiddenUpdates=dt(null),this.identifierPrefix=l,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=y,this.incompleteTransitions=new Map}function k0(e,t,n,l,a,i,c,m,y,N,B,Y){return e=new xm(e,t,n,c,y,N,B,Y,m),t=1,i===!0&&(t|=24),i=on(3,null,null,t),e.current=i,i.stateNode=e,t=Sc(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:l,isDehydrated:n,cache:t},Cc(i),e}function B0(e){return e?(e=Pa,e):Pa}function H0(e,t,n,l,a,i){a=B0(a),l.context===null?l.context=a:l.pendingContext=a,l=Ol(t),l.payload={element:n},i=i===void 0?null:i,i!==null&&(l.callback=i),n=Rl(e,l,t),n!==null&&(un(n,e,t),$i(n,e,t))}function q0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Qo(e,t){q0(e,t),(e=e.alternate)&&q0(e,t)}function Y0(e){if(e.tag===13||e.tag===31){var t=ha(e,67108864);t!==null&&un(t,e,67108864),Qo(e,67108864)}}function G0(e){if(e.tag===13||e.tag===31){var t=mn();t=Sl(t);var n=ha(e,t);n!==null&&un(n,e,t),Qo(e,t)}}var zs=!0;function Sm(e,t,n,l){var a=D.T;D.T=null;var i=Q.p;try{Q.p=2,Zo(e,t,n,l)}finally{Q.p=i,D.T=a}}function Em(e,t,n,l){var a=D.T;D.T=null;var i=Q.p;try{Q.p=8,Zo(e,t,n,l)}finally{Q.p=i,D.T=a}}function Zo(e,t,n,l){if(zs){var a=Vo(l);if(a===null)zo(e,t,l,Os,n),Q0(e,l);else if(Mm(a,e,t,n,l))l.stopPropagation();else if(Q0(e,l),t&4&&-1<wm.indexOf(e)){for(;a!==null;){var i=El(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var c=be(i.pendingLanes);if(c!==0){var m=i;for(m.pendingLanes|=2,m.entangledLanes|=2;c;){var y=1<<31-ct(c);m.entanglements[1]|=y,c&=~y}qn(i),(Ke&6)===0&&(ms=yt()+500,ru(0))}}break;case 31:case 13:m=ha(i,2),m!==null&&un(m,i,2),ps(),Qo(i,2)}if(i=Vo(l),i===null&&zo(e,t,l,Os,n),i===a)break;a=i}a!==null&&l.stopPropagation()}else zo(e,t,l,null,n)}}function Vo(e){return e=Di(e),Ko(e)}var Os=null;function Ko(e){if(Os=null,e=Vn(e),e!==null){var t=g(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=b(t),e!==null)return e;e=null}else if(n===31){if(e=C(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Os=e,null}function X0(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(Il()){case Pl:return 2;case ea:return 8;case vl:case Da:return 32;case Gn:return 268435456;default:return 32}default:return 32}}var $o=!1,Ql=null,Zl=null,Vl=null,yu=new Map,vu=new Map,Kl=[],wm="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 Q0(e,t){switch(e){case"focusin":case"focusout":Ql=null;break;case"dragenter":case"dragleave":Zl=null;break;case"mouseover":case"mouseout":Vl=null;break;case"pointerover":case"pointerout":yu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":vu.delete(t.pointerId)}}function bu(e,t,n,l,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:i,targetContainers:[a]},t!==null&&(t=El(t),t!==null&&Y0(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Mm(e,t,n,l,a){switch(t){case"focusin":return Ql=bu(Ql,e,t,n,l,a),!0;case"dragenter":return Zl=bu(Zl,e,t,n,l,a),!0;case"mouseover":return Vl=bu(Vl,e,t,n,l,a),!0;case"pointerover":var i=a.pointerId;return yu.set(i,bu(yu.get(i)||null,e,t,n,l,a)),!0;case"gotpointercapture":return i=a.pointerId,vu.set(i,bu(vu.get(i)||null,e,t,n,l,a)),!0}return!1}function Z0(e){var t=Vn(e.target);if(t!==null){var n=g(t);if(n!==null){if(t=n.tag,t===13){if(t=b(n),t!==null){e.blockedOn=t,la(e.priority,function(){G0(n)});return}}else if(t===31){if(t=C(n),t!==null){e.blockedOn=t,la(e.priority,function(){G0(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Vo(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);Ti=l,n.target.dispatchEvent(l),Ti=null}else return t=El(n),t!==null&&Y0(t),e.blockedOn=n,!1;t.shift()}return!0}function V0(e,t,n){Rs(e)&&n.delete(t)}function Cm(){$o=!1,Ql!==null&&Rs(Ql)&&(Ql=null),Zl!==null&&Rs(Zl)&&(Zl=null),Vl!==null&&Rs(Vl)&&(Vl=null),yu.forEach(V0),vu.forEach(V0)}function _s(e,t){e.blockedOn===t&&(e.blockedOn=null,$o||($o=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,Cm)))}var Ls=null;function K0(e){Ls!==e&&(Ls=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){Ls===e&&(Ls=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],a=e[t+2];if(typeof l!="function"){if(Ko(l||n)===null)continue;break}var i=El(n);i!==null&&(e.splice(t,3),t-=3,Zc(i,{pending:!0,data:a,method:n.method,action:l},l,a))}}))}function wi(e){function t(y){return _s(y,e)}Ql!==null&&_s(Ql,e),Zl!==null&&_s(Zl,e),Vl!==null&&_s(Vl,e),yu.forEach(t),vu.forEach(t);for(var n=0;n<Kl.length;n++){var l=Kl[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Kl.length&&(n=Kl[0],n.blockedOn===null);)Z0(n),n.blockedOn===null&&Kl.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var a=n[l],i=n[l+1],c=a[Rt]||null;if(typeof i=="function")c||K0(n);else if(c){var m=null;if(i&&i.hasAttribute("formAction")){if(a=i,c=i[Rt]||null)m=c.formAction;else if(Ko(a)!==null)continue}else m=c.action;typeof m=="function"?n[l+1]=m:(n.splice(l,3),l-=3),K0(n)}}}function $0(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(c){return a=c})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function Jo(e){this._internalRoot=e}Us.prototype.render=Jo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var n=t.current,l=mn();H0(n,l,e,t,null,null)},Us.prototype.unmount=Jo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;H0(e.current,2,null,e,null,null),ps(),t[Zn]=null}};function Us(e){this._internalRoot=e}Us.prototype.unstable_scheduleHydration=function(e){if(e){var t=Qn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Kl.length&&t!==0&&t<Kl[n].priority;n++);Kl.splice(n,0,e),n===0&&Z0(e)}};var J0=s.version;if(J0!=="19.2.8")throw Error(r(527,J0,"19.2.8"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=x(t),e=e!==null?O(e):null,e=e===null?null:e.stateNode,e};var jm={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ks=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ks.isDisabled&&ks.supportsFiber)try{It=ks.inject(jm),Tt=ks}catch{}}return Su.createRoot=function(e,t){if(!d(e))throw Error(r(299));var n=!1,l="",a=nd,i=ld,c=ad;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=k0(e,1,!1,null,null,n,l,null,a,i,c,$0),e[Zn]=t.current,Do(e),new Jo(t)},Su.hydrateRoot=function(e,t,n){if(!d(e))throw Error(r(299));var l=!1,a="",i=nd,c=ld,m=ad,y=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(m=n.onRecoverableError),n.formState!==void 0&&(y=n.formState)),t=k0(e,1,!0,t,n??null,l,a,y,i,c,m,$0),t.context=B0(null),n=t.current,l=mn(),l=Sl(l),a=Ol(l),a.callback=null,Rl(n,a,l),n=l,t.current.lanes=n,Kt(t,n),qn(t),e[Zn]=t.current,Do(e),new Us(t)},Su.version="19.2.8",Su}var i1;function Um(){if(i1)return Io.exports;i1=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(s){console.error(s)}}return u(),Io.exports=Lm(),Io.exports}var km=Um();function nr(u,s,f){return u+(s-u)*f}function O1(u){return u-Math.floor(u)}function lr(u,s){const f=Math.floor(u),r=Math.floor(s);let d=u-f,g=s-r;d=d*d*(3-2*d),g=g*g*(3-2*g);const b=jn(f,r),C=jn(f+1,r),w=jn(f,r+1),x=jn(f+1,r+1);return b+(C-b)*d+(w-b)*g+(b-C-w+x)*d*g}function jn(u,s){const f=Math.sin(u*12.9898+s*78.233)*43758.5453;return f-Math.floor(f)}function br(u,s){const f=Math.PI*(3-Math.sqrt(5)),r=1-2*(u+.5)/s,d=Math.sqrt(1-r*r),g=u*f;return[d*Math.cos(g),r,d*Math.sin(g)]}function Bm(u,s){return Math.atan2(Math.sin(u-s),Math.cos(u-s))}function Aa(u,s,f,r,d){const g=Math.sin(s),b=Math.cos(s),C=Math.sin(u),w=Math.cos(u);return(x,O,_)=>{const K=x*w+_*C,G=-x*C+_*w,R=O*b-G*g,ne=O*g+G*b;return[f+K*d,r-R*d,ne]}}function Fl(u,s,f,r=.3){s.sort((d,g)=>d.z-g.z);for(const d of s){const g=d.a??1;if(g<.02)continue;const b=Math.min(1,Math.max(0,d.white)),C=Math.round((f?1-b:b)*255);u.fillStyle=`rgba(${C},${C},${C},${g})`,u.beginPath(),u.arc(d.x,d.y,Math.max(r,d.r),0,Math.PI*2),u.fill()}}function Hm(u,s,f){for(const r of s){const d=r.a??1;if(d<.02)continue;const g=Math.min(1,Math.max(0,r.white)),b=Math.round((f?1-g:g)*255);u.strokeStyle=`rgba(${b},${b},${b},${d})`,u.lineWidth=r.w,u.beginPath(),u.moveTo(r.x1,r.y1),u.lineTo(r.x2,r.y2),u.stroke()}}function Na(u,s){return(u/300)**s}const qm=(u,s,f,r,d)=>{const g=s/2,b=s/2,C=s/2*.76,w=Aa(f*.4,.3,g,b,1),x=Na(s,d.rsPow??.6),O=[],_=d.ghostN??150;for(let R=0;R<_;R++){const ne=br(R,_),[oe,Z,X]=w(ne[0]*C,ne[1]*C,ne[2]*C),W=(X/C+1)/2;O.push({x:oe,y:Z,z:X,r:.8*x,white:.78,a:.1+.22*W})}const K=d.strandN??52,G=d.turns??3;for(let R=0;R<3;R++){const ne=R/3*2*Math.PI;for(let oe=0;oe<K;oe++){const Z=(O1(oe/K+f*.045)*2-1)*.96,X=Math.sqrt(Math.max(0,1-Z*Z)),W=Math.min(1,(1-Math.abs(Z))/.1),ie=Z*Math.PI*G+ne,ue=1+.075*Math.sin(Z*Math.PI*G*2+ne*2+f*.8),p=X*C*ue,[I,fe,me]=w(Math.cos(ie)*p,Z*C*ue,Math.sin(ie)*p),ge=(me/C+1)/2;O.push({x:I,y:fe,z:me,r:((d.rBase??1.2)+(d.rDepth??1.8)*ge)*x,white:.55-.45*ge,a:W*(.45+.55*ge)})}}Fl(u,O,r,d.rMin)};function Ym(u,s,f,r){const d=2*s*f+r,g=u%d,b=new Array(s).fill(0);let C=-1;if(g<2*s*f){const w=Math.floor(g/f),x=(g-w*f)/f,O=1-(1-Math.min(1,x/.7))**3;if(w<s){for(let _=0;_<w;_++)b[_]=1;b[w]=O,C=w}else{const _=2*s-1-w;for(let K=0;K<_;K++)b[K]=1;b[_]=1-O,C=_}}return{amount:b,active:C}}function Gm(u,s,f){let[r,d,g]=u,b=!1;for(let C=0;C<s.length;C++){if(f.amount[C]<=0)continue;const w=s[C],x=w.axis===0?r:w.axis===1?d:g;if(x<w.lo||x>=w.hi)continue;C===f.active&&(b=!0);const O=w.ang*f.amount[C],_=Math.cos(O),K=Math.sin(O);if(w.axis===0){const G=d*_-g*K;g=d*K+g*_,d=G}else if(w.axis===1){const G=r*_+g*K;g=-r*K+g*_,r=G}else{const G=r*_-d*K;d=r*K+d*_,r=G}}return[r,d,g,b]}function Xm(u){const s=[];for(let f=0;f<u;f++){const r=Math.min(2,Math.floor(jn(f,2.3)*3)),d=-1+.5*Math.min(3,Math.floor(jn(f,5.9)*4)),g=jn(f,7.7)<.5?1:-1;s.push({axis:r,lo:d,hi:d+.5,ang:g*Math.PI/2})}return s}const Qm=(u,s,f,r,d)=>{const g=s/2,b=s/2,C=s/2*.82,w=.4+.06*Math.sin(f*.35),x=Aa(f*.5,w,g,b,C),O=f*(.5+(1.7-.5)*(d.scanMul??1)),_=Na(s,d.rsPow??.6),K=d.dimBase??1,G=[],R=d.latRings??17,ne=d.lonDensity??44;for(let oe=0;oe<=R;oe++){const Z=-Math.PI/2+oe/R*Math.PI,X=Math.cos(Z),W=Math.sin(Z),ie=Math.max(1,Math.round(Math.abs(X)*ne));for(let ue=0;ue<ie;ue++){const p=ue/ie*2*Math.PI,[I,fe,me]=x(X*Math.cos(p),W,X*Math.sin(p)),ge=(me+1)/2,Me=Bm(p+f*.5,O),he=Math.exp(-(Me*Me)/.18)*Math.max(0,me);G.push({x:I,y:fe,z:me,r:((d.rBase??.6)+(d.rDepth??1.7)*ge+(d.rBoost??1)*he)*_,white:(d.inkFar??.62)-(d.inkSpan??.54)*ge,a:K+(1-K)*Math.min(1,he)})}}Fl(u,G,r,d.rMin)},Zm=(u,s,f,r,d)=>{const g=s/2,b=s/2,C=s/2*.82,w=Aa(f*.55,.35+.1*Math.sin(f*.9),g,b,C),x=Na(s,d.rsPow??.6),O=d.moveCount??14,_=Xm(O),K=Ym(f,O,.42,1.2),G=[],R=d.latRings??15,ne=d.lonDensity??40;for(let oe=0;oe<=R;oe++){const Z=-Math.PI/2+oe/R*Math.PI,X=Math.cos(Z),W=Math.sin(Z),ie=Math.max(1,Math.round(Math.abs(X)*ne));for(let ue=0;ue<ie;ue++){const p=ue/ie*2*Math.PI,[I,fe,me,ge]=Gm([X*Math.cos(p),W,X*Math.sin(p)],_,K),[Me,he,qe]=w(I,fe,me),Ae=(qe+1)/2;G.push({x:Me,y:he,z:qe,r:((d.rBase??.6)+(d.rDepth??1.7)*Ae+(ge?d.rActive??.3:0))*x,white:(d.inkFar??.62)-(d.inkSpan??.54)*Ae-(ge?.14:0)})}}Fl(u,G,r,d.rMin)},Vm=(u,s,f,r,d)=>{const g=s/2,b=s/2,C=s/2*.874,w=Aa(f*.18,.38,g,b,1),x=Na(s,d.rsPow??.6),O=[],_=d.rings??15,K=d.lonDensity??40;for(let G=0;G<=_;G++){const R=-Math.PI/2+G/_*Math.PI,ne=Math.cos(R),oe=Math.sin(R),Z=.62*Math.sin(f*2.1-G*.52)+.38*Math.sin(f*1.27+G*.83),X=C*(.88+.105*Z),W=Math.max(1,Math.round(Math.abs(ne)*K));for(let ie=0;ie<W;ie++){const ue=ie/W*2*Math.PI,[p,I,fe]=w(ne*Math.cos(ue)*X,oe*X,ne*Math.sin(ue)*X),me=(fe/C+1)/2,ge=Math.max(0,Z);O.push({x:p,y:I,z:fe,r:((d.rBase??.6)+(d.rDepth??1.7)*me)*(1+.4*ge)*x,white:.66-.56*me-.1*ge})}}Fl(u,O,r,d.rMin)};function Km(u){return u*u*(3-2*u)}function R1(u){const s=u.length,f=[];let r=0;for(let d=0;d<s;d++){const g=u[d],b=u[(d+1)%s],C=Math.hypot(b[0]-g[0],b[1]-g[1]);f.push(C),r+=C}return d=>{let g=d*r,b=0;for(;g>f[b]&&b<s-1;)g-=f[b],b++;const C=u[b],w=u[(b+1)%s],x=f[b]?Math.min(1,g/f[b]):0;return[C[0]+(w[0]-C[0])*x,C[1]+(w[1]-C[1])*x]}}const $m=u=>{const s=-Math.PI/2+u*2*Math.PI;return[Math.cos(s)*.24,Math.sin(s)*.24]},Jm=R1([[0,-.26],[.24,.16],[-.24,.16]]),Fm=R1([[0,-.2],[.2,-.2],[.2,.2],[-.2,.2],[-.2,-.2]]),ar=[$m,Jm,Fm];function Wm(u){return Math.max(6,Math.round(34*u))}const hr=1.4,_1=.9,ir=hr+_1,Im=(u,s,f,r,d)=>{const g=ar.length,b=f%(ir*g),C=Math.floor(b/ir),w=b-C*ir,x=w>hr?Km((w-hr)/_1):0,O=d.spread??1,_=ar[C],K=ar[(C+1)%g],G=160,R=[];for(let fe=0;fe<G;fe++){const me=fe/G,ge=_(me),Me=K(me);R.push([(ge[0]+(Me[0]-ge[0])*x)*O,(ge[1]+(Me[1]-ge[1])*x)*O])}const ne=[];let oe=0;for(let fe=0;fe<G;fe++){const me=R[fe],ge=R[(fe+1)%G],Me=Math.hypot(ge[0]-me[0],ge[1]-me[1]);ne.push(Me),oe+=Me}const Z=Wm(d.iconD??1),X=(d.rDot??.021)*1.35*O,W=1+.02*Math.sin(w*3.1),ie=[],ue=s/2;let p=0,I=0;for(let fe=0;fe<Z;fe++){const me=fe/Z*oe;for(;I+ne[p]<me&&p<G-1;)I+=ne[p],p++;const ge=R[p],Me=R[(p+1)%G],he=ne[p]?Math.min(1,(me-I)/ne[p]):0,qe=(ge[0]+(Me[0]-ge[0])*he)*W,Ae=(ge[1]+(Me[1]-ge[1])*he)*W;ie.push({x:ue+qe*s,y:ue+Ae*s,z:0,r:Math.max(.35,X*s),white:.1})}Fl(u,ie,r,d.rMin)},Pm=(u,s,f,r,d)=>{const g=s/2,b=s/2,C=s/2*.82,w=Aa(f*.12,.3,g,b,1),x=Na(s,d.rsPow??.6),O=[],_=d.orbitN??12,K=d.ghostN??40,G=d.particles??3;for(let R=0;R<_;R++){const ne=jn(R,1.7),oe=jn(R,5.2),Z=jn(R,8.9),X=C*(.45+.52*ne),W=ne*2*Math.PI,ie=Math.acos(2*oe-1),ue=Math.sin(ie)*Math.cos(W),p=Math.cos(ie),I=Math.sin(ie)*Math.sin(W);let fe=-p,me=ue;const ge=0,Me=Math.max(1e-6,Math.sqrt(fe*fe+me*me));fe/=Me,me/=Me;const he=p*ge-I*me,qe=I*fe-ue*ge,Ae=ue*me-p*fe,Be=(.25+.55*Z)*(Z>.5?1:-1);for(let D=0;D<K;D++){const Q=D/K*2*Math.PI,[te,xe,Ce]=w((fe*Math.cos(Q)+he*Math.sin(Q))*X,(me*Math.cos(Q)+qe*Math.sin(Q))*X,(ge*Math.cos(Q)+Ae*Math.sin(Q))*X),v=(Ce/X+1)/2;O.push({x:te,y:xe,z:Ce,r:(d.ghostR??.9)*x,white:.72,a:(d.ghostA??.5)*(.4+.6*v)})}for(let D=0;D<G;D++){const Q=f*Be+D/G*2*Math.PI+oe*6,[te,xe,Ce]=w((fe*Math.cos(Q)+he*Math.sin(Q))*X,(me*Math.cos(Q)+qe*Math.sin(Q))*X,(ge*Math.cos(Q)+Ae*Math.sin(Q))*X),v=(Ce/X+1)/2;O.push({x:te,y:xe,z:Ce,r:((d.partR??1.2)+(d.partRDepth??1.6)*v)*x,white:.3-.22*v})}}Fl(u,O,r,d.rMin)},u1=(u,s,f,r,d)=>{const g=s/2,b=s/2,C=s/2*.78,w=d.spin??1,x=.3,O=Aa(f*.1*w,x,g,b,1),_=Na(s,d.rsPow??.6),K=[],G=d.ghostN??150;for(let Ae=0;Ae<G;Ae++){const Be=br(Ae,G),[D,Q,te]=O(Be[0]*C,Be[1]*C,Be[2]*C),xe=(te/C+1)/2;K.push({x:D,y:Q,z:te,r:.8*_,white:.78,a:.1+.22*xe})}const R=f*.24*w,ne=d.faceOn?-x:.55+.3*Math.sin(f*.18)*w,oe=Math.cos(R),Z=0,X=Math.sin(R),W=-X*Math.sin(ne),ie=Math.cos(ne),ue=oe*Math.sin(ne),p=Z*ue-X*ie,I=X*W-oe*ue,fe=oe*ie-Z*W,me=.23*(d.wobMul??1),ge=d.faceOn?C/(1+.85*me):C,Me=d.lanes??5,he=d.segs??88,qe=Math.max(1,Math.round(Me*(d.bandMul??1)));for(let Ae=0;Ae<qe;Ae++){const Be=(Ae-(qe-1)/2)*.075,D=Math.abs(Ae-(qe-1)/2)/Math.max(1,(qe-1)/2);for(let Q=0;Q<he;Q++){const te=Q/he*2*Math.PI,xe=(.16*Math.sin(te*3-f*1.7+Ae*.22)+.07*Math.sin(te*5+f*1.1))*(d.wobMul??1),Ce=d.faceOn?1+xe:1,v=d.faceOn?Be:Be+xe,L=oe*Math.cos(te)+W*Math.sin(te)+p*v,F=Z*Math.cos(te)+ie*Math.sin(te)+I*v,ee=X*Math.cos(te)+ue*Math.sin(te)+fe*v,ce=Math.sqrt(L*L+F*F+ee*ee),ve=ge*Ce,[U,V,J]=O(L/ce*ve,F/ce*ve,ee/ce*ve),le=(J/C+1)/2;K.push({x:U,y:V,z:J,r:((d.rBase??1.1)+(d.rDepth??1.7)*le)*(1-.25*D)*_,white:.52-.44*le+.18*D,a:.4+.6*le})}}Fl(u,K,r,d.rMin)},eg=(u,s,f,r,d)=>{const g=s/2,b=s/2,C=s/2*.8*(d.spread??1),w=Aa(f*.12,.32,g,b,C),x=Na(s,d.rsPow??.6),O=d.nodeN??30,_=d.thr??.72,K=d.nodeR??1.4,G=d.nodeRDepth??1.8,R=[];for(let X=0;X<O;X++){const W=br(X,O),ie=W[0]+.3*(lr(X*.31+9,f*.24)-.5)*2,ue=W[1]+.3*(lr(X*.53+27,f*.21)-.5)*2,p=W[2]+.3*(lr(X*.77+55,f*.27)-.5)*2,I=Math.sqrt(ie*ie+ue*ue+p*p);R.push([ie/I,ue/I,p/I])}const ne=[],oe=[];for(let X=0;X<O;X++)for(let W=X+1;W<O;W++){const ie=R[X][0]-R[W][0],ue=R[X][1]-R[W][1],p=R[X][2]-R[W][2],I=Math.sqrt(ie*ie+ue*ue+p*p);if(I>=_)continue;const[fe,me,ge]=w(R[X][0],R[X][1],R[X][2]),[Me,he,qe]=w(R[W][0],R[W][1],R[W][2]),Ae=((ge+qe)/2+1)/2;ne.push({x1:fe,y1:me,x2:Me,y2:he,white:.42,a:(1-I/_)*(.3+.55*Ae),w:Math.max(.6,(d.lineW??.8)*x)})}for(let X=0;X<O;X++){const[W,ie,ue]=w(R[X][0],R[X][1],R[X][2]),p=(ue+1)/2,I=1+.25*Math.sin(f*1.4+X*2.7);oe.push({x:W,y:ie,z:ue,r:(K+G*p)*I*x,white:.55-.45*p})}const Z=d.signals??5;for(let X=0;X<Z;X++){const W=Math.floor(f*.55+X*7.31),ie=Math.floor(jn(W,X*3.1+1.7)*O),ue=Math.floor(jn(W,X*5.7+4.2)*O);if(ie===ue)continue;const p=O1(f*.55+X*7.31),I=nr(R[ie][0],R[ue][0],p),fe=nr(R[ie][1],R[ue][1],p),me=nr(R[ie][2],R[ue][2],p),ge=Math.max(1e-6,Math.sqrt(I*I+fe*fe+me*me)),[Me,he,qe]=w(I/ge,fe/ge,me/ge),Ae=(qe+1)/2;oe.push({x:Me,y:he,z:qe,r:(K*1.5+G*Ae)*x,white:.05,a:.5+.5*Ae})}Hm(u,ne,r),Fl(u,oe,r,d.rMin)},tg={orbits:Pm,globe:Qm,rubik:Zm,wave:Vm,web:eg,braid:qm,ribbon:u1,ring:u1,morph:Im},ng=[["latRings","lonDensity"],["rings","lonDensity"],["lanes","segs"]],lg=["orbitN","ghostN","nodeN","strandN","signals"],ag=["iconD"],ig=["rBase","rDepth","rActive","rDot","ghostR","partR","partRDepth","nodeR","nodeRDepth"];function ug(u,s){const f={...u},r=new Set,d=Math.sqrt(s);for(const[g,b]of ng){const C=f[g],w=f[b];C!=null&&w!=null&&!r.has(g)&&!r.has(b)&&(f[g]=Math.max(2,Math.round(C*d)),f[b]=Math.max(2,Math.round(w*d)),r.add(g),r.add(b))}for(const g of lg){const b=f[g];b!=null&&b!==0&&!r.has(g)&&(f[g]=Math.max(1,Math.round(b*s)))}for(const g of ag){const b=f[g];b!=null&&(f[g]=Math.max(.02,b*s))}return f}function sg(u,s){const f={...u};for(const r of ig){const d=f[r];d!=null&&(f[r]=d*s)}return f.rSizeMul=(f.rSizeMul??1)*s,f}const cg={globe:{latRings:17,lonDensity:44,rBase:.6,rDepth:1.7,rBoost:1,inkFar:.62,inkSpan:.54,rsPow:.6,rMin:.3},orbits:{orbitN:12,ghostN:40,ghostR:.9,ghostA:.5,particles:3,partR:1.2,partRDepth:1.6,rsPow:.6,rMin:.3},rubik:{latRings:15,lonDensity:40,moveCount:14,rBase:.6,rDepth:1.7,rActive:.3,inkFar:.62,inkSpan:.54,rsPow:.6,rMin:.3},wave:{rings:15,lonDensity:40,rBase:.6,rDepth:1.7,rsPow:.6,rMin:.3},web:{nodeN:30,thr:.72,signals:5,nodeR:1.4,nodeRDepth:1.8,lineW:.8,rsPow:.6,rMin:.3},braid:{strandN:52,turns:3,ghostN:150,rBase:1.2,rDepth:1.8,rsPow:.6,rMin:.3},ribbon:{lanes:5,segs:88,ghostN:150,rBase:1.1,rDepth:1.7,rsPow:.6,rMin:.3},ring:{lanes:5,segs:88,ghostN:0,faceOn:1,rBase:1.1,rDepth:1.7,rsPow:.6,rMin:.3},morph:{rDot:.021,iconD:1,rMin:.25}},og={working:"orbits",searching:"globe",solving:"rubik",listening:"wave",connecting:"web",weaving:"braid",composing:"ribbon",breathing:"ring",shaping:"morph"},rg={orbits:{64:{speed:1.885,count:1,size:1},20:{speed:3.9,count:.238,size:2.4}},globe:{64:{speed:2.015,count:.42,size:1.15,extra:{scanMul:4.08,dimBase:.45}},20:{speed:2.665,count:.105,size:1.75,extra:{scanMul:4.335,dimBase:.45}}},rubik:{64:{speed:1.82,count:.35,size:1.05},20:{speed:1.95,count:.088,size:1.9}},wave:{64:{speed:4.388,count:.341,size:1},20:{speed:3.998,count:.105,size:1.6}},web:{64:{speed:3.315,count:1.35,size:.95},20:{speed:6.63,count:.25,size:1.52}},braid:{64:{speed:1.625,count:.5,size:1},20:{speed:2.75,count:.1125,size:1.36}},ribbon:{64:{speed:2.34,count:.25,size:.85,extra:{spin:0,bandMul:3.9,wobMul:1}},20:{speed:3.12,count:.051,size:1.073,extra:{spin:0,bandMul:4.94,wobMul:1}}},ring:{64:{speed:3.24,count:.25,size:.956,extra:{spin:0,bandMul:3.627,wobMul:.368}},20:{speed:3.78,count:.028,size:1.622,extra:{spin:0,bandMul:3.968,wobMul:.565}}},morph:{64:{speed:2.405,count:.702,size:.395,extra:{spread:1.45}},20:{speed:2.08,count:.53,size:1.011,extra:{spread:1.45}}}},s1=new Map;function fg(u,s){const f=`${u}-${s}`,r=s1.get(f);if(r)return r;const d=og[u],g=rg[d][s];let b={...cg[d]};g.count!==1&&(b=ug(b,g.count)),g.size!==1&&(b=sg(b,g.size)),g.extra&&(b={...b,...g.extra});const C={mode:d,speed:g.speed,opts:b};return s1.set(f,C),C}function dg(u){let s=u;for(;s;){const f=s.getAttribute("data-theme");if(f==="dark")return!0;if(f==="light")return!1;if(s.classList.contains("dark"))return!0;if(s.classList.contains("light"))return!1;s=s.parentElement}return null}function hg(){return typeof matchMedia>"u"||matchMedia("(prefers-color-scheme: dark)").matches}function mg(u,s){const[f,r]=M.useState(!0);return M.useEffect(()=>{if(u==="dark"){r(!0);return}if(u==="light"){r(!1);return}const d=()=>{const w=dg(s.current);r(w??hg())};d();const g=typeof matchMedia<"u"?matchMedia("(prefers-color-scheme: dark)"):null,b=()=>d();g?.addEventListener("change",b);let C=null;return typeof MutationObserver<"u"&&s.current&&(C=new MutationObserver(d),C.observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"],subtree:!0})),()=>{g?.removeEventListener("change",b),C?.disconnect()}},[u,s]),f}function gg(){const[u,s]=M.useState(!1);return M.useEffect(()=>{if(typeof matchMedia>"u")return;const f=matchMedia("(prefers-reduced-motion: reduce)");s(f.matches);const r=d=>s(d.matches);return f.addEventListener("change",r),()=>f.removeEventListener("change",r)},[]),u}const pg={working:"Working…",searching:"Searching…",solving:"Solving…",listening:"Listening…",connecting:"Connecting…",weaving:"Weaving…",composing:"Composing…",breathing:"Thinking…",shaping:"Shaping…"};function mr({state:u="working",size:s=64,theme:f="auto",speed:r=1,paused:d=!1,style:g,"aria-label":b,...C}){const w=M.useRef(null),x=mg(f,w),O=gg();return M.useEffect(()=>{const _=w.current;if(!_)return;const K=Math.min(2,typeof devicePixelRatio<"u"&&devicePixelRatio||1);_.width=Math.round(s*K),_.height=Math.round(s*K);const G=_.getContext("2d");if(!G)return;const{mode:R,speed:ne,opts:oe}=fg(u,s),Z=tg[R],X=ne*r,W=he=>{G.setTransform(K,0,0,K,0,0),G.clearRect(0,0,s,s),Z(G,s,he,x,oe)};if(O){W(.6);return}let ie=0,ue=!1;const p=()=>{W(performance.now()/1e3*X),ue&&(ie=requestAnimationFrame(p))},I=()=>{ue||d||(ue=!0,ie=requestAnimationFrame(p))},fe=()=>{ue=!1,cancelAnimationFrame(ie)};W(performance.now()/1e3*X);let me=!0;const ge=typeof IntersectionObserver<"u"?new IntersectionObserver(([he])=>{me=he.isIntersecting,me&&document.visibilityState!=="hidden"?I():fe()}):null;ge?.observe(_);const Me=()=>{document.visibilityState==="hidden"?fe():me&&I()};return document.addEventListener("visibilitychange",Me),ge||I(),()=>{fe(),ge?.disconnect(),document.removeEventListener("visibilitychange",Me)}},[u,s,x,r,d,O]),o.jsx("canvas",{ref:w,role:"img","aria-label":b??pg[u],style:{width:s,height:s,display:"block",...g},...C})}const ur=["searching","solving","composing","breathing","shaping"];function yg(u){const s=Math.floor(u*ur.length);return ur[Math.min(ur.length-1,Math.max(0,s))]}const gr=yg(Math.random()),ja="ease-[cubic-bezier(0.32,0.72,0,1)]",L1=274,U1=395,k1=368,B1=[{label:"Full",width:null},{label:"1440",width:1440},{label:"834",width:834},{label:"390",width:390}],Jl={collapsed:!1,collapsedFamilies:[],deleted:[],corner:"bottom-right",font:"satoshi",hidden:[],order:[],renames:{},scaleSplit:!0,showDevOverlays:!0,showWidget:!0,viewport:null,width:k1};function vg(u){return`leglas:${u}`}function bg(u,s){const f=s.map(r=>r.title);try{if(!u)return{...Jl,order:f};const r=JSON.parse(u),d={...Jl,...r},g=(Array.isArray(d.deleted)?d.deleted:[]).filter(x=>f.includes(x)),b=f.filter(x=>!g.includes(x)),C=(Array.isArray(d.order)?d.order:[]).filter(x=>b.includes(x)),w=["bottom-left","bottom-right","top-left","top-right"];return{collapsed:!!d.collapsed,collapsedFamilies:(Array.isArray(d.collapsedFamilies)?d.collapsedFamilies:[]).filter(x=>b.includes(x)),corner:w.includes(d.corner)?d.corner:Jl.corner,deleted:g,font:typeof d.font=="string"?d.font:Jl.font,hidden:(Array.isArray(d.hidden)?d.hidden:[]).filter(x=>b.includes(x)),order:[...C,...b.filter(x=>!C.includes(x))],renames:Object.fromEntries(Object.entries(d.renames??{}).filter(([x])=>b.includes(x))),scaleSplit:typeof r.scaleSplit=="boolean"?r.scaleSplit:Jl.scaleSplit,showDevOverlays:typeof r.showDevOverlays=="boolean"?r.showDevOverlays:Jl.showDevOverlays,showWidget:typeof r.showWidget=="boolean"?r.showWidget:Jl.showWidget,viewport:B1.some(x=>x.width===d.viewport)?d.viewport:null,width:Number.isFinite(d.width)?Math.round(Math.min(U1,Math.max(L1,d.width))):k1}}catch{return{...Jl,order:f}}}function xg(u,s){const f=new Set(s),r=Object.fromEntries(Object.entries(u.renames).filter(([d])=>!f.has(d)));return{...u,collapsedFamilies:u.collapsedFamilies.filter(d=>!f.has(d)),deleted:[...new Set([...u.deleted,...s])],hidden:u.hidden.filter(d=>!f.has(d)),order:u.order.filter(d=>!f.has(d)),renames:r}}function Sg(u,s){if(u.length===0)return[...s];const f=new Set(s),r=u.filter(g=>f.has(g)),d=new Set(r);return[...r,...s.filter(g=>!d.has(g))]}function Eg(u,s,f,r){const d=s.map(x=>x.title),g=(u.order.length?u.order:d).filter(x=>x!==f),C=g.filter(x=>!u.hidden.includes(x))[r],w=C===void 0?g.length:g.indexOf(C);return g.splice(w,0,f),g}const H1=8,wg=8;function Mg(u,s,f=H1){return u.left<f?f-u.left:u.right>s-f?Math.max(f-u.left,s-f-u.right):0}function Cg(u,s,f,r=H1){if(u.top>=r)return!1;const d=u.bottom-u.top;return s.bottom+r+d<=f-r}function jg(u,s,f,r){const d=u.at==="right"?u.x:u.x-s.width/2,g=u.at==="top"?u.y-s.height:u.at==="bottom"?u.y:u.y-s.height/2,b={bottom:g+s.height,left:d,right:d+s.width,top:g};if(u.at==="top"&&Cg(b,f,r.height))return{at:"bottom",shift:u.shift,y:f.bottom+wg};const C=Mg(b,r.width);return C===u.shift?null:{at:u.at,shift:C,y:u.y}}function wu({size:u=18}){return o.jsxs("svg",{"aria-hidden":!0,height:u,strokeLinejoin:"round",strokeWidth:22,viewBox:"160 370 1050 1320",width:Math.round(u*(1050/1320)),children:[o.jsxs("defs",{children:[o.jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lm-up",x1:"791.957",x2:"210",y1:"723.095",y2:"1010",children:[o.jsx("stop",{offset:"0",stopColor:"#7C38E8"}),o.jsx("stop",{offset:"0.68",stopColor:"#CDB6F1"}),o.jsx("stop",{offset:"1",stopColor:"#E9E0FA"})]}),o.jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lm-down",x1:"789.954",x2:"210",y1:"1330.46",y2:"1035",children:[o.jsx("stop",{offset:"0",stopColor:"#3EC2A8"}),o.jsx("stop",{offset:"0.68",stopColor:"#9EDAE8"}),o.jsx("stop",{offset:"1",stopColor:"#E1F2F6"})]}),o.jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lm-shaft",x1:"884.016",x2:"182",y1:"1023.26",y2:"1023.26",children:[o.jsx("stop",{offset:"0",stopColor:"#7E97DD"}),o.jsx("stop",{offset:"0.48",stopColor:"#5F7FD8"}),o.jsx("stop",{offset:"0.71",stopColor:"#9AABE2"}),o.jsx("stop",{offset:"1",stopColor:"#E2E8F6"})]}),o.jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lm-head",x1:"1192",x2:"874.81",y1:"1021.57",y2:"1024.91",children:[o.jsx("stop",{offset:"0",stopColor:"#E8ECF7"}),o.jsx("stop",{offset:"1",stopColor:"#92A7E0"})]})]}),o.jsx("path",{d:"M 671.122 381.199 C 708.12 378.001 733.579 414.981 702.643 437.984 C 705.64 430.245 708.163 423.315 705.553 415.028 C 700.981 400.516 684.107 396.94 671.252 401.81 C 662.713 405.098 655.849 411.671 652.193 420.059 C 645.933 434.059 649.404 447.111 654.599 460.446 C 665.665 467.718 660.114 472.463 666.664 480.695 C 694.852 516.12 737.817 543.026 774.246 568.848 C 841.225 616.324 905.267 670.31 939.022 747.101 C 953.651 782.815 964.144 815.411 953.49 854.107 C 944.702 886.028 889.413 910.644 901.624 945.63 C 905.247 956.01 926.305 965.294 936.684 957.439 C 947.74 949.072 949.919 942.473 953.06 929.336 C 967.974 962.891 939.504 987.655 907.14 982.376 C 893.109 980.134 880.552 972.384 872.258 960.847 C 839.018 914.253 888.968 876.15 898.307 834.712 C 902.782 814.853 894.952 783.534 888.142 764.672 C 860.48 688.068 798.139 632.327 735.838 583.312 C 700.284 555.045 669.551 529.466 642.632 492.392 C 627.896 510.927 608.893 531.804 593.068 550.006 L 506.523 649.582 L 278.039 912.109 C 245.455 949.199 213.059 986.454 180.851 1023.87 C 231.765 1079.46 283.65 1142.04 333.374 1199.45 L 642.829 1555.74 C 666.446 1520.75 700.163 1494.07 732.424 1467.5 C 795.117 1417.7 858.256 1363.37 887.261 1286.25 C 898.113 1256.93 906.911 1217.89 889.705 1189.06 C 873.478 1161.87 852.143 1132.56 865.539 1099.12 C 871.003 1085.24 881.904 1074.2 895.712 1068.56 C 930.406 1054.52 970.704 1079.86 953.232 1118.88 C 950.548 1106.58 948.459 1099.64 937.837 1091.37 C 926.133 1082.27 907.942 1089.57 901.99 1101.66 C 890.169 1127.27 924.549 1151.85 939.219 1169.81 C 966.471 1203.18 959.658 1245.71 945.71 1284.44 C 914.285 1371.69 840.069 1433.7 765.809 1484.61 C 733.647 1506.66 698.091 1531.58 672.306 1561.08 C 665.933 1568.59 659.014 1581.87 653.634 1590.29 C 648.506 1598.32 647.787 1615.38 650.833 1624.56 C 653.881 1633.77 660.579 1641.32 669.359 1645.45 C 681.85 1651.27 699.281 1649.12 705.041 1634.65 C 708.705 1625.45 705.419 1617.29 701.581 1608.8 L 702.848 1609.85 C 737.88 1638.68 697.51 1681.47 657.106 1662.8 C 643.389 1656.45 632.826 1644.83 627.824 1630.56 C 619.064 1605.85 626.824 1585.32 637.489 1563.26 C 610.659 1534.07 581.755 1498.91 555.456 1468.66 L 383.745 1271.03 L 242.504 1108.25 C 219.223 1081.36 191.596 1051.06 169.707 1023.52 C 181.894 1007.58 201.352 986.522 215.082 970.737 L 301.342 871.646 L 539.659 597.67 C 572.041 560.265 605.914 522.417 637.6 484.482 C 616.356 444.192 617.849 392.637 671.122 381.199 z",fill:"#E8ECF7",stroke:"#E8ECF7"}),o.jsx("path",{d:"M 791.002 712.436 C 791.99 712.378 791.355 712.338 792.831 712.983 C 791.837 718.407 719.488 841.546 710.03 858.509 C 707.23 840.677 702.304 817.013 698.274 799.446 C 555 895 360 995 182 1023 C 355 963 525 870 674.863 761.103 C 659.702 748.905 644.649 736.575 629.704 724.113 C 681.16 722.084 738.984 715.793 791.002 712.436 z",fill:"url(#lm-up)",stroke:"url(#lm-up)"}),o.jsx("path",{d:"M 182 1023 C 360 1051 555 1151 698.326 1248.65 C 702.16 1232.41 707.425 1206.32 709.871 1189.79 C 737.246 1238.39 766.184 1286.55 793.713 1335.16 C 739.167 1331.05 684.598 1327.24 630.009 1323.75 C 644.462 1311.53 659.652 1298.21 674.331 1286.42 C 525 1176 355 1083 182 1023 z",fill:"url(#lm-down)",stroke:"url(#lm-down)"}),o.jsx("path",{d:"M 182 1023.5 L 884.044 1002.33 L 881.311 1004.34 C 882.15 1018.85 886.981 1021.89 881.356 1038.74 C 878.766 1040.79 876.225 1042.9 873.734 1045.08 z",fill:"url(#lm-shaft)",stroke:"url(#lm-shaft)"}),o.jsx("path",{d:"M 1005.63 925.199 L 1121.78 984.34 C 1142.45 994.767 1179.5 1012.52 1198.4 1023.72 L 1070.98 1089.03 C 1051.67 1098.95 1023.69 1114.54 1004.93 1122.53 C 1013.61 1097.65 1022.5 1072.85 1031.59 1048.12 L 873.734 1045.08 C 876.225 1042.9 878.766 1040.79 881.356 1038.74 C 886.981 1021.89 882.15 1018.85 881.311 1004.34 L 884.044 1002.33 L 1030.81 999.036 C 1023.04 976.689 1012.03 947.529 1005.63 925.199 z",fill:"url(#lm-head)",stroke:"url(#lm-head)"})]})}function q1({height:u=16}){return o.jsxs("svg",{"aria-label":"Leglas",fill:"#E8ECF7",height:u,role:"img",viewBox:"1256 928 642 222",width:Math.round(u*(642/222)),children:[o.jsx("path",{d:"M 1532.93 979.19 C 1552.43 978.051 1561.54 979.865 1574.88 995.12 L 1575.07 981.036 L 1598.92 981.151 L 1598.96 1052.38 C 1598.98 1086.98 1603.87 1127.82 1557.89 1134.37 C 1533.59 1137.83 1517.6 1134.59 1498.35 1119.87 L 1504.96 1108.54 L 1508.69 1102.35 C 1525.04 1114.93 1548.42 1124.68 1566.62 1107.48 C 1575.66 1098.94 1575.05 1084.76 1574.99 1073.16 C 1568.8 1080.06 1562.18 1085.4 1553.24 1088.34 C 1542.19 1091.88 1530.17 1090.79 1519.94 1085.31 C 1486.94 1067.75 1484.12 1009.92 1513.66 987.847 C 1520.32 982.873 1525.18 981.186 1532.93 979.19 z M 1541.52 1000.13 C 1555.85 998.918 1566.45 1003.26 1574.9 1015.05 C 1575.09 1027.93 1574.91 1041.22 1574.89 1054.14 C 1567.52 1063.25 1562.65 1066.25 1551.25 1068.92 C 1511.01 1069.99 1505.34 1012.62 1541.52 1000.13 z",fillRule:"evenodd"}),o.jsx("path",{d:"M 1416.95 979.231 C 1461.09 974.139 1477.7 1004.91 1478.08 1043.29 L 1395.13 1043.56 C 1404.31 1072.49 1429.03 1082.58 1454.48 1064.74 C 1457.34 1062.33 1456.68 1062.04 1459.58 1062.05 C 1464.01 1065.22 1467.95 1071.97 1471.41 1076.59 C 1414.1 1122.22 1344.57 1064.4 1381 1001.64 C 1388.32 989.03 1403.12 982.109 1416.95 979.231 z M 1419.64 998.169 C 1442.21 996.072 1449.85 1006.61 1455.14 1026.51 C 1448.55 1026.96 1438.16 1026.58 1431.31 1026.54 C 1419.15 1026.65 1406.99 1026.63 1394.83 1026.48 C 1398.74 1009.86 1403.7 1003.36 1419.64 998.169 z",fillRule:"evenodd"}),o.jsx("path",{d:"M 1713.27 979.252 C 1728.04 977.573 1745.26 979.123 1756.3 989.97 C 1768.26 1001.72 1767.44 1017.49 1767.31 1032.81 C 1767.15 1051.82 1767.12 1070.77 1767.06 1089.74 L 1757.36 1089.93 C 1733.55 1090.35 1748.04 1086.51 1742.3 1080.97 C 1727.07 1089.66 1714.5 1096.6 1695.79 1090.38 C 1685.07 1086.81 1679.16 1079.18 1674.51 1069.31 C 1663.26 1025.76 1710.42 1008.22 1743.06 1033.45 C 1743.17 1029.64 1743.75 1021.08 1742.89 1017.76 C 1734.81 986.781 1704.35 998.377 1687.37 1012 C 1684.28 1006.47 1681.22 1000.93 1678.2 995.358 C 1689.81 985.727 1698.69 981.852 1713.27 979.252 z M 1714.53 1038.21 C 1726.37 1037.77 1733.38 1039.57 1742.94 1046.21 C 1743.21 1052.09 1743.05 1058.97 1743.05 1064.94 C 1736.15 1071.44 1733.92 1072.52 1724.6 1074.96 C 1709.1 1075.75 1690.77 1070.07 1698.16 1048.49 C 1700.08 1042.9 1708.94 1039.56 1714.53 1038.21 z",fillRule:"evenodd"}),o.jsx("path",{d:"M 1823.29 979.174 C 1843.68 977.649 1857.91 980.343 1873.82 993.561 L 1864.19 1010.31 C 1854.9 1002.37 1842.52 996.264 1830.29 997.499 C 1810.54 999.496 1804.87 1016.41 1827.99 1021.78 C 1853.42 1027.68 1886.98 1035.62 1875.05 1070.07 C 1869.31 1086.64 1852.8 1091.05 1837.21 1092.35 C 1816.02 1092.18 1803.14 1089.58 1786.76 1075.52 L 1797.03 1058.98 C 1810.81 1068.5 1823.36 1075.69 1840.97 1072.95 C 1848.65 1071.76 1856.31 1065.31 1853.69 1057.02 C 1850.58 1049.89 1837.32 1046.22 1830.02 1044.91 C 1802.77 1040.01 1777.57 1024.93 1796.42 994.719 C 1802.7 984.652 1812.04 981.686 1823.29 979.174 z"}),o.jsx("path",{d:"M 1266.98 939.821 L 1293.02 939.95 L 1293.03 1066.58 L 1358.72 1066.65 L 1358.8 1089.73 L 1266.88 1089.69 L 1266.98 939.821 z"}),o.jsx("path",{d:"M 1627.11 939.241 L 1650.97 939.358 L 1650.98 1089.81 L 1627.17 1089.88 C 1626.5 1040.3 1626.89 988.911 1627.11 939.241 z"})]})}const Mn={copy:"M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z",pencil:"M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z",link:"M87.5,151.52l64-64a12,12,0,0,1,17,17l-64,64a12,12,0,0,1-17-17Zm131-114a60.08,60.08,0,0,0-84.87,0L103.51,67.61a12,12,0,0,0,17,17l30.07-30.06a36,36,0,0,1,50.93,50.92L171.4,135.52a12,12,0,1,0,17,17l30.08-30.06A60.09,60.09,0,0,0,218.45,37.55ZM135.52,171.4l-30.07,30.08a36,36,0,0,1-50.92-50.93l30.06-30.07a12,12,0,0,0-17-17L37.55,133.58a60,60,0,0,0,84.88,84.87l30.06-30.07a12,12,0,0,0-17-17Z",search:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z",split:"M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36ZM44,60h72V196H44ZM212,196H140V60h72Z",sidebar:"M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36ZM44,60H76V196H44ZM212,196H100V60H212Z",trash:"M216,48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM188,204H68V72H188ZM76,20A12,12,0,0,1,88,8h80a12,12,0,0,1,0,24H88A12,12,0,0,1,76,20Z"},Eu="flex h-6 w-6 items-center justify-center rounded text-[#D1D5DB] hover:bg-[#2E2E2E] hover:text-white";function sr({on:u}){return o.jsx("span",{"aria-hidden":"true",className:`relative h-3.5 w-6 shrink-0 rounded-full transition-colors duration-150 motion-reduce:transition-none ${u?"bg-[#E6E8EC]":"bg-[#17181B]"}`,children:o.jsx("span",{className:`absolute left-0.5 top-0.5 size-2.5 rounded-full transition-transform duration-150 motion-reduce:transition-none ${u?"translate-x-2.5 bg-[#17181B]":"bg-[#84848C]"}`})})}function Cn({d:u,size:s=13}){return o.jsx("svg",{"aria-hidden":!0,fill:"currentColor",height:s,viewBox:"0 0 256 256",width:s,children:o.jsx("path",{d:u})})}let c1=0;function Nt({children:u,label:s,side:f="top",wide:r=!1}){const d=M.useRef(null),g=M.useRef(null),b=M.useRef(null),C=M.useRef(null),[w,x]=M.useState(null);M.useLayoutEffect(()=>{const G=g.current,R=d.current?.firstElementChild;if(!w||w.out||!G||!R)return;const ne=jg(w,{height:G.offsetHeight,width:G.offsetWidth},R.getBoundingClientRect(),{height:window.innerHeight,width:window.innerWidth});ne&&x(oe=>oe&&{...oe,...ne})},[s,w?.at,w?.out,w?.shift,w?.x,w?.y]),M.useEffect(()=>()=>{b.current&&clearTimeout(b.current),C.current&&clearTimeout(C.current)},[]);const O=()=>{const G=d.current?.firstElementChild;if(!G)return;const R=G.getBoundingClientRect();C.current&&clearTimeout(C.current),x(f==="top"?{at:"top",out:!1,shift:0,x:R.left+R.width/2,y:R.top-8}:{at:"right",out:!1,shift:0,x:R.right+8,y:R.top+R.height/2})},_=()=>{b.current&&clearTimeout(b.current),b.current=setTimeout(O,Date.now()<c1?0:300)},K=()=>{b.current&&clearTimeout(b.current),c1=Date.now()+300,x(G=>G&&!G.out?{...G,out:!0}:G),C.current&&clearTimeout(C.current),C.current=setTimeout(()=>x(null),120)};return o.jsxs("span",{className:"contents",onBlur:K,onFocus:G=>{G.target.matches(":focus-visible")&&O()},onPointerDown:K,onPointerEnter:_,onPointerLeave:K,ref:d,children:[u,w&&o.jsx("span",{"aria-hidden":!0,className:"pointer-events-none fixed z-[60]",style:{left:w.x+w.shift,top:w.y},children:o.jsx("span",{className:`block ${{bottom:"-translate-x-1/2",right:"-translate-y-1/2",top:"-translate-x-1/2 -translate-y-full"}[w.at]}`,children:o.jsx("span",{className:`leglas-tip block rounded-lg border border-white/10 bg-[#171717] px-2 py-1 text-xs font-medium text-white shadow-lg ${r?"w-64 whitespace-normal":"whitespace-nowrap"} ${w.out?`leglas-tip-out-${w.at}`:`leglas-tip-in-${w.at}`}`,ref:g,children:s})})})]})}function Ag({error:u,initial:s,label:f,onCancel:r,onCommit:d}){const g=M.useRef(!1);return M.useEffect(()=>{u&&(g.current=!1)}),o.jsx("form",{className:"leglas-rename min-w-0 flex-1",onSubmit:b=>{b.preventDefault();const C=new FormData(b.currentTarget).get("name");g.current=!0,d(typeof C=="string"?C.trim():"","submit")},children:o.jsx("input",{"aria-describedby":u?"leglas-rename-error":void 0,"aria-invalid":u?!0:void 0,"aria-label":f,autoFocus:!0,className:`-mx-1 block w-[calc(100%+0.5rem)] rounded-[4px] bg-transparent px-1 py-0 text-sm font-medium leading-5 text-white outline-none ring-1 ${u?"ring-amber-400/60":"ring-[#D1D5DB]/45 focus:ring-[#D1D5DB]/70"}`,defaultValue:s,name:"name",onBlur:b=>{g.current||d(b.currentTarget.value.trim(),"blur")},onKeyDown:b=>{b.key==="Escape"&&(g.current=!0,r())},type:"text"})})}const Ng={danger:"bg-amber-300",info:"bg-[#9CA3AF]",success:"bg-emerald-300"},Tg=140;function Dg({onDismiss:u,toast:s}){const[f,r]=M.useState(!1),[d,g]=M.useState(!1),[b,C]=M.useState(!1),w=M.useRef(s.ttl),x=M.useRef(null),O=()=>{x.current||(r(!0),x.current=setTimeout(u,Tg))},_=d||b;return M.useEffect(()=>{if(f||_||w.current===null)return;const K=Date.now(),G=setTimeout(O,w.current);return()=>{clearTimeout(G),w.current!==null&&(w.current=Math.max(0,w.current-(Date.now()-K)))}},[f,_]),M.useEffect(()=>()=>{x.current&&clearTimeout(x.current)},[]),o.jsxs("li",{className:`pointer-events-auto flex items-start gap-2.5 rounded-lg border border-white/10 bg-[#2E2E2E] px-3 py-2.5 shadow-xl shadow-black/40 ${f?"leglas-toast-out":"leglas-toast-in"}`,onBlur:()=>C(!1),onFocus:()=>C(!0),onPointerEnter:()=>g(!0),onPointerLeave:()=>g(!1),children:[o.jsx("span",{"aria-hidden":!0,className:`mt-[5px] size-1.5 shrink-0 rounded-full ${Ng[s.tone]}`}),o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsx("span",{className:"block text-xs leading-snug text-[#E8E8EA]",children:s.message}),s.detail?o.jsx("span",{className:"mt-1 block cursor-text select-text break-all text-[10px] leading-snug text-[#9CA3AF]","data-selectable":"",style:{fontFamily:"var(--font-mono)"},children:s.detail}):null]}),s.action?o.jsx("button",{className:"shrink-0 rounded px-1 py-0.5 text-[11px] font-medium text-white underline decoration-white/30 underline-offset-2 transition-colors hover:decoration-white focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[#D1D5DB]/60",onClick:()=>{s.action?.run(),O()},type:"button",children:s.action.label}):null,o.jsx("button",{"aria-label":"Dismiss",className:"-mr-1 flex size-5 shrink-0 items-center justify-center rounded text-[#84848C] transition-colors hover:bg-white/[0.06] hover:text-white focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[#D1D5DB]/60",onClick:O,type:"button",children:o.jsx("svg",{className:"size-2.5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 10 10",children:o.jsx("path",{d:"M2.5 2.5 7.5 7.5M7.5 2.5 2.5 7.5",strokeLinecap:"round"})})})]})}function zg({bottom:u,left:s,onDismiss:f,toasts:r,width:d}){return o.jsx("ol",{"aria-live":"polite",className:`pointer-events-none fixed z-40 flex flex-col gap-2 transition-[bottom,left,width] duration-200 ${ja} motion-reduce:transition-none`,style:{bottom:u,left:s,width:d},children:r.map(g=>o.jsx(Dg,{onDismiss:()=>f(g.id),toast:g},g.id))})}function Og({loaded:u}){return o.jsxs("div",{"aria-hidden":!0,className:`absolute inset-0 overflow-hidden bg-white transition-opacity duration-700 ${ja} ${u?"pointer-events-none opacity-0":"opacity-100"}`,children:[o.jsxs("div",{children:[o.jsx("div",{className:"mx-auto mt-6 h-12 w-[400px] max-w-[80%] rounded-full bg-neutral-200/80"}),o.jsxs("div",{className:"mx-auto mt-24 grid w-full max-w-5xl grid-cols-[1.05fr_0.95fr] items-start gap-16 px-12 max-[900px]:grid-cols-1",children:[o.jsxs("div",{children:[o.jsx("div",{className:"h-14 w-4/5 rounded-lg bg-neutral-200"}),o.jsx("div",{className:"mt-3 h-14 w-3/5 rounded-lg bg-neutral-200"}),o.jsx("div",{className:"mt-8 h-4 w-full max-w-[420px] rounded bg-neutral-200/80"}),o.jsx("div",{className:"mt-2 h-4 w-4/5 max-w-[360px] rounded bg-neutral-200/80"}),o.jsx("div",{className:"mt-10 h-12 w-44 rounded-full bg-neutral-200"})]}),o.jsx("div",{className:"h-[420px] w-60 justify-self-center rounded-[2.5rem] bg-neutral-200 max-[900px]:hidden"})]})]}),o.jsx("div",{className:"pointer-events-none absolute inset-0 overflow-hidden motion-reduce:hidden",children:o.jsx("div",{className:"absolute inset-0 -translate-x-full animate-[leglas-skeleton-sweep_1.6s_ease-in-out_infinite]",style:{background:"linear-gradient(100deg, transparent 32%, rgba(255,255,255,0.55) 50%, transparent 68%)"}})}),o.jsxs("span",{className:"absolute bottom-4 right-5 flex items-center gap-2",children:[o.jsx(mr,{"aria-label":"",size:20,state:gr,theme:"light"}),o.jsx("span",{className:"leglas-shimmer-text text-xs font-medium",children:"Loading preview…"})]})]})}function Rg({onReload:u,reason:s}){return o.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-3 bg-white p-6 text-center",role:"alert",children:[o.jsxs("div",{className:"max-w-xs",children:[o.jsx("p",{className:"text-sm font-medium text-neutral-800",children:"Preview didn’t load"}),o.jsx("p",{className:"mt-1 text-xs leading-snug text-neutral-500",children:s})]}),o.jsx("button",{className:"rounded-md bg-neutral-900 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-neutral-700",onClick:u,type:"button",children:"Reload"})]})}function Mi({id:u,size:s=14}){const f=M.useId();return u==="claude"?o.jsx("svg",{"aria-hidden":"true",fill:"#D97757",height:s,viewBox:"0 0 24 24",width:s,children:o.jsx("path",{d:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"})}):u==="cursor"?o.jsx("svg",{"aria-hidden":"true",fill:"currentColor",height:s,viewBox:"0 0 24 24",width:s,children:o.jsx("path",{d:"M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23"})}):u==="codex"?o.jsxs("svg",{"aria-hidden":"true",height:s,viewBox:"0 0 24 24",width:s,children:[o.jsx("defs",{children:o.jsxs("linearGradient",{id:f,x1:"0",x2:"0",y1:"0",y2:"1",children:[o.jsx("stop",{offset:"0",stopColor:"#9B96F2"}),o.jsx("stop",{offset:"0.55",stopColor:"#5E6CF6"}),o.jsx("stop",{offset:"1",stopColor:"#3B32EF"})]})}),o.jsx("path",{d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457z",fill:`url(#${f})`}),o.jsx("path",{d:"M7.282 8.307a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zM12.728 14.547a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z",fill:"#F4F4FE"})]}):u==="custom"?o.jsx("svg",{"aria-hidden":"true",fill:"none",height:s,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:s,children:o.jsx("path",{d:"m5 6 6 6-6 6M13 18h6"})}):null}function _g(u){return typeof u=="object"&&u!==null&&u.name==="AbortError"}const Lg=1e4,Ug={setInterval:(u,s)=>globalThis.setInterval(u,s),clearInterval:u=>globalThis.clearInterval(u),setTimeout:(u,s)=>globalThis.setTimeout(u,s),clearTimeout:u=>globalThis.clearTimeout(u)};function pr(u,s){const{everyMs:f,timeoutMs:r=Lg,timers:d=Ug}=s;let g=!1,b=null;const C=()=>{if(g||b!==null)return;const x=new AbortController,O=d.setTimeout(()=>{x.abort(),b?.controller===x&&(b=null)},r),_={controller:x,deadline:O};b=_;const K=()=>{b===_&&(d.clearTimeout(O),b=null)};u(x.signal).then(K,K)};C();const w=d.setInterval(C,f);return()=>{g=!0,d.clearInterval(w),b!==null&&(d.clearTimeout(b.deadline),b.controller.abort(),b=null)}}function kg(u){const s=document.createElement("textarea");s.value=u,s.setAttribute("readonly",""),s.style.cssText="position:fixed;top:-1000px;opacity:0",document.body.append(s),s.select();try{return document.execCommand("copy")}finally{s.remove()}}function Bg(){return{clipboard:typeof navigator>"u"?void 0:navigator.clipboard,legacy:typeof document>"u"?void 0:kg}}async function xr(u,s=Bg()){if(s.clipboard)try{return await s.clipboard.writeText(u),"copied"}catch{}try{if(s.legacy?.(u))return"copied"}catch{}return"blocked"}const Hg=9;function qg(u){if((u.metaKey||u.ctrlKey)&&!u.altKey&&!u.shiftKey&&u.key.toLowerCase()==="k")return{kind:"search"};if(u.typing||u.metaKey||u.ctrlKey||u.altKey)return null;const{key:s}=u;if(s==="?")return{kind:"help"};if(s==="ArrowDown")return{kind:"move",delta:1};if(s==="ArrowUp")return{kind:"move",delta:-1};const f=s.length===1?s.toLowerCase():"";return f==="a"?{kind:"note"}:f==="c"?{kind:"split"}:f==="b"?{kind:"rail"}:f==="r"?{kind:"request"}:f==="t"?{kind:"tools"}:s.length===1&&s>="1"&&s<=String(Hg)?{kind:"jump",index:Number(s)-1}:null}function Y1(u){return u?"⌘Cmd+K":"Ctrl+K"}function Yg(u){return[{keys:["↑","↓"],label:"Move between directions"},{keys:["1","9"],join:"to",label:"Jump straight to a direction"},{keys:["C"],label:"Compare against the direction you were last on"},{keys:["R"],label:"Ask for a change to this direction"},{keys:["A"],label:"Annotate the design: point at what is wrong"},{keys:[Y1(u)],label:"Search"},{keys:["B"],label:"Collapse or open the rail"},{keys:["T"],label:"Open or close the Leglas dev tool menu"},{keys:["?"],label:"This list"},{keys:["Esc"],label:"Clear the search, or close what is open"}]}function Gg(u,s,f){return`${u}\0${s}\0${f}`}function Xg(u,s,f){return u[s]===f}function Qg(u,s,f){return u[s]===f?u:{...u,[s]:f}}function Zg(u,s){if(!(s in u))return u;const f={...u};return delete f[s],f}function yr(u){try{const s=u.contentDocument;return s!==null&&s.location.href!=="about:blank"&&s.readyState!=="loading"}catch{return!1}}function Vg({frame:u,onFailure:s,onReady:f,sameOrigin:r,timeoutMs:d}){let g=!1,b=null;const C=()=>{u.removeEventListener("load",O),u.removeEventListener("error",_),b!==null&&(globalThis.clearTimeout(b),b=null)},w=K=>g||(r?!yr(u):!K)?!1:(g=!0,C(),f(),!0),x=K=>{g||K&&r&&w(!1)||(g=!0,C(),s())};function O(){w(!r)}function _(){x(!1)}return u.addEventListener("load",O),u.addEventListener("error",_),b=globalThis.setTimeout(()=>x(!0),d),r&&w(!1),()=>{g||(g=!0,C())}}function Kg(u){if(typeof u!="object"||u===null)return null;const s=Reflect.get(u,"type");return s==="leglas:preview-ready"?"ready":s==="leglas:preview-error"?"error":null}function $g(u,s){if(s===null)return null;for(const f of u)if(f.contentWindow===s)return f;return null}function o1(u){return u.file===void 0&&u.branch===void 0&&u.url.startsWith("/")}const Jg={reachable:!0,wasDown:!1};function Fg(u,s){return s?u.reachable?u:{reachable:!0,wasDown:u.wasDown}:!u.reachable&&u.wasDown?u:{reachable:!1,wasDown:!0}}function Wg(u){const s=u.rows,f=r=>r!=null&&r!==u.active&&(s===void 0||s.includes(r));return f(u.pinned)?u.pinned:f(u.parent)?u.parent:f(u.previous)?u.previous:s?.find(r=>r!==u.active)??null}function Ig(u){return!u.split||u.compare===null||u.compare===u.active?[u.active]:[u.active,u.compare]}const Pg=.999,e2=.05;function t2(u){const{gutter:s,panes:f,scaleSplit:r,stageHeight:d,stageWidth:g,viewport:b}=u,C=f>1?(g-(f-1))/f:g,w=b??g,x=C-(b!==null?s:0),O=d-(b!==null?s:0),K=r&&f>1&&g>0&&w>0?Math.max(e2,Math.min(1,x/w)):1,G=K<Pg;return{boxHeight:O*K,boxWidth:w*K,designWidth:w,frameHeight:O,scale:K,scaling:G}}const n2="#__next-build-watcher,#nuxt-devtools-anchor,astro-dev-toolbar{display:none!important}",l2="#devtools-indicator{display:none!important}",a2=12;function i2(u,s,f=[],r=[]){const d=u.replace(/\s+/g," ").trim().toLowerCase();return d.length<a2?null:X1(`${s.join(">")} ${d} ${f.join("|")} ${r.join("|")}`.trimEnd())}const G1=new Set(["LINK","META","NOSCRIPT","SCRIPT","STYLE","TEMPLATE"]),Bs=720,r1=180,u2=["display","visibility","position","top","right","bottom","left","inset","box-sizing","width","height","min-width","min-height","max-width","max-height","margin-top","margin-right","margin-bottom","margin-left","padding-top","padding-right","padding-bottom","padding-left","overflow-x","overflow-y","opacity","transform","transform-origin","perspective","z-index","color","background-color","background-image","background-position","background-size","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","box-shadow","outline","filter","backdrop-filter","-webkit-backdrop-filter","clip-path","mask-image","mix-blend-mode","isolation","object-fit","object-position","font-family","font-size","font-style","font-weight","line-height","letter-spacing","text-align","text-transform","white-space","flex-direction","flex-wrap","flex-grow","flex-shrink","flex-basis","align-items","align-self","justify-content","justify-self","gap","row-gap","column-gap","grid-template-columns","grid-template-rows","grid-column","grid-row","aspect-ratio","pointer-events","animation-name","animation-duration","animation-delay","animation-iteration-count","animation-direction","animation-timing-function"],s2=new Set(["bottom","filter","height","left","opacity","right","top","transform","width"]),c2=["content","display","position","inset","width","height","opacity","transform","color","background-color","background-image","border-radius","box-shadow","filter","clip-path"],o2=["viewBox","d","points","x","y","x1","y1","x2","y2","cx","cy","r","rx","ry","width","height","fill","stroke","stroke-width"],f1=["nextjs-portal","vite-error-overlay","#webpack-dev-server-client-overlay","#leglas-hide-dev-overlays"].join(",");function Hs(u){if(!Number.isFinite(u))return"?";const s=Math.round(u*2)/2;return Object.is(s,-0)?"0":String(s)}function X1(u){let s=2166136261,f=2654435769;for(let r=0;r<u.length;r+=1){const d=u.charCodeAt(r);s=Math.imul(s^d,16777619),f=Math.imul(f^d,2246822507)}return`${(s>>>0).toString(16)}${(f>>>0).toString(16)}`}function Xs(u,s=480){const f=u.replace(/\s+/g," ").trim();return f.length<=s?f:`${f.slice(0,180)}…${f.slice(-80)}#${f.length}:${X1(f)}`}function r2(u){return G1.has(u.tagName)||u.matches(f1)||u.closest(f1)!==null}function f2(u){if(u.length<=Bs)return u.map((d,g)=>g);const s=new Set,f=d=>{d>=0&&d<u.length&&s.size<Bs&&s.add(d)};for(let d=0;d<r1;d+=1)f(d);for(let d=Math.max(0,u.length-r1);d<u.length;d+=1)f(d);for(let d=0;d<u.length&&s.size<Bs;d+=1){const g=u[d];if(!g.matches("a,button,input,select,textarea,summary,[role],svg,svg *,canvas,img,picture,video,audio,iframe"))continue;f(d);let b=g.parentElement;for(let C=0;b!==null&&C<3;C+=1)f(u.indexOf(b)),b=b.parentElement}const r=Bs-s.size;if(r>0){const d=(u.length-1)/Math.max(1,r-1);for(let g=0;g<r;g+=1)f(Math.round(g*d))}return[...s].sort((d,g)=>d-g)}function d2(u,s){if(s.getPropertyValue("animation-name").trim()!=="none")return!0;const f=u.getAnimations;if(typeof f!="function")return!1;try{return f.call(u).some(r=>r.playState==="running")}catch{return!1}}function h2(u,s){if(s)return"rect:animated";let f;try{f=u.getBoundingClientRect()}catch{return"rect:?"}const r=u.ownerDocument.defaultView,d=r?.getComputedStyle(u).position,g=d==="fixed"?0:r?.scrollX??0,b=d==="fixed"?0:r?.scrollY??0;return`rect:${Hs(f.left+g)},${Hs(f.top+b)},${Hs(f.width)},${Hs(f.height)}`}function m2(u){const s=[];for(const r of o2){const d=u.getAttribute(r);d!==null&&s.push(`${r}:${Xs(d)}`)}const f=u.tagName;if(["A","AUDIO","IFRAME","IMG","SOURCE","VIDEO"].includes(f))for(const r of["href","src","srcset","poster"]){const d=u.getAttribute(r);d!==null&&s.push(`${r}:${Xs(d)}`)}if(f==="CANVAS"){const r=u;s.push(`bitmap:${r.width}x${r.height}`)}return s.join(",")}function d1(u,s,f){let r;try{r=f(u,s)}catch{return""}const d=r.getPropertyValue("content").trim();return d===""||d==="none"||d==="normal"?"":`${s}{${c2.map(g=>`${g}:${Xs(r.getPropertyValue(g))}`).join(";")}}`}function g2(u,s){if(!u)return[];const f=[u,...u.querySelectorAll("*")].filter(r=>!r2(r));return f2(f).map(r=>{const d=f[r],g=s(d),b=d2(d,g),C=u2.map(G=>{const R=b&&s2.has(G)?"<animated>":Xs(g.getPropertyValue(G));return`${G}:${R}`}).join(";"),w=d.getAttribute("role"),x=d.getAttribute("type"),O=[w&&`role:${w}`,x&&`type:${x}`].filter(Boolean).join(","),_=d1(d,"::before",s),K=d1(d,"::after",s);return`${d.tagName}${O?`[${O}]`:""}{${h2(d,b)};${C};${m2(d)};${_};${K}}`})}function p2(u,s){if(!u)return[];const f=[];let r=u;for(let d=0;d<4;d+=1){const g=s(r);f.push(`${g.backgroundColor};${g.backgroundImage};${g.color}`);const b=Array.from(r.children).filter(w=>!G1.has(w.tagName??"")),C=b.length===1?b[0]:void 0;if(C===void 0)break;r=C}return f}function y2(u){const s=new Map;for(const[r,d]of Object.entries(u)){if(d===null)continue;const g=s.get(d);g?g.push(r):s.set(d,[r])}const f={};for(const r of s.values())if(!(r.length<2))for(const d of r)f[d]=r.filter(g=>g!==d);return f}function Q1(u,s){const f=s[u.title];return f?.url===u.url?f:null}function cr(u,s){let f=null;for(const r of s)r in u&&(f??={...u},delete f[r]);return f??u}function v2(u,s){const f=[];for(const[r,d]of s){const g=u.get(r);g!==void 0&&g!==d&&f.push(r)}return f}function b2(u,s,f){const r=f.status==="complete"?{url:s.url,status:"complete",signature:f.signature}:{url:s.url,status:"failed"},d=u[s.title],g=d?.status==="failed"&&r.status==="failed"||d?.status==="complete"&&r.status==="complete"&&d.signature===r.signature;return d?.url===r.url&&g?u:{...u,[s.title]:r}}function x2(u,s){const f={};for(const r of u){const d=Q1(r,s);d?.status==="complete"&&(f[r.title]=d.signature)}return f}function S2(u,s){return u.filter(f=>f.url.startsWith("/")?Q1(f,s)===null:!1)}const h1=24,E2=10,m1=44;function w2(u,s){const f=(r,d)=>{const g=Math.min(h1,d/2),b=Math.max(g,d-h1);return Math.max(g,Math.min(b,r))};return{x:f(u.x,s.width),y:f(u.y,s.height)}}function M2(u){return{x:u.x-m1/2,y:u.y-m1/2}}function C2(u,s,f=E2){return Math.abs(s.x-u.x)>f||Math.abs(s.y-u.y)>f}function j2(u,s){const f=u.x<s.width/2,r=u.y<s.height/2;return r&&f?{corner:"top-left"}:r?{corner:"top-right"}:f?{corner:"bottom-left"}:{corner:"bottom-right"}}const A2=3,pt={action:6e3,plain:2600};function N2(u,s,f=A2){return[...u.filter(d=>d.kind!==s.kind),s].slice(-f)}function T2(u,s){return u.filter(f=>f.id!==s)}const D2=10;function Z1(u,s){let f=u;for(let r=0;r<D2;r+=1){const d=s.get(f);if(d===void 0||d===u)return f;f=d}return f}function z2(u,s){const f=new Set(u),r=new Map,d=[];for(const g of u){const b=Z1(g,s);if(b===g||!f.has(b))d.push(g);else{const C=r.get(b);C?C.push(g):r.set(b,[g])}}return d.flatMap(g=>[{title:g,depth:0},...(r.get(g)??[]).map(b=>({title:b,depth:1}))])}function O2(u,s){if(s.size===0)return[...u];let f=null;return u.filter(r=>r.depth===0?(f=r.title,!0):f===null||!s.has(f))}const g1=u=>u.trim().replace(/\s+/g," ").toLowerCase();function R2(u,s,f){const r=u.trim().replace(/\s+/g," "),d=f.get(s)??s;if(r===""||r===s)return d===s?{kind:"same"}:{kind:"reset",value:s};if(r===d)return{kind:"same"};for(const[g,b]of f)if(g!==s&&g1(b)===g1(r))return{kind:"taken",by:b};return{kind:"set",value:r}}function _2(u,s){try{return new URL(u,s).toString()}catch{return u}}function L2({displayName:u,preview:s,previewUrl:f,title:r}){const d=u===r?"":` (shown as ${JSON.stringify(u)})`,g=s?.note?` — ${s.note}`:"",b=s?.tags.length?` [${s.tags.join(", ")}]`:"",C=[`Leglas direction ${JSON.stringify(r)}${d}${g}${b}`];return s?.file?C.push(`Source: ${s.file}`):s?.branch?C.push(`Branch: ${s.branch}`):s&&C.push(`Route: ${s.url}`),C.push(`Preview: ${f}`),s?.basedOn&&C.push(`A variant of: ${s.basedOn}`),C.push("","Inspect this direction in full:",` npx leglas show ${JSON.stringify(r)} --json`),C.join(`
|
|
10
|
-
`)}function U2({previews:u,project:s,searchRef:f,onToggleSplit:r,onToggleHelp:d,onToggleTools:g,onToggleNote:b,suspended:C=!1}){const w=vg(s),x=()=>bg(typeof window>"u"?null:window.localStorage.getItem(w),u),[O,_]=M.useState(x),K=new Map(u.map(k=>[k.title,k])),G=()=>{const k=x();return k.order.find(P=>!k.hidden.includes(P))??k.order[0]??""},[R,ne]=M.useState(G),oe=typeof window<"u"&&window.self!==window.top,[Z,X]=M.useState(()=>[G()]),[W,ie]=M.useState(""),[ue,p]=M.useState([]),I=k=>{p(P=>P.length?[]:P),ie(k)},[fe,me]=M.useState(!1),[ge,Me]=M.useState(null),[he,qe]=M.useState(null),[Ae,Be]=M.useState(null),[D,Q]=M.useState(!1),[te,xe]=M.useState({}),[Ce,v]=M.useState([]),[L,F]=M.useState(null),ee=M.useRef(1),ce=M.useRef(null),ve=M.useRef(0),U=k=>{ve.current+=1,v(P=>N2(P,{...k,id:ve.current}))},V=k=>v(P=>T2(P,k)),J=k=>{ne(k),X(P=>P.includes(k)?P:[...P,k])};M.useEffect(()=>{window.localStorage.setItem(w,JSON.stringify(O))},[O,w]),M.useEffect(()=>()=>{ce.current&&clearTimeout(ce.current)},[]);const le=k=>O.renames[k]??k,Le=k=>K.get(k)?.url??"/",Ze=k=>{if(!W.trim())return!0;const P=W.toLowerCase(),be=K.get(k);return le(k).toLowerCase().includes(P)||k.toLowerCase().includes(P)||(be?.note??"").toLowerCase().includes(P)||(be?.tags??[]).some(Se=>Se.toLowerCase().includes(P))},Ye=u.map(k=>k.title).filter(k=>!O.deleted.includes(k)),Ve=Sg(O.order,Ye),ze=W.trim()!=="",$e=ze?ue:O.collapsedFamilies,nt=new Map(u.flatMap(k=>k.basedOn===void 0?[]:[[k.title,k.basedOn]])),ft=z2(Ve.filter(k=>!O.hidden.includes(k)&&Ze(k)),nt),Mt=O2(ft,new Set($e)),Wt=Mt.map(k=>k.title),Yn=new Map(Mt.map(k=>{const P=k.depth===0?ft.filter(be=>be.depth===1&&Z1(be.title,nt)===k.title).length:0;return[k.title,{depth:k.depth,variants:P,folded:$e.includes(k.title)}]})),yl=(k,P)=>k.includes(P)?k.filter(be=>be!==P):[...k,P],Wl=k=>ze?p(P=>yl(P,k)):_(P=>({...P,collapsedFamilies:yl(P.collapsedFamilies,k)})),yt=k=>K.get(k)?.basedOn??null,Il=Ve.filter(k=>!O.hidden.includes(k)).length,Pl=(k,P)=>_(be=>({...be,order:Eg(be,u,k,P)})),ea=(k,P=!1)=>{_(be=>({...be,hidden:be.hidden.filter(Se=>Se!==k)})),P&&J(k)},vl=k=>{const P=le(k),be=R===k;if(_(Se=>({...Se,hidden:[...Se.hidden,k]})),be){const Se=Ve.find(we=>we!==k&&!O.hidden.includes(we));Se&&J(Se)}U({action:{label:"Undo",run:()=>ea(k,be)},kind:`remove:${k}`,message:`${P} removed from the list`,tone:"info",ttl:pt.action})},Da=async k=>{const P=[...new Set(k)].filter(we=>O.hidden.includes(we)),be=P.filter(we=>K.get(we)?.local===!0);if(be.length>0){const we=await fetch("/leglas/api/previews/delete",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({titles:be})});if(!we.ok){const st=await we.json().catch(()=>null);throw new Error(st?.error??"The directions could not be deleted from Leglas.")}}const Se=new Set(P);if(_(we=>xg(we,P)),X(we=>we.filter(st=>!Se.has(st))),P.includes(R)){const we=Ve.find(st=>!Se.has(st)&&!O.hidden.includes(st));ne(we??"")}O.hidden.every(we=>Se.has(we))&&me(!1)},Gn=(k,P)=>_(be=>{const Se={...be.renames};return P===void 0?delete Se[k]:Se[k]=P,fetch("/leglas/api/renames",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({renames:Se})}).catch(()=>{}),{...be,renames:Se}}),Xn=k=>{Me(k),qe(null)},Ct=(k,P,be="submit")=>{const Se=new Map(Ye.map(We=>[We,le(We)])),we=R2(P,k,Se);if(we.kind==="taken"){if(be==="submit"){qe(`${we.by} already goes by that name.`);return}Xn(null),U({kind:`rename:${k}`,message:`Still called ${le(k)}. ${we.by} already goes by that name.`,tone:"info",ttl:pt.plain});return}if(Xn(null),we.kind==="same")return;const st=O.renames[k];Gn(k,we.kind==="reset"?void 0:we.value),U({action:{label:"Undo",run:()=>Gn(k,st)},kind:`rename:${k}`,message:we.kind==="reset"?`Name reset to ${we.value}`:`Renamed to ${we.value}`,tone:"success",ttl:pt.action})};M.useEffect(()=>{const k=Wt,P=Se=>{const we=Se.target,st=we?.tagName?.toLowerCase(),We=qg({key:Se.key,altKey:Se.altKey,ctrlKey:Se.ctrlKey,metaKey:Se.metaKey,shiftKey:Se.shiftKey,typing:st==="input"||st==="textarea"||st==="select"||(we?.isContentEditable??!1)});if(We&&!(C&&We.kind!=="help")){if(We.kind==="search"||We.kind==="request")Se.preventDefault(),_(dt=>dt.collapsed?{...dt,collapsed:!1}:dt),F({target:We.kind,nonce:ee.current++});else if(We.kind==="split")Se.preventDefault(),r?.();else if(We.kind==="help")Se.preventDefault(),d?.();else if(We.kind==="tools")Se.preventDefault(),g?.();else if(We.kind==="note")Se.preventDefault(),b?.();else if(We.kind==="rail")_(dt=>({...dt,collapsed:!dt.collapsed}));else if(We.kind==="jump"){const dt=k[We.index];dt&&(Se.preventDefault(),J(dt))}else if(We.kind==="move"){Se.preventDefault();const dt=k.indexOf(R),Kt=We.delta===1?k[Math.min(k.length-1,dt+1)]:k[Math.max(0,dt-1)];Kt&&J(Kt)}}},be=[window];for(const Se of Array.from(document.querySelectorAll("iframe")))try{const we=Se.contentDocument;we&&be.push(we)}catch{}for(const Se of be)Se.addEventListener("keydown",P);return()=>{for(const Se of be)Se.removeEventListener("keydown",P)}},[R,Wt.join("|"),r,d,g,b,C,Z.join("|"),Object.entries(te).filter(([,k])=>k).map(([k])=>k).join("|")]);const It=(k,P)=>{const be=_2(Le(k),window.location.origin),Se=P==="link"?be:L2({displayName:le(k),preview:K.get(k),previewUrl:be,title:k});xr(Se).then(we=>{if(we==="blocked"){Be(null),U({detail:be,kind:"copy",message:"Your browser blocked the clipboard. The direction is at:",tone:"danger",ttl:null});return}Be({kind:P,title:k}),ce.current&&clearTimeout(ce.current),ce.current=setTimeout(()=>Be(null),1200),U({kind:"copy",message:P==="link"?`Link to ${le(k)} copied`:`Reference to ${le(k)} copied`,tone:"success",ttl:pt.plain})})},Tt=k=>It(k,"link"),Zt=k=>It(k,"reference"),ct=k=>{k.preventDefault();const P=k.currentTarget;P.setPointerCapture(k.pointerId);const be=k.clientX,Se=O.width;Q(!0);const we=We=>{const dt=Math.min(U1,Math.max(L1,Se+We.clientX-be));_(Kt=>Kt.width===dt?Kt:{...Kt,width:dt})},st=We=>{P.releasePointerCapture(We.pointerId),P.removeEventListener("pointermove",we),P.removeEventListener("pointerup",st),P.removeEventListener("pointercancel",st),Q(!1)};P.addEventListener("pointermove",we),P.addEventListener("pointerup",st),P.addEventListener("pointercancel",st)},ta=(k,P)=>xe(be=>Qg(be,k,P)),bl=(k,P)=>Xg(te,k,P),ji=k=>xe(P=>Zg(P,k)),Vt=oe?[R]:Ye.filter(k=>Z.includes(k));return{active:R,copied:Ae,copyLink:Tt,copyReference:Zt,deleteRemoved:Da,displayName:le,dismissToast:V,focusing:L,hiddenCount:O.hidden.length,hide:vl,isLoaded:bl,loaded:te,markLoaded:ta,matches:Ze,moveOption:Pl,nested:oe,notify:U,onHandlePointerDown:ct,panes:Vt,prefs:O,previewFor:k=>K.get(k),query:W,rename:Ct,renameError:he,renaming:ge,parentOf:yt,resetLoaded:ji,resizing:D,restore:ea,rowMeta:Yn,rows:Wt,toggleFamily:Wl,setActive:J,setPrefs:_,setQuery:I,setShowHidden:me,showHidden:fe,startRename:Xn,toasts:Ce,urlFor:Le,visibleCount:Il,viewports:B1}}function p1(u){const s=u?.trim()??"";return s===""?null:s}function V1(u){const s=p1(u?.basedOn),f=p1(u?.askedFor);return s===null&&f===null?null:{basedOn:s,askedFor:f}}function k2(u,s){const f=u===null?null:`Variant of ${u}`,r=s===null?null:`asked for “${s}”`;return f===null?r===null?null:`You ${r}`:r===null?f:`${f} · you ${r}`}const y1=80,B2=6,H2=8;function q2(u){if(typeof u!="string")return null;const s=u.trim();return/^[A-Za-z][\w-]*$/.test(s)?s:null}function Y2(u){return typeof u!="string"?[]:u.trim().split(/\s+/).filter(Boolean).slice(0,B2)}function Gs(u){const s=(u??"").replace(/\s+/g," ").trim();return s.length>y1?`${s.slice(0,y1-1)}…`:s}function G2(u){const s=[];let f=u;for(;f!==null&&s.length<H2;){const r=f.tagName.toLowerCase();if(r==="body"||r==="html")break;const d=q2(f.id);if(d!==null)return s.unshift(`#${d}`),s.join(" > ");const g=f.parentElement;if(g===null){s.unshift(r);break}let b=1;for(let C=0;C<g.children.length;C+=1){const w=g.children[C];if(w===f)break;w?.tagName===f.tagName&&(b+=1)}s.unshift(`${r}:nth-of-type(${b})`),f=g}return s.join(" > ")}function v1(u,s){return!Number.isFinite(u)||!Number.isFinite(s)||s<=0?.5:Math.round(Math.min(1,Math.max(0,u/s))*1e3)/1e3}function b1(u,s,f,r){return{classes:Y2(u.className),rect:{height:Math.round(s.height),width:Math.round(s.width),x:Math.round(s.x),y:Math.round(s.y)},selector:G2(u),spot:{x:r===void 0?.5:v1(r.x-s.x,s.width),y:r===void 0?.5:v1(r.y-s.y,s.height)},tag:u.tagName.toLowerCase(),text:Gs(u.textContent),viewport:Math.round(f)}}const x1=6;function S1(u,s){return Math.abs(s.x-u.x)>=x1||Math.abs(s.y-u.y)>=x1}function E1(u,s){return{height:Math.abs(s.y-u.y),width:Math.abs(s.x-u.x),x:Math.min(u.x,s.x),y:Math.min(u.y,s.y)}}function X2(u,s){return u.x<s.x+s.width&&u.x+u.width>s.x&&u.y<s.y+s.height&&u.y+u.height>s.y}function w1(u,s){return s.x>=u.x&&s.y>=u.y&&s.x+s.width<=u.x+u.width&&s.y+s.height<=u.y+u.height}function Q2(u,s){const f=u.width>0?u.width:1,r=u.height>0?u.height:1,d=g=>Math.round(Math.min(1,Math.max(0,g))*1e3)/1e3;return{height:d(s.height/r),width:d(s.width/f),x:d((s.x-u.x)/f),y:d((s.y-u.y)/r)}}function Z2(u,s){return{height:s.height*u.height,width:s.width*u.width,x:u.x+s.x*u.width,y:u.y+s.y*u.height}}function V2(u){const s=u.gap??8,{anchor:f,bounds:r,card:d}=u,g=f.y+f.height+s,b=f.y-s-d.height,C=g+d.height>r.height&&b>=0,w=C?b:g;let x=f.x;return x+d.width>r.width&&(x=r.width-d.width),{flipped:C,left:Math.max(0,x),top:Math.max(0,Math.min(w,Math.max(0,r.height-d.height)))}}function K2(u){return!Number.isFinite(u)||u<=0?256:Math.round(Math.min(256,Math.max(180,u-48)))}function $2(u){if(u.length===0)return null;const s=Math.min(...u.map(g=>g.x)),f=Math.min(...u.map(g=>g.y)),r=Math.max(...u.map(g=>g.x+g.width));return{height:Math.max(...u.map(g=>g.y+g.height))-f,width:r-s,x:s,y:f}}const J2=8;function F2(u){const s=new Set,f=[];for(const r of u){const d=`${r.tag}:${r.text}`;if(!s.has(d)&&(s.add(d),f.push(r),f.length===J2))break}return f}const qs=2,W2=4e3,M1=600,C1=80;function I2(u){const s=u.note.length>C1?`${u.note.slice(0,C1-1)}…`:u.note;return[`Annotation ${u.number}`,s===""?null:`: ${s}`,u.sent?". Sent with a change.":null,u.stale?". Its element has gone.":null].filter(f=>f!==null).join("")}function P2(u){const s=[u.stale?"This element has moved or gone since the annotation was left.":null,u.sent?"Already sent with a change that has not landed yet.":null].filter(f=>f!==null);return s.length===0?void 0:s.join(" ")}function pl(u){return"left"in u?{height:u.height,width:u.width,x:u.left,y:u.top}:u}function ep(u,s){return s.x>=u.x&&s.y>=u.y&&s.x<=u.x+u.width&&s.y<=u.y+u.height}function tp({notes:u,onExit:s,onForget:f,onKeep:r,onRevise:d,paneScale:g,scaling:b,sent:C,title:w}){const x=M.useRef(null),O=M.useRef(null),_=M.useRef(null),K=M.useRef(null),[G,R]=M.useState(null),[ne,oe]=M.useState(null),[Z,X]=M.useState(null),W=M.useRef(0),[ie,ue]=M.useState(null),[p,I]=M.useState(null),[fe,me]=M.useState([]),[ge,Me]=M.useState({height:92,width:256}),he=M.useCallback(()=>{const U=document.querySelector(`iframe[data-preview="${CSS.escape(w)}"]`);if(U===null)return null;let V=null;try{V=U.contentDocument}catch{return null}const J=V?.defaultView??null;if(V===null||J===null)return null;const le=U.getBoundingClientRect();return{doc:V,rect:le,scale:J.innerWidth>0?le.width/J.innerWidth:1,view:J}},[w]),qe=M.useCallback((U,V)=>{const J=he();return J===null?null:{x:(U-J.rect.left)/J.scale,y:(V-J.rect.top)/J.scale}},[he]),Ae=M.useCallback((U,V)=>{const J=U.doc.elementFromPoint(V.x,V.y);if(J===null)return null;const le=new Set;let Le=J,Ze=0;for(let ze=0;Le!==null&&ze<3&&Ze<M1;ze+=1){le.add(Le);const $e=U.doc.createTreeWalker(Le,NodeFilter.SHOW_ELEMENT);let nt=$e.nextNode();for(;nt!==null&&Ze<M1;)le.has(nt)||(le.add(nt),Ze+=1),nt=$e.nextNode();Le=Le.parentElement}const Ye=ze=>{const $e=ze.tagName.toLowerCase();return(Gs(ze.textContent)===""?0:4)+($e==="a"||$e==="button"||$e==="img"?3:0)+(/^h[1-6]$/.test($e)||$e==="p"||$e==="li"?2:0)},Ve=[...le].filter(ze=>{const $e=ze.tagName.toLowerCase();if(ze===U.doc.body||ze===U.doc.documentElement||$e==="head"||$e==="script"||$e==="style")return!1;const nt=pl(ze.getBoundingClientRect());if(nt.width<=0||nt.height<=0||!ep(nt,V))return!1;const ft=U.view.getComputedStyle(ze);return ft.display!=="none"&&ft.visibility!=="hidden"}).map(ze=>({box:pl(ze.getBoundingClientRect()),element:ze,weight:Ye(ze)}));return Ve.length===0?null:(Ve.sort((ze,$e)=>{const nt=ze.element.contains($e.element),ft=$e.element.contains(ze.element);if(nt!==ft)return nt?1:-1;const Mt=$e.weight-ze.weight;return Mt!==0?Mt:ze.box.width*ze.box.height-$e.box.width*$e.box.height}),Ve[0]??null)},[]),Be=M.useCallback((U,V)=>{let J=null;try{J=U.doc.querySelector(V.selector)}catch{}const le=pl(J===null?V.rect:J.getBoundingClientRect()),Le=V.spot??{x:.5,y:.5},Ze=V.region?Z2(le,V.region):null;return{about:Ze??le,box:Ze??{height:0,width:0,x:le.x+Le.x*le.width,y:le.y+Le.y*le.height},stale:J===null}},[]),D=M.useCallback(()=>{const U=he();return U===null?[]:u.map((V,J)=>{const le=Be(U,V.anchor);return{anchor:V.anchor,box:le.box,id:V.id,note:V.note,number:J+1,region:V.anchor.region?le.about:null,sent:C.has(V.id),stale:le.stale}})},[Be,he,u,C]),Q=M.useCallback(()=>me(D()),[D]),te=M.useCallback(()=>{const U=_.current,V=he();U===null||V===null||Z!==null||R(Ae(V,U)?.box??null)},[Ae,he,Z]);M.useEffect(()=>{Q();const U=he(),V=()=>{Q(),te()};return U?.view.addEventListener("scroll",V,{passive:!0}),U?.view.addEventListener("resize",V),window.addEventListener("resize",V),()=>{U?.view.removeEventListener("scroll",V),U?.view.removeEventListener("resize",V),window.removeEventListener("resize",V)}},[he,Q,te]),M.useEffect(()=>{const U=x.current;if(U===null)return;const V=J=>{const le=he();le!==null&&(J.preventDefault(),le.view.scrollBy({behavior:"auto",left:J.deltaX,top:J.deltaY}))};return U.addEventListener("wheel",V,{passive:!1}),()=>U.removeEventListener("wheel",V)},[he]),M.useEffect(()=>{const U=le=>{if(le.key==="Escape"){if(Z!==null){X(null);return}s()}},V=[window],J=he();J!==null&&V.push(J.doc);for(const le of V)le.addEventListener("keydown",U);return()=>{for(const le of V)le.removeEventListener("keydown",U)}},[he,s,Z]),M.useEffect(()=>{Z===null||Z.kind!=="kept"||u.some(U=>U.id===Z.id)||X({anchor:Z.anchor,answered:!0,field:Z.field,kind:"new",note:Z.note})},[u,Z]),M.useEffect(()=>{const U=O.current;if(Z===null||U===null)return;const V=U.offsetHeight,J=U.offsetWidth;Me(le=>le.height===V&&le.width===J?le:{height:V,width:J})},[Z]);const xe=(U,V)=>{const J=[...U.doc.body.querySelectorAll("*")].slice(0,W2),le=J.filter(Ye=>{const Ve=pl(Ye.getBoundingClientRect());return Ve.width>0&&Ve.height>0&&X2(V,Ve)}),Le=le.filter(Ye=>!le.some(Ve=>Ve!==Ye&&Ye.contains(Ve))&&!w1(pl(Ye.getBoundingClientRect()),V)&&(Gs(Ye.textContent)!==""||["a","button","canvas","img","input","svg","video"].includes(Ye.tagName.toLowerCase())));let Ze=U.doc.body;for(const Ye of J){const Ve=pl(Ye.getBoundingClientRect());w1(Ve,V)&&Ze.contains(Ye)&&(Ze=Ye)}return{bounds:$2(Le.map(Ye=>pl(Ye.getBoundingClientRect())))??V,covers:F2(Le.map(Ye=>({tag:Ye.tagName.toLowerCase(),text:Gs(Ye.textContent)}))),holder:Ze}},Ce=(U,V)=>{const J=he();if(J===null)return;if(V!==null&&S1(V,U)){const Le=E1(V,U),{bounds:Ze,covers:Ye,holder:Ve}=xe(J,Le),ze=pl(Ve.getBoundingClientRect());X({anchor:{...b1(Ve,ze,J.view.innerWidth,{x:Ze.x+Ze.width/2,y:Ze.y+Ze.height/2}),covers:Ye,region:Q2(ze,Ze)},field:String(W.current+=1),kind:"new",note:""}),I(null);return}const le=Ae(J,U);le!==null&&(X({anchor:b1(le.element,le.box,J.view.innerWidth,U),field:String(W.current+=1),kind:"new",note:""}),I(null))},v=b&&g>0?1/g:1,L=he(),F={height:L?.view.innerHeight??0,width:L?.view.innerWidth??0},ee=K2(F.width),ce=Z===null||L===null?null:Be(L,Z.anchor),ve=ce===null?null:V2({anchor:ce.about,bounds:F,card:{height:ge.height*v,width:ee*v}});return o.jsxs("div",{className:`absolute inset-0 z-20 ${Z===null?"cursor-crosshair":"cursor-default"}`,onPointerDown:U=>{if(Z!==null)return;const V=qe(U.clientX,U.clientY),J=he();if(!(V===null||J===null)){try{U.currentTarget.setPointerCapture(U.pointerId)}catch{}K.current={from:V,scroll:{x:J.view.scrollX,y:J.view.scrollY}}}},onPointerLeave:()=>{_.current=null,K.current===null&&R(null)},onPointerMove:U=>{if(Z!==null)return;const V=qe(U.clientX,U.clientY),J=he();if(V===null||J===null)return;_.current=V;const le=K.current;if(le!==null){const Le={x:le.from.x+le.scroll.x-J.view.scrollX,y:le.from.y+le.scroll.y-J.view.scrollY};oe(S1(Le,V)?E1(Le,V):null),R(null);return}R(Ae(J,V)?.box??null)},onPointerUp:U=>{const V=K.current;if(K.current=null,oe(null),Z!==null)return;const J=qe(U.clientX,U.clientY),le=he();if(J===null||le===null)return;const Le=V===null?null:{x:V.from.x+V.scroll.x-le.view.scrollX,y:V.from.y+V.scroll.y-le.view.scrollY};R(null),Ce(J,Le)},ref:x,children:[G!==null&&Z===null&&ne===null?o.jsx("div",{className:"pointer-events-none absolute bg-[#7C9CFF]/10 outline outline-2 outline-[#7C9CFF]",style:{height:G.height,left:G.x,top:G.y,width:G.width}}):null,ne!==null?o.jsx("div",{className:"pointer-events-none absolute rounded-sm border-2 border-dashed border-[#7C9CFF] bg-[#7C9CFF]/10",style:{height:ne.height,left:ne.x,top:ne.y,width:ne.width}}):null,fe.map(U=>o.jsxs("div",{children:[U.region===null?null:o.jsx("div",{className:`pointer-events-none absolute rounded-sm border-2 border-dashed ${U.stale?"border-amber-500/70 bg-amber-500/5":"border-[#7C9CFF]/70 bg-[#7C9CFF]/5"}`,style:{height:U.region.height+qs*2,left:U.region.x-qs,top:U.region.y-qs,width:U.region.width+qs*2}}),o.jsxs("button",{"aria-label":I2(U),className:"group/pin absolute size-5 cursor-pointer",onClick:V=>{V.stopPropagation(),X({anchor:U.anchor,field:String(W.current+=1),id:U.id,kind:"kept",note:U.note}),I(null)},onPointerDown:V=>V.stopPropagation(),onPointerMove:V=>V.stopPropagation(),onPointerUp:V=>V.stopPropagation(),style:{left:U.box.x,top:U.box.y,transform:`translate(-50%, -50%) scale(${v})`,transformOrigin:"center"},type:"button",children:[o.jsx("span",{"aria-hidden":!0,className:"absolute -inset-1.5"}),o.jsx("span",{className:`flex size-5 shrink-0 items-center justify-center rounded-full text-[10px] font-semibold text-white shadow-lg outline-offset-2 group-focus-visible/pin:outline group-focus-visible/pin:outline-2 group-focus-visible/pin:outline-white ${U.stale?"bg-amber-500":"bg-[#7C9CFF]"} ${U.sent?"ring-2 ring-white/80":""}`,title:P2(U),children:U.number}),o.jsx("span",{className:"pointer-events-none absolute left-full top-1/2 ml-1 w-max max-w-56 -translate-y-1/2 truncate rounded-md border border-white/10 bg-[#171717] px-1.5 py-1 text-left text-[11px] leading-snug text-white opacity-0 shadow-lg transition-opacity group-focus-visible/pin:opacity-100 group-hover/pin:opacity-100",children:U.note||"No words"})]})]},U.id)),Z!==null&&ce!==null&&ve!==null?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"pointer-events-none absolute bg-[#7C9CFF]/10 outline outline-2 outline-[#7C9CFF]",style:{height:ce.about.height,left:ce.about.x,top:ce.about.y,width:ce.about.width}}),o.jsxs("form",{className:"absolute z-30 rounded-lg border border-[#232328] bg-[#1E1E22] p-1.5 shadow-2xl",onClick:U=>U.stopPropagation(),onPointerDown:U=>U.stopPropagation(),onSubmit:U=>{U.preventDefault();const V=Z.field;if(ie===V)return;const J=U.currentTarget.elements.namedItem("note"),le=J instanceof HTMLInputElement?J.value.trim():"";ue(V),I(Le=>Le===V?null:Le),(Z.kind==="new"?r(Z.anchor,le):d(Z.id,le)).then(Le=>{ue(Ze=>Ze===V?null:Ze),Le?X(Ze=>Ze?.field===V?null:Ze):I(V)}).catch(()=>{ue(Le=>Le===V?null:Le),I(V)})},ref:O,style:{left:ve.left,top:ve.top,transform:`scale(${v})`,transformOrigin:ve.flipped?"bottom left":"top left",width:ee},children:[o.jsx("input",{autoFocus:!0,className:"w-full rounded border border-[#232328] bg-[#2E2E2E]/40 px-2 py-1 text-xs text-white placeholder:text-[#84848C] focus:border-[#D1D5DB]/40 focus:outline-none",defaultValue:Z.note,onInput:p===Z.field?()=>I(null):void 0,name:"note",placeholder:Z.kind==="kept"?"What is wrong with it?":Z.anchor.region?"What is wrong with this area?":`What is wrong with this ${Z.anchor.tag}?`},Z.field),Z.kind==="kept"?o.jsxs(o.Fragment,{children:[C.has(Z.id)?o.jsx("p",{className:"px-1 pt-1 text-[10px] leading-snug text-[#B7A57A]",children:"Already sent. New words go with the next change."}):null,ce.stale?o.jsx("p",{className:"px-1 pt-1 text-[10px] leading-snug text-amber-500/90",children:"Its element has gone. The outline is where it was."}):null,p===Z.field?o.jsx("p",{className:"px-1 pt-1 text-[10px] leading-snug text-[#F87171]",children:"Those words were not saved. Enter tries again."}):null,o.jsxs("div",{className:"flex items-center justify-between gap-3 px-1 pt-1 text-[10px] leading-snug text-[#84848C]",children:[o.jsx("button",{className:"rounded transition-colors hover:text-[#F87171]",onClick:()=>{f(Z.id),X(null)},type:"button",children:"Forget it"}),o.jsx("span",{children:"Enter saves · Esc drops"})]})]}):o.jsxs(o.Fragment,{children:[Z.answered?o.jsx("p",{className:"px-1 pt-1 text-[10px] leading-snug text-[#B7A57A]",children:"That change has landed. Enter leaves these words as a new note."}):null,p===Z.field?o.jsx("p",{className:"px-1 pt-1 text-[10px] leading-snug text-[#F87171]",children:"Those words were not saved. Enter tries again."}):null,o.jsx("p",{className:"px-1 pt-1 text-[10px] leading-snug text-[#84848C]",children:Z.anchor.covers&&Z.anchor.covers.length>0?`${Z.anchor.covers.length} ${Z.anchor.covers.length===1?"element":"elements"} · Enter keeps it · Esc drops it`:"Enter keeps it · Esc drops it"})]})]})]}):null]})}const K1=["image/png","image/jpeg","image/webp","image/gif"],Sr=4,np=1e7;function lp(u){return K1.includes(u.type)}function ap(u,s){const f=[],r=[];let d=Math.max(0,Sr-u.length);for(const g of s){if(!lp(g)){r.push({file:g,why:"not-an-image"});continue}if(g.size>np){r.push({file:g,why:"too-big"});continue}if(d===0){r.push({file:g,why:"too-many"});continue}d-=1,f.push(g)}return{accepted:f,refused:r}}function ip(u){const s=u[0];if(s===void 0)return null;const f=u.length>1;switch(s.why){case"too-many":return`Up to ${Sr} images can ride with a change. ${f?`${u.length} were`:"One was"} left off.`;case"too-big":return`${f?"Some images are":"That image is"} over 10MB, which is more than an agent needs. Left off.`;case"not-an-image":return f?"Only PNG, JPEG, WebP and GIF images can be attached.":`${Er(s.file.name)} is not an image Leglas can attach. PNG, JPEG, WebP or GIF.`}}function Er(u){const s=u.replace(/\s+/g," ").trim();return s===""?"image":s}function up(u){const s=Er(u).replace(/[^\x20-\x7E]/g,"").trim();return(s===""?"image":s).slice(0,80)}function sp(u){if(u<1024)return`${u} B`;const s=u/1024;if(s<1024)return`${Math.round(s)} KB`;const f=s/1024;return`${f<10?f.toFixed(1):Math.round(f)} MB`}function cp(u){return u.flatMap(s=>s.status==="ready"&&s.id!==null?[s.id]:[])}function op(u){return u.some(s=>s.status==="failed")?"failed":u.some(s=>s.status==="uploading")?"uploading":null}function Ys(u){return u===void 0?!1:Array.from(u).includes("Files")}function rp({drafts:u,onRemove:s,onRetry:f}){return u.length===0?null:o.jsx("ul",{"aria-label":"Images attached to this change",className:"flex flex-wrap gap-1.5 px-2 pt-2",children:u.map(r=>{const d=r.status==="failed";return o.jsxs("li",{className:"leglas-reference group/reference relative",children:[o.jsx(Nt,{label:d?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"block",children:"Did not upload"}),o.jsx("span",{className:"block text-[#9CA3AF]",children:"Click to try again"})]}):`${r.name} · ${sp(r.bytes)}`,children:d?o.jsx("button",{"aria-label":`${r.name} did not upload. Try again`,className:"block rounded transition-transform duration-150 focus-visible:outline-2 focus-visible:outline-offset-2 active:scale-[0.96] motion-reduce:transition-none",onClick:()=>f(r.key),type:"button",children:o.jsx(j1,{draft:r,failed:!0})}):o.jsx(j1,{draft:r,failed:!1})}),r.status==="uploading"?o.jsx("span",{"aria-label":"Uploading",className:"absolute bottom-1 right-1 size-3 animate-spin rounded-full border-[1.5px] border-white/30 border-t-white motion-reduce:animate-none",role:"status"}):d?o.jsx("span",{"aria-hidden":"true",className:"absolute bottom-1 right-1 flex size-3 items-center justify-center rounded-full bg-amber-400 text-[9px] font-semibold leading-none text-[#1C1C20]",children:"!"}):null,o.jsx("button",{"aria-label":`Remove ${r.name}`,className:"absolute -right-1.5 -top-1.5 flex size-4 items-center justify-center rounded-full bg-[#1E1E22] text-[#D1D5DB] opacity-0 shadow-[0_0_0_1px_rgba(255,255,255,0.12)] transition-[opacity,color,transform] duration-150 hover:text-white focus-visible:opacity-100 active:scale-[0.96] group-hover/reference:opacity-100 motion-reduce:transition-none",onClick:()=>s(r.key),type:"button",children:o.jsx("svg",{"aria-hidden":!0,fill:"none",height:"8",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.75",viewBox:"0 0 16 16",width:"8",children:o.jsx("path",{d:"m4 4 8 8M12 4l-8 8"})})})]},r.key)})})}function j1({draft:u,failed:s}){return o.jsx("img",{alt:u.name,className:`block h-10 w-auto min-w-10 max-w-28 rounded object-cover ${s?"opacity-70 shadow-[0_0_0_1px_rgba(251,191,36,0.8)]":"shadow-[0_0_0_1px_rgba(255,255,255,0.1)]"}`,draggable:!1,src:u.url})}const fp=(u,s)=>fetch(u,s);async function dp(u,s=fp){const f=await s("/leglas/api/references",{body:u,headers:{"content-type":u.type,"x-leglas-filename":up(u.name??"")},method:"POST"});if(!f.ok)throw new Error("Leglas refused the image.");const r=await f.json(),d=r.reference?.id,g=r.reference?.file;if(r.ok!==!0||typeof d!="string"||typeof g!="string")throw new Error("Leglas refused the image.");return{id:d,file:g}}const Qs=(u,s)=>fetch(u,s);async function hp(u=Qs){const s=await u("/leglas/api/annotations");if(!s.ok)throw new Error("Leglas refused the notes.");return(await s.json()).annotations??[]}async function wr(u,s,f){const r=await f(u,{body:JSON.stringify(s),headers:{"content-type":"application/json"},method:"POST"});if(!r.ok)throw new Error("Leglas refused the note.");const d=await r.json();if(d.ok!==!0)throw new Error("Leglas refused the note.");return d}function mp(u,s,f,r=Qs){return wr("/leglas/api/annotations",{anchor:f,note:s,title:u},r)}function gp(u,s,f=Qs){return wr("/leglas/api/annotations/update",{id:u,note:s},f)}function pp(u,s=Qs){return wr("/leglas/api/annotations/delete",{ids:u},s)}function yp(u){return[...new Set(u.filter(s=>s.mode!=="variant"&&(s.status==="queued"||s.status==="picked-up"||s.status==="running")).map(s=>s.title))]}function vp(u){return new Set(u.filter(s=>s.status==="queued"||s.status==="picked-up"||s.status==="running").flatMap(s=>s.notes??[]))}function bp(u){return new Set(u.filter(s=>s.status==="picked-up"||s.status==="running").map(s=>s.title))}function xp(u,s,f=null){if(u==="custom"){const d=f?.trim().split(/\s+/)[0]??"";return{kind:"chosen",id:"custom",name:d===""?"Custom":d.split("/").pop()??"Custom"}}const r=u===null?void 0:s.find(d=>d.id===u);return r?.available?{kind:"chosen",id:r.id,name:r.name}:s.some(d=>d.available)?{kind:"choose"}:{kind:"none"}}function Sp(u){const s=u.max===null?`retry ${u.attempt}`:`retry ${u.attempt} of ${u.max}`,f=u.status,r=u.reason??"";return f===429||r.includes("rate")?`provider is rate limiting · ${s}`:f===401||f===403||r.includes("auth")?`provider refused the login · ${s}`:f===529||f===503||r.includes("overload")?`provider is overloaded · ${s}`:`provider returned an error · ${s}`}function Ep(u){const s=Math.max(0,Math.floor(u/1e3));return s<60?`${s}s`:`${Math.floor(s/60)}m ${String(s%60).padStart(2,"0")}s`}function wp(u,s,f){const r=u.find(b=>b.status==="running");if(s.running||r!==void 0)return{kind:"running",id:r?.id??null,name:s.name??"Your agent",activity:s.activity,startedAt:s.startedAt,title:r?.title??null,stopping:s.stopping===!0,waiting:s.stopping===!0?null:s.waiting??null};const d=u.filter(b=>b.status==="queued").length;if(d>0)return{kind:"queued",count:d,attended:f};if(u.some(b=>b.status==="picked-up"))return{kind:"picked-up"};const g=u.findLast(b=>b.status==="failed"||b.status==="cancelled");return g===void 0?null:g.status==="cancelled"?{kind:"stopped",id:g.id,title:g.title}:{kind:"failed",id:g.id,title:g.title,reason:g.failure?.message??null}}const Ta=(u,s)=>fetch(u,s),Mp=5e3,Cp=1e4;async function $1(u,s,f,r){const d=new AbortController,g=setTimeout(()=>d.abort(),f);try{return await r(u,{...s,signal:d.signal})}finally{clearTimeout(g)}}async function A1(u=!1,s=Ta){const f=await $1(`/leglas/api/agents${u?"?refresh=1":""}`,void 0,Mp,s);if(!f.ok)throw new Error("Leglas refused the agent request.");return f.json()}async function Ci(u,s,f){const r=await $1(u,{method:"POST",...s===null?{}:{headers:{"content-type":"application/json"},body:JSON.stringify(s)}},Cp,f);if(!r.ok)throw new Error("Leglas refused the agent request.");if((await r.json()).ok!==!0)throw new Error("Leglas refused the agent request.")}function jp(u,s,f=Ta){return Ci("/leglas/api/agent",{agent:u},f)}function Ap(u,s,f=Ta){return Ci("/leglas/api/agent",{agent:u,effort:s},f)}function Np(u=Ta){return Ci("/leglas/api/agents/warm",null,u)}function Tp(u,s=Ta){return Ci("/leglas/api/requests/cancel",u==null?null:{id:u},s)}function Dp(u,s=Ta){return Ci("/leglas/api/requests/retry",{id:u},s)}function zp(u,s=Ta){return Ci("/leglas/api/requests/dismiss",{id:u},s)}const or={claude:{codeLabel:"Terminal command",copyLabel:"Copy Claude Code command",description:"Add Leglas with one terminal command.",label:"Claude Code",nextStep:"Run this command from your project, then ask Claude to list your Leglas directions.",snippet:"claude mcp add leglas -- npx -y leglas-mcp"},other:{codeLabel:"MCP configuration",copyLabel:"Copy MCP configuration",description:"Use standard MCP JSON with another coding agent.",label:"Codex, Cursor & others",nextStep:"Add this configuration in your client's MCP settings, restart the client, then ask it to list your Leglas directions.",snippet:`{
|
|
8
|
+
`+l.stack}}var Mt=Object.prototype.hasOwnProperty,Wt=u.unstable_scheduleCallback,Yn=u.unstable_cancelCallback,yl=u.unstable_shouldYield,Wl=u.unstable_requestPaint,yt=u.unstable_now,Il=u.unstable_getCurrentPriorityLevel,Pl=u.unstable_ImmediatePriority,ea=u.unstable_UserBlockingPriority,vl=u.unstable_NormalPriority,Da=u.unstable_LowPriority,Gn=u.unstable_IdlePriority,Xn=u.log,Ct=u.unstable_setDisableYieldValue,It=null,Tt=null;function Zt(e){if(typeof Xn=="function"&&Ct(e),Tt&&typeof Tt.setStrictMode=="function")try{Tt.setStrictMode(It,e)}catch{}}var ct=Math.clz32?Math.clz32:ji,ta=Math.log,bl=Math.LN2;function ji(e){return e>>>=0,e===0?32:31-(ta(e)/bl|0)|0}var Vt=256,B=262144,P=4194304;function be(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 Se(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var a=0,i=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var m=l&134217727;return m!==0?(l=m&~i,l!==0?a=be(l):(c&=m,c!==0?a=be(c):n||(n=m&~e,n!==0&&(a=be(n))))):(m=l&~i,m!==0?a=be(m):c!==0?a=be(c):n||(n=l&~e,n!==0&&(a=be(n)))),a===0?0:t!==0&&t!==a&&(t&i)===0&&(i=a&-a,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:a}function we(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function st(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 We(){var e=P;return P<<=1,(P&62914560)===0&&(P=4194304),e}function dt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Kt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Mu(e,t,n,l,a,i){var c=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var m=e.entanglements,y=e.expirationTimes,N=e.hiddenUpdates;for(n=c&~n;0<n;){var H=31-ct(n),X=1<<H;m[H]=0,y[H]=-1;var T=N[H];if(T!==null)for(N[H]=null,H=0;H<T.length;H++){var z=T[H];z!==null&&(z.lane&=-536870913)}n&=~X}l!==0&&Ot(e,l,0),i!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=i&~(c&~t))}function Ot(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-ct(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function xl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-ct(n),a=1<<l;a&t|e[l]&t&&(e[l]|=t),n&=~a}}function qt(e,t){var n=t&-t;return n=(n&42)!==0?1:Sl(n),(n&(e.suspendedLanes|t))!==0?0:n}function Sl(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 na(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Qn(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:Z0(e.type))}function la(e,t){var n=Z.p;try{return Z.p=e,t()}finally{Z.p=n}}var $t=Math.random().toString(36).slice(2),vt="__reactFiber$"+$t,Rt="__reactProps$"+$t,Zn="__reactContainer$"+$t,za="__reactEvents$"+$t,aa="__reactListeners$"+$t,Cu="__reactHandles$"+$t,ju="__reactResources$"+$t,ia="__reactMarker$"+$t;function Ai(e){delete e[vt],delete e[Rt],delete e[za],delete e[aa],delete e[Cu]}function Vn(e){var t=e[vt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Zn]||n[vt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=T0(e);e!==null;){if(n=e[vt])return n;e=T0(e)}return t}e=n,n=e.parentNode}return null}function El(e){if(e=e[vt]||e[Zn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Kn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Yt(e){var t=e[ju];return t||(t=e[ju]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ht(e){e[ia]=!0}var Au=new Set,Nu={};function Dt(e,t){$n(e,t),$n(e+"Capture",t)}function $n(e,t){for(Nu[e]=t,e=0;e<t.length;e++)Au.add(t[e])}var wl=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]*$"),Tu={},gn={};function Zs(e){return Mt.call(gn,e)?!0:Mt.call(Tu,e)?!1:wl.test(e)?gn[e]=!0:(Tu[e]=!0,!1)}function Oa(e,t,n){if(Zs(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){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,""+n)}}function Ra(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function _t(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+l)}}function Gt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Pt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _a(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var a=l.get,i=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(c){n=""+c,i.call(this,c)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(c){n=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function La(e){if(!e._valueTracker){var t=Pt(e)?"checked":"value";e._valueTracker=_a(e,t,""+e[t])}}function Ua(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=Pt(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function ka(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 Jn=/[\n"\\]/g;function Ge(e){return e.replace(Jn,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ba(e,t,n,l,a,i,c,m){e.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.type=c:e.removeAttribute("type"),t!=null?c==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Gt(t)):e.value!==""+Gt(t)&&(e.value=""+Gt(t)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),t!=null?An(e,c,Gt(t)):n!=null?An(e,c,Gt(n)):l!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+Gt(m):e.removeAttribute("name")}function Ha(e,t,n,l,a,i,c,m){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){La(e);return}n=n!=null?""+Gt(n):"",t=t!=null?""+Gt(t):n,m||t===e.value||(e.value=t),e.defaultValue=t}l=l??a,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=m?e.checked:!!l,e.defaultChecked=!!l,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.name=c),La(e)}function An(e,t,n){t==="number"&&ka(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Ln(e,t,n,l){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&l&&(e[n].defaultSelected=!0)}else{for(n=""+Gt(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,l&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function Lt(e,t,n){if(t!=null&&(t=""+Gt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Gt(n):""}function qa(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(r(92));if(Be(l)){if(1<l.length)throw Error(r(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=Gt(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),La(e)}function Ml(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var je=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 Du(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||je.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Ni(e,t,n){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var a in t)l=t[a],t.hasOwnProperty(a)&&n[a]!==l&&Du(e,a,l)}else for(var i in t)t.hasOwnProperty(i)&&Du(e,i,t[i])}function Cl(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 Vs=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"]]),zu=/^[\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 Ya(e){return zu.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Nn(){}var Ti=null;function Di(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var jl=null,Fn=null;function Ga(e){var t=El(e);if(t&&(e=t.stateNode)){var n=e[Rt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ba(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Ge(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var a=l[Rt]||null;if(!a)throw Error(r(90));Ba(l,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&Ua(l)}break e;case"textarea":Lt(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Ln(e,!!n.multiple,t,!1)}}}var zi=!1;function Ou(e,t,n){if(zi)return e(t,n);zi=!0;try{var l=e(t);return l}finally{if(zi=!1,(jl!==null||Fn!==null)&&(ps(),jl&&(t=jl,e=Fn,Fn=jl=null,Ga(t),e)))for(t=0;t<e.length;t++)Ga(e[t])}}function Wn(e,t){var n=e.stateNode;if(n===null)return null;var l=n[Rt]||null;if(l===null)return null;n=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(n&&typeof n!="function")throw Error(r(231,t,typeof n));return n}var Tn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xa=!1;if(Tn)try{var Dn={};Object.defineProperty(Dn,"passive",{get:function(){Xa=!0}}),window.addEventListener("test",Dn,Dn),window.removeEventListener("test",Dn,Dn)}catch{Xa=!1}var Un=null,Oi=null,ua=null;function sa(){if(ua)return ua;var e,t=Oi,n=t.length,l,a="value"in Un?Un.value:Un.textContent,i=a.length;for(e=0;e<n&&t[e]===a[e];e++);var c=n-e;for(l=1;l<=c&&t[n-l]===a[i-l];l++);return ua=a.slice(e,1<l?1-l:void 0)}function ca(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 Qa(){return!0}function In(){return!1}function Xt(e){function t(n,l,a,i,c){this._reactName=n,this._targetInst=a,this.type=l,this.nativeEvent=i,this.target=c,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(n=e[m],this[m]=n?n(i):i[m]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Qa:In,this.isPropagationStopped=In,this}return _(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Qa)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Qa)},persist:function(){},isPersistent:Qa}),t}var Pn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Za=Xt(Pn),oa=_({},Pn,{view:0,detail:0}),Ks=Xt(oa),Va,Ri,zn,en=_({},oa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ki,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!==zn&&(zn&&e.type==="mousemove"?(Va=e.screenX-zn.screenX,Ri=e.screenY-zn.screenY):Ri=Va=0,zn=e),Va)},movementY:function(e){return"movementY"in e?e.movementY:Ri}}),Ru=Xt(en),Ka=_({},en,{dataTransfer:0}),_i=Xt(Ka),Li=_({},oa,{relatedTarget:0}),$a=Xt(Li),_u=_({},Pn,{animationName:0,elapsedTime:0,pseudoElement:0}),$s=Xt(_u),Js=_({},Pn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Fs=Xt(Js),Ws=_({},Pn,{data:0}),Ui=Xt(Ws),Is={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ps={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"},ec={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tc(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ec[e])?!!t[e]:!1}function ki(){return tc}var h=_({},oa,{key:function(e){if(e.key){var t=Is[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ca(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ps[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ki,charCode:function(e){return e.type==="keypress"?ca(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ca(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),j=Xt(h),Y=_({},en,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$=Xt(Y),ae=_({},oa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ki}),re=Xt(ae),pe=_({},Pn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Oe=Xt(pe),Jt=_({},en,{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}),jt=Xt(Jt),sn=_({},Pn,{newState:0,oldState:0}),bt=Xt(sn),el=[9,13,27,32],it=Tn&&"CompositionEvent"in window,ra=null;Tn&&"documentMode"in document&&(ra=document.documentMode);var th=Tn&&"TextEvent"in window&&!ra,jr=Tn&&(!it||ra&&8<ra&&11>=ra),Ar=" ",Nr=!1;function Tr(e,t){switch(e){case"keyup":return el.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dr(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ja=!1;function nh(e,t){switch(e){case"compositionend":return Dr(t);case"keypress":return t.which!==32?null:(Nr=!0,Ar);case"textInput":return e=t.data,e===Ar&&Nr?null:e;default:return null}}function lh(e,t){if(Ja)return e==="compositionend"||!it&&Tr(e,t)?(e=sa(),ua=Oi=Un=null,Ja=!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 jr&&t.locale!=="ko"?null:t.data;default:return null}}var ah={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 zr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ah[e.type]:t==="textarea"}function Or(e,t,n,l){jl?Fn?Fn.push(l):Fn=[l]:jl=l,t=ws(t,"onChange"),0<t.length&&(n=new Za("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var Bi=null,Hi=null;function ih(e){g0(e,0)}function Lu(e){var t=Kn(e);if(Ua(t))return e}function Rr(e,t){if(e==="change")return t}var _r=!1;if(Tn){var nc;if(Tn){var lc="oninput"in document;if(!lc){var Lr=document.createElement("div");Lr.setAttribute("oninput","return;"),lc=typeof Lr.oninput=="function"}nc=lc}else nc=!1;_r=nc&&(!document.documentMode||9<document.documentMode)}function Ur(){Bi&&(Bi.detachEvent("onpropertychange",kr),Hi=Bi=null)}function kr(e){if(e.propertyName==="value"&&Lu(Hi)){var t=[];Or(t,Hi,e,Di(e)),Ou(ih,t)}}function uh(e,t,n){e==="focusin"?(Ur(),Bi=t,Hi=n,Bi.attachEvent("onpropertychange",kr)):e==="focusout"&&Ur()}function sh(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Lu(Hi)}function ch(e,t){if(e==="click")return Lu(t)}function oh(e,t){if(e==="input"||e==="change")return Lu(t)}function rh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var cn=typeof Object.is=="function"?Object.is:rh;function qi(e,t){if(cn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var a=n[l];if(!Mt.call(t,a)||!cn(e[a],t[a]))return!1}return!0}function Br(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Hr(e,t){var n=Br(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Br(n)}}function qr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qr(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Yr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ka(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ka(e.document)}return t}function ac(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 fh=Tn&&"documentMode"in document&&11>=document.documentMode,Fa=null,ic=null,Yi=null,uc=!1;function Gr(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;uc||Fa==null||Fa!==ka(l)||(l=Fa,"selectionStart"in l&&ac(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}),Yi&&qi(Yi,l)||(Yi=l,l=ws(ic,"onSelect"),0<l.length&&(t=new Za("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=Fa)))}function fa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Wa={animationend:fa("Animation","AnimationEnd"),animationiteration:fa("Animation","AnimationIteration"),animationstart:fa("Animation","AnimationStart"),transitionrun:fa("Transition","TransitionRun"),transitionstart:fa("Transition","TransitionStart"),transitioncancel:fa("Transition","TransitionCancel"),transitionend:fa("Transition","TransitionEnd")},sc={},Xr={};Tn&&(Xr=document.createElement("div").style,"AnimationEvent"in window||(delete Wa.animationend.animation,delete Wa.animationiteration.animation,delete Wa.animationstart.animation),"TransitionEvent"in window||delete Wa.transitionend.transition);function da(e){if(sc[e])return sc[e];if(!Wa[e])return e;var t=Wa[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Xr)return sc[e]=t[n];return e}var Qr=da("animationend"),Zr=da("animationiteration"),Vr=da("animationstart"),dh=da("transitionrun"),hh=da("transitionstart"),mh=da("transitioncancel"),Kr=da("transitionend"),$r=new Map,cc="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(" ");cc.push("scrollEnd");function On(e,t){$r.set(e,t),Dt(t,[e])}var Uu=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)},pn=[],Ia=0,oc=0;function ku(){for(var e=Ia,t=oc=Ia=0;t<e;){var n=pn[t];pn[t++]=null;var l=pn[t];pn[t++]=null;var a=pn[t];pn[t++]=null;var i=pn[t];if(pn[t++]=null,l!==null&&a!==null){var c=l.pending;c===null?a.next=a:(a.next=c.next,c.next=a),l.pending=a}i!==0&&Jr(n,a,i)}}function Bu(e,t,n,l){pn[Ia++]=e,pn[Ia++]=t,pn[Ia++]=n,pn[Ia++]=l,oc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function rc(e,t,n,l){return Bu(e,t,n,l),Hu(e)}function ha(e,t){return Bu(e,null,null,t),Hu(e)}function Jr(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var a=!1,i=e.return;i!==null;)i.childLanes|=n,l=i.alternate,l!==null&&(l.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(a=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,a&&t!==null&&(a=31-ct(n),e=i.hiddenUpdates,l=e[a],l===null?e[a]=[t]:l.push(t),t.lane=n|536870912),i):null}function Hu(e){if(50<ou)throw ou=0,xo=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Pa={};function gh(e,t,n,l){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function on(e,t,n,l){return new gh(e,t,n,l)}function fc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function tl(e,t){var n=e.alternate;return n===null?(n=on(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Fr(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function qu(e,t,n,l,a,i){var c=0;if(l=e,typeof e=="function")fc(e)&&(c=1);else if(typeof e=="string")c=xm(e,n,te.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case me:return e=on(31,n,t,a),e.elementType=me,e.lanes=i,e;case ee:return ma(n.children,a,i,t);case se:c=8,a|=24;break;case V:return e=on(12,n,t,a|2),e.elementType=V,e.lanes=i,e;case ue:return e=on(13,n,t,a),e.elementType=ue,e.lanes=i,e;case p:return e=on(19,n,t,a),e.elementType=p,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case W:c=10;break e;case Q:c=9;break e;case ie:c=11;break e;case I:c=14;break e;case fe:c=16,l=null;break e}c=29,n=Error(r(130,e===null?"null":typeof e,"")),l=null}return t=on(c,n,t,a),t.elementType=e,t.type=l,t.lanes=i,t}function ma(e,t,n,l){return e=on(7,e,l,t),e.lanes=n,e}function dc(e,t,n){return e=on(6,e,null,t),e.lanes=n,e}function Wr(e){var t=on(18,null,null,0);return t.stateNode=e,t}function hc(e,t,n){return t=on(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ir=new WeakMap;function yn(e,t){if(typeof e=="object"&&e!==null){var n=Ir.get(e);return n!==void 0?n:(t={value:e,source:t,stack:ft(t)},Ir.set(e,t),t)}return{value:e,source:t,stack:ft(t)}}var ei=[],ti=0,Yu=null,Gi=0,vn=[],bn=0,Al=null,kn=1,Bn="";function nl(e,t){ei[ti++]=Gi,ei[ti++]=Yu,Yu=e,Gi=t}function Pr(e,t,n){vn[bn++]=kn,vn[bn++]=Bn,vn[bn++]=Al,Al=e;var l=kn;e=Bn;var a=32-ct(l)-1;l&=~(1<<a),n+=1;var i=32-ct(t)+a;if(30<i){var c=a-a%5;i=(l&(1<<c)-1).toString(32),l>>=c,a-=c,kn=1<<32-ct(t)+a|n<<a|l,Bn=i+e}else kn=1<<i|n<<a|l,Bn=e}function mc(e){e.return!==null&&(nl(e,1),Pr(e,1,0))}function gc(e){for(;e===Yu;)Yu=ei[--ti],ei[ti]=null,Gi=ei[--ti],ei[ti]=null;for(;e===Al;)Al=vn[--bn],vn[bn]=null,Bn=vn[--bn],vn[bn]=null,kn=vn[--bn],vn[bn]=null}function ef(e,t){vn[bn++]=kn,vn[bn++]=Bn,vn[bn++]=Al,kn=t.id,Bn=t.overflow,Al=e}var Ut=null,lt=null,He=!1,Nl=null,xn=!1,pc=Error(r(519));function Tl(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Xi(yn(t,e)),pc}function tf(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[vt]=e,t[Rt]=l,n){case"dialog":_e("cancel",t),_e("close",t);break;case"iframe":case"object":case"embed":_e("load",t);break;case"video":case"audio":for(n=0;n<fu.length;n++)_e(fu[n],t);break;case"source":_e("error",t);break;case"img":case"image":case"link":_e("error",t),_e("load",t);break;case"details":_e("toggle",t);break;case"input":_e("invalid",t),Ha(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":_e("invalid",t);break;case"textarea":_e("invalid",t),qa(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||b0(t.textContent,n)?(l.popover!=null&&(_e("beforetoggle",t),_e("toggle",t)),l.onScroll!=null&&_e("scroll",t),l.onScrollEnd!=null&&_e("scrollend",t),l.onClick!=null&&(t.onclick=Nn),t=!0):t=!1,t||Tl(e,!0)}function nf(e){for(Ut=e.return;Ut;)switch(Ut.tag){case 5:case 31:case 13:xn=!1;return;case 27:case 3:xn=!0;return;default:Ut=Ut.return}}function ni(e){if(e!==Ut)return!1;if(!He)return nf(e),He=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Lo(e.type,e.memoizedProps)),n=!n),n&<&&Tl(e),nf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));lt=N0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));lt=N0(e)}else t===27?(t=lt,Xl(e.type)?(e=qo,qo=null,lt=e):lt=t):lt=Ut?En(e.stateNode.nextSibling):null;return!0}function ga(){lt=Ut=null,He=!1}function yc(){var e=Nl;return e!==null&&(an===null?an=e:an.push.apply(an,e),Nl=null),e}function Xi(e){Nl===null?Nl=[e]:Nl.push(e)}var vc=b(null),pa=null,ll=null;function Dl(e,t,n){F(vc,t._currentValue),t._currentValue=n}function al(e){e._currentValue=vc.current,L(vc)}function bc(e,t,n){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===n)break;e=e.return}}function xc(e,t,n,l){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var i=a.dependencies;if(i!==null){var c=a.child;i=i.firstContext;e:for(;i!==null;){var m=i;i=a;for(var y=0;y<t.length;y++)if(m.context===t[y]){i.lanes|=n,m=i.alternate,m!==null&&(m.lanes|=n),bc(i.return,n,e),l||(c=null);break e}i=m.next}}else if(a.tag===18){if(c=a.return,c===null)throw Error(r(341));c.lanes|=n,i=c.alternate,i!==null&&(i.lanes|=n),bc(c,n,e),c=null}else c=a.child;if(c!==null)c.return=a;else for(c=a;c!==null;){if(c===e){c=null;break}if(a=c.sibling,a!==null){a.return=c.return,c=a;break}c=c.return}a=c}}function li(e,t,n,l){e=null;for(var a=t,i=!1;a!==null;){if(!i){if((a.flags&524288)!==0)i=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var c=a.alternate;if(c===null)throw Error(r(387));if(c=c.memoizedProps,c!==null){var m=a.type;cn(a.pendingProps.value,c.value)||(e!==null?e.push(m):e=[m])}}else if(a===U.current){if(c=a.alternate,c===null)throw Error(r(387));c.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(pu):e=[pu])}a=a.return}e!==null&&xc(t,e,n,l),t.flags|=262144}function Gu(e){for(e=e.firstContext;e!==null;){if(!cn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ya(e){pa=e,ll=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function kt(e){return lf(pa,e)}function Xu(e,t){return pa===null&&ya(e),lf(e,t)}function lf(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ll===null){if(e===null)throw Error(r(308));ll=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ll=ll.next=t;return n}var ph=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},yh=u.unstable_scheduleCallback,vh=u.unstable_NormalPriority,xt={$$typeof:W,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sc(){return{controller:new ph,data:new Map,refCount:0}}function Qi(e){e.refCount--,e.refCount===0&&yh(vh,function(){e.controller.abort()})}var Zi=null,Ec=0,ai=0,ii=null;function bh(e,t){if(Zi===null){var n=Zi=[];Ec=0,ai=jo(),ii={status:"pending",value:void 0,then:function(l){n.push(l)}}}return Ec++,t.then(af,af),t}function af(){if(--Ec===0&&Zi!==null){ii!==null&&(ii.status="fulfilled");var e=Zi;Zi=null,ai=0,ii=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function xh(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(l.status="rejected",l.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),l}var uf=D.S;D.S=function(e,t){Xd=yt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&bh(e,t),uf!==null&&uf(e,t)};var va=b(null);function wc(){var e=va.current;return e!==null?e:tt.pooledCache}function Qu(e,t){t===null?F(va,va.current):F(va,t.pool)}function sf(){var e=wc();return e===null?null:{parent:xt._currentValue,pool:e}}var ui=Error(r(460)),Mc=Error(r(474)),Zu=Error(r(542)),Vu={then:function(){}};function cf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function of(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Nn,Nn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ff(e),e;default:if(typeof t.status=="string")t.then(Nn,Nn);else{if(e=tt,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=l}},function(l){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ff(e),e}throw xa=t,ui}}function ba(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(xa=n,ui):n}}var xa=null;function rf(){if(xa===null)throw Error(r(459));var e=xa;return xa=null,e}function ff(e){if(e===ui||e===Zu)throw Error(r(483))}var si=null,Vi=0;function Ku(e){var t=Vi;return Vi+=1,si===null&&(si=[]),of(si,e,t)}function Ki(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function $u(e,t){throw t.$$typeof===k?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function df(e){function t(w,S){if(e){var A=w.deletions;A===null?(w.deletions=[S],w.flags|=16):A.push(S)}}function n(w,S){if(!e)return null;for(;S!==null;)t(w,S),S=S.sibling;return null}function l(w){for(var S=new Map;w!==null;)w.key!==null?S.set(w.key,w):S.set(w.index,w),w=w.sibling;return S}function a(w,S){return w=tl(w,S),w.index=0,w.sibling=null,w}function i(w,S,A){return w.index=A,e?(A=w.alternate,A!==null?(A=A.index,A<S?(w.flags|=67108866,S):A):(w.flags|=67108866,S)):(w.flags|=1048576,S)}function c(w){return e&&w.alternate===null&&(w.flags|=67108866),w}function m(w,S,A,G){return S===null||S.tag!==6?(S=dc(A,w.mode,G),S.return=w,S):(S=a(S,A),S.return=w,S)}function y(w,S,A,G){var ye=A.type;return ye===ee?H(w,S,A.props.children,G,A.key):S!==null&&(S.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===fe&&ba(ye)===S.type)?(S=a(S,A.props),Ki(S,A),S.return=w,S):(S=qu(A.type,A.key,A.props,null,w.mode,G),Ki(S,A),S.return=w,S)}function N(w,S,A,G){return S===null||S.tag!==4||S.stateNode.containerInfo!==A.containerInfo||S.stateNode.implementation!==A.implementation?(S=hc(A,w.mode,G),S.return=w,S):(S=a(S,A.children||[]),S.return=w,S)}function H(w,S,A,G,ye){return S===null||S.tag!==7?(S=ma(A,w.mode,G,ye),S.return=w,S):(S=a(S,A),S.return=w,S)}function X(w,S,A){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=dc(""+S,w.mode,A),S.return=w,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case q:return A=qu(S.type,S.key,S.props,null,w.mode,A),Ki(A,S),A.return=w,A;case O:return S=hc(S,w.mode,A),S.return=w,S;case fe:return S=ba(S),X(w,S,A)}if(Be(S)||he(S))return S=ma(S,w.mode,A,null),S.return=w,S;if(typeof S.then=="function")return X(w,Ku(S),A);if(S.$$typeof===W)return X(w,Xu(w,S),A);$u(w,S)}return null}function T(w,S,A,G){var ye=S!==null?S.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return ye!==null?null:m(w,S,""+A,G);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case q:return A.key===ye?y(w,S,A,G):null;case O:return A.key===ye?N(w,S,A,G):null;case fe:return A=ba(A),T(w,S,A,G)}if(Be(A)||he(A))return ye!==null?null:H(w,S,A,G,null);if(typeof A.then=="function")return T(w,S,Ku(A),G);if(A.$$typeof===W)return T(w,S,Xu(w,A),G);$u(w,A)}return null}function z(w,S,A,G,ye){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return w=w.get(A)||null,m(S,w,""+G,ye);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case q:return w=w.get(G.key===null?A:G.key)||null,y(S,w,G,ye);case O:return w=w.get(G.key===null?A:G.key)||null,N(S,w,G,ye);case fe:return G=ba(G),z(w,S,A,G,ye)}if(Be(G)||he(G))return w=w.get(A)||null,H(S,w,G,ye,null);if(typeof G.then=="function")return z(w,S,A,Ku(G),ye);if(G.$$typeof===W)return z(w,S,A,Xu(S,G),ye);$u(S,G)}return null}function ce(w,S,A,G){for(var ye=null,Xe=null,de=S,De=S=0,ke=null;de!==null&&De<A.length;De++){de.index>De?(ke=de,de=null):ke=de.sibling;var Qe=T(w,de,A[De],G);if(Qe===null){de===null&&(de=ke);break}e&&de&&Qe.alternate===null&&t(w,de),S=i(Qe,S,De),Xe===null?ye=Qe:Xe.sibling=Qe,Xe=Qe,de=ke}if(De===A.length)return n(w,de),He&&nl(w,De),ye;if(de===null){for(;De<A.length;De++)de=X(w,A[De],G),de!==null&&(S=i(de,S,De),Xe===null?ye=de:Xe.sibling=de,Xe=de);return He&&nl(w,De),ye}for(de=l(de);De<A.length;De++)ke=z(de,w,De,A[De],G),ke!==null&&(e&&ke.alternate!==null&&de.delete(ke.key===null?De:ke.key),S=i(ke,S,De),Xe===null?ye=ke:Xe.sibling=ke,Xe=ke);return e&&de.forEach(function($l){return t(w,$l)}),He&&nl(w,De),ye}function Ee(w,S,A,G){if(A==null)throw Error(r(151));for(var ye=null,Xe=null,de=S,De=S=0,ke=null,Qe=A.next();de!==null&&!Qe.done;De++,Qe=A.next()){de.index>De?(ke=de,de=null):ke=de.sibling;var $l=T(w,de,Qe.value,G);if($l===null){de===null&&(de=ke);break}e&&de&&$l.alternate===null&&t(w,de),S=i($l,S,De),Xe===null?ye=$l:Xe.sibling=$l,Xe=$l,de=ke}if(Qe.done)return n(w,de),He&&nl(w,De),ye;if(de===null){for(;!Qe.done;De++,Qe=A.next())Qe=X(w,Qe.value,G),Qe!==null&&(S=i(Qe,S,De),Xe===null?ye=Qe:Xe.sibling=Qe,Xe=Qe);return He&&nl(w,De),ye}for(de=l(de);!Qe.done;De++,Qe=A.next())Qe=z(de,w,De,Qe.value,G),Qe!==null&&(e&&Qe.alternate!==null&&de.delete(Qe.key===null?De:Qe.key),S=i(Qe,S,De),Xe===null?ye=Qe:Xe.sibling=Qe,Xe=Qe);return e&&de.forEach(function(zm){return t(w,zm)}),He&&nl(w,De),ye}function et(w,S,A,G){if(typeof A=="object"&&A!==null&&A.type===ee&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case q:e:{for(var ye=A.key;S!==null;){if(S.key===ye){if(ye=A.type,ye===ee){if(S.tag===7){n(w,S.sibling),G=a(S,A.props.children),G.return=w,w=G;break e}}else if(S.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===fe&&ba(ye)===S.type){n(w,S.sibling),G=a(S,A.props),Ki(G,A),G.return=w,w=G;break e}n(w,S);break}else t(w,S);S=S.sibling}A.type===ee?(G=ma(A.props.children,w.mode,G,A.key),G.return=w,w=G):(G=qu(A.type,A.key,A.props,null,w.mode,G),Ki(G,A),G.return=w,w=G)}return c(w);case O:e:{for(ye=A.key;S!==null;){if(S.key===ye)if(S.tag===4&&S.stateNode.containerInfo===A.containerInfo&&S.stateNode.implementation===A.implementation){n(w,S.sibling),G=a(S,A.children||[]),G.return=w,w=G;break e}else{n(w,S);break}else t(w,S);S=S.sibling}G=hc(A,w.mode,G),G.return=w,w=G}return c(w);case fe:return A=ba(A),et(w,S,A,G)}if(Be(A))return ce(w,S,A,G);if(he(A)){if(ye=he(A),typeof ye!="function")throw Error(r(150));return A=ye.call(A),Ee(w,S,A,G)}if(typeof A.then=="function")return et(w,S,Ku(A),G);if(A.$$typeof===W)return et(w,S,Xu(w,A),G);$u(w,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,S!==null&&S.tag===6?(n(w,S.sibling),G=a(S,A),G.return=w,w=G):(n(w,S),G=dc(A,w.mode,G),G.return=w,w=G),c(w)):n(w,S)}return function(w,S,A,G){try{Vi=0;var ye=et(w,S,A,G);return si=null,ye}catch(de){if(de===ui||de===Zu)throw de;var Xe=on(29,de,null,w.mode);return Xe.lanes=G,Xe.return=w,Xe}}}var Sa=df(!0),hf=df(!1),zl=!1;function Cc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function jc(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 Ol(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Rl(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ke&2)!==0){var a=l.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),l.pending=t,t=Hu(e),Jr(e,null,n),t}return Bu(e,l,t,n),Hu(e)}function $i(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,xl(e,n)}}function Ac(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var c={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?a=i=c:i=i.next=c,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Nc=!1;function Ji(){if(Nc){var e=ii;if(e!==null)throw e}}function Fi(e,t,n,l){Nc=!1;var a=e.updateQueue;zl=!1;var i=a.firstBaseUpdate,c=a.lastBaseUpdate,m=a.shared.pending;if(m!==null){a.shared.pending=null;var y=m,N=y.next;y.next=null,c===null?i=N:c.next=N,c=y;var H=e.alternate;H!==null&&(H=H.updateQueue,m=H.lastBaseUpdate,m!==c&&(m===null?H.firstBaseUpdate=N:m.next=N,H.lastBaseUpdate=y))}if(i!==null){var X=a.baseState;c=0,H=N=y=null,m=i;do{var T=m.lane&-536870913,z=T!==m.lane;if(z?(Ue&T)===T:(l&T)===T){T!==0&&T===ai&&(Nc=!0),H!==null&&(H=H.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var ce=e,Ee=m;T=t;var et=n;switch(Ee.tag){case 1:if(ce=Ee.payload,typeof ce=="function"){X=ce.call(et,X,T);break e}X=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=Ee.payload,T=typeof ce=="function"?ce.call(et,X,T):ce,T==null)break e;X=_({},X,T);break e;case 2:zl=!0}}T=m.callback,T!==null&&(e.flags|=64,z&&(e.flags|=8192),z=a.callbacks,z===null?a.callbacks=[T]:z.push(T))}else z={lane:T,tag:m.tag,payload:m.payload,callback:m.callback,next:null},H===null?(N=H=z,y=X):H=H.next=z,c|=T;if(m=m.next,m===null){if(m=a.shared.pending,m===null)break;z=m,m=z.next,z.next=null,a.lastBaseUpdate=z,a.shared.pending=null}}while(!0);H===null&&(y=X),a.baseState=y,a.firstBaseUpdate=N,a.lastBaseUpdate=H,i===null&&(a.shared.lanes=0),Bl|=c,e.lanes=c,e.memoizedState=X}}function mf(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function gf(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)mf(n[e],t)}var ci=b(null),Ju=b(0);function pf(e,t){e=hl,F(Ju,e),F(ci,t),hl=e|t.baseLanes}function Tc(){F(Ju,hl),F(ci,ci.current)}function Dc(){hl=Ju.current,L(ci),L(Ju)}var rn=b(null),Sn=null;function _l(e){var t=e.alternate;F(mt,mt.current&1),F(rn,e),Sn===null&&(t===null||ci.current!==null||t.memoizedState!==null)&&(Sn=e)}function zc(e){F(mt,mt.current),F(rn,e),Sn===null&&(Sn=e)}function yf(e){e.tag===22?(F(mt,mt.current),F(rn,e),Sn===null&&(Sn=e)):Ll()}function Ll(){F(mt,mt.current),F(rn,rn.current)}function fn(e){L(rn),Sn===e&&(Sn=null),L(mt)}var mt=b(0);function Fu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Bo(n)||Ho(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var il=0,Te=null,Ie=null,St=null,Wu=!1,oi=!1,Ea=!1,Iu=0,Wi=0,ri=null,Sh=0;function ot(){throw Error(r(321))}function Oc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cn(e[n],t[n]))return!1;return!0}function Rc(e,t,n,l,a,i){return il=i,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?ed:$c,Ea=!1,i=n(l,a),Ea=!1,oi&&(i=bf(t,n,l,a)),vf(e),i}function vf(e){D.H=eu;var t=Ie!==null&&Ie.next!==null;if(il=0,St=Ie=Te=null,Wu=!1,Wi=0,ri=null,t)throw Error(r(300));e===null||Et||(e=e.dependencies,e!==null&&Gu(e)&&(Et=!0))}function bf(e,t,n,l){Te=e;var a=0;do{if(oi&&(ri=null),Wi=0,oi=!1,25<=a)throw Error(r(301));if(a+=1,St=Ie=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}D.H=td,i=t(n,l)}while(oi);return i}function Eh(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?Ii(t):t,e=e.useState()[0],(Ie!==null?Ie.memoizedState:null)!==e&&(Te.flags|=1024),t}function _c(){var e=Iu!==0;return Iu=0,e}function Lc(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Uc(e){if(Wu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Wu=!1}il=0,St=Ie=Te=null,oi=!1,Wi=Iu=0,ri=null}function Ft(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return St===null?Te.memoizedState=St=e:St=St.next=e,St}function gt(){if(Ie===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var t=St===null?Te.memoizedState:St.next;if(t!==null)St=t,Ie=e;else{if(e===null)throw Te.alternate===null?Error(r(467)):Error(r(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},St===null?Te.memoizedState=St=e:St=St.next=e}return St}function Pu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ii(e){var t=Wi;return Wi+=1,ri===null&&(ri=[]),e=of(ri,e,t),t=Te,(St===null?t.memoizedState:St.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?ed:$c),e}function es(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ii(e);if(e.$$typeof===W)return kt(e)}throw Error(r(438,String(e)))}function kc(e){var t=null,n=Te.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=Te.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Pu(),Te.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=ge;return t.index++,n}function ul(e,t){return typeof t=="function"?t(e):t}function ts(e){var t=gt();return Bc(t,Ie,e)}function Bc(e,t,n){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=n;var a=e.baseQueue,i=l.pending;if(i!==null){if(a!==null){var c=a.next;a.next=i.next,i.next=c}t.baseQueue=a=i,l.pending=null}if(i=e.baseState,a===null)e.memoizedState=i;else{t=a.next;var m=c=null,y=null,N=t,H=!1;do{var X=N.lane&-536870913;if(X!==N.lane?(Ue&X)===X:(il&X)===X){var T=N.revertLane;if(T===0)y!==null&&(y=y.next={lane:0,revertLane:0,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),X===ai&&(H=!0);else if((il&T)===T){N=N.next,T===ai&&(H=!0);continue}else X={lane:0,revertLane:N.revertLane,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},y===null?(m=y=X,c=i):y=y.next=X,Te.lanes|=T,Bl|=T;X=N.action,Ea&&n(i,X),i=N.hasEagerState?N.eagerState:n(i,X)}else T={lane:X,revertLane:N.revertLane,gesture:N.gesture,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},y===null?(m=y=T,c=i):y=y.next=T,Te.lanes|=X,Bl|=X;N=N.next}while(N!==null&&N!==t);if(y===null?c=i:y.next=m,!cn(i,e.memoizedState)&&(Et=!0,H&&(n=ii,n!==null)))throw n;e.memoizedState=i,e.baseState=c,e.baseQueue=y,l.lastRenderedState=i}return a===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Hc(e){var t=gt(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var l=n.dispatch,a=n.pending,i=t.memoizedState;if(a!==null){n.pending=null;var c=a=a.next;do i=e(i,c.action),c=c.next;while(c!==a);cn(i,t.memoizedState)||(Et=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,l]}function xf(e,t,n){var l=Te,a=gt(),i=He;if(i){if(n===void 0)throw Error(r(407));n=n()}else n=t();var c=!cn((Ie||a).memoizedState,n);if(c&&(a.memoizedState=n,Et=!0),a=a.queue,Gc(wf.bind(null,l,a,e),[e]),a.getSnapshot!==t||c||St!==null&&St.memoizedState.tag&1){if(l.flags|=2048,fi(9,{destroy:void 0},Ef.bind(null,l,a,n,t),null),tt===null)throw Error(r(349));i||(il&127)!==0||Sf(l,t,n)}return n}function Sf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Te.updateQueue,t===null?(t=Pu(),Te.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ef(e,t,n,l){t.value=n,t.getSnapshot=l,Mf(t)&&Cf(e)}function wf(e,t,n){return n(function(){Mf(t)&&Cf(e)})}function Mf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!cn(e,n)}catch{return!0}}function Cf(e){var t=ha(e,2);t!==null&&un(t,e,2)}function qc(e){var t=Ft();if(typeof e=="function"){var n=e;if(e=n(),Ea){Zt(!0);try{n()}finally{Zt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ul,lastRenderedState:e},t}function jf(e,t,n,l){return e.baseState=n,Bc(e,Ie,typeof l=="function"?l:ul)}function wh(e,t,n,l,a){if(as(e))throw Error(r(485));if(e=t.action,e!==null){var i={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(c){i.listeners.push(c)}};D.T!==null?n(!0):i.isTransition=!1,l(i),n=t.pending,n===null?(i.next=t.pending=i,Af(t,i)):(i.next=n.next,t.pending=n.next=i)}}function Af(e,t){var n=t.action,l=t.payload,a=e.state;if(t.isTransition){var i=D.T,c={};D.T=c;try{var m=n(a,l),y=D.S;y!==null&&y(c,m),Nf(e,t,m)}catch(N){Yc(e,t,N)}finally{i!==null&&c.types!==null&&(i.types=c.types),D.T=i}}else try{i=n(a,l),Nf(e,t,i)}catch(N){Yc(e,t,N)}}function Nf(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){Tf(e,t,l)},function(l){return Yc(e,t,l)}):Tf(e,t,n)}function Tf(e,t,n){t.status="fulfilled",t.value=n,Df(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Af(e,n)))}function Yc(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,Df(t),t=t.next;while(t!==l)}e.action=null}function Df(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function zf(e,t){return t}function Of(e,t){if(He){var n=tt.formState;if(n!==null){e:{var l=Te;if(He){if(lt){t:{for(var a=lt,i=xn;a.nodeType!==8;){if(!i){a=null;break t}if(a=En(a.nextSibling),a===null){a=null;break t}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){lt=En(a.nextSibling),l=a.data==="F!";break e}}Tl(l)}l=!1}l&&(t=n[0])}}return n=Ft(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zf,lastRenderedState:t},n.queue=l,n=Wf.bind(null,Te,l),l.dispatch=n,l=qc(!1),i=Kc.bind(null,Te,!1,l.queue),l=Ft(),a={state:t,dispatch:null,action:e,pending:null},l.queue=a,n=wh.bind(null,Te,a,i,n),a.dispatch=n,l.memoizedState=e,[t,n,!1]}function Rf(e){var t=gt();return _f(t,Ie,e)}function _f(e,t,n){if(t=Bc(e,t,zf)[0],e=ts(ul)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Ii(t)}catch(c){throw c===ui?Zu:c}else l=t;t=gt();var a=t.queue,i=a.dispatch;return n!==t.memoizedState&&(Te.flags|=2048,fi(9,{destroy:void 0},Mh.bind(null,a,n),null)),[l,i,e]}function Mh(e,t){e.action=t}function Lf(e){var t=gt(),n=Ie;if(n!==null)return _f(t,n,e);gt(),t=t.memoizedState,n=gt();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function fi(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=Te.updateQueue,t===null&&(t=Pu(),Te.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function Uf(){return gt().memoizedState}function ns(e,t,n,l){var a=Ft();Te.flags|=e,a.memoizedState=fi(1|t,{destroy:void 0},n,l===void 0?null:l)}function ls(e,t,n,l){var a=gt();l=l===void 0?null:l;var i=a.memoizedState.inst;Ie!==null&&l!==null&&Oc(l,Ie.memoizedState.deps)?a.memoizedState=fi(t,i,n,l):(Te.flags|=e,a.memoizedState=fi(1|t,i,n,l))}function kf(e,t){ns(8390656,8,e,t)}function Gc(e,t){ls(2048,8,e,t)}function Ch(e){Te.flags|=4;var t=Te.updateQueue;if(t===null)t=Pu(),Te.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Bf(e){var t=gt().memoizedState;return Ch({ref:t,nextImpl:e}),function(){if((Ke&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Hf(e,t){return ls(4,2,e,t)}function qf(e,t){return ls(4,4,e,t)}function Yf(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Gf(e,t,n){n=n!=null?n.concat([e]):null,ls(4,4,Yf.bind(null,t,e),n)}function Xc(){}function Xf(e,t){var n=gt();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&Oc(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function Qf(e,t){var n=gt();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&Oc(t,l[1]))return l[0];if(l=e(),Ea){Zt(!0);try{e()}finally{Zt(!1)}}return n.memoizedState=[l,t],l}function Qc(e,t,n){return n===void 0||(il&1073741824)!==0&&(Ue&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Zd(),Te.lanes|=e,Bl|=e,n)}function Zf(e,t,n,l){return cn(n,t)?n:ci.current!==null?(e=Qc(e,n,l),cn(e,t)||(Et=!0),e):(il&42)===0||(il&1073741824)!==0&&(Ue&261930)===0?(Et=!0,e.memoizedState=n):(e=Zd(),Te.lanes|=e,Bl|=e,t)}function Vf(e,t,n,l,a){var i=Z.p;Z.p=i!==0&&8>i?i:8;var c=D.T,m={};D.T=m,Kc(e,!1,t,n);try{var y=a(),N=D.S;if(N!==null&&N(m,y),y!==null&&typeof y=="object"&&typeof y.then=="function"){var H=xh(y,l);Pi(e,t,H,mn(e))}else Pi(e,t,l,mn(e))}catch(X){Pi(e,t,{then:function(){},status:"rejected",reason:X},mn())}finally{Z.p=i,c!==null&&m.types!==null&&(c.types=m.types),D.T=c}}function jh(){}function Zc(e,t,n,l){if(e.tag!==5)throw Error(r(476));var a=Kf(e).queue;Vf(e,a,t,ne,n===null?jh:function(){return $f(e),n(l)})}function Kf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ul,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ul,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function $f(e){var t=Kf(e);t.next===null&&(t=e.alternate.memoizedState),Pi(e,t.next.queue,{},mn())}function Vc(){return kt(pu)}function Jf(){return gt().memoizedState}function Ff(){return gt().memoizedState}function Ah(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=mn();e=Ol(n);var l=Rl(t,e,n);l!==null&&(un(l,t,n),$i(l,t,n)),t={cache:Sc()},e.payload=t;return}t=t.return}}function Nh(e,t,n){var l=mn();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},as(e)?If(t,n):(n=rc(e,t,n,l),n!==null&&(un(n,e,l),Pf(n,t,l)))}function Wf(e,t,n){var l=mn();Pi(e,t,n,l)}function Pi(e,t,n,l){var a={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(as(e))If(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var c=t.lastRenderedState,m=i(c,n);if(a.hasEagerState=!0,a.eagerState=m,cn(m,c))return Bu(e,t,a,0),tt===null&&ku(),!1}catch{}if(n=rc(e,t,a,l),n!==null)return un(n,e,l),Pf(n,t,l),!0}return!1}function Kc(e,t,n,l){if(l={lane:2,revertLane:jo(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},as(e)){if(t)throw Error(r(479))}else t=rc(e,n,l,2),t!==null&&un(t,e,2)}function as(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function If(e,t){oi=Wu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Pf(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,xl(e,n)}}var eu={readContext:kt,use:es,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useLayoutEffect:ot,useInsertionEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useSyncExternalStore:ot,useId:ot,useHostTransitionStatus:ot,useFormState:ot,useActionState:ot,useOptimistic:ot,useMemoCache:ot,useCacheRefresh:ot};eu.useEffectEvent=ot;var ed={readContext:kt,use:es,useCallback:function(e,t){return Ft().memoizedState=[e,t===void 0?null:t],e},useContext:kt,useEffect:kf,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,ns(4194308,4,Yf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ns(4194308,4,e,t)},useInsertionEffect:function(e,t){ns(4,2,e,t)},useMemo:function(e,t){var n=Ft();t=t===void 0?null:t;var l=e();if(Ea){Zt(!0);try{e()}finally{Zt(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Ft();if(n!==void 0){var a=n(t);if(Ea){Zt(!0);try{n(t)}finally{Zt(!1)}}}else a=t;return l.memoizedState=l.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},l.queue=e,e=e.dispatch=Nh.bind(null,Te,e),[l.memoizedState,e]},useRef:function(e){var t=Ft();return e={current:e},t.memoizedState=e},useState:function(e){e=qc(e);var t=e.queue,n=Wf.bind(null,Te,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Xc,useDeferredValue:function(e,t){var n=Ft();return Qc(n,e,t)},useTransition:function(){var e=qc(!1);return e=Vf.bind(null,Te,e.queue,!0,!1),Ft().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=Te,a=Ft();if(He){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),tt===null)throw Error(r(349));(Ue&127)!==0||Sf(l,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,kf(wf.bind(null,l,i,e),[e]),l.flags|=2048,fi(9,{destroy:void 0},Ef.bind(null,l,i,n,t),null),n},useId:function(){var e=Ft(),t=tt.identifierPrefix;if(He){var n=Bn,l=kn;n=(l&~(1<<32-ct(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Iu++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Sh++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Vc,useFormState:Of,useActionState:Of,useOptimistic:function(e){var t=Ft();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Kc.bind(null,Te,!0,n),n.dispatch=t,[e,t]},useMemoCache:kc,useCacheRefresh:function(){return Ft().memoizedState=Ah.bind(null,Te)},useEffectEvent:function(e){var t=Ft(),n={impl:e};return t.memoizedState=n,function(){if((Ke&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},$c={readContext:kt,use:es,useCallback:Xf,useContext:kt,useEffect:Gc,useImperativeHandle:Gf,useInsertionEffect:Hf,useLayoutEffect:qf,useMemo:Qf,useReducer:ts,useRef:Uf,useState:function(){return ts(ul)},useDebugValue:Xc,useDeferredValue:function(e,t){var n=gt();return Zf(n,Ie.memoizedState,e,t)},useTransition:function(){var e=ts(ul)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:Ii(e),t]},useSyncExternalStore:xf,useId:Jf,useHostTransitionStatus:Vc,useFormState:Rf,useActionState:Rf,useOptimistic:function(e,t){var n=gt();return jf(n,Ie,e,t)},useMemoCache:kc,useCacheRefresh:Ff};$c.useEffectEvent=Bf;var td={readContext:kt,use:es,useCallback:Xf,useContext:kt,useEffect:Gc,useImperativeHandle:Gf,useInsertionEffect:Hf,useLayoutEffect:qf,useMemo:Qf,useReducer:Hc,useRef:Uf,useState:function(){return Hc(ul)},useDebugValue:Xc,useDeferredValue:function(e,t){var n=gt();return Ie===null?Qc(n,e,t):Zf(n,Ie.memoizedState,e,t)},useTransition:function(){var e=Hc(ul)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:Ii(e),t]},useSyncExternalStore:xf,useId:Jf,useHostTransitionStatus:Vc,useFormState:Lf,useActionState:Lf,useOptimistic:function(e,t){var n=gt();return Ie!==null?jf(n,Ie,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:kc,useCacheRefresh:Ff};td.useEffectEvent=Bf;function Jc(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:_({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Fc={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=mn(),a=Ol(l);a.payload=t,n!=null&&(a.callback=n),t=Rl(e,a,l),t!==null&&(un(t,e,l),$i(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=mn(),a=Ol(l);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=Rl(e,a,l),t!==null&&(un(t,e,l),$i(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=mn(),l=Ol(n);l.tag=2,t!=null&&(l.callback=t),t=Rl(e,l,n),t!==null&&(un(t,e,n),$i(t,e,n))}};function nd(e,t,n,l,a,i,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,i,c):t.prototype&&t.prototype.isPureReactComponent?!qi(n,l)||!qi(a,i):!0}function ld(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&Fc.enqueueReplaceState(t,t.state,null)}function wa(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=_({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function ad(e){Uu(e)}function id(e){console.error(e)}function ud(e){Uu(e)}function is(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function sd(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Wc(e,t,n){return n=Ol(n),n.tag=3,n.payload={element:null},n.callback=function(){is(e,t)},n}function cd(e){return e=Ol(e),e.tag=3,e}function od(e,t,n,l){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var i=l.value;e.payload=function(){return a(i)},e.callback=function(){sd(t,n,l)}}var c=n.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(e.callback=function(){sd(t,n,l),typeof a!="function"&&(Hl===null?Hl=new Set([this]):Hl.add(this));var m=l.stack;this.componentDidCatch(l.value,{componentStack:m!==null?m:""})})}function Th(e,t,n,l,a){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&li(t,n,a,!0),n=rn.current,n!==null){switch(n.tag){case 31:case 13:return Sn===null?ys():n.alternate===null&&rt===0&&(rt=3),n.flags&=-257,n.flags|=65536,n.lanes=a,l===Vu?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),wo(e,l,a)),!1;case 22:return n.flags|=65536,l===Vu?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),wo(e,l,a)),!1}throw Error(r(435,n.tag))}return wo(e,l,a),ys(),!1}if(He)return t=rn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,l!==pc&&(e=Error(r(422),{cause:l}),Xi(yn(e,n)))):(l!==pc&&(t=Error(r(423),{cause:l}),Xi(yn(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,l=yn(l,n),a=Wc(e.stateNode,l,a),Ac(e,a),rt!==4&&(rt=2)),!1;var i=Error(r(520),{cause:l});if(i=yn(i,n),cu===null?cu=[i]:cu.push(i),rt!==4&&(rt=2),t===null)return!0;l=yn(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Wc(n.stateNode,l,e),Ac(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Hl===null||!Hl.has(i))))return n.flags|=65536,a&=-a,n.lanes|=a,a=cd(a),od(a,e,n,l),Ac(n,a),!1}n=n.return}while(n!==null);return!1}var Ic=Error(r(461)),Et=!1;function Bt(e,t,n,l){t.child=e===null?hf(t,null,n,l):Sa(t,e.child,n,l)}function rd(e,t,n,l,a){n=n.render;var i=t.ref;if("ref"in l){var c={};for(var m in l)m!=="ref"&&(c[m]=l[m])}else c=l;return ya(t),l=Rc(e,t,n,c,i,a),m=_c(),e!==null&&!Et?(Lc(e,t,a),sl(e,t,a)):(He&&m&&mc(t),t.flags|=1,Bt(e,t,l,a),t.child)}function fd(e,t,n,l,a){if(e===null){var i=n.type;return typeof i=="function"&&!fc(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,dd(e,t,i,l,a)):(e=qu(n.type,null,l,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!uo(e,a)){var c=i.memoizedProps;if(n=n.compare,n=n!==null?n:qi,n(c,l)&&e.ref===t.ref)return sl(e,t,a)}return t.flags|=1,e=tl(i,l),e.ref=t.ref,e.return=t,t.child=e}function dd(e,t,n,l,a){if(e!==null){var i=e.memoizedProps;if(qi(i,l)&&e.ref===t.ref)if(Et=!1,t.pendingProps=l=i,uo(e,a))(e.flags&131072)!==0&&(Et=!0);else return t.lanes=e.lanes,sl(e,t,a)}return Pc(e,t,n,l,a)}function hd(e,t,n,l){var a=l.children,i=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(i=i!==null?i.baseLanes|n:n,e!==null){for(l=t.child=e.child,a=0;l!==null;)a=a|l.lanes|l.childLanes,l=l.sibling;l=a&~i}else l=0,t.child=null;return md(e,t,i,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Qu(t,i!==null?i.cachePool:null),i!==null?pf(t,i):Tc(),yf(t);else return l=t.lanes=536870912,md(e,t,i!==null?i.baseLanes|n:n,n,l)}else i!==null?(Qu(t,i.cachePool),pf(t,i),Ll(),t.memoizedState=null):(e!==null&&Qu(t,null),Tc(),Ll());return Bt(e,t,a,n),t.child}function tu(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function md(e,t,n,l,a){var i=wc();return i=i===null?null:{parent:xt._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&Qu(t,null),Tc(),yf(t),e!==null&&li(e,t,l,!0),t.childLanes=a,null}function us(e,t){return t=cs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gd(e,t,n){return Sa(t,e.child,null,n),e=us(t,t.pendingProps),e.flags|=2,fn(t),t.memoizedState=null,e}function Dh(e,t,n){var l=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(He){if(l.mode==="hidden")return e=us(t,l),t.lanes=536870912,tu(null,e);if(zc(t),(e=lt)?(e=A0(e,xn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Al!==null?{id:kn,overflow:Bn}:null,retryLane:536870912,hydrationErrors:null},n=Wr(e),n.return=t,t.child=n,Ut=t,lt=null)):e=null,e===null)throw Tl(t);return t.lanes=536870912,null}return us(t,l)}var i=e.memoizedState;if(i!==null){var c=i.dehydrated;if(zc(t),a)if(t.flags&256)t.flags&=-257,t=gd(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(Et||li(e,t,n,!1),a=(n&e.childLanes)!==0,Et||a){if(l=tt,l!==null&&(c=qt(l,n),c!==0&&c!==i.retryLane))throw i.retryLane=c,ha(e,c),un(l,e,c),Ic;ys(),t=gd(e,t,n)}else e=i.treeContext,lt=En(c.nextSibling),Ut=t,He=!0,Nl=null,xn=!1,e!==null&&ef(t,e),t=us(t,l),t.flags|=4096;return t}return e=tl(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ss(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(r(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Pc(e,t,n,l,a){return ya(t),n=Rc(e,t,n,l,void 0,a),l=_c(),e!==null&&!Et?(Lc(e,t,a),sl(e,t,a)):(He&&l&&mc(t),t.flags|=1,Bt(e,t,n,a),t.child)}function pd(e,t,n,l,a,i){return ya(t),t.updateQueue=null,n=bf(t,l,n,a),vf(e),l=_c(),e!==null&&!Et?(Lc(e,t,i),sl(e,t,i)):(He&&l&&mc(t),t.flags|=1,Bt(e,t,n,i),t.child)}function yd(e,t,n,l,a){if(ya(t),t.stateNode===null){var i=Pa,c=n.contextType;typeof c=="object"&&c!==null&&(i=kt(c)),i=new n(l,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Fc,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=l,i.state=t.memoizedState,i.refs={},Cc(t),c=n.contextType,i.context=typeof c=="object"&&c!==null?kt(c):Pa,i.state=t.memoizedState,c=n.getDerivedStateFromProps,typeof c=="function"&&(Jc(t,n,c,l),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(c=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),c!==i.state&&Fc.enqueueReplaceState(i,i.state,null),Fi(t,l,i,a),Ji(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){i=t.stateNode;var m=t.memoizedProps,y=wa(n,m);i.props=y;var N=i.context,H=n.contextType;c=Pa,typeof H=="object"&&H!==null&&(c=kt(H));var X=n.getDerivedStateFromProps;H=typeof X=="function"||typeof i.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,H||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(m||N!==c)&&ld(t,i,l,c),zl=!1;var T=t.memoizedState;i.state=T,Fi(t,l,i,a),Ji(),N=t.memoizedState,m||T!==N||zl?(typeof X=="function"&&(Jc(t,n,X,l),N=t.memoizedState),(y=zl||nd(t,n,y,l,T,N,c))?(H||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=N),i.props=l,i.state=N,i.context=c,l=y):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{i=t.stateNode,jc(e,t),c=t.memoizedProps,H=wa(n,c),i.props=H,X=t.pendingProps,T=i.context,N=n.contextType,y=Pa,typeof N=="object"&&N!==null&&(y=kt(N)),m=n.getDerivedStateFromProps,(N=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==X||T!==y)&&ld(t,i,l,y),zl=!1,T=t.memoizedState,i.state=T,Fi(t,l,i,a),Ji();var z=t.memoizedState;c!==X||T!==z||zl||e!==null&&e.dependencies!==null&&Gu(e.dependencies)?(typeof m=="function"&&(Jc(t,n,m,l),z=t.memoizedState),(H=zl||nd(t,n,H,l,T,z,y)||e!==null&&e.dependencies!==null&&Gu(e.dependencies))?(N||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(l,z,y),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(l,z,y)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=z),i.props=l,i.state=z,i.context=y,l=H):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),l=!1)}return i=l,ss(e,t),l=(t.flags&128)!==0,i||l?(i=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&l?(t.child=Sa(t,e.child,null,a),t.child=Sa(t,null,n,a)):Bt(e,t,n,a),t.memoizedState=i.state,e=t.child):e=sl(e,t,a),e}function vd(e,t,n,l){return ga(),t.flags|=256,Bt(e,t,n,l),t.child}var eo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function to(e){return{baseLanes:e,cachePool:sf()}}function no(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=hn),e}function bd(e,t,n){var l=t.pendingProps,a=!1,i=(t.flags&128)!==0,c;if((c=i)||(c=e!==null&&e.memoizedState===null?!1:(mt.current&2)!==0),c&&(a=!0,t.flags&=-129),c=(t.flags&32)!==0,t.flags&=-33,e===null){if(He){if(a?_l(t):Ll(),(e=lt)?(e=A0(e,xn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Al!==null?{id:kn,overflow:Bn}:null,retryLane:536870912,hydrationErrors:null},n=Wr(e),n.return=t,t.child=n,Ut=t,lt=null)):e=null,e===null)throw Tl(t);return Ho(e)?t.lanes=32:t.lanes=536870912,null}var m=l.children;return l=l.fallback,a?(Ll(),a=t.mode,m=cs({mode:"hidden",children:m},a),l=ma(l,a,n,null),m.return=t,l.return=t,m.sibling=l,t.child=m,l=t.child,l.memoizedState=to(n),l.childLanes=no(e,c,n),t.memoizedState=eo,tu(null,l)):(_l(t),lo(t,m))}var y=e.memoizedState;if(y!==null&&(m=y.dehydrated,m!==null)){if(i)t.flags&256?(_l(t),t.flags&=-257,t=ao(e,t,n)):t.memoizedState!==null?(Ll(),t.child=e.child,t.flags|=128,t=null):(Ll(),m=l.fallback,a=t.mode,l=cs({mode:"visible",children:l.children},a),m=ma(m,a,n,null),m.flags|=2,l.return=t,m.return=t,l.sibling=m,t.child=l,Sa(t,e.child,null,n),l=t.child,l.memoizedState=to(n),l.childLanes=no(e,c,n),t.memoizedState=eo,t=tu(null,l));else if(_l(t),Ho(m)){if(c=m.nextSibling&&m.nextSibling.dataset,c)var N=c.dgst;c=N,l=Error(r(419)),l.stack="",l.digest=c,Xi({value:l,source:null,stack:null}),t=ao(e,t,n)}else if(Et||li(e,t,n,!1),c=(n&e.childLanes)!==0,Et||c){if(c=tt,c!==null&&(l=qt(c,n),l!==0&&l!==y.retryLane))throw y.retryLane=l,ha(e,l),un(c,e,l),Ic;Bo(m)||ys(),t=ao(e,t,n)}else Bo(m)?(t.flags|=192,t.child=e.child,t=null):(e=y.treeContext,lt=En(m.nextSibling),Ut=t,He=!0,Nl=null,xn=!1,e!==null&&ef(t,e),t=lo(t,l.children),t.flags|=4096);return t}return a?(Ll(),m=l.fallback,a=t.mode,y=e.child,N=y.sibling,l=tl(y,{mode:"hidden",children:l.children}),l.subtreeFlags=y.subtreeFlags&65011712,N!==null?m=tl(N,m):(m=ma(m,a,n,null),m.flags|=2),m.return=t,l.return=t,l.sibling=m,t.child=l,tu(null,l),l=t.child,m=e.child.memoizedState,m===null?m=to(n):(a=m.cachePool,a!==null?(y=xt._currentValue,a=a.parent!==y?{parent:y,pool:y}:a):a=sf(),m={baseLanes:m.baseLanes|n,cachePool:a}),l.memoizedState=m,l.childLanes=no(e,c,n),t.memoizedState=eo,tu(e.child,l)):(_l(t),n=e.child,e=n.sibling,n=tl(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(c=t.deletions,c===null?(t.deletions=[e],t.flags|=16):c.push(e)),t.child=n,t.memoizedState=null,n)}function lo(e,t){return t=cs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function cs(e,t){return e=on(22,e,null,t),e.lanes=0,e}function ao(e,t,n){return Sa(t,e.child,null,n),e=lo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xd(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),bc(e.return,t,n)}function io(e,t,n,l,a,i){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:a,treeForkCount:i}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=l,c.tail=n,c.tailMode=a,c.treeForkCount=i)}function Sd(e,t,n){var l=t.pendingProps,a=l.revealOrder,i=l.tail;l=l.children;var c=mt.current,m=(c&2)!==0;if(m?(c=c&1|2,t.flags|=128):c&=1,F(mt,c),Bt(e,t,l,n),l=He?Gi:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&xd(e,n,t);else if(e.tag===19)xd(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&Fu(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),io(t,!1,a,n,i,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Fu(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}io(t,!0,n,null,i,l);break;case"together":io(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function sl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Bl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(li(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=tl(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=tl(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function uo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Gu(e)))}function zh(e,t,n){switch(t.tag){case 3:K(t,t.stateNode.containerInfo),Dl(t,xt,e.memoizedState.cache),ga();break;case 27:case 5:le(t);break;case 4:K(t,t.stateNode.containerInfo);break;case 10:Dl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,zc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(_l(t),t.flags|=128,null):(n&t.child.childLanes)!==0?bd(e,t,n):(_l(t),e=sl(e,t,n),e!==null?e.sibling:null);_l(t);break;case 19:var a=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(li(e,t,n,!1),l=(n&t.childLanes)!==0),a){if(l)return Sd(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),F(mt,mt.current),l)break;return null;case 22:return t.lanes=0,hd(e,t,n,t.pendingProps);case 24:Dl(t,xt,e.memoizedState.cache)}return sl(e,t,n)}function Ed(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Et=!0;else{if(!uo(e,n)&&(t.flags&128)===0)return Et=!1,zh(e,t,n);Et=(e.flags&131072)!==0}else Et=!1,He&&(t.flags&1048576)!==0&&Pr(t,Gi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=ba(t.elementType),t.type=e,typeof e=="function")fc(e)?(l=wa(e,l),t.tag=1,t=yd(null,t,e,l,n)):(t.tag=0,t=Pc(null,t,e,l,n));else{if(e!=null){var a=e.$$typeof;if(a===ie){t.tag=11,t=rd(null,t,e,l,n);break e}else if(a===I){t.tag=14,t=fd(null,t,e,l,n);break e}}throw t=Ae(e)||e,Error(r(306,t,""))}}return t;case 0:return Pc(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,a=wa(l,t.pendingProps),yd(e,t,l,a,n);case 3:e:{if(K(t,t.stateNode.containerInfo),e===null)throw Error(r(387));l=t.pendingProps;var i=t.memoizedState;a=i.element,jc(e,t),Fi(t,l,null,n);var c=t.memoizedState;if(l=c.cache,Dl(t,xt,l),l!==i.cache&&xc(t,[xt],n,!0),Ji(),l=c.element,i.isDehydrated)if(i={element:l,isDehydrated:!1,cache:c.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=vd(e,t,l,n);break e}else if(l!==a){a=yn(Error(r(424)),t),Xi(a),t=vd(e,t,l,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,lt=En(e.firstChild),Ut=t,He=!0,Nl=null,xn=!0,n=hf(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ga(),l===a){t=sl(e,t,n);break e}Bt(e,t,l,n)}t=t.child}return t;case 26:return ss(e,t),e===null?(n=R0(t.type,null,t.pendingProps,null))?t.memoizedState=n:He||(n=t.type,e=t.pendingProps,l=Ms(ve.current).createElement(n),l[vt]=t,l[Rt]=e,Ht(l,n,e),ht(l),t.stateNode=l):t.memoizedState=R0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return le(t),e===null&&He&&(l=t.stateNode=D0(t.type,t.pendingProps,ve.current),Ut=t,xn=!0,a=lt,Xl(t.type)?(qo=a,lt=En(l.firstChild)):lt=a),Bt(e,t,t.pendingProps.children,n),ss(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&He&&((a=l=lt)&&(l=sm(l,t.type,t.pendingProps,xn),l!==null?(t.stateNode=l,Ut=t,lt=En(l.firstChild),xn=!1,a=!0):a=!1),a||Tl(t)),le(t),a=t.type,i=t.pendingProps,c=e!==null?e.memoizedProps:null,l=i.children,Lo(a,i)?l=null:c!==null&&Lo(a,c)&&(t.flags|=32),t.memoizedState!==null&&(a=Rc(e,t,Eh,null,null,n),pu._currentValue=a),ss(e,t),Bt(e,t,l,n),t.child;case 6:return e===null&&He&&((e=n=lt)&&(n=cm(n,t.pendingProps,xn),n!==null?(t.stateNode=n,Ut=t,lt=null,e=!0):e=!1),e||Tl(t)),null;case 13:return bd(e,t,n);case 4:return K(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Sa(t,null,l,n):Bt(e,t,l,n),t.child;case 11:return rd(e,t,t.type,t.pendingProps,n);case 7:return Bt(e,t,t.pendingProps,n),t.child;case 8:return Bt(e,t,t.pendingProps.children,n),t.child;case 12:return Bt(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,Dl(t,t.type,l.value),Bt(e,t,l.children,n),t.child;case 9:return a=t.type._context,l=t.pendingProps.children,ya(t),a=kt(a),l=l(a),t.flags|=1,Bt(e,t,l,n),t.child;case 14:return fd(e,t,t.type,t.pendingProps,n);case 15:return dd(e,t,t.type,t.pendingProps,n);case 19:return Sd(e,t,n);case 31:return Dh(e,t,n);case 22:return hd(e,t,n,t.pendingProps);case 24:return ya(t),l=kt(xt),e===null?(a=wc(),a===null&&(a=tt,i=Sc(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=n),a=i),t.memoizedState={parent:l,cache:a},Cc(t),Dl(t,xt,a)):((e.lanes&n)!==0&&(jc(e,t),Fi(t,null,null,n),Ji()),a=e.memoizedState,i=t.memoizedState,a.parent!==l?(a={parent:l,cache:l},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Dl(t,xt,l)):(l=i.cache,Dl(t,xt,l),l!==a.cache&&xc(t,[xt],n,!0))),Bt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function cl(e){e.flags|=4}function so(e,t,n,l,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(Jd())e.flags|=8192;else throw xa=Vu,Mc}else e.flags&=-16777217}function wd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!B0(t))if(Jd())e.flags|=8192;else throw xa=Vu,Mc}function os(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?We():536870912,e.lanes|=t,gi|=t)}function nu(e,t){if(!He)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function at(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags&65011712,l|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags,l|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function Oh(e,t,n){var l=t.pendingProps;switch(gc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return at(t),null;case 1:return at(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),al(xt),J(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ni(t)?cl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,yc())),at(t),null;case 26:var a=t.type,i=t.memoizedState;return e===null?(cl(t),i!==null?(at(t),wd(t,i)):(at(t),so(t,a,null,l,n))):i?i!==e.memoizedState?(cl(t),at(t),wd(t,i)):(at(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&cl(t),at(t),so(t,a,e,l,n)),null;case 27:if(Le(t),n=ve.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&cl(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return at(t),null}e=te.current,ni(t)?tf(t):(e=D0(a,l,n),t.stateNode=e,cl(t))}return at(t),null;case 5:if(Le(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&cl(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return at(t),null}if(i=te.current,ni(t))tf(t);else{var c=Ms(ve.current);switch(i){case 1:i=c.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=c.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=c.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=c.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=c.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?c.createElement("select",{is:l.is}):c.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?c.createElement(a,{is:l.is}):c.createElement(a)}}i[vt]=t,i[Rt]=l;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=i;e:switch(Ht(i,a,l),a){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&cl(t)}}return at(t),so(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&cl(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=ve.current,ni(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,a=Ut,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}e[vt]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||b0(e.nodeValue,n)),e||Tl(t,!0)}else e=Ms(e).createTextNode(l),e[vt]=t,t.stateNode=e}return at(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=ni(t),n!==null){if(e===null){if(!l)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[vt]=t}else ga(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),e=!1}else n=yc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(fn(t),t):(fn(t),null);if((t.flags&128)!==0)throw Error(r(558))}return at(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ni(t),l!==null&&l.dehydrated!==null){if(e===null){if(!a)throw Error(r(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));a[vt]=t}else ga(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),a=!1}else a=yc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(fn(t),t):(fn(t),null)}return fn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,a=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(a=l.alternate.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==a&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),os(t,t.updateQueue),at(t),null);case 4:return J(),e===null&&Do(t.stateNode.containerInfo),at(t),null;case 10:return al(t.type),at(t),null;case 19:if(L(mt),l=t.memoizedState,l===null)return at(t),null;if(a=(t.flags&128)!==0,i=l.rendering,i===null)if(a)nu(l,!1);else{if(rt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Fu(e),i!==null){for(t.flags|=128,nu(l,!1),e=i.updateQueue,t.updateQueue=e,os(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Fr(n,e),n=n.sibling;return F(mt,mt.current&1|2),He&&nl(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&yt()>ms&&(t.flags|=128,a=!0,nu(l,!1),t.lanes=4194304)}else{if(!a)if(e=Fu(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,os(t,e),nu(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!He)return at(t),null}else 2*yt()-l.renderingStartTime>ms&&n!==536870912&&(t.flags|=128,a=!0,nu(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(e=l.last,e!==null?e.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=yt(),e.sibling=null,n=mt.current,F(mt,a?n&1|2:n&1),He&&nl(t,l.treeForkCount),e):(at(t),null);case 22:case 23:return fn(t),Dc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(at(t),t.subtreeFlags&6&&(t.flags|=8192)):at(t),n=t.updateQueue,n!==null&&os(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&L(va),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),al(xt),at(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Rh(e,t){switch(gc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return al(xt),J(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Le(t),null;case 31:if(t.memoizedState!==null){if(fn(t),t.alternate===null)throw Error(r(340));ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(mt),null;case 4:return J(),null;case 10:return al(t.type),null;case 22:case 23:return fn(t),Dc(),e!==null&&L(va),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return al(xt),null;case 25:return null;default:return null}}function Md(e,t){switch(gc(t),t.tag){case 3:al(xt),J();break;case 26:case 27:case 5:Le(t);break;case 4:J();break;case 31:t.memoizedState!==null&&fn(t);break;case 13:fn(t);break;case 19:L(mt);break;case 10:al(t.type);break;case 22:case 23:fn(t),Dc(),e!==null&&L(va);break;case 24:al(xt)}}function lu(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var a=l.next;n=a;do{if((n.tag&e)===e){l=void 0;var i=n.create,c=n.inst;l=i(),c.destroy=l}n=n.next}while(n!==a)}}catch(m){Fe(t,t.return,m)}}function Ul(e,t,n){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var i=a.next;l=i;do{if((l.tag&e)===e){var c=l.inst,m=c.destroy;if(m!==void 0){c.destroy=void 0,a=t;var y=n,N=m;try{N()}catch(H){Fe(a,y,H)}}}l=l.next}while(l!==i)}}catch(H){Fe(t,t.return,H)}}function Cd(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{gf(t,n)}catch(l){Fe(e,e.return,l)}}}function jd(e,t,n){n.props=wa(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){Fe(e,t,l)}}function au(e,t){try{var n=e.ref;if(n!==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 n=="function"?e.refCleanup=n(l):n.current=l}}catch(a){Fe(e,t,a)}}function Hn(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(a){Fe(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){Fe(e,t,a)}else n.current=null}function Ad(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(a){Fe(e,e.return,a)}}function co(e,t,n){try{var l=e.stateNode;tm(l,e.type,n,t),l[Rt]=t}catch(a){Fe(e,e.return,a)}}function Nd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Xl(e.type)||e.tag===4}function oo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Nd(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&&Xl(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 ro(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Nn));else if(l!==4&&(l===27&&Xl(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(ro(e,t,n),e=e.sibling;e!==null;)ro(e,t,n),e=e.sibling}function rs(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&Xl(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(rs(e,t,n),e=e.sibling;e!==null;)rs(e,t,n),e=e.sibling}function Td(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);Ht(t,l,n),t[vt]=e,t[Rt]=n}catch(i){Fe(e,e.return,i)}}var ol=!1,wt=!1,fo=!1,Dd=typeof WeakSet=="function"?WeakSet:Set,zt=null;function _h(e,t){if(e=e.containerInfo,Ro=zs,e=Yr(e),ac(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var a=l.anchorOffset,i=l.focusNode;l=l.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var c=0,m=-1,y=-1,N=0,H=0,X=e,T=null;t:for(;;){for(var z;X!==n||a!==0&&X.nodeType!==3||(m=c+a),X!==i||l!==0&&X.nodeType!==3||(y=c+l),X.nodeType===3&&(c+=X.nodeValue.length),(z=X.firstChild)!==null;)T=X,X=z;for(;;){if(X===e)break t;if(T===n&&++N===a&&(m=c),T===i&&++H===l&&(y=c),(z=X.nextSibling)!==null)break;X=T,T=X.parentNode}X=z}n=m===-1||y===-1?null:{start:m,end:y}}else n=null}n=n||{start:0,end:0}}else n=null;for(_o={focusedElem:e,selectionRange:n},zs=!1,zt=t;zt!==null;)if(t=zt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,zt=e;else for(;zt!==null;){switch(t=zt,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,n=t,a=i.memoizedProps,i=i.memoizedState,l=n.stateNode;try{var ce=wa(n.type,a);e=l.getSnapshotBeforeUpdate(ce,i),l.__reactInternalSnapshotBeforeUpdate=e}catch(Ee){Fe(n,n.return,Ee)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ko(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ko(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(r(163))}if(e=t.sibling,e!==null){e.return=t.return,zt=e;break}zt=t.return}}function zd(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:fl(e,n),l&4&&lu(5,n);break;case 1:if(fl(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(c){Fe(n,n.return,c)}else{var a=wa(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(c){Fe(n,n.return,c)}}l&64&&Cd(n),l&512&&au(n,n.return);break;case 3:if(fl(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{gf(e,t)}catch(c){Fe(n,n.return,c)}}break;case 27:t===null&&l&4&&Td(n);case 26:case 5:fl(e,n),t===null&&l&4&&Ad(n),l&512&&au(n,n.return);break;case 12:fl(e,n);break;case 31:fl(e,n),l&4&&_d(e,n);break;case 13:fl(e,n),l&4&&Ld(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Xh.bind(null,n),om(e,n))));break;case 22:if(l=n.memoizedState!==null||ol,!l){t=t!==null&&t.memoizedState!==null||wt,a=ol;var i=wt;ol=l,(wt=t)&&!i?dl(e,n,(n.subtreeFlags&8772)!==0):fl(e,n),ol=a,wt=i}break;case 30:break;default:fl(e,n)}}function Od(e){var t=e.alternate;t!==null&&(e.alternate=null,Od(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ai(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 ut=null,tn=!1;function rl(e,t,n){for(n=n.child;n!==null;)Rd(e,t,n),n=n.sibling}function Rd(e,t,n){if(Tt&&typeof Tt.onCommitFiberUnmount=="function")try{Tt.onCommitFiberUnmount(It,n)}catch{}switch(n.tag){case 26:wt||Hn(n,t),rl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:wt||Hn(n,t);var l=ut,a=tn;Xl(n.type)&&(ut=n.stateNode,tn=!1),rl(e,t,n),hu(n.stateNode),ut=l,tn=a;break;case 5:wt||Hn(n,t);case 6:if(l=ut,a=tn,ut=null,rl(e,t,n),ut=l,tn=a,ut!==null)if(tn)try{(ut.nodeType===9?ut.body:ut.nodeName==="HTML"?ut.ownerDocument.body:ut).removeChild(n.stateNode)}catch(i){Fe(n,t,i)}else try{ut.removeChild(n.stateNode)}catch(i){Fe(n,t,i)}break;case 18:ut!==null&&(tn?(e=ut,C0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),wi(e)):C0(ut,n.stateNode));break;case 4:l=ut,a=tn,ut=n.stateNode.containerInfo,tn=!0,rl(e,t,n),ut=l,tn=a;break;case 0:case 11:case 14:case 15:Ul(2,n,t),wt||Ul(4,n,t),rl(e,t,n);break;case 1:wt||(Hn(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&jd(n,t,l)),rl(e,t,n);break;case 21:rl(e,t,n);break;case 22:wt=(l=wt)||n.memoizedState!==null,rl(e,t,n),wt=l;break;default:rl(e,t,n)}}function _d(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{wi(e)}catch(n){Fe(t,t.return,n)}}}function Ld(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{wi(e)}catch(n){Fe(t,t.return,n)}}function Lh(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Dd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Dd),t;default:throw Error(r(435,e.tag))}}function fs(e,t){var n=Lh(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var a=Qh.bind(null,e,l);l.then(a,a)}})}function nn(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var a=n[l],i=e,c=t,m=c;e:for(;m!==null;){switch(m.tag){case 27:if(Xl(m.type)){ut=m.stateNode,tn=!1;break e}break;case 5:ut=m.stateNode,tn=!1;break e;case 3:case 4:ut=m.stateNode.containerInfo,tn=!0;break e}m=m.return}if(ut===null)throw Error(r(160));Rd(i,c,a),ut=null,tn=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ud(t,e),t=t.sibling}var Rn=null;function Ud(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:nn(t,e),ln(e),l&4&&(Ul(3,e,e.return),lu(3,e),Ul(5,e,e.return));break;case 1:nn(t,e),ln(e),l&512&&(wt||n===null||Hn(n,n.return)),l&64&&ol&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var a=Rn;if(nn(t,e),ln(e),l&512&&(wt||n===null||Hn(n,n.return)),l&4){var i=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(l){case"title":i=a.getElementsByTagName("title")[0],(!i||i[ia]||i[vt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(l),a.head.insertBefore(i,a.querySelector("head > title"))),Ht(i,l,n),i[vt]=e,ht(i),l=i;break e;case"link":var c=U0("link","href",a).get(l+(n.href||""));if(c){for(var m=0;m<c.length;m++)if(i=c[m],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){c.splice(m,1);break t}}i=a.createElement(l),Ht(i,l,n),a.head.appendChild(i);break;case"meta":if(c=U0("meta","content",a).get(l+(n.content||""))){for(m=0;m<c.length;m++)if(i=c[m],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){c.splice(m,1);break t}}i=a.createElement(l),Ht(i,l,n),a.head.appendChild(i);break;default:throw Error(r(468,l))}i[vt]=e,ht(i),l=i}e.stateNode=l}else k0(a,e.type,e.stateNode);else e.stateNode=L0(a,l,e.memoizedProps);else i!==l?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,l===null?k0(a,e.type,e.stateNode):L0(a,l,e.memoizedProps)):l===null&&e.stateNode!==null&&co(e,e.memoizedProps,n.memoizedProps)}break;case 27:nn(t,e),ln(e),l&512&&(wt||n===null||Hn(n,n.return)),n!==null&&l&4&&co(e,e.memoizedProps,n.memoizedProps);break;case 5:if(nn(t,e),ln(e),l&512&&(wt||n===null||Hn(n,n.return)),e.flags&32){a=e.stateNode;try{Ml(a,"")}catch(ce){Fe(e,e.return,ce)}}l&4&&e.stateNode!=null&&(a=e.memoizedProps,co(e,a,n!==null?n.memoizedProps:a)),l&1024&&(fo=!0);break;case 6:if(nn(t,e),ln(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(ce){Fe(e,e.return,ce)}}break;case 3:if(As=null,a=Rn,Rn=Cs(t.containerInfo),nn(t,e),Rn=a,ln(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{wi(t.containerInfo)}catch(ce){Fe(e,e.return,ce)}fo&&(fo=!1,kd(e));break;case 4:l=Rn,Rn=Cs(e.stateNode.containerInfo),nn(t,e),ln(e),Rn=l;break;case 12:nn(t,e),ln(e);break;case 31:nn(t,e),ln(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,fs(e,l)));break;case 13:nn(t,e),ln(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(hs=yt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,fs(e,l)));break;case 22:a=e.memoizedState!==null;var y=n!==null&&n.memoizedState!==null,N=ol,H=wt;if(ol=N||a,wt=H||y,nn(t,e),wt=H,ol=N,ln(e),l&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||y||ol||wt||Ma(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){y=n=t;try{if(i=y.stateNode,a)c=i.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none";else{m=y.stateNode;var X=y.memoizedProps.style,T=X!=null&&X.hasOwnProperty("display")?X.display:null;m.style.display=T==null||typeof T=="boolean"?"":(""+T).trim()}}catch(ce){Fe(y,y.return,ce)}}}else if(t.tag===6){if(n===null){y=t;try{y.stateNode.nodeValue=a?"":y.memoizedProps}catch(ce){Fe(y,y.return,ce)}}}else if(t.tag===18){if(n===null){y=t;try{var z=y.stateNode;a?j0(z,!0):j0(y.stateNode,!1)}catch(ce){Fe(y,y.return,ce)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,fs(e,n))));break;case 19:nn(t,e),ln(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,fs(e,l)));break;case 30:break;case 21:break;default:nn(t,e),ln(e)}}function ln(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(Nd(l)){n=l;break}l=l.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var a=n.stateNode,i=oo(e);rs(e,i,a);break;case 5:var c=n.stateNode;n.flags&32&&(Ml(c,""),n.flags&=-33);var m=oo(e);rs(e,m,c);break;case 3:case 4:var y=n.stateNode.containerInfo,N=oo(e);ro(e,N,y);break;default:throw Error(r(161))}}catch(H){Fe(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function kd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;kd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function fl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)zd(e,t.alternate,t),t=t.sibling}function Ma(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ul(4,t,t.return),Ma(t);break;case 1:Hn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&jd(t,t.return,n),Ma(t);break;case 27:hu(t.stateNode);case 26:case 5:Hn(t,t.return),Ma(t);break;case 22:t.memoizedState===null&&Ma(t);break;case 30:Ma(t);break;default:Ma(t)}e=e.sibling}}function dl(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,a=e,i=t,c=i.flags;switch(i.tag){case 0:case 11:case 15:dl(a,i,n),lu(4,i);break;case 1:if(dl(a,i,n),l=i,a=l.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(N){Fe(l,l.return,N)}if(l=i,a=l.updateQueue,a!==null){var m=l.stateNode;try{var y=a.shared.hiddenCallbacks;if(y!==null)for(a.shared.hiddenCallbacks=null,a=0;a<y.length;a++)mf(y[a],m)}catch(N){Fe(l,l.return,N)}}n&&c&64&&Cd(i),au(i,i.return);break;case 27:Td(i);case 26:case 5:dl(a,i,n),n&&l===null&&c&4&&Ad(i),au(i,i.return);break;case 12:dl(a,i,n);break;case 31:dl(a,i,n),n&&c&4&&_d(a,i);break;case 13:dl(a,i,n),n&&c&4&&Ld(a,i);break;case 22:i.memoizedState===null&&dl(a,i,n),au(i,i.return);break;case 30:break;default:dl(a,i,n)}t=t.sibling}}function ho(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Qi(n))}function mo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Qi(e))}function _n(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Bd(e,t,n,l),t=t.sibling}function Bd(e,t,n,l){var a=t.flags;switch(t.tag){case 0:case 11:case 15:_n(e,t,n,l),a&2048&&lu(9,t);break;case 1:_n(e,t,n,l);break;case 3:_n(e,t,n,l),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Qi(e)));break;case 12:if(a&2048){_n(e,t,n,l),e=t.stateNode;try{var i=t.memoizedProps,c=i.id,m=i.onPostCommit;typeof m=="function"&&m(c,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(y){Fe(t,t.return,y)}}else _n(e,t,n,l);break;case 31:_n(e,t,n,l);break;case 13:_n(e,t,n,l);break;case 23:break;case 22:i=t.stateNode,c=t.alternate,t.memoizedState!==null?i._visibility&2?_n(e,t,n,l):iu(e,t):i._visibility&2?_n(e,t,n,l):(i._visibility|=2,di(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),a&2048&&ho(c,t);break;case 24:_n(e,t,n,l),a&2048&&mo(t.alternate,t);break;default:_n(e,t,n,l)}}function di(e,t,n,l,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,c=t,m=n,y=l,N=c.flags;switch(c.tag){case 0:case 11:case 15:di(i,c,m,y,a),lu(8,c);break;case 23:break;case 22:var H=c.stateNode;c.memoizedState!==null?H._visibility&2?di(i,c,m,y,a):iu(i,c):(H._visibility|=2,di(i,c,m,y,a)),a&&N&2048&&ho(c.alternate,c);break;case 24:di(i,c,m,y,a),a&&N&2048&&mo(c.alternate,c);break;default:di(i,c,m,y,a)}t=t.sibling}}function iu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,a=l.flags;switch(l.tag){case 22:iu(n,l),a&2048&&ho(l.alternate,l);break;case 24:iu(n,l),a&2048&&mo(l.alternate,l);break;default:iu(n,l)}t=t.sibling}}var uu=8192;function hi(e,t,n){if(e.subtreeFlags&uu)for(e=e.child;e!==null;)Hd(e,t,n),e=e.sibling}function Hd(e,t,n){switch(e.tag){case 26:hi(e,t,n),e.flags&uu&&e.memoizedState!==null&&Sm(n,Rn,e.memoizedState,e.memoizedProps);break;case 5:hi(e,t,n);break;case 3:case 4:var l=Rn;Rn=Cs(e.stateNode.containerInfo),hi(e,t,n),Rn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=uu,uu=16777216,hi(e,t,n),uu=l):hi(e,t,n));break;default:hi(e,t,n)}}function qd(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 su(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];zt=l,Gd(l,e)}qd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Yd(e),e=e.sibling}function Yd(e){switch(e.tag){case 0:case 11:case 15:su(e),e.flags&2048&&Ul(9,e,e.return);break;case 3:su(e);break;case 12:su(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ds(e)):su(e);break;default:su(e)}}function ds(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];zt=l,Gd(l,e)}qd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ul(8,t,t.return),ds(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,ds(t));break;default:ds(t)}e=e.sibling}}function Gd(e,t){for(;zt!==null;){var n=zt;switch(n.tag){case 0:case 11:case 15:Ul(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Qi(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,zt=l;else e:for(n=e;zt!==null;){l=zt;var a=l.sibling,i=l.return;if(Od(l),l===n){zt=null;break e}if(a!==null){a.return=i,zt=a;break e}zt=i}}}var Uh={getCacheForType:function(e){var t=kt(xt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return kt(xt).controller.signal}},kh=typeof WeakMap=="function"?WeakMap:Map,Ke=0,tt=null,Re=null,Ue=0,Je=0,dn=null,kl=!1,mi=!1,go=!1,hl=0,rt=0,Bl=0,Ca=0,po=0,hn=0,gi=0,cu=null,an=null,yo=!1,hs=0,Xd=0,ms=1/0,gs=null,Hl=null,At=0,ql=null,pi=null,ml=0,vo=0,bo=null,Qd=null,ou=0,xo=null;function mn(){return(Ke&2)!==0&&Ue!==0?Ue&-Ue:D.T!==null?jo():Qn()}function Zd(){if(hn===0)if((Ue&536870912)===0||He){var e=B;B<<=1,(B&3932160)===0&&(B=262144),hn=e}else hn=536870912;return e=rn.current,e!==null&&(e.flags|=32),hn}function un(e,t,n){(e===tt&&(Je===2||Je===9)||e.cancelPendingCommit!==null)&&(yi(e,0),Yl(e,Ue,hn,!1)),Kt(e,n),((Ke&2)===0||e!==tt)&&(e===tt&&((Ke&2)===0&&(Ca|=n),rt===4&&Yl(e,Ue,hn,!1)),qn(e))}function Vd(e,t,n){if((Ke&6)!==0)throw Error(r(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||we(e,t),a=l?qh(e,t):Eo(e,t,!0),i=l;do{if(a===0){mi&&!l&&Yl(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!Bh(n)){a=Eo(e,t,!1),i=!1;continue}if(a===2){if(i=t,e.errorRecoveryDisabledLanes&i)var c=0;else c=e.pendingLanes&-536870913,c=c!==0?c:c&536870912?536870912:0;if(c!==0){t=c;e:{var m=e;a=cu;var y=m.current.memoizedState.isDehydrated;if(y&&(yi(m,c).flags|=256),c=Eo(m,c,!1),c!==2){if(go&&!y){m.errorRecoveryDisabledLanes|=i,Ca|=i,a=4;break e}i=an,an=a,i!==null&&(an===null?an=i:an.push.apply(an,i))}a=c}if(i=!1,a!==2)continue}}if(a===1){yi(e,0),Yl(e,t,0,!0);break}e:{switch(l=e,i=a,i){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Yl(l,t,hn,!kl);break e;case 2:an=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(a=hs+300-yt(),10<a)){if(Yl(l,t,hn,!kl),Se(l,0,!0)!==0)break e;ml=t,l.timeoutHandle=w0(Kd.bind(null,l,n,an,gs,yo,t,hn,Ca,gi,kl,i,"Throttled",-0,0),a);break e}Kd(l,n,an,gs,yo,t,hn,Ca,gi,kl,i,null,-0,0)}}break}while(!0);qn(e)}function Kd(e,t,n,l,a,i,c,m,y,N,H,X,T,z){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:Nn},Hd(t,i,X);var ce=(i&62914560)===i?hs-yt():(i&4194048)===i?Xd-yt():0;if(ce=Em(X,ce),ce!==null){ml=i,e.cancelPendingCommit=ce(t0.bind(null,e,t,i,n,l,a,c,m,y,H,X,null,T,z)),Yl(e,i,c,!N);return}}t0(e,t,i,n,l,a,c,m,y)}function Bh(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var a=n[l],i=a.getSnapshot;a=a.value;try{if(!cn(i(),a))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Yl(e,t,n,l){t&=~po,t&=~Ca,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var a=t;0<a;){var i=31-ct(a),c=1<<i;l[i]=-1,a&=~c}n!==0&&Ot(e,n,t)}function ps(){return(Ke&6)===0?(ru(0),!1):!0}function So(){if(Re!==null){if(Je===0)var e=Re.return;else e=Re,ll=pa=null,Uc(e),si=null,Vi=0,e=Re;for(;e!==null;)Md(e.alternate,e),e=e.return;Re=null}}function yi(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,am(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ml=0,So(),tt=e,Re=n=tl(e.current,null),Ue=t,Je=0,dn=null,kl=!1,mi=we(e,t),go=!1,gi=hn=po=Ca=Bl=rt=0,an=cu=null,yo=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var a=31-ct(l),i=1<<a;t|=e[a],l&=~i}return hl=t,ku(),n}function $d(e,t){Te=null,D.H=eu,t===ui||t===Zu?(t=rf(),Je=3):t===Mc?(t=rf(),Je=4):Je=t===Ic?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,dn=t,Re===null&&(rt=1,is(e,yn(t,e.current)))}function Jd(){var e=rn.current;return e===null?!0:(Ue&4194048)===Ue?Sn===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?e===Sn:!1}function Fd(){var e=D.H;return D.H=eu,e===null?eu:e}function Wd(){var e=D.A;return D.A=Uh,e}function ys(){rt=4,kl||(Ue&4194048)!==Ue&&rn.current!==null||(mi=!0),(Bl&134217727)===0&&(Ca&134217727)===0||tt===null||Yl(tt,Ue,hn,!1)}function Eo(e,t,n){var l=Ke;Ke|=2;var a=Fd(),i=Wd();(tt!==e||Ue!==t)&&(gs=null,yi(e,t)),t=!1;var c=rt;e:do try{if(Je!==0&&Re!==null){var m=Re,y=dn;switch(Je){case 8:So(),c=6;break e;case 3:case 2:case 9:case 6:rn.current===null&&(t=!0);var N=Je;if(Je=0,dn=null,vi(e,m,y,N),n&&mi){c=0;break e}break;default:N=Je,Je=0,dn=null,vi(e,m,y,N)}}Hh(),c=rt;break}catch(H){$d(e,H)}while(!0);return t&&e.shellSuspendCounter++,ll=pa=null,Ke=l,D.H=a,D.A=i,Re===null&&(tt=null,Ue=0,ku()),c}function Hh(){for(;Re!==null;)Id(Re)}function qh(e,t){var n=Ke;Ke|=2;var l=Fd(),a=Wd();tt!==e||Ue!==t?(gs=null,ms=yt()+500,yi(e,t)):mi=we(e,t);e:do try{if(Je!==0&&Re!==null){t=Re;var i=dn;t:switch(Je){case 1:Je=0,dn=null,vi(e,t,i,1);break;case 2:case 9:if(cf(i)){Je=0,dn=null,Pd(t);break}t=function(){Je!==2&&Je!==9||tt!==e||(Je=7),qn(e)},i.then(t,t);break e;case 3:Je=7;break e;case 4:Je=5;break e;case 7:cf(i)?(Je=0,dn=null,Pd(t)):(Je=0,dn=null,vi(e,t,i,7));break;case 5:var c=null;switch(Re.tag){case 26:c=Re.memoizedState;case 5:case 27:var m=Re;if(c?B0(c):m.stateNode.complete){Je=0,dn=null;var y=m.sibling;if(y!==null)Re=y;else{var N=m.return;N!==null?(Re=N,vs(N)):Re=null}break t}}Je=0,dn=null,vi(e,t,i,5);break;case 6:Je=0,dn=null,vi(e,t,i,6);break;case 8:So(),rt=6;break e;default:throw Error(r(462))}}Yh();break}catch(H){$d(e,H)}while(!0);return ll=pa=null,D.H=l,D.A=a,Ke=n,Re!==null?0:(tt=null,Ue=0,ku(),rt)}function Yh(){for(;Re!==null&&!yl();)Id(Re)}function Id(e){var t=Ed(e.alternate,e,hl);e.memoizedProps=e.pendingProps,t===null?vs(e):Re=t}function Pd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=pd(n,t,t.pendingProps,t.type,void 0,Ue);break;case 11:t=pd(n,t,t.pendingProps,t.type.render,t.ref,Ue);break;case 5:Uc(t);default:Md(n,t),t=Re=Fr(t,hl),t=Ed(n,t,hl)}e.memoizedProps=e.pendingProps,t===null?vs(e):Re=t}function vi(e,t,n,l){ll=pa=null,Uc(t),si=null,Vi=0;var a=t.return;try{if(Th(e,a,t,n,Ue)){rt=1,is(e,yn(n,e.current)),Re=null;return}}catch(i){if(a!==null)throw Re=a,i;rt=1,is(e,yn(n,e.current)),Re=null;return}t.flags&32768?(He||l===1?e=!0:mi||(Ue&536870912)!==0?e=!1:(kl=e=!0,(l===2||l===9||l===3||l===6)&&(l=rn.current,l!==null&&l.tag===13&&(l.flags|=16384))),e0(t,e)):vs(t)}function vs(e){var t=e;do{if((t.flags&32768)!==0){e0(t,kl);return}e=t.return;var n=Oh(t.alternate,t,hl);if(n!==null){Re=n;return}if(t=t.sibling,t!==null){Re=t;return}Re=t=e}while(t!==null);rt===0&&(rt=5)}function e0(e,t){do{var n=Rh(e.alternate,e);if(n!==null){n.flags&=32767,Re=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Re=e;return}Re=e=n}while(e!==null);rt=6,Re=null}function t0(e,t,n,l,a,i,c,m,y){e.cancelPendingCommit=null;do bs();while(At!==0);if((Ke&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(i=t.lanes|t.childLanes,i|=oc,Mu(e,n,i,c,m,y),e===tt&&(Re=tt=null,Ue=0),pi=t,ql=e,ml=n,vo=i,bo=a,Qd=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Zh(vl,function(){return u0(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=D.T,D.T=null,a=Z.p,Z.p=2,c=Ke,Ke|=4;try{_h(e,t,n)}finally{Ke=c,Z.p=a,D.T=l}}At=1,n0(),l0(),a0()}}function n0(){if(At===1){At=0;var e=ql,t=pi,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=D.T,D.T=null;var l=Z.p;Z.p=2;var a=Ke;Ke|=4;try{Ud(t,e);var i=_o,c=Yr(e.containerInfo),m=i.focusedElem,y=i.selectionRange;if(c!==m&&m&&m.ownerDocument&&qr(m.ownerDocument.documentElement,m)){if(y!==null&&ac(m)){var N=y.start,H=y.end;if(H===void 0&&(H=N),"selectionStart"in m)m.selectionStart=N,m.selectionEnd=Math.min(H,m.value.length);else{var X=m.ownerDocument||document,T=X&&X.defaultView||window;if(T.getSelection){var z=T.getSelection(),ce=m.textContent.length,Ee=Math.min(y.start,ce),et=y.end===void 0?Ee:Math.min(y.end,ce);!z.extend&&Ee>et&&(c=et,et=Ee,Ee=c);var w=Hr(m,Ee),S=Hr(m,et);if(w&&S&&(z.rangeCount!==1||z.anchorNode!==w.node||z.anchorOffset!==w.offset||z.focusNode!==S.node||z.focusOffset!==S.offset)){var A=X.createRange();A.setStart(w.node,w.offset),z.removeAllRanges(),Ee>et?(z.addRange(A),z.extend(S.node,S.offset)):(A.setEnd(S.node,S.offset),z.addRange(A))}}}}for(X=[],z=m;z=z.parentNode;)z.nodeType===1&&X.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<X.length;m++){var G=X[m];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}zs=!!Ro,_o=Ro=null}finally{Ke=a,Z.p=l,D.T=n}}e.current=t,At=2}}function l0(){if(At===2){At=0;var e=ql,t=pi,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=D.T,D.T=null;var l=Z.p;Z.p=2;var a=Ke;Ke|=4;try{zd(e,t.alternate,t)}finally{Ke=a,Z.p=l,D.T=n}}At=3}}function a0(){if(At===4||At===3){At=0,Wl();var e=ql,t=pi,n=ml,l=Qd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?At=5:(At=0,pi=ql=null,i0(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(Hl=null),na(n),t=t.stateNode,Tt&&typeof Tt.onCommitFiberRoot=="function")try{Tt.onCommitFiberRoot(It,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=D.T,a=Z.p,Z.p=2,D.T=null;try{for(var i=e.onRecoverableError,c=0;c<l.length;c++){var m=l[c];i(m.value,{componentStack:m.stack})}}finally{D.T=t,Z.p=a}}(ml&3)!==0&&bs(),qn(e),a=e.pendingLanes,(n&261930)!==0&&(a&42)!==0?e===xo?ou++:(ou=0,xo=e):ou=0,ru(0)}}function i0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Qi(t)))}function bs(){return n0(),l0(),a0(),u0()}function u0(){if(At!==5)return!1;var e=ql,t=vo;vo=0;var n=na(ml),l=D.T,a=Z.p;try{Z.p=32>n?32:n,D.T=null,n=bo,bo=null;var i=ql,c=ml;if(At=0,pi=ql=null,ml=0,(Ke&6)!==0)throw Error(r(331));var m=Ke;if(Ke|=4,Yd(i.current),Bd(i,i.current,c,n),Ke=m,ru(0,!1),Tt&&typeof Tt.onPostCommitFiberRoot=="function")try{Tt.onPostCommitFiberRoot(It,i)}catch{}return!0}finally{Z.p=a,D.T=l,i0(e,t)}}function s0(e,t,n){t=yn(n,t),t=Wc(e.stateNode,t,2),e=Rl(e,t,2),e!==null&&(Kt(e,2),qn(e))}function Fe(e,t,n){if(e.tag===3)s0(e,e,n);else for(;t!==null;){if(t.tag===3){s0(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Hl===null||!Hl.has(l))){e=yn(n,e),n=cd(2),l=Rl(t,n,2),l!==null&&(od(n,l,t,e),Kt(l,2),qn(l));break}}t=t.return}}function wo(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new kh;var a=new Set;l.set(t,a)}else a=l.get(t),a===void 0&&(a=new Set,l.set(t,a));a.has(n)||(go=!0,a.add(n),e=Gh.bind(null,e,t,n),t.then(e,e))}function Gh(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,tt===e&&(Ue&n)===n&&(rt===4||rt===3&&(Ue&62914560)===Ue&&300>yt()-hs?(Ke&2)===0&&yi(e,0):po|=n,gi===Ue&&(gi=0)),qn(e)}function c0(e,t){t===0&&(t=We()),e=ha(e,t),e!==null&&(Kt(e,t),qn(e))}function Xh(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),c0(e,n)}function Qh(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),c0(e,n)}function Zh(e,t){return Wt(e,t)}var xs=null,bi=null,Mo=!1,Ss=!1,Co=!1,Gl=0;function qn(e){e!==bi&&e.next===null&&(bi===null?xs=bi=e:bi=bi.next=e),Ss=!0,Mo||(Mo=!0,Kh())}function ru(e,t){if(!Co&&Ss){Co=!0;do for(var n=!1,l=xs;l!==null;){if(e!==0){var a=l.pendingLanes;if(a===0)var i=0;else{var c=l.suspendedLanes,m=l.pingedLanes;i=(1<<31-ct(42|e)+1)-1,i&=a&~(c&~m),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,d0(l,i))}else i=Ue,i=Se(l,l===tt?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||we(l,i)||(n=!0,d0(l,i));l=l.next}while(n);Co=!1}}function Vh(){o0()}function o0(){Ss=Mo=!1;var e=0;Gl!==0&&lm()&&(e=Gl);for(var t=yt(),n=null,l=xs;l!==null;){var a=l.next,i=r0(l,t);i===0?(l.next=null,n===null?xs=a:n.next=a,a===null&&(bi=n)):(n=l,(e!==0||(i&3)!==0)&&(Ss=!0)),l=a}At!==0&&At!==5||ru(e),Gl!==0&&(Gl=0)}function r0(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var c=31-ct(i),m=1<<c,y=a[c];y===-1?((m&n)===0||(m&l)!==0)&&(a[c]=st(m,t)):y<=t&&(e.expiredLanes|=m),i&=~m}if(t=tt,n=Ue,n=Se(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(Je===2||Je===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Yn(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||we(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&Yn(l),na(n)){case 2:case 8:n=ea;break;case 32:n=vl;break;case 268435456:n=Gn;break;default:n=vl}return l=f0.bind(null,e),n=Wt(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&Yn(l),e.callbackPriority=2,e.callbackNode=null,2}function f0(e,t){if(At!==0&&At!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(bs()&&e.callbackNode!==n)return null;var l=Ue;return l=Se(e,e===tt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Vd(e,l,t),r0(e,yt()),e.callbackNode!=null&&e.callbackNode===n?f0.bind(null,e):null)}function d0(e,t){if(bs())return null;Vd(e,t,!0)}function Kh(){im(function(){(Ke&6)!==0?Wt(Pl,Vh):o0()})}function jo(){if(Gl===0){var e=ai;e===0&&(e=Vt,Vt<<=1,(Vt&261888)===0&&(Vt=256)),Gl=e}return Gl}function h0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ya(""+e)}function m0(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function $h(e,t,n,l,a){if(t==="submit"&&n&&n.stateNode===a){var i=h0((a[Rt]||null).action),c=l.submitter;c&&(t=(t=c[Rt]||null)?h0(t.formAction):c.getAttribute("formAction"),t!==null&&(i=t,c=null));var m=new Za("action","action",null,l,a);e.push({event:m,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Gl!==0){var y=c?m0(a,c):new FormData(a);Zc(n,{pending:!0,data:y,method:a.method,action:i},null,y)}}else typeof i=="function"&&(m.preventDefault(),y=c?m0(a,c):new FormData(a),Zc(n,{pending:!0,data:y,method:a.method,action:i},i,y))},currentTarget:a}]})}}for(var Ao=0;Ao<cc.length;Ao++){var No=cc[Ao],Jh=No.toLowerCase(),Fh=No[0].toUpperCase()+No.slice(1);On(Jh,"on"+Fh)}On(Qr,"onAnimationEnd"),On(Zr,"onAnimationIteration"),On(Vr,"onAnimationStart"),On("dblclick","onDoubleClick"),On("focusin","onFocus"),On("focusout","onBlur"),On(dh,"onTransitionRun"),On(hh,"onTransitionStart"),On(mh,"onTransitionCancel"),On(Kr,"onTransitionEnd"),$n("onMouseEnter",["mouseout","mouseover"]),$n("onMouseLeave",["mouseout","mouseover"]),$n("onPointerEnter",["pointerout","pointerover"]),$n("onPointerLeave",["pointerout","pointerover"]),Dt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Dt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Dt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Dt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Dt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Dt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fu="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(" "),Wh=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(fu));function g0(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],a=l.event;l=l.listeners;e:{var i=void 0;if(t)for(var c=l.length-1;0<=c;c--){var m=l[c],y=m.instance,N=m.currentTarget;if(m=m.listener,y!==i&&a.isPropagationStopped())break e;i=m,a.currentTarget=N;try{i(a)}catch(H){Uu(H)}a.currentTarget=null,i=y}else for(c=0;c<l.length;c++){if(m=l[c],y=m.instance,N=m.currentTarget,m=m.listener,y!==i&&a.isPropagationStopped())break e;i=m,a.currentTarget=N;try{i(a)}catch(H){Uu(H)}a.currentTarget=null,i=y}}}}function _e(e,t){var n=t[za];n===void 0&&(n=t[za]=new Set);var l=e+"__bubble";n.has(l)||(p0(t,e,2,!1),n.add(l))}function To(e,t,n){var l=0;t&&(l|=4),p0(n,e,l,t)}var Es="_reactListening"+Math.random().toString(36).slice(2);function Do(e){if(!e[Es]){e[Es]=!0,Au.forEach(function(n){n!=="selectionchange"&&(Wh.has(n)||To(n,!1,e),To(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Es]||(t[Es]=!0,To("selectionchange",!1,t))}}function p0(e,t,n,l){switch(Z0(t)){case 2:var a=Cm;break;case 8:a=jm;break;default:a=Zo}n=a.bind(null,t,n,e),a=void 0,!Xa||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),l?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function zo(e,t,n,l,a){var i=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var c=l.tag;if(c===3||c===4){var m=l.stateNode.containerInfo;if(m===a)break;if(c===4)for(c=l.return;c!==null;){var y=c.tag;if((y===3||y===4)&&c.stateNode.containerInfo===a)return;c=c.return}for(;m!==null;){if(c=Vn(m),c===null)return;if(y=c.tag,y===5||y===6||y===26||y===27){l=i=c;continue e}m=m.parentNode}}l=l.return}Ou(function(){var N=i,H=Di(n),X=[];e:{var T=$r.get(e);if(T!==void 0){var z=Za,ce=e;switch(e){case"keypress":if(ca(n)===0)break e;case"keydown":case"keyup":z=j;break;case"focusin":ce="focus",z=$a;break;case"focusout":ce="blur",z=$a;break;case"beforeblur":case"afterblur":z=$a;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":z=Ru;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=_i;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=re;break;case Qr:case Zr:case Vr:z=$s;break;case Kr:z=Oe;break;case"scroll":case"scrollend":z=Ks;break;case"wheel":z=jt;break;case"copy":case"cut":case"paste":z=Fs;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=$;break;case"toggle":case"beforetoggle":z=bt}var Ee=(t&4)!==0,et=!Ee&&(e==="scroll"||e==="scrollend"),w=Ee?T!==null?T+"Capture":null:T;Ee=[];for(var S=N,A;S!==null;){var G=S;if(A=G.stateNode,G=G.tag,G!==5&&G!==26&&G!==27||A===null||w===null||(G=Wn(S,w),G!=null&&Ee.push(du(S,G,A))),et)break;S=S.return}0<Ee.length&&(T=new z(T,ce,null,n,H),X.push({event:T,listeners:Ee}))}}if((t&7)===0){e:{if(T=e==="mouseover"||e==="pointerover",z=e==="mouseout"||e==="pointerout",T&&n!==Ti&&(ce=n.relatedTarget||n.fromElement)&&(Vn(ce)||ce[Zn]))break e;if((z||T)&&(T=H.window===H?H:(T=H.ownerDocument)?T.defaultView||T.parentWindow:window,z?(ce=n.relatedTarget||n.toElement,z=N,ce=ce?Vn(ce):null,ce!==null&&(et=g(ce),Ee=ce.tag,ce!==et||Ee!==5&&Ee!==27&&Ee!==6)&&(ce=null)):(z=null,ce=N),z!==ce)){if(Ee=Ru,G="onMouseLeave",w="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(Ee=$,G="onPointerLeave",w="onPointerEnter",S="pointer"),et=z==null?T:Kn(z),A=ce==null?T:Kn(ce),T=new Ee(G,S+"leave",z,n,H),T.target=et,T.relatedTarget=A,G=null,Vn(H)===N&&(Ee=new Ee(w,S+"enter",ce,n,H),Ee.target=A,Ee.relatedTarget=et,G=Ee),et=G,z&&ce)t:{for(Ee=Ih,w=z,S=ce,A=0,G=w;G;G=Ee(G))A++;G=0;for(var ye=S;ye;ye=Ee(ye))G++;for(;0<A-G;)w=Ee(w),A--;for(;0<G-A;)S=Ee(S),G--;for(;A--;){if(w===S||S!==null&&w===S.alternate){Ee=w;break t}w=Ee(w),S=Ee(S)}Ee=null}else Ee=null;z!==null&&y0(X,T,z,Ee,!1),ce!==null&&et!==null&&y0(X,et,ce,Ee,!0)}}e:{if(T=N?Kn(N):window,z=T.nodeName&&T.nodeName.toLowerCase(),z==="select"||z==="input"&&T.type==="file")var Xe=Rr;else if(zr(T))if(_r)Xe=oh;else{Xe=sh;var de=uh}else z=T.nodeName,!z||z.toLowerCase()!=="input"||T.type!=="checkbox"&&T.type!=="radio"?N&&Cl(N.elementType)&&(Xe=Rr):Xe=ch;if(Xe&&(Xe=Xe(e,N))){Or(X,Xe,n,H);break e}de&&de(e,T,N),e==="focusout"&&N&&T.type==="number"&&N.memoizedProps.value!=null&&An(T,"number",T.value)}switch(de=N?Kn(N):window,e){case"focusin":(zr(de)||de.contentEditable==="true")&&(Fa=de,ic=N,Yi=null);break;case"focusout":Yi=ic=Fa=null;break;case"mousedown":uc=!0;break;case"contextmenu":case"mouseup":case"dragend":uc=!1,Gr(X,n,H);break;case"selectionchange":if(fh)break;case"keydown":case"keyup":Gr(X,n,H)}var De;if(it)e:{switch(e){case"compositionstart":var ke="onCompositionStart";break e;case"compositionend":ke="onCompositionEnd";break e;case"compositionupdate":ke="onCompositionUpdate";break e}ke=void 0}else Ja?Tr(e,n)&&(ke="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(ke="onCompositionStart");ke&&(jr&&n.locale!=="ko"&&(Ja||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&Ja&&(De=sa()):(Un=H,Oi="value"in Un?Un.value:Un.textContent,Ja=!0)),de=ws(N,ke),0<de.length&&(ke=new Ui(ke,e,null,n,H),X.push({event:ke,listeners:de}),De?ke.data=De:(De=Dr(n),De!==null&&(ke.data=De)))),(De=th?nh(e,n):lh(e,n))&&(ke=ws(N,"onBeforeInput"),0<ke.length&&(de=new Ui("onBeforeInput","beforeinput",null,n,H),X.push({event:de,listeners:ke}),de.data=De)),$h(X,e,N,n,H)}g0(X,t)})}function du(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ws(e,t){for(var n=t+"Capture",l=[];e!==null;){var a=e,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=Wn(e,n),a!=null&&l.unshift(du(e,a,i)),a=Wn(e,t),a!=null&&l.push(du(e,a,i))),e.tag===3)return l;e=e.return}return[]}function Ih(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function y0(e,t,n,l,a){for(var i=t._reactName,c=[];n!==null&&n!==l;){var m=n,y=m.alternate,N=m.stateNode;if(m=m.tag,y!==null&&y===l)break;m!==5&&m!==26&&m!==27||N===null||(y=N,a?(N=Wn(n,i),N!=null&&c.unshift(du(n,N,y))):a||(N=Wn(n,i),N!=null&&c.push(du(n,N,y)))),n=n.return}c.length!==0&&e.push({event:t,listeners:c})}var Ph=/\r\n?/g,em=/\u0000|\uFFFD/g;function v0(e){return(typeof e=="string"?e:""+e).replace(Ph,`
|
|
9
|
+
`).replace(em,"")}function b0(e,t){return t=v0(t),v0(e)===t}function Pe(e,t,n,l,a,i){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Ml(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Ml(e,""+l);break;case"className":Ra(e,"class",l);break;case"tabIndex":Ra(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ra(e,n,l);break;case"style":Ni(e,l,i);break;case"data":if(t!=="object"){Ra(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=Ya(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&Pe(e,t,"name",a.name,a,null),Pe(e,t,"formEncType",a.formEncType,a,null),Pe(e,t,"formMethod",a.formMethod,a,null),Pe(e,t,"formTarget",a.formTarget,a,null)):(Pe(e,t,"encType",a.encType,a,null),Pe(e,t,"method",a.method,a,null),Pe(e,t,"target",a.target,a,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=Ya(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Nn);break;case"onScroll":l!=null&&_e("scroll",e);break;case"onScrollEnd":l!=null&&_e("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(r(60));e.innerHTML=n}}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}n=Ya(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""+l):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":_e("beforetoggle",e),_e("toggle",e),Oa(e,"popover",l);break;case"xlinkActuate":_t(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":_t(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":_t(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":_t(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":_t(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":_t(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":_t(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":_t(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":_t(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Oa(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Vs.get(n)||n,Oa(e,n,l))}}function Oo(e,t,n,l,a,i){switch(n){case"style":Ni(e,l,i);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"children":typeof l=="string"?Ml(e,l):(typeof l=="number"||typeof l=="bigint")&&Ml(e,""+l);break;case"onScroll":l!=null&&_e("scroll",e);break;case"onScrollEnd":l!=null&&_e("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Nn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Nu.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),i=e[Rt]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,a),typeof l=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,a);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):Oa(e,n,l)}}}function Ht(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_e("error",e),_e("load",e);var l=!1,a=!1,i;for(i in n)if(n.hasOwnProperty(i)){var c=n[i];if(c!=null)switch(i){case"src":l=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Pe(e,t,i,c,n,null)}}a&&Pe(e,t,"srcSet",n.srcSet,n,null),l&&Pe(e,t,"src",n.src,n,null);return;case"input":_e("invalid",e);var m=i=c=a=null,y=null,N=null;for(l in n)if(n.hasOwnProperty(l)){var H=n[l];if(H!=null)switch(l){case"name":a=H;break;case"type":c=H;break;case"checked":y=H;break;case"defaultChecked":N=H;break;case"value":i=H;break;case"defaultValue":m=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(137,t));break;default:Pe(e,t,l,H,n,null)}}Ha(e,i,m,y,N,c,a,!1);return;case"select":_e("invalid",e),l=c=i=null;for(a in n)if(n.hasOwnProperty(a)&&(m=n[a],m!=null))switch(a){case"value":i=m;break;case"defaultValue":c=m;break;case"multiple":l=m;default:Pe(e,t,a,m,n,null)}t=i,n=c,e.multiple=!!l,t!=null?Ln(e,!!l,t,!1):n!=null&&Ln(e,!!l,n,!0);return;case"textarea":_e("invalid",e),i=a=l=null;for(c in n)if(n.hasOwnProperty(c)&&(m=n[c],m!=null))switch(c){case"value":l=m;break;case"defaultValue":a=m;break;case"children":i=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(r(91));break;default:Pe(e,t,c,m,n,null)}qa(e,l,a,i);return;case"option":for(y in n)n.hasOwnProperty(y)&&(l=n[y],l!=null)&&(y==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Pe(e,t,y,l,n,null));return;case"dialog":_e("beforetoggle",e),_e("toggle",e),_e("cancel",e),_e("close",e);break;case"iframe":case"object":_e("load",e);break;case"video":case"audio":for(l=0;l<fu.length;l++)_e(fu[l],e);break;case"image":_e("error",e),_e("load",e);break;case"details":_e("toggle",e);break;case"embed":case"source":case"link":_e("error",e),_e("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(N in n)if(n.hasOwnProperty(N)&&(l=n[N],l!=null))switch(N){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Pe(e,t,N,l,n,null)}return;default:if(Cl(t)){for(H in n)n.hasOwnProperty(H)&&(l=n[H],l!==void 0&&Oo(e,t,H,l,n,void 0));return}}for(m in n)n.hasOwnProperty(m)&&(l=n[m],l!=null&&Pe(e,t,m,l,n,null))}function tm(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,c=null,m=null,y=null,N=null,H=null;for(z in n){var X=n[z];if(n.hasOwnProperty(z)&&X!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":y=X;default:l.hasOwnProperty(z)||Pe(e,t,z,null,l,X)}}for(var T in l){var z=l[T];if(X=n[T],l.hasOwnProperty(T)&&(z!=null||X!=null))switch(T){case"type":i=z;break;case"name":a=z;break;case"checked":N=z;break;case"defaultChecked":H=z;break;case"value":c=z;break;case"defaultValue":m=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(137,t));break;default:z!==X&&Pe(e,t,T,z,l,X)}}Ba(e,c,m,y,N,H,i,a);return;case"select":z=c=m=T=null;for(i in n)if(y=n[i],n.hasOwnProperty(i)&&y!=null)switch(i){case"value":break;case"multiple":z=y;default:l.hasOwnProperty(i)||Pe(e,t,i,null,l,y)}for(a in l)if(i=l[a],y=n[a],l.hasOwnProperty(a)&&(i!=null||y!=null))switch(a){case"value":T=i;break;case"defaultValue":m=i;break;case"multiple":c=i;default:i!==y&&Pe(e,t,a,i,l,y)}t=m,n=c,l=z,T!=null?Ln(e,!!n,T,!1):!!l!=!!n&&(t!=null?Ln(e,!!n,t,!0):Ln(e,!!n,n?[]:"",!1));return;case"textarea":z=T=null;for(m in n)if(a=n[m],n.hasOwnProperty(m)&&a!=null&&!l.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:Pe(e,t,m,null,l,a)}for(c in l)if(a=l[c],i=n[c],l.hasOwnProperty(c)&&(a!=null||i!=null))switch(c){case"value":T=a;break;case"defaultValue":z=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(r(91));break;default:a!==i&&Pe(e,t,c,a,l,i)}Lt(e,T,z);return;case"option":for(var ce in n)T=n[ce],n.hasOwnProperty(ce)&&T!=null&&!l.hasOwnProperty(ce)&&(ce==="selected"?e.selected=!1:Pe(e,t,ce,null,l,T));for(y in l)T=l[y],z=n[y],l.hasOwnProperty(y)&&T!==z&&(T!=null||z!=null)&&(y==="selected"?e.selected=T&&typeof T!="function"&&typeof T!="symbol":Pe(e,t,y,T,l,z));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 Ee in n)T=n[Ee],n.hasOwnProperty(Ee)&&T!=null&&!l.hasOwnProperty(Ee)&&Pe(e,t,Ee,null,l,T);for(N in l)if(T=l[N],z=n[N],l.hasOwnProperty(N)&&T!==z&&(T!=null||z!=null))switch(N){case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(r(137,t));break;default:Pe(e,t,N,T,l,z)}return;default:if(Cl(t)){for(var et in n)T=n[et],n.hasOwnProperty(et)&&T!==void 0&&!l.hasOwnProperty(et)&&Oo(e,t,et,void 0,l,T);for(H in l)T=l[H],z=n[H],!l.hasOwnProperty(H)||T===z||T===void 0&&z===void 0||Oo(e,t,H,T,l,z);return}}for(var w in n)T=n[w],n.hasOwnProperty(w)&&T!=null&&!l.hasOwnProperty(w)&&Pe(e,t,w,null,l,T);for(X in l)T=l[X],z=n[X],!l.hasOwnProperty(X)||T===z||T==null&&z==null||Pe(e,t,X,T,l,z)}function x0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function nm(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var a=n[l],i=a.transferSize,c=a.initiatorType,m=a.duration;if(i&&m&&x0(c)){for(c=0,m=a.responseEnd,l+=1;l<n.length;l++){var y=n[l],N=y.startTime;if(N>m)break;var H=y.transferSize,X=y.initiatorType;H&&x0(X)&&(y=y.responseEnd,c+=H*(y<m?1:(m-N)/(y-N)))}if(--l,t+=8*(i+c)/(a.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 Ro=null,_o=null;function Ms(e){return e.nodeType===9?e:e.ownerDocument}function S0(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 E0(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 Lo(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 Uo=null;function lm(){var e=window.event;return e&&e.type==="popstate"?e===Uo?!1:(Uo=e,!0):(Uo=null,!1)}var w0=typeof setTimeout=="function"?setTimeout:void 0,am=typeof clearTimeout=="function"?clearTimeout:void 0,M0=typeof Promise=="function"?Promise:void 0,im=typeof queueMicrotask=="function"?queueMicrotask:typeof M0<"u"?function(e){return M0.resolve(null).then(e).catch(um)}:w0;function um(e){setTimeout(function(){throw e})}function Xl(e){return e==="head"}function C0(e,t){var n=t,l=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(a),wi(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")hu(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,hu(n);for(var i=n.firstChild;i;){var c=i.nextSibling,m=i.nodeName;i[ia]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=c}}else n==="body"&&hu(e.ownerDocument.body);n=a}while(n);wi(t)}function j0(e,t){var n=e;e=0;do{var l=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function ko(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":ko(n),Ai(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function sm(e,t,n,l){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ia])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=En(e.nextSibling),e===null)break}return null}function cm(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=En(e.nextSibling),e===null))return null;return e}function A0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=En(e.nextSibling),e===null))return null;return e}function Bo(e){return e.data==="$?"||e.data==="$~"}function Ho(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function om(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function En(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 qo=null;function N0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return En(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function T0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function D0(e,t,n){switch(t=Ms(n),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function hu(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ai(e)}var wn=new Map,z0=new Set;function Cs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var gl=Z.d;Z.d={f:rm,r:fm,D:dm,C:hm,L:mm,m:gm,X:ym,S:pm,M:vm};function rm(){var e=gl.f(),t=ps();return e||t}function fm(e){var t=El(e);t!==null&&t.tag===5&&t.type==="form"?$f(t):gl.r(e)}var xi=typeof document>"u"?null:document;function O0(e,t,n){var l=xi;if(l&&typeof t=="string"&&t){var a=Ge(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),z0.has(a)||(z0.add(a),e={rel:e,crossOrigin:n,href:t},l.querySelector(a)===null&&(t=l.createElement("link"),Ht(t,"link",e),ht(t),l.head.appendChild(t)))}}function dm(e){gl.D(e),O0("dns-prefetch",e,null)}function hm(e,t){gl.C(e,t),O0("preconnect",e,t)}function mm(e,t,n){gl.L(e,t,n);var l=xi;if(l&&e&&t){var a='link[rel="preload"][as="'+Ge(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+Ge(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+Ge(n.imageSizes)+'"]')):a+='[href="'+Ge(e)+'"]';var i=a;switch(t){case"style":i=Si(e);break;case"script":i=Ei(e)}wn.has(i)||(e=_({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),wn.set(i,e),l.querySelector(a)!==null||t==="style"&&l.querySelector(mu(i))||t==="script"&&l.querySelector(gu(i))||(t=l.createElement("link"),Ht(t,"link",e),ht(t),l.head.appendChild(t)))}}function gm(e,t){gl.m(e,t);var n=xi;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+Ge(l)+'"][href="'+Ge(e)+'"]',i=a;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ei(e)}if(!wn.has(i)&&(e=_({rel:"modulepreload",href:e},t),wn.set(i,e),n.querySelector(a)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(gu(i)))return}l=n.createElement("link"),Ht(l,"link",e),ht(l),n.head.appendChild(l)}}}function pm(e,t,n){gl.S(e,t,n);var l=xi;if(l&&e){var a=Yt(l).hoistableStyles,i=Si(e);t=t||"default";var c=a.get(i);if(!c){var m={loading:0,preload:null};if(c=l.querySelector(mu(i)))m.loading=5;else{e=_({rel:"stylesheet",href:e,"data-precedence":t},n),(n=wn.get(i))&&Yo(e,n);var y=c=l.createElement("link");ht(y),Ht(y,"link",e),y._p=new Promise(function(N,H){y.onload=N,y.onerror=H}),y.addEventListener("load",function(){m.loading|=1}),y.addEventListener("error",function(){m.loading|=2}),m.loading|=4,js(c,t,l)}c={type:"stylesheet",instance:c,count:1,state:m},a.set(i,c)}}}function ym(e,t){gl.X(e,t);var n=xi;if(n&&e){var l=Yt(n).hoistableScripts,a=Ei(e),i=l.get(a);i||(i=n.querySelector(gu(a)),i||(e=_({src:e,async:!0},t),(t=wn.get(a))&&Go(e,t),i=n.createElement("script"),ht(i),Ht(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function vm(e,t){gl.M(e,t);var n=xi;if(n&&e){var l=Yt(n).hoistableScripts,a=Ei(e),i=l.get(a);i||(i=n.querySelector(gu(a)),i||(e=_({src:e,async:!0,type:"module"},t),(t=wn.get(a))&&Go(e,t),i=n.createElement("script"),ht(i),Ht(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function R0(e,t,n,l){var a=(a=ve.current)?Cs(a):null;if(!a)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Si(n.href),n=Yt(a).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Si(n.href);var i=Yt(a).hoistableStyles,c=i.get(e);if(c||(a=a.ownerDocument||a,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,c),(i=a.querySelector(mu(e)))&&!i._p&&(c.instance=i,c.state.loading=5),wn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},wn.set(e,n),i||bm(a,e,n,c.state))),t&&l===null)throw Error(r(528,""));return c}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ei(n),n=Yt(a).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Si(e){return'href="'+Ge(e)+'"'}function mu(e){return'link[rel="stylesheet"]['+e+"]"}function _0(e){return _({},e,{"data-precedence":e.precedence,precedence:null})}function bm(e,t,n,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}),Ht(t,"link",n),ht(t),e.head.appendChild(t))}function Ei(e){return'[src="'+Ge(e)+'"]'}function gu(e){return"script[async]"+e}function L0(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Ge(n.href)+'"]');if(l)return t.instance=l,ht(l),l;var a=_({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),ht(l),Ht(l,"style",a),js(l,n.precedence,e),t.instance=l;case"stylesheet":a=Si(n.href);var i=e.querySelector(mu(a));if(i)return t.state.loading|=4,t.instance=i,ht(i),i;l=_0(n),(a=wn.get(a))&&Yo(l,a),i=(e.ownerDocument||e).createElement("link"),ht(i);var c=i;return c._p=new Promise(function(m,y){c.onload=m,c.onerror=y}),Ht(i,"link",l),t.state.loading|=4,js(i,n.precedence,e),t.instance=i;case"script":return i=Ei(n.src),(a=e.querySelector(gu(i)))?(t.instance=a,ht(a),a):(l=n,(a=wn.get(i))&&(l=_({},n),Go(l,a)),e=e.ownerDocument||e,a=e.createElement("script"),ht(a),Ht(a,"link",l),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,js(l,n.precedence,e));return t.instance}function js(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=l.length?l[l.length-1]:null,i=a,c=0;c<l.length;c++){var m=l[c];if(m.dataset.precedence===t)i=m;else if(i!==a)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Yo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Go(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var As=null;function U0(e,t,n){if(As===null){var l=new Map,a=As=new Map;a.set(n,l)}else a=As,l=a.get(n),l||(l=new Map,a.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var i=n[a];if(!(i[ia]||i[vt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var c=i.getAttribute(t)||"";c=e+c;var m=l.get(c);m?m.push(i):l.set(c,[i])}}return l}function k0(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function xm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function B0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Sm(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var a=Si(l.href),i=t.querySelector(mu(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ns.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,ht(i);return}i=t.ownerDocument||t,l=_0(l),(a=wn.get(a))&&Yo(l,a),i=i.createElement("link"),ht(i);var c=i;c._p=new Promise(function(m,y){c.onload=m,c.onerror=y}),Ht(i,"link",l),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Ns.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Xo=0;function Em(e,t){return e.stylesheets&&e.count===0&&Ds(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&Ds(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Xo===0&&(Xo=62500*nm());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ds(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Xo?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(a)}}:null}function Ns(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ds(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ts=null;function Ds(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ts=new Map,t.forEach(wm,e),Ts=null,Ns.call(e))}function wm(e,t){if(!(t.state.loading&4)){var n=Ts.get(e);if(n)var l=n.get(null);else{n=new Map,Ts.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var c=a[i];(c.nodeName==="LINK"||c.getAttribute("media")!=="not all")&&(n.set(c.dataset.precedence,c),l=c)}l&&n.set(null,l)}a=t.instance,c=a.getAttribute("data-precedence"),i=n.get(c)||l,i===l&&n.set(null,a),n.set(c,a),this.count++,l=Ns.bind(this),a.addEventListener("load",l),a.addEventListener("error",l),i?i.parentNode.insertBefore(a,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var pu={$$typeof:W,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function Mm(e,t,n,l,a,i,c,m,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=dt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dt(0),this.hiddenUpdates=dt(null),this.identifierPrefix=l,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=y,this.incompleteTransitions=new Map}function H0(e,t,n,l,a,i,c,m,y,N,H,X){return e=new Mm(e,t,n,c,y,N,H,X,m),t=1,i===!0&&(t|=24),i=on(3,null,null,t),e.current=i,i.stateNode=e,t=Sc(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:l,isDehydrated:n,cache:t},Cc(i),e}function q0(e){return e?(e=Pa,e):Pa}function Y0(e,t,n,l,a,i){a=q0(a),l.context===null?l.context=a:l.pendingContext=a,l=Ol(t),l.payload={element:n},i=i===void 0?null:i,i!==null&&(l.callback=i),n=Rl(e,l,t),n!==null&&(un(n,e,t),$i(n,e,t))}function G0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Qo(e,t){G0(e,t),(e=e.alternate)&&G0(e,t)}function X0(e){if(e.tag===13||e.tag===31){var t=ha(e,67108864);t!==null&&un(t,e,67108864),Qo(e,67108864)}}function Q0(e){if(e.tag===13||e.tag===31){var t=mn();t=Sl(t);var n=ha(e,t);n!==null&&un(n,e,t),Qo(e,t)}}var zs=!0;function Cm(e,t,n,l){var a=D.T;D.T=null;var i=Z.p;try{Z.p=2,Zo(e,t,n,l)}finally{Z.p=i,D.T=a}}function jm(e,t,n,l){var a=D.T;D.T=null;var i=Z.p;try{Z.p=8,Zo(e,t,n,l)}finally{Z.p=i,D.T=a}}function Zo(e,t,n,l){if(zs){var a=Vo(l);if(a===null)zo(e,t,l,Os,n),V0(e,l);else if(Nm(a,e,t,n,l))l.stopPropagation();else if(V0(e,l),t&4&&-1<Am.indexOf(e)){for(;a!==null;){var i=El(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var c=be(i.pendingLanes);if(c!==0){var m=i;for(m.pendingLanes|=2,m.entangledLanes|=2;c;){var y=1<<31-ct(c);m.entanglements[1]|=y,c&=~y}qn(i),(Ke&6)===0&&(ms=yt()+500,ru(0))}}break;case 31:case 13:m=ha(i,2),m!==null&&un(m,i,2),ps(),Qo(i,2)}if(i=Vo(l),i===null&&zo(e,t,l,Os,n),i===a)break;a=i}a!==null&&l.stopPropagation()}else zo(e,t,l,null,n)}}function Vo(e){return e=Di(e),Ko(e)}var Os=null;function Ko(e){if(Os=null,e=Vn(e),e!==null){var t=g(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=v(t),e!==null)return e;e=null}else if(n===31){if(e=M(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Os=e,null}function Z0(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(Il()){case Pl:return 2;case ea:return 8;case vl:case Da:return 32;case Gn:return 268435456;default:return 32}default:return 32}}var $o=!1,Ql=null,Zl=null,Vl=null,yu=new Map,vu=new Map,Kl=[],Am="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 V0(e,t){switch(e){case"focusin":case"focusout":Ql=null;break;case"dragenter":case"dragleave":Zl=null;break;case"mouseover":case"mouseout":Vl=null;break;case"pointerover":case"pointerout":yu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":vu.delete(t.pointerId)}}function bu(e,t,n,l,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:i,targetContainers:[a]},t!==null&&(t=El(t),t!==null&&X0(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Nm(e,t,n,l,a){switch(t){case"focusin":return Ql=bu(Ql,e,t,n,l,a),!0;case"dragenter":return Zl=bu(Zl,e,t,n,l,a),!0;case"mouseover":return Vl=bu(Vl,e,t,n,l,a),!0;case"pointerover":var i=a.pointerId;return yu.set(i,bu(yu.get(i)||null,e,t,n,l,a)),!0;case"gotpointercapture":return i=a.pointerId,vu.set(i,bu(vu.get(i)||null,e,t,n,l,a)),!0}return!1}function K0(e){var t=Vn(e.target);if(t!==null){var n=g(t);if(n!==null){if(t=n.tag,t===13){if(t=v(n),t!==null){e.blockedOn=t,la(e.priority,function(){Q0(n)});return}}else if(t===31){if(t=M(n),t!==null){e.blockedOn=t,la(e.priority,function(){Q0(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Vo(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);Ti=l,n.target.dispatchEvent(l),Ti=null}else return t=El(n),t!==null&&X0(t),e.blockedOn=n,!1;t.shift()}return!0}function $0(e,t,n){Rs(e)&&n.delete(t)}function Tm(){$o=!1,Ql!==null&&Rs(Ql)&&(Ql=null),Zl!==null&&Rs(Zl)&&(Zl=null),Vl!==null&&Rs(Vl)&&(Vl=null),yu.forEach($0),vu.forEach($0)}function _s(e,t){e.blockedOn===t&&(e.blockedOn=null,$o||($o=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,Tm)))}var Ls=null;function J0(e){Ls!==e&&(Ls=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){Ls===e&&(Ls=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],a=e[t+2];if(typeof l!="function"){if(Ko(l||n)===null)continue;break}var i=El(n);i!==null&&(e.splice(t,3),t-=3,Zc(i,{pending:!0,data:a,method:n.method,action:l},l,a))}}))}function wi(e){function t(y){return _s(y,e)}Ql!==null&&_s(Ql,e),Zl!==null&&_s(Zl,e),Vl!==null&&_s(Vl,e),yu.forEach(t),vu.forEach(t);for(var n=0;n<Kl.length;n++){var l=Kl[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Kl.length&&(n=Kl[0],n.blockedOn===null);)K0(n),n.blockedOn===null&&Kl.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var a=n[l],i=n[l+1],c=a[Rt]||null;if(typeof i=="function")c||J0(n);else if(c){var m=null;if(i&&i.hasAttribute("formAction")){if(a=i,c=i[Rt]||null)m=c.formAction;else if(Ko(a)!==null)continue}else m=c.action;typeof m=="function"?n[l+1]=m:(n.splice(l,3),l-=3),J0(n)}}}function F0(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(c){return a=c})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function Jo(e){this._internalRoot=e}Us.prototype.render=Jo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var n=t.current,l=mn();Y0(n,l,e,t,null,null)},Us.prototype.unmount=Jo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Y0(e.current,2,null,e,null,null),ps(),t[Zn]=null}};function Us(e){this._internalRoot=e}Us.prototype.unstable_scheduleHydration=function(e){if(e){var t=Qn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Kl.length&&t!==0&&t<Kl[n].priority;n++);Kl.splice(n,0,e),n===0&&K0(e)}};var W0=s.version;if(W0!=="19.2.8")throw Error(r(527,W0,"19.2.8"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=x(t),e=e!==null?R(e):null,e=e===null?null:e.stateNode,e};var Dm={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ks=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ks.isDisabled&&ks.supportsFiber)try{It=ks.inject(Dm),Tt=ks}catch{}}return Su.createRoot=function(e,t){if(!d(e))throw Error(r(299));var n=!1,l="",a=ad,i=id,c=ud;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=H0(e,1,!1,null,null,n,l,null,a,i,c,F0),e[Zn]=t.current,Do(e),new Jo(t)},Su.hydrateRoot=function(e,t,n){if(!d(e))throw Error(r(299));var l=!1,a="",i=ad,c=id,m=ud,y=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(m=n.onRecoverableError),n.formState!==void 0&&(y=n.formState)),t=H0(e,1,!0,t,n??null,l,a,y,i,c,m,F0),t.context=q0(null),n=t.current,l=mn(),l=Sl(l),a=Ol(l),a.callback=null,Rl(n,a,l),n=l,t.current.lanes=n,Kt(t,n),qn(t),e[Zn]=t.current,Do(e),new Us(t)},Su.version="19.2.8",Su}var s1;function qm(){if(s1)return Io.exports;s1=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(s){console.error(s)}}return u(),Io.exports=Hm(),Io.exports}var Ym=qm();function nr(u,s,f){return u+(s-u)*f}function U1(u){return u-Math.floor(u)}function lr(u,s){const f=Math.floor(u),r=Math.floor(s);let d=u-f,g=s-r;d=d*d*(3-2*d),g=g*g*(3-2*g);const v=jn(f,r),M=jn(f+1,r),E=jn(f,r+1),x=jn(f+1,r+1);return v+(M-v)*d+(E-v)*g+(v-M-E+x)*d*g}function jn(u,s){const f=Math.sin(u*12.9898+s*78.233)*43758.5453;return f-Math.floor(f)}function Sr(u,s){const f=Math.PI*(3-Math.sqrt(5)),r=1-2*(u+.5)/s,d=Math.sqrt(1-r*r),g=u*f;return[d*Math.cos(g),r,d*Math.sin(g)]}function Gm(u,s){return Math.atan2(Math.sin(u-s),Math.cos(u-s))}function Aa(u,s,f,r,d){const g=Math.sin(s),v=Math.cos(s),M=Math.sin(u),E=Math.cos(u);return(x,R,_)=>{const k=x*E+_*M,q=-x*M+_*E,O=R*v-q*g,ee=R*g+q*v;return[f+k*d,r-O*d,ee]}}function Fl(u,s,f,r=.3){s.sort((d,g)=>d.z-g.z);for(const d of s){const g=d.a??1;if(g<.02)continue;const v=Math.min(1,Math.max(0,d.white)),M=Math.round((f?1-v:v)*255);u.fillStyle=`rgba(${M},${M},${M},${g})`,u.beginPath(),u.arc(d.x,d.y,Math.max(r,d.r),0,Math.PI*2),u.fill()}}function Xm(u,s,f){for(const r of s){const d=r.a??1;if(d<.02)continue;const g=Math.min(1,Math.max(0,r.white)),v=Math.round((f?1-g:g)*255);u.strokeStyle=`rgba(${v},${v},${v},${d})`,u.lineWidth=r.w,u.beginPath(),u.moveTo(r.x1,r.y1),u.lineTo(r.x2,r.y2),u.stroke()}}function Na(u,s){return(u/300)**s}const Qm=(u,s,f,r,d)=>{const g=s/2,v=s/2,M=s/2*.76,E=Aa(f*.4,.3,g,v,1),x=Na(s,d.rsPow??.6),R=[],_=d.ghostN??150;for(let O=0;O<_;O++){const ee=Sr(O,_),[se,V,Q]=E(ee[0]*M,ee[1]*M,ee[2]*M),W=(Q/M+1)/2;R.push({x:se,y:V,z:Q,r:.8*x,white:.78,a:.1+.22*W})}const k=d.strandN??52,q=d.turns??3;for(let O=0;O<3;O++){const ee=O/3*2*Math.PI;for(let se=0;se<k;se++){const V=(U1(se/k+f*.045)*2-1)*.96,Q=Math.sqrt(Math.max(0,1-V*V)),W=Math.min(1,(1-Math.abs(V))/.1),ie=V*Math.PI*q+ee,ue=1+.075*Math.sin(V*Math.PI*q*2+ee*2+f*.8),p=Q*M*ue,[I,fe,me]=E(Math.cos(ie)*p,V*M*ue,Math.sin(ie)*p),ge=(me/M+1)/2;R.push({x:I,y:fe,z:me,r:((d.rBase??1.2)+(d.rDepth??1.8)*ge)*x,white:.55-.45*ge,a:W*(.45+.55*ge)})}}Fl(u,R,r,d.rMin)};function Zm(u,s,f,r){const d=2*s*f+r,g=u%d,v=new Array(s).fill(0);let M=-1;if(g<2*s*f){const E=Math.floor(g/f),x=(g-E*f)/f,R=1-(1-Math.min(1,x/.7))**3;if(E<s){for(let _=0;_<E;_++)v[_]=1;v[E]=R,M=E}else{const _=2*s-1-E;for(let k=0;k<_;k++)v[k]=1;v[_]=1-R,M=_}}return{amount:v,active:M}}function Vm(u,s,f){let[r,d,g]=u,v=!1;for(let M=0;M<s.length;M++){if(f.amount[M]<=0)continue;const E=s[M],x=E.axis===0?r:E.axis===1?d:g;if(x<E.lo||x>=E.hi)continue;M===f.active&&(v=!0);const R=E.ang*f.amount[M],_=Math.cos(R),k=Math.sin(R);if(E.axis===0){const q=d*_-g*k;g=d*k+g*_,d=q}else if(E.axis===1){const q=r*_+g*k;g=-r*k+g*_,r=q}else{const q=r*_-d*k;d=r*k+d*_,r=q}}return[r,d,g,v]}function Km(u){const s=[];for(let f=0;f<u;f++){const r=Math.min(2,Math.floor(jn(f,2.3)*3)),d=-1+.5*Math.min(3,Math.floor(jn(f,5.9)*4)),g=jn(f,7.7)<.5?1:-1;s.push({axis:r,lo:d,hi:d+.5,ang:g*Math.PI/2})}return s}const $m=(u,s,f,r,d)=>{const g=s/2,v=s/2,M=s/2*.82,E=.4+.06*Math.sin(f*.35),x=Aa(f*.5,E,g,v,M),R=f*(.5+(1.7-.5)*(d.scanMul??1)),_=Na(s,d.rsPow??.6),k=d.dimBase??1,q=[],O=d.latRings??17,ee=d.lonDensity??44;for(let se=0;se<=O;se++){const V=-Math.PI/2+se/O*Math.PI,Q=Math.cos(V),W=Math.sin(V),ie=Math.max(1,Math.round(Math.abs(Q)*ee));for(let ue=0;ue<ie;ue++){const p=ue/ie*2*Math.PI,[I,fe,me]=x(Q*Math.cos(p),W,Q*Math.sin(p)),ge=(me+1)/2,Me=Gm(p+f*.5,R),he=Math.exp(-(Me*Me)/.18)*Math.max(0,me);q.push({x:I,y:fe,z:me,r:((d.rBase??.6)+(d.rDepth??1.7)*ge+(d.rBoost??1)*he)*_,white:(d.inkFar??.62)-(d.inkSpan??.54)*ge,a:k+(1-k)*Math.min(1,he)})}}Fl(u,q,r,d.rMin)},Jm=(u,s,f,r,d)=>{const g=s/2,v=s/2,M=s/2*.82,E=Aa(f*.55,.35+.1*Math.sin(f*.9),g,v,M),x=Na(s,d.rsPow??.6),R=d.moveCount??14,_=Km(R),k=Zm(f,R,.42,1.2),q=[],O=d.latRings??15,ee=d.lonDensity??40;for(let se=0;se<=O;se++){const V=-Math.PI/2+se/O*Math.PI,Q=Math.cos(V),W=Math.sin(V),ie=Math.max(1,Math.round(Math.abs(Q)*ee));for(let ue=0;ue<ie;ue++){const p=ue/ie*2*Math.PI,[I,fe,me,ge]=Vm([Q*Math.cos(p),W,Q*Math.sin(p)],_,k),[Me,he,qe]=E(I,fe,me),Ae=(qe+1)/2;q.push({x:Me,y:he,z:qe,r:((d.rBase??.6)+(d.rDepth??1.7)*Ae+(ge?d.rActive??.3:0))*x,white:(d.inkFar??.62)-(d.inkSpan??.54)*Ae-(ge?.14:0)})}}Fl(u,q,r,d.rMin)},Fm=(u,s,f,r,d)=>{const g=s/2,v=s/2,M=s/2*.874,E=Aa(f*.18,.38,g,v,1),x=Na(s,d.rsPow??.6),R=[],_=d.rings??15,k=d.lonDensity??40;for(let q=0;q<=_;q++){const O=-Math.PI/2+q/_*Math.PI,ee=Math.cos(O),se=Math.sin(O),V=.62*Math.sin(f*2.1-q*.52)+.38*Math.sin(f*1.27+q*.83),Q=M*(.88+.105*V),W=Math.max(1,Math.round(Math.abs(ee)*k));for(let ie=0;ie<W;ie++){const ue=ie/W*2*Math.PI,[p,I,fe]=E(ee*Math.cos(ue)*Q,se*Q,ee*Math.sin(ue)*Q),me=(fe/M+1)/2,ge=Math.max(0,V);R.push({x:p,y:I,z:fe,r:((d.rBase??.6)+(d.rDepth??1.7)*me)*(1+.4*ge)*x,white:.66-.56*me-.1*ge})}}Fl(u,R,r,d.rMin)};function Wm(u){return u*u*(3-2*u)}function k1(u){const s=u.length,f=[];let r=0;for(let d=0;d<s;d++){const g=u[d],v=u[(d+1)%s],M=Math.hypot(v[0]-g[0],v[1]-g[1]);f.push(M),r+=M}return d=>{let g=d*r,v=0;for(;g>f[v]&&v<s-1;)g-=f[v],v++;const M=u[v],E=u[(v+1)%s],x=f[v]?Math.min(1,g/f[v]):0;return[M[0]+(E[0]-M[0])*x,M[1]+(E[1]-M[1])*x]}}const Im=u=>{const s=-Math.PI/2+u*2*Math.PI;return[Math.cos(s)*.24,Math.sin(s)*.24]},Pm=k1([[0,-.26],[.24,.16],[-.24,.16]]),eg=k1([[0,-.2],[.2,-.2],[.2,.2],[-.2,.2],[-.2,-.2]]),ar=[Im,Pm,eg];function tg(u){return Math.max(6,Math.round(34*u))}const hr=1.4,B1=.9,ir=hr+B1,ng=(u,s,f,r,d)=>{const g=ar.length,v=f%(ir*g),M=Math.floor(v/ir),E=v-M*ir,x=E>hr?Wm((E-hr)/B1):0,R=d.spread??1,_=ar[M],k=ar[(M+1)%g],q=160,O=[];for(let fe=0;fe<q;fe++){const me=fe/q,ge=_(me),Me=k(me);O.push([(ge[0]+(Me[0]-ge[0])*x)*R,(ge[1]+(Me[1]-ge[1])*x)*R])}const ee=[];let se=0;for(let fe=0;fe<q;fe++){const me=O[fe],ge=O[(fe+1)%q],Me=Math.hypot(ge[0]-me[0],ge[1]-me[1]);ee.push(Me),se+=Me}const V=tg(d.iconD??1),Q=(d.rDot??.021)*1.35*R,W=1+.02*Math.sin(E*3.1),ie=[],ue=s/2;let p=0,I=0;for(let fe=0;fe<V;fe++){const me=fe/V*se;for(;I+ee[p]<me&&p<q-1;)I+=ee[p],p++;const ge=O[p],Me=O[(p+1)%q],he=ee[p]?Math.min(1,(me-I)/ee[p]):0,qe=(ge[0]+(Me[0]-ge[0])*he)*W,Ae=(ge[1]+(Me[1]-ge[1])*he)*W;ie.push({x:ue+qe*s,y:ue+Ae*s,z:0,r:Math.max(.35,Q*s),white:.1})}Fl(u,ie,r,d.rMin)},lg=(u,s,f,r,d)=>{const g=s/2,v=s/2,M=s/2*.82,E=Aa(f*.12,.3,g,v,1),x=Na(s,d.rsPow??.6),R=[],_=d.orbitN??12,k=d.ghostN??40,q=d.particles??3;for(let O=0;O<_;O++){const ee=jn(O,1.7),se=jn(O,5.2),V=jn(O,8.9),Q=M*(.45+.52*ee),W=ee*2*Math.PI,ie=Math.acos(2*se-1),ue=Math.sin(ie)*Math.cos(W),p=Math.cos(ie),I=Math.sin(ie)*Math.sin(W);let fe=-p,me=ue;const ge=0,Me=Math.max(1e-6,Math.sqrt(fe*fe+me*me));fe/=Me,me/=Me;const he=p*ge-I*me,qe=I*fe-ue*ge,Ae=ue*me-p*fe,Be=(.25+.55*V)*(V>.5?1:-1);for(let D=0;D<k;D++){const Z=D/k*2*Math.PI,[ne,xe,Ce]=E((fe*Math.cos(Z)+he*Math.sin(Z))*Q,(me*Math.cos(Z)+qe*Math.sin(Z))*Q,(ge*Math.cos(Z)+Ae*Math.sin(Z))*Q),b=(Ce/Q+1)/2;R.push({x:ne,y:xe,z:Ce,r:(d.ghostR??.9)*x,white:.72,a:(d.ghostA??.5)*(.4+.6*b)})}for(let D=0;D<q;D++){const Z=f*Be+D/q*2*Math.PI+se*6,[ne,xe,Ce]=E((fe*Math.cos(Z)+he*Math.sin(Z))*Q,(me*Math.cos(Z)+qe*Math.sin(Z))*Q,(ge*Math.cos(Z)+Ae*Math.sin(Z))*Q),b=(Ce/Q+1)/2;R.push({x:ne,y:xe,z:Ce,r:((d.partR??1.2)+(d.partRDepth??1.6)*b)*x,white:.3-.22*b})}}Fl(u,R,r,d.rMin)},c1=(u,s,f,r,d)=>{const g=s/2,v=s/2,M=s/2*.78,E=d.spin??1,x=.3,R=Aa(f*.1*E,x,g,v,1),_=Na(s,d.rsPow??.6),k=[],q=d.ghostN??150;for(let Ae=0;Ae<q;Ae++){const Be=Sr(Ae,q),[D,Z,ne]=R(Be[0]*M,Be[1]*M,Be[2]*M),xe=(ne/M+1)/2;k.push({x:D,y:Z,z:ne,r:.8*_,white:.78,a:.1+.22*xe})}const O=f*.24*E,ee=d.faceOn?-x:.55+.3*Math.sin(f*.18)*E,se=Math.cos(O),V=0,Q=Math.sin(O),W=-Q*Math.sin(ee),ie=Math.cos(ee),ue=se*Math.sin(ee),p=V*ue-Q*ie,I=Q*W-se*ue,fe=se*ie-V*W,me=.23*(d.wobMul??1),ge=d.faceOn?M/(1+.85*me):M,Me=d.lanes??5,he=d.segs??88,qe=Math.max(1,Math.round(Me*(d.bandMul??1)));for(let Ae=0;Ae<qe;Ae++){const Be=(Ae-(qe-1)/2)*.075,D=Math.abs(Ae-(qe-1)/2)/Math.max(1,(qe-1)/2);for(let Z=0;Z<he;Z++){const ne=Z/he*2*Math.PI,xe=(.16*Math.sin(ne*3-f*1.7+Ae*.22)+.07*Math.sin(ne*5+f*1.1))*(d.wobMul??1),Ce=d.faceOn?1+xe:1,b=d.faceOn?Be:Be+xe,L=se*Math.cos(ne)+W*Math.sin(ne)+p*b,F=V*Math.cos(ne)+ie*Math.sin(ne)+I*b,te=Q*Math.cos(ne)+ue*Math.sin(ne)+fe*b,oe=Math.sqrt(L*L+F*F+te*te),ve=ge*Ce,[U,K,J]=R(L/oe*ve,F/oe*ve,te/oe*ve),le=(J/M+1)/2;k.push({x:U,y:K,z:J,r:((d.rBase??1.1)+(d.rDepth??1.7)*le)*(1-.25*D)*_,white:.52-.44*le+.18*D,a:.4+.6*le})}}Fl(u,k,r,d.rMin)},ag=(u,s,f,r,d)=>{const g=s/2,v=s/2,M=s/2*.8*(d.spread??1),E=Aa(f*.12,.32,g,v,M),x=Na(s,d.rsPow??.6),R=d.nodeN??30,_=d.thr??.72,k=d.nodeR??1.4,q=d.nodeRDepth??1.8,O=[];for(let Q=0;Q<R;Q++){const W=Sr(Q,R),ie=W[0]+.3*(lr(Q*.31+9,f*.24)-.5)*2,ue=W[1]+.3*(lr(Q*.53+27,f*.21)-.5)*2,p=W[2]+.3*(lr(Q*.77+55,f*.27)-.5)*2,I=Math.sqrt(ie*ie+ue*ue+p*p);O.push([ie/I,ue/I,p/I])}const ee=[],se=[];for(let Q=0;Q<R;Q++)for(let W=Q+1;W<R;W++){const ie=O[Q][0]-O[W][0],ue=O[Q][1]-O[W][1],p=O[Q][2]-O[W][2],I=Math.sqrt(ie*ie+ue*ue+p*p);if(I>=_)continue;const[fe,me,ge]=E(O[Q][0],O[Q][1],O[Q][2]),[Me,he,qe]=E(O[W][0],O[W][1],O[W][2]),Ae=((ge+qe)/2+1)/2;ee.push({x1:fe,y1:me,x2:Me,y2:he,white:.42,a:(1-I/_)*(.3+.55*Ae),w:Math.max(.6,(d.lineW??.8)*x)})}for(let Q=0;Q<R;Q++){const[W,ie,ue]=E(O[Q][0],O[Q][1],O[Q][2]),p=(ue+1)/2,I=1+.25*Math.sin(f*1.4+Q*2.7);se.push({x:W,y:ie,z:ue,r:(k+q*p)*I*x,white:.55-.45*p})}const V=d.signals??5;for(let Q=0;Q<V;Q++){const W=Math.floor(f*.55+Q*7.31),ie=Math.floor(jn(W,Q*3.1+1.7)*R),ue=Math.floor(jn(W,Q*5.7+4.2)*R);if(ie===ue)continue;const p=U1(f*.55+Q*7.31),I=nr(O[ie][0],O[ue][0],p),fe=nr(O[ie][1],O[ue][1],p),me=nr(O[ie][2],O[ue][2],p),ge=Math.max(1e-6,Math.sqrt(I*I+fe*fe+me*me)),[Me,he,qe]=E(I/ge,fe/ge,me/ge),Ae=(qe+1)/2;se.push({x:Me,y:he,z:qe,r:(k*1.5+q*Ae)*x,white:.05,a:.5+.5*Ae})}Xm(u,ee,r),Fl(u,se,r,d.rMin)},ig={orbits:lg,globe:$m,rubik:Jm,wave:Fm,web:ag,braid:Qm,ribbon:c1,ring:c1,morph:ng},ug=[["latRings","lonDensity"],["rings","lonDensity"],["lanes","segs"]],sg=["orbitN","ghostN","nodeN","strandN","signals"],cg=["iconD"],og=["rBase","rDepth","rActive","rDot","ghostR","partR","partRDepth","nodeR","nodeRDepth"];function rg(u,s){const f={...u},r=new Set,d=Math.sqrt(s);for(const[g,v]of ug){const M=f[g],E=f[v];M!=null&&E!=null&&!r.has(g)&&!r.has(v)&&(f[g]=Math.max(2,Math.round(M*d)),f[v]=Math.max(2,Math.round(E*d)),r.add(g),r.add(v))}for(const g of sg){const v=f[g];v!=null&&v!==0&&!r.has(g)&&(f[g]=Math.max(1,Math.round(v*s)))}for(const g of cg){const v=f[g];v!=null&&(f[g]=Math.max(.02,v*s))}return f}function fg(u,s){const f={...u};for(const r of og){const d=f[r];d!=null&&(f[r]=d*s)}return f.rSizeMul=(f.rSizeMul??1)*s,f}const dg={globe:{latRings:17,lonDensity:44,rBase:.6,rDepth:1.7,rBoost:1,inkFar:.62,inkSpan:.54,rsPow:.6,rMin:.3},orbits:{orbitN:12,ghostN:40,ghostR:.9,ghostA:.5,particles:3,partR:1.2,partRDepth:1.6,rsPow:.6,rMin:.3},rubik:{latRings:15,lonDensity:40,moveCount:14,rBase:.6,rDepth:1.7,rActive:.3,inkFar:.62,inkSpan:.54,rsPow:.6,rMin:.3},wave:{rings:15,lonDensity:40,rBase:.6,rDepth:1.7,rsPow:.6,rMin:.3},web:{nodeN:30,thr:.72,signals:5,nodeR:1.4,nodeRDepth:1.8,lineW:.8,rsPow:.6,rMin:.3},braid:{strandN:52,turns:3,ghostN:150,rBase:1.2,rDepth:1.8,rsPow:.6,rMin:.3},ribbon:{lanes:5,segs:88,ghostN:150,rBase:1.1,rDepth:1.7,rsPow:.6,rMin:.3},ring:{lanes:5,segs:88,ghostN:0,faceOn:1,rBase:1.1,rDepth:1.7,rsPow:.6,rMin:.3},morph:{rDot:.021,iconD:1,rMin:.25}},hg={working:"orbits",searching:"globe",solving:"rubik",listening:"wave",connecting:"web",weaving:"braid",composing:"ribbon",breathing:"ring",shaping:"morph"},mg={orbits:{64:{speed:1.885,count:1,size:1},20:{speed:3.9,count:.238,size:2.4}},globe:{64:{speed:2.015,count:.42,size:1.15,extra:{scanMul:4.08,dimBase:.45}},20:{speed:2.665,count:.105,size:1.75,extra:{scanMul:4.335,dimBase:.45}}},rubik:{64:{speed:1.82,count:.35,size:1.05},20:{speed:1.95,count:.088,size:1.9}},wave:{64:{speed:4.388,count:.341,size:1},20:{speed:3.998,count:.105,size:1.6}},web:{64:{speed:3.315,count:1.35,size:.95},20:{speed:6.63,count:.25,size:1.52}},braid:{64:{speed:1.625,count:.5,size:1},20:{speed:2.75,count:.1125,size:1.36}},ribbon:{64:{speed:2.34,count:.25,size:.85,extra:{spin:0,bandMul:3.9,wobMul:1}},20:{speed:3.12,count:.051,size:1.073,extra:{spin:0,bandMul:4.94,wobMul:1}}},ring:{64:{speed:3.24,count:.25,size:.956,extra:{spin:0,bandMul:3.627,wobMul:.368}},20:{speed:3.78,count:.028,size:1.622,extra:{spin:0,bandMul:3.968,wobMul:.565}}},morph:{64:{speed:2.405,count:.702,size:.395,extra:{spread:1.45}},20:{speed:2.08,count:.53,size:1.011,extra:{spread:1.45}}}},o1=new Map;function gg(u,s){const f=`${u}-${s}`,r=o1.get(f);if(r)return r;const d=hg[u],g=mg[d][s];let v={...dg[d]};g.count!==1&&(v=rg(v,g.count)),g.size!==1&&(v=fg(v,g.size)),g.extra&&(v={...v,...g.extra});const M={mode:d,speed:g.speed,opts:v};return o1.set(f,M),M}function pg(u){let s=u;for(;s;){const f=s.getAttribute("data-theme");if(f==="dark")return!0;if(f==="light")return!1;if(s.classList.contains("dark"))return!0;if(s.classList.contains("light"))return!1;s=s.parentElement}return null}function yg(){return typeof matchMedia>"u"||matchMedia("(prefers-color-scheme: dark)").matches}function vg(u,s){const[f,r]=C.useState(!0);return C.useEffect(()=>{if(u==="dark"){r(!0);return}if(u==="light"){r(!1);return}const d=()=>{const E=pg(s.current);r(E??yg())};d();const g=typeof matchMedia<"u"?matchMedia("(prefers-color-scheme: dark)"):null,v=()=>d();g?.addEventListener("change",v);let M=null;return typeof MutationObserver<"u"&&s.current&&(M=new MutationObserver(d),M.observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"],subtree:!0})),()=>{g?.removeEventListener("change",v),M?.disconnect()}},[u,s]),f}function bg(){const[u,s]=C.useState(!1);return C.useEffect(()=>{if(typeof matchMedia>"u")return;const f=matchMedia("(prefers-reduced-motion: reduce)");s(f.matches);const r=d=>s(d.matches);return f.addEventListener("change",r),()=>f.removeEventListener("change",r)},[]),u}const xg={working:"Working…",searching:"Searching…",solving:"Solving…",listening:"Listening…",connecting:"Connecting…",weaving:"Weaving…",composing:"Composing…",breathing:"Thinking…",shaping:"Shaping…"};function mr({state:u="working",size:s=64,theme:f="auto",speed:r=1,paused:d=!1,style:g,"aria-label":v,...M}){const E=C.useRef(null),x=vg(f,E),R=bg();return C.useEffect(()=>{const _=E.current;if(!_)return;const k=Math.min(2,typeof devicePixelRatio<"u"&&devicePixelRatio||1);_.width=Math.round(s*k),_.height=Math.round(s*k);const q=_.getContext("2d");if(!q)return;const{mode:O,speed:ee,opts:se}=gg(u,s),V=ig[O],Q=ee*r,W=he=>{q.setTransform(k,0,0,k,0,0),q.clearRect(0,0,s,s),V(q,s,he,x,se)};if(R){W(.6);return}let ie=0,ue=!1;const p=()=>{W(performance.now()/1e3*Q),ue&&(ie=requestAnimationFrame(p))},I=()=>{ue||d||(ue=!0,ie=requestAnimationFrame(p))},fe=()=>{ue=!1,cancelAnimationFrame(ie)};W(performance.now()/1e3*Q);let me=!0;const ge=typeof IntersectionObserver<"u"?new IntersectionObserver(([he])=>{me=he.isIntersecting,me&&document.visibilityState!=="hidden"?I():fe()}):null;ge?.observe(_);const Me=()=>{document.visibilityState==="hidden"?fe():me&&I()};return document.addEventListener("visibilitychange",Me),ge||I(),()=>{fe(),ge?.disconnect(),document.removeEventListener("visibilitychange",Me)}},[u,s,x,r,d,R]),o.jsx("canvas",{ref:E,role:"img","aria-label":v??xg[u],style:{width:s,height:s,display:"block",...g},...M})}const ur=["searching","solving","composing","breathing","shaping"];function Sg(u){const s=Math.floor(u*ur.length);return ur[Math.min(ur.length-1,Math.max(0,s))]}const gr=Sg(Math.random()),ja="ease-[cubic-bezier(0.32,0.72,0,1)]",H1=274,q1=395,Y1=368,G1=[{label:"Full",width:null},{label:"1440",width:1440},{label:"834",width:834},{label:"390",width:390}],Jl={collapsed:!1,collapsedFamilies:[],deleted:[],corner:"bottom-right",font:"satoshi",hidden:[],order:[],renames:{},scaleSplit:!0,showDevOverlays:!0,showWidget:!0,viewport:null,width:Y1};function Eg(u){return`leglas:${u}`}function wg(u,s){const f=s.map(r=>r.title);try{if(!u)return{...Jl,order:f};const r=JSON.parse(u),d={...Jl,...r},g=(Array.isArray(d.deleted)?d.deleted:[]).filter(x=>f.includes(x)),v=f.filter(x=>!g.includes(x)),M=(Array.isArray(d.order)?d.order:[]).filter(x=>v.includes(x)),E=["bottom-left","bottom-right","top-left","top-right"];return{collapsed:!!d.collapsed,collapsedFamilies:(Array.isArray(d.collapsedFamilies)?d.collapsedFamilies:[]).filter(x=>v.includes(x)),corner:E.includes(d.corner)?d.corner:Jl.corner,deleted:g,font:typeof d.font=="string"?d.font:Jl.font,hidden:(Array.isArray(d.hidden)?d.hidden:[]).filter(x=>v.includes(x)),order:[...M,...v.filter(x=>!M.includes(x))],renames:Object.fromEntries(Object.entries(d.renames??{}).filter(([x])=>v.includes(x))),scaleSplit:typeof r.scaleSplit=="boolean"?r.scaleSplit:Jl.scaleSplit,showDevOverlays:typeof r.showDevOverlays=="boolean"?r.showDevOverlays:Jl.showDevOverlays,showWidget:typeof r.showWidget=="boolean"?r.showWidget:Jl.showWidget,viewport:G1.some(x=>x.width===d.viewport)?d.viewport:null,width:Number.isFinite(d.width)?Math.round(Math.min(q1,Math.max(H1,d.width))):Y1}}catch{return{...Jl,order:f}}}function Mg(u,s){const f=new Set(s),r=Object.fromEntries(Object.entries(u.renames).filter(([d])=>!f.has(d)));return{...u,collapsedFamilies:u.collapsedFamilies.filter(d=>!f.has(d)),deleted:[...new Set([...u.deleted,...s])],hidden:u.hidden.filter(d=>!f.has(d)),order:u.order.filter(d=>!f.has(d)),renames:r}}function Cg(u,s){if(u.length===0)return[...s];const f=new Set(s),r=u.filter(g=>f.has(g)),d=new Set(r);return[...r,...s.filter(g=>!d.has(g))]}function jg(u,s,f,r){const d=s.map(x=>x.title),g=(u.order.length?u.order:d).filter(x=>x!==f),M=g.filter(x=>!u.hidden.includes(x))[r],E=M===void 0?g.length:g.indexOf(M);return g.splice(E,0,f),g}const X1=8,Ag=8;function Ng(u,s,f=X1){return u.left<f?f-u.left:u.right>s-f?Math.max(f-u.left,s-f-u.right):0}function Tg(u,s,f,r=X1){if(u.top>=r)return!1;const d=u.bottom-u.top;return s.bottom+r+d<=f-r}function Dg(u,s,f,r){const d=u.at==="right"?u.x:u.x-s.width/2,g=u.at==="top"?u.y-s.height:u.at==="bottom"?u.y:u.y-s.height/2,v={bottom:g+s.height,left:d,right:d+s.width,top:g};if(u.at==="top"&&Tg(v,f,r.height))return{at:"bottom",shift:u.shift,y:f.bottom+Ag};const M=Ng(v,r.width);return M===u.shift?null:{at:u.at,shift:M,y:u.y}}function wu({size:u=18}){return o.jsxs("svg",{"aria-hidden":!0,height:u,strokeLinejoin:"round",strokeWidth:22,viewBox:"160 370 1050 1320",width:Math.round(u*(1050/1320)),children:[o.jsxs("defs",{children:[o.jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lm-up",x1:"791.957",x2:"210",y1:"723.095",y2:"1010",children:[o.jsx("stop",{offset:"0",stopColor:"#7C38E8"}),o.jsx("stop",{offset:"0.68",stopColor:"#CDB6F1"}),o.jsx("stop",{offset:"1",stopColor:"#E9E0FA"})]}),o.jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lm-down",x1:"789.954",x2:"210",y1:"1330.46",y2:"1035",children:[o.jsx("stop",{offset:"0",stopColor:"#3EC2A8"}),o.jsx("stop",{offset:"0.68",stopColor:"#9EDAE8"}),o.jsx("stop",{offset:"1",stopColor:"#E1F2F6"})]}),o.jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lm-shaft",x1:"884.016",x2:"182",y1:"1023.26",y2:"1023.26",children:[o.jsx("stop",{offset:"0",stopColor:"#7E97DD"}),o.jsx("stop",{offset:"0.48",stopColor:"#5F7FD8"}),o.jsx("stop",{offset:"0.71",stopColor:"#9AABE2"}),o.jsx("stop",{offset:"1",stopColor:"#E2E8F6"})]}),o.jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lm-head",x1:"1192",x2:"874.81",y1:"1021.57",y2:"1024.91",children:[o.jsx("stop",{offset:"0",stopColor:"#E8ECF7"}),o.jsx("stop",{offset:"1",stopColor:"#92A7E0"})]})]}),o.jsx("path",{d:"M 671.122 381.199 C 708.12 378.001 733.579 414.981 702.643 437.984 C 705.64 430.245 708.163 423.315 705.553 415.028 C 700.981 400.516 684.107 396.94 671.252 401.81 C 662.713 405.098 655.849 411.671 652.193 420.059 C 645.933 434.059 649.404 447.111 654.599 460.446 C 665.665 467.718 660.114 472.463 666.664 480.695 C 694.852 516.12 737.817 543.026 774.246 568.848 C 841.225 616.324 905.267 670.31 939.022 747.101 C 953.651 782.815 964.144 815.411 953.49 854.107 C 944.702 886.028 889.413 910.644 901.624 945.63 C 905.247 956.01 926.305 965.294 936.684 957.439 C 947.74 949.072 949.919 942.473 953.06 929.336 C 967.974 962.891 939.504 987.655 907.14 982.376 C 893.109 980.134 880.552 972.384 872.258 960.847 C 839.018 914.253 888.968 876.15 898.307 834.712 C 902.782 814.853 894.952 783.534 888.142 764.672 C 860.48 688.068 798.139 632.327 735.838 583.312 C 700.284 555.045 669.551 529.466 642.632 492.392 C 627.896 510.927 608.893 531.804 593.068 550.006 L 506.523 649.582 L 278.039 912.109 C 245.455 949.199 213.059 986.454 180.851 1023.87 C 231.765 1079.46 283.65 1142.04 333.374 1199.45 L 642.829 1555.74 C 666.446 1520.75 700.163 1494.07 732.424 1467.5 C 795.117 1417.7 858.256 1363.37 887.261 1286.25 C 898.113 1256.93 906.911 1217.89 889.705 1189.06 C 873.478 1161.87 852.143 1132.56 865.539 1099.12 C 871.003 1085.24 881.904 1074.2 895.712 1068.56 C 930.406 1054.52 970.704 1079.86 953.232 1118.88 C 950.548 1106.58 948.459 1099.64 937.837 1091.37 C 926.133 1082.27 907.942 1089.57 901.99 1101.66 C 890.169 1127.27 924.549 1151.85 939.219 1169.81 C 966.471 1203.18 959.658 1245.71 945.71 1284.44 C 914.285 1371.69 840.069 1433.7 765.809 1484.61 C 733.647 1506.66 698.091 1531.58 672.306 1561.08 C 665.933 1568.59 659.014 1581.87 653.634 1590.29 C 648.506 1598.32 647.787 1615.38 650.833 1624.56 C 653.881 1633.77 660.579 1641.32 669.359 1645.45 C 681.85 1651.27 699.281 1649.12 705.041 1634.65 C 708.705 1625.45 705.419 1617.29 701.581 1608.8 L 702.848 1609.85 C 737.88 1638.68 697.51 1681.47 657.106 1662.8 C 643.389 1656.45 632.826 1644.83 627.824 1630.56 C 619.064 1605.85 626.824 1585.32 637.489 1563.26 C 610.659 1534.07 581.755 1498.91 555.456 1468.66 L 383.745 1271.03 L 242.504 1108.25 C 219.223 1081.36 191.596 1051.06 169.707 1023.52 C 181.894 1007.58 201.352 986.522 215.082 970.737 L 301.342 871.646 L 539.659 597.67 C 572.041 560.265 605.914 522.417 637.6 484.482 C 616.356 444.192 617.849 392.637 671.122 381.199 z",fill:"#E8ECF7",stroke:"#E8ECF7"}),o.jsx("path",{d:"M 791.002 712.436 C 791.99 712.378 791.355 712.338 792.831 712.983 C 791.837 718.407 719.488 841.546 710.03 858.509 C 707.23 840.677 702.304 817.013 698.274 799.446 C 555 895 360 995 182 1023 C 355 963 525 870 674.863 761.103 C 659.702 748.905 644.649 736.575 629.704 724.113 C 681.16 722.084 738.984 715.793 791.002 712.436 z",fill:"url(#lm-up)",stroke:"url(#lm-up)"}),o.jsx("path",{d:"M 182 1023 C 360 1051 555 1151 698.326 1248.65 C 702.16 1232.41 707.425 1206.32 709.871 1189.79 C 737.246 1238.39 766.184 1286.55 793.713 1335.16 C 739.167 1331.05 684.598 1327.24 630.009 1323.75 C 644.462 1311.53 659.652 1298.21 674.331 1286.42 C 525 1176 355 1083 182 1023 z",fill:"url(#lm-down)",stroke:"url(#lm-down)"}),o.jsx("path",{d:"M 182 1023.5 L 884.044 1002.33 L 881.311 1004.34 C 882.15 1018.85 886.981 1021.89 881.356 1038.74 C 878.766 1040.79 876.225 1042.9 873.734 1045.08 z",fill:"url(#lm-shaft)",stroke:"url(#lm-shaft)"}),o.jsx("path",{d:"M 1005.63 925.199 L 1121.78 984.34 C 1142.45 994.767 1179.5 1012.52 1198.4 1023.72 L 1070.98 1089.03 C 1051.67 1098.95 1023.69 1114.54 1004.93 1122.53 C 1013.61 1097.65 1022.5 1072.85 1031.59 1048.12 L 873.734 1045.08 C 876.225 1042.9 878.766 1040.79 881.356 1038.74 C 886.981 1021.89 882.15 1018.85 881.311 1004.34 L 884.044 1002.33 L 1030.81 999.036 C 1023.04 976.689 1012.03 947.529 1005.63 925.199 z",fill:"url(#lm-head)",stroke:"url(#lm-head)"})]})}function Q1({height:u=16}){return o.jsxs("svg",{"aria-label":"Leglas",fill:"#E8ECF7",height:u,role:"img",viewBox:"1256 928 642 222",width:Math.round(u*(642/222)),children:[o.jsx("path",{d:"M 1532.93 979.19 C 1552.43 978.051 1561.54 979.865 1574.88 995.12 L 1575.07 981.036 L 1598.92 981.151 L 1598.96 1052.38 C 1598.98 1086.98 1603.87 1127.82 1557.89 1134.37 C 1533.59 1137.83 1517.6 1134.59 1498.35 1119.87 L 1504.96 1108.54 L 1508.69 1102.35 C 1525.04 1114.93 1548.42 1124.68 1566.62 1107.48 C 1575.66 1098.94 1575.05 1084.76 1574.99 1073.16 C 1568.8 1080.06 1562.18 1085.4 1553.24 1088.34 C 1542.19 1091.88 1530.17 1090.79 1519.94 1085.31 C 1486.94 1067.75 1484.12 1009.92 1513.66 987.847 C 1520.32 982.873 1525.18 981.186 1532.93 979.19 z M 1541.52 1000.13 C 1555.85 998.918 1566.45 1003.26 1574.9 1015.05 C 1575.09 1027.93 1574.91 1041.22 1574.89 1054.14 C 1567.52 1063.25 1562.65 1066.25 1551.25 1068.92 C 1511.01 1069.99 1505.34 1012.62 1541.52 1000.13 z",fillRule:"evenodd"}),o.jsx("path",{d:"M 1416.95 979.231 C 1461.09 974.139 1477.7 1004.91 1478.08 1043.29 L 1395.13 1043.56 C 1404.31 1072.49 1429.03 1082.58 1454.48 1064.74 C 1457.34 1062.33 1456.68 1062.04 1459.58 1062.05 C 1464.01 1065.22 1467.95 1071.97 1471.41 1076.59 C 1414.1 1122.22 1344.57 1064.4 1381 1001.64 C 1388.32 989.03 1403.12 982.109 1416.95 979.231 z M 1419.64 998.169 C 1442.21 996.072 1449.85 1006.61 1455.14 1026.51 C 1448.55 1026.96 1438.16 1026.58 1431.31 1026.54 C 1419.15 1026.65 1406.99 1026.63 1394.83 1026.48 C 1398.74 1009.86 1403.7 1003.36 1419.64 998.169 z",fillRule:"evenodd"}),o.jsx("path",{d:"M 1713.27 979.252 C 1728.04 977.573 1745.26 979.123 1756.3 989.97 C 1768.26 1001.72 1767.44 1017.49 1767.31 1032.81 C 1767.15 1051.82 1767.12 1070.77 1767.06 1089.74 L 1757.36 1089.93 C 1733.55 1090.35 1748.04 1086.51 1742.3 1080.97 C 1727.07 1089.66 1714.5 1096.6 1695.79 1090.38 C 1685.07 1086.81 1679.16 1079.18 1674.51 1069.31 C 1663.26 1025.76 1710.42 1008.22 1743.06 1033.45 C 1743.17 1029.64 1743.75 1021.08 1742.89 1017.76 C 1734.81 986.781 1704.35 998.377 1687.37 1012 C 1684.28 1006.47 1681.22 1000.93 1678.2 995.358 C 1689.81 985.727 1698.69 981.852 1713.27 979.252 z M 1714.53 1038.21 C 1726.37 1037.77 1733.38 1039.57 1742.94 1046.21 C 1743.21 1052.09 1743.05 1058.97 1743.05 1064.94 C 1736.15 1071.44 1733.92 1072.52 1724.6 1074.96 C 1709.1 1075.75 1690.77 1070.07 1698.16 1048.49 C 1700.08 1042.9 1708.94 1039.56 1714.53 1038.21 z",fillRule:"evenodd"}),o.jsx("path",{d:"M 1823.29 979.174 C 1843.68 977.649 1857.91 980.343 1873.82 993.561 L 1864.19 1010.31 C 1854.9 1002.37 1842.52 996.264 1830.29 997.499 C 1810.54 999.496 1804.87 1016.41 1827.99 1021.78 C 1853.42 1027.68 1886.98 1035.62 1875.05 1070.07 C 1869.31 1086.64 1852.8 1091.05 1837.21 1092.35 C 1816.02 1092.18 1803.14 1089.58 1786.76 1075.52 L 1797.03 1058.98 C 1810.81 1068.5 1823.36 1075.69 1840.97 1072.95 C 1848.65 1071.76 1856.31 1065.31 1853.69 1057.02 C 1850.58 1049.89 1837.32 1046.22 1830.02 1044.91 C 1802.77 1040.01 1777.57 1024.93 1796.42 994.719 C 1802.7 984.652 1812.04 981.686 1823.29 979.174 z"}),o.jsx("path",{d:"M 1266.98 939.821 L 1293.02 939.95 L 1293.03 1066.58 L 1358.72 1066.65 L 1358.8 1089.73 L 1266.88 1089.69 L 1266.98 939.821 z"}),o.jsx("path",{d:"M 1627.11 939.241 L 1650.97 939.358 L 1650.98 1089.81 L 1627.17 1089.88 C 1626.5 1040.3 1626.89 988.911 1627.11 939.241 z"})]})}const Mn={copy:"M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z",pencil:"M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z",link:"M87.5,151.52l64-64a12,12,0,0,1,17,17l-64,64a12,12,0,0,1-17-17Zm131-114a60.08,60.08,0,0,0-84.87,0L103.51,67.61a12,12,0,0,0,17,17l30.07-30.06a36,36,0,0,1,50.93,50.92L171.4,135.52a12,12,0,1,0,17,17l30.08-30.06A60.09,60.09,0,0,0,218.45,37.55ZM135.52,171.4l-30.07,30.08a36,36,0,0,1-50.92-50.93l30.06-30.07a12,12,0,0,0-17-17L37.55,133.58a60,60,0,0,0,84.88,84.87l30.06-30.07a12,12,0,0,0-17-17Z",search:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z",split:"M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36ZM44,60h72V196H44ZM212,196H140V60h72Z",sidebar:"M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36ZM44,60H76V196H44ZM212,196H100V60H212Z",trash:"M216,48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM188,204H68V72H188ZM76,20A12,12,0,0,1,88,8h80a12,12,0,0,1,0,24H88A12,12,0,0,1,76,20Z"},Eu="flex h-6 w-6 items-center justify-center rounded text-[#D1D5DB] hover:bg-[#2E2E2E] hover:text-white";function sr({on:u}){return o.jsx("span",{"aria-hidden":"true",className:`relative h-3.5 w-6 shrink-0 rounded-full transition-colors duration-150 motion-reduce:transition-none ${u?"bg-[#E6E8EC]":"bg-[#17181B]"}`,children:o.jsx("span",{className:`absolute left-0.5 top-0.5 size-2.5 rounded-full transition-transform duration-150 motion-reduce:transition-none ${u?"translate-x-2.5 bg-[#17181B]":"bg-[#84848C]"}`})})}function Cn({d:u,size:s=13}){return o.jsx("svg",{"aria-hidden":!0,fill:"currentColor",height:s,viewBox:"0 0 256 256",width:s,children:o.jsx("path",{d:u})})}let r1=0;function Nt({children:u,label:s,side:f="top",wide:r=!1}){const d=C.useRef(null),g=C.useRef(null),v=C.useRef(null),M=C.useRef(null),[E,x]=C.useState(null);C.useLayoutEffect(()=>{const q=g.current,O=d.current?.firstElementChild;if(!E||E.out||!q||!O)return;const ee=Dg(E,{height:q.offsetHeight,width:q.offsetWidth},O.getBoundingClientRect(),{height:window.innerHeight,width:window.innerWidth});ee&&x(se=>se&&{...se,...ee})},[s,E?.at,E?.out,E?.shift,E?.x,E?.y]),C.useEffect(()=>()=>{v.current&&clearTimeout(v.current),M.current&&clearTimeout(M.current)},[]);const R=()=>{const q=d.current?.firstElementChild;if(!q)return;const O=q.getBoundingClientRect();M.current&&clearTimeout(M.current),x(f==="top"?{at:"top",out:!1,shift:0,x:O.left+O.width/2,y:O.top-8}:{at:"right",out:!1,shift:0,x:O.right+8,y:O.top+O.height/2})},_=()=>{v.current&&clearTimeout(v.current),v.current=setTimeout(R,Date.now()<r1?0:300)},k=()=>{v.current&&clearTimeout(v.current),r1=Date.now()+300,x(q=>q&&!q.out?{...q,out:!0}:q),M.current&&clearTimeout(M.current),M.current=setTimeout(()=>x(null),120)};return o.jsxs("span",{className:"contents",onBlur:k,onFocus:q=>{q.target.matches(":focus-visible")&&R()},onPointerDown:k,onPointerEnter:_,onPointerLeave:k,ref:d,children:[u,E&&o.jsx("span",{"aria-hidden":!0,className:"pointer-events-none fixed z-[60]",style:{left:E.x+E.shift,top:E.y},children:o.jsx("span",{className:`block ${{bottom:"-translate-x-1/2",right:"-translate-y-1/2",top:"-translate-x-1/2 -translate-y-full"}[E.at]}`,children:o.jsx("span",{className:`leglas-tip block rounded-lg border border-white/10 bg-[#171717] px-2 py-1 text-xs font-medium text-white shadow-lg ${r?"w-64 whitespace-normal":"whitespace-nowrap"} ${E.out?`leglas-tip-out-${E.at}`:`leglas-tip-in-${E.at}`}`,ref:g,children:s})})})]})}function zg({error:u,initial:s,label:f,onCancel:r,onCommit:d}){const g=C.useRef(!1);return C.useEffect(()=>{u&&(g.current=!1)}),o.jsx("form",{className:"leglas-rename min-w-0 flex-1",onSubmit:v=>{v.preventDefault();const M=new FormData(v.currentTarget).get("name");g.current=!0,d(typeof M=="string"?M.trim():"","submit")},children:o.jsx("input",{"aria-describedby":u?"leglas-rename-error":void 0,"aria-invalid":u?!0:void 0,"aria-label":f,autoFocus:!0,className:`-mx-1 block w-[calc(100%+0.5rem)] rounded-[4px] bg-transparent px-1 py-0 text-sm font-medium leading-5 text-white outline-none ring-1 ${u?"ring-amber-400/60":"ring-[#D1D5DB]/45 focus:ring-[#D1D5DB]/70"}`,defaultValue:s,name:"name",onBlur:v=>{g.current||d(v.currentTarget.value.trim(),"blur")},onKeyDown:v=>{v.key==="Escape"&&(g.current=!0,r())},type:"text"})})}const Og={danger:"bg-amber-300",info:"bg-[#9CA3AF]",success:"bg-emerald-300"},Rg=140;function _g({onDismiss:u,toast:s}){const[f,r]=C.useState(!1),[d,g]=C.useState(!1),[v,M]=C.useState(!1),E=C.useRef(s.ttl),x=C.useRef(null),R=()=>{x.current||(r(!0),x.current=setTimeout(u,Rg))},_=d||v;return C.useEffect(()=>{if(f||_||E.current===null)return;const k=Date.now(),q=setTimeout(R,E.current);return()=>{clearTimeout(q),E.current!==null&&(E.current=Math.max(0,E.current-(Date.now()-k)))}},[f,_]),C.useEffect(()=>()=>{x.current&&clearTimeout(x.current)},[]),o.jsxs("li",{className:`pointer-events-auto flex items-start gap-2.5 rounded-lg border border-white/10 bg-[#2E2E2E] px-3 py-2.5 shadow-xl shadow-black/40 ${f?"leglas-toast-out":"leglas-toast-in"}`,onBlur:()=>M(!1),onFocus:()=>M(!0),onPointerEnter:()=>g(!0),onPointerLeave:()=>g(!1),children:[o.jsx("span",{"aria-hidden":!0,className:`mt-[5px] size-1.5 shrink-0 rounded-full ${Og[s.tone]}`}),o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsx("span",{className:"block text-xs leading-snug text-[#E8E8EA]",children:s.message}),s.detail?o.jsx("span",{className:"mt-1 block cursor-text select-text break-all text-[10px] leading-snug text-[#9CA3AF]","data-selectable":"",style:{fontFamily:"var(--font-mono)"},children:s.detail}):null]}),s.action?o.jsx("button",{className:"shrink-0 rounded px-1 py-0.5 text-[11px] font-medium text-white underline decoration-white/30 underline-offset-2 transition-colors hover:decoration-white focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[#D1D5DB]/60",onClick:()=>{s.action?.run(),R()},type:"button",children:s.action.label}):null,o.jsx("button",{"aria-label":"Dismiss",className:"-mr-1 flex size-5 shrink-0 items-center justify-center rounded text-[#84848C] transition-colors hover:bg-white/[0.06] hover:text-white focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[#D1D5DB]/60",onClick:R,type:"button",children:o.jsx("svg",{className:"size-2.5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 10 10",children:o.jsx("path",{d:"M2.5 2.5 7.5 7.5M7.5 2.5 2.5 7.5",strokeLinecap:"round"})})})]})}function Lg({bottom:u,left:s,onDismiss:f,toasts:r,width:d}){return o.jsx("ol",{"aria-live":"polite",className:`pointer-events-none fixed z-40 flex flex-col gap-2 transition-[bottom,left,width] duration-200 ${ja} motion-reduce:transition-none`,style:{bottom:u,left:s,width:d},children:r.map(g=>o.jsx(_g,{onDismiss:()=>f(g.id),toast:g},g.id))})}function Ug({loaded:u}){return o.jsxs("div",{"aria-hidden":!0,className:`absolute inset-0 overflow-hidden bg-white transition-opacity duration-700 ${ja} ${u?"pointer-events-none opacity-0":"opacity-100"}`,children:[o.jsxs("div",{children:[o.jsx("div",{className:"mx-auto mt-6 h-12 w-[400px] max-w-[80%] rounded-full bg-neutral-200/80"}),o.jsxs("div",{className:"mx-auto mt-24 grid w-full max-w-5xl grid-cols-[1.05fr_0.95fr] items-start gap-16 px-12 max-[900px]:grid-cols-1",children:[o.jsxs("div",{children:[o.jsx("div",{className:"h-14 w-4/5 rounded-lg bg-neutral-200"}),o.jsx("div",{className:"mt-3 h-14 w-3/5 rounded-lg bg-neutral-200"}),o.jsx("div",{className:"mt-8 h-4 w-full max-w-[420px] rounded bg-neutral-200/80"}),o.jsx("div",{className:"mt-2 h-4 w-4/5 max-w-[360px] rounded bg-neutral-200/80"}),o.jsx("div",{className:"mt-10 h-12 w-44 rounded-full bg-neutral-200"})]}),o.jsx("div",{className:"h-[420px] w-60 justify-self-center rounded-[2.5rem] bg-neutral-200 max-[900px]:hidden"})]})]}),o.jsx("div",{className:"pointer-events-none absolute inset-0 overflow-hidden motion-reduce:hidden",children:o.jsx("div",{className:"absolute inset-0 -translate-x-full animate-[leglas-skeleton-sweep_1.6s_ease-in-out_infinite]",style:{background:"linear-gradient(100deg, transparent 32%, rgba(255,255,255,0.55) 50%, transparent 68%)"}})}),o.jsxs("span",{className:"absolute bottom-4 right-5 flex items-center gap-2",children:[o.jsx(mr,{"aria-label":"",size:20,state:gr,theme:"light"}),o.jsx("span",{className:"leglas-shimmer-text text-xs font-medium",children:"Loading preview…"})]})]})}function kg({onReload:u,reason:s}){return o.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-3 bg-white p-6 text-center",role:"alert",children:[o.jsxs("div",{className:"max-w-xs",children:[o.jsx("p",{className:"text-sm font-medium text-neutral-800",children:"Preview didn’t load"}),o.jsx("p",{className:"mt-1 text-xs leading-snug text-neutral-500",children:s})]}),o.jsx("button",{className:"rounded-md bg-neutral-900 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-neutral-700",onClick:u,type:"button",children:"Reload"})]})}function Mi({id:u,size:s=14}){const f=C.useId();return u==="claude"?o.jsx("svg",{"aria-hidden":"true",fill:"#D97757",height:s,viewBox:"0 0 24 24",width:s,children:o.jsx("path",{d:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"})}):u==="cursor"?o.jsx("svg",{"aria-hidden":"true",fill:"currentColor",height:s,viewBox:"0 0 24 24",width:s,children:o.jsx("path",{d:"M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23"})}):u==="codex"?o.jsxs("svg",{"aria-hidden":"true",height:s,viewBox:"0 0 24 24",width:s,children:[o.jsx("defs",{children:o.jsxs("linearGradient",{id:f,x1:"0",x2:"0",y1:"0",y2:"1",children:[o.jsx("stop",{offset:"0",stopColor:"#9B96F2"}),o.jsx("stop",{offset:"0.55",stopColor:"#5E6CF6"}),o.jsx("stop",{offset:"1",stopColor:"#3B32EF"})]})}),o.jsx("path",{d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457z",fill:`url(#${f})`}),o.jsx("path",{d:"M7.282 8.307a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zM12.728 14.547a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z",fill:"#F4F4FE"})]}):u==="custom"?o.jsx("svg",{"aria-hidden":"true",fill:"none",height:s,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:s,children:o.jsx("path",{d:"m5 6 6 6-6 6M13 18h6"})}):null}const pr=15e3,Bg=["config","requests","health"];function Hg(u){return typeof u=="string"&&Bg.includes(u)}function qg(u){if(typeof u!="string")return null;try{const s=JSON.parse(u);if(typeof s!="object"||s===null)return null;const f=Reflect.get(s,"changed");return Hg(f)?f:null}catch{return null}}const f1=250,Yg=3e4;function Gg(u){return u<=0?f1:Math.min(Yg,f1*2**u)}function Xg(){const{host:u,protocol:s}=window.location;return`${s==="https:"?"wss":"ws"}://${u}/leglas/api/live`}let d1=null;function yr(){return d1??=Qg(),d1}function Qg(u={}){const s=u.connect??(k=>new WebSocket(k)),f=u.setTimeout??((k,q)=>globalThis.setTimeout(k,q)),r=u.clearTimeout??(k=>globalThis.clearTimeout(k)),d=new Map;let g=null,v=!1,M=0,E=null,x=!1;const R=()=>{if(x)return;let k;try{k=s(u.url??Xg())}catch{return _()}g=k,k.addEventListener("open",()=>{x||(v=!0,M=0)}),k.addEventListener("message",O=>{const ee=qg(O.data);if(ee!==null)for(const se of d.get(ee)??[])se()});const q=()=>{g===k&&(v=!1,g=null,_())};k.addEventListener("close",q),k.addEventListener("error",q)},_=()=>{if(x||E!==null)return;const k=Gg(M);M+=1,E=f(()=>{E=null,R()},k)};return R(),{on(k,q){const O=d.get(k)??new Set;return O.add(q),d.set(k,O),()=>{O.delete(q),O.size===0&&d.delete(k)}},get connected(){return v},stop(){x=!0,v=!1,E!==null&&r(E),E=null,d.clear();const k=g;g=null;try{k?.close()}catch{}}}}function Zg(u){return typeof u=="object"&&u!==null&&u.name==="AbortError"}const Vg=1e4,Kg={setInterval:(u,s)=>globalThis.setInterval(u,s),clearInterval:u=>globalThis.clearInterval(u),setTimeout:(u,s)=>globalThis.setTimeout(u,s),clearTimeout:u=>globalThis.clearTimeout(u)};function vr(u,s){const{everyMs:f,timeoutMs:r=Vg,timers:d=Kg}=s;let g=!1,v=null;const M=()=>{if(g||v!==null)return;const R=new AbortController,_=d.setTimeout(()=>{R.abort(),v?.controller===R&&(v=null)},r),k={controller:R,deadline:_};v=k;const q=()=>{v===k&&(d.clearTimeout(_),v=null)};u(R.signal).then(q,q)};M();const E=d.setInterval(M,f),x=s.subscribe?.(M);return()=>{g=!0,x?.(),d.clearInterval(E),v!==null&&(d.clearTimeout(v.deadline),v.controller.abort(),v=null)}}function $g(u){const s=document.createElement("textarea");s.value=u,s.setAttribute("readonly",""),s.style.cssText="position:fixed;top:-1000px;opacity:0",document.body.append(s),s.select();try{return document.execCommand("copy")}finally{s.remove()}}function Jg(){return{clipboard:typeof navigator>"u"?void 0:navigator.clipboard,legacy:typeof document>"u"?void 0:$g}}async function Er(u,s=Jg()){if(s.clipboard)try{return await s.clipboard.writeText(u),"copied"}catch{}try{if(s.legacy?.(u))return"copied"}catch{}return"blocked"}const Fg=9;function Wg(u){if((u.metaKey||u.ctrlKey)&&!u.altKey&&!u.shiftKey&&u.key.toLowerCase()==="k")return{kind:"search"};if(u.typing||u.metaKey||u.ctrlKey||u.altKey)return null;const{key:s}=u;if(s==="?")return{kind:"help"};if(s==="ArrowDown")return{kind:"move",delta:1};if(s==="ArrowUp")return{kind:"move",delta:-1};const f=s.length===1?s.toLowerCase():"";return f==="a"?{kind:"note"}:f==="c"?{kind:"split"}:f==="b"?{kind:"rail"}:f==="r"?{kind:"request"}:f==="t"?{kind:"tools"}:s.length===1&&s>="1"&&s<=String(Fg)?{kind:"jump",index:Number(s)-1}:null}function Z1(u){return u?"⌘Cmd+K":"Ctrl+K"}function Ig(u){return[{keys:["↑","↓"],label:"Move between directions"},{keys:["1","9"],join:"to",label:"Jump straight to a direction"},{keys:["C"],label:"Compare against the direction you were last on"},{keys:["R"],label:"Ask for a change to this direction"},{keys:["A"],label:"Annotate the design: point at what is wrong"},{keys:[Z1(u)],label:"Search"},{keys:["B"],label:"Collapse or open the rail"},{keys:["T"],label:"Open or close the Leglas dev tool menu"},{keys:["?"],label:"This list"},{keys:["Esc"],label:"Clear the search, or close what is open"}]}function Pg(u,s,f){return`${u}\0${s}\0${f}`}function e2(u,s,f){return u[s]===f}function t2(u,s,f){return u[s]===f?u:{...u,[s]:f}}function n2(u,s){if(!(s in u))return u;const f={...u};return delete f[s],f}function br(u){try{const s=u.contentDocument;return s!==null&&s.location.href!=="about:blank"&&s.readyState!=="loading"}catch{return!1}}function l2({frame:u,onFailure:s,onReady:f,sameOrigin:r,timeoutMs:d}){let g=!1,v=null;const M=()=>{u.removeEventListener("load",R),u.removeEventListener("error",_),v!==null&&(globalThis.clearTimeout(v),v=null)},E=k=>g||(r?!br(u):!k)?!1:(g=!0,M(),f(),!0),x=k=>{g||k&&r&&E(!1)||(g=!0,M(),s())};function R(){E(!r)}function _(){x(!1)}return u.addEventListener("load",R),u.addEventListener("error",_),v=globalThis.setTimeout(()=>x(!0),d),r&&E(!1),()=>{g||(g=!0,M())}}function a2(u){if(typeof u!="object"||u===null)return null;const s=Reflect.get(u,"type");return s==="leglas:preview-ready"?"ready":s==="leglas:preview-error"?"error":null}function i2(u,s){if(s===null)return null;for(const f of u)if(f.contentWindow===s)return f;return null}function h1(u){return u.file===void 0&&u.branch===void 0&&u.url.startsWith("/")}const u2={reachable:!0,wasDown:!1};function s2(u,s){return s?u.reachable?u:{reachable:!0,wasDown:u.wasDown}:!u.reachable&&u.wasDown?u:{reachable:!1,wasDown:!0}}function c2(u){const s=u.rows,f=r=>r!=null&&r!==u.active&&(s===void 0||s.includes(r));return f(u.pinned)?u.pinned:f(u.parent)?u.parent:f(u.previous)?u.previous:s?.find(r=>r!==u.active)??null}function o2(u){return!u.split||u.compare===null||u.compare===u.active?[u.active]:[u.active,u.compare]}const r2=.999,f2=.05;function d2(u){const{gutter:s,panes:f,scaleSplit:r,stageHeight:d,stageWidth:g,viewport:v}=u,M=f>1?(g-(f-1))/f:g,E=v??g,x=M-(v!==null?s:0),R=d-(v!==null?s:0),k=r&&f>1&&g>0&&E>0?Math.max(f2,Math.min(1,x/E)):1,q=k<r2;return{boxHeight:R*k,boxWidth:E*k,designWidth:E,frameHeight:R,scale:k,scaling:q}}const h2="#__next-build-watcher,#nuxt-devtools-anchor,astro-dev-toolbar{display:none!important}",m2="#devtools-indicator{display:none!important}",g2=12;function p2(u,s,f=[],r=[]){const d=u.replace(/\s+/g," ").trim().toLowerCase();return d.length<g2?null:K1(`${s.join(">")} ${d} ${f.join("|")} ${r.join("|")}`.trimEnd())}const V1=new Set(["LINK","META","NOSCRIPT","SCRIPT","STYLE","TEMPLATE"]),Bs=720,m1=180,y2=["display","visibility","position","top","right","bottom","left","inset","box-sizing","width","height","min-width","min-height","max-width","max-height","margin-top","margin-right","margin-bottom","margin-left","padding-top","padding-right","padding-bottom","padding-left","overflow-x","overflow-y","opacity","transform","transform-origin","perspective","z-index","color","background-color","background-image","background-position","background-size","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","box-shadow","outline","filter","backdrop-filter","-webkit-backdrop-filter","clip-path","mask-image","mix-blend-mode","isolation","object-fit","object-position","font-family","font-size","font-style","font-weight","line-height","letter-spacing","text-align","text-transform","white-space","flex-direction","flex-wrap","flex-grow","flex-shrink","flex-basis","align-items","align-self","justify-content","justify-self","gap","row-gap","column-gap","grid-template-columns","grid-template-rows","grid-column","grid-row","aspect-ratio","pointer-events","animation-name","animation-duration","animation-delay","animation-iteration-count","animation-direction","animation-timing-function"],v2=new Set(["bottom","filter","height","left","opacity","right","top","transform","width"]),b2=["content","display","position","inset","width","height","opacity","transform","color","background-color","background-image","border-radius","box-shadow","filter","clip-path"],x2=["viewBox","d","points","x","y","x1","y1","x2","y2","cx","cy","r","rx","ry","width","height","fill","stroke","stroke-width"],g1=["nextjs-portal","vite-error-overlay","#webpack-dev-server-client-overlay","#leglas-hide-dev-overlays"].join(",");function Hs(u){if(!Number.isFinite(u))return"?";const s=Math.round(u*2)/2;return Object.is(s,-0)?"0":String(s)}function K1(u){let s=2166136261,f=2654435769;for(let r=0;r<u.length;r+=1){const d=u.charCodeAt(r);s=Math.imul(s^d,16777619),f=Math.imul(f^d,2246822507)}return`${(s>>>0).toString(16)}${(f>>>0).toString(16)}`}function Xs(u,s=480){const f=u.replace(/\s+/g," ").trim();return f.length<=s?f:`${f.slice(0,180)}…${f.slice(-80)}#${f.length}:${K1(f)}`}function S2(u){return V1.has(u.tagName)||u.matches(g1)||u.closest(g1)!==null}function E2(u){if(u.length<=Bs)return u.map((d,g)=>g);const s=new Set,f=d=>{d>=0&&d<u.length&&s.size<Bs&&s.add(d)};for(let d=0;d<m1;d+=1)f(d);for(let d=Math.max(0,u.length-m1);d<u.length;d+=1)f(d);for(let d=0;d<u.length&&s.size<Bs;d+=1){const g=u[d];if(!g.matches("a,button,input,select,textarea,summary,[role],svg,svg *,canvas,img,picture,video,audio,iframe"))continue;f(d);let v=g.parentElement;for(let M=0;v!==null&&M<3;M+=1)f(u.indexOf(v)),v=v.parentElement}const r=Bs-s.size;if(r>0){const d=(u.length-1)/Math.max(1,r-1);for(let g=0;g<r;g+=1)f(Math.round(g*d))}return[...s].sort((d,g)=>d-g)}function w2(u,s){if(s.getPropertyValue("animation-name").trim()!=="none")return!0;const f=u.getAnimations;if(typeof f!="function")return!1;try{return f.call(u).some(r=>r.playState==="running")}catch{return!1}}function M2(u,s){if(s)return"rect:animated";let f;try{f=u.getBoundingClientRect()}catch{return"rect:?"}const r=u.ownerDocument.defaultView,d=r?.getComputedStyle(u).position,g=d==="fixed"?0:r?.scrollX??0,v=d==="fixed"?0:r?.scrollY??0;return`rect:${Hs(f.left+g)},${Hs(f.top+v)},${Hs(f.width)},${Hs(f.height)}`}function C2(u){const s=[];for(const r of x2){const d=u.getAttribute(r);d!==null&&s.push(`${r}:${Xs(d)}`)}const f=u.tagName;if(["A","AUDIO","IFRAME","IMG","SOURCE","VIDEO"].includes(f))for(const r of["href","src","srcset","poster"]){const d=u.getAttribute(r);d!==null&&s.push(`${r}:${Xs(d)}`)}if(f==="CANVAS"){const r=u;s.push(`bitmap:${r.width}x${r.height}`)}return s.join(",")}function p1(u,s,f){let r;try{r=f(u,s)}catch{return""}const d=r.getPropertyValue("content").trim();return d===""||d==="none"||d==="normal"?"":`${s}{${b2.map(g=>`${g}:${Xs(r.getPropertyValue(g))}`).join(";")}}`}function j2(u,s){if(!u)return[];const f=[u,...u.querySelectorAll("*")].filter(r=>!S2(r));return E2(f).map(r=>{const d=f[r],g=s(d),v=w2(d,g),M=y2.map(q=>{const O=v&&v2.has(q)?"<animated>":Xs(g.getPropertyValue(q));return`${q}:${O}`}).join(";"),E=d.getAttribute("role"),x=d.getAttribute("type"),R=[E&&`role:${E}`,x&&`type:${x}`].filter(Boolean).join(","),_=p1(d,"::before",s),k=p1(d,"::after",s);return`${d.tagName}${R?`[${R}]`:""}{${M2(d,v)};${M};${C2(d)};${_};${k}}`})}function A2(u,s){if(!u)return[];const f=[];let r=u;for(let d=0;d<4;d+=1){const g=s(r);f.push(`${g.backgroundColor};${g.backgroundImage};${g.color}`);const v=Array.from(r.children).filter(E=>!V1.has(E.tagName??"")),M=v.length===1?v[0]:void 0;if(M===void 0)break;r=M}return f}function N2(u){const s=new Map;for(const[r,d]of Object.entries(u)){if(d===null)continue;const g=s.get(d);g?g.push(r):s.set(d,[r])}const f={};for(const r of s.values())if(!(r.length<2))for(const d of r)f[d]=r.filter(g=>g!==d);return f}function $1(u,s){const f=s[u.title];return f?.url===u.url?f:null}function cr(u,s){let f=null;for(const r of s)r in u&&(f??={...u},delete f[r]);return f??u}function T2(u,s){const f=[];for(const[r,d]of s){const g=u.get(r);g!==void 0&&g!==d&&f.push(r)}return f}function D2(u,s,f){const r=f.status==="complete"?{url:s.url,status:"complete",signature:f.signature}:{url:s.url,status:"failed"},d=u[s.title],g=d?.status==="failed"&&r.status==="failed"||d?.status==="complete"&&r.status==="complete"&&d.signature===r.signature;return d?.url===r.url&&g?u:{...u,[s.title]:r}}function z2(u,s){const f={};for(const r of u){const d=$1(r,s);d?.status==="complete"&&(f[r.title]=d.signature)}return f}function O2(u,s){return u.filter(f=>f.url.startsWith("/")?$1(f,s)===null:!1)}const y1=24,R2=10,v1=44;function _2(u,s){const f=(r,d)=>{const g=Math.min(y1,d/2),v=Math.max(g,d-y1);return Math.max(g,Math.min(v,r))};return{x:f(u.x,s.width),y:f(u.y,s.height)}}function L2(u){return{x:u.x-v1/2,y:u.y-v1/2}}function U2(u,s,f=R2){return Math.abs(s.x-u.x)>f||Math.abs(s.y-u.y)>f}function k2(u,s){const f=u.x<s.width/2,r=u.y<s.height/2;return r&&f?{corner:"top-left"}:r?{corner:"top-right"}:f?{corner:"bottom-left"}:{corner:"bottom-right"}}const B2=3,pt={action:6e3,plain:2600};function H2(u,s,f=B2){return[...u.filter(d=>d.kind!==s.kind),s].slice(-f)}function q2(u,s){return u.filter(f=>f.id!==s)}const Y2=10;function J1(u,s){let f=u;for(let r=0;r<Y2;r+=1){const d=s.get(f);if(d===void 0||d===u)return f;f=d}return f}function G2(u,s){const f=new Set(u),r=new Map,d=[];for(const g of u){const v=J1(g,s);if(v===g||!f.has(v))d.push(g);else{const M=r.get(v);M?M.push(g):r.set(v,[g])}}return d.flatMap(g=>[{title:g,depth:0},...(r.get(g)??[]).map(v=>({title:v,depth:1}))])}function X2(u,s){if(s.size===0)return[...u];let f=null;return u.filter(r=>r.depth===0?(f=r.title,!0):f===null||!s.has(f))}const b1=u=>u.trim().replace(/\s+/g," ").toLowerCase();function Q2(u,s,f){const r=u.trim().replace(/\s+/g," "),d=f.get(s)??s;if(r===""||r===s)return d===s?{kind:"same"}:{kind:"reset",value:s};if(r===d)return{kind:"same"};for(const[g,v]of f)if(g!==s&&b1(v)===b1(r))return{kind:"taken",by:v};return{kind:"set",value:r}}function Z2(u,s){try{return new URL(u,s).toString()}catch{return u}}function V2({displayName:u,preview:s,previewUrl:f,title:r}){const d=u===r?"":` (shown as ${JSON.stringify(u)})`,g=s?.note?` — ${s.note}`:"",v=s?.tags.length?` [${s.tags.join(", ")}]`:"",M=[`Leglas direction ${JSON.stringify(r)}${d}${g}${v}`];return s?.file?M.push(`Source: ${s.file}`):s?.branch?M.push(`Branch: ${s.branch}`):s&&M.push(`Route: ${s.url}`),M.push(`Preview: ${f}`),s?.basedOn&&M.push(`A variant of: ${s.basedOn}`),M.push("","Inspect this direction in full:",` npx leglas show ${JSON.stringify(r)} --json`),M.join(`
|
|
10
|
+
`)}function K2({previews:u,project:s,searchRef:f,onToggleSplit:r,onToggleHelp:d,onToggleTools:g,onToggleNote:v,suspended:M=!1}){const E=Eg(s),x=()=>wg(typeof window>"u"?null:window.localStorage.getItem(E),u),[R,_]=C.useState(x),k=new Map(u.map(B=>[B.title,B])),q=()=>{const B=x();return B.order.find(P=>!B.hidden.includes(P))??B.order[0]??""},[O,ee]=C.useState(q),se=typeof window<"u"&&window.self!==window.top,[V,Q]=C.useState(()=>[q()]),[W,ie]=C.useState(""),[ue,p]=C.useState([]),I=B=>{p(P=>P.length?[]:P),ie(B)},[fe,me]=C.useState(!1),[ge,Me]=C.useState(null),[he,qe]=C.useState(null),[Ae,Be]=C.useState(null),[D,Z]=C.useState(!1),[ne,xe]=C.useState({}),[Ce,b]=C.useState([]),[L,F]=C.useState(null),te=C.useRef(1),oe=C.useRef(null),ve=C.useRef(0),U=B=>{ve.current+=1,b(P=>H2(P,{...B,id:ve.current}))},K=B=>b(P=>q2(P,B)),J=B=>{ee(B),Q(P=>P.includes(B)?P:[...P,B])};C.useEffect(()=>{window.localStorage.setItem(E,JSON.stringify(R))},[R,E]),C.useEffect(()=>()=>{oe.current&&clearTimeout(oe.current)},[]);const le=B=>R.renames[B]??B,Le=B=>k.get(B)?.url??"/",Ze=B=>{if(!W.trim())return!0;const P=W.toLowerCase(),be=k.get(B);return le(B).toLowerCase().includes(P)||B.toLowerCase().includes(P)||(be?.note??"").toLowerCase().includes(P)||(be?.tags??[]).some(Se=>Se.toLowerCase().includes(P))},Ye=u.map(B=>B.title).filter(B=>!R.deleted.includes(B)),Ve=Cg(R.order,Ye),ze=W.trim()!=="",$e=ze?ue:R.collapsedFamilies,nt=new Map(u.flatMap(B=>B.basedOn===void 0?[]:[[B.title,B.basedOn]])),ft=G2(Ve.filter(B=>!R.hidden.includes(B)&&Ze(B)),nt),Mt=X2(ft,new Set($e)),Wt=Mt.map(B=>B.title),Yn=new Map(Mt.map(B=>{const P=B.depth===0?ft.filter(be=>be.depth===1&&J1(be.title,nt)===B.title).length:0;return[B.title,{depth:B.depth,variants:P,folded:$e.includes(B.title)}]})),yl=(B,P)=>B.includes(P)?B.filter(be=>be!==P):[...B,P],Wl=B=>ze?p(P=>yl(P,B)):_(P=>({...P,collapsedFamilies:yl(P.collapsedFamilies,B)})),yt=B=>k.get(B)?.basedOn??null,Il=Ve.filter(B=>!R.hidden.includes(B)).length,Pl=(B,P)=>_(be=>({...be,order:jg(be,u,B,P)})),ea=(B,P=!1)=>{_(be=>({...be,hidden:be.hidden.filter(Se=>Se!==B)})),P&&J(B)},vl=B=>{const P=le(B),be=O===B;if(_(Se=>({...Se,hidden:[...Se.hidden,B]})),be){const Se=Ve.find(we=>we!==B&&!R.hidden.includes(we));Se&&J(Se)}U({action:{label:"Undo",run:()=>ea(B,be)},kind:`remove:${B}`,message:`${P} removed from the list`,tone:"info",ttl:pt.action})},Da=async B=>{const P=[...new Set(B)].filter(we=>R.hidden.includes(we)),be=P.filter(we=>k.get(we)?.local===!0);if(be.length>0){const we=await fetch("/leglas/api/previews/delete",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({titles:be})});if(!we.ok){const st=await we.json().catch(()=>null);throw new Error(st?.error??"The directions could not be deleted from Leglas.")}}const Se=new Set(P);if(_(we=>Mg(we,P)),Q(we=>we.filter(st=>!Se.has(st))),P.includes(O)){const we=Ve.find(st=>!Se.has(st)&&!R.hidden.includes(st));ee(we??"")}R.hidden.every(we=>Se.has(we))&&me(!1)},Gn=(B,P)=>_(be=>{const Se={...be.renames};return P===void 0?delete Se[B]:Se[B]=P,fetch("/leglas/api/renames",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({renames:Se})}).catch(()=>{}),{...be,renames:Se}}),Xn=B=>{Me(B),qe(null)},Ct=(B,P,be="submit")=>{const Se=new Map(Ye.map(We=>[We,le(We)])),we=Q2(P,B,Se);if(we.kind==="taken"){if(be==="submit"){qe(`${we.by} already goes by that name.`);return}Xn(null),U({kind:`rename:${B}`,message:`Still called ${le(B)}. ${we.by} already goes by that name.`,tone:"info",ttl:pt.plain});return}if(Xn(null),we.kind==="same")return;const st=R.renames[B];Gn(B,we.kind==="reset"?void 0:we.value),U({action:{label:"Undo",run:()=>Gn(B,st)},kind:`rename:${B}`,message:we.kind==="reset"?`Name reset to ${we.value}`:`Renamed to ${we.value}`,tone:"success",ttl:pt.action})};C.useEffect(()=>{const B=Wt,P=Se=>{const we=Se.target,st=we?.tagName?.toLowerCase(),We=Wg({key:Se.key,altKey:Se.altKey,ctrlKey:Se.ctrlKey,metaKey:Se.metaKey,shiftKey:Se.shiftKey,typing:st==="input"||st==="textarea"||st==="select"||(we?.isContentEditable??!1)});if(We&&!(M&&We.kind!=="help")){if(We.kind==="search"||We.kind==="request")Se.preventDefault(),_(dt=>dt.collapsed?{...dt,collapsed:!1}:dt),F({target:We.kind,nonce:te.current++});else if(We.kind==="split")Se.preventDefault(),r?.();else if(We.kind==="help")Se.preventDefault(),d?.();else if(We.kind==="tools")Se.preventDefault(),g?.();else if(We.kind==="note")Se.preventDefault(),v?.();else if(We.kind==="rail")_(dt=>({...dt,collapsed:!dt.collapsed}));else if(We.kind==="jump"){const dt=B[We.index];dt&&(Se.preventDefault(),J(dt))}else if(We.kind==="move"){Se.preventDefault();const dt=B.indexOf(O),Kt=We.delta===1?B[Math.min(B.length-1,dt+1)]:B[Math.max(0,dt-1)];Kt&&J(Kt)}}},be=[window];for(const Se of Array.from(document.querySelectorAll("iframe")))try{const we=Se.contentDocument;we&&be.push(we)}catch{}for(const Se of be)Se.addEventListener("keydown",P);return()=>{for(const Se of be)Se.removeEventListener("keydown",P)}},[O,Wt.join("|"),r,d,g,v,M,V.join("|"),Object.entries(ne).filter(([,B])=>B).map(([B])=>B).join("|")]);const It=(B,P)=>{const be=Z2(Le(B),window.location.origin),Se=P==="link"?be:V2({displayName:le(B),preview:k.get(B),previewUrl:be,title:B});Er(Se).then(we=>{if(we==="blocked"){Be(null),U({detail:be,kind:"copy",message:"Your browser blocked the clipboard. The direction is at:",tone:"danger",ttl:null});return}Be({kind:P,title:B}),oe.current&&clearTimeout(oe.current),oe.current=setTimeout(()=>Be(null),1200),U({kind:"copy",message:P==="link"?`Link to ${le(B)} copied`:`Reference to ${le(B)} copied`,tone:"success",ttl:pt.plain})})},Tt=B=>It(B,"link"),Zt=B=>It(B,"reference"),ct=B=>{B.preventDefault();const P=B.currentTarget;P.setPointerCapture(B.pointerId);const be=B.clientX,Se=R.width;Z(!0);const we=We=>{const dt=Math.min(q1,Math.max(H1,Se+We.clientX-be));_(Kt=>Kt.width===dt?Kt:{...Kt,width:dt})},st=We=>{P.releasePointerCapture(We.pointerId),P.removeEventListener("pointermove",we),P.removeEventListener("pointerup",st),P.removeEventListener("pointercancel",st),Z(!1)};P.addEventListener("pointermove",we),P.addEventListener("pointerup",st),P.addEventListener("pointercancel",st)},ta=(B,P)=>xe(be=>t2(be,B,P)),bl=(B,P)=>e2(ne,B,P),ji=B=>xe(P=>n2(P,B)),Vt=se?[O]:Ye.filter(B=>V.includes(B));return{active:O,copied:Ae,copyLink:Tt,copyReference:Zt,deleteRemoved:Da,displayName:le,dismissToast:K,focusing:L,hiddenCount:R.hidden.length,hide:vl,isLoaded:bl,loaded:ne,markLoaded:ta,matches:Ze,moveOption:Pl,nested:se,notify:U,onHandlePointerDown:ct,panes:Vt,prefs:R,previewFor:B=>k.get(B),query:W,rename:Ct,renameError:he,renaming:ge,parentOf:yt,resetLoaded:ji,resizing:D,restore:ea,rowMeta:Yn,rows:Wt,toggleFamily:Wl,setActive:J,setPrefs:_,setQuery:I,setShowHidden:me,showHidden:fe,startRename:Xn,toasts:Ce,urlFor:Le,visibleCount:Il,viewports:G1}}function x1(u){const s=u?.trim()??"";return s===""?null:s}function F1(u){const s=x1(u?.basedOn),f=x1(u?.askedFor);return s===null&&f===null?null:{basedOn:s,askedFor:f}}function $2(u,s){const f=u===null?null:`Variant of ${u}`,r=s===null?null:`asked for “${s}”`;return f===null?r===null?null:`You ${r}`:r===null?f:`${f} · you ${r}`}const S1=80,J2=6,F2=8;function W2(u){if(typeof u!="string")return null;const s=u.trim();return/^[A-Za-z][\w-]*$/.test(s)?s:null}function I2(u){return typeof u!="string"?[]:u.trim().split(/\s+/).filter(Boolean).slice(0,J2)}function Gs(u){const s=(u??"").replace(/\s+/g," ").trim();return s.length>S1?`${s.slice(0,S1-1)}…`:s}function P2(u){const s=[];let f=u;for(;f!==null&&s.length<F2;){const r=f.tagName.toLowerCase();if(r==="body"||r==="html")break;const d=W2(f.id);if(d!==null)return s.unshift(`#${d}`),s.join(" > ");const g=f.parentElement;if(g===null){s.unshift(r);break}let v=1;for(let M=0;M<g.children.length;M+=1){const E=g.children[M];if(E===f)break;E?.tagName===f.tagName&&(v+=1)}s.unshift(`${r}:nth-of-type(${v})`),f=g}return s.join(" > ")}function E1(u,s){return!Number.isFinite(u)||!Number.isFinite(s)||s<=0?.5:Math.round(Math.min(1,Math.max(0,u/s))*1e3)/1e3}function w1(u,s,f,r){return{classes:I2(u.className),rect:{height:Math.round(s.height),width:Math.round(s.width),x:Math.round(s.x),y:Math.round(s.y)},selector:P2(u),spot:{x:r===void 0?.5:E1(r.x-s.x,s.width),y:r===void 0?.5:E1(r.y-s.y,s.height)},tag:u.tagName.toLowerCase(),text:Gs(u.textContent),viewport:Math.round(f)}}const M1=6;function C1(u,s){return Math.abs(s.x-u.x)>=M1||Math.abs(s.y-u.y)>=M1}function j1(u,s){return{height:Math.abs(s.y-u.y),width:Math.abs(s.x-u.x),x:Math.min(u.x,s.x),y:Math.min(u.y,s.y)}}function ep(u,s){return u.x<s.x+s.width&&u.x+u.width>s.x&&u.y<s.y+s.height&&u.y+u.height>s.y}function A1(u,s){return s.x>=u.x&&s.y>=u.y&&s.x+s.width<=u.x+u.width&&s.y+s.height<=u.y+u.height}function tp(u,s){const f=u.width>0?u.width:1,r=u.height>0?u.height:1,d=g=>Math.round(Math.min(1,Math.max(0,g))*1e3)/1e3;return{height:d(s.height/r),width:d(s.width/f),x:d((s.x-u.x)/f),y:d((s.y-u.y)/r)}}function np(u,s){return{height:s.height*u.height,width:s.width*u.width,x:u.x+s.x*u.width,y:u.y+s.y*u.height}}function lp(u){const s=u.gap??8,{anchor:f,bounds:r,card:d}=u,g=f.y+f.height+s,v=f.y-s-d.height,M=g+d.height>r.height&&v>=0,E=M?v:g;let x=f.x;return x+d.width>r.width&&(x=r.width-d.width),{flipped:M,left:Math.max(0,x),top:Math.max(0,Math.min(E,Math.max(0,r.height-d.height)))}}function ap(u){return!Number.isFinite(u)||u<=0?256:Math.round(Math.min(256,Math.max(180,u-48)))}function ip(u){if(u.length===0)return null;const s=Math.min(...u.map(g=>g.x)),f=Math.min(...u.map(g=>g.y)),r=Math.max(...u.map(g=>g.x+g.width));return{height:Math.max(...u.map(g=>g.y+g.height))-f,width:r-s,x:s,y:f}}const up=8;function sp(u){const s=new Set,f=[];for(const r of u){const d=`${r.tag}:${r.text}`;if(!s.has(d)&&(s.add(d),f.push(r),f.length===up))break}return f}const qs=2,cp=4e3,N1=600,T1=80;function op(u){const s=u.note.length>T1?`${u.note.slice(0,T1-1)}…`:u.note;return[`Annotation ${u.number}`,s===""?null:`: ${s}`,u.sent?". Sent with a change.":null,u.stale?". Its element has gone.":null].filter(f=>f!==null).join("")}function rp(u){const s=[u.stale?"This element has moved or gone since the annotation was left.":null,u.sent?"Already sent with a change that has not landed yet.":null].filter(f=>f!==null);return s.length===0?void 0:s.join(" ")}function pl(u){return"left"in u?{height:u.height,width:u.width,x:u.left,y:u.top}:u}function fp(u,s){return s.x>=u.x&&s.y>=u.y&&s.x<=u.x+u.width&&s.y<=u.y+u.height}function dp({notes:u,onExit:s,onForget:f,onKeep:r,onRevise:d,paneScale:g,scaling:v,sent:M,title:E}){const x=C.useRef(null),R=C.useRef(null),_=C.useRef(null),k=C.useRef(null),[q,O]=C.useState(null),[ee,se]=C.useState(null),[V,Q]=C.useState(null),W=C.useRef(0),[ie,ue]=C.useState(null),[p,I]=C.useState(null),[fe,me]=C.useState([]),[ge,Me]=C.useState({height:92,width:256}),he=C.useCallback(()=>{const U=document.querySelector(`iframe[data-preview="${CSS.escape(E)}"]`);if(U===null)return null;let K=null;try{K=U.contentDocument}catch{return null}const J=K?.defaultView??null;if(K===null||J===null)return null;const le=U.getBoundingClientRect();return{doc:K,rect:le,scale:J.innerWidth>0?le.width/J.innerWidth:1,view:J}},[E]),qe=C.useCallback((U,K)=>{const J=he();return J===null?null:{x:(U-J.rect.left)/J.scale,y:(K-J.rect.top)/J.scale}},[he]),Ae=C.useCallback((U,K)=>{const J=U.doc.elementFromPoint(K.x,K.y);if(J===null)return null;const le=new Set;let Le=J,Ze=0;for(let ze=0;Le!==null&&ze<3&&Ze<N1;ze+=1){le.add(Le);const $e=U.doc.createTreeWalker(Le,NodeFilter.SHOW_ELEMENT);let nt=$e.nextNode();for(;nt!==null&&Ze<N1;)le.has(nt)||(le.add(nt),Ze+=1),nt=$e.nextNode();Le=Le.parentElement}const Ye=ze=>{const $e=ze.tagName.toLowerCase();return(Gs(ze.textContent)===""?0:4)+($e==="a"||$e==="button"||$e==="img"?3:0)+(/^h[1-6]$/.test($e)||$e==="p"||$e==="li"?2:0)},Ve=[...le].filter(ze=>{const $e=ze.tagName.toLowerCase();if(ze===U.doc.body||ze===U.doc.documentElement||$e==="head"||$e==="script"||$e==="style")return!1;const nt=pl(ze.getBoundingClientRect());if(nt.width<=0||nt.height<=0||!fp(nt,K))return!1;const ft=U.view.getComputedStyle(ze);return ft.display!=="none"&&ft.visibility!=="hidden"}).map(ze=>({box:pl(ze.getBoundingClientRect()),element:ze,weight:Ye(ze)}));return Ve.length===0?null:(Ve.sort((ze,$e)=>{const nt=ze.element.contains($e.element),ft=$e.element.contains(ze.element);if(nt!==ft)return nt?1:-1;const Mt=$e.weight-ze.weight;return Mt!==0?Mt:ze.box.width*ze.box.height-$e.box.width*$e.box.height}),Ve[0]??null)},[]),Be=C.useCallback((U,K)=>{let J=null;try{J=U.doc.querySelector(K.selector)}catch{}const le=pl(J===null?K.rect:J.getBoundingClientRect()),Le=K.spot??{x:.5,y:.5},Ze=K.region?np(le,K.region):null;return{about:Ze??le,box:Ze??{height:0,width:0,x:le.x+Le.x*le.width,y:le.y+Le.y*le.height},stale:J===null}},[]),D=C.useCallback(()=>{const U=he();return U===null?[]:u.map((K,J)=>{const le=Be(U,K.anchor);return{anchor:K.anchor,box:le.box,id:K.id,note:K.note,number:J+1,region:K.anchor.region?le.about:null,sent:M.has(K.id),stale:le.stale}})},[Be,he,u,M]),Z=C.useCallback(()=>me(D()),[D]),ne=C.useCallback(()=>{const U=_.current,K=he();U===null||K===null||V!==null||O(Ae(K,U)?.box??null)},[Ae,he,V]);C.useEffect(()=>{Z();const U=he(),K=()=>{Z(),ne()};return U?.view.addEventListener("scroll",K,{passive:!0}),U?.view.addEventListener("resize",K),window.addEventListener("resize",K),()=>{U?.view.removeEventListener("scroll",K),U?.view.removeEventListener("resize",K),window.removeEventListener("resize",K)}},[he,Z,ne]),C.useEffect(()=>{const U=x.current;if(U===null)return;const K=J=>{const le=he();le!==null&&(J.preventDefault(),le.view.scrollBy({behavior:"auto",left:J.deltaX,top:J.deltaY}))};return U.addEventListener("wheel",K,{passive:!1}),()=>U.removeEventListener("wheel",K)},[he]),C.useEffect(()=>{const U=le=>{if(le.key==="Escape"){if(V!==null){Q(null);return}s()}},K=[window],J=he();J!==null&&K.push(J.doc);for(const le of K)le.addEventListener("keydown",U);return()=>{for(const le of K)le.removeEventListener("keydown",U)}},[he,s,V]),C.useEffect(()=>{V===null||V.kind!=="kept"||u.some(U=>U.id===V.id)||Q({anchor:V.anchor,answered:!0,field:V.field,kind:"new",note:V.note})},[u,V]),C.useEffect(()=>{const U=R.current;if(V===null||U===null)return;const K=U.offsetHeight,J=U.offsetWidth;Me(le=>le.height===K&&le.width===J?le:{height:K,width:J})},[V]);const xe=(U,K)=>{const J=[...U.doc.body.querySelectorAll("*")].slice(0,cp),le=J.filter(Ye=>{const Ve=pl(Ye.getBoundingClientRect());return Ve.width>0&&Ve.height>0&&ep(K,Ve)}),Le=le.filter(Ye=>!le.some(Ve=>Ve!==Ye&&Ye.contains(Ve))&&!A1(pl(Ye.getBoundingClientRect()),K)&&(Gs(Ye.textContent)!==""||["a","button","canvas","img","input","svg","video"].includes(Ye.tagName.toLowerCase())));let Ze=U.doc.body;for(const Ye of J){const Ve=pl(Ye.getBoundingClientRect());A1(Ve,K)&&Ze.contains(Ye)&&(Ze=Ye)}return{bounds:ip(Le.map(Ye=>pl(Ye.getBoundingClientRect())))??K,covers:sp(Le.map(Ye=>({tag:Ye.tagName.toLowerCase(),text:Gs(Ye.textContent)}))),holder:Ze}},Ce=(U,K)=>{const J=he();if(J===null)return;if(K!==null&&C1(K,U)){const Le=j1(K,U),{bounds:Ze,covers:Ye,holder:Ve}=xe(J,Le),ze=pl(Ve.getBoundingClientRect());Q({anchor:{...w1(Ve,ze,J.view.innerWidth,{x:Ze.x+Ze.width/2,y:Ze.y+Ze.height/2}),covers:Ye,region:tp(ze,Ze)},field:String(W.current+=1),kind:"new",note:""}),I(null);return}const le=Ae(J,U);le!==null&&(Q({anchor:w1(le.element,le.box,J.view.innerWidth,U),field:String(W.current+=1),kind:"new",note:""}),I(null))},b=v&&g>0?1/g:1,L=he(),F={height:L?.view.innerHeight??0,width:L?.view.innerWidth??0},te=ap(F.width),oe=V===null||L===null?null:Be(L,V.anchor),ve=oe===null?null:lp({anchor:oe.about,bounds:F,card:{height:ge.height*b,width:te*b}});return o.jsxs("div",{className:`absolute inset-0 z-20 ${V===null?"cursor-crosshair":"cursor-default"}`,onPointerDown:U=>{if(V!==null)return;const K=qe(U.clientX,U.clientY),J=he();if(!(K===null||J===null)){try{U.currentTarget.setPointerCapture(U.pointerId)}catch{}k.current={from:K,scroll:{x:J.view.scrollX,y:J.view.scrollY}}}},onPointerLeave:()=>{_.current=null,k.current===null&&O(null)},onPointerMove:U=>{if(V!==null)return;const K=qe(U.clientX,U.clientY),J=he();if(K===null||J===null)return;_.current=K;const le=k.current;if(le!==null){const Le={x:le.from.x+le.scroll.x-J.view.scrollX,y:le.from.y+le.scroll.y-J.view.scrollY};se(C1(Le,K)?j1(Le,K):null),O(null);return}O(Ae(J,K)?.box??null)},onPointerUp:U=>{const K=k.current;if(k.current=null,se(null),V!==null)return;const J=qe(U.clientX,U.clientY),le=he();if(J===null||le===null)return;const Le=K===null?null:{x:K.from.x+K.scroll.x-le.view.scrollX,y:K.from.y+K.scroll.y-le.view.scrollY};O(null),Ce(J,Le)},ref:x,children:[q!==null&&V===null&&ee===null?o.jsx("div",{className:"pointer-events-none absolute bg-[#7C9CFF]/10 outline outline-2 outline-[#7C9CFF]",style:{height:q.height,left:q.x,top:q.y,width:q.width}}):null,ee!==null?o.jsx("div",{className:"pointer-events-none absolute rounded-sm border-2 border-dashed border-[#7C9CFF] bg-[#7C9CFF]/10",style:{height:ee.height,left:ee.x,top:ee.y,width:ee.width}}):null,fe.map(U=>o.jsxs("div",{children:[U.region===null?null:o.jsx("div",{className:`pointer-events-none absolute rounded-sm border-2 border-dashed ${U.stale?"border-amber-500/70 bg-amber-500/5":"border-[#7C9CFF]/70 bg-[#7C9CFF]/5"}`,style:{height:U.region.height+qs*2,left:U.region.x-qs,top:U.region.y-qs,width:U.region.width+qs*2}}),o.jsxs("button",{"aria-label":op(U),className:"group/pin absolute size-5 cursor-pointer",onClick:K=>{K.stopPropagation(),Q({anchor:U.anchor,field:String(W.current+=1),id:U.id,kind:"kept",note:U.note}),I(null)},onPointerDown:K=>K.stopPropagation(),onPointerMove:K=>K.stopPropagation(),onPointerUp:K=>K.stopPropagation(),style:{left:U.box.x,top:U.box.y,transform:`translate(-50%, -50%) scale(${b})`,transformOrigin:"center"},type:"button",children:[o.jsx("span",{"aria-hidden":!0,className:"absolute -inset-1.5"}),o.jsx("span",{className:`flex size-5 shrink-0 items-center justify-center rounded-full text-[10px] font-semibold text-white shadow-lg outline-offset-2 group-focus-visible/pin:outline group-focus-visible/pin:outline-2 group-focus-visible/pin:outline-white ${U.stale?"bg-amber-500":"bg-[#7C9CFF]"} ${U.sent?"ring-2 ring-white/80":""}`,title:rp(U),children:U.number}),o.jsx("span",{className:"pointer-events-none absolute left-full top-1/2 ml-1 w-max max-w-56 -translate-y-1/2 truncate rounded-md border border-white/10 bg-[#171717] px-1.5 py-1 text-left text-[11px] leading-snug text-white opacity-0 shadow-lg transition-opacity group-focus-visible/pin:opacity-100 group-hover/pin:opacity-100",children:U.note||"No words"})]})]},U.id)),V!==null&&oe!==null&&ve!==null?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"pointer-events-none absolute bg-[#7C9CFF]/10 outline outline-2 outline-[#7C9CFF]",style:{height:oe.about.height,left:oe.about.x,top:oe.about.y,width:oe.about.width}}),o.jsxs("form",{className:"absolute z-30 rounded-lg border border-[#232328] bg-[#1E1E22] p-1.5 shadow-2xl",onClick:U=>U.stopPropagation(),onPointerDown:U=>U.stopPropagation(),onSubmit:U=>{U.preventDefault();const K=V.field;if(ie===K)return;const J=U.currentTarget.elements.namedItem("note"),le=J instanceof HTMLInputElement?J.value.trim():"";ue(K),I(Le=>Le===K?null:Le),(V.kind==="new"?r(V.anchor,le):d(V.id,le)).then(Le=>{ue(Ze=>Ze===K?null:Ze),Le?Q(Ze=>Ze?.field===K?null:Ze):I(K)}).catch(()=>{ue(Le=>Le===K?null:Le),I(K)})},ref:R,style:{left:ve.left,top:ve.top,transform:`scale(${b})`,transformOrigin:ve.flipped?"bottom left":"top left",width:te},children:[o.jsx("input",{autoFocus:!0,className:"w-full rounded border border-[#232328] bg-[#2E2E2E]/40 px-2 py-1 text-xs text-white placeholder:text-[#84848C] focus:border-[#D1D5DB]/40 focus:outline-none",defaultValue:V.note,onInput:p===V.field?()=>I(null):void 0,name:"note",placeholder:V.kind==="kept"?"What is wrong with it?":V.anchor.region?"What is wrong with this area?":`What is wrong with this ${V.anchor.tag}?`},V.field),V.kind==="kept"?o.jsxs(o.Fragment,{children:[M.has(V.id)?o.jsx("p",{className:"px-1 pt-1 text-[10px] leading-snug text-[#B7A57A]",children:"Already sent. New words go with the next change."}):null,oe.stale?o.jsx("p",{className:"px-1 pt-1 text-[10px] leading-snug text-amber-500/90",children:"Its element has gone. The outline is where it was."}):null,p===V.field?o.jsx("p",{className:"px-1 pt-1 text-[10px] leading-snug text-[#F87171]",children:"Those words were not saved. Enter tries again."}):null,o.jsxs("div",{className:"flex items-center justify-between gap-3 px-1 pt-1 text-[10px] leading-snug text-[#84848C]",children:[o.jsx("button",{className:"rounded transition-colors hover:text-[#F87171]",onClick:()=>{f(V.id),Q(null)},type:"button",children:"Forget it"}),o.jsx("span",{children:"Enter saves · Esc drops"})]})]}):o.jsxs(o.Fragment,{children:[V.answered?o.jsx("p",{className:"px-1 pt-1 text-[10px] leading-snug text-[#B7A57A]",children:"That change has landed. Enter leaves these words as a new note."}):null,p===V.field?o.jsx("p",{className:"px-1 pt-1 text-[10px] leading-snug text-[#F87171]",children:"Those words were not saved. Enter tries again."}):null,o.jsx("p",{className:"px-1 pt-1 text-[10px] leading-snug text-[#84848C]",children:V.anchor.covers&&V.anchor.covers.length>0?`${V.anchor.covers.length} ${V.anchor.covers.length===1?"element":"elements"} · Enter keeps it · Esc drops it`:"Enter keeps it · Esc drops it"})]})]})]}):null]})}const W1=["image/png","image/jpeg","image/webp","image/gif"],wr=4,hp=1e7;function mp(u){return W1.includes(u.type)}function gp(u,s){const f=[],r=[];let d=Math.max(0,wr-u.length);for(const g of s){if(!mp(g)){r.push({file:g,why:"not-an-image"});continue}if(g.size>hp){r.push({file:g,why:"too-big"});continue}if(d===0){r.push({file:g,why:"too-many"});continue}d-=1,f.push(g)}return{accepted:f,refused:r}}function pp(u){const s=u[0];if(s===void 0)return null;const f=u.length>1;switch(s.why){case"too-many":return`Up to ${wr} images can ride with a change. ${f?`${u.length} were`:"One was"} left off.`;case"too-big":return`${f?"Some images are":"That image is"} over 10MB, which is more than an agent needs. Left off.`;case"not-an-image":return f?"Only PNG, JPEG, WebP and GIF images can be attached.":`${Mr(s.file.name)} is not an image Leglas can attach. PNG, JPEG, WebP or GIF.`}}function Mr(u){const s=u.replace(/\s+/g," ").trim();return s===""?"image":s}function yp(u){const s=Mr(u).replace(/[^\x20-\x7E]/g,"").trim();return(s===""?"image":s).slice(0,80)}function vp(u){if(u<1024)return`${u} B`;const s=u/1024;if(s<1024)return`${Math.round(s)} KB`;const f=s/1024;return`${f<10?f.toFixed(1):Math.round(f)} MB`}function bp(u){return u.flatMap(s=>s.status==="ready"&&s.id!==null?[s.id]:[])}function xp(u){return u.some(s=>s.status==="failed")?"failed":u.some(s=>s.status==="uploading")?"uploading":null}function Ys(u){return u===void 0?!1:Array.from(u).includes("Files")}function Sp({drafts:u,onRemove:s,onRetry:f}){return u.length===0?null:o.jsx("ul",{"aria-label":"Images attached to this change",className:"flex flex-wrap gap-1.5 px-2 pt-2",children:u.map(r=>{const d=r.status==="failed";return o.jsxs("li",{className:"leglas-reference group/reference relative",children:[o.jsx(Nt,{label:d?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"block",children:"Did not upload"}),o.jsx("span",{className:"block text-[#9CA3AF]",children:"Click to try again"})]}):`${r.name} · ${vp(r.bytes)}`,children:d?o.jsx("button",{"aria-label":`${r.name} did not upload. Try again`,className:"block rounded transition-transform duration-150 focus-visible:outline-2 focus-visible:outline-offset-2 active:scale-[0.96] motion-reduce:transition-none",onClick:()=>f(r.key),type:"button",children:o.jsx(D1,{draft:r,failed:!0})}):o.jsx(D1,{draft:r,failed:!1})}),r.status==="uploading"?o.jsx("span",{"aria-label":"Uploading",className:"absolute bottom-1 right-1 size-3 animate-spin rounded-full border-[1.5px] border-white/30 border-t-white motion-reduce:animate-none",role:"status"}):d?o.jsx("span",{"aria-hidden":"true",className:"absolute bottom-1 right-1 flex size-3 items-center justify-center rounded-full bg-amber-400 text-[9px] font-semibold leading-none text-[#1C1C20]",children:"!"}):null,o.jsx("button",{"aria-label":`Remove ${r.name}`,className:"absolute -right-1.5 -top-1.5 flex size-4 items-center justify-center rounded-full bg-[#1E1E22] text-[#D1D5DB] opacity-0 shadow-[0_0_0_1px_rgba(255,255,255,0.12)] transition-[opacity,color,transform] duration-150 hover:text-white focus-visible:opacity-100 active:scale-[0.96] group-hover/reference:opacity-100 motion-reduce:transition-none",onClick:()=>s(r.key),type:"button",children:o.jsx("svg",{"aria-hidden":!0,fill:"none",height:"8",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.75",viewBox:"0 0 16 16",width:"8",children:o.jsx("path",{d:"m4 4 8 8M12 4l-8 8"})})})]},r.key)})})}function D1({draft:u,failed:s}){return o.jsx("img",{alt:u.name,className:`block h-10 w-auto min-w-10 max-w-28 rounded object-cover ${s?"opacity-70 shadow-[0_0_0_1px_rgba(251,191,36,0.8)]":"shadow-[0_0_0_1px_rgba(255,255,255,0.1)]"}`,draggable:!1,src:u.url})}const Ep=(u,s)=>fetch(u,s);async function wp(u,s=Ep){const f=await s("/leglas/api/references",{body:u,headers:{"content-type":u.type,"x-leglas-filename":yp(u.name??"")},method:"POST"});if(!f.ok)throw new Error("Leglas refused the image.");const r=await f.json(),d=r.reference?.id,g=r.reference?.file;if(r.ok!==!0||typeof d!="string"||typeof g!="string")throw new Error("Leglas refused the image.");return{id:d,file:g}}const Qs=(u,s)=>fetch(u,s);async function Mp(u=Qs){const s=await u("/leglas/api/annotations");if(!s.ok)throw new Error("Leglas refused the notes.");return(await s.json()).annotations??[]}async function Cr(u,s,f){const r=await f(u,{body:JSON.stringify(s),headers:{"content-type":"application/json"},method:"POST"});if(!r.ok)throw new Error("Leglas refused the note.");const d=await r.json();if(d.ok!==!0)throw new Error("Leglas refused the note.");return d}function Cp(u,s,f,r=Qs){return Cr("/leglas/api/annotations",{anchor:f,note:s,title:u},r)}function jp(u,s,f=Qs){return Cr("/leglas/api/annotations/update",{id:u,note:s},f)}function Ap(u,s=Qs){return Cr("/leglas/api/annotations/delete",{ids:u},s)}function Np(u){return[...new Set(u.filter(s=>s.mode!=="variant"&&(s.status==="queued"||s.status==="picked-up"||s.status==="running")).map(s=>s.title))]}function Tp(u){return new Set(u.filter(s=>s.status==="queued"||s.status==="picked-up"||s.status==="running").flatMap(s=>s.notes??[]))}function Dp(u){return new Set(u.filter(s=>s.status==="picked-up"||s.status==="running").map(s=>s.title))}function zp(u,s,f=null){if(u==="custom"){const d=f?.trim().split(/\s+/)[0]??"";return{kind:"chosen",id:"custom",name:d===""?"Custom":d.split("/").pop()??"Custom"}}const r=u===null?void 0:s.find(d=>d.id===u);return r?.available?{kind:"chosen",id:r.id,name:r.name}:s.some(d=>d.available)?{kind:"choose"}:{kind:"none"}}function Op(u){const s=u.max===null?`retry ${u.attempt}`:`retry ${u.attempt} of ${u.max}`,f=u.status,r=u.reason??"";return f===429||r.includes("rate")?`provider is rate limiting · ${s}`:f===401||f===403||r.includes("auth")?`provider refused the login · ${s}`:f===529||f===503||r.includes("overload")?`provider is overloaded · ${s}`:`provider returned an error · ${s}`}function Rp(u){const s=Math.max(0,Math.floor(u/1e3));return s<60?`${s}s`:`${Math.floor(s/60)}m ${String(s%60).padStart(2,"0")}s`}function _p(u,s,f){const r=u.find(v=>v.status==="running");if(s.running||r!==void 0)return{kind:"running",id:r?.id??null,name:s.name??"Your agent",activity:s.activity,startedAt:s.startedAt,title:r?.title??null,stopping:s.stopping===!0,waiting:s.stopping===!0?null:s.waiting??null};const d=u.filter(v=>v.status==="queued").length;if(d>0)return{kind:"queued",count:d,attended:f};if(u.some(v=>v.status==="picked-up"))return{kind:"picked-up"};const g=u.findLast(v=>v.status==="failed"||v.status==="cancelled");return g===void 0?null:g.status==="cancelled"?{kind:"stopped",id:g.id,title:g.title}:{kind:"failed",id:g.id,title:g.title,reason:g.failure?.message??null}}const Ta=(u,s)=>fetch(u,s),Lp=5e3,Up=1e4;async function I1(u,s,f,r){const d=new AbortController,g=setTimeout(()=>d.abort(),f);try{return await r(u,{...s,signal:d.signal})}finally{clearTimeout(g)}}async function z1(u=!1,s=Ta){const f=await I1(`/leglas/api/agents${u?"?refresh=1":""}`,void 0,Lp,s);if(!f.ok)throw new Error("Leglas refused the agent request.");return f.json()}async function Ci(u,s,f){const r=await I1(u,{method:"POST",...s===null?{}:{headers:{"content-type":"application/json"},body:JSON.stringify(s)}},Up,f);if(!r.ok)throw new Error("Leglas refused the agent request.");if((await r.json()).ok!==!0)throw new Error("Leglas refused the agent request.")}function kp(u,s,f=Ta){return Ci("/leglas/api/agent",{agent:u},f)}function Bp(u,s,f=Ta){return Ci("/leglas/api/agent",{agent:u,effort:s},f)}function Hp(u=Ta){return Ci("/leglas/api/agents/warm",null,u)}function qp(u,s=Ta){return Ci("/leglas/api/requests/cancel",u==null?null:{id:u},s)}function Yp(u,s=Ta){return Ci("/leglas/api/requests/retry",{id:u},s)}function Gp(u,s=Ta){return Ci("/leglas/api/requests/dismiss",{id:u},s)}const or={claude:{codeLabel:"Terminal command",copyLabel:"Copy Claude Code command",description:"Add Leglas with one terminal command.",label:"Claude Code",nextStep:"Run this command from your project, then ask Claude to list your Leglas directions.",snippet:"claude mcp add leglas -- npx -y leglas-mcp"},other:{codeLabel:"MCP configuration",copyLabel:"Copy MCP configuration",description:"Use standard MCP JSON with another coding agent.",label:"Codex, Cursor & others",nextStep:"Add this configuration in your client's MCP settings, restart the client, then ask it to list your Leglas directions.",snippet:`{
|
|
11
11
|
"mcpServers": {
|
|
12
12
|
"leglas": { "command": "npx", "args": ["-y", "leglas-mcp"] }
|
|
13
13
|
}
|
|
14
|
-
}`}};function Op(u,s){return s==="copying"?"Copying…":s==="copied"?"Copied":u.copyLabel}function Rp(u){return u?{title:"Agent connected",detail:"Leglas received activity from an MCP agent in this project."}:{title:"Waiting for agent activity",detail:"This updates after the agent uses a Leglas tool."}}function _p({client:u}){return o.jsx("span",{"aria-hidden":"true",className:"mt-0.5 flex h-5 w-7 shrink-0 items-center justify-center text-[#D1D5DB]",children:u==="claude"?o.jsx(Mi,{id:"claude",size:17}):o.jsxs("span",{className:"flex -space-x-1.5",children:[o.jsx("span",{className:"flex size-5 items-center justify-center rounded-full bg-[#25252B] ring-1 ring-[#3A3A42]",children:o.jsx(Mi,{id:"codex",size:14})}),o.jsx("span",{className:"flex size-5 items-center justify-center rounded-full bg-[#25252B] ring-1 ring-[#3A3A42]",children:o.jsx(Mi,{id:"cursor",size:13})})]})})}function Lp({connected:u,fallbackFocusRef:s,onClose:f}){const[r,d]=M.useState("claude"),[g,b]=M.useState("idle"),C=M.useRef(null),w=M.useRef(null),x=M.useRef(f);x.current=f,M.useEffect(()=>{const R=C.current;if(R===null)return;const ne=document.activeElement,oe=X=>{X.preventDefault(),x.current()},Z=X=>{if(X.key!=="Tab")return;const W=Array.from(R.querySelectorAll("button:not(:disabled), input:not(:disabled), [href], [tabindex]:not([tabindex='-1'])")),ie=W[0],ue=W.at(-1);ie===void 0||ue===void 0?(X.preventDefault(),R.focus()):X.shiftKey&&document.activeElement===ie?(X.preventDefault(),ue.focus()):!X.shiftKey&&document.activeElement===ue&&(X.preventDefault(),ie.focus())};return R.addEventListener("cancel",oe),R.addEventListener("keydown",Z),R.open||R.showModal(),w.current?.focus(),()=>{R.removeEventListener("cancel",oe),R.removeEventListener("keydown",Z),R.open&&R.close();const X=s.current;(X?.isConnected?X:ne)?.focus()}},[s]);const O=or[r],_=Rp(u),K=R=>{d(R),b("idle")},G=async()=>{if(g==="copying")return;b("copying");const R=await xr(O.snippet);b(R==="copied"?"copied":"blocked")};return o.jsx("dialog",{"aria-describedby":"mcp-connect-description","aria-labelledby":"mcp-connect-title","aria-modal":"true",className:"m-auto max-h-[calc(100dvh-2rem)] max-w-none overflow-visible border-0 bg-transparent p-0 text-start text-inherit backdrop:bg-black/55 backdrop:backdrop-blur-sm",onPointerDown:R=>{R.target===R.currentTarget&&f()},ref:C,tabIndex:-1,children:o.jsxs("div",{className:"w-[calc(100vw-2rem)] max-w-lg overscroll-contain rounded-xl border border-[#2A2A30] bg-[#1E1E22] p-5 shadow-2xl",children:[o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("span",{"aria-hidden":"true",className:"flex size-10 shrink-0 items-center justify-center rounded-lg border border-[#34343B] bg-[#25252A] shadow-inner",children:o.jsx(wu,{size:24})}),o.jsxs("div",{className:"min-w-0 pt-0.5",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(q1,{height:11}),o.jsx("span",{className:"rounded-full bg-[#7C9CFF]/10 px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-[0.08em] text-[#AFC2FF]",children:"MCP setup"})]}),o.jsx("h2",{className:"mt-2 text-base font-medium text-white",id:"mcp-connect-title",children:"Connect agent via MCP"}),o.jsx("p",{className:"mt-1.5 max-w-md text-xs leading-relaxed text-[#9CA3AF]",id:"mcp-connect-description",children:"Connect an MCP-compatible agent so it can handle requests in this project."})]})]}),o.jsxs("fieldset",{className:"mt-5",children:[o.jsx("legend",{className:"text-[10px] font-medium uppercase tracking-[0.08em] text-[#84848C]",children:"MCP client"}),o.jsx("div",{className:"mt-2 grid grid-cols-1 gap-2 sm:grid-cols-2",children:Object.keys(or).map((R,ne)=>{const oe=or[R],Z=r===R;return o.jsxs("label",{className:`flex cursor-pointer items-start gap-2.5 rounded-lg border p-3 transition-[background-color,border-color,color] duration-150 ${Z?"border-[#6678B8] bg-[#7C9CFF]/10 text-white":"border-[#2A2A30] bg-[#19191D] text-[#D1D5DB] hover:border-[#3A3A42] hover:bg-[#24242A]"}`,children:[o.jsx("input",{checked:Z,className:"mt-0.5 size-3.5 shrink-0 accent-[#AFC2FF] focus-visible:outline-2 focus-visible:outline-offset-2",name:"mcp-client",onChange:()=>K(R),ref:ne===0?w:void 0,type:"radio",value:R}),o.jsx(_p,{client:R}),o.jsxs("span",{className:"min-w-0",children:[o.jsx("span",{className:"block text-xs font-medium",children:oe.label}),o.jsx("span",{className:"mt-0.5 block text-[10px] leading-relaxed text-[#84848C]",children:oe.description})]})]},R)})})]}),o.jsxs("div",{className:"mt-5 overflow-hidden rounded-lg border border-[#2A2A30] bg-[#151519]",children:[o.jsxs("div",{className:"flex min-h-9 items-center justify-between gap-3 border-b border-[#2A2A30] px-3",children:[o.jsx("span",{className:"text-[10px] font-medium text-[#84848C]",children:O.codeLabel}),o.jsxs("button",{className:"flex min-h-7 shrink-0 items-center gap-1.5 rounded-md px-2 text-[10px] font-medium text-[#D1D5DB] transition-[background-color,color,scale] duration-150 hover:bg-white/[0.06] hover:text-white active:scale-[0.96] disabled:opacity-60",disabled:g==="copying",onClick:()=>{G()},type:"button",children:[o.jsx(Cn,{d:Mn.copy,size:12}),Op(O,g)]})]}),o.jsx("pre",{"aria-label":O.codeLabel,className:"max-h-44 overflow-auto whitespace-pre-wrap break-words p-3 font-mono text-[11px] leading-relaxed text-[#D1D5DB]",tabIndex:0,children:o.jsx("code",{children:O.snippet})})]}),o.jsx("p",{className:"mt-2 min-h-4 text-[10px] leading-relaxed",role:"status",children:g==="blocked"?o.jsx("span",{className:"text-red-300",children:"Clipboard access is blocked. Select and copy the text above."}):g==="copied"?o.jsx("span",{className:"text-emerald-300",children:"Copied to the clipboard."}):null}),o.jsxs("div",{className:"mt-4 space-y-4",children:[o.jsx("p",{className:"text-xs leading-relaxed text-[#9CA3AF]",children:O.nextStep}),o.jsxs("div",{className:`flex items-start gap-2.5 rounded-lg px-3 py-2.5 ${u?"bg-emerald-400/10":"bg-white/[0.04]"}`,role:"status",children:[o.jsx("span",{"aria-hidden":"true",className:`mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full ${u?"bg-emerald-400 text-[#123326]":"border border-[#5B5B66]"}`,children:u?o.jsx("svg",{fill:"none",height:"10",viewBox:"0 0 12 12",width:"10",children:o.jsx("path",{d:"m2.2 6.1 2.2 2.2 5.4-5.2",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8"})}):null}),o.jsxs("span",{className:"min-w-0",children:[o.jsx("span",{className:`block text-xs font-medium ${u?"text-emerald-200":"text-[#D1D5DB]"}`,children:_.title}),o.jsx("span",{className:"mt-0.5 block text-[10px] leading-relaxed text-[#84848C]",children:_.detail})]})]})]}),o.jsx("div",{className:"mt-5 flex justify-end",children:o.jsx("button",{className:"rounded-md bg-[#E8E8EA] px-3 py-1.5 text-xs font-medium text-[#1C1C20] transition-[background-color,scale] duration-150 hover:bg-white active:scale-[0.96]",onClick:f,type:"button",children:"Done"})})]})})}function Up({children:u,label:s}){return s===null?o.jsx(o.Fragment,{children:u}):o.jsx(Nt,{label:s,side:"right",wide:!0,children:u})}function kp(u,s,f){const r=V1(u);return r===null?null:o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"block text-white",children:s}),u?.note?o.jsx("span",{className:"mt-0.5 block font-normal text-[#D1D5DB]",children:u.note}):null,o.jsxs("span",{className:"mt-1.5 block border-t border-white/10 pt-1.5 font-normal text-[#84848C]",children:[r.basedOn===null?null:o.jsxs("span",{className:"block",children:["Variant of ",f(r.basedOn)]}),r.askedFor===null?null:o.jsxs("span",{className:"mt-0.5 block",children:["You asked for “",r.askedFor,"”"]})]})]})}const rr=[{key:"satoshi",label:"Satoshi",stack:"var(--font-satoshi)"},{key:"outfit",label:"Outfit",stack:"var(--font-outfit)"},{key:"geist",label:"Geist",stack:"var(--font-geist)"}],fr=["#34D399","#38BDF8","#818CF8","#C084FC","#FB7185","#FB923C"];function Bp(u){let s=0;for(const r of u)s=s*31+r.charCodeAt(0)|0;const f=fr[Math.abs(s)%fr.length]??fr[0];return{backgroundColor:`${f}22`,color:f}}const N1=15e3,Hp=3e4,T1={height:800,width:1280},qp=96,D1={attached:!1,running:!1,name:null,activity:null,startedAt:null,stopping:!1,waiting:null},Yp={agents:[],choice:null,customRun:null,effort:null},z1={low:"Low",medium:"Medium",high:"High",xhigh:"Extra high",max:"Maximum"},J1=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),Gp=Y1(J1);function Xp({mac:u,onClose:s}){const f=M.useRef(null),r=Yg(u);return M.useEffect(()=>{const d=document.activeElement;f.current?.focus();const g=b=>{b.key==="Escape"&&(b.preventDefault(),s())};return window.addEventListener("keydown",g),()=>{window.removeEventListener("keydown",g),d?.focus?.()}},[s]),o.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-6 backdrop-blur-sm",onPointerDown:d=>{d.target===d.currentTarget&&s()},children:o.jsxs("div",{"aria-label":"Keyboard shortcuts","aria-modal":"true",className:"w-full max-w-sm rounded-lg border border-[#232328] bg-[#1E1E22] p-4 shadow-2xl focus:outline-none",ref:f,role:"dialog",tabIndex:-1,children:[o.jsx("span",{className:"block pb-3 text-[10px] uppercase tracking-[0.08em] text-[#84848C]",children:"Keyboard"}),o.jsx("dl",{className:"flex flex-col gap-2.5",children:r.map(d=>o.jsxs("div",{className:"flex items-baseline justify-between gap-4",children:[o.jsx("dt",{className:"flex shrink-0 items-baseline gap-1",children:d.keys.map((g,b)=>o.jsxs("span",{className:"flex items-baseline gap-1",children:[b>0&&d.join?o.jsx("span",{className:"text-[10px] text-[#84848C]",children:d.join}):null,o.jsx("kbd",{className:"rounded border border-[#232328] bg-[#2E2E2E]/60 px-1.5 py-0.5 font-sans text-[11px] text-[#E8E8EA]",children:g})]},g))}),o.jsx("dd",{className:"text-right text-xs leading-snug text-[#9CA3AF]",children:d.label})]},d.label))})]})})}function Qp({busy:u,count:s,error:f,fallbackFocusRef:r,name:d,onCancel:g,onConfirm:b}){const C=M.useRef(null),w=M.useRef(null),x=M.useRef(g);x.current=g,M.useEffect(()=>{const G=w.current;if(G===null)return;const R=document.activeElement,ne=Z=>{Z.preventDefault(),x.current()},oe=Z=>{if(Z.key!=="Tab")return;const X=Array.from(G.querySelectorAll("button:not(:disabled)")),W=X[0],ie=X.at(-1);W===void 0||ie===void 0?(Z.preventDefault(),G.focus()):Z.shiftKey&&document.activeElement===W?(Z.preventDefault(),ie.focus()):!Z.shiftKey&&document.activeElement===ie&&(Z.preventDefault(),W.focus())};return G.addEventListener("cancel",ne),G.addEventListener("keydown",oe),G.open||G.showModal(),C.current?.focus(),()=>{G.removeEventListener("cancel",ne),G.removeEventListener("keydown",oe),G.open&&G.close(),(R?.isConnected?R:r.current)?.focus()}},[]);const O=s===1,_=O?"Delete removed direction?":"Clear removed directions?",K=O?`This permanently removes “${d??"this direction"}” from Leglas.`:`This permanently removes all ${s} directions from Leglas.`;return o.jsx("dialog",{"aria-describedby":"delete-removed-description","aria-labelledby":"delete-removed-title","aria-modal":"true",className:"m-auto max-h-[calc(100dvh-3rem)] max-w-none overflow-visible border-0 bg-transparent p-0 text-left text-inherit backdrop:bg-black/50 backdrop:backdrop-blur-sm",onPointerDown:G=>{G.target===G.currentTarget&&!u&&g()},ref:w,role:"alertdialog",tabIndex:-1,children:o.jsxs("div",{className:"w-[calc(100vw-3rem)] max-w-sm overscroll-contain rounded-lg border border-[#232328] bg-[#1E1E22] p-4 shadow-2xl",children:[o.jsx("h2",{className:"text-sm font-medium text-white",id:"delete-removed-title",children:_}),o.jsxs("div",{className:"mt-2 space-y-1 text-xs leading-relaxed text-[#9CA3AF]",id:"delete-removed-description",children:[o.jsx("p",{children:K}),o.jsx("p",{children:"Source files and shared project config stay untouched."})]}),f!==null?o.jsx("p",{className:"mt-3 text-xs leading-relaxed text-red-300",role:"alert",children:f}):null,o.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[o.jsx("button",{className:"rounded-md px-3 py-1.5 text-xs text-[#D1D5DB] transition-[background-color,color,scale] hover:bg-white/[0.06] hover:text-white active:scale-[0.96] disabled:opacity-50",disabled:u,onClick:g,ref:C,type:"button",children:"Cancel"}),o.jsx("button",{className:"rounded-md bg-red-500/90 px-3 py-1.5 text-xs font-medium text-white transition-[background-color,scale] hover:bg-red-500 active:scale-[0.96] disabled:opacity-60",disabled:u,onClick:b,type:"button",children:u?"Deleting…":O?"Delete":"Delete all"})]})]})})}function Zp({previews:u,project:s,scanPreviews:f=!0,warnings:r=[]}){const d=M.useRef(null),g=M.useRef(null),b=M.useRef(null),[C,w]=M.useState(!1),[x,O]=M.useState(null),[_,K]=M.useState(!1),[G,R]=M.useState(!1),ne=M.useCallback(()=>b.current?.(),[]),oe=M.useCallback(()=>w(h=>!h),[]),Z=M.useCallback(()=>w(!1),[]),[X,W]=M.useState(!1),ie=M.useCallback(()=>W(h=>!h),[]),ue=M.useCallback(()=>Gt(h=>!h),[]),p=U2({previews:u,project:s,searchRef:d,onToggleSplit:ne,onToggleHelp:oe,onToggleTools:ie,onToggleNote:ue,suspended:C||x!==null||_}),I=()=>{G||O(null)},fe=async()=>{if(x===null||G)return;const h=x;R(!0),O({...h,error:null});try{await p.deleteRemoved(h.titles),O(null),p.notify({kind:`delete:${h.titles.join("|")}`,message:h.titles.length===1?`${p.displayName(h.titles[0]??"")} permanently deleted`:`${h.titles.length} removed directions permanently deleted`,tone:"info",ttl:pt.plain})}catch(j){O({...h,error:j instanceof Error?j.message:"The directions could not be deleted."})}finally{R(!1)}},[me,ge]=M.useState(!1),[Me,he]=M.useState(null),qe=Me!==null,Ae=M.useRef(!1),[Be,D]=M.useState(""),[Q,te]=M.useState("variant");M.useEffect(()=>{const h=g.current;h!==null&&(h.style.height="0px",h.style.height=`${Math.min(h.scrollHeight,96)}px`)},[Be,p.prefs.width]);const[xe,Ce]=M.useState(!1),[v,L]=M.useState([]),F=M.useRef(new Map),ee=M.useRef(null),[ce,ve]=M.useState(!1),U=M.useRef(0),V=M.useCallback((h,j)=>{F.current.set(h,j),L(H=>H.map($=>$.key===h?{...$,status:"uploading",id:null}:$)),dp(j).then(({id:H})=>L($=>$.map(ae=>ae.key===h?{...ae,status:"ready",id:H}:ae))).catch(()=>L(H=>H.map($=>$.key===h?{...$,status:"failed",id:null}:$)))},[]),J=h=>{if(p.active===null||xe)return;const{accepted:j,refused:H}=ap(v,h),$=ip(H);if($!==null&&p.notify({kind:"reference",message:$,tone:"info",ttl:pt.action}),j.length===0)return;const ae=j.map(re=>({key:crypto.randomUUID(),name:Er(re.name),type:re.type,bytes:re.size,url:URL.createObjectURL(re),status:"uploading",id:null}));L(re=>[...re,...ae]),ae.forEach((re,pe)=>{const Oe=j[pe];Oe!==void 0&&V(re.key,Oe)})},le=h=>{F.current.delete(h);const j=v.find(H=>H.key===h);j!==void 0&&URL.revokeObjectURL(j.url),L(H=>H.filter($=>$.key!==h))},Le=h=>{const j=F.current.get(h);j!==void 0&&V(h,j)},Ze=()=>{F.current.clear();for(const h of v)URL.revokeObjectURL(h.url);L([])},[Ye,Ve]=M.useState(null),[ze,$e]=M.useState(!1),[nt,ft]=M.useState(!1),[Mt,Wt]=M.useState(null),Yn=M.useRef(null),yl=M.useRef(null),Wl=M.useRef(null),yt=M.useRef(null),Il=M.useRef(null),Pl=M.useRef(null),[ea,vl]=M.useState(qp);M.useEffect(()=>{const h=Pl.current;if(h===null||typeof ResizeObserver>"u")return;const j=()=>vl(h.offsetHeight);j();const H=new ResizeObserver(j);return H.observe(h),()=>H.disconnect()},[]);const Da=M.useRef(null),[Gn,Xn]=M.useState({height:0,on:!1,top:0});M.useEffect(()=>{Xn(h=>h.on?{...h,on:!1}:h)},[p.rows.join("|")]);const[Ct,It]=M.useState(null),Tt=M.useRef(null),Zt=M.useRef(null);M.useEffect(()=>{Tt.current=Ct},[Ct]),M.useEffect(()=>{if(!p.focusing)return;const h=p.focusing.target==="search"?d.current:g.current;h?.focus(),h?.select()},[p.focusing]),M.useEffect(()=>{if(!Ct)return;const h=Zt.current;if(!h)return;const j=$=>{const ae=$.clientY-h.startY,re=$.clientX-h.startX;It(pe=>{if(!pe||pe.settling)return pe;if(!pe.started){if(Math.abs(ae)<=4&&Math.abs(re)<=4)return{...pe,dy:ae};if(Math.abs(re)>Math.abs(ae))return null;window.getSelection()?.removeAllRanges()}const Oe=h.rows[pe.from];if(!Oe)return pe;const Jt=Math.max(h.minDy,Math.min(h.maxDy,ae)),jt=Oe.mid+ae;let sn=0;return h.rows.forEach((bt,el)=>{el!==pe.from&&jt>bt.mid&&(sn+=1)}),{...pe,dy:Jt,started:!0,to:sn}})},H=()=>{const $=Tt.current;if(!$?.started){It(null);return}h.suppressed=!0;let ae=0;if($.to>$.from)for(let re=$.from+1;re<=$.to;re+=1)ae+=(h.rows[re]?.height??0)+$.gap;else for(let re=$.to;re<$.from;re+=1)ae-=(h.rows[re]?.height??0)+$.gap;It({...$,dy:ae,settling:!0}),window.setTimeout(()=>{p.moveOption($.title,$.to),It(null),window.setTimeout(()=>{h.suppressed=!1},0)},190)};return window.addEventListener("pointermove",j),window.addEventListener("pointerup",H),window.addEventListener("pointercancel",H),()=>{window.removeEventListener("pointermove",j),window.removeEventListener("pointerup",H),window.removeEventListener("pointercancel",H)}},[Ct!==null]),M.useEffect(()=>{if(!X)return;yl.current?.focus();const h=$=>{$.key==="Escape"&&(W(!1),Yn.current?.focus())},j=$=>{const ae=$.target;!yl.current?.contains(ae)&&!Yn.current?.contains(ae)&&W(!1)},H=()=>W(!1);return window.addEventListener("keydown",h),window.addEventListener("pointerdown",j),window.addEventListener("blur",H),()=>{window.removeEventListener("keydown",h),window.removeEventListener("pointerdown",j),window.removeEventListener("blur",H)}},[X]);const ct="flex h-7 w-full items-center justify-between gap-2 whitespace-nowrap rounded px-2 text-xs hover:bg-[#2E2E2E] hover:text-white disabled:cursor-not-allowed disabled:opacity-40",ta=rr.find(h=>h.key===p.prefs.font)??rr[0],bl=p.prefs.viewport!==null,ji=48,Vt=Ct?.started??!1,k=p.resizing||Vt||qe,[P,be]=M.useState({}),[Se,we]=M.useState({}),[st,We]=M.useState(!1),[dt,Kt]=M.useState(null),Mu=M.useRef(null);M.useEffect(()=>()=>{Mu.current=p.active},[p.active]),b.current=()=>{!st&&Ot!==null&&Kt(Ot),(Ot!==null||st)&&We(h=>!h)};const Ot=Wg({active:p.active,previous:Mu.current,pinned:dt,parent:p.parentOf(p.active),rows:p.rows}),xl=Ig({active:p.active,compare:Ot,split:st}),qt=xl.length>1,Sl=xl,na=M.useRef(new Map),Qn=h=>Gg(h,p.urlFor(h),Se[h]??0),la=h=>{const j=Qn(h);return na.current.get(h)===j&&p.isLoaded(h,j)},$t=new Map(Sl.map(h=>[h,Qn(h)])),vt=[...$t.values()].join(""),Rt=M.useRef($t);Rt.current=$t,M.useLayoutEffect(()=>{const h=na.current,j=[...$t].filter(([H,$])=>h.get(H)!==$);for(const[H]of j)p.resetLoaded(H);j.some(([H])=>P[H])&&be(H=>{const $={...H};for(const[ae]of j)$[ae]=!1;return $}),na.current=new Map($t)},[vt]);const Zn=M.useRef(null),za=M.useRef(null),[aa,Cu]=M.useState({height:0,width:0}),ju=M.useCallback(h=>{if(Zn.current=h,za.current?.disconnect(),h===null)return;const j=h.getBoundingClientRect();Cu({height:j.height,width:j.width});const H=new ResizeObserver(([$])=>{const ae=$?.contentRect;ae&&Cu({height:ae.height,width:ae.width})});H.observe(h),za.current=H},[]),{boxHeight:ia,boxWidth:Ai,designWidth:Vn,frameHeight:El,scale:Kn,scaling:Yt}=t2({gutter:ji,panes:xl.length,scaleSplit:p.prefs.scaleSplit,stageHeight:aa.height,stageWidth:aa.width,viewport:p.prefs.viewport}),ht=p.prefs.viewport!==null?Math.round(p.prefs.viewport):aa.width<=0?null:Math.round(qt&&!Yt?(aa.width-1)/2:aa.width),Au=Me?(()=>{const{x:h,y:j}=M2(Me);return{bottom:"auto",left:h,right:"auto",top:j}})():void 0,Nu=h=>{if(h.button!==0)return;const j=Zn.current?.getBoundingClientRect();if(!j)return;const H=h.currentTarget;H.setPointerCapture(h.pointerId),Ae.current=!1;const $={x:h.clientX,y:h.clientY};let ae=!1;const re=Oe=>{!ae&&!C2($,{x:Oe.clientX,y:Oe.clientY})||(ae=!0,he(w2({x:Oe.clientX-j.left,y:Oe.clientY-j.top},{width:j.width,height:j.height})))},pe=Oe=>{if(H.hasPointerCapture(Oe.pointerId)&&H.releasePointerCapture(Oe.pointerId),H.removeEventListener("pointermove",re),H.removeEventListener("pointerup",pe),H.removeEventListener("pointercancel",pe),he(null),!ae)return;Ae.current=!0;const{corner:Jt}=j2({x:Oe.clientX-j.left,y:Oe.clientY-j.top},{width:j.width,height:j.height});p.setPrefs(jt=>({...jt,corner:Jt})),W(!1)};H.addEventListener("pointermove",re),H.addEventListener("pointerup",pe),H.addEventListener("pointercancel",pe)},[Dt,$n]=M.useState(Jg),wl=new Set(u.filter(o1).map(h=>h.title)),Tu=wl.size>0,[gn,Zs]=M.useState({requests:[],agent:D1}),[Oa,Ra]=M.useState([]),[_t,Gt]=M.useState(!1),[Pt,_a]=M.useState(Yp),[La,Ua]=M.useReducer(h=>h+1,0);M.useEffect(()=>{let h=!1;return A1(La>0).then(j=>{h||_a(H=>JSON.stringify(H)===JSON.stringify(j)?H:j)}).catch(()=>{}),()=>{h=!0}},[La]);const[ka,Jn]=M.useReducer(h=>h+1,0);M.useEffect(()=>{let h=!1;const H=pr(async $=>{const ae=(re,pe)=>fetch(re,{...pe,signal:$});await fetch("/leglas/api/requests",{signal:$}).then(re=>re.json()).then(re=>{if(h)return;const pe={requests:re.requests,agent:re.agent??D1};Zs(Oe=>JSON.stringify(Oe)===JSON.stringify(pe)?Oe:pe)}).catch(()=>{}),await hp(ae).then(re=>{h||Ra(pe=>JSON.stringify(pe)===JSON.stringify(re)?pe:re)}).catch(()=>{})},{everyMs:2e3});return()=>{h=!0,H()}},[ka]);const Ge=xp(Pt.choice,Pt.agents,Pt.customRun),Ba=M.useRef(0),Ha=()=>{if(Ge.kind!=="chosen")return;const h=Date.now();h-Ba.current<Hp||(Ba.current=h,Np().catch(()=>{}))},An=Ge.kind==="chosen"?Pt.agents.find(h=>h.id===Ge.id&&h.available):void 0,Ln=Pt.effort!==null&&An?.efforts.includes(Pt.effort)?Pt.effort:null,Lt=p.active===null?[]:Oa.filter(h=>h.title===p.active),qa=(()=>{const h=V1(p.active===null?void 0:p.previewFor(p.active));return h===null?null:k2(h.basedOn===null?null:p.displayName(h.basedOn),h.askedFor)})(),Ml=Ge.kind==="chosen"&&Pt.agents.some(h=>h.id===Ge.id&&h.auth==="signed-out"),je=wp(gn.requests,gn.agent,Ge.kind==="chosen"||gn.agent.attached),Du=je===null?null:je.kind==="running"?je.stopping?`Stopping ${je.name}`:`${je.name} is on it`:je.kind==="queued"?je.count===1?"Change queued":`${je.count} changes queued`:je.kind==="picked-up"?"Your agent is on it":je.kind==="stopped"?"You stopped that change":"That change failed",Ni=je===null?null:je.kind==="running"?je.stopping?"waiting for it to exit":je.waiting!==null?Sp(je.waiting):je.activity??je.title:je.kind==="queued"?je.attended?"your agent picks it up next":"pick who runs your changes":je.kind==="failed"?je.reason??je.title:je.kind==="stopped"?je.title:null,Cl=je?.kind==="running"?je.startedAt:null,[Vs,zu]=M.useState(()=>Date.now());M.useEffect(()=>{if(Cl===null)return;zu(Date.now());const h=window.setInterval(()=>zu(Date.now()),1e3);return()=>window.clearInterval(h)},[Cl]),M.useEffect(()=>{Ge.kind==="none"&&ft(!1)},[Ge.kind]),M.useEffect(()=>{if(!nt)return;Wl.current?.focus();const h=$=>{$.key==="Escape"&&(ft(!1),yt.current?.focus())},j=$=>{const ae=$.target;!Wl.current?.contains(ae)&&!yt.current?.contains(ae)&&ft(!1)},H=()=>ft(!1);return window.addEventListener("keydown",h),window.addEventListener("pointerdown",j),window.addEventListener("blur",H),()=>{window.removeEventListener("keydown",h),window.removeEventListener("pointerdown",j),window.removeEventListener("blur",H)}},[nt]);const Ya=h=>{if(Ye!==null||ze)return;const j=Pt.agents.find(H=>H.id===h)?.name??"Agent";Ve(h),jp(h).then(()=>{Ua(),ft(!1)}).catch(async()=>{try{const H=await A1(!0);if(_a(H),H.choice===h){ft(!1);return}}catch{}p.notify({kind:"agent-choice",message:`${j} wasn’t selected. Try again.`,tone:"danger",ttl:pt.action})}).finally(()=>Ve(null))},Nn=h=>{if(An===void 0||ze||Ye!==null)return;const j=Pt.effort;$e(!0),_a(H=>({...H,effort:h})),Ap(An.id,h).then(()=>Ua()).catch(()=>{_a(H=>({...H,effort:j})),p.notify({kind:"agent-choice",message:"Effort could not be saved. Agent settings did not change.",tone:"danger",ttl:pt.action})}).finally(()=>$e(!1))},Ti=h=>{Mt===null&&(Wt("cancel"),Tp(h).then(()=>Jn()).catch(()=>{p.notify({kind:"agent-cancel",message:"Leglas could not stop that run.",tone:"danger",ttl:pt.action})}).finally(()=>Wt(null)))},Di=h=>{Mt===null&&(Wt("retry"),Dp(h).then(()=>Jn()).catch(()=>{p.notify({kind:"agent-retry",message:"That change could not be retried.",tone:"danger",ttl:pt.action})}).finally(()=>Wt(null)))},jl=h=>{Mt===null&&(Wt("dismiss"),zp(h).then(()=>Jn()).catch(()=>{p.notify({kind:"agent-dismiss",message:"That change could not be dismissed.",tone:"danger",ttl:pt.action})}).finally(()=>Wt(null)))};M.useEffect(()=>{let h=!1;const H=pr($=>fetch("/leglas/api/health",{signal:$}).then(ae=>ae.json()).then(({reachable:ae})=>{h||$n(re=>Fg(re,ae))}).catch(()=>{}),{everyMs:3e3});return()=>{h=!0,H()}},[]),M.useEffect(()=>{!Dt.reachable||!Dt.wasDown||(be(h=>{const j={...h};for(const H of Object.keys(j))wl.has(H)&&(j[H]=!1);return j}),we(h=>{const j={...h};for(const H of wl)j[H]=(j[H]??0)+1;return j}),$n(h=>({...h,wasDown:!1})))},[Dt.reachable,Dt.wasDown]);const[Fn,Ga]=M.useState({}),[zi,Ou]=M.useState(()=>!document.hidden);M.useEffect(()=>{const h=()=>Ou(!document.hidden);return document.addEventListener("visibilitychange",h),()=>document.removeEventListener("visibilitychange",h)},[]);const Wn=new Map(u.map(h=>[h.title,Qn(h.title)])),Tn=[...Wn].map(([h,j])=>`${h}${j}`).join(""),Xa=M.useRef(new Map);M.useLayoutEffect(()=>{const h=v2(Xa.current,Wn);h.length>0&&Ga(j=>cr(j,h)),Xa.current=new Map(Wn)},[Tn]);const Dn=(h,j)=>{let H=null;try{H=h.contentDocument}catch{return}if(!H?.head)return;const $="leglas-hide-dev-overlays",ae=(re,pe,Oe)=>{const Jt=re.getElementById($);if(!j){Jt?.remove();return}if(Jt)return;const jt=H.createElement("style");jt.id=$,jt.textContent=Oe,pe.appendChild(jt)};ae(H,H.head,n2);for(const re of H.querySelectorAll("nextjs-portal")){const pe=re.shadowRoot;pe&&ae(pe,pe,l2)}};M.useEffect(()=>{for(const h of document.querySelectorAll("iframe"))Dn(h,!p.prefs.showDevOverlays)});const Un=h=>{let j=null;try{j=h.contentDocument}catch{return}if(!j?.body)return;const H=[...j.body.querySelectorAll("*")].slice(0,400).map(pe=>pe.tagName),$=j.defaultView,ae=$?p2(j.body,pe=>{const Oe=$.getComputedStyle(pe);return{backgroundColor:Oe.backgroundColor,backgroundImage:Oe.backgroundImage,color:Oe.color}}):[],re=$?g2(j.body,(pe,Oe)=>$.getComputedStyle(pe,Oe)):[];return i2(j.body.innerText??"",H,ae,re)},Oi=(h,j)=>{let H;try{H=h.contentDocument?.fonts}catch{}const $=new Promise(re=>window.setTimeout(re,900));(H?.status==="loading"?Promise.race([H.ready.then(()=>{}),$]):Promise.resolve()).then(()=>{const re=()=>{Dn(h,!p.prefs.showDevOverlays),j(Un(h))};typeof window.requestIdleCallback=="function"?window.requestIdleCallback(re,{timeout:1200}):window.setTimeout(re,0)})},ua=M.useRef(new WeakSet),sa=(h,j,H)=>{if(Rt.current.get(h)!==j)return;p.markLoaded(h,j),be(ae=>ae[h]?{...ae,[h]:!1}:ae),Dn(H,!p.prefs.showDevOverlays);let $=null;try{$=H.contentDocument}catch{}$===null||ua.current.has($)||ua.current.add($)},ca=M.useRef(sa);ca.current=sa,M.useEffect(()=>{const h=j=>{if(j.origin!==window.location.origin)return;const H=Kg(j.data);if(H===null)return;const $=$g(document.querySelectorAll("iframe[data-preview]"),j.source),ae=$?.dataset.preview,re=$?.dataset.previewIdentity;$===null||ae===void 0||re===void 0||(H==="ready"?ca.current(ae,re,$):be(pe=>({...pe,[ae]:!0})))};return window.addEventListener("message",h),()=>window.removeEventListener("message",h)},[]);const Qa=f?Dt.reachable?u:u.filter(h=>!o1(h)):[],In=yp(gn.requests),Xt=In.toSorted().join("\0"),Pn=gn.agent.running||In.length>0,Za=bp(gn.requests),oa=vp(gn.requests);M.useEffect(()=>{In.length!==0&&Ga(h=>cr(h,In))},[Xt]);const Ks=Sl.every(h=>la(h)),Va=In.length>0?cr(Fn,In):Fn,Ri=x2(u,Va),zn=y2(Ri),en=!Pn&&Ks&&zi?S2(Qa,Va)[0]??null:null,Ru=en?.title??null,Ka=en===null?null:`${en.title}\0${en.url}`,_i=M.useRef(Ka);_i.current=Ka;const Li=M.useRef(null),$a=M.useRef(new Map(u.map(h=>[h.title,h.url])));$a.current=new Map(u.map(h=>[h.title,h.url]));const _u=(h,j,H)=>{const $=`${h.title}\0${h.url}`;_i.current===$&&Li.current===H&&$a.current.get(h.title)===h.url&&Ga(ae=>b2(ae,h,j))};M.useEffect(()=>{if(en===null)return;const h=Li.current;if(h===null)return;const j=window.setTimeout(()=>{_u(en,{status:"failed"},h)},N1);return()=>clearTimeout(j)},[Ka]);const $s=(h,j)=>{yr(j)&&(Dn(j,!p.prefs.showDevOverlays),window.setTimeout(()=>{const H=`${h.title}\0${h.url}`;_i.current===H&&Oi(j,$=>{_u(h,$===void 0?{status:"failed"}:{status:"complete",signature:$},j)})},600))};M.useEffect(()=>{const h=[];for(const j of Sl){const H=$t.get(j)??Qn(j);if(p.isLoaded(j,H)||P[j])continue;const $=document.querySelector(`iframe[data-preview="${CSS.escape(j)}"]`);if($===null)continue;const ae=Dt.reachable||!wl.has(j)?N1:0;h.push(Vg({frame:$,onFailure:()=>be(re=>({...re,[j]:!0})),onReady:()=>sa(j,H,$),sameOrigin:p.urlFor(j).startsWith("/"),timeoutMs:ae}))}return()=>{for(const j of h)j()}},[vt,p.loaded,P,Dt.reachable]);const Js=h=>{be(j=>({...j,[h]:!1})),p.resetLoaded(h),we(j=>({...j,[h]:(j[h]??0)+1}))},Fs=(h,j)=>H=>{if(H.button!==0||p.renaming||p.query.trim()||p.rows.length<2||H.target.closest("button, [data-selectable]"))return;const $=Da.current,ae=$?.parentElement;if(!$||!ae)return;const re=[...$.querySelectorAll("li[data-title]")],pe=re.map(bt=>({height:bt.offsetHeight,mid:bt.offsetTop+bt.offsetHeight/2,title:bt.dataset.title??"",top:bt.offsetTop})),Oe=ae.getBoundingClientRect(),Jt=re[j]?.getBoundingClientRect();Zt.current={maxDy:Jt?Oe.bottom-Jt.bottom:0,minDy:Jt?Oe.top-Jt.top:0,rows:pe,startX:H.clientX,startY:H.clientY,suppressed:!1};const jt=pe[0],sn=pe[1];It({dy:0,from:j,gap:jt&&sn?sn.top-jt.top-jt.height:0,height:pe[j]?.height??0,title:h,settling:!1,started:!1,to:j})},Ws=h=>{if(!Ct?.started)return 0;const j=Ct.height+Ct.gap;return h<Ct.from&&h>=Ct.to?j:h>Ct.from&&h<=Ct.to?-j:0},Ui=M.useCallback(()=>Gt(!1),[]),Is=(h,j,H)=>(Ha(),mp(h,H,j).then(()=>(Jn(),!0)).catch(()=>(p.notify({kind:"request",message:"That annotation could not be kept.",tone:"danger",ttl:pt.action}),!1))),Ps=(h,j)=>gp(h,j).then(()=>(Jn(),!0)).catch(()=>(p.notify({kind:"request",message:"That annotation could not be changed.",tone:"danger",ttl:pt.action}),!1)),ec=h=>{pp([h]).then(()=>Jn()).catch(()=>{})},tc=h=>{window.open(p.urlFor(h),"_blank","noopener,noreferrer")},ki=(h,j)=>{const H=h===p.active,$=Za.has(h),ae=p.previewFor(h),re=Vt&&Ct?.title===h,pe=Vt&&!re?Ws(j):0,Oe=p.rowMeta.get(h),Jt=Oe?.depth===1,jt=Oe?.variants??0,sn=Oe?.folded??!1,bt=p.renaming===h,el=Vt||bt?"":"group-hover:hidden group-has-[button:focus-visible]:hidden";return o.jsxs("li",{className:`group relative ${re?`z-30 rounded-md bg-white/[0.06] shadow-2xl ${Ct?.settling?`transition-transform duration-200 ${ja} motion-reduce:transition-none`:""}`:"z-10"} ${Vt&&!re?`transition-transform duration-200 ${ja} motion-reduce:transition-none`:""}`,"data-title":h,onPointerEnter:it=>Xn({height:it.currentTarget.offsetHeight,on:!0,top:it.currentTarget.offsetTop}),style:re?{transform:`translateY(${Ct?.dy??0}px)`}:pe?{transform:`translateY(${pe}px)`}:void 0,children:[o.jsx(Up,{label:bt?null:kp(ae,p.displayName(h),p.displayName),children:o.jsx("div",{"aria-pressed":H,className:`relative flex w-full cursor-grab items-start gap-2 rounded-md py-2 pr-3 text-left transition-colors active:cursor-grabbing ${Jt?"pl-11":"pl-3"} ${H?"bg-[#2E2E2E] ring-1 ring-inset ring-[#D1D5DB]/40":""}`,onClick:()=>{if(!bt){if(Zt.current?.suppressed){Zt.current.suppressed=!1;return}p.setActive(h)}},onDoubleClick:it=>{bt||it.target.closest("button")||(window.getSelection()?.removeAllRanges(),tc(h))},onKeyDown:it=>{it.target===it.currentTarget&&(it.key==="Enter"||it.key===" ")&&(it.preventDefault(),p.setActive(h))},onPointerDown:Fs(h,j),role:"button",tabIndex:0,children:o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsxs("span",{className:`flex items-center gap-2 ${Vt||bt?"":H?"group-hover:pr-[72px] group-has-[button:focus-visible]:pr-[72px]":"group-hover:pr-[98px] group-has-[button:focus-visible]:pr-[98px]"}`,children:[jt>0&&o.jsx(Nt,{label:sn?`Show ${jt} variant${jt===1?"":"s"}`:"Fold the variants away",children:o.jsxs("button",{"aria-expanded":!sn,"aria-label":`${sn?"Show":"Hide"} the variants of ${p.displayName(h)}`,className:"-ml-1 flex shrink-0 items-center gap-1 rounded px-0.5 py-1 text-[#84848C] transition-colors hover:text-[#E8EAED]",onClick:it=>{it.stopPropagation(),p.toggleFamily(h)},onPointerDown:it=>it.stopPropagation(),type:"button",children:[o.jsx("svg",{className:`size-2.5 transition-transform duration-150 motion-reduce:transition-none ${sn?"-rotate-90":""}`,fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 10 10",children:o.jsx("path",{d:"M2 3.5 5 6.5 8 3.5",strokeLinecap:"round",strokeLinejoin:"round"})}),sn?o.jsx("span",{className:"text-[10px] leading-none tabular-nums",children:jt}):null]})}),bt?o.jsx(Ag,{error:p.renameError,initial:p.displayName(h),label:`Rename the ${p.displayName(h)} direction`,onCancel:()=>p.startRename(null),onCommit:(it,ra)=>p.rename(h,it,ra)}):o.jsx("span",{className:`min-w-0 flex-1 text-sm font-medium leading-5 transition-colors duration-150 ${H?"text-white":"text-[#D1D5DB] group-hover:text-[#E8EAED]"}`,children:o.jsx("span",{className:`block w-fit min-w-[70%] max-w-full cursor-text truncate -my-1 py-1 pr-2 ${jt>0?"":"-ml-3 pl-3"}`,onDoubleClick:it=>{it.stopPropagation(),window.getSelection()?.removeAllRanges(),p.startRename(h)},children:p.displayName(h)})}),qt&&h===Ot?o.jsx("span",{className:`shrink-0 rounded bg-white/[0.08] px-1.5 py-0.5 text-[10px] font-medium leading-normal text-[#E8E8EA] ${el}`,children:"Comparing"}):$?o.jsxs("span",{className:`flex h-5 shrink-0 items-center gap-1 rounded bg-white/[0.04] pl-0.5 pr-1.5 text-[10px] font-medium leading-none text-[#84848C]/80 ${el}`,children:[o.jsx(mr,{"aria-label":"Working on direction",size:20,state:gr,theme:"dark"}),"Cooking"]}):zn[h]?o.jsx(Nt,{label:`Rendered structure, layout, visual styles, media and vector geometry match ${zn[h]?.join(", ")} in a 1280 × 800 comparison.`,children:o.jsxs("span",{className:`shrink-0 rounded bg-amber-400/10 px-1.5 py-0.5 text-[10px] font-medium leading-normal text-amber-300/90 ${el}`,children:["Same as ",zn[h]?.length===1?zn[h]?.[0]:`${zn[h]?.length} others`]})}):Ru===h?o.jsxs("span",{className:`flex h-5 shrink-0 items-center gap-1 rounded bg-white/[0.04] pl-0.5 pr-1.5 text-[10px] font-medium leading-none text-[#84848C]/80 ${el}`,children:[o.jsx(mr,{"aria-label":"Checking for duplicates",size:20,state:gr,theme:"dark"}),"Cooking"]}):ae?.tags[0]&&o.jsx("span",{className:`shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium leading-normal ${el}`,style:Bp(ae.tags[0]),children:ae.tags[0]})]}),o.jsx("span",{className:`mt-0.5 line-clamp-2 block cursor-text text-xs leading-snug transition-colors ${bt&&p.renameError?"text-amber-300/90":H?"text-[#D1D5DB]":"text-[#84848C]"}`,id:bt&&p.renameError?"leglas-rename-error":void 0,children:bt&&p.renameError?p.renameError:ae?.note??ae?.url})]})})}),o.jsxs("div",{className:`pointer-events-none absolute right-2 top-1.5 flex items-center gap-0.5 opacity-0 transition-opacity duration-150 ${bt?"invisible":""} ${Vt?"":"group-hover:pointer-events-auto group-hover:opacity-100 group-has-[button:focus-visible]:pointer-events-auto group-has-[button:focus-visible]:opacity-100"}`,children:[h!==p.active&&o.jsx(Nt,{label:qt&&h===Ot?"Stop comparing":`Compare with ${p.displayName(p.active)}`,children:o.jsx("button",{"aria-label":qt&&h===Ot?`Stop comparing ${p.displayName(h)}`:`Compare ${p.displayName(h)} with ${p.displayName(p.active)}`,"aria-pressed":qt&&h===Ot,className:`${Eu} ${qt&&h===Ot?"text-white":""}`,onClick:it=>{if(it.stopPropagation(),qt&&h===Ot){We(!1);return}Kt(h),We(!0)},type:"button",children:o.jsx(Cn,{d:Mn.split})})}),o.jsx(Nt,{label:p.copied?.kind==="link"&&p.copied.title===h?"Copied":"Copy preview link",children:o.jsx("button",{"aria-label":`Copy the preview link to the ${p.displayName(h)} direction`,className:Eu,onClick:()=>p.copyLink(h),type:"button",children:p.copied?.kind==="link"&&p.copied.title===h?o.jsx("span",{className:"text-[10px] text-emerald-300",children:"✓"}):o.jsx(Cn,{d:Mn.link})})}),o.jsx(Nt,{label:p.copied?.kind==="reference"&&p.copied.title===h?"Copied":o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"block",children:"Copy a detailed reference."}),o.jsx("span",{className:"block",children:"For a teammate or an agent."})]}),children:o.jsx("button",{"aria-label":`Copy a detailed reference to the ${p.displayName(h)} direction`,className:Eu,onClick:()=>p.copyReference(h),type:"button",children:p.copied?.kind==="reference"&&p.copied.title===h?o.jsx("span",{className:"text-[10px] text-emerald-300",children:"✓"}):o.jsx(Cn,{d:Mn.copy,size:12})})}),o.jsx(Nt,{label:"Rename",children:o.jsx("button",{"aria-label":`Rename the ${p.displayName(h)} direction`,className:Eu,onClick:()=>p.startRename(h),type:"button",children:o.jsx(Cn,{d:Mn.pencil,size:12})})}),o.jsx(Nt,{label:"Remove from list",children:o.jsx("button",{"aria-label":`Remove the ${p.displayName(h)} direction from the list`,className:Eu,onClick:()=>p.hide(h),type:"button",children:o.jsx(Cn,{d:Mn.trash,size:12})})})]})]},h)};return o.jsxs("main",{className:`flex h-dvh bg-[#1C1C20] text-white antialiased selection:bg-[#E6E8EC] selection:text-[#17181B] ${p.resizing?"cursor-col-resize":""} ${k?"select-none":""}`,"data-leglas-shell":"",style:{fontFamily:ta.stack},children:[o.jsxs("aside",{className:`relative shrink-0 overflow-hidden border-r border-[#232328] ${p.prefs.collapsed?"":"shadow-2xl"} ${p.resizing?"":`transition-[width] duration-200 ${ja} motion-reduce:transition-none`}`,style:{width:p.prefs.collapsed?48:p.prefs.width},children:[o.jsxs("div",{className:`flex h-full flex-col transition-opacity duration-150 ${p.prefs.collapsed?"pointer-events-none opacity-0":"opacity-100"}`,inert:p.prefs.collapsed,style:{width:p.prefs.width},children:[o.jsxs("div",{className:"z-10 flex shrink-0 items-center justify-between gap-2 border-b border-[#232328] bg-[#1E1E22] px-2.5 py-2.5",children:[o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(wu,{size:28}),o.jsx(q1,{height:18})]}),o.jsx(Nt,{label:o.jsxs(o.Fragment,{children:["Collapse panel ",o.jsx("kbd",{className:"ml-1 text-[#9CA3AF]",children:"["})]}),side:"right",children:o.jsx("button",{"aria-label":"Collapse the directions panel",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded p-1 text-[#9CA3AF] transition-colors hover:bg-[#2E2E2E] hover:text-white",onClick:()=>p.setPrefs(h=>({...h,collapsed:!0})),type:"button",children:o.jsx(Cn,{d:Mn.sidebar,size:16})})})]}),o.jsx("div",{className:"px-3 pb-1 pt-2",children:o.jsxs("div",{className:"relative",children:[o.jsx("span",{className:"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 text-[#D1D5DB]",children:o.jsx(Cn,{d:Mn.search})}),o.jsx("kbd",{className:`pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 rounded border border-[#232328] bg-[#2E2E2E]/60 px-1.5 py-0.5 font-sans text-[10px] leading-none tracking-wide text-[#84848C] transition-opacity duration-150 motion-reduce:transition-none ${p.query||me?"opacity-0":"opacity-100"}`,children:Gp}),o.jsx("input",{"aria-label":"Search directions",className:"w-full rounded-md border border-[#232328] bg-[#2E2E2E]/40 py-1.5 pl-7 pr-16 text-xs text-white placeholder:text-[#E8EAED] focus:outline-none focus:ring-1 focus:ring-[#D1D5DB]/60",onBlur:()=>ge(!1),onFocus:()=>ge(!0),onChange:h=>p.setQuery(h.target.value),onKeyDown:h=>{h.key==="Escape"&&(p.query?p.setQuery(""):h.currentTarget.blur())},placeholder:"Search directions…",ref:d,type:"text",value:p.query})]})}),r.length>0&&o.jsxs("section",{"aria-label":"Preview warning",className:"mx-3 mb-1 mt-1 rounded-md border border-amber-400/20 bg-amber-400/[0.07] px-2.5 py-2",children:[o.jsx("p",{className:"text-xs font-medium text-amber-300/90",children:"Preview may be from another project"}),r.map(h=>o.jsx("p",{className:"mt-0.5 text-[11px] leading-snug text-[#9CA3AF]",children:h},h))]}),Tu&&!Dt.reachable&&o.jsxs("div",{className:"mx-3 mb-1 mt-1 rounded-md border border-amber-400/20 bg-amber-400/[0.07] px-2.5 py-2",children:[o.jsx("p",{className:"text-xs font-medium text-amber-300/90",children:"Dev server not responding"}),o.jsx("p",{className:"mt-0.5 text-[11px] leading-snug text-[#9CA3AF]",children:"Anything on screen is from before it stopped. Previews return on their own once it is back."})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[o.jsxs("ul",{className:"relative flex flex-col gap-1",onPointerLeave:()=>Xn(h=>({...h,on:!1})),ref:Da,children:[o.jsx("div",{"aria-hidden":!0,className:`pointer-events-none absolute left-0 right-0 z-0 rounded-md bg-white/[0.06] transition-[transform,height,opacity] duration-150 ${ja} motion-reduce:transition-none`,style:{height:Gn.height,opacity:Gn.on&&!Vt?1:0,transform:`translateY(${Gn.top}px)`}}),p.rows.map((h,j)=>ki(h,j))]}),p.rows.length===0&&o.jsx("div",{className:"px-3 py-2",children:p.query.trim()?o.jsxs(o.Fragment,{children:[o.jsxs("p",{className:"text-xs text-[#9CA3AF]",children:["Nothing matches “",p.query,"”."]}),o.jsx("button",{className:"mt-1 rounded text-xs text-[#84848C] underline underline-offset-2 transition-colors hover:text-[#D1D5DB]",onClick:()=>p.setQuery(""),type:"button",children:"Clear search"})]}):o.jsx("p",{className:"text-xs leading-snug text-[#9CA3AF]",children:p.visibleCount===0&&p.hiddenCount>0?"Every direction is removed. Restore one below.":"No directions yet. Add them to leglas.config.ts."})}),p.hiddenCount>0&&o.jsxs("div",{className:"mt-1 flex items-center justify-between gap-2",children:[o.jsxs("button",{className:"min-w-0 flex-1 rounded px-3 py-1.5 text-left text-[11px] text-[#84848C] transition-colors hover:text-[#D1D5DB]",onClick:()=>p.setShowHidden(h=>!h),type:"button",children:[p.showHidden?"Hide":"Show"," removed (",p.hiddenCount,")"]}),p.showHidden?o.jsx("button",{className:"rounded px-3 py-1.5 text-[11px] text-[#9CA3AF] transition-[color,scale] hover:text-red-300 active:scale-[0.96]",onClick:()=>O({error:null,titles:[...p.prefs.hidden]}),type:"button",children:"Clear all"}):null]}),p.showHidden&&o.jsx("ul",{className:"relative",children:p.prefs.hidden.filter(p.matches).map(h=>o.jsx("li",{className:"group relative",children:o.jsxs("div",{className:"flex items-center justify-between rounded-md px-3 py-2 transition-colors group-hover:bg-white/[0.04]",children:[o.jsx("span",{className:"truncate text-sm font-medium text-[#9CA3AF]",children:p.displayName(h)}),o.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[o.jsx("button",{className:"rounded text-[11px] text-[#9CA3AF] transition-colors hover:text-white",onClick:()=>{p.restore(h),p.notify({kind:`remove:${h}`,message:`${p.displayName(h)} is back in the list`,tone:"success",ttl:pt.plain})},type:"button",children:"Restore"}),o.jsx("button",{className:"rounded text-[11px] text-[#84848C] transition-[color,scale] hover:text-red-300 active:scale-[0.96]",onClick:()=>O({error:null,titles:[h]}),type:"button",children:"Delete"})]})]})},h))})]}),o.jsxs("div",{ref:Pl,children:[je!==null&&o.jsx("div",{className:"mx-3 mt-2 rounded-lg border border-[#232328] bg-[#1E1E22] px-2.5 py-2 shadow-lg",role:"status",children:o.jsxs("div",{className:"flex items-center gap-2",children:[je.kind==="stopped"?o.jsx("span",{"aria-hidden":"true",className:"flex size-3.5 shrink-0 items-center justify-center text-[#84848C]",children:o.jsx("span",{className:"block size-2 rounded-[2px] bg-current"})}):je.kind==="failed"?o.jsxs("svg",{"aria-hidden":"true",className:"shrink-0 text-amber-400/90",fill:"none",height:"14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 16 16",width:"14",children:[o.jsx("path",{d:"M8 2.6 14.6 13.4H1.4Z"}),o.jsx("path",{d:"M8 6.8v2.7"}),o.jsx("path",{d:"M8 11.6h.01"})]}):je.kind==="queued"?o.jsx("span",{"aria-hidden":"true",className:"flex size-3.5 shrink-0 items-center justify-center",children:o.jsx("span",{className:"size-1.5 animate-pulse rounded-full bg-[#84848C] motion-reduce:animate-none"})}):o.jsx("span",{"aria-hidden":"true",className:"size-3.5 shrink-0 animate-spin rounded-full border-[1.5px] border-white/15 border-t-white/70 motion-reduce:animate-none"}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("p",{className:"truncate text-[11px] font-medium leading-tight text-[#D1D5DB]",children:Du}),Ni!==null&&o.jsx("p",{className:"mt-0.5 text-[10px] leading-tight text-[#84848C]",children:Ni})]}),je.kind==="running"&&Cl!==null&&o.jsx("span",{className:"shrink-0 text-[10px] tabular-nums text-[#84848C]",children:Ep(Vs-Cl)}),je.kind==="running"&&o.jsx(Nt,{label:"Stop this run",children:o.jsx("button",{"aria-label":"Stop this run",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-[#84848C] transition-[background-color,color,transform] duration-150 hover:bg-white/[0.06] hover:text-white active:scale-[0.96] disabled:cursor-wait disabled:opacity-40 motion-reduce:transition-none",disabled:Mt!==null||je.stopping,onClick:()=>Ti(je.id),type:"button",children:Mt==="cancel"||je.stopping?o.jsx("span",{className:"size-3 animate-spin rounded-full border-[1.5px] border-current border-t-transparent motion-reduce:animate-none"}):o.jsx("span",{className:"block size-2 rounded-[2px] bg-current"})})}),(je.kind==="failed"||je.kind==="stopped")&&o.jsxs("span",{className:"flex shrink-0 items-center",children:[o.jsx(Nt,{label:je.kind==="stopped"?"Run it after all":"Try it again",children:o.jsx("button",{"aria-label":je.kind==="stopped"?"Run this change after all":"Retry this change",className:"flex h-6 w-6 items-center justify-center rounded-md text-[#84848C] transition-[background-color,color,transform] duration-150 hover:bg-white/[0.06] hover:text-white active:scale-[0.96] disabled:cursor-wait disabled:opacity-40 motion-reduce:transition-none",disabled:Mt!==null,onClick:()=>Di(je.id),type:"button",children:Mt==="retry"?o.jsx("span",{className:"size-3 animate-spin rounded-full border-[1.5px] border-current border-t-transparent motion-reduce:animate-none"}):o.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.75",viewBox:"0 0 16 16",width:"13",children:[o.jsx("path",{d:"M13.5 8a5.5 5.5 0 1 1-1.6-3.9"}),o.jsx("path",{d:"M13.7 1.8v2.7H11"})]})})}),o.jsx(Nt,{label:"Let it go",children:o.jsx("button",{"aria-label":je.kind==="stopped"?"Dismiss this stopped change":"Dismiss this failed change",className:"flex h-6 w-6 items-center justify-center rounded-md text-[#84848C] transition-[background-color,color,transform] duration-150 hover:bg-white/[0.06] hover:text-white active:scale-[0.96] disabled:cursor-wait disabled:opacity-40 motion-reduce:transition-none",disabled:Mt!==null,onClick:()=>jl(je.id),type:"button",children:Mt==="dismiss"?o.jsx("span",{className:"size-3 animate-spin rounded-full border-[1.5px] border-current border-t-transparent motion-reduce:animate-none"}):o.jsx("svg",{"aria-hidden":"true",fill:"none",height:"13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.75",viewBox:"0 0 16 16",width:"13",children:o.jsx("path",{d:"m4 4 8 8M12 4l-8 8"})})})})]})]})}),o.jsx("form",{className:"relative px-3 pb-2.5 pt-2",onSubmit:h=>{h.preventDefault();const j=Be.trim(),H=p.active;if(!j&&Lt.length===0||!H||xe)return;const $=p.displayName(H),ae=op(v);if(ae!==null){p.notify({kind:"request",message:ae==="uploading"?"Still uploading an image. Try again in a moment.":"One image did not upload. Retry it or remove it, then send.",tone:"info",ttl:pt.action});return}const re=cp(v);Ce(!0),fetch("/leglas/api/request",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({title:H,intent:j,mode:Q,...ht===null?{}:{width:ht},...qt&&Ot!==null&&Ot!==H?{compare:Ot}:{},...re.length===0?{}:{references:re}})}).then(pe=>pe.json()).then(pe=>{if(pe.duplicate===!0){Ce(!1),p.notify({kind:"request",message:`That exact change to ${$} is already queued.`,tone:"info",ttl:pt.action});return}if(!pe.ok&&typeof pe.error=="string"){Ce(!1),p.notify({kind:"request",message:pe.error,tone:"danger",ttl:pt.action});return}if(!pe.ok||!pe.prompt)throw new Error("refused");D(""),Ze(),Ce(!1),Jn(),p.notify({kind:"request",message:`Asked for a change to ${$}.`,tone:"success",ttl:pt.plain}),xr(pe.prompt).then(Oe=>{p.notify({kind:"request",message:Oe==="copied"?`Asked for a change to ${$}. Prompt copied.`:`Asked for a change to ${$}. Your browser blocked the clipboard, so read it with npx leglas requests.`,tone:"success",ttl:pt.plain})})}).catch(()=>{Ce(!1),p.notify({kind:"request",message:`That request never reached Leglas. ${$} is unchanged.`,tone:"danger",ttl:pt.action})})},children:o.jsxs("div",{className:`rounded-md border bg-[#2E2E2E]/40 transition-colors ${ce?"border-[#7C9CFF]/70 ring-1 ring-[#7C9CFF]/40":"border-[#232328] focus-within:border-[#D1D5DB]/40 focus-within:ring-1 focus-within:ring-[#D1D5DB]/40"}`,onDragEnter:h=>{Ys(h.dataTransfer.types)&&(h.preventDefault(),U.current+=1,ve(!0))},onDragLeave:h=>{Ys(h.dataTransfer.types)&&(U.current=Math.max(0,U.current-1),U.current===0&&ve(!1))},onDragOver:h=>{Ys(h.dataTransfer.types)&&(h.preventDefault(),h.dataTransfer.dropEffect="copy")},onDrop:h=>{Ys(h.dataTransfer.types)&&(h.preventDefault(),U.current=0,ve(!1),J(Array.from(h.dataTransfer.files)))},children:[o.jsx(rp,{drafts:v,onRemove:le,onRetry:Le}),o.jsx("textarea",{"aria-label":p.active?`Ask your agent to change the ${p.displayName(p.active)} direction`:"Ask your agent to change a direction",className:"block w-full resize-none overflow-y-auto bg-transparent px-2.5 pb-1 pt-2 text-xs leading-4 text-white placeholder:text-[#84848C] focus:outline-none disabled:cursor-not-allowed disabled:opacity-60",disabled:xe||!p.active,onChange:h=>{Be===""&&h.target.value!==""&&Ha(),D(h.target.value)},onFocus:Ha,onKeyDown:h=>{h.key==="Enter"&&!h.shiftKey&&(h.preventDefault(),h.currentTarget.form?.requestSubmit())},onPaste:h=>{const j=Array.from(h.clipboardData.files);j.length!==0&&(h.preventDefault(),J(j))},placeholder:p.active===null?"No direction to change yet":ce?"Drop the image here":v.length>0&&Lt.length===0?`Say what to take from the ${v.length===1?"image":"images"}…`:Lt.length>0?`Send ${Lt.length===1?"the annotation":`${Lt.length} annotations`}, or add words…`:`Change ${p.displayName(p.active)}…`,ref:g,rows:1,value:Be}),o.jsxs("div",{className:"flex items-center justify-end gap-1.5 p-1",children:[o.jsx(Nt,{label:Q==="variant"?"Builds a new direction beside this one and leaves this one alone.":"Changes this direction itself. Nothing is kept of what it was.",children:o.jsxs("button",{"aria-label":Q==="variant"?"This change makes a new variant. Switch to changing the direction itself.":"This change edits the direction itself. Switch to making a new variant.",className:"mr-auto flex h-6 shrink-0 items-center gap-1 rounded-md px-1.5 text-[10px] font-medium leading-none text-[#84848C] transition-colors hover:bg-white/[0.06] hover:text-[#D1D5DB]",onClick:()=>te(Q==="variant"?"replace":"variant"),type:"button",children:[Q==="variant"?o.jsxs("svg",{"aria-hidden":!0,fill:"none",height:"11",stroke:"currentColor",strokeWidth:"1.7",viewBox:"0 0 16 16",width:"11",children:[o.jsx("circle",{cx:"4.5",cy:"3.6",r:"1.9"}),o.jsx("circle",{cx:"11.5",cy:"12.4",r:"1.9"}),o.jsx("path",{d:"M4.5 5.5v2.6a4.3 4.3 0 0 0 4.3 4.3h0.8",strokeLinecap:"round"})]}):o.jsx("svg",{"aria-hidden":!0,fill:"none",height:"11",stroke:"currentColor",strokeWidth:"1.7",viewBox:"0 0 16 16",width:"11",children:o.jsx("path",{d:"M10.8 2.9 13.1 5.2 5.6 12.7H3.3v-2.3z",strokeLinejoin:"round"})}),Q==="variant"?"as a variant":"in place"]})}),o.jsx("input",{accept:K1.join(","),className:"sr-only",multiple:!0,onChange:h=>{J(Array.from(h.currentTarget.files??[])),h.currentTarget.value=""},ref:ee,tabIndex:-1,type:"file"}),o.jsx(Nt,{label:o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"block",children:"Attach a reference image"}),o.jsx("span",{className:"block text-[#9CA3AF]",children:"Paste or drop one, too"})]}),children:o.jsx("button",{"aria-label":v.length>0?`Attach another image, ${v.length} attached`:"Attach a reference image",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-[#84848C] transition-[background-color,color,transform] duration-150 hover:bg-white/[0.06] hover:text-[#D1D5DB] active:scale-[0.96] disabled:cursor-not-allowed disabled:opacity-40 motion-reduce:transition-none",disabled:!p.active||xe||v.length>=Sr,onClick:()=>ee.current?.click(),type:"button",children:o.jsxs("svg",{"aria-hidden":!0,fill:"none",height:"11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.7",viewBox:"0 0 16 16",width:"11",children:[o.jsx("rect",{height:"10.5",rx:"1.8",width:"12.5",x:"1.75",y:"2.75"}),o.jsx("circle",{cx:"5.6",cy:"6.3",r:"1.1"}),o.jsx("path",{d:"m14.25 10.4-3.1-3.1a1 1 0 0 0-1.4 0L4.5 12.5"})]})})}),o.jsx(Nt,{label:o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"block",children:_t?"Stop annotating":Lt.length>0?"Show what you marked up":"Point at what is wrong, instead of describing where it is"}),o.jsx("span",{className:"block text-[#9CA3AF]",children:_t?"Click a detail · drag an area · Esc to stop":o.jsx("kbd",{className:"font-sans",children:"A"})})]}),children:o.jsxs("button",{"aria-keyshortcuts":"a","aria-label":_t?"Stop annotating the design":`Annotate the design${Lt.length>0?`, ${Lt.length} annotation${Lt.length===1?"":"s"} so far`:""}`,"aria-pressed":_t,className:`flex h-6 shrink-0 items-center gap-1 rounded-md px-1.5 text-[10px] font-medium leading-none transition-colors ${_t?"bg-[#7C9CFF]/20 text-[#AFC2FF]":"text-[#84848C] hover:bg-white/[0.06] hover:text-[#D1D5DB]"}`,onClick:()=>_t?Ui():Gt(!0),type:"button",children:[o.jsxs("svg",{"aria-hidden":!0,fill:"none",height:"11",stroke:"currentColor",strokeWidth:"1.7",viewBox:"0 0 16 16",width:"11",children:[o.jsx("path",{d:"M8 1.8a4.2 4.2 0 0 1 4.2 4.2c0 3-4.2 8-4.2 8S3.8 9 3.8 6A4.2 4.2 0 0 1 8 1.8Z",strokeLinejoin:"round"}),o.jsx("circle",{cx:"8",cy:"6",r:"1.4"})]}),"Annotate",Lt.length>0?o.jsx("span",{className:"rounded-full bg-white/15 px-1 text-[9px] leading-[1.5] text-white",children:Lt.length}):null]})}),Ge.kind==="none"?o.jsxs("button",{className:"flex min-w-0 items-center gap-1.5 rounded px-1.5 py-1 text-[10px] leading-none text-[#84848C] transition-colors duration-150 hover:bg-white/[0.04] hover:text-[#D1D5DB]",onClick:()=>K(!0),ref:Il,type:"button",children:[o.jsx(Cn,{d:Mn.link,size:12}),o.jsx("span",{className:"truncate",children:"Connect agent via MCP…"})]}):o.jsxs("div",{className:"relative flex min-w-0 items-center",children:[o.jsxs("div",{"aria-hidden":!nt,"aria-label":"Who runs your changes",className:`absolute bottom-full right-0 z-10 mb-1.5 w-max min-w-48 origin-bottom-right rounded-lg border border-[#232328] bg-[#1E1E22] p-1 text-[#D1D5DB] shadow-2xl transition-[opacity,transform] duration-150 ease-[cubic-bezier(0.165,0.84,0.44,1)] focus:outline-none motion-reduce:transition-none ${nt?"translate-y-0 scale-100 opacity-100":"pointer-events-none translate-y-1 scale-95 opacity-0"}`,inert:!nt,ref:Wl,role:"dialog",tabIndex:-1,children:[Pt.agents.filter(h=>h.available).map(h=>{const j=Ge.kind==="chosen"&&h.id===Ge.id;return o.jsxs("button",{className:ct,disabled:Ye!==null||ze,onClick:()=>j?ft(!1):Ya(h.id),type:"button",children:[o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(Mi,{id:h.id}),o.jsx("span",{className:"truncate",children:h.name})]}),Ye===h.id?o.jsx("span",{"aria-label":"selecting",className:"size-3 animate-spin rounded-full border-[1.5px] border-current border-t-transparent motion-reduce:animate-none"}):h.auth==="signed-out"?o.jsx("span",{className:"text-[10px] text-amber-400/80",children:"signed out"}):j&&o.jsx("span",{"aria-label":"current choice",children:"✓"})]},h.id)}),Ge.kind==="chosen"&&Ge.id==="custom"?o.jsxs("button",{className:ct,onClick:()=>ft(!1),type:"button",children:[o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(Mi,{id:"custom"}),o.jsx("span",{className:"truncate",children:Ge.name})]}),o.jsx("span",{"aria-label":"current choice",children:"✓"})]}):null,An!==void 0&&An.efforts.length>0?o.jsx("div",{className:"mt-1 border-t border-[#232328] px-1 pb-0.5 pt-1.5",children:o.jsxs("label",{className:"flex min-h-7 items-center justify-between gap-3",children:[o.jsx("span",{className:"text-[10px] font-medium text-[#84848C]",children:"Effort"}),o.jsxs("select",{"aria-busy":ze,"aria-label":`${An.name} effort`,className:"min-h-7 rounded-md border border-[#303038] bg-[#17171B] px-2 text-[10px] text-[#D1D5DB] focus-visible:outline-2 focus-visible:outline-offset-2 disabled:opacity-60",disabled:ze||Ye!==null,onChange:h=>{const j=h.currentTarget.value;Nn(j===""?null:j)},value:Ln??"",children:[o.jsx("option",{value:"",children:"Agent default"}),An.efforts.map(h=>o.jsx("option",{value:h,children:z1[h]},h))]})]})}):null,o.jsx("div",{className:"mt-1 border-t border-[#232328] pt-1",children:o.jsx("button",{className:`${ct} text-[#84848C]`,onClick:()=>{ft(!1),K(!0)},ref:Il,type:"button",children:o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(Cn,{d:Mn.link,size:14}),o.jsx("span",{className:"truncate",children:"Connect agent via MCP…"})]})})})]}),o.jsxs("button",{"aria-expanded":nt,"aria-haspopup":"dialog",className:"flex min-w-0 items-center gap-1.5 rounded px-1.5 py-1 text-[11px] leading-none text-[#84848C] transition-colors hover:bg-white/[0.04] hover:text-[#D1D5DB]",onClick:()=>{nt||Ua(),ft(h=>!h)},ref:yt,type:"button",children:[Ge.kind==="chosen"&&o.jsx(Mi,{id:Ge.id,size:12}),o.jsx("span",{className:"truncate",children:Ge.kind==="chosen"?`${Ge.name}${Ln===null?"":` · ${z1[Ln]}`}`:"Choose an agent"}),Ml&&o.jsx("span",{className:"size-1.5 shrink-0 rounded-full bg-amber-400",title:"This CLI is signed out. Sign in in your terminal.",children:o.jsx("span",{className:"sr-only",children:"signed out"})}),o.jsx("svg",{"aria-hidden":"true",className:`shrink-0 transition-transform duration-150 motion-reduce:transition-none ${nt?"rotate-180":""}`,fill:"none",height:"12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.75",viewBox:"0 0 16 16",width:"12",children:o.jsx("path",{d:"M4 6.5 8 10.5l4-4"})})]})]}),o.jsx("button",{"aria-label":p.active?`Send the change to ${p.displayName(p.active)}`:"Send the change",className:`flex h-6 w-6 shrink-0 items-center justify-center rounded-md transition-[background-color,color,transform] duration-150 active:scale-[0.96] motion-reduce:transition-none ${(Be.trim()!==""||Lt.length>0)&&p.active&&!xe?"bg-[#E8E8EA] text-[#1C1C20] hover:bg-white":"pointer-events-none text-[#84848C]/60"}`,disabled:Be.trim()===""&&Lt.length===0||!p.active||xe,type:"submit",children:xe?o.jsx("span",{className:"size-3 animate-spin rounded-full border-[1.5px] border-current border-t-transparent motion-reduce:animate-none"}):o.jsx("svg",{"aria-hidden":"true",fill:"none",height:"13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.75",viewBox:"0 0 16 16",width:"13",children:o.jsx("path",{d:"M8 13V3M3.5 7.5 8 3l4.5 4.5"})})})]})]})}),xe?o.jsx("div",{className:"px-3 pb-2",children:o.jsx("p",{"aria-live":"polite",className:"min-w-0 truncate text-[10px] leading-snug text-[#84848C]",children:"Capturing the design for your agent…"})}):qa===null?null:o.jsx("div",{className:"px-3 pb-2",children:o.jsx("p",{className:"min-w-0 truncate text-[10px] leading-snug text-[#84848C]",title:qa,children:qa})}),p.prefs.showWidget?gn.agent.attached&&je===null?o.jsx("div",{className:"px-3 pb-2",children:o.jsx("p",{className:"min-w-0 truncate text-[10px] leading-snug text-[#84848C]",children:"Your agent is listening"})}):null:o.jsx("div",{className:"px-3 pb-2",children:o.jsxs("button",{className:"min-w-0 max-w-full truncate rounded text-left text-[10px] leading-snug text-[#84848C] transition-colors hover:text-[#D1D5DB]",onClick:()=>W(!0),type:"button",children:["Bring the tools back ",o.jsx("kbd",{className:"font-sans text-[#9CA3AF]",children:"T"})]})})]})]}),o.jsxs("div",{className:`absolute inset-y-0 left-0 z-30 flex w-12 flex-col items-center bg-[#1C1C20] py-3 transition-opacity duration-150 ${p.prefs.collapsed?"opacity-100":"pointer-events-none opacity-0"}`,inert:!p.prefs.collapsed,children:[o.jsx(wu,{size:24}),o.jsx(Nt,{label:o.jsxs(o.Fragment,{children:["Open directions ",o.jsx("kbd",{className:"ml-1 text-[#9CA3AF]",children:"["})]}),side:"right",children:o.jsx("button",{"aria-label":"Open the directions panel",className:"mt-3 flex h-6 w-6 items-center justify-center rounded p-1 text-[#9CA3AF] transition-colors hover:bg-[#2E2E2E] hover:text-white",onClick:()=>p.setPrefs(h=>({...h,collapsed:!1})),type:"button",children:o.jsx(Cn,{d:Mn.sidebar,size:16})})})]}),!p.prefs.collapsed&&o.jsx("div",{"aria-hidden":!0,className:"group/resize absolute inset-y-0 right-0 z-20 flex w-3 cursor-col-resize touch-none justify-end",onPointerDown:p.onHandlePointerDown,children:o.jsx("span",{className:`h-full transition-all duration-150 ${p.resizing?"w-0.5 bg-[#9CA3AF]":"w-px bg-[#232328] group-hover/resize:w-0.5 group-hover/resize:bg-[#9CA3AF]"}`})})]}),o.jsx("span",{"aria-live":"polite",className:"sr-only",role:"status",children:p.copied===null?"":p.copied.kind==="link"?"Link copied":"Reference copied"}),o.jsxs("div",{className:`relative min-w-0 flex-1 ${qt?"flex":"overflow-auto"}`,ref:ju,children:[Sl.map(h=>o.jsxs("div",{className:xl.includes(h)?qt?`relative min-w-0 flex-1 overflow-auto ${h===Ot?"border-l border-[#232328]":""} ${Yt?"flex flex-col items-center justify-center gap-2.5":bl?"flex min-h-full justify-center p-6":""}`:bl?"flex min-h-full justify-center p-6":"absolute inset-0":"hidden",style:qt?{order:xl.indexOf(h)}:void 0,children:[qt&&o.jsx("div",{className:Yt?"pointer-events-none z-10 flex justify-center":"pointer-events-none absolute inset-x-0 top-0 z-10 flex justify-center p-3",children:o.jsxs("span",{className:"rounded-full bg-[#1C1C20]/85 px-2.5 py-1 text-[11px] font-medium text-[#E8E8EA] shadow-lg backdrop-blur",children:[p.displayName(h),Yt&&o.jsxs("span",{className:"ml-1.5 font-normal text-[#8E8E96]",children:[Math.round(Vn),"px · ",Math.round(Kn*100),"%"]})]})}),o.jsxs("div",{className:Yt?"relative shrink-0 overflow-hidden rounded-[10px] shadow-[0_0_0_1px_rgba(255,255,255,0.12)]":bl?`relative h-[calc(100dvh-48px)] shrink-0 overflow-hidden rounded-[10px] shadow-[0_0_0_1px_rgba(255,255,255,0.10)] transition-[width] duration-200 ${ja} motion-reduce:transition-none`:"relative size-full",style:Yt?{height:ia,width:Ai}:bl?{width:p.prefs.viewport??void 0}:void 0,children:[o.jsxs("div",{className:Yt?"relative origin-top-left":"relative size-full",style:Yt?{height:El,transform:`scale(${Kn})`,width:Vn}:void 0,children:[o.jsx("iframe",{className:`size-full border-0 bg-white ${k?"pointer-events-none":""}`,onError:()=>be(j=>({...j,[h]:!0})),onLoad:j=>{const H=p.urlFor(h),$=j.currentTarget.dataset.previewIdentity;$!==void 0&&(!H.startsWith("/")||yr(j.currentTarget))&&sa(h,$,j.currentTarget)},"data-preview":h,"data-preview-identity":Qn(h),src:p.urlFor(h),title:`Preview: ${p.displayName(h)}`},Qn(h)),_t&&h===p.active?o.jsx(tp,{notes:Lt,onExit:Ui,onForget:ec,onKeep:(j,H)=>Is(h,j,H),onRevise:Ps,paneScale:Kn,scaling:Yt,sent:oa,title:h}):null]}),P[h]?o.jsx(Rg,{onReload:()=>Js(h),reason:Dt.reachable||!wl.has(h)?`${p.urlFor(h)} didn’t respond.`:"Your dev server stopped. This returns on its own once it is back."}):o.jsx(Og,{loaded:la(h)}),!Dt.reachable&&la(h)&&wl.has(h)&&o.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-0 flex justify-center p-3",children:o.jsx("span",{className:"rounded-full bg-[#1C1C20]/90 px-2.5 py-1 text-[11px] font-medium text-amber-300/90 shadow-lg",children:"Stale — dev server stopped"})})]})]},h)),o.jsxs("div",{className:`absolute z-50 flex gap-2 ${Me?"flex-col items-start":{"bottom-right":"bottom-4 right-4 flex-col items-end","bottom-left":"bottom-4 left-4 flex-col items-start","top-right":"right-4 top-4 flex-col-reverse items-end","top-left":"left-4 top-4 flex-col-reverse items-start"}[p.prefs.corner]}`,style:Au,children:[o.jsxs("div",{"aria-hidden":!X,"aria-label":"Leglas tools",className:`w-56 rounded-lg border border-[#232328] bg-[#1E1E22] p-1.5 shadow-2xl transition-[opacity,transform] duration-150 ease-[cubic-bezier(0.165,0.84,0.44,1)] focus:outline-none motion-reduce:transition-none ${Me?"hidden ":""}${X?"translate-y-0 scale-100 opacity-100":"pointer-events-none translate-y-1 scale-95 opacity-0"}`,inert:!X,ref:yl,role:"dialog",tabIndex:-1,children:[o.jsx("span",{className:"block px-1 pb-1 pt-0.5 text-[10px] uppercase tracking-[0.08em] text-[#84848C]",children:"Typeface"}),o.jsx("div",{"aria-label":"Interface typeface",className:"flex items-center gap-0.5 rounded-md bg-[#2E2E2E]/40 p-0.5",role:"group",children:rr.map(h=>o.jsx("button",{"aria-pressed":ta.key===h.key,className:`flex-1 rounded px-2 py-1 text-xs transition-colors ${ta.key===h.key?"bg-[#2E2E2E] font-medium text-white":"text-[#9CA3AF] hover:text-[#D1D5DB]"}`,onClick:()=>p.setPrefs(j=>({...j,font:h.key})),style:{fontFamily:h.stack},type:"button",children:h.label},h.key))}),o.jsx("span",{className:"block px-1 pb-1 pt-2 text-[10px] uppercase tracking-[0.08em] text-[#84848C]",children:"Viewport"}),o.jsx("div",{"aria-label":"Viewport width",className:"flex items-center gap-0.5 rounded-md bg-[#2E2E2E]/40 p-0.5",role:"group",children:p.viewports.map(({label:h,width:j})=>o.jsx("button",{className:`flex-1 rounded px-2 py-1 text-xs transition-colors ${p.prefs.viewport===j?"bg-[#2E2E2E] font-medium text-white":"text-[#9CA3AF] hover:text-[#D1D5DB]"}`,onClick:()=>p.setPrefs(H=>({...H,viewport:j})),type:"button",children:h},h))}),qt&&o.jsxs("button",{"aria-checked":p.prefs.scaleSplit,className:`${ct} mt-1 ${p.prefs.scaleSplit?"text-white":"text-[#9CA3AF]"}`,onClick:()=>p.setPrefs(h=>({...h,scaleSplit:!h.scaleSplit})),role:"switch",type:"button",children:[o.jsx("span",{children:"Scale each side to fit"}),o.jsx(sr,{on:p.prefs.scaleSplit})]}),o.jsx("span",{className:"block px-1 pb-1 pt-2 text-[10px] uppercase tracking-[0.08em] text-[#84848C]",children:"Dev overlays"}),o.jsxs("button",{"aria-checked":p.prefs.showDevOverlays,className:`${ct} ${p.prefs.showDevOverlays?"text-white":"text-[#9CA3AF]"}`,onClick:()=>{const h=!p.prefs.showDevOverlays;p.setPrefs(j=>({...j,showDevOverlays:h}));for(const j of document.querySelectorAll("iframe"))Dn(j,!h)},role:"switch",type:"button",children:[o.jsx("span",{children:"Show dev tool overlay"}),o.jsx(sr,{on:p.prefs.showDevOverlays})]}),o.jsxs("button",{"aria-checked":p.prefs.showWidget,className:`${ct} ${p.prefs.showWidget?"text-white":"text-[#9CA3AF]"}`,onClick:()=>{const h=!p.prefs.showWidget;p.setPrefs(j=>({...j,showWidget:h})),h||p.notify({kind:"widget",message:"Press T to reopen the tools",tone:"info",ttl:pt.plain+3e3})},role:"switch",type:"button",children:[o.jsx("span",{children:"Show Leglas overlay"}),o.jsx(sr,{on:p.prefs.showWidget})]}),o.jsxs("button",{className:"mt-1 flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-xs text-[#D1D5DB] transition-colors hover:bg-[#2E2E2E]/60 hover:text-white",onClick:()=>p.copyReference(p.active),type:"button",children:[o.jsx(Cn,{d:Mn.copy,size:12}),p.copied?.kind==="reference"&&p.copied.title===p.active?"Copied":"Copy reference"]}),o.jsx(Nt,{label:"Or double-click any direction in the rail",children:o.jsxs("a",{className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-xs text-[#D1D5DB] transition-colors hover:bg-[#2E2E2E]/60 hover:text-white",href:p.urlFor(p.active),rel:"noreferrer",target:"_blank",children:[o.jsx("span",{className:"inline-block size-3 rounded-sm border border-current"}),"Open in new tab"]})}),o.jsxs("button",{className:"flex w-full items-center justify-between gap-2 rounded-md px-2 py-1.5 text-left text-xs text-[#D1D5DB] transition-colors hover:bg-[#2E2E2E]/60 hover:text-white",onClick:()=>{W(!1),w(!0)},type:"button",children:[o.jsx("span",{children:"Keyboard shortcuts"}),o.jsx("kbd",{className:"rounded border border-[#232328] bg-[#2E2E2E]/60 px-1 py-0.5 font-sans text-[10px] text-[#84848C]",children:"?"})]})]}),(p.prefs.showWidget||X)&&o.jsx(Nt,{label:"Leglas tools",children:o.jsxs("button",{"aria-expanded":X,"aria-haspopup":"dialog","aria-label":"Leglas tools",className:"relative flex h-11 w-11 items-center justify-center rounded-full border border-white/10 bg-[#1C1C20] shadow-lg transition-[border-color,transform] duration-150 hover:scale-[1.04] hover:border-white/20 active:scale-[0.95] motion-reduce:transform-none motion-reduce:hover:scale-100 motion-reduce:active:scale-100",onClick:()=>{if(Ae.current){Ae.current=!1;return}W(h=>!h)},onPointerDown:Nu,ref:Yn,type:"button",children:[o.jsx(wu,{size:30}),!la(p.active)&&o.jsx("span",{className:"absolute -right-0.5 -top-0.5 size-2 animate-pulse rounded-full bg-amber-400 motion-reduce:animate-none"})]})})]})]}),o.jsx(zg,{bottom:p.prefs.collapsed?12:ea+8,left:p.prefs.collapsed?60:12,onDismiss:p.dismissToast,toasts:p.toasts,width:(p.prefs.collapsed?320:p.prefs.width)-24}),en!==null&&o.jsx("iframe",{"aria-hidden":!0,className:"pointer-events-none fixed border-0",onLoad:h=>$s(en,h.currentTarget),ref:Li,src:en.url,style:{height:T1.height,left:-2400,top:0,width:T1.width},tabIndex:-1,title:"Off-stage duplicate scan"},Ka??void 0),C?o.jsx(Xp,{mac:J1,onClose:Z}):null,_?o.jsx(Lp,{connected:gn.agent.attached,fallbackFocusRef:Ge.kind==="none"?Il:yt,onClose:()=>K(!1)}):null,x!==null?o.jsx(Qp,{busy:G,count:x.titles.length,error:x.error,fallbackFocusRef:d,name:x.titles.length===1?p.displayName(x.titles[0]??""):null,onCancel:I,onConfirm:()=>{fe()}}):null]})}function dr({children:u,title:s}){return o.jsxs("div",{className:"flex h-dvh flex-col items-center justify-center gap-3 bg-[#1C1C20] px-6 text-center antialiased",style:{fontFamily:"var(--font-satoshi)"},children:[o.jsx(wu,{size:22}),o.jsx("p",{className:"text-sm font-medium text-white",children:s}),o.jsx("div",{className:"max-w-md text-xs leading-relaxed text-[#84848C]",children:u})]})}function Vp(){const[u,s]=M.useState({status:"loading"});return M.useEffect(()=>{let f=!1;const r=g=>fetch("/leglas/api/config",{signal:g}).then(b=>{if(!b.ok)throw new Error(`the server answered ${b.status}`);return b.json()}),d=pr(g=>r(g).then(b=>{f||s(C=>C.status==="ready"&&JSON.stringify(C.config)===JSON.stringify(b)?C:{status:"ready",config:b})}).catch(b=>{f||s(C=>C.status==="ready"?C:{status:"failed",message:_g(b)?"it did not answer in time":b instanceof Error?b.message:String(b)})}),{everyMs:3e3});return()=>{f=!0,d()}},[]),u.status==="loading"?o.jsx(dr,{title:"Starting Leglas…",children:null}):u.status==="failed"?o.jsxs(dr,{title:"Couldn’t reach the Leglas server",children:[u.message,". The interface is served by the same process that proxies your app, so this usually means it stopped."]}):u.config.errors.length>0?o.jsxs(dr,{title:"Your config needs fixing",children:[o.jsx("ul",{className:"space-y-1 text-left",children:u.config.errors.map(f=>o.jsx("li",{children:f},f))}),o.jsx("p",{className:"mt-3",children:"Fix it and restart Leglas."})]}):o.jsx(Zp,{previews:u.config.previews,project:u.config.project,scanPreviews:u.config.scanPreviews??!0,warnings:u.config.warnings??[]})}const F1=document.getElementById("root");if(!F1)throw new Error("Leglas: #root is missing from the document.");km.createRoot(F1).render(o.jsx(M.StrictMode,{children:o.jsx(Vp,{})}));
|
|
14
|
+
}`}};function Xp(u,s){return s==="copying"?"Copying…":s==="copied"?"Copied":u.copyLabel}function Qp(u){return u?{title:"Agent connected",detail:"Leglas received activity from an MCP agent in this project."}:{title:"Waiting for agent activity",detail:"This updates after the agent uses a Leglas tool."}}function Zp({client:u}){return o.jsx("span",{"aria-hidden":"true",className:"mt-0.5 flex h-5 w-7 shrink-0 items-center justify-center text-[#D1D5DB]",children:u==="claude"?o.jsx(Mi,{id:"claude",size:17}):o.jsxs("span",{className:"flex -space-x-1.5",children:[o.jsx("span",{className:"flex size-5 items-center justify-center rounded-full bg-[#25252B] ring-1 ring-[#3A3A42]",children:o.jsx(Mi,{id:"codex",size:14})}),o.jsx("span",{className:"flex size-5 items-center justify-center rounded-full bg-[#25252B] ring-1 ring-[#3A3A42]",children:o.jsx(Mi,{id:"cursor",size:13})})]})})}function Vp({connected:u,fallbackFocusRef:s,onClose:f}){const[r,d]=C.useState("claude"),[g,v]=C.useState("idle"),M=C.useRef(null),E=C.useRef(null),x=C.useRef(f);x.current=f,C.useEffect(()=>{const O=M.current;if(O===null)return;const ee=document.activeElement,se=Q=>{Q.preventDefault(),x.current()},V=Q=>{if(Q.key!=="Tab")return;const W=Array.from(O.querySelectorAll("button:not(:disabled), input:not(:disabled), [href], [tabindex]:not([tabindex='-1'])")),ie=W[0],ue=W.at(-1);ie===void 0||ue===void 0?(Q.preventDefault(),O.focus()):Q.shiftKey&&document.activeElement===ie?(Q.preventDefault(),ue.focus()):!Q.shiftKey&&document.activeElement===ue&&(Q.preventDefault(),ie.focus())};return O.addEventListener("cancel",se),O.addEventListener("keydown",V),O.open||O.showModal(),E.current?.focus(),()=>{O.removeEventListener("cancel",se),O.removeEventListener("keydown",V),O.open&&O.close();const Q=s.current;(Q?.isConnected?Q:ee)?.focus()}},[s]);const R=or[r],_=Qp(u),k=O=>{d(O),v("idle")},q=async()=>{if(g==="copying")return;v("copying");const O=await Er(R.snippet);v(O==="copied"?"copied":"blocked")};return o.jsx("dialog",{"aria-describedby":"mcp-connect-description","aria-labelledby":"mcp-connect-title","aria-modal":"true",className:"m-auto max-h-[calc(100dvh-2rem)] max-w-none overflow-visible border-0 bg-transparent p-0 text-start text-inherit backdrop:bg-black/55 backdrop:backdrop-blur-sm",onPointerDown:O=>{O.target===O.currentTarget&&f()},ref:M,tabIndex:-1,children:o.jsxs("div",{className:"w-[calc(100vw-2rem)] max-w-lg overscroll-contain rounded-xl border border-[#2A2A30] bg-[#1E1E22] p-5 shadow-2xl",children:[o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("span",{"aria-hidden":"true",className:"flex size-10 shrink-0 items-center justify-center rounded-lg border border-[#34343B] bg-[#25252A] shadow-inner",children:o.jsx(wu,{size:24})}),o.jsxs("div",{className:"min-w-0 pt-0.5",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Q1,{height:11}),o.jsx("span",{className:"rounded-full bg-[#7C9CFF]/10 px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-[0.08em] text-[#AFC2FF]",children:"MCP setup"})]}),o.jsx("h2",{className:"mt-2 text-base font-medium text-white",id:"mcp-connect-title",children:"Connect agent via MCP"}),o.jsx("p",{className:"mt-1.5 max-w-md text-xs leading-relaxed text-[#9CA3AF]",id:"mcp-connect-description",children:"Connect an MCP-compatible agent so it can handle requests in this project."})]})]}),o.jsxs("fieldset",{className:"mt-5",children:[o.jsx("legend",{className:"text-[10px] font-medium uppercase tracking-[0.08em] text-[#84848C]",children:"MCP client"}),o.jsx("div",{className:"mt-2 grid grid-cols-1 gap-2 sm:grid-cols-2",children:Object.keys(or).map((O,ee)=>{const se=or[O],V=r===O;return o.jsxs("label",{className:`flex cursor-pointer items-start gap-2.5 rounded-lg border p-3 transition-[background-color,border-color,color] duration-150 ${V?"border-[#6678B8] bg-[#7C9CFF]/10 text-white":"border-[#2A2A30] bg-[#19191D] text-[#D1D5DB] hover:border-[#3A3A42] hover:bg-[#24242A]"}`,children:[o.jsx("input",{checked:V,className:"mt-0.5 size-3.5 shrink-0 accent-[#AFC2FF] focus-visible:outline-2 focus-visible:outline-offset-2",name:"mcp-client",onChange:()=>k(O),ref:ee===0?E:void 0,type:"radio",value:O}),o.jsx(Zp,{client:O}),o.jsxs("span",{className:"min-w-0",children:[o.jsx("span",{className:"block text-xs font-medium",children:se.label}),o.jsx("span",{className:"mt-0.5 block text-[10px] leading-relaxed text-[#84848C]",children:se.description})]})]},O)})})]}),o.jsxs("div",{className:"mt-5 overflow-hidden rounded-lg border border-[#2A2A30] bg-[#151519]",children:[o.jsxs("div",{className:"flex min-h-9 items-center justify-between gap-3 border-b border-[#2A2A30] px-3",children:[o.jsx("span",{className:"text-[10px] font-medium text-[#84848C]",children:R.codeLabel}),o.jsxs("button",{className:"flex min-h-7 shrink-0 items-center gap-1.5 rounded-md px-2 text-[10px] font-medium text-[#D1D5DB] transition-[background-color,color,scale] duration-150 hover:bg-white/[0.06] hover:text-white active:scale-[0.96] disabled:opacity-60",disabled:g==="copying",onClick:()=>{q()},type:"button",children:[o.jsx(Cn,{d:Mn.copy,size:12}),Xp(R,g)]})]}),o.jsx("pre",{"aria-label":R.codeLabel,className:"max-h-44 overflow-auto whitespace-pre-wrap break-words p-3 font-mono text-[11px] leading-relaxed text-[#D1D5DB]",tabIndex:0,children:o.jsx("code",{children:R.snippet})})]}),o.jsx("p",{className:"mt-2 min-h-4 text-[10px] leading-relaxed",role:"status",children:g==="blocked"?o.jsx("span",{className:"text-red-300",children:"Clipboard access is blocked. Select and copy the text above."}):g==="copied"?o.jsx("span",{className:"text-emerald-300",children:"Copied to the clipboard."}):null}),o.jsxs("div",{className:"mt-4 space-y-4",children:[o.jsx("p",{className:"text-xs leading-relaxed text-[#9CA3AF]",children:R.nextStep}),o.jsxs("div",{className:`flex items-start gap-2.5 rounded-lg px-3 py-2.5 ${u?"bg-emerald-400/10":"bg-white/[0.04]"}`,role:"status",children:[o.jsx("span",{"aria-hidden":"true",className:`mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full ${u?"bg-emerald-400 text-[#123326]":"border border-[#5B5B66]"}`,children:u?o.jsx("svg",{fill:"none",height:"10",viewBox:"0 0 12 12",width:"10",children:o.jsx("path",{d:"m2.2 6.1 2.2 2.2 5.4-5.2",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8"})}):null}),o.jsxs("span",{className:"min-w-0",children:[o.jsx("span",{className:`block text-xs font-medium ${u?"text-emerald-200":"text-[#D1D5DB]"}`,children:_.title}),o.jsx("span",{className:"mt-0.5 block text-[10px] leading-relaxed text-[#84848C]",children:_.detail})]})]})]}),o.jsx("div",{className:"mt-5 flex justify-end",children:o.jsx("button",{className:"rounded-md bg-[#E8E8EA] px-3 py-1.5 text-xs font-medium text-[#1C1C20] transition-[background-color,scale] duration-150 hover:bg-white active:scale-[0.96]",onClick:f,type:"button",children:"Done"})})]})})}function Kp({children:u,label:s}){return s===null?o.jsx(o.Fragment,{children:u}):o.jsx(Nt,{label:s,side:"right",wide:!0,children:u})}function $p(u,s,f){const r=F1(u);return r===null?null:o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"block text-white",children:s}),u?.note?o.jsx("span",{className:"mt-0.5 block font-normal text-[#D1D5DB]",children:u.note}):null,o.jsxs("span",{className:"mt-1.5 block border-t border-white/10 pt-1.5 font-normal text-[#84848C]",children:[r.basedOn===null?null:o.jsxs("span",{className:"block",children:["Variant of ",f(r.basedOn)]}),r.askedFor===null?null:o.jsxs("span",{className:"mt-0.5 block",children:["You asked for “",r.askedFor,"”"]})]})]})}const rr=[{key:"satoshi",label:"Satoshi",stack:"var(--font-satoshi)"},{key:"outfit",label:"Outfit",stack:"var(--font-outfit)"},{key:"geist",label:"Geist",stack:"var(--font-geist)"}],fr=["#34D399","#38BDF8","#818CF8","#C084FC","#FB7185","#FB923C"];function Jp(u){let s=0;for(const r of u)s=s*31+r.charCodeAt(0)|0;const f=fr[Math.abs(s)%fr.length]??fr[0];return{backgroundColor:`${f}22`,color:f}}const O1=15e3,Fp=3e4,R1={height:800,width:1280},Wp=96,_1={attached:!1,running:!1,name:null,activity:null,startedAt:null,stopping:!1,waiting:null},Ip={agents:[],choice:null,customRun:null,effort:null},L1={low:"Low",medium:"Medium",high:"High",xhigh:"Extra high",max:"Maximum"},P1=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),Pp=Z1(P1);function ey({mac:u,onClose:s}){const f=C.useRef(null),r=Ig(u);return C.useEffect(()=>{const d=document.activeElement;f.current?.focus();const g=v=>{v.key==="Escape"&&(v.preventDefault(),s())};return window.addEventListener("keydown",g),()=>{window.removeEventListener("keydown",g),d?.focus?.()}},[s]),o.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-6 backdrop-blur-sm",onPointerDown:d=>{d.target===d.currentTarget&&s()},children:o.jsxs("div",{"aria-label":"Keyboard shortcuts","aria-modal":"true",className:"w-full max-w-sm rounded-lg border border-[#232328] bg-[#1E1E22] p-4 shadow-2xl focus:outline-none",ref:f,role:"dialog",tabIndex:-1,children:[o.jsx("span",{className:"block pb-3 text-[10px] uppercase tracking-[0.08em] text-[#84848C]",children:"Keyboard"}),o.jsx("dl",{className:"flex flex-col gap-2.5",children:r.map(d=>o.jsxs("div",{className:"flex items-baseline justify-between gap-4",children:[o.jsx("dt",{className:"flex shrink-0 items-baseline gap-1",children:d.keys.map((g,v)=>o.jsxs("span",{className:"flex items-baseline gap-1",children:[v>0&&d.join?o.jsx("span",{className:"text-[10px] text-[#84848C]",children:d.join}):null,o.jsx("kbd",{className:"rounded border border-[#232328] bg-[#2E2E2E]/60 px-1.5 py-0.5 font-sans text-[11px] text-[#E8E8EA]",children:g})]},g))}),o.jsx("dd",{className:"text-right text-xs leading-snug text-[#9CA3AF]",children:d.label})]},d.label))})]})})}function ty({busy:u,count:s,error:f,fallbackFocusRef:r,name:d,onCancel:g,onConfirm:v}){const M=C.useRef(null),E=C.useRef(null),x=C.useRef(g);x.current=g,C.useEffect(()=>{const q=E.current;if(q===null)return;const O=document.activeElement,ee=V=>{V.preventDefault(),x.current()},se=V=>{if(V.key!=="Tab")return;const Q=Array.from(q.querySelectorAll("button:not(:disabled)")),W=Q[0],ie=Q.at(-1);W===void 0||ie===void 0?(V.preventDefault(),q.focus()):V.shiftKey&&document.activeElement===W?(V.preventDefault(),ie.focus()):!V.shiftKey&&document.activeElement===ie&&(V.preventDefault(),W.focus())};return q.addEventListener("cancel",ee),q.addEventListener("keydown",se),q.open||q.showModal(),M.current?.focus(),()=>{q.removeEventListener("cancel",ee),q.removeEventListener("keydown",se),q.open&&q.close(),(O?.isConnected?O:r.current)?.focus()}},[]);const R=s===1,_=R?"Delete removed direction?":"Clear removed directions?",k=R?`This permanently removes “${d??"this direction"}” from Leglas.`:`This permanently removes all ${s} directions from Leglas.`;return o.jsx("dialog",{"aria-describedby":"delete-removed-description","aria-labelledby":"delete-removed-title","aria-modal":"true",className:"m-auto max-h-[calc(100dvh-3rem)] max-w-none overflow-visible border-0 bg-transparent p-0 text-left text-inherit backdrop:bg-black/50 backdrop:backdrop-blur-sm",onPointerDown:q=>{q.target===q.currentTarget&&!u&&g()},ref:E,role:"alertdialog",tabIndex:-1,children:o.jsxs("div",{className:"w-[calc(100vw-3rem)] max-w-sm overscroll-contain rounded-lg border border-[#232328] bg-[#1E1E22] p-4 shadow-2xl",children:[o.jsx("h2",{className:"text-sm font-medium text-white",id:"delete-removed-title",children:_}),o.jsxs("div",{className:"mt-2 space-y-1 text-xs leading-relaxed text-[#9CA3AF]",id:"delete-removed-description",children:[o.jsx("p",{children:k}),o.jsx("p",{children:"Source files and shared project config stay untouched."})]}),f!==null?o.jsx("p",{className:"mt-3 text-xs leading-relaxed text-red-300",role:"alert",children:f}):null,o.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[o.jsx("button",{className:"rounded-md px-3 py-1.5 text-xs text-[#D1D5DB] transition-[background-color,color,scale] hover:bg-white/[0.06] hover:text-white active:scale-[0.96] disabled:opacity-50",disabled:u,onClick:g,ref:M,type:"button",children:"Cancel"}),o.jsx("button",{className:"rounded-md bg-red-500/90 px-3 py-1.5 text-xs font-medium text-white transition-[background-color,scale] hover:bg-red-500 active:scale-[0.96] disabled:opacity-60",disabled:u,onClick:v,type:"button",children:u?"Deleting…":R?"Delete":"Delete all"})]})]})})}function ny({previews:u,project:s,scanPreviews:f=!0,warnings:r=[]}){const d=C.useRef(null),g=C.useRef(null),v=C.useRef(null),[M,E]=C.useState(!1),[x,R]=C.useState(null),[_,k]=C.useState(!1),[q,O]=C.useState(!1),ee=C.useCallback(()=>v.current?.(),[]),se=C.useCallback(()=>E(h=>!h),[]),V=C.useCallback(()=>E(!1),[]),[Q,W]=C.useState(!1),ie=C.useCallback(()=>W(h=>!h),[]),ue=C.useCallback(()=>Gt(h=>!h),[]),p=K2({previews:u,project:s,searchRef:d,onToggleSplit:ee,onToggleHelp:se,onToggleTools:ie,onToggleNote:ue,suspended:M||x!==null||_}),I=()=>{q||R(null)},fe=async()=>{if(x===null||q)return;const h=x;O(!0),R({...h,error:null});try{await p.deleteRemoved(h.titles),R(null),p.notify({kind:`delete:${h.titles.join("|")}`,message:h.titles.length===1?`${p.displayName(h.titles[0]??"")} permanently deleted`:`${h.titles.length} removed directions permanently deleted`,tone:"info",ttl:pt.plain})}catch(j){R({...h,error:j instanceof Error?j.message:"The directions could not be deleted."})}finally{O(!1)}},[me,ge]=C.useState(!1),[Me,he]=C.useState(null),qe=Me!==null,Ae=C.useRef(!1),[Be,D]=C.useState(""),[Z,ne]=C.useState("variant");C.useEffect(()=>{const h=g.current;h!==null&&(h.style.height="0px",h.style.height=`${Math.min(h.scrollHeight,96)}px`)},[Be,p.prefs.width]);const[xe,Ce]=C.useState(!1),[b,L]=C.useState([]),F=C.useRef(new Map),te=C.useRef(null),[oe,ve]=C.useState(!1),U=C.useRef(0),K=C.useCallback((h,j)=>{F.current.set(h,j),L(Y=>Y.map($=>$.key===h?{...$,status:"uploading",id:null}:$)),wp(j).then(({id:Y})=>L($=>$.map(ae=>ae.key===h?{...ae,status:"ready",id:Y}:ae))).catch(()=>L(Y=>Y.map($=>$.key===h?{...$,status:"failed",id:null}:$)))},[]),J=h=>{if(p.active===null||xe)return;const{accepted:j,refused:Y}=gp(b,h),$=pp(Y);if($!==null&&p.notify({kind:"reference",message:$,tone:"info",ttl:pt.action}),j.length===0)return;const ae=j.map(re=>({key:crypto.randomUUID(),name:Mr(re.name),type:re.type,bytes:re.size,url:URL.createObjectURL(re),status:"uploading",id:null}));L(re=>[...re,...ae]),ae.forEach((re,pe)=>{const Oe=j[pe];Oe!==void 0&&K(re.key,Oe)})},le=h=>{F.current.delete(h);const j=b.find(Y=>Y.key===h);j!==void 0&&URL.revokeObjectURL(j.url),L(Y=>Y.filter($=>$.key!==h))},Le=h=>{const j=F.current.get(h);j!==void 0&&K(h,j)},Ze=()=>{F.current.clear();for(const h of b)URL.revokeObjectURL(h.url);L([])},[Ye,Ve]=C.useState(null),[ze,$e]=C.useState(!1),[nt,ft]=C.useState(!1),[Mt,Wt]=C.useState(null),Yn=C.useRef(null),yl=C.useRef(null),Wl=C.useRef(null),yt=C.useRef(null),Il=C.useRef(null),Pl=C.useRef(null),[ea,vl]=C.useState(Wp);C.useEffect(()=>{const h=Pl.current;if(h===null||typeof ResizeObserver>"u")return;const j=()=>vl(h.offsetHeight);j();const Y=new ResizeObserver(j);return Y.observe(h),()=>Y.disconnect()},[]);const Da=C.useRef(null),[Gn,Xn]=C.useState({height:0,on:!1,top:0});C.useEffect(()=>{Xn(h=>h.on?{...h,on:!1}:h)},[p.rows.join("|")]);const[Ct,It]=C.useState(null),Tt=C.useRef(null),Zt=C.useRef(null);C.useEffect(()=>{Tt.current=Ct},[Ct]),C.useEffect(()=>{if(!p.focusing)return;const h=p.focusing.target==="search"?d.current:g.current;h?.focus(),h?.select()},[p.focusing]),C.useEffect(()=>{if(!Ct)return;const h=Zt.current;if(!h)return;const j=$=>{const ae=$.clientY-h.startY,re=$.clientX-h.startX;It(pe=>{if(!pe||pe.settling)return pe;if(!pe.started){if(Math.abs(ae)<=4&&Math.abs(re)<=4)return{...pe,dy:ae};if(Math.abs(re)>Math.abs(ae))return null;window.getSelection()?.removeAllRanges()}const Oe=h.rows[pe.from];if(!Oe)return pe;const Jt=Math.max(h.minDy,Math.min(h.maxDy,ae)),jt=Oe.mid+ae;let sn=0;return h.rows.forEach((bt,el)=>{el!==pe.from&&jt>bt.mid&&(sn+=1)}),{...pe,dy:Jt,started:!0,to:sn}})},Y=()=>{const $=Tt.current;if(!$?.started){It(null);return}h.suppressed=!0;let ae=0;if($.to>$.from)for(let re=$.from+1;re<=$.to;re+=1)ae+=(h.rows[re]?.height??0)+$.gap;else for(let re=$.to;re<$.from;re+=1)ae-=(h.rows[re]?.height??0)+$.gap;It({...$,dy:ae,settling:!0}),window.setTimeout(()=>{p.moveOption($.title,$.to),It(null),window.setTimeout(()=>{h.suppressed=!1},0)},190)};return window.addEventListener("pointermove",j),window.addEventListener("pointerup",Y),window.addEventListener("pointercancel",Y),()=>{window.removeEventListener("pointermove",j),window.removeEventListener("pointerup",Y),window.removeEventListener("pointercancel",Y)}},[Ct!==null]),C.useEffect(()=>{if(!Q)return;yl.current?.focus();const h=$=>{$.key==="Escape"&&(W(!1),Yn.current?.focus())},j=$=>{const ae=$.target;!yl.current?.contains(ae)&&!Yn.current?.contains(ae)&&W(!1)},Y=()=>W(!1);return window.addEventListener("keydown",h),window.addEventListener("pointerdown",j),window.addEventListener("blur",Y),()=>{window.removeEventListener("keydown",h),window.removeEventListener("pointerdown",j),window.removeEventListener("blur",Y)}},[Q]);const ct="flex h-7 w-full items-center justify-between gap-2 whitespace-nowrap rounded px-2 text-xs hover:bg-[#2E2E2E] hover:text-white disabled:cursor-not-allowed disabled:opacity-40",ta=rr.find(h=>h.key===p.prefs.font)??rr[0],bl=p.prefs.viewport!==null,ji=48,Vt=Ct?.started??!1,B=p.resizing||Vt||qe,[P,be]=C.useState({}),[Se,we]=C.useState({}),[st,We]=C.useState(!1),[dt,Kt]=C.useState(null),Mu=C.useRef(null);C.useEffect(()=>()=>{Mu.current=p.active},[p.active]),v.current=()=>{!st&&Ot!==null&&Kt(Ot),(Ot!==null||st)&&We(h=>!h)};const Ot=c2({active:p.active,previous:Mu.current,pinned:dt,parent:p.parentOf(p.active),rows:p.rows}),xl=o2({active:p.active,compare:Ot,split:st}),qt=xl.length>1,Sl=xl,na=C.useRef(new Map),Qn=h=>Pg(h,p.urlFor(h),Se[h]??0),la=h=>{const j=Qn(h);return na.current.get(h)===j&&p.isLoaded(h,j)},$t=new Map(Sl.map(h=>[h,Qn(h)])),vt=[...$t.values()].join(""),Rt=C.useRef($t);Rt.current=$t,C.useLayoutEffect(()=>{const h=na.current,j=[...$t].filter(([Y,$])=>h.get(Y)!==$);for(const[Y]of j)p.resetLoaded(Y);j.some(([Y])=>P[Y])&&be(Y=>{const $={...Y};for(const[ae]of j)$[ae]=!1;return $}),na.current=new Map($t)},[vt]);const Zn=C.useRef(null),za=C.useRef(null),[aa,Cu]=C.useState({height:0,width:0}),ju=C.useCallback(h=>{if(Zn.current=h,za.current?.disconnect(),h===null)return;const j=h.getBoundingClientRect();Cu({height:j.height,width:j.width});const Y=new ResizeObserver(([$])=>{const ae=$?.contentRect;ae&&Cu({height:ae.height,width:ae.width})});Y.observe(h),za.current=Y},[]),{boxHeight:ia,boxWidth:Ai,designWidth:Vn,frameHeight:El,scale:Kn,scaling:Yt}=d2({gutter:ji,panes:xl.length,scaleSplit:p.prefs.scaleSplit,stageHeight:aa.height,stageWidth:aa.width,viewport:p.prefs.viewport}),ht=p.prefs.viewport!==null?Math.round(p.prefs.viewport):aa.width<=0?null:Math.round(qt&&!Yt?(aa.width-1)/2:aa.width),Au=Me?(()=>{const{x:h,y:j}=L2(Me);return{bottom:"auto",left:h,right:"auto",top:j}})():void 0,Nu=h=>{if(h.button!==0)return;const j=Zn.current?.getBoundingClientRect();if(!j)return;const Y=h.currentTarget;Y.setPointerCapture(h.pointerId),Ae.current=!1;const $={x:h.clientX,y:h.clientY};let ae=!1;const re=Oe=>{!ae&&!U2($,{x:Oe.clientX,y:Oe.clientY})||(ae=!0,he(_2({x:Oe.clientX-j.left,y:Oe.clientY-j.top},{width:j.width,height:j.height})))},pe=Oe=>{if(Y.hasPointerCapture(Oe.pointerId)&&Y.releasePointerCapture(Oe.pointerId),Y.removeEventListener("pointermove",re),Y.removeEventListener("pointerup",pe),Y.removeEventListener("pointercancel",pe),he(null),!ae)return;Ae.current=!0;const{corner:Jt}=k2({x:Oe.clientX-j.left,y:Oe.clientY-j.top},{width:j.width,height:j.height});p.setPrefs(jt=>({...jt,corner:Jt})),W(!1)};Y.addEventListener("pointermove",re),Y.addEventListener("pointerup",pe),Y.addEventListener("pointercancel",pe)},[Dt,$n]=C.useState(u2),wl=new Set(u.filter(h1).map(h=>h.title)),Tu=wl.size>0,[gn,Zs]=C.useState({requests:[],agent:_1}),[Oa,Ra]=C.useState([]),[_t,Gt]=C.useState(!1),[Pt,_a]=C.useState(Ip),[La,Ua]=C.useReducer(h=>h+1,0);C.useEffect(()=>{let h=!1;return z1(La>0).then(j=>{h||_a(Y=>JSON.stringify(Y)===JSON.stringify(j)?Y:j)}).catch(()=>{}),()=>{h=!0}},[La]);const[ka,Jn]=C.useReducer(h=>h+1,0);C.useEffect(()=>{let h=!1;const Y=vr(async $=>{const ae=(re,pe)=>fetch(re,{...pe,signal:$});await fetch("/leglas/api/requests",{signal:$}).then(re=>re.json()).then(re=>{if(h)return;const pe={requests:re.requests,agent:re.agent??_1};Zs(Oe=>JSON.stringify(Oe)===JSON.stringify(pe)?Oe:pe)}).catch(()=>{}),await Mp(ae).then(re=>{h||Ra(pe=>JSON.stringify(pe)===JSON.stringify(re)?pe:re)}).catch(()=>{})},{everyMs:pr,subscribe:$=>yr().on("requests",$)});return()=>{h=!0,Y()}},[ka]);const Ge=zp(Pt.choice,Pt.agents,Pt.customRun),Ba=C.useRef(0),Ha=()=>{if(Ge.kind!=="chosen")return;const h=Date.now();h-Ba.current<Fp||(Ba.current=h,Hp().catch(()=>{}))},An=Ge.kind==="chosen"?Pt.agents.find(h=>h.id===Ge.id&&h.available):void 0,Ln=Pt.effort!==null&&An?.efforts.includes(Pt.effort)?Pt.effort:null,Lt=p.active===null?[]:Oa.filter(h=>h.title===p.active),qa=(()=>{const h=F1(p.active===null?void 0:p.previewFor(p.active));return h===null?null:$2(h.basedOn===null?null:p.displayName(h.basedOn),h.askedFor)})(),Ml=Ge.kind==="chosen"&&Pt.agents.some(h=>h.id===Ge.id&&h.auth==="signed-out"),je=_p(gn.requests,gn.agent,Ge.kind==="chosen"||gn.agent.attached),Du=je===null?null:je.kind==="running"?je.stopping?`Stopping ${je.name}`:`${je.name} is on it`:je.kind==="queued"?je.count===1?"Change queued":`${je.count} changes queued`:je.kind==="picked-up"?"Your agent is on it":je.kind==="stopped"?"You stopped that change":"That change failed",Ni=je===null?null:je.kind==="running"?je.stopping?"waiting for it to exit":je.waiting!==null?Op(je.waiting):je.activity??je.title:je.kind==="queued"?je.attended?"your agent picks it up next":"pick who runs your changes":je.kind==="failed"?je.reason??je.title:je.kind==="stopped"?je.title:null,Cl=je?.kind==="running"?je.startedAt:null,[Vs,zu]=C.useState(()=>Date.now());C.useEffect(()=>{if(Cl===null)return;zu(Date.now());const h=window.setInterval(()=>zu(Date.now()),1e3);return()=>window.clearInterval(h)},[Cl]),C.useEffect(()=>{Ge.kind==="none"&&ft(!1)},[Ge.kind]),C.useEffect(()=>{if(!nt)return;Wl.current?.focus();const h=$=>{$.key==="Escape"&&(ft(!1),yt.current?.focus())},j=$=>{const ae=$.target;!Wl.current?.contains(ae)&&!yt.current?.contains(ae)&&ft(!1)},Y=()=>ft(!1);return window.addEventListener("keydown",h),window.addEventListener("pointerdown",j),window.addEventListener("blur",Y),()=>{window.removeEventListener("keydown",h),window.removeEventListener("pointerdown",j),window.removeEventListener("blur",Y)}},[nt]);const Ya=h=>{if(Ye!==null||ze)return;const j=Pt.agents.find(Y=>Y.id===h)?.name??"Agent";Ve(h),kp(h).then(()=>{Ua(),ft(!1)}).catch(async()=>{try{const Y=await z1(!0);if(_a(Y),Y.choice===h){ft(!1);return}}catch{}p.notify({kind:"agent-choice",message:`${j} wasn’t selected. Try again.`,tone:"danger",ttl:pt.action})}).finally(()=>Ve(null))},Nn=h=>{if(An===void 0||ze||Ye!==null)return;const j=Pt.effort;$e(!0),_a(Y=>({...Y,effort:h})),Bp(An.id,h).then(()=>Ua()).catch(()=>{_a(Y=>({...Y,effort:j})),p.notify({kind:"agent-choice",message:"Effort could not be saved. Agent settings did not change.",tone:"danger",ttl:pt.action})}).finally(()=>$e(!1))},Ti=h=>{Mt===null&&(Wt("cancel"),qp(h).then(()=>Jn()).catch(()=>{p.notify({kind:"agent-cancel",message:"Leglas could not stop that run.",tone:"danger",ttl:pt.action})}).finally(()=>Wt(null)))},Di=h=>{Mt===null&&(Wt("retry"),Yp(h).then(()=>Jn()).catch(()=>{p.notify({kind:"agent-retry",message:"That change could not be retried.",tone:"danger",ttl:pt.action})}).finally(()=>Wt(null)))},jl=h=>{Mt===null&&(Wt("dismiss"),Gp(h).then(()=>Jn()).catch(()=>{p.notify({kind:"agent-dismiss",message:"That change could not be dismissed.",tone:"danger",ttl:pt.action})}).finally(()=>Wt(null)))};C.useEffect(()=>{let h=!1;const Y=vr($=>fetch("/leglas/api/health",{signal:$}).then(ae=>ae.json()).then(({reachable:ae})=>{h||$n(re=>s2(re,ae))}).catch(()=>{}),{everyMs:pr,subscribe:$=>yr().on("health",$)});return()=>{h=!0,Y()}},[]),C.useEffect(()=>{!Dt.reachable||!Dt.wasDown||(be(h=>{const j={...h};for(const Y of Object.keys(j))wl.has(Y)&&(j[Y]=!1);return j}),we(h=>{const j={...h};for(const Y of wl)j[Y]=(j[Y]??0)+1;return j}),$n(h=>({...h,wasDown:!1})))},[Dt.reachable,Dt.wasDown]);const[Fn,Ga]=C.useState({}),[zi,Ou]=C.useState(()=>!document.hidden);C.useEffect(()=>{const h=()=>Ou(!document.hidden);return document.addEventListener("visibilitychange",h),()=>document.removeEventListener("visibilitychange",h)},[]);const Wn=new Map(u.map(h=>[h.title,Qn(h.title)])),Tn=[...Wn].map(([h,j])=>`${h}${j}`).join(""),Xa=C.useRef(new Map);C.useLayoutEffect(()=>{const h=T2(Xa.current,Wn);h.length>0&&Ga(j=>cr(j,h)),Xa.current=new Map(Wn)},[Tn]);const Dn=(h,j)=>{let Y=null;try{Y=h.contentDocument}catch{return}if(!Y?.head)return;const $="leglas-hide-dev-overlays",ae=(re,pe,Oe)=>{const Jt=re.getElementById($);if(!j){Jt?.remove();return}if(Jt)return;const jt=Y.createElement("style");jt.id=$,jt.textContent=Oe,pe.appendChild(jt)};ae(Y,Y.head,h2);for(const re of Y.querySelectorAll("nextjs-portal")){const pe=re.shadowRoot;pe&&ae(pe,pe,m2)}};C.useEffect(()=>{for(const h of document.querySelectorAll("iframe"))Dn(h,!p.prefs.showDevOverlays)});const Un=h=>{let j=null;try{j=h.contentDocument}catch{return}if(!j?.body)return;const Y=[...j.body.querySelectorAll("*")].slice(0,400).map(pe=>pe.tagName),$=j.defaultView,ae=$?A2(j.body,pe=>{const Oe=$.getComputedStyle(pe);return{backgroundColor:Oe.backgroundColor,backgroundImage:Oe.backgroundImage,color:Oe.color}}):[],re=$?j2(j.body,(pe,Oe)=>$.getComputedStyle(pe,Oe)):[];return p2(j.body.innerText??"",Y,ae,re)},Oi=(h,j)=>{let Y;try{Y=h.contentDocument?.fonts}catch{}const $=new Promise(re=>window.setTimeout(re,900));(Y?.status==="loading"?Promise.race([Y.ready.then(()=>{}),$]):Promise.resolve()).then(()=>{const re=()=>{Dn(h,!p.prefs.showDevOverlays),j(Un(h))};typeof window.requestIdleCallback=="function"?window.requestIdleCallback(re,{timeout:1200}):window.setTimeout(re,0)})},ua=C.useRef(new WeakSet),sa=(h,j,Y)=>{if(Rt.current.get(h)!==j)return;p.markLoaded(h,j),be(ae=>ae[h]?{...ae,[h]:!1}:ae),Dn(Y,!p.prefs.showDevOverlays);let $=null;try{$=Y.contentDocument}catch{}$===null||ua.current.has($)||ua.current.add($)},ca=C.useRef(sa);ca.current=sa,C.useEffect(()=>{const h=j=>{if(j.origin!==window.location.origin)return;const Y=a2(j.data);if(Y===null)return;const $=i2(document.querySelectorAll("iframe[data-preview]"),j.source),ae=$?.dataset.preview,re=$?.dataset.previewIdentity;$===null||ae===void 0||re===void 0||(Y==="ready"?ca.current(ae,re,$):be(pe=>({...pe,[ae]:!0})))};return window.addEventListener("message",h),()=>window.removeEventListener("message",h)},[]);const Qa=f?Dt.reachable?u:u.filter(h=>!h1(h)):[],In=Np(gn.requests),Xt=In.toSorted().join("\0"),Pn=gn.agent.running||In.length>0,Za=Dp(gn.requests),oa=Tp(gn.requests);C.useEffect(()=>{In.length!==0&&Ga(h=>cr(h,In))},[Xt]);const Ks=Sl.every(h=>la(h)),Va=In.length>0?cr(Fn,In):Fn,Ri=z2(u,Va),zn=N2(Ri),en=!Pn&&Ks&&zi?O2(Qa,Va)[0]??null:null,Ru=en?.title??null,Ka=en===null?null:`${en.title}\0${en.url}`,_i=C.useRef(Ka);_i.current=Ka;const Li=C.useRef(null),$a=C.useRef(new Map(u.map(h=>[h.title,h.url])));$a.current=new Map(u.map(h=>[h.title,h.url]));const _u=(h,j,Y)=>{const $=`${h.title}\0${h.url}`;_i.current===$&&Li.current===Y&&$a.current.get(h.title)===h.url&&Ga(ae=>D2(ae,h,j))};C.useEffect(()=>{if(en===null)return;const h=Li.current;if(h===null)return;const j=window.setTimeout(()=>{_u(en,{status:"failed"},h)},O1);return()=>clearTimeout(j)},[Ka]);const $s=(h,j)=>{br(j)&&(Dn(j,!p.prefs.showDevOverlays),window.setTimeout(()=>{const Y=`${h.title}\0${h.url}`;_i.current===Y&&Oi(j,$=>{_u(h,$===void 0?{status:"failed"}:{status:"complete",signature:$},j)})},600))};C.useEffect(()=>{const h=[];for(const j of Sl){const Y=$t.get(j)??Qn(j);if(p.isLoaded(j,Y)||P[j])continue;const $=document.querySelector(`iframe[data-preview="${CSS.escape(j)}"]`);if($===null)continue;const ae=Dt.reachable||!wl.has(j)?O1:0;h.push(l2({frame:$,onFailure:()=>be(re=>({...re,[j]:!0})),onReady:()=>sa(j,Y,$),sameOrigin:p.urlFor(j).startsWith("/"),timeoutMs:ae}))}return()=>{for(const j of h)j()}},[vt,p.loaded,P,Dt.reachable]);const Js=h=>{be(j=>({...j,[h]:!1})),p.resetLoaded(h),we(j=>({...j,[h]:(j[h]??0)+1}))},Fs=(h,j)=>Y=>{if(Y.button!==0||p.renaming||p.query.trim()||p.rows.length<2||Y.target.closest("button, [data-selectable]"))return;const $=Da.current,ae=$?.parentElement;if(!$||!ae)return;const re=[...$.querySelectorAll("li[data-title]")],pe=re.map(bt=>({height:bt.offsetHeight,mid:bt.offsetTop+bt.offsetHeight/2,title:bt.dataset.title??"",top:bt.offsetTop})),Oe=ae.getBoundingClientRect(),Jt=re[j]?.getBoundingClientRect();Zt.current={maxDy:Jt?Oe.bottom-Jt.bottom:0,minDy:Jt?Oe.top-Jt.top:0,rows:pe,startX:Y.clientX,startY:Y.clientY,suppressed:!1};const jt=pe[0],sn=pe[1];It({dy:0,from:j,gap:jt&&sn?sn.top-jt.top-jt.height:0,height:pe[j]?.height??0,title:h,settling:!1,started:!1,to:j})},Ws=h=>{if(!Ct?.started)return 0;const j=Ct.height+Ct.gap;return h<Ct.from&&h>=Ct.to?j:h>Ct.from&&h<=Ct.to?-j:0},Ui=C.useCallback(()=>Gt(!1),[]),Is=(h,j,Y)=>(Ha(),Cp(h,Y,j).then(()=>(Jn(),!0)).catch(()=>(p.notify({kind:"request",message:"That annotation could not be kept.",tone:"danger",ttl:pt.action}),!1))),Ps=(h,j)=>jp(h,j).then(()=>(Jn(),!0)).catch(()=>(p.notify({kind:"request",message:"That annotation could not be changed.",tone:"danger",ttl:pt.action}),!1)),ec=h=>{Ap([h]).then(()=>Jn()).catch(()=>{})},tc=h=>{window.open(p.urlFor(h),"_blank","noopener,noreferrer")},ki=(h,j)=>{const Y=h===p.active,$=Za.has(h),ae=p.previewFor(h),re=Vt&&Ct?.title===h,pe=Vt&&!re?Ws(j):0,Oe=p.rowMeta.get(h),Jt=Oe?.depth===1,jt=Oe?.variants??0,sn=Oe?.folded??!1,bt=p.renaming===h,el=Vt||bt?"":"group-hover:hidden group-has-[button:focus-visible]:hidden";return o.jsxs("li",{className:`group relative ${re?`z-30 rounded-md bg-white/[0.06] shadow-2xl ${Ct?.settling?`transition-transform duration-200 ${ja} motion-reduce:transition-none`:""}`:"z-10"} ${Vt&&!re?`transition-transform duration-200 ${ja} motion-reduce:transition-none`:""}`,"data-title":h,onPointerEnter:it=>Xn({height:it.currentTarget.offsetHeight,on:!0,top:it.currentTarget.offsetTop}),style:re?{transform:`translateY(${Ct?.dy??0}px)`}:pe?{transform:`translateY(${pe}px)`}:void 0,children:[o.jsx(Kp,{label:bt?null:$p(ae,p.displayName(h),p.displayName),children:o.jsx("div",{"aria-pressed":Y,className:`relative flex w-full cursor-grab items-start gap-2 rounded-md py-2 pr-3 text-left transition-colors active:cursor-grabbing ${Jt?"pl-11":"pl-3"} ${Y?"bg-[#2E2E2E] ring-1 ring-inset ring-[#D1D5DB]/40":""}`,onClick:()=>{if(!bt){if(Zt.current?.suppressed){Zt.current.suppressed=!1;return}p.setActive(h)}},onDoubleClick:it=>{bt||it.target.closest("button")||(window.getSelection()?.removeAllRanges(),tc(h))},onKeyDown:it=>{it.target===it.currentTarget&&(it.key==="Enter"||it.key===" ")&&(it.preventDefault(),p.setActive(h))},onPointerDown:Fs(h,j),role:"button",tabIndex:0,children:o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsxs("span",{className:`flex items-center gap-2 ${Vt||bt?"":Y?"group-hover:pr-[72px] group-has-[button:focus-visible]:pr-[72px]":"group-hover:pr-[98px] group-has-[button:focus-visible]:pr-[98px]"}`,children:[jt>0&&o.jsx(Nt,{label:sn?`Show ${jt} variant${jt===1?"":"s"}`:"Fold the variants away",children:o.jsxs("button",{"aria-expanded":!sn,"aria-label":`${sn?"Show":"Hide"} the variants of ${p.displayName(h)}`,className:"-ml-1 flex shrink-0 items-center gap-1 rounded px-0.5 py-1 text-[#84848C] transition-colors hover:text-[#E8EAED]",onClick:it=>{it.stopPropagation(),p.toggleFamily(h)},onPointerDown:it=>it.stopPropagation(),type:"button",children:[o.jsx("svg",{className:`size-2.5 transition-transform duration-150 motion-reduce:transition-none ${sn?"-rotate-90":""}`,fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 10 10",children:o.jsx("path",{d:"M2 3.5 5 6.5 8 3.5",strokeLinecap:"round",strokeLinejoin:"round"})}),sn?o.jsx("span",{className:"text-[10px] leading-none tabular-nums",children:jt}):null]})}),bt?o.jsx(zg,{error:p.renameError,initial:p.displayName(h),label:`Rename the ${p.displayName(h)} direction`,onCancel:()=>p.startRename(null),onCommit:(it,ra)=>p.rename(h,it,ra)}):o.jsx("span",{className:`min-w-0 flex-1 text-sm font-medium leading-5 transition-colors duration-150 ${Y?"text-white":"text-[#D1D5DB] group-hover:text-[#E8EAED]"}`,children:o.jsx("span",{className:`block w-fit min-w-[70%] max-w-full cursor-text truncate -my-1 py-1 pr-2 ${jt>0?"":"-ml-3 pl-3"}`,onDoubleClick:it=>{it.stopPropagation(),window.getSelection()?.removeAllRanges(),p.startRename(h)},children:p.displayName(h)})}),qt&&h===Ot?o.jsx("span",{className:`shrink-0 rounded bg-white/[0.08] px-1.5 py-0.5 text-[10px] font-medium leading-normal text-[#E8E8EA] ${el}`,children:"Comparing"}):$?o.jsxs("span",{className:`flex h-5 shrink-0 items-center gap-1 rounded bg-white/[0.04] pl-0.5 pr-1.5 text-[10px] font-medium leading-none text-[#84848C]/80 ${el}`,children:[o.jsx(mr,{"aria-label":"Working on direction",size:20,state:gr,theme:"dark"}),"Cooking"]}):zn[h]?o.jsx(Nt,{label:`Rendered structure, layout, visual styles, media and vector geometry match ${zn[h]?.join(", ")} in a 1280 × 800 comparison.`,children:o.jsxs("span",{className:`shrink-0 rounded bg-amber-400/10 px-1.5 py-0.5 text-[10px] font-medium leading-normal text-amber-300/90 ${el}`,children:["Same as ",zn[h]?.length===1?zn[h]?.[0]:`${zn[h]?.length} others`]})}):Ru===h?o.jsxs("span",{className:`flex h-5 shrink-0 items-center gap-1 rounded bg-white/[0.04] pl-0.5 pr-1.5 text-[10px] font-medium leading-none text-[#84848C]/80 ${el}`,children:[o.jsx(mr,{"aria-label":"Checking for duplicates",size:20,state:gr,theme:"dark"}),"Cooking"]}):ae?.tags[0]&&o.jsx("span",{className:`shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium leading-normal ${el}`,style:Jp(ae.tags[0]),children:ae.tags[0]})]}),o.jsx("span",{className:`mt-0.5 line-clamp-2 block cursor-text text-xs leading-snug transition-colors ${bt&&p.renameError?"text-amber-300/90":Y?"text-[#D1D5DB]":"text-[#84848C]"}`,id:bt&&p.renameError?"leglas-rename-error":void 0,children:bt&&p.renameError?p.renameError:ae?.note??ae?.url})]})})}),o.jsxs("div",{className:`pointer-events-none absolute right-2 top-1.5 flex items-center gap-0.5 opacity-0 transition-opacity duration-150 ${bt?"invisible":""} ${Vt?"":"group-hover:pointer-events-auto group-hover:opacity-100 group-has-[button:focus-visible]:pointer-events-auto group-has-[button:focus-visible]:opacity-100"}`,children:[h!==p.active&&o.jsx(Nt,{label:qt&&h===Ot?"Stop comparing":`Compare with ${p.displayName(p.active)}`,children:o.jsx("button",{"aria-label":qt&&h===Ot?`Stop comparing ${p.displayName(h)}`:`Compare ${p.displayName(h)} with ${p.displayName(p.active)}`,"aria-pressed":qt&&h===Ot,className:`${Eu} ${qt&&h===Ot?"text-white":""}`,onClick:it=>{if(it.stopPropagation(),qt&&h===Ot){We(!1);return}Kt(h),We(!0)},type:"button",children:o.jsx(Cn,{d:Mn.split})})}),o.jsx(Nt,{label:p.copied?.kind==="link"&&p.copied.title===h?"Copied":"Copy preview link",children:o.jsx("button",{"aria-label":`Copy the preview link to the ${p.displayName(h)} direction`,className:Eu,onClick:()=>p.copyLink(h),type:"button",children:p.copied?.kind==="link"&&p.copied.title===h?o.jsx("span",{className:"text-[10px] text-emerald-300",children:"✓"}):o.jsx(Cn,{d:Mn.link})})}),o.jsx(Nt,{label:p.copied?.kind==="reference"&&p.copied.title===h?"Copied":o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"block",children:"Copy a detailed reference."}),o.jsx("span",{className:"block",children:"For a teammate or an agent."})]}),children:o.jsx("button",{"aria-label":`Copy a detailed reference to the ${p.displayName(h)} direction`,className:Eu,onClick:()=>p.copyReference(h),type:"button",children:p.copied?.kind==="reference"&&p.copied.title===h?o.jsx("span",{className:"text-[10px] text-emerald-300",children:"✓"}):o.jsx(Cn,{d:Mn.copy,size:12})})}),o.jsx(Nt,{label:"Rename",children:o.jsx("button",{"aria-label":`Rename the ${p.displayName(h)} direction`,className:Eu,onClick:()=>p.startRename(h),type:"button",children:o.jsx(Cn,{d:Mn.pencil,size:12})})}),o.jsx(Nt,{label:"Remove from list",children:o.jsx("button",{"aria-label":`Remove the ${p.displayName(h)} direction from the list`,className:Eu,onClick:()=>p.hide(h),type:"button",children:o.jsx(Cn,{d:Mn.trash,size:12})})})]})]},h)};return o.jsxs("main",{className:`flex h-dvh bg-[#1C1C20] text-white antialiased selection:bg-[#E6E8EC] selection:text-[#17181B] ${p.resizing?"cursor-col-resize":""} ${B?"select-none":""}`,"data-leglas-shell":"",style:{fontFamily:ta.stack},children:[o.jsxs("aside",{className:`relative shrink-0 overflow-hidden border-r border-[#232328] ${p.prefs.collapsed?"":"shadow-2xl"} ${p.resizing?"":`transition-[width] duration-200 ${ja} motion-reduce:transition-none`}`,style:{width:p.prefs.collapsed?48:p.prefs.width},children:[o.jsxs("div",{className:`flex h-full flex-col transition-opacity duration-150 ${p.prefs.collapsed?"pointer-events-none opacity-0":"opacity-100"}`,inert:p.prefs.collapsed,style:{width:p.prefs.width},children:[o.jsxs("div",{className:"z-10 flex shrink-0 items-center justify-between gap-2 border-b border-[#232328] bg-[#1E1E22] px-2.5 py-2.5",children:[o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(wu,{size:28}),o.jsx(Q1,{height:18})]}),o.jsx(Nt,{label:o.jsxs(o.Fragment,{children:["Collapse panel ",o.jsx("kbd",{className:"ml-1 text-[#9CA3AF]",children:"["})]}),side:"right",children:o.jsx("button",{"aria-label":"Collapse the directions panel",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded p-1 text-[#9CA3AF] transition-colors hover:bg-[#2E2E2E] hover:text-white",onClick:()=>p.setPrefs(h=>({...h,collapsed:!0})),type:"button",children:o.jsx(Cn,{d:Mn.sidebar,size:16})})})]}),o.jsx("div",{className:"px-3 pb-1 pt-2",children:o.jsxs("div",{className:"relative",children:[o.jsx("span",{className:"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 text-[#D1D5DB]",children:o.jsx(Cn,{d:Mn.search})}),o.jsx("kbd",{className:`pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 rounded border border-[#232328] bg-[#2E2E2E]/60 px-1.5 py-0.5 font-sans text-[10px] leading-none tracking-wide text-[#84848C] transition-opacity duration-150 motion-reduce:transition-none ${p.query||me?"opacity-0":"opacity-100"}`,children:Pp}),o.jsx("input",{"aria-label":"Search directions",className:"w-full rounded-md border border-[#232328] bg-[#2E2E2E]/40 py-1.5 pl-7 pr-16 text-xs text-white placeholder:text-[#E8EAED] focus:outline-none focus:ring-1 focus:ring-[#D1D5DB]/60",onBlur:()=>ge(!1),onFocus:()=>ge(!0),onChange:h=>p.setQuery(h.target.value),onKeyDown:h=>{h.key==="Escape"&&(p.query?p.setQuery(""):h.currentTarget.blur())},placeholder:"Search directions…",ref:d,type:"text",value:p.query})]})}),r.length>0&&o.jsxs("section",{"aria-label":"Preview warning",className:"mx-3 mb-1 mt-1 rounded-md border border-amber-400/20 bg-amber-400/[0.07] px-2.5 py-2",children:[o.jsx("p",{className:"text-xs font-medium text-amber-300/90",children:"Preview may be from another project"}),r.map(h=>o.jsx("p",{className:"mt-0.5 text-[11px] leading-snug text-[#9CA3AF]",children:h},h))]}),Tu&&!Dt.reachable&&o.jsxs("div",{className:"mx-3 mb-1 mt-1 rounded-md border border-amber-400/20 bg-amber-400/[0.07] px-2.5 py-2",children:[o.jsx("p",{className:"text-xs font-medium text-amber-300/90",children:"Dev server not responding"}),o.jsx("p",{className:"mt-0.5 text-[11px] leading-snug text-[#9CA3AF]",children:"Anything on screen is from before it stopped. Previews return on their own once it is back."})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[o.jsxs("ul",{className:"relative flex flex-col gap-1",onPointerLeave:()=>Xn(h=>({...h,on:!1})),ref:Da,children:[o.jsx("div",{"aria-hidden":!0,className:`pointer-events-none absolute left-0 right-0 z-0 rounded-md bg-white/[0.06] transition-[transform,height,opacity] duration-150 ${ja} motion-reduce:transition-none`,style:{height:Gn.height,opacity:Gn.on&&!Vt?1:0,transform:`translateY(${Gn.top}px)`}}),p.rows.map((h,j)=>ki(h,j))]}),p.rows.length===0&&o.jsx("div",{className:"px-3 py-2",children:p.query.trim()?o.jsxs(o.Fragment,{children:[o.jsxs("p",{className:"text-xs text-[#9CA3AF]",children:["Nothing matches “",p.query,"”."]}),o.jsx("button",{className:"mt-1 rounded text-xs text-[#84848C] underline underline-offset-2 transition-colors hover:text-[#D1D5DB]",onClick:()=>p.setQuery(""),type:"button",children:"Clear search"})]}):o.jsx("p",{className:"text-xs leading-snug text-[#9CA3AF]",children:p.visibleCount===0&&p.hiddenCount>0?"Every direction is removed. Restore one below.":"No directions yet. Add them to leglas.config.ts."})}),p.hiddenCount>0&&o.jsxs("div",{className:"mt-1 flex items-center justify-between gap-2",children:[o.jsxs("button",{className:"min-w-0 flex-1 rounded px-3 py-1.5 text-left text-[11px] text-[#84848C] transition-colors hover:text-[#D1D5DB]",onClick:()=>p.setShowHidden(h=>!h),type:"button",children:[p.showHidden?"Hide":"Show"," removed (",p.hiddenCount,")"]}),p.showHidden?o.jsx("button",{className:"rounded px-3 py-1.5 text-[11px] text-[#9CA3AF] transition-[color,scale] hover:text-red-300 active:scale-[0.96]",onClick:()=>R({error:null,titles:[...p.prefs.hidden]}),type:"button",children:"Clear all"}):null]}),p.showHidden&&o.jsx("ul",{className:"relative",children:p.prefs.hidden.filter(p.matches).map(h=>o.jsx("li",{className:"group relative",children:o.jsxs("div",{className:"flex items-center justify-between rounded-md px-3 py-2 transition-colors group-hover:bg-white/[0.04]",children:[o.jsx("span",{className:"truncate text-sm font-medium text-[#9CA3AF]",children:p.displayName(h)}),o.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[o.jsx("button",{className:"rounded text-[11px] text-[#9CA3AF] transition-colors hover:text-white",onClick:()=>{p.restore(h),p.notify({kind:`remove:${h}`,message:`${p.displayName(h)} is back in the list`,tone:"success",ttl:pt.plain})},type:"button",children:"Restore"}),o.jsx("button",{className:"rounded text-[11px] text-[#84848C] transition-[color,scale] hover:text-red-300 active:scale-[0.96]",onClick:()=>R({error:null,titles:[h]}),type:"button",children:"Delete"})]})]})},h))})]}),o.jsxs("div",{ref:Pl,children:[je!==null&&o.jsx("div",{className:"mx-3 mt-2 rounded-lg border border-[#232328] bg-[#1E1E22] px-2.5 py-2 shadow-lg",role:"status",children:o.jsxs("div",{className:"flex items-center gap-2",children:[je.kind==="stopped"?o.jsx("span",{"aria-hidden":"true",className:"flex size-3.5 shrink-0 items-center justify-center text-[#84848C]",children:o.jsx("span",{className:"block size-2 rounded-[2px] bg-current"})}):je.kind==="failed"?o.jsxs("svg",{"aria-hidden":"true",className:"shrink-0 text-amber-400/90",fill:"none",height:"14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 16 16",width:"14",children:[o.jsx("path",{d:"M8 2.6 14.6 13.4H1.4Z"}),o.jsx("path",{d:"M8 6.8v2.7"}),o.jsx("path",{d:"M8 11.6h.01"})]}):je.kind==="queued"?o.jsx("span",{"aria-hidden":"true",className:"flex size-3.5 shrink-0 items-center justify-center",children:o.jsx("span",{className:"size-1.5 animate-pulse rounded-full bg-[#84848C] motion-reduce:animate-none"})}):o.jsx("span",{"aria-hidden":"true",className:"size-3.5 shrink-0 animate-spin rounded-full border-[1.5px] border-white/15 border-t-white/70 motion-reduce:animate-none"}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("p",{className:"truncate text-[11px] font-medium leading-tight text-[#D1D5DB]",children:Du}),Ni!==null&&o.jsx("p",{className:"mt-0.5 text-[10px] leading-tight text-[#84848C]",children:Ni})]}),je.kind==="running"&&Cl!==null&&o.jsx("span",{className:"shrink-0 text-[10px] tabular-nums text-[#84848C]",children:Rp(Vs-Cl)}),je.kind==="running"&&o.jsx(Nt,{label:"Stop this run",children:o.jsx("button",{"aria-label":"Stop this run",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-[#84848C] transition-[background-color,color,transform] duration-150 hover:bg-white/[0.06] hover:text-white active:scale-[0.96] disabled:cursor-wait disabled:opacity-40 motion-reduce:transition-none",disabled:Mt!==null||je.stopping,onClick:()=>Ti(je.id),type:"button",children:Mt==="cancel"||je.stopping?o.jsx("span",{className:"size-3 animate-spin rounded-full border-[1.5px] border-current border-t-transparent motion-reduce:animate-none"}):o.jsx("span",{className:"block size-2 rounded-[2px] bg-current"})})}),(je.kind==="failed"||je.kind==="stopped")&&o.jsxs("span",{className:"flex shrink-0 items-center",children:[o.jsx(Nt,{label:je.kind==="stopped"?"Run it after all":"Try it again",children:o.jsx("button",{"aria-label":je.kind==="stopped"?"Run this change after all":"Retry this change",className:"flex h-6 w-6 items-center justify-center rounded-md text-[#84848C] transition-[background-color,color,transform] duration-150 hover:bg-white/[0.06] hover:text-white active:scale-[0.96] disabled:cursor-wait disabled:opacity-40 motion-reduce:transition-none",disabled:Mt!==null,onClick:()=>Di(je.id),type:"button",children:Mt==="retry"?o.jsx("span",{className:"size-3 animate-spin rounded-full border-[1.5px] border-current border-t-transparent motion-reduce:animate-none"}):o.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.75",viewBox:"0 0 16 16",width:"13",children:[o.jsx("path",{d:"M13.5 8a5.5 5.5 0 1 1-1.6-3.9"}),o.jsx("path",{d:"M13.7 1.8v2.7H11"})]})})}),o.jsx(Nt,{label:"Let it go",children:o.jsx("button",{"aria-label":je.kind==="stopped"?"Dismiss this stopped change":"Dismiss this failed change",className:"flex h-6 w-6 items-center justify-center rounded-md text-[#84848C] transition-[background-color,color,transform] duration-150 hover:bg-white/[0.06] hover:text-white active:scale-[0.96] disabled:cursor-wait disabled:opacity-40 motion-reduce:transition-none",disabled:Mt!==null,onClick:()=>jl(je.id),type:"button",children:Mt==="dismiss"?o.jsx("span",{className:"size-3 animate-spin rounded-full border-[1.5px] border-current border-t-transparent motion-reduce:animate-none"}):o.jsx("svg",{"aria-hidden":"true",fill:"none",height:"13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.75",viewBox:"0 0 16 16",width:"13",children:o.jsx("path",{d:"m4 4 8 8M12 4l-8 8"})})})})]})]})}),o.jsx("form",{className:"relative px-3 pb-2.5 pt-2",onSubmit:h=>{h.preventDefault();const j=Be.trim(),Y=p.active;if(!j&&Lt.length===0||!Y||xe)return;const $=p.displayName(Y),ae=xp(b);if(ae!==null){p.notify({kind:"request",message:ae==="uploading"?"Still uploading an image. Try again in a moment.":"One image did not upload. Retry it or remove it, then send.",tone:"info",ttl:pt.action});return}const re=bp(b);Ce(!0),fetch("/leglas/api/request",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({title:Y,intent:j,mode:Z,...ht===null?{}:{width:ht},...qt&&Ot!==null&&Ot!==Y?{compare:Ot}:{},...re.length===0?{}:{references:re}})}).then(pe=>pe.json()).then(pe=>{if(pe.duplicate===!0){Ce(!1),p.notify({kind:"request",message:`That exact change to ${$} is already queued.`,tone:"info",ttl:pt.action});return}if(!pe.ok&&typeof pe.error=="string"){Ce(!1),p.notify({kind:"request",message:pe.error,tone:"danger",ttl:pt.action});return}if(!pe.ok||!pe.prompt)throw new Error("refused");D(""),Ze(),Ce(!1),Jn(),p.notify({kind:"request",message:`Asked for a change to ${$}.`,tone:"success",ttl:pt.plain}),Er(pe.prompt).then(Oe=>{p.notify({kind:"request",message:Oe==="copied"?`Asked for a change to ${$}. Prompt copied.`:`Asked for a change to ${$}. Your browser blocked the clipboard, so read it with npx leglas requests.`,tone:"success",ttl:pt.plain})})}).catch(()=>{Ce(!1),p.notify({kind:"request",message:`That request never reached Leglas. ${$} is unchanged.`,tone:"danger",ttl:pt.action})})},children:o.jsxs("div",{className:`rounded-md border bg-[#2E2E2E]/40 transition-colors ${oe?"border-[#7C9CFF]/70 ring-1 ring-[#7C9CFF]/40":"border-[#232328] focus-within:border-[#D1D5DB]/40 focus-within:ring-1 focus-within:ring-[#D1D5DB]/40"}`,onDragEnter:h=>{Ys(h.dataTransfer.types)&&(h.preventDefault(),U.current+=1,ve(!0))},onDragLeave:h=>{Ys(h.dataTransfer.types)&&(U.current=Math.max(0,U.current-1),U.current===0&&ve(!1))},onDragOver:h=>{Ys(h.dataTransfer.types)&&(h.preventDefault(),h.dataTransfer.dropEffect="copy")},onDrop:h=>{Ys(h.dataTransfer.types)&&(h.preventDefault(),U.current=0,ve(!1),J(Array.from(h.dataTransfer.files)))},children:[o.jsx(Sp,{drafts:b,onRemove:le,onRetry:Le}),o.jsx("textarea",{"aria-label":p.active?`Ask your agent to change the ${p.displayName(p.active)} direction`:"Ask your agent to change a direction",className:"block w-full resize-none overflow-y-auto bg-transparent px-2.5 pb-1 pt-2 text-xs leading-4 text-white placeholder:text-[#84848C] focus:outline-none disabled:cursor-not-allowed disabled:opacity-60",disabled:xe||!p.active,onChange:h=>{Be===""&&h.target.value!==""&&Ha(),D(h.target.value)},onFocus:Ha,onKeyDown:h=>{h.key==="Enter"&&!h.shiftKey&&(h.preventDefault(),h.currentTarget.form?.requestSubmit())},onPaste:h=>{const j=Array.from(h.clipboardData.files);j.length!==0&&(h.preventDefault(),J(j))},placeholder:p.active===null?"No direction to change yet":oe?"Drop the image here":b.length>0&&Lt.length===0?`Say what to take from the ${b.length===1?"image":"images"}…`:Lt.length>0?`Send ${Lt.length===1?"the annotation":`${Lt.length} annotations`}, or add words…`:`Change ${p.displayName(p.active)}…`,ref:g,rows:1,value:Be}),o.jsxs("div",{className:"flex items-center justify-end gap-1.5 p-1",children:[o.jsx(Nt,{label:Z==="variant"?"Builds a new direction beside this one and leaves this one alone.":"Changes this direction itself. Nothing is kept of what it was.",children:o.jsxs("button",{"aria-label":Z==="variant"?"This change makes a new variant. Switch to changing the direction itself.":"This change edits the direction itself. Switch to making a new variant.",className:"mr-auto flex h-6 shrink-0 items-center gap-1 rounded-md px-1.5 text-[10px] font-medium leading-none text-[#84848C] transition-colors hover:bg-white/[0.06] hover:text-[#D1D5DB]",onClick:()=>ne(Z==="variant"?"replace":"variant"),type:"button",children:[Z==="variant"?o.jsxs("svg",{"aria-hidden":!0,fill:"none",height:"11",stroke:"currentColor",strokeWidth:"1.7",viewBox:"0 0 16 16",width:"11",children:[o.jsx("circle",{cx:"4.5",cy:"3.6",r:"1.9"}),o.jsx("circle",{cx:"11.5",cy:"12.4",r:"1.9"}),o.jsx("path",{d:"M4.5 5.5v2.6a4.3 4.3 0 0 0 4.3 4.3h0.8",strokeLinecap:"round"})]}):o.jsx("svg",{"aria-hidden":!0,fill:"none",height:"11",stroke:"currentColor",strokeWidth:"1.7",viewBox:"0 0 16 16",width:"11",children:o.jsx("path",{d:"M10.8 2.9 13.1 5.2 5.6 12.7H3.3v-2.3z",strokeLinejoin:"round"})}),Z==="variant"?"as a variant":"in place"]})}),o.jsx("input",{accept:W1.join(","),className:"sr-only",multiple:!0,onChange:h=>{J(Array.from(h.currentTarget.files??[])),h.currentTarget.value=""},ref:te,tabIndex:-1,type:"file"}),o.jsx(Nt,{label:o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"block",children:"Attach a reference image"}),o.jsx("span",{className:"block text-[#9CA3AF]",children:"Paste or drop one, too"})]}),children:o.jsx("button",{"aria-label":b.length>0?`Attach another image, ${b.length} attached`:"Attach a reference image",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-[#84848C] transition-[background-color,color,transform] duration-150 hover:bg-white/[0.06] hover:text-[#D1D5DB] active:scale-[0.96] disabled:cursor-not-allowed disabled:opacity-40 motion-reduce:transition-none",disabled:!p.active||xe||b.length>=wr,onClick:()=>te.current?.click(),type:"button",children:o.jsxs("svg",{"aria-hidden":!0,fill:"none",height:"11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.7",viewBox:"0 0 16 16",width:"11",children:[o.jsx("rect",{height:"10.5",rx:"1.8",width:"12.5",x:"1.75",y:"2.75"}),o.jsx("circle",{cx:"5.6",cy:"6.3",r:"1.1"}),o.jsx("path",{d:"m14.25 10.4-3.1-3.1a1 1 0 0 0-1.4 0L4.5 12.5"})]})})}),o.jsx(Nt,{label:o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"block",children:_t?"Stop annotating":Lt.length>0?"Show what you marked up":"Point at what is wrong, instead of describing where it is"}),o.jsx("span",{className:"block text-[#9CA3AF]",children:_t?"Click a detail · drag an area · Esc to stop":o.jsx("kbd",{className:"font-sans",children:"A"})})]}),children:o.jsxs("button",{"aria-keyshortcuts":"a","aria-label":_t?"Stop annotating the design":`Annotate the design${Lt.length>0?`, ${Lt.length} annotation${Lt.length===1?"":"s"} so far`:""}`,"aria-pressed":_t,className:`flex h-6 shrink-0 items-center gap-1 rounded-md px-1.5 text-[10px] font-medium leading-none transition-colors ${_t?"bg-[#7C9CFF]/20 text-[#AFC2FF]":"text-[#84848C] hover:bg-white/[0.06] hover:text-[#D1D5DB]"}`,onClick:()=>_t?Ui():Gt(!0),type:"button",children:[o.jsxs("svg",{"aria-hidden":!0,fill:"none",height:"11",stroke:"currentColor",strokeWidth:"1.7",viewBox:"0 0 16 16",width:"11",children:[o.jsx("path",{d:"M8 1.8a4.2 4.2 0 0 1 4.2 4.2c0 3-4.2 8-4.2 8S3.8 9 3.8 6A4.2 4.2 0 0 1 8 1.8Z",strokeLinejoin:"round"}),o.jsx("circle",{cx:"8",cy:"6",r:"1.4"})]}),"Annotate",Lt.length>0?o.jsx("span",{className:"rounded-full bg-white/15 px-1 text-[9px] leading-[1.5] text-white",children:Lt.length}):null]})}),Ge.kind==="none"?o.jsxs("button",{className:"flex min-w-0 items-center gap-1.5 rounded px-1.5 py-1 text-[10px] leading-none text-[#84848C] transition-colors duration-150 hover:bg-white/[0.04] hover:text-[#D1D5DB]",onClick:()=>k(!0),ref:Il,type:"button",children:[o.jsx(Cn,{d:Mn.link,size:12}),o.jsx("span",{className:"truncate",children:"Connect agent via MCP…"})]}):o.jsxs("div",{className:"relative flex min-w-0 items-center",children:[o.jsxs("div",{"aria-hidden":!nt,"aria-label":"Who runs your changes",className:`absolute bottom-full right-0 z-10 mb-1.5 w-max min-w-48 origin-bottom-right rounded-lg border border-[#232328] bg-[#1E1E22] p-1 text-[#D1D5DB] shadow-2xl transition-[opacity,transform] duration-150 ease-[cubic-bezier(0.165,0.84,0.44,1)] focus:outline-none motion-reduce:transition-none ${nt?"translate-y-0 scale-100 opacity-100":"pointer-events-none translate-y-1 scale-95 opacity-0"}`,inert:!nt,ref:Wl,role:"dialog",tabIndex:-1,children:[Pt.agents.filter(h=>h.available).map(h=>{const j=Ge.kind==="chosen"&&h.id===Ge.id;return o.jsxs("button",{className:ct,disabled:Ye!==null||ze,onClick:()=>j?ft(!1):Ya(h.id),type:"button",children:[o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(Mi,{id:h.id}),o.jsx("span",{className:"truncate",children:h.name})]}),Ye===h.id?o.jsx("span",{"aria-label":"selecting",className:"size-3 animate-spin rounded-full border-[1.5px] border-current border-t-transparent motion-reduce:animate-none"}):h.auth==="signed-out"?o.jsx("span",{className:"text-[10px] text-amber-400/80",children:"signed out"}):j&&o.jsx("span",{"aria-label":"current choice",children:"✓"})]},h.id)}),Ge.kind==="chosen"&&Ge.id==="custom"?o.jsxs("button",{className:ct,onClick:()=>ft(!1),type:"button",children:[o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(Mi,{id:"custom"}),o.jsx("span",{className:"truncate",children:Ge.name})]}),o.jsx("span",{"aria-label":"current choice",children:"✓"})]}):null,An!==void 0&&An.efforts.length>0?o.jsx("div",{className:"mt-1 border-t border-[#232328] px-1 pb-0.5 pt-1.5",children:o.jsxs("label",{className:"flex min-h-7 items-center justify-between gap-3",children:[o.jsx("span",{className:"text-[10px] font-medium text-[#84848C]",children:"Effort"}),o.jsxs("select",{"aria-busy":ze,"aria-label":`${An.name} effort`,className:"min-h-7 rounded-md border border-[#303038] bg-[#17171B] px-2 text-[10px] text-[#D1D5DB] focus-visible:outline-2 focus-visible:outline-offset-2 disabled:opacity-60",disabled:ze||Ye!==null,onChange:h=>{const j=h.currentTarget.value;Nn(j===""?null:j)},value:Ln??"",children:[o.jsx("option",{value:"",children:"Agent default"}),An.efforts.map(h=>o.jsx("option",{value:h,children:L1[h]},h))]})]})}):null,o.jsx("div",{className:"mt-1 border-t border-[#232328] pt-1",children:o.jsx("button",{className:`${ct} text-[#84848C]`,onClick:()=>{ft(!1),k(!0)},ref:Il,type:"button",children:o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(Cn,{d:Mn.link,size:14}),o.jsx("span",{className:"truncate",children:"Connect agent via MCP…"})]})})})]}),o.jsxs("button",{"aria-expanded":nt,"aria-haspopup":"dialog",className:"flex min-w-0 items-center gap-1.5 rounded px-1.5 py-1 text-[11px] leading-none text-[#84848C] transition-colors hover:bg-white/[0.04] hover:text-[#D1D5DB]",onClick:()=>{nt||Ua(),ft(h=>!h)},ref:yt,type:"button",children:[Ge.kind==="chosen"&&o.jsx(Mi,{id:Ge.id,size:12}),o.jsx("span",{className:"truncate",children:Ge.kind==="chosen"?`${Ge.name}${Ln===null?"":` · ${L1[Ln]}`}`:"Choose an agent"}),Ml&&o.jsx("span",{className:"size-1.5 shrink-0 rounded-full bg-amber-400",title:"This CLI is signed out. Sign in in your terminal.",children:o.jsx("span",{className:"sr-only",children:"signed out"})}),o.jsx("svg",{"aria-hidden":"true",className:`shrink-0 transition-transform duration-150 motion-reduce:transition-none ${nt?"rotate-180":""}`,fill:"none",height:"12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.75",viewBox:"0 0 16 16",width:"12",children:o.jsx("path",{d:"M4 6.5 8 10.5l4-4"})})]})]}),o.jsx("button",{"aria-label":p.active?`Send the change to ${p.displayName(p.active)}`:"Send the change",className:`flex h-6 w-6 shrink-0 items-center justify-center rounded-md transition-[background-color,color,transform] duration-150 active:scale-[0.96] motion-reduce:transition-none ${(Be.trim()!==""||Lt.length>0)&&p.active&&!xe?"bg-[#E8E8EA] text-[#1C1C20] hover:bg-white":"pointer-events-none text-[#84848C]/60"}`,disabled:Be.trim()===""&&Lt.length===0||!p.active||xe,type:"submit",children:xe?o.jsx("span",{className:"size-3 animate-spin rounded-full border-[1.5px] border-current border-t-transparent motion-reduce:animate-none"}):o.jsx("svg",{"aria-hidden":"true",fill:"none",height:"13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.75",viewBox:"0 0 16 16",width:"13",children:o.jsx("path",{d:"M8 13V3M3.5 7.5 8 3l4.5 4.5"})})})]})]})}),xe?o.jsx("div",{className:"px-3 pb-2",children:o.jsx("p",{"aria-live":"polite",className:"min-w-0 truncate text-[10px] leading-snug text-[#84848C]",children:"Capturing the design for your agent…"})}):qa===null?null:o.jsx("div",{className:"px-3 pb-2",children:o.jsx("p",{className:"min-w-0 truncate text-[10px] leading-snug text-[#84848C]",title:qa,children:qa})}),p.prefs.showWidget?gn.agent.attached&&je===null?o.jsx("div",{className:"px-3 pb-2",children:o.jsx("p",{className:"min-w-0 truncate text-[10px] leading-snug text-[#84848C]",children:"Your agent is listening"})}):null:o.jsx("div",{className:"px-3 pb-2",children:o.jsxs("button",{className:"min-w-0 max-w-full truncate rounded text-left text-[10px] leading-snug text-[#84848C] transition-colors hover:text-[#D1D5DB]",onClick:()=>W(!0),type:"button",children:["Bring the tools back ",o.jsx("kbd",{className:"font-sans text-[#9CA3AF]",children:"T"})]})})]})]}),o.jsxs("div",{className:`absolute inset-y-0 left-0 z-30 flex w-12 flex-col items-center bg-[#1C1C20] py-3 transition-opacity duration-150 ${p.prefs.collapsed?"opacity-100":"pointer-events-none opacity-0"}`,inert:!p.prefs.collapsed,children:[o.jsx(wu,{size:24}),o.jsx(Nt,{label:o.jsxs(o.Fragment,{children:["Open directions ",o.jsx("kbd",{className:"ml-1 text-[#9CA3AF]",children:"["})]}),side:"right",children:o.jsx("button",{"aria-label":"Open the directions panel",className:"mt-3 flex h-6 w-6 items-center justify-center rounded p-1 text-[#9CA3AF] transition-colors hover:bg-[#2E2E2E] hover:text-white",onClick:()=>p.setPrefs(h=>({...h,collapsed:!1})),type:"button",children:o.jsx(Cn,{d:Mn.sidebar,size:16})})})]}),!p.prefs.collapsed&&o.jsx("div",{"aria-hidden":!0,className:"group/resize absolute inset-y-0 right-0 z-20 flex w-3 cursor-col-resize touch-none justify-end",onPointerDown:p.onHandlePointerDown,children:o.jsx("span",{className:`h-full transition-all duration-150 ${p.resizing?"w-0.5 bg-[#9CA3AF]":"w-px bg-[#232328] group-hover/resize:w-0.5 group-hover/resize:bg-[#9CA3AF]"}`})})]}),o.jsx("span",{"aria-live":"polite",className:"sr-only",role:"status",children:p.copied===null?"":p.copied.kind==="link"?"Link copied":"Reference copied"}),o.jsxs("div",{className:`relative min-w-0 flex-1 ${qt?"flex":"overflow-auto"}`,ref:ju,children:[Sl.map(h=>o.jsxs("div",{className:xl.includes(h)?qt?`relative min-w-0 flex-1 overflow-auto ${h===Ot?"border-l border-[#232328]":""} ${Yt?"flex flex-col items-center justify-center gap-2.5":bl?"flex min-h-full justify-center p-6":""}`:bl?"flex min-h-full justify-center p-6":"absolute inset-0":"hidden",style:qt?{order:xl.indexOf(h)}:void 0,children:[qt&&o.jsx("div",{className:Yt?"pointer-events-none z-10 flex justify-center":"pointer-events-none absolute inset-x-0 top-0 z-10 flex justify-center p-3",children:o.jsxs("span",{className:"rounded-full bg-[#1C1C20]/85 px-2.5 py-1 text-[11px] font-medium text-[#E8E8EA] shadow-lg backdrop-blur",children:[p.displayName(h),Yt&&o.jsxs("span",{className:"ml-1.5 font-normal text-[#8E8E96]",children:[Math.round(Vn),"px · ",Math.round(Kn*100),"%"]})]})}),o.jsxs("div",{className:Yt?"relative shrink-0 overflow-hidden rounded-[10px] shadow-[0_0_0_1px_rgba(255,255,255,0.12)]":bl?`relative h-[calc(100dvh-48px)] shrink-0 overflow-hidden rounded-[10px] shadow-[0_0_0_1px_rgba(255,255,255,0.10)] transition-[width] duration-200 ${ja} motion-reduce:transition-none`:"relative size-full",style:Yt?{height:ia,width:Ai}:bl?{width:p.prefs.viewport??void 0}:void 0,children:[o.jsxs("div",{className:Yt?"relative origin-top-left":"relative size-full",style:Yt?{height:El,transform:`scale(${Kn})`,width:Vn}:void 0,children:[o.jsx("iframe",{className:`size-full border-0 bg-white ${B?"pointer-events-none":""}`,onError:()=>be(j=>({...j,[h]:!0})),onLoad:j=>{const Y=p.urlFor(h),$=j.currentTarget.dataset.previewIdentity;$!==void 0&&(!Y.startsWith("/")||br(j.currentTarget))&&sa(h,$,j.currentTarget)},"data-preview":h,"data-preview-identity":Qn(h),src:p.urlFor(h),title:`Preview: ${p.displayName(h)}`},Qn(h)),_t&&h===p.active?o.jsx(dp,{notes:Lt,onExit:Ui,onForget:ec,onKeep:(j,Y)=>Is(h,j,Y),onRevise:Ps,paneScale:Kn,scaling:Yt,sent:oa,title:h}):null]}),P[h]?o.jsx(kg,{onReload:()=>Js(h),reason:Dt.reachable||!wl.has(h)?`${p.urlFor(h)} didn’t respond.`:"Your dev server stopped. This returns on its own once it is back."}):o.jsx(Ug,{loaded:la(h)}),!Dt.reachable&&la(h)&&wl.has(h)&&o.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-0 flex justify-center p-3",children:o.jsx("span",{className:"rounded-full bg-[#1C1C20]/90 px-2.5 py-1 text-[11px] font-medium text-amber-300/90 shadow-lg",children:"Stale — dev server stopped"})})]})]},h)),o.jsxs("div",{className:`absolute z-50 flex gap-2 ${Me?"flex-col items-start":{"bottom-right":"bottom-4 right-4 flex-col items-end","bottom-left":"bottom-4 left-4 flex-col items-start","top-right":"right-4 top-4 flex-col-reverse items-end","top-left":"left-4 top-4 flex-col-reverse items-start"}[p.prefs.corner]}`,style:Au,children:[o.jsxs("div",{"aria-hidden":!Q,"aria-label":"Leglas tools",className:`w-56 rounded-lg border border-[#232328] bg-[#1E1E22] p-1.5 shadow-2xl transition-[opacity,transform] duration-150 ease-[cubic-bezier(0.165,0.84,0.44,1)] focus:outline-none motion-reduce:transition-none ${Me?"hidden ":""}${Q?"translate-y-0 scale-100 opacity-100":"pointer-events-none translate-y-1 scale-95 opacity-0"}`,inert:!Q,ref:yl,role:"dialog",tabIndex:-1,children:[o.jsx("span",{className:"block px-1 pb-1 pt-0.5 text-[10px] uppercase tracking-[0.08em] text-[#84848C]",children:"Typeface"}),o.jsx("div",{"aria-label":"Interface typeface",className:"flex items-center gap-0.5 rounded-md bg-[#2E2E2E]/40 p-0.5",role:"group",children:rr.map(h=>o.jsx("button",{"aria-pressed":ta.key===h.key,className:`flex-1 rounded px-2 py-1 text-xs transition-colors ${ta.key===h.key?"bg-[#2E2E2E] font-medium text-white":"text-[#9CA3AF] hover:text-[#D1D5DB]"}`,onClick:()=>p.setPrefs(j=>({...j,font:h.key})),style:{fontFamily:h.stack},type:"button",children:h.label},h.key))}),o.jsx("span",{className:"block px-1 pb-1 pt-2 text-[10px] uppercase tracking-[0.08em] text-[#84848C]",children:"Viewport"}),o.jsx("div",{"aria-label":"Viewport width",className:"flex items-center gap-0.5 rounded-md bg-[#2E2E2E]/40 p-0.5",role:"group",children:p.viewports.map(({label:h,width:j})=>o.jsx("button",{className:`flex-1 rounded px-2 py-1 text-xs transition-colors ${p.prefs.viewport===j?"bg-[#2E2E2E] font-medium text-white":"text-[#9CA3AF] hover:text-[#D1D5DB]"}`,onClick:()=>p.setPrefs(Y=>({...Y,viewport:j})),type:"button",children:h},h))}),qt&&o.jsxs("button",{"aria-checked":p.prefs.scaleSplit,className:`${ct} mt-1 ${p.prefs.scaleSplit?"text-white":"text-[#9CA3AF]"}`,onClick:()=>p.setPrefs(h=>({...h,scaleSplit:!h.scaleSplit})),role:"switch",type:"button",children:[o.jsx("span",{children:"Scale each side to fit"}),o.jsx(sr,{on:p.prefs.scaleSplit})]}),o.jsx("span",{className:"block px-1 pb-1 pt-2 text-[10px] uppercase tracking-[0.08em] text-[#84848C]",children:"Dev overlays"}),o.jsxs("button",{"aria-checked":p.prefs.showDevOverlays,className:`${ct} ${p.prefs.showDevOverlays?"text-white":"text-[#9CA3AF]"}`,onClick:()=>{const h=!p.prefs.showDevOverlays;p.setPrefs(j=>({...j,showDevOverlays:h}));for(const j of document.querySelectorAll("iframe"))Dn(j,!h)},role:"switch",type:"button",children:[o.jsx("span",{children:"Show dev tool overlay"}),o.jsx(sr,{on:p.prefs.showDevOverlays})]}),o.jsxs("button",{"aria-checked":p.prefs.showWidget,className:`${ct} ${p.prefs.showWidget?"text-white":"text-[#9CA3AF]"}`,onClick:()=>{const h=!p.prefs.showWidget;p.setPrefs(j=>({...j,showWidget:h})),h||p.notify({kind:"widget",message:"Press T to reopen the tools",tone:"info",ttl:pt.plain+3e3})},role:"switch",type:"button",children:[o.jsx("span",{children:"Show Leglas overlay"}),o.jsx(sr,{on:p.prefs.showWidget})]}),o.jsxs("button",{className:"mt-1 flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-xs text-[#D1D5DB] transition-colors hover:bg-[#2E2E2E]/60 hover:text-white",onClick:()=>p.copyReference(p.active),type:"button",children:[o.jsx(Cn,{d:Mn.copy,size:12}),p.copied?.kind==="reference"&&p.copied.title===p.active?"Copied":"Copy reference"]}),o.jsx(Nt,{label:"Or double-click any direction in the rail",children:o.jsxs("a",{className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-xs text-[#D1D5DB] transition-colors hover:bg-[#2E2E2E]/60 hover:text-white",href:p.urlFor(p.active),rel:"noreferrer",target:"_blank",children:[o.jsx("span",{className:"inline-block size-3 rounded-sm border border-current"}),"Open in new tab"]})}),o.jsxs("button",{className:"flex w-full items-center justify-between gap-2 rounded-md px-2 py-1.5 text-left text-xs text-[#D1D5DB] transition-colors hover:bg-[#2E2E2E]/60 hover:text-white",onClick:()=>{W(!1),E(!0)},type:"button",children:[o.jsx("span",{children:"Keyboard shortcuts"}),o.jsx("kbd",{className:"rounded border border-[#232328] bg-[#2E2E2E]/60 px-1 py-0.5 font-sans text-[10px] text-[#84848C]",children:"?"})]})]}),(p.prefs.showWidget||Q)&&o.jsx(Nt,{label:"Leglas tools",children:o.jsxs("button",{"aria-expanded":Q,"aria-haspopup":"dialog","aria-label":"Leglas tools",className:"relative flex h-11 w-11 items-center justify-center rounded-full border border-white/10 bg-[#1C1C20] shadow-lg transition-[border-color,transform] duration-150 hover:scale-[1.04] hover:border-white/20 active:scale-[0.95] motion-reduce:transform-none motion-reduce:hover:scale-100 motion-reduce:active:scale-100",onClick:()=>{if(Ae.current){Ae.current=!1;return}W(h=>!h)},onPointerDown:Nu,ref:Yn,type:"button",children:[o.jsx(wu,{size:30}),!la(p.active)&&o.jsx("span",{className:"absolute -right-0.5 -top-0.5 size-2 animate-pulse rounded-full bg-amber-400 motion-reduce:animate-none"})]})})]})]}),o.jsx(Lg,{bottom:p.prefs.collapsed?12:ea+8,left:p.prefs.collapsed?60:12,onDismiss:p.dismissToast,toasts:p.toasts,width:(p.prefs.collapsed?320:p.prefs.width)-24}),en!==null&&o.jsx("iframe",{"aria-hidden":!0,className:"pointer-events-none fixed border-0",onLoad:h=>$s(en,h.currentTarget),ref:Li,src:en.url,style:{height:R1.height,left:-2400,top:0,width:R1.width},tabIndex:-1,title:"Off-stage duplicate scan"},Ka??void 0),M?o.jsx(ey,{mac:P1,onClose:V}):null,_?o.jsx(Vp,{connected:gn.agent.attached,fallbackFocusRef:Ge.kind==="none"?Il:yt,onClose:()=>k(!1)}):null,x!==null?o.jsx(ty,{busy:q,count:x.titles.length,error:x.error,fallbackFocusRef:d,name:x.titles.length===1?p.displayName(x.titles[0]??""):null,onCancel:I,onConfirm:()=>{fe()}}):null]})}function dr({children:u,title:s}){return o.jsxs("div",{className:"flex h-dvh flex-col items-center justify-center gap-3 bg-[#1C1C20] px-6 text-center antialiased",style:{fontFamily:"var(--font-satoshi)"},children:[o.jsx(wu,{size:22}),o.jsx("p",{className:"text-sm font-medium text-white",children:s}),o.jsx("div",{className:"max-w-md text-xs leading-relaxed text-[#84848C]",children:u})]})}function ly(){const[u,s]=C.useState({status:"loading"});return C.useEffect(()=>{let f=!1;const r=g=>fetch("/leglas/api/config",{signal:g}).then(v=>{if(!v.ok)throw new Error(`the server answered ${v.status}`);return v.json()}),d=vr(g=>r(g).then(v=>{f||s(M=>M.status==="ready"&&JSON.stringify(M.config)===JSON.stringify(v)?M:{status:"ready",config:v})}).catch(v=>{f||s(M=>M.status==="ready"?M:{status:"failed",message:Zg(v)?"it did not answer in time":v instanceof Error?v.message:String(v)})}),{everyMs:pr,subscribe:g=>yr().on("config",g)});return()=>{f=!0,d()}},[]),u.status==="loading"?o.jsx(dr,{title:"Starting Leglas…",children:null}):u.status==="failed"?o.jsxs(dr,{title:"Couldn’t reach the Leglas server",children:[u.message,". The interface is served by the same process that proxies your app, so this usually means it stopped."]}):u.config.errors.length>0?o.jsxs(dr,{title:"Your config needs fixing",children:[o.jsx("ul",{className:"space-y-1 text-left",children:u.config.errors.map(f=>o.jsx("li",{children:f},f))}),o.jsx("p",{className:"mt-3",children:"Fix it and restart Leglas."})]}):o.jsx(ny,{previews:u.config.previews,project:u.config.project,scanPreviews:u.config.scanPreviews??!0,warnings:u.config.warnings??[]})}const eh=document.getElementById("root");if(!eh)throw new Error("Leglas: #root is missing from the document.");Ym.createRoot(eh).render(o.jsx(C.StrictMode,{children:o.jsx(ly,{})}));
|