@netnodeag/kraftwerk 0.24.0 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,87 @@
1
+ (function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))r(f);new MutationObserver(f=>{for(const h of f)if(h.type==="childList")for(const p of h.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&r(p)}).observe(document,{childList:!0,subtree:!0});function o(f){const h={};return f.integrity&&(h.integrity=f.integrity),f.referrerPolicy&&(h.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?h.credentials="include":f.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function r(f){if(f.ep)return;f.ep=!0;const h=o(f);fetch(f.href,h)}})();var Jr={exports:{}},ui={};var sm;function dv(){if(sm)return ui;sm=1;var u=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function o(r,f,h){var p=null;if(h!==void 0&&(p=""+h),f.key!==void 0&&(p=""+f.key),"key"in f){h={};for(var v in f)v!=="key"&&(h[v]=f[v])}else h=f;return f=h.ref,{$$typeof:u,type:r,key:p,ref:f!==void 0?f:null,props:h}}return ui.Fragment=i,ui.jsx=o,ui.jsxs=o,ui}var im;function hv(){return im||(im=1,Jr.exports=dv()),Jr.exports}var n=hv(),Ir={exports:{}},pe={};var cm;function mv(){if(cm)return pe;cm=1;var u=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),p=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),T=Symbol.iterator;function L(N){return N===null||typeof N!="object"?null:(N=T&&N[T]||N["@@iterator"],typeof N=="function"?N:null)}var Y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},P=Object.assign,Z={};function C(N,B,J){this.props=N,this.context=B,this.refs=Z,this.updater=J||Y}C.prototype.isReactComponent={},C.prototype.setState=function(N,B){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,B,"setState")},C.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function me(){}me.prototype=C.prototype;function he(N,B,J){this.props=N,this.context=B,this.refs=Z,this.updater=J||Y}var ee=he.prototype=new me;ee.constructor=he,P(ee,C.prototype),ee.isPureReactComponent=!0;var W=Array.isArray;function $(){}var Q={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function ae(N,B,J){var E=J.ref;return{$$typeof:u,type:N,key:B,ref:E!==void 0?E:null,props:J}}function ye(N,B){return ae(N.type,B,N.props)}function V(N){return typeof N=="object"&&N!==null&&N.$$typeof===u}function ge(N){var B={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(J){return B[J]})}var Ze=/\/+/g;function Rt(N,B){return typeof N=="object"&&N!==null&&N.key!=null?ge(""+N.key):B.toString(36)}function $e(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then($,$):(N.status="pending",N.then(function(B){N.status==="pending"&&(N.status="fulfilled",N.value=B)},function(B){N.status==="pending"&&(N.status="rejected",N.reason=B)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function M(N,B,J,E,te){var ce=typeof N;(ce==="undefined"||ce==="boolean")&&(N=null);var fe=!1;if(N===null)fe=!0;else switch(ce){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(N.$$typeof){case u:case i:fe=!0;break;case S:return fe=N._init,M(fe(N._payload),B,J,E,te)}}if(fe)return te=te(N),fe=E===""?"."+Rt(N,0):E,W(te)?(J="",fe!=null&&(J=fe.replace(Ze,"$&/")+"/"),M(te,B,J,"",function(La){return La})):te!=null&&(V(te)&&(te=ye(te,J+(te.key==null||N&&N.key===te.key?"":(""+te.key).replace(Ze,"$&/")+"/")+fe)),B.push(te)),1;fe=0;var Je=E===""?".":E+":";if(W(N))for(var Ie=0;Ie<N.length;Ie++)E=N[Ie],ce=Je+Rt(E,Ie),fe+=M(E,B,J,ce,te);else if(Ie=L(N),typeof Ie=="function")for(N=Ie.call(N),Ie=0;!(E=N.next()).done;)E=E.value,ce=Je+Rt(E,Ie++),fe+=M(E,B,J,ce,te);else if(ce==="object"){if(typeof N.then=="function")return M($e(N),B,J,E,te);throw B=String(N),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return fe}function K(N,B,J){if(N==null)return N;var E=[],te=0;return M(N,E,"","",function(ce){return B.call(J,ce,te++)}),E}function ue(N){if(N._status===-1){var B=N._result;B=B(),B.then(function(J){(N._status===0||N._status===-1)&&(N._status=1,N._result=J)},function(J){(N._status===0||N._status===-1)&&(N._status=2,N._result=J)}),N._status===-1&&(N._status=0,N._result=B)}if(N._status===1)return N._result.default;throw N._result}var Te=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},Ae={map:K,forEach:function(N,B,J){K(N,function(){B.apply(this,arguments)},J)},count:function(N){var B=0;return K(N,function(){B++}),B},toArray:function(N){return K(N,function(B){return B})||[]},only:function(N){if(!V(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return pe.Activity=R,pe.Children=Ae,pe.Component=C,pe.Fragment=o,pe.Profiler=f,pe.PureComponent=he,pe.StrictMode=r,pe.Suspense=y,pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Q,pe.__COMPILER_RUNTIME={__proto__:null,c:function(N){return Q.H.useMemoCache(N)}},pe.cache=function(N){return function(){return N.apply(null,arguments)}},pe.cacheSignal=function(){return null},pe.cloneElement=function(N,B,J){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var E=P({},N.props),te=N.key;if(B!=null)for(ce in B.key!==void 0&&(te=""+B.key),B)!F.call(B,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&B.ref===void 0||(E[ce]=B[ce]);var ce=arguments.length-2;if(ce===1)E.children=J;else if(1<ce){for(var fe=Array(ce),Je=0;Je<ce;Je++)fe[Je]=arguments[Je+2];E.children=fe}return ae(N.type,te,E)},pe.createContext=function(N){return N={$$typeof:p,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:h,_context:N},N},pe.createElement=function(N,B,J){var E,te={},ce=null;if(B!=null)for(E in B.key!==void 0&&(ce=""+B.key),B)F.call(B,E)&&E!=="key"&&E!=="__self"&&E!=="__source"&&(te[E]=B[E]);var fe=arguments.length-2;if(fe===1)te.children=J;else if(1<fe){for(var Je=Array(fe),Ie=0;Ie<fe;Ie++)Je[Ie]=arguments[Ie+2];te.children=Je}if(N&&N.defaultProps)for(E in fe=N.defaultProps,fe)te[E]===void 0&&(te[E]=fe[E]);return ae(N,ce,te)},pe.createRef=function(){return{current:null}},pe.forwardRef=function(N){return{$$typeof:v,render:N}},pe.isValidElement=V,pe.lazy=function(N){return{$$typeof:S,_payload:{_status:-1,_result:N},_init:ue}},pe.memo=function(N,B){return{$$typeof:x,type:N,compare:B===void 0?null:B}},pe.startTransition=function(N){var B=Q.T,J={};Q.T=J;try{var E=N(),te=Q.S;te!==null&&te(J,E),typeof E=="object"&&E!==null&&typeof E.then=="function"&&E.then($,Te)}catch(ce){Te(ce)}finally{B!==null&&J.types!==null&&(B.types=J.types),Q.T=B}},pe.unstable_useCacheRefresh=function(){return Q.H.useCacheRefresh()},pe.use=function(N){return Q.H.use(N)},pe.useActionState=function(N,B,J){return Q.H.useActionState(N,B,J)},pe.useCallback=function(N,B){return Q.H.useCallback(N,B)},pe.useContext=function(N){return Q.H.useContext(N)},pe.useDebugValue=function(){},pe.useDeferredValue=function(N,B){return Q.H.useDeferredValue(N,B)},pe.useEffect=function(N,B){return Q.H.useEffect(N,B)},pe.useEffectEvent=function(N){return Q.H.useEffectEvent(N)},pe.useId=function(){return Q.H.useId()},pe.useImperativeHandle=function(N,B,J){return Q.H.useImperativeHandle(N,B,J)},pe.useInsertionEffect=function(N,B){return Q.H.useInsertionEffect(N,B)},pe.useLayoutEffect=function(N,B){return Q.H.useLayoutEffect(N,B)},pe.useMemo=function(N,B){return Q.H.useMemo(N,B)},pe.useOptimistic=function(N,B){return Q.H.useOptimistic(N,B)},pe.useReducer=function(N,B,J){return Q.H.useReducer(N,B,J)},pe.useRef=function(N){return Q.H.useRef(N)},pe.useState=function(N){return Q.H.useState(N)},pe.useSyncExternalStore=function(N,B,J){return Q.H.useSyncExternalStore(N,B,J)},pe.useTransition=function(){return Q.H.useTransition()},pe.version="19.2.8",pe}var um;function po(){return um||(um=1,Ir.exports=mv()),Ir.exports}var O=po(),Wr={exports:{}},ri={},Fr={exports:{}},Pr={};var rm;function pv(){return rm||(rm=1,(function(u){function i(M,K){var ue=M.length;M.push(K);e:for(;0<ue;){var Te=ue-1>>>1,Ae=M[Te];if(0<f(Ae,K))M[Te]=K,M[ue]=Ae,ue=Te;else break e}}function o(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var K=M[0],ue=M.pop();if(ue!==K){M[0]=ue;e:for(var Te=0,Ae=M.length,N=Ae>>>1;Te<N;){var B=2*(Te+1)-1,J=M[B],E=B+1,te=M[E];if(0>f(J,ue))E<Ae&&0>f(te,J)?(M[Te]=te,M[E]=ue,Te=E):(M[Te]=J,M[B]=ue,Te=B);else if(E<Ae&&0>f(te,ue))M[Te]=te,M[E]=ue,Te=E;else break e}}return K}function f(M,K){var ue=M.sortIndex-K.sortIndex;return ue!==0?ue:M.id-K.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;u.unstable_now=function(){return h.now()}}else{var p=Date,v=p.now();u.unstable_now=function(){return p.now()-v}}var y=[],x=[],S=1,R=null,T=3,L=!1,Y=!1,P=!1,Z=!1,C=typeof setTimeout=="function"?setTimeout:null,me=typeof clearTimeout=="function"?clearTimeout:null,he=typeof setImmediate<"u"?setImmediate:null;function ee(M){for(var K=o(x);K!==null;){if(K.callback===null)r(x);else if(K.startTime<=M)r(x),K.sortIndex=K.expirationTime,i(y,K);else break;K=o(x)}}function W(M){if(P=!1,ee(M),!Y)if(o(y)!==null)Y=!0,$||($=!0,ge());else{var K=o(x);K!==null&&$e(W,K.startTime-M)}}var $=!1,Q=-1,F=5,ae=-1;function ye(){return Z?!0:!(u.unstable_now()-ae<F)}function V(){if(Z=!1,$){var M=u.unstable_now();ae=M;var K=!0;try{e:{Y=!1,P&&(P=!1,me(Q),Q=-1),L=!0;var ue=T;try{t:{for(ee(M),R=o(y);R!==null&&!(R.expirationTime>M&&ye());){var Te=R.callback;if(typeof Te=="function"){R.callback=null,T=R.priorityLevel;var Ae=Te(R.expirationTime<=M);if(M=u.unstable_now(),typeof Ae=="function"){R.callback=Ae,ee(M),K=!0;break t}R===o(y)&&r(y),ee(M)}else r(y);R=o(y)}if(R!==null)K=!0;else{var N=o(x);N!==null&&$e(W,N.startTime-M),K=!1}}break e}finally{R=null,T=ue,L=!1}K=void 0}}finally{K?ge():$=!1}}}var ge;if(typeof he=="function")ge=function(){he(V)};else if(typeof MessageChannel<"u"){var Ze=new MessageChannel,Rt=Ze.port2;Ze.port1.onmessage=V,ge=function(){Rt.postMessage(null)}}else ge=function(){C(V,0)};function $e(M,K){Q=C(function(){M(u.unstable_now())},K)}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(M){M.callback=null},u.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<M?Math.floor(1e3/M):5},u.unstable_getCurrentPriorityLevel=function(){return T},u.unstable_next=function(M){switch(T){case 1:case 2:case 3:var K=3;break;default:K=T}var ue=T;T=K;try{return M()}finally{T=ue}},u.unstable_requestPaint=function(){Z=!0},u.unstable_runWithPriority=function(M,K){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var ue=T;T=M;try{return K()}finally{T=ue}},u.unstable_scheduleCallback=function(M,K,ue){var Te=u.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?Te+ue:Te):ue=Te,M){case 1:var Ae=-1;break;case 2:Ae=250;break;case 5:Ae=1073741823;break;case 4:Ae=1e4;break;default:Ae=5e3}return Ae=ue+Ae,M={id:S++,callback:K,priorityLevel:M,startTime:ue,expirationTime:Ae,sortIndex:-1},ue>Te?(M.sortIndex=ue,i(x,M),o(y)===null&&M===o(x)&&(P?(me(Q),Q=-1):P=!0,$e(W,ue-Te))):(M.sortIndex=Ae,i(y,M),Y||L||(Y=!0,$||($=!0,ge()))),M},u.unstable_shouldYield=ye,u.unstable_wrapCallback=function(M){var K=T;return function(){var ue=T;T=K;try{return M.apply(this,arguments)}finally{T=ue}}}})(Pr)),Pr}var om;function gv(){return om||(om=1,Fr.exports=pv()),Fr.exports}var eo={exports:{}},Et={};var fm;function vv(){if(fm)return Et;fm=1;var u=po();function i(y){var x="https://react.dev/errors/"+y;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)x+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+y+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var r={d:{f:o,r:function(){throw Error(i(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},f=Symbol.for("react.portal");function h(y,x,S){var R=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:R==null?null:""+R,children:y,containerInfo:x,implementation:S}}var p=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(y,x){if(y==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return Et.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Et.createPortal=function(y,x){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(i(299));return h(y,x,null,S)},Et.flushSync=function(y){var x=p.T,S=r.p;try{if(p.T=null,r.p=2,y)return y()}finally{p.T=x,r.p=S,r.d.f()}},Et.preconnect=function(y,x){typeof y=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,r.d.C(y,x))},Et.prefetchDNS=function(y){typeof y=="string"&&r.d.D(y)},Et.preinit=function(y,x){if(typeof y=="string"&&x&&typeof x.as=="string"){var S=x.as,R=v(S,x.crossOrigin),T=typeof x.integrity=="string"?x.integrity:void 0,L=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;S==="style"?r.d.S(y,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:R,integrity:T,fetchPriority:L}):S==="script"&&r.d.X(y,{crossOrigin:R,integrity:T,fetchPriority:L,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},Et.preinitModule=function(y,x){if(typeof y=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var S=v(x.as,x.crossOrigin);r.d.M(y,{crossOrigin:S,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&r.d.M(y)},Et.preload=function(y,x){if(typeof y=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var S=x.as,R=v(S,x.crossOrigin);r.d.L(y,S,{crossOrigin:R,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})}},Et.preloadModule=function(y,x){if(typeof y=="string")if(x){var S=v(x.as,x.crossOrigin);r.d.m(y,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:S,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else r.d.m(y)},Et.requestFormReset=function(y){r.d.r(y)},Et.unstable_batchedUpdates=function(y,x){return y(x)},Et.useFormState=function(y,x,S){return p.H.useFormState(y,x,S)},Et.useFormStatus=function(){return p.H.useHostTransitionStatus()},Et.version="19.2.8",Et}var dm;function xv(){if(dm)return eo.exports;dm=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(i){console.error(i)}}return u(),eo.exports=vv(),eo.exports}var hm;function yv(){if(hm)return ri;hm=1;var u=gv(),i=po(),o=xv();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function p(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 v(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 y(e){if(h(e)!==e)throw Error(r(188))}function x(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(r(188));return t!==e?null:e}for(var l=e,a=t;;){var s=l.return;if(s===null)break;var c=s.alternate;if(c===null){if(a=s.return,a!==null){l=a;continue}break}if(s.child===c.child){for(c=s.child;c;){if(c===l)return y(s),e;if(c===a)return y(s),t;c=c.sibling}throw Error(r(188))}if(l.return!==a.return)l=s,a=c;else{for(var d=!1,m=s.child;m;){if(m===l){d=!0,l=s,a=c;break}if(m===a){d=!0,a=s,l=c;break}m=m.sibling}if(!d){for(m=c.child;m;){if(m===l){d=!0,l=c,a=s;break}if(m===a){d=!0,a=c,l=s;break}m=m.sibling}if(!d)throw Error(r(189))}}if(l.alternate!==a)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var R=Object.assign,T=Symbol.for("react.element"),L=Symbol.for("react.transitional.element"),Y=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),Z=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),me=Symbol.for("react.consumer"),he=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),ye=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function ge(e){return e===null||typeof e!="object"?null:(e=V&&e[V]||e["@@iterator"],typeof e=="function"?e:null)}var Ze=Symbol.for("react.client.reference");function Rt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ze?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case P:return"Fragment";case C:return"Profiler";case Z:return"StrictMode";case W:return"Suspense";case $:return"SuspenseList";case ae:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Y:return"Portal";case he:return e.displayName||"Context";case me:return(e._context.displayName||"Context")+".Consumer";case ee:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Q:return t=e.displayName||null,t!==null?t:Rt(e.type)||"Memo";case F:t=e._payload,e=e._init;try{return Rt(e(t))}catch{}}return null}var $e=Array.isArray,M=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},Te=[],Ae=-1;function N(e){return{current:e}}function B(e){0>Ae||(e.current=Te[Ae],Te[Ae]=null,Ae--)}function J(e,t){Ae++,Te[Ae]=e.current,e.current=t}var E=N(null),te=N(null),ce=N(null),fe=N(null);function Je(e,t){switch(J(ce,t),J(te,e),J(E,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ah(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ah(t),e=_h(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(E),J(E,e)}function Ie(){B(E),B(te),B(ce)}function La(e){e.memoizedState!==null&&J(fe,e);var t=E.current,l=_h(t,e.type);t!==l&&(J(te,e),J(E,l))}function Ha(e){te.current===e&&(B(E),B(te)),fe.current===e&&(B(fe),ni._currentValue=ue)}var is,cs;function _e(e){if(is===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);is=t&&t[1]||"",cs=-1<l.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+is+e+cs}var Ba=!1;function Be(e,t){if(!e||Ba)return"";Ba=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var q=function(){throw Error()};if(Object.defineProperty(q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(q,[])}catch(D){var z=D}Reflect.construct(e,[],q)}else{try{q.call()}catch(D){z=D}e.call(q.prototype)}}else{try{throw Error()}catch(D){z=D}(q=e())&&typeof q.catch=="function"&&q.catch(function(){})}}catch(D){if(D&&z&&typeof D.stack=="string")return[D.stack,z.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=a.DetermineComponentFrameRoot(),d=c[0],m=c[1];if(d&&m){var b=d.split(`
4
+ `),_=m.split(`
5
+ `);for(s=a=0;a<b.length&&!b[a].includes("DetermineComponentFrameRoot");)a++;for(;s<_.length&&!_[s].includes("DetermineComponentFrameRoot");)s++;if(a===b.length||s===_.length)for(a=b.length-1,s=_.length-1;1<=a&&0<=s&&b[a]!==_[s];)s--;for(;1<=a&&0<=s;a--,s--)if(b[a]!==_[s]){if(a!==1||s!==1)do if(a--,s--,0>s||b[a]!==_[s]){var U=`
6
+ `+b[a].replace(" at new "," at ");return e.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",e.displayName)),U}while(1<=a&&0<=s);break}}}finally{Ba=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?_e(l):""}function us(e,t){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e("Lazy");case 13:return e.child!==t&&t!==null?_e("Suspense Fallback"):_e("Suspense");case 19:return _e("SuspenseList");case 0:case 15:return Be(e.type,!1);case 11:return Be(e.type.render,!1);case 1:return Be(e.type,!0);case 31:return _e("Activity");default:return""}}function qt(e){try{var t="",l=null;do t+=us(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
7
+ Error generating stack: `+a.message+`
8
+ `+a.stack}}var Dl=Object.prototype.hasOwnProperty,gn=u.unstable_scheduleCallback,Ft=u.unstable_cancelCallback,bi=u.unstable_shouldYield,rs=u.unstable_requestPaint,kt=u.unstable_now,ji=u.unstable_getCurrentPriorityLevel,hl=u.unstable_ImmediatePriority,wl=u.unstable_UserBlockingPriority,Pt=u.unstable_NormalPriority,os=u.unstable_LowPriority,qa=u.unstable_IdlePriority,vn=u.log,fs=u.unstable_setDisableYieldValue,el=null,pt=null;function Gt(e){if(typeof vn=="function"&&fs(e),pt&&typeof pt.setStrictMode=="function")try{pt.setStrictMode(el,e)}catch{}}var Tt=Math.clz32?Math.clz32:ds,Ni=Math.log,Si=Math.LN2;function ds(e){return e>>>=0,e===0?32:31-(Ni(e)/Si|0)|0}var aa=256,ml=262144,pl=4194304;function kl(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 Ga(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var s=0,c=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var m=a&134217727;return m!==0?(a=m&~c,a!==0?s=kl(a):(d&=m,d!==0?s=kl(d):l||(l=m&~e,l!==0&&(s=kl(l))))):(m=a&~c,m!==0?s=kl(m):d!==0?s=kl(d):l||(l=a&~e,l!==0&&(s=kl(l)))),s===0?0:t!==0&&t!==s&&(t&c)===0&&(c=s&-s,l=t&-t,c>=l||c===32&&(l&4194048)!==0)?t:s}function na(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function wi(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 hs(){var e=pl;return pl<<=1,(pl&62914560)===0&&(pl=4194304),e}function sa(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Tl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function tl(e,t,l,a,s,c){var d=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var m=e.entanglements,b=e.expirationTimes,_=e.hiddenUpdates;for(l=d&~l;0<l;){var U=31-Tt(l),q=1<<U;m[U]=0,b[U]=-1;var z=_[U];if(z!==null)for(_[U]=null,U=0;U<z.length;U++){var D=z[U];D!==null&&(D.lane&=-536870913)}l&=~q}a!==0&&Ml(e,a,0),c!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=c&~(d&~t))}function Ml(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Tt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function xn(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-Tt(l),s=1<<a;s&t|e[a]&t&&(e[a]|=t),l&=~s}}function yn(e,t){var l=t&-t;return l=(l&42)!==0?1:ms(l),(l&(e.suspendedLanes|t))!==0?0:l}function ms(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 bn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function jn(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:Fh(e.type))}function ps(e,t){var l=K.p;try{return K.p=e,t()}finally{K.p=l}}var ll=Math.random().toString(36).slice(2),ft="__reactFiber$"+ll,at="__reactProps$"+ll,ia="__reactContainer$"+ll,gs="__reactEvents$"+ll,Fe="__reactListeners$"+ll,ca="__reactHandles$"+ll,ki="__reactResources$"+ll,ua="__reactMarker$"+ll;function Ya(e){delete e[ft],delete e[at],delete e[gs],delete e[Fe],delete e[ca]}function Ul(e){var t=e[ft];if(t)return t;for(var l=e.parentNode;l;){if(t=l[ia]||l[ft]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Uh(e);e!==null;){if(l=e[ft])return l;e=Uh(e)}return t}e=l,l=e.parentNode}return null}function Ll(e){if(e=e[ft]||e[ia]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function $a(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function ra(e){var t=e[ki];return t||(t=e[ki]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function nt(e){e[ua]=!0}var Ti=new Set,gl={};function El(e,t){vl(e,t),vl(e+"Capture",t)}function vl(e,t){for(gl[e]=t,e=0;e<t.length;e++)Ti.add(t[e])}var Hl=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]*$"),Ei={},Xa={};function Ai(e){return Dl.call(Xa,e)?!0:Dl.call(Ei,e)?!1:Hl.test(e)?Xa[e]=!0:(Ei[e]=!0,!1)}function Nn(e,t,l){if(Ai(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function Qa(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function al(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function xt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Sn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function wn(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var s=a.get,c=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(d){l=""+d,c.call(this,d)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(d){l=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Al(e){if(!e._valueTracker){var t=Sn(e)?"checked":"value";e._valueTracker=wn(e,t,""+e[t])}}function oa(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Sn(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function zt(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 Kc=/[\n"\\]/g;function yt(e){return e.replace(Kc,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function vs(e,t,l,a,s,c,d,m){e.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.type=d:e.removeAttribute("type"),t!=null?d==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+xt(t)):e.value!==""+xt(t)&&(e.value=""+xt(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?kn(e,d,xt(t)):l!=null?kn(e,d,xt(l)):a!=null&&e.removeAttribute("value"),s==null&&c!=null&&(e.defaultChecked=!!c),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+xt(m):e.removeAttribute("name")}function xs(e,t,l,a,s,c,d,m){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||l!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Al(e);return}l=l!=null?""+xt(l):"",t=t!=null?""+xt(t):l,m||t===e.value||(e.value=t),e.defaultValue=t}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=m?e.checked:!!a,e.defaultChecked=!!a,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),Al(e)}function kn(e,t,l){t==="number"&&zt(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Bl(e,t,l,a){if(e=e.options,t){t={};for(var s=0;s<l.length;s++)t["$"+l[s]]=!0;for(l=0;l<e.length;l++)s=t.hasOwnProperty("$"+e[l].value),e[l].selected!==s&&(e[l].selected=s),s&&a&&(e[l].defaultSelected=!0)}else{for(l=""+xt(l),t=null,s=0;s<e.length;s++){if(e[s].value===l){e[s].selected=!0,a&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function ys(e,t,l){if(t!=null&&(t=""+xt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+xt(l):""}function _i(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if($e(a)){if(1<a.length)throw Error(r(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=xt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),Al(e)}function ql(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Jc=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 Ri(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||Jc.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function bs(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var s in t)a=t[s],t.hasOwnProperty(s)&&l[s]!==a&&Ri(e,s,a)}else for(var c in t)t.hasOwnProperty(c)&&Ri(e,c,t[c])}function fa(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 js=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"]]),X=/^[\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 g(e){return X.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function w(){}var G=null;function I(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ne=null,oe=null;function Me(e){var t=Ll(e);if(t&&(e=t.stateNode)){var l=e[at]||null;e:switch(e=t.stateNode,t.type){case"input":if(vs(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+yt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var s=a[at]||null;if(!s)throw Error(r(90));vs(a,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&oa(a)}break e;case"textarea":ys(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Bl(e,!!l.multiple,t,!1)}}}var Xe=!1;function bt(e,t,l){if(Xe)return e(t,l);Xe=!0;try{var a=e(t);return a}finally{if(Xe=!1,(ne!==null||oe!==null)&&(vc(),ne&&(t=ne,e=oe,oe=ne=null,Me(t),e)))for(t=0;t<e.length;t++)Me(e[t])}}function st(e,t){var l=e.stateNode;if(l===null)return null;var a=l[at]||null;if(a===null)return null;l=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,t,typeof l));return l}var Yt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),dt=!1;if(Yt)try{var Ns={};Object.defineProperty(Ns,"passive",{get:function(){dt=!0}}),window.addEventListener("test",Ns,Ns),window.removeEventListener("test",Ns,Ns)}catch{dt=!1}var da=null,Ic=null,zi=null;function Ao(){if(zi)return zi;var e,t=Ic,l=t.length,a,s="value"in da?da.value:da.textContent,c=s.length;for(e=0;e<l&&t[e]===s[e];e++);var d=l-e;for(a=1;a<=d&&t[l-a]===s[c-a];a++);return zi=s.slice(e,1<a?1-a:void 0)}function Ci(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 Oi(){return!0}function _o(){return!1}function Ot(e){function t(l,a,s,c,d){this._reactName=l,this._targetInst=s,this.type=a,this.nativeEvent=c,this.target=d,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(l=e[m],this[m]=l?l(c):c[m]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Oi:_o,this.isPropagationStopped=_o,this}return R(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Oi)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Oi)},persist:function(){},isPersistent:Oi}),t}var Za={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Di=Ot(Za),Ss=R({},Za,{view:0,detail:0}),op=Ot(Ss),Wc,Fc,ws,Mi=R({},Ss,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:eu,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!==ws&&(ws&&e.type==="mousemove"?(Wc=e.screenX-ws.screenX,Fc=e.screenY-ws.screenY):Fc=Wc=0,ws=e),Wc)},movementY:function(e){return"movementY"in e?e.movementY:Fc}}),Ro=Ot(Mi),fp=R({},Mi,{dataTransfer:0}),dp=Ot(fp),hp=R({},Ss,{relatedTarget:0}),Pc=Ot(hp),mp=R({},Za,{animationName:0,elapsedTime:0,pseudoElement:0}),pp=Ot(mp),gp=R({},Za,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vp=Ot(gp),xp=R({},Za,{data:0}),zo=Ot(xp),yp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bp={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"},jp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Np(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=jp[e])?!!t[e]:!1}function eu(){return Np}var Sp=R({},Ss,{key:function(e){if(e.key){var t=yp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ci(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?bp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:eu,charCode:function(e){return e.type==="keypress"?Ci(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ci(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),wp=Ot(Sp),kp=R({},Mi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Co=Ot(kp),Tp=R({},Ss,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:eu}),Ep=Ot(Tp),Ap=R({},Za,{propertyName:0,elapsedTime:0,pseudoElement:0}),_p=Ot(Ap),Rp=R({},Mi,{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}),zp=Ot(Rp),Cp=R({},Za,{newState:0,oldState:0}),Op=Ot(Cp),Dp=[9,13,27,32],tu=Yt&&"CompositionEvent"in window,ks=null;Yt&&"documentMode"in document&&(ks=document.documentMode);var Mp=Yt&&"TextEvent"in window&&!ks,Oo=Yt&&(!tu||ks&&8<ks&&11>=ks),Do=" ",Mo=!1;function Uo(e,t){switch(e){case"keyup":return Dp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Tn=!1;function Up(e,t){switch(e){case"compositionend":return Lo(t);case"keypress":return t.which!==32?null:(Mo=!0,Do);case"textInput":return e=t.data,e===Do&&Mo?null:e;default:return null}}function Lp(e,t){if(Tn)return e==="compositionend"||!tu&&Uo(e,t)?(e=Ao(),zi=Ic=da=null,Tn=!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 Oo&&t.locale!=="ko"?null:t.data;default:return null}}var Hp={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 Ho(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Hp[e.type]:t==="textarea"}function Bo(e,t,l,a){ne?oe?oe.push(a):oe=[a]:ne=a,t=wc(t,"onChange"),0<t.length&&(l=new Di("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Ts=null,Es=null;function Bp(e){Nh(e,0)}function Ui(e){var t=$a(e);if(oa(t))return e}function qo(e,t){if(e==="change")return t}var Go=!1;if(Yt){var lu;if(Yt){var au="oninput"in document;if(!au){var Yo=document.createElement("div");Yo.setAttribute("oninput","return;"),au=typeof Yo.oninput=="function"}lu=au}else lu=!1;Go=lu&&(!document.documentMode||9<document.documentMode)}function $o(){Ts&&(Ts.detachEvent("onpropertychange",Xo),Es=Ts=null)}function Xo(e){if(e.propertyName==="value"&&Ui(Es)){var t=[];Bo(t,Es,e,I(e)),bt(Bp,t)}}function qp(e,t,l){e==="focusin"?($o(),Ts=t,Es=l,Ts.attachEvent("onpropertychange",Xo)):e==="focusout"&&$o()}function Gp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ui(Es)}function Yp(e,t){if(e==="click")return Ui(t)}function $p(e,t){if(e==="input"||e==="change")return Ui(t)}function Xp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $t=typeof Object.is=="function"?Object.is:Xp;function As(e,t){if($t(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var s=l[a];if(!Dl.call(t,s)||!$t(e[s],t[s]))return!1}return!0}function Qo(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Zo(e,t){var l=Qo(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Qo(l)}}function Vo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Vo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ko(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zt(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=zt(e.document)}return t}function nu(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 Qp=Yt&&"documentMode"in document&&11>=document.documentMode,En=null,su=null,_s=null,iu=!1;function Jo(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;iu||En==null||En!==zt(a)||(a=En,"selectionStart"in a&&nu(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),_s&&As(_s,a)||(_s=a,a=wc(su,"onSelect"),0<a.length&&(t=new Di("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=En)))}function Va(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var An={animationend:Va("Animation","AnimationEnd"),animationiteration:Va("Animation","AnimationIteration"),animationstart:Va("Animation","AnimationStart"),transitionrun:Va("Transition","TransitionRun"),transitionstart:Va("Transition","TransitionStart"),transitioncancel:Va("Transition","TransitionCancel"),transitionend:Va("Transition","TransitionEnd")},cu={},Io={};Yt&&(Io=document.createElement("div").style,"AnimationEvent"in window||(delete An.animationend.animation,delete An.animationiteration.animation,delete An.animationstart.animation),"TransitionEvent"in window||delete An.transitionend.transition);function Ka(e){if(cu[e])return cu[e];if(!An[e])return e;var t=An[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Io)return cu[e]=t[l];return e}var Wo=Ka("animationend"),Fo=Ka("animationiteration"),Po=Ka("animationstart"),Zp=Ka("transitionrun"),Vp=Ka("transitionstart"),Kp=Ka("transitioncancel"),ef=Ka("transitionend"),tf=new Map,uu="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(" ");uu.push("scrollEnd");function xl(e,t){tf.set(e,t),El(t,[e])}var Li=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)},nl=[],_n=0,ru=0;function Hi(){for(var e=_n,t=ru=_n=0;t<e;){var l=nl[t];nl[t++]=null;var a=nl[t];nl[t++]=null;var s=nl[t];nl[t++]=null;var c=nl[t];if(nl[t++]=null,a!==null&&s!==null){var d=a.pending;d===null?s.next=s:(s.next=d.next,d.next=s),a.pending=s}c!==0&&lf(l,s,c)}}function Bi(e,t,l,a){nl[_n++]=e,nl[_n++]=t,nl[_n++]=l,nl[_n++]=a,ru|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function ou(e,t,l,a){return Bi(e,t,l,a),qi(e)}function Ja(e,t){return Bi(e,null,null,t),qi(e)}function lf(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var s=!1,c=e.return;c!==null;)c.childLanes|=l,a=c.alternate,a!==null&&(a.childLanes|=l),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(s=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,s&&t!==null&&(s=31-Tt(l),e=c.hiddenUpdates,a=e[s],a===null?e[s]=[t]:a.push(t),t.lane=l|536870912),c):null}function qi(e){if(50<Ws)throw Ws=0,yr=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Rn={};function Jp(e,t,l,a){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xt(e,t,l,a){return new Jp(e,t,l,a)}function fu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Gl(e,t){var l=e.alternate;return l===null?(l=Xt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function af(e,t){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Gi(e,t,l,a,s,c){var d=0;if(a=e,typeof e=="function")fu(e)&&(d=1);else if(typeof e=="string")d=ev(e,l,E.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ae:return e=Xt(31,l,t,s),e.elementType=ae,e.lanes=c,e;case P:return Ia(l.children,s,c,t);case Z:d=8,s|=24;break;case C:return e=Xt(12,l,t,s|2),e.elementType=C,e.lanes=c,e;case W:return e=Xt(13,l,t,s),e.elementType=W,e.lanes=c,e;case $:return e=Xt(19,l,t,s),e.elementType=$,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case he:d=10;break e;case me:d=9;break e;case ee:d=11;break e;case Q:d=14;break e;case F:d=16,a=null;break e}d=29,l=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=Xt(d,l,t,s),t.elementType=e,t.type=a,t.lanes=c,t}function Ia(e,t,l,a){return e=Xt(7,e,a,t),e.lanes=l,e}function du(e,t,l){return e=Xt(6,e,null,t),e.lanes=l,e}function nf(e){var t=Xt(18,null,null,0);return t.stateNode=e,t}function hu(e,t,l){return t=Xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var sf=new WeakMap;function sl(e,t){if(typeof e=="object"&&e!==null){var l=sf.get(e);return l!==void 0?l:(t={value:e,source:t,stack:qt(t)},sf.set(e,t),t)}return{value:e,source:t,stack:qt(t)}}var zn=[],Cn=0,Yi=null,Rs=0,il=[],cl=0,ha=null,_l=1,Rl="";function Yl(e,t){zn[Cn++]=Rs,zn[Cn++]=Yi,Yi=e,Rs=t}function cf(e,t,l){il[cl++]=_l,il[cl++]=Rl,il[cl++]=ha,ha=e;var a=_l;e=Rl;var s=32-Tt(a)-1;a&=~(1<<s),l+=1;var c=32-Tt(t)+s;if(30<c){var d=s-s%5;c=(a&(1<<d)-1).toString(32),a>>=d,s-=d,_l=1<<32-Tt(t)+s|l<<s|a,Rl=c+e}else _l=1<<c|l<<s|a,Rl=e}function mu(e){e.return!==null&&(Yl(e,1),cf(e,1,0))}function pu(e){for(;e===Yi;)Yi=zn[--Cn],zn[Cn]=null,Rs=zn[--Cn],zn[Cn]=null;for(;e===ha;)ha=il[--cl],il[cl]=null,Rl=il[--cl],il[cl]=null,_l=il[--cl],il[cl]=null}function uf(e,t){il[cl++]=_l,il[cl++]=Rl,il[cl++]=ha,_l=t.id,Rl=t.overflow,ha=e}var jt=null,Ve=null,ke=!1,ma=null,ul=!1,gu=Error(r(519));function pa(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zs(sl(t,e)),gu}function rf(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[ft]=e,t[at]=a,l){case"dialog":je("cancel",t),je("close",t);break;case"iframe":case"object":case"embed":je("load",t);break;case"video":case"audio":for(l=0;l<Ps.length;l++)je(Ps[l],t);break;case"source":je("error",t);break;case"img":case"image":case"link":je("error",t),je("load",t);break;case"details":je("toggle",t);break;case"input":je("invalid",t),xs(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":je("invalid",t);break;case"textarea":je("invalid",t),_i(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||Th(t.textContent,l)?(a.popover!=null&&(je("beforetoggle",t),je("toggle",t)),a.onScroll!=null&&je("scroll",t),a.onScrollEnd!=null&&je("scrollend",t),a.onClick!=null&&(t.onclick=w),t=!0):t=!1,t||pa(e,!0)}function of(e){for(jt=e.return;jt;)switch(jt.tag){case 5:case 31:case 13:ul=!1;return;case 27:case 3:ul=!0;return;default:jt=jt.return}}function On(e){if(e!==jt)return!1;if(!ke)return of(e),ke=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Dr(e.type,e.memoizedProps)),l=!l),l&&Ve&&pa(e),of(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ve=Mh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ve=Mh(e)}else t===27?(t=Ve,_a(e.type)?(e=Br,Br=null,Ve=e):Ve=t):Ve=jt?ol(e.stateNode.nextSibling):null;return!0}function Wa(){Ve=jt=null,ke=!1}function vu(){var e=ma;return e!==null&&(Lt===null?Lt=e:Lt.push.apply(Lt,e),ma=null),e}function zs(e){ma===null?ma=[e]:ma.push(e)}var xu=N(null),Fa=null,$l=null;function ga(e,t,l){J(xu,t._currentValue),t._currentValue=l}function Xl(e){e._currentValue=xu.current,B(xu)}function yu(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function bu(e,t,l,a){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var c=s.dependencies;if(c!==null){var d=s.child;c=c.firstContext;e:for(;c!==null;){var m=c;c=s;for(var b=0;b<t.length;b++)if(m.context===t[b]){c.lanes|=l,m=c.alternate,m!==null&&(m.lanes|=l),yu(c.return,l,e),a||(d=null);break e}c=m.next}}else if(s.tag===18){if(d=s.return,d===null)throw Error(r(341));d.lanes|=l,c=d.alternate,c!==null&&(c.lanes|=l),yu(d,l,e),d=null}else d=s.child;if(d!==null)d.return=s;else for(d=s;d!==null;){if(d===e){d=null;break}if(s=d.sibling,s!==null){s.return=d.return,d=s;break}d=d.return}s=d}}function Dn(e,t,l,a){e=null;for(var s=t,c=!1;s!==null;){if(!c){if((s.flags&524288)!==0)c=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var d=s.alternate;if(d===null)throw Error(r(387));if(d=d.memoizedProps,d!==null){var m=s.type;$t(s.pendingProps.value,d.value)||(e!==null?e.push(m):e=[m])}}else if(s===fe.current){if(d=s.alternate,d===null)throw Error(r(387));d.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(ni):e=[ni])}s=s.return}e!==null&&bu(t,e,l,a),t.flags|=262144}function $i(e){for(e=e.firstContext;e!==null;){if(!$t(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Pa(e){Fa=e,$l=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Nt(e){return ff(Fa,e)}function Xi(e,t){return Fa===null&&Pa(e),ff(e,t)}function ff(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},$l===null){if(e===null)throw Error(r(308));$l=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else $l=$l.next=t;return l}var Ip=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},Wp=u.unstable_scheduleCallback,Fp=u.unstable_NormalPriority,it={$$typeof:he,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ju(){return{controller:new Ip,data:new Map,refCount:0}}function Cs(e){e.refCount--,e.refCount===0&&Wp(Fp,function(){e.controller.abort()})}var Os=null,Nu=0,Mn=0,Un=null;function Pp(e,t){if(Os===null){var l=Os=[];Nu=0,Mn=kr(),Un={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Nu++,t.then(df,df),t}function df(){if(--Nu===0&&Os!==null){Un!==null&&(Un.status="fulfilled");var e=Os;Os=null,Mn=0,Un=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function eg(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(s){l.push(s)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var s=0;s<l.length;s++)(0,l[s])(t)},function(s){for(a.status="rejected",a.reason=s,s=0;s<l.length;s++)(0,l[s])(void 0)}),a}var hf=M.S;M.S=function(e,t){Id=kt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Pp(e,t),hf!==null&&hf(e,t)};var en=N(null);function Su(){var e=en.current;return e!==null?e:Qe.pooledCache}function Qi(e,t){t===null?J(en,en.current):J(en,t.pool)}function mf(){var e=Su();return e===null?null:{parent:it._currentValue,pool:e}}var Ln=Error(r(460)),wu=Error(r(474)),Zi=Error(r(542)),Vi={then:function(){}};function pf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function gf(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(w,w),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,xf(e),e;default:if(typeof t.status=="string")t.then(w,w);else{if(e=Qe,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=a}},function(a){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,xf(e),e}throw ln=t,Ln}}function tn(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ln=l,Ln):l}}var ln=null;function vf(){if(ln===null)throw Error(r(459));var e=ln;return ln=null,e}function xf(e){if(e===Ln||e===Zi)throw Error(r(483))}var Hn=null,Ds=0;function Ki(e){var t=Ds;return Ds+=1,Hn===null&&(Hn=[]),gf(Hn,e,t)}function Ms(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ji(e,t){throw t.$$typeof===T?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function yf(e){function t(k,j){if(e){var A=k.deletions;A===null?(k.deletions=[j],k.flags|=16):A.push(j)}}function l(k,j){if(!e)return null;for(;j!==null;)t(k,j),j=j.sibling;return null}function a(k){for(var j=new Map;k!==null;)k.key!==null?j.set(k.key,k):j.set(k.index,k),k=k.sibling;return j}function s(k,j){return k=Gl(k,j),k.index=0,k.sibling=null,k}function c(k,j,A){return k.index=A,e?(A=k.alternate,A!==null?(A=A.index,A<j?(k.flags|=67108866,j):A):(k.flags|=67108866,j)):(k.flags|=1048576,j)}function d(k){return e&&k.alternate===null&&(k.flags|=67108866),k}function m(k,j,A,H){return j===null||j.tag!==6?(j=du(A,k.mode,H),j.return=k,j):(j=s(j,A),j.return=k,j)}function b(k,j,A,H){var re=A.type;return re===P?U(k,j,A.props.children,H,A.key):j!==null&&(j.elementType===re||typeof re=="object"&&re!==null&&re.$$typeof===F&&tn(re)===j.type)?(j=s(j,A.props),Ms(j,A),j.return=k,j):(j=Gi(A.type,A.key,A.props,null,k.mode,H),Ms(j,A),j.return=k,j)}function _(k,j,A,H){return j===null||j.tag!==4||j.stateNode.containerInfo!==A.containerInfo||j.stateNode.implementation!==A.implementation?(j=hu(A,k.mode,H),j.return=k,j):(j=s(j,A.children||[]),j.return=k,j)}function U(k,j,A,H,re){return j===null||j.tag!==7?(j=Ia(A,k.mode,H,re),j.return=k,j):(j=s(j,A),j.return=k,j)}function q(k,j,A){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=du(""+j,k.mode,A),j.return=k,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case L:return A=Gi(j.type,j.key,j.props,null,k.mode,A),Ms(A,j),A.return=k,A;case Y:return j=hu(j,k.mode,A),j.return=k,j;case F:return j=tn(j),q(k,j,A)}if($e(j)||ge(j))return j=Ia(j,k.mode,A,null),j.return=k,j;if(typeof j.then=="function")return q(k,Ki(j),A);if(j.$$typeof===he)return q(k,Xi(k,j),A);Ji(k,j)}return null}function z(k,j,A,H){var re=j!==null?j.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return re!==null?null:m(k,j,""+A,H);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case L:return A.key===re?b(k,j,A,H):null;case Y:return A.key===re?_(k,j,A,H):null;case F:return A=tn(A),z(k,j,A,H)}if($e(A)||ge(A))return re!==null?null:U(k,j,A,H,null);if(typeof A.then=="function")return z(k,j,Ki(A),H);if(A.$$typeof===he)return z(k,j,Xi(k,A),H);Ji(k,A)}return null}function D(k,j,A,H,re){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return k=k.get(A)||null,m(j,k,""+H,re);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case L:return k=k.get(H.key===null?A:H.key)||null,b(j,k,H,re);case Y:return k=k.get(H.key===null?A:H.key)||null,_(j,k,H,re);case F:return H=tn(H),D(k,j,A,H,re)}if($e(H)||ge(H))return k=k.get(A)||null,U(j,k,H,re,null);if(typeof H.then=="function")return D(k,j,A,Ki(H),re);if(H.$$typeof===he)return D(k,j,A,Xi(j,H),re);Ji(j,H)}return null}function se(k,j,A,H){for(var re=null,Re=null,ie=j,xe=j=0,we=null;ie!==null&&xe<A.length;xe++){ie.index>xe?(we=ie,ie=null):we=ie.sibling;var ze=z(k,ie,A[xe],H);if(ze===null){ie===null&&(ie=we);break}e&&ie&&ze.alternate===null&&t(k,ie),j=c(ze,j,xe),Re===null?re=ze:Re.sibling=ze,Re=ze,ie=we}if(xe===A.length)return l(k,ie),ke&&Yl(k,xe),re;if(ie===null){for(;xe<A.length;xe++)ie=q(k,A[xe],H),ie!==null&&(j=c(ie,j,xe),Re===null?re=ie:Re.sibling=ie,Re=ie);return ke&&Yl(k,xe),re}for(ie=a(ie);xe<A.length;xe++)we=D(ie,k,xe,A[xe],H),we!==null&&(e&&we.alternate!==null&&ie.delete(we.key===null?xe:we.key),j=c(we,j,xe),Re===null?re=we:Re.sibling=we,Re=we);return e&&ie.forEach(function(Da){return t(k,Da)}),ke&&Yl(k,xe),re}function de(k,j,A,H){if(A==null)throw Error(r(151));for(var re=null,Re=null,ie=j,xe=j=0,we=null,ze=A.next();ie!==null&&!ze.done;xe++,ze=A.next()){ie.index>xe?(we=ie,ie=null):we=ie.sibling;var Da=z(k,ie,ze.value,H);if(Da===null){ie===null&&(ie=we);break}e&&ie&&Da.alternate===null&&t(k,ie),j=c(Da,j,xe),Re===null?re=Da:Re.sibling=Da,Re=Da,ie=we}if(ze.done)return l(k,ie),ke&&Yl(k,xe),re;if(ie===null){for(;!ze.done;xe++,ze=A.next())ze=q(k,ze.value,H),ze!==null&&(j=c(ze,j,xe),Re===null?re=ze:Re.sibling=ze,Re=ze);return ke&&Yl(k,xe),re}for(ie=a(ie);!ze.done;xe++,ze=A.next())ze=D(ie,k,xe,ze.value,H),ze!==null&&(e&&ze.alternate!==null&&ie.delete(ze.key===null?xe:ze.key),j=c(ze,j,xe),Re===null?re=ze:Re.sibling=ze,Re=ze);return e&&ie.forEach(function(fv){return t(k,fv)}),ke&&Yl(k,xe),re}function Ye(k,j,A,H){if(typeof A=="object"&&A!==null&&A.type===P&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case L:e:{for(var re=A.key;j!==null;){if(j.key===re){if(re=A.type,re===P){if(j.tag===7){l(k,j.sibling),H=s(j,A.props.children),H.return=k,k=H;break e}}else if(j.elementType===re||typeof re=="object"&&re!==null&&re.$$typeof===F&&tn(re)===j.type){l(k,j.sibling),H=s(j,A.props),Ms(H,A),H.return=k,k=H;break e}l(k,j);break}else t(k,j);j=j.sibling}A.type===P?(H=Ia(A.props.children,k.mode,H,A.key),H.return=k,k=H):(H=Gi(A.type,A.key,A.props,null,k.mode,H),Ms(H,A),H.return=k,k=H)}return d(k);case Y:e:{for(re=A.key;j!==null;){if(j.key===re)if(j.tag===4&&j.stateNode.containerInfo===A.containerInfo&&j.stateNode.implementation===A.implementation){l(k,j.sibling),H=s(j,A.children||[]),H.return=k,k=H;break e}else{l(k,j);break}else t(k,j);j=j.sibling}H=hu(A,k.mode,H),H.return=k,k=H}return d(k);case F:return A=tn(A),Ye(k,j,A,H)}if($e(A))return se(k,j,A,H);if(ge(A)){if(re=ge(A),typeof re!="function")throw Error(r(150));return A=re.call(A),de(k,j,A,H)}if(typeof A.then=="function")return Ye(k,j,Ki(A),H);if(A.$$typeof===he)return Ye(k,j,Xi(k,A),H);Ji(k,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,j!==null&&j.tag===6?(l(k,j.sibling),H=s(j,A),H.return=k,k=H):(l(k,j),H=du(A,k.mode,H),H.return=k,k=H),d(k)):l(k,j)}return function(k,j,A,H){try{Ds=0;var re=Ye(k,j,A,H);return Hn=null,re}catch(ie){if(ie===Ln||ie===Zi)throw ie;var Re=Xt(29,ie,null,k.mode);return Re.lanes=H,Re.return=k,Re}}}var an=yf(!0),bf=yf(!1),va=!1;function ku(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Tu(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 xa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ya(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Oe&2)!==0){var s=a.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),a.pending=t,t=qi(e),lf(e,null,l),t}return Bi(e,a,t,l),qi(e)}function Us(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,xn(e,l)}}function Eu(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var s=null,c=null;if(l=l.firstBaseUpdate,l!==null){do{var d={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};c===null?s=c=d:c=c.next=d,l=l.next}while(l!==null);c===null?s=c=t:c=c.next=t}else s=c=t;l={baseState:a.baseState,firstBaseUpdate:s,lastBaseUpdate:c,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Au=!1;function Ls(){if(Au){var e=Un;if(e!==null)throw e}}function Hs(e,t,l,a){Au=!1;var s=e.updateQueue;va=!1;var c=s.firstBaseUpdate,d=s.lastBaseUpdate,m=s.shared.pending;if(m!==null){s.shared.pending=null;var b=m,_=b.next;b.next=null,d===null?c=_:d.next=_,d=b;var U=e.alternate;U!==null&&(U=U.updateQueue,m=U.lastBaseUpdate,m!==d&&(m===null?U.firstBaseUpdate=_:m.next=_,U.lastBaseUpdate=b))}if(c!==null){var q=s.baseState;d=0,U=_=b=null,m=c;do{var z=m.lane&-536870913,D=z!==m.lane;if(D?(Se&z)===z:(a&z)===z){z!==0&&z===Mn&&(Au=!0),U!==null&&(U=U.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var se=e,de=m;z=t;var Ye=l;switch(de.tag){case 1:if(se=de.payload,typeof se=="function"){q=se.call(Ye,q,z);break e}q=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=de.payload,z=typeof se=="function"?se.call(Ye,q,z):se,z==null)break e;q=R({},q,z);break e;case 2:va=!0}}z=m.callback,z!==null&&(e.flags|=64,D&&(e.flags|=8192),D=s.callbacks,D===null?s.callbacks=[z]:D.push(z))}else D={lane:z,tag:m.tag,payload:m.payload,callback:m.callback,next:null},U===null?(_=U=D,b=q):U=U.next=D,d|=z;if(m=m.next,m===null){if(m=s.shared.pending,m===null)break;D=m,m=D.next,D.next=null,s.lastBaseUpdate=D,s.shared.pending=null}}while(!0);U===null&&(b=q),s.baseState=b,s.firstBaseUpdate=_,s.lastBaseUpdate=U,c===null&&(s.shared.lanes=0),wa|=d,e.lanes=d,e.memoizedState=q}}function jf(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Nf(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)jf(l[e],t)}var Bn=N(null),Ii=N(0);function Sf(e,t){e=Pl,J(Ii,e),J(Bn,t),Pl=e|t.baseLanes}function _u(){J(Ii,Pl),J(Bn,Bn.current)}function Ru(){Pl=Ii.current,B(Bn),B(Ii)}var Qt=N(null),rl=null;function ba(e){var t=e.alternate;J(tt,tt.current&1),J(Qt,e),rl===null&&(t===null||Bn.current!==null||t.memoizedState!==null)&&(rl=e)}function zu(e){J(tt,tt.current),J(Qt,e),rl===null&&(rl=e)}function wf(e){e.tag===22?(J(tt,tt.current),J(Qt,e),rl===null&&(rl=e)):ja()}function ja(){J(tt,tt.current),J(Qt,Qt.current)}function Zt(e){B(Qt),rl===e&&(rl=null),B(tt)}var tt=N(0);function Wi(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Lr(l)||Hr(l)))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 Ql=0,ve=null,qe=null,ct=null,Fi=!1,qn=!1,nn=!1,Pi=0,Bs=0,Gn=null,tg=0;function Pe(){throw Error(r(321))}function Cu(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!$t(e[l],t[l]))return!1;return!0}function Ou(e,t,l,a,s,c){return Ql=c,ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?cd:Ku,nn=!1,c=l(a,s),nn=!1,qn&&(c=Tf(t,l,a,s)),kf(e),c}function kf(e){M.H=Ys;var t=qe!==null&&qe.next!==null;if(Ql=0,ct=qe=ve=null,Fi=!1,Bs=0,Gn=null,t)throw Error(r(300));e===null||ut||(e=e.dependencies,e!==null&&$i(e)&&(ut=!0))}function Tf(e,t,l,a){ve=e;var s=0;do{if(qn&&(Gn=null),Bs=0,qn=!1,25<=s)throw Error(r(301));if(s+=1,ct=qe=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}M.H=ud,c=t(l,a)}while(qn);return c}function lg(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?qs(t):t,e=e.useState()[0],(qe!==null?qe.memoizedState:null)!==e&&(ve.flags|=1024),t}function Du(){var e=Pi!==0;return Pi=0,e}function Mu(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Uu(e){if(Fi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Fi=!1}Ql=0,ct=qe=ve=null,qn=!1,Bs=Pi=0,Gn=null}function Ct(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ct===null?ve.memoizedState=ct=e:ct=ct.next=e,ct}function lt(){if(qe===null){var e=ve.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var t=ct===null?ve.memoizedState:ct.next;if(t!==null)ct=t,qe=e;else{if(e===null)throw ve.alternate===null?Error(r(467)):Error(r(310));qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},ct===null?ve.memoizedState=ct=e:ct=ct.next=e}return ct}function ec(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qs(e){var t=Bs;return Bs+=1,Gn===null&&(Gn=[]),e=gf(Gn,e,t),t=ve,(ct===null?t.memoizedState:ct.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?cd:Ku),e}function tc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return qs(e);if(e.$$typeof===he)return Nt(e)}throw Error(r(438,String(e)))}function Lu(e){var t=null,l=ve.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=ve.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=ec(),ve.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=ye;return t.index++,l}function Zl(e,t){return typeof t=="function"?t(e):t}function lc(e){var t=lt();return Hu(t,qe,e)}function Hu(e,t,l){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=l;var s=e.baseQueue,c=a.pending;if(c!==null){if(s!==null){var d=s.next;s.next=c.next,c.next=d}t.baseQueue=s=c,a.pending=null}if(c=e.baseState,s===null)e.memoizedState=c;else{t=s.next;var m=d=null,b=null,_=t,U=!1;do{var q=_.lane&-536870913;if(q!==_.lane?(Se&q)===q:(Ql&q)===q){var z=_.revertLane;if(z===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),q===Mn&&(U=!0);else if((Ql&z)===z){_=_.next,z===Mn&&(U=!0);continue}else q={lane:0,revertLane:_.revertLane,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},b===null?(m=b=q,d=c):b=b.next=q,ve.lanes|=z,wa|=z;q=_.action,nn&&l(c,q),c=_.hasEagerState?_.eagerState:l(c,q)}else z={lane:q,revertLane:_.revertLane,gesture:_.gesture,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},b===null?(m=b=z,d=c):b=b.next=z,ve.lanes|=q,wa|=q;_=_.next}while(_!==null&&_!==t);if(b===null?d=c:b.next=m,!$t(c,e.memoizedState)&&(ut=!0,U&&(l=Un,l!==null)))throw l;e.memoizedState=c,e.baseState=d,e.baseQueue=b,a.lastRenderedState=c}return s===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Bu(e){var t=lt(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var a=l.dispatch,s=l.pending,c=t.memoizedState;if(s!==null){l.pending=null;var d=s=s.next;do c=e(c,d.action),d=d.next;while(d!==s);$t(c,t.memoizedState)||(ut=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),l.lastRenderedState=c}return[c,a]}function Ef(e,t,l){var a=ve,s=lt(),c=ke;if(c){if(l===void 0)throw Error(r(407));l=l()}else l=t();var d=!$t((qe||s).memoizedState,l);if(d&&(s.memoizedState=l,ut=!0),s=s.queue,Yu(Rf.bind(null,a,s,e),[e]),s.getSnapshot!==t||d||ct!==null&&ct.memoizedState.tag&1){if(a.flags|=2048,Yn(9,{destroy:void 0},_f.bind(null,a,s,l,t),null),Qe===null)throw Error(r(349));c||(Ql&127)!==0||Af(a,t,l)}return l}function Af(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=ve.updateQueue,t===null?(t=ec(),ve.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function _f(e,t,l,a){t.value=l,t.getSnapshot=a,zf(t)&&Cf(e)}function Rf(e,t,l){return l(function(){zf(t)&&Cf(e)})}function zf(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!$t(e,l)}catch{return!0}}function Cf(e){var t=Ja(e,2);t!==null&&Ht(t,e,2)}function qu(e){var t=Ct();if(typeof e=="function"){var l=e;if(e=l(),nn){Gt(!0);try{l()}finally{Gt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zl,lastRenderedState:e},t}function Of(e,t,l,a){return e.baseState=l,Hu(e,qe,typeof a=="function"?a:Zl)}function ag(e,t,l,a,s){if(sc(e))throw Error(r(485));if(e=t.action,e!==null){var c={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){c.listeners.push(d)}};M.T!==null?l(!0):c.isTransition=!1,a(c),l=t.pending,l===null?(c.next=t.pending=c,Df(t,c)):(c.next=l.next,t.pending=l.next=c)}}function Df(e,t){var l=t.action,a=t.payload,s=e.state;if(t.isTransition){var c=M.T,d={};M.T=d;try{var m=l(s,a),b=M.S;b!==null&&b(d,m),Mf(e,t,m)}catch(_){Gu(e,t,_)}finally{c!==null&&d.types!==null&&(c.types=d.types),M.T=c}}else try{c=l(s,a),Mf(e,t,c)}catch(_){Gu(e,t,_)}}function Mf(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){Uf(e,t,a)},function(a){return Gu(e,t,a)}):Uf(e,t,l)}function Uf(e,t,l){t.status="fulfilled",t.value=l,Lf(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Df(e,l)))}function Gu(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,Lf(t),t=t.next;while(t!==a)}e.action=null}function Lf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Hf(e,t){return t}function Bf(e,t){if(ke){var l=Qe.formState;if(l!==null){e:{var a=ve;if(ke){if(Ve){t:{for(var s=Ve,c=ul;s.nodeType!==8;){if(!c){s=null;break t}if(s=ol(s.nextSibling),s===null){s=null;break t}}c=s.data,s=c==="F!"||c==="F"?s:null}if(s){Ve=ol(s.nextSibling),a=s.data==="F!";break e}}pa(a)}a=!1}a&&(t=l[0])}}return l=Ct(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hf,lastRenderedState:t},l.queue=a,l=nd.bind(null,ve,a),a.dispatch=l,a=qu(!1),c=Vu.bind(null,ve,!1,a.queue),a=Ct(),s={state:t,dispatch:null,action:e,pending:null},a.queue=s,l=ag.bind(null,ve,s,c,l),s.dispatch=l,a.memoizedState=e,[t,l,!1]}function qf(e){var t=lt();return Gf(t,qe,e)}function Gf(e,t,l){if(t=Hu(e,t,Hf)[0],e=lc(Zl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=qs(t)}catch(d){throw d===Ln?Zi:d}else a=t;t=lt();var s=t.queue,c=s.dispatch;return l!==t.memoizedState&&(ve.flags|=2048,Yn(9,{destroy:void 0},ng.bind(null,s,l),null)),[a,c,e]}function ng(e,t){e.action=t}function Yf(e){var t=lt(),l=qe;if(l!==null)return Gf(t,l,e);lt(),t=t.memoizedState,l=lt();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Yn(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=ve.updateQueue,t===null&&(t=ec(),ve.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function $f(){return lt().memoizedState}function ac(e,t,l,a){var s=Ct();ve.flags|=e,s.memoizedState=Yn(1|t,{destroy:void 0},l,a===void 0?null:a)}function nc(e,t,l,a){var s=lt();a=a===void 0?null:a;var c=s.memoizedState.inst;qe!==null&&a!==null&&Cu(a,qe.memoizedState.deps)?s.memoizedState=Yn(t,c,l,a):(ve.flags|=e,s.memoizedState=Yn(1|t,c,l,a))}function Xf(e,t){ac(8390656,8,e,t)}function Yu(e,t){nc(2048,8,e,t)}function sg(e){ve.flags|=4;var t=ve.updateQueue;if(t===null)t=ec(),ve.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Qf(e){var t=lt().memoizedState;return sg({ref:t,nextImpl:e}),function(){if((Oe&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Zf(e,t){return nc(4,2,e,t)}function Vf(e,t){return nc(4,4,e,t)}function Kf(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Jf(e,t,l){l=l!=null?l.concat([e]):null,nc(4,4,Kf.bind(null,t,e),l)}function $u(){}function If(e,t){var l=lt();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Cu(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function Wf(e,t){var l=lt();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Cu(t,a[1]))return a[0];if(a=e(),nn){Gt(!0);try{e()}finally{Gt(!1)}}return l.memoizedState=[a,t],a}function Xu(e,t,l){return l===void 0||(Ql&1073741824)!==0&&(Se&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Fd(),ve.lanes|=e,wa|=e,l)}function Ff(e,t,l,a){return $t(l,t)?l:Bn.current!==null?(e=Xu(e,l,a),$t(e,t)||(ut=!0),e):(Ql&42)===0||(Ql&1073741824)!==0&&(Se&261930)===0?(ut=!0,e.memoizedState=l):(e=Fd(),ve.lanes|=e,wa|=e,t)}function Pf(e,t,l,a,s){var c=K.p;K.p=c!==0&&8>c?c:8;var d=M.T,m={};M.T=m,Vu(e,!1,t,l);try{var b=s(),_=M.S;if(_!==null&&_(m,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var U=eg(b,a);Gs(e,t,U,Jt(e))}else Gs(e,t,a,Jt(e))}catch(q){Gs(e,t,{then:function(){},status:"rejected",reason:q},Jt())}finally{K.p=c,d!==null&&m.types!==null&&(d.types=m.types),M.T=d}}function ig(){}function Qu(e,t,l,a){if(e.tag!==5)throw Error(r(476));var s=ed(e).queue;Pf(e,s,t,ue,l===null?ig:function(){return td(e),l(a)})}function ed(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zl,lastRenderedState:ue},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function td(e){var t=ed(e);t.next===null&&(t=e.alternate.memoizedState),Gs(e,t.next.queue,{},Jt())}function Zu(){return Nt(ni)}function ld(){return lt().memoizedState}function ad(){return lt().memoizedState}function cg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Jt();e=xa(l);var a=ya(t,e,l);a!==null&&(Ht(a,t,l),Us(a,t,l)),t={cache:ju()},e.payload=t;return}t=t.return}}function ug(e,t,l){var a=Jt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},sc(e)?sd(t,l):(l=ou(e,t,l,a),l!==null&&(Ht(l,e,a),id(l,t,a)))}function nd(e,t,l){var a=Jt();Gs(e,t,l,a)}function Gs(e,t,l,a){var s={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(sc(e))sd(t,s);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var d=t.lastRenderedState,m=c(d,l);if(s.hasEagerState=!0,s.eagerState=m,$t(m,d))return Bi(e,t,s,0),Qe===null&&Hi(),!1}catch{}if(l=ou(e,t,s,a),l!==null)return Ht(l,e,a),id(l,t,a),!0}return!1}function Vu(e,t,l,a){if(a={lane:2,revertLane:kr(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},sc(e)){if(t)throw Error(r(479))}else t=ou(e,l,a,2),t!==null&&Ht(t,e,2)}function sc(e){var t=e.alternate;return e===ve||t!==null&&t===ve}function sd(e,t){qn=Fi=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function id(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,xn(e,l)}}var Ys={readContext:Nt,use:tc,useCallback:Pe,useContext:Pe,useEffect:Pe,useImperativeHandle:Pe,useLayoutEffect:Pe,useInsertionEffect:Pe,useMemo:Pe,useReducer:Pe,useRef:Pe,useState:Pe,useDebugValue:Pe,useDeferredValue:Pe,useTransition:Pe,useSyncExternalStore:Pe,useId:Pe,useHostTransitionStatus:Pe,useFormState:Pe,useActionState:Pe,useOptimistic:Pe,useMemoCache:Pe,useCacheRefresh:Pe};Ys.useEffectEvent=Pe;var cd={readContext:Nt,use:tc,useCallback:function(e,t){return Ct().memoizedState=[e,t===void 0?null:t],e},useContext:Nt,useEffect:Xf,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,ac(4194308,4,Kf.bind(null,t,e),l)},useLayoutEffect:function(e,t){return ac(4194308,4,e,t)},useInsertionEffect:function(e,t){ac(4,2,e,t)},useMemo:function(e,t){var l=Ct();t=t===void 0?null:t;var a=e();if(nn){Gt(!0);try{e()}finally{Gt(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=Ct();if(l!==void 0){var s=l(t);if(nn){Gt(!0);try{l(t)}finally{Gt(!1)}}}else s=t;return a.memoizedState=a.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},a.queue=e,e=e.dispatch=ug.bind(null,ve,e),[a.memoizedState,e]},useRef:function(e){var t=Ct();return e={current:e},t.memoizedState=e},useState:function(e){e=qu(e);var t=e.queue,l=nd.bind(null,ve,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:$u,useDeferredValue:function(e,t){var l=Ct();return Xu(l,e,t)},useTransition:function(){var e=qu(!1);return e=Pf.bind(null,ve,e.queue,!0,!1),Ct().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=ve,s=Ct();if(ke){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),Qe===null)throw Error(r(349));(Se&127)!==0||Af(a,t,l)}s.memoizedState=l;var c={value:l,getSnapshot:t};return s.queue=c,Xf(Rf.bind(null,a,c,e),[e]),a.flags|=2048,Yn(9,{destroy:void 0},_f.bind(null,a,c,l,t),null),l},useId:function(){var e=Ct(),t=Qe.identifierPrefix;if(ke){var l=Rl,a=_l;l=(a&~(1<<32-Tt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Pi++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=tg++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Zu,useFormState:Bf,useActionState:Bf,useOptimistic:function(e){var t=Ct();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Vu.bind(null,ve,!0,l),l.dispatch=t,[e,t]},useMemoCache:Lu,useCacheRefresh:function(){return Ct().memoizedState=cg.bind(null,ve)},useEffectEvent:function(e){var t=Ct(),l={impl:e};return t.memoizedState=l,function(){if((Oe&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},Ku={readContext:Nt,use:tc,useCallback:If,useContext:Nt,useEffect:Yu,useImperativeHandle:Jf,useInsertionEffect:Zf,useLayoutEffect:Vf,useMemo:Wf,useReducer:lc,useRef:$f,useState:function(){return lc(Zl)},useDebugValue:$u,useDeferredValue:function(e,t){var l=lt();return Ff(l,qe.memoizedState,e,t)},useTransition:function(){var e=lc(Zl)[0],t=lt().memoizedState;return[typeof e=="boolean"?e:qs(e),t]},useSyncExternalStore:Ef,useId:ld,useHostTransitionStatus:Zu,useFormState:qf,useActionState:qf,useOptimistic:function(e,t){var l=lt();return Of(l,qe,e,t)},useMemoCache:Lu,useCacheRefresh:ad};Ku.useEffectEvent=Qf;var ud={readContext:Nt,use:tc,useCallback:If,useContext:Nt,useEffect:Yu,useImperativeHandle:Jf,useInsertionEffect:Zf,useLayoutEffect:Vf,useMemo:Wf,useReducer:Bu,useRef:$f,useState:function(){return Bu(Zl)},useDebugValue:$u,useDeferredValue:function(e,t){var l=lt();return qe===null?Xu(l,e,t):Ff(l,qe.memoizedState,e,t)},useTransition:function(){var e=Bu(Zl)[0],t=lt().memoizedState;return[typeof e=="boolean"?e:qs(e),t]},useSyncExternalStore:Ef,useId:ld,useHostTransitionStatus:Zu,useFormState:Yf,useActionState:Yf,useOptimistic:function(e,t){var l=lt();return qe!==null?Of(l,qe,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Lu,useCacheRefresh:ad};ud.useEffectEvent=Qf;function Ju(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:R({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Iu={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Jt(),s=xa(a);s.payload=t,l!=null&&(s.callback=l),t=ya(e,s,a),t!==null&&(Ht(t,e,a),Us(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=Jt(),s=xa(a);s.tag=1,s.payload=t,l!=null&&(s.callback=l),t=ya(e,s,a),t!==null&&(Ht(t,e,a),Us(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Jt(),a=xa(l);a.tag=2,t!=null&&(a.callback=t),t=ya(e,a,l),t!==null&&(Ht(t,e,l),Us(t,e,l))}};function rd(e,t,l,a,s,c,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,c,d):t.prototype&&t.prototype.isPureReactComponent?!As(l,a)||!As(s,c):!0}function od(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&Iu.enqueueReplaceState(t,t.state,null)}function sn(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=R({},l));for(var s in e)l[s]===void 0&&(l[s]=e[s])}return l}function fd(e){Li(e)}function dd(e){console.error(e)}function hd(e){Li(e)}function ic(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function md(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function Wu(e,t,l){return l=xa(l),l.tag=3,l.payload={element:null},l.callback=function(){ic(e,t)},l}function pd(e){return e=xa(e),e.tag=3,e}function gd(e,t,l,a){var s=l.type.getDerivedStateFromError;if(typeof s=="function"){var c=a.value;e.payload=function(){return s(c)},e.callback=function(){md(t,l,a)}}var d=l.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){md(t,l,a),typeof s!="function"&&(ka===null?ka=new Set([this]):ka.add(this));var m=a.stack;this.componentDidCatch(a.value,{componentStack:m!==null?m:""})})}function rg(e,t,l,a,s){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&Dn(t,l,s,!0),l=Qt.current,l!==null){switch(l.tag){case 31:case 13:return rl===null?xc():l.alternate===null&&et===0&&(et=3),l.flags&=-257,l.flags|=65536,l.lanes=s,a===Vi?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Nr(e,a,s)),!1;case 22:return l.flags|=65536,a===Vi?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),Nr(e,a,s)),!1}throw Error(r(435,l.tag))}return Nr(e,a,s),xc(),!1}if(ke)return t=Qt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,a!==gu&&(e=Error(r(422),{cause:a}),zs(sl(e,l)))):(a!==gu&&(t=Error(r(423),{cause:a}),zs(sl(t,l))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,a=sl(a,l),s=Wu(e.stateNode,a,s),Eu(e,s),et!==4&&(et=2)),!1;var c=Error(r(520),{cause:a});if(c=sl(c,l),Is===null?Is=[c]:Is.push(c),et!==4&&(et=2),t===null)return!0;a=sl(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=s&-s,l.lanes|=e,e=Wu(l.stateNode,a,e),Eu(l,e),!1;case 1:if(t=l.type,c=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(ka===null||!ka.has(c))))return l.flags|=65536,s&=-s,l.lanes|=s,s=pd(s),gd(s,e,l,a),Eu(l,s),!1}l=l.return}while(l!==null);return!1}var Fu=Error(r(461)),ut=!1;function St(e,t,l,a){t.child=e===null?bf(t,null,l,a):an(t,e.child,l,a)}function vd(e,t,l,a,s){l=l.render;var c=t.ref;if("ref"in a){var d={};for(var m in a)m!=="ref"&&(d[m]=a[m])}else d=a;return Pa(t),a=Ou(e,t,l,d,c,s),m=Du(),e!==null&&!ut?(Mu(e,t,s),Vl(e,t,s)):(ke&&m&&mu(t),t.flags|=1,St(e,t,a,s),t.child)}function xd(e,t,l,a,s){if(e===null){var c=l.type;return typeof c=="function"&&!fu(c)&&c.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=c,yd(e,t,c,a,s)):(e=Gi(l.type,null,a,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!ir(e,s)){var d=c.memoizedProps;if(l=l.compare,l=l!==null?l:As,l(d,a)&&e.ref===t.ref)return Vl(e,t,s)}return t.flags|=1,e=Gl(c,a),e.ref=t.ref,e.return=t,t.child=e}function yd(e,t,l,a,s){if(e!==null){var c=e.memoizedProps;if(As(c,a)&&e.ref===t.ref)if(ut=!1,t.pendingProps=a=c,ir(e,s))(e.flags&131072)!==0&&(ut=!0);else return t.lanes=e.lanes,Vl(e,t,s)}return Pu(e,t,l,a,s)}function bd(e,t,l,a){var s=a.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|l:l,e!==null){for(a=t.child=e.child,s=0;a!==null;)s=s|a.lanes|a.childLanes,a=a.sibling;a=s&~c}else a=0,t.child=null;return jd(e,t,c,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Qi(t,c!==null?c.cachePool:null),c!==null?Sf(t,c):_u(),wf(t);else return a=t.lanes=536870912,jd(e,t,c!==null?c.baseLanes|l:l,l,a)}else c!==null?(Qi(t,c.cachePool),Sf(t,c),ja(),t.memoizedState=null):(e!==null&&Qi(t,null),_u(),ja());return St(e,t,s,l),t.child}function $s(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function jd(e,t,l,a,s){var c=Su();return c=c===null?null:{parent:it._currentValue,pool:c},t.memoizedState={baseLanes:l,cachePool:c},e!==null&&Qi(t,null),_u(),wf(t),e!==null&&Dn(e,t,a,!0),t.childLanes=s,null}function cc(e,t){return t=rc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Nd(e,t,l){return an(t,e.child,null,l),e=cc(t,t.pendingProps),e.flags|=2,Zt(t),t.memoizedState=null,e}function og(e,t,l){var a=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ke){if(a.mode==="hidden")return e=cc(t,a),t.lanes=536870912,$s(null,e);if(zu(t),(e=Ve)?(e=Dh(e,ul),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ha!==null?{id:_l,overflow:Rl}:null,retryLane:536870912,hydrationErrors:null},l=nf(e),l.return=t,t.child=l,jt=t,Ve=null)):e=null,e===null)throw pa(t);return t.lanes=536870912,null}return cc(t,a)}var c=e.memoizedState;if(c!==null){var d=c.dehydrated;if(zu(t),s)if(t.flags&256)t.flags&=-257,t=Nd(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(ut||Dn(e,t,l,!1),s=(l&e.childLanes)!==0,ut||s){if(a=Qe,a!==null&&(d=yn(a,l),d!==0&&d!==c.retryLane))throw c.retryLane=d,Ja(e,d),Ht(a,e,d),Fu;xc(),t=Nd(e,t,l)}else e=c.treeContext,Ve=ol(d.nextSibling),jt=t,ke=!0,ma=null,ul=!1,e!==null&&uf(t,e),t=cc(t,a),t.flags|=4096;return t}return e=Gl(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function uc(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Pu(e,t,l,a,s){return Pa(t),l=Ou(e,t,l,a,void 0,s),a=Du(),e!==null&&!ut?(Mu(e,t,s),Vl(e,t,s)):(ke&&a&&mu(t),t.flags|=1,St(e,t,l,s),t.child)}function Sd(e,t,l,a,s,c){return Pa(t),t.updateQueue=null,l=Tf(t,a,l,s),kf(e),a=Du(),e!==null&&!ut?(Mu(e,t,c),Vl(e,t,c)):(ke&&a&&mu(t),t.flags|=1,St(e,t,l,c),t.child)}function wd(e,t,l,a,s){if(Pa(t),t.stateNode===null){var c=Rn,d=l.contextType;typeof d=="object"&&d!==null&&(c=Nt(d)),c=new l(a,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Iu,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=a,c.state=t.memoizedState,c.refs={},ku(t),d=l.contextType,c.context=typeof d=="object"&&d!==null?Nt(d):Rn,c.state=t.memoizedState,d=l.getDerivedStateFromProps,typeof d=="function"&&(Ju(t,l,d,a),c.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(d=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),d!==c.state&&Iu.enqueueReplaceState(c,c.state,null),Hs(t,a,c,s),Ls(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){c=t.stateNode;var m=t.memoizedProps,b=sn(l,m);c.props=b;var _=c.context,U=l.contextType;d=Rn,typeof U=="object"&&U!==null&&(d=Nt(U));var q=l.getDerivedStateFromProps;U=typeof q=="function"||typeof c.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,U||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(m||_!==d)&&od(t,c,a,d),va=!1;var z=t.memoizedState;c.state=z,Hs(t,a,c,s),Ls(),_=t.memoizedState,m||z!==_||va?(typeof q=="function"&&(Ju(t,l,q,a),_=t.memoizedState),(b=va||rd(t,l,b,a,z,_,d))?(U||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=_),c.props=a,c.state=_,c.context=d,a=b):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{c=t.stateNode,Tu(e,t),d=t.memoizedProps,U=sn(l,d),c.props=U,q=t.pendingProps,z=c.context,_=l.contextType,b=Rn,typeof _=="object"&&_!==null&&(b=Nt(_)),m=l.getDerivedStateFromProps,(_=typeof m=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(d!==q||z!==b)&&od(t,c,a,b),va=!1,z=t.memoizedState,c.state=z,Hs(t,a,c,s),Ls();var D=t.memoizedState;d!==q||z!==D||va||e!==null&&e.dependencies!==null&&$i(e.dependencies)?(typeof m=="function"&&(Ju(t,l,m,a),D=t.memoizedState),(U=va||rd(t,l,U,a,z,D,b)||e!==null&&e.dependencies!==null&&$i(e.dependencies))?(_||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(a,D,b),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(a,D,b)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||d===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=D),c.props=a,c.state=D,c.context=b,a=U):(typeof c.componentDidUpdate!="function"||d===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),a=!1)}return c=a,uc(e,t),a=(t.flags&128)!==0,c||a?(c=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&a?(t.child=an(t,e.child,null,s),t.child=an(t,null,l,s)):St(e,t,l,s),t.memoizedState=c.state,e=t.child):e=Vl(e,t,s),e}function kd(e,t,l,a){return Wa(),t.flags|=256,St(e,t,l,a),t.child}var er={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function tr(e){return{baseLanes:e,cachePool:mf()}}function lr(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Kt),e}function Td(e,t,l){var a=t.pendingProps,s=!1,c=(t.flags&128)!==0,d;if((d=c)||(d=e!==null&&e.memoizedState===null?!1:(tt.current&2)!==0),d&&(s=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(ke){if(s?ba(t):ja(),(e=Ve)?(e=Dh(e,ul),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ha!==null?{id:_l,overflow:Rl}:null,retryLane:536870912,hydrationErrors:null},l=nf(e),l.return=t,t.child=l,jt=t,Ve=null)):e=null,e===null)throw pa(t);return Hr(e)?t.lanes=32:t.lanes=536870912,null}var m=a.children;return a=a.fallback,s?(ja(),s=t.mode,m=rc({mode:"hidden",children:m},s),a=Ia(a,s,l,null),m.return=t,a.return=t,m.sibling=a,t.child=m,a=t.child,a.memoizedState=tr(l),a.childLanes=lr(e,d,l),t.memoizedState=er,$s(null,a)):(ba(t),ar(t,m))}var b=e.memoizedState;if(b!==null&&(m=b.dehydrated,m!==null)){if(c)t.flags&256?(ba(t),t.flags&=-257,t=nr(e,t,l)):t.memoizedState!==null?(ja(),t.child=e.child,t.flags|=128,t=null):(ja(),m=a.fallback,s=t.mode,a=rc({mode:"visible",children:a.children},s),m=Ia(m,s,l,null),m.flags|=2,a.return=t,m.return=t,a.sibling=m,t.child=a,an(t,e.child,null,l),a=t.child,a.memoizedState=tr(l),a.childLanes=lr(e,d,l),t.memoizedState=er,t=$s(null,a));else if(ba(t),Hr(m)){if(d=m.nextSibling&&m.nextSibling.dataset,d)var _=d.dgst;d=_,a=Error(r(419)),a.stack="",a.digest=d,zs({value:a,source:null,stack:null}),t=nr(e,t,l)}else if(ut||Dn(e,t,l,!1),d=(l&e.childLanes)!==0,ut||d){if(d=Qe,d!==null&&(a=yn(d,l),a!==0&&a!==b.retryLane))throw b.retryLane=a,Ja(e,a),Ht(d,e,a),Fu;Lr(m)||xc(),t=nr(e,t,l)}else Lr(m)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,Ve=ol(m.nextSibling),jt=t,ke=!0,ma=null,ul=!1,e!==null&&uf(t,e),t=ar(t,a.children),t.flags|=4096);return t}return s?(ja(),m=a.fallback,s=t.mode,b=e.child,_=b.sibling,a=Gl(b,{mode:"hidden",children:a.children}),a.subtreeFlags=b.subtreeFlags&65011712,_!==null?m=Gl(_,m):(m=Ia(m,s,l,null),m.flags|=2),m.return=t,a.return=t,a.sibling=m,t.child=a,$s(null,a),a=t.child,m=e.child.memoizedState,m===null?m=tr(l):(s=m.cachePool,s!==null?(b=it._currentValue,s=s.parent!==b?{parent:b,pool:b}:s):s=mf(),m={baseLanes:m.baseLanes|l,cachePool:s}),a.memoizedState=m,a.childLanes=lr(e,d,l),t.memoizedState=er,$s(e.child,a)):(ba(t),l=e.child,e=l.sibling,l=Gl(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(d=t.deletions,d===null?(t.deletions=[e],t.flags|=16):d.push(e)),t.child=l,t.memoizedState=null,l)}function ar(e,t){return t=rc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function rc(e,t){return e=Xt(22,e,null,t),e.lanes=0,e}function nr(e,t,l){return an(t,e.child,null,l),e=ar(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ed(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),yu(e.return,t,l)}function sr(e,t,l,a,s,c){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:s,treeForkCount:c}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=a,d.tail=l,d.tailMode=s,d.treeForkCount=c)}function Ad(e,t,l){var a=t.pendingProps,s=a.revealOrder,c=a.tail;a=a.children;var d=tt.current,m=(d&2)!==0;if(m?(d=d&1|2,t.flags|=128):d&=1,J(tt,d),St(e,t,a,l),a=ke?Rs:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ed(e,l,t);else if(e.tag===19)Ed(e,l,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(s){case"forwards":for(l=t.child,s=null;l!==null;)e=l.alternate,e!==null&&Wi(e)===null&&(s=l),l=l.sibling;l=s,l===null?(s=t.child,t.child=null):(s=l.sibling,l.sibling=null),sr(t,!1,s,l,c,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Wi(e)===null){t.child=s;break}e=s.sibling,s.sibling=l,l=s,s=e}sr(t,!0,l,null,c,a);break;case"together":sr(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Vl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),wa|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Dn(e,t,l,!1),(l&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,l=Gl(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Gl(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function ir(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&$i(e)))}function fg(e,t,l){switch(t.tag){case 3:Je(t,t.stateNode.containerInfo),ga(t,it,e.memoizedState.cache),Wa();break;case 27:case 5:La(t);break;case 4:Je(t,t.stateNode.containerInfo);break;case 10:ga(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,zu(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(ba(t),t.flags|=128,null):(l&t.child.childLanes)!==0?Td(e,t,l):(ba(t),e=Vl(e,t,l),e!==null?e.sibling:null);ba(t);break;case 19:var s=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(Dn(e,t,l,!1),a=(l&t.childLanes)!==0),s){if(a)return Ad(e,t,l);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),J(tt,tt.current),a)break;return null;case 22:return t.lanes=0,bd(e,t,l,t.pendingProps);case 24:ga(t,it,e.memoizedState.cache)}return Vl(e,t,l)}function _d(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)ut=!0;else{if(!ir(e,l)&&(t.flags&128)===0)return ut=!1,fg(e,t,l);ut=(e.flags&131072)!==0}else ut=!1,ke&&(t.flags&1048576)!==0&&cf(t,Rs,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=tn(t.elementType),t.type=e,typeof e=="function")fu(e)?(a=sn(e,a),t.tag=1,t=wd(null,t,e,a,l)):(t.tag=0,t=Pu(null,t,e,a,l));else{if(e!=null){var s=e.$$typeof;if(s===ee){t.tag=11,t=vd(null,t,e,a,l);break e}else if(s===Q){t.tag=14,t=xd(null,t,e,a,l);break e}}throw t=Rt(e)||e,Error(r(306,t,""))}}return t;case 0:return Pu(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,s=sn(a,t.pendingProps),wd(e,t,a,s,l);case 3:e:{if(Je(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var c=t.memoizedState;s=c.element,Tu(e,t),Hs(t,a,null,l);var d=t.memoizedState;if(a=d.cache,ga(t,it,a),a!==c.cache&&bu(t,[it],l,!0),Ls(),a=d.element,c.isDehydrated)if(c={element:a,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=kd(e,t,a,l);break e}else if(a!==s){s=sl(Error(r(424)),t),zs(s),t=kd(e,t,a,l);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ve=ol(e.firstChild),jt=t,ke=!0,ma=null,ul=!0,l=bf(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Wa(),a===s){t=Vl(e,t,l);break e}St(e,t,a,l)}t=t.child}return t;case 26:return uc(e,t),e===null?(l=qh(t.type,null,t.pendingProps,null))?t.memoizedState=l:ke||(l=t.type,e=t.pendingProps,a=kc(ce.current).createElement(l),a[ft]=t,a[at]=e,wt(a,l,e),nt(a),t.stateNode=a):t.memoizedState=qh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return La(t),e===null&&ke&&(a=t.stateNode=Lh(t.type,t.pendingProps,ce.current),jt=t,ul=!0,s=Ve,_a(t.type)?(Br=s,Ve=ol(a.firstChild)):Ve=s),St(e,t,t.pendingProps.children,l),uc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ke&&((s=a=Ve)&&(a=Gg(a,t.type,t.pendingProps,ul),a!==null?(t.stateNode=a,jt=t,Ve=ol(a.firstChild),ul=!1,s=!0):s=!1),s||pa(t)),La(t),s=t.type,c=t.pendingProps,d=e!==null?e.memoizedProps:null,a=c.children,Dr(s,c)?a=null:d!==null&&Dr(s,d)&&(t.flags|=32),t.memoizedState!==null&&(s=Ou(e,t,lg,null,null,l),ni._currentValue=s),uc(e,t),St(e,t,a,l),t.child;case 6:return e===null&&ke&&((e=l=Ve)&&(l=Yg(l,t.pendingProps,ul),l!==null?(t.stateNode=l,jt=t,Ve=null,e=!0):e=!1),e||pa(t)),null;case 13:return Td(e,t,l);case 4:return Je(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=an(t,null,a,l):St(e,t,a,l),t.child;case 11:return vd(e,t,t.type,t.pendingProps,l);case 7:return St(e,t,t.pendingProps,l),t.child;case 8:return St(e,t,t.pendingProps.children,l),t.child;case 12:return St(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,ga(t,t.type,a.value),St(e,t,a.children,l),t.child;case 9:return s=t.type._context,a=t.pendingProps.children,Pa(t),s=Nt(s),a=a(s),t.flags|=1,St(e,t,a,l),t.child;case 14:return xd(e,t,t.type,t.pendingProps,l);case 15:return yd(e,t,t.type,t.pendingProps,l);case 19:return Ad(e,t,l);case 31:return og(e,t,l);case 22:return bd(e,t,l,t.pendingProps);case 24:return Pa(t),a=Nt(it),e===null?(s=Su(),s===null&&(s=Qe,c=ju(),s.pooledCache=c,c.refCount++,c!==null&&(s.pooledCacheLanes|=l),s=c),t.memoizedState={parent:a,cache:s},ku(t),ga(t,it,s)):((e.lanes&l)!==0&&(Tu(e,t),Hs(t,null,null,l),Ls()),s=e.memoizedState,c=t.memoizedState,s.parent!==a?(s={parent:a,cache:a},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),ga(t,it,a)):(a=c.cache,ga(t,it,a),a!==s.cache&&bu(t,[it],l,!0))),St(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Kl(e){e.flags|=4}function cr(e,t,l,a,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(lh())e.flags|=8192;else throw ln=Vi,wu}else e.flags&=-16777217}function Rd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Qh(t))if(lh())e.flags|=8192;else throw ln=Vi,wu}function oc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?hs():536870912,e.lanes|=t,Zn|=t)}function Xs(e,t){if(!ke)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Ke(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags&65011712,a|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags,a|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function dg(e,t,l){var a=t.pendingProps;switch(pu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ke(t),null;case 1:return Ke(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Xl(it),Ie(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(On(t)?Kl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,vu())),Ke(t),null;case 26:var s=t.type,c=t.memoizedState;return e===null?(Kl(t),c!==null?(Ke(t),Rd(t,c)):(Ke(t),cr(t,s,null,a,l))):c?c!==e.memoizedState?(Kl(t),Ke(t),Rd(t,c)):(Ke(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Kl(t),Ke(t),cr(t,s,e,a,l)),null;case 27:if(Ha(t),l=ce.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Kl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Ke(t),null}e=E.current,On(t)?rf(t):(e=Lh(s,a,l),t.stateNode=e,Kl(t))}return Ke(t),null;case 5:if(Ha(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Kl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Ke(t),null}if(c=E.current,On(t))rf(t);else{var d=kc(ce.current);switch(c){case 1:c=d.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:c=d.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":c=d.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":c=d.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":c=d.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof a.is=="string"?d.createElement("select",{is:a.is}):d.createElement("select"),a.multiple?c.multiple=!0:a.size&&(c.size=a.size);break;default:c=typeof a.is=="string"?d.createElement(s,{is:a.is}):d.createElement(s)}}c[ft]=t,c[at]=a;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)c.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}t.stateNode=c;e:switch(wt(c,s,a),s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Kl(t)}}return Ke(t),cr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Kl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=ce.current,On(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,s=jt,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}e[ft]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||Th(e.nodeValue,l)),e||pa(t,!0)}else e=kc(e).createTextNode(a),e[ft]=t,t.stateNode=e}return Ke(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=On(t),l!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[ft]=t}else Wa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ke(t),e=!1}else l=vu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Zt(t),t):(Zt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ke(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=On(t),a!==null&&a.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));s[ft]=t}else Wa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ke(t),s=!1}else s=vu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(Zt(t),t):(Zt(t),null)}return Zt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,s=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(s=a.alternate.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==s&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),oc(t,t.updateQueue),Ke(t),null);case 4:return Ie(),e===null&&_r(t.stateNode.containerInfo),Ke(t),null;case 10:return Xl(t.type),Ke(t),null;case 19:if(B(tt),a=t.memoizedState,a===null)return Ke(t),null;if(s=(t.flags&128)!==0,c=a.rendering,c===null)if(s)Xs(a,!1);else{if(et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Wi(e),c!==null){for(t.flags|=128,Xs(a,!1),e=c.updateQueue,t.updateQueue=e,oc(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)af(l,e),l=l.sibling;return J(tt,tt.current&1|2),ke&&Yl(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&kt()>pc&&(t.flags|=128,s=!0,Xs(a,!1),t.lanes=4194304)}else{if(!s)if(e=Wi(c),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,oc(t,e),Xs(a,!0),a.tail===null&&a.tailMode==="hidden"&&!c.alternate&&!ke)return Ke(t),null}else 2*kt()-a.renderingStartTime>pc&&l!==536870912&&(t.flags|=128,s=!0,Xs(a,!1),t.lanes=4194304);a.isBackwards?(c.sibling=t.child,t.child=c):(e=a.last,e!==null?e.sibling=c:t.child=c,a.last=c)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=kt(),e.sibling=null,l=tt.current,J(tt,s?l&1|2:l&1),ke&&Yl(t,a.treeForkCount),e):(Ke(t),null);case 22:case 23:return Zt(t),Ru(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(Ke(t),t.subtreeFlags&6&&(t.flags|=8192)):Ke(t),l=t.updateQueue,l!==null&&oc(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&B(en),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Xl(it),Ke(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function hg(e,t){switch(pu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xl(it),Ie(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ha(t),null;case 31:if(t.memoizedState!==null){if(Zt(t),t.alternate===null)throw Error(r(340));Wa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Zt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Wa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(tt),null;case 4:return Ie(),null;case 10:return Xl(t.type),null;case 22:case 23:return Zt(t),Ru(),e!==null&&B(en),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Xl(it),null;case 25:return null;default:return null}}function zd(e,t){switch(pu(t),t.tag){case 3:Xl(it),Ie();break;case 26:case 27:case 5:Ha(t);break;case 4:Ie();break;case 31:t.memoizedState!==null&&Zt(t);break;case 13:Zt(t);break;case 19:B(tt);break;case 10:Xl(t.type);break;case 22:case 23:Zt(t),Ru(),e!==null&&B(en);break;case 24:Xl(it)}}function Qs(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var s=a.next;l=s;do{if((l.tag&e)===e){a=void 0;var c=l.create,d=l.inst;a=c(),d.destroy=a}l=l.next}while(l!==s)}}catch(m){Le(t,t.return,m)}}function Na(e,t,l){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var c=s.next;a=c;do{if((a.tag&e)===e){var d=a.inst,m=d.destroy;if(m!==void 0){d.destroy=void 0,s=t;var b=l,_=m;try{_()}catch(U){Le(s,b,U)}}}a=a.next}while(a!==c)}}catch(U){Le(t,t.return,U)}}function Cd(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Nf(t,l)}catch(a){Le(e,e.return,a)}}}function Od(e,t,l){l.props=sn(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Le(e,t,a)}}function Zs(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(s){Le(e,t,s)}}function zl(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(s){Le(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(s){Le(e,t,s)}else l.current=null}function Dd(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(s){Le(e,e.return,s)}}function ur(e,t,l){try{var a=e.stateNode;Mg(a,e.type,l,t),a[at]=t}catch(s){Le(e,e.return,s)}}function Md(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&_a(e.type)||e.tag===4}function rr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Md(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&_a(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function or(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=w));else if(a!==4&&(a===27&&_a(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(or(e,t,l),e=e.sibling;e!==null;)or(e,t,l),e=e.sibling}function fc(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&_a(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(fc(e,t,l),e=e.sibling;e!==null;)fc(e,t,l),e=e.sibling}function Ud(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);wt(t,a,l),t[ft]=e,t[at]=l}catch(c){Le(e,e.return,c)}}var Jl=!1,rt=!1,fr=!1,Ld=typeof WeakSet=="function"?WeakSet:Set,gt=null;function mg(e,t){if(e=e.containerInfo,Cr=Cc,e=Ko(e),nu(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var s=a.anchorOffset,c=a.focusNode;a=a.focusOffset;try{l.nodeType,c.nodeType}catch{l=null;break e}var d=0,m=-1,b=-1,_=0,U=0,q=e,z=null;t:for(;;){for(var D;q!==l||s!==0&&q.nodeType!==3||(m=d+s),q!==c||a!==0&&q.nodeType!==3||(b=d+a),q.nodeType===3&&(d+=q.nodeValue.length),(D=q.firstChild)!==null;)z=q,q=D;for(;;){if(q===e)break t;if(z===l&&++_===s&&(m=d),z===c&&++U===a&&(b=d),(D=q.nextSibling)!==null)break;q=z,z=q.parentNode}q=D}l=m===-1||b===-1?null:{start:m,end:b}}else l=null}l=l||{start:0,end:0}}else l=null;for(Or={focusedElem:e,selectionRange:l},Cc=!1,gt=t;gt!==null;)if(t=gt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,gt=e;else for(;gt!==null;){switch(t=gt,c=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(l=0;l<e.length;l++)s=e[l],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,l=t,s=c.memoizedProps,c=c.memoizedState,a=l.stateNode;try{var se=sn(l.type,s);e=a.getSnapshotBeforeUpdate(se,c),a.__reactInternalSnapshotBeforeUpdate=e}catch(de){Le(l,l.return,de)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Ur(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Ur(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,gt=e;break}gt=t.return}}function Hd(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:Wl(e,l),a&4&&Qs(5,l);break;case 1:if(Wl(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(d){Le(l,l.return,d)}else{var s=sn(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){Le(l,l.return,d)}}a&64&&Cd(l),a&512&&Zs(l,l.return);break;case 3:if(Wl(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Nf(e,t)}catch(d){Le(l,l.return,d)}}break;case 27:t===null&&a&4&&Ud(l);case 26:case 5:Wl(e,l),t===null&&a&4&&Dd(l),a&512&&Zs(l,l.return);break;case 12:Wl(e,l);break;case 31:Wl(e,l),a&4&&Gd(e,l);break;case 13:Wl(e,l),a&4&&Yd(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Sg.bind(null,l),$g(e,l))));break;case 22:if(a=l.memoizedState!==null||Jl,!a){t=t!==null&&t.memoizedState!==null||rt,s=Jl;var c=rt;Jl=a,(rt=t)&&!c?Fl(e,l,(l.subtreeFlags&8772)!==0):Wl(e,l),Jl=s,rt=c}break;case 30:break;default:Wl(e,l)}}function Bd(e){var t=e.alternate;t!==null&&(e.alternate=null,Bd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ya(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 We=null,Dt=!1;function Il(e,t,l){for(l=l.child;l!==null;)qd(e,t,l),l=l.sibling}function qd(e,t,l){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount(el,l)}catch{}switch(l.tag){case 26:rt||zl(l,t),Il(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:rt||zl(l,t);var a=We,s=Dt;_a(l.type)&&(We=l.stateNode,Dt=!1),Il(e,t,l),ti(l.stateNode),We=a,Dt=s;break;case 5:rt||zl(l,t);case 6:if(a=We,s=Dt,We=null,Il(e,t,l),We=a,Dt=s,We!==null)if(Dt)try{(We.nodeType===9?We.body:We.nodeName==="HTML"?We.ownerDocument.body:We).removeChild(l.stateNode)}catch(c){Le(l,t,c)}else try{We.removeChild(l.stateNode)}catch(c){Le(l,t,c)}break;case 18:We!==null&&(Dt?(e=We,Ch(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),es(e)):Ch(We,l.stateNode));break;case 4:a=We,s=Dt,We=l.stateNode.containerInfo,Dt=!0,Il(e,t,l),We=a,Dt=s;break;case 0:case 11:case 14:case 15:Na(2,l,t),rt||Na(4,l,t),Il(e,t,l);break;case 1:rt||(zl(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&Od(l,t,a)),Il(e,t,l);break;case 21:Il(e,t,l);break;case 22:rt=(a=rt)||l.memoizedState!==null,Il(e,t,l),rt=a;break;default:Il(e,t,l)}}function Gd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{es(e)}catch(l){Le(t,t.return,l)}}}function Yd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{es(e)}catch(l){Le(t,t.return,l)}}function pg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ld),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ld),t;default:throw Error(r(435,e.tag))}}function dc(e,t){var l=pg(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var s=wg.bind(null,e,a);a.then(s,s)}})}function Mt(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var s=l[a],c=e,d=t,m=d;e:for(;m!==null;){switch(m.tag){case 27:if(_a(m.type)){We=m.stateNode,Dt=!1;break e}break;case 5:We=m.stateNode,Dt=!1;break e;case 3:case 4:We=m.stateNode.containerInfo,Dt=!0;break e}m=m.return}if(We===null)throw Error(r(160));qd(c,d,s),We=null,Dt=!1,c=s.alternate,c!==null&&(c.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)$d(t,e),t=t.sibling}var yl=null;function $d(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Mt(t,e),Ut(e),a&4&&(Na(3,e,e.return),Qs(3,e),Na(5,e,e.return));break;case 1:Mt(t,e),Ut(e),a&512&&(rt||l===null||zl(l,l.return)),a&64&&Jl&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var s=yl;if(Mt(t,e),Ut(e),a&512&&(rt||l===null||zl(l,l.return)),a&4){var c=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,s=s.ownerDocument||s;t:switch(a){case"title":c=s.getElementsByTagName("title")[0],(!c||c[ua]||c[ft]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=s.createElement(a),s.head.insertBefore(c,s.querySelector("head > title"))),wt(c,a,l),c[ft]=e,nt(c),a=c;break e;case"link":var d=$h("link","href",s).get(a+(l.href||""));if(d){for(var m=0;m<d.length;m++)if(c=d[m],c.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&c.getAttribute("rel")===(l.rel==null?null:l.rel)&&c.getAttribute("title")===(l.title==null?null:l.title)&&c.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){d.splice(m,1);break t}}c=s.createElement(a),wt(c,a,l),s.head.appendChild(c);break;case"meta":if(d=$h("meta","content",s).get(a+(l.content||""))){for(m=0;m<d.length;m++)if(c=d[m],c.getAttribute("content")===(l.content==null?null:""+l.content)&&c.getAttribute("name")===(l.name==null?null:l.name)&&c.getAttribute("property")===(l.property==null?null:l.property)&&c.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&c.getAttribute("charset")===(l.charSet==null?null:l.charSet)){d.splice(m,1);break t}}c=s.createElement(a),wt(c,a,l),s.head.appendChild(c);break;default:throw Error(r(468,a))}c[ft]=e,nt(c),a=c}e.stateNode=a}else Xh(s,e.type,e.stateNode);else e.stateNode=Yh(s,a,e.memoizedProps);else c!==a?(c===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):c.count--,a===null?Xh(s,e.type,e.stateNode):Yh(s,a,e.memoizedProps)):a===null&&e.stateNode!==null&&ur(e,e.memoizedProps,l.memoizedProps)}break;case 27:Mt(t,e),Ut(e),a&512&&(rt||l===null||zl(l,l.return)),l!==null&&a&4&&ur(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Mt(t,e),Ut(e),a&512&&(rt||l===null||zl(l,l.return)),e.flags&32){s=e.stateNode;try{ql(s,"")}catch(se){Le(e,e.return,se)}}a&4&&e.stateNode!=null&&(s=e.memoizedProps,ur(e,s,l!==null?l.memoizedProps:s)),a&1024&&(fr=!0);break;case 6:if(Mt(t,e),Ut(e),a&4){if(e.stateNode===null)throw Error(r(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(se){Le(e,e.return,se)}}break;case 3:if(Ac=null,s=yl,yl=Tc(t.containerInfo),Mt(t,e),yl=s,Ut(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{es(t.containerInfo)}catch(se){Le(e,e.return,se)}fr&&(fr=!1,Xd(e));break;case 4:a=yl,yl=Tc(e.stateNode.containerInfo),Mt(t,e),Ut(e),yl=a;break;case 12:Mt(t,e),Ut(e);break;case 31:Mt(t,e),Ut(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,dc(e,a)));break;case 13:Mt(t,e),Ut(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(mc=kt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,dc(e,a)));break;case 22:s=e.memoizedState!==null;var b=l!==null&&l.memoizedState!==null,_=Jl,U=rt;if(Jl=_||s,rt=U||b,Mt(t,e),rt=U,Jl=_,Ut(e),a&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(l===null||b||Jl||rt||cn(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){b=l=t;try{if(c=b.stateNode,s)d=c.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{m=b.stateNode;var q=b.memoizedProps.style,z=q!=null&&q.hasOwnProperty("display")?q.display:null;m.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(se){Le(b,b.return,se)}}}else if(t.tag===6){if(l===null){b=t;try{b.stateNode.nodeValue=s?"":b.memoizedProps}catch(se){Le(b,b.return,se)}}}else if(t.tag===18){if(l===null){b=t;try{var D=b.stateNode;s?Oh(D,!0):Oh(b.stateNode,!1)}catch(se){Le(b,b.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;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,dc(e,l))));break;case 19:Mt(t,e),Ut(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,dc(e,a)));break;case 30:break;case 21:break;default:Mt(t,e),Ut(e)}}function Ut(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(Md(a)){l=a;break}a=a.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var s=l.stateNode,c=rr(e);fc(e,c,s);break;case 5:var d=l.stateNode;l.flags&32&&(ql(d,""),l.flags&=-33);var m=rr(e);fc(e,m,d);break;case 3:case 4:var b=l.stateNode.containerInfo,_=rr(e);or(e,_,b);break;default:throw Error(r(161))}}catch(U){Le(e,e.return,U)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Xd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Xd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Wl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Hd(e,t.alternate,t),t=t.sibling}function cn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Na(4,t,t.return),cn(t);break;case 1:zl(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Od(t,t.return,l),cn(t);break;case 27:ti(t.stateNode);case 26:case 5:zl(t,t.return),cn(t);break;case 22:t.memoizedState===null&&cn(t);break;case 30:cn(t);break;default:cn(t)}e=e.sibling}}function Fl(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,s=e,c=t,d=c.flags;switch(c.tag){case 0:case 11:case 15:Fl(s,c,l),Qs(4,c);break;case 1:if(Fl(s,c,l),a=c,s=a.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(_){Le(a,a.return,_)}if(a=c,s=a.updateQueue,s!==null){var m=a.stateNode;try{var b=s.shared.hiddenCallbacks;if(b!==null)for(s.shared.hiddenCallbacks=null,s=0;s<b.length;s++)jf(b[s],m)}catch(_){Le(a,a.return,_)}}l&&d&64&&Cd(c),Zs(c,c.return);break;case 27:Ud(c);case 26:case 5:Fl(s,c,l),l&&a===null&&d&4&&Dd(c),Zs(c,c.return);break;case 12:Fl(s,c,l);break;case 31:Fl(s,c,l),l&&d&4&&Gd(s,c);break;case 13:Fl(s,c,l),l&&d&4&&Yd(s,c);break;case 22:c.memoizedState===null&&Fl(s,c,l),Zs(c,c.return);break;case 30:break;default:Fl(s,c,l)}t=t.sibling}}function dr(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Cs(l))}function hr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Cs(e))}function bl(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Qd(e,t,l,a),t=t.sibling}function Qd(e,t,l,a){var s=t.flags;switch(t.tag){case 0:case 11:case 15:bl(e,t,l,a),s&2048&&Qs(9,t);break;case 1:bl(e,t,l,a);break;case 3:bl(e,t,l,a),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Cs(e)));break;case 12:if(s&2048){bl(e,t,l,a),e=t.stateNode;try{var c=t.memoizedProps,d=c.id,m=c.onPostCommit;typeof m=="function"&&m(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){Le(t,t.return,b)}}else bl(e,t,l,a);break;case 31:bl(e,t,l,a);break;case 13:bl(e,t,l,a);break;case 23:break;case 22:c=t.stateNode,d=t.alternate,t.memoizedState!==null?c._visibility&2?bl(e,t,l,a):Vs(e,t):c._visibility&2?bl(e,t,l,a):(c._visibility|=2,$n(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),s&2048&&dr(d,t);break;case 24:bl(e,t,l,a),s&2048&&hr(t.alternate,t);break;default:bl(e,t,l,a)}}function $n(e,t,l,a,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,d=t,m=l,b=a,_=d.flags;switch(d.tag){case 0:case 11:case 15:$n(c,d,m,b,s),Qs(8,d);break;case 23:break;case 22:var U=d.stateNode;d.memoizedState!==null?U._visibility&2?$n(c,d,m,b,s):Vs(c,d):(U._visibility|=2,$n(c,d,m,b,s)),s&&_&2048&&dr(d.alternate,d);break;case 24:$n(c,d,m,b,s),s&&_&2048&&hr(d.alternate,d);break;default:$n(c,d,m,b,s)}t=t.sibling}}function Vs(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,s=a.flags;switch(a.tag){case 22:Vs(l,a),s&2048&&dr(a.alternate,a);break;case 24:Vs(l,a),s&2048&&hr(a.alternate,a);break;default:Vs(l,a)}t=t.sibling}}var Ks=8192;function Xn(e,t,l){if(e.subtreeFlags&Ks)for(e=e.child;e!==null;)Zd(e,t,l),e=e.sibling}function Zd(e,t,l){switch(e.tag){case 26:Xn(e,t,l),e.flags&Ks&&e.memoizedState!==null&&tv(l,yl,e.memoizedState,e.memoizedProps);break;case 5:Xn(e,t,l);break;case 3:case 4:var a=yl;yl=Tc(e.stateNode.containerInfo),Xn(e,t,l),yl=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Ks,Ks=16777216,Xn(e,t,l),Ks=a):Xn(e,t,l));break;default:Xn(e,t,l)}}function Vd(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 Js(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];gt=a,Jd(a,e)}Vd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Kd(e),e=e.sibling}function Kd(e){switch(e.tag){case 0:case 11:case 15:Js(e),e.flags&2048&&Na(9,e,e.return);break;case 3:Js(e);break;case 12:Js(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,hc(e)):Js(e);break;default:Js(e)}}function hc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];gt=a,Jd(a,e)}Vd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Na(8,t,t.return),hc(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,hc(t));break;default:hc(t)}e=e.sibling}}function Jd(e,t){for(;gt!==null;){var l=gt;switch(l.tag){case 0:case 11:case 15:Na(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Cs(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,gt=a;else e:for(l=e;gt!==null;){a=gt;var s=a.sibling,c=a.return;if(Bd(a),a===l){gt=null;break e}if(s!==null){s.return=c,gt=s;break e}gt=c}}}var gg={getCacheForType:function(e){var t=Nt(it),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Nt(it).controller.signal}},vg=typeof WeakMap=="function"?WeakMap:Map,Oe=0,Qe=null,be=null,Se=0,Ue=0,Vt=null,Sa=!1,Qn=!1,mr=!1,Pl=0,et=0,wa=0,un=0,pr=0,Kt=0,Zn=0,Is=null,Lt=null,gr=!1,mc=0,Id=0,pc=1/0,gc=null,ka=null,ht=0,Ta=null,Vn=null,ea=0,vr=0,xr=null,Wd=null,Ws=0,yr=null;function Jt(){return(Oe&2)!==0&&Se!==0?Se&-Se:M.T!==null?kr():jn()}function Fd(){if(Kt===0)if((Se&536870912)===0||ke){var e=ml;ml<<=1,(ml&3932160)===0&&(ml=262144),Kt=e}else Kt=536870912;return e=Qt.current,e!==null&&(e.flags|=32),Kt}function Ht(e,t,l){(e===Qe&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)&&(Kn(e,0),Ea(e,Se,Kt,!1)),Tl(e,l),((Oe&2)===0||e!==Qe)&&(e===Qe&&((Oe&2)===0&&(un|=l),et===4&&Ea(e,Se,Kt,!1)),Cl(e))}function Pd(e,t,l){if((Oe&6)!==0)throw Error(r(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||na(e,t),s=a?bg(e,t):jr(e,t,!0),c=a;do{if(s===0){Qn&&!a&&Ea(e,t,0,!1);break}else{if(l=e.current.alternate,c&&!xg(l)){s=jr(e,t,!1),c=!1;continue}if(s===2){if(c=t,e.errorRecoveryDisabledLanes&c)var d=0;else d=e.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){t=d;e:{var m=e;s=Is;var b=m.current.memoizedState.isDehydrated;if(b&&(Kn(m,d).flags|=256),d=jr(m,d,!1),d!==2){if(mr&&!b){m.errorRecoveryDisabledLanes|=c,un|=c,s=4;break e}c=Lt,Lt=s,c!==null&&(Lt===null?Lt=c:Lt.push.apply(Lt,c))}s=d}if(c=!1,s!==2)continue}}if(s===1){Kn(e,0),Ea(e,t,0,!0);break}e:{switch(a=e,c=s,c){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Ea(a,t,Kt,!Sa);break e;case 2:Lt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(s=mc+300-kt(),10<s)){if(Ea(a,t,Kt,!Sa),Ga(a,0,!0)!==0)break e;ea=t,a.timeoutHandle=Rh(eh.bind(null,a,l,Lt,gc,gr,t,Kt,un,Zn,Sa,c,"Throttled",-0,0),s);break e}eh(a,l,Lt,gc,gr,t,Kt,un,Zn,Sa,c,null,-0,0)}}break}while(!0);Cl(e)}function eh(e,t,l,a,s,c,d,m,b,_,U,q,z,D){if(e.timeoutHandle=-1,q=t.subtreeFlags,q&8192||(q&16785408)===16785408){q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:w},Zd(t,c,q);var se=(c&62914560)===c?mc-kt():(c&4194048)===c?Id-kt():0;if(se=lv(q,se),se!==null){ea=c,e.cancelPendingCommit=se(uh.bind(null,e,t,c,l,a,s,d,m,b,U,q,null,z,D)),Ea(e,c,d,!_);return}}uh(e,t,c,l,a,s,d,m,b)}function xg(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var s=l[a],c=s.getSnapshot;s=s.value;try{if(!$t(c(),s))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 Ea(e,t,l,a){t&=~pr,t&=~un,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var s=t;0<s;){var c=31-Tt(s),d=1<<c;a[c]=-1,s&=~d}l!==0&&Ml(e,l,t)}function vc(){return(Oe&6)===0?(Fs(0),!1):!0}function br(){if(be!==null){if(Ue===0)var e=be.return;else e=be,$l=Fa=null,Uu(e),Hn=null,Ds=0,e=be;for(;e!==null;)zd(e.alternate,e),e=e.return;be=null}}function Kn(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Hg(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ea=0,br(),Qe=e,be=l=Gl(e.current,null),Se=t,Ue=0,Vt=null,Sa=!1,Qn=na(e,t),mr=!1,Zn=Kt=pr=un=wa=et=0,Lt=Is=null,gr=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var s=31-Tt(a),c=1<<s;t|=e[s],a&=~c}return Pl=t,Hi(),l}function th(e,t){ve=null,M.H=Ys,t===Ln||t===Zi?(t=vf(),Ue=3):t===wu?(t=vf(),Ue=4):Ue=t===Fu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Vt=t,be===null&&(et=1,ic(e,sl(t,e.current)))}function lh(){var e=Qt.current;return e===null?!0:(Se&4194048)===Se?rl===null:(Se&62914560)===Se||(Se&536870912)!==0?e===rl:!1}function ah(){var e=M.H;return M.H=Ys,e===null?Ys:e}function nh(){var e=M.A;return M.A=gg,e}function xc(){et=4,Sa||(Se&4194048)!==Se&&Qt.current!==null||(Qn=!0),(wa&134217727)===0&&(un&134217727)===0||Qe===null||Ea(Qe,Se,Kt,!1)}function jr(e,t,l){var a=Oe;Oe|=2;var s=ah(),c=nh();(Qe!==e||Se!==t)&&(gc=null,Kn(e,t)),t=!1;var d=et;e:do try{if(Ue!==0&&be!==null){var m=be,b=Vt;switch(Ue){case 8:br(),d=6;break e;case 3:case 2:case 9:case 6:Qt.current===null&&(t=!0);var _=Ue;if(Ue=0,Vt=null,Jn(e,m,b,_),l&&Qn){d=0;break e}break;default:_=Ue,Ue=0,Vt=null,Jn(e,m,b,_)}}yg(),d=et;break}catch(U){th(e,U)}while(!0);return t&&e.shellSuspendCounter++,$l=Fa=null,Oe=a,M.H=s,M.A=c,be===null&&(Qe=null,Se=0,Hi()),d}function yg(){for(;be!==null;)sh(be)}function bg(e,t){var l=Oe;Oe|=2;var a=ah(),s=nh();Qe!==e||Se!==t?(gc=null,pc=kt()+500,Kn(e,t)):Qn=na(e,t);e:do try{if(Ue!==0&&be!==null){t=be;var c=Vt;t:switch(Ue){case 1:Ue=0,Vt=null,Jn(e,t,c,1);break;case 2:case 9:if(pf(c)){Ue=0,Vt=null,ih(t);break}t=function(){Ue!==2&&Ue!==9||Qe!==e||(Ue=7),Cl(e)},c.then(t,t);break e;case 3:Ue=7;break e;case 4:Ue=5;break e;case 7:pf(c)?(Ue=0,Vt=null,ih(t)):(Ue=0,Vt=null,Jn(e,t,c,7));break;case 5:var d=null;switch(be.tag){case 26:d=be.memoizedState;case 5:case 27:var m=be;if(d?Qh(d):m.stateNode.complete){Ue=0,Vt=null;var b=m.sibling;if(b!==null)be=b;else{var _=m.return;_!==null?(be=_,yc(_)):be=null}break t}}Ue=0,Vt=null,Jn(e,t,c,5);break;case 6:Ue=0,Vt=null,Jn(e,t,c,6);break;case 8:br(),et=6;break e;default:throw Error(r(462))}}jg();break}catch(U){th(e,U)}while(!0);return $l=Fa=null,M.H=a,M.A=s,Oe=l,be!==null?0:(Qe=null,Se=0,Hi(),et)}function jg(){for(;be!==null&&!bi();)sh(be)}function sh(e){var t=_d(e.alternate,e,Pl);e.memoizedProps=e.pendingProps,t===null?yc(e):be=t}function ih(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Sd(l,t,t.pendingProps,t.type,void 0,Se);break;case 11:t=Sd(l,t,t.pendingProps,t.type.render,t.ref,Se);break;case 5:Uu(t);default:zd(l,t),t=be=af(t,Pl),t=_d(l,t,Pl)}e.memoizedProps=e.pendingProps,t===null?yc(e):be=t}function Jn(e,t,l,a){$l=Fa=null,Uu(t),Hn=null,Ds=0;var s=t.return;try{if(rg(e,s,t,l,Se)){et=1,ic(e,sl(l,e.current)),be=null;return}}catch(c){if(s!==null)throw be=s,c;et=1,ic(e,sl(l,e.current)),be=null;return}t.flags&32768?(ke||a===1?e=!0:Qn||(Se&536870912)!==0?e=!1:(Sa=e=!0,(a===2||a===9||a===3||a===6)&&(a=Qt.current,a!==null&&a.tag===13&&(a.flags|=16384))),ch(t,e)):yc(t)}function yc(e){var t=e;do{if((t.flags&32768)!==0){ch(t,Sa);return}e=t.return;var l=dg(t.alternate,t,Pl);if(l!==null){be=l;return}if(t=t.sibling,t!==null){be=t;return}be=t=e}while(t!==null);et===0&&(et=5)}function ch(e,t){do{var l=hg(e.alternate,e);if(l!==null){l.flags&=32767,be=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){be=e;return}be=e=l}while(e!==null);et=6,be=null}function uh(e,t,l,a,s,c,d,m,b){e.cancelPendingCommit=null;do bc();while(ht!==0);if((Oe&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(c=t.lanes|t.childLanes,c|=ru,tl(e,l,c,d,m,b),e===Qe&&(be=Qe=null,Se=0),Vn=t,Ta=e,ea=l,vr=c,xr=s,Wd=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,kg(Pt,function(){return hh(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=M.T,M.T=null,s=K.p,K.p=2,d=Oe,Oe|=4;try{mg(e,t,l)}finally{Oe=d,K.p=s,M.T=a}}ht=1,rh(),oh(),fh()}}function rh(){if(ht===1){ht=0;var e=Ta,t=Vn,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=M.T,M.T=null;var a=K.p;K.p=2;var s=Oe;Oe|=4;try{$d(t,e);var c=Or,d=Ko(e.containerInfo),m=c.focusedElem,b=c.selectionRange;if(d!==m&&m&&m.ownerDocument&&Vo(m.ownerDocument.documentElement,m)){if(b!==null&&nu(m)){var _=b.start,U=b.end;if(U===void 0&&(U=_),"selectionStart"in m)m.selectionStart=_,m.selectionEnd=Math.min(U,m.value.length);else{var q=m.ownerDocument||document,z=q&&q.defaultView||window;if(z.getSelection){var D=z.getSelection(),se=m.textContent.length,de=Math.min(b.start,se),Ye=b.end===void 0?de:Math.min(b.end,se);!D.extend&&de>Ye&&(d=Ye,Ye=de,de=d);var k=Zo(m,de),j=Zo(m,Ye);if(k&&j&&(D.rangeCount!==1||D.anchorNode!==k.node||D.anchorOffset!==k.offset||D.focusNode!==j.node||D.focusOffset!==j.offset)){var A=q.createRange();A.setStart(k.node,k.offset),D.removeAllRanges(),de>Ye?(D.addRange(A),D.extend(j.node,j.offset)):(A.setEnd(j.node,j.offset),D.addRange(A))}}}}for(q=[],D=m;D=D.parentNode;)D.nodeType===1&&q.push({element:D,left:D.scrollLeft,top:D.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<q.length;m++){var H=q[m];H.element.scrollLeft=H.left,H.element.scrollTop=H.top}}Cc=!!Cr,Or=Cr=null}finally{Oe=s,K.p=a,M.T=l}}e.current=t,ht=2}}function oh(){if(ht===2){ht=0;var e=Ta,t=Vn,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=M.T,M.T=null;var a=K.p;K.p=2;var s=Oe;Oe|=4;try{Hd(e,t.alternate,t)}finally{Oe=s,K.p=a,M.T=l}}ht=3}}function fh(){if(ht===4||ht===3){ht=0,rs();var e=Ta,t=Vn,l=ea,a=Wd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ht=5:(ht=0,Vn=Ta=null,dh(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(ka=null),bn(l),t=t.stateNode,pt&&typeof pt.onCommitFiberRoot=="function")try{pt.onCommitFiberRoot(el,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=M.T,s=K.p,K.p=2,M.T=null;try{for(var c=e.onRecoverableError,d=0;d<a.length;d++){var m=a[d];c(m.value,{componentStack:m.stack})}}finally{M.T=t,K.p=s}}(ea&3)!==0&&bc(),Cl(e),s=e.pendingLanes,(l&261930)!==0&&(s&42)!==0?e===yr?Ws++:(Ws=0,yr=e):Ws=0,Fs(0)}}function dh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Cs(t)))}function bc(){return rh(),oh(),fh(),hh()}function hh(){if(ht!==5)return!1;var e=Ta,t=vr;vr=0;var l=bn(ea),a=M.T,s=K.p;try{K.p=32>l?32:l,M.T=null,l=xr,xr=null;var c=Ta,d=ea;if(ht=0,Vn=Ta=null,ea=0,(Oe&6)!==0)throw Error(r(331));var m=Oe;if(Oe|=4,Kd(c.current),Qd(c,c.current,d,l),Oe=m,Fs(0,!1),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot(el,c)}catch{}return!0}finally{K.p=s,M.T=a,dh(e,t)}}function mh(e,t,l){t=sl(l,t),t=Wu(e.stateNode,t,2),e=ya(e,t,2),e!==null&&(Tl(e,2),Cl(e))}function Le(e,t,l){if(e.tag===3)mh(e,e,l);else for(;t!==null;){if(t.tag===3){mh(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(ka===null||!ka.has(a))){e=sl(l,e),l=pd(2),a=ya(t,l,2),a!==null&&(gd(l,a,t,e),Tl(a,2),Cl(a));break}}t=t.return}}function Nr(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new vg;var s=new Set;a.set(t,s)}else s=a.get(t),s===void 0&&(s=new Set,a.set(t,s));s.has(l)||(mr=!0,s.add(l),e=Ng.bind(null,e,t,l),t.then(e,e))}function Ng(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Qe===e&&(Se&l)===l&&(et===4||et===3&&(Se&62914560)===Se&&300>kt()-mc?(Oe&2)===0&&Kn(e,0):pr|=l,Zn===Se&&(Zn=0)),Cl(e)}function ph(e,t){t===0&&(t=hs()),e=Ja(e,t),e!==null&&(Tl(e,t),Cl(e))}function Sg(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),ph(e,l)}function wg(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,s=e.memoizedState;s!==null&&(l=s.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),ph(e,l)}function kg(e,t){return gn(e,t)}var jc=null,In=null,Sr=!1,Nc=!1,wr=!1,Aa=0;function Cl(e){e!==In&&e.next===null&&(In===null?jc=In=e:In=In.next=e),Nc=!0,Sr||(Sr=!0,Eg())}function Fs(e,t){if(!wr&&Nc){wr=!0;do for(var l=!1,a=jc;a!==null;){if(e!==0){var s=a.pendingLanes;if(s===0)var c=0;else{var d=a.suspendedLanes,m=a.pingedLanes;c=(1<<31-Tt(42|e)+1)-1,c&=s&~(d&~m),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(l=!0,yh(a,c))}else c=Se,c=Ga(a,a===Qe?c:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(c&3)===0||na(a,c)||(l=!0,yh(a,c));a=a.next}while(l);wr=!1}}function Tg(){gh()}function gh(){Nc=Sr=!1;var e=0;Aa!==0&&Lg()&&(e=Aa);for(var t=kt(),l=null,a=jc;a!==null;){var s=a.next,c=vh(a,t);c===0?(a.next=null,l===null?jc=s:l.next=s,s===null&&(In=l)):(l=a,(e!==0||(c&3)!==0)&&(Nc=!0)),a=s}ht!==0&&ht!==5||Fs(e),Aa!==0&&(Aa=0)}function vh(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var d=31-Tt(c),m=1<<d,b=s[d];b===-1?((m&l)===0||(m&a)!==0)&&(s[d]=wi(m,t)):b<=t&&(e.expiredLanes|=m),c&=~m}if(t=Qe,l=Se,l=Ga(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Ft(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||na(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Ft(a),bn(l)){case 2:case 8:l=wl;break;case 32:l=Pt;break;case 268435456:l=qa;break;default:l=Pt}return a=xh.bind(null,e),l=gn(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Ft(a),e.callbackPriority=2,e.callbackNode=null,2}function xh(e,t){if(ht!==0&&ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(bc()&&e.callbackNode!==l)return null;var a=Se;return a=Ga(e,e===Qe?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Pd(e,a,t),vh(e,kt()),e.callbackNode!=null&&e.callbackNode===l?xh.bind(null,e):null)}function yh(e,t){if(bc())return null;Pd(e,t,!0)}function Eg(){Bg(function(){(Oe&6)!==0?gn(hl,Tg):gh()})}function kr(){if(Aa===0){var e=Mn;e===0&&(e=aa,aa<<=1,(aa&261888)===0&&(aa=256)),Aa=e}return Aa}function bh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:g(""+e)}function jh(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function Ag(e,t,l,a,s){if(t==="submit"&&l&&l.stateNode===s){var c=bh((s[at]||null).action),d=a.submitter;d&&(t=(t=d[at]||null)?bh(t.formAction):d.getAttribute("formAction"),t!==null&&(c=t,d=null));var m=new Di("action","action",null,a,s);e.push({event:m,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Aa!==0){var b=d?jh(s,d):new FormData(s);Qu(l,{pending:!0,data:b,method:s.method,action:c},null,b)}}else typeof c=="function"&&(m.preventDefault(),b=d?jh(s,d):new FormData(s),Qu(l,{pending:!0,data:b,method:s.method,action:c},c,b))},currentTarget:s}]})}}for(var Tr=0;Tr<uu.length;Tr++){var Er=uu[Tr],_g=Er.toLowerCase(),Rg=Er[0].toUpperCase()+Er.slice(1);xl(_g,"on"+Rg)}xl(Wo,"onAnimationEnd"),xl(Fo,"onAnimationIteration"),xl(Po,"onAnimationStart"),xl("dblclick","onDoubleClick"),xl("focusin","onFocus"),xl("focusout","onBlur"),xl(Zp,"onTransitionRun"),xl(Vp,"onTransitionStart"),xl(Kp,"onTransitionCancel"),xl(ef,"onTransitionEnd"),vl("onMouseEnter",["mouseout","mouseover"]),vl("onMouseLeave",["mouseout","mouseover"]),vl("onPointerEnter",["pointerout","pointerover"]),vl("onPointerLeave",["pointerout","pointerover"]),El("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),El("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),El("onBeforeInput",["compositionend","keypress","textInput","paste"]),El("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),El("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),El("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ps="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),zg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ps));function Nh(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],s=a.event;a=a.listeners;e:{var c=void 0;if(t)for(var d=a.length-1;0<=d;d--){var m=a[d],b=m.instance,_=m.currentTarget;if(m=m.listener,b!==c&&s.isPropagationStopped())break e;c=m,s.currentTarget=_;try{c(s)}catch(U){Li(U)}s.currentTarget=null,c=b}else for(d=0;d<a.length;d++){if(m=a[d],b=m.instance,_=m.currentTarget,m=m.listener,b!==c&&s.isPropagationStopped())break e;c=m,s.currentTarget=_;try{c(s)}catch(U){Li(U)}s.currentTarget=null,c=b}}}}function je(e,t){var l=t[gs];l===void 0&&(l=t[gs]=new Set);var a=e+"__bubble";l.has(a)||(Sh(t,e,2,!1),l.add(a))}function Ar(e,t,l){var a=0;t&&(a|=4),Sh(l,e,a,t)}var Sc="_reactListening"+Math.random().toString(36).slice(2);function _r(e){if(!e[Sc]){e[Sc]=!0,Ti.forEach(function(l){l!=="selectionchange"&&(zg.has(l)||Ar(l,!1,e),Ar(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sc]||(t[Sc]=!0,Ar("selectionchange",!1,t))}}function Sh(e,t,l,a){switch(Fh(t)){case 2:var s=sv;break;case 8:s=iv;break;default:s=Xr}l=s.bind(null,t,l,e),s=void 0,!dt||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),a?s!==void 0?e.addEventListener(t,l,{capture:!0,passive:s}):e.addEventListener(t,l,!0):s!==void 0?e.addEventListener(t,l,{passive:s}):e.addEventListener(t,l,!1)}function Rr(e,t,l,a,s){var c=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var d=a.tag;if(d===3||d===4){var m=a.stateNode.containerInfo;if(m===s)break;if(d===4)for(d=a.return;d!==null;){var b=d.tag;if((b===3||b===4)&&d.stateNode.containerInfo===s)return;d=d.return}for(;m!==null;){if(d=Ul(m),d===null)return;if(b=d.tag,b===5||b===6||b===26||b===27){a=c=d;continue e}m=m.parentNode}}a=a.return}bt(function(){var _=c,U=I(l),q=[];e:{var z=tf.get(e);if(z!==void 0){var D=Di,se=e;switch(e){case"keypress":if(Ci(l)===0)break e;case"keydown":case"keyup":D=wp;break;case"focusin":se="focus",D=Pc;break;case"focusout":se="blur",D=Pc;break;case"beforeblur":case"afterblur":D=Pc;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":D=Ro;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":D=dp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":D=Ep;break;case Wo:case Fo:case Po:D=pp;break;case ef:D=_p;break;case"scroll":case"scrollend":D=op;break;case"wheel":D=zp;break;case"copy":case"cut":case"paste":D=vp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":D=Co;break;case"toggle":case"beforetoggle":D=Op}var de=(t&4)!==0,Ye=!de&&(e==="scroll"||e==="scrollend"),k=de?z!==null?z+"Capture":null:z;de=[];for(var j=_,A;j!==null;){var H=j;if(A=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||A===null||k===null||(H=st(j,k),H!=null&&de.push(ei(j,H,A))),Ye)break;j=j.return}0<de.length&&(z=new D(z,se,null,l,U),q.push({event:z,listeners:de}))}}if((t&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",D=e==="mouseout"||e==="pointerout",z&&l!==G&&(se=l.relatedTarget||l.fromElement)&&(Ul(se)||se[ia]))break e;if((D||z)&&(z=U.window===U?U:(z=U.ownerDocument)?z.defaultView||z.parentWindow:window,D?(se=l.relatedTarget||l.toElement,D=_,se=se?Ul(se):null,se!==null&&(Ye=h(se),de=se.tag,se!==Ye||de!==5&&de!==27&&de!==6)&&(se=null)):(D=null,se=_),D!==se)){if(de=Ro,H="onMouseLeave",k="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(de=Co,H="onPointerLeave",k="onPointerEnter",j="pointer"),Ye=D==null?z:$a(D),A=se==null?z:$a(se),z=new de(H,j+"leave",D,l,U),z.target=Ye,z.relatedTarget=A,H=null,Ul(U)===_&&(de=new de(k,j+"enter",se,l,U),de.target=A,de.relatedTarget=Ye,H=de),Ye=H,D&&se)t:{for(de=Cg,k=D,j=se,A=0,H=k;H;H=de(H))A++;H=0;for(var re=j;re;re=de(re))H++;for(;0<A-H;)k=de(k),A--;for(;0<H-A;)j=de(j),H--;for(;A--;){if(k===j||j!==null&&k===j.alternate){de=k;break t}k=de(k),j=de(j)}de=null}else de=null;D!==null&&wh(q,z,D,de,!1),se!==null&&Ye!==null&&wh(q,Ye,se,de,!0)}}e:{if(z=_?$a(_):window,D=z.nodeName&&z.nodeName.toLowerCase(),D==="select"||D==="input"&&z.type==="file")var Re=qo;else if(Ho(z))if(Go)Re=$p;else{Re=Gp;var ie=qp}else D=z.nodeName,!D||D.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?_&&fa(_.elementType)&&(Re=qo):Re=Yp;if(Re&&(Re=Re(e,_))){Bo(q,Re,l,U);break e}ie&&ie(e,z,_),e==="focusout"&&_&&z.type==="number"&&_.memoizedProps.value!=null&&kn(z,"number",z.value)}switch(ie=_?$a(_):window,e){case"focusin":(Ho(ie)||ie.contentEditable==="true")&&(En=ie,su=_,_s=null);break;case"focusout":_s=su=En=null;break;case"mousedown":iu=!0;break;case"contextmenu":case"mouseup":case"dragend":iu=!1,Jo(q,l,U);break;case"selectionchange":if(Qp)break;case"keydown":case"keyup":Jo(q,l,U)}var xe;if(tu)e:{switch(e){case"compositionstart":var we="onCompositionStart";break e;case"compositionend":we="onCompositionEnd";break e;case"compositionupdate":we="onCompositionUpdate";break e}we=void 0}else Tn?Uo(e,l)&&(we="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(we="onCompositionStart");we&&(Oo&&l.locale!=="ko"&&(Tn||we!=="onCompositionStart"?we==="onCompositionEnd"&&Tn&&(xe=Ao()):(da=U,Ic="value"in da?da.value:da.textContent,Tn=!0)),ie=wc(_,we),0<ie.length&&(we=new zo(we,e,null,l,U),q.push({event:we,listeners:ie}),xe?we.data=xe:(xe=Lo(l),xe!==null&&(we.data=xe)))),(xe=Mp?Up(e,l):Lp(e,l))&&(we=wc(_,"onBeforeInput"),0<we.length&&(ie=new zo("onBeforeInput","beforeinput",null,l,U),q.push({event:ie,listeners:we}),ie.data=xe)),Ag(q,e,_,l,U)}Nh(q,t)})}function ei(e,t,l){return{instance:e,listener:t,currentTarget:l}}function wc(e,t){for(var l=t+"Capture",a=[];e!==null;){var s=e,c=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||c===null||(s=st(e,l),s!=null&&a.unshift(ei(e,s,c)),s=st(e,t),s!=null&&a.push(ei(e,s,c))),e.tag===3)return a;e=e.return}return[]}function Cg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function wh(e,t,l,a,s){for(var c=t._reactName,d=[];l!==null&&l!==a;){var m=l,b=m.alternate,_=m.stateNode;if(m=m.tag,b!==null&&b===a)break;m!==5&&m!==26&&m!==27||_===null||(b=_,s?(_=st(l,c),_!=null&&d.unshift(ei(l,_,b))):s||(_=st(l,c),_!=null&&d.push(ei(l,_,b)))),l=l.return}d.length!==0&&e.push({event:t,listeners:d})}var Og=/\r\n?/g,Dg=/\u0000|\uFFFD/g;function kh(e){return(typeof e=="string"?e:""+e).replace(Og,`
9
+ `).replace(Dg,"")}function Th(e,t){return t=kh(t),kh(e)===t}function Ge(e,t,l,a,s,c){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||ql(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&ql(e,""+a);break;case"className":Qa(e,"class",a);break;case"tabIndex":Qa(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Qa(e,l,a);break;case"style":bs(e,a,c);break;case"data":if(t!=="object"){Qa(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=g(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"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 c=="function"&&(l==="formAction"?(t!=="input"&&Ge(e,t,"name",s.name,s,null),Ge(e,t,"formEncType",s.formEncType,s,null),Ge(e,t,"formMethod",s.formMethod,s,null),Ge(e,t,"formTarget",s.formTarget,s,null)):(Ge(e,t,"encType",s.encType,s,null),Ge(e,t,"method",s.method,s,null),Ge(e,t,"target",s.target,s,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=g(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=w);break;case"onScroll":a!=null&&je("scroll",e);break;case"onScrollEnd":a!=null&&je("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=g(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":je("beforetoggle",e),je("toggle",e),Nn(e,"popover",a);break;case"xlinkActuate":al(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":al(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":al(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":al(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":al(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":al(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":al(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":al(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":al(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Nn(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=js.get(l)||l,Nn(e,l,a))}}function zr(e,t,l,a,s,c){switch(l){case"style":bs(e,a,c);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"children":typeof a=="string"?ql(e,a):(typeof a=="number"||typeof a=="bigint")&&ql(e,""+a);break;case"onScroll":a!=null&&je("scroll",e);break;case"onScrollEnd":a!=null&&je("scrollend",e);break;case"onClick":a!=null&&(e.onclick=w);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!gl.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(s=l.endsWith("Capture"),t=l.slice(2,s?l.length-7:void 0),c=e[at]||null,c=c!=null?c[l]:null,typeof c=="function"&&e.removeEventListener(t,c,s),typeof a=="function")){typeof c!="function"&&c!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,s);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):Nn(e,l,a)}}}function wt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":je("error",e),je("load",e);var a=!1,s=!1,c;for(c in l)if(l.hasOwnProperty(c)){var d=l[c];if(d!=null)switch(c){case"src":a=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ge(e,t,c,d,l,null)}}s&&Ge(e,t,"srcSet",l.srcSet,l,null),a&&Ge(e,t,"src",l.src,l,null);return;case"input":je("invalid",e);var m=c=d=s=null,b=null,_=null;for(a in l)if(l.hasOwnProperty(a)){var U=l[a];if(U!=null)switch(a){case"name":s=U;break;case"type":d=U;break;case"checked":b=U;break;case"defaultChecked":_=U;break;case"value":c=U;break;case"defaultValue":m=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,t));break;default:Ge(e,t,a,U,l,null)}}xs(e,c,m,b,_,d,s,!1);return;case"select":je("invalid",e),a=d=c=null;for(s in l)if(l.hasOwnProperty(s)&&(m=l[s],m!=null))switch(s){case"value":c=m;break;case"defaultValue":d=m;break;case"multiple":a=m;default:Ge(e,t,s,m,l,null)}t=c,l=d,e.multiple=!!a,t!=null?Bl(e,!!a,t,!1):l!=null&&Bl(e,!!a,l,!0);return;case"textarea":je("invalid",e),c=s=a=null;for(d in l)if(l.hasOwnProperty(d)&&(m=l[d],m!=null))switch(d){case"value":a=m;break;case"defaultValue":s=m;break;case"children":c=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(r(91));break;default:Ge(e,t,d,m,l,null)}_i(e,a,s,c);return;case"option":for(b in l)l.hasOwnProperty(b)&&(a=l[b],a!=null)&&(b==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":Ge(e,t,b,a,l,null));return;case"dialog":je("beforetoggle",e),je("toggle",e),je("cancel",e),je("close",e);break;case"iframe":case"object":je("load",e);break;case"video":case"audio":for(a=0;a<Ps.length;a++)je(Ps[a],e);break;case"image":je("error",e),je("load",e);break;case"details":je("toggle",e);break;case"embed":case"source":case"link":je("error",e),je("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(_ in l)if(l.hasOwnProperty(_)&&(a=l[_],a!=null))switch(_){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ge(e,t,_,a,l,null)}return;default:if(fa(t)){for(U in l)l.hasOwnProperty(U)&&(a=l[U],a!==void 0&&zr(e,t,U,a,l,void 0));return}}for(m in l)l.hasOwnProperty(m)&&(a=l[m],a!=null&&Ge(e,t,m,a,l,null))}function Mg(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,c=null,d=null,m=null,b=null,_=null,U=null;for(D in l){var q=l[D];if(l.hasOwnProperty(D)&&q!=null)switch(D){case"checked":break;case"value":break;case"defaultValue":b=q;default:a.hasOwnProperty(D)||Ge(e,t,D,null,a,q)}}for(var z in a){var D=a[z];if(q=l[z],a.hasOwnProperty(z)&&(D!=null||q!=null))switch(z){case"type":c=D;break;case"name":s=D;break;case"checked":_=D;break;case"defaultChecked":U=D;break;case"value":d=D;break;case"defaultValue":m=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(r(137,t));break;default:D!==q&&Ge(e,t,z,D,a,q)}}vs(e,d,m,b,_,U,c,s);return;case"select":D=d=m=z=null;for(c in l)if(b=l[c],l.hasOwnProperty(c)&&b!=null)switch(c){case"value":break;case"multiple":D=b;default:a.hasOwnProperty(c)||Ge(e,t,c,null,a,b)}for(s in a)if(c=a[s],b=l[s],a.hasOwnProperty(s)&&(c!=null||b!=null))switch(s){case"value":z=c;break;case"defaultValue":m=c;break;case"multiple":d=c;default:c!==b&&Ge(e,t,s,c,a,b)}t=m,l=d,a=D,z!=null?Bl(e,!!l,z,!1):!!a!=!!l&&(t!=null?Bl(e,!!l,t,!0):Bl(e,!!l,l?[]:"",!1));return;case"textarea":D=z=null;for(m in l)if(s=l[m],l.hasOwnProperty(m)&&s!=null&&!a.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:Ge(e,t,m,null,a,s)}for(d in a)if(s=a[d],c=l[d],a.hasOwnProperty(d)&&(s!=null||c!=null))switch(d){case"value":z=s;break;case"defaultValue":D=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(r(91));break;default:s!==c&&Ge(e,t,d,s,a,c)}ys(e,z,D);return;case"option":for(var se in l)z=l[se],l.hasOwnProperty(se)&&z!=null&&!a.hasOwnProperty(se)&&(se==="selected"?e.selected=!1:Ge(e,t,se,null,a,z));for(b in a)z=a[b],D=l[b],a.hasOwnProperty(b)&&z!==D&&(z!=null||D!=null)&&(b==="selected"?e.selected=z&&typeof z!="function"&&typeof z!="symbol":Ge(e,t,b,z,a,D));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var de in l)z=l[de],l.hasOwnProperty(de)&&z!=null&&!a.hasOwnProperty(de)&&Ge(e,t,de,null,a,z);for(_ in a)if(z=a[_],D=l[_],a.hasOwnProperty(_)&&z!==D&&(z!=null||D!=null))switch(_){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(137,t));break;default:Ge(e,t,_,z,a,D)}return;default:if(fa(t)){for(var Ye in l)z=l[Ye],l.hasOwnProperty(Ye)&&z!==void 0&&!a.hasOwnProperty(Ye)&&zr(e,t,Ye,void 0,a,z);for(U in a)z=a[U],D=l[U],!a.hasOwnProperty(U)||z===D||z===void 0&&D===void 0||zr(e,t,U,z,a,D);return}}for(var k in l)z=l[k],l.hasOwnProperty(k)&&z!=null&&!a.hasOwnProperty(k)&&Ge(e,t,k,null,a,z);for(q in a)z=a[q],D=l[q],!a.hasOwnProperty(q)||z===D||z==null&&D==null||Ge(e,t,q,z,a,D)}function Eh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ug(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var s=l[a],c=s.transferSize,d=s.initiatorType,m=s.duration;if(c&&m&&Eh(d)){for(d=0,m=s.responseEnd,a+=1;a<l.length;a++){var b=l[a],_=b.startTime;if(_>m)break;var U=b.transferSize,q=b.initiatorType;U&&Eh(q)&&(b=b.responseEnd,d+=U*(b<m?1:(m-_)/(b-_)))}if(--a,t+=8*(c+d)/(s.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 Cr=null,Or=null;function kc(e){return e.nodeType===9?e:e.ownerDocument}function Ah(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 _h(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 Dr(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 Mr=null;function Lg(){var e=window.event;return e&&e.type==="popstate"?e===Mr?!1:(Mr=e,!0):(Mr=null,!1)}var Rh=typeof setTimeout=="function"?setTimeout:void 0,Hg=typeof clearTimeout=="function"?clearTimeout:void 0,zh=typeof Promise=="function"?Promise:void 0,Bg=typeof queueMicrotask=="function"?queueMicrotask:typeof zh<"u"?function(e){return zh.resolve(null).then(e).catch(qg)}:Rh;function qg(e){setTimeout(function(){throw e})}function _a(e){return e==="head"}function Ch(e,t){var l=t,a=0;do{var s=l.nextSibling;if(e.removeChild(l),s&&s.nodeType===8)if(l=s.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(s),es(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")ti(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,ti(l);for(var c=l.firstChild;c;){var d=c.nextSibling,m=c.nodeName;c[ua]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&c.rel.toLowerCase()==="stylesheet"||l.removeChild(c),c=d}}else l==="body"&&ti(e.ownerDocument.body);l=s}while(l);es(t)}function Oh(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function Ur(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Ur(l),Ya(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Gg(e,t,l,a){for(;e.nodeType===1;){var s=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[ua])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=ol(e.nextSibling),e===null)break}return null}function Yg(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=ol(e.nextSibling),e===null))return null;return e}function Dh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ol(e.nextSibling),e===null))return null;return e}function Lr(e){return e.data==="$?"||e.data==="$~"}function Hr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function $g(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function ol(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 Br=null;function Mh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return ol(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Uh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function Lh(e,t,l){switch(t=kc(l),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 ti(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ya(e)}var fl=new Map,Hh=new Set;function Tc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ta=K.d;K.d={f:Xg,r:Qg,D:Zg,C:Vg,L:Kg,m:Jg,X:Wg,S:Ig,M:Fg};function Xg(){var e=ta.f(),t=vc();return e||t}function Qg(e){var t=Ll(e);t!==null&&t.tag===5&&t.type==="form"?td(t):ta.r(e)}var Wn=typeof document>"u"?null:document;function Bh(e,t,l){var a=Wn;if(a&&typeof t=="string"&&t){var s=yt(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof l=="string"&&(s+='[crossorigin="'+l+'"]'),Hh.has(s)||(Hh.add(s),e={rel:e,crossOrigin:l,href:t},a.querySelector(s)===null&&(t=a.createElement("link"),wt(t,"link",e),nt(t),a.head.appendChild(t)))}}function Zg(e){ta.D(e),Bh("dns-prefetch",e,null)}function Vg(e,t){ta.C(e,t),Bh("preconnect",e,t)}function Kg(e,t,l){ta.L(e,t,l);var a=Wn;if(a&&e&&t){var s='link[rel="preload"][as="'+yt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(s+='[imagesrcset="'+yt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(s+='[imagesizes="'+yt(l.imageSizes)+'"]')):s+='[href="'+yt(e)+'"]';var c=s;switch(t){case"style":c=Fn(e);break;case"script":c=Pn(e)}fl.has(c)||(e=R({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),fl.set(c,e),a.querySelector(s)!==null||t==="style"&&a.querySelector(li(c))||t==="script"&&a.querySelector(ai(c))||(t=a.createElement("link"),wt(t,"link",e),nt(t),a.head.appendChild(t)))}}function Jg(e,t){ta.m(e,t);var l=Wn;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+yt(a)+'"][href="'+yt(e)+'"]',c=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Pn(e)}if(!fl.has(c)&&(e=R({rel:"modulepreload",href:e},t),fl.set(c,e),l.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(ai(c)))return}a=l.createElement("link"),wt(a,"link",e),nt(a),l.head.appendChild(a)}}}function Ig(e,t,l){ta.S(e,t,l);var a=Wn;if(a&&e){var s=ra(a).hoistableStyles,c=Fn(e);t=t||"default";var d=s.get(c);if(!d){var m={loading:0,preload:null};if(d=a.querySelector(li(c)))m.loading=5;else{e=R({rel:"stylesheet",href:e,"data-precedence":t},l),(l=fl.get(c))&&qr(e,l);var b=d=a.createElement("link");nt(b),wt(b,"link",e),b._p=new Promise(function(_,U){b.onload=_,b.onerror=U}),b.addEventListener("load",function(){m.loading|=1}),b.addEventListener("error",function(){m.loading|=2}),m.loading|=4,Ec(d,t,a)}d={type:"stylesheet",instance:d,count:1,state:m},s.set(c,d)}}}function Wg(e,t){ta.X(e,t);var l=Wn;if(l&&e){var a=ra(l).hoistableScripts,s=Pn(e),c=a.get(s);c||(c=l.querySelector(ai(s)),c||(e=R({src:e,async:!0},t),(t=fl.get(s))&&Gr(e,t),c=l.createElement("script"),nt(c),wt(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(s,c))}}function Fg(e,t){ta.M(e,t);var l=Wn;if(l&&e){var a=ra(l).hoistableScripts,s=Pn(e),c=a.get(s);c||(c=l.querySelector(ai(s)),c||(e=R({src:e,async:!0,type:"module"},t),(t=fl.get(s))&&Gr(e,t),c=l.createElement("script"),nt(c),wt(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(s,c))}}function qh(e,t,l,a){var s=(s=ce.current)?Tc(s):null;if(!s)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Fn(l.href),l=ra(s).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Fn(l.href);var c=ra(s).hoistableStyles,d=c.get(e);if(d||(s=s.ownerDocument||s,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,d),(c=s.querySelector(li(e)))&&!c._p&&(d.instance=c,d.state.loading=5),fl.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},fl.set(e,l),c||Pg(s,e,l,d.state))),t&&a===null)throw Error(r(528,""));return d}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Pn(l),l=ra(s).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Fn(e){return'href="'+yt(e)+'"'}function li(e){return'link[rel="stylesheet"]['+e+"]"}function Gh(e){return R({},e,{"data-precedence":e.precedence,precedence:null})}function Pg(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),wt(t,"link",l),nt(t),e.head.appendChild(t))}function Pn(e){return'[src="'+yt(e)+'"]'}function ai(e){return"script[async]"+e}function Yh(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+yt(l.href)+'"]');if(a)return t.instance=a,nt(a),a;var s=R({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),nt(a),wt(a,"style",s),Ec(a,l.precedence,e),t.instance=a;case"stylesheet":s=Fn(l.href);var c=e.querySelector(li(s));if(c)return t.state.loading|=4,t.instance=c,nt(c),c;a=Gh(l),(s=fl.get(s))&&qr(a,s),c=(e.ownerDocument||e).createElement("link"),nt(c);var d=c;return d._p=new Promise(function(m,b){d.onload=m,d.onerror=b}),wt(c,"link",a),t.state.loading|=4,Ec(c,l.precedence,e),t.instance=c;case"script":return c=Pn(l.src),(s=e.querySelector(ai(c)))?(t.instance=s,nt(s),s):(a=l,(s=fl.get(c))&&(a=R({},l),Gr(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),nt(s),wt(s,"link",a),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Ec(a,l.precedence,e));return t.instance}function Ec(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,c=s,d=0;d<a.length;d++){var m=a[d];if(m.dataset.precedence===t)c=m;else if(c!==s)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function qr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Gr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ac=null;function $h(e,t,l){if(Ac===null){var a=new Map,s=Ac=new Map;s.set(l,a)}else s=Ac,a=s.get(l),a||(a=new Map,s.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),s=0;s<l.length;s++){var c=l[s];if(!(c[ua]||c[ft]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var d=c.getAttribute(t)||"";d=e+d;var m=a.get(d);m?m.push(c):a.set(d,[c])}}return a}function Xh(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function ev(e,t,l){if(l===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 Qh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function tv(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var s=Fn(a.href),c=t.querySelector(li(s));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=_c.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=c,nt(c);return}c=t.ownerDocument||t,a=Gh(a),(s=fl.get(s))&&qr(a,s),c=c.createElement("link"),nt(c);var d=c;d._p=new Promise(function(m,b){d.onload=m,d.onerror=b}),wt(c,"link",a),l.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=_c.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Yr=0;function lv(e,t){return e.stylesheets&&e.count===0&&zc(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&zc(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&Yr===0&&(Yr=62500*Ug());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&zc(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Yr?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(s)}}:null}function _c(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)zc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Rc=null;function zc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Rc=new Map,t.forEach(av,e),Rc=null,_c.call(e))}function av(e,t){if(!(t.state.loading&4)){var l=Rc.get(e);if(l)var a=l.get(null);else{l=new Map,Rc.set(e,l);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<s.length;c++){var d=s[c];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(l.set(d.dataset.precedence,d),a=d)}a&&l.set(null,a)}s=t.instance,d=s.getAttribute("data-precedence"),c=l.get(d)||a,c===a&&l.set(null,s),l.set(d,s),this.count++,a=_c.bind(this),s.addEventListener("load",a),s.addEventListener("error",a),c?c.parentNode.insertBefore(s,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var ni={$$typeof:he,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function nv(e,t,l,a,s,c,d,m,b){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=sa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sa(0),this.hiddenUpdates=sa(null),this.identifierPrefix=a,this.onUncaughtError=s,this.onCaughtError=c,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function Zh(e,t,l,a,s,c,d,m,b,_,U,q){return e=new nv(e,t,l,d,b,_,U,q,m),t=1,c===!0&&(t|=24),c=Xt(3,null,null,t),e.current=c,c.stateNode=e,t=ju(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:a,isDehydrated:l,cache:t},ku(c),e}function Vh(e){return e?(e=Rn,e):Rn}function Kh(e,t,l,a,s,c){s=Vh(s),a.context===null?a.context=s:a.pendingContext=s,a=xa(t),a.payload={element:l},c=c===void 0?null:c,c!==null&&(a.callback=c),l=ya(e,a,t),l!==null&&(Ht(l,e,t),Us(l,e,t))}function Jh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function $r(e,t){Jh(e,t),(e=e.alternate)&&Jh(e,t)}function Ih(e){if(e.tag===13||e.tag===31){var t=Ja(e,67108864);t!==null&&Ht(t,e,67108864),$r(e,67108864)}}function Wh(e){if(e.tag===13||e.tag===31){var t=Jt();t=ms(t);var l=Ja(e,t);l!==null&&Ht(l,e,t),$r(e,t)}}var Cc=!0;function sv(e,t,l,a){var s=M.T;M.T=null;var c=K.p;try{K.p=2,Xr(e,t,l,a)}finally{K.p=c,M.T=s}}function iv(e,t,l,a){var s=M.T;M.T=null;var c=K.p;try{K.p=8,Xr(e,t,l,a)}finally{K.p=c,M.T=s}}function Xr(e,t,l,a){if(Cc){var s=Qr(a);if(s===null)Rr(e,t,a,Oc,l),Ph(e,a);else if(uv(s,e,t,l,a))a.stopPropagation();else if(Ph(e,a),t&4&&-1<cv.indexOf(e)){for(;s!==null;){var c=Ll(s);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var d=kl(c.pendingLanes);if(d!==0){var m=c;for(m.pendingLanes|=2,m.entangledLanes|=2;d;){var b=1<<31-Tt(d);m.entanglements[1]|=b,d&=~b}Cl(c),(Oe&6)===0&&(pc=kt()+500,Fs(0))}}break;case 31:case 13:m=Ja(c,2),m!==null&&Ht(m,c,2),vc(),$r(c,2)}if(c=Qr(a),c===null&&Rr(e,t,a,Oc,l),c===s)break;s=c}s!==null&&a.stopPropagation()}else Rr(e,t,a,null,l)}}function Qr(e){return e=I(e),Zr(e)}var Oc=null;function Zr(e){if(Oc=null,e=Ul(e),e!==null){var t=h(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=p(t),e!==null)return e;e=null}else if(l===31){if(e=v(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Oc=e,null}function Fh(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(ji()){case hl:return 2;case wl:return 8;case Pt:case os:return 32;case qa:return 268435456;default:return 32}default:return 32}}var Vr=!1,Ra=null,za=null,Ca=null,si=new Map,ii=new Map,Oa=[],cv="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 Ph(e,t){switch(e){case"focusin":case"focusout":Ra=null;break;case"dragenter":case"dragleave":za=null;break;case"mouseover":case"mouseout":Ca=null;break;case"pointerover":case"pointerout":si.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ii.delete(t.pointerId)}}function ci(e,t,l,a,s,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:c,targetContainers:[s]},t!==null&&(t=Ll(t),t!==null&&Ih(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function uv(e,t,l,a,s){switch(t){case"focusin":return Ra=ci(Ra,e,t,l,a,s),!0;case"dragenter":return za=ci(za,e,t,l,a,s),!0;case"mouseover":return Ca=ci(Ca,e,t,l,a,s),!0;case"pointerover":var c=s.pointerId;return si.set(c,ci(si.get(c)||null,e,t,l,a,s)),!0;case"gotpointercapture":return c=s.pointerId,ii.set(c,ci(ii.get(c)||null,e,t,l,a,s)),!0}return!1}function em(e){var t=Ul(e.target);if(t!==null){var l=h(t);if(l!==null){if(t=l.tag,t===13){if(t=p(l),t!==null){e.blockedOn=t,ps(e.priority,function(){Wh(l)});return}}else if(t===31){if(t=v(l),t!==null){e.blockedOn=t,ps(e.priority,function(){Wh(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Qr(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);G=a,l.target.dispatchEvent(a),G=null}else return t=Ll(l),t!==null&&Ih(t),e.blockedOn=l,!1;t.shift()}return!0}function tm(e,t,l){Dc(e)&&l.delete(t)}function rv(){Vr=!1,Ra!==null&&Dc(Ra)&&(Ra=null),za!==null&&Dc(za)&&(za=null),Ca!==null&&Dc(Ca)&&(Ca=null),si.forEach(tm),ii.forEach(tm)}function Mc(e,t){e.blockedOn===t&&(e.blockedOn=null,Vr||(Vr=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,rv)))}var Uc=null;function lm(e){Uc!==e&&(Uc=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){Uc===e&&(Uc=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],s=e[t+2];if(typeof a!="function"){if(Zr(a||l)===null)continue;break}var c=Ll(l);c!==null&&(e.splice(t,3),t-=3,Qu(c,{pending:!0,data:s,method:l.method,action:a},a,s))}}))}function es(e){function t(b){return Mc(b,e)}Ra!==null&&Mc(Ra,e),za!==null&&Mc(za,e),Ca!==null&&Mc(Ca,e),si.forEach(t),ii.forEach(t);for(var l=0;l<Oa.length;l++){var a=Oa[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Oa.length&&(l=Oa[0],l.blockedOn===null);)em(l),l.blockedOn===null&&Oa.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var s=l[a],c=l[a+1],d=s[at]||null;if(typeof c=="function")d||lm(l);else if(d){var m=null;if(c&&c.hasAttribute("formAction")){if(s=c,d=c[at]||null)m=d.formAction;else if(Zr(s)!==null)continue}else m=d.action;typeof m=="function"?l[a+1]=m:(l.splice(a,3),a-=3),lm(l)}}}function am(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(d){return s=d})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function Kr(e){this._internalRoot=e}Lc.prototype.render=Kr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=Jt();Kh(l,a,e,t,null,null)},Lc.prototype.unmount=Kr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Kh(e.current,2,null,e,null,null),vc(),t[ia]=null}};function Lc(e){this._internalRoot=e}Lc.prototype.unstable_scheduleHydration=function(e){if(e){var t=jn();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Oa.length&&t!==0&&t<Oa[l].priority;l++);Oa.splice(l,0,e),l===0&&em(e)}};var nm=i.version;if(nm!=="19.2.8")throw Error(r(527,nm,"19.2.8"));K.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?S(e):null,e=e===null?null:e.stateNode,e};var ov={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hc.isDisabled&&Hc.supportsFiber)try{el=Hc.inject(ov),pt=Hc}catch{}}return ri.createRoot=function(e,t){if(!f(e))throw Error(r(299));var l=!1,a="",s=fd,c=dd,d=hd;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=Zh(e,1,!1,null,null,l,a,null,s,c,d,am),e[ia]=t.current,_r(e),new Kr(t)},ri.hydrateRoot=function(e,t,l){if(!f(e))throw Error(r(299));var a=!1,s="",c=fd,d=dd,m=hd,b=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(s=l.identifierPrefix),l.onUncaughtError!==void 0&&(c=l.onUncaughtError),l.onCaughtError!==void 0&&(d=l.onCaughtError),l.onRecoverableError!==void 0&&(m=l.onRecoverableError),l.formState!==void 0&&(b=l.formState)),t=Zh(e,1,!0,t,l??null,a,s,b,c,d,m,am),t.context=Vh(null),l=t.current,a=Jt(),a=ms(a),s=xa(a),s.callback=null,ya(l,s,a),l=a,t.current.lanes=l,Tl(t,l),Cl(t),e[ia]=t.current,_r(e),new Lc(t)},ri.version="19.2.8",ri}var mm;function bv(){if(mm)return Wr.exports;mm=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(i){console.error(i)}}return u(),Wr.exports=yv(),Wr.exports}var jv=bv();function le({name:u,fill:i,className:o}){return n.jsx("span",{className:`ms material-symbols-rounded${i?" ms-fill":""}${o?` ${o}`:""}`,"aria-hidden":!0,children:u})}function Nv(){const[u,i]=O.useState(()=>window.location.hash.slice(1)||"/");return O.useEffect(()=>{const o=()=>i(window.location.hash.slice(1)||"/");return window.addEventListener("hashchange",o),()=>window.removeEventListener("hashchange",o)},[]),u}function dl(u,i){i?.replace?window.location.replace(`#${u}`):window.location.hash=u}function De({href:u,...i}){return n.jsx("a",{href:`#${u}`,...i})}const Qm="kw-expert";let go=(()=>{try{return localStorage.getItem(Qm)!=="off"}catch{return!0}})();const co=new Set;document.documentElement.dataset.expert=go?"on":"off";function Sv(u){go=u,document.documentElement.dataset.expert=u?"on":"off";try{localStorage.setItem(Qm,u?"on":"off")}catch{}co.forEach(i=>i())}function ns(){return O.useSyncExternalStore(u=>(co.add(u),()=>co.delete(u)),()=>go)}function He(u,i){const[o,r]=O.useState(null),f=O.useRef(u);return f.current=u,O.useEffect(()=>{let h=!0,p;const v=async()=>{try{const y=await fetch(f.current,{cache:"no-store"});y.ok&&h&&r(await y.json())}catch{}h&&(p=setTimeout(v,i?1500:6e3))};return v(),()=>{h=!1,clearTimeout(p)}},[u,i]),o}function gi(u){if(u==null)return"—";const i=Math.round(u/1e3);return i<60?`${i}s`:`${Math.floor(i/60)}m${String(i%60).padStart(2,"0")}s`}function vo(u){return u==null?"—":`$${u.toFixed(2)}`}function Gc(u){return u?u>=1e3?`${(u/1e3).toFixed(1)}k`:String(u):"0"}function xo(u){return u<1024?`${u} B`:u<1024*1024?`${(u/1024).toFixed(1)} K`:`${(u/1024/1024).toFixed(1)} M`}function dn(u){if(!u)return"—";const i=new Date(u),o=new Date,r=i.toDateString()===o.toDateString(),f=i.toTimeString().slice(0,5);return r?f:`${i.toISOString().slice(5,10)} ${f}`}function Zm(u){if(!u)return"—";const i=Date.now()-Date.parse(u);if(i<6e4)return"just now";const o=Math.floor(i/6e4);if(o<60)return`${o}m ago`;const r=Math.floor(o/60);if(r<24)return`${r}h ago`;const f=Math.floor(r/24);return f<7?`${f}d ago`:new Date(u).toISOString().slice(5,10)}function yo({since:u}){const[,i]=O.useState(0);return O.useEffect(()=>{const o=setInterval(()=>i(r=>r+1),1e3);return()=>clearInterval(o)},[]),u?n.jsx("span",{className:"num",children:gi(Date.now()-Date.parse(u))}):null}function Zc({status:u}){return n.jsx("span",{className:`lamp ${u}`})}function wv({status:u}){return n.jsx("span",{className:`status-word ${u}`,children:u})}function bo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var mn=bo();function Vm(u){mn=u}var fn={exec:()=>null};function ts(u){let i=[];return o=>{let r=Math.max(0,Math.min(3,o-1)),f=i[r];return f||(f=u(r),i[r]=f),f}}function Ne(u,i=""){let o=typeof u=="string"?u:u.source,r={replace:(f,h)=>{let p=typeof h=="string"?h:h.source;return p=p.replace(_t.caret,"$1"),o=o.replace(f,p),r},getRegex:()=>new RegExp(o,i)};return r}var kv=((u="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+u)}catch{return!1}})(),_t={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:u=>new RegExp(`^( {0,3}${u})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:ts(u=>new RegExp(`^ {0,${u}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:ts(u=>new RegExp(`^ {0,${u}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:ts(u=>new RegExp(`^ {0,${u}}(?:\`\`\`|~~~)`)),headingBeginRegex:ts(u=>new RegExp(`^ {0,${u}}#`)),htmlBeginRegex:ts(u=>new RegExp(`^ {0,${u}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:ts(u=>new RegExp(`^ {0,${u}}>`))},Tv=/^(?:[ \t]*(?:\n|$))+/,Ev=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Av=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,vi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,_v=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,jo=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Km=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Jm=Ne(Km).replace(/bull/g,jo).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Rv=Ne(Km).replace(/bull/g,jo).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),No=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,zv=/^[^\n]+/,So=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Cv=Ne(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",So).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ov=Ne(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,jo).getRegex(),Vc="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",wo=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Dv=Ne("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",wo).replace("tag",Vc).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Im=u=>Ne(No).replace("hr",vi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",u).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Vc).getRegex(),Mv=Im(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Uv=Im(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Lv=Ne(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Uv).getRegex(),ko={blockquote:Lv,code:Ev,def:Cv,fences:Av,heading:_v,hr:vi,html:Dv,lheading:Jm,list:Ov,newline:Tv,paragraph:Mv,table:fn,text:zv},pm=Ne("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",vi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Vc).getRegex(),Hv={...ko,lheading:Rv,table:pm,paragraph:Ne(No).replace("hr",vi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",pm).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Vc).getRegex()},Bv={...ko,html:Ne(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",wo).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:fn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ne(No).replace("hr",vi).replace("heading",` *#{1,6} *[^
10
+ ]`).replace("lheading",Jm).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},qv=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Gv=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Wm=/^( {2,}|\\)\n(?!\s*$)/,Yv=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,la=/[\p{P}\p{S}]/u,ss=/[\s\p{P}\p{S}]/u,xi=/[^\s\p{P}\p{S}]/u,$v=Ne(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ss).getRegex(),Xv=/[\p{Pi}\p{Ps}"']/u,Fm=/(?!~)[\p{P}\p{S}]/u,Qv=/(?!~)[\s\p{P}\p{S}]/u,Zv=/(?:[^\s\p{P}\p{S}]|~)/u,Vv=Ne(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",kv?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Pm=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Kv=Ne(Pm,"u").replace(/punct/g,la).getRegex(),Jv=Ne(Pm,"u").replace(/punct/g,Fm).getRegex(),Iv=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Wv=Ne(Iv,"u").replace(/openQuote/g,Xv).replace(/punct/g,la).getRegex(),ep="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Fv=Ne(ep,"gu").replace(/notPunctSpace/g,xi).replace(/punctSpace/g,ss).replace(/punct/g,la).getRegex(),Pv=Ne(ep,"gu").replace(/notPunctSpace/g,Zv).replace(/punctSpace/g,Qv).replace(/punct/g,Fm).getRegex(),ex="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",tx=Ne(ex,"gu").replace(/notPunctSpace/g,xi).replace(/punctSpace/g,ss).replace(/punct/g,la).getRegex(),lx=Ne("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,xi).replace(/punctSpace/g,ss).replace(/punct/g,la).getRegex(),ax="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",nx=Ne(ax,"gu").replace(/notPunctSpace/g,xi).replace(/punctSpace/g,ss).replace(/punct/g,la).getRegex(),sx=Ne(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,la).getRegex(),ix="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",cx=Ne(ix,"gu").replace(/notPunctSpace/g,xi).replace(/punctSpace/g,ss).replace(/punct/g,la).getRegex(),ux=Ne(/\\(punct)/,"gu").replace(/punct/g,la).getRegex(),rx=Ne(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ox=Ne(wo).replace("(?:-->|$)","-->").getRegex(),fx=Ne("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ox).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Yc=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,dx=Ne(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Yc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),tp=Ne(/^!?\[(label)\]\[(ref)\]/).replace("label",Yc).replace("ref",So).getRegex(),lp=Ne(/^!?\[(ref)\](?:\[\])?/).replace("ref",So).getRegex(),hx=Ne("reflink|nolink(?!\\()","g").replace("reflink",tp).replace("nolink",lp).getRegex(),gm=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,To={_backpedal:fn,anyPunctuation:ux,autolink:rx,blockSkip:Vv,br:Wm,code:Gv,del:fn,delLDelim:fn,delRDelim:fn,emStrongLDelim:Kv,emStrongRDelimAst:Fv,emStrongRDelimUnd:lx,escape:qv,link:dx,nolink:lp,punctuation:$v,reflink:tp,reflinkSearch:hx,tag:fx,text:Yv,url:fn},mx={...To,emStrongLDelim:Wv,emStrongRDelimAst:tx,emStrongRDelimUnd:nx,link:Ne(/^!?\[(label)\]\((.*?)\)/).replace("label",Yc).getRegex(),reflink:Ne(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Yc).getRegex()},uo={...To,emStrongRDelimAst:Pv,emStrongLDelim:Jv,delLDelim:sx,delRDelim:cx,url:Ne(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",gm).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Ne(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",gm).getRegex()},px={...uo,br:Ne(Wm).replace("{2,}","*").getRegex(),text:Ne(uo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Bc={normal:ko,gfm:Hv,pedantic:Bv},oi={normal:To,gfm:uo,breaks:px,pedantic:mx},gx={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},vm=u=>gx[u];function Ol(u,i){if(i){if(_t.escapeTest.test(u))return u.replace(_t.escapeReplace,vm)}else if(_t.escapeTestNoEncode.test(u))return u.replace(_t.escapeReplaceNoEncode,vm);return u}function xm(u){try{u=encodeURI(u).replace(_t.percentDecode,"%")}catch{return null}return u}function ym(u,i){let o=u.replace(_t.findPipe,(h,p,v)=>{let y=!1,x=p;for(;--x>=0&&v[x]==="\\";)y=!y;return y?"|":" |"}),r=o.split(_t.splitPipe),f=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),i)if(r.length>i)r.splice(i);else for(;r.length<i;)r.push("");for(;f<r.length;f++)r[f]=r[f].trim().replace(_t.slashPipe,"|");return r}function Ma(u,i,o){let r=u.length;if(r===0)return"";let f=0;for(;f<r&&u.charAt(r-f-1)===i;)f++;return u.slice(0,r-f)}function bm(u){let i=u.split(`
11
+ `),o=i.length-1;for(;o>=0&&_t.blankLine.test(i[o]);)o--;return i.length-o<=2?u:i.slice(0,o+1).join(`
12
+ `)}function vx(u,i){if(u.indexOf(i[1])===-1)return-1;let o=0;for(let r=0;r<u.length;r++)if(u[r]==="\\")r++;else if(u[r]===i[0])o++;else if(u[r]===i[1]&&(o--,o<0))return r;return o>0?-2:-1}function xx(u,i=0){let o=i,r="";for(let f of u)if(f===" "){let h=4-o%4;r+=" ".repeat(h),o+=h}else r+=f,o++;return r}function jm(u,i,o,r,f){let h=i.href,p=i.title||null,v=u[1].replace(f.other.outputLinkReplace,"$1"),y=u[0].charAt(0)==="!";r.state.inLink=!0;let x=r.state.linkEmitted,S=r.state.inRawBlock;r.state.linkEmitted=!1;let R=r.inlineTokens(v),T=r.state.linkEmitted;if(r.state.linkEmitted=x,r.state.inLink=!1,!y){if(T){r.state.inRawBlock=S;return}r.state.linkEmitted=!0}return{type:y?"image":"link",raw:o,href:h,title:p,text:v,tokens:R}}function yx(u,i,o){let r=u.match(o.other.indentCodeCompensation);if(r===null)return i;let f=r[1];return i.split(`
13
+ `).map(h=>{let p=h.match(o.other.beginningSpace);if(p===null)return h;let[v]=p;return v.length>=f.length?h.slice(f.length):h}).join(`
14
+ `)}var $c=class{options;rules;lexer;constructor(u){this.options=u||mn}space(u){let i=this.rules.block.newline.exec(u);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(u){let i=this.rules.block.code.exec(u);if(i){let o=this.options.pedantic?i[0]:bm(i[0]),r=o.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:o,codeBlockStyle:"indented",text:r}}}fences(u){let i=this.rules.block.fences.exec(u);if(i){let o=i[0],r=yx(o,i[3]||"",this.rules);return{type:"code",raw:o,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:r}}}heading(u){let i=this.rules.block.heading.exec(u);if(i){let o=i[2].trim();if(this.rules.other.endingHash.test(o)){let r=Ma(o,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(o=r.trim())}return{type:"heading",raw:Ma(i[0],`
15
+ `),depth:i[1].length,text:o,tokens:this.lexer.inline(o)}}}hr(u){let i=this.rules.block.hr.exec(u);if(i)return{type:"hr",raw:Ma(i[0],`
16
+ `)}}blockquote(u){let i=this.rules.block.blockquote.exec(u);if(i){let o=Ma(i[0],`
17
+ `).split(`
18
+ `),r="",f="",h=[];for(;o.length>0;){let p=!1,v=[],y;for(y=0;y<o.length;y++)if(this.rules.other.blockquoteStart.test(o[y]))v.push(o[y]),p=!0;else if(!p)v.push(o[y]);else break;o=o.slice(y);let x=v.join(`
19
+ `),S=x.replace(this.rules.other.blockquoteSetextReplace,`
20
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
21
+ ${x}`:x,f=f?`${f}
22
+ ${S}`:S;let R=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(S,h,!0),this.lexer.state.top=R,o.length===0)break;let T=h.at(-1);if(T?.type==="code")break;if(T?.type==="blockquote"){let L=T,Y=o.join(`
23
+ `),P=L.raw+`
24
+ `+Y.replace(this.rules.other.blockquoteSetextReplace2,""),Z=this.blockquote(P);h[h.length-1]=Z,r=`${r}
25
+ ${Y}`,f=f.substring(0,f.length-L.text.length)+Z.text;break}else if(T?.type==="list"){let L=T,Y=L.raw+`
26
+ `+o.join(`
27
+ `),P=this.list(Y);h[h.length-1]=P,r=r.substring(0,r.length-T.raw.length)+P.raw,f=f.substring(0,f.length-L.raw.length)+P.raw,o=Y.substring(h.at(-1).raw.length).split(`
28
+ `);continue}}return{type:"blockquote",raw:r,tokens:h,text:f}}}list(u){let i=this.rules.block.list.exec(u);if(i){let o=i[1].trim(),r=o.length>1,f={type:"list",raw:"",ordered:r,start:r?+o.slice(0,-1):"",loose:!1,items:[]};o=r?`\\d{1,9}\\${o.slice(-1)}`:`\\${o}`,this.options.pedantic&&(o=r?o:"[*+-]");let h=this.rules.other.listItemRegex(o),p=!1;for(;u;){let y=!1,x="",S="";if(!(i=h.exec(u))||this.rules.block.hr.test(u))break;x=i[0],u=u.substring(x.length);let R=xx(i[2].split(`
29
+ `,1)[0],i[1].length),T=u.split(`
30
+ `,1)[0],L=!R.trim(),Y=0;if(this.options.pedantic?(Y=2,S=R.trimStart()):L?Y=i[1].length+1:(Y=R.search(this.rules.other.nonSpaceChar),Y=Y>4?1:Y,S=R.slice(Y),Y+=i[1].length),L&&this.rules.other.blankLine.test(T)&&(x+=T+`
31
+ `,u=u.substring(T.length+1),y=!0),!y){let P=this.rules.other.nextBulletRegex(Y),Z=this.rules.other.hrRegex(Y),C=this.rules.other.fencesBeginRegex(Y),me=this.rules.other.headingBeginRegex(Y),he=this.rules.other.htmlBeginRegex(Y),ee=this.rules.other.blockquoteBeginRegex(Y);for(;u;){let W=u.split(`
32
+ `,1)[0],$;if(T=W,this.options.pedantic?(T=T.replace(this.rules.other.listReplaceNesting," "),$=T):$=T.replace(this.rules.other.tabCharGlobal," "),C.test(T)||me.test(T)||he.test(T)||ee.test(T)||P.test(T)||Z.test(T))break;if($.search(this.rules.other.nonSpaceChar)>=Y||!T.trim())S+=`
33
+ `+$.slice(Y);else{if(L||R.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(R)||me.test(R)||Z.test(R))break;S+=`
34
+ `+T}L=!T.trim(),x+=W+`
35
+ `,u=u.substring(W.length+1),R=$.slice(Y)}}f.loose||(p?f.loose=!0:this.rules.other.doubleBlankLine.test(x)&&(p=!0)),f.items.push({type:"list_item",raw:x,task:!!this.options.gfm&&this.rules.other.listIsTask.test(S),loose:!1,text:S,tokens:[]}),f.raw+=x}let v=f.items.at(-1);if(v)v.raw=v.raw.trimEnd(),v.text=v.text.trimEnd();else return;f.raw=f.raw.trimEnd();for(let y of f.items)if(this.lexer.state.top=!1,y.tokens=this.lexer.blockTokens(y.text,[]),!f.loose){let x=y.tokens.filter(R=>R.type==="space"),S=x.length>0&&x.some(R=>this.rules.other.anyLine.test(R.raw));f.loose=S}for(let y of f.items){let x=y.tokens[0];if(y.task&&(x?.type==="text"||x?.type==="paragraph")){y.text=y.text.replace(this.rules.other.listReplaceTask,""),x.raw=x.raw.replace(this.rules.other.listReplaceTask,""),x.text=x.text.replace(this.rules.other.listReplaceTask,"");for(let R=this.lexer.inlineQueue.length-1;R>=0;R--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[R].src)){this.lexer.inlineQueue[R].src=this.lexer.inlineQueue[R].src.replace(this.rules.other.listReplaceTask,"");break}let S=this.rules.other.listTaskCheckbox.exec(y.raw);if(S){let R={type:"checkbox",raw:S[0]+" ",checked:S[0]!=="[ ]"};y.checked=R.checked,f.loose?y.tokens[0]&&["paragraph","text"].includes(y.tokens[0].type)&&"tokens"in y.tokens[0]&&y.tokens[0].tokens?(y.tokens[0].raw=R.raw+y.tokens[0].raw,y.tokens[0].text=R.raw+y.tokens[0].text,y.tokens[0].tokens.unshift(R)):y.tokens.unshift({type:"paragraph",raw:R.raw,text:R.raw,tokens:[R]}):y.tokens.unshift(R)}}else y.task&&(y.task=!1)}if(f.loose)for(let y of f.items){y.loose=!0;for(let x of y.tokens)x.type==="text"&&(x.type="paragraph")}return f}}html(u){let i=this.rules.block.html.exec(u);if(i){let o=bm(i[0]);return{type:"html",block:!0,raw:o,pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:o}}}def(u){let i=this.rules.block.def.exec(u);if(i){let o=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",f=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:o,raw:Ma(i[0],`
36
+ `),href:r,title:f}}}table(u){let i=this.rules.block.table.exec(u);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;let o=ym(i[1]),r=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),f=i[3]?.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
37
+ `):[],h={type:"table",raw:Ma(i[0],`
38
+ `),header:[],align:[],rows:[]};if(o.length===r.length){for(let p of r)this.rules.other.tableAlignRight.test(p)?h.align.push("right"):this.rules.other.tableAlignCenter.test(p)?h.align.push("center"):this.rules.other.tableAlignLeft.test(p)?h.align.push("left"):h.align.push(null);for(let p=0;p<o.length;p++)h.header.push({text:o[p],tokens:this.lexer.inline(o[p]),header:!0,align:h.align[p]});for(let p of f)h.rows.push(ym(p,h.header.length).map((v,y)=>({text:v,tokens:this.lexer.inline(v),header:!1,align:h.align[y]})));return h}}lheading(u){let i=this.rules.block.lheading.exec(u);if(i){let o=i[1].trim();return{type:"heading",raw:Ma(i[0],`
39
+ `),depth:i[2].charAt(0)==="="?1:2,text:o,tokens:this.lexer.inline(o)}}}paragraph(u){let i=this.rules.block.paragraph.exec(u);if(i){let o=i[1].charAt(i[1].length-1)===`
40
+ `?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:o,tokens:this.lexer.inline(o)}}}text(u){let i=this.rules.block.text.exec(u);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(u){let i=this.rules.inline.escape.exec(u);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(u){let i=this.rules.inline.tag.exec(u);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(u){let i=this.rules.inline.link.exec(u);if(i){let o=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(o)){if(!this.rules.other.endAngleBracket.test(o))return;let h=Ma(o.slice(0,-1),"\\");if((o.length-h.length)%2===0)return}else{let h=vx(i[2],"()");if(h===-2)return;if(h>-1){let p=(i[0].indexOf("!")===0?5:4)+i[1].length+h;i[2]=i[2].substring(0,h),i[0]=i[0].substring(0,p).trim(),i[3]=""}}let r=i[2],f="";if(this.options.pedantic){let h=this.rules.other.pedanticHrefTitle.exec(r);h&&(r=h[1],f=h[3])}else f=i[3]?i[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(o)?r=r.slice(1):r=r.slice(1,-1)),jm(i,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:f&&f.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(u,i){let o;if((o=this.rules.inline.reflink.exec(u))||(o=this.rules.inline.nolink.exec(u))){let r=(o[2]||o[1]).replace(this.rules.other.multipleSpaceGlobal," "),f=i[r.toLowerCase()];if(!f){let h=o[0].charAt(0);return{type:"text",raw:h,text:h}}return jm(o,f,o[0],this.lexer,this.rules)}}emStrong(u,i,o=""){let r=this.rules.inline.emStrongLDelim.exec(u);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&o.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!o||this.rules.inline.punctuation.exec(o))){let f=[...r[0]].length-1,h,p,v=f,y=0,x=r[0][0],S=o===x,R=x==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(R.lastIndex=0,i=i.slice(-1*u.length+f);(r=R.exec(i))!==null;){if(h=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!h)continue;if(p=[...h].length,r[3]||r[4]){v+=p;continue}else if(r[5]||r[6]){if(f%3&&!((f+p)%3)){y+=p;continue}if(S)break}if(v-=p,v>0)continue;p=Math.min(p,p+v+y);let T=[...r[0]][0].length,L=u.slice(0,f+r.index+T+p);if(Math.min(f,p)%2){let P=L.slice(1,-1);return{type:"em",raw:L,text:P,tokens:this.lexer.inlineTokens(P)}}let Y=L.slice(2,-2);return{type:"strong",raw:L,text:Y,tokens:this.lexer.inlineTokens(Y)}}}}codespan(u){let i=this.rules.inline.code.exec(u);if(i){let o=i[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(o),f=this.rules.other.startingSpaceChar.test(o)&&this.rules.other.endingSpaceChar.test(o);return r&&f&&(o=o.substring(1,o.length-1)),{type:"codespan",raw:i[0],text:o}}}br(u){let i=this.rules.inline.br.exec(u);if(i)return{type:"br",raw:i[0]}}del(u,i,o=""){let r=this.rules.inline.delLDelim.exec(u);if(r&&(!r[1]||!o||this.rules.inline.punctuation.exec(o))){let f=[...r[0]].length-1,h,p,v=f,y=this.rules.inline.delRDelim;for(y.lastIndex=0,i=i.slice(-1*u.length+f);(r=y.exec(i))!==null;){if(h=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!h||(p=[...h].length,p!==f))continue;if(r[3]||r[4]){v+=p;continue}if(v-=p,v>0)continue;p=Math.min(p,p+v);let x=[...r[0]][0].length,S=u.slice(0,f+r.index+x+p),R=S.slice(f,-f);return{type:"del",raw:S,text:R,tokens:this.lexer.inlineTokens(R)}}}}autolink(u){let i=this.rules.inline.autolink.exec(u);if(i){let o,r;return i[2]==="@"?(o=i[1],r="mailto:"+o):(o=i[1],r=o),{type:"link",raw:i[0],text:o,href:r,tokens:[{type:"text",raw:o,text:o}]}}}url(u){let i;if(i=this.rules.inline.url.exec(u)){let o,r;if(i[2]==="@")o=i[0],r="mailto:"+o;else{let f;do f=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])?.[0]??"";while(f!==i[0]);o=i[0],i[1]==="www."?r="http://"+i[0]:r=i[0]}return{type:"link",raw:i[0],text:o,href:r,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(u){let i=this.rules.inline.text.exec(u);if(i){let o=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:o}}}},Nl=class ro{tokens;options;state;inlineQueue;tokenizer;constructor(i){this.tokens=[],this.tokens.links=Object.create(null),this.options=i||mn,this.options.tokenizer=this.options.tokenizer||new $c,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,top:!0};let o={other:_t,block:Bc.normal,inline:oi.normal};this.options.pedantic?(o.block=Bc.pedantic,o.inline=oi.pedantic):this.options.gfm&&(o.block=Bc.gfm,this.options.breaks?o.inline=oi.breaks:o.inline=oi.gfm),this.tokenizer.rules=o}static get rules(){return{block:Bc,inline:oi}}static lex(i,o){return new ro(o).lex(i)}static lexInline(i,o){return new ro(o).inlineTokens(i)}lex(i){i=i.replace(_t.carriageReturn,`
41
+ `),this.blockTokens(i,this.tokens);for(let o=0;o<this.inlineQueue.length;o++){let r=this.inlineQueue[o];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(i,o=[],r=!1){this.tokenizer.lexer=this,this.options.pedantic&&(i=i.replace(_t.tabCharGlobal," ").replace(_t.spaceLine,""));let f=1/0;for(;i;){if(i.length<f)f=i.length;else{this.infiniteLoopError(i.charCodeAt(0));break}let h;if(this.options.extensions?.block?.some(v=>(h=v.call({lexer:this},i,o))?(i=i.substring(h.raw.length),o.push(h),!0):!1))continue;if(h=this.tokenizer.space(i)){i=i.substring(h.raw.length);let v=o.at(-1);h.raw.length===1&&v!==void 0?v.raw+=`
42
+ `:o.push(h);continue}if(h=this.tokenizer.code(i)){i=i.substring(h.raw.length);let v=o.at(-1);v?.type==="paragraph"||v?.type==="text"?(v.raw+=(v.raw.endsWith(`
43
+ `)?"":`
44
+ `)+h.raw,v.text+=`
45
+ `+h.text,this.inlineQueue.at(-1).src=v.text):o.push(h);continue}if(h=this.tokenizer.fences(i)){i=i.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.heading(i)){i=i.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.hr(i)){i=i.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.blockquote(i)){i=i.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.list(i)){i=i.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.html(i)){i=i.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.def(i)){i=i.substring(h.raw.length);let v=o.at(-1);v?.type==="paragraph"||v?.type==="text"?(v.raw+=(v.raw.endsWith(`
46
+ `)?"":`
47
+ `)+h.raw,v.text+=`
48
+ `+h.raw,this.inlineQueue.at(-1).src=v.text):this.tokens.links[h.tag]||(this.tokens.links[h.tag]={href:h.href,title:h.title},o.push(h));continue}if(h=this.tokenizer.table(i)){i=i.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.lheading(i)){i=i.substring(h.raw.length),o.push(h);continue}let p=i;if(this.options.extensions?.startBlock){let v=1/0,y=i.slice(1),x;this.options.extensions.startBlock.forEach(S=>{x=S.call({lexer:this},y),typeof x=="number"&&x>=0&&(v=Math.min(v,x))}),v<1/0&&v>=0&&(p=i.substring(0,v+1))}if(this.state.top&&(h=this.tokenizer.paragraph(p))){let v=o.at(-1);r&&v?.type==="paragraph"?(v.raw+=(v.raw.endsWith(`
49
+ `)?"":`
50
+ `)+h.raw,v.text+=`
51
+ `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=v.text):o.push(h),r=p.length!==i.length,i=i.substring(h.raw.length);continue}if(h=this.tokenizer.text(i)){i=i.substring(h.raw.length);let v=o.at(-1);v?.type==="text"?(v.raw+=(v.raw.endsWith(`
52
+ `)?"":`
53
+ `)+h.raw,v.text+=`
54
+ `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=v.text):o.push(h);continue}if(i){this.infiniteLoopError(i.charCodeAt(0));break}}return this.state.top=!0,o}inline(i,o=[]){return this.inlineQueue.push({src:i,tokens:o}),o}linkInText(i){if(!i.includes("["))return!1;let o=this.tokenizer.rules.inline.link;for(let r of i.matchAll(this.tokenizer.rules.inline.blockSkip))if(o.test(r[0])&&i.charAt(r.index-1)!=="!")return!0;for(let r of i.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let f=r[0],h=f.lastIndexOf("[");if(!(f.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,f.slice(h+1,-1)))&&!(h>1&&this.linkInText(f.slice(1,h-1))))return!0}return!1}inlineTokens(i,o=[]){this.tokenizer.lexer=this;let r=i;if(this.tokens.links&&i.includes("[")){let v=this.tokenizer.rules.inline.reflinkSearch,y=x=>{let S=x.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,x.slice(S+1,-1)))return x;if(S>1&&x.charAt(0)!=="!"){let R=x.slice(1,S-1);if(this.linkInText(R))return"["+R.replace(v,y)+"]["+"a".repeat(x.length-S-2)+"]"}return"["+"a".repeat(x.length-2)+"]"};r=r.replace(v,y)}r=r.replace(this.tokenizer.rules.inline.anyPunctuation,v=>"+".repeat(v.length)),r=r.replace(this.tokenizer.rules.inline.blockSkip,(v,y,x)=>{let S=x?x.length:0;return v.slice(0,S)+"["+"a".repeat(v.length-S-2)+"]"}),r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let f=!1,h="",p=1/0;for(;i;){if(i.length<p)p=i.length;else{this.infiniteLoopError(i.charCodeAt(0));break}f||(h=""),f=!1;let v;if(this.options.extensions?.inline?.some(x=>(v=x.call({lexer:this},i,o))?(i=i.substring(v.raw.length),o.push(v),!0):!1))continue;if(v=this.tokenizer.escape(i)){i=i.substring(v.raw.length),o.push(v);continue}if(v=this.tokenizer.tag(i)){i=i.substring(v.raw.length),o.push(v);continue}if(v=this.tokenizer.link(i)){i=i.substring(v.raw.length),o.push(v);continue}if(v=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(v.raw.length);let x=o.at(-1);v.type==="text"&&x?.type==="text"?(x.raw+=v.raw,x.text+=v.text):o.push(v);continue}if(v=this.tokenizer.emStrong(i,r,h)){i=i.substring(v.raw.length),o.push(v);continue}if(v=this.tokenizer.codespan(i)){i=i.substring(v.raw.length),o.push(v);continue}if(v=this.tokenizer.br(i)){i=i.substring(v.raw.length),o.push(v);continue}if(v=this.tokenizer.del(i,r,h)){i=i.substring(v.raw.length),o.push(v);continue}if(v=this.tokenizer.autolink(i)){i=i.substring(v.raw.length),o.push(v);continue}if(!this.state.inLink&&(v=this.tokenizer.url(i))){i=i.substring(v.raw.length),o.push(v);continue}let y=i;if(this.options.extensions?.startInline){let x=1/0,S=i.slice(1),R;this.options.extensions.startInline.forEach(T=>{R=T.call({lexer:this},S),typeof R=="number"&&R>=0&&(x=Math.min(x,R))}),x<1/0&&x>=0&&(y=i.substring(0,x+1))}if(v=this.tokenizer.inlineText(y)){i=i.substring(v.raw.length),v.raw.slice(-1)!=="_"&&(h=v.raw.slice(-1)),f=!0;let x=o.at(-1);x?.type==="text"?(x.raw+=v.raw,x.text+=v.text):o.push(v);continue}if(i){this.infiniteLoopError(i.charCodeAt(0));break}}return o}infiniteLoopError(i){let o="Infinite loop on byte: "+i;if(this.options.silent)console.error(o);else throw new Error(o)}},Xc=class{options;parser;constructor(u){this.options=u||mn}space(u){return""}code({text:u,lang:i,escaped:o}){let r=(i||"").match(_t.notSpaceStart)?.[0],f=u.replace(_t.endingNewline,"")+`
55
+ `;return r?'<pre><code class="language-'+Ol(r)+'">'+(o?f:Ol(f,!0))+`</code></pre>
56
+ `:"<pre><code>"+(o?f:Ol(f,!0))+`</code></pre>
57
+ `}blockquote({tokens:u}){return`<blockquote>
58
+ ${this.parser.parse(u)}</blockquote>
59
+ `}html({text:u}){return u}def(u){return""}heading({tokens:u,depth:i}){return`<h${i}>${this.parser.parseInline(u)}</h${i}>
60
+ `}hr(u){return`<hr>
61
+ `}list(u){let i=u.ordered,o=u.start,r="";for(let p=0;p<u.items.length;p++){let v=u.items[p];r+=this.listitem(v)}let f=i?"ol":"ul",h=i&&o!==1?' start="'+o+'"':"";return"<"+f+h+`>
62
+ `+r+"</"+f+`>
63
+ `}listitem(u){return`<li>${this.parser.parse(u.tokens)}</li>
64
+ `}checkbox({checked:u}){return"<input "+(u?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:u}){return`<p>${this.parser.parseInline(u)}</p>
65
+ `}table(u){let i="",o="";for(let f=0;f<u.header.length;f++)o+=this.tablecell(u.header[f]);i+=this.tablerow({text:o});let r="";for(let f=0;f<u.rows.length;f++){let h=u.rows[f];o="";for(let p=0;p<h.length;p++)o+=this.tablecell(h[p]);r+=this.tablerow({text:o})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
66
+ <thead>
67
+ `+i+`</thead>
68
+ `+r+`</table>
69
+ `}tablerow({text:u}){return`<tr>
70
+ ${u}</tr>
71
+ `}tablecell(u){let i=this.parser.parseInline(u.tokens),o=u.header?"th":"td";return(u.align?`<${o} align="${u.align}">`:`<${o}>`)+i+`</${o}>
72
+ `}strong({tokens:u}){return`<strong>${this.parser.parseInline(u)}</strong>`}em({tokens:u}){return`<em>${this.parser.parseInline(u)}</em>`}codespan({text:u}){return`<code>${Ol(u,!0)}</code>`}br(u){return"<br>"}del({tokens:u}){return`<del>${this.parser.parseInline(u)}</del>`}link({href:u,title:i,tokens:o}){let r=this.parser.parseInline(o),f=xm(u);if(f===null)return r;u=f;let h='<a href="'+u+'"';return i&&(h+=' title="'+Ol(i)+'"'),h+=">"+r+"</a>",h}image({href:u,title:i,text:o,tokens:r}){r&&(o=this.parser.parseInline(r,this.parser.textRenderer));let f=xm(u);if(f===null)return Ol(o);u=f;let h=`<img src="${u}" alt="${Ol(o)}"`;return i&&(h+=` title="${Ol(i)}"`),h+=">",h}text(u){return"tokens"in u&&u.tokens?this.parser.parseInline(u.tokens):"escaped"in u&&u.escaped?u.text:Ol(u.text)}},Eo=class{strong({text:u}){return u}em({text:u}){return u}codespan({text:u}){return u}del({text:u}){return u}html({text:u}){return u}text({text:u}){return u}link({text:u}){return""+u}image({text:u}){return""+u}br(){return""}checkbox({raw:u}){return u}},Sl=class oo{options;renderer;textRenderer;constructor(i){this.options=i||mn,this.options.renderer=this.options.renderer||new Xc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Eo}static parse(i,o){return new oo(o).parse(i)}static parseInline(i,o){return new oo(o).parseInline(i)}parse(i){this.renderer.parser=this;let o="";for(let r=0;r<i.length;r++){let f=i[r];if(this.options.extensions?.renderers?.[f.type]){let p=f,v=this.options.extensions.renderers[p.type].call({parser:this},p);if(v!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(p.type)){o+=v||"";continue}}let h=f;switch(h.type){case"space":{o+=this.renderer.space(h);break}case"hr":{o+=this.renderer.hr(h);break}case"heading":{o+=this.renderer.heading(h);break}case"code":{o+=this.renderer.code(h);break}case"table":{o+=this.renderer.table(h);break}case"blockquote":{o+=this.renderer.blockquote(h);break}case"list":{o+=this.renderer.list(h);break}case"checkbox":{o+=this.renderer.checkbox(h);break}case"html":{o+=this.renderer.html(h);break}case"def":{o+=this.renderer.def(h);break}case"paragraph":{o+=this.renderer.paragraph(h);break}case"text":{o+=this.renderer.text(h);break}default:{let p='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(p),"";throw new Error(p)}}}return o}parseInline(i,o=this.renderer){this.renderer.parser=this;let r="";for(let f=0;f<i.length;f++){let h=i[f];if(this.options.extensions?.renderers?.[h.type]){let v=this.options.extensions.renderers[h.type].call({parser:this},h);if(v!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(h.type)){r+=v||"";continue}}let p=h;switch(p.type){case"escape":{r+=o.text(p);break}case"html":{r+=o.html(p);break}case"link":{r+=o.link(p);break}case"image":{r+=o.image(p);break}case"checkbox":{r+=o.checkbox(p);break}case"strong":{r+=o.strong(p);break}case"em":{r+=o.em(p);break}case"codespan":{r+=o.codespan(p);break}case"br":{r+=o.br(p);break}case"del":{r+=o.del(p);break}case"text":{r+=o.text(p);break}default:{let v='Token with "'+p.type+'" type was not found.';if(this.options.silent)return console.error(v),"";throw new Error(v)}}}return r}},mi=class{options;block;constructor(u){this.options=u||mn}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(u){return u}postprocess(u){return u}processAllTokens(u){return u}emStrongMask(u){return u}provideLexer(u=this.block){return u?Nl.lex:Nl.lexInline}provideParser(u=this.block){return u?Sl.parse:Sl.parseInline}},bx=class{defaults=bo();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Sl;Renderer=Xc;TextRenderer=Eo;Lexer=Nl;Tokenizer=$c;Hooks=mi;constructor(...u){this.use(...u)}walkTokens(u,i){let o=[];for(let r of u)switch(o=o.concat(i.call(this,r)),r.type){case"table":{let f=r;for(let h of f.header)o=o.concat(this.walkTokens(h.tokens,i));for(let h of f.rows)for(let p of h)o=o.concat(this.walkTokens(p.tokens,i));break}case"list":{let f=r;o=o.concat(this.walkTokens(f.items,i));break}default:{let f=r;this.defaults.extensions?.childTokens?.[f.type]?this.defaults.extensions.childTokens[f.type].forEach(h=>{let p=f[h].flat(1/0);o=o.concat(this.walkTokens(p,i))}):f.tokens&&(o=o.concat(this.walkTokens(f.tokens,i)))}}return o}use(...u){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return u.forEach(o=>{let r={...o};if(r.async=this.defaults.async||r.async||!1,o.extensions&&(o.extensions.forEach(f=>{if(!f.name)throw new Error("extension name required");if("renderer"in f){let h=i.renderers[f.name];h?i.renderers[f.name]=function(...p){let v=f.renderer.apply(this,p);return v===!1&&(v=h.apply(this,p)),v}:i.renderers[f.name]=f.renderer}if("tokenizer"in f){if(!f.level||f.level!=="block"&&f.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let h=i[f.level];h?h.unshift(f.tokenizer):i[f.level]=[f.tokenizer],f.start&&(f.level==="block"?i.startBlock?i.startBlock.push(f.start):i.startBlock=[f.start]:f.level==="inline"&&(i.startInline?i.startInline.push(f.start):i.startInline=[f.start]))}"childTokens"in f&&f.childTokens&&(i.childTokens[f.name]=f.childTokens)}),r.extensions=i),o.renderer){let f=this.defaults.renderer||new Xc(this.defaults);for(let h in o.renderer){if(!(h in f))throw new Error(`renderer '${h}' does not exist`);if(["options","parser"].includes(h))continue;let p=h,v=o.renderer[p],y=f[p];f[p]=(...x)=>{let S=v.apply(f,x);return S===!1&&(S=y.apply(f,x)),S||""}}r.renderer=f}if(o.tokenizer){let f=this.defaults.tokenizer||new $c(this.defaults);for(let h in o.tokenizer){if(!(h in f))throw new Error(`tokenizer '${h}' does not exist`);if(["options","rules","lexer"].includes(h))continue;let p=h,v=o.tokenizer[p],y=f[p];f[p]=(...x)=>{let S=v.apply(f,x);return S===!1&&(S=y.apply(f,x)),S}}r.tokenizer=f}if(o.hooks){let f=this.defaults.hooks||new mi;for(let h in o.hooks){if(!(h in f))throw new Error(`hook '${h}' does not exist`);if(["options","block"].includes(h))continue;let p=h,v=o.hooks[p],y=f[p];mi.passThroughHooks.has(h)?f[p]=x=>{if(this.defaults.async&&mi.passThroughHooksRespectAsync.has(h))return(async()=>{let R=await v.call(f,x);return y.call(f,R)})();let S=v.call(f,x);return y.call(f,S)}:f[p]=(...x)=>{if(this.defaults.async)return(async()=>{let R=await v.apply(f,x);return R===!1&&(R=await y.apply(f,x)),R})();let S=v.apply(f,x);return S===!1&&(S=y.apply(f,x)),S}}r.hooks=f}if(o.walkTokens){let f=this.defaults.walkTokens,h=o.walkTokens;r.walkTokens=function(p){let v=[];return v.push(h.call(this,p)),f&&(v=v.concat(f.call(this,p))),v}}this.defaults={...this.defaults,...r}}),this}setOptions(u){return this.defaults={...this.defaults,...u},this}lexer(u,i){return Nl.lex(u,i??this.defaults)}parser(u,i){return Sl.parse(u,i??this.defaults)}parseMarkdown(u){return(i,o)=>{let r={...o},f={...this.defaults,...r},h=this.onError(!!f.silent,!!f.async);if(this.defaults.async===!0&&r.async===!1)return h(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return h(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return h(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(f.hooks&&(f.hooks.options=f,f.hooks.block=u),f.async)return(async()=>{let p=f.hooks?await f.hooks.preprocess(i):i,v=await(f.hooks?await f.hooks.provideLexer(u):u?Nl.lex:Nl.lexInline)(p,f),y=f.hooks?await f.hooks.processAllTokens(v):v;f.walkTokens&&await Promise.all(this.walkTokens(y,f.walkTokens));let x=await(f.hooks?await f.hooks.provideParser(u):u?Sl.parse:Sl.parseInline)(y,f);return f.hooks?await f.hooks.postprocess(x):x})().catch(h);try{f.hooks&&(i=f.hooks.preprocess(i));let p=(f.hooks?f.hooks.provideLexer(u):u?Nl.lex:Nl.lexInline)(i,f);f.hooks&&(p=f.hooks.processAllTokens(p)),f.walkTokens&&this.walkTokens(p,f.walkTokens);let v=(f.hooks?f.hooks.provideParser(u):u?Sl.parse:Sl.parseInline)(p,f);return f.hooks&&(v=f.hooks.postprocess(v)),v}catch(p){return h(p)}}}onError(u,i){return o=>{if(o.message+=`
73
+ Please report this to https://github.com/markedjs/marked.`,u){let r="<p>An error occurred:</p><pre>"+Ol(o.message+"",!0)+"</pre>";return i?Promise.resolve(r):r}if(i)return Promise.reject(o);throw o}}},hn=new bx;function Ce(u,i){return hn.parse(u,i)}Ce.options=Ce.setOptions=function(u){return hn.setOptions(u),Ce.defaults=hn.defaults,Vm(Ce.defaults),Ce};Ce.getDefaults=bo;Ce.defaults=mn;function jx(...u){return hn.use(...u),Ce.defaults=hn.defaults,Vm(Ce.defaults),Ce}Ce.use=jx;Ce.walkTokens=function(u,i){return hn.walkTokens(u,i)};Ce.parseInline=hn.parseInline;Ce.Parser=Sl;Ce.parser=Sl.parse;Ce.Renderer=Xc;Ce.TextRenderer=Eo;Ce.Lexer=Nl;Ce.lexer=Nl.lex;Ce.Tokenizer=$c;Ce.Hooks=mi;Ce.parse=Ce;Ce.options;Ce.setOptions;Ce.walkTokens;Ce.parseInline;Sl.parse;Nl.lex;function Nm(u,i){(i==null||i>u.length)&&(i=u.length);for(var o=0,r=Array(i);o<i;o++)r[o]=u[o];return r}function Nx(u){if(Array.isArray(u))return u}function Sx(u,i){var o=u==null?null:typeof Symbol<"u"&&u[Symbol.iterator]||u["@@iterator"];if(o!=null){var r,f,h,p,v=[],y=!0,x=!1;try{if(h=(o=o.call(u)).next,i!==0)for(;!(y=(r=h.call(o)).done)&&(v.push(r.value),v.length!==i);y=!0);}catch(S){x=!0,f=S}finally{try{if(!y&&o.return!=null&&(p=o.return(),Object(p)!==p))return}finally{if(x)throw f}}return v}}function wx(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
74
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kx(u,i){return Nx(u)||Sx(u,i)||Tx(u,i)||wx()}function Tx(u,i){if(u){if(typeof u=="string")return Nm(u,i);var o={}.toString.call(u).slice(8,-1);return o==="Object"&&u.constructor&&(o=u.constructor.name),o==="Map"||o==="Set"?Array.from(u):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?Nm(u,i):void 0}}const ap=Object.entries,Sm=Object.setPrototypeOf,Ex=Object.isFrozen,Ax=Object.getPrototypeOf,_x=Object.getOwnPropertyDescriptor;let mt=Object.freeze,vt=Object.seal,ls=Object.create,np=typeof Reflect<"u"&&Reflect,fo=np.apply,ho=np.construct;mt||(mt=function(i){return i});vt||(vt=function(i){return i});fo||(fo=function(i,o){for(var r=arguments.length,f=new Array(r>2?r-2:0),h=2;h<r;h++)f[h-2]=arguments[h];return i.apply(o,f)});ho||(ho=function(i){for(var o=arguments.length,r=new Array(o>1?o-1:0),f=1;f<o;f++)r[f-1]=arguments[f];return new i(...r)});const on=ot(Array.prototype.forEach),Rx=ot(Array.prototype.lastIndexOf),wm=ot(Array.prototype.pop),fi=ot(Array.prototype.push),zx=ot(Array.prototype.splice),as=Array.isArray,pi=ot(String.prototype.toLowerCase),to=ot(String.prototype.toString),km=ot(String.prototype.match),di=ot(String.prototype.replace),Tm=ot(String.prototype.indexOf),Cx=ot(String.prototype.trim),Ox=ot(Number.prototype.toString),Dx=ot(Boolean.prototype.toString),Em=typeof BigInt>"u"?null:ot(BigInt.prototype.toString),Am=typeof Symbol>"u"?null:ot(Symbol.prototype.toString),Bt=ot(Object.prototype.hasOwnProperty),hi=ot(Object.prototype.toString),At=ot(RegExp.prototype.test),rn=Mx(TypeError);function ot(u){return function(i){i instanceof RegExp&&(i.lastIndex=0);for(var o=arguments.length,r=new Array(o>1?o-1:0),f=1;f<o;f++)r[f-1]=arguments[f];return fo(u,i,r)}}function Mx(u){return function(){for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return ho(u,o)}}function Ee(u,i){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:pi;if(Sm&&Sm(u,null),!as(i))return u;let r=i.length;for(;r--;){let f=i[r];if(typeof f=="string"){const h=o(f);h!==f&&(Ex(i)||(i[r]=h),f=h)}u[f]=!0}return u}function Ux(u){for(let i=0;i<u.length;i++)Bt(u,i)||(u[i]=null);return u}function Wt(u){const i=ls(null);for(const r of ap(u)){var o=kx(r,2);const f=o[0],h=o[1];Bt(u,f)&&(as(h)?i[f]=Ux(h):h&&typeof h=="object"&&h.constructor===Object?i[f]=Wt(h):i[f]=h)}return i}function Lx(u){switch(typeof u){case"string":return u;case"number":return Ox(u);case"boolean":return Dx(u);case"bigint":return Em?Em(u):"0";case"symbol":return Am?Am(u):"Symbol()";case"undefined":return hi(u);case"function":case"object":{if(u===null)return hi(u);const i=u,o=jl(i,"toString");if(typeof o=="function"){const r=o(i);return typeof r=="string"?r:hi(r)}return hi(u)}default:return hi(u)}}function jl(u,i){for(;u!==null;){const r=_x(u,i);if(r){if(r.get)return ot(r.get);if(typeof r.value=="function")return ot(r.value)}u=Ax(u)}function o(){return null}return o}function Hx(u){try{return At(u,""),!0}catch{return!1}}const _m=mt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),lo=mt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ao=mt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Bx=mt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),no=mt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),qx=mt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Rm=mt(["#text"]),zm=mt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),so=mt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Cm=mt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),qc=mt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Gx=vt(/{{[\w\W]*|^[\w\W]*}}/g),Yx=vt(/<%[\w\W]*|^[\w\W]*%>/g),$x=vt(/\${[\w\W]*/g),Xx=vt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Qx=vt(/^aria-[\-\w]+$/),Om=vt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Zx=vt(/^(?:\w+script|data):/i),Vx=vt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Kx=vt(/^html$/i),Jx=vt(/^[a-z][.\w]*(-[.\w]+)+$/i),Dm=vt(/<[/\w!]/g),Mm=vt(/<[/\w]/g),Ix=vt(/<\/no(script|embed|frames)/i),Wx=vt(/\/>/i),It={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},sp=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],Fx=mt(Ee({},sp)),Px=(function(){const u={};return on(sp,i=>{u[i]=vt(new RegExp("</"+i+"(?=[\\t\\n\\f\\r />])","i"))}),mt(u)})(),ey=function(){return typeof window>"u"?null:window},ty=function(i,o){if(typeof i!="object"||typeof i.createPolicy!="function")return null;let r=null;const f="data-tt-policy-suffix";o&&o.hasAttribute(f)&&(r=o.getAttribute(f));const h="dompurify"+(r?"#"+r:"");try{return i.createPolicy(h,{createHTML(p){return p},createScriptURL(p){return p}})}catch{return console.warn("TrustedTypes policy "+h+" could not be created."),null}},Um=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ua=function(i,o,r,f){return Bt(i,o)&&as(i[o])?Ee(f.base?Wt(f.base):{},i[o],f.transform):r},io=function(i,o,r){const f=Bt(i,o)?i[o]:void 0;return f&&typeof f=="object"?Wt(f):r()};function ip(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ey();const i=X=>ip(X);if(i.version="3.4.14",i.removed=[],!u||!u.document||u.document.nodeType!==It.document||!u.Element)return i.isSupported=!1,i;let o=u.document;const r=o,f=r.currentScript;u.DocumentFragment;const h=u.HTMLTemplateElement,p=u.Node,v=u.Element,y=u.NodeFilter,x=u.NamedNodeMap;x===void 0&&(u.NamedNodeMap||u.MozNamedAttrMap),u.HTMLFormElement;const S=u.DOMParser,R=u.trustedTypes,T=v.prototype,L=jl(T,"cloneNode"),Y=jl(T,"remove"),P=jl(T,"nextSibling"),Z=jl(T,"childNodes"),C=jl(T,"parentNode"),me=jl(T,"shadowRoot"),he=jl(T,"attributes"),ee=p&&p.prototype?jl(p.prototype,"nodeType"):null,W=p&&p.prototype?jl(p.prototype,"nodeName"):null,$=p&&p.prototype?jl(p.prototype,"ownerDocument"):null,Q=function(g){return ee?ee(g):g.nodeType},F=function(g){return W?W(g):g.nodeName};if(typeof h=="function"){const X=o.createElement("template");X.content&&X.content.ownerDocument&&(o=X.content.ownerDocument)}let ae,ye="",V,ge=!1,Ze=0;const Rt=function(){if(Ze>0)throw rn('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},$e=function(g){Rt(),Ze++;try{return ae.createHTML(g)}finally{Ze--}},M=function(g){Rt(),Ze++;try{return ae.createScriptURL(g)}finally{Ze--}},K=function(){return ge||(V=ty(R,f),ge=!0),V},ue=o,Te=ue.implementation,Ae=ue.createNodeIterator,N=ue.createDocumentFragment,B=ue.getElementsByTagName,J=r.importNode;let E=Um();i.isSupported=typeof ap=="function"&&typeof C=="function"&&Te&&Te.createHTMLDocument!==void 0;const te=Gx,ce=Yx,fe=$x,Je=Xx,Ie=Qx,La=Zx,Ha=Vx,is=Jx;let cs=Om,_e=null;const Ba=Ee({},[..._m,...lo,...ao,...no,...Rm]);let Be=null;const us=Ee({},[...zm,...so,...Cm,...qc]);let qt=Object.seal(ls(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Dl=null,gn=null;const Ft=Object.seal(ls(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let bi=!0,rs=!0,kt=!1,ji=!0,hl=!1,wl=!0,Pt=!1,os=!1,qa=null,vn=null,fs=!1,el=!1,pt=!1,Gt=!1,Tt=!0,Ni=!1;const Si="user-content-";let ds=!0,aa=!1,ml={},pl=null;const kl=Ee({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Ga=null;const na=Ee({},["audio","video","img","source","image","track"]);let wi=null;const hs=Ee({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),sa="http://www.w3.org/1998/Math/MathML",Tl="http://www.w3.org/2000/svg",tl="http://www.w3.org/1999/xhtml";let Ml=tl,xn=!1,yn=null;const ms=Ee({},[sa,Tl,tl],to),bn=mt(["mi","mo","mn","ms","mtext"]);let jn=Ee({},bn);const ps=mt(["annotation-xml"]);let ll=Ee({},ps);const ft=Ee({},["title","style","font","a","script"]);let at=null;const ia=["application/xhtml+xml","text/html"],gs="text/html";let Fe=null,ca=null;const ki=o.createElement("form"),ua=function(g){return g instanceof RegExp||g instanceof Function},Ya=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ca&&ca===g)return;(!g||typeof g!="object")&&(g={}),g=Wt(g),at=ia.indexOf(g.PARSER_MEDIA_TYPE)===-1?gs:g.PARSER_MEDIA_TYPE,Fe=at==="application/xhtml+xml"?to:pi,_e=Ua(g,"ALLOWED_TAGS",Ba,{transform:Fe}),Be=Ua(g,"ALLOWED_ATTR",us,{transform:Fe}),yn=Ua(g,"ALLOWED_NAMESPACES",ms,{transform:to}),wi=Ua(g,"ADD_URI_SAFE_ATTR",hs,{transform:Fe,base:hs}),Ga=Ua(g,"ADD_DATA_URI_TAGS",na,{transform:Fe,base:na}),pl=Ua(g,"FORBID_CONTENTS",kl,{transform:Fe}),Dl=Ua(g,"FORBID_TAGS",Wt({}),{transform:Fe}),gn=Ua(g,"FORBID_ATTR",Wt({}),{transform:Fe}),ml=Bt(g,"USE_PROFILES")?g.USE_PROFILES&&typeof g.USE_PROFILES=="object"?Wt(g.USE_PROFILES):g.USE_PROFILES:!1,bi=g.ALLOW_ARIA_ATTR!==!1,rs=g.ALLOW_DATA_ATTR!==!1,kt=g.ALLOW_UNKNOWN_PROTOCOLS||!1,ji=g.ALLOW_SELF_CLOSE_IN_ATTR!==!1,hl=g.SAFE_FOR_TEMPLATES||!1,wl=g.SAFE_FOR_XML!==!1,Pt=g.WHOLE_DOCUMENT||!1,el=g.RETURN_DOM||!1,pt=g.RETURN_DOM_FRAGMENT||!1,Gt=g.RETURN_TRUSTED_TYPE||!1,fs=g.FORCE_BODY||!1,Tt=g.SANITIZE_DOM!==!1,Ni=g.SANITIZE_NAMED_PROPS||!1,ds=g.KEEP_CONTENT!==!1,aa=g.IN_PLACE||!1,cs=Hx(g.ALLOWED_URI_REGEXP)?g.ALLOWED_URI_REGEXP:Om,Ml=typeof g.NAMESPACE=="string"?g.NAMESPACE:tl,jn=io(g,"MATHML_TEXT_INTEGRATION_POINTS",()=>Ee({},bn)),ll=io(g,"HTML_INTEGRATION_POINTS",()=>Ee({},ps));const w=io(g,"CUSTOM_ELEMENT_HANDLING",()=>ls(null));if(qt=ls(null),Bt(w,"tagNameCheck")&&ua(w.tagNameCheck)&&(qt.tagNameCheck=w.tagNameCheck),Bt(w,"attributeNameCheck")&&ua(w.attributeNameCheck)&&(qt.attributeNameCheck=w.attributeNameCheck),Bt(w,"allowCustomizedBuiltInElements")&&typeof w.allowCustomizedBuiltInElements=="boolean"&&(qt.allowCustomizedBuiltInElements=w.allowCustomizedBuiltInElements),vt(qt),hl&&(rs=!1),pt&&(el=!0),ml&&(_e=Ee({},Rm),Be=ls(null),ml.html===!0&&(Ee(_e,_m),Ee(Be,zm)),ml.svg===!0&&(Ee(_e,lo),Ee(Be,so),Ee(Be,qc)),ml.svgFilters===!0&&(Ee(_e,ao),Ee(Be,so),Ee(Be,qc)),ml.mathMl===!0&&(Ee(_e,no),Ee(Be,Cm),Ee(Be,qc))),Ft.tagCheck=null,Ft.attributeCheck=null,Bt(g,"ADD_TAGS")&&(typeof g.ADD_TAGS=="function"?Ft.tagCheck=g.ADD_TAGS:as(g.ADD_TAGS)&&(_e===Ba&&(_e=Wt(_e)),Ee(_e,g.ADD_TAGS,Fe))),Bt(g,"ADD_ATTR")&&(typeof g.ADD_ATTR=="function"?Ft.attributeCheck=g.ADD_ATTR:as(g.ADD_ATTR)&&(Be===us&&(Be=Wt(Be)),Ee(Be,g.ADD_ATTR,Fe))),Bt(g,"ADD_FORBID_CONTENTS")&&as(g.ADD_FORBID_CONTENTS)&&(pl===kl&&(pl=Wt(pl)),Ee(pl,g.ADD_FORBID_CONTENTS,Fe)),ds&&(_e["#text"]=!0),Pt&&Ee(_e,["html","head","body"]),_e.table&&(Ee(_e,["tbody"]),delete Dl.tbody),g.TRUSTED_TYPES_POLICY){if(typeof g.TRUSTED_TYPES_POLICY.createHTML!="function")throw rn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof g.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw rn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const G=ae;ae=g.TRUSTED_TYPES_POLICY;try{ye=$e("")}catch(I){throw ae=G,I}}else g.TRUSTED_TYPES_POLICY===null?(ae=void 0,ye=""):(ae===void 0&&(ae=K()),ae&&typeof ye=="string"&&(ye=$e("")));mt&&mt(g),ca=g},Ul=Ee({},[...lo,...ao,...Bx]),Ll=Ee({},[...no,...qx]),$a=function(g,w,G){return w.namespaceURI===tl?g==="svg":w.namespaceURI===sa?g==="svg"&&(G==="annotation-xml"||jn[G]):!!Ul[g]},ra=function(g,w,G){return w.namespaceURI===tl?g==="math":w.namespaceURI===Tl?g==="math"&&ll[G]:!!Ll[g]},nt=function(g,w,G){return w.namespaceURI===Tl&&!ll[G]||w.namespaceURI===sa&&!jn[G]?!1:!Ll[g]&&(ft[g]||!Ul[g])},Ti=function(g){let w=C(g);(!w||!w.tagName)&&(w={namespaceURI:Ml,tagName:"template"});const G=pi(g.tagName),I=pi(w.tagName);return yn[g.namespaceURI]?g.namespaceURI===Tl?$a(G,w,I):g.namespaceURI===sa?ra(G,w,I):g.namespaceURI===tl?nt(G,w,I):!!(at==="application/xhtml+xml"&&yn[g.namespaceURI]):!1},gl=function(g){fi(i.removed,{element:g});try{C(g).removeChild(g)}catch{if(Y(g),!C(g))throw rn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},El=function(g,w,G){try{g.removeAttributeNode(w)}catch{try{g.removeAttribute(G)}catch{}}},vl=function(g){Xa(g);const w=Z(g);if(w){const I=[];on(w,ne=>{fi(I,ne)}),on(I,ne=>{try{Y(ne)}catch{}})}const G=he(g);if(G)for(let I=G.length-1;I>=0;--I){const ne=G[I],oe=ne&&ne.name;typeof oe=="string"&&El(g,ne,oe)}},Hl=function(g,w,G){if(!G)try{G=w.getAttributeNode(g)}catch{G=null}fi(i.removed,{attribute:G||null,from:w});try{G?w.removeAttributeNode(G):w.removeAttribute(g)}catch{try{w.removeAttribute(g)}catch{}}if(g==="is")if(el||pt)try{gl(w)}catch{}else try{w.setAttribute(g,"")}catch{}},Ei=function(g){const w=he(g);if(w)for(let G=w.length-1;G>=0;--G){const I=w[G],ne=I&&I.name;typeof ne!="string"||Be[Fe(ne)]||El(g,I,ne)}},Xa=function(g){const w=[g];for(;w.length>0;){const G=w.pop();Q(G)===It.element&&Ei(G);const ne=Z(G);if(ne)for(let oe=ne.length-1;oe>=0;--oe)w.push(ne[oe])}},Ai=function(g,w){return wl?g==="patchsrc"?!0:g==="for"&&w!=="label"&&w!=="output":!1},Nn=function(g){if(!wl)return;const w=[g];for(;w.length>0;){const G=w.pop(),I=Q(G);if(I===It.processingInstruction||I===It.comment&&At(Mm,G.data)){try{Y(G)}catch{}continue}if(I===It.element){const oe=G,Me=Fe(F(G));try{oe.hasAttribute&&oe.hasAttribute("patchsrc")&&oe.removeAttribute("patchsrc"),oe.hasAttribute&&oe.hasAttribute("for")&&Ai("for",Me)&&oe.removeAttribute("for")}catch{}}const ne=Z(G);if(ne)for(let oe=ne.length-1;oe>=0;--oe)w.push(ne[oe])}},Qa=function(g){let w=null,G=null;if(fs)g="<remove></remove>"+g;else{const oe=km(g,/^[\r\n\t ]+/);G=oe&&oe[0]}at==="application/xhtml+xml"&&Ml===tl&&(g='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+g+"</body></html>");const I=ae?$e(g):g;if(Ml===tl)try{w=new S().parseFromString(I,at)}catch{}if(!w||!w.documentElement){w=Te.createDocument(Ml,"template",null);try{w.documentElement.innerHTML=xn?ye:I}catch{}}const ne=w.body||w.documentElement;return g&&G&&ne.insertBefore(o.createTextNode(G),ne.childNodes[0]||null),Ml===tl?B.call(w,Pt?"html":"body")[0]:Pt?w.documentElement:ne},al=function(g){const w=$?$(g):g.ownerDocument;return Ae.call(w||g,g,y.SHOW_ELEMENT|y.SHOW_COMMENT|y.SHOW_TEXT|y.SHOW_PROCESSING_INSTRUCTION|y.SHOW_CDATA_SECTION,null)},xt=function(g){return g=di(g,te," "),g=di(g,ce," "),g=di(g,fe," "),g},Sn=function(g){var w;g.normalize();const G=$?$(g):g.ownerDocument,I=Ae.call(G||g,g,y.SHOW_TEXT|y.SHOW_COMMENT|y.SHOW_CDATA_SECTION|y.SHOW_PROCESSING_INSTRUCTION,null);let ne=I.nextNode();for(;ne;)ne.data=xt(ne.data),ne=I.nextNode();const oe=(w=g.querySelectorAll)===null||w===void 0?void 0:w.call(g,"template");oe&&on(oe,Me=>{Al(Me.content)&&Sn(Me.content)})},wn=function(g){const w=W?W(g):null;return typeof w!="string"||Fe(w)!=="form"?!1:typeof g.nodeName!="string"||typeof g.textContent!="string"||typeof g.removeChild!="function"||g.attributes!==he(g)||typeof g.removeAttribute!="function"||typeof g.setAttribute!="function"||typeof g.namespaceURI!="string"||typeof g.insertBefore!="function"||typeof g.hasChildNodes!="function"||g.nodeType!==ee(g)||g.childNodes!==Z(g)},Al=function(g){if(!ee||typeof g!="object"||g===null)return!1;try{return ee(g)===It.documentFragment}catch{return!1}},oa=function(g){if(!ee||typeof g!="object"||g===null)return!1;try{return typeof ee(g)=="number"}catch{return!1}};function zt(X,g,w){X.length!==0&&on(X,G=>{G.call(i,g,w,ca)})}const Kc=function(g,w){return!!(wl&&g.hasChildNodes()&&!oa(g.firstElementChild)&&At(Dm,g.textContent)&&At(Dm,g.innerHTML)||wl&&g.namespaceURI===tl&&Fx[w]&&(oa(g.firstElementChild)||typeof g.textContent=="string"&&At(Px[w],g.textContent))||g.nodeType===It.processingInstruction||wl&&g.nodeType===It.comment&&At(Mm,g.data))},yt=function(g,w){if(g instanceof RegExp)return At(g,w);if(g instanceof Function){for(var G=arguments.length,I=new Array(G>2?G-2:0),ne=2;ne<G;ne++)I[ne-2]=arguments[ne];return!!g(w,...I)}return!1},vs=function(g,w,G){if(!Dl[w]&&ql(w)&&yt(qt.tagNameCheck,w))return!1;if(ds&&!pl[w]){const I=C(g),ne=Z(g);if(ne&&I){const oe=ne.length;for(let Me=oe-1;Me>=0;--Me){const Xe=g===G?L(ne[Me],!0):ne[Me];I.insertBefore(Xe,P(g))}}}return gl(g),!0},xs=function(g,w,G,I){return g.length===0?w:w===G||w===I?Wt(w):w},kn=function(g,w){return g===w||C(g)!==null?!1:(aa&&Xa(g),!0)},Bl=function(g,w){if(zt(E.beforeSanitizeElements,g,null),kn(g,w))return!0;if(wn(g))return gl(g),!0;const G=Fe(F(g));if(_e=xs(E.uponSanitizeElement,_e,Ba,qa),zt(E.uponSanitizeElement,g,{tagName:G,allowedTags:_e}),kn(g,w))return!0;if(Kc(g,G))return gl(g),!0;if(Dl[G]||!(Ft.tagCheck instanceof Function&&Ft.tagCheck(G))&&!_e[G]){const ne=vs(g,G,w);return ne===!1&&zt(E.afterSanitizeElements,g,null),ne}if(Q(g)===It.element&&!Ti(g)||(G==="noscript"||G==="noembed"||G==="noframes")&&At(Ix,g.innerHTML))return gl(g),!0;if(hl&&g.nodeType===It.text){const ne=xt(g.textContent);g.textContent!==ne&&(fi(i.removed,{element:g.cloneNode()}),g.textContent=ne)}return zt(E.afterSanitizeElements,g,null),!1},ys=function(g,w,G){if(gn[w]||Ai(w,g)||Tt&&(w==="id"||w==="name")&&(G in o||G in ki))return!1;const I=Be[w]||Ft.attributeCheck instanceof Function&&Ft.attributeCheck(w,g);return rs&&At(Je,w)||bi&&At(Ie,w)?!0:I?wi[w]||At(cs,di(G,Ha,""))||(w==="src"||w==="xlink:href"||w==="href")&&g!=="script"&&Tm(G,"data:")===0&&Ga[g]||kt&&!At(La,di(G,Ha,""))?!0:!G:ql(g)&&yt(qt.tagNameCheck,g)&&yt(qt.attributeNameCheck,w,g)||w==="is"&&qt.allowCustomizedBuiltInElements&&yt(qt.tagNameCheck,G)},_i=Ee({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ql=function(g){return!_i[pi(g)]&&At(is,g)},Jc=function(g,w,G,I){if(ae&&typeof R=="object"&&typeof R.getAttributeType=="function"&&!G)switch(R.getAttributeType(g,w)){case"TrustedHTML":return $e(I);case"TrustedScriptURL":return M(I)}return I},Ri=function(g,w,G,I){try{G?g.setAttributeNS(G,w,I):g.setAttribute(w,I),wn(g)?gl(g):wm(i.removed)}catch{Hl(w,g)}},bs=function(g){zt(E.beforeSanitizeAttributes,g,null);const w=g.attributes;if(!w||wn(g))return;Be=xs(E.uponSanitizeAttribute,Be,us,vn);const G={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Be,forceKeepAttr:void 0};let I=w.length;const ne=Fe(g.nodeName);for(;I--;){const oe=w[I],Me=oe.name,Xe=oe.namespaceURI,bt=oe.value,st=Fe(Me),Yt=bt;let dt=Me==="value"?Yt:Cx(Yt);if(G.attrName=st,G.attrValue=dt,G.keepAttr=!0,G.forceKeepAttr=void 0,zt(E.uponSanitizeAttribute,g,G),dt=G.attrValue,Ni&&(st==="id"||st==="name")&&Tm(dt,Si)!==0&&(Hl(Me,g,oe),dt=Si+dt),wl&&At(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,dt)){Hl(Me,g,oe);continue}if(st==="attributename"&&km(dt,"href")){Hl(Me,g,oe);continue}if(!G.forceKeepAttr){if(!G.keepAttr){Hl(Me,g,oe);continue}if(!ji&&At(Wx,dt)){Hl(Me,g,oe);continue}if(hl&&(dt=xt(dt)),!ys(ne,st,dt)){Hl(Me,g,oe);continue}dt=Jc(ne,st,Xe,dt),dt!==Yt&&Ri(g,Me,Xe,dt)}}zt(E.afterSanitizeAttributes,g,null)},fa=function(g){let w=null;const G=al(g);for(zt(E.beforeSanitizeShadowDOM,g,null);w=G.nextNode();)if(zt(E.uponSanitizeShadowNode,w,null),Bl(w,g),bs(w),Al(w.content)&&fa(w.content),Q(w)===It.element){const I=me(w);Al(I)&&(js(I),fa(I))}zt(E.afterSanitizeShadowDOM,g,null)},js=function(g){const w=[{node:g,shadow:null}];for(;w.length>0;){const G=w.pop();if(G.shadow){fa(G.shadow);continue}const I=G.node,oe=Q(I)===It.element,Me=Z(I);if(Me)for(let Xe=Me.length-1;Xe>=0;--Xe)w.push({node:Me[Xe],shadow:null});if(oe){const Xe=W?W(I):null;if(typeof Xe=="string"&&Fe(Xe)==="template"){const bt=I.content;Al(bt)&&w.push({node:bt,shadow:null})}}if(oe){const Xe=me(I);Al(Xe)&&w.push({node:null,shadow:Xe},{node:Xe,shadow:null})}}};return i.sanitize=function(X){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=null,G=null,I=null,ne=null;if(xn=!X,xn&&(X="<!-->"),typeof X!="string"&&!oa(X)&&(X=Lx(X),typeof X!="string"))throw rn("dirty is not a string, aborting");if(!i.isSupported)return X;os?(_e=qa,Be=vn):Ya(g),(E.uponSanitizeElement.length>0||E.uponSanitizeAttribute.length>0)&&(_e=Wt(_e)),E.uponSanitizeAttribute.length>0&&(Be=Wt(Be)),i.removed=[];const oe=aa&&typeof X!="string"&&oa(X);if(oe){Nn(X);const bt=F(X);if(typeof bt=="string"){const st=Fe(bt);if(!_e[st]||Dl[st])throw vl(X),rn("root node is forbidden and cannot be sanitized in-place")}if(wn(X))throw vl(X),rn("root node is clobbered and cannot be sanitized in-place");try{js(X)}catch(st){throw vl(X),st}}else if(oa(X))w=Qa("<!---->"),G=w.ownerDocument.importNode(X,!0),G.nodeType===It.element&&G.nodeName==="BODY"||G.nodeName==="HTML"?w=G:w.appendChild(G),js(G);else{if(!el&&!hl&&!Pt&&X.indexOf("<")===-1)return ae&&Gt?$e(X):X;if(w=Qa(X),!w)return el?null:Gt?ye:""}w&&fs&&gl(w.firstChild);const Me=oe?X:w;try{const bt=al(Me);for(;I=bt.nextNode();)Bl(I,Me),bs(I),Al(I.content)&&fa(I.content)}catch(bt){throw oe&&(vl(X),on(i.removed,st=>{st.element&&Xa(st.element)})),bt}if(oe)return on(i.removed,bt=>{bt.element&&Xa(bt.element)}),hl&&Sn(X),X;if(el){if(hl&&Sn(w),pt)for(ne=N.call(w.ownerDocument);w.firstChild;)ne.appendChild(w.firstChild);else ne=w;return(Be.shadowroot||Be.shadowrootmode)&&(ne=J.call(r,ne,!0)),ne}let Xe=Pt?w.outerHTML:w.innerHTML;return Pt&&_e["!doctype"]&&w.ownerDocument&&w.ownerDocument.doctype&&w.ownerDocument.doctype.name&&At(Kx,w.ownerDocument.doctype.name)&&(Xe="<!DOCTYPE "+w.ownerDocument.doctype.name+`>
75
+ `+Xe),hl&&(Xe=xt(Xe)),ae&&Gt?$e(Xe):Xe},i.setConfig=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ya(X),os=!0,qa=_e,vn=Be},i.clearConfig=function(){ca=null,os=!1,qa=null,vn=null,ae=V,ye=""},i.isValidAttribute=function(X,g,w){ca||Ya({});const G=Fe(X),I=Fe(g);return ys(G,I,w)},i.addHook=function(X,g){typeof g=="function"&&Bt(E,X)&&fi(E[X],g)},i.removeHook=function(X,g){if(Bt(E,X)){if(g!==void 0){const w=Rx(E[X],g);return w===-1?void 0:zx(E[X],w,1)[0]}return wm(E[X])}},i.removeHooks=function(X){Bt(E,X)&&(E[X]=[])},i.removeAllHooks=function(){E=Um()},i}var yi=ip();const ly=[{id:"claude",label:"claude",hint:"Claude Code via ACP"},{id:"codex",label:"codex",hint:"Codex (ChatGPT) via ACP"},{id:"pi",label:"pi",hint:"pi coding agent"}];async function pn(u,i){const r=await(await fetch("/api/chats",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agent:u,scope:i})})).json();r.id&&dl(r.scope?.kind==="team"?`/agents/${encodeURIComponent(r.scope.member)}/chat/${r.id}`:`/agents/chats/${r.id}`)}function ay(){const[u,i]=O.useState("claude"),[o,r]=O.useState(!0),[f,h]=O.useState(!1);return n.jsxs("div",{className:"new-chat",children:[n.jsx("div",{className:"page-head",children:n.jsx("h1",{children:"new chat"})}),n.jsxs("section",{className:"panel new-chat-panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"agent"})}),n.jsx("div",{className:"agent-pick",children:ly.map(p=>n.jsxs("button",{className:`agent-pick-btn ${u===p.id?"active":""}`,onClick:()=>i(p.id),children:[n.jsx("b",{children:p.label}),n.jsx("span",{children:p.hint})]},p.id))}),n.jsx("div",{className:"run-opts",style:{padding:"0 16px 14px"},children:n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:o,onChange:p=>r(p.target.checked)}),"kraftwerk-aware",n.jsx("span",{className:"opt-hint",children:"— agent gets workflows + recent runs as context"})]})}),n.jsx("div",{style:{padding:"0 16px 16px"},children:n.jsx("button",{className:"run-btn",disabled:f,onClick:async()=>{h(!0),await pn(u,{kind:o?"kraftwerk":"general"}),h(!1)},children:f?"starting…":"start chat"})})]})]})}function Lm({id:u}){const[i,o]=O.useState(null),[r,f]=O.useState([]),[h,p]=O.useState(!1);O.useEffect(()=>{let y=!0,x=null;return fetch(`/api/chats/${u}`).then(S=>S.ok?S.json():Promise.reject()).then(S=>{if(!y)return;o(S.meta),f(S.events);const R=S.events[S.events.length-1]?.seq??0;x=new EventSource(`/api/chats/${u}/events?after=${R}`),x.onmessage=T=>{const L=JSON.parse(T.data);f(Y=>Y.some(P=>P.seq===L.seq)?Y:[...Y,L])}}).catch(()=>y&&p(!0)),()=>{y=!1,x?.close()}},[u]);const v=O.useMemo(()=>{for(let y=r.length-1;y>=0;y--){const x=r[y].type;if(x==="user_message")return!0;if(x==="turn_end"||x==="error")return!1}return!1},[r]);return h?n.jsx("div",{className:"empty",children:"chat not found"}):i?n.jsxs("div",{className:"chat-thread",children:[n.jsxs("div",{className:"detail-head",children:[n.jsx("span",{className:`lamp ${v?"running":"ok"}`}),n.jsx("h1",{children:i.title||"new chat"}),n.jsx("span",{className:"chip agent",children:i.agent}),i.scope.kind==="run"&&n.jsx(De,{href:`/runs/${i.scope.runId}`,className:"chip",children:i.scope.runId}),i.scope.kind==="kraftwerk"&&n.jsx("span",{className:"chip",children:"kraftwerk-aware"}),i.scope.kind==="knowledge"&&n.jsxs(De,{href:i.scope.bundle?`/knowledge/${encodeURIComponent(i.scope.bundle)}`:"/knowledge",className:"chip",children:["knowledge",i.scope.bundle?`:${i.scope.bundle}`:""]}),i.scope.kind==="team"&&n.jsxs(De,{href:`/agents/${encodeURIComponent(i.scope.member)}/info`,className:"chip",children:["agent:",i.scope.member]}),n.jsx("span",{className:"rid",title:i.cwd,children:i.cwd})]}),n.jsx(sy,{id:u,events:r,busy:v}),n.jsx(ry,{id:u,busy:v,scope:i.scope})]}):n.jsx("div",{className:"empty",children:"loading…"})}function ny(u){const i=[],o=new Map,r=new Map;for(const f of u){const h=i[i.length-1];switch(f.type){case"user_message":i.push({kind:"user",text:f.text,key:`e${f.seq}`});break;case"text":h?.kind==="agent"?h.text+=f.text:i.push({kind:"agent",text:f.text,key:`e${f.seq}`});break;case"thought":h?.kind==="thought"?h.text+=f.text:i.push({kind:"thought",text:f.text,key:`e${f.seq}`});break;case"tool_call":o.set(f.callId,i.length),i.push({kind:"tool",callId:f.callId,title:f.title,toolKind:f.kind,status:f.status,key:`e${f.seq}`});break;case"tool_update":{const p=o.get(f.callId);if(p!=null){const v=i[p];f.title&&(v.title=f.title),f.status&&(v.status=f.status)}break}case"permission_request":r.set(f.requestId,i.length),i.push({kind:"permission",requestId:f.requestId,title:f.title,options:f.options,resolved:void 0,key:`e${f.seq}`});break;case"permission_resolved":{const p=r.get(f.requestId);p!=null&&(i[p].resolved=f.optionId);break}case"error":i.push({kind:"error",text:f.message,key:`e${f.seq}`});break}}return i}function sy({id:u,events:i,busy:o}){const r=ns(),f=O.useMemo(()=>{const v=ny(i);return r?v:v.filter(y=>y.kind!=="tool"&&y.kind!=="thought")},[i,r]),h=O.useRef(null),p=O.useRef(!0);return O.useEffect(()=>{const v=h.current;v&&p.current&&(v.scrollTop=v.scrollHeight)},[f,o]),n.jsxs("div",{className:"chat-scroll",ref:h,onScroll:v=>{const y=v.currentTarget;p.current=y.scrollHeight-y.scrollTop-y.clientHeight<60},children:[f.length===0&&n.jsx("div",{className:"empty",children:"say something — the agent starts on your first message"}),f.map(v=>n.jsx(cy,{b:v,chatId:u},v.key)),o&&n.jsxs("div",{className:"chat-working",children:[n.jsx("span",{className:"lamp running"})," working…"]})]})}function iy({text:u}){const i=O.useMemo(()=>yi.sanitize(Ce.parse(u,{async:!1})),[u]);return n.jsx("div",{className:"msg agent md-body chat-md",dangerouslySetInnerHTML:{__html:i}})}function cy({b:u,chatId:i}){switch(u.kind){case"user":return n.jsx("div",{className:"msg user",children:u.text});case"agent":return n.jsx(iy,{text:u.text});case"thought":return n.jsxs("details",{className:"msg thought",children:[n.jsx("summary",{children:"thinking"}),n.jsx("div",{children:u.text})]});case"tool":return n.jsxs("div",{className:`tool-card ${u.status??""}`,children:[n.jsx("span",{className:`lamp ${u.status==="completed"?"ok":u.status==="failed"?"failed":"running"}`}),u.toolKind&&n.jsx("span",{className:"chip tool-kind",children:u.toolKind}),n.jsx("span",{className:"tool-title",children:u.title})]});case"permission":return n.jsx(uy,{b:u,chatId:i});case"error":return n.jsxs("div",{className:"msg error",children:[n.jsx(le,{name:"error",className:"ms-sm"})," ",u.text]})}}function uy({b:u,chatId:i}){const[o,r]=O.useState(!1),f=u.resolved===void 0;async function h(p){r(!0),await fetch(`/api/chats/${i}/permission`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({requestId:u.requestId,optionId:p})}).catch(()=>{}),r(!1)}return n.jsxs("div",{className:`perm-card ${f?"pending":""}`,children:[n.jsxs("div",{className:"perm-title",children:[n.jsx("span",{className:"microlabel",children:"permission"})," ",u.title]}),f?n.jsx("div",{className:"perm-actions",children:u.options.map(p=>n.jsx("button",{className:`perm-btn ${p.kind?.startsWith("allow")?"allow":"deny"}`,disabled:o,onClick:()=>h(p.optionId),children:p.name},p.optionId))}):n.jsx("div",{className:"perm-resolved",children:u.resolved?`→ ${u.options.find(p=>p.optionId===u.resolved)?.name??u.resolved}`:"→ dismissed"})]})}function ry({id:u,busy:i,scope:o}){const[r,f]=O.useState(""),[h,p]=O.useState([]),[v,y]=O.useState(0),[x,S]=O.useState(!1);O.useEffect(()=>{let C=!0;return(async()=>{try{let he=(await fetch("/api/skills").then(ee=>ee.json())).skills??[];if(o?.kind==="team"){const[ee,W]=await Promise.all([fetch(`/api/team/${encodeURIComponent(o.member)}`).then(F=>F.ok?F.json():null).catch(()=>null),fetch(`/api/team/${encodeURIComponent(o.member)}/skills`).then(F=>F.ok?F.json():null).catch(()=>null)]);if(ee&&Array.isArray(ee.skills)){const F=new Set(ee.skills.map(ae=>ae.toLowerCase()));he=he.filter(ae=>F.has(ae.name.toLowerCase()))}const $=W?.skills??[],Q=new Set($.map(F=>F.name.toLowerCase()));he=[...$,...he.filter(F=>!Q.has(F.name.toLowerCase()))]}C&&p(he)}catch{}})(),()=>{C=!1}},[u]);const R=/^\/([\w-]*)$/.exec(r)?.[1],T=R!==void 0&&!x?h.filter(C=>C.name.toLowerCase().startsWith(R.toLowerCase())):[],L=T.length>0,Y=Math.min(v,T.length-1);function P(C){f(`/${C.name} `),y(0)}async function Z(){const C=r.trim();!C||i||(f(""),await fetch(`/api/chats/${u}/message`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:C})}).catch(()=>{}))}return n.jsxs("div",{className:"composer",children:[L&&n.jsx("div",{className:"skill-menu",children:T.map((C,me)=>n.jsxs("button",{className:me===Y?"active":"",onMouseDown:he=>{he.preventDefault(),P(C)},children:[n.jsxs("b",{children:["/",C.name]}),C.description&&n.jsxs("span",{children:[" — ",C.description]}),n.jsx("span",{className:"skill-src",children:C.source})]},C.name))}),n.jsx("textarea",{value:r,placeholder:i?"agent is working…":"message · Enter to send, Shift+Enter for newline, / for skills",rows:Math.min(6,Math.max(1,r.split(`
76
+ `).length)),onChange:C=>{f(C.target.value),y(0),S(!1)},onKeyDown:C=>{if(L){if(C.key==="ArrowDown")return C.preventDefault(),y((Y+1)%T.length);if(C.key==="ArrowUp")return C.preventDefault(),y((Y-1+T.length)%T.length);if(C.key==="Tab"||C.key==="Enter")return C.preventDefault(),P(T[Y]);if(C.key==="Escape")return C.preventDefault(),S(!0)}C.key==="Enter"&&!C.shiftKey&&(C.preventDefault(),Z())}}),i?n.jsxs("button",{className:"stop-btn",onClick:()=>fetch(`/api/chats/${u}/cancel`,{method:"POST"}).catch(()=>{}),children:[n.jsx(le,{name:"stop",className:"ms-sm"})," stop"]}):n.jsxs("button",{className:"run-btn",disabled:!r.trim(),onClick:Z,children:[n.jsx(le,{name:"send",className:"ms-sm"})," send"]})]})}function oy({id:u}){const i=He("/api/runs",!0),o=i?.runs??[];return n.jsxs("div",{className:"runs-screen",children:[n.jsxs("aside",{className:"runs-side",children:[n.jsxs("div",{className:"side-head",children:[n.jsx("span",{className:"microlabel",children:"runs"}),n.jsx("span",{className:"spacer"}),n.jsx("span",{className:"microlabel num",children:o.length})]}),n.jsxs("div",{className:"side-list",children:[o.map(r=>n.jsx(fy,{r,active:r.id===u},r.id)),i&&o.length===0&&n.jsx("div",{className:"viewer-note",children:"no runs yet"})]})]}),n.jsx("div",{className:"runs-main",children:n.jsx(dy,{id:u},u)})]})}function fy({r:u,active:i}){return n.jsxs(De,{href:`/runs/${u.id}`,className:`side-row ${i?"active":""}`,children:[n.jsx(Zc,{status:u.status}),n.jsxs("div",{className:"side-row-body",children:[n.jsxs("div",{className:"side-row-top",children:[n.jsx("span",{className:"side-wf",children:u.workflow??"unknown"}),n.jsx("span",{className:"side-when num",children:dn(u.startedAt)})]}),n.jsxs("div",{className:"side-row-sub",children:[n.jsx("span",{className:"side-req",title:u.request,children:u.status==="running"&&u.currentPhase?`${u.currentPhase}`:u.request??""}),n.jsx("span",{className:"side-meta num",children:u.status==="running"?n.jsx(yo,{since:u.startedAt}):gi(u.durationMs)})]})]})]})}function dy({id:u}){const i=He(`/api/runs/${u}`,!0),o=i?.status==="running",[r,f]=O.useState(null),[h,p]=O.useState(!1),v=ns();if(!i)return n.jsx("div",{className:"empty",children:"loading…"});const y=i.files.some(T=>T.name==="runner.json"),x=r??(o?"run":"artifacts"),S=v?i.files.length:i.files.filter(T=>!Qc(T.name)).length;async function R(){p(!0),await fetch(`/api/runs/${u}/stop`,{method:"POST"}).catch(()=>{})}return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"detail-head",children:[n.jsx(Zc,{status:i.status}),n.jsx("h1",{children:i.workflow?n.jsx(De,{href:`/workflows/${encodeURIComponent(i.workflow)}`,title:"open workflow",children:i.workflow}):"unknown workflow"}),n.jsx(wv,{status:i.status}),y&&n.jsxs("span",{className:"chip sandbox-chip",children:[n.jsx(le,{name:"science",className:"ms-sm"})," sandbox"]}),n.jsx("span",{className:"rid",children:u.replace(/^run-/,"")}),o&&y&&n.jsx("button",{className:"stop-btn",onClick:R,disabled:h,children:h?"stopping…":n.jsxs(n.Fragment,{children:[n.jsx(le,{name:"stop",className:"ms-sm"})," stop"]})}),n.jsx("span",{className:"spacer"}),n.jsx("button",{className:"open-raw",title:"chat with an agent about this run",onClick:()=>{pn("claude",{kind:"run",runId:u})},children:"⌬ discuss"}),n.jsxs("nav",{className:"tabs",children:[n.jsx("button",{className:x==="run"?"active":"",onClick:()=>f("run"),children:"run"}),n.jsxs("button",{className:x==="artifacts"?"active":"",onClick:()=>f("artifacts"),children:["artifacts ",n.jsxs("span",{className:"num",children:["(",S,")"]})]})]})]}),i.request&&n.jsx("p",{className:"detail-req",children:i.request}),x==="run"?n.jsx(hy,{run:i,live:o}):n.jsx(vy,{id:u,files:i.files,live:o})]})}function hy({run:u,live:i}){return n.jsxs("div",{className:"run-tab",children:[n.jsxs("div",{className:"statgrid",children:[n.jsxs("div",{className:"stat",children:[n.jsx("div",{className:"microlabel",children:"phases"}),n.jsxs("div",{className:"v num",children:[u.phasesDone,u.phasesTotal!=null?` / ${u.phasesTotal}`:""]})]}),n.jsxs("div",{className:"stat",children:[n.jsx("div",{className:"microlabel",children:"duration"}),n.jsx("div",{className:"v num",children:i?n.jsx(yo,{since:u.startedAt}):gi(u.durationMs)})]}),n.jsxs("div",{className:"stat",children:[n.jsx("div",{className:"microlabel",children:"cost"}),n.jsx("div",{className:"v num",children:vo(u.costUsd??my(u.phases))})]}),n.jsxs("div",{className:"stat",children:[n.jsx("div",{className:"microlabel",children:"tokens in / out"}),n.jsxs("div",{className:"v num",children:[Gc(Hm(u.phases,"tokensIn"))," / ",Gc(Hm(u.phases,"tokensOut"))]})]})]}),n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"phase timeline"}),n.jsx("span",{className:"spacer"}),i&&n.jsxs("span",{className:"live-note",children:[n.jsx("span",{className:"lamp running"})," live · polling"]})]}),n.jsx("div",{className:"phases",children:u.phases.map(o=>n.jsx(py,{p:o},o.phase))})]})]})}function Hm(u,i){return u.reduce((o,r)=>o+(r[i]??0),0)}function my(u){return u.reduce((i,o)=>i+(o.costUsd??0),0)}function py({p:u}){const i=u.gates.filter(o=>!o.passed);return n.jsxs("div",{className:"phase-row",children:[n.jsx(Zc,{status:u.status}),n.jsxs("div",{className:"phase-top",children:[n.jsx("span",{className:"phase-name",children:u.phase}),u.kind==="agent"?n.jsxs("span",{className:"chip agent",children:[u.agent,u.model?` · ${u.model}`:""]}):n.jsx("span",{className:"chip",children:"script"}),n.jsxs("span",{className:"right num",children:[u.attempts>1&&n.jsxs("span",{children:["att ",u.attempts]}),u.status==="running"?n.jsx(yo,{since:u.startedAt}):u.durationMs!=null&&n.jsx("span",{children:gi(u.durationMs)}),u.kind==="agent"&&u.tokensIn!=null&&n.jsxs("span",{children:[Gc(u.tokensIn)," / ",Gc(u.tokensOut)]}),u.costUsd!=null&&u.costUsd>0&&n.jsx("span",{children:vo(u.costUsd)})]})]}),u.status==="running"&&u.lastActivity&&n.jsx("div",{className:"phase-activity",children:u.lastActivity}),u.summary&&u.status!=="running"&&n.jsx("div",{className:"phase-sub",children:u.summary}),u.gates.length>0&&n.jsx("div",{className:"gate-line",children:u.gates.map(o=>n.jsxs("span",{className:`gate ${o.passed?"":"failed"}`,title:o.failure??"",children:[n.jsx(le,{name:o.passed?"check":"close",className:"ms-sm"})," ",o.gate]},o.gate))}),i.map(o=>n.jsx("div",{className:"gate-fail-msg",children:o.failure},o.gate))]})}const cp=new Set(["png","jpg","jpeg","gif","webp","svg"]);function Qc(u){return u==="runner.json"||u.endsWith(".jsonl")||u.endsWith(".log")}function gy(u){const o=["report.html","recommendation.md"].find(h=>u.some(p=>p.name===h));if(o)return o;const r=h=>{const p=h.split(".").pop()?.toLowerCase()??"";return["html","md","markdown","pdf"].includes(p)||cp.has(p)?0:Qc(h)?2:1};let f=null;for(const h of u)(!f||r(h.name)<r(f.name))&&(f=h);return f?.name??null}function vy({id:u,files:i,live:o}){const[r,f]=O.useState(null),h=ns(),p=O.useMemo(()=>h?i:i.filter(v=>!Qc(v.name)),[i,h]);return O.useEffect(()=>{!h&&r&&Qc(r)&&f(null)},[h,r]),O.useEffect(()=>{r||p.length===0||f(gy(p))},[p,r]),n.jsxs("div",{className:"art-layout",children:[n.jsxs("section",{className:"panel art-files",children:[n.jsx("div",{className:"panel-head",children:n.jsxs("span",{className:"microlabel",children:["files ",n.jsxs("span",{className:"num",children:["(",p.length,")"]})]})}),n.jsxs("div",{className:"file-list",children:[p.map(v=>n.jsxs("button",{className:`file-row ${r===v.name?"active":""}`,onClick:()=>f(v.name),children:[n.jsx("span",{className:"fname",children:v.name}),n.jsx("span",{className:"fsize num",children:xo(v.size)})]},v.name)),p.length===0&&n.jsx("div",{className:"viewer-note",children:i.length>0?"no result files — raw run files live in expert mode":"no files yet"})]})]}),n.jsxs("section",{className:"panel art-viewer",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:r??"viewer"}),n.jsx("span",{className:"spacer"}),r&&n.jsx("a",{className:"open-raw",href:`/api/runs/${u}/file?name=${encodeURIComponent(r)}&raw=1`,target:"_blank",children:"open raw ↗"})]}),r?n.jsx(xy,{id:u,name:r,live:o}):n.jsx("div",{className:"empty",children:"select a file"})]})]})}function xy({id:u,name:i,live:o}){const r=i.split(".").pop()?.toLowerCase()??"",f=`/api/runs/${u}/file?name=${encodeURIComponent(i)}&raw=1`;return r==="html"?n.jsx("div",{className:"viewer",children:n.jsx("div",{className:"viewer-body",children:n.jsx("iframe",{src:f,sandbox:"allow-scripts",allow:"clipboard-write",title:i})})}):r==="pdf"?n.jsx("div",{className:"viewer",children:n.jsx("div",{className:"viewer-body",children:n.jsx("iframe",{src:f,title:i})})}):cp.has(r)?n.jsx("div",{className:"viewer",children:n.jsx("div",{className:"viewer-body",children:n.jsx("img",{src:f,alt:i})})}):r==="md"||r==="markdown"?n.jsx(yy,{id:u,name:i,live:o}):n.jsx(by,{id:u,name:i,live:o})}function yy({id:u,name:i,live:o}){const[r,f]=O.useState("rendered"),h=He(`/api/runs/${u}/file?name=${encodeURIComponent(i)}`,o),p=O.useMemo(()=>h?yi.sanitize(Ce.parse(h.content,{async:!1})):"",[h?.content]);return n.jsxs("div",{className:"viewer",children:[n.jsxs("div",{className:"viewer-note md-toolbar",children:[n.jsxs("div",{className:"tabs",children:[n.jsx("button",{className:r==="rendered"?"active":"",onClick:()=>f("rendered"),children:"rendered"}),n.jsx("button",{className:r==="source"?"active":"",onClick:()=>f("source"),children:"source"})]}),h?.truncated&&n.jsxs("span",{children:["large file — showing the last ",xo(4e5)]})]}),n.jsx("div",{className:"viewer-body",children:h?r==="rendered"?n.jsx("div",{className:"md-body",dangerouslySetInnerHTML:{__html:p}}):n.jsx("pre",{children:h.content||"(empty)"}):n.jsx("pre",{children:"loading…"})})]})}function by({id:u,name:i,live:o}){const r=He(`/api/runs/${u}/file?name=${encodeURIComponent(i)}`,o);return n.jsxs("div",{className:"viewer",children:[r?.truncated&&n.jsxs("div",{className:"viewer-note",children:["large file — showing the last ",xo(4e5)]}),n.jsx("div",{className:"viewer-body",children:n.jsx("pre",{children:r?r.content||"(empty)":"loading…"})})]})}function jy(){const u=He("/api/workflows",!1),i=u?.workflows??[];return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"page-head",children:[n.jsx("h1",{children:"Workflows"}),n.jsxs("span",{className:"count num",children:[i.length," discovered"]}),u?.root&&n.jsx("span",{className:"count mono",children:u.root})]}),u&&i.length===0&&n.jsxs("div",{className:"empty",children:["No workflows found — expected ",n.jsx("code",{children:"src/workflows/"})," or ",n.jsx("code",{children:"workflows/"})," ","next to the output folder."]}),n.jsx("div",{className:"wf-grid",children:i.map(o=>n.jsxs(De,{href:`/workflows/${o.slug}`,className:"wf-card",children:[n.jsxs("div",{className:"wf-card-head",children:[n.jsx("span",{className:"wf-name",children:o.name??o.slug}),o.error&&n.jsx("span",{className:"status-word failed",children:"broken"})]}),n.jsx("p",{className:"wf-desc",children:o.error??o.description??""}),n.jsxs("div",{className:"wf-meta num",children:[n.jsxs("span",{children:[o.agents," agents"]}),n.jsx("span",{children:"·"}),n.jsxs("span",{children:[o.steps," steps"]})]})]},o.slug))})]})}function Ny({slug:u}){const i=He(`/api/workflows/${encodeURIComponent(u)}`,!1),o=He("/api/runs",!1);if(!i)return n.jsx("div",{className:"empty",children:"loading…"});if(i.error)return n.jsxs(n.Fragment,{children:[n.jsx(Bm,{slug:i.slug}),n.jsxs("div",{className:"empty",children:[n.jsx("span",{className:"status-word failed",children:"broken workflow"}),n.jsx("pre",{style:{marginTop:12,textAlign:"left"},children:i.error})]})]});const r=new Map(i.agents.map((h,p)=>[h.id,p%4])),f=(o?.runs??[]).filter(h=>h.workflow===i.name).slice(0,8);return n.jsxs(n.Fragment,{children:[n.jsx(Bm,{slug:i.slug}),n.jsxs("div",{className:"detail-head",children:[n.jsx("h1",{children:i.name??i.slug}),n.jsx("span",{className:"rid mono",children:i.dir})]}),i.description&&n.jsx("p",{className:"detail-req",children:i.description}),n.jsxs("div",{className:"statgrid",children:[n.jsxs("div",{className:"stat",children:[n.jsx("div",{className:"microlabel",children:"agents"}),n.jsx("div",{className:"v num",children:i.agents.length})]}),n.jsxs("div",{className:"stat",children:[n.jsx("div",{className:"microlabel",children:"steps"}),n.jsxs("div",{className:"v num",children:[i.steps.length," ",n.jsxs("span",{style:{color:"var(--muted)",fontWeight:400},children:["(",i.steps.filter(h=>h.kind==="agent").length," agent ·"," ",i.steps.filter(h=>h.kind==="script").length," script)"]})]})]}),i.workspace&&n.jsxs("div",{className:"stat",style:{maxWidth:420},children:[n.jsx("div",{className:"microlabel",children:"workspace"}),n.jsx("div",{className:"wf-workspace mono",children:i.workspace})]})]}),n.jsx(Sy,{slug:i.slug,lastRequest:f[0]?.request}),n.jsxs("section",{className:"panel",style:{marginBottom:18},children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"agents"})}),n.jsxs("div",{className:"agent-grid",children:[i.agents.map(h=>n.jsx(wy,{a:h,idx:r.get(h.id)??0},h.id)),i.agents.length===0&&n.jsx("div",{className:"viewer-note",children:"no agents — script-only workflow"})]})]}),n.jsxs("div",{className:"columns",children:[n.jsxs("section",{className:"panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"pipeline"})}),n.jsx("div",{className:"pipeline",children:i.steps.map((h,p)=>n.jsx(ky,{s:h,i:p,idx:h.agent?r.get(h.agent)??0:null},h.name))})]}),n.jsxs("div",{style:{display:"grid",gap:18},children:[n.jsxs("section",{className:"panel",children:[n.jsx("div",{className:"panel-head",children:n.jsxs("span",{className:"microlabel",children:["folder ",n.jsxs("span",{className:"num",children:["(",i.files.length," files)"]})]})}),n.jsx("div",{className:"file-list",children:i.files.map(h=>n.jsx("div",{className:"file-row",style:{cursor:"default"},children:n.jsx("span",{className:"fname",children:h})},h))})]}),n.jsxs("section",{className:"panel",children:[n.jsx("div",{className:"panel-head",children:n.jsxs("span",{className:"microlabel",children:["recent runs ",n.jsxs("span",{className:"num",children:["(",f.length,")"]})]})}),n.jsxs("div",{className:"file-list",children:[f.map(h=>n.jsxs(De,{href:`/runs/${h.id}`,className:"file-row",children:[n.jsx(Zc,{status:h.status}),n.jsx("span",{className:"fname",children:h.id.replace(/^run-/,"")}),n.jsxs("span",{className:"fsize num",children:[gi(h.durationMs)," · ",vo(h.costUsd)," · ",dn(h.startedAt)]})]},h.id)),f.length===0&&n.jsx("div",{className:"viewer-note",children:"no runs of this workflow yet"})]})]})]})]})]})}function Sy({slug:u,lastRequest:i}){const[o,r]=O.useState(""),[f,h]=O.useState(!0),[p,v]=O.useState(!1),[y,x]=O.useState(!1),[S,R]=O.useState(null),T=He(`/api/workflows/${encodeURIComponent(u)}/run`,!1);O.useEffect(()=>{!o&&i&&r(i)},[i]);const L=T?.available&&T?.image,Y=T?T.available?T.image?"isolated container per run":"image missing — run `kraftwerk runner build`":"Docker not running — sandbox unavailable":"";async function P(){if(!(!o.trim()||y)){x(!0),R(null);try{const Z=await fetch(`/api/workflows/${encodeURIComponent(u)}/run`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({request:o.trim(),sandbox:f,ssh:p})}),C=await Z.json();if(!Z.ok)throw new Error(C.error??`HTTP ${Z.status}`);dl(`/runs/${C.runId}`)}catch(Z){R(Z.message),x(!1)}}}return n.jsxs("section",{className:"panel run-panel",style:{marginBottom:18},children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"trigger run"})}),n.jsxs("div",{className:"run-form",children:[n.jsx("input",{type:"text",value:o,placeholder:"request — topic, URL, host …",onChange:Z=>r(Z.target.value),onKeyDown:Z=>Z.key==="Enter"&&P()}),n.jsx("button",{className:"run-btn",onClick:P,disabled:y||!o.trim()||f&&!L,children:y?"starting…":n.jsxs(n.Fragment,{children:[n.jsx(le,{name:"play_arrow",className:"ms-sm"})," ",f?"run in sandbox":"run locally"]})})]}),n.jsxs("div",{className:"run-opts",children:[n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:f,onChange:Z=>h(Z.target.checked)}),"docker sandbox ",Y&&n.jsxs("span",{className:"opt-hint",children:["— ",Y]})]}),n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:p,onChange:Z=>v(Z.target.checked),disabled:!f}),"forward SSH agent"]})]}),S&&n.jsx("div",{className:"gate-fail-msg",children:S})]})}function Bm({slug:u}){return n.jsxs("nav",{className:"crumbs",children:[n.jsx(De,{href:"/workflows",children:"workflows"}),n.jsx("span",{className:"sep",children:"/"}),n.jsx("span",{className:"mono",children:u})]})}function wy({a:u,idx:i}){return n.jsxs("div",{className:`agent-card aid-${i}`,children:[n.jsxs("div",{className:"agent-head",children:[n.jsx("span",{className:"agent-dot"}),n.jsx("b",{children:u.name??u.id}),n.jsxs("code",{className:"agent-id",children:["[",u.id,"]"]}),n.jsx("span",{className:"spacer"}),n.jsxs("span",{className:"chip",children:[u.model??"default",u.effort?` · ${u.effort}`:""]})]}),u.tools.length>0&&n.jsx("div",{className:"agent-tools",children:u.tools.map(o=>n.jsx("span",{className:"tool-chip",children:o},o))}),u.persona&&n.jsx("p",{className:"agent-persona",children:u.persona})]})}function ky({s:u,i,idx:o}){const r=u.kind==="script"?u.script:u.prompt;return n.jsxs("div",{className:"step-node",children:[n.jsx("div",{className:`step-index num ${o!=null?`aid-${o}`:"is-script"}`,children:i+1}),n.jsxs("div",{className:"step-body",children:[n.jsxs("div",{className:"phase-top",children:[n.jsx("span",{className:"phase-name",children:u.name}),u.kind==="agent"?n.jsxs("span",{className:`chip agent-chip aid-${o??0}`,children:["agent · ",u.agent]}):n.jsxs("span",{className:"chip",children:["script",u.sourceRef?` · ${u.sourceRef}`:""]})]}),r&&n.jsxs("details",{className:"step-source",children:[n.jsx("summary",{children:u.kind==="agent"?"prompt":"script"}),n.jsx("pre",{children:r})]}),u.gates.length>0&&n.jsx("div",{className:"gate-line",children:u.gates.map(f=>n.jsxs("span",{className:"gate neutral",children:["⛨ ",f]},f))})]})]})}const Ty=u=>u==="ok"?"ok":u==="running"?"running":u==="aborted"?"aborted":"failed",Ey=u=>u==="ok"?"done":u==="running"?"working":u==="aborted"?"stopped":"failed";function Ay(u){return u.scope.kind==="team"?`/agents/${u.scope.member}/chat/${u.id}`:`/agents/chats/${u.id}`}function qm(u){switch(u.scope.kind){case"team":return u.scope.member;case"run":return u.scope.runId;case"knowledge":return u.scope.bundle?`knowledge:${u.scope.bundle}`:"knowledge";case"kraftwerk":return"kraftwerk-aware";default:return"general"}}function Gm(u){return u.length>64?`${u.slice(0,46)}…${u.slice(-14)}`:u}function _y(){const u=He("/api/runs",!1),i=He("/api/chats",!1),o=He("/api/knowledge",!1),r=He("/api/team",!1),f=He("/api/workflows",!1),h=He("/api/skills",!1),p=He("/api/meta",!1),[v,y]=O.useState("all"),x=u?.runs??[],S=i?.chats??[],R=o?.bundles??[],T=(h?.skills??[]).filter(P=>P.source==="workspace"),L=[[f?.workflows.length,"workflows","/workflows"],[u?x.length:void 0,"runs","/runs"],[o?R.length:void 0,"bundles","/knowledge"],[h?T.length:void 0,"skills","/skills"],[i?S.length:void 0,"chats","/agents/chats"]],Y=x.filter(P=>P.status==="failed"&&Date.now()-Date.parse(P.updatedAt)<24*36e5);return n.jsxs("div",{className:"dash",children:[n.jsxs("div",{className:"page-head",children:[n.jsxs("h1",{children:[p?.projectIcon?`${p.projectIcon} `:"",p?.projectName||"workspace"]}),n.jsx("span",{className:"spacer"}),n.jsx("span",{className:"dash-mini",children:L.map(([P,Z,C])=>n.jsxs(De,{href:C,children:[n.jsx("b",{className:"num",children:P??"…"})," ",Z]},Z))})]}),n.jsx(Ry,{workflows:f?.workflows??[]}),n.jsx(zy,{members:r?.members,chats:S}),Y.length>0&&v!=="failed"&&n.jsxs("button",{className:"dash-alert",onClick:()=>y("failed"),children:["⚠ ",Y.length," run",Y.length===1?"":"s"," failed in the last 24 h — review"]}),n.jsx(Dy,{runs:x,chats:S,bundles:R,members:r?.members??[],workflows:f?.workflows??[],filter:v,setFilter:y})]})}function Ry({workflows:u}){const[i,o]=O.useState(!1);return O.useEffect(()=>{if(!i)return;const r=f=>{f.target.closest(".wf-pick-wrap")||o(!1)};return window.addEventListener("mousedown",r),()=>window.removeEventListener("mousedown",r)},[i]),n.jsxs("div",{className:"dash-actions",children:[n.jsxs("button",{className:"run-btn dash-newchat",onClick:()=>dl("/agents/chats"),children:[n.jsx(le,{name:"forum"})," new chat"]}),n.jsxs("span",{className:"wf-pick-wrap",children:[n.jsxs("button",{className:"run-btn tonal","aria-haspopup":"menu","aria-expanded":i,onClick:()=>o(r=>!r),children:[n.jsx(le,{name:"play_arrow"})," run workflow"]}),i&&n.jsxs("div",{className:"wf-pick-pop",role:"menu",children:[u.length===0&&n.jsx("span",{className:"wf-pick-empty",children:"no workflows yet"}),u.map(r=>n.jsxs(De,{href:`/workflows/${encodeURIComponent(r.slug)}`,className:"wf-pick-item",role:"menuitem",children:[n.jsx("span",{className:"wf-pick-name",children:r.name??r.slug}),r.description&&n.jsx("span",{className:"wf-pick-desc",children:r.description})]},r.slug))]})]})]})}function zy({members:u,chats:i}){return u&&u.length===0?n.jsx("section",{className:"panel dash-team-empty",children:n.jsxs("div",{className:"viewer-note",children:["No agent teammates yet — ",n.jsx(De,{href:"/agents/new",children:"create your first agent"})," and it will show up here, ready to chat."]})}):n.jsx("div",{className:"dash-team",children:(u??[]).map(o=>{const r=i.filter(v=>v.scope.kind==="team"&&v.scope.member===o.slug),f=r.find(v=>v.busy),h=r[0],p=()=>dl(`/agents/${encodeURIComponent(o.slug)}`);return n.jsxs("div",{className:"dash-member",role:"link",tabIndex:0,onClick:p,onKeyDown:v=>{v.key==="Enter"&&p()},children:[n.jsxs("div",{className:"dash-member-id",children:[n.jsxs("span",{className:"agent-avatar lg",children:[n.jsx("span",{"aria-hidden":!0,children:o.emoji}),n.jsx("span",{className:`lamp ${f?"running":"idle"}`})]}),n.jsx("span",{className:"dash-member-name",children:o.name})]}),n.jsxs("div",{className:"dash-member-foot",children:[n.jsx("span",{className:"dash-member-state",children:f?n.jsx(De,{href:`/agents/${encodeURIComponent(o.slug)}/chat/${f.id}`,onClick:v=>v.stopPropagation(),children:"working…"}):h?n.jsxs("span",{title:new Date(h.updatedAt).toLocaleString(),children:["last active ",Zm(h.updatedAt)]}):"never talked yet"}),n.jsxs("button",{className:"run-btn dash-chat-btn",onClick:v=>{v.stopPropagation(),pn("claude",{kind:"team",member:o.slug})},children:[n.jsx(le,{name:"chat_bubble",className:"ms-sm"})," chat"]})]})]},o.slug)})})}function Cy(u){if(u.lamp==="running")return"now";const i=new Date(u.at),o=new Date;if(i.toDateString()===o.toDateString())return"today";const r=new Date(o);return r.setDate(r.getDate()-1),i.toDateString()===r.toDateString()?"yesterday":"earlier"}const Oy=[["all","all"],["run","runs"],["session","chats"],["knowledge","knowledge"]];function Dy({runs:u,chats:i,bundles:o,members:r,workflows:f,filter:h,setFilter:p}){const v=ns(),y=O.useMemo(()=>{const S=[],R=L=>L?f.find(Y=>Y.slug===L)?.name??L:void 0;for(const L of u)S.push({at:L.updatedAt,kind:"run",emoji:"⚙️",title:R(L.workflow)??L.id,sub:L.request??"",href:`/runs/${L.id}`,lamp:Ty(L.status),status:Ey(L.status)});for(const L of i){const Y=L.scope.kind==="team"?r.find(P=>L.scope.kind==="team"&&P.slug===L.scope.member):void 0;S.push({at:L.updatedAt,kind:"session",emoji:Y?Y.emoji||"🤖":"💬",title:Y?Y.name:L.title||"new chat",sub:Y?`${L.title||"new chat"}${v?` · ${L.agent}`:""}`:v?`${L.agent} · ${qm(L)}`:qm(L),href:Ay(L),lamp:L.busy?"running":"ok",status:L.busy?"working":void 0})}for(const L of o)L.updatedAt&&S.push({at:L.updatedAt,kind:"knowledge",emoji:"📚",title:L.name,sub:`${L.concepts} concepts`,href:`/knowledge/${encodeURIComponent(L.name)}`,lamp:"ok"});return(h==="all"?S:h==="failed"?S.filter(L=>L.kind==="run"&&L.lamp==="failed"):S.filter(L=>L.kind===h)).sort((L,Y)=>{const P=+(Y.lamp==="running")-+(L.lamp==="running");return P!==0?P:Y.at.localeCompare(L.at)}).slice(0,15)},[u,i,o,r,v,h]);let x="";return n.jsxs("section",{className:"panel dash-feed",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"activity"}),n.jsx("span",{className:"spacer"}),n.jsxs("span",{className:"dash-feed-filter",children:[Oy.map(([S,R])=>n.jsx("button",{className:`feed-chip ${h===S?"on":""}`,onClick:()=>p(S),children:R},S)),h==="failed"&&n.jsxs("button",{className:"feed-chip on failed",onClick:()=>p("all"),children:["failed ",n.jsx(le,{name:"close",className:"ms-sm"})]})]})]}),y.length===0?n.jsx("div",{className:"viewer-note",children:h==="all"?"nothing yet — run a workflow or start a session":"nothing here for this filter"}):n.jsx("div",{className:"m3-list",children:y.map(S=>{const R=Cy(S),T=R!==x?R:null;return x=R,n.jsxs("div",{className:"feed-group",children:[T&&n.jsx("div",{className:"feed-day microlabel",children:T}),n.jsxs(De,{href:S.href,className:"m3-row m3-link",children:[n.jsxs("span",{className:"agent-avatar",children:[n.jsx("span",{"aria-hidden":!0,children:S.emoji}),S.lamp==="running"&&n.jsx("span",{className:"lamp running"})]}),n.jsx("span",{className:`chip dash-kind ${S.kind}`,children:S.kind==="session"?"chat":S.kind}),n.jsxs("span",{className:"m3-body",children:[n.jsx("span",{className:"m3-head",children:Gm(S.title)}),S.sub&&n.jsx("span",{className:"m3-sub",children:Gm(S.sub)})]}),S.status&&n.jsx("span",{className:`chip status ${S.lamp}`,children:S.status}),n.jsx("span",{className:"side-when num",title:new Date(S.at).toLocaleString(),children:Zm(S.at)}),n.jsx("span",{className:"m3-chev",children:n.jsx(le,{name:"chevron_right"})})]})]},`${S.kind}:${S.href}:${S.at}`)})})]})}function My({bundle:u,conceptId:i}){const o=He("/api/knowledge",!1),r=o?.bundles??[];return n.jsxs("div",{className:"runs-screen",children:[n.jsxs("aside",{className:"runs-side",children:[n.jsxs("div",{className:"side-head",children:[n.jsx("span",{className:"microlabel",children:"bundles"}),n.jsx("span",{className:"spacer"}),n.jsxs(De,{href:"/knowledge",className:"open-raw",children:[n.jsx(le,{name:"add",className:"ms-sm"})," new"]})]}),n.jsxs("div",{className:"side-list",children:[r.map(f=>n.jsxs(De,{href:`/knowledge/${encodeURIComponent(f.name)}`,className:`side-row ${f.name===u?"active":""}`,children:[n.jsx("span",{className:"lamp ok"}),n.jsxs("div",{className:"side-row-body",children:[n.jsxs("div",{className:"side-row-top",children:[n.jsx("span",{className:"side-wf",children:f.name}),n.jsx("span",{className:"side-when num",children:f.concepts})]}),n.jsx("div",{className:"side-row-sub",children:n.jsxs("span",{className:"side-req",children:[f.okfVersion?`okf ${f.okfVersion}`:"okf",f.updatedAt?` · ${f.updatedAt.slice(0,10)}`:""]})})]})]},f.name)),o&&r.length===0&&n.jsx("div",{className:"viewer-note",children:"no bundles yet"})]})]}),n.jsx("div",{className:"runs-main",children:u&&i?n.jsx($y,{bundle:u,conceptId:i},`${u}/${i}`):u?n.jsx(Ly,{name:u},u):n.jsx(Uy,{root:o?.root})})]})}function Uy({root:u}){const[i,o]=O.useState(""),[r,f]=O.useState(""),[h,p]=O.useState(!1);async function v(){const y=i.trim();if(!y)return;p(!0),f("");const S=await(await fetch("/api/knowledge",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({name:y})})).json();p(!1),S.error?f(S.error):window.location.hash=`/knowledge/${encodeURIComponent(y)}`}return n.jsxs("div",{className:"new-chat",children:[n.jsx("div",{className:"page-head",children:n.jsx("h1",{children:"context & knowledge"})}),n.jsxs("section",{className:"panel new-chat-panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"what lives here"})}),n.jsxs("div",{className:"know-intro",children:["Curated knowledge as ",n.jsx("b",{children:"OKF bundles"})," (Open Knowledge Format v0.2): plain markdown files with YAML frontmatter",u?n.jsxs(n.Fragment,{children:[" under ",n.jsx("code",{children:u})]}):null,", readable by humans and agents, diffable in git. Agents write through"," ",n.jsx("code",{children:"kraftwerk knowledge put"})," (provenance is stamped automatically); you raise a concept's trust tier by verifying it here."]}),n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"new bundle"})}),n.jsxs("div",{className:"know-newbundle",children:[n.jsx("input",{value:i,placeholder:"bundle name, e.g. customer-support",onChange:y=>o(y.target.value),onKeyDown:y=>y.key==="Enter"&&void v()}),n.jsx("button",{className:"run-btn",disabled:!i.trim()||h,onClick:v,children:h?"creating…":"create"})]}),r&&n.jsxs("div",{className:"msg error",children:[n.jsx(le,{name:"error",className:"ms-sm"})," ",r]})]})]})}function mo({tier:u}){return n.jsx("span",{className:`chip trust ${u}`,children:u})}function Ly({name:u}){const i=He(`/api/knowledge/${encodeURIComponent(u)}`,!1);return i?"error"in i?n.jsx("div",{className:"empty",children:"bundle not found"}):n.jsxs("div",{className:"member-view",children:[n.jsxs("div",{className:"page-head",children:[n.jsx("h1",{children:u}),n.jsxs("span",{className:"count",children:[i.concepts.length," concepts"]}),n.jsx("span",{className:"spacer"}),n.jsx("button",{className:"run-btn",onClick:()=>{pn("claude",{kind:"knowledge",bundle:u})},children:"curate in chat"})]}),n.jsx("section",{className:"panel",children:i.concepts.length===0?n.jsxs("div",{className:"viewer-note",children:["No concepts yet — start a chat to author some, or write one with"," ",n.jsxs("code",{children:["kraftwerk knowledge put ",u,"/<path>"]}),"."]}):n.jsx("div",{className:"m3-list",children:Yy(i.concepts).map(({folder:o,concepts:r})=>n.jsxs(O.Fragment,{children:[o&&n.jsxs("div",{className:"m3-subhead",children:[o,"/"]}),r.map(f=>n.jsxs(De,{href:`/knowledge/${encodeURIComponent(u)}/${f.id}`,className:"m3-row m3-link",children:[n.jsx("span",{className:"m3-ico",children:n.jsx(le,{name:Hy(f.type)})}),n.jsxs("span",{className:"m3-body",children:[n.jsxs("span",{className:"m3-head",children:[f.title,f.status!=="stable"&&n.jsx("span",{className:`chip ${f.status}`,children:f.status}),f.stale&&n.jsx("span",{className:"chip stale",children:"stale"}),f.error&&n.jsx("span",{className:"chip stale",title:f.error,children:"invalid"})]}),n.jsxs("span",{className:"m3-sub",children:[n.jsxs("code",{children:[o?f.id.slice(o.length+1):f.id,".md"]})," · ",f.type??"untyped"]})]}),n.jsx(mo,{tier:f.trustTier}),n.jsx("span",{className:"m3-chev",children:n.jsx(le,{name:"chevron_right",className:"ms-sm"})})]},f.id))]},o||"."))})}),i.log&&n.jsx(Gy,{name:u,log:i.log})]}):n.jsx("div",{className:"empty",children:"loading…"})}function Hy(u){switch((u??"").toLowerCase()){case"reference":return"article";case"policy":return"gavel";case"guide":case"howto":return"route";case"decision":return"balance";default:return"menu_book"}}function By(u){const i=[];for(const o of u.split(`
77
+ `)){const r=o.match(/^##\s+(\d{4}-\d{2}-\d{2})/);if(r){i.push({date:r[1],entries:[]});continue}const f=o.match(/^[*-]\s+\*\*([^*]+)\*\*:\s*(.*)$/);f&&i.length>0&&i[i.length-1].entries.push({kind:f[1].toLowerCase(),text:f[2]})}return i.filter(o=>o.entries.length>0)}function qy(u,i){const o=[],r=/\[([^\]]+)\]\(\/?([^)]+?)\.md\)/g;let f=0,h;for(;h=r.exec(i);)h.index>f&&o.push(i.slice(f,h.index)),o.push(n.jsx(De,{href:`/knowledge/${encodeURIComponent(u)}/${h[2].replace(/^\//,"")}`,children:h[1]},h.index)),f=h.index+h[0].length;return f<i.length&&o.push(i.slice(f)),o}function Gy({name:u,log:i}){const o=By(i),[r,f]=O.useState(!1);return n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"activity"}),n.jsx("span",{className:"spacer"}),n.jsx("button",{className:"open-raw",onClick:()=>f(!r),children:r?"timeline":"raw log"})]}),r||o.length===0?n.jsx("div",{className:"viewer-body",children:n.jsx("pre",{children:i})}):n.jsx("div",{className:"know-log",children:o.map(h=>n.jsxs(O.Fragment,{children:[n.jsx("div",{className:"m3-subhead num",children:h.date}),h.entries.map((p,v)=>n.jsxs("div",{className:"know-log-row",children:[n.jsx("span",{className:`chip log-kind log-${p.kind}`,children:p.kind}),n.jsx("span",{className:"know-log-text",children:qy(u,p.text)})]},v))]},h.date))})]})}function Yy(u){const i=new Map;for(const o of u){const r=o.id.includes("/")?o.id.slice(0,o.id.lastIndexOf("/")):"";(i.get(r)??i.set(r,[]).get(r)).push(o)}return[...i.keys()].sort((o,r)=>o===""?-1:r===""?1:o.localeCompare(r)).map(o=>({folder:o,concepts:i.get(o)}))}function $y({bundle:u,conceptId:i}){const[o,r]=O.useState(null),[f,h]=O.useState(!1),[p,v]=O.useState(!1),[y,x]=O.useState(!1),[S,R]=O.useState(""),[T,L]=O.useState(!1),[Y,P]=O.useState(""),[Z,C]=O.useState("rendered"),me=O.useMemo(()=>o?yi.sanitize(Ce.parse(o.body,{async:!1})):"",[o?.body]),he=()=>{fetch(`/api/knowledge/${encodeURIComponent(u)}/concept?id=${encodeURIComponent(i)}`).then($=>$.ok?$.json():Promise.reject()).then(r).catch(()=>h(!0))};O.useEffect(()=>{if(y)return;let $=!0,Q;const F=async()=>{try{const ae=await fetch(`/api/knowledge/${encodeURIComponent(u)}/concept?id=${encodeURIComponent(i)}`,{cache:"no-store"});if(ae.ok){const ye=await ae.json();$&&(h(!1),r(V=>JSON.stringify(V)===JSON.stringify(ye)?V:ye))}else ae.status===404&&$&&h(!0)}catch{}$&&(Q=setTimeout(F,6e3))};return F(),()=>{$=!1,clearTimeout(Q)}},[u,i,y]);async function ee(){v(!0),await fetch(`/api/knowledge/${encodeURIComponent(u)}/verify`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:i})}).catch(()=>{}),v(!1),he()}async function W(){L(!0),P("");const $=await fetch(`/api/knowledge/${encodeURIComponent(u)}/concept`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:i,content:S})}).then(Q=>Q.json()).catch(()=>({error:"save failed"}));L(!1),$.error?P($.error):(r($),x(!1))}return f?n.jsx("div",{className:"empty",children:"concept not found"}):o?n.jsxs("div",{className:"member-view",children:[n.jsxs("div",{className:"detail-head",children:[n.jsx("h1",{children:o.title}),o.type&&n.jsx("span",{className:"chip agent",children:o.type}),n.jsx(mo,{tier:o.trustTier}),o.status!=="stable"&&n.jsx("span",{className:`chip ${o.status}`,children:o.status}),o.stale&&n.jsxs("span",{className:"chip stale",children:["stale since ",o.staleAfter?.slice(0,10)]}),n.jsx("span",{className:"spacer"}),n.jsx("button",{className:"open-raw",onClick:()=>{pn("claude",{kind:"knowledge",bundle:u})},children:"curate in chat"}),n.jsx("button",{className:"run-btn",disabled:p,onClick:ee,children:p?"verifying…":n.jsxs(n.Fragment,{children:[n.jsx(le,{name:"check",className:"ms-sm"})," verify (human)"]})})]}),o.error&&n.jsxs("div",{className:"msg error",children:[n.jsx(le,{name:"error",className:"ms-sm"})," ",o.error]}),n.jsxs("div",{className:"detail-cols",children:[n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"content"}),n.jsx("span",{className:"spacer"}),n.jsxs("span",{className:"side-meta",children:[u,"/",o.id,".md"]}),y?n.jsxs(n.Fragment,{children:[n.jsx("button",{className:"open-raw",onClick:()=>{x(!1),P("")},children:"cancel"}),n.jsx("button",{className:"open-raw",disabled:T,onClick:W,children:T?"saving…":n.jsxs(n.Fragment,{children:[n.jsx(le,{name:"check",className:"ms-sm"})," save"]})})]}):n.jsxs("button",{className:"open-raw",onClick:()=>{R(o.raw),x(!0),P("")},children:[n.jsx(le,{name:"edit",className:"ms-sm"})," edit"]})]}),y?n.jsxs(n.Fragment,{children:[n.jsx("textarea",{className:"concept-edit",value:S,rows:Math.min(40,Math.max(18,S.split(`
78
+ `).length+2)),onChange:$=>R($.target.value),spellCheck:!1}),n.jsxs("div",{className:"viewer-note",children:["full file (frontmatter + markdown body) — saving stamps provenance as"," ",n.jsx("code",{children:"human:user"})," and logs an update."]})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"viewer-note md-toolbar",children:n.jsxs("div",{className:"tabs",children:[n.jsx("button",{className:Z==="rendered"?"active":"",onClick:()=>C("rendered"),children:"rendered"}),n.jsx("button",{className:Z==="source"?"active":"",onClick:()=>C("source"),children:"source"})]})}),n.jsx("div",{className:"viewer-body",children:Z==="rendered"?n.jsx("div",{className:"md-body concept-md",dangerouslySetInnerHTML:{__html:me}}):n.jsx("pre",{children:o.body.trim()||"(empty body)"})})]}),Y&&n.jsxs("div",{className:"msg error",children:[n.jsx(le,{name:"error",className:"ms-sm"})," ",Y]})]}),n.jsxs("aside",{className:"detail-rail",children:[n.jsxs("section",{className:"panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"about"})}),n.jsxs("div",{className:"rail-list",children:[n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"trust"}),n.jsx("span",{className:"v",children:n.jsx(mo,{tier:o.trustTier})})]}),n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"generated"}),n.jsx("span",{className:`v ${o.generated?"":"dim"}`,children:o.generated?`${o.generated.by??"?"} · ${(o.generated.at??"?").slice(0,10)}`:"not stamped"})]}),n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"verified"}),o.verified.length===0?n.jsx("span",{className:"v dim",children:"never"}):o.verified.map(($,Q)=>n.jsxs("span",{className:"v",children:[$.by??"?"," · ",($.at??"?").slice(0,10)]},Q))]}),o.staleAfter&&n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"stale after"}),n.jsxs("span",{className:`v ${o.stale?"":"dim"}`,children:[o.staleAfter.slice(0,10),o.stale&&n.jsx("span",{className:"chip stale",children:"stale"})]})]}),o.tags.length>0&&n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"tags"}),n.jsx("span",{className:"m3-chips",children:o.tags.map($=>n.jsx("span",{className:"chip",children:$},$))})]})]})]}),o.sources.length>0&&n.jsxs("section",{className:"panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"sources"})}),n.jsx("div",{className:"rail-list",children:o.sources.map(($,Q)=>n.jsxs("div",{className:"rail-kv",children:[n.jsxs("span",{className:"v",children:[$.resource?.startsWith("http")?n.jsx("a",{href:$.resource,target:"_blank",rel:"noreferrer",children:$.title??$.resource}):$.title??$.resource??"?",$.id&&n.jsxs("span",{className:"know-id",children:["[^",$.id,"]"]})]}),n.jsx("span",{className:"v dim",children:[$.author,$.usage_count!=null?`${$.usage_count} uses`:null,$.last_modified?`mod ${$.last_modified.slice(0,10)}`:null].filter(Boolean).join(" · ")})]},Q))})]})]})]})]}):n.jsx("div",{className:"empty",children:"loading…"})}const Xy={workspace:"workspace",project:".claude",user:"global",agent:"agent"};function up(u){return n.jsx("span",{className:`chip skill-src ${u}`,children:Xy[u]})}function Qy({name:u}){const i=He("/api/skills",!1),o=i?.skills??[],r=o.filter(p=>p.source==="workspace"),f=o.filter(p=>p.source!=="workspace"),h=p=>n.jsxs(De,{href:`/skills/${encodeURIComponent(p.name)}`,className:`side-row ${p.name===u?"active":""}`,children:[n.jsx("span",{className:`lamp ${p.source==="workspace"?"ok":"dim"}`}),n.jsxs("div",{className:"side-row-body",children:[n.jsxs("div",{className:"side-row-top",children:[n.jsxs("span",{className:"side-wf",children:["/",p.name]}),p.source!=="workspace"&&up(p.source)]}),n.jsx("div",{className:"side-row-sub",children:n.jsx("span",{className:"side-req",children:p.description||"no description"})})]})]},`${p.source}:${p.name}`);return n.jsxs("div",{className:"runs-screen",children:[n.jsxs("aside",{className:"runs-side",children:[n.jsx("div",{className:"side-head",children:n.jsx("span",{className:"microlabel",children:"workspace skills"})}),n.jsxs("div",{className:"side-list",children:[r.map(h),i&&r.length===0&&n.jsx("div",{className:"viewer-note",children:"no workspace skills yet"}),f.length>0&&n.jsxs(O.Fragment,{children:[n.jsx("div",{className:"side-head skills-local-head",children:n.jsx("span",{className:"microlabel",children:"local (this machine / repo)"})}),f.map(h)]})]})]}),n.jsx("div",{className:"runs-main",children:u?n.jsx(Vy,{name:u},u):n.jsx(Zy,{root:i?.root,workspace:r})})]})}function Zy({root:u,workspace:i}){return n.jsxs("div",{className:"new-chat",children:[n.jsxs("div",{className:"page-head",children:[n.jsx("h1",{children:"skills"}),n.jsxs("span",{className:"count",children:[i.length," in workspace"]})]}),n.jsxs("section",{className:"panel new-chat-panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"what lives here"})}),n.jsxs("div",{className:"know-intro",children:["Skills are reusable ",n.jsx("b",{children:"instruction packages"}),": one folder per skill with a"," ",n.jsx("code",{children:"SKILL.md"})," (YAML frontmatter: name, description). ",n.jsx("b",{children:"Workspace skills"}),u?n.jsxs(n.Fragment,{children:[" live under ",n.jsx("code",{children:u})]}):null,", are tracked in git and shared with everyone in this workspace — they are the ones to build on. Skills from"," ",n.jsx("code",{children:".claude/skills"})," and your personal ",n.jsx("code",{children:"~/.claude/skills"})," also work here, but stay repo-/machine-local. Invoke any skill in a session with"," ",n.jsx("code",{children:"/<name>"}),"."]}),n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"add a workspace skill"})}),n.jsxs("div",{className:"know-intro",children:["Create ",n.jsxs("code",{children:[u?`${u}/`:"skills/","<name>/SKILL.md"]}),", commit it, done — it appears here and in every session's ",n.jsx("code",{children:"/"})," menu."]})]})]})}function Vy({name:u}){const[i,o]=O.useState(null),[r,f]=O.useState(!1),[h,p]=O.useState("rendered"),v=O.useMemo(()=>i?i.content.replace(/^---\r?\n[\s\S]*?\r?\n---(\r?\n|$)/,""):"",[i?.content]),y=O.useMemo(()=>i?yi.sanitize(Ce.parse(v,{async:!1})):"",[v]);return O.useEffect(()=>{fetch(`/api/skills/${encodeURIComponent(u)}`).then(x=>x.ok?x.json():Promise.reject()).then(o).catch(()=>f(!0))},[u]),r?n.jsx("div",{className:"empty",children:"skill not found"}):i?n.jsxs("div",{className:"member-view",children:[n.jsxs("div",{className:"detail-head",children:[n.jsxs("h1",{children:["/",i.name]}),up(i.source)]}),i.description&&n.jsx("div",{className:"know-intro skill-desc",children:i.description}),n.jsxs("div",{className:"detail-cols",children:[n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"SKILL.md"}),n.jsx("span",{className:"spacer"}),n.jsxs("div",{className:"tabs",children:[n.jsx("button",{className:h==="rendered"?"active":"",onClick:()=>p("rendered"),children:"rendered"}),n.jsx("button",{className:h==="source"?"active":"",onClick:()=>p("source"),children:"source"})]})]}),n.jsx("div",{className:"viewer-body",children:h==="rendered"?n.jsx("div",{className:"md-body concept-md",dangerouslySetInnerHTML:{__html:y}}):n.jsx("pre",{children:i.content.trim()||"(empty)"})})]}),n.jsx("aside",{className:"detail-rail",children:n.jsxs("section",{className:"panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"about"})}),n.jsxs("div",{className:"rail-list",children:[n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"source"}),n.jsx("span",{className:"v",children:i.source==="workspace"?"workspace — git-tracked, shared with the team":i.source==="project"?"repo .claude/skills — tracked, but outside the workspace root":"global ~/.claude/skills — only on this machine"})]}),n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"path"}),n.jsx("span",{className:"v mono skill-path",title:i.path,children:i.path})]}),n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"invoke"}),n.jsxs("span",{className:"v",children:[n.jsxs("code",{children:["/",i.name]})," in any session"]})]}),i.files.length>0&&n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"bundled files"}),i.files.map(x=>n.jsx("span",{className:"v mono",children:x},x))]})]})]})})]})]}):n.jsx("div",{className:"empty",children:"loading…"})}const Ky=["","low","medium","high","xhigh","max"],Jy=["🤖","🧑‍💻","🎧","🛠️","📊","✍️","🔍","🧹","📦","🚀"];function Ym({seg:u}){const i=u[0]&&u[0]!=="new"&&u[0]!=="chats"?decodeURIComponent(u[0]):void 0,o=u[0]==="new"?"new":u[0]==="chats"?"chats":u[1]==="edit"?"edit":u[1]==="info"?"info":u[1]==="chat"?"chat":i?"member":"home",r=o==="chat"?u[2]:o==="chats"?u[1]:void 0,f=He("/api/team",!1),h=ns(),[p,v]=O.useState(()=>{try{const E=JSON.parse(localStorage.getItem("kw-agent-groups")??"[]");return Array.isArray(E)?E.map(String):[]}catch{return[]}}),[y,x]=O.useState(!1),[S,R]=O.useState(""),[T,L]=O.useState(null),[Y,P]=O.useState(""),[Z,C]=O.useState(null),[me,he]=O.useState(null),[ee,W]=O.useState({}),$=(f?.members??[]).map(E=>ee[E.slug]!==void 0?{...E,group:ee[E.slug]||void 0}:E);O.useEffect(()=>{W(E=>{const te={...E};let ce=!1;for(const fe of f?.members??[])te[fe.slug]!==void 0&&(fe.group??"")===te[fe.slug]&&(delete te[fe.slug],ce=!0);return ce?te:E})},[f]);const Q=[...new Set([...$.map(E=>E.group??"").filter(Boolean),...p])].sort((E,te)=>E.localeCompare(te)),F=$.filter(E=>!E.group);function ae(E){v(E);try{localStorage.setItem("kw-agent-groups",JSON.stringify(E))}catch{}}function ye(){const E=S.trim();x(!1),R(""),E&&!Q.includes(E)&&ae([...p,E])}function V(E,te){L(null);const ce=te.trim();if(!(!ce||ce===E)){for(const fe of $.filter(Je=>Je.group===E))ge(fe.slug,ce);p.includes(E)&&ae([...new Set(p.map(fe=>fe===E?ce:fe))])}}async function ge(E,te){if(($.find(fe=>fe.slug===E)?.group??"")!==te){W(fe=>({...fe,[E]:te}));try{const fe=await fetch(`/api/team/${encodeURIComponent(E)}`);if(!fe.ok)throw new Error;const Je=await fe.json();if(!(await fetch(`/api/team/${encodeURIComponent(E)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({...Je,group:te||void 0})})).ok)throw new Error}catch{W(fe=>{const Je={...fe};return delete Je[E],Je})}}}const Ze=E=>h?{onDragOver:te=>{Z!=null&&(te.preventDefault(),te.dataTransfer.dropEffect="move",me!==E&&he(E))},onDrop:te=>{te.preventDefault();const ce=te.dataTransfer.getData("text/plain")||Z;ce&&ge(ce,E),C(null),he(null)}}:{},Rt=E=>n.jsxs(De,{href:`/agents/${encodeURIComponent(E.slug)}`,className:`side-row ${E.slug===i?"active":""} ${Z===E.slug?"dragging":""}`,draggable:h,onDragStart:te=>{te.dataTransfer.setData("text/plain",E.slug),te.dataTransfer.effectAllowed="move",C(E.slug)},onDragEnd:()=>{C(null),he(null)},children:[n.jsx("span",{className:"agent-avatar sm",children:n.jsx("span",{"aria-hidden":!0,children:E.emoji})}),n.jsxs("div",{className:"side-row-body",children:[n.jsx("div",{className:"side-row-top",children:n.jsx("span",{className:"side-wf",children:E.name})}),n.jsx("div",{className:"side-row-sub",children:n.jsx("span",{className:"side-req",children:E.description||E.harness})})]})]},E.slug);let $e;o==="new"?$e=n.jsx(Xm,{},"new"):o==="edit"&&i?$e=n.jsx(Xm,{slug:i},i):o==="chat"&&i&&r?$e=n.jsx("div",{className:"chat-main",children:n.jsx(Lm,{id:r},r)}):o==="chats"?$e=r?n.jsx("div",{className:"chat-main",children:n.jsx(Lm,{id:r},r)}):n.jsx(ay,{}):o==="info"&&i?$e=n.jsx(rp,{slug:i},i):i?$e=n.jsx(Wy,{slug:i},i):$e=n.jsx(e0,{hasMembers:$.length>0,root:f?.root});const M=(o==="member"||o==="info"||o==="chat")&&i?$.find(E=>E.slug===i)?.knowledge??[]:[],[K,ue]=O.useState(()=>localStorage.getItem("kw-kside")!=="hidden"),[Te,Ae]=O.useState(()=>Number(localStorage.getItem("kw-kside-w"))||460),N=M.length>0&&K;function B(E){ue(E),localStorage.setItem("kw-kside",E?"open":"hidden")}function J(E){Ae(E),localStorage.setItem("kw-kside-w",String(E))}return n.jsxs("div",{className:`runs-screen team-screen ${i||o==="chats"?"has-sessions":""} ${N?"has-knowledge":""}`,style:N?{"--kside-w":`${Te}px`}:void 0,children:[n.jsxs("aside",{className:"runs-side",children:[n.jsxs("div",{className:"side-head",children:[n.jsx("span",{className:"microlabel",children:"agents"}),n.jsx("span",{className:"spacer"}),n.jsxs(De,{href:"/agents/new",className:"open-raw",children:[n.jsx(le,{name:"add",className:"ms-sm"})," new"]})]}),n.jsxs("div",{className:"side-list",children:[n.jsxs("div",{className:`side-group ${Z&&me===""?"drop-over":""}`,...Ze(""),children:[F.map(Rt),Z!=null&&F.length===0&&n.jsx("div",{className:"side-group-empty",children:"no group — drop here"})]}),Q.map(E=>{const te=$.filter(ce=>ce.group===E);return n.jsxs("div",{className:`side-group ${Z&&me===E?"drop-over":""}`,...Ze(E),children:[n.jsxs("div",{className:"side-group-head",children:[T===E?n.jsx("input",{className:"side-group-rename",autoFocus:!0,value:Y,onChange:ce=>P(ce.target.value),onKeyDown:ce=>{ce.key==="Enter"&&V(E,Y),ce.key==="Escape"&&L(null)},onBlur:()=>V(E,Y)}):n.jsx("span",{className:"microlabel",children:E}),n.jsx("span",{className:"side-group-count num",children:te.length}),n.jsx("span",{className:"spacer"}),h&&T!==E&&n.jsx("button",{className:"side-group-x",title:"Rename group",onClick:()=>{L(E),P(E)},children:n.jsx(le,{name:"edit",className:"ms-sm"})}),h&&te.length===0&&p.includes(E)&&n.jsx("button",{className:"side-group-x",title:"Remove empty group",onClick:()=>ae(p.filter(ce=>ce!==E)),children:n.jsx(le,{name:"close",className:"ms-sm"})})]}),te.map(Rt),te.length===0&&n.jsx("div",{className:"side-group-empty",children:h?"drag agents here":"no agents"})]},E)}),f&&$.length===0&&n.jsx("div",{className:"viewer-note",children:"no agents yet"}),h&&(y?n.jsx("div",{className:"side-group-new",children:n.jsx("input",{autoFocus:!0,value:S,placeholder:"group name, e.g. Team Content",onChange:E=>R(E.target.value),onKeyDown:E=>{E.key==="Enter"&&ye(),E.key==="Escape"&&(x(!1),R(""))},onBlur:ye})}):n.jsxs("button",{className:"side-group-add",onClick:()=>x(!0),children:[n.jsx(le,{name:"add",className:"ms-sm"})," group"]}))]}),n.jsx("div",{className:"side-pinned",children:n.jsxs(De,{href:"/agents/chats",className:`side-row ${o==="chats"?"active":""}`,children:[n.jsx("span",{className:"agent-avatar sm",children:n.jsx("span",{"aria-hidden":!0,children:"💬"})}),n.jsxs("div",{className:"side-row-body",children:[n.jsx("div",{className:"side-row-top",children:n.jsx("span",{className:"side-wf",children:"General Chats"})}),n.jsx("div",{className:"side-row-sub",children:n.jsx("span",{className:"side-req",children:"chats without an agent"})})]})]})})]}),i&&n.jsx(Fy,{slug:i,chatId:r}),o==="chats"&&n.jsx(Py,{chatId:r}),n.jsx("div",{className:"runs-main",children:$e}),N&&n.jsx(Iy,{bundles:M,onHide:()=>B(!1),onResize:J}),M.length>0&&!K&&n.jsxs("button",{className:"kside-reopen",onClick:()=>B(!0),title:"Show knowledge sidebar",children:[n.jsx(le,{name:"menu_book",className:"ms-sm"})," knowledge"]})]})}function Iy({bundles:u,onHide:i,onResize:o}){const[r,f]=O.useState({}),[h,p]=O.useState(null),[v,y]=O.useState({}),[x,S]=O.useState({}),[R,T]=O.useState(null),[L,Y]=O.useState(""),[P,Z]=O.useState(!1),[C,me]=O.useState("");O.useEffect(()=>{f({});let W=!0,$;const Q=async()=>{await Promise.all(u.map(async F=>{try{const ae=await fetch(`/api/knowledge/${encodeURIComponent(F)}`,{cache:"no-store"}),ye=ae.ok?await ae.json():null;W&&f(V=>JSON.stringify(V[F])===JSON.stringify(ye)?V:{...V,[F]:ye})}catch{W&&f(ae=>F in ae?ae:{...ae,[F]:null})}})),W&&($=setTimeout(Q,6e3))};return Q(),()=>{W=!1,clearTimeout($)}},[u.join(",")]),O.useEffect(()=>{if(!h||R===h)return;const W=h.indexOf("::"),$=h.slice(0,W),Q=h.slice(W+2);let F=!0,ae;const ye=async()=>{try{const V=await fetch(`/api/knowledge/${encodeURIComponent($)}/concept?id=${encodeURIComponent(Q)}`,{cache:"no-store"}),ge=V.ok?await V.json():null;F&&y(Ze=>JSON.stringify(Ze[h])===JSON.stringify(ge)?Ze:{...Ze,[h]:ge})}catch{F&&y(V=>h in V?V:{...V,[h]:null})}F&&(ae=setTimeout(ye,6e3))};return ye(),()=>{F=!1,clearTimeout(ae)}},[h,R]);function he(W,$){const Q=`${W}::${$}`;p(h===Q?null:Q)}async function ee(W,$){const Q=`${W}::${$}`;Z(!0),me("");try{const ae=await(await fetch(`/api/knowledge/${encodeURIComponent(W)}/concept`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:$,content:L})})).json();ae.error?me(ae.error):(y(ye=>({...ye,[Q]:ae})),T(null))}catch(F){me(F.message)}Z(!1)}return n.jsxs("aside",{className:"runs-side knowledge-side",children:[n.jsx("div",{className:"kside-resizer",title:"Drag to resize",onMouseDown:W=>{W.preventDefault();const $=W.clientX,Q=W.currentTarget.parentElement.offsetWidth,F=ye=>o(Math.min(900,Math.max(280,Q+($-ye.clientX)))),ae=()=>{window.removeEventListener("mousemove",F),window.removeEventListener("mouseup",ae)};window.addEventListener("mousemove",F),window.addEventListener("mouseup",ae)}}),n.jsxs("div",{className:"side-head",children:[n.jsxs("span",{className:"kside-headline",children:[n.jsx("span",{className:"microlabel",children:"knowledge"}),n.jsx("span",{className:"kside-hint",children:"read & kept current by this agent"})]}),n.jsx("span",{className:"spacer"}),n.jsxs("button",{className:"open-raw",onClick:i,title:"Hide knowledge sidebar",children:["hide ",n.jsx(le,{name:"close",className:"ms-sm"})]})]}),n.jsx("div",{className:"side-list",children:u.map(W=>{const $=r[W],Q=x[W]===!0;return n.jsxs("div",{className:"kside-bundle",children:[n.jsxs("div",{className:"kside-bundle-head",children:[n.jsxs("button",{className:"kside-bundle-toggle","aria-expanded":!Q,onClick:()=>S({...x,[W]:!Q}),children:[n.jsx("span",{className:`kside-chev ${Q?"":"open"}`,"aria-hidden":!0,children:n.jsx(le,{name:"chevron_right",className:"ms-sm"})}),n.jsx("span",{className:"kside-bundle-name",children:W}),$&&n.jsx("span",{className:"kside-count num",children:$.concepts.length})]}),n.jsx(De,{href:`/knowledge/${encodeURIComponent(W)}`,className:"kside-open",title:"Open this bundle on the knowledge screen",children:"↗"})]}),!Q&&$===null&&n.jsx("div",{className:"viewer-note",children:"bundle not found"}),!Q&&$?.concepts.map(F=>{const ae=`${W}::${F.id}`,ye=h===ae,V=`/knowledge/${encodeURIComponent(W)}/${F.id.split("/").map(encodeURIComponent).join("/")}`;return n.jsxs("div",{className:`kside-concept ${ye?"open":""}`,children:[n.jsxs("button",{className:"kside-row","aria-expanded":ye,title:F.description||void 0,onClick:()=>he(W,F.id),children:[n.jsx("span",{className:`kside-chev ${ye?"open":""}`,"aria-hidden":!0,children:n.jsx(le,{name:"chevron_right",className:"ms-sm"})}),n.jsx("span",{className:"kside-title",children:F.title||F.id}),F.stale&&n.jsx("span",{className:"kside-stale",title:"Past its stale-after date — ask the agent to re-verify it",children:"stale"})]}),ye&&n.jsx("div",{className:"kside-card",ref:ge=>ge?.scrollIntoView({block:"nearest"}),children:v[ae]===void 0?n.jsx("div",{className:"viewer-note",children:"loading…"}):v[ae]===null?n.jsx("div",{className:"viewer-note",children:"could not load concept"}):R===ae?n.jsxs("div",{className:"kside-edit",children:[n.jsx("textarea",{className:"concept-edit",value:L,rows:Math.min(28,Math.max(10,L.split(`
79
+ `).length+2)),onChange:ge=>Y(ge.target.value),spellCheck:!1}),n.jsxs("div",{className:"kside-actions",children:[n.jsx("button",{className:"open-raw",disabled:P,onClick:()=>T(null),children:"cancel"}),n.jsx("button",{className:"open-raw",disabled:P,onClick:()=>ee(W,F.id),children:P?"saving…":n.jsxs(n.Fragment,{children:[n.jsx(le,{name:"check",className:"ms-sm"})," save"]})})]}),C&&n.jsxs("div",{className:"msg error",children:[n.jsx(le,{name:"error",className:"ms-sm"})," ",C]})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"kside-card-bar",children:[F.type&&n.jsx("span",{className:"kside-type",children:F.type}),$m(F)&&n.jsxs("span",{className:"kside-updated num",children:["updated ",dn($m(F))]}),n.jsx("span",{className:"spacer"}),n.jsxs("button",{className:"open-raw",onClick:()=>{Y(v[ae].raw),T(ae),me("")},children:[n.jsx(le,{name:"edit",className:"ms-sm"})," edit"]}),n.jsx(De,{href:V,className:"open-raw",children:"open ↗"})]}),n.jsx("div",{className:"kside-md md-body",dangerouslySetInnerHTML:{__html:yi.sanitize(Ce.parse(v[ae].body??"",{async:!1}))}})]})})]},F.id)}),!Q&&$&&$.concepts.length===0&&n.jsx("div",{className:"viewer-note",children:"no concepts yet"})]},W)})})]})}function $m(u){return[u.generated?.at,...u.verified.map(o=>o.at)].filter(o=>typeof o=="string"&&o.length>0).sort().pop()}function Wy({slug:u}){const[i,o]=O.useState(!1);return O.useEffect(()=>{let r=!0;return o(!1),fetch("/api/chats").then(f=>f.json()).then(f=>{if(!r)return;const h=f.chats.find(p=>p.scope.kind==="team"&&p.scope.member===u);h?dl(`/agents/${encodeURIComponent(u)}/chat/${h.id}`,{replace:!0}):o(!0)}).catch(()=>r&&o(!0)),()=>{r=!1}},[u]),i?n.jsx(rp,{slug:u}):n.jsx("div",{className:"empty",children:"loading…"})}function Fy({slug:u,chatId:i}){const o=He("/api/chats",!1),r=(o?.chats??[]).filter(p=>p.scope.kind==="team"&&p.scope.member===u),[f,h]=O.useState(!1);return n.jsxs("aside",{className:"runs-side",children:[n.jsxs("div",{className:"side-head",children:[n.jsx("span",{className:"microlabel",children:"sessions"}),n.jsx("span",{className:"spacer"}),n.jsx(De,{href:`/agents/${encodeURIComponent(u)}/info`,className:"open-raw",title:"agent profile & settings",children:"profile"}),n.jsx("button",{className:"open-raw",disabled:f,onClick:async()=>{h(!0),await pn("claude",{kind:"team",member:u}),h(!1)},children:f?"…":n.jsxs(n.Fragment,{children:[n.jsx(le,{name:"add",className:"ms-sm"})," new"]})})]}),n.jsxs("div",{className:"side-list",children:[r.map(p=>n.jsxs(De,{href:`/agents/${encodeURIComponent(u)}/chat/${p.id}`,className:`side-row ${p.id===i?"active":""}`,children:[n.jsx("span",{className:`lamp ${p.busy?"running":"pending"}`}),n.jsxs("div",{className:"side-row-body",children:[n.jsx("div",{className:"side-row-top",children:n.jsx("span",{className:"side-wf",children:p.title||"new session"})}),n.jsx("div",{className:"side-row-sub",children:n.jsx("span",{className:"side-when num",children:dn(p.updatedAt)})})]}),n.jsx("button",{type:"button",className:"row-x",title:"delete session",onClick:async v=>{v.preventDefault(),v.stopPropagation(),window.confirm(`Delete session "${p.title||p.id}"?`)&&(await fetch(`/api/chats/${p.id}`,{method:"DELETE"}).catch(()=>{}),p.id===i&&dl(`/agents/${encodeURIComponent(u)}`))},children:n.jsx(le,{name:"close",className:"ms-sm"})})]},p.id)),o&&r.length===0&&n.jsx("div",{className:"viewer-note",children:"no sessions yet"})]})]})}function Py({chatId:u}){const i=He("/api/chats",!1),o=(i?.chats??[]).filter(r=>r.scope.kind!=="team");return n.jsxs("aside",{className:"runs-side",children:[n.jsxs("div",{className:"side-head",children:[n.jsx("span",{className:"microlabel",children:"chats"}),n.jsx("span",{className:"spacer"}),n.jsxs(De,{href:"/agents/chats",className:"open-raw",children:[n.jsx(le,{name:"add",className:"ms-sm"})," new"]})]}),n.jsxs("div",{className:"side-list",children:[o.map(r=>n.jsxs(De,{href:`/agents/chats/${r.id}`,className:`side-row ${r.id===u?"active":""}`,children:[n.jsx("span",{className:`lamp ${r.busy?"running":"pending"}`}),n.jsxs("div",{className:"side-row-body",children:[n.jsx("div",{className:"side-row-top",children:n.jsx("span",{className:"side-wf",children:r.title||"new chat"})}),n.jsxs("div",{className:"side-row-sub",children:[n.jsxs("span",{className:"side-req",children:[r.agent,r.scope.kind==="run"?` · ${r.scope.runId}`:r.scope.kind==="kraftwerk"?" · kraftwerk":r.scope.kind==="knowledge"?` · knowledge${r.scope.bundle?`:${r.scope.bundle}`:""}`:""]}),n.jsx("span",{className:"side-when num",children:dn(r.updatedAt)})]})]}),n.jsx("button",{type:"button",className:"row-x",title:"delete chat",onClick:async f=>{f.preventDefault(),f.stopPropagation(),window.confirm(`Delete chat "${r.title||r.id}"?`)&&(await fetch(`/api/chats/${r.id}`,{method:"DELETE"}).catch(()=>{}),r.id===u&&dl("/agents/chats"))},children:n.jsx(le,{name:"close",className:"ms-sm"})})]},r.id)),i&&o.length===0&&n.jsx("div",{className:"viewer-note",children:"no chats yet"})]})]})}function e0({hasMembers:u,root:i}){return n.jsxs("div",{className:"new-chat",children:[n.jsx("div",{className:"page-head",children:n.jsx("h1",{children:"agents"})}),n.jsxs("section",{className:"panel new-chat-panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"what lives here"})}),n.jsxs("div",{className:"know-intro",children:["Your agents, set up like teammates: each one has a name, a role (system prompt), a harness/model to run on, and the workflows that belong to its job. An agent lives in"," ",n.jsx("code",{children:i?`${i}/<slug>/`:"agents/<slug>/"})," as ",n.jsx("code",{children:"agent.yml"})," +"," ",n.jsx("code",{children:"system.md"})," — git-tracked, so your team travels with the repo. Every session is a persistent conversation with that agent; it knows its connected workflows and knowledge bundles, runs the workflows for you, and keeps the knowledge current."]}),n.jsx("div",{style:{padding:"0 16px 16px"},children:n.jsx("button",{className:"run-btn",onClick:()=>dl("/agents/new"),children:n.jsxs(n.Fragment,{children:[n.jsx(le,{name:"add",className:"ms-sm"})," ",u?"new agent":"create your first agent"]})})})]})]})}function rp({slug:u}){const[i,o]=O.useState(null),[r,f]=O.useState(!1),[h,p]=O.useState(!1),[v,y]=O.useState(!1),[x,S]=O.useState(""),[R,T]=O.useState(""),[L,Y]=O.useState([]),[P,Z]=O.useState(!0),[C,me]=O.useState(!1),[he,ee]=O.useState(""),W=He("/api/workflows",!1),$=He("/api/knowledge",!1),Q=He("/api/skills",!1);O.useEffect(()=>{let V=!0;return fetch(`/api/team/${encodeURIComponent(u)}`).then(ge=>ge.ok?ge.json():Promise.reject()).then(ge=>V&&o(ge)).catch(()=>V&&f(!0)),()=>{V=!1}},[u]);async function F(V){if(i){me(!0),ee("");try{const Ze=await(await fetch(`/api/team/${encodeURIComponent(u)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({name:i.name,emoji:i.emoji,description:i.description,harness:i.harness,model:i.model,effort:i.effort,group:i.group,system:i.system,workflows:i.workflows,knowledge:i.knowledge,skills:i.skills,...V})})).json();Ze.error?ee(Ze.error):(o(Ze),S(""))}catch(ge){ee(ge.message)}me(!1)}}function ae(V,ge){Y(ge?[...L,V]:L.filter(Ze=>Ze!==V))}if(r)return n.jsx("div",{className:"empty",children:"agent not found"});if(!i)return n.jsx("div",{className:"empty",children:"loading…"});const ye=V=>n.jsxs("div",{className:"team-form-row",style:{marginTop:8},children:[n.jsx("button",{className:"run-btn",disabled:C,onClick:()=>{F(V)},children:C?"saving…":"save"}),n.jsx("button",{className:"open-raw",disabled:C,onClick:()=>(S(""),ee("")),children:"cancel"})]});return n.jsxs("div",{className:"member-view",children:[n.jsxs("div",{className:"detail-head",children:[n.jsx("span",{className:"agent-avatar lg",children:n.jsx("span",{"aria-hidden":!0,children:i.emoji})}),n.jsx("h1",{children:i.name}),n.jsx("span",{className:"chip agent",children:i.harness}),i.model&&n.jsx("span",{className:"chip",children:i.model}),i.effort&&n.jsxs("span",{className:"chip",children:["effort: ",i.effort]}),n.jsx("span",{className:"spacer"}),n.jsx(De,{href:`/agents/${encodeURIComponent(u)}/edit`,className:"open-raw",children:"edit"}),n.jsx("button",{className:"run-btn",disabled:h,onClick:async()=>{p(!0),await pn("claude",{kind:"team",member:u}),p(!1)},children:h?"starting…":"new session"})]}),n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"m3-list",children:[n.jsxs("button",{type:"button",className:"m3-row m3-toggle",onClick:()=>y(!v),children:[n.jsx("span",{className:"m3-ico",children:n.jsx(le,{name:"badge"})}),n.jsxs("span",{className:"m3-body",children:[n.jsx("span",{className:"m3-head",children:"role"}),!v&&n.jsx("span",{className:"m3-sub m3-ellipsis",children:(i.system||"").trim().split(`
80
+ `)[0]||"empty — expand to give this agent a role"})]}),n.jsx("span",{className:`m3-chev ${v?"open":""}`,children:n.jsx(le,{name:"expand_more",className:"ms-sm"})})]}),v&&x!=="role"&&n.jsxs("div",{className:"m3-expand",children:[n.jsx("pre",{children:i.system||"(empty — click edit to give this agent a role)"}),n.jsxs("div",{className:"team-form-row",style:{marginTop:10},children:[n.jsxs("button",{className:"open-raw",onClick:()=>{T(i.system),S("role"),ee("")},children:[n.jsx(le,{name:"edit",className:"ms-sm"})," edit role"]}),n.jsx("span",{className:"spacer"}),n.jsxs("span",{className:"m3-sub",children:["agents/",i.slug,"/system.md"]})]})]}),v&&x==="role"&&n.jsxs("div",{className:"m3-expand",children:[n.jsx("textarea",{className:"concept-edit",rows:Math.min(24,Math.max(8,R.split(`
81
+ `).length+2)),value:R,placeholder:"You are the ... for this project. Your job is ...",onChange:V=>T(V.target.value),spellCheck:!1}),ye({system:R})]}),n.jsxs("div",{className:"m3-row",children:[n.jsx("span",{className:"m3-ico",children:n.jsx(le,{name:"account_tree"})}),n.jsxs("span",{className:"m3-body",children:[n.jsx("span",{className:"m3-head",children:"workflows"}),x==="workflows"?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"wf-checks",children:[(W?.workflows??[]).map(V=>n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:L.includes(V.slug),onChange:ge=>ae(V.slug,ge.target.checked)}),n.jsx("b",{children:V.slug}),V.description&&n.jsxs("span",{className:"opt-hint",children:[" — ",V.description]})]},V.slug)),(W?.workflows??[]).length===0&&n.jsx("div",{className:"viewer-note",children:"no workflows in this project"})]}),ye({workflows:L})]}):i.workflows.length===0?n.jsx("span",{className:"m3-sub",children:"none connected — the agent can run any workflow you connect"}):n.jsx("span",{className:"m3-chips",children:i.workflows.map(V=>n.jsx(De,{href:`/workflows/${encodeURIComponent(V)}`,className:"chip",children:V},V))})]}),x!=="workflows"&&n.jsx("button",{className:"open-raw",onClick:()=>{Y(i.workflows),S("workflows"),ee("")},children:"edit"})]}),n.jsxs("div",{className:"m3-row",children:[n.jsx("span",{className:"m3-ico",children:n.jsx(le,{name:"menu_book"})}),n.jsxs("span",{className:"m3-body",children:[n.jsx("span",{className:"m3-head",children:"knowledge"}),x==="knowledge"?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"wf-checks",children:[($?.bundles??[]).map(V=>n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:L.includes(V.name),onChange:ge=>ae(V.name,ge.target.checked)}),n.jsx("b",{children:V.name}),n.jsxs("span",{className:"opt-hint",children:[" — ",V.concepts," concepts"]})]},V.name)),($?.bundles??[]).length===0&&n.jsx("div",{className:"viewer-note",children:"no knowledge bundles in this project"})]}),ye({knowledge:L})]}):i.knowledge.length===0?n.jsx("span",{className:"m3-sub",children:"none connected — connected bundles are read and kept current by the agent"}):n.jsx("span",{className:"m3-chips",children:i.knowledge.map(V=>n.jsx(De,{href:`/knowledge/${encodeURIComponent(V)}`,className:"chip",children:V},V))})]}),x!=="knowledge"&&n.jsx("button",{className:"open-raw",onClick:()=>{Y(i.knowledge),S("knowledge"),ee("")},children:"edit"})]}),n.jsxs("div",{className:"m3-row",children:[n.jsx("span",{className:"m3-ico",children:n.jsx(le,{name:"extension"})}),n.jsxs("span",{className:"m3-body",children:[n.jsx("span",{className:"m3-head",children:"shared skills"}),x==="skills"?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"wf-checks",children:[n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:P,onChange:V=>Z(V.target.checked)}),n.jsx("b",{children:"all skills"}),n.jsx("span",{className:"opt-hint",children:" — every discovered skill, including future ones"})]}),!P&&(Q?.skills??[]).map(V=>n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:L.includes(V.name),onChange:ge=>ae(V.name,ge.target.checked)}),n.jsxs("b",{children:["/",V.name]}),V.description&&n.jsxs("span",{className:"opt-hint",children:[" — ",V.description]})]},V.name)),!P&&(Q?.skills??[]).length===0&&n.jsx("div",{className:"viewer-note",children:"no skills found (.claude/skills, project or user)"})]}),ye({skills:P?void 0:L})]}):i.skills===void 0?n.jsx("span",{className:"m3-sub",children:"all discovered skills (default) — invoke with /name in a session"}):i.skills.length===0?n.jsx("span",{className:"m3-sub",children:"none — this agent runs without skills"}):n.jsx("span",{className:"m3-chips",children:i.skills.map(V=>n.jsxs("span",{className:"chip",children:["/",V]},V))})]}),x!=="skills"&&n.jsx("button",{className:"open-raw",onClick:()=>{Z(i.skills===void 0),Y(i.skills??[]),S("skills"),ee("")},children:"edit"})]})]}),he&&n.jsxs("div",{className:"msg error",children:[n.jsx(le,{name:"error",className:"ms-sm"})," ",he]})]}),n.jsx(l0,{slug:u}),n.jsx(a0,{slug:u})]})}const t0=`---
82
+ description: What this skill is for (one line)
83
+ ---
84
+
85
+ Instructions this agent follows when the skill applies or is invoked with /<name>.
86
+ `;function l0({slug:u}){const o=He(`/api/team/${encodeURIComponent(u)}/skills`,!1)?.skills??[],[r,f]=O.useState(null),[h,p]=O.useState(!1),[v,y]=O.useState("");async function x(T){y("");const L=await fetch(`/api/team/${encodeURIComponent(u)}/skills/${encodeURIComponent(T)}`),Y=await L.json().catch(()=>null);if(!L.ok||!Y||Y.error)return void y(Y?.error??"could not load skill");f({name:T,content:Y.content??"",isNew:!1})}async function S(){if(!r)return;p(!0),y("");const L=await(await fetch(`/api/team/${encodeURIComponent(u)}/skills`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({name:r.name,content:r.content})})).json().catch(()=>({error:"save failed"}));p(!1),L.error?y(L.error):f(null)}async function R(T){window.confirm(`Delete skill "/${T}" of this agent (its folder is removed)?`)&&(await fetch(`/api/team/${encodeURIComponent(u)}/skills/${encodeURIComponent(T)}`,{method:"DELETE"}).catch(()=>{}),r?.name===T&&f(null))}return n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"own skills — only this agent"}),n.jsx("span",{className:"spacer"}),!r&&n.jsxs("button",{className:"open-raw",onClick:()=>{f({name:"",content:t0,isNew:!0}),y("")},children:[n.jsx(le,{name:"add",className:"ms-sm"})," new skill"]})]}),o.length===0&&!r&&n.jsxs("div",{className:"viewer-note",children:["none — skills in ",n.jsxs("code",{children:["agents/",u,"/skills/"]})," are private to this agent; skills for every agent live in the workspace skills folder."]}),o.length>0&&!r&&n.jsx("div",{className:"m3-list",children:o.map(T=>n.jsxs("div",{className:"m3-row",children:[n.jsx("span",{className:"m3-ico",children:n.jsx(le,{name:"extension"})}),n.jsxs("span",{className:"m3-body",children:[n.jsxs("span",{className:"m3-head",children:["/",T.name]}),n.jsx("span",{className:"m3-sub",children:T.description||n.jsx("code",{children:"SKILL.md"})})]}),n.jsxs("button",{className:"open-raw",onClick:()=>{x(T.name)},children:[n.jsx(le,{name:"edit",className:"ms-sm"})," edit"]}),n.jsx("button",{className:"open-raw",onClick:()=>{R(T.name)},children:n.jsx(le,{name:"close",className:"ms-sm"})})]},T.name))}),r&&n.jsxs("div",{className:"team-form",children:[n.jsx("div",{className:"team-form-row",children:n.jsxs("label",{className:"team-field",style:{flex:1},children:["name — invoked as /<name>",n.jsx("input",{value:r.name,placeholder:"e.g. report-html",disabled:!r.isNew,onChange:T=>f({...r,name:T.target.value})})]})}),n.jsxs("label",{className:"team-field",children:["SKILL.md — frontmatter (description) + the instructions",n.jsx("textarea",{className:"concept-edit",rows:Math.min(28,Math.max(12,r.content.split(`
87
+ `).length+2)),value:r.content,spellCheck:!1,onChange:T=>f({...r,content:T.target.value})})]}),n.jsxs("div",{className:"team-form-row",children:[n.jsx("button",{className:"run-btn",disabled:h||!r.name.trim(),onClick:()=>{S()},children:h?"saving…":"save"}),n.jsx("button",{className:"open-raw",disabled:h,onClick:()=>f(null),children:"cancel"})]})]}),v&&n.jsxs("div",{className:"msg error",children:[n.jsx(le,{name:"error",className:"ms-sm"})," ",v]})]})}function a0({slug:u}){const o=He(`/api/team/${encodeURIComponent(u)}/routines`,!1)?.routines??[],[r,f]=O.useState(null),[h,p]=O.useState(""),[v,y]=O.useState("");async function x(T){p("");const Y=await(await fetch(`/api/team/${encodeURIComponent(u)}/routines`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(T)})).json();return Y.error?(p(Y.error),!1):!0}async function S(T){y(T),p("");const Y=await(await fetch(`/api/team/${encodeURIComponent(u)}/routines/${encodeURIComponent(T)}/run`,{method:"POST"})).json();y(""),Y.error?p(Y.error):Y.chatId&&dl(`/agents/${encodeURIComponent(u)}/chat/${Y.chatId}`)}async function R(T){window.confirm(`Delete routine "${T}"?`)&&await fetch(`/api/team/${encodeURIComponent(u)}/routines/${encodeURIComponent(T)}`,{method:"DELETE"}).catch(()=>{})}return n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"routines — scheduled prompts"}),n.jsx("span",{className:"spacer"}),!r&&n.jsxs("button",{className:"open-raw",onClick:()=>f({name:"",schedule:"0 9 * * 1-5",prompt:"",enabled:!0}),children:[n.jsx(le,{name:"add",className:"ms-sm"})," new routine"]})]}),o.length===0&&!r&&n.jsx("div",{className:"viewer-note",children:"none — a routine messages this agent on a schedule (cron, server local time) and each run opens a new session with the result."}),o.length>0&&n.jsx("div",{className:"m3-list",children:o.map(T=>n.jsxs("div",{className:"m3-row",children:[n.jsx("span",{className:"m3-ico",children:n.jsx(le,{name:"schedule"})}),n.jsxs("span",{className:"m3-body",children:[n.jsxs("span",{className:"m3-head",children:[T.name,T.lastError&&n.jsx("span",{className:"chip stale",title:T.lastError,children:"error"})]}),n.jsxs("span",{className:"m3-sub",children:[n.jsx("code",{children:T.schedule}),T.enabled?T.nextRunAt?` · next ${dn(T.nextRunAt)}`:"":" · paused"," · ",T.lastChatId?n.jsxs(De,{href:`/agents/${encodeURIComponent(u)}/chat/${T.lastChatId}`,children:["last run ",dn(T.lastRunAt)]}):"never ran"]})]}),n.jsx("button",{className:"open-raw",disabled:v===T.id,onClick:()=>S(T.id),children:v===T.id?"starting…":n.jsxs(n.Fragment,{children:[n.jsx(le,{name:"play_arrow",className:"ms-sm"})," run"]})}),n.jsx("button",{className:"open-raw",onClick:()=>f({id:T.id,name:T.name,schedule:T.schedule,prompt:T.prompt,enabled:T.enabled}),children:"edit"}),n.jsx("button",{className:"open-raw",onClick:()=>{R(T.id)},children:"delete"}),n.jsxs("label",{className:"m3-switch",title:T.enabled?"enabled — click to pause":"paused — click to enable",children:[n.jsx("input",{type:"checkbox",checked:T.enabled,onChange:()=>{x({id:T.id,name:T.name,schedule:T.schedule,prompt:T.prompt,enabled:!T.enabled})}}),n.jsx("span",{className:"m3-switch-track"})]})]},T.id))}),r&&n.jsxs("div",{className:"team-form",children:[n.jsxs("div",{className:"team-form-row",children:[n.jsxs("label",{className:"team-field",style:{flex:1},children:["name",n.jsx("input",{value:r.name,placeholder:"e.g. Morning report",onChange:T=>f({...r,name:T.target.value})})]}),n.jsxs("label",{className:"team-field",style:{width:200},children:["schedule (cron)",n.jsx("input",{value:r.schedule,placeholder:"0 9 * * 1-5",onChange:T=>f({...r,schedule:T.target.value})})]}),n.jsxs("label",{className:"team-field wf-checks",style:{width:90},children:["enabled",n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:r.enabled,onChange:T=>f({...r,enabled:T.target.checked})}),"on"]})]})]}),n.jsxs("label",{className:"team-field",children:["prompt — what to ask this agent on each run",n.jsx("textarea",{rows:5,value:r.prompt,placeholder:"Check ... and summarize what changed.",onChange:T=>f({...r,prompt:T.target.value})})]}),n.jsxs("div",{className:"team-form-row",children:[n.jsx("button",{className:"run-btn",disabled:!r.name.trim()||!r.prompt.trim(),onClick:async()=>{await x(r)&&f(null)},children:r.id?"save routine":"create routine"}),n.jsx("button",{className:"open-raw",onClick:()=>(f(null),p("")),children:"cancel"})]})]}),h&&n.jsxs("div",{className:"msg error",children:[n.jsx(le,{name:"error",className:"ms-sm"})," ",h]})]})}function Xm({slug:u}){const[i,o]=O.useState(u?null:L()),[r,f]=O.useState(""),[h,p]=O.useState(!1),y=He("/api/workflows",!1)?.workflows??[],S=He("/api/knowledge",!1)?.bundles??[],T=He("/api/skills",!1)?.skills??[];O.useEffect(()=>{u&&fetch(`/api/team/${encodeURIComponent(u)}`).then(C=>C.ok?C.json():Promise.reject()).then(C=>o({name:C.name,emoji:C.emoji,description:C.description??"",harness:C.harness,model:C.model??"",effort:C.effort??"",group:C.group??"",system:C.system,workflows:C.workflows,knowledge:C.knowledge??[],skillsAll:C.skills===void 0,skills:C.skills??[]})).catch(()=>f("agent not found"))},[u]);function L(){return{name:"",emoji:"🤖",description:"",harness:"claude",model:"",effort:"",group:"",system:"",workflows:[],knowledge:[],skillsAll:!0,skills:[]}}async function Y(){if(!i)return;p(!0),f("");const me=await(await fetch(u?`/api/team/${encodeURIComponent(u)}`:"/api/team",{method:u?"PUT":"POST",headers:{"content-type":"application/json"},body:JSON.stringify({...i,skills:i.skillsAll?void 0:i.skills})})).json();p(!1),me.error?f(me.error):dl(`/agents/${encodeURIComponent(me.slug)}/info`)}async function P(){!u||!window.confirm(`Delete agent "${u}" and its definition folder?`)||(await fetch(`/api/team/${encodeURIComponent(u)}`,{method:"DELETE"}).catch(()=>{}),dl("/agents"))}if(!i)return n.jsx("div",{className:"empty",children:r||"loading…"});const Z=C=>o({...i,...C});return n.jsxs("div",{className:"new-chat",children:[n.jsx("div",{className:"page-head",children:n.jsx("h1",{children:u?`edit ${u}`:"new agent"})}),n.jsx("section",{className:"panel new-chat-panel",children:n.jsxs("div",{className:"team-form",children:[n.jsxs("div",{className:"team-form-row",children:[n.jsxs("label",{className:"team-field",style:{flex:1},children:["name",n.jsx("input",{value:i.name,placeholder:"e.g. Max",onChange:C=>Z({name:C.target.value})})]}),n.jsxs("label",{className:"team-field",style:{width:90},children:["emoji",n.jsx("input",{value:i.emoji,onChange:C=>Z({emoji:C.target.value})})]})]}),n.jsx("div",{className:"emoji-pick",children:Jy.map(C=>n.jsx("button",{type:"button",className:i.emoji===C?"active":"",onClick:()=>Z({emoji:C}),children:C},C))}),n.jsxs("div",{className:"team-form-row",children:[n.jsxs("label",{className:"team-field",style:{flex:1},children:["description",n.jsx("input",{value:i.description,placeholder:"one line: what this agent is for",onChange:C=>Z({description:C.target.value})})]}),n.jsxs("label",{className:"team-field",style:{width:180},children:["group",n.jsx("input",{value:i.group,placeholder:"none",onChange:C=>Z({group:C.target.value})})]})]}),n.jsxs("div",{className:"team-form-row",children:[n.jsxs("label",{className:"team-field",style:{width:140},children:["harness",n.jsxs("select",{value:i.harness,onChange:C=>Z({harness:C.target.value}),children:[n.jsx("option",{value:"claude",children:"claude"}),n.jsx("option",{value:"codex",children:"codex"}),n.jsx("option",{value:"pi",children:"pi"})]})]}),n.jsxs("label",{className:"team-field",style:{flex:1},children:["model",n.jsx("input",{value:i.model,placeholder:"harness default — e.g. sonnet, gpt-5.6-sol",onChange:C=>Z({model:C.target.value})})]}),n.jsxs("label",{className:"team-field",style:{width:140},children:["effort",n.jsx("select",{value:i.effort,onChange:C=>Z({effort:C.target.value}),children:Ky.map(C=>n.jsx("option",{value:C,children:C||"default"},C))})]})]}),n.jsxs("label",{className:"team-field",children:["system prompt — the agent's role",n.jsx("textarea",{rows:10,value:i.system,placeholder:"You are the ... for this project. Your job is ...",onChange:C=>Z({system:C.target.value})})]}),n.jsxs("div",{className:"team-field",children:[n.jsx("span",{className:"team-field-label",children:"connected workflows — autoloaded into the agent's context; it can run them"}),n.jsxs("div",{className:"wf-checks",children:[y.map(C=>n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:i.workflows.includes(C.slug),onChange:me=>Z({workflows:me.target.checked?[...i.workflows,C.slug]:i.workflows.filter(he=>he!==C.slug)})}),n.jsx("b",{children:C.slug}),C.description&&n.jsxs("span",{className:"opt-hint",children:[" — ",C.description]})]},C.slug)),y.length===0&&n.jsx("div",{className:"viewer-note",children:"no workflows in this project"})]})]}),n.jsxs("div",{className:"team-field",children:[n.jsx("span",{className:"team-field-label",children:"connected knowledge — OKF bundles the agent consults and maintains"}),n.jsxs("div",{className:"wf-checks",children:[S.map(C=>n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:i.knowledge.includes(C.name),onChange:me=>Z({knowledge:me.target.checked?[...i.knowledge,C.name]:i.knowledge.filter(he=>he!==C.name)})}),n.jsx("b",{children:C.name}),n.jsxs("span",{className:"opt-hint",children:[" — ",C.concepts," concepts"]})]},C.name)),S.length===0&&n.jsx("div",{className:"viewer-note",children:"no knowledge bundles in this project"})]})]}),n.jsxs("div",{className:"team-field",children:[n.jsx("span",{className:"team-field-label",children:"connected skills — workspace skill packages (see the skills tab); invoked with /name in sessions"}),n.jsxs("div",{className:"wf-checks",children:[n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:i.skillsAll,onChange:C=>Z({skillsAll:C.target.checked})}),n.jsx("b",{children:"all skills"}),n.jsx("span",{className:"opt-hint",children:" — every discovered skill, including future ones"})]}),!i.skillsAll&&T.map(C=>n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:i.skills.includes(C.name),onChange:me=>Z({skills:me.target.checked?[...i.skills,C.name]:i.skills.filter(he=>he!==C.name)})}),n.jsxs("b",{children:["/",C.name]}),C.description&&n.jsxs("span",{className:"opt-hint",children:[" — ",C.description]})]},C.name)),!i.skillsAll&&T.length===0&&n.jsx("div",{className:"viewer-note",children:"no skills found (.claude/skills, project or user)"})]})]}),r&&n.jsxs("div",{className:"msg error",children:[n.jsx(le,{name:"error",className:"ms-sm"})," ",r]}),n.jsxs("div",{className:"team-form-row",children:[n.jsx("button",{className:"run-btn",disabled:!i.name.trim()||h,onClick:Y,children:h?"saving…":u?"save":"create"}),n.jsx("span",{className:"spacer"}),u&&n.jsx("button",{className:"stop-btn",onClick:P,children:"delete agent"})]})]})})]})}function n0(){const[u,i]=O.useState(null),[o,r]=O.useState(""),[f,h]=O.useState(""),[p,v]=O.useState([]),[y,x]=O.useState(!1),[S,R]=O.useState(!1),[T,L]=O.useState(!1),[Y,P]=O.useState("");O.useEffect(()=>{fetch("/api/settings").then(ee=>ee.json()).then(ee=>{i(ee),r(ee.config.name??""),h(ee.config.icon??""),v(ee.config.switcher??[])}).catch(()=>P("could not load settings"))},[]);const Z=()=>{x(!0),L(!1),P("")};async function C(){R(!0),P("");try{const ee=await fetch("/api/settings",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({name:o,icon:f,switcher:p})}),W=await ee.json();if(!ee.ok)throw new Error(W.error||"save failed");i(W),v(W.config.switcher??[]),x(!1),L(!0),window.dispatchEvent(new Event("kw-meta-refresh"))}catch(ee){P(ee.message)}finally{R(!1)}}const me=(ee,W)=>{v($=>$.map((Q,F)=>F===ee?{...Q,...W}:Q)),Z()};if(!u)return n.jsx("div",{className:"empty",children:Y||"loading…"});const he=[["port",String(u.resolved.port),"kraftwerk ui listens here (CLI --port wins)"],["workflows",u.resolved.workflowsRoot??"— none found","workflow definitions"],["output",u.resolved.outputDir,"run artifacts"],["knowledge",u.config.knowledge??"knowledge","OKF knowledge bundles"],["agents",u.config.agents??"agents","team agent definitions"],["skills",u.config.skills??"skills","workspace skills"]];return n.jsxs("div",{className:"settings-screen",children:[n.jsxs("div",{className:"settings-head",children:[n.jsxs("h1",{children:[n.jsx(le,{name:"settings",className:"ms-lg"})," Settings"]}),n.jsx("span",{className:"spacer"}),Y&&n.jsx("span",{className:"settings-err",children:Y}),T&&!y&&n.jsxs("span",{className:"settings-saved",children:[n.jsx(le,{name:"check",className:"ms-sm"})," saved"]}),n.jsx("button",{className:"run-btn",disabled:S||!y,onClick:()=>{C()},children:S?"saving…":"save changes"})]}),n.jsxs("section",{className:"panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"workspace"})}),n.jsxs("div",{className:"team-form",children:[n.jsxs("div",{className:"team-form-row",children:[n.jsxs("label",{className:"team-field",style:{width:90},children:["icon",n.jsx("input",{value:f,placeholder:"🤖",onChange:ee=>{h(ee.target.value),Z()}})]}),n.jsxs("label",{className:"team-field",style:{flex:1},children:["name",n.jsx("input",{value:o,placeholder:"my workspace",onChange:ee=>{r(ee.target.value),Z()}})]})]}),n.jsx("div",{className:"settings-note",children:"Shown in the header, browser tab and to other workspaces discovering this one."})]})]}),n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"workspace switcher"}),n.jsx("span",{className:"spacer"}),n.jsxs("button",{className:"run-btn tonal",onClick:()=>{v(ee=>[...ee,{name:"",url:"http://localhost:"}]),Z()},children:[n.jsx(le,{name:"add",className:"ms-sm"})," add entry"]})]}),n.jsxs("div",{className:"team-form",children:[p.length===0&&n.jsx("div",{className:"settings-note",children:"No manual entries."}),p.map((ee,W)=>n.jsxs("div",{className:"team-form-row",children:[n.jsxs("label",{className:"team-field",style:{width:70},children:["icon",n.jsx("input",{value:ee.icon??"",placeholder:"•",onChange:$=>me(W,{icon:$.target.value})})]}),n.jsxs("label",{className:"team-field",style:{flex:1},children:["name",n.jsx("input",{value:ee.name,placeholder:"other workspace",onChange:$=>me(W,{name:$.target.value})})]}),n.jsxs("label",{className:"team-field",style:{flex:1.4},children:["url",n.jsx("input",{value:ee.url,placeholder:"http://localhost:1982",onChange:$=>me(W,{url:$.target.value})})]}),n.jsx("button",{className:"row-x settings-row-x",title:"remove entry",onClick:()=>{v($=>$.filter((Q,F)=>F!==W)),Z()},children:n.jsx(le,{name:"close",className:"ms-sm"})})]},W)),n.jsx("div",{className:"settings-note",children:"Running workspaces on this machine are discovered automatically — manual entries are for remote instances or extra links."})]})]}),n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"paths & port"}),n.jsx("span",{className:"spacer"}),n.jsx("code",{className:"settings-file",title:u.configPath,children:u.exists?u.configPath:`${u.configPath} (not created yet)`})]}),n.jsx("div",{className:"settings-kv-list",children:he.map(([ee,W,$])=>n.jsxs("div",{className:"settings-kv",children:[n.jsx("span",{className:"microlabel",children:ee}),n.jsx("code",{children:W}),n.jsx("span",{className:"settings-kv-hint",children:$})]},ee))}),n.jsxs("div",{className:"settings-note",style:{padding:"0 18px 14px"},children:["Read-only here — edit ",n.jsx("code",{children:"kraftwerk.yml"})," directly to change these."]})]})]})}function s0(){const i=Nv().split("/").filter(Boolean),[o,r]=O.useState(""),[f,h]=O.useState(""),[p,v]=O.useState([]);O.useEffect(()=>{let x=!0,S;const R=async()=>{try{const L=await fetch("/api/meta",{cache:"no-store"}).then(Y=>Y.json());if(!x)return;r(L.projectName??""),h(L.projectIcon??""),v(Array.isArray(L.switcher)?L.switcher:[])}catch{}x&&(S=setTimeout(R,3e4))};R();const T=()=>{clearTimeout(S),R()};return window.addEventListener("kw-meta-refresh",T),()=>{x=!1,clearTimeout(S),window.removeEventListener("kw-meta-refresh",T)}},[]),O.useEffect(()=>{if(document.title=o?`${o} — kraftwerk`:"kraftwerk inspector",!f)return;const x=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="0.9em" font-size="85">${f}</text></svg>`;let S=document.querySelector('link[rel="icon"]');S||(S=document.createElement("link"),S.rel="icon",document.head.appendChild(S)),S.href=`data:image/svg+xml,${encodeURIComponent(x)}`},[o,f]);let y;return i[0]==="runs"&&i[1]?y=n.jsx(oy,{id:i[1]}):i[0]==="runs"?y=n.jsx(c0,{}):i[0]==="workflows"&&i[1]?y=n.jsx(Ny,{slug:decodeURIComponent(i[1])}):i[0]==="workflows"?y=n.jsx(jy,{}):i[0]==="chats"?y=n.jsx(Ym,{seg:i}):i[0]==="skills"?y=n.jsx(Qy,{name:i[1]?decodeURIComponent(i[1]):void 0}):i[0]==="settings"?y=n.jsx(n0,{}):i[0]==="agents"||i[0]==="team"?y=n.jsx(Ym,{seg:i.slice(1)}):i[0]==="knowledge"?y=n.jsx(My,{bundle:i[1]?decodeURIComponent(i[1]):void 0,conceptId:i.length>2?i.slice(2).map(decodeURIComponent).join("/"):void 0}):y=n.jsx(_y,{}),n.jsxs(n.Fragment,{children:[n.jsxs("header",{className:"topbar",children:[n.jsxs("span",{className:"wordmark",children:[n.jsx("a",{href:"#/",className:"home-link",title:"Dashboard",children:f||n.jsx(le,{name:"home"})}),o&&n.jsx(i0,{name:o,icon:f,entries:p})]}),n.jsxs("nav",{children:[n.jsxs("a",{href:"#/agents",children:[n.jsx(le,{name:"groups"})," agents"]}),n.jsxs("a",{href:"#/knowledge",children:[n.jsx(le,{name:"menu_book"})," context & knowledge"]}),n.jsxs("a",{href:"#/workflows",children:[n.jsx(le,{name:"account_tree"})," workflows"]}),n.jsxs("a",{href:"#/runs",children:[n.jsx(le,{name:"history"})," workflow runs"]}),n.jsxs("a",{href:"#/skills",children:[n.jsx(le,{name:"extension"})," skills"]})]}),n.jsx("span",{className:"spacer"}),n.jsx(u0,{}),n.jsx(r0,{}),n.jsx(o0,{})]}),n.jsx("main",{className:"shell",children:y})]})}function i0({name:u,icon:i,entries:o}){const[r,f]=O.useState(!1);return O.useEffect(()=>{if(!r)return;const h=p=>{p.target.closest(".switcher-wrap")||f(!1)};return window.addEventListener("mousedown",h),()=>window.removeEventListener("mousedown",h)},[r]),o.length===0?n.jsx("span",{className:"env-name",title:"Project (kraftwerk.yml: name)",children:u}):n.jsxs("span",{className:"switcher-wrap",children:[n.jsxs("button",{className:"env-name env-switch",title:"Switch workspace (kraftwerk.yml: switcher)","aria-haspopup":"menu","aria-expanded":r,onClick:()=>f(h=>!h),children:[u,n.jsx(le,{name:"expand_more"})]}),r&&n.jsxs("div",{className:"switcher-pop",role:"menu",children:[n.jsx("div",{className:"switcher-head",children:"Workspaces"}),n.jsxs("span",{className:"switcher-item current","aria-current":"true",children:[n.jsx("span",{className:"switcher-icon",children:i||"•"}),n.jsxs("span",{className:"switcher-text",children:[n.jsx("span",{className:"switcher-name",children:u}),n.jsx("span",{className:"switcher-sub",children:"this workspace"})]}),n.jsx("span",{className:"switcher-hint",children:"current"})]}),o.map(h=>n.jsxs("a",{className:"switcher-item",role:"menuitem",href:h.url,children:[n.jsx("span",{className:"switcher-icon",children:h.icon||"•"}),n.jsxs("span",{className:"switcher-text",children:[n.jsx("span",{className:"switcher-name",children:h.name}),n.jsxs("span",{className:"switcher-sub",children:[h.live&&n.jsx("span",{className:"live-dot",title:"running"}),h.url.replace(/^https?:\/\//,"")]})]})]},h.url))]})]})}function c0(){const[u,i]=O.useState(null);return O.useEffect(()=>{let o=!0;return fetch("/api/runs").then(r=>r.json()).then(r=>{o&&(r.runs.length>0?dl(`/runs/${r.runs[0].id}`,{replace:!0}):i({outputDir:r.outputDir}))}).catch(()=>{}),()=>{o=!1}},[]),u?n.jsxs("div",{className:"empty",children:["No runs found in ",n.jsx("code",{children:u.outputDir}),". Start one with"," ",n.jsx("code",{children:"kraftwerk run <workflow> <request>"})," or from a workflow page."]}):n.jsx("div",{className:"empty",children:"loading…"})}function u0(){const[u,i]=O.useState(null),[o,r]=O.useState(!1);O.useEffect(()=>{let p=!0,v;const y=async()=>{try{const x=await fetch("/api/meta",{cache:"no-store"}).then(S=>S.json());p&&i(x)}catch{}p&&(v=setTimeout(y,3e4))};return y(),()=>{p=!1,clearTimeout(v)}},[]);const f=u?.restartable&&u.diskVersion&&u.diskVersion!==u.version?u.diskVersion:null;async function h(){if(f){r(!0),await fetch("/api/restart",{method:"POST"}).catch(()=>{});for(let p=0;p<60;p++){await new Promise(v=>setTimeout(v,500));try{if((await fetch("/api/meta",{cache:"no-store"}).then(y=>y.json())).version===f)break}catch{}}location.reload()}}return!f&&!o?null:n.jsx("button",{className:"relaunch-note",disabled:o,title:`v${f} is installed on disk, the server still runs v${u?.version}. Click to relaunch with the new version.`,onClick:()=>{h()},children:o?"relaunching…":n.jsxs(n.Fragment,{children:[n.jsx(le,{name:"restart_alt",className:"ms-sm"})," v",f," ready — relaunch"]})})}function r0(){const u=ns();return n.jsxs("button",{className:`expert-toggle ${u?"on":""}`,title:u?"Expert mode on — full detail":"Expert mode off — simplified view","aria-pressed":u,onClick:()=>Sv(!u),children:[n.jsx("span",{className:"expert-track",children:n.jsx("span",{className:"expert-knob"})}),"expert"]})}function o0(){const[u,i]=O.useState(!1),[o,r]=O.useState(null),[f,h]=O.useState(null),[p,v]=O.useState("");O.useEffect(()=>{if(!u)return;fetch("/api/runs").then(S=>S.json()).then(r).catch(()=>{}),fetch("/api/workflows").then(S=>S.json()).then(h).catch(()=>{}),fetch("/api/meta").then(S=>S.json()).then(S=>v(S.version)).catch(()=>{});const x=S=>{S.target.closest(".info-wrap")||i(!1)};return window.addEventListener("mousedown",x),()=>window.removeEventListener("mousedown",x)},[u]);const y=o?.runs[0];return n.jsxs("span",{className:"info-wrap",children:[n.jsx("button",{className:"info-btn",title:"Project info","aria-label":"Project info",onClick:()=>i(x=>!x),children:n.jsx(le,{name:"info"})}),u&&n.jsxs("div",{className:"info-pop",children:[n.jsxs("div",{className:"info-row",children:[n.jsx("span",{className:"microlabel",children:"Workflows"}),n.jsx("span",{className:"info-v",children:f?`${f.workflows.length} discovered`:"…"}),n.jsx("code",{className:"info-path",title:f?.root,children:f?.root??""})]}),n.jsxs("div",{className:"info-row",children:[n.jsx("span",{className:"microlabel",children:"Runs"}),n.jsxs("span",{className:"info-v",children:[o?`${o.runs.length} total`:"…",y?` · latest ${y.status}`:""]}),n.jsx("code",{className:"info-path",title:o?.outputDir,children:o?.outputDir??""})]}),n.jsxs("div",{className:"info-row info-actions",children:[n.jsx("span",{className:"microlabel",children:"Workspace"}),n.jsxs("a",{className:"update-btn",href:"#/settings",onClick:()=>i(!1),children:[n.jsx(le,{name:"settings",className:"ms-sm"})," settings"]})]}),n.jsxs("div",{className:"info-row info-actions",children:[n.jsx("span",{className:"microlabel",children:"Theme"}),n.jsx(h0,{})]}),n.jsxs("div",{className:"info-row info-actions",children:[n.jsx("span",{className:"microlabel",children:"Version"}),n.jsx("span",{className:"info-v mono",children:p?`kraftwerk ${p}`:"…"}),n.jsx(d0,{})]})]})]})}function f0(u,i){const o=u.split(".").map(Number),r=i.split(".").map(Number);for(let f=0;f<3;f++)if((o[f]??0)!==(r[f]??0))return(o[f]??0)<(r[f]??0);return!1}function d0(){const[u,i]=O.useState("idle"),[o,r]=O.useState(null);async function f(){i("busy");try{const h=await fetch("/api/update-check",{cache:"no-store"}),p=await h.json();if(!h.ok||!p.latest)throw new Error;r(p),i("done")}catch{i("err")}}return u==="done"&&o?f0(o.current,o.latest)?n.jsxs("span",{className:"update-result newer",children:["v",o.latest," available — ",n.jsxs("code",{children:["npm i -g ",o.name,"@latest"]})]}):n.jsxs("span",{className:"update-result",children:[n.jsx(le,{name:"check",className:"ms-sm"})," up to date"]}):n.jsx("button",{className:"update-btn",disabled:u==="busy",onClick:()=>{f()},children:u==="busy"?"checking…":u==="err"?"npm unreachable — retry":n.jsxs(n.Fragment,{children:[n.jsx(le,{name:"sync",className:"ms-sm"})," check for updates"]})})}function h0(){return n.jsx("button",{className:"theme-btn",onClick:()=>{const u=document.documentElement,i=u.dataset.theme==="light"?"dark":"light";u.dataset.theme=i;try{localStorage.setItem("kw-theme",i)}catch{}},children:"day / night"})}jv.createRoot(document.getElementById("root")).render(n.jsx(O.StrictMode,{children:n.jsx(s0,{})}));