@netnodeag/kraftwerk 0.30.0 → 0.31.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.
|
@@ -1,182 +0,0 @@
|
|
|
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 Ir={exports:{}},oi={};var um;function xx(){if(um)return oi;um=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 x in f)x!=="key"&&(h[x]=f[x])}else h=f;return f=h.ref,{$$typeof:u,type:r,key:p,ref:f!==void 0?f:null,props:h}}return oi.Fragment=i,oi.jsx=o,oi.jsxs=o,oi}var rm;function vx(){return rm||(rm=1,Ir.exports=xx()),Ir.exports}var a=vx(),Fr={exports:{}},me={};var om;function yx(){if(om)return me;om=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"),x=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),w=Symbol.iterator;function M(N){return N===null||typeof N!="object"?null:(N=w&&N[w]||N["@@iterator"],typeof N=="function"?N:null)}var G={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},K=Object.assign,V={};function z(N,B,I){this.props=N,this.context=B,this.refs=V,this.updater=I||G}z.prototype.isReactComponent={},z.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")},z.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function fe(){}fe.prototype=z.prototype;function de(N,B,I){this.props=N,this.context=B,this.refs=V,this.updater=I||G}var te=de.prototype=new fe;te.constructor=de,K(te,z.prototype),te.isPureReactComponent=!0;var W=Array.isArray;function Y(){}var Z={H:null,A:null,T:null,S:null},le=Object.prototype.hasOwnProperty;function ne(N,B,I){var Q=I.ref;return{$$typeof:u,type:N,key:B,ref:Q!==void 0?Q:null,props:I}}function je(N,B){return ne(N.type,B,N.props)}function be(N){return typeof N=="object"&&N!==null&&N.$$typeof===u}function P(N){var B={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(I){return B[I]})}var ve=/\/+/g;function Je(N,B){return typeof N=="object"&&N!==null&&N.key!=null?P(""+N.key):B.toString(36)}function nt(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(Y,Y):(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 D(N,B,I,Q,he){var pe=typeof N;(pe==="undefined"||pe==="boolean")&&(N=null);var Ee=!1;if(N===null)Ee=!0;else switch(pe){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(N.$$typeof){case u:case i:Ee=!0;break;case S:return Ee=N._init,D(Ee(N._payload),B,I,Q,he)}}if(Ee)return he=he(N),Ee=Q===""?"."+Je(N,0):Q,W(he)?(I="",Ee!=null&&(I=Ee.replace(ve,"$&/")+"/"),D(he,B,I,"",function(ze){return ze})):he!=null&&(be(he)&&(he=je(he,I+(he.key==null||N&&N.key===he.key?"":(""+he.key).replace(ve,"$&/")+"/")+Ee)),B.push(he)),1;Ee=0;var mt=Q===""?".":Q+":";if(W(N))for(var H=0;H<N.length;H++)Q=N[H],pe=mt+Je(Q,H),Ee+=D(Q,B,I,pe,he);else if(H=M(N),typeof H=="function")for(N=H.call(N),H=0;!(Q=N.next()).done;)Q=Q.value,pe=mt+Je(Q,H++),Ee+=D(Q,B,I,pe,he);else if(pe==="object"){if(typeof N.then=="function")return D(nt(N),B,I,Q,he);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 Ee}function J(N,B,I){if(N==null)return N;var Q=[],he=0;return D(N,Q,"","",function(pe){return B.call(I,pe,he++)}),Q}function ce(N){if(N._status===-1){var B=N._result;B=B(),B.then(function(I){(N._status===0||N._status===-1)&&(N._status=1,N._result=I)},function(I){(N._status===0||N._status===-1)&&(N._status=2,N._result=I)}),N._status===-1&&(N._status=0,N._result=B)}if(N._status===1)return N._result.default;throw N._result}var _e=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)},ye={map:J,forEach:function(N,B,I){J(N,function(){B.apply(this,arguments)},I)},count:function(N){var B=0;return J(N,function(){B++}),B},toArray:function(N){return J(N,function(B){return B})||[]},only:function(N){if(!be(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return me.Activity=E,me.Children=ye,me.Component=z,me.Fragment=o,me.Profiler=f,me.PureComponent=de,me.StrictMode=r,me.Suspense=y,me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,me.__COMPILER_RUNTIME={__proto__:null,c:function(N){return Z.H.useMemoCache(N)}},me.cache=function(N){return function(){return N.apply(null,arguments)}},me.cacheSignal=function(){return null},me.cloneElement=function(N,B,I){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var Q=K({},N.props),he=N.key;if(B!=null)for(pe in B.key!==void 0&&(he=""+B.key),B)!le.call(B,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&B.ref===void 0||(Q[pe]=B[pe]);var pe=arguments.length-2;if(pe===1)Q.children=I;else if(1<pe){for(var Ee=Array(pe),mt=0;mt<pe;mt++)Ee[mt]=arguments[mt+2];Q.children=Ee}return ne(N.type,he,Q)},me.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},me.createElement=function(N,B,I){var Q,he={},pe=null;if(B!=null)for(Q in B.key!==void 0&&(pe=""+B.key),B)le.call(B,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(he[Q]=B[Q]);var Ee=arguments.length-2;if(Ee===1)he.children=I;else if(1<Ee){for(var mt=Array(Ee),H=0;H<Ee;H++)mt[H]=arguments[H+2];he.children=mt}if(N&&N.defaultProps)for(Q in Ee=N.defaultProps,Ee)he[Q]===void 0&&(he[Q]=Ee[Q]);return ne(N,pe,he)},me.createRef=function(){return{current:null}},me.forwardRef=function(N){return{$$typeof:x,render:N}},me.isValidElement=be,me.lazy=function(N){return{$$typeof:S,_payload:{_status:-1,_result:N},_init:ce}},me.memo=function(N,B){return{$$typeof:v,type:N,compare:B===void 0?null:B}},me.startTransition=function(N){var B=Z.T,I={};Z.T=I;try{var Q=N(),he=Z.S;he!==null&&he(I,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(Y,_e)}catch(pe){_e(pe)}finally{B!==null&&I.types!==null&&(B.types=I.types),Z.T=B}},me.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},me.use=function(N){return Z.H.use(N)},me.useActionState=function(N,B,I){return Z.H.useActionState(N,B,I)},me.useCallback=function(N,B){return Z.H.useCallback(N,B)},me.useContext=function(N){return Z.H.useContext(N)},me.useDebugValue=function(){},me.useDeferredValue=function(N,B){return Z.H.useDeferredValue(N,B)},me.useEffect=function(N,B){return Z.H.useEffect(N,B)},me.useEffectEvent=function(N){return Z.H.useEffectEvent(N)},me.useId=function(){return Z.H.useId()},me.useImperativeHandle=function(N,B,I){return Z.H.useImperativeHandle(N,B,I)},me.useInsertionEffect=function(N,B){return Z.H.useInsertionEffect(N,B)},me.useLayoutEffect=function(N,B){return Z.H.useLayoutEffect(N,B)},me.useMemo=function(N,B){return Z.H.useMemo(N,B)},me.useOptimistic=function(N,B){return Z.H.useOptimistic(N,B)},me.useReducer=function(N,B,I){return Z.H.useReducer(N,B,I)},me.useRef=function(N){return Z.H.useRef(N)},me.useState=function(N){return Z.H.useState(N)},me.useSyncExternalStore=function(N,B,I){return Z.H.useSyncExternalStore(N,B,I)},me.useTransition=function(){return Z.H.useTransition()},me.version="19.2.8",me}var fm;function vo(){return fm||(fm=1,Fr.exports=yx()),Fr.exports}var C=vo(),Wr={exports:{}},fi={},Pr={exports:{}},eo={};var dm;function bx(){return dm||(dm=1,(function(u){function i(D,J){var ce=D.length;D.push(J);e:for(;0<ce;){var _e=ce-1>>>1,ye=D[_e];if(0<f(ye,J))D[_e]=J,D[ce]=ye,ce=_e;else break e}}function o(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var J=D[0],ce=D.pop();if(ce!==J){D[0]=ce;e:for(var _e=0,ye=D.length,N=ye>>>1;_e<N;){var B=2*(_e+1)-1,I=D[B],Q=B+1,he=D[Q];if(0>f(I,ce))Q<ye&&0>f(he,I)?(D[_e]=he,D[Q]=ce,_e=Q):(D[_e]=I,D[B]=ce,_e=B);else if(Q<ye&&0>f(he,ce))D[_e]=he,D[Q]=ce,_e=Q;else break e}}return J}function f(D,J){var ce=D.sortIndex-J.sortIndex;return ce!==0?ce:D.id-J.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,x=p.now();u.unstable_now=function(){return p.now()-x}}var y=[],v=[],S=1,E=null,w=3,M=!1,G=!1,K=!1,V=!1,z=typeof setTimeout=="function"?setTimeout:null,fe=typeof clearTimeout=="function"?clearTimeout:null,de=typeof setImmediate<"u"?setImmediate:null;function te(D){for(var J=o(v);J!==null;){if(J.callback===null)r(v);else if(J.startTime<=D)r(v),J.sortIndex=J.expirationTime,i(y,J);else break;J=o(v)}}function W(D){if(K=!1,te(D),!G)if(o(y)!==null)G=!0,Y||(Y=!0,P());else{var J=o(v);J!==null&&nt(W,J.startTime-D)}}var Y=!1,Z=-1,le=5,ne=-1;function je(){return V?!0:!(u.unstable_now()-ne<le)}function be(){if(V=!1,Y){var D=u.unstable_now();ne=D;var J=!0;try{e:{G=!1,K&&(K=!1,fe(Z),Z=-1),M=!0;var ce=w;try{t:{for(te(D),E=o(y);E!==null&&!(E.expirationTime>D&&je());){var _e=E.callback;if(typeof _e=="function"){E.callback=null,w=E.priorityLevel;var ye=_e(E.expirationTime<=D);if(D=u.unstable_now(),typeof ye=="function"){E.callback=ye,te(D),J=!0;break t}E===o(y)&&r(y),te(D)}else r(y);E=o(y)}if(E!==null)J=!0;else{var N=o(v);N!==null&&nt(W,N.startTime-D),J=!1}}break e}finally{E=null,w=ce,M=!1}J=void 0}}finally{J?P():Y=!1}}}var P;if(typeof de=="function")P=function(){de(be)};else if(typeof MessageChannel<"u"){var ve=new MessageChannel,Je=ve.port2;ve.port1.onmessage=be,P=function(){Je.postMessage(null)}}else P=function(){z(be,0)};function nt(D,J){Z=z(function(){D(u.unstable_now())},J)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(D){D.callback=null},u.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):le=0<D?Math.floor(1e3/D):5},u.unstable_getCurrentPriorityLevel=function(){return w},u.unstable_next=function(D){switch(w){case 1:case 2:case 3:var J=3;break;default:J=w}var ce=w;w=J;try{return D()}finally{w=ce}},u.unstable_requestPaint=function(){V=!0},u.unstable_runWithPriority=function(D,J){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var ce=w;w=D;try{return J()}finally{w=ce}},u.unstable_scheduleCallback=function(D,J,ce){var _e=u.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?_e+ce:_e):ce=_e,D){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=ce+ye,D={id:S++,callback:J,priorityLevel:D,startTime:ce,expirationTime:ye,sortIndex:-1},ce>_e?(D.sortIndex=ce,i(v,D),o(y)===null&&D===o(v)&&(K?(fe(Z),Z=-1):K=!0,nt(W,ce-_e))):(D.sortIndex=ye,i(y,D),G||M||(G=!0,Y||(Y=!0,P()))),D},u.unstable_shouldYield=je,u.unstable_wrapCallback=function(D){var J=w;return function(){var ce=w;w=J;try{return D.apply(this,arguments)}finally{w=ce}}}})(eo)),eo}var hm;function jx(){return hm||(hm=1,Pr.exports=bx()),Pr.exports}var to={exports:{}},Rt={};var mm;function Nx(){if(mm)return Rt;mm=1;var u=vo();function i(y){var v="https://react.dev/errors/"+y;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)v+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+y+"; visit "+v+" 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,v,S){var E=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:E==null?null:""+E,children:y,containerInfo:v,implementation:S}}var p=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function x(y,v){if(y==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return Rt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Rt.createPortal=function(y,v){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(i(299));return h(y,v,null,S)},Rt.flushSync=function(y){var v=p.T,S=r.p;try{if(p.T=null,r.p=2,y)return y()}finally{p.T=v,r.p=S,r.d.f()}},Rt.preconnect=function(y,v){typeof y=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,r.d.C(y,v))},Rt.prefetchDNS=function(y){typeof y=="string"&&r.d.D(y)},Rt.preinit=function(y,v){if(typeof y=="string"&&v&&typeof v.as=="string"){var S=v.as,E=x(S,v.crossOrigin),w=typeof v.integrity=="string"?v.integrity:void 0,M=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;S==="style"?r.d.S(y,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:E,integrity:w,fetchPriority:M}):S==="script"&&r.d.X(y,{crossOrigin:E,integrity:w,fetchPriority:M,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},Rt.preinitModule=function(y,v){if(typeof y=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var S=x(v.as,v.crossOrigin);r.d.M(y,{crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&r.d.M(y)},Rt.preload=function(y,v){if(typeof y=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var S=v.as,E=x(S,v.crossOrigin);r.d.L(y,S,{crossOrigin:E,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},Rt.preloadModule=function(y,v){if(typeof y=="string")if(v){var S=x(v.as,v.crossOrigin);r.d.m(y,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else r.d.m(y)},Rt.requestFormReset=function(y){r.d.r(y)},Rt.unstable_batchedUpdates=function(y,v){return y(v)},Rt.useFormState=function(y,v,S){return p.H.useFormState(y,v,S)},Rt.useFormStatus=function(){return p.H.useHostTransitionStatus()},Rt.version="19.2.8",Rt}var pm;function Sx(){if(pm)return to.exports;pm=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(),to.exports=Nx(),to.exports}var gm;function wx(){if(gm)return fi;gm=1;var u=jx(),i=vo(),o=Sx();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 x(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 v(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,n=t;;){var s=l.return;if(s===null)break;var c=s.alternate;if(c===null){if(n=s.return,n!==null){l=n;continue}break}if(s.child===c.child){for(c=s.child;c;){if(c===l)return y(s),e;if(c===n)return y(s),t;c=c.sibling}throw Error(r(188))}if(l.return!==n.return)l=s,n=c;else{for(var d=!1,m=s.child;m;){if(m===l){d=!0,l=s,n=c;break}if(m===n){d=!0,n=s,l=c;break}m=m.sibling}if(!d){for(m=c.child;m;){if(m===l){d=!0,l=c,n=s;break}if(m===n){d=!0,n=c,l=s;break}m=m.sibling}if(!d)throw Error(r(189))}}if(l.alternate!==n)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 E=Object.assign,w=Symbol.for("react.element"),M=Symbol.for("react.transitional.element"),G=Symbol.for("react.portal"),K=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),fe=Symbol.for("react.consumer"),de=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),je=Symbol.for("react.memo_cache_sentinel"),be=Symbol.iterator;function P(e){return e===null||typeof e!="object"?null:(e=be&&e[be]||e["@@iterator"],typeof e=="function"?e:null)}var ve=Symbol.for("react.client.reference");function Je(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ve?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case K:return"Fragment";case z:return"Profiler";case V:return"StrictMode";case W:return"Suspense";case Y:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case G:return"Portal";case de:return e.displayName||"Context";case fe:return(e._context.displayName||"Context")+".Consumer";case te:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z:return t=e.displayName||null,t!==null?t:Je(e.type)||"Memo";case le:t=e._payload,e=e._init;try{return Je(e(t))}catch{}}return null}var nt=Array.isArray,D=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},_e=[],ye=-1;function N(e){return{current:e}}function B(e){0>ye||(e.current=_e[ye],_e[ye]=null,ye--)}function I(e,t){ye++,_e[ye]=e.current,e.current=t}var Q=N(null),he=N(null),pe=N(null),Ee=N(null);function mt(e,t){switch(I(pe,t),I(he,e),I(Q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Rh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Rh(t),e=Ch(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(Q),I(Q,e)}function H(){B(Q),B(he),B(pe)}function ze(e){e.memoizedState!==null&&I(Ee,e);var t=Q.current,l=Ch(t,e.type);t!==l&&(I(he,e),I(Q,l))}function Ge(e){he.current===e&&(B(Q),B(he)),Ee.current===e&&(B(Ee),ii._currentValue=ce)}var We,tl;function Ce(e){if(We===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);We=t&&t[1]||"",tl=-1<l.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+We+e+tl}var Xn=!1;function Ye(e,t){if(!e||Xn)return"";Xn=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={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(O){var R=O}Reflect.construct(e,[],q)}else{try{q.call()}catch(O){R=O}e.call(q.prototype)}}else{try{throw Error()}catch(O){R=O}(q=e())&&typeof q.catch=="function"&&q.catch(function(){})}}catch(O){if(O&&R&&typeof O.stack=="string")return[O.stack,R.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=n.DetermineComponentFrameRoot(),d=c[0],m=c[1];if(d&&m){var b=d.split(`
|
|
4
|
-
`),_=m.split(`
|
|
5
|
-
`);for(s=n=0;n<b.length&&!b[n].includes("DetermineComponentFrameRoot");)n++;for(;s<_.length&&!_[s].includes("DetermineComponentFrameRoot");)s++;if(n===b.length||s===_.length)for(n=b.length-1,s=_.length-1;1<=n&&0<=s&&b[n]!==_[s];)s--;for(;1<=n&&0<=s;n--,s--)if(b[n]!==_[s]){if(n!==1||s!==1)do if(n--,s--,0>s||b[n]!==_[s]){var U=`
|
|
6
|
-
`+b[n].replace(" at new "," at ");return e.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",e.displayName)),U}while(1<=n&&0<=s);break}}}finally{Xn=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Ce(l):""}function os(e,t){switch(e.tag){case 26:case 27:case 5:return Ce(e.type);case 16:return Ce("Lazy");case 13:return e.child!==t&&t!==null?Ce("Suspense Fallback"):Ce("Suspense");case 19:return Ce("SuspenseList");case 0:case 15:return Ye(e.type,!1);case 11:return Ye(e.type.render,!1);case 1:return Ye(e.type,!0);case 31:return Ce("Activity");default:return""}}function Yt(e){try{var t="",l=null;do t+=os(e,l),l=e,e=e.return;while(e);return t}catch(n){return`
|
|
7
|
-
Error generating stack: `+n.message+`
|
|
8
|
-
`+n.stack}}var Bl=Object.prototype.hasOwnProperty,ja=u.unstable_scheduleCallback,ll=u.unstable_cancelCallback,ji=u.unstable_shouldYield,fs=u.unstable_requestPaint,_t=u.unstable_now,Ni=u.unstable_getCurrentPriorityLevel,xl=u.unstable_ImmediatePriority,_l=u.unstable_UserBlockingPriority,nl=u.unstable_NormalPriority,ds=u.unstable_LowPriority,Qn=u.unstable_IdlePriority,Na=u.log,hs=u.unstable_setDisableYieldValue,al=null,yt=null;function Xt(e){if(typeof Na=="function"&&hs(e),yt&&typeof yt.setStrictMode=="function")try{yt.setStrictMode(al,e)}catch{}}var zt=Math.clz32?Math.clz32:ms,Si=Math.log,wi=Math.LN2;function ms(e){return e>>>=0,e===0?32:31-(Si(e)/wi|0)|0}var rn=256,vl=262144,yl=4194304;function zl(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 Zn(e,t,l){var n=e.pendingLanes;if(n===0)return 0;var s=0,c=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var m=n&134217727;return m!==0?(n=m&~c,n!==0?s=zl(n):(d&=m,d!==0?s=zl(d):l||(l=m&~e,l!==0&&(s=zl(l))))):(m=n&~c,m!==0?s=zl(m):d!==0?s=zl(d):l||(l=n&~e,l!==0&&(s=zl(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 on(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ki(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 ps(){var e=yl;return yl<<=1,(yl&62914560)===0&&(yl=4194304),e}function fn(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Rl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function sl(e,t,l,n,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-zt(l),q=1<<U;m[U]=0,b[U]=-1;var R=_[U];if(R!==null)for(_[U]=null,U=0;U<R.length;U++){var O=R[U];O!==null&&(O.lane&=-536870913)}l&=~q}n!==0&&ql(e,n,0),c!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=c&~(d&~t))}function ql(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-zt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|l&261930}function Sa(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var n=31-zt(l),s=1<<n;s&t|e[n]&t&&(e[n]|=t),l&=~s}}function wa(e,t){var l=t&-t;return l=(l&42)!==0?1:gs(l),(l&(e.suspendedLanes|t))!==0?0:l}function gs(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 ka(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ta(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:tm(e.type))}function xs(e,t){var l=J.p;try{return J.p=e,t()}finally{J.p=l}}var il=Math.random().toString(36).slice(2),pt="__reactFiber$"+il,it="__reactProps$"+il,dn="__reactContainer$"+il,vs="__reactEvents$"+il,et="__reactListeners$"+il,hn="__reactHandles$"+il,Ti="__reactResources$"+il,mn="__reactMarker$"+il;function Vn(e){delete e[pt],delete e[it],delete e[vs],delete e[et],delete e[hn]}function $l(e){var t=e[pt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[dn]||l[pt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Bh(e);e!==null;){if(l=e[pt])return l;e=Bh(e)}return t}e=l,l=e.parentNode}return null}function Gl(e){if(e=e[pt]||e[dn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Kn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function pn(e){var t=e[Ti];return t||(t=e[Ti]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ct(e){e[mn]=!0}var Ei=new Set,bl={};function Cl(e,t){jl(e,t),jl(e+"Capture",t)}function jl(e,t){for(bl[e]=t,e=0;e<t.length;e++)Ei.add(t[e])}var Yl=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]*$"),Ai={},Jn={};function _i(e){return Bl.call(Jn,e)?!0:Bl.call(Ai,e)?!1:Yl.test(e)?Jn[e]=!0:(Ai[e]=!0,!1)}function Ea(e,t,l){if(_i(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function In(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 cl(e,t,l,n){if(n===null)e.removeAttribute(l);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+n)}}function Nt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Aa(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _a(e,t,l){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,c=n.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:n.enumerable}),{getValue:function(){return l},setValue:function(d){l=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ol(e){if(!e._valueTracker){var t=Aa(e)?"checked":"value";e._valueTracker=_a(e,t,""+e[t])}}function gn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),n="";return e&&(n=Aa(e)?e.checked?"true":"false":e.value),e=n,e!==l?(t.setValue(e),!0):!1}function Dt(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 Jc=/[\n"\\]/g;function St(e){return e.replace(Jc,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ys(e,t,l,n,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=""+Nt(t)):e.value!==""+Nt(t)&&(e.value=""+Nt(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?za(e,d,Nt(t)):l!=null?za(e,d,Nt(l)):n!=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=""+Nt(m):e.removeAttribute("name")}function bs(e,t,l,n,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)){Ol(e);return}l=l!=null?""+Nt(l):"",t=t!=null?""+Nt(t):l,m||t===e.value||(e.value=t),e.defaultValue=t}n=n??s,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=m?e.checked:!!n,e.defaultChecked=!!n,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),Ol(e)}function za(e,t,l){t==="number"&&Dt(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Xl(e,t,l,n){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&&n&&(e[l].defaultSelected=!0)}else{for(l=""+Nt(l),t=null,s=0;s<e.length;s++){if(e[s].value===l){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function js(e,t,l){if(t!=null&&(t=""+Nt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Nt(l):""}function zi(e,t,l,n){if(t==null){if(n!=null){if(l!=null)throw Error(r(92));if(nt(n)){if(1<n.length)throw Error(r(93));n=n[0]}l=n}l==null&&(l=""),t=l}l=Nt(t),e.defaultValue=l,n=e.textContent,n===l&&n!==""&&n!==null&&(e.value=n),Ol(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 Ic=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 n=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,l):typeof l!="number"||l===0||Ic.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Ns(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,l!=null){for(var n in l)!l.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var s in t)n=t[s],t.hasOwnProperty(s)&&l[s]!==n&&Ri(e,s,n)}else for(var c in t)t.hasOwnProperty(c)&&Ri(e,c,t[c])}function xn(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 Ss=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 k(){}var $=null;function ee(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ae=null,re=null;function He(e){var t=Gl(e);if(t&&(e=t.stateNode)){var l=e[it]||null;e:switch(e=t.stateNode,t.type){case"input":if(ys(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="'+St(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var n=l[t];if(n!==e&&n.form===e.form){var s=n[it]||null;if(!s)throw Error(r(90));ys(n,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<l.length;t++)n=l[t],n.form===e.form&&gn(n)}break e;case"textarea":js(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Xl(e,!!l.multiple,t,!1)}}}var Ve=!1;function wt(e,t,l){if(Ve)return e(t,l);Ve=!0;try{var n=e(t);return n}finally{if(Ve=!1,(ae!==null||re!==null)&&(vc(),ae&&(t=ae,e=re,re=ae=null,He(t),e)))for(t=0;t<e.length;t++)He(e[t])}}function ut(e,t){var l=e.stateNode;if(l===null)return null;var n=l[it]||null;if(n===null)return null;l=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,t,typeof l));return l}var Qt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gt=!1;if(Qt)try{var ws={};Object.defineProperty(ws,"passive",{get:function(){gt=!0}}),window.addEventListener("test",ws,ws),window.removeEventListener("test",ws,ws)}catch{gt=!1}var vn=null,Fc=null,Ci=null;function Ro(){if(Ci)return Ci;var e,t=Fc,l=t.length,n,s="value"in vn?vn.value:vn.textContent,c=s.length;for(e=0;e<l&&t[e]===s[e];e++);var d=l-e;for(n=1;n<=d&&t[l-n]===s[c-n];n++);return Ci=s.slice(e,1<n?1-n:void 0)}function Oi(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 Di(){return!0}function Co(){return!1}function Ut(e){function t(l,n,s,c,d){this._reactName=l,this._targetInst=s,this.type=n,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)?Di:Co,this.isPropagationStopped=Co,this}return E(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=Di)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Di)},persist:function(){},isPersistent:Di}),t}var Fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mi=Ut(Fn),ks=E({},Fn,{view:0,detail:0}),pp=Ut(ks),Wc,Pc,Ts,Ui=E({},ks,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tu,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!==Ts&&(Ts&&e.type==="mousemove"?(Wc=e.screenX-Ts.screenX,Pc=e.screenY-Ts.screenY):Pc=Wc=0,Ts=e),Wc)},movementY:function(e){return"movementY"in e?e.movementY:Pc}}),Oo=Ut(Ui),gp=E({},Ui,{dataTransfer:0}),xp=Ut(gp),vp=E({},ks,{relatedTarget:0}),eu=Ut(vp),yp=E({},Fn,{animationName:0,elapsedTime:0,pseudoElement:0}),bp=Ut(yp),jp=E({},Fn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Np=Ut(jp),Sp=E({},Fn,{data:0}),Do=Ut(Sp),wp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kp={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"},Tp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ep(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Tp[e])?!!t[e]:!1}function tu(){return Ep}var Ap=E({},ks,{key:function(e){if(e.key){var t=wp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Oi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?kp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tu,charCode:function(e){return e.type==="keypress"?Oi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Oi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_p=Ut(Ap),zp=E({},Ui,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mo=Ut(zp),Rp=E({},ks,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tu}),Cp=Ut(Rp),Op=E({},Fn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Dp=Ut(Op),Mp=E({},Ui,{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}),Up=Ut(Mp),Lp=E({},Fn,{newState:0,oldState:0}),Hp=Ut(Lp),Bp=[9,13,27,32],lu=Qt&&"CompositionEvent"in window,Es=null;Qt&&"documentMode"in document&&(Es=document.documentMode);var qp=Qt&&"TextEvent"in window&&!Es,Uo=Qt&&(!lu||Es&&8<Es&&11>=Es),Lo=" ",Ho=!1;function Bo(e,t){switch(e){case"keyup":return Bp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ra=!1;function $p(e,t){switch(e){case"compositionend":return qo(t);case"keypress":return t.which!==32?null:(Ho=!0,Lo);case"textInput":return e=t.data,e===Lo&&Ho?null:e;default:return null}}function Gp(e,t){if(Ra)return e==="compositionend"||!lu&&Bo(e,t)?(e=Ro(),Ci=Fc=vn=null,Ra=!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 Uo&&t.locale!=="ko"?null:t.data;default:return null}}var Yp={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 $o(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Yp[e.type]:t==="textarea"}function Go(e,t,l,n){ae?re?re.push(n):re=[n]:ae=n,t=kc(t,"onChange"),0<t.length&&(l=new Mi("onChange","change",null,l,n),e.push({event:l,listeners:t}))}var As=null,_s=null;function Xp(e){kh(e,0)}function Li(e){var t=Kn(e);if(gn(t))return e}function Yo(e,t){if(e==="change")return t}var Xo=!1;if(Qt){var nu;if(Qt){var au="oninput"in document;if(!au){var Qo=document.createElement("div");Qo.setAttribute("oninput","return;"),au=typeof Qo.oninput=="function"}nu=au}else nu=!1;Xo=nu&&(!document.documentMode||9<document.documentMode)}function Zo(){As&&(As.detachEvent("onpropertychange",Vo),_s=As=null)}function Vo(e){if(e.propertyName==="value"&&Li(_s)){var t=[];Go(t,_s,e,ee(e)),wt(Xp,t)}}function Qp(e,t,l){e==="focusin"?(Zo(),As=t,_s=l,As.attachEvent("onpropertychange",Vo)):e==="focusout"&&Zo()}function Zp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Li(_s)}function Vp(e,t){if(e==="click")return Li(t)}function Kp(e,t){if(e==="input"||e==="change")return Li(t)}function Jp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zt=typeof Object.is=="function"?Object.is:Jp;function zs(e,t){if(Zt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),n=Object.keys(t);if(l.length!==n.length)return!1;for(n=0;n<l.length;n++){var s=l[n];if(!Bl.call(t,s)||!Zt(e[s],t[s]))return!1}return!0}function Ko(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jo(e,t){var l=Ko(e);e=0;for(var n;l;){if(l.nodeType===3){if(n=e+l.textContent.length,e<=t&&n>=t)return{node:l,offset:t-e};e=n}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Ko(l)}}function Io(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Io(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Fo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Dt(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=Dt(e.document)}return t}function su(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 Ip=Qt&&"documentMode"in document&&11>=document.documentMode,Ca=null,iu=null,Rs=null,cu=!1;function Wo(e,t,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;cu||Ca==null||Ca!==Dt(n)||(n=Ca,"selectionStart"in n&&su(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Rs&&zs(Rs,n)||(Rs=n,n=kc(iu,"onSelect"),0<n.length&&(t=new Mi("onSelect","select",null,t,l),e.push({event:t,listeners:n}),t.target=Ca)))}function Wn(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Oa={animationend:Wn("Animation","AnimationEnd"),animationiteration:Wn("Animation","AnimationIteration"),animationstart:Wn("Animation","AnimationStart"),transitionrun:Wn("Transition","TransitionRun"),transitionstart:Wn("Transition","TransitionStart"),transitioncancel:Wn("Transition","TransitionCancel"),transitionend:Wn("Transition","TransitionEnd")},uu={},Po={};Qt&&(Po=document.createElement("div").style,"AnimationEvent"in window||(delete Oa.animationend.animation,delete Oa.animationiteration.animation,delete Oa.animationstart.animation),"TransitionEvent"in window||delete Oa.transitionend.transition);function Pn(e){if(uu[e])return uu[e];if(!Oa[e])return e;var t=Oa[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Po)return uu[e]=t[l];return e}var ef=Pn("animationend"),tf=Pn("animationiteration"),lf=Pn("animationstart"),Fp=Pn("transitionrun"),Wp=Pn("transitionstart"),Pp=Pn("transitioncancel"),nf=Pn("transitionend"),af=new Map,ru="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(" ");ru.push("scrollEnd");function Nl(e,t){af.set(e,t),Cl(t,[e])}var Hi=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)},ul=[],Da=0,ou=0;function Bi(){for(var e=Da,t=ou=Da=0;t<e;){var l=ul[t];ul[t++]=null;var n=ul[t];ul[t++]=null;var s=ul[t];ul[t++]=null;var c=ul[t];if(ul[t++]=null,n!==null&&s!==null){var d=n.pending;d===null?s.next=s:(s.next=d.next,d.next=s),n.pending=s}c!==0&&sf(l,s,c)}}function qi(e,t,l,n){ul[Da++]=e,ul[Da++]=t,ul[Da++]=l,ul[Da++]=n,ou|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function fu(e,t,l,n){return qi(e,t,l,n),$i(e)}function ea(e,t){return qi(e,null,null,t),$i(e)}function sf(e,t,l){e.lanes|=l;var n=e.alternate;n!==null&&(n.lanes|=l);for(var s=!1,c=e.return;c!==null;)c.childLanes|=l,n=c.alternate,n!==null&&(n.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-zt(l),e=c.hiddenUpdates,n=e[s],n===null?e[s]=[t]:n.push(t),t.lane=l|536870912),c):null}function $i(e){if(50<Ps)throw Ps=0,br=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ma={};function eg(e,t,l,n){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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vt(e,t,l,n){return new eg(e,t,l,n)}function du(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zl(e,t){var l=e.alternate;return l===null?(l=Vt(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 cf(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,n,s,c){var d=0;if(n=e,typeof e=="function")du(e)&&(d=1);else if(typeof e=="string")d=sx(e,l,Q.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ne:return e=Vt(31,l,t,s),e.elementType=ne,e.lanes=c,e;case K:return ta(l.children,s,c,t);case V:d=8,s|=24;break;case z:return e=Vt(12,l,t,s|2),e.elementType=z,e.lanes=c,e;case W:return e=Vt(13,l,t,s),e.elementType=W,e.lanes=c,e;case Y:return e=Vt(19,l,t,s),e.elementType=Y,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case de:d=10;break e;case fe:d=9;break e;case te:d=11;break e;case Z:d=14;break e;case le:d=16,n=null;break e}d=29,l=Error(r(130,e===null?"null":typeof e,"")),n=null}return t=Vt(d,l,t,s),t.elementType=e,t.type=n,t.lanes=c,t}function ta(e,t,l,n){return e=Vt(7,e,n,t),e.lanes=l,e}function hu(e,t,l){return e=Vt(6,e,null,t),e.lanes=l,e}function uf(e){var t=Vt(18,null,null,0);return t.stateNode=e,t}function mu(e,t,l){return t=Vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var rf=new WeakMap;function rl(e,t){if(typeof e=="object"&&e!==null){var l=rf.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Yt(t)},rf.set(e,t),t)}return{value:e,source:t,stack:Yt(t)}}var Ua=[],La=0,Yi=null,Cs=0,ol=[],fl=0,yn=null,Dl=1,Ml="";function Vl(e,t){Ua[La++]=Cs,Ua[La++]=Yi,Yi=e,Cs=t}function of(e,t,l){ol[fl++]=Dl,ol[fl++]=Ml,ol[fl++]=yn,yn=e;var n=Dl;e=Ml;var s=32-zt(n)-1;n&=~(1<<s),l+=1;var c=32-zt(t)+s;if(30<c){var d=s-s%5;c=(n&(1<<d)-1).toString(32),n>>=d,s-=d,Dl=1<<32-zt(t)+s|l<<s|n,Ml=c+e}else Dl=1<<c|l<<s|n,Ml=e}function pu(e){e.return!==null&&(Vl(e,1),of(e,1,0))}function gu(e){for(;e===Yi;)Yi=Ua[--La],Ua[La]=null,Cs=Ua[--La],Ua[La]=null;for(;e===yn;)yn=ol[--fl],ol[fl]=null,Ml=ol[--fl],ol[fl]=null,Dl=ol[--fl],ol[fl]=null}function ff(e,t){ol[fl++]=Dl,ol[fl++]=Ml,ol[fl++]=yn,Dl=t.id,Ml=t.overflow,yn=e}var kt=null,Ie=null,Ae=!1,bn=null,dl=!1,xu=Error(r(519));function jn(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Os(rl(t,e)),xu}function df(e){var t=e.stateNode,l=e.type,n=e.memoizedProps;switch(t[pt]=e,t[it]=n,l){case"dialog":Se("cancel",t),Se("close",t);break;case"iframe":case"object":case"embed":Se("load",t);break;case"video":case"audio":for(l=0;l<ti.length;l++)Se(ti[l],t);break;case"source":Se("error",t);break;case"img":case"image":case"link":Se("error",t),Se("load",t);break;case"details":Se("toggle",t);break;case"input":Se("invalid",t),bs(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Se("invalid",t);break;case"textarea":Se("invalid",t),zi(t,n.value,n.defaultValue,n.children)}l=n.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||n.suppressHydrationWarning===!0||_h(t.textContent,l)?(n.popover!=null&&(Se("beforetoggle",t),Se("toggle",t)),n.onScroll!=null&&Se("scroll",t),n.onScrollEnd!=null&&Se("scrollend",t),n.onClick!=null&&(t.onclick=k),t=!0):t=!1,t||jn(e,!0)}function hf(e){for(kt=e.return;kt;)switch(kt.tag){case 5:case 31:case 13:dl=!1;return;case 27:case 3:dl=!0;return;default:kt=kt.return}}function Ha(e){if(e!==kt)return!1;if(!Ae)return hf(e),Ae=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Mr(e.type,e.memoizedProps)),l=!l),l&&Ie&&jn(e),hf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ie=Hh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ie=Hh(e)}else t===27?(t=Ie,Mn(e.type)?(e=qr,qr=null,Ie=e):Ie=t):Ie=kt?ml(e.stateNode.nextSibling):null;return!0}function la(){Ie=kt=null,Ae=!1}function vu(){var e=bn;return e!==null&&(qt===null?qt=e:qt.push.apply(qt,e),bn=null),e}function Os(e){bn===null?bn=[e]:bn.push(e)}var yu=N(null),na=null,Kl=null;function Nn(e,t,l){I(yu,t._currentValue),t._currentValue=l}function Jl(e){e._currentValue=yu.current,B(yu)}function bu(e,t,l){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===l)break;e=e.return}}function ju(e,t,l,n){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),bu(c.return,l,e),n||(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),bu(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 Ba(e,t,l,n){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;Zt(s.pendingProps.value,d.value)||(e!==null?e.push(m):e=[m])}}else if(s===Ee.current){if(d=s.alternate,d===null)throw Error(r(387));d.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(ii):e=[ii])}s=s.return}e!==null&&ju(t,e,l,n),t.flags|=262144}function Xi(e){for(e=e.firstContext;e!==null;){if(!Zt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function aa(e){na=e,Kl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Tt(e){return mf(na,e)}function Qi(e,t){return na===null&&aa(e),mf(e,t)}function mf(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Kl===null){if(e===null)throw Error(r(308));Kl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Kl=Kl.next=t;return l}var tg=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},lg=u.unstable_scheduleCallback,ng=u.unstable_NormalPriority,rt={$$typeof:de,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Nu(){return{controller:new tg,data:new Map,refCount:0}}function Ds(e){e.refCount--,e.refCount===0&&lg(ng,function(){e.controller.abort()})}var Ms=null,Su=0,qa=0,$a=null;function ag(e,t){if(Ms===null){var l=Ms=[];Su=0,qa=Tr(),$a={status:"pending",value:void 0,then:function(n){l.push(n)}}}return Su++,t.then(pf,pf),t}function pf(){if(--Su===0&&Ms!==null){$a!==null&&($a.status="fulfilled");var e=Ms;Ms=null,qa=0,$a=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function sg(e,t){var l=[],n={status:"pending",value:null,reason:null,then:function(s){l.push(s)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var s=0;s<l.length;s++)(0,l[s])(t)},function(s){for(n.status="rejected",n.reason=s,s=0;s<l.length;s++)(0,l[s])(void 0)}),n}var gf=D.S;D.S=function(e,t){Pd=_t(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ag(e,t),gf!==null&&gf(e,t)};var sa=N(null);function wu(){var e=sa.current;return e!==null?e:Ke.pooledCache}function Zi(e,t){t===null?I(sa,sa.current):I(sa,t.pool)}function xf(){var e=wu();return e===null?null:{parent:rt._currentValue,pool:e}}var Ga=Error(r(460)),ku=Error(r(474)),Vi=Error(r(542)),Ki={then:function(){}};function vf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function yf(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(k,k),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,jf(e),e;default:if(typeof t.status=="string")t.then(k,k);else{if(e=Ke,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=n}},function(n){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,jf(e),e}throw ca=t,Ga}}function ia(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ca=l,Ga):l}}var ca=null;function bf(){if(ca===null)throw Error(r(459));var e=ca;return ca=null,e}function jf(e){if(e===Ga||e===Vi)throw Error(r(483))}var Ya=null,Us=0;function Ji(e){var t=Us;return Us+=1,Ya===null&&(Ya=[]),yf(Ya,e,t)}function Ls(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ii(e,t){throw t.$$typeof===w?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Nf(e){function t(T,j){if(e){var A=T.deletions;A===null?(T.deletions=[j],T.flags|=16):A.push(j)}}function l(T,j){if(!e)return null;for(;j!==null;)t(T,j),j=j.sibling;return null}function n(T){for(var j=new Map;T!==null;)T.key!==null?j.set(T.key,T):j.set(T.index,T),T=T.sibling;return j}function s(T,j){return T=Zl(T,j),T.index=0,T.sibling=null,T}function c(T,j,A){return T.index=A,e?(A=T.alternate,A!==null?(A=A.index,A<j?(T.flags|=67108866,j):A):(T.flags|=67108866,j)):(T.flags|=1048576,j)}function d(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function m(T,j,A,L){return j===null||j.tag!==6?(j=hu(A,T.mode,L),j.return=T,j):(j=s(j,A),j.return=T,j)}function b(T,j,A,L){var ue=A.type;return ue===K?U(T,j,A.props.children,L,A.key):j!==null&&(j.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===le&&ia(ue)===j.type)?(j=s(j,A.props),Ls(j,A),j.return=T,j):(j=Gi(A.type,A.key,A.props,null,T.mode,L),Ls(j,A),j.return=T,j)}function _(T,j,A,L){return j===null||j.tag!==4||j.stateNode.containerInfo!==A.containerInfo||j.stateNode.implementation!==A.implementation?(j=mu(A,T.mode,L),j.return=T,j):(j=s(j,A.children||[]),j.return=T,j)}function U(T,j,A,L,ue){return j===null||j.tag!==7?(j=ta(A,T.mode,L,ue),j.return=T,j):(j=s(j,A),j.return=T,j)}function q(T,j,A){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=hu(""+j,T.mode,A),j.return=T,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case M:return A=Gi(j.type,j.key,j.props,null,T.mode,A),Ls(A,j),A.return=T,A;case G:return j=mu(j,T.mode,A),j.return=T,j;case le:return j=ia(j),q(T,j,A)}if(nt(j)||P(j))return j=ta(j,T.mode,A,null),j.return=T,j;if(typeof j.then=="function")return q(T,Ji(j),A);if(j.$$typeof===de)return q(T,Qi(T,j),A);Ii(T,j)}return null}function R(T,j,A,L){var ue=j!==null?j.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return ue!==null?null:m(T,j,""+A,L);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case M:return A.key===ue?b(T,j,A,L):null;case G:return A.key===ue?_(T,j,A,L):null;case le:return A=ia(A),R(T,j,A,L)}if(nt(A)||P(A))return ue!==null?null:U(T,j,A,L,null);if(typeof A.then=="function")return R(T,j,Ji(A),L);if(A.$$typeof===de)return R(T,j,Qi(T,A),L);Ii(T,A)}return null}function O(T,j,A,L,ue){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return T=T.get(A)||null,m(j,T,""+L,ue);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case M:return T=T.get(L.key===null?A:L.key)||null,b(j,T,L,ue);case G:return T=T.get(L.key===null?A:L.key)||null,_(j,T,L,ue);case le:return L=ia(L),O(T,j,A,L,ue)}if(nt(L)||P(L))return T=T.get(A)||null,U(j,T,L,ue,null);if(typeof L.then=="function")return O(T,j,A,Ji(L),ue);if(L.$$typeof===de)return O(T,j,A,Qi(j,L),ue);Ii(j,L)}return null}function se(T,j,A,L){for(var ue=null,De=null,ie=j,xe=j=0,Te=null;ie!==null&&xe<A.length;xe++){ie.index>xe?(Te=ie,ie=null):Te=ie.sibling;var Me=R(T,ie,A[xe],L);if(Me===null){ie===null&&(ie=Te);break}e&&ie&&Me.alternate===null&&t(T,ie),j=c(Me,j,xe),De===null?ue=Me:De.sibling=Me,De=Me,ie=Te}if(xe===A.length)return l(T,ie),Ae&&Vl(T,xe),ue;if(ie===null){for(;xe<A.length;xe++)ie=q(T,A[xe],L),ie!==null&&(j=c(ie,j,xe),De===null?ue=ie:De.sibling=ie,De=ie);return Ae&&Vl(T,xe),ue}for(ie=n(ie);xe<A.length;xe++)Te=O(ie,T,xe,A[xe],L),Te!==null&&(e&&Te.alternate!==null&&ie.delete(Te.key===null?xe:Te.key),j=c(Te,j,xe),De===null?ue=Te:De.sibling=Te,De=Te);return e&&ie.forEach(function(qn){return t(T,qn)}),Ae&&Vl(T,xe),ue}function oe(T,j,A,L){if(A==null)throw Error(r(151));for(var ue=null,De=null,ie=j,xe=j=0,Te=null,Me=A.next();ie!==null&&!Me.done;xe++,Me=A.next()){ie.index>xe?(Te=ie,ie=null):Te=ie.sibling;var qn=R(T,ie,Me.value,L);if(qn===null){ie===null&&(ie=Te);break}e&&ie&&qn.alternate===null&&t(T,ie),j=c(qn,j,xe),De===null?ue=qn:De.sibling=qn,De=qn,ie=Te}if(Me.done)return l(T,ie),Ae&&Vl(T,xe),ue;if(ie===null){for(;!Me.done;xe++,Me=A.next())Me=q(T,Me.value,L),Me!==null&&(j=c(Me,j,xe),De===null?ue=Me:De.sibling=Me,De=Me);return Ae&&Vl(T,xe),ue}for(ie=n(ie);!Me.done;xe++,Me=A.next())Me=O(ie,T,xe,Me.value,L),Me!==null&&(e&&Me.alternate!==null&&ie.delete(Me.key===null?xe:Me.key),j=c(Me,j,xe),De===null?ue=Me:De.sibling=Me,De=Me);return e&&ie.forEach(function(gx){return t(T,gx)}),Ae&&Vl(T,xe),ue}function Ze(T,j,A,L){if(typeof A=="object"&&A!==null&&A.type===K&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case M:e:{for(var ue=A.key;j!==null;){if(j.key===ue){if(ue=A.type,ue===K){if(j.tag===7){l(T,j.sibling),L=s(j,A.props.children),L.return=T,T=L;break e}}else if(j.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===le&&ia(ue)===j.type){l(T,j.sibling),L=s(j,A.props),Ls(L,A),L.return=T,T=L;break e}l(T,j);break}else t(T,j);j=j.sibling}A.type===K?(L=ta(A.props.children,T.mode,L,A.key),L.return=T,T=L):(L=Gi(A.type,A.key,A.props,null,T.mode,L),Ls(L,A),L.return=T,T=L)}return d(T);case G:e:{for(ue=A.key;j!==null;){if(j.key===ue)if(j.tag===4&&j.stateNode.containerInfo===A.containerInfo&&j.stateNode.implementation===A.implementation){l(T,j.sibling),L=s(j,A.children||[]),L.return=T,T=L;break e}else{l(T,j);break}else t(T,j);j=j.sibling}L=mu(A,T.mode,L),L.return=T,T=L}return d(T);case le:return A=ia(A),Ze(T,j,A,L)}if(nt(A))return se(T,j,A,L);if(P(A)){if(ue=P(A),typeof ue!="function")throw Error(r(150));return A=ue.call(A),oe(T,j,A,L)}if(typeof A.then=="function")return Ze(T,j,Ji(A),L);if(A.$$typeof===de)return Ze(T,j,Qi(T,A),L);Ii(T,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,j!==null&&j.tag===6?(l(T,j.sibling),L=s(j,A),L.return=T,T=L):(l(T,j),L=hu(A,T.mode,L),L.return=T,T=L),d(T)):l(T,j)}return function(T,j,A,L){try{Us=0;var ue=Ze(T,j,A,L);return Ya=null,ue}catch(ie){if(ie===Ga||ie===Vi)throw ie;var De=Vt(29,ie,null,T.mode);return De.lanes=L,De.return=T,De}}}var ua=Nf(!0),Sf=Nf(!1),Sn=!1;function Tu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Eu(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 wn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function kn(e,t,l){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Le&2)!==0){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,t=$i(e),sf(e,null,l),t}return qi(e,n,t,l),$i(e)}function Hs(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,Sa(e,l)}}function Au(e,t){var l=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,l===n)){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:n.baseState,firstBaseUpdate:s,lastBaseUpdate:c,shared:n.shared,callbacks:n.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var _u=!1;function Bs(){if(_u){var e=$a;if(e!==null)throw e}}function qs(e,t,l,n){_u=!1;var s=e.updateQueue;Sn=!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 R=m.lane&-536870913,O=R!==m.lane;if(O?(ke&R)===R:(n&R)===R){R!==0&&R===qa&&(_u=!0),U!==null&&(U=U.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var se=e,oe=m;R=t;var Ze=l;switch(oe.tag){case 1:if(se=oe.payload,typeof se=="function"){q=se.call(Ze,q,R);break e}q=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=oe.payload,R=typeof se=="function"?se.call(Ze,q,R):se,R==null)break e;q=E({},q,R);break e;case 2:Sn=!0}}R=m.callback,R!==null&&(e.flags|=64,O&&(e.flags|=8192),O=s.callbacks,O===null?s.callbacks=[R]:O.push(R))}else O={lane:R,tag:m.tag,payload:m.payload,callback:m.callback,next:null},U===null?(_=U=O,b=q):U=U.next=O,d|=R;if(m=m.next,m===null){if(m=s.shared.pending,m===null)break;O=m,m=O.next,O.next=null,s.lastBaseUpdate=O,s.shared.pending=null}}while(!0);U===null&&(b=q),s.baseState=b,s.firstBaseUpdate=_,s.lastBaseUpdate=U,c===null&&(s.shared.lanes=0),zn|=d,e.lanes=d,e.memoizedState=q}}function wf(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function kf(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)wf(l[e],t)}var Xa=N(null),Fi=N(0);function Tf(e,t){e=an,I(Fi,e),I(Xa,t),an=e|t.baseLanes}function zu(){I(Fi,an),I(Xa,Xa.current)}function Ru(){an=Fi.current,B(Xa),B(Fi)}var Kt=N(null),hl=null;function Tn(e){var t=e.alternate;I(at,at.current&1),I(Kt,e),hl===null&&(t===null||Xa.current!==null||t.memoizedState!==null)&&(hl=e)}function Cu(e){I(at,at.current),I(Kt,e),hl===null&&(hl=e)}function Ef(e){e.tag===22?(I(at,at.current),I(Kt,e),hl===null&&(hl=e)):En()}function En(){I(at,at.current),I(Kt,Kt.current)}function Jt(e){B(Kt),hl===e&&(hl=null),B(at)}var at=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||Hr(l)||Br(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 Il=0,ge=null,Xe=null,ot=null,Pi=!1,Qa=!1,ra=!1,ec=0,$s=0,Za=null,ig=0;function tt(){throw Error(r(321))}function Ou(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Zt(e[l],t[l]))return!1;return!0}function Du(e,t,l,n,s,c){return Il=c,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?od:Ju,ra=!1,c=l(n,s),ra=!1,Qa&&(c=_f(t,l,n,s)),Af(e),c}function Af(e){D.H=Xs;var t=Xe!==null&&Xe.next!==null;if(Il=0,ot=Xe=ge=null,Pi=!1,$s=0,Za=null,t)throw Error(r(300));e===null||ft||(e=e.dependencies,e!==null&&Xi(e)&&(ft=!0))}function _f(e,t,l,n){ge=e;var s=0;do{if(Qa&&(Za=null),$s=0,Qa=!1,25<=s)throw Error(r(301));if(s+=1,ot=Xe=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}D.H=fd,c=t(l,n)}while(Qa);return c}function cg(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?Gs(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(ge.flags|=1024),t}function Mu(){var e=ec!==0;return ec=0,e}function Uu(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Lu(e){if(Pi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Pi=!1}Il=0,ot=Xe=ge=null,Qa=!1,$s=ec=0,Za=null}function Mt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?ge.memoizedState=ot=e:ot=ot.next=e,ot}function st(){if(Xe===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=ot===null?ge.memoizedState:ot.next;if(t!==null)ot=t,Xe=e;else{if(e===null)throw ge.alternate===null?Error(r(467)):Error(r(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},ot===null?ge.memoizedState=ot=e:ot=ot.next=e}return ot}function tc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Gs(e){var t=$s;return $s+=1,Za===null&&(Za=[]),e=yf(Za,e,t),t=ge,(ot===null?t.memoizedState:ot.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?od:Ju),e}function lc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Gs(e);if(e.$$typeof===de)return Tt(e)}throw Error(r(438,String(e)))}function Hu(e){var t=null,l=ge.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var n=ge.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=tc(),ge.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),n=0;n<e;n++)l[n]=je;return t.index++,l}function Fl(e,t){return typeof t=="function"?t(e):t}function nc(e){var t=st();return Bu(t,Xe,e)}function Bu(e,t,l){var n=e.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=l;var s=e.baseQueue,c=n.pending;if(c!==null){if(s!==null){var d=s.next;s.next=c.next,c.next=d}t.baseQueue=s=c,n.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?(ke&q)===q:(Il&q)===q){var R=_.revertLane;if(R===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),q===qa&&(U=!0);else if((Il&R)===R){_=_.next,R===qa&&(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,ge.lanes|=R,zn|=R;q=_.action,ra&&l(c,q),c=_.hasEagerState?_.eagerState:l(c,q)}else R={lane:q,revertLane:_.revertLane,gesture:_.gesture,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},b===null?(m=b=R,d=c):b=b.next=R,ge.lanes|=q,zn|=q;_=_.next}while(_!==null&&_!==t);if(b===null?d=c:b.next=m,!Zt(c,e.memoizedState)&&(ft=!0,U&&(l=$a,l!==null)))throw l;e.memoizedState=c,e.baseState=d,e.baseQueue=b,n.lastRenderedState=c}return s===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function qu(e){var t=st(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var n=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);Zt(c,t.memoizedState)||(ft=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),l.lastRenderedState=c}return[c,n]}function zf(e,t,l){var n=ge,s=st(),c=Ae;if(c){if(l===void 0)throw Error(r(407));l=l()}else l=t();var d=!Zt((Xe||s).memoizedState,l);if(d&&(s.memoizedState=l,ft=!0),s=s.queue,Yu(Of.bind(null,n,s,e),[e]),s.getSnapshot!==t||d||ot!==null&&ot.memoizedState.tag&1){if(n.flags|=2048,Va(9,{destroy:void 0},Cf.bind(null,n,s,l,t),null),Ke===null)throw Error(r(349));c||(Il&127)!==0||Rf(n,t,l)}return l}function Rf(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=ge.updateQueue,t===null?(t=tc(),ge.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Cf(e,t,l,n){t.value=l,t.getSnapshot=n,Df(t)&&Mf(e)}function Of(e,t,l){return l(function(){Df(t)&&Mf(e)})}function Df(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Zt(e,l)}catch{return!0}}function Mf(e){var t=ea(e,2);t!==null&&$t(t,e,2)}function $u(e){var t=Mt();if(typeof e=="function"){var l=e;if(e=l(),ra){Xt(!0);try{l()}finally{Xt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fl,lastRenderedState:e},t}function Uf(e,t,l,n){return e.baseState=l,Bu(e,Xe,typeof n=="function"?n:Fl)}function ug(e,t,l,n,s){if(ic(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)}};D.T!==null?l(!0):c.isTransition=!1,n(c),l=t.pending,l===null?(c.next=t.pending=c,Lf(t,c)):(c.next=l.next,t.pending=l.next=c)}}function Lf(e,t){var l=t.action,n=t.payload,s=e.state;if(t.isTransition){var c=D.T,d={};D.T=d;try{var m=l(s,n),b=D.S;b!==null&&b(d,m),Hf(e,t,m)}catch(_){Gu(e,t,_)}finally{c!==null&&d.types!==null&&(c.types=d.types),D.T=c}}else try{c=l(s,n),Hf(e,t,c)}catch(_){Gu(e,t,_)}}function Hf(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){Bf(e,t,n)},function(n){return Gu(e,t,n)}):Bf(e,t,l)}function Bf(e,t,l){t.status="fulfilled",t.value=l,qf(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Lf(e,l)))}function Gu(e,t,l){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=l,qf(t),t=t.next;while(t!==n)}e.action=null}function qf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function $f(e,t){return t}function Gf(e,t){if(Ae){var l=Ke.formState;if(l!==null){e:{var n=ge;if(Ae){if(Ie){t:{for(var s=Ie,c=dl;s.nodeType!==8;){if(!c){s=null;break t}if(s=ml(s.nextSibling),s===null){s=null;break t}}c=s.data,s=c==="F!"||c==="F"?s:null}if(s){Ie=ml(s.nextSibling),n=s.data==="F!";break e}}jn(n)}n=!1}n&&(t=l[0])}}return l=Mt(),l.memoizedState=l.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$f,lastRenderedState:t},l.queue=n,l=cd.bind(null,ge,n),n.dispatch=l,n=$u(!1),c=Ku.bind(null,ge,!1,n.queue),n=Mt(),s={state:t,dispatch:null,action:e,pending:null},n.queue=s,l=ug.bind(null,ge,s,c,l),s.dispatch=l,n.memoizedState=e,[t,l,!1]}function Yf(e){var t=st();return Xf(t,Xe,e)}function Xf(e,t,l){if(t=Bu(e,t,$f)[0],e=nc(Fl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=Gs(t)}catch(d){throw d===Ga?Vi:d}else n=t;t=st();var s=t.queue,c=s.dispatch;return l!==t.memoizedState&&(ge.flags|=2048,Va(9,{destroy:void 0},rg.bind(null,s,l),null)),[n,c,e]}function rg(e,t){e.action=t}function Qf(e){var t=st(),l=Xe;if(l!==null)return Xf(t,l,e);st(),t=t.memoizedState,l=st();var n=l.queue.dispatch;return l.memoizedState=e,[t,n,!1]}function Va(e,t,l,n){return e={tag:e,create:l,deps:n,inst:t,next:null},t=ge.updateQueue,t===null&&(t=tc(),ge.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(n=l.next,l.next=e,e.next=n,t.lastEffect=e),e}function Zf(){return st().memoizedState}function ac(e,t,l,n){var s=Mt();ge.flags|=e,s.memoizedState=Va(1|t,{destroy:void 0},l,n===void 0?null:n)}function sc(e,t,l,n){var s=st();n=n===void 0?null:n;var c=s.memoizedState.inst;Xe!==null&&n!==null&&Ou(n,Xe.memoizedState.deps)?s.memoizedState=Va(t,c,l,n):(ge.flags|=e,s.memoizedState=Va(1|t,c,l,n))}function Vf(e,t){ac(8390656,8,e,t)}function Yu(e,t){sc(2048,8,e,t)}function og(e){ge.flags|=4;var t=ge.updateQueue;if(t===null)t=tc(),ge.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Kf(e){var t=st().memoizedState;return og({ref:t,nextImpl:e}),function(){if((Le&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Jf(e,t){return sc(4,2,e,t)}function If(e,t){return sc(4,4,e,t)}function Ff(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 Wf(e,t,l){l=l!=null?l.concat([e]):null,sc(4,4,Ff.bind(null,t,e),l)}function Xu(){}function Pf(e,t){var l=st();t=t===void 0?null:t;var n=l.memoizedState;return t!==null&&Ou(t,n[1])?n[0]:(l.memoizedState=[e,t],e)}function ed(e,t){var l=st();t=t===void 0?null:t;var n=l.memoizedState;if(t!==null&&Ou(t,n[1]))return n[0];if(n=e(),ra){Xt(!0);try{e()}finally{Xt(!1)}}return l.memoizedState=[n,t],n}function Qu(e,t,l){return l===void 0||(Il&1073741824)!==0&&(ke&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=th(),ge.lanes|=e,zn|=e,l)}function td(e,t,l,n){return Zt(l,t)?l:Xa.current!==null?(e=Qu(e,l,n),Zt(e,t)||(ft=!0),e):(Il&42)===0||(Il&1073741824)!==0&&(ke&261930)===0?(ft=!0,e.memoizedState=l):(e=th(),ge.lanes|=e,zn|=e,t)}function ld(e,t,l,n,s){var c=J.p;J.p=c!==0&&8>c?c:8;var d=D.T,m={};D.T=m,Ku(e,!1,t,l);try{var b=s(),_=D.S;if(_!==null&&_(m,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var U=sg(b,n);Ys(e,t,U,Wt(e))}else Ys(e,t,n,Wt(e))}catch(q){Ys(e,t,{then:function(){},status:"rejected",reason:q},Wt())}finally{J.p=c,d!==null&&m.types!==null&&(d.types=m.types),D.T=d}}function fg(){}function Zu(e,t,l,n){if(e.tag!==5)throw Error(r(476));var s=nd(e).queue;ld(e,s,t,ce,l===null?fg:function(){return ad(e),l(n)})}function nd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fl,lastRenderedState:ce},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ad(e){var t=nd(e);t.next===null&&(t=e.alternate.memoizedState),Ys(e,t.next.queue,{},Wt())}function Vu(){return Tt(ii)}function sd(){return st().memoizedState}function id(){return st().memoizedState}function dg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Wt();e=wn(l);var n=kn(t,e,l);n!==null&&($t(n,t,l),Hs(n,t,l)),t={cache:Nu()},e.payload=t;return}t=t.return}}function hg(e,t,l){var n=Wt();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ic(e)?ud(t,l):(l=fu(e,t,l,n),l!==null&&($t(l,e,n),rd(l,t,n)))}function cd(e,t,l){var n=Wt();Ys(e,t,l,n)}function Ys(e,t,l,n){var s={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(ic(e))ud(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,Zt(m,d))return qi(e,t,s,0),Ke===null&&Bi(),!1}catch{}if(l=fu(e,t,s,n),l!==null)return $t(l,e,n),rd(l,t,n),!0}return!1}function Ku(e,t,l,n){if(n={lane:2,revertLane:Tr(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ic(e)){if(t)throw Error(r(479))}else t=fu(e,l,n,2),t!==null&&$t(t,e,2)}function ic(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function ud(e,t){Qa=Pi=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function rd(e,t,l){if((l&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,Sa(e,l)}}var Xs={readContext:Tt,use:lc,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};Xs.useEffectEvent=tt;var od={readContext:Tt,use:lc,useCallback:function(e,t){return Mt().memoizedState=[e,t===void 0?null:t],e},useContext:Tt,useEffect:Vf,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,ac(4194308,4,Ff.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=Mt();t=t===void 0?null:t;var n=e();if(ra){Xt(!0);try{e()}finally{Xt(!1)}}return l.memoizedState=[n,t],n},useReducer:function(e,t,l){var n=Mt();if(l!==void 0){var s=l(t);if(ra){Xt(!0);try{l(t)}finally{Xt(!1)}}}else s=t;return n.memoizedState=n.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},n.queue=e,e=e.dispatch=hg.bind(null,ge,e),[n.memoizedState,e]},useRef:function(e){var t=Mt();return e={current:e},t.memoizedState=e},useState:function(e){e=$u(e);var t=e.queue,l=cd.bind(null,ge,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Xu,useDeferredValue:function(e,t){var l=Mt();return Qu(l,e,t)},useTransition:function(){var e=$u(!1);return e=ld.bind(null,ge,e.queue,!0,!1),Mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var n=ge,s=Mt();if(Ae){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),Ke===null)throw Error(r(349));(ke&127)!==0||Rf(n,t,l)}s.memoizedState=l;var c={value:l,getSnapshot:t};return s.queue=c,Vf(Of.bind(null,n,c,e),[e]),n.flags|=2048,Va(9,{destroy:void 0},Cf.bind(null,n,c,l,t),null),l},useId:function(){var e=Mt(),t=Ke.identifierPrefix;if(Ae){var l=Ml,n=Dl;l=(n&~(1<<32-zt(n)-1)).toString(32)+l,t="_"+t+"R_"+l,l=ec++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=ig++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Vu,useFormState:Gf,useActionState:Gf,useOptimistic:function(e){var t=Mt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Ku.bind(null,ge,!0,l),l.dispatch=t,[e,t]},useMemoCache:Hu,useCacheRefresh:function(){return Mt().memoizedState=dg.bind(null,ge)},useEffectEvent:function(e){var t=Mt(),l={impl:e};return t.memoizedState=l,function(){if((Le&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},Ju={readContext:Tt,use:lc,useCallback:Pf,useContext:Tt,useEffect:Yu,useImperativeHandle:Wf,useInsertionEffect:Jf,useLayoutEffect:If,useMemo:ed,useReducer:nc,useRef:Zf,useState:function(){return nc(Fl)},useDebugValue:Xu,useDeferredValue:function(e,t){var l=st();return td(l,Xe.memoizedState,e,t)},useTransition:function(){var e=nc(Fl)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Gs(e),t]},useSyncExternalStore:zf,useId:sd,useHostTransitionStatus:Vu,useFormState:Yf,useActionState:Yf,useOptimistic:function(e,t){var l=st();return Uf(l,Xe,e,t)},useMemoCache:Hu,useCacheRefresh:id};Ju.useEffectEvent=Kf;var fd={readContext:Tt,use:lc,useCallback:Pf,useContext:Tt,useEffect:Yu,useImperativeHandle:Wf,useInsertionEffect:Jf,useLayoutEffect:If,useMemo:ed,useReducer:qu,useRef:Zf,useState:function(){return qu(Fl)},useDebugValue:Xu,useDeferredValue:function(e,t){var l=st();return Xe===null?Qu(l,e,t):td(l,Xe.memoizedState,e,t)},useTransition:function(){var e=qu(Fl)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Gs(e),t]},useSyncExternalStore:zf,useId:sd,useHostTransitionStatus:Vu,useFormState:Qf,useActionState:Qf,useOptimistic:function(e,t){var l=st();return Xe!==null?Uf(l,Xe,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Hu,useCacheRefresh:id};fd.useEffectEvent=Kf;function Iu(e,t,l,n){t=e.memoizedState,l=l(n,t),l=l==null?t:E({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Fu={enqueueSetState:function(e,t,l){e=e._reactInternals;var n=Wt(),s=wn(n);s.payload=t,l!=null&&(s.callback=l),t=kn(e,s,n),t!==null&&($t(t,e,n),Hs(t,e,n))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var n=Wt(),s=wn(n);s.tag=1,s.payload=t,l!=null&&(s.callback=l),t=kn(e,s,n),t!==null&&($t(t,e,n),Hs(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Wt(),n=wn(l);n.tag=2,t!=null&&(n.callback=t),t=kn(e,n,l),t!==null&&($t(t,e,l),Hs(t,e,l))}};function dd(e,t,l,n,s,c,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,c,d):t.prototype&&t.prototype.isPureReactComponent?!zs(l,n)||!zs(s,c):!0}function hd(e,t,l,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,n),t.state!==e&&Fu.enqueueReplaceState(t,t.state,null)}function oa(e,t){var l=t;if("ref"in t){l={};for(var n in t)n!=="ref"&&(l[n]=t[n])}if(e=e.defaultProps){l===t&&(l=E({},l));for(var s in e)l[s]===void 0&&(l[s]=e[s])}return l}function md(e){Hi(e)}function pd(e){console.error(e)}function gd(e){Hi(e)}function cc(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function xd(e,t,l){try{var n=e.onCaughtError;n(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=wn(l),l.tag=3,l.payload={element:null},l.callback=function(){cc(e,t)},l}function vd(e){return e=wn(e),e.tag=3,e}function yd(e,t,l,n){var s=l.type.getDerivedStateFromError;if(typeof s=="function"){var c=n.value;e.payload=function(){return s(c)},e.callback=function(){xd(t,l,n)}}var d=l.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){xd(t,l,n),typeof s!="function"&&(Rn===null?Rn=new Set([this]):Rn.add(this));var m=n.stack;this.componentDidCatch(n.value,{componentStack:m!==null?m:""})})}function mg(e,t,l,n,s){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=l.alternate,t!==null&&Ba(t,l,s,!0),l=Kt.current,l!==null){switch(l.tag){case 31:case 13:return hl===null?yc():l.alternate===null&<===0&&(lt=3),l.flags&=-257,l.flags|=65536,l.lanes=s,n===Ki?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([n]):t.add(n),Sr(e,n,s)),!1;case 22:return l.flags|=65536,n===Ki?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([n]):l.add(n)),Sr(e,n,s)),!1}throw Error(r(435,l.tag))}return Sr(e,n,s),yc(),!1}if(Ae)return t=Kt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,n!==xu&&(e=Error(r(422),{cause:n}),Os(rl(e,l)))):(n!==xu&&(t=Error(r(423),{cause:n}),Os(rl(t,l))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,n=rl(n,l),s=Wu(e.stateNode,n,s),Au(e,s),lt!==4&&(lt=2)),!1;var c=Error(r(520),{cause:n});if(c=rl(c,l),Ws===null?Ws=[c]:Ws.push(c),lt!==4&&(lt=2),t===null)return!0;n=rl(n,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=s&-s,l.lanes|=e,e=Wu(l.stateNode,n,e),Au(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"&&(Rn===null||!Rn.has(c))))return l.flags|=65536,s&=-s,l.lanes|=s,s=vd(s),yd(s,e,l,n),Au(l,s),!1}l=l.return}while(l!==null);return!1}var Pu=Error(r(461)),ft=!1;function Et(e,t,l,n){t.child=e===null?Sf(t,null,l,n):ua(t,e.child,l,n)}function bd(e,t,l,n,s){l=l.render;var c=t.ref;if("ref"in n){var d={};for(var m in n)m!=="ref"&&(d[m]=n[m])}else d=n;return aa(t),n=Du(e,t,l,d,c,s),m=Mu(),e!==null&&!ft?(Uu(e,t,s),Wl(e,t,s)):(Ae&&m&&pu(t),t.flags|=1,Et(e,t,n,s),t.child)}function jd(e,t,l,n,s){if(e===null){var c=l.type;return typeof c=="function"&&!du(c)&&c.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=c,Nd(e,t,c,n,s)):(e=Gi(l.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!cr(e,s)){var d=c.memoizedProps;if(l=l.compare,l=l!==null?l:zs,l(d,n)&&e.ref===t.ref)return Wl(e,t,s)}return t.flags|=1,e=Zl(c,n),e.ref=t.ref,e.return=t,t.child=e}function Nd(e,t,l,n,s){if(e!==null){var c=e.memoizedProps;if(zs(c,n)&&e.ref===t.ref)if(ft=!1,t.pendingProps=n=c,cr(e,s))(e.flags&131072)!==0&&(ft=!0);else return t.lanes=e.lanes,Wl(e,t,s)}return er(e,t,l,n,s)}function Sd(e,t,l,n){var s=n.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|l:l,e!==null){for(n=t.child=e.child,s=0;n!==null;)s=s|n.lanes|n.childLanes,n=n.sibling;n=s&~c}else n=0,t.child=null;return wd(e,t,c,l,n)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Zi(t,c!==null?c.cachePool:null),c!==null?Tf(t,c):zu(),Ef(t);else return n=t.lanes=536870912,wd(e,t,c!==null?c.baseLanes|l:l,l,n)}else c!==null?(Zi(t,c.cachePool),Tf(t,c),En(),t.memoizedState=null):(e!==null&&Zi(t,null),zu(),En());return Et(e,t,s,l),t.child}function Qs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function wd(e,t,l,n,s){var c=wu();return c=c===null?null:{parent:rt._currentValue,pool:c},t.memoizedState={baseLanes:l,cachePool:c},e!==null&&Zi(t,null),zu(),Ef(t),e!==null&&Ba(e,t,n,!0),t.childLanes=s,null}function uc(e,t){return t=oc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function kd(e,t,l){return ua(t,e.child,null,l),e=uc(t,t.pendingProps),e.flags|=2,Jt(t),t.memoizedState=null,e}function pg(e,t,l){var n=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ae){if(n.mode==="hidden")return e=uc(t,n),t.lanes=536870912,Qs(null,e);if(Cu(t),(e=Ie)?(e=Lh(e,dl),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yn!==null?{id:Dl,overflow:Ml}:null,retryLane:536870912,hydrationErrors:null},l=uf(e),l.return=t,t.child=l,kt=t,Ie=null)):e=null,e===null)throw jn(t);return t.lanes=536870912,null}return uc(t,n)}var c=e.memoizedState;if(c!==null){var d=c.dehydrated;if(Cu(t),s)if(t.flags&256)t.flags&=-257,t=kd(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(ft||Ba(e,t,l,!1),s=(l&e.childLanes)!==0,ft||s){if(n=Ke,n!==null&&(d=wa(n,l),d!==0&&d!==c.retryLane))throw c.retryLane=d,ea(e,d),$t(n,e,d),Pu;yc(),t=kd(e,t,l)}else e=c.treeContext,Ie=ml(d.nextSibling),kt=t,Ae=!0,bn=null,dl=!1,e!==null&&ff(t,e),t=uc(t,n),t.flags|=4096;return t}return e=Zl(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function rc(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 er(e,t,l,n,s){return aa(t),l=Du(e,t,l,n,void 0,s),n=Mu(),e!==null&&!ft?(Uu(e,t,s),Wl(e,t,s)):(Ae&&n&&pu(t),t.flags|=1,Et(e,t,l,s),t.child)}function Td(e,t,l,n,s,c){return aa(t),t.updateQueue=null,l=_f(t,n,l,s),Af(e),n=Mu(),e!==null&&!ft?(Uu(e,t,c),Wl(e,t,c)):(Ae&&n&&pu(t),t.flags|=1,Et(e,t,l,c),t.child)}function Ed(e,t,l,n,s){if(aa(t),t.stateNode===null){var c=Ma,d=l.contextType;typeof d=="object"&&d!==null&&(c=Tt(d)),c=new l(n,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Fu,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=n,c.state=t.memoizedState,c.refs={},Tu(t),d=l.contextType,c.context=typeof d=="object"&&d!==null?Tt(d):Ma,c.state=t.memoizedState,d=l.getDerivedStateFromProps,typeof d=="function"&&(Iu(t,l,d,n),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&&Fu.enqueueReplaceState(c,c.state,null),qs(t,n,c,s),Bs(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){c=t.stateNode;var m=t.memoizedProps,b=oa(l,m);c.props=b;var _=c.context,U=l.contextType;d=Ma,typeof U=="object"&&U!==null&&(d=Tt(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)&&hd(t,c,n,d),Sn=!1;var R=t.memoizedState;c.state=R,qs(t,n,c,s),Bs(),_=t.memoizedState,m||R!==_||Sn?(typeof q=="function"&&(Iu(t,l,q,n),_=t.memoizedState),(b=Sn||dd(t,l,b,n,R,_,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=n,t.memoizedState=_),c.props=n,c.state=_,c.context=d,n=b):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{c=t.stateNode,Eu(e,t),d=t.memoizedProps,U=oa(l,d),c.props=U,q=t.pendingProps,R=c.context,_=l.contextType,b=Ma,typeof _=="object"&&_!==null&&(b=Tt(_)),m=l.getDerivedStateFromProps,(_=typeof m=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(d!==q||R!==b)&&hd(t,c,n,b),Sn=!1,R=t.memoizedState,c.state=R,qs(t,n,c,s),Bs();var O=t.memoizedState;d!==q||R!==O||Sn||e!==null&&e.dependencies!==null&&Xi(e.dependencies)?(typeof m=="function"&&(Iu(t,l,m,n),O=t.memoizedState),(U=Sn||dd(t,l,U,n,R,O,b)||e!==null&&e.dependencies!==null&&Xi(e.dependencies))?(_||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(n,O,b),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(n,O,b)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=O),c.props=n,c.state=O,c.context=b,n=U):(typeof c.componentDidUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),n=!1)}return c=n,rc(e,t),n=(t.flags&128)!==0,c||n?(c=t.stateNode,l=n&&typeof l.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&n?(t.child=ua(t,e.child,null,s),t.child=ua(t,null,l,s)):Et(e,t,l,s),t.memoizedState=c.state,e=t.child):e=Wl(e,t,s),e}function Ad(e,t,l,n){return la(),t.flags|=256,Et(e,t,l,n),t.child}var tr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function lr(e){return{baseLanes:e,cachePool:xf()}}function nr(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Ft),e}function _d(e,t,l){var n=t.pendingProps,s=!1,c=(t.flags&128)!==0,d;if((d=c)||(d=e!==null&&e.memoizedState===null?!1:(at.current&2)!==0),d&&(s=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ae){if(s?Tn(t):En(),(e=Ie)?(e=Lh(e,dl),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yn!==null?{id:Dl,overflow:Ml}:null,retryLane:536870912,hydrationErrors:null},l=uf(e),l.return=t,t.child=l,kt=t,Ie=null)):e=null,e===null)throw jn(t);return Br(e)?t.lanes=32:t.lanes=536870912,null}var m=n.children;return n=n.fallback,s?(En(),s=t.mode,m=oc({mode:"hidden",children:m},s),n=ta(n,s,l,null),m.return=t,n.return=t,m.sibling=n,t.child=m,n=t.child,n.memoizedState=lr(l),n.childLanes=nr(e,d,l),t.memoizedState=tr,Qs(null,n)):(Tn(t),ar(t,m))}var b=e.memoizedState;if(b!==null&&(m=b.dehydrated,m!==null)){if(c)t.flags&256?(Tn(t),t.flags&=-257,t=sr(e,t,l)):t.memoizedState!==null?(En(),t.child=e.child,t.flags|=128,t=null):(En(),m=n.fallback,s=t.mode,n=oc({mode:"visible",children:n.children},s),m=ta(m,s,l,null),m.flags|=2,n.return=t,m.return=t,n.sibling=m,t.child=n,ua(t,e.child,null,l),n=t.child,n.memoizedState=lr(l),n.childLanes=nr(e,d,l),t.memoizedState=tr,t=Qs(null,n));else if(Tn(t),Br(m)){if(d=m.nextSibling&&m.nextSibling.dataset,d)var _=d.dgst;d=_,n=Error(r(419)),n.stack="",n.digest=d,Os({value:n,source:null,stack:null}),t=sr(e,t,l)}else if(ft||Ba(e,t,l,!1),d=(l&e.childLanes)!==0,ft||d){if(d=Ke,d!==null&&(n=wa(d,l),n!==0&&n!==b.retryLane))throw b.retryLane=n,ea(e,n),$t(d,e,n),Pu;Hr(m)||yc(),t=sr(e,t,l)}else Hr(m)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,Ie=ml(m.nextSibling),kt=t,Ae=!0,bn=null,dl=!1,e!==null&&ff(t,e),t=ar(t,n.children),t.flags|=4096);return t}return s?(En(),m=n.fallback,s=t.mode,b=e.child,_=b.sibling,n=Zl(b,{mode:"hidden",children:n.children}),n.subtreeFlags=b.subtreeFlags&65011712,_!==null?m=Zl(_,m):(m=ta(m,s,l,null),m.flags|=2),m.return=t,n.return=t,n.sibling=m,t.child=n,Qs(null,n),n=t.child,m=e.child.memoizedState,m===null?m=lr(l):(s=m.cachePool,s!==null?(b=rt._currentValue,s=s.parent!==b?{parent:b,pool:b}:s):s=xf(),m={baseLanes:m.baseLanes|l,cachePool:s}),n.memoizedState=m,n.childLanes=nr(e,d,l),t.memoizedState=tr,Qs(e.child,n)):(Tn(t),l=e.child,e=l.sibling,l=Zl(l,{mode:"visible",children:n.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=oc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function oc(e,t){return e=Vt(22,e,null,t),e.lanes=0,e}function sr(e,t,l){return ua(t,e.child,null,l),e=ar(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zd(e,t,l){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),bu(e.return,t,l)}function ir(e,t,l,n,s,c){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:l,tailMode:s,treeForkCount:c}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=n,d.tail=l,d.tailMode=s,d.treeForkCount=c)}function Rd(e,t,l){var n=t.pendingProps,s=n.revealOrder,c=n.tail;n=n.children;var d=at.current,m=(d&2)!==0;if(m?(d=d&1|2,t.flags|=128):d&=1,I(at,d),Et(e,t,n,l),n=Ae?Cs:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zd(e,l,t);else if(e.tag===19)zd(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),ir(t,!1,s,l,c,n);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}ir(t,!0,l,null,c,n);break;case"together":ir(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Wl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),zn|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Ba(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=Zl(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Zl(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function cr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Xi(e)))}function gg(e,t,l){switch(t.tag){case 3:mt(t,t.stateNode.containerInfo),Nn(t,rt,e.memoizedState.cache),la();break;case 27:case 5:ze(t);break;case 4:mt(t,t.stateNode.containerInfo);break;case 10:Nn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Cu(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Tn(t),t.flags|=128,null):(l&t.child.childLanes)!==0?_d(e,t,l):(Tn(t),e=Wl(e,t,l),e!==null?e.sibling:null);Tn(t);break;case 19:var s=(e.flags&128)!==0;if(n=(l&t.childLanes)!==0,n||(Ba(e,t,l,!1),n=(l&t.childLanes)!==0),s){if(n)return Rd(e,t,l);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),I(at,at.current),n)break;return null;case 22:return t.lanes=0,Sd(e,t,l,t.pendingProps);case 24:Nn(t,rt,e.memoizedState.cache)}return Wl(e,t,l)}function Cd(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)ft=!0;else{if(!cr(e,l)&&(t.flags&128)===0)return ft=!1,gg(e,t,l);ft=(e.flags&131072)!==0}else ft=!1,Ae&&(t.flags&1048576)!==0&&of(t,Cs,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=ia(t.elementType),t.type=e,typeof e=="function")du(e)?(n=oa(e,n),t.tag=1,t=Ed(null,t,e,n,l)):(t.tag=0,t=er(null,t,e,n,l));else{if(e!=null){var s=e.$$typeof;if(s===te){t.tag=11,t=bd(null,t,e,n,l);break e}else if(s===Z){t.tag=14,t=jd(null,t,e,n,l);break e}}throw t=Je(e)||e,Error(r(306,t,""))}}return t;case 0:return er(e,t,t.type,t.pendingProps,l);case 1:return n=t.type,s=oa(n,t.pendingProps),Ed(e,t,n,s,l);case 3:e:{if(mt(t,t.stateNode.containerInfo),e===null)throw Error(r(387));n=t.pendingProps;var c=t.memoizedState;s=c.element,Eu(e,t),qs(t,n,null,l);var d=t.memoizedState;if(n=d.cache,Nn(t,rt,n),n!==c.cache&&ju(t,[rt],l,!0),Bs(),n=d.element,c.isDehydrated)if(c={element:n,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=Ad(e,t,n,l);break e}else if(n!==s){s=rl(Error(r(424)),t),Os(s),t=Ad(e,t,n,l);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ie=ml(e.firstChild),kt=t,Ae=!0,bn=null,dl=!0,l=Sf(t,null,n,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(la(),n===s){t=Wl(e,t,l);break e}Et(e,t,n,l)}t=t.child}return t;case 26:return rc(e,t),e===null?(l=Yh(t.type,null,t.pendingProps,null))?t.memoizedState=l:Ae||(l=t.type,e=t.pendingProps,n=Tc(pe.current).createElement(l),n[pt]=t,n[it]=e,At(n,l,e),ct(n),t.stateNode=n):t.memoizedState=Yh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ze(t),e===null&&Ae&&(n=t.stateNode=qh(t.type,t.pendingProps,pe.current),kt=t,dl=!0,s=Ie,Mn(t.type)?(qr=s,Ie=ml(n.firstChild)):Ie=s),Et(e,t,t.pendingProps.children,l),rc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ae&&((s=n=Ie)&&(n=Zg(n,t.type,t.pendingProps,dl),n!==null?(t.stateNode=n,kt=t,Ie=ml(n.firstChild),dl=!1,s=!0):s=!1),s||jn(t)),ze(t),s=t.type,c=t.pendingProps,d=e!==null?e.memoizedProps:null,n=c.children,Mr(s,c)?n=null:d!==null&&Mr(s,d)&&(t.flags|=32),t.memoizedState!==null&&(s=Du(e,t,cg,null,null,l),ii._currentValue=s),rc(e,t),Et(e,t,n,l),t.child;case 6:return e===null&&Ae&&((e=l=Ie)&&(l=Vg(l,t.pendingProps,dl),l!==null?(t.stateNode=l,kt=t,Ie=null,e=!0):e=!1),e||jn(t)),null;case 13:return _d(e,t,l);case 4:return mt(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ua(t,null,n,l):Et(e,t,n,l),t.child;case 11:return bd(e,t,t.type,t.pendingProps,l);case 7:return Et(e,t,t.pendingProps,l),t.child;case 8:return Et(e,t,t.pendingProps.children,l),t.child;case 12:return Et(e,t,t.pendingProps.children,l),t.child;case 10:return n=t.pendingProps,Nn(t,t.type,n.value),Et(e,t,n.children,l),t.child;case 9:return s=t.type._context,n=t.pendingProps.children,aa(t),s=Tt(s),n=n(s),t.flags|=1,Et(e,t,n,l),t.child;case 14:return jd(e,t,t.type,t.pendingProps,l);case 15:return Nd(e,t,t.type,t.pendingProps,l);case 19:return Rd(e,t,l);case 31:return pg(e,t,l);case 22:return Sd(e,t,l,t.pendingProps);case 24:return aa(t),n=Tt(rt),e===null?(s=wu(),s===null&&(s=Ke,c=Nu(),s.pooledCache=c,c.refCount++,c!==null&&(s.pooledCacheLanes|=l),s=c),t.memoizedState={parent:n,cache:s},Tu(t),Nn(t,rt,s)):((e.lanes&l)!==0&&(Eu(e,t),qs(t,null,null,l),Bs()),s=e.memoizedState,c=t.memoizedState,s.parent!==n?(s={parent:n,cache:n},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),Nn(t,rt,n)):(n=c.cache,Nn(t,rt,n),n!==s.cache&&ju(t,[rt],l,!0))),Et(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Pl(e){e.flags|=4}function ur(e,t,l,n,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(sh())e.flags|=8192;else throw ca=Ki,ku}else e.flags&=-16777217}function Od(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Kh(t))if(sh())e.flags|=8192;else throw ca=Ki,ku}function fc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ps():536870912,e.lanes|=t,Fa|=t)}function Zs(e,t){if(!Ae)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 n=null;l!==null;)l.alternate!==null&&(n=l),l=l.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Fe(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,n=0;if(t)for(var s=e.child;s!==null;)l|=s.lanes|s.childLanes,n|=s.subtreeFlags&65011712,n|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)l|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=l,t}function xg(e,t,l){var n=t.pendingProps;switch(gu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fe(t),null;case 1:return Fe(t),null;case 3:return l=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Jl(rt),H(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ha(t)?Pl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,vu())),Fe(t),null;case 26:var s=t.type,c=t.memoizedState;return e===null?(Pl(t),c!==null?(Fe(t),Od(t,c)):(Fe(t),ur(t,s,null,n,l))):c?c!==e.memoizedState?(Pl(t),Fe(t),Od(t,c)):(Fe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Pl(t),Fe(t),ur(t,s,e,n,l)),null;case 27:if(Ge(t),l=pe.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Pl(t);else{if(!n){if(t.stateNode===null)throw Error(r(166));return Fe(t),null}e=Q.current,Ha(t)?df(t):(e=qh(s,n,l),t.stateNode=e,Pl(t))}return Fe(t),null;case 5:if(Ge(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Pl(t);else{if(!n){if(t.stateNode===null)throw Error(r(166));return Fe(t),null}if(c=Q.current,Ha(t))df(t);else{var d=Tc(pe.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 n.is=="string"?d.createElement("select",{is:n.is}):d.createElement("select"),n.multiple?c.multiple=!0:n.size&&(c.size=n.size);break;default:c=typeof n.is=="string"?d.createElement(s,{is:n.is}):d.createElement(s)}}c[pt]=t,c[it]=n;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(At(c,s,n),s){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Pl(t)}}return Fe(t),ur(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Pl(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(r(166));if(e=pe.current,Ha(t)){if(e=t.stateNode,l=t.memoizedProps,n=null,s=kt,s!==null)switch(s.tag){case 27:case 5:n=s.memoizedProps}e[pt]=t,e=!!(e.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||_h(e.nodeValue,l)),e||jn(t,!0)}else e=Tc(e).createTextNode(n),e[pt]=t,t.stateNode=e}return Fe(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(n=Ha(t),l!==null){if(e===null){if(!n)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[pt]=t}else la(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Fe(t),e=!1}else l=vu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Jt(t),t):(Jt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Fe(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=Ha(t),n!==null&&n.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[pt]=t}else la(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Fe(t),s=!1}else s=vu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(Jt(t),t):(Jt(t),null)}return Jt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=n!==null,e=e!==null&&e.memoizedState!==null,l&&(n=t.child,s=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(s=n.alternate.memoizedState.cachePool.pool),c=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==s&&(n.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),fc(t,t.updateQueue),Fe(t),null);case 4:return H(),e===null&&zr(t.stateNode.containerInfo),Fe(t),null;case 10:return Jl(t.type),Fe(t),null;case 19:if(B(at),n=t.memoizedState,n===null)return Fe(t),null;if(s=(t.flags&128)!==0,c=n.rendering,c===null)if(s)Zs(n,!1);else{if(lt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Wi(e),c!==null){for(t.flags|=128,Zs(n,!1),e=c.updateQueue,t.updateQueue=e,fc(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)cf(l,e),l=l.sibling;return I(at,at.current&1|2),Ae&&Vl(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&_t()>gc&&(t.flags|=128,s=!0,Zs(n,!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,fc(t,e),Zs(n,!0),n.tail===null&&n.tailMode==="hidden"&&!c.alternate&&!Ae)return Fe(t),null}else 2*_t()-n.renderingStartTime>gc&&l!==536870912&&(t.flags|=128,s=!0,Zs(n,!1),t.lanes=4194304);n.isBackwards?(c.sibling=t.child,t.child=c):(e=n.last,e!==null?e.sibling=c:t.child=c,n.last=c)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=_t(),e.sibling=null,l=at.current,I(at,s?l&1|2:l&1),Ae&&Vl(t,n.treeForkCount),e):(Fe(t),null);case 22:case 23:return Jt(t),Ru(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(l&536870912)!==0&&(t.flags&128)===0&&(Fe(t),t.subtreeFlags&6&&(t.flags|=8192)):Fe(t),l=t.updateQueue,l!==null&&fc(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==l&&(t.flags|=2048),e!==null&&B(sa),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Jl(rt),Fe(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function vg(e,t){switch(gu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jl(rt),H(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ge(t),null;case 31:if(t.memoizedState!==null){if(Jt(t),t.alternate===null)throw Error(r(340));la()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Jt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));la()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(at),null;case 4:return H(),null;case 10:return Jl(t.type),null;case 22:case 23:return Jt(t),Ru(),e!==null&&B(sa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Jl(rt),null;case 25:return null;default:return null}}function Dd(e,t){switch(gu(t),t.tag){case 3:Jl(rt),H();break;case 26:case 27:case 5:Ge(t);break;case 4:H();break;case 31:t.memoizedState!==null&&Jt(t);break;case 13:Jt(t);break;case 19:B(at);break;case 10:Jl(t.type);break;case 22:case 23:Jt(t),Ru(),e!==null&&B(sa);break;case 24:Jl(rt)}}function Vs(e,t){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var s=n.next;l=s;do{if((l.tag&e)===e){n=void 0;var c=l.create,d=l.inst;n=c(),d.destroy=n}l=l.next}while(l!==s)}}catch(m){qe(t,t.return,m)}}function An(e,t,l){try{var n=t.updateQueue,s=n!==null?n.lastEffect:null;if(s!==null){var c=s.next;n=c;do{if((n.tag&e)===e){var d=n.inst,m=d.destroy;if(m!==void 0){d.destroy=void 0,s=t;var b=l,_=m;try{_()}catch(U){qe(s,b,U)}}}n=n.next}while(n!==c)}}catch(U){qe(t,t.return,U)}}function Md(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{kf(t,l)}catch(n){qe(e,e.return,n)}}}function Ud(e,t,l){l.props=oa(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(n){qe(e,t,n)}}function Ks(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof l=="function"?e.refCleanup=l(n):l.current=n}}catch(s){qe(e,t,s)}}function Ul(e,t){var l=e.ref,n=e.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(s){qe(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){qe(e,t,s)}else l.current=null}function Ld(e){var t=e.type,l=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break e;case"img":l.src?n.src=l.src:l.srcSet&&(n.srcset=l.srcSet)}}catch(s){qe(e,e.return,s)}}function rr(e,t,l){try{var n=e.stateNode;qg(n,e.type,l,t),n[it]=t}catch(s){qe(e,e.return,s)}}function Hd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Mn(e.type)||e.tag===4}function or(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Hd(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&&Mn(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 fr(e,t,l){var n=e.tag;if(n===5||n===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=k));else if(n!==4&&(n===27&&Mn(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(fr(e,t,l),e=e.sibling;e!==null;)fr(e,t,l),e=e.sibling}function dc(e,t,l){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(n!==4&&(n===27&&Mn(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(dc(e,t,l),e=e.sibling;e!==null;)dc(e,t,l),e=e.sibling}function Bd(e){var t=e.stateNode,l=e.memoizedProps;try{for(var n=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);At(t,n,l),t[pt]=e,t[it]=l}catch(c){qe(e,e.return,c)}}var en=!1,dt=!1,dr=!1,qd=typeof WeakSet=="function"?WeakSet:Set,bt=null;function yg(e,t){if(e=e.containerInfo,Or=Oc,e=Fo(e),su(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var n=l.getSelection&&l.getSelection();if(n&&n.rangeCount!==0){l=n.anchorNode;var s=n.anchorOffset,c=n.focusNode;n=n.focusOffset;try{l.nodeType,c.nodeType}catch{l=null;break e}var d=0,m=-1,b=-1,_=0,U=0,q=e,R=null;t:for(;;){for(var O;q!==l||s!==0&&q.nodeType!==3||(m=d+s),q!==c||n!==0&&q.nodeType!==3||(b=d+n),q.nodeType===3&&(d+=q.nodeValue.length),(O=q.firstChild)!==null;)R=q,q=O;for(;;){if(q===e)break t;if(R===l&&++_===s&&(m=d),R===c&&++U===n&&(b=d),(O=q.nextSibling)!==null)break;q=R,R=q.parentNode}q=O}l=m===-1||b===-1?null:{start:m,end:b}}else l=null}l=l||{start:0,end:0}}else l=null;for(Dr={focusedElem:e,selectionRange:l},Oc=!1,bt=t;bt!==null;)if(t=bt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,bt=e;else for(;bt!==null;){switch(t=bt,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,n=l.stateNode;try{var se=oa(l.type,s);e=n.getSnapshotBeforeUpdate(se,c),n.__reactInternalSnapshotBeforeUpdate=e}catch(oe){qe(l,l.return,oe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Lr(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Lr(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,bt=e;break}bt=t.return}}function $d(e,t,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:ln(e,l),n&4&&Vs(5,l);break;case 1:if(ln(e,l),n&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(d){qe(l,l.return,d)}else{var s=oa(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){qe(l,l.return,d)}}n&64&&Md(l),n&512&&Ks(l,l.return);break;case 3:if(ln(e,l),n&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{kf(e,t)}catch(d){qe(l,l.return,d)}}break;case 27:t===null&&n&4&&Bd(l);case 26:case 5:ln(e,l),t===null&&n&4&&Ld(l),n&512&&Ks(l,l.return);break;case 12:ln(e,l);break;case 31:ln(e,l),n&4&&Xd(e,l);break;case 13:ln(e,l),n&4&&Qd(e,l),n&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Ag.bind(null,l),Kg(e,l))));break;case 22:if(n=l.memoizedState!==null||en,!n){t=t!==null&&t.memoizedState!==null||dt,s=en;var c=dt;en=n,(dt=t)&&!c?nn(e,l,(l.subtreeFlags&8772)!==0):ln(e,l),en=s,dt=c}break;case 30:break;default:ln(e,l)}}function Gd(e){var t=e.alternate;t!==null&&(e.alternate=null,Gd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Vn(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 Pe=null,Lt=!1;function tn(e,t,l){for(l=l.child;l!==null;)Yd(e,t,l),l=l.sibling}function Yd(e,t,l){if(yt&&typeof yt.onCommitFiberUnmount=="function")try{yt.onCommitFiberUnmount(al,l)}catch{}switch(l.tag){case 26:dt||Ul(l,t),tn(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:dt||Ul(l,t);var n=Pe,s=Lt;Mn(l.type)&&(Pe=l.stateNode,Lt=!1),tn(e,t,l),ni(l.stateNode),Pe=n,Lt=s;break;case 5:dt||Ul(l,t);case 6:if(n=Pe,s=Lt,Pe=null,tn(e,t,l),Pe=n,Lt=s,Pe!==null)if(Lt)try{(Pe.nodeType===9?Pe.body:Pe.nodeName==="HTML"?Pe.ownerDocument.body:Pe).removeChild(l.stateNode)}catch(c){qe(l,t,c)}else try{Pe.removeChild(l.stateNode)}catch(c){qe(l,t,c)}break;case 18:Pe!==null&&(Lt?(e=Pe,Mh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),ss(e)):Mh(Pe,l.stateNode));break;case 4:n=Pe,s=Lt,Pe=l.stateNode.containerInfo,Lt=!0,tn(e,t,l),Pe=n,Lt=s;break;case 0:case 11:case 14:case 15:An(2,l,t),dt||An(4,l,t),tn(e,t,l);break;case 1:dt||(Ul(l,t),n=l.stateNode,typeof n.componentWillUnmount=="function"&&Ud(l,t,n)),tn(e,t,l);break;case 21:tn(e,t,l);break;case 22:dt=(n=dt)||l.memoizedState!==null,tn(e,t,l),dt=n;break;default:tn(e,t,l)}}function Xd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ss(e)}catch(l){qe(t,t.return,l)}}}function Qd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ss(e)}catch(l){qe(t,t.return,l)}}function bg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new qd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new qd),t;default:throw Error(r(435,e.tag))}}function hc(e,t){var l=bg(e);t.forEach(function(n){if(!l.has(n)){l.add(n);var s=_g.bind(null,e,n);n.then(s,s)}})}function Ht(e,t){var l=t.deletions;if(l!==null)for(var n=0;n<l.length;n++){var s=l[n],c=e,d=t,m=d;e:for(;m!==null;){switch(m.tag){case 27:if(Mn(m.type)){Pe=m.stateNode,Lt=!1;break e}break;case 5:Pe=m.stateNode,Lt=!1;break e;case 3:case 4:Pe=m.stateNode.containerInfo,Lt=!0;break e}m=m.return}if(Pe===null)throw Error(r(160));Yd(c,d,s),Pe=null,Lt=!1,c=s.alternate,c!==null&&(c.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Zd(t,e),t=t.sibling}var Sl=null;function Zd(e,t){var l=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ht(t,e),Bt(e),n&4&&(An(3,e,e.return),Vs(3,e),An(5,e,e.return));break;case 1:Ht(t,e),Bt(e),n&512&&(dt||l===null||Ul(l,l.return)),n&64&&en&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?n:l.concat(n))));break;case 26:var s=Sl;if(Ht(t,e),Bt(e),n&512&&(dt||l===null||Ul(l,l.return)),n&4){var c=l!==null?l.memoizedState:null;if(n=e.memoizedState,l===null)if(n===null)if(e.stateNode===null){e:{n=e.type,l=e.memoizedProps,s=s.ownerDocument||s;t:switch(n){case"title":c=s.getElementsByTagName("title")[0],(!c||c[mn]||c[pt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=s.createElement(n),s.head.insertBefore(c,s.querySelector("head > title"))),At(c,n,l),c[pt]=e,ct(c),n=c;break e;case"link":var d=Zh("link","href",s).get(n+(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(n),At(c,n,l),s.head.appendChild(c);break;case"meta":if(d=Zh("meta","content",s).get(n+(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(n),At(c,n,l),s.head.appendChild(c);break;default:throw Error(r(468,n))}c[pt]=e,ct(c),n=c}e.stateNode=n}else Vh(s,e.type,e.stateNode);else e.stateNode=Qh(s,n,e.memoizedProps);else c!==n?(c===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):c.count--,n===null?Vh(s,e.type,e.stateNode):Qh(s,n,e.memoizedProps)):n===null&&e.stateNode!==null&&rr(e,e.memoizedProps,l.memoizedProps)}break;case 27:Ht(t,e),Bt(e),n&512&&(dt||l===null||Ul(l,l.return)),l!==null&&n&4&&rr(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Ht(t,e),Bt(e),n&512&&(dt||l===null||Ul(l,l.return)),e.flags&32){s=e.stateNode;try{Ql(s,"")}catch(se){qe(e,e.return,se)}}n&4&&e.stateNode!=null&&(s=e.memoizedProps,rr(e,s,l!==null?l.memoizedProps:s)),n&1024&&(dr=!0);break;case 6:if(Ht(t,e),Bt(e),n&4){if(e.stateNode===null)throw Error(r(162));n=e.memoizedProps,l=e.stateNode;try{l.nodeValue=n}catch(se){qe(e,e.return,se)}}break;case 3:if(_c=null,s=Sl,Sl=Ec(t.containerInfo),Ht(t,e),Sl=s,Bt(e),n&4&&l!==null&&l.memoizedState.isDehydrated)try{ss(t.containerInfo)}catch(se){qe(e,e.return,se)}dr&&(dr=!1,Vd(e));break;case 4:n=Sl,Sl=Ec(e.stateNode.containerInfo),Ht(t,e),Bt(e),Sl=n;break;case 12:Ht(t,e),Bt(e);break;case 31:Ht(t,e),Bt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,hc(e,n)));break;case 13:Ht(t,e),Bt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(pc=_t()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,hc(e,n)));break;case 22:s=e.memoizedState!==null;var b=l!==null&&l.memoizedState!==null,_=en,U=dt;if(en=_||s,dt=U||b,Ht(t,e),dt=U,en=_,Bt(e),n&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(l===null||b||en||dt||fa(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,R=q!=null&&q.hasOwnProperty("display")?q.display:null;m.style.display=R==null||typeof R=="boolean"?"":(""+R).trim()}}catch(se){qe(b,b.return,se)}}}else if(t.tag===6){if(l===null){b=t;try{b.stateNode.nodeValue=s?"":b.memoizedProps}catch(se){qe(b,b.return,se)}}}else if(t.tag===18){if(l===null){b=t;try{var O=b.stateNode;s?Uh(O,!0):Uh(b.stateNode,!1)}catch(se){qe(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}n&4&&(n=e.updateQueue,n!==null&&(l=n.retryQueue,l!==null&&(n.retryQueue=null,hc(e,l))));break;case 19:Ht(t,e),Bt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,hc(e,n)));break;case 30:break;case 21:break;default:Ht(t,e),Bt(e)}}function Bt(e){var t=e.flags;if(t&2){try{for(var l,n=e.return;n!==null;){if(Hd(n)){l=n;break}n=n.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var s=l.stateNode,c=or(e);dc(e,c,s);break;case 5:var d=l.stateNode;l.flags&32&&(Ql(d,""),l.flags&=-33);var m=or(e);dc(e,m,d);break;case 3:case 4:var b=l.stateNode.containerInfo,_=or(e);fr(e,_,b);break;default:throw Error(r(161))}}catch(U){qe(e,e.return,U)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Vd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Vd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ln(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)$d(e,t.alternate,t),t=t.sibling}function fa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:An(4,t,t.return),fa(t);break;case 1:Ul(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Ud(t,t.return,l),fa(t);break;case 27:ni(t.stateNode);case 26:case 5:Ul(t,t.return),fa(t);break;case 22:t.memoizedState===null&&fa(t);break;case 30:fa(t);break;default:fa(t)}e=e.sibling}}function nn(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,s=e,c=t,d=c.flags;switch(c.tag){case 0:case 11:case 15:nn(s,c,l),Vs(4,c);break;case 1:if(nn(s,c,l),n=c,s=n.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(_){qe(n,n.return,_)}if(n=c,s=n.updateQueue,s!==null){var m=n.stateNode;try{var b=s.shared.hiddenCallbacks;if(b!==null)for(s.shared.hiddenCallbacks=null,s=0;s<b.length;s++)wf(b[s],m)}catch(_){qe(n,n.return,_)}}l&&d&64&&Md(c),Ks(c,c.return);break;case 27:Bd(c);case 26:case 5:nn(s,c,l),l&&n===null&&d&4&&Ld(c),Ks(c,c.return);break;case 12:nn(s,c,l);break;case 31:nn(s,c,l),l&&d&4&&Xd(s,c);break;case 13:nn(s,c,l),l&&d&4&&Qd(s,c);break;case 22:c.memoizedState===null&&nn(s,c,l),Ks(c,c.return);break;case 30:break;default:nn(s,c,l)}t=t.sibling}}function hr(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&&Ds(l))}function mr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ds(e))}function wl(e,t,l,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Kd(e,t,l,n),t=t.sibling}function Kd(e,t,l,n){var s=t.flags;switch(t.tag){case 0:case 11:case 15:wl(e,t,l,n),s&2048&&Vs(9,t);break;case 1:wl(e,t,l,n);break;case 3:wl(e,t,l,n),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ds(e)));break;case 12:if(s&2048){wl(e,t,l,n),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){qe(t,t.return,b)}}else wl(e,t,l,n);break;case 31:wl(e,t,l,n);break;case 13:wl(e,t,l,n);break;case 23:break;case 22:c=t.stateNode,d=t.alternate,t.memoizedState!==null?c._visibility&2?wl(e,t,l,n):Js(e,t):c._visibility&2?wl(e,t,l,n):(c._visibility|=2,Ka(e,t,l,n,(t.subtreeFlags&10256)!==0||!1)),s&2048&&hr(d,t);break;case 24:wl(e,t,l,n),s&2048&&mr(t.alternate,t);break;default:wl(e,t,l,n)}}function Ka(e,t,l,n,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,d=t,m=l,b=n,_=d.flags;switch(d.tag){case 0:case 11:case 15:Ka(c,d,m,b,s),Vs(8,d);break;case 23:break;case 22:var U=d.stateNode;d.memoizedState!==null?U._visibility&2?Ka(c,d,m,b,s):Js(c,d):(U._visibility|=2,Ka(c,d,m,b,s)),s&&_&2048&&hr(d.alternate,d);break;case 24:Ka(c,d,m,b,s),s&&_&2048&&mr(d.alternate,d);break;default:Ka(c,d,m,b,s)}t=t.sibling}}function Js(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,n=t,s=n.flags;switch(n.tag){case 22:Js(l,n),s&2048&&hr(n.alternate,n);break;case 24:Js(l,n),s&2048&&mr(n.alternate,n);break;default:Js(l,n)}t=t.sibling}}var Is=8192;function Ja(e,t,l){if(e.subtreeFlags&Is)for(e=e.child;e!==null;)Jd(e,t,l),e=e.sibling}function Jd(e,t,l){switch(e.tag){case 26:Ja(e,t,l),e.flags&Is&&e.memoizedState!==null&&ix(l,Sl,e.memoizedState,e.memoizedProps);break;case 5:Ja(e,t,l);break;case 3:case 4:var n=Sl;Sl=Ec(e.stateNode.containerInfo),Ja(e,t,l),Sl=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Is,Is=16777216,Ja(e,t,l),Is=n):Ja(e,t,l));break;default:Ja(e,t,l)}}function Id(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 Fs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];bt=n,Wd(n,e)}Id(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fd(e),e=e.sibling}function Fd(e){switch(e.tag){case 0:case 11:case 15:Fs(e),e.flags&2048&&An(9,e,e.return);break;case 3:Fs(e);break;case 12:Fs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,mc(e)):Fs(e);break;default:Fs(e)}}function mc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];bt=n,Wd(n,e)}Id(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:An(8,t,t.return),mc(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,mc(t));break;default:mc(t)}e=e.sibling}}function Wd(e,t){for(;bt!==null;){var l=bt;switch(l.tag){case 0:case 11:case 15:An(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var n=l.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:Ds(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,bt=n;else e:for(l=e;bt!==null;){n=bt;var s=n.sibling,c=n.return;if(Gd(n),n===l){bt=null;break e}if(s!==null){s.return=c,bt=s;break e}bt=c}}}var jg={getCacheForType:function(e){var t=Tt(rt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Tt(rt).controller.signal}},Ng=typeof WeakMap=="function"?WeakMap:Map,Le=0,Ke=null,Ne=null,ke=0,Be=0,It=null,_n=!1,Ia=!1,pr=!1,an=0,lt=0,zn=0,da=0,gr=0,Ft=0,Fa=0,Ws=null,qt=null,xr=!1,pc=0,Pd=0,gc=1/0,xc=null,Rn=null,xt=0,Cn=null,Wa=null,sn=0,vr=0,yr=null,eh=null,Ps=0,br=null;function Wt(){return(Le&2)!==0&&ke!==0?ke&-ke:D.T!==null?Tr():Ta()}function th(){if(Ft===0)if((ke&536870912)===0||Ae){var e=vl;vl<<=1,(vl&3932160)===0&&(vl=262144),Ft=e}else Ft=536870912;return e=Kt.current,e!==null&&(e.flags|=32),Ft}function $t(e,t,l){(e===Ke&&(Be===2||Be===9)||e.cancelPendingCommit!==null)&&(Pa(e,0),On(e,ke,Ft,!1)),Rl(e,l),((Le&2)===0||e!==Ke)&&(e===Ke&&((Le&2)===0&&(da|=l),lt===4&&On(e,ke,Ft,!1)),Ll(e))}function lh(e,t,l){if((Le&6)!==0)throw Error(r(327));var n=!l&&(t&127)===0&&(t&e.expiredLanes)===0||on(e,t),s=n?kg(e,t):Nr(e,t,!0),c=n;do{if(s===0){Ia&&!n&&On(e,t,0,!1);break}else{if(l=e.current.alternate,c&&!Sg(l)){s=Nr(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=Ws;var b=m.current.memoizedState.isDehydrated;if(b&&(Pa(m,d).flags|=256),d=Nr(m,d,!1),d!==2){if(pr&&!b){m.errorRecoveryDisabledLanes|=c,da|=c,s=4;break e}c=qt,qt=s,c!==null&&(qt===null?qt=c:qt.push.apply(qt,c))}s=d}if(c=!1,s!==2)continue}}if(s===1){Pa(e,0),On(e,t,0,!0);break}e:{switch(n=e,c=s,c){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:On(n,t,Ft,!_n);break e;case 2:qt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(s=pc+300-_t(),10<s)){if(On(n,t,Ft,!_n),Zn(n,0,!0)!==0)break e;sn=t,n.timeoutHandle=Oh(nh.bind(null,n,l,qt,xc,xr,t,Ft,da,Fa,_n,c,"Throttled",-0,0),s);break e}nh(n,l,qt,xc,xr,t,Ft,da,Fa,_n,c,null,-0,0)}}break}while(!0);Ll(e)}function nh(e,t,l,n,s,c,d,m,b,_,U,q,R,O){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:k},Jd(t,c,q);var se=(c&62914560)===c?pc-_t():(c&4194048)===c?Pd-_t():0;if(se=cx(q,se),se!==null){sn=c,e.cancelPendingCommit=se(fh.bind(null,e,t,c,l,n,s,d,m,b,U,q,null,R,O)),On(e,c,d,!_);return}}fh(e,t,c,l,n,s,d,m,b)}function Sg(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 n=0;n<l.length;n++){var s=l[n],c=s.getSnapshot;s=s.value;try{if(!Zt(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 On(e,t,l,n){t&=~gr,t&=~da,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var s=t;0<s;){var c=31-zt(s),d=1<<c;n[c]=-1,s&=~d}l!==0&&ql(e,l,t)}function vc(){return(Le&6)===0?(ei(0),!1):!0}function jr(){if(Ne!==null){if(Be===0)var e=Ne.return;else e=Ne,Kl=na=null,Lu(e),Ya=null,Us=0,e=Ne;for(;e!==null;)Dd(e.alternate,e),e=e.return;Ne=null}}function Pa(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Yg(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),sn=0,jr(),Ke=e,Ne=l=Zl(e.current,null),ke=t,Be=0,It=null,_n=!1,Ia=on(e,t),pr=!1,Fa=Ft=gr=da=zn=lt=0,qt=Ws=null,xr=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var s=31-zt(n),c=1<<s;t|=e[s],n&=~c}return an=t,Bi(),l}function ah(e,t){ge=null,D.H=Xs,t===Ga||t===Vi?(t=bf(),Be=3):t===ku?(t=bf(),Be=4):Be=t===Pu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,It=t,Ne===null&&(lt=1,cc(e,rl(t,e.current)))}function sh(){var e=Kt.current;return e===null?!0:(ke&4194048)===ke?hl===null:(ke&62914560)===ke||(ke&536870912)!==0?e===hl:!1}function ih(){var e=D.H;return D.H=Xs,e===null?Xs:e}function ch(){var e=D.A;return D.A=jg,e}function yc(){lt=4,_n||(ke&4194048)!==ke&&Kt.current!==null||(Ia=!0),(zn&134217727)===0&&(da&134217727)===0||Ke===null||On(Ke,ke,Ft,!1)}function Nr(e,t,l){var n=Le;Le|=2;var s=ih(),c=ch();(Ke!==e||ke!==t)&&(xc=null,Pa(e,t)),t=!1;var d=lt;e:do try{if(Be!==0&&Ne!==null){var m=Ne,b=It;switch(Be){case 8:jr(),d=6;break e;case 3:case 2:case 9:case 6:Kt.current===null&&(t=!0);var _=Be;if(Be=0,It=null,es(e,m,b,_),l&&Ia){d=0;break e}break;default:_=Be,Be=0,It=null,es(e,m,b,_)}}wg(),d=lt;break}catch(U){ah(e,U)}while(!0);return t&&e.shellSuspendCounter++,Kl=na=null,Le=n,D.H=s,D.A=c,Ne===null&&(Ke=null,ke=0,Bi()),d}function wg(){for(;Ne!==null;)uh(Ne)}function kg(e,t){var l=Le;Le|=2;var n=ih(),s=ch();Ke!==e||ke!==t?(xc=null,gc=_t()+500,Pa(e,t)):Ia=on(e,t);e:do try{if(Be!==0&&Ne!==null){t=Ne;var c=It;t:switch(Be){case 1:Be=0,It=null,es(e,t,c,1);break;case 2:case 9:if(vf(c)){Be=0,It=null,rh(t);break}t=function(){Be!==2&&Be!==9||Ke!==e||(Be=7),Ll(e)},c.then(t,t);break e;case 3:Be=7;break e;case 4:Be=5;break e;case 7:vf(c)?(Be=0,It=null,rh(t)):(Be=0,It=null,es(e,t,c,7));break;case 5:var d=null;switch(Ne.tag){case 26:d=Ne.memoizedState;case 5:case 27:var m=Ne;if(d?Kh(d):m.stateNode.complete){Be=0,It=null;var b=m.sibling;if(b!==null)Ne=b;else{var _=m.return;_!==null?(Ne=_,bc(_)):Ne=null}break t}}Be=0,It=null,es(e,t,c,5);break;case 6:Be=0,It=null,es(e,t,c,6);break;case 8:jr(),lt=6;break e;default:throw Error(r(462))}}Tg();break}catch(U){ah(e,U)}while(!0);return Kl=na=null,D.H=n,D.A=s,Le=l,Ne!==null?0:(Ke=null,ke=0,Bi(),lt)}function Tg(){for(;Ne!==null&&!ji();)uh(Ne)}function uh(e){var t=Cd(e.alternate,e,an);e.memoizedProps=e.pendingProps,t===null?bc(e):Ne=t}function rh(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Td(l,t,t.pendingProps,t.type,void 0,ke);break;case 11:t=Td(l,t,t.pendingProps,t.type.render,t.ref,ke);break;case 5:Lu(t);default:Dd(l,t),t=Ne=cf(t,an),t=Cd(l,t,an)}e.memoizedProps=e.pendingProps,t===null?bc(e):Ne=t}function es(e,t,l,n){Kl=na=null,Lu(t),Ya=null,Us=0;var s=t.return;try{if(mg(e,s,t,l,ke)){lt=1,cc(e,rl(l,e.current)),Ne=null;return}}catch(c){if(s!==null)throw Ne=s,c;lt=1,cc(e,rl(l,e.current)),Ne=null;return}t.flags&32768?(Ae||n===1?e=!0:Ia||(ke&536870912)!==0?e=!1:(_n=e=!0,(n===2||n===9||n===3||n===6)&&(n=Kt.current,n!==null&&n.tag===13&&(n.flags|=16384))),oh(t,e)):bc(t)}function bc(e){var t=e;do{if((t.flags&32768)!==0){oh(t,_n);return}e=t.return;var l=xg(t.alternate,t,an);if(l!==null){Ne=l;return}if(t=t.sibling,t!==null){Ne=t;return}Ne=t=e}while(t!==null);lt===0&&(lt=5)}function oh(e,t){do{var l=vg(e.alternate,e);if(l!==null){l.flags&=32767,Ne=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){Ne=e;return}Ne=e=l}while(e!==null);lt=6,Ne=null}function fh(e,t,l,n,s,c,d,m,b){e.cancelPendingCommit=null;do jc();while(xt!==0);if((Le&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(c=t.lanes|t.childLanes,c|=ou,sl(e,l,c,d,m,b),e===Ke&&(Ne=Ke=null,ke=0),Wa=t,Cn=e,sn=l,vr=c,yr=s,eh=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,zg(nl,function(){return gh(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=D.T,D.T=null,s=J.p,J.p=2,d=Le,Le|=4;try{yg(e,t,l)}finally{Le=d,J.p=s,D.T=n}}xt=1,dh(),hh(),mh()}}function dh(){if(xt===1){xt=0;var e=Cn,t=Wa,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=D.T,D.T=null;var n=J.p;J.p=2;var s=Le;Le|=4;try{Zd(t,e);var c=Dr,d=Fo(e.containerInfo),m=c.focusedElem,b=c.selectionRange;if(d!==m&&m&&m.ownerDocument&&Io(m.ownerDocument.documentElement,m)){if(b!==null&&su(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,R=q&&q.defaultView||window;if(R.getSelection){var O=R.getSelection(),se=m.textContent.length,oe=Math.min(b.start,se),Ze=b.end===void 0?oe:Math.min(b.end,se);!O.extend&&oe>Ze&&(d=Ze,Ze=oe,oe=d);var T=Jo(m,oe),j=Jo(m,Ze);if(T&&j&&(O.rangeCount!==1||O.anchorNode!==T.node||O.anchorOffset!==T.offset||O.focusNode!==j.node||O.focusOffset!==j.offset)){var A=q.createRange();A.setStart(T.node,T.offset),O.removeAllRanges(),oe>Ze?(O.addRange(A),O.extend(j.node,j.offset)):(A.setEnd(j.node,j.offset),O.addRange(A))}}}}for(q=[],O=m;O=O.parentNode;)O.nodeType===1&&q.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<q.length;m++){var L=q[m];L.element.scrollLeft=L.left,L.element.scrollTop=L.top}}Oc=!!Or,Dr=Or=null}finally{Le=s,J.p=n,D.T=l}}e.current=t,xt=2}}function hh(){if(xt===2){xt=0;var e=Cn,t=Wa,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=D.T,D.T=null;var n=J.p;J.p=2;var s=Le;Le|=4;try{$d(e,t.alternate,t)}finally{Le=s,J.p=n,D.T=l}}xt=3}}function mh(){if(xt===4||xt===3){xt=0,fs();var e=Cn,t=Wa,l=sn,n=eh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?xt=5:(xt=0,Wa=Cn=null,ph(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Rn=null),ka(l),t=t.stateNode,yt&&typeof yt.onCommitFiberRoot=="function")try{yt.onCommitFiberRoot(al,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=D.T,s=J.p,J.p=2,D.T=null;try{for(var c=e.onRecoverableError,d=0;d<n.length;d++){var m=n[d];c(m.value,{componentStack:m.stack})}}finally{D.T=t,J.p=s}}(sn&3)!==0&&jc(),Ll(e),s=e.pendingLanes,(l&261930)!==0&&(s&42)!==0?e===br?Ps++:(Ps=0,br=e):Ps=0,ei(0)}}function ph(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ds(t)))}function jc(){return dh(),hh(),mh(),gh()}function gh(){if(xt!==5)return!1;var e=Cn,t=vr;vr=0;var l=ka(sn),n=D.T,s=J.p;try{J.p=32>l?32:l,D.T=null,l=yr,yr=null;var c=Cn,d=sn;if(xt=0,Wa=Cn=null,sn=0,(Le&6)!==0)throw Error(r(331));var m=Le;if(Le|=4,Fd(c.current),Kd(c,c.current,d,l),Le=m,ei(0,!1),yt&&typeof yt.onPostCommitFiberRoot=="function")try{yt.onPostCommitFiberRoot(al,c)}catch{}return!0}finally{J.p=s,D.T=n,ph(e,t)}}function xh(e,t,l){t=rl(l,t),t=Wu(e.stateNode,t,2),e=kn(e,t,2),e!==null&&(Rl(e,2),Ll(e))}function qe(e,t,l){if(e.tag===3)xh(e,e,l);else for(;t!==null;){if(t.tag===3){xh(t,e,l);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Rn===null||!Rn.has(n))){e=rl(l,e),l=vd(2),n=kn(t,l,2),n!==null&&(yd(l,n,t,e),Rl(n,2),Ll(n));break}}t=t.return}}function Sr(e,t,l){var n=e.pingCache;if(n===null){n=e.pingCache=new Ng;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(l)||(pr=!0,s.add(l),e=Eg.bind(null,e,t,l),t.then(e,e))}function Eg(e,t,l){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Ke===e&&(ke&l)===l&&(lt===4||lt===3&&(ke&62914560)===ke&&300>_t()-pc?(Le&2)===0&&Pa(e,0):gr|=l,Fa===ke&&(Fa=0)),Ll(e)}function vh(e,t){t===0&&(t=ps()),e=ea(e,t),e!==null&&(Rl(e,t),Ll(e))}function Ag(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),vh(e,l)}function _g(e,t){var l=0;switch(e.tag){case 31:case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(l=s.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(r(314))}n!==null&&n.delete(t),vh(e,l)}function zg(e,t){return ja(e,t)}var Nc=null,ts=null,wr=!1,Sc=!1,kr=!1,Dn=0;function Ll(e){e!==ts&&e.next===null&&(ts===null?Nc=ts=e:ts=ts.next=e),Sc=!0,wr||(wr=!0,Cg())}function ei(e,t){if(!kr&&Sc){kr=!0;do for(var l=!1,n=Nc;n!==null;){if(e!==0){var s=n.pendingLanes;if(s===0)var c=0;else{var d=n.suspendedLanes,m=n.pingedLanes;c=(1<<31-zt(42|e)+1)-1,c&=s&~(d&~m),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(l=!0,Nh(n,c))}else c=ke,c=Zn(n,n===Ke?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(c&3)===0||on(n,c)||(l=!0,Nh(n,c));n=n.next}while(l);kr=!1}}function Rg(){yh()}function yh(){Sc=wr=!1;var e=0;Dn!==0&&Gg()&&(e=Dn);for(var t=_t(),l=null,n=Nc;n!==null;){var s=n.next,c=bh(n,t);c===0?(n.next=null,l===null?Nc=s:l.next=s,s===null&&(ts=l)):(l=n,(e!==0||(c&3)!==0)&&(Sc=!0)),n=s}xt!==0&&xt!==5||ei(e),Dn!==0&&(Dn=0)}function bh(e,t){for(var l=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var d=31-zt(c),m=1<<d,b=s[d];b===-1?((m&l)===0||(m&n)!==0)&&(s[d]=ki(m,t)):b<=t&&(e.expiredLanes|=m),c&=~m}if(t=Ke,l=ke,l=Zn(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,l===0||e===t&&(Be===2||Be===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&ll(n),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||on(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(n!==null&&ll(n),ka(l)){case 2:case 8:l=_l;break;case 32:l=nl;break;case 268435456:l=Qn;break;default:l=nl}return n=jh.bind(null,e),l=ja(l,n),e.callbackPriority=t,e.callbackNode=l,t}return n!==null&&n!==null&&ll(n),e.callbackPriority=2,e.callbackNode=null,2}function jh(e,t){if(xt!==0&&xt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(jc()&&e.callbackNode!==l)return null;var n=ke;return n=Zn(e,e===Ke?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(lh(e,n,t),bh(e,_t()),e.callbackNode!=null&&e.callbackNode===l?jh.bind(null,e):null)}function Nh(e,t){if(jc())return null;lh(e,t,!0)}function Cg(){Xg(function(){(Le&6)!==0?ja(xl,Rg):yh()})}function Tr(){if(Dn===0){var e=qa;e===0&&(e=rn,rn<<=1,(rn&261888)===0&&(rn=256)),Dn=e}return Dn}function Sh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:g(""+e)}function wh(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 Og(e,t,l,n,s){if(t==="submit"&&l&&l.stateNode===s){var c=Sh((s[it]||null).action),d=n.submitter;d&&(t=(t=d[it]||null)?Sh(t.formAction):d.getAttribute("formAction"),t!==null&&(c=t,d=null));var m=new Mi("action","action",null,n,s);e.push({event:m,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Dn!==0){var b=d?wh(s,d):new FormData(s);Zu(l,{pending:!0,data:b,method:s.method,action:c},null,b)}}else typeof c=="function"&&(m.preventDefault(),b=d?wh(s,d):new FormData(s),Zu(l,{pending:!0,data:b,method:s.method,action:c},c,b))},currentTarget:s}]})}}for(var Er=0;Er<ru.length;Er++){var Ar=ru[Er],Dg=Ar.toLowerCase(),Mg=Ar[0].toUpperCase()+Ar.slice(1);Nl(Dg,"on"+Mg)}Nl(ef,"onAnimationEnd"),Nl(tf,"onAnimationIteration"),Nl(lf,"onAnimationStart"),Nl("dblclick","onDoubleClick"),Nl("focusin","onFocus"),Nl("focusout","onBlur"),Nl(Fp,"onTransitionRun"),Nl(Wp,"onTransitionStart"),Nl(Pp,"onTransitionCancel"),Nl(nf,"onTransitionEnd"),jl("onMouseEnter",["mouseout","mouseover"]),jl("onMouseLeave",["mouseout","mouseover"]),jl("onPointerEnter",["pointerout","pointerover"]),jl("onPointerLeave",["pointerout","pointerover"]),Cl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Cl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Cl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Cl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Cl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Cl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ti="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(" "),Ug=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ti));function kh(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var n=e[l],s=n.event;n=n.listeners;e:{var c=void 0;if(t)for(var d=n.length-1;0<=d;d--){var m=n[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){Hi(U)}s.currentTarget=null,c=b}else for(d=0;d<n.length;d++){if(m=n[d],b=m.instance,_=m.currentTarget,m=m.listener,b!==c&&s.isPropagationStopped())break e;c=m,s.currentTarget=_;try{c(s)}catch(U){Hi(U)}s.currentTarget=null,c=b}}}}function Se(e,t){var l=t[vs];l===void 0&&(l=t[vs]=new Set);var n=e+"__bubble";l.has(n)||(Th(t,e,2,!1),l.add(n))}function _r(e,t,l){var n=0;t&&(n|=4),Th(l,e,n,t)}var wc="_reactListening"+Math.random().toString(36).slice(2);function zr(e){if(!e[wc]){e[wc]=!0,Ei.forEach(function(l){l!=="selectionchange"&&(Ug.has(l)||_r(l,!1,e),_r(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wc]||(t[wc]=!0,_r("selectionchange",!1,t))}}function Th(e,t,l,n){switch(tm(t)){case 2:var s=ox;break;case 8:s=fx;break;default:s=Qr}l=s.bind(null,t,l,e),s=void 0,!gt||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?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,n,s){var c=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var d=n.tag;if(d===3||d===4){var m=n.stateNode.containerInfo;if(m===s)break;if(d===4)for(d=n.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=$l(m),d===null)return;if(b=d.tag,b===5||b===6||b===26||b===27){n=c=d;continue e}m=m.parentNode}}n=n.return}wt(function(){var _=c,U=ee(l),q=[];e:{var R=af.get(e);if(R!==void 0){var O=Mi,se=e;switch(e){case"keypress":if(Oi(l)===0)break e;case"keydown":case"keyup":O=_p;break;case"focusin":se="focus",O=eu;break;case"focusout":se="blur",O=eu;break;case"beforeblur":case"afterblur":O=eu;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":O=Oo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=xp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=Cp;break;case ef:case tf:case lf:O=bp;break;case nf:O=Dp;break;case"scroll":case"scrollend":O=pp;break;case"wheel":O=Up;break;case"copy":case"cut":case"paste":O=Np;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=Mo;break;case"toggle":case"beforetoggle":O=Hp}var oe=(t&4)!==0,Ze=!oe&&(e==="scroll"||e==="scrollend"),T=oe?R!==null?R+"Capture":null:R;oe=[];for(var j=_,A;j!==null;){var L=j;if(A=L.stateNode,L=L.tag,L!==5&&L!==26&&L!==27||A===null||T===null||(L=ut(j,T),L!=null&&oe.push(li(j,L,A))),Ze)break;j=j.return}0<oe.length&&(R=new O(R,se,null,l,U),q.push({event:R,listeners:oe}))}}if((t&7)===0){e:{if(R=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",R&&l!==$&&(se=l.relatedTarget||l.fromElement)&&($l(se)||se[dn]))break e;if((O||R)&&(R=U.window===U?U:(R=U.ownerDocument)?R.defaultView||R.parentWindow:window,O?(se=l.relatedTarget||l.toElement,O=_,se=se?$l(se):null,se!==null&&(Ze=h(se),oe=se.tag,se!==Ze||oe!==5&&oe!==27&&oe!==6)&&(se=null)):(O=null,se=_),O!==se)){if(oe=Oo,L="onMouseLeave",T="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(oe=Mo,L="onPointerLeave",T="onPointerEnter",j="pointer"),Ze=O==null?R:Kn(O),A=se==null?R:Kn(se),R=new oe(L,j+"leave",O,l,U),R.target=Ze,R.relatedTarget=A,L=null,$l(U)===_&&(oe=new oe(T,j+"enter",se,l,U),oe.target=A,oe.relatedTarget=Ze,L=oe),Ze=L,O&&se)t:{for(oe=Lg,T=O,j=se,A=0,L=T;L;L=oe(L))A++;L=0;for(var ue=j;ue;ue=oe(ue))L++;for(;0<A-L;)T=oe(T),A--;for(;0<L-A;)j=oe(j),L--;for(;A--;){if(T===j||j!==null&&T===j.alternate){oe=T;break t}T=oe(T),j=oe(j)}oe=null}else oe=null;O!==null&&Eh(q,R,O,oe,!1),se!==null&&Ze!==null&&Eh(q,Ze,se,oe,!0)}}e:{if(R=_?Kn(_):window,O=R.nodeName&&R.nodeName.toLowerCase(),O==="select"||O==="input"&&R.type==="file")var De=Yo;else if($o(R))if(Xo)De=Kp;else{De=Zp;var ie=Qp}else O=R.nodeName,!O||O.toLowerCase()!=="input"||R.type!=="checkbox"&&R.type!=="radio"?_&&xn(_.elementType)&&(De=Yo):De=Vp;if(De&&(De=De(e,_))){Go(q,De,l,U);break e}ie&&ie(e,R,_),e==="focusout"&&_&&R.type==="number"&&_.memoizedProps.value!=null&&za(R,"number",R.value)}switch(ie=_?Kn(_):window,e){case"focusin":($o(ie)||ie.contentEditable==="true")&&(Ca=ie,iu=_,Rs=null);break;case"focusout":Rs=iu=Ca=null;break;case"mousedown":cu=!0;break;case"contextmenu":case"mouseup":case"dragend":cu=!1,Wo(q,l,U);break;case"selectionchange":if(Ip)break;case"keydown":case"keyup":Wo(q,l,U)}var xe;if(lu)e:{switch(e){case"compositionstart":var Te="onCompositionStart";break e;case"compositionend":Te="onCompositionEnd";break e;case"compositionupdate":Te="onCompositionUpdate";break e}Te=void 0}else Ra?Bo(e,l)&&(Te="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Te="onCompositionStart");Te&&(Uo&&l.locale!=="ko"&&(Ra||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&Ra&&(xe=Ro()):(vn=U,Fc="value"in vn?vn.value:vn.textContent,Ra=!0)),ie=kc(_,Te),0<ie.length&&(Te=new Do(Te,e,null,l,U),q.push({event:Te,listeners:ie}),xe?Te.data=xe:(xe=qo(l),xe!==null&&(Te.data=xe)))),(xe=qp?$p(e,l):Gp(e,l))&&(Te=kc(_,"onBeforeInput"),0<Te.length&&(ie=new Do("onBeforeInput","beforeinput",null,l,U),q.push({event:ie,listeners:Te}),ie.data=xe)),Og(q,e,_,l,U)}kh(q,t)})}function li(e,t,l){return{instance:e,listener:t,currentTarget:l}}function kc(e,t){for(var l=t+"Capture",n=[];e!==null;){var s=e,c=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||c===null||(s=ut(e,l),s!=null&&n.unshift(li(e,s,c)),s=ut(e,t),s!=null&&n.push(li(e,s,c))),e.tag===3)return n;e=e.return}return[]}function Lg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Eh(e,t,l,n,s){for(var c=t._reactName,d=[];l!==null&&l!==n;){var m=l,b=m.alternate,_=m.stateNode;if(m=m.tag,b!==null&&b===n)break;m!==5&&m!==26&&m!==27||_===null||(b=_,s?(_=ut(l,c),_!=null&&d.unshift(li(l,_,b))):s||(_=ut(l,c),_!=null&&d.push(li(l,_,b)))),l=l.return}d.length!==0&&e.push({event:t,listeners:d})}var Hg=/\r\n?/g,Bg=/\u0000|\uFFFD/g;function Ah(e){return(typeof e=="string"?e:""+e).replace(Hg,`
|
|
9
|
-
`).replace(Bg,"")}function _h(e,t){return t=Ah(t),Ah(e)===t}function Qe(e,t,l,n,s,c){switch(l){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||Ql(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&Ql(e,""+n);break;case"className":In(e,"class",n);break;case"tabIndex":In(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":In(e,l,n);break;case"style":Ns(e,n,c);break;case"data":if(t!=="object"){In(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=g(""+n),e.setAttribute(l,n);break;case"action":case"formAction":if(typeof n=="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"&&Qe(e,t,"name",s.name,s,null),Qe(e,t,"formEncType",s.formEncType,s,null),Qe(e,t,"formMethod",s.formMethod,s,null),Qe(e,t,"formTarget",s.formTarget,s,null)):(Qe(e,t,"encType",s.encType,s,null),Qe(e,t,"method",s.method,s,null),Qe(e,t,"target",s.target,s,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=g(""+n),e.setAttribute(l,n);break;case"onClick":n!=null&&(e.onclick=k);break;case"onScroll":n!=null&&Se("scroll",e);break;case"onScrollEnd":n!=null&&Se("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(r(61));if(l=n.__html,l!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}l=g(""+n),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":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,""+n):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":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":n===!0?e.setAttribute(l,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,n):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(l,n):e.removeAttribute(l);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(l):e.setAttribute(l,n);break;case"popover":Se("beforetoggle",e),Se("toggle",e),Ea(e,"popover",n);break;case"xlinkActuate":cl(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":cl(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":cl(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":cl(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":cl(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":cl(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":cl(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":cl(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":cl(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Ea(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Ss.get(l)||l,Ea(e,l,n))}}function Cr(e,t,l,n,s,c){switch(l){case"style":Ns(e,n,c);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(r(61));if(l=n.__html,l!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"children":typeof n=="string"?Ql(e,n):(typeof n=="number"||typeof n=="bigint")&&Ql(e,""+n);break;case"onScroll":n!=null&&Se("scroll",e);break;case"onScrollEnd":n!=null&&Se("scrollend",e);break;case"onClick":n!=null&&(e.onclick=k);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!bl.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[it]||null,c=c!=null?c[l]:null,typeof c=="function"&&e.removeEventListener(t,c,s),typeof n=="function")){typeof c!="function"&&c!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,n,s);break e}l in e?e[l]=n:n===!0?e.setAttribute(l,""):Ea(e,l,n)}}}function At(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Se("error",e),Se("load",e);var n=!1,s=!1,c;for(c in l)if(l.hasOwnProperty(c)){var d=l[c];if(d!=null)switch(c){case"src":n=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Qe(e,t,c,d,l,null)}}s&&Qe(e,t,"srcSet",l.srcSet,l,null),n&&Qe(e,t,"src",l.src,l,null);return;case"input":Se("invalid",e);var m=c=d=s=null,b=null,_=null;for(n in l)if(l.hasOwnProperty(n)){var U=l[n];if(U!=null)switch(n){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:Qe(e,t,n,U,l,null)}}bs(e,c,m,b,_,d,s,!1);return;case"select":Se("invalid",e),n=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":n=m;default:Qe(e,t,s,m,l,null)}t=c,l=d,e.multiple=!!n,t!=null?Xl(e,!!n,t,!1):l!=null&&Xl(e,!!n,l,!0);return;case"textarea":Se("invalid",e),c=s=n=null;for(d in l)if(l.hasOwnProperty(d)&&(m=l[d],m!=null))switch(d){case"value":n=m;break;case"defaultValue":s=m;break;case"children":c=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(r(91));break;default:Qe(e,t,d,m,l,null)}zi(e,n,s,c);return;case"option":for(b in l)l.hasOwnProperty(b)&&(n=l[b],n!=null)&&(b==="selected"?e.selected=n&&typeof n!="function"&&typeof n!="symbol":Qe(e,t,b,n,l,null));return;case"dialog":Se("beforetoggle",e),Se("toggle",e),Se("cancel",e),Se("close",e);break;case"iframe":case"object":Se("load",e);break;case"video":case"audio":for(n=0;n<ti.length;n++)Se(ti[n],e);break;case"image":Se("error",e),Se("load",e);break;case"details":Se("toggle",e);break;case"embed":case"source":case"link":Se("error",e),Se("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(_)&&(n=l[_],n!=null))switch(_){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Qe(e,t,_,n,l,null)}return;default:if(xn(t)){for(U in l)l.hasOwnProperty(U)&&(n=l[U],n!==void 0&&Cr(e,t,U,n,l,void 0));return}}for(m in l)l.hasOwnProperty(m)&&(n=l[m],n!=null&&Qe(e,t,m,n,l,null))}function qg(e,t,l,n){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(O in l){var q=l[O];if(l.hasOwnProperty(O)&&q!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":b=q;default:n.hasOwnProperty(O)||Qe(e,t,O,null,n,q)}}for(var R in n){var O=n[R];if(q=l[R],n.hasOwnProperty(R)&&(O!=null||q!=null))switch(R){case"type":c=O;break;case"name":s=O;break;case"checked":_=O;break;case"defaultChecked":U=O;break;case"value":d=O;break;case"defaultValue":m=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,t));break;default:O!==q&&Qe(e,t,R,O,n,q)}}ys(e,d,m,b,_,U,c,s);return;case"select":O=d=m=R=null;for(c in l)if(b=l[c],l.hasOwnProperty(c)&&b!=null)switch(c){case"value":break;case"multiple":O=b;default:n.hasOwnProperty(c)||Qe(e,t,c,null,n,b)}for(s in n)if(c=n[s],b=l[s],n.hasOwnProperty(s)&&(c!=null||b!=null))switch(s){case"value":R=c;break;case"defaultValue":m=c;break;case"multiple":d=c;default:c!==b&&Qe(e,t,s,c,n,b)}t=m,l=d,n=O,R!=null?Xl(e,!!l,R,!1):!!n!=!!l&&(t!=null?Xl(e,!!l,t,!0):Xl(e,!!l,l?[]:"",!1));return;case"textarea":O=R=null;for(m in l)if(s=l[m],l.hasOwnProperty(m)&&s!=null&&!n.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:Qe(e,t,m,null,n,s)}for(d in n)if(s=n[d],c=l[d],n.hasOwnProperty(d)&&(s!=null||c!=null))switch(d){case"value":R=s;break;case"defaultValue":O=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(r(91));break;default:s!==c&&Qe(e,t,d,s,n,c)}js(e,R,O);return;case"option":for(var se in l)R=l[se],l.hasOwnProperty(se)&&R!=null&&!n.hasOwnProperty(se)&&(se==="selected"?e.selected=!1:Qe(e,t,se,null,n,R));for(b in n)R=n[b],O=l[b],n.hasOwnProperty(b)&&R!==O&&(R!=null||O!=null)&&(b==="selected"?e.selected=R&&typeof R!="function"&&typeof R!="symbol":Qe(e,t,b,R,n,O));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 oe in l)R=l[oe],l.hasOwnProperty(oe)&&R!=null&&!n.hasOwnProperty(oe)&&Qe(e,t,oe,null,n,R);for(_ in n)if(R=n[_],O=l[_],n.hasOwnProperty(_)&&R!==O&&(R!=null||O!=null))switch(_){case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(137,t));break;default:Qe(e,t,_,R,n,O)}return;default:if(xn(t)){for(var Ze in l)R=l[Ze],l.hasOwnProperty(Ze)&&R!==void 0&&!n.hasOwnProperty(Ze)&&Cr(e,t,Ze,void 0,n,R);for(U in n)R=n[U],O=l[U],!n.hasOwnProperty(U)||R===O||R===void 0&&O===void 0||Cr(e,t,U,R,n,O);return}}for(var T in l)R=l[T],l.hasOwnProperty(T)&&R!=null&&!n.hasOwnProperty(T)&&Qe(e,t,T,null,n,R);for(q in n)R=n[q],O=l[q],!n.hasOwnProperty(q)||R===O||R==null&&O==null||Qe(e,t,q,R,n,O)}function zh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function $g(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),n=0;n<l.length;n++){var s=l[n],c=s.transferSize,d=s.initiatorType,m=s.duration;if(c&&m&&zh(d)){for(d=0,m=s.responseEnd,n+=1;n<l.length;n++){var b=l[n],_=b.startTime;if(_>m)break;var U=b.transferSize,q=b.initiatorType;U&&zh(q)&&(b=b.responseEnd,d+=U*(b<m?1:(m-_)/(b-_)))}if(--n,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 Or=null,Dr=null;function Tc(e){return e.nodeType===9?e:e.ownerDocument}function Rh(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 Ch(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 Mr(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 Ur=null;function Gg(){var e=window.event;return e&&e.type==="popstate"?e===Ur?!1:(Ur=e,!0):(Ur=null,!1)}var Oh=typeof setTimeout=="function"?setTimeout:void 0,Yg=typeof clearTimeout=="function"?clearTimeout:void 0,Dh=typeof Promise=="function"?Promise:void 0,Xg=typeof queueMicrotask=="function"?queueMicrotask:typeof Dh<"u"?function(e){return Dh.resolve(null).then(e).catch(Qg)}:Oh;function Qg(e){setTimeout(function(){throw e})}function Mn(e){return e==="head"}function Mh(e,t){var l=t,n=0;do{var s=l.nextSibling;if(e.removeChild(l),s&&s.nodeType===8)if(l=s.data,l==="/$"||l==="/&"){if(n===0){e.removeChild(s),ss(t);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")ni(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,ni(l);for(var c=l.firstChild;c;){var d=c.nextSibling,m=c.nodeName;c[mn]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&c.rel.toLowerCase()==="stylesheet"||l.removeChild(c),c=d}}else l==="body"&&ni(e.ownerDocument.body);l=s}while(l);ss(t)}function Uh(e,t){var l=e;e=0;do{var n=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||""),n&&n.nodeType===8)if(l=n.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=n}while(l)}function Lr(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":Lr(l),Vn(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Zg(e,t,l,n){for(;e.nodeType===1;){var s=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[mn])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=ml(e.nextSibling),e===null)break}return null}function Vg(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=ml(e.nextSibling),e===null))return null;return e}function Lh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ml(e.nextSibling),e===null))return null;return e}function Hr(e){return e.data==="$?"||e.data==="$~"}function Br(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Kg(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var n=function(){t(),l.removeEventListener("DOMContentLoaded",n)};l.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function ml(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 qr=null;function Hh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return ml(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Bh(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 qh(e,t,l){switch(t=Tc(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 ni(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Vn(e)}var pl=new Map,$h=new Set;function Ec(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var cn=J.d;J.d={f:Jg,r:Ig,D:Fg,C:Wg,L:Pg,m:ex,X:lx,S:tx,M:nx};function Jg(){var e=cn.f(),t=vc();return e||t}function Ig(e){var t=Gl(e);t!==null&&t.tag===5&&t.type==="form"?ad(t):cn.r(e)}var ls=typeof document>"u"?null:document;function Gh(e,t,l){var n=ls;if(n&&typeof t=="string"&&t){var s=St(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof l=="string"&&(s+='[crossorigin="'+l+'"]'),$h.has(s)||($h.add(s),e={rel:e,crossOrigin:l,href:t},n.querySelector(s)===null&&(t=n.createElement("link"),At(t,"link",e),ct(t),n.head.appendChild(t)))}}function Fg(e){cn.D(e),Gh("dns-prefetch",e,null)}function Wg(e,t){cn.C(e,t),Gh("preconnect",e,t)}function Pg(e,t,l){cn.L(e,t,l);var n=ls;if(n&&e&&t){var s='link[rel="preload"][as="'+St(t)+'"]';t==="image"&&l&&l.imageSrcSet?(s+='[imagesrcset="'+St(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(s+='[imagesizes="'+St(l.imageSizes)+'"]')):s+='[href="'+St(e)+'"]';var c=s;switch(t){case"style":c=ns(e);break;case"script":c=as(e)}pl.has(c)||(e=E({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),pl.set(c,e),n.querySelector(s)!==null||t==="style"&&n.querySelector(ai(c))||t==="script"&&n.querySelector(si(c))||(t=n.createElement("link"),At(t,"link",e),ct(t),n.head.appendChild(t)))}}function ex(e,t){cn.m(e,t);var l=ls;if(l&&e){var n=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+St(n)+'"][href="'+St(e)+'"]',c=s;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=as(e)}if(!pl.has(c)&&(e=E({rel:"modulepreload",href:e},t),pl.set(c,e),l.querySelector(s)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(si(c)))return}n=l.createElement("link"),At(n,"link",e),ct(n),l.head.appendChild(n)}}}function tx(e,t,l){cn.S(e,t,l);var n=ls;if(n&&e){var s=pn(n).hoistableStyles,c=ns(e);t=t||"default";var d=s.get(c);if(!d){var m={loading:0,preload:null};if(d=n.querySelector(ai(c)))m.loading=5;else{e=E({rel:"stylesheet",href:e,"data-precedence":t},l),(l=pl.get(c))&&$r(e,l);var b=d=n.createElement("link");ct(b),At(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,Ac(d,t,n)}d={type:"stylesheet",instance:d,count:1,state:m},s.set(c,d)}}}function lx(e,t){cn.X(e,t);var l=ls;if(l&&e){var n=pn(l).hoistableScripts,s=as(e),c=n.get(s);c||(c=l.querySelector(si(s)),c||(e=E({src:e,async:!0},t),(t=pl.get(s))&&Gr(e,t),c=l.createElement("script"),ct(c),At(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(s,c))}}function nx(e,t){cn.M(e,t);var l=ls;if(l&&e){var n=pn(l).hoistableScripts,s=as(e),c=n.get(s);c||(c=l.querySelector(si(s)),c||(e=E({src:e,async:!0,type:"module"},t),(t=pl.get(s))&&Gr(e,t),c=l.createElement("script"),ct(c),At(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(s,c))}}function Yh(e,t,l,n){var s=(s=pe.current)?Ec(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=ns(l.href),l=pn(s).hoistableStyles,n=l.get(t),n||(n={type:"style",instance:null,count:0,state:null},l.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=ns(l.href);var c=pn(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(ai(e)))&&!c._p&&(d.instance=c,d.state.loading=5),pl.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},pl.set(e,l),c||ax(s,e,l,d.state))),t&&n===null)throw Error(r(528,""));return d}if(t&&n!==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=as(l),l=pn(s).hoistableScripts,n=l.get(t),n||(n={type:"script",instance:null,count:0,state:null},l.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function ns(e){return'href="'+St(e)+'"'}function ai(e){return'link[rel="stylesheet"]['+e+"]"}function Xh(e){return E({},e,{"data-precedence":e.precedence,precedence:null})}function ax(e,t,l,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),At(t,"link",l),ct(t),e.head.appendChild(t))}function as(e){return'[src="'+St(e)+'"]'}function si(e){return"script[async]"+e}function Qh(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+St(l.href)+'"]');if(n)return t.instance=n,ct(n),n;var s=E({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),ct(n),At(n,"style",s),Ac(n,l.precedence,e),t.instance=n;case"stylesheet":s=ns(l.href);var c=e.querySelector(ai(s));if(c)return t.state.loading|=4,t.instance=c,ct(c),c;n=Xh(l),(s=pl.get(s))&&$r(n,s),c=(e.ownerDocument||e).createElement("link"),ct(c);var d=c;return d._p=new Promise(function(m,b){d.onload=m,d.onerror=b}),At(c,"link",n),t.state.loading|=4,Ac(c,l.precedence,e),t.instance=c;case"script":return c=as(l.src),(s=e.querySelector(si(c)))?(t.instance=s,ct(s),s):(n=l,(s=pl.get(c))&&(n=E({},l),Gr(n,s)),e=e.ownerDocument||e,s=e.createElement("script"),ct(s),At(s,"link",n),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&&(n=t.instance,t.state.loading|=4,Ac(n,l.precedence,e));return t.instance}function Ac(e,t,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=n.length?n[n.length-1]:null,c=s,d=0;d<n.length;d++){var m=n[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 $r(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 _c=null;function Zh(e,t,l){if(_c===null){var n=new Map,s=_c=new Map;s.set(l,n)}else s=_c,n=s.get(l),n||(n=new Map,s.set(l,n));if(n.has(e))return n;for(n.set(e,null),l=l.getElementsByTagName(e),s=0;s<l.length;s++){var c=l[s];if(!(c[mn]||c[pt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var d=c.getAttribute(t)||"";d=e+d;var m=n.get(d);m?m.push(c):n.set(d,[c])}}return n}function Vh(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function sx(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 Kh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function ix(e,t,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var s=ns(n.href),c=t.querySelector(ai(s));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=zc.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=c,ct(c);return}c=t.ownerDocument||t,n=Xh(n),(s=pl.get(s))&&$r(n,s),c=c.createElement("link"),ct(c);var d=c;d._p=new Promise(function(m,b){d.onload=m,d.onerror=b}),At(c,"link",n),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=zc.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Yr=0;function cx(e,t){return e.stylesheets&&e.count===0&&Cc(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var n=setTimeout(function(){if(e.stylesheets&&Cc(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&Yr===0&&(Yr=62500*$g());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Cc(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(n),clearTimeout(s)}}:null}function zc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Cc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Rc=null;function Cc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Rc=new Map,t.forEach(ux,e),Rc=null,zc.call(e))}function ux(e,t){if(!(t.state.loading&4)){var l=Rc.get(e);if(l)var n=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),n=d)}n&&l.set(null,n)}s=t.instance,d=s.getAttribute("data-precedence"),c=l.get(d)||n,c===n&&l.set(null,s),l.set(d,s),this.count++,n=zc.bind(this),s.addEventListener("load",n),s.addEventListener("error",n),c?c.parentNode.insertBefore(s,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var ii={$$typeof:de,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function rx(e,t,l,n,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=fn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fn(0),this.hiddenUpdates=fn(null),this.identifierPrefix=n,this.onUncaughtError=s,this.onCaughtError=c,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function Jh(e,t,l,n,s,c,d,m,b,_,U,q){return e=new rx(e,t,l,d,b,_,U,q,m),t=1,c===!0&&(t|=24),c=Vt(3,null,null,t),e.current=c,c.stateNode=e,t=Nu(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:n,isDehydrated:l,cache:t},Tu(c),e}function Ih(e){return e?(e=Ma,e):Ma}function Fh(e,t,l,n,s,c){s=Ih(s),n.context===null?n.context=s:n.pendingContext=s,n=wn(t),n.payload={element:l},c=c===void 0?null:c,c!==null&&(n.callback=c),l=kn(e,n,t),l!==null&&($t(l,e,t),Hs(l,e,t))}function Wh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Xr(e,t){Wh(e,t),(e=e.alternate)&&Wh(e,t)}function Ph(e){if(e.tag===13||e.tag===31){var t=ea(e,67108864);t!==null&&$t(t,e,67108864),Xr(e,67108864)}}function em(e){if(e.tag===13||e.tag===31){var t=Wt();t=gs(t);var l=ea(e,t);l!==null&&$t(l,e,t),Xr(e,t)}}var Oc=!0;function ox(e,t,l,n){var s=D.T;D.T=null;var c=J.p;try{J.p=2,Qr(e,t,l,n)}finally{J.p=c,D.T=s}}function fx(e,t,l,n){var s=D.T;D.T=null;var c=J.p;try{J.p=8,Qr(e,t,l,n)}finally{J.p=c,D.T=s}}function Qr(e,t,l,n){if(Oc){var s=Zr(n);if(s===null)Rr(e,t,n,Dc,l),lm(e,n);else if(hx(s,e,t,l,n))n.stopPropagation();else if(lm(e,n),t&4&&-1<dx.indexOf(e)){for(;s!==null;){var c=Gl(s);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var d=zl(c.pendingLanes);if(d!==0){var m=c;for(m.pendingLanes|=2,m.entangledLanes|=2;d;){var b=1<<31-zt(d);m.entanglements[1]|=b,d&=~b}Ll(c),(Le&6)===0&&(gc=_t()+500,ei(0))}}break;case 31:case 13:m=ea(c,2),m!==null&&$t(m,c,2),vc(),Xr(c,2)}if(c=Zr(n),c===null&&Rr(e,t,n,Dc,l),c===s)break;s=c}s!==null&&n.stopPropagation()}else Rr(e,t,n,null,l)}}function Zr(e){return e=ee(e),Vr(e)}var Dc=null;function Vr(e){if(Dc=null,e=$l(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=x(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 Dc=e,null}function tm(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(Ni()){case xl:return 2;case _l:return 8;case nl:case ds:return 32;case Qn:return 268435456;default:return 32}default:return 32}}var Kr=!1,Un=null,Ln=null,Hn=null,ci=new Map,ui=new Map,Bn=[],dx="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 lm(e,t){switch(e){case"focusin":case"focusout":Un=null;break;case"dragenter":case"dragleave":Ln=null;break;case"mouseover":case"mouseout":Hn=null;break;case"pointerover":case"pointerout":ci.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ui.delete(t.pointerId)}}function ri(e,t,l,n,s,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:l,eventSystemFlags:n,nativeEvent:c,targetContainers:[s]},t!==null&&(t=Gl(t),t!==null&&Ph(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function hx(e,t,l,n,s){switch(t){case"focusin":return Un=ri(Un,e,t,l,n,s),!0;case"dragenter":return Ln=ri(Ln,e,t,l,n,s),!0;case"mouseover":return Hn=ri(Hn,e,t,l,n,s),!0;case"pointerover":var c=s.pointerId;return ci.set(c,ri(ci.get(c)||null,e,t,l,n,s)),!0;case"gotpointercapture":return c=s.pointerId,ui.set(c,ri(ui.get(c)||null,e,t,l,n,s)),!0}return!1}function nm(e){var t=$l(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,xs(e.priority,function(){em(l)});return}}else if(t===31){if(t=x(l),t!==null){e.blockedOn=t,xs(e.priority,function(){em(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 Mc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Zr(e.nativeEvent);if(l===null){l=e.nativeEvent;var n=new l.constructor(l.type,l);$=n,l.target.dispatchEvent(n),$=null}else return t=Gl(l),t!==null&&Ph(t),e.blockedOn=l,!1;t.shift()}return!0}function am(e,t,l){Mc(e)&&l.delete(t)}function mx(){Kr=!1,Un!==null&&Mc(Un)&&(Un=null),Ln!==null&&Mc(Ln)&&(Ln=null),Hn!==null&&Mc(Hn)&&(Hn=null),ci.forEach(am),ui.forEach(am)}function Uc(e,t){e.blockedOn===t&&(e.blockedOn=null,Kr||(Kr=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,mx)))}var Lc=null;function sm(e){Lc!==e&&(Lc=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){Lc===e&&(Lc=null);for(var t=0;t<e.length;t+=3){var l=e[t],n=e[t+1],s=e[t+2];if(typeof n!="function"){if(Vr(n||l)===null)continue;break}var c=Gl(l);c!==null&&(e.splice(t,3),t-=3,Zu(c,{pending:!0,data:s,method:l.method,action:n},n,s))}}))}function ss(e){function t(b){return Uc(b,e)}Un!==null&&Uc(Un,e),Ln!==null&&Uc(Ln,e),Hn!==null&&Uc(Hn,e),ci.forEach(t),ui.forEach(t);for(var l=0;l<Bn.length;l++){var n=Bn[l];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Bn.length&&(l=Bn[0],l.blockedOn===null);)nm(l),l.blockedOn===null&&Bn.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var s=l[n],c=l[n+1],d=s[it]||null;if(typeof c=="function")d||sm(l);else if(d){var m=null;if(c&&c.hasAttribute("formAction")){if(s=c,d=c[it]||null)m=d.formAction;else if(Vr(s)!==null)continue}else m=d.action;typeof m=="function"?l[n+1]=m:(l.splice(n,3),n-=3),sm(l)}}}function im(){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),n||setTimeout(l,20)}function l(){if(!n&&!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 n=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function Jr(e){this._internalRoot=e}Hc.prototype.render=Jr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,n=Wt();Fh(l,n,e,t,null,null)},Hc.prototype.unmount=Jr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Fh(e.current,2,null,e,null,null),vc(),t[dn]=null}};function Hc(e){this._internalRoot=e}Hc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ta();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Bn.length&&t!==0&&t<Bn[l].priority;l++);Bn.splice(l,0,e),l===0&&nm(e)}};var cm=i.version;if(cm!=="19.2.8")throw Error(r(527,cm,"19.2.8"));J.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=v(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var px={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bc.isDisabled&&Bc.supportsFiber)try{al=Bc.inject(px),yt=Bc}catch{}}return fi.createRoot=function(e,t){if(!f(e))throw Error(r(299));var l=!1,n="",s=md,c=pd,d=gd;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=Jh(e,1,!1,null,null,l,n,null,s,c,d,im),e[dn]=t.current,zr(e),new Jr(t)},fi.hydrateRoot=function(e,t,l){if(!f(e))throw Error(r(299));var n=!1,s="",c=md,d=pd,m=gd,b=null;return l!=null&&(l.unstable_strictMode===!0&&(n=!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=Jh(e,1,!0,t,l??null,n,s,b,c,d,m,im),t.context=Ih(null),l=t.current,n=Wt(),n=gs(n),s=wn(n),s.callback=null,kn(l,s,n),l=n,t.current.lanes=l,Rl(t,l),Ll(t),e[dn]=t.current,zr(e),new Hc(t)},fi.version="19.2.8",fi}var xm;function kx(){if(xm)return Wr.exports;xm=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=wx(),Wr.exports}var Tx=kx();function F({name:u,fill:i,className:o}){return a.jsx("span",{className:`ms material-symbols-rounded${i?" ms-fill":""}${o?` ${o}`:""}`,"aria-hidden":!0,children:u})}function Ex(){const[u,i]=C.useState(()=>window.location.hash.slice(1)||"/");return C.useEffect(()=>{const o=()=>i(window.location.hash.slice(1)||"/");return window.addEventListener("hashchange",o),()=>window.removeEventListener("hashchange",o)},[]),u}let uo="kraftwerk inspector",ro="";function Jm(){document.title=ro?`${ro} — ${uo}`:uo}function Ax(u){uo=u,Jm()}function vm(u){ro=u,Jm()}function gl(u,i){i?.replace?window.location.replace(`#${u}`):window.location.hash=u}function Ue({href:u,...i}){return a.jsx("a",{href:`#${u}`,...i})}const Im="kw-expert";let yo=(()=>{try{return localStorage.getItem(Im)!=="off"}catch{return!0}})();const oo=new Set;document.documentElement.dataset.expert=yo?"on":"off";function _x(u){yo=u,document.documentElement.dataset.expert=u?"on":"off";try{localStorage.setItem(Im,u?"on":"off")}catch{}oo.forEach(i=>i())}function Yn(){return C.useSyncExternalStore(u=>(oo.add(u),()=>oo.delete(u)),()=>yo)}function $e(u,i){const[o,r]=C.useState(null),f=C.useRef(u);return f.current=u,C.useEffect(()=>{let h=!0,p;const x=async()=>{try{const y=await fetch(f.current,{cache:"no-store"});y.ok&&h&&r(await y.json())}catch{}h&&(p=setTimeout(x,i?1500:6e3))};return x(),()=>{h=!1,clearTimeout(p)}},[u,i]),o}function vi(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 bo(u){return u==null?"—":`$${u.toFixed(2)}`}function Gc(u){return u?u>=1e3?`${(u/1e3).toFixed(1)}k`:String(u):"0"}function jo(u){return u<1024?`${u} B`:u<1024*1024?`${(u/1024).toFixed(1)} K`:`${(u/1024/1024).toFixed(1)} M`}function ga(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 zx(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 No({since:u}){const[,i]=C.useState(0);return C.useEffect(()=>{const o=setInterval(()=>i(r=>r+1),1e3);return()=>clearInterval(o)},[]),u?a.jsx("span",{className:"num",children:vi(Date.now()-Date.parse(u))}):null}function Vc({status:u}){return a.jsx("span",{className:`lamp ${u}`})}function Rx({status:u}){return a.jsx("span",{className:`status-word ${u}`,children:u})}function So(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ya=So();function Fm(u){ya=u}var pa={exec:()=>null};function is(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 we(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(Ot.caret,"$1"),o=o.replace(f,p),r},getRegex:()=>new RegExp(o,i)};return r}var Cx=((u="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+u)}catch{return!1}})(),Ot={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:is(u=>new RegExp(`^ {0,${u}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:is(u=>new RegExp(`^ {0,${u}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:is(u=>new RegExp(`^ {0,${u}}(?:\`\`\`|~~~)`)),headingBeginRegex:is(u=>new RegExp(`^ {0,${u}}#`)),htmlBeginRegex:is(u=>new RegExp(`^ {0,${u}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:is(u=>new RegExp(`^ {0,${u}}>`))},Ox=/^(?:[ \t]*(?:\n|$))+/,Dx=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Mx=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,yi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ux=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,wo=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Wm=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Pm=we(Wm).replace(/bull/g,wo).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(),Lx=we(Wm).replace(/bull/g,wo).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(),ko=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Hx=/^[^\n]+/,To=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Bx=we(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",To).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),qx=we(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,wo).getRegex(),Kc="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",Eo=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$x=we("^ {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",Eo).replace("tag",Kc).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ep=u=>we(ko).replace("hr",yi).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",Kc).getRegex(),Gx=ep(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Yx=ep(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Xx=we(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Yx).getRegex(),Ao={blockquote:Xx,code:Dx,def:Bx,fences:Mx,heading:Ux,hr:yi,html:$x,lheading:Pm,list:qx,newline:Ox,paragraph:Gx,table:pa,text:Hx},ym=we("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",yi).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",Kc).getRegex(),Qx={...Ao,lheading:Lx,table:ym,paragraph:we(ko).replace("hr",yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ym).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",Kc).getRegex()},Zx={...Ao,html:we(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Eo).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:pa,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:we(ko).replace("hr",yi).replace("heading",` *#{1,6} *[^
|
|
10
|
-
]`).replace("lheading",Pm).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Vx=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Kx=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,tp=/^( {2,}|\\)\n(?!\s*$)/,Jx=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,un=/[\p{P}\p{S}]/u,rs=/[\s\p{P}\p{S}]/u,bi=/[^\s\p{P}\p{S}]/u,Ix=we(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,rs).getRegex(),Fx=/[\p{Pi}\p{Ps}"']/u,lp=/(?!~)[\p{P}\p{S}]/u,Wx=/(?!~)[\s\p{P}\p{S}]/u,Px=/(?:[^\s\p{P}\p{S}]|~)/u,ev=we(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Cx?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),np=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,tv=we(np,"u").replace(/punct/g,un).getRegex(),lv=we(np,"u").replace(/punct/g,lp).getRegex(),nv=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,av=we(nv,"u").replace(/openQuote/g,Fx).replace(/punct/g,un).getRegex(),ap="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",sv=we(ap,"gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,rs).replace(/punct/g,un).getRegex(),iv=we(ap,"gu").replace(/notPunctSpace/g,Px).replace(/punctSpace/g,Wx).replace(/punct/g,lp).getRegex(),cv="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",uv=we(cv,"gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,rs).replace(/punct/g,un).getRegex(),rv=we("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,rs).replace(/punct/g,un).getRegex(),ov="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",fv=we(ov,"gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,rs).replace(/punct/g,un).getRegex(),dv=we(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,un).getRegex(),hv="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",mv=we(hv,"gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,rs).replace(/punct/g,un).getRegex(),pv=we(/\\(punct)/,"gu").replace(/punct/g,un).getRegex(),gv=we(/^<(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(),xv=we(Eo).replace("(?:-->|$)","-->").getRegex(),vv=we("^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",xv).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Yc=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,yv=we(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Yc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),sp=we(/^!?\[(label)\]\[(ref)\]/).replace("label",Yc).replace("ref",To).getRegex(),ip=we(/^!?\[(ref)\](?:\[\])?/).replace("ref",To).getRegex(),bv=we("reflink|nolink(?!\\()","g").replace("reflink",sp).replace("nolink",ip).getRegex(),bm=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,_o={_backpedal:pa,anyPunctuation:pv,autolink:gv,blockSkip:ev,br:tp,code:Kx,del:pa,delLDelim:pa,delRDelim:pa,emStrongLDelim:tv,emStrongRDelimAst:sv,emStrongRDelimUnd:rv,escape:Vx,link:yv,nolink:ip,punctuation:Ix,reflink:sp,reflinkSearch:bv,tag:vv,text:Jx,url:pa},jv={..._o,emStrongLDelim:av,emStrongRDelimAst:uv,emStrongRDelimUnd:fv,link:we(/^!?\[(label)\]\((.*?)\)/).replace("label",Yc).getRegex(),reflink:we(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Yc).getRegex()},fo={..._o,emStrongRDelimAst:iv,emStrongLDelim:lv,delLDelim:dv,delRDelim:mv,url:we(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",bm).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:we(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",bm).getRegex()},Nv={...fo,br:we(tp).replace("{2,}","*").getRegex(),text:we(fo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},qc={normal:Ao,gfm:Qx,pedantic:Zx},di={normal:_o,gfm:fo,breaks:Nv,pedantic:jv},Sv={"&":"&","<":"<",">":">",'"':""","'":"'"},jm=u=>Sv[u];function Hl(u,i){if(i){if(Ot.escapeTest.test(u))return u.replace(Ot.escapeReplace,jm)}else if(Ot.escapeTestNoEncode.test(u))return u.replace(Ot.escapeReplaceNoEncode,jm);return u}function Nm(u){try{u=encodeURI(u).replace(Ot.percentDecode,"%")}catch{return null}return u}function Sm(u,i){let o=u.replace(Ot.findPipe,(h,p,x)=>{let y=!1,v=p;for(;--v>=0&&x[v]==="\\";)y=!y;return y?"|":" |"}),r=o.split(Ot.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(Ot.slashPipe,"|");return r}function $n(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 wm(u){let i=u.split(`
|
|
11
|
-
`),o=i.length-1;for(;o>=0&&Ot.blankLine.test(i[o]);)o--;return i.length-o<=2?u:i.slice(0,o+1).join(`
|
|
12
|
-
`)}function wv(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 kv(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 km(u,i,o,r,f){let h=i.href,p=i.title||null,x=u[1].replace(f.other.outputLinkReplace,"$1"),y=u[0].charAt(0)==="!";r.state.inLink=!0;let v=r.state.linkEmitted,S=r.state.inRawBlock;r.state.linkEmitted=!1;let E=r.inlineTokens(x),w=r.state.linkEmitted;if(r.state.linkEmitted=v,r.state.inLink=!1,!y){if(w){r.state.inRawBlock=S;return}r.state.linkEmitted=!0}return{type:y?"image":"link",raw:o,href:h,title:p,text:x,tokens:E}}function Tv(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[x]=p;return x.length>=f.length?h.slice(f.length):h}).join(`
|
|
14
|
-
`)}var Xc=class{options;rules;lexer;constructor(u){this.options=u||ya}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]:wm(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=Tv(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=$n(o,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(o=r.trim())}return{type:"heading",raw:$n(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:$n(i[0],`
|
|
16
|
-
`)}}blockquote(u){let i=this.rules.block.blockquote.exec(u);if(i){let o=$n(i[0],`
|
|
17
|
-
`).split(`
|
|
18
|
-
`),r="",f="",h=[];for(;o.length>0;){let p=!1,x=[],y;for(y=0;y<o.length;y++)if(this.rules.other.blockquoteStart.test(o[y]))x.push(o[y]),p=!0;else if(!p)x.push(o[y]);else break;o=o.slice(y);let v=x.join(`
|
|
19
|
-
`),S=v.replace(this.rules.other.blockquoteSetextReplace,`
|
|
20
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
21
|
-
${v}`:v,f=f?`${f}
|
|
22
|
-
${S}`:S;let E=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(S,h,!0),this.lexer.state.top=E,o.length===0)break;let w=h.at(-1);if(w?.type==="code")break;if(w?.type==="blockquote"){let M=w,G=o.join(`
|
|
23
|
-
`),K=M.raw+`
|
|
24
|
-
`+G.replace(this.rules.other.blockquoteSetextReplace2,""),V=this.blockquote(K);h[h.length-1]=V,r=`${r}
|
|
25
|
-
${G}`,f=f.substring(0,f.length-M.text.length)+V.text;break}else if(w?.type==="list"){let M=w,G=M.raw+`
|
|
26
|
-
`+o.join(`
|
|
27
|
-
`),K=this.list(G);h[h.length-1]=K,r=r.substring(0,r.length-w.raw.length)+K.raw,f=f.substring(0,f.length-M.raw.length)+K.raw,o=G.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,v="",S="";if(!(i=h.exec(u))||this.rules.block.hr.test(u))break;v=i[0],u=u.substring(v.length);let E=kv(i[2].split(`
|
|
29
|
-
`,1)[0],i[1].length),w=u.split(`
|
|
30
|
-
`,1)[0],M=!E.trim(),G=0;if(this.options.pedantic?(G=2,S=E.trimStart()):M?G=i[1].length+1:(G=E.search(this.rules.other.nonSpaceChar),G=G>4?1:G,S=E.slice(G),G+=i[1].length),M&&this.rules.other.blankLine.test(w)&&(v+=w+`
|
|
31
|
-
`,u=u.substring(w.length+1),y=!0),!y){let K=this.rules.other.nextBulletRegex(G),V=this.rules.other.hrRegex(G),z=this.rules.other.fencesBeginRegex(G),fe=this.rules.other.headingBeginRegex(G),de=this.rules.other.htmlBeginRegex(G),te=this.rules.other.blockquoteBeginRegex(G);for(;u;){let W=u.split(`
|
|
32
|
-
`,1)[0],Y;if(w=W,this.options.pedantic?(w=w.replace(this.rules.other.listReplaceNesting," "),Y=w):Y=w.replace(this.rules.other.tabCharGlobal," "),z.test(w)||fe.test(w)||de.test(w)||te.test(w)||K.test(w)||V.test(w))break;if(Y.search(this.rules.other.nonSpaceChar)>=G||!w.trim())S+=`
|
|
33
|
-
`+Y.slice(G);else{if(M||E.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||z.test(E)||fe.test(E)||V.test(E))break;S+=`
|
|
34
|
-
`+w}M=!w.trim(),v+=W+`
|
|
35
|
-
`,u=u.substring(W.length+1),E=Y.slice(G)}}f.loose||(p?f.loose=!0:this.rules.other.doubleBlankLine.test(v)&&(p=!0)),f.items.push({type:"list_item",raw:v,task:!!this.options.gfm&&this.rules.other.listIsTask.test(S),loose:!1,text:S,tokens:[]}),f.raw+=v}let x=f.items.at(-1);if(x)x.raw=x.raw.trimEnd(),x.text=x.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 v=y.tokens.filter(E=>E.type==="space"),S=v.length>0&&v.some(E=>this.rules.other.anyLine.test(E.raw));f.loose=S}for(let y of f.items){let v=y.tokens[0];if(y.task&&(v?.type==="text"||v?.type==="paragraph")){y.text=y.text.replace(this.rules.other.listReplaceTask,""),v.raw=v.raw.replace(this.rules.other.listReplaceTask,""),v.text=v.text.replace(this.rules.other.listReplaceTask,"");for(let E=this.lexer.inlineQueue.length-1;E>=0;E--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[E].src)){this.lexer.inlineQueue[E].src=this.lexer.inlineQueue[E].src.replace(this.rules.other.listReplaceTask,"");break}let S=this.rules.other.listTaskCheckbox.exec(y.raw);if(S){let E={type:"checkbox",raw:S[0]+" ",checked:S[0]!=="[ ]"};y.checked=E.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=E.raw+y.tokens[0].raw,y.tokens[0].text=E.raw+y.tokens[0].text,y.tokens[0].tokens.unshift(E)):y.tokens.unshift({type:"paragraph",raw:E.raw,text:E.raw,tokens:[E]}):y.tokens.unshift(E)}}else y.task&&(y.task=!1)}if(f.loose)for(let y of f.items){y.loose=!0;for(let v of y.tokens)v.type==="text"&&(v.type="paragraph")}return f}}html(u){let i=this.rules.block.html.exec(u);if(i){let o=wm(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:$n(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=Sm(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:$n(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(Sm(p,h.header.length).map((x,y)=>({text:x,tokens:this.lexer.inline(x),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:$n(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=$n(o.slice(0,-1),"\\");if((o.length-h.length)%2===0)return}else{let h=wv(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)),km(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 km(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,x=f,y=0,v=r[0][0],S=o===v,E=v==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(E.lastIndex=0,i=i.slice(-1*u.length+f);(r=E.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]){x+=p;continue}else if(r[5]||r[6]){if(f%3&&!((f+p)%3)){y+=p;continue}if(S)break}if(x-=p,x>0)continue;p=Math.min(p,p+x+y);let w=[...r[0]][0].length,M=u.slice(0,f+r.index+w+p);if(Math.min(f,p)%2){let K=M.slice(1,-1);return{type:"em",raw:M,text:K,tokens:this.lexer.inlineTokens(K)}}let G=M.slice(2,-2);return{type:"strong",raw:M,text:G,tokens:this.lexer.inlineTokens(G)}}}}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,x=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]){x+=p;continue}if(x-=p,x>0)continue;p=Math.min(p,p+x);let v=[...r[0]][0].length,S=u.slice(0,f+r.index+v+p),E=S.slice(f,-f);return{type:"del",raw:S,text:E,tokens:this.lexer.inlineTokens(E)}}}}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}}}},El=class ho{tokens;options;state;inlineQueue;tokenizer;constructor(i){this.tokens=[],this.tokens.links=Object.create(null),this.options=i||ya,this.options.tokenizer=this.options.tokenizer||new Xc,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:Ot,block:qc.normal,inline:di.normal};this.options.pedantic?(o.block=qc.pedantic,o.inline=di.pedantic):this.options.gfm&&(o.block=qc.gfm,this.options.breaks?o.inline=di.breaks:o.inline=di.gfm),this.tokenizer.rules=o}static get rules(){return{block:qc,inline:di}}static lex(i,o){return new ho(o).lex(i)}static lexInline(i,o){return new ho(o).inlineTokens(i)}lex(i){i=i.replace(Ot.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(Ot.tabCharGlobal," ").replace(Ot.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(x=>(h=x.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 x=o.at(-1);h.raw.length===1&&x!==void 0?x.raw+=`
|
|
42
|
-
`:o.push(h);continue}if(h=this.tokenizer.code(i)){i=i.substring(h.raw.length);let x=o.at(-1);x?.type==="paragraph"||x?.type==="text"?(x.raw+=(x.raw.endsWith(`
|
|
43
|
-
`)?"":`
|
|
44
|
-
`)+h.raw,x.text+=`
|
|
45
|
-
`+h.text,this.inlineQueue.at(-1).src=x.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 x=o.at(-1);x?.type==="paragraph"||x?.type==="text"?(x.raw+=(x.raw.endsWith(`
|
|
46
|
-
`)?"":`
|
|
47
|
-
`)+h.raw,x.text+=`
|
|
48
|
-
`+h.raw,this.inlineQueue.at(-1).src=x.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 x=1/0,y=i.slice(1),v;this.options.extensions.startBlock.forEach(S=>{v=S.call({lexer:this},y),typeof v=="number"&&v>=0&&(x=Math.min(x,v))}),x<1/0&&x>=0&&(p=i.substring(0,x+1))}if(this.state.top&&(h=this.tokenizer.paragraph(p))){let x=o.at(-1);r&&x?.type==="paragraph"?(x.raw+=(x.raw.endsWith(`
|
|
49
|
-
`)?"":`
|
|
50
|
-
`)+h.raw,x.text+=`
|
|
51
|
-
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=x.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 x=o.at(-1);x?.type==="text"?(x.raw+=(x.raw.endsWith(`
|
|
52
|
-
`)?"":`
|
|
53
|
-
`)+h.raw,x.text+=`
|
|
54
|
-
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=x.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 x=this.tokenizer.rules.inline.reflinkSearch,y=v=>{let S=v.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,v.slice(S+1,-1)))return v;if(S>1&&v.charAt(0)!=="!"){let E=v.slice(1,S-1);if(this.linkInText(E))return"["+E.replace(x,y)+"]["+"a".repeat(v.length-S-2)+"]"}return"["+"a".repeat(v.length-2)+"]"};r=r.replace(x,y)}r=r.replace(this.tokenizer.rules.inline.anyPunctuation,x=>"+".repeat(x.length)),r=r.replace(this.tokenizer.rules.inline.blockSkip,(x,y,v)=>{let S=v?v.length:0;return x.slice(0,S)+"["+"a".repeat(x.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 x;if(this.options.extensions?.inline?.some(v=>(x=v.call({lexer:this},i,o))?(i=i.substring(x.raw.length),o.push(x),!0):!1))continue;if(x=this.tokenizer.escape(i)){i=i.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.tag(i)){i=i.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.link(i)){i=i.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(x.raw.length);let v=o.at(-1);x.type==="text"&&v?.type==="text"?(v.raw+=x.raw,v.text+=x.text):o.push(x);continue}if(x=this.tokenizer.emStrong(i,r,h)){i=i.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.codespan(i)){i=i.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.br(i)){i=i.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.del(i,r,h)){i=i.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.autolink(i)){i=i.substring(x.raw.length),o.push(x);continue}if(!this.state.inLink&&(x=this.tokenizer.url(i))){i=i.substring(x.raw.length),o.push(x);continue}let y=i;if(this.options.extensions?.startInline){let v=1/0,S=i.slice(1),E;this.options.extensions.startInline.forEach(w=>{E=w.call({lexer:this},S),typeof E=="number"&&E>=0&&(v=Math.min(v,E))}),v<1/0&&v>=0&&(y=i.substring(0,v+1))}if(x=this.tokenizer.inlineText(y)){i=i.substring(x.raw.length),x.raw.slice(-1)!=="_"&&(h=x.raw.slice(-1)),f=!0;let v=o.at(-1);v?.type==="text"?(v.raw+=x.raw,v.text+=x.text):o.push(x);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)}},Qc=class{options;parser;constructor(u){this.options=u||ya}space(u){return""}code({text:u,lang:i,escaped:o}){let r=(i||"").match(Ot.notSpaceStart)?.[0],f=u.replace(Ot.endingNewline,"")+`
|
|
55
|
-
`;return r?'<pre><code class="language-'+Hl(r)+'">'+(o?f:Hl(f,!0))+`</code></pre>
|
|
56
|
-
`:"<pre><code>"+(o?f:Hl(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 x=u.items[p];r+=this.listitem(x)}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>${Hl(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=Nm(u);if(f===null)return r;u=f;let h='<a href="'+u+'"';return i&&(h+=' title="'+Hl(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=Nm(u);if(f===null)return Hl(o);u=f;let h=`<img src="${u}" alt="${Hl(o)}"`;return i&&(h+=` title="${Hl(i)}"`),h+=">",h}text(u){return"tokens"in u&&u.tokens?this.parser.parseInline(u.tokens):"escaped"in u&&u.escaped?u.text:Hl(u.text)}},zo=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}},Al=class mo{options;renderer;textRenderer;constructor(i){this.options=i||ya,this.options.renderer=this.options.renderer||new Qc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new zo}static parse(i,o){return new mo(o).parse(i)}static parseInline(i,o){return new mo(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,x=this.options.extensions.renderers[p.type].call({parser:this},p);if(x!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(p.type)){o+=x||"";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 x=this.options.extensions.renderers[h.type].call({parser:this},h);if(x!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(h.type)){r+=x||"";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 x='Token with "'+p.type+'" type was not found.';if(this.options.silent)return console.error(x),"";throw new Error(x)}}}return r}},gi=class{options;block;constructor(u){this.options=u||ya}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?El.lex:El.lexInline}provideParser(u=this.block){return u?Al.parse:Al.parseInline}},Ev=class{defaults=So();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Al;Renderer=Qc;TextRenderer=zo;Lexer=El;Tokenizer=Xc;Hooks=gi;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 x=f.renderer.apply(this,p);return x===!1&&(x=h.apply(this,p)),x}: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 Qc(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,x=o.renderer[p],y=f[p];f[p]=(...v)=>{let S=x.apply(f,v);return S===!1&&(S=y.apply(f,v)),S||""}}r.renderer=f}if(o.tokenizer){let f=this.defaults.tokenizer||new Xc(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,x=o.tokenizer[p],y=f[p];f[p]=(...v)=>{let S=x.apply(f,v);return S===!1&&(S=y.apply(f,v)),S}}r.tokenizer=f}if(o.hooks){let f=this.defaults.hooks||new gi;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,x=o.hooks[p],y=f[p];gi.passThroughHooks.has(h)?f[p]=v=>{if(this.defaults.async&&gi.passThroughHooksRespectAsync.has(h))return(async()=>{let E=await x.call(f,v);return y.call(f,E)})();let S=x.call(f,v);return y.call(f,S)}:f[p]=(...v)=>{if(this.defaults.async)return(async()=>{let E=await x.apply(f,v);return E===!1&&(E=await y.apply(f,v)),E})();let S=x.apply(f,v);return S===!1&&(S=y.apply(f,v)),S}}r.hooks=f}if(o.walkTokens){let f=this.defaults.walkTokens,h=o.walkTokens;r.walkTokens=function(p){let x=[];return x.push(h.call(this,p)),f&&(x=x.concat(f.call(this,p))),x}}this.defaults={...this.defaults,...r}}),this}setOptions(u){return this.defaults={...this.defaults,...u},this}lexer(u,i){return El.lex(u,i??this.defaults)}parser(u,i){return Al.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,x=await(f.hooks?await f.hooks.provideLexer(u):u?El.lex:El.lexInline)(p,f),y=f.hooks?await f.hooks.processAllTokens(x):x;f.walkTokens&&await Promise.all(this.walkTokens(y,f.walkTokens));let v=await(f.hooks?await f.hooks.provideParser(u):u?Al.parse:Al.parseInline)(y,f);return f.hooks?await f.hooks.postprocess(v):v})().catch(h);try{f.hooks&&(i=f.hooks.preprocess(i));let p=(f.hooks?f.hooks.provideLexer(u):u?El.lex:El.lexInline)(i,f);f.hooks&&(p=f.hooks.processAllTokens(p)),f.walkTokens&&this.walkTokens(p,f.walkTokens);let x=(f.hooks?f.hooks.provideParser(u):u?Al.parse:Al.parseInline)(p,f);return f.hooks&&(x=f.hooks.postprocess(x)),x}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>"+Hl(o.message+"",!0)+"</pre>";return i?Promise.resolve(r):r}if(i)return Promise.reject(o);throw o}}},xa=new Ev;function Re(u,i){return xa.parse(u,i)}Re.options=Re.setOptions=function(u){return xa.setOptions(u),Re.defaults=xa.defaults,Fm(Re.defaults),Re};Re.getDefaults=So;Re.defaults=ya;function Av(...u){return xa.use(...u),Re.defaults=xa.defaults,Fm(Re.defaults),Re}Re.use=Av;Re.walkTokens=function(u,i){return xa.walkTokens(u,i)};Re.parseInline=xa.parseInline;Re.Parser=Al;Re.parser=Al.parse;Re.Renderer=Qc;Re.TextRenderer=zo;Re.Lexer=El;Re.lexer=El.lex;Re.Tokenizer=Xc;Re.Hooks=gi;Re.parse=Re;Re.options;Re.setOptions;Re.walkTokens;Re.parseInline;Al.parse;El.lex;function Tm(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 _v(u){if(Array.isArray(u))return u}function zv(u,i){var o=u==null?null:typeof Symbol<"u"&&u[Symbol.iterator]||u["@@iterator"];if(o!=null){var r,f,h,p,x=[],y=!0,v=!1;try{if(h=(o=o.call(u)).next,i!==0)for(;!(y=(r=h.call(o)).done)&&(x.push(r.value),x.length!==i);y=!0);}catch(S){v=!0,f=S}finally{try{if(!y&&o.return!=null&&(p=o.return(),Object(p)!==p))return}finally{if(v)throw f}}return x}}function Rv(){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 Cv(u,i){return _v(u)||zv(u,i)||Ov(u,i)||Rv()}function Ov(u,i){if(u){if(typeof u=="string")return Tm(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)?Tm(u,i):void 0}}const cp=Object.entries,Em=Object.setPrototypeOf,Dv=Object.isFrozen,Mv=Object.getPrototypeOf,Uv=Object.getOwnPropertyDescriptor;let vt=Object.freeze,jt=Object.seal,cs=Object.create,up=typeof Reflect<"u"&&Reflect,po=up.apply,go=up.construct;vt||(vt=function(i){return i});jt||(jt=function(i){return i});po||(po=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)});go||(go=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 ma=ht(Array.prototype.forEach),Lv=ht(Array.prototype.lastIndexOf),Am=ht(Array.prototype.pop),hi=ht(Array.prototype.push),Hv=ht(Array.prototype.splice),us=Array.isArray,xi=ht(String.prototype.toLowerCase),lo=ht(String.prototype.toString),_m=ht(String.prototype.match),mi=ht(String.prototype.replace),zm=ht(String.prototype.indexOf),Bv=ht(String.prototype.trim),qv=ht(Number.prototype.toString),$v=ht(Boolean.prototype.toString),Rm=typeof BigInt>"u"?null:ht(BigInt.prototype.toString),Cm=typeof Symbol>"u"?null:ht(Symbol.prototype.toString),Gt=ht(Object.prototype.hasOwnProperty),pi=ht(Object.prototype.toString),Ct=ht(RegExp.prototype.test),ha=Gv(TypeError);function ht(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 po(u,i,r)}}function Gv(u){return function(){for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return go(u,o)}}function Oe(u,i){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:xi;if(Em&&Em(u,null),!us(i))return u;let r=i.length;for(;r--;){let f=i[r];if(typeof f=="string"){const h=o(f);h!==f&&(Dv(i)||(i[r]=h),f=h)}u[f]=!0}return u}function Yv(u){for(let i=0;i<u.length;i++)Gt(u,i)||(u[i]=null);return u}function el(u){const i=cs(null);for(const r of cp(u)){var o=Cv(r,2);const f=o[0],h=o[1];Gt(u,f)&&(us(h)?i[f]=Yv(h):h&&typeof h=="object"&&h.constructor===Object?i[f]=el(h):i[f]=h)}return i}function Xv(u){switch(typeof u){case"string":return u;case"number":return qv(u);case"boolean":return $v(u);case"bigint":return Rm?Rm(u):"0";case"symbol":return Cm?Cm(u):"Symbol()";case"undefined":return pi(u);case"function":case"object":{if(u===null)return pi(u);const i=u,o=Tl(i,"toString");if(typeof o=="function"){const r=o(i);return typeof r=="string"?r:pi(r)}return pi(u)}default:return pi(u)}}function Tl(u,i){for(;u!==null;){const r=Uv(u,i);if(r){if(r.get)return ht(r.get);if(typeof r.value=="function")return ht(r.value)}u=Mv(u)}function o(){return null}return o}function Qv(u){try{return Ct(u,""),!0}catch{return!1}}const Om=vt(["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"]),no=vt(["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=vt(["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"]),Zv=vt(["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"]),so=vt(["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"]),Vv=vt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Dm=vt(["#text"]),Mm=vt(["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"]),io=vt(["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"]),Um=vt(["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"]),$c=vt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Kv=jt(/{{[\w\W]*|^[\w\W]*}}/g),Jv=jt(/<%[\w\W]*|^[\w\W]*%>/g),Iv=jt(/\${[\w\W]*/g),Fv=jt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Wv=jt(/^aria-[\-\w]+$/),Lm=jt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Pv=jt(/^(?:\w+script|data):/i),ey=jt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ty=jt(/^html$/i),ly=jt(/^[a-z][.\w]*(-[.\w]+)+$/i),Hm=jt(/<[/\w!]/g),Bm=jt(/<[/\w]/g),ny=jt(/<\/no(script|embed|frames)/i),ay=jt(/\/>/i),Pt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},rp=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],sy=vt(Oe({},rp)),iy=(function(){const u={};return ma(rp,i=>{u[i]=jt(new RegExp("</"+i+"(?=[\\t\\n\\f\\r />])","i"))}),vt(u)})(),cy=function(){return typeof window>"u"?null:window},uy=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}},qm=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Gn=function(i,o,r,f){return Gt(i,o)&&us(i[o])?Oe(f.base?el(f.base):{},i[o],f.transform):r},co=function(i,o,r){const f=Gt(i,o)?i[o]:void 0;return f&&typeof f=="object"?el(f):r()};function op(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:cy();const i=X=>op(X);if(i.version="3.4.14",i.removed=[],!u||!u.document||u.document.nodeType!==Pt.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,x=u.Element,y=u.NodeFilter,v=u.NamedNodeMap;v===void 0&&(u.NamedNodeMap||u.MozNamedAttrMap),u.HTMLFormElement;const S=u.DOMParser,E=u.trustedTypes,w=x.prototype,M=Tl(w,"cloneNode"),G=Tl(w,"remove"),K=Tl(w,"nextSibling"),V=Tl(w,"childNodes"),z=Tl(w,"parentNode"),fe=Tl(w,"shadowRoot"),de=Tl(w,"attributes"),te=p&&p.prototype?Tl(p.prototype,"nodeType"):null,W=p&&p.prototype?Tl(p.prototype,"nodeName"):null,Y=p&&p.prototype?Tl(p.prototype,"ownerDocument"):null,Z=function(g){return te?te(g):g.nodeType},le=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 ne,je="",be,P=!1,ve=0;const Je=function(){if(ve>0)throw ha('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.')},nt=function(g){Je(),ve++;try{return ne.createHTML(g)}finally{ve--}},D=function(g){Je(),ve++;try{return ne.createScriptURL(g)}finally{ve--}},J=function(){return P||(be=uy(E,f),P=!0),be},ce=o,_e=ce.implementation,ye=ce.createNodeIterator,N=ce.createDocumentFragment,B=ce.getElementsByTagName,I=r.importNode;let Q=qm();i.isSupported=typeof cp=="function"&&typeof z=="function"&&_e&&_e.createHTMLDocument!==void 0;const he=Kv,pe=Jv,Ee=Iv,mt=Fv,H=Wv,ze=Pv,Ge=ey,We=ly;let tl=Lm,Ce=null;const Xn=Oe({},[...Om,...no,...ao,...so,...Dm]);let Ye=null;const os=Oe({},[...Mm,...io,...Um,...$c]);let Yt=Object.seal(cs(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}})),Bl=null,ja=null;const ll=Object.seal(cs(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ji=!0,fs=!0,_t=!1,Ni=!0,xl=!1,_l=!0,nl=!1,ds=!1,Qn=null,Na=null,hs=!1,al=!1,yt=!1,Xt=!1,zt=!0,Si=!1;const wi="user-content-";let ms=!0,rn=!1,vl={},yl=null;const zl=Oe({},["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 Zn=null;const on=Oe({},["audio","video","img","source","image","track"]);let ki=null;const ps=Oe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fn="http://www.w3.org/1998/Math/MathML",Rl="http://www.w3.org/2000/svg",sl="http://www.w3.org/1999/xhtml";let ql=sl,Sa=!1,wa=null;const gs=Oe({},[fn,Rl,sl],lo),ka=vt(["mi","mo","mn","ms","mtext"]);let Ta=Oe({},ka);const xs=vt(["annotation-xml"]);let il=Oe({},xs);const pt=Oe({},["title","style","font","a","script"]);let it=null;const dn=["application/xhtml+xml","text/html"],vs="text/html";let et=null,hn=null;const Ti=o.createElement("form"),mn=function(g){return g instanceof RegExp||g instanceof Function},Vn=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(hn&&hn===g)return;(!g||typeof g!="object")&&(g={}),g=el(g),it=dn.indexOf(g.PARSER_MEDIA_TYPE)===-1?vs:g.PARSER_MEDIA_TYPE,et=it==="application/xhtml+xml"?lo:xi,Ce=Gn(g,"ALLOWED_TAGS",Xn,{transform:et}),Ye=Gn(g,"ALLOWED_ATTR",os,{transform:et}),wa=Gn(g,"ALLOWED_NAMESPACES",gs,{transform:lo}),ki=Gn(g,"ADD_URI_SAFE_ATTR",ps,{transform:et,base:ps}),Zn=Gn(g,"ADD_DATA_URI_TAGS",on,{transform:et,base:on}),yl=Gn(g,"FORBID_CONTENTS",zl,{transform:et}),Bl=Gn(g,"FORBID_TAGS",el({}),{transform:et}),ja=Gn(g,"FORBID_ATTR",el({}),{transform:et}),vl=Gt(g,"USE_PROFILES")?g.USE_PROFILES&&typeof g.USE_PROFILES=="object"?el(g.USE_PROFILES):g.USE_PROFILES:!1,ji=g.ALLOW_ARIA_ATTR!==!1,fs=g.ALLOW_DATA_ATTR!==!1,_t=g.ALLOW_UNKNOWN_PROTOCOLS||!1,Ni=g.ALLOW_SELF_CLOSE_IN_ATTR!==!1,xl=g.SAFE_FOR_TEMPLATES||!1,_l=g.SAFE_FOR_XML!==!1,nl=g.WHOLE_DOCUMENT||!1,al=g.RETURN_DOM||!1,yt=g.RETURN_DOM_FRAGMENT||!1,Xt=g.RETURN_TRUSTED_TYPE||!1,hs=g.FORCE_BODY||!1,zt=g.SANITIZE_DOM!==!1,Si=g.SANITIZE_NAMED_PROPS||!1,ms=g.KEEP_CONTENT!==!1,rn=g.IN_PLACE||!1,tl=Qv(g.ALLOWED_URI_REGEXP)?g.ALLOWED_URI_REGEXP:Lm,ql=typeof g.NAMESPACE=="string"?g.NAMESPACE:sl,Ta=co(g,"MATHML_TEXT_INTEGRATION_POINTS",()=>Oe({},ka)),il=co(g,"HTML_INTEGRATION_POINTS",()=>Oe({},xs));const k=co(g,"CUSTOM_ELEMENT_HANDLING",()=>cs(null));if(Yt=cs(null),Gt(k,"tagNameCheck")&&mn(k.tagNameCheck)&&(Yt.tagNameCheck=k.tagNameCheck),Gt(k,"attributeNameCheck")&&mn(k.attributeNameCheck)&&(Yt.attributeNameCheck=k.attributeNameCheck),Gt(k,"allowCustomizedBuiltInElements")&&typeof k.allowCustomizedBuiltInElements=="boolean"&&(Yt.allowCustomizedBuiltInElements=k.allowCustomizedBuiltInElements),jt(Yt),xl&&(fs=!1),yt&&(al=!0),vl&&(Ce=Oe({},Dm),Ye=cs(null),vl.html===!0&&(Oe(Ce,Om),Oe(Ye,Mm)),vl.svg===!0&&(Oe(Ce,no),Oe(Ye,io),Oe(Ye,$c)),vl.svgFilters===!0&&(Oe(Ce,ao),Oe(Ye,io),Oe(Ye,$c)),vl.mathMl===!0&&(Oe(Ce,so),Oe(Ye,Um),Oe(Ye,$c))),ll.tagCheck=null,ll.attributeCheck=null,Gt(g,"ADD_TAGS")&&(typeof g.ADD_TAGS=="function"?ll.tagCheck=g.ADD_TAGS:us(g.ADD_TAGS)&&(Ce===Xn&&(Ce=el(Ce)),Oe(Ce,g.ADD_TAGS,et))),Gt(g,"ADD_ATTR")&&(typeof g.ADD_ATTR=="function"?ll.attributeCheck=g.ADD_ATTR:us(g.ADD_ATTR)&&(Ye===os&&(Ye=el(Ye)),Oe(Ye,g.ADD_ATTR,et))),Gt(g,"ADD_FORBID_CONTENTS")&&us(g.ADD_FORBID_CONTENTS)&&(yl===zl&&(yl=el(yl)),Oe(yl,g.ADD_FORBID_CONTENTS,et)),ms&&(Ce["#text"]=!0),nl&&Oe(Ce,["html","head","body"]),Ce.table&&(Oe(Ce,["tbody"]),delete Bl.tbody),g.TRUSTED_TYPES_POLICY){if(typeof g.TRUSTED_TYPES_POLICY.createHTML!="function")throw ha('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof g.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ha('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const $=ne;ne=g.TRUSTED_TYPES_POLICY;try{je=nt("")}catch(ee){throw ne=$,ee}}else g.TRUSTED_TYPES_POLICY===null?(ne=void 0,je=""):(ne===void 0&&(ne=J()),ne&&typeof je=="string"&&(je=nt("")));vt&&vt(g),hn=g},$l=Oe({},[...no,...ao,...Zv]),Gl=Oe({},[...so,...Vv]),Kn=function(g,k,$){return k.namespaceURI===sl?g==="svg":k.namespaceURI===fn?g==="svg"&&($==="annotation-xml"||Ta[$]):!!$l[g]},pn=function(g,k,$){return k.namespaceURI===sl?g==="math":k.namespaceURI===Rl?g==="math"&&il[$]:!!Gl[g]},ct=function(g,k,$){return k.namespaceURI===Rl&&!il[$]||k.namespaceURI===fn&&!Ta[$]?!1:!Gl[g]&&(pt[g]||!$l[g])},Ei=function(g){let k=z(g);(!k||!k.tagName)&&(k={namespaceURI:ql,tagName:"template"});const $=xi(g.tagName),ee=xi(k.tagName);return wa[g.namespaceURI]?g.namespaceURI===Rl?Kn($,k,ee):g.namespaceURI===fn?pn($,k,ee):g.namespaceURI===sl?ct($,k,ee):!!(it==="application/xhtml+xml"&&wa[g.namespaceURI]):!1},bl=function(g){hi(i.removed,{element:g});try{z(g).removeChild(g)}catch{if(G(g),!z(g))throw ha("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Cl=function(g,k,$){try{g.removeAttributeNode(k)}catch{try{g.removeAttribute($)}catch{}}},jl=function(g){Jn(g);const k=V(g);if(k){const ee=[];ma(k,ae=>{hi(ee,ae)}),ma(ee,ae=>{try{G(ae)}catch{}})}const $=de(g);if($)for(let ee=$.length-1;ee>=0;--ee){const ae=$[ee],re=ae&&ae.name;typeof re=="string"&&Cl(g,ae,re)}},Yl=function(g,k,$){if(!$)try{$=k.getAttributeNode(g)}catch{$=null}hi(i.removed,{attribute:$||null,from:k});try{$?k.removeAttributeNode($):k.removeAttribute(g)}catch{try{k.removeAttribute(g)}catch{}}if(g==="is")if(al||yt)try{bl(k)}catch{}else try{k.setAttribute(g,"")}catch{}},Ai=function(g){const k=de(g);if(k)for(let $=k.length-1;$>=0;--$){const ee=k[$],ae=ee&&ee.name;typeof ae!="string"||Ye[et(ae)]||Cl(g,ee,ae)}},Jn=function(g){const k=[g];for(;k.length>0;){const $=k.pop();Z($)===Pt.element&&Ai($);const ae=V($);if(ae)for(let re=ae.length-1;re>=0;--re)k.push(ae[re])}},_i=function(g,k){return _l?g==="patchsrc"?!0:g==="for"&&k!=="label"&&k!=="output":!1},Ea=function(g){if(!_l)return;const k=[g];for(;k.length>0;){const $=k.pop(),ee=Z($);if(ee===Pt.processingInstruction||ee===Pt.comment&&Ct(Bm,$.data)){try{G($)}catch{}continue}if(ee===Pt.element){const re=$,He=et(le($));try{re.hasAttribute&&re.hasAttribute("patchsrc")&&re.removeAttribute("patchsrc"),re.hasAttribute&&re.hasAttribute("for")&&_i("for",He)&&re.removeAttribute("for")}catch{}}const ae=V($);if(ae)for(let re=ae.length-1;re>=0;--re)k.push(ae[re])}},In=function(g){let k=null,$=null;if(hs)g="<remove></remove>"+g;else{const re=_m(g,/^[\r\n\t ]+/);$=re&&re[0]}it==="application/xhtml+xml"&&ql===sl&&(g='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+g+"</body></html>");const ee=ne?nt(g):g;if(ql===sl)try{k=new S().parseFromString(ee,it)}catch{}if(!k||!k.documentElement){k=_e.createDocument(ql,"template",null);try{k.documentElement.innerHTML=Sa?je:ee}catch{}}const ae=k.body||k.documentElement;return g&&$&&ae.insertBefore(o.createTextNode($),ae.childNodes[0]||null),ql===sl?B.call(k,nl?"html":"body")[0]:nl?k.documentElement:ae},cl=function(g){const k=Y?Y(g):g.ownerDocument;return ye.call(k||g,g,y.SHOW_ELEMENT|y.SHOW_COMMENT|y.SHOW_TEXT|y.SHOW_PROCESSING_INSTRUCTION|y.SHOW_CDATA_SECTION,null)},Nt=function(g){return g=mi(g,he," "),g=mi(g,pe," "),g=mi(g,Ee," "),g},Aa=function(g){var k;g.normalize();const $=Y?Y(g):g.ownerDocument,ee=ye.call($||g,g,y.SHOW_TEXT|y.SHOW_COMMENT|y.SHOW_CDATA_SECTION|y.SHOW_PROCESSING_INSTRUCTION,null);let ae=ee.nextNode();for(;ae;)ae.data=Nt(ae.data),ae=ee.nextNode();const re=(k=g.querySelectorAll)===null||k===void 0?void 0:k.call(g,"template");re&&ma(re,He=>{Ol(He.content)&&Aa(He.content)})},_a=function(g){const k=W?W(g):null;return typeof k!="string"||et(k)!=="form"?!1:typeof g.nodeName!="string"||typeof g.textContent!="string"||typeof g.removeChild!="function"||g.attributes!==de(g)||typeof g.removeAttribute!="function"||typeof g.setAttribute!="function"||typeof g.namespaceURI!="string"||typeof g.insertBefore!="function"||typeof g.hasChildNodes!="function"||g.nodeType!==te(g)||g.childNodes!==V(g)},Ol=function(g){if(!te||typeof g!="object"||g===null)return!1;try{return te(g)===Pt.documentFragment}catch{return!1}},gn=function(g){if(!te||typeof g!="object"||g===null)return!1;try{return typeof te(g)=="number"}catch{return!1}};function Dt(X,g,k){X.length!==0&&ma(X,$=>{$.call(i,g,k,hn)})}const Jc=function(g,k){return!!(_l&&g.hasChildNodes()&&!gn(g.firstElementChild)&&Ct(Hm,g.textContent)&&Ct(Hm,g.innerHTML)||_l&&g.namespaceURI===sl&&sy[k]&&(gn(g.firstElementChild)||typeof g.textContent=="string"&&Ct(iy[k],g.textContent))||g.nodeType===Pt.processingInstruction||_l&&g.nodeType===Pt.comment&&Ct(Bm,g.data))},St=function(g,k){if(g instanceof RegExp)return Ct(g,k);if(g instanceof Function){for(var $=arguments.length,ee=new Array($>2?$-2:0),ae=2;ae<$;ae++)ee[ae-2]=arguments[ae];return!!g(k,...ee)}return!1},ys=function(g,k,$){if(!Bl[k]&&Ql(k)&&St(Yt.tagNameCheck,k))return!1;if(ms&&!yl[k]){const ee=z(g),ae=V(g);if(ae&&ee){const re=ae.length;for(let He=re-1;He>=0;--He){const Ve=g===$?M(ae[He],!0):ae[He];ee.insertBefore(Ve,K(g))}}}return bl(g),!0},bs=function(g,k,$,ee){return g.length===0?k:k===$||k===ee?el(k):k},za=function(g,k){return g===k||z(g)!==null?!1:(rn&&Jn(g),!0)},Xl=function(g,k){if(Dt(Q.beforeSanitizeElements,g,null),za(g,k))return!0;if(_a(g))return bl(g),!0;const $=et(le(g));if(Ce=bs(Q.uponSanitizeElement,Ce,Xn,Qn),Dt(Q.uponSanitizeElement,g,{tagName:$,allowedTags:Ce}),za(g,k))return!0;if(Jc(g,$))return bl(g),!0;if(Bl[$]||!(ll.tagCheck instanceof Function&&ll.tagCheck($))&&!Ce[$]){const ae=ys(g,$,k);return ae===!1&&Dt(Q.afterSanitizeElements,g,null),ae}if(Z(g)===Pt.element&&!Ei(g)||($==="noscript"||$==="noembed"||$==="noframes")&&Ct(ny,g.innerHTML))return bl(g),!0;if(xl&&g.nodeType===Pt.text){const ae=Nt(g.textContent);g.textContent!==ae&&(hi(i.removed,{element:g.cloneNode()}),g.textContent=ae)}return Dt(Q.afterSanitizeElements,g,null),!1},js=function(g,k,$){if(ja[k]||_i(k,g)||zt&&(k==="id"||k==="name")&&($ in o||$ in Ti))return!1;const ee=Ye[k]||ll.attributeCheck instanceof Function&&ll.attributeCheck(k,g);return fs&&Ct(mt,k)||ji&&Ct(H,k)?!0:ee?ki[k]||Ct(tl,mi($,Ge,""))||(k==="src"||k==="xlink:href"||k==="href")&&g!=="script"&&zm($,"data:")===0&&Zn[g]||_t&&!Ct(ze,mi($,Ge,""))?!0:!$:Ql(g)&&St(Yt.tagNameCheck,g)&&St(Yt.attributeNameCheck,k,g)||k==="is"&&Yt.allowCustomizedBuiltInElements&&St(Yt.tagNameCheck,$)},zi=Oe({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ql=function(g){return!zi[xi(g)]&&Ct(We,g)},Ic=function(g,k,$,ee){if(ne&&typeof E=="object"&&typeof E.getAttributeType=="function"&&!$)switch(E.getAttributeType(g,k)){case"TrustedHTML":return nt(ee);case"TrustedScriptURL":return D(ee)}return ee},Ri=function(g,k,$,ee){try{$?g.setAttributeNS($,k,ee):g.setAttribute(k,ee),_a(g)?bl(g):Am(i.removed)}catch{Yl(k,g)}},Ns=function(g){Dt(Q.beforeSanitizeAttributes,g,null);const k=g.attributes;if(!k||_a(g))return;Ye=bs(Q.uponSanitizeAttribute,Ye,os,Na);const $={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ye,forceKeepAttr:void 0};let ee=k.length;const ae=et(g.nodeName);for(;ee--;){const re=k[ee],He=re.name,Ve=re.namespaceURI,wt=re.value,ut=et(He),Qt=wt;let gt=He==="value"?Qt:Bv(Qt);if($.attrName=ut,$.attrValue=gt,$.keepAttr=!0,$.forceKeepAttr=void 0,Dt(Q.uponSanitizeAttribute,g,$),gt=$.attrValue,Si&&(ut==="id"||ut==="name")&&zm(gt,wi)!==0&&(Yl(He,g,re),gt=wi+gt),_l&&Ct(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,gt)){Yl(He,g,re);continue}if(ut==="attributename"&&_m(gt,"href")){Yl(He,g,re);continue}if(!$.forceKeepAttr){if(!$.keepAttr){Yl(He,g,re);continue}if(!Ni&&Ct(ay,gt)){Yl(He,g,re);continue}if(xl&&(gt=Nt(gt)),!js(ae,ut,gt)){Yl(He,g,re);continue}gt=Ic(ae,ut,Ve,gt),gt!==Qt&&Ri(g,He,Ve,gt)}}Dt(Q.afterSanitizeAttributes,g,null)},xn=function(g){let k=null;const $=cl(g);for(Dt(Q.beforeSanitizeShadowDOM,g,null);k=$.nextNode();)if(Dt(Q.uponSanitizeShadowNode,k,null),Xl(k,g),Ns(k),Ol(k.content)&&xn(k.content),Z(k)===Pt.element){const ee=fe(k);Ol(ee)&&(Ss(ee),xn(ee))}Dt(Q.afterSanitizeShadowDOM,g,null)},Ss=function(g){const k=[{node:g,shadow:null}];for(;k.length>0;){const $=k.pop();if($.shadow){xn($.shadow);continue}const ee=$.node,re=Z(ee)===Pt.element,He=V(ee);if(He)for(let Ve=He.length-1;Ve>=0;--Ve)k.push({node:He[Ve],shadow:null});if(re){const Ve=W?W(ee):null;if(typeof Ve=="string"&&et(Ve)==="template"){const wt=ee.content;Ol(wt)&&k.push({node:wt,shadow:null})}}if(re){const Ve=fe(ee);Ol(Ve)&&k.push({node:null,shadow:Ve},{node:Ve,shadow:null})}}};return i.sanitize=function(X){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=null,$=null,ee=null,ae=null;if(Sa=!X,Sa&&(X="<!-->"),typeof X!="string"&&!gn(X)&&(X=Xv(X),typeof X!="string"))throw ha("dirty is not a string, aborting");if(!i.isSupported)return X;ds?(Ce=Qn,Ye=Na):Vn(g),(Q.uponSanitizeElement.length>0||Q.uponSanitizeAttribute.length>0)&&(Ce=el(Ce)),Q.uponSanitizeAttribute.length>0&&(Ye=el(Ye)),i.removed=[];const re=rn&&typeof X!="string"&&gn(X);if(re){Ea(X);const wt=le(X);if(typeof wt=="string"){const ut=et(wt);if(!Ce[ut]||Bl[ut])throw jl(X),ha("root node is forbidden and cannot be sanitized in-place")}if(_a(X))throw jl(X),ha("root node is clobbered and cannot be sanitized in-place");try{Ss(X)}catch(ut){throw jl(X),ut}}else if(gn(X))k=In("<!---->"),$=k.ownerDocument.importNode(X,!0),$.nodeType===Pt.element&&$.nodeName==="BODY"||$.nodeName==="HTML"?k=$:k.appendChild($),Ss($);else{if(!al&&!xl&&!nl&&X.indexOf("<")===-1)return ne&&Xt?nt(X):X;if(k=In(X),!k)return al?null:Xt?je:""}k&&hs&&bl(k.firstChild);const He=re?X:k;try{const wt=cl(He);for(;ee=wt.nextNode();)Xl(ee,He),Ns(ee),Ol(ee.content)&&xn(ee.content)}catch(wt){throw re&&(jl(X),ma(i.removed,ut=>{ut.element&&Jn(ut.element)})),wt}if(re)return ma(i.removed,wt=>{wt.element&&Jn(wt.element)}),xl&&Aa(X),X;if(al){if(xl&&Aa(k),yt)for(ae=N.call(k.ownerDocument);k.firstChild;)ae.appendChild(k.firstChild);else ae=k;return(Ye.shadowroot||Ye.shadowrootmode)&&(ae=I.call(r,ae,!0)),ae}let Ve=nl?k.outerHTML:k.innerHTML;return nl&&Ce["!doctype"]&&k.ownerDocument&&k.ownerDocument.doctype&&k.ownerDocument.doctype.name&&Ct(ty,k.ownerDocument.doctype.name)&&(Ve="<!DOCTYPE "+k.ownerDocument.doctype.name+`>
|
|
75
|
-
`+Ve),xl&&(Ve=Nt(Ve)),ne&&Xt?nt(Ve):Ve},i.setConfig=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Vn(X),ds=!0,Qn=Ce,Na=Ye},i.clearConfig=function(){hn=null,ds=!1,Qn=null,Na=null,ne=be,je=""},i.isValidAttribute=function(X,g,k){hn||Vn({});const $=et(X),ee=et(g);return js($,ee,k)},i.addHook=function(X,g){typeof g=="function"&&Gt(Q,X)&&hi(Q[X],g)},i.removeHook=function(X,g){if(Gt(Q,X)){if(g!==void 0){const k=Lv(Q[X],g);return k===-1?void 0:Hv(Q[X],k,1)[0]}return Am(Q[X])}},i.removeHooks=function(X){Gt(Q,X)&&(Q[X]=[])},i.removeAllHooks=function(){Q=qm()},i}var va=op();const ry=[{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 ba(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&&gl(r.scope?.kind==="team"?`/agents/${encodeURIComponent(r.scope.member)}/chat/${r.id}`:`/agents/chats/${r.id}`)}function oy(){const[u,i]=C.useState("claude"),[o,r]=C.useState(!0),[f,h]=C.useState(!1);return a.jsxs("div",{className:"new-chat",children:[a.jsx("div",{className:"page-head",children:a.jsx("h1",{children:"new chat"})}),a.jsxs("section",{className:"panel new-chat-panel",children:[a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"agent"})}),a.jsx("div",{className:"agent-pick",children:ry.map(p=>a.jsxs("button",{className:`agent-pick-btn ${u===p.id?"active":""}`,onClick:()=>i(p.id),children:[a.jsx("b",{children:p.label}),a.jsx("span",{children:p.hint})]},p.id))}),a.jsx("div",{className:"run-opts",style:{padding:"0 16px 14px"},children:a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:o,onChange:p=>r(p.target.checked)}),"kraftwerk-aware",a.jsx("span",{className:"opt-hint",children:"— agent gets workflows + recent runs as context"})]})}),a.jsx("div",{style:{padding:"0 16px 16px"},children:a.jsx("button",{className:"run-btn",disabled:f,onClick:async()=>{h(!0),await ba(u,{kind:o?"kraftwerk":"general"}),h(!1)},children:f?"starting…":"start chat"})})]})]})}function $m({id:u,agentName:i,agentDescription:o}){const[r,f]=C.useState(null),[h,p]=C.useState([]),[x,y]=C.useState(!1);C.useEffect(()=>{let E=!0,w=null;return fetch(`/api/chats/${u}`).then(M=>M.ok?M.json():Promise.reject()).then(M=>{if(!E)return;f(M.meta),p(M.events);const G=M.events[M.events.length-1]?.seq??0;w=new EventSource(`/api/chats/${u}/events?after=${G}`),w.onmessage=K=>{const V=JSON.parse(K.data);p(z=>z.some(fe=>fe.seq===V.seq)?z:[...z,V])}}).catch(()=>E&&y(!0)),()=>{E=!1,w?.close()}},[u]);const v=C.useMemo(()=>{for(let E=h.length-1;E>=0;E--){const w=h[E].type;if(w==="user_message")return!0;if(w==="turn_end"||w==="error")return!1}return!1},[h]),S=C.useMemo(()=>{if(r?.title)return r.title;const E=h.find(w=>w.type==="user_message");return E&&E.type==="user_message"?E.text.replace(/\s+/g," ").trim().slice(0,80):""},[r,h]);return C.useEffect(()=>{if(!r)return;const E=i??(r.scope.kind==="team"?r.scope.member:r.agent);return vm([E,o,S||"new chat"].filter(Boolean).join(" · ")),()=>vm("")},[r,S,i,o]),x?a.jsx("div",{className:"empty",children:"chat not found"}):r?a.jsxs("div",{className:"chat-thread",children:[a.jsxs("div",{className:"detail-head",children:[a.jsx("span",{className:`lamp ${v?"running":"ok"}`}),a.jsx("h1",{children:S||"new chat"}),a.jsx("span",{className:"chip agent",children:r.agent}),r.scope.kind==="run"&&a.jsx(Ue,{href:`/runs/${r.scope.runId}`,className:"chip",children:r.scope.runId}),r.scope.kind==="kraftwerk"&&a.jsx("span",{className:"chip",children:"kraftwerk-aware"}),r.scope.kind==="knowledge"&&a.jsxs(Ue,{href:r.scope.bundle?`/knowledge/${encodeURIComponent(r.scope.bundle)}`:"/knowledge",className:"chip",children:["knowledge",r.scope.bundle?`:${r.scope.bundle}`:""]}),r.scope.kind==="team"&&a.jsxs(Ue,{href:`/agents/${encodeURIComponent(r.scope.member)}/info`,className:"chip",children:["agent:",r.scope.member]}),a.jsx("span",{className:"rid",title:r.cwd,children:r.cwd})]}),a.jsx(dy,{id:u,events:h,busy:v}),a.jsx(gy,{id:u,busy:v,scope:r.scope})]}):a.jsx("div",{className:"empty",children:"loading…"})}function fy(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 x=i[p];f.title&&(x.title=f.title),f.status&&(x.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 dy({id:u,events:i,busy:o}){const r=Yn(),f=C.useMemo(()=>{const x=fy(i);return r?x:x.filter(y=>y.kind!=="tool"&&y.kind!=="thought")},[i,r]),h=C.useRef(null),p=C.useRef(!0);return C.useEffect(()=>{const x=h.current;x&&p.current&&(x.scrollTop=x.scrollHeight)},[f,o]),a.jsxs("div",{className:"chat-scroll",ref:h,onScroll:x=>{const y=x.currentTarget;p.current=y.scrollHeight-y.scrollTop-y.clientHeight<60},children:[f.length===0&&a.jsx("div",{className:"empty",children:"say something — the agent starts on your first message"}),f.map(x=>a.jsx(my,{b:x,chatId:u},x.key)),o&&a.jsxs("div",{className:"chat-working",children:[a.jsx("span",{className:"lamp running"})," working…"]})]})}function hy({text:u}){const i=C.useMemo(()=>va.sanitize(Re.parse(u,{async:!1})),[u]);return a.jsx("div",{className:"msg agent md-body chat-md",dangerouslySetInnerHTML:{__html:i}})}function my({b:u,chatId:i}){switch(u.kind){case"user":return a.jsx("div",{className:"msg user",children:u.text});case"agent":return a.jsx(hy,{text:u.text});case"thought":return a.jsxs("details",{className:"msg thought",children:[a.jsx("summary",{children:"thinking"}),a.jsx("div",{children:u.text})]});case"tool":return a.jsxs("div",{className:`tool-card ${u.status??""}`,children:[a.jsx("span",{className:`lamp ${u.status==="completed"?"ok":u.status==="failed"?"failed":"running"}`}),u.toolKind&&a.jsx("span",{className:"chip tool-kind",children:u.toolKind}),a.jsx("span",{className:"tool-title",children:u.title})]});case"permission":return a.jsx(py,{b:u,chatId:i});case"error":return a.jsxs("div",{className:"msg error",children:[a.jsx(F,{name:"error",className:"ms-sm"})," ",u.text]})}}function py({b:u,chatId:i}){const[o,r]=C.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 a.jsxs("div",{className:`perm-card ${f?"pending":""}`,children:[a.jsxs("div",{className:"perm-title",children:[a.jsx("span",{className:"microlabel",children:"permission"})," ",u.title]}),f?a.jsx("div",{className:"perm-actions",children:u.options.map(p=>a.jsx("button",{className:`perm-btn ${p.kind?.startsWith("allow")?"allow":"deny"}`,disabled:o,onClick:()=>h(p.optionId),children:p.name},p.optionId))}):a.jsx("div",{className:"perm-resolved",children:u.resolved?`→ ${u.options.find(p=>p.optionId===u.resolved)?.name??u.resolved}`:"→ dismissed"})]})}function gy({id:u,busy:i,scope:o}){const[r,f]=C.useState(""),[h,p]=C.useState([]),[x,y]=C.useState(0),[v,S]=C.useState(!1);C.useEffect(()=>{let z=!0;return(async()=>{try{let de=(await fetch("/api/skills").then(te=>te.json())).skills??[];if(o?.kind==="team"){const[te,W]=await Promise.all([fetch(`/api/team/${encodeURIComponent(o.member)}`).then(le=>le.ok?le.json():null).catch(()=>null),fetch(`/api/team/${encodeURIComponent(o.member)}/skills`).then(le=>le.ok?le.json():null).catch(()=>null)]);if(te&&Array.isArray(te.skills)){const le=new Set(te.skills.map(ne=>ne.toLowerCase()));de=de.filter(ne=>le.has(ne.name.toLowerCase()))}const Y=W?.skills??[],Z=new Set(Y.map(le=>le.name.toLowerCase()));de=[...Y,...de.filter(le=>!Z.has(le.name.toLowerCase()))]}z&&p(de)}catch{}})(),()=>{z=!1}},[u]);const E=/^\/([\w-]*)$/.exec(r)?.[1],w=E!==void 0&&!v?h.filter(z=>z.name.toLowerCase().startsWith(E.toLowerCase())):[],M=w.length>0,G=Math.min(x,w.length-1);function K(z){f(`/${z.name} `),y(0)}async function V(){const z=r.trim();!z||i||(f(""),await fetch(`/api/chats/${u}/message`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:z})}).catch(()=>{}))}return a.jsxs("div",{className:"composer",children:[M&&a.jsx("div",{className:"skill-menu",children:w.map((z,fe)=>a.jsxs("button",{className:fe===G?"active":"",onMouseDown:de=>{de.preventDefault(),K(z)},children:[a.jsxs("b",{children:["/",z.name]}),z.description&&a.jsxs("span",{children:[" — ",z.description]}),a.jsx("span",{className:"skill-src",children:z.source})]},z.name))}),a.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:z=>{f(z.target.value),y(0),S(!1)},onKeyDown:z=>{if(M){if(z.key==="ArrowDown")return z.preventDefault(),y((G+1)%w.length);if(z.key==="ArrowUp")return z.preventDefault(),y((G-1+w.length)%w.length);if(z.key==="Tab"||z.key==="Enter")return z.preventDefault(),K(w[G]);if(z.key==="Escape")return z.preventDefault(),S(!0)}z.key==="Enter"&&!z.shiftKey&&(z.preventDefault(),V())}}),i?a.jsxs("button",{className:"stop-btn",onClick:()=>fetch(`/api/chats/${u}/cancel`,{method:"POST"}).catch(()=>{}),children:[a.jsx(F,{name:"stop",className:"ms-sm"})," stop"]}):a.jsxs("button",{className:"run-btn",disabled:!r.trim(),onClick:V,children:[a.jsx(F,{name:"send",className:"ms-sm"})," send"]})]})}function xy({id:u}){const i=$e("/api/runs",!0),o=i?.runs??[];return a.jsxs("div",{className:"runs-screen",children:[a.jsxs("aside",{className:"runs-side",children:[a.jsxs("div",{className:"side-head",children:[a.jsx("span",{className:"microlabel",children:"runs"}),a.jsx("span",{className:"spacer"}),a.jsx("span",{className:"microlabel num",children:o.length})]}),a.jsxs("div",{className:"side-list",children:[o.map(r=>a.jsx(vy,{r,active:r.id===u},r.id)),i&&o.length===0&&a.jsx("div",{className:"viewer-note",children:"no runs yet"})]})]}),a.jsx("div",{className:"runs-main",children:a.jsx(yy,{id:u},u)})]})}function vy({r:u,active:i}){return a.jsxs(Ue,{href:`/runs/${u.id}`,className:`side-row ${i?"active":""}`,children:[a.jsx(Vc,{status:u.status}),a.jsxs("div",{className:"side-row-body",children:[a.jsxs("div",{className:"side-row-top",children:[a.jsx("span",{className:"side-wf",children:u.workflow??"unknown"}),a.jsx("span",{className:"side-when num",children:ga(u.startedAt)})]}),a.jsxs("div",{className:"side-row-sub",children:[a.jsx("span",{className:"side-req",title:u.request,children:u.status==="running"&&u.currentPhase?`${u.currentPhase}`:u.request??""}),a.jsx("span",{className:"side-meta num",children:u.status==="running"?a.jsx(No,{since:u.startedAt}):vi(u.durationMs)})]})]})]})}function yy({id:u}){const i=$e(`/api/runs/${u}`,!0),o=i?.status==="running",[r,f]=C.useState(null),[h,p]=C.useState(!1),x=Yn();if(!i)return a.jsx("div",{className:"empty",children:"loading…"});const y=i.files.some(w=>w.name==="runner.json"),v=r??(o?"run":"artifacts"),S=x?i.files.length:i.files.filter(w=>!Zc(w.name)).length;async function E(){p(!0),await fetch(`/api/runs/${u}/stop`,{method:"POST"}).catch(()=>{})}return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"detail-head",children:[a.jsx(Vc,{status:i.status}),a.jsx("h1",{children:i.workflow?a.jsx(Ue,{href:`/workflows/${encodeURIComponent(i.workflow)}`,title:"open workflow",children:i.workflow}):"unknown workflow"}),a.jsx(Rx,{status:i.status}),y&&a.jsxs("span",{className:"chip sandbox-chip",children:[a.jsx(F,{name:"science",className:"ms-sm"})," sandbox"]}),a.jsx("span",{className:"rid",children:u.replace(/^run-/,"")}),o&&y&&a.jsx("button",{className:"stop-btn",onClick:E,disabled:h,children:h?"stopping…":a.jsxs(a.Fragment,{children:[a.jsx(F,{name:"stop",className:"ms-sm"})," stop"]})}),a.jsx("span",{className:"spacer"}),a.jsx("button",{className:"open-raw",title:"chat with an agent about this run",onClick:()=>{ba("claude",{kind:"run",runId:u})},children:"⌬ discuss"}),a.jsxs("nav",{className:"tabs",children:[a.jsx("button",{className:v==="run"?"active":"",onClick:()=>f("run"),children:"run"}),a.jsxs("button",{className:v==="artifacts"?"active":"",onClick:()=>f("artifacts"),children:["artifacts ",a.jsxs("span",{className:"num",children:["(",S,")"]})]})]})]}),i.request&&a.jsx("p",{className:"detail-req",children:i.request}),v==="run"?a.jsx(by,{run:i,live:o}):a.jsx(wy,{id:u,files:i.files,live:o})]})}function by({run:u,live:i}){return a.jsxs("div",{className:"run-tab",children:[a.jsxs("div",{className:"statgrid",children:[a.jsxs("div",{className:"stat",children:[a.jsx("div",{className:"microlabel",children:"phases"}),a.jsxs("div",{className:"v num",children:[u.phasesDone,u.phasesTotal!=null?` / ${u.phasesTotal}`:""]})]}),a.jsxs("div",{className:"stat",children:[a.jsx("div",{className:"microlabel",children:"duration"}),a.jsx("div",{className:"v num",children:i?a.jsx(No,{since:u.startedAt}):vi(u.durationMs)})]}),a.jsxs("div",{className:"stat",children:[a.jsx("div",{className:"microlabel",children:"cost"}),a.jsx("div",{className:"v num",children:bo(u.costUsd??jy(u.phases))})]}),a.jsxs("div",{className:"stat",children:[a.jsx("div",{className:"microlabel",children:"tokens in / out"}),a.jsxs("div",{className:"v num",children:[Gc(Gm(u.phases,"tokensIn"))," / ",Gc(Gm(u.phases,"tokensOut"))]})]})]}),a.jsxs("section",{className:"panel",children:[a.jsxs("div",{className:"panel-head",children:[a.jsx("span",{className:"microlabel",children:"phase timeline"}),a.jsx("span",{className:"spacer"}),i&&a.jsxs("span",{className:"live-note",children:[a.jsx("span",{className:"lamp running"})," live · polling"]})]}),a.jsx("div",{className:"phases",children:u.phases.map(o=>a.jsx(Ny,{p:o},o.phase))})]})]})}function Gm(u,i){return u.reduce((o,r)=>o+(r[i]??0),0)}function jy(u){return u.reduce((i,o)=>i+(o.costUsd??0),0)}function Ny({p:u}){const i=u.gates.filter(o=>!o.passed);return a.jsxs("div",{className:"phase-row",children:[a.jsx(Vc,{status:u.status}),a.jsxs("div",{className:"phase-top",children:[a.jsx("span",{className:"phase-name",children:u.phase}),u.kind==="agent"?a.jsxs("span",{className:"chip agent",children:[u.agent,u.model?` · ${u.model}`:""]}):a.jsx("span",{className:"chip",children:"script"}),a.jsxs("span",{className:"right num",children:[u.attempts>1&&a.jsxs("span",{children:["att ",u.attempts]}),u.status==="running"?a.jsx(No,{since:u.startedAt}):u.durationMs!=null&&a.jsx("span",{children:vi(u.durationMs)}),u.kind==="agent"&&u.tokensIn!=null&&a.jsxs("span",{children:[Gc(u.tokensIn)," / ",Gc(u.tokensOut)]}),u.costUsd!=null&&u.costUsd>0&&a.jsx("span",{children:bo(u.costUsd)})]})]}),u.status==="running"&&u.lastActivity&&a.jsx("div",{className:"phase-activity",children:u.lastActivity}),u.summary&&u.status!=="running"&&a.jsx("div",{className:"phase-sub",children:u.summary}),u.gates.length>0&&a.jsx("div",{className:"gate-line",children:u.gates.map(o=>a.jsxs("span",{className:`gate ${o.passed?"":"failed"}`,title:o.failure??"",children:[a.jsx(F,{name:o.passed?"check":"close",className:"ms-sm"})," ",o.gate]},o.gate))}),i.map(o=>a.jsx("div",{className:"gate-fail-msg",children:o.failure},o.gate))]})}const fp=new Set(["png","jpg","jpeg","gif","webp","svg"]);function Zc(u){return u==="runner.json"||u.endsWith(".jsonl")||u.endsWith(".log")}function Sy(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)||fp.has(p)?0:Zc(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 wy({id:u,files:i,live:o}){const[r,f]=C.useState(null),h=Yn(),p=C.useMemo(()=>h?i:i.filter(x=>!Zc(x.name)),[i,h]);return C.useEffect(()=>{!h&&r&&Zc(r)&&f(null)},[h,r]),C.useEffect(()=>{r||p.length===0||f(Sy(p))},[p,r]),a.jsxs("div",{className:"art-layout",children:[a.jsxs("section",{className:"panel art-files",children:[a.jsx("div",{className:"panel-head",children:a.jsxs("span",{className:"microlabel",children:["files ",a.jsxs("span",{className:"num",children:["(",p.length,")"]})]})}),a.jsxs("div",{className:"file-list",children:[p.map(x=>a.jsxs("button",{className:`file-row ${r===x.name?"active":""}`,onClick:()=>f(x.name),children:[a.jsx("span",{className:"fname",children:x.name}),a.jsx("span",{className:"fsize num",children:jo(x.size)})]},x.name)),p.length===0&&a.jsx("div",{className:"viewer-note",children:i.length>0?"no result files — raw run files live in expert mode":"no files yet"})]})]}),a.jsxs("section",{className:"panel art-viewer",children:[a.jsxs("div",{className:"panel-head",children:[a.jsx("span",{className:"microlabel",children:r??"viewer"}),a.jsx("span",{className:"spacer"}),r&&a.jsx("a",{className:"open-raw",href:`/api/runs/${u}/file?name=${encodeURIComponent(r)}&raw=1`,target:"_blank",children:"open raw ↗"})]}),r?a.jsx(ky,{id:u,name:r,live:o}):a.jsx("div",{className:"empty",children:"select a file"})]})]})}function ky({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"?a.jsx("div",{className:"viewer",children:a.jsx("div",{className:"viewer-body",children:a.jsx("iframe",{src:f,sandbox:"allow-scripts",allow:"clipboard-write",title:i})})}):r==="pdf"?a.jsx("div",{className:"viewer",children:a.jsx("div",{className:"viewer-body",children:a.jsx("iframe",{src:f,title:i})})}):fp.has(r)?a.jsx("div",{className:"viewer",children:a.jsx("div",{className:"viewer-body",children:a.jsx("img",{src:f,alt:i})})}):r==="md"||r==="markdown"?a.jsx(Ty,{id:u,name:i,live:o}):a.jsx(Ey,{id:u,name:i,live:o})}function Ty({id:u,name:i,live:o}){const[r,f]=C.useState("rendered"),h=$e(`/api/runs/${u}/file?name=${encodeURIComponent(i)}`,o),p=C.useMemo(()=>h?va.sanitize(Re.parse(h.content,{async:!1})):"",[h?.content]);return a.jsxs("div",{className:"viewer",children:[a.jsxs("div",{className:"viewer-note md-toolbar",children:[a.jsxs("div",{className:"tabs",children:[a.jsx("button",{className:r==="rendered"?"active":"",onClick:()=>f("rendered"),children:"rendered"}),a.jsx("button",{className:r==="source"?"active":"",onClick:()=>f("source"),children:"source"})]}),h?.truncated&&a.jsxs("span",{children:["large file — showing the last ",jo(4e5)]})]}),a.jsx("div",{className:"viewer-body",children:h?r==="rendered"?a.jsx("div",{className:"md-body",dangerouslySetInnerHTML:{__html:p}}):a.jsx("pre",{children:h.content||"(empty)"}):a.jsx("pre",{children:"loading…"})})]})}function Ey({id:u,name:i,live:o}){const r=$e(`/api/runs/${u}/file?name=${encodeURIComponent(i)}`,o);return a.jsxs("div",{className:"viewer",children:[r?.truncated&&a.jsxs("div",{className:"viewer-note",children:["large file — showing the last ",jo(4e5)]}),a.jsx("div",{className:"viewer-body",children:a.jsx("pre",{children:r?r.content||"(empty)":"loading…"})})]})}function Ay(){const u=$e("/api/workflows",!1),i=u?.workflows??[];return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"page-head",children:[a.jsx("h1",{children:"Workflows"}),a.jsxs("span",{className:"count num",children:[i.length," discovered"]}),u?.root&&a.jsx("span",{className:"count mono",children:u.root})]}),u&&i.length===0&&a.jsxs("div",{className:"empty",children:["No workflows found — expected ",a.jsx("code",{children:"src/workflows/"})," or ",a.jsx("code",{children:"workflows/"})," ","next to the output folder."]}),a.jsx("div",{className:"wf-grid",children:i.map(o=>a.jsxs(Ue,{href:`/workflows/${o.slug}`,className:"wf-card",children:[a.jsxs("div",{className:"wf-card-head",children:[a.jsx("span",{className:"wf-name",children:o.name??o.slug}),o.error&&a.jsx("span",{className:"status-word failed",children:"broken"})]}),a.jsx("p",{className:"wf-desc",children:o.error??o.description??""}),a.jsxs("div",{className:"wf-meta num",children:[a.jsxs("span",{children:[o.agents," agents"]}),a.jsx("span",{children:"·"}),a.jsxs("span",{children:[o.steps," steps"]})]})]},o.slug))})]})}function _y({slug:u}){const i=$e(`/api/workflows/${encodeURIComponent(u)}`,!1),o=$e("/api/runs",!1);if(!i)return a.jsx("div",{className:"empty",children:"loading…"});if(i.error)return a.jsxs(a.Fragment,{children:[a.jsx(Ym,{slug:i.slug}),a.jsxs("div",{className:"empty",children:[a.jsx("span",{className:"status-word failed",children:"broken workflow"}),a.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 a.jsxs(a.Fragment,{children:[a.jsx(Ym,{slug:i.slug}),a.jsxs("div",{className:"detail-head",children:[a.jsx("h1",{children:i.name??i.slug}),a.jsx("span",{className:"rid mono",children:i.dir})]}),i.description&&a.jsx("p",{className:"detail-req",children:i.description}),a.jsxs("div",{className:"statgrid",children:[a.jsxs("div",{className:"stat",children:[a.jsx("div",{className:"microlabel",children:"agents"}),a.jsx("div",{className:"v num",children:i.agents.length})]}),a.jsxs("div",{className:"stat",children:[a.jsx("div",{className:"microlabel",children:"steps"}),a.jsxs("div",{className:"v num",children:[i.steps.length," ",a.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&&a.jsxs("div",{className:"stat",style:{maxWidth:420},children:[a.jsx("div",{className:"microlabel",children:"workspace"}),a.jsx("div",{className:"wf-workspace mono",children:i.workspace})]})]}),a.jsx(zy,{slug:i.slug,lastRequest:f[0]?.request}),a.jsxs("section",{className:"panel",style:{marginBottom:18},children:[a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"agents"})}),a.jsxs("div",{className:"agent-grid",children:[i.agents.map(h=>a.jsx(Ry,{a:h,idx:r.get(h.id)??0},h.id)),i.agents.length===0&&a.jsx("div",{className:"viewer-note",children:"no agents — script-only workflow"})]})]}),a.jsxs("div",{className:"columns",children:[a.jsxs("section",{className:"panel",children:[a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"pipeline"})}),a.jsx("div",{className:"pipeline",children:i.steps.map((h,p)=>a.jsx(Cy,{s:h,i:p,idx:h.agent?r.get(h.agent)??0:null},h.name))})]}),a.jsxs("div",{style:{display:"grid",gap:18},children:[a.jsxs("section",{className:"panel",children:[a.jsx("div",{className:"panel-head",children:a.jsxs("span",{className:"microlabel",children:["folder ",a.jsxs("span",{className:"num",children:["(",i.files.length," files)"]})]})}),a.jsx("div",{className:"file-list",children:i.files.map(h=>a.jsx("div",{className:"file-row",style:{cursor:"default"},children:a.jsx("span",{className:"fname",children:h})},h))})]}),a.jsxs("section",{className:"panel",children:[a.jsx("div",{className:"panel-head",children:a.jsxs("span",{className:"microlabel",children:["recent runs ",a.jsxs("span",{className:"num",children:["(",f.length,")"]})]})}),a.jsxs("div",{className:"file-list",children:[f.map(h=>a.jsxs(Ue,{href:`/runs/${h.id}`,className:"file-row",children:[a.jsx(Vc,{status:h.status}),a.jsx("span",{className:"fname",children:h.id.replace(/^run-/,"")}),a.jsxs("span",{className:"fsize num",children:[vi(h.durationMs)," · ",bo(h.costUsd)," · ",ga(h.startedAt)]})]},h.id)),f.length===0&&a.jsx("div",{className:"viewer-note",children:"no runs of this workflow yet"})]})]})]})]})]})}function zy({slug:u,lastRequest:i}){const[o,r]=C.useState(""),[f,h]=C.useState(!0),[p,x]=C.useState(!1),[y,v]=C.useState(!1),[S,E]=C.useState(null),w=$e(`/api/workflows/${encodeURIComponent(u)}/run`,!1);C.useEffect(()=>{!o&&i&&r(i)},[i]);const M=w?.available&&w?.image,G=w?w.available?w.image?"isolated container per run":"image missing — run `kraftwerk runner build`":"Docker not running — sandbox unavailable":"";async function K(){if(!(!o.trim()||y)){v(!0),E(null);try{const V=await fetch(`/api/workflows/${encodeURIComponent(u)}/run`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({request:o.trim(),sandbox:f,ssh:p})}),z=await V.json();if(!V.ok)throw new Error(z.error??`HTTP ${V.status}`);gl(`/runs/${z.runId}`)}catch(V){E(V.message),v(!1)}}}return a.jsxs("section",{className:"panel run-panel",style:{marginBottom:18},children:[a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"trigger run"})}),a.jsxs("div",{className:"run-form",children:[a.jsx("input",{type:"text",value:o,placeholder:"request — topic, URL, host …",onChange:V=>r(V.target.value),onKeyDown:V=>V.key==="Enter"&&K()}),a.jsx("button",{className:"run-btn",onClick:K,disabled:y||!o.trim()||f&&!M,children:y?"starting…":a.jsxs(a.Fragment,{children:[a.jsx(F,{name:"play_arrow",className:"ms-sm"})," ",f?"run in sandbox":"run locally"]})})]}),a.jsxs("div",{className:"run-opts",children:[a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:f,onChange:V=>h(V.target.checked)}),"docker sandbox ",G&&a.jsxs("span",{className:"opt-hint",children:["— ",G]})]}),a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:p,onChange:V=>x(V.target.checked),disabled:!f}),"forward SSH agent"]})]}),S&&a.jsx("div",{className:"gate-fail-msg",children:S})]})}function Ym({slug:u}){return a.jsxs("nav",{className:"crumbs",children:[a.jsx(Ue,{href:"/workflows",children:"workflows"}),a.jsx("span",{className:"sep",children:"/"}),a.jsx("span",{className:"mono",children:u})]})}function Ry({a:u,idx:i}){return a.jsxs("div",{className:`agent-card aid-${i}`,children:[a.jsxs("div",{className:"agent-head",children:[a.jsx("span",{className:"agent-dot"}),a.jsx("b",{children:u.name??u.id}),a.jsxs("code",{className:"agent-id",children:["[",u.id,"]"]}),a.jsx("span",{className:"spacer"}),a.jsxs("span",{className:"chip",children:[u.model??"default",u.effort?` · ${u.effort}`:""]})]}),u.tools.length>0&&a.jsx("div",{className:"agent-tools",children:u.tools.map(o=>a.jsx("span",{className:"tool-chip",children:o},o))}),u.persona&&a.jsx("p",{className:"agent-persona",children:u.persona})]})}function Cy({s:u,i,idx:o}){const r=u.kind==="script"?u.script:u.prompt;return a.jsxs("div",{className:"step-node",children:[a.jsx("div",{className:`step-index num ${o!=null?`aid-${o}`:"is-script"}`,children:i+1}),a.jsxs("div",{className:"step-body",children:[a.jsxs("div",{className:"phase-top",children:[a.jsx("span",{className:"phase-name",children:u.name}),u.kind==="agent"?a.jsxs("span",{className:`chip agent-chip aid-${o??0}`,children:["agent · ",u.agent]}):a.jsxs("span",{className:"chip",children:["script",u.sourceRef?` · ${u.sourceRef}`:""]})]}),r&&a.jsxs("details",{className:"step-source",children:[a.jsx("summary",{children:u.kind==="agent"?"prompt":"script"}),a.jsx("pre",{children:r})]}),u.gates.length>0&&a.jsx("div",{className:"gate-line",children:u.gates.map(f=>a.jsxs("span",{className:"gate neutral",children:["⛨ ",f]},f))})]})]})}const Oy=u=>u==="ok"?"ok":u==="running"?"running":u==="aborted"?"aborted":"failed",Dy=u=>u==="ok"?"done":u==="running"?"working":u==="aborted"?"stopped":"failed";function My(u){return u.scope.kind==="team"?`/agents/${u.scope.member}/chat/${u.id}`:`/agents/chats/${u.id}`}function Xm(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 Qm(u){return u.length>64?`${u.slice(0,46)}…${u.slice(-14)}`:u}function Uy(){const u=$e("/api/runs",!1),i=$e("/api/chats",!1),o=$e("/api/knowledge",!1),r=$e("/api/team",!1),f=$e("/api/workflows",!1),h=$e("/api/skills",!1),p=$e("/api/meta",!1),[x,y]=C.useState("all"),v=u?.runs??[],S=i?.chats??[],E=o?.bundles??[],w=(h?.skills??[]).filter(K=>K.source==="workspace"),M=[[f?.workflows.length,"workflows","/workflows"],[u?v.length:void 0,"runs","/runs"],[o?E.length:void 0,"bundles","/knowledge"],[h?w.length:void 0,"skills","/skills"],[i?S.length:void 0,"chats","/agents/chats"]],G=v.filter(K=>K.status==="failed"&&Date.now()-Date.parse(K.updatedAt)<24*36e5);return a.jsxs("div",{className:"dash",children:[a.jsxs("div",{className:"page-head",children:[a.jsxs("h1",{children:[p?.projectIcon?`${p.projectIcon} `:"",p?.projectName||"workspace"]}),a.jsx("span",{className:"spacer"}),a.jsx("span",{className:"dash-mini",children:M.map(([K,V,z])=>a.jsxs(Ue,{href:z,children:[a.jsx("b",{className:"num",children:K??"…"})," ",V]},V))}),a.jsx(Ly,{workflows:f?.workflows??[]})]}),a.jsx(Hy,{members:r?.members.filter(K=>!K.archived),chats:S}),G.length>0&&x!=="failed"&&a.jsxs("button",{className:"dash-alert",onClick:()=>y("failed"),children:["⚠ ",G.length," run",G.length===1?"":"s"," failed in the last 24 h — review"]}),a.jsx($y,{runs:v,chats:S,bundles:E,members:r?.members??[],workflows:f?.workflows??[],filter:x,setFilter:y})]})}function Ly({workflows:u}){const[i,o]=C.useState(!1);return C.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]),a.jsxs("div",{className:"dash-actions",children:[a.jsxs("button",{className:"run-btn dash-newchat",onClick:()=>gl("/agents/chats"),children:[a.jsx(F,{name:"forum"})," new chat"]}),a.jsxs("span",{className:"wf-pick-wrap",children:[a.jsxs("button",{className:"run-btn tonal","aria-haspopup":"menu","aria-expanded":i,onClick:()=>o(r=>!r),children:[a.jsx(F,{name:"play_arrow"})," run workflow"]}),i&&a.jsxs("div",{className:"wf-pick-pop",role:"menu",children:[u.length===0&&a.jsx("span",{className:"wf-pick-empty",children:"no workflows yet"}),u.map(r=>a.jsxs(Ue,{href:`/workflows/${encodeURIComponent(r.slug)}`,className:"wf-pick-item",role:"menuitem",children:[a.jsx("span",{className:"wf-pick-name",children:r.name??r.slug}),r.description&&a.jsx("span",{className:"wf-pick-desc",children:r.description})]},r.slug))]})]})]})}function Hy({members:u,chats:i}){const o=Yn();return u&&u.length===0?a.jsx("section",{className:"panel dash-team-empty",children:a.jsx("div",{className:"viewer-note",children:o?a.jsxs(a.Fragment,{children:["No agent teammates yet — ",a.jsx(Ue,{href:"/agents/new",children:"create your first agent"})," and it will show up here, ready to chat."]}):a.jsx(a.Fragment,{children:"No agent teammates yet — ask an expert-mode user to create one."})})}):a.jsx("div",{className:"dash-team",children:(u??[]).map(r=>{const h=i.filter(x=>x.scope.kind==="team"&&x.scope.member===r.slug).find(x=>x.busy),p=()=>gl(`/agents/${encodeURIComponent(r.slug)}`);return a.jsxs("div",{className:"dash-member",role:"link",tabIndex:0,onClick:p,onKeyDown:x=>{x.key==="Enter"&&p()},children:[a.jsxs("div",{className:"dash-member-id",children:[a.jsxs("span",{className:"agent-avatar lg",children:[a.jsx("span",{"aria-hidden":!0,children:r.emoji}),a.jsx("span",{className:`lamp ${h?"running":"idle"}`})]}),a.jsx("span",{className:"dash-member-name",children:r.name}),r.description&&a.jsx("span",{className:"dash-member-desc",children:r.description})]}),a.jsxs("div",{className:"dash-member-foot",children:[a.jsx("span",{className:"dash-member-state",children:h&&a.jsx(Ue,{href:`/agents/${encodeURIComponent(r.slug)}/chat/${h.id}`,onClick:x=>x.stopPropagation(),children:"working…"})}),a.jsxs("button",{className:"run-btn dash-chat-btn",onClick:x=>{x.stopPropagation(),ba("claude",{kind:"team",member:r.slug})},children:[a.jsx(F,{name:"chat_bubble",className:"ms-sm"})," chat"]})]})]},r.slug)})})}function By(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 qy=[["all","all"],["run","runs"],["session","chats"],["knowledge","knowledge"]];function $y({runs:u,chats:i,bundles:o,members:r,workflows:f,filter:h,setFilter:p}){const x=Yn(),y=C.useMemo(()=>{const S=[],E=M=>M?f.find(G=>G.slug===M)?.name??M:void 0;for(const M of u)S.push({at:M.updatedAt,kind:"run",emoji:"⚙️",title:E(M.workflow)??M.id,sub:M.request??"",href:`/runs/${M.id}`,lamp:Oy(M.status),status:Dy(M.status)});for(const M of i){const G=M.scope.kind==="team"?r.find(K=>M.scope.kind==="team"&&K.slug===M.scope.member):void 0;S.push({at:M.updatedAt,kind:"session",emoji:G?G.emoji||"🤖":"💬",title:G?G.name:M.title||"new chat",sub:G?`${M.title||"new chat"}${x?` · ${M.agent}`:""}`:x?`${M.agent} · ${Xm(M)}`:Xm(M),href:My(M),lamp:M.busy?"running":"ok",status:M.busy?"working":void 0})}for(const M of o)M.updatedAt&&S.push({at:M.updatedAt,kind:"knowledge",emoji:"📚",title:M.name,sub:`${M.concepts} concepts`,href:`/knowledge/${encodeURIComponent(M.name)}`,lamp:"ok"});return(h==="all"?S:h==="failed"?S.filter(M=>M.kind==="run"&&M.lamp==="failed"):S.filter(M=>M.kind===h)).sort((M,G)=>{const K=+(G.lamp==="running")-+(M.lamp==="running");return K!==0?K:G.at.localeCompare(M.at)}).slice(0,15)},[u,i,o,r,x,h]);let v="";return a.jsxs("section",{className:"panel dash-feed",children:[a.jsxs("div",{className:"panel-head",children:[a.jsx("span",{className:"microlabel",children:"activity"}),a.jsx("span",{className:"spacer"}),a.jsxs("span",{className:"dash-feed-filter",children:[qy.map(([S,E])=>a.jsx("button",{className:`feed-chip ${h===S?"on":""}`,onClick:()=>p(S),children:E},S)),h==="failed"&&a.jsxs("button",{className:"feed-chip on failed",onClick:()=>p("all"),children:["failed ",a.jsx(F,{name:"close",className:"ms-sm"})]})]})]}),y.length===0?a.jsx("div",{className:"viewer-note",children:h==="all"?"nothing yet — run a workflow or start a session":"nothing here for this filter"}):a.jsx("div",{className:"m3-list",children:y.map(S=>{const E=By(S),w=E!==v?E:null;return v=E,a.jsxs("div",{className:"feed-group",children:[w&&a.jsx("div",{className:"feed-day microlabel",children:w}),a.jsxs(Ue,{href:S.href,className:"m3-row m3-link",children:[a.jsxs("span",{className:"agent-avatar",children:[a.jsx("span",{"aria-hidden":!0,children:S.emoji}),S.lamp==="running"&&a.jsx("span",{className:"lamp running"})]}),a.jsx("span",{className:`chip dash-kind ${S.kind}`,children:S.kind==="session"?"chat":S.kind}),a.jsxs("span",{className:"m3-body",children:[a.jsx("span",{className:"m3-head",children:Qm(S.title)}),S.sub&&a.jsx("span",{className:"m3-sub",children:Qm(S.sub)})]}),S.status&&a.jsx("span",{className:`chip status ${S.lamp}`,children:S.status}),a.jsx("span",{className:"side-when num",title:new Date(S.at).toLocaleString(),children:zx(S.at)}),a.jsx("span",{className:"m3-chev",children:a.jsx(F,{name:"chevron_right"})})]})]},`${S.kind}:${S.href}:${S.at}`)})})]})}async function dp(u){const i=window.open("","_blank");if(!i)return;i.document.write(`<title>${kl(u)}</title><body style="font-family:system-ui;padding:40px;color:#555">preparing ${kl(u)}…</body>`);let o,r="";try{const[y,v]=await Promise.all([fetch(`/api/knowledge/${encodeURIComponent(u)}`).then(S=>S.json()),fetch("/api/meta").then(S=>S.json()).catch(()=>({}))]);r=v.projectName??"",o=await Promise.all(y.concepts.map(S=>fetch(`/api/knowledge/${encodeURIComponent(u)}/concept?id=${encodeURIComponent(S.id)}`).then(E=>E.json())))}catch{i.document.body.textContent=`could not load bundle "${u}"`;return}const f=o.map(y=>{const v=[y.type,y.generated?.at?`updated ${y.generated.at.slice(0,10)}`:"",y.trustTier==="human-reviewed"?"human-reviewed":"",(y.tags??[]).map(K=>`#${K}`).join(" ")].filter(Boolean).join(" · "),{md:S,notes:E}=Gy(y.body??""),w=`<header>
|
|
77
|
-
<h1>${kl(y.title||y.id)}</h1>
|
|
78
|
-
<div class="meta">${kl(v)}</div>
|
|
79
|
-
</header>`,M=Yy(w+va.sanitize(Re.parse(S,{async:!1}))),G=E.length?`<ol class="notes">${E.map(K=>`<li id="fn-${kl(K.id)}">${va.sanitize(Re.parseInline(K.text,{async:!1}))}</li>`).join("")}</ol>`:"";return`<article>
|
|
80
|
-
${M}
|
|
81
|
-
${G}
|
|
82
|
-
</article>`}).join(`
|
|
83
|
-
`),h=new Date().toISOString().slice(0,10),p=r?`${kl(r)} · ${kl(u)}`:kl(u),x=`<!doctype html>
|
|
84
|
-
<html>
|
|
85
|
-
<head>
|
|
86
|
-
<meta charset="utf-8">
|
|
87
|
-
<title>${kl(u)}</title>
|
|
88
|
-
<style>
|
|
89
|
-
:root { color-scheme: light; }
|
|
90
|
-
@page { size: A4; margin: 16mm 48mm 18mm 20mm; }
|
|
91
|
-
* { box-sizing: border-box; }
|
|
92
|
-
body {
|
|
93
|
-
margin: 0; background: #e9e5df;
|
|
94
|
-
font: 10.5pt/1.45 -apple-system, "Segoe UI", system-ui, sans-serif; color: #191919;
|
|
95
|
-
}
|
|
96
|
-
.no-print {
|
|
97
|
-
position: sticky; top: 0; z-index: 1; display: flex; gap: 12px; align-items: center;
|
|
98
|
-
padding: 10px 24px; background: #f4efea; border-bottom: 1px solid #ded6cb; font-size: 13px;
|
|
99
|
-
}
|
|
100
|
-
.no-print button {
|
|
101
|
-
font: inherit; font-weight: 600; padding: 6px 16px; cursor: pointer;
|
|
102
|
-
background: #191919; color: #fff; border: none; border-radius: 999px;
|
|
103
|
-
}
|
|
104
|
-
/* Screen preview mimics the printed page incl. the note gutter. */
|
|
105
|
-
.sheet {
|
|
106
|
-
width: 210mm; margin: 24px auto; padding: 16mm 48mm 18mm 20mm; background: #fff;
|
|
107
|
-
border-collapse: separate; border-spacing: 0; box-shadow: 0 2px 12px rgba(0,0,0,.12);
|
|
108
|
-
}
|
|
109
|
-
.sheet > thead > tr > td, .sheet > tbody > tr > td { padding: 0; vertical-align: top; }
|
|
110
|
-
.runhead {
|
|
111
|
-
display: flex; justify-content: space-between; gap: 16px;
|
|
112
|
-
font-size: 8.5pt; color: #5e5b56; letter-spacing: 0.02em; text-transform: uppercase;
|
|
113
|
-
padding-bottom: 4px; border-bottom: 1px solid #191919; margin-bottom: 14px;
|
|
114
|
-
}
|
|
115
|
-
.cover { margin: 0 0 2px; font-size: 20pt; letter-spacing: -0.01em; line-height: 1.2; }
|
|
116
|
-
.cover-sub { color: #5e5b56; font-size: 9pt; margin-bottom: 18px; }
|
|
117
|
-
article { margin-top: 30px; }
|
|
118
|
-
article:first-of-type { margin-top: 0; }
|
|
119
|
-
article header { break-inside: avoid; break-after: avoid; }
|
|
120
|
-
article h1 { font-size: 15pt; margin: 0 0 1px; letter-spacing: -0.01em; line-height: 1.25; }
|
|
121
|
-
article .meta { color: #5e5b56; font-size: 8.5pt; margin-bottom: 10px; }
|
|
122
|
-
.keep { break-inside: avoid; }
|
|
123
|
-
h2 { font-size: 12pt; margin: 14px 0 4px; break-after: avoid; }
|
|
124
|
-
h3 { font-size: 10.5pt; margin: 10px 0 3px; break-after: avoid; }
|
|
125
|
-
h4 { font-size: 10.5pt; font-weight: 600; font-style: italic; margin: 8px 0 2px; }
|
|
126
|
-
p, ul, ol { margin: 0 0 7px; }
|
|
127
|
-
li { margin: 0 0 2px; }
|
|
128
|
-
a { color: inherit; text-decoration-color: #b8b2aa; text-underline-offset: 2px; }
|
|
129
|
-
ul, ol { padding-left: 18px; }
|
|
130
|
-
hr { border: 0; border-top: 1px solid #ded6cb; margin: 10px 0; }
|
|
131
|
-
code { font: 9pt/1.4 ui-monospace, monospace; background: #f2ede7; padding: 0 4px; border-radius: 3px; }
|
|
132
|
-
pre { background: #f2ede7; padding: 8px 10px; border-radius: 6px; overflow-x: auto; white-space: pre-wrap; margin: 0 0 8px; }
|
|
133
|
-
pre code { background: none; padding: 0; }
|
|
134
|
-
table.md { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: 9pt; line-height: 1.35; }
|
|
135
|
-
table.md th, table.md td { padding: 4px 10px 4px 0; text-align: left; vertical-align: top; border-bottom: 1px solid #e6e0d8; }
|
|
136
|
-
table.md th { font-weight: 600; border-bottom: 1px solid #191919; }
|
|
137
|
-
table.md .nw { white-space: nowrap; }
|
|
138
|
-
table.md tr:last-child td { border-bottom: 1px solid #191919; }
|
|
139
|
-
.fnref { font-size: 7pt; line-height: 0; margin-left: 1px; }
|
|
140
|
-
.fnref + .fnref::before { content: ","; }
|
|
141
|
-
.notes { margin: 12px 0 0; padding: 8px 0 0 16px; border-top: 1px solid #ded6cb; font-size: 8.5pt; color: #5e5b56; }
|
|
142
|
-
.notes li { margin: 0 0 1px; }
|
|
143
|
-
blockquote { margin: 8px 0; padding: 1px 12px; border-left: 3px solid #ded6cb; color: #5e5b56; }
|
|
144
|
-
img { max-width: 100%; }
|
|
145
|
-
pre, blockquote, table, img { break-inside: avoid; }
|
|
146
|
-
@media print {
|
|
147
|
-
body { background: #fff; }
|
|
148
|
-
.no-print { display: none; }
|
|
149
|
-
.sheet { width: 100%; margin: 0; padding: 0; box-shadow: none; }
|
|
150
|
-
.runhead { margin-bottom: 10px; }
|
|
151
|
-
}
|
|
152
|
-
</style>
|
|
153
|
-
</head>
|
|
154
|
-
<body>
|
|
155
|
-
<div class="no-print">
|
|
156
|
-
<span>Use “Save as PDF” in the print dialog.</span>
|
|
157
|
-
<button onclick="window.print()">print / save as PDF</button>
|
|
158
|
-
</div>
|
|
159
|
-
<table class="sheet">
|
|
160
|
-
<thead><tr><td>
|
|
161
|
-
<div class="runhead"><span>${p}</span><span>${h}</span></div>
|
|
162
|
-
</td></tr></thead>
|
|
163
|
-
<tbody><tr><td>
|
|
164
|
-
<h1 class="cover">${kl(u)}</h1>
|
|
165
|
-
<div class="cover-sub">${r?`${kl(r)} · `:""}knowledge bundle · ${o.length} concept${o.length===1?"":"s"} · exported ${h}</div>
|
|
166
|
-
${f}
|
|
167
|
-
</td></tr></tbody>
|
|
168
|
-
</table>
|
|
169
|
-
<script>setTimeout(() => window.print(), 400);<\/script>
|
|
170
|
-
</body>
|
|
171
|
-
</html>`;i.location.href=URL.createObjectURL(new Blob([x],{type:"text/html"}))}function Gy(u){const i=[];return{md:u.replace(/^\[\^([^\]]+)\]:[ \t]*(.+)$/gm,(r,f,h)=>(i.push({id:f,text:h.trim()}),"")).replace(/\[\^([^\]]+)\]/g,(r,f)=>{const h=i.findIndex(p=>p.id===f);return h>=0?`<sup class="fnref">${h+1}</sup>`:""}),notes:i}}function Yy(u){const i=new DOMParser().parseFromString(u,"text/html");for(const o of i.querySelectorAll("table")){o.classList.add("md");for(const r of o.querySelectorAll("th, td"))(r.textContent??"").trim().length<=14&&r.classList.add("nw")}for(const o of[5,4,3,2,1])for(const r of Array.from(i.body.querySelectorAll(`:scope > h${o}`))){const f=i.createElement(`h${o+1}`);f.innerHTML=r.innerHTML,r.replaceWith(f)}for(const o of Array.from(i.body.querySelectorAll(":scope > header, :scope > h2, :scope > h3, :scope > h4"))){const r=o.nextElementSibling;if(!r||/^H[1-6]$/.test(r.tagName))continue;const f=i.createElement("div");f.className="keep",o.replaceWith(f),f.append(o,r)}return i.body.innerHTML}function kl(u){return u.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Xy({bundle:u,conceptId:i}){const o=$e("/api/knowledge",!1),r=o?.bundles??[];return a.jsxs("div",{className:"runs-screen",children:[a.jsxs("aside",{className:"runs-side",children:[a.jsxs("div",{className:"side-head",children:[a.jsx("span",{className:"microlabel",children:"bundles"}),a.jsx("span",{className:"spacer"}),a.jsxs(Ue,{href:"/knowledge",className:"open-raw",children:[a.jsx(F,{name:"add",className:"ms-sm"})," new"]})]}),a.jsxs("div",{className:"side-list",children:[r.map(f=>a.jsxs(Ue,{href:`/knowledge/${encodeURIComponent(f.name)}`,className:`side-row ${f.name===u?"active":""}`,children:[a.jsx("span",{className:"lamp ok"}),a.jsxs("div",{className:"side-row-body",children:[a.jsxs("div",{className:"side-row-top",children:[a.jsx("span",{className:"side-wf",children:f.name}),a.jsx("span",{className:"side-when num",children:f.concepts})]}),a.jsx("div",{className:"side-row-sub",children:a.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&&a.jsx("div",{className:"viewer-note",children:"no bundles yet"})]})]}),a.jsx("div",{className:"runs-main",children:u&&i?a.jsx(Wy,{bundle:u,conceptId:i},`${u}/${i}`):u?a.jsx(Zy,{name:u},u):a.jsx(Qy,{root:o?.root})})]})}function Qy({root:u}){const[i,o]=C.useState(""),[r,f]=C.useState(""),[h,p]=C.useState(!1);async function x(){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 a.jsxs("div",{className:"new-chat",children:[a.jsx("div",{className:"page-head",children:a.jsx("h1",{children:"context & knowledge"})}),a.jsxs("section",{className:"panel new-chat-panel",children:[a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"what lives here"})}),a.jsxs("div",{className:"know-intro",children:["Curated knowledge as ",a.jsx("b",{children:"OKF bundles"})," (Open Knowledge Format v0.2): plain markdown files with YAML frontmatter",u?a.jsxs(a.Fragment,{children:[" under ",a.jsx("code",{children:u})]}):null,", readable by humans and agents, diffable in git. Agents write through"," ",a.jsx("code",{children:"kraftwerk knowledge put"})," (provenance is stamped automatically); you raise a concept's trust tier by verifying it here."]}),a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"new bundle"})}),a.jsxs("div",{className:"know-newbundle",children:[a.jsx("input",{value:i,placeholder:"bundle name, e.g. customer-support",onChange:y=>o(y.target.value),onKeyDown:y=>y.key==="Enter"&&void x()}),a.jsx("button",{className:"run-btn",disabled:!i.trim()||h,onClick:x,children:h?"creating…":"create"})]}),r&&a.jsxs("div",{className:"msg error",children:[a.jsx(F,{name:"error",className:"ms-sm"})," ",r]})]})]})}function xo({tier:u}){return a.jsx("span",{className:`chip trust ${u}`,children:u})}function Zy({name:u}){const i=$e(`/api/knowledge/${encodeURIComponent(u)}`,!1);return i?"error"in i?a.jsx("div",{className:"empty",children:"bundle not found"}):a.jsxs("div",{className:"member-view",children:[a.jsxs("div",{className:"page-head",children:[a.jsx("h1",{children:u}),a.jsxs("span",{className:"count",children:[i.concepts.length," concepts"]}),a.jsx("span",{className:"spacer"}),a.jsxs("button",{className:"open-raw",onClick:()=>{dp(u)},children:[a.jsx(F,{name:"picture_as_pdf",className:"ms-sm"})," export PDF"]}),a.jsx("button",{className:"run-btn",onClick:()=>{ba("claude",{kind:"knowledge",bundle:u})},children:"curate in chat"})]}),a.jsx("section",{className:"panel",children:i.concepts.length===0?a.jsxs("div",{className:"viewer-note",children:["No concepts yet — start a chat to author some, or write one with"," ",a.jsxs("code",{children:["kraftwerk knowledge put ",u,"/<path>"]}),"."]}):a.jsx("div",{className:"m3-list",children:Fy(i.concepts).map(({folder:o,concepts:r})=>a.jsxs(C.Fragment,{children:[o&&a.jsxs("div",{className:"m3-subhead",children:[o,"/"]}),r.map(f=>a.jsxs(Ue,{href:`/knowledge/${encodeURIComponent(u)}/${f.id}`,className:"m3-row m3-link",children:[a.jsx("span",{className:"m3-ico",children:a.jsx(F,{name:Vy(f.type)})}),a.jsxs("span",{className:"m3-body",children:[a.jsxs("span",{className:"m3-head",children:[f.title,f.status!=="stable"&&a.jsx("span",{className:`chip ${f.status}`,children:f.status}),f.stale&&a.jsx("span",{className:"chip stale",children:"stale"}),f.error&&a.jsx("span",{className:"chip stale",title:f.error,children:"invalid"})]}),a.jsxs("span",{className:"m3-sub",children:[a.jsxs("code",{children:[o?f.id.slice(o.length+1):f.id,".md"]})," · ",f.type??"untyped"]})]}),a.jsx(xo,{tier:f.trustTier}),a.jsx("span",{className:"m3-chev",children:a.jsx(F,{name:"chevron_right",className:"ms-sm"})})]},f.id))]},o||"."))})}),i.log&&a.jsx(Iy,{name:u,log:i.log})]}):a.jsx("div",{className:"empty",children:"loading…"})}function Vy(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 Ky(u){const i=[];for(const o of u.split(`
|
|
172
|
-
`)){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 Jy(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(a.jsx(Ue,{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 Iy({name:u,log:i}){const o=Ky(i),[r,f]=C.useState(!1);return a.jsxs("section",{className:"panel",children:[a.jsxs("div",{className:"panel-head",children:[a.jsx("span",{className:"microlabel",children:"activity"}),a.jsx("span",{className:"spacer"}),a.jsx("button",{className:"open-raw",onClick:()=>f(!r),children:r?"timeline":"raw log"})]}),r||o.length===0?a.jsx("div",{className:"viewer-body",children:a.jsx("pre",{children:i})}):a.jsx("div",{className:"know-log",children:o.map(h=>a.jsxs(C.Fragment,{children:[a.jsx("div",{className:"m3-subhead num",children:h.date}),h.entries.map((p,x)=>a.jsxs("div",{className:"know-log-row",children:[a.jsx("span",{className:`chip log-kind log-${p.kind}`,children:p.kind}),a.jsx("span",{className:"know-log-text",children:Jy(u,p.text)})]},x))]},h.date))})]})}function Fy(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 Wy({bundle:u,conceptId:i}){const[o,r]=C.useState(null),[f,h]=C.useState(!1),[p,x]=C.useState(!1),[y,v]=C.useState(!1),[S,E]=C.useState(""),[w,M]=C.useState(!1),[G,K]=C.useState(""),[V,z]=C.useState("rendered"),fe=C.useMemo(()=>o?va.sanitize(Re.parse(o.body,{async:!1})):"",[o?.body]),de=()=>{fetch(`/api/knowledge/${encodeURIComponent(u)}/concept?id=${encodeURIComponent(i)}`).then(Y=>Y.ok?Y.json():Promise.reject()).then(r).catch(()=>h(!0))};C.useEffect(()=>{if(y)return;let Y=!0,Z;const le=async()=>{try{const ne=await fetch(`/api/knowledge/${encodeURIComponent(u)}/concept?id=${encodeURIComponent(i)}`,{cache:"no-store"});if(ne.ok){const je=await ne.json();Y&&(h(!1),r(be=>JSON.stringify(be)===JSON.stringify(je)?be:je))}else ne.status===404&&Y&&h(!0)}catch{}Y&&(Z=setTimeout(le,6e3))};return le(),()=>{Y=!1,clearTimeout(Z)}},[u,i,y]);async function te(){x(!0),await fetch(`/api/knowledge/${encodeURIComponent(u)}/verify`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:i})}).catch(()=>{}),x(!1),de()}async function W(){M(!0),K("");const Y=await fetch(`/api/knowledge/${encodeURIComponent(u)}/concept`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:i,content:S})}).then(Z=>Z.json()).catch(()=>({error:"save failed"}));M(!1),Y.error?K(Y.error):(r(Y),v(!1))}return f?a.jsx("div",{className:"empty",children:"concept not found"}):o?a.jsxs("div",{className:"member-view",children:[a.jsxs("div",{className:"detail-head",children:[a.jsx("h1",{children:o.title}),o.type&&a.jsx("span",{className:"chip agent",children:o.type}),a.jsx(xo,{tier:o.trustTier}),o.status!=="stable"&&a.jsx("span",{className:`chip ${o.status}`,children:o.status}),o.stale&&a.jsxs("span",{className:"chip stale",children:["stale since ",o.staleAfter?.slice(0,10)]}),a.jsx("span",{className:"spacer"}),a.jsx("button",{className:"open-raw",onClick:()=>{ba("claude",{kind:"knowledge",bundle:u})},children:"curate in chat"}),a.jsx("button",{className:"run-btn",disabled:p,onClick:te,children:p?"verifying…":a.jsxs(a.Fragment,{children:[a.jsx(F,{name:"check",className:"ms-sm"})," verify (human)"]})})]}),o.error&&a.jsxs("div",{className:"msg error",children:[a.jsx(F,{name:"error",className:"ms-sm"})," ",o.error]}),a.jsxs("div",{className:"detail-cols",children:[a.jsxs("section",{className:"panel",children:[a.jsxs("div",{className:"panel-head",children:[a.jsx("span",{className:"microlabel",children:"content"}),a.jsx("span",{className:"spacer"}),a.jsxs("span",{className:"side-meta",children:[u,"/",o.id,".md"]}),y?a.jsxs(a.Fragment,{children:[a.jsx("button",{className:"open-raw",onClick:()=>{v(!1),K("")},children:"cancel"}),a.jsx("button",{className:"open-raw",disabled:w,onClick:W,children:w?"saving…":a.jsxs(a.Fragment,{children:[a.jsx(F,{name:"check",className:"ms-sm"})," save"]})})]}):a.jsxs("button",{className:"open-raw",onClick:()=>{E(o.raw),v(!0),K("")},children:[a.jsx(F,{name:"edit",className:"ms-sm"})," edit"]})]}),y?a.jsxs(a.Fragment,{children:[a.jsx("textarea",{className:"concept-edit",value:S,rows:Math.min(40,Math.max(18,S.split(`
|
|
173
|
-
`).length+2)),onChange:Y=>E(Y.target.value),spellCheck:!1}),a.jsxs("div",{className:"viewer-note",children:["full file (frontmatter + markdown body) — saving stamps provenance as"," ",a.jsx("code",{children:"human:user"})," and logs an update."]})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"viewer-note md-toolbar",children:a.jsxs("div",{className:"tabs",children:[a.jsx("button",{className:V==="rendered"?"active":"",onClick:()=>z("rendered"),children:"rendered"}),a.jsx("button",{className:V==="source"?"active":"",onClick:()=>z("source"),children:"source"})]})}),a.jsx("div",{className:"viewer-body",children:V==="rendered"?a.jsx("div",{className:"md-body concept-md",dangerouslySetInnerHTML:{__html:fe}}):a.jsx("pre",{children:o.body.trim()||"(empty body)"})})]}),G&&a.jsxs("div",{className:"msg error",children:[a.jsx(F,{name:"error",className:"ms-sm"})," ",G]})]}),a.jsxs("aside",{className:"detail-rail",children:[a.jsxs("section",{className:"panel",children:[a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"about"})}),a.jsxs("div",{className:"rail-list",children:[a.jsxs("div",{className:"rail-kv",children:[a.jsx("span",{className:"microlabel",children:"trust"}),a.jsx("span",{className:"v",children:a.jsx(xo,{tier:o.trustTier})})]}),a.jsxs("div",{className:"rail-kv",children:[a.jsx("span",{className:"microlabel",children:"generated"}),a.jsx("span",{className:`v ${o.generated?"":"dim"}`,children:o.generated?`${o.generated.by??"?"} · ${(o.generated.at??"?").slice(0,10)}`:"not stamped"})]}),a.jsxs("div",{className:"rail-kv",children:[a.jsx("span",{className:"microlabel",children:"verified"}),o.verified.length===0?a.jsx("span",{className:"v dim",children:"never"}):o.verified.map((Y,Z)=>a.jsxs("span",{className:"v",children:[Y.by??"?"," · ",(Y.at??"?").slice(0,10)]},Z))]}),o.staleAfter&&a.jsxs("div",{className:"rail-kv",children:[a.jsx("span",{className:"microlabel",children:"stale after"}),a.jsxs("span",{className:`v ${o.stale?"":"dim"}`,children:[o.staleAfter.slice(0,10),o.stale&&a.jsx("span",{className:"chip stale",children:"stale"})]})]}),o.tags.length>0&&a.jsxs("div",{className:"rail-kv",children:[a.jsx("span",{className:"microlabel",children:"tags"}),a.jsx("span",{className:"m3-chips",children:o.tags.map(Y=>a.jsx("span",{className:"chip",children:Y},Y))})]})]})]}),o.sources.length>0&&a.jsxs("section",{className:"panel",children:[a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"sources"})}),a.jsx("div",{className:"rail-list",children:o.sources.map((Y,Z)=>a.jsxs("div",{className:"rail-kv",children:[a.jsxs("span",{className:"v",children:[Y.resource?.startsWith("http")?a.jsx("a",{href:Y.resource,target:"_blank",rel:"noreferrer",children:Y.title??Y.resource}):Y.title??Y.resource??"?",Y.id&&a.jsxs("span",{className:"know-id",children:["[^",Y.id,"]"]})]}),a.jsx("span",{className:"v dim",children:[Y.author,Y.usage_count!=null?`${Y.usage_count} uses`:null,Y.last_modified?`mod ${Y.last_modified.slice(0,10)}`:null].filter(Boolean).join(" · ")})]},Z))})]})]})]})]}):a.jsx("div",{className:"empty",children:"loading…"})}const Py={workspace:"workspace",project:".claude",user:"global",agent:"agent"};function hp(u){return a.jsx("span",{className:`chip skill-src ${u}`,children:Py[u]})}function eb({name:u}){const i=$e("/api/skills",!1),o=i?.skills??[],r=o.filter(p=>p.source==="workspace"),f=o.filter(p=>p.source!=="workspace"),h=p=>a.jsxs(Ue,{href:`/skills/${encodeURIComponent(p.name)}`,className:`side-row ${p.name===u?"active":""}`,children:[a.jsx("span",{className:`lamp ${p.source==="workspace"?"ok":"dim"}`}),a.jsxs("div",{className:"side-row-body",children:[a.jsxs("div",{className:"side-row-top",children:[a.jsxs("span",{className:"side-wf",children:["/",p.name]}),p.source!=="workspace"&&hp(p.source)]}),a.jsx("div",{className:"side-row-sub",children:a.jsx("span",{className:"side-req",children:p.description||"no description"})})]})]},`${p.source}:${p.name}`);return a.jsxs("div",{className:"runs-screen",children:[a.jsxs("aside",{className:"runs-side",children:[a.jsx("div",{className:"side-head",children:a.jsx("span",{className:"microlabel",children:"workspace skills"})}),a.jsxs("div",{className:"side-list",children:[r.map(h),i&&r.length===0&&a.jsx("div",{className:"viewer-note",children:"no workspace skills yet"}),f.length>0&&a.jsxs(C.Fragment,{children:[a.jsx("div",{className:"side-head skills-local-head",children:a.jsx("span",{className:"microlabel",children:"local (this machine / repo)"})}),f.map(h)]})]})]}),a.jsx("div",{className:"runs-main",children:u?a.jsx(lb,{name:u},u):a.jsx(tb,{root:i?.root,workspace:r})})]})}function tb({root:u,workspace:i}){return a.jsxs("div",{className:"new-chat",children:[a.jsxs("div",{className:"page-head",children:[a.jsx("h1",{children:"skills"}),a.jsxs("span",{className:"count",children:[i.length," in workspace"]})]}),a.jsxs("section",{className:"panel new-chat-panel",children:[a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"what lives here"})}),a.jsxs("div",{className:"know-intro",children:["Skills are reusable ",a.jsx("b",{children:"instruction packages"}),": one folder per skill with a"," ",a.jsx("code",{children:"SKILL.md"})," (YAML frontmatter: name, description). ",a.jsx("b",{children:"Workspace skills"}),u?a.jsxs(a.Fragment,{children:[" live under ",a.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"," ",a.jsx("code",{children:".claude/skills"})," and your personal ",a.jsx("code",{children:"~/.claude/skills"})," also work here, but stay repo-/machine-local. Invoke any skill in a session with"," ",a.jsx("code",{children:"/<name>"}),"."]}),a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"add a workspace skill"})}),a.jsxs("div",{className:"know-intro",children:["Create ",a.jsxs("code",{children:[u?`${u}/`:"skills/","<name>/SKILL.md"]}),", commit it, done — it appears here and in every session's ",a.jsx("code",{children:"/"})," menu."]})]})]})}function lb({name:u}){const[i,o]=C.useState(null),[r,f]=C.useState(!1),[h,p]=C.useState("rendered"),x=C.useMemo(()=>i?i.content.replace(/^---\r?\n[\s\S]*?\r?\n---(\r?\n|$)/,""):"",[i?.content]),y=C.useMemo(()=>i?va.sanitize(Re.parse(x,{async:!1})):"",[x]);return C.useEffect(()=>{fetch(`/api/skills/${encodeURIComponent(u)}`).then(v=>v.ok?v.json():Promise.reject()).then(o).catch(()=>f(!0))},[u]),r?a.jsx("div",{className:"empty",children:"skill not found"}):i?a.jsxs("div",{className:"member-view",children:[a.jsxs("div",{className:"detail-head",children:[a.jsxs("h1",{children:["/",i.name]}),hp(i.source)]}),i.description&&a.jsx("div",{className:"know-intro skill-desc",children:i.description}),a.jsxs("div",{className:"detail-cols",children:[a.jsxs("section",{className:"panel",children:[a.jsxs("div",{className:"panel-head",children:[a.jsx("span",{className:"microlabel",children:"SKILL.md"}),a.jsx("span",{className:"spacer"}),a.jsxs("div",{className:"tabs",children:[a.jsx("button",{className:h==="rendered"?"active":"",onClick:()=>p("rendered"),children:"rendered"}),a.jsx("button",{className:h==="source"?"active":"",onClick:()=>p("source"),children:"source"})]})]}),a.jsx("div",{className:"viewer-body",children:h==="rendered"?a.jsx("div",{className:"md-body concept-md",dangerouslySetInnerHTML:{__html:y}}):a.jsx("pre",{children:i.content.trim()||"(empty)"})})]}),a.jsx("aside",{className:"detail-rail",children:a.jsxs("section",{className:"panel",children:[a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"about"})}),a.jsxs("div",{className:"rail-list",children:[a.jsxs("div",{className:"rail-kv",children:[a.jsx("span",{className:"microlabel",children:"source"}),a.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"})]}),a.jsxs("div",{className:"rail-kv",children:[a.jsx("span",{className:"microlabel",children:"path"}),a.jsx("span",{className:"v mono skill-path",title:i.path,children:i.path})]}),a.jsxs("div",{className:"rail-kv",children:[a.jsx("span",{className:"microlabel",children:"invoke"}),a.jsxs("span",{className:"v",children:[a.jsxs("code",{children:["/",i.name]})," in any session"]})]}),i.files.length>0&&a.jsxs("div",{className:"rail-kv",children:[a.jsx("span",{className:"microlabel",children:"bundled files"}),i.files.map(v=>a.jsx("span",{className:"v mono",children:v},v))]})]})]})})]})]}):a.jsx("div",{className:"empty",children:"loading…"})}const nb=["","low","medium","high","xhigh","max"],ab=["🤖","🧑💻","🎧","🛠️","📊","✍️","🔍","🧹","📦","🚀"];function Zm({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=$e("/api/team",!1),h=Yn(),[p,x]=C.useState(()=>{try{const H=JSON.parse(localStorage.getItem("kw-agent-groups")??"[]");return Array.isArray(H)?H.map(String):[]}catch{return[]}}),[y,v]=C.useState(!1),[S,E]=C.useState(""),[w,M]=C.useState(null),[G,K]=C.useState(""),[V,z]=C.useState(null),[fe,de]=C.useState(null),[te,W]=C.useState({}),Y=(f?.members??[]).map(H=>te[H.slug]!==void 0?{...H,group:te[H.slug]||void 0}:H);C.useEffect(()=>{W(H=>{const ze={...H};let Ge=!1;for(const We of f?.members??[])ze[We.slug]!==void 0&&(We.group??"")===ze[We.slug]&&(delete ze[We.slug],Ge=!0);return Ge?ze:H})},[f]);const Z=Y.filter(H=>!H.archived),le=Y.filter(H=>H.archived),[ne,je]=C.useState(!1),be=[...new Set([...Z.map(H=>H.group??"").filter(Boolean),...p])].sort((H,ze)=>H.localeCompare(ze)),P=Z.filter(H=>!H.group);function ve(H){x(H);try{localStorage.setItem("kw-agent-groups",JSON.stringify(H))}catch{}}function Je(){const H=S.trim();v(!1),E(""),H&&!be.includes(H)&&ve([...p,H])}function nt(H,ze){M(null);const Ge=ze.trim();if(!(!Ge||Ge===H)){for(const We of Y.filter(tl=>tl.group===H))D(We.slug,Ge);p.includes(H)&&ve([...new Set(p.map(We=>We===H?Ge:We))])}}async function D(H,ze){if((Y.find(We=>We.slug===H)?.group??"")!==ze){W(We=>({...We,[H]:ze}));try{const We=await fetch(`/api/team/${encodeURIComponent(H)}`);if(!We.ok)throw new Error;const tl=await We.json();if(!(await fetch(`/api/team/${encodeURIComponent(H)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({...tl,group:ze||void 0})})).ok)throw new Error}catch{W(We=>{const tl={...We};return delete tl[H],tl})}}}const J=H=>h?{onDragOver:ze=>{V!=null&&(ze.preventDefault(),ze.dataTransfer.dropEffect="move",fe!==H&&de(H))},onDrop:ze=>{ze.preventDefault();const Ge=ze.dataTransfer.getData("text/plain")||V;Ge&&D(Ge,H),z(null),de(null)}}:{},ce=H=>a.jsxs(Ue,{href:`/agents/${encodeURIComponent(H.slug)}`,className:`side-row ${H.slug===i?"active":""} ${V===H.slug?"dragging":""}`,draggable:h,onDragStart:ze=>{ze.dataTransfer.setData("text/plain",H.slug),ze.dataTransfer.effectAllowed="move",z(H.slug)},onDragEnd:()=>{z(null),de(null)},children:[a.jsx("span",{className:"agent-avatar sm",children:a.jsx("span",{"aria-hidden":!0,children:H.emoji})}),a.jsxs("div",{className:"side-row-body",children:[a.jsx("div",{className:"side-row-top",children:a.jsx("span",{className:"side-wf",children:H.name})}),a.jsx("div",{className:"side-row-sub",children:a.jsx("span",{className:"side-req",children:H.description||H.harness})})]})]},H.slug),_e=H=>a.jsxs(Ue,{href:`/agents/${encodeURIComponent(H.slug)}/info`,className:`side-row archived-row ${H.slug===i?"active":""}`,children:[a.jsx("span",{className:"agent-avatar sm",children:a.jsx("span",{"aria-hidden":!0,children:H.emoji})}),a.jsxs("div",{className:"side-row-body",children:[a.jsx("div",{className:"side-row-top",children:a.jsx("span",{className:"side-wf",children:H.name})}),a.jsx("div",{className:"side-row-sub",children:a.jsx("span",{className:"side-req",children:H.description||H.harness})})]})]},H.slug);let ye;o==="new"?ye=a.jsx(Km,{},"new"):o==="edit"&&i?ye=a.jsx(Km,{slug:i},i):o==="chat"&&i&&r?ye=a.jsx("div",{className:"chat-main",children:a.jsx($m,{id:r,agentName:Y.find(H=>H.slug===i)?.name??i,agentDescription:Y.find(H=>H.slug===i)?.description},r)}):o==="chats"?ye=r?a.jsx("div",{className:"chat-main",children:a.jsx($m,{id:r},r)}):a.jsx(oy,{}):o==="info"&&i?ye=a.jsx(mp,{slug:i},i):i?ye=a.jsx(ib,{slug:i},i):ye=a.jsx(rb,{hasMembers:Z.length>0,root:f?.root});const N=(o==="member"||o==="info"||o==="chat")&&i?Y.find(H=>H.slug===i)?.knowledge??[]:[],[B,I]=C.useState(()=>localStorage.getItem("kw-kside")!=="hidden"),[Q,he]=C.useState(()=>Number(localStorage.getItem("kw-kside-w"))||460),pe=N.length>0&&B;function Ee(H){I(H),localStorage.setItem("kw-kside",H?"open":"hidden")}function mt(H){he(H),localStorage.setItem("kw-kside-w",String(H))}return a.jsxs("div",{className:`runs-screen team-screen ${i||o==="chats"?"has-sessions":""} ${pe?"has-knowledge":""}`,style:pe?{"--kside-w":`${Q}px`}:void 0,children:[a.jsxs("aside",{className:"runs-side",children:[a.jsxs("div",{className:"side-head",children:[a.jsx("span",{className:"microlabel",children:"agents"}),a.jsx("span",{className:"spacer"}),h&&a.jsxs(Ue,{href:"/agents/new",className:"open-raw",children:[a.jsx(F,{name:"add",className:"ms-sm"})," new"]})]}),a.jsxs("div",{className:"side-list",children:[a.jsxs(Ue,{href:"/agents/chats",className:`side-row side-general ${o==="chats"?"active":""}`,children:[a.jsx("span",{className:"agent-avatar sm",children:a.jsx("span",{"aria-hidden":!0,children:"💬"})}),a.jsxs("div",{className:"side-row-body",children:[a.jsx("div",{className:"side-row-top",children:a.jsx("span",{className:"side-wf",children:"General Chats"})}),a.jsx("div",{className:"side-row-sub",children:a.jsx("span",{className:"side-req",children:"chats without an agent"})})]})]}),a.jsxs("div",{className:`side-group ${V&&fe===""?"drop-over":""}`,...J(""),children:[P.map(ce),V!=null&&P.length===0&&a.jsx("div",{className:"side-group-empty",children:"no group — drop here"})]}),be.map(H=>{const ze=Z.filter(Ge=>Ge.group===H);return a.jsxs("div",{className:`side-group ${V&&fe===H?"drop-over":""}`,...J(H),children:[a.jsxs("div",{className:"side-group-head",children:[w===H?a.jsx("input",{className:"side-group-rename",autoFocus:!0,value:G,onChange:Ge=>K(Ge.target.value),onKeyDown:Ge=>{Ge.key==="Enter"&&nt(H,G),Ge.key==="Escape"&&M(null)},onBlur:()=>nt(H,G)}):a.jsx("span",{className:"microlabel",children:H}),a.jsx("span",{className:"side-group-count num",children:ze.length}),a.jsx("span",{className:"spacer"}),h&&w!==H&&a.jsx("button",{className:"side-group-x",title:"Rename group",onClick:()=>{M(H),K(H)},children:a.jsx(F,{name:"edit",className:"ms-sm"})}),h&&ze.length===0&&p.includes(H)&&a.jsx("button",{className:"side-group-x",title:"Remove empty group",onClick:()=>ve(p.filter(Ge=>Ge!==H)),children:a.jsx(F,{name:"close",className:"ms-sm"})})]}),ze.map(ce),ze.length===0&&a.jsx("div",{className:"side-group-empty",children:h?"drag agents here":"no agents"})]},H)}),le.length>0&&a.jsxs("div",{className:"side-group side-archived",children:[a.jsxs("button",{className:"side-archived-toggle","aria-expanded":ne,onClick:()=>je(H=>!H),children:[a.jsx("span",{className:"microlabel",children:"archived"}),a.jsx("span",{className:"side-group-count num",children:le.length}),a.jsx("span",{className:"spacer"}),a.jsx(F,{name:ne?"expand_less":"expand_more",className:"ms-sm"})]}),ne&&le.map(_e)]}),f&&Y.length===0&&a.jsx("div",{className:"viewer-note",children:"no agents yet"}),h&&(y?a.jsx("div",{className:"side-group-new",children:a.jsx("input",{autoFocus:!0,value:S,placeholder:"group name, e.g. Team Content",onChange:H=>E(H.target.value),onKeyDown:H=>{H.key==="Enter"&&Je(),H.key==="Escape"&&(v(!1),E(""))},onBlur:Je})}):a.jsxs("button",{className:"side-group-add",onClick:()=>v(!0),children:[a.jsx(F,{name:"add",className:"ms-sm"})," group"]}))]})]}),i&&a.jsx(cb,{slug:i,chatId:r}),o==="chats"&&a.jsx(ub,{chatId:r}),a.jsx("div",{className:"runs-main",children:ye}),pe&&a.jsx(sb,{bundles:N,onHide:()=>Ee(!1),onResize:mt}),N.length>0&&!B&&a.jsxs("button",{className:"kside-reopen",onClick:()=>Ee(!0),title:"Show knowledge sidebar",children:[a.jsx(F,{name:"menu_book",className:"ms-sm"})," knowledge"]})]})}function sb({bundles:u,onHide:i,onResize:o}){const[r,f]=C.useState({}),[h,p]=C.useState(null),[x,y]=C.useState({}),[v,S]=C.useState({}),[E,w]=C.useState(null),[M,G]=C.useState(""),[K,V]=C.useState(!1),[z,fe]=C.useState("");C.useEffect(()=>{f({});let W=!0,Y;const Z=async()=>{await Promise.all(u.map(async le=>{try{const ne=await fetch(`/api/knowledge/${encodeURIComponent(le)}`,{cache:"no-store"}),je=ne.ok?await ne.json():null;W&&f(be=>JSON.stringify(be[le])===JSON.stringify(je)?be:{...be,[le]:je})}catch{W&&f(ne=>le in ne?ne:{...ne,[le]:null})}})),W&&(Y=setTimeout(Z,6e3))};return Z(),()=>{W=!1,clearTimeout(Y)}},[u.join(",")]),C.useEffect(()=>{if(!h||E===h)return;const W=h.indexOf("::"),Y=h.slice(0,W),Z=h.slice(W+2);let le=!0,ne;const je=async()=>{try{const be=await fetch(`/api/knowledge/${encodeURIComponent(Y)}/concept?id=${encodeURIComponent(Z)}`,{cache:"no-store"}),P=be.ok?await be.json():null;le&&y(ve=>JSON.stringify(ve[h])===JSON.stringify(P)?ve:{...ve,[h]:P})}catch{le&&y(be=>h in be?be:{...be,[h]:null})}le&&(ne=setTimeout(je,6e3))};return je(),()=>{le=!1,clearTimeout(ne)}},[h,E]);function de(W,Y){const Z=`${W}::${Y}`;p(h===Z?null:Z)}async function te(W,Y){const Z=`${W}::${Y}`;V(!0),fe("");try{const ne=await(await fetch(`/api/knowledge/${encodeURIComponent(W)}/concept`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:Y,content:M})})).json();ne.error?fe(ne.error):(y(je=>({...je,[Z]:ne})),w(null))}catch(le){fe(le.message)}V(!1)}return a.jsxs("aside",{className:"runs-side knowledge-side",children:[a.jsx("div",{className:"kside-resizer",title:"Drag to resize",onMouseDown:W=>{W.preventDefault();const Y=W.clientX,Z=W.currentTarget.parentElement.offsetWidth,le=je=>o(Math.min(900,Math.max(280,Z+(Y-je.clientX)))),ne=()=>{window.removeEventListener("mousemove",le),window.removeEventListener("mouseup",ne)};window.addEventListener("mousemove",le),window.addEventListener("mouseup",ne)}}),a.jsxs("div",{className:"side-head",children:[a.jsxs("span",{className:"kside-headline",children:[a.jsx("span",{className:"microlabel",children:"knowledge"}),a.jsx("span",{className:"kside-hint",children:"read & kept current by this agent"})]}),a.jsx("span",{className:"spacer"}),a.jsxs("button",{className:"open-raw",onClick:i,title:"Hide knowledge sidebar",children:["hide ",a.jsx(F,{name:"close",className:"ms-sm"})]})]}),a.jsx("div",{className:"side-list",children:u.map(W=>{const Y=r[W],Z=v[W]===!0;return a.jsxs("div",{className:"kside-bundle",children:[a.jsxs("div",{className:"kside-bundle-head",children:[a.jsxs("button",{className:"kside-bundle-toggle","aria-expanded":!Z,onClick:()=>S({...v,[W]:!Z}),children:[a.jsx("span",{className:`kside-chev ${Z?"":"open"}`,"aria-hidden":!0,children:a.jsx(F,{name:"chevron_right",className:"ms-sm"})}),a.jsx("span",{className:"kside-bundle-name",children:W}),Y&&a.jsx("span",{className:"kside-count num",children:Y.concepts.length})]}),a.jsx("button",{className:"kside-open",title:"Export this bundle as PDF",onClick:()=>{dp(W)},children:a.jsx(F,{name:"picture_as_pdf",className:"ms-sm"})}),a.jsx(Ue,{href:`/knowledge/${encodeURIComponent(W)}`,className:"kside-open",title:"Open this bundle on the knowledge screen",children:"↗"})]}),!Z&&Y===null&&a.jsx("div",{className:"viewer-note",children:"bundle not found"}),!Z&&Y?.concepts.map(le=>{const ne=`${W}::${le.id}`,je=h===ne,be=`/knowledge/${encodeURIComponent(W)}/${le.id.split("/").map(encodeURIComponent).join("/")}`;return a.jsxs("div",{className:`kside-concept ${je?"open":""}`,children:[a.jsxs("button",{className:"kside-row","aria-expanded":je,title:le.description||void 0,onClick:()=>de(W,le.id),children:[a.jsx("span",{className:`kside-chev ${je?"open":""}`,"aria-hidden":!0,children:a.jsx(F,{name:"chevron_right",className:"ms-sm"})}),a.jsx("span",{className:"kside-title",children:le.title||le.id}),le.stale&&a.jsx("span",{className:"kside-stale",title:"Past its stale-after date — ask the agent to re-verify it",children:"stale"})]}),je&&a.jsx("div",{className:"kside-card",ref:P=>P?.scrollIntoView({block:"nearest"}),children:x[ne]===void 0?a.jsx("div",{className:"viewer-note",children:"loading…"}):x[ne]===null?a.jsx("div",{className:"viewer-note",children:"could not load concept"}):E===ne?a.jsxs("div",{className:"kside-edit",children:[a.jsx("textarea",{className:"concept-edit",value:M,rows:Math.min(28,Math.max(10,M.split(`
|
|
174
|
-
`).length+2)),onChange:P=>G(P.target.value),spellCheck:!1}),a.jsxs("div",{className:"kside-actions",children:[a.jsx("button",{className:"open-raw",disabled:K,onClick:()=>w(null),children:"cancel"}),a.jsx("button",{className:"open-raw",disabled:K,onClick:()=>te(W,le.id),children:K?"saving…":a.jsxs(a.Fragment,{children:[a.jsx(F,{name:"check",className:"ms-sm"})," save"]})})]}),z&&a.jsxs("div",{className:"msg error",children:[a.jsx(F,{name:"error",className:"ms-sm"})," ",z]})]}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"kside-card-bar",children:[le.type&&a.jsx("span",{className:"kside-type",children:le.type}),Vm(le)&&a.jsxs("span",{className:"kside-updated num",children:["updated ",ga(Vm(le))]}),a.jsx("span",{className:"spacer"}),a.jsxs("button",{className:"open-raw",onClick:()=>{G(x[ne].raw),w(ne),fe("")},children:[a.jsx(F,{name:"edit",className:"ms-sm"})," edit"]}),a.jsx(Ue,{href:be,className:"open-raw",children:"open ↗"})]}),a.jsx("div",{className:"kside-md md-body",dangerouslySetInnerHTML:{__html:va.sanitize(Re.parse(x[ne].body??"",{async:!1}))}})]})})]},le.id)}),!Z&&Y&&Y.concepts.length===0&&a.jsx("div",{className:"viewer-note",children:"no concepts yet"})]},W)})})]})}function Vm(u){return[u.generated?.at,...u.verified.map(o=>o.at)].filter(o=>typeof o=="string"&&o.length>0).sort().pop()}function ib({slug:u}){const[i,o]=C.useState(!1);return C.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?gl(`/agents/${encodeURIComponent(u)}/chat/${h.id}`,{replace:!0}):o(!0)}).catch(()=>r&&o(!0)),()=>{r=!1}},[u]),i?a.jsx(mp,{slug:u}):a.jsx("div",{className:"empty",children:"loading…"})}function cb({slug:u,chatId:i}){const o=$e("/api/chats",!1),r=(o?.chats??[]).filter(p=>p.scope.kind==="team"&&p.scope.member===u),[f,h]=C.useState(!1);return a.jsxs("aside",{className:"runs-side",children:[a.jsxs("div",{className:"side-head",children:[a.jsx("span",{className:"microlabel",children:"sessions"}),a.jsx("span",{className:"spacer"}),a.jsx(Ue,{href:`/agents/${encodeURIComponent(u)}/info`,className:"open-raw",title:"agent profile & settings",children:"profile"}),a.jsx("button",{className:"open-raw",disabled:f,onClick:async()=>{h(!0),await ba("claude",{kind:"team",member:u}),h(!1)},children:f?"…":a.jsxs(a.Fragment,{children:[a.jsx(F,{name:"add",className:"ms-sm"})," new"]})})]}),a.jsxs("div",{className:"side-list",children:[r.map(p=>a.jsxs(Ue,{href:`/agents/${encodeURIComponent(u)}/chat/${p.id}`,className:`side-row ${p.id===i?"active":""}`,children:[a.jsx("span",{className:`lamp ${p.busy?"running":"pending"}`}),a.jsxs("div",{className:"side-row-body",children:[a.jsx("div",{className:"side-row-top",children:a.jsx("span",{className:"side-wf",children:p.title||"new session"})}),a.jsx("div",{className:"side-row-sub",children:a.jsx("span",{className:"side-when num",children:ga(p.updatedAt)})})]}),a.jsx("button",{type:"button",className:"row-x",title:"delete session",onClick:async x=>{x.preventDefault(),x.stopPropagation(),window.confirm(`Delete session "${p.title||p.id}"?`)&&(await fetch(`/api/chats/${p.id}`,{method:"DELETE"}).catch(()=>{}),p.id===i&&gl(`/agents/${encodeURIComponent(u)}`))},children:a.jsx(F,{name:"close",className:"ms-sm"})})]},p.id)),o&&r.length===0&&a.jsx("div",{className:"viewer-note",children:"no sessions yet"})]})]})}function ub({chatId:u}){const i=$e("/api/chats",!1),o=(i?.chats??[]).filter(r=>r.scope.kind!=="team");return a.jsxs("aside",{className:"runs-side",children:[a.jsxs("div",{className:"side-head",children:[a.jsx("span",{className:"microlabel",children:"chats"}),a.jsx("span",{className:"spacer"}),a.jsxs(Ue,{href:"/agents/chats",className:"open-raw",children:[a.jsx(F,{name:"add",className:"ms-sm"})," new"]})]}),a.jsxs("div",{className:"side-list",children:[o.map(r=>a.jsxs(Ue,{href:`/agents/chats/${r.id}`,className:`side-row ${r.id===u?"active":""}`,children:[a.jsx("span",{className:`lamp ${r.busy?"running":"pending"}`}),a.jsxs("div",{className:"side-row-body",children:[a.jsx("div",{className:"side-row-top",children:a.jsx("span",{className:"side-wf",children:r.title||"new chat"})}),a.jsxs("div",{className:"side-row-sub",children:[a.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}`:""}`:""]}),a.jsx("span",{className:"side-when num",children:ga(r.updatedAt)})]})]}),a.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&&gl("/agents/chats"))},children:a.jsx(F,{name:"close",className:"ms-sm"})})]},r.id)),i&&o.length===0&&a.jsx("div",{className:"viewer-note",children:"no chats yet"})]})]})}function rb({hasMembers:u,root:i}){const o=Yn();return a.jsxs("div",{className:"new-chat",children:[a.jsx("div",{className:"page-head",children:a.jsx("h1",{children:"agents"})}),a.jsxs("section",{className:"panel new-chat-panel",children:[a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"what lives here"})}),a.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"," ",a.jsx("code",{children:i?`${i}/<slug>/`:"agents/<slug>/"})," as ",a.jsx("code",{children:"agent.yml"})," +"," ",a.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."]}),o?a.jsx("div",{style:{padding:"0 16px 16px"},children:a.jsx("button",{className:"run-btn",onClick:()=>gl("/agents/new"),children:a.jsxs(a.Fragment,{children:[a.jsx(F,{name:"add",className:"ms-sm"})," ",u?"new agent":"create your first agent"]})})}):a.jsx("div",{className:"settings-note",style:{padding:"0 16px 16px"},children:"Creating agents needs expert mode — flip the switch in the top bar."})]})]})}function mp({slug:u}){const[i,o]=C.useState(null),[r,f]=C.useState(!1),[h,p]=C.useState(!1),[x,y]=C.useState(!1),[v,S]=C.useState(""),[E,w]=C.useState(""),[M,G]=C.useState([]),[K,V]=C.useState(!0),[z,fe]=C.useState(!1),[de,te]=C.useState(""),W=$e("/api/workflows",!1),Y=$e("/api/knowledge",!1),Z=$e("/api/skills",!1);C.useEffect(()=>{let P=!0;return fetch(`/api/team/${encodeURIComponent(u)}`).then(ve=>ve.ok?ve.json():Promise.reject()).then(ve=>P&&o(ve)).catch(()=>P&&f(!0)),()=>{P=!1}},[u]);async function le(P){if(i){fe(!0),te("");try{const Je=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,...P})})).json();Je.error?te(Je.error):(o(Je),S(""))}catch(ve){te(ve.message)}fe(!1)}}function ne(P,ve){G(ve?[...M,P]:M.filter(Je=>Je!==P))}async function je(P){fe(!0),te("");try{const Je=await(await fetch(`/api/team/${encodeURIComponent(u)}/archive`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({archived:P})})).json();Je.error?te(Je.error):o(Je)}catch(ve){te(ve.message)}fe(!1)}if(r)return a.jsx("div",{className:"empty",children:"agent not found"});if(!i)return a.jsx("div",{className:"empty",children:"loading…"});const be=P=>a.jsxs("div",{className:"team-form-row",style:{marginTop:8},children:[a.jsx("button",{className:"run-btn",disabled:z,onClick:()=>{le(P)},children:z?"saving…":"save"}),a.jsx("button",{className:"open-raw",disabled:z,onClick:()=>(S(""),te("")),children:"cancel"})]});return a.jsxs("div",{className:"member-view",children:[a.jsxs("div",{className:"detail-head",children:[a.jsx("span",{className:"agent-avatar lg",children:a.jsx("span",{"aria-hidden":!0,children:i.emoji})}),a.jsx("h1",{children:i.name}),a.jsx("span",{className:"chip agent",children:i.harness}),i.model&&a.jsx("span",{className:"chip",children:i.model}),i.effort&&a.jsxs("span",{className:"chip",children:["effort: ",i.effort]}),i.archived&&a.jsxs("span",{className:"chip archived-chip",children:[a.jsx(F,{name:"inventory_2",className:"ms-sm"})," archived"]}),a.jsx("span",{className:"spacer"}),a.jsx(Ue,{href:`/agents/${encodeURIComponent(u)}/edit`,className:"open-raw",children:"edit"}),i.archived?a.jsxs("button",{className:"run-btn tonal",disabled:z,onClick:()=>{je(!1)},children:[a.jsx(F,{name:"unarchive",className:"ms-sm"})," ",z?"…":"unarchive"]}):a.jsxs(a.Fragment,{children:[a.jsxs("button",{className:"open-raw",disabled:z,title:"Hide this agent from the roster — restorable any time",onClick:()=>{je(!0)},children:[a.jsx(F,{name:"archive",className:"ms-sm"})," archive"]}),a.jsx("button",{className:"run-btn",disabled:h,onClick:async()=>{p(!0),await ba("claude",{kind:"team",member:u}),p(!1)},children:h?"starting…":"new session"})]})]}),a.jsxs("section",{className:"panel",children:[a.jsxs("div",{className:"m3-list",children:[a.jsxs("button",{type:"button",className:"m3-row m3-toggle",onClick:()=>y(!x),children:[a.jsx("span",{className:"m3-ico",children:a.jsx(F,{name:"badge"})}),a.jsxs("span",{className:"m3-body",children:[a.jsx("span",{className:"m3-head",children:"role"}),!x&&a.jsx("span",{className:"m3-sub m3-ellipsis",children:(i.system||"").trim().split(`
|
|
175
|
-
`)[0]||"empty — expand to give this agent a role"})]}),a.jsx("span",{className:`m3-chev ${x?"open":""}`,children:a.jsx(F,{name:"expand_more",className:"ms-sm"})})]}),x&&v!=="role"&&a.jsxs("div",{className:"m3-expand",children:[a.jsx("pre",{children:i.system||"(empty — click edit to give this agent a role)"}),a.jsxs("div",{className:"team-form-row",style:{marginTop:10},children:[a.jsxs("button",{className:"open-raw",onClick:()=>{w(i.system),S("role"),te("")},children:[a.jsx(F,{name:"edit",className:"ms-sm"})," edit role"]}),a.jsx("span",{className:"spacer"}),a.jsxs("span",{className:"m3-sub",children:["agents/",i.slug,"/system.md"]})]})]}),x&&v==="role"&&a.jsxs("div",{className:"m3-expand",children:[a.jsx("textarea",{className:"concept-edit",rows:Math.min(24,Math.max(8,E.split(`
|
|
176
|
-
`).length+2)),value:E,placeholder:"You are the ... for this project. Your job is ...",onChange:P=>w(P.target.value),spellCheck:!1}),be({system:E})]}),a.jsxs("div",{className:"m3-row",children:[a.jsx("span",{className:"m3-ico",children:a.jsx(F,{name:"account_tree"})}),a.jsxs("span",{className:"m3-body",children:[a.jsx("span",{className:"m3-head",children:"workflows"}),v==="workflows"?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"wf-checks",children:[(W?.workflows??[]).map(P=>a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:M.includes(P.slug),onChange:ve=>ne(P.slug,ve.target.checked)}),a.jsx("b",{children:P.slug}),P.description&&a.jsxs("span",{className:"opt-hint",children:[" — ",P.description]})]},P.slug)),(W?.workflows??[]).length===0&&a.jsx("div",{className:"viewer-note",children:"no workflows in this project"})]}),be({workflows:M})]}):i.workflows.length===0?a.jsx("span",{className:"m3-sub",children:"none connected — the agent can run any workflow you connect"}):a.jsx("span",{className:"m3-chips",children:i.workflows.map(P=>a.jsx(Ue,{href:`/workflows/${encodeURIComponent(P)}`,className:"chip",children:P},P))})]}),v!=="workflows"&&a.jsx("button",{className:"open-raw",onClick:()=>{G(i.workflows),S("workflows"),te("")},children:"edit"})]}),a.jsxs("div",{className:"m3-row",children:[a.jsx("span",{className:"m3-ico",children:a.jsx(F,{name:"menu_book"})}),a.jsxs("span",{className:"m3-body",children:[a.jsx("span",{className:"m3-head",children:"knowledge"}),v==="knowledge"?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"wf-checks",children:[(Y?.bundles??[]).map(P=>a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:M.includes(P.name),onChange:ve=>ne(P.name,ve.target.checked)}),a.jsx("b",{children:P.name}),a.jsxs("span",{className:"opt-hint",children:[" — ",P.concepts," concepts"]})]},P.name)),(Y?.bundles??[]).length===0&&a.jsx("div",{className:"viewer-note",children:"no knowledge bundles in this project"})]}),be({knowledge:M})]}):i.knowledge.length===0?a.jsx("span",{className:"m3-sub",children:"none connected — connected bundles are read and kept current by the agent"}):a.jsx("span",{className:"m3-chips",children:i.knowledge.map(P=>a.jsx(Ue,{href:`/knowledge/${encodeURIComponent(P)}`,className:"chip",children:P},P))})]}),v!=="knowledge"&&a.jsx("button",{className:"open-raw",onClick:()=>{G(i.knowledge),S("knowledge"),te("")},children:"edit"})]}),a.jsxs("div",{className:"m3-row",children:[a.jsx("span",{className:"m3-ico",children:a.jsx(F,{name:"extension"})}),a.jsxs("span",{className:"m3-body",children:[a.jsx("span",{className:"m3-head",children:"shared skills"}),v==="skills"?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"wf-checks",children:[a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:K,onChange:P=>V(P.target.checked)}),a.jsx("b",{children:"all skills"}),a.jsx("span",{className:"opt-hint",children:" — every discovered skill, including future ones"})]}),!K&&(Z?.skills??[]).map(P=>a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:M.includes(P.name),onChange:ve=>ne(P.name,ve.target.checked)}),a.jsxs("b",{children:["/",P.name]}),P.description&&a.jsxs("span",{className:"opt-hint",children:[" — ",P.description]})]},P.name)),!K&&(Z?.skills??[]).length===0&&a.jsx("div",{className:"viewer-note",children:"no skills found (.claude/skills, project or user)"})]}),be({skills:K?void 0:M})]}):i.skills===void 0?a.jsx("span",{className:"m3-sub",children:"all discovered skills (default) — invoke with /name in a session"}):i.skills.length===0?a.jsx("span",{className:"m3-sub",children:"none — this agent runs without skills"}):a.jsx("span",{className:"m3-chips",children:i.skills.map(P=>a.jsxs("span",{className:"chip",children:["/",P]},P))})]}),v!=="skills"&&a.jsx("button",{className:"open-raw",onClick:()=>{V(i.skills===void 0),G(i.skills??[]),S("skills"),te("")},children:"edit"})]})]}),de&&a.jsxs("div",{className:"msg error",children:[a.jsx(F,{name:"error",className:"ms-sm"})," ",de]})]}),a.jsx(fb,{slug:u}),a.jsx(db,{slug:u})]})}const ob=`---
|
|
177
|
-
description: What this skill is for (one line)
|
|
178
|
-
---
|
|
179
|
-
|
|
180
|
-
Instructions this agent follows when the skill applies or is invoked with /<name>.
|
|
181
|
-
`;function fb({slug:u}){const o=$e(`/api/team/${encodeURIComponent(u)}/skills`,!1)?.skills??[],[r,f]=C.useState(null),[h,p]=C.useState(!1),[x,y]=C.useState("");async function v(w){y("");const M=await fetch(`/api/team/${encodeURIComponent(u)}/skills/${encodeURIComponent(w)}`),G=await M.json().catch(()=>null);if(!M.ok||!G||G.error)return void y(G?.error??"could not load skill");f({name:w,content:G.content??"",isNew:!1})}async function S(){if(!r)return;p(!0),y("");const M=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),M.error?y(M.error):f(null)}async function E(w){window.confirm(`Delete skill "/${w}" of this agent (its folder is removed)?`)&&(await fetch(`/api/team/${encodeURIComponent(u)}/skills/${encodeURIComponent(w)}`,{method:"DELETE"}).catch(()=>{}),r?.name===w&&f(null))}return a.jsxs("section",{className:"panel",children:[a.jsxs("div",{className:"panel-head",children:[a.jsx("span",{className:"microlabel",children:"own skills — only this agent"}),a.jsx("span",{className:"spacer"}),!r&&a.jsxs("button",{className:"open-raw",onClick:()=>{f({name:"",content:ob,isNew:!0}),y("")},children:[a.jsx(F,{name:"add",className:"ms-sm"})," new skill"]})]}),o.length===0&&!r&&a.jsxs("div",{className:"viewer-note",children:["none — skills in ",a.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&&a.jsx("div",{className:"m3-list",children:o.map(w=>a.jsxs("div",{className:"m3-row",children:[a.jsx("span",{className:"m3-ico",children:a.jsx(F,{name:"extension"})}),a.jsxs("span",{className:"m3-body",children:[a.jsxs("span",{className:"m3-head",children:["/",w.name]}),a.jsx("span",{className:"m3-sub",children:w.description||a.jsx("code",{children:"SKILL.md"})})]}),a.jsxs("button",{className:"open-raw",onClick:()=>{v(w.name)},children:[a.jsx(F,{name:"edit",className:"ms-sm"})," edit"]}),a.jsx("button",{className:"open-raw",onClick:()=>{E(w.name)},children:a.jsx(F,{name:"close",className:"ms-sm"})})]},w.name))}),r&&a.jsxs("div",{className:"team-form",children:[a.jsx("div",{className:"team-form-row",children:a.jsxs("label",{className:"team-field",style:{flex:1},children:["name — invoked as /<name>",a.jsx("input",{value:r.name,placeholder:"e.g. report-html",disabled:!r.isNew,onChange:w=>f({...r,name:w.target.value})})]})}),a.jsxs("label",{className:"team-field",children:["SKILL.md — frontmatter (description) + the instructions",a.jsx("textarea",{className:"concept-edit",rows:Math.min(28,Math.max(12,r.content.split(`
|
|
182
|
-
`).length+2)),value:r.content,spellCheck:!1,onChange:w=>f({...r,content:w.target.value})})]}),a.jsxs("div",{className:"team-form-row",children:[a.jsx("button",{className:"run-btn",disabled:h||!r.name.trim(),onClick:()=>{S()},children:h?"saving…":"save"}),a.jsx("button",{className:"open-raw",disabled:h,onClick:()=>f(null),children:"cancel"})]})]}),x&&a.jsxs("div",{className:"msg error",children:[a.jsx(F,{name:"error",className:"ms-sm"})," ",x]})]})}function db({slug:u}){const o=$e(`/api/team/${encodeURIComponent(u)}/routines`,!1)?.routines??[],[r,f]=C.useState(null),[h,p]=C.useState(""),[x,y]=C.useState("");async function v(w){p("");const G=await(await fetch(`/api/team/${encodeURIComponent(u)}/routines`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(w)})).json();return G.error?(p(G.error),!1):!0}async function S(w){y(w),p("");const G=await(await fetch(`/api/team/${encodeURIComponent(u)}/routines/${encodeURIComponent(w)}/run`,{method:"POST"})).json();y(""),G.error?p(G.error):G.chatId&&gl(`/agents/${encodeURIComponent(u)}/chat/${G.chatId}`)}async function E(w){window.confirm(`Delete routine "${w}"?`)&&await fetch(`/api/team/${encodeURIComponent(u)}/routines/${encodeURIComponent(w)}`,{method:"DELETE"}).catch(()=>{})}return a.jsxs("section",{className:"panel",children:[a.jsxs("div",{className:"panel-head",children:[a.jsx("span",{className:"microlabel",children:"routines — scheduled prompts"}),a.jsx("span",{className:"spacer"}),!r&&a.jsxs("button",{className:"open-raw",onClick:()=>f({name:"",schedule:"0 9 * * 1-5",prompt:"",enabled:!0}),children:[a.jsx(F,{name:"add",className:"ms-sm"})," new routine"]})]}),o.length===0&&!r&&a.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&&a.jsx("div",{className:"m3-list",children:o.map(w=>a.jsxs("div",{className:"m3-row",children:[a.jsx("span",{className:"m3-ico",children:a.jsx(F,{name:"schedule"})}),a.jsxs("span",{className:"m3-body",children:[a.jsxs("span",{className:"m3-head",children:[w.name,w.lastError&&a.jsx("span",{className:"chip stale",title:w.lastError,children:"error"})]}),a.jsxs("span",{className:"m3-sub",children:[a.jsx("code",{children:w.schedule}),w.enabled?w.nextRunAt?` · next ${ga(w.nextRunAt)}`:"":" · paused"," · ",w.lastChatId?a.jsxs(Ue,{href:`/agents/${encodeURIComponent(u)}/chat/${w.lastChatId}`,children:["last run ",ga(w.lastRunAt)]}):"never ran"]})]}),a.jsx("button",{className:"open-raw",disabled:x===w.id,onClick:()=>S(w.id),children:x===w.id?"starting…":a.jsxs(a.Fragment,{children:[a.jsx(F,{name:"play_arrow",className:"ms-sm"})," run"]})}),a.jsx("button",{className:"open-raw",onClick:()=>f({id:w.id,name:w.name,schedule:w.schedule,prompt:w.prompt,enabled:w.enabled}),children:"edit"}),a.jsx("button",{className:"open-raw",onClick:()=>{E(w.id)},children:"delete"}),a.jsxs("label",{className:"m3-switch",title:w.enabled?"enabled — click to pause":"paused — click to enable",children:[a.jsx("input",{type:"checkbox",checked:w.enabled,onChange:()=>{v({id:w.id,name:w.name,schedule:w.schedule,prompt:w.prompt,enabled:!w.enabled})}}),a.jsx("span",{className:"m3-switch-track"})]})]},w.id))}),r&&a.jsxs("div",{className:"team-form",children:[a.jsxs("div",{className:"team-form-row",children:[a.jsxs("label",{className:"team-field",style:{flex:1},children:["name",a.jsx("input",{value:r.name,placeholder:"e.g. Morning report",onChange:w=>f({...r,name:w.target.value})})]}),a.jsxs("label",{className:"team-field",style:{width:200},children:["schedule (cron)",a.jsx("input",{value:r.schedule,placeholder:"0 9 * * 1-5",onChange:w=>f({...r,schedule:w.target.value})})]}),a.jsxs("label",{className:"team-field wf-checks",style:{width:90},children:["enabled",a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:r.enabled,onChange:w=>f({...r,enabled:w.target.checked})}),"on"]})]})]}),a.jsxs("label",{className:"team-field",children:["prompt — what to ask this agent on each run",a.jsx("textarea",{rows:5,value:r.prompt,placeholder:"Check ... and summarize what changed.",onChange:w=>f({...r,prompt:w.target.value})})]}),a.jsxs("div",{className:"team-form-row",children:[a.jsx("button",{className:"run-btn",disabled:!r.name.trim()||!r.prompt.trim(),onClick:async()=>{await v(r)&&f(null)},children:r.id?"save routine":"create routine"}),a.jsx("button",{className:"open-raw",onClick:()=>(f(null),p("")),children:"cancel"})]})]}),h&&a.jsxs("div",{className:"msg error",children:[a.jsx(F,{name:"error",className:"ms-sm"})," ",h]})]})}function Km({slug:u}){const[i,o]=C.useState(u?null:M()),[r,f]=C.useState(""),[h,p]=C.useState(!1),y=$e("/api/workflows",!1)?.workflows??[],S=$e("/api/knowledge",!1)?.bundles??[],w=$e("/api/skills",!1)?.skills??[];C.useEffect(()=>{u&&fetch(`/api/team/${encodeURIComponent(u)}`).then(z=>z.ok?z.json():Promise.reject()).then(z=>o({name:z.name,emoji:z.emoji,description:z.description??"",harness:z.harness,model:z.model??"",effort:z.effort??"",group:z.group??"",system:z.system,workflows:z.workflows,knowledge:z.knowledge??[],skillsAll:z.skills===void 0,skills:z.skills??[]})).catch(()=>f("agent not found"))},[u]);function M(){return{name:"",emoji:"🤖",description:"",harness:"claude",model:"",effort:"",group:"",system:"",workflows:[],knowledge:[],skillsAll:!0,skills:[]}}async function G(){if(!i)return;p(!0),f("");const fe=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),fe.error?f(fe.error):gl(`/agents/${encodeURIComponent(fe.slug)}/info`)}async function K(){!u||!window.confirm(`Delete agent "${u}" and its definition folder?`)||(await fetch(`/api/team/${encodeURIComponent(u)}`,{method:"DELETE"}).catch(()=>{}),gl("/agents"))}if(!i)return a.jsx("div",{className:"empty",children:r||"loading…"});const V=z=>o({...i,...z});return a.jsxs("div",{className:"new-chat",children:[a.jsx("div",{className:"page-head",children:a.jsx("h1",{children:u?`edit ${u}`:"new agent"})}),a.jsx("section",{className:"panel new-chat-panel",children:a.jsxs("div",{className:"team-form",children:[a.jsxs("div",{className:"team-form-row",children:[a.jsxs("label",{className:"team-field",style:{flex:1},children:["name",a.jsx("input",{value:i.name,placeholder:"e.g. Max",onChange:z=>V({name:z.target.value})})]}),a.jsxs("label",{className:"team-field",style:{width:90},children:["emoji",a.jsx("input",{value:i.emoji,onChange:z=>V({emoji:z.target.value})})]})]}),a.jsx("div",{className:"emoji-pick",children:ab.map(z=>a.jsx("button",{type:"button",className:i.emoji===z?"active":"",onClick:()=>V({emoji:z}),children:z},z))}),a.jsxs("div",{className:"team-form-row",children:[a.jsxs("label",{className:"team-field",style:{flex:1},children:["description",a.jsx("input",{value:i.description,placeholder:"one line: what this agent is for",onChange:z=>V({description:z.target.value})})]}),a.jsxs("label",{className:"team-field",style:{width:180},children:["group",a.jsx("input",{value:i.group,placeholder:"none",onChange:z=>V({group:z.target.value})})]})]}),a.jsxs("div",{className:"team-form-row",children:[a.jsxs("label",{className:"team-field",style:{width:140},children:["harness",a.jsxs("select",{value:i.harness,onChange:z=>V({harness:z.target.value}),children:[a.jsx("option",{value:"claude",children:"claude"}),a.jsx("option",{value:"codex",children:"codex"}),a.jsx("option",{value:"pi",children:"pi"})]})]}),a.jsxs("label",{className:"team-field",style:{flex:1},children:["model",a.jsx("input",{value:i.model,placeholder:"harness default — e.g. sonnet, gpt-5.6-sol",onChange:z=>V({model:z.target.value})})]}),a.jsxs("label",{className:"team-field",style:{width:140},children:["effort",a.jsx("select",{value:i.effort,onChange:z=>V({effort:z.target.value}),children:nb.map(z=>a.jsx("option",{value:z,children:z||"default"},z))})]})]}),a.jsxs("label",{className:"team-field",children:["system prompt — the agent's role",a.jsx("textarea",{rows:10,value:i.system,placeholder:"You are the ... for this project. Your job is ...",onChange:z=>V({system:z.target.value})})]}),a.jsxs("div",{className:"team-field",children:[a.jsx("span",{className:"team-field-label",children:"connected workflows — autoloaded into the agent's context; it can run them"}),a.jsxs("div",{className:"wf-checks",children:[y.map(z=>a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:i.workflows.includes(z.slug),onChange:fe=>V({workflows:fe.target.checked?[...i.workflows,z.slug]:i.workflows.filter(de=>de!==z.slug)})}),a.jsx("b",{children:z.slug}),z.description&&a.jsxs("span",{className:"opt-hint",children:[" — ",z.description]})]},z.slug)),y.length===0&&a.jsx("div",{className:"viewer-note",children:"no workflows in this project"})]})]}),a.jsxs("div",{className:"team-field",children:[a.jsx("span",{className:"team-field-label",children:"connected knowledge — OKF bundles the agent consults and maintains"}),a.jsxs("div",{className:"wf-checks",children:[S.map(z=>a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:i.knowledge.includes(z.name),onChange:fe=>V({knowledge:fe.target.checked?[...i.knowledge,z.name]:i.knowledge.filter(de=>de!==z.name)})}),a.jsx("b",{children:z.name}),a.jsxs("span",{className:"opt-hint",children:[" — ",z.concepts," concepts"]})]},z.name)),S.length===0&&a.jsx("div",{className:"viewer-note",children:"no knowledge bundles in this project"})]})]}),a.jsxs("div",{className:"team-field",children:[a.jsx("span",{className:"team-field-label",children:"connected skills — workspace skill packages (see the skills tab); invoked with /name in sessions"}),a.jsxs("div",{className:"wf-checks",children:[a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:i.skillsAll,onChange:z=>V({skillsAll:z.target.checked})}),a.jsx("b",{children:"all skills"}),a.jsx("span",{className:"opt-hint",children:" — every discovered skill, including future ones"})]}),!i.skillsAll&&w.map(z=>a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:i.skills.includes(z.name),onChange:fe=>V({skills:fe.target.checked?[...i.skills,z.name]:i.skills.filter(de=>de!==z.name)})}),a.jsxs("b",{children:["/",z.name]}),z.description&&a.jsxs("span",{className:"opt-hint",children:[" — ",z.description]})]},z.name)),!i.skillsAll&&w.length===0&&a.jsx("div",{className:"viewer-note",children:"no skills found (.claude/skills, project or user)"})]})]}),r&&a.jsxs("div",{className:"msg error",children:[a.jsx(F,{name:"error",className:"ms-sm"})," ",r]}),a.jsxs("div",{className:"team-form-row",children:[a.jsx("button",{className:"run-btn",disabled:!i.name.trim()||h,onClick:G,children:h?"saving…":u?"save":"create"}),a.jsx("span",{className:"spacer"}),u&&a.jsx("button",{className:"stop-btn",onClick:K,children:"delete agent"})]})]})})]})}function hb(){const[u,i]=C.useState(null),[o,r]=C.useState(""),[f,h]=C.useState(""),[p,x]=C.useState([]),[y,v]=C.useState(!1),[S,E]=C.useState(!1),[w,M]=C.useState(!1),[G,K]=C.useState("");C.useEffect(()=>{fetch("/api/settings").then(te=>te.json()).then(te=>{i(te),r(te.config.name??""),h(te.config.icon??""),x(te.config.switcher??[])}).catch(()=>K("could not load settings"))},[]);const V=()=>{v(!0),M(!1),K("")};async function z(){E(!0),K("");try{const te=await fetch("/api/settings",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({name:o,icon:f,switcher:p})}),W=await te.json();if(!te.ok)throw new Error(W.error||"save failed");i(W),x(W.config.switcher??[]),v(!1),M(!0),window.dispatchEvent(new Event("kw-meta-refresh"))}catch(te){K(te.message)}finally{E(!1)}}const fe=(te,W)=>{x(Y=>Y.map((Z,le)=>le===te?{...Z,...W}:Z)),V()};if(!u)return a.jsx("div",{className:"empty",children:G||"loading…"});const de=[["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 a.jsxs("div",{className:"settings-screen",children:[a.jsxs("div",{className:"settings-head",children:[a.jsxs("h1",{children:[a.jsx(F,{name:"settings",className:"ms-lg"})," Settings"]}),a.jsx("span",{className:"spacer"}),G&&a.jsx("span",{className:"settings-err",children:G}),w&&!y&&a.jsxs("span",{className:"settings-saved",children:[a.jsx(F,{name:"check",className:"ms-sm"})," saved"]}),a.jsx("button",{className:"run-btn",disabled:S||!y,onClick:()=>{z()},children:S?"saving…":"save changes"})]}),a.jsxs("section",{className:"panel",children:[a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"workspace"})}),a.jsxs("div",{className:"team-form",children:[a.jsxs("div",{className:"team-form-row",children:[a.jsxs("label",{className:"team-field",style:{width:90},children:["icon",a.jsx("input",{value:f,placeholder:"🤖",onChange:te=>{h(te.target.value),V()}})]}),a.jsxs("label",{className:"team-field",style:{flex:1},children:["name",a.jsx("input",{value:o,placeholder:"my workspace",onChange:te=>{r(te.target.value),V()}})]})]}),a.jsx("div",{className:"settings-note",children:"Shown in the header, browser tab and to other workspaces discovering this one."})]})]}),a.jsxs("section",{className:"panel",children:[a.jsxs("div",{className:"panel-head",children:[a.jsx("span",{className:"microlabel",children:"workspace switcher"}),a.jsx("span",{className:"spacer"}),a.jsxs("button",{className:"run-btn tonal",onClick:()=>{x(te=>[...te,{name:"",url:"http://localhost:"}]),V()},children:[a.jsx(F,{name:"add",className:"ms-sm"})," add entry"]})]}),a.jsxs("div",{className:"team-form",children:[p.length===0&&a.jsx("div",{className:"settings-note",children:"No manual entries."}),p.map((te,W)=>a.jsxs("div",{className:"team-form-row",children:[a.jsxs("label",{className:"team-field",style:{width:70},children:["icon",a.jsx("input",{value:te.icon??"",placeholder:"•",onChange:Y=>fe(W,{icon:Y.target.value})})]}),a.jsxs("label",{className:"team-field",style:{flex:1},children:["name",a.jsx("input",{value:te.name,placeholder:"other workspace",onChange:Y=>fe(W,{name:Y.target.value})})]}),a.jsxs("label",{className:"team-field",style:{flex:1.4},children:["url",a.jsx("input",{value:te.url,placeholder:"http://localhost:1982",onChange:Y=>fe(W,{url:Y.target.value})})]}),a.jsx("button",{className:"row-x settings-row-x",title:"remove entry",onClick:()=>{x(Y=>Y.filter((Z,le)=>le!==W)),V()},children:a.jsx(F,{name:"close",className:"ms-sm"})})]},W)),a.jsx("div",{className:"settings-note",children:"Running workspaces on this machine are discovered automatically — manual entries are for remote instances or extra links."})]})]}),a.jsxs("section",{className:"panel",children:[a.jsxs("div",{className:"panel-head",children:[a.jsx("span",{className:"microlabel",children:"paths & port"}),a.jsx("span",{className:"spacer"}),a.jsx("code",{className:"settings-file",title:u.configPath,children:u.exists?u.configPath:`${u.configPath} (not created yet)`})]}),a.jsx("div",{className:"settings-kv-list",children:de.map(([te,W,Y])=>a.jsxs("div",{className:"settings-kv",children:[a.jsx("span",{className:"microlabel",children:te}),a.jsx("code",{children:W}),a.jsx("span",{className:"settings-kv-hint",children:Y})]},te))}),a.jsxs("div",{className:"settings-note",style:{padding:"0 18px 14px"},children:["Read-only here — edit ",a.jsx("code",{children:"kraftwerk.yml"})," directly to change these."]})]})]})}function mb(){const i=Ex().split("/").filter(Boolean),[o,r]=C.useState(""),[f,h]=C.useState(""),[p,x]=C.useState([]);C.useEffect(()=>{let v=!0,S;const E=async()=>{try{const M=await fetch("/api/meta",{cache:"no-store"}).then(G=>G.json());if(!v)return;r(M.projectName??""),h(M.projectIcon??""),x(Array.isArray(M.switcher)?M.switcher:[])}catch{}v&&(S=setTimeout(E,3e4))};E();const w=()=>{clearTimeout(S),E()};return window.addEventListener("kw-meta-refresh",w),()=>{v=!1,clearTimeout(S),window.removeEventListener("kw-meta-refresh",w)}},[]),C.useEffect(()=>{if(Ax(o?`${o} — kraftwerk`:"kraftwerk inspector"),!f)return;const v=`<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(v)}`},[o,f]);let y;return i[0]==="runs"&&i[1]?y=a.jsx(xy,{id:i[1]}):i[0]==="runs"?y=a.jsx(gb,{}):i[0]==="workflows"&&i[1]?y=a.jsx(_y,{slug:decodeURIComponent(i[1])}):i[0]==="workflows"?y=a.jsx(Ay,{}):i[0]==="chats"?y=a.jsx(Zm,{seg:i}):i[0]==="skills"?y=a.jsx(eb,{name:i[1]?decodeURIComponent(i[1]):void 0}):i[0]==="settings"?y=a.jsx(hb,{}):i[0]==="agents"||i[0]==="team"?y=a.jsx(Zm,{seg:i.slice(1)}):i[0]==="knowledge"?y=a.jsx(Xy,{bundle:i[1]?decodeURIComponent(i[1]):void 0,conceptId:i.length>2?i.slice(2).map(decodeURIComponent).join("/"):void 0}):y=a.jsx(Uy,{}),a.jsxs(a.Fragment,{children:[a.jsxs("header",{className:"topbar",children:[a.jsxs("span",{className:"wordmark",children:[a.jsx("a",{href:"#/",className:"home-link",title:"Dashboard",children:f||a.jsx(F,{name:"home"})}),o&&a.jsx(pb,{name:o,icon:f,entries:p})]}),a.jsxs("nav",{children:[a.jsxs("a",{href:"#/agents",children:[a.jsx(F,{name:"groups"})," agents"]}),a.jsxs("a",{href:"#/knowledge",children:[a.jsx(F,{name:"menu_book"})," context & knowledge"]}),a.jsxs("a",{href:"#/workflows",children:[a.jsx(F,{name:"account_tree"})," workflows"]}),a.jsxs("a",{href:"#/runs",children:[a.jsx(F,{name:"history"})," workflow runs"]}),a.jsxs("a",{href:"#/skills",children:[a.jsx(F,{name:"extension"})," skills"]})]}),a.jsx("span",{className:"spacer"}),a.jsx(xb,{}),a.jsx(vb,{}),a.jsx(yb,{})]}),a.jsx("main",{className:"shell",children:y})]})}function pb({name:u,icon:i,entries:o}){const[r,f]=C.useState(!1);return C.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?a.jsx("span",{className:"env-name",title:"Project (kraftwerk.yml: name)",children:u}):a.jsxs("span",{className:"switcher-wrap",children:[a.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,a.jsx(F,{name:"expand_more"})]}),r&&a.jsxs("div",{className:"switcher-pop",role:"menu",children:[a.jsx("div",{className:"switcher-head",children:"Workspaces"}),a.jsxs("span",{className:"switcher-item current","aria-current":"true",children:[a.jsx("span",{className:"switcher-icon",children:i||"•"}),a.jsxs("span",{className:"switcher-text",children:[a.jsx("span",{className:"switcher-name",children:u}),a.jsx("span",{className:"switcher-sub",children:"this workspace"})]}),a.jsx("span",{className:"switcher-hint",children:"current"})]}),o.map(h=>a.jsxs("a",{className:"switcher-item",role:"menuitem",href:h.url,children:[a.jsx("span",{className:"switcher-icon",children:h.icon||"•"}),a.jsxs("span",{className:"switcher-text",children:[a.jsx("span",{className:"switcher-name",children:h.name}),a.jsxs("span",{className:"switcher-sub",children:[h.live&&a.jsx("span",{className:"live-dot",title:"running"}),h.url.replace(/^https?:\/\//,"")]})]})]},h.url))]})]})}function gb(){const[u,i]=C.useState(null);return C.useEffect(()=>{let o=!0;return fetch("/api/runs").then(r=>r.json()).then(r=>{o&&(r.runs.length>0?gl(`/runs/${r.runs[0].id}`,{replace:!0}):i({outputDir:r.outputDir}))}).catch(()=>{}),()=>{o=!1}},[]),u?a.jsxs("div",{className:"empty",children:["No runs found in ",a.jsx("code",{children:u.outputDir}),". Start one with"," ",a.jsx("code",{children:"kraftwerk run <workflow> <request>"})," or from a workflow page."]}):a.jsx("div",{className:"empty",children:"loading…"})}function xb(){const[u,i]=C.useState(null),[o,r]=C.useState(!1);C.useEffect(()=>{let p=!0,x;const y=async()=>{try{const v=await fetch("/api/meta",{cache:"no-store"}).then(S=>S.json());p&&i(v)}catch{}p&&(x=setTimeout(y,3e4))};return y(),()=>{p=!1,clearTimeout(x)}},[]);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(x=>setTimeout(x,500));try{if((await fetch("/api/meta",{cache:"no-store"}).then(y=>y.json())).version===f)break}catch{}}location.reload()}}return!f&&!o?null:a.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…":a.jsxs(a.Fragment,{children:[a.jsx(F,{name:"restart_alt",className:"ms-sm"})," v",f," ready — relaunch"]})})}function vb(){const u=Yn();return a.jsxs("button",{className:`expert-toggle ${u?"on":""}`,title:u?"Expert mode on — full detail":"Expert mode off — simplified view","aria-pressed":u,onClick:()=>_x(!u),children:[a.jsx("span",{className:"expert-track",children:a.jsx("span",{className:"expert-knob"})}),"expert"]})}function yb(){const[u,i]=C.useState(!1),[o,r]=C.useState(null),[f,h]=C.useState(null),[p,x]=C.useState("");C.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=>x(S.version)).catch(()=>{});const v=S=>{S.target.closest(".info-wrap")||i(!1)};return window.addEventListener("mousedown",v),()=>window.removeEventListener("mousedown",v)},[u]);const y=o?.runs[0];return a.jsxs("span",{className:"info-wrap",children:[a.jsx("button",{className:"info-btn",title:"Project info","aria-label":"Project info",onClick:()=>i(v=>!v),children:a.jsx(F,{name:"info"})}),u&&a.jsxs("div",{className:"info-pop",children:[a.jsxs("div",{className:"info-row",children:[a.jsx("span",{className:"microlabel",children:"Workflows"}),a.jsx("span",{className:"info-v",children:f?`${f.workflows.length} discovered`:"…"}),a.jsx("code",{className:"info-path",title:f?.root,children:f?.root??""})]}),a.jsxs("div",{className:"info-row",children:[a.jsx("span",{className:"microlabel",children:"Runs"}),a.jsxs("span",{className:"info-v",children:[o?`${o.runs.length} total`:"…",y?` · latest ${y.status}`:""]}),a.jsx("code",{className:"info-path",title:o?.outputDir,children:o?.outputDir??""})]}),a.jsxs("div",{className:"info-row info-actions",children:[a.jsx("span",{className:"microlabel",children:"Workspace"}),a.jsxs("a",{className:"update-btn",href:"#/settings",onClick:()=>i(!1),children:[a.jsx(F,{name:"settings",className:"ms-sm"})," settings"]})]}),a.jsxs("div",{className:"info-row info-actions",children:[a.jsx("span",{className:"microlabel",children:"Theme"}),a.jsx(Nb,{})]}),a.jsxs("div",{className:"info-row info-actions",children:[a.jsx("span",{className:"microlabel",children:"Version"}),a.jsx("span",{className:"info-v mono",children:p?`kraftwerk ${p}`:"…"}),a.jsx(jb,{})]})]})]})}function bb(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 jb(){const[u,i]=C.useState("idle"),[o,r]=C.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?bb(o.current,o.latest)?a.jsxs("span",{className:"update-result newer",children:["v",o.latest," available — ",a.jsxs("code",{children:["npm i -g ",o.name,"@latest"]})]}):a.jsxs("span",{className:"update-result",children:[a.jsx(F,{name:"check",className:"ms-sm"})," up to date"]}):a.jsx("button",{className:"update-btn",disabled:u==="busy",onClick:()=>{f()},children:u==="busy"?"checking…":u==="err"?"npm unreachable — retry":a.jsxs(a.Fragment,{children:[a.jsx(F,{name:"sync",className:"ms-sm"})," check for updates"]})})}function Nb(){return a.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"})}Tx.createRoot(document.getElementById("root")).render(a.jsx(C.StrictMode,{children:a.jsx(mb,{})}));
|