@a-company/sentinel 3.6.0 → 3.9.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.
- package/dist/adapters/express.d.ts +3 -3
- package/dist/adapters/fastify.d.ts +3 -3
- package/dist/adapters/hono.d.ts +3 -3
- package/dist/builtin-symphony-qZiFR8hQ.d.ts +74 -0
- package/dist/{chunk-NTX74ZPM.js → chunk-OKYYIAML.js} +464 -1
- package/dist/cli.js +11 -8
- package/dist/{commands-E7ACLOE7.js → commands-EV7I6V3F.js} +475 -3
- package/dist/{dist-AG5JNIZU.js → dist-5QE2BB2B.js} +58 -4
- package/dist/{dist-TYG2XME3.js → dist-TMBGF6YA.js} +58 -4
- package/dist/index.d.ts +9 -67
- package/dist/index.js +4 -147
- package/dist/mcp.js +13 -0
- package/dist/{sdk-CzFDYYST.d.ts → sdk-faJTgu-S.d.ts} +2 -2
- package/dist/server/index.d.ts +153 -4
- package/dist/server/index.js +35 -4
- package/dist/{storage-BKyt7aPJ.d.ts → storage-8SPPsAJb.d.ts} +6 -2
- package/dist/{transport-DqamniUy.d.ts → transport-Biz9YfoQ.d.ts} +1 -1
- package/dist/transport.d.ts +2 -2
- package/dist/{types-BmVoO1iF.d.ts → types-CPU5sxLq.d.ts} +1 -1
- package/package.json +1 -1
- package/ui/dist/assets/{index-DCtwmE2_.css → index-CJ1Wx083.css} +1 -1
- package/ui/dist/assets/index-S1VJ67dT.js +62 -0
- package/ui/dist/assets/index-S1VJ67dT.js.map +1 -0
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/index-BuK-X6af.js +0 -62
- package/ui/dist/assets/index-BuK-X6af.js.map +0 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
(function(){const m=document.createElement("link").relList;if(m&&m.supports&&m.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))c(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const g of d.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&c(g)}).observe(document,{childList:!0,subtree:!0});function i(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerPolicy&&(d.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?d.credentials="include":f.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function c(f){if(f.ep)return;f.ep=!0;const d=i(f);fetch(f.href,d)}})();function Ho(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Mo={exports:{}},wr={},Ro={exports:{}},se={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Au;function xf(){if(Au)return se;Au=1;var a=Symbol.for("react.element"),m=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),g=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),C=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),T=Symbol.iterator;function _(y){return y===null||typeof y!="object"?null:(y=T&&y[T]||y["@@iterator"],typeof y=="function"?y:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},P=Object.assign,N={};function k(y,z,te){this.props=y,this.context=z,this.refs=N,this.updater=te||L}k.prototype.isReactComponent={},k.prototype.setState=function(y,z){if(typeof y!="object"&&typeof y!="function"&&y!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,y,z,"setState")},k.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function I(){}I.prototype=k.prototype;function G(y,z,te){this.props=y,this.context=z,this.refs=N,this.updater=te||L}var X=G.prototype=new I;X.constructor=G,P(X,k.prototype),X.isPureReactComponent=!0;var re=Array.isArray,fe=Object.prototype.hasOwnProperty,b={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function pe(y,z,te){var ne,U={},le=null,ue=null;if(z!=null)for(ne in z.ref!==void 0&&(ue=z.ref),z.key!==void 0&&(le=""+z.key),z)fe.call(z,ne)&&!H.hasOwnProperty(ne)&&(U[ne]=z[ne]);var ce=arguments.length-2;if(ce===1)U.children=te;else if(1<ce){for(var ge=Array(ce),qe=0;qe<ce;qe++)ge[qe]=arguments[qe+2];U.children=ge}if(y&&y.defaultProps)for(ne in ce=y.defaultProps,ce)U[ne]===void 0&&(U[ne]=ce[ne]);return{$$typeof:a,type:y,key:le,ref:ue,props:U,_owner:b.current}}function xe(y,z){return{$$typeof:a,type:y.type,key:z,ref:y.ref,props:y.props,_owner:y._owner}}function De(y){return typeof y=="object"&&y!==null&&y.$$typeof===a}function Ee(y){var z={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(te){return z[te]})}var Je=/\/+/g;function Te(y,z){return typeof y=="object"&&y!==null&&y.key!=null?Ee(""+y.key):z.toString(36)}function We(y,z,te,ne,U){var le=typeof y;(le==="undefined"||le==="boolean")&&(y=null);var ue=!1;if(y===null)ue=!0;else switch(le){case"string":case"number":ue=!0;break;case"object":switch(y.$$typeof){case a:case m:ue=!0}}if(ue)return ue=y,U=U(ue),y=ne===""?"."+Te(ue,0):ne,re(U)?(te="",y!=null&&(te=y.replace(Je,"$&/")+"/"),We(U,z,te,"",function(qe){return qe})):U!=null&&(De(U)&&(U=xe(U,te+(!U.key||ue&&ue.key===U.key?"":(""+U.key).replace(Je,"$&/")+"/")+y)),z.push(U)),1;if(ue=0,ne=ne===""?".":ne+":",re(y))for(var ce=0;ce<y.length;ce++){le=y[ce];var ge=ne+Te(le,ce);ue+=We(le,z,te,ge,U)}else if(ge=_(y),typeof ge=="function")for(y=ge.call(y),ce=0;!(le=y.next()).done;)le=le.value,ge=ne+Te(le,ce++),ue+=We(le,z,te,ge,U);else if(le==="object")throw z=String(y),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.");return ue}function Ie(y,z,te){if(y==null)return y;var ne=[],U=0;return We(y,ne,"","",function(le){return z.call(te,le,U++)}),ne}function Oe(y){if(y._status===-1){var z=y._result;z=z(),z.then(function(te){(y._status===0||y._status===-1)&&(y._status=1,y._result=te)},function(te){(y._status===0||y._status===-1)&&(y._status=2,y._result=te)}),y._status===-1&&(y._status=0,y._result=z)}if(y._status===1)return y._result.default;throw y._result}var oe={current:null},A={transition:null},q={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:A,ReactCurrentOwner:b};function V(){throw Error("act(...) is not supported in production builds of React.")}return se.Children={map:Ie,forEach:function(y,z,te){Ie(y,function(){z.apply(this,arguments)},te)},count:function(y){var z=0;return Ie(y,function(){z++}),z},toArray:function(y){return Ie(y,function(z){return z})||[]},only:function(y){if(!De(y))throw Error("React.Children.only expected to receive a single React element child.");return y}},se.Component=k,se.Fragment=i,se.Profiler=f,se.PureComponent=G,se.StrictMode=c,se.Suspense=E,se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=q,se.act=V,se.cloneElement=function(y,z,te){if(y==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+y+".");var ne=P({},y.props),U=y.key,le=y.ref,ue=y._owner;if(z!=null){if(z.ref!==void 0&&(le=z.ref,ue=b.current),z.key!==void 0&&(U=""+z.key),y.type&&y.type.defaultProps)var ce=y.type.defaultProps;for(ge in z)fe.call(z,ge)&&!H.hasOwnProperty(ge)&&(ne[ge]=z[ge]===void 0&&ce!==void 0?ce[ge]:z[ge])}var ge=arguments.length-2;if(ge===1)ne.children=te;else if(1<ge){ce=Array(ge);for(var qe=0;qe<ge;qe++)ce[qe]=arguments[qe+2];ne.children=ce}return{$$typeof:a,type:y.type,key:U,ref:le,props:ne,_owner:ue}},se.createContext=function(y){return y={$$typeof:g,_currentValue:y,_currentValue2:y,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},y.Provider={$$typeof:d,_context:y},y.Consumer=y},se.createElement=pe,se.createFactory=function(y){var z=pe.bind(null,y);return z.type=y,z},se.createRef=function(){return{current:null}},se.forwardRef=function(y){return{$$typeof:w,render:y}},se.isValidElement=De,se.lazy=function(y){return{$$typeof:F,_payload:{_status:-1,_result:y},_init:Oe}},se.memo=function(y,z){return{$$typeof:C,type:y,compare:z===void 0?null:z}},se.startTransition=function(y){var z=A.transition;A.transition={};try{y()}finally{A.transition=z}},se.unstable_act=V,se.useCallback=function(y,z){return oe.current.useCallback(y,z)},se.useContext=function(y){return oe.current.useContext(y)},se.useDebugValue=function(){},se.useDeferredValue=function(y){return oe.current.useDeferredValue(y)},se.useEffect=function(y,z){return oe.current.useEffect(y,z)},se.useId=function(){return oe.current.useId()},se.useImperativeHandle=function(y,z,te){return oe.current.useImperativeHandle(y,z,te)},se.useInsertionEffect=function(y,z){return oe.current.useInsertionEffect(y,z)},se.useLayoutEffect=function(y,z){return oe.current.useLayoutEffect(y,z)},se.useMemo=function(y,z){return oe.current.useMemo(y,z)},se.useReducer=function(y,z,te){return oe.current.useReducer(y,z,te)},se.useRef=function(y){return oe.current.useRef(y)},se.useState=function(y){return oe.current.useState(y)},se.useSyncExternalStore=function(y,z,te){return oe.current.useSyncExternalStore(y,z,te)},se.useTransition=function(){return oe.current.useTransition()},se.version="18.3.1",se}var Uu;function Sr(){return Uu||(Uu=1,Ro.exports=xf()),Ro.exports}/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Vu;function wf(){if(Vu)return wr;Vu=1;var a=Sr(),m=Symbol.for("react.element"),i=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,f=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function g(w,E,C){var F,T={},_=null,L=null;C!==void 0&&(_=""+C),E.key!==void 0&&(_=""+E.key),E.ref!==void 0&&(L=E.ref);for(F in E)c.call(E,F)&&!d.hasOwnProperty(F)&&(T[F]=E[F]);if(w&&w.defaultProps)for(F in E=w.defaultProps,E)T[F]===void 0&&(T[F]=E[F]);return{$$typeof:m,type:w,key:_,ref:L,props:T,_owner:f.current}}return wr.Fragment=i,wr.jsx=g,wr.jsxs=g,wr}var Wu;function Sf(){return Wu||(Wu=1,Mo.exports=wf()),Mo.exports}var s=Sf(),$=Sr();const cc=Ho($);var Ml={},Fo={exports:{}},Ze={},Do={exports:{}},Io={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Bu;function jf(){return Bu||(Bu=1,(function(a){function m(A,q){var V=A.length;A.push(q);e:for(;0<V;){var y=V-1>>>1,z=A[y];if(0<f(z,q))A[y]=q,A[V]=z,V=y;else break e}}function i(A){return A.length===0?null:A[0]}function c(A){if(A.length===0)return null;var q=A[0],V=A.pop();if(V!==q){A[0]=V;e:for(var y=0,z=A.length,te=z>>>1;y<te;){var ne=2*(y+1)-1,U=A[ne],le=ne+1,ue=A[le];if(0>f(U,V))le<z&&0>f(ue,U)?(A[y]=ue,A[le]=V,y=le):(A[y]=U,A[ne]=V,y=ne);else if(le<z&&0>f(ue,V))A[y]=ue,A[le]=V,y=le;else break e}}return q}function f(A,q){var V=A.sortIndex-q.sortIndex;return V!==0?V:A.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;a.unstable_now=function(){return d.now()}}else{var g=Date,w=g.now();a.unstable_now=function(){return g.now()-w}}var E=[],C=[],F=1,T=null,_=3,L=!1,P=!1,N=!1,k=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function X(A){for(var q=i(C);q!==null;){if(q.callback===null)c(C);else if(q.startTime<=A)c(C),q.sortIndex=q.expirationTime,m(E,q);else break;q=i(C)}}function re(A){if(N=!1,X(A),!P)if(i(E)!==null)P=!0,Oe(fe);else{var q=i(C);q!==null&&oe(re,q.startTime-A)}}function fe(A,q){P=!1,N&&(N=!1,I(pe),pe=-1),L=!0;var V=_;try{for(X(q),T=i(E);T!==null&&(!(T.expirationTime>q)||A&&!Ee());){var y=T.callback;if(typeof y=="function"){T.callback=null,_=T.priorityLevel;var z=y(T.expirationTime<=q);q=a.unstable_now(),typeof z=="function"?T.callback=z:T===i(E)&&c(E),X(q)}else c(E);T=i(E)}if(T!==null)var te=!0;else{var ne=i(C);ne!==null&&oe(re,ne.startTime-q),te=!1}return te}finally{T=null,_=V,L=!1}}var b=!1,H=null,pe=-1,xe=5,De=-1;function Ee(){return!(a.unstable_now()-De<xe)}function Je(){if(H!==null){var A=a.unstable_now();De=A;var q=!0;try{q=H(!0,A)}finally{q?Te():(b=!1,H=null)}}else b=!1}var Te;if(typeof G=="function")Te=function(){G(Je)};else if(typeof MessageChannel<"u"){var We=new MessageChannel,Ie=We.port2;We.port1.onmessage=Je,Te=function(){Ie.postMessage(null)}}else Te=function(){k(Je,0)};function Oe(A){H=A,b||(b=!0,Te())}function oe(A,q){pe=k(function(){A(a.unstable_now())},q)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(A){A.callback=null},a.unstable_continueExecution=function(){P||L||(P=!0,Oe(fe))},a.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):xe=0<A?Math.floor(1e3/A):5},a.unstable_getCurrentPriorityLevel=function(){return _},a.unstable_getFirstCallbackNode=function(){return i(E)},a.unstable_next=function(A){switch(_){case 1:case 2:case 3:var q=3;break;default:q=_}var V=_;_=q;try{return A()}finally{_=V}},a.unstable_pauseExecution=function(){},a.unstable_requestPaint=function(){},a.unstable_runWithPriority=function(A,q){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var V=_;_=A;try{return q()}finally{_=V}},a.unstable_scheduleCallback=function(A,q,V){var y=a.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?y+V:y):V=y,A){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=V+z,A={id:F++,callback:q,priorityLevel:A,startTime:V,expirationTime:z,sortIndex:-1},V>y?(A.sortIndex=V,m(C,A),i(E)===null&&A===i(C)&&(N?(I(pe),pe=-1):N=!0,oe(re,V-y))):(A.sortIndex=z,m(E,A),P||L||(P=!0,Oe(fe))),A},a.unstable_shouldYield=Ee,a.unstable_wrapCallback=function(A){var q=_;return function(){var V=_;_=q;try{return A.apply(this,arguments)}finally{_=V}}}})(Io)),Io}var Hu;function Nf(){return Hu||(Hu=1,Do.exports=jf()),Do.exports}/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Qu;function kf(){if(Qu)return Ze;Qu=1;var a=Sr(),m=Nf();function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var c=new Set,f={};function d(e,t){g(e,t),g(e+"Capture",t)}function g(e,t){for(f[e]=t,e=0;e<t.length;e++)c.add(t[e])}var w=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),E=Object.prototype.hasOwnProperty,C=/^[: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]*$/,F={},T={};function _(e){return E.call(T,e)?!0:E.call(F,e)?!1:C.test(e)?T[e]=!0:(F[e]=!0,!1)}function L(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function P(e,t,n,r){if(t===null||typeof t>"u"||L(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function N(e,t,n,r,l,o,u){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=u}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){k[e]=new N(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];k[t]=new N(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){k[e]=new N(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){k[e]=new N(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){k[e]=new N(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){k[e]=new N(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){k[e]=new N(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){k[e]=new N(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){k[e]=new N(e,5,!1,e.toLowerCase(),null,!1,!1)});var I=/[\-:]([a-z])/g;function G(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(I,G);k[t]=new N(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(I,G);k[t]=new N(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(I,G);k[t]=new N(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){k[e]=new N(e,1,!1,e.toLowerCase(),null,!1,!1)}),k.xlinkHref=new N("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){k[e]=new N(e,1,!1,e.toLowerCase(),null,!0,!0)});function X(e,t,n,r){var l=k.hasOwnProperty(t)?k[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(P(t,n,l,r)&&(n=null),r||l===null?_(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=n===null?l.type===3?!1:"":n:(t=l.attributeName,r=l.attributeNamespace,n===null?e.removeAttribute(t):(l=l.type,n=l===3||l===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var re=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,fe=Symbol.for("react.element"),b=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),pe=Symbol.for("react.strict_mode"),xe=Symbol.for("react.profiler"),De=Symbol.for("react.provider"),Ee=Symbol.for("react.context"),Je=Symbol.for("react.forward_ref"),Te=Symbol.for("react.suspense"),We=Symbol.for("react.suspense_list"),Ie=Symbol.for("react.memo"),Oe=Symbol.for("react.lazy"),oe=Symbol.for("react.offscreen"),A=Symbol.iterator;function q(e){return e===null||typeof e!="object"?null:(e=A&&e[A]||e["@@iterator"],typeof e=="function"?e:null)}var V=Object.assign,y;function z(e){if(y===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);y=t&&t[1]||""}return`
|
|
34
|
+
`+y+e}var te=!1;function ne(e,t){if(!e||te)return"";te=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(j){var r=j}Reflect.construct(e,[],t)}else{try{t.call()}catch(j){r=j}e.call(t.prototype)}else{try{throw Error()}catch(j){r=j}e()}}catch(j){if(j&&r&&typeof j.stack=="string"){for(var l=j.stack.split(`
|
|
35
|
+
`),o=r.stack.split(`
|
|
36
|
+
`),u=l.length-1,p=o.length-1;1<=u&&0<=p&&l[u]!==o[p];)p--;for(;1<=u&&0<=p;u--,p--)if(l[u]!==o[p]){if(u!==1||p!==1)do if(u--,p--,0>p||l[u]!==o[p]){var h=`
|
|
37
|
+
`+l[u].replace(" at new "," at ");return e.displayName&&h.includes("<anonymous>")&&(h=h.replace("<anonymous>",e.displayName)),h}while(1<=u&&0<=p);break}}}finally{te=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?z(e):""}function U(e){switch(e.tag){case 5:return z(e.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return e=ne(e.type,!1),e;case 11:return e=ne(e.type.render,!1),e;case 1:return e=ne(e.type,!0),e;default:return""}}function le(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case H:return"Fragment";case b:return"Portal";case xe:return"Profiler";case pe:return"StrictMode";case Te:return"Suspense";case We:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ee:return(e.displayName||"Context")+".Consumer";case De:return(e._context.displayName||"Context")+".Provider";case Je:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ie:return t=e.displayName||null,t!==null?t:le(e.type)||"Memo";case Oe:t=e._payload,e=e._init;try{return le(e(t))}catch{}}return null}function ue(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return le(t);case 8:return t===pe?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ce(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ge(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qe(e){var t=ge(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(u){r=""+u,o.call(this,u)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(u){r=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function jr(e){e._valueTracker||(e._valueTracker=qe(e))}function Qo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ge(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Nr(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}}function $l(e,t){var n=t.checked;return V({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Yo(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ce(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ko(e,t){t=t.checked,t!=null&&X(e,"checked",t,!1)}function Al(e,t){Ko(e,t);var n=ce(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ul(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ul(e,t.type,ce(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Xo(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ul(e,t,n){(t!=="number"||Nr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Dn=Array.isArray;function cn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ce(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Vl(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(i(91));return V({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Go(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(i(92));if(Dn(n)){if(1<n.length)throw Error(i(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ce(n)}}function Zo(e,t){var n=ce(t.value),r=ce(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Jo(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function qo(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Wl(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?qo(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var kr,bo=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,l)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(kr=kr||document.createElement("div"),kr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=kr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function In(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var On={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},jc=["Webkit","ms","Moz","O"];Object.keys(On).forEach(function(e){jc.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),On[t]=On[e]})});function ei(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||On.hasOwnProperty(e)&&On[e]?(""+t).trim():t+"px"}function ti(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=ei(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Nc=V({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Bl(e,t){if(t){if(Nc[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(i(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(i(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(t.style!=null&&typeof t.style!="object")throw Error(i(62))}}function Hl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Ql=null;function Yl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kl=null,dn=null,fn=null;function ni(e){if(e=sr(e)){if(typeof Kl!="function")throw Error(i(280));var t=e.stateNode;t&&(t=Kr(t),Kl(e.stateNode,e.type,t))}}function ri(e){dn?fn?fn.push(e):fn=[e]:dn=e}function li(){if(dn){var e=dn,t=fn;if(fn=dn=null,ni(e),t)for(e=0;e<t.length;e++)ni(t[e])}}function si(e,t){return e(t)}function oi(){}var Xl=!1;function ii(e,t,n){if(Xl)return e(t,n);Xl=!0;try{return si(e,t,n)}finally{Xl=!1,(dn!==null||fn!==null)&&(oi(),li())}}function $n(e,t){var n=e.stateNode;if(n===null)return null;var r=Kr(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(i(231,t,typeof n));return n}var Gl=!1;if(w)try{var An={};Object.defineProperty(An,"passive",{get:function(){Gl=!0}}),window.addEventListener("test",An,An),window.removeEventListener("test",An,An)}catch{Gl=!1}function kc(e,t,n,r,l,o,u,p,h){var j=Array.prototype.slice.call(arguments,3);try{t.apply(n,j)}catch(R){this.onError(R)}}var Un=!1,Er=null,Cr=!1,Zl=null,Ec={onError:function(e){Un=!0,Er=e}};function Cc(e,t,n,r,l,o,u,p,h){Un=!1,Er=null,kc.apply(Ec,arguments)}function Tc(e,t,n,r,l,o,u,p,h){if(Cc.apply(this,arguments),Un){if(Un){var j=Er;Un=!1,Er=null}else throw Error(i(198));Cr||(Cr=!0,Zl=j)}}function Zt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function ai(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 ui(e){if(Zt(e)!==e)throw Error(i(188))}function _c(e){var t=e.alternate;if(!t){if(t=Zt(e),t===null)throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(l===null)break;var o=l.alternate;if(o===null){if(r=l.return,r!==null){n=r;continue}break}if(l.child===o.child){for(o=l.child;o;){if(o===n)return ui(l),e;if(o===r)return ui(l),t;o=o.sibling}throw Error(i(188))}if(n.return!==r.return)n=l,r=o;else{for(var u=!1,p=l.child;p;){if(p===n){u=!0,n=l,r=o;break}if(p===r){u=!0,r=l,n=o;break}p=p.sibling}if(!u){for(p=o.child;p;){if(p===n){u=!0,n=o,r=l;break}if(p===r){u=!0,r=o,n=l;break}p=p.sibling}if(!u)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function ci(e){return e=_c(e),e!==null?di(e):null}function di(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=di(e);if(t!==null)return t;e=e.sibling}return null}var fi=m.unstable_scheduleCallback,pi=m.unstable_cancelCallback,Lc=m.unstable_shouldYield,Pc=m.unstable_requestPaint,Ne=m.unstable_now,zc=m.unstable_getCurrentPriorityLevel,Jl=m.unstable_ImmediatePriority,mi=m.unstable_UserBlockingPriority,Tr=m.unstable_NormalPriority,Mc=m.unstable_LowPriority,hi=m.unstable_IdlePriority,_r=null,gt=null;function Rc(e){if(gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(_r,e,void 0,(e.current.flags&128)===128)}catch{}}var ct=Math.clz32?Math.clz32:Ic,Fc=Math.log,Dc=Math.LN2;function Ic(e){return e>>>=0,e===0?32:31-(Fc(e)/Dc|0)|0}var Lr=64,Pr=4194304;function Vn(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function zr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,u=n&268435455;if(u!==0){var p=u&~l;p!==0?r=Vn(p):(o&=u,o!==0&&(r=Vn(o)))}else u=n&~l,u!==0?r=Vn(u):o!==0&&(r=Vn(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&l)===0&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-ct(t),l=1<<n,r|=e[n],t&=~l;return r}function Oc(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $c(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,o=e.pendingLanes;0<o;){var u=31-ct(o),p=1<<u,h=l[u];h===-1?((p&n)===0||(p&r)!==0)&&(l[u]=Oc(p,t)):h<=t&&(e.expiredLanes|=p),o&=~p}}function ql(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function vi(){var e=Lr;return Lr<<=1,(Lr&4194240)===0&&(Lr=64),e}function bl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Wn(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ct(t),e[t]=n}function Ac(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var l=31-ct(n),o=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~o}}function es(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ct(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var de=0;function gi(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var yi,ts,xi,wi,Si,ns=!1,Mr=[],zt=null,Mt=null,Rt=null,Bn=new Map,Hn=new Map,Ft=[],Uc="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 submit".split(" ");function ji(e,t){switch(e){case"focusin":case"focusout":zt=null;break;case"dragenter":case"dragleave":Mt=null;break;case"mouseover":case"mouseout":Rt=null;break;case"pointerover":case"pointerout":Bn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hn.delete(t.pointerId)}}function Qn(e,t,n,r,l,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[l]},t!==null&&(t=sr(t),t!==null&&ts(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Vc(e,t,n,r,l){switch(t){case"focusin":return zt=Qn(zt,e,t,n,r,l),!0;case"dragenter":return Mt=Qn(Mt,e,t,n,r,l),!0;case"mouseover":return Rt=Qn(Rt,e,t,n,r,l),!0;case"pointerover":var o=l.pointerId;return Bn.set(o,Qn(Bn.get(o)||null,e,t,n,r,l)),!0;case"gotpointercapture":return o=l.pointerId,Hn.set(o,Qn(Hn.get(o)||null,e,t,n,r,l)),!0}return!1}function Ni(e){var t=Jt(e.target);if(t!==null){var n=Zt(t);if(n!==null){if(t=n.tag,t===13){if(t=ai(n),t!==null){e.blockedOn=t,Si(e.priority,function(){xi(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ls(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ql=r,n.target.dispatchEvent(r),Ql=null}else return t=sr(n),t!==null&&ts(t),e.blockedOn=n,!1;t.shift()}return!0}function ki(e,t,n){Rr(e)&&n.delete(t)}function Wc(){ns=!1,zt!==null&&Rr(zt)&&(zt=null),Mt!==null&&Rr(Mt)&&(Mt=null),Rt!==null&&Rr(Rt)&&(Rt=null),Bn.forEach(ki),Hn.forEach(ki)}function Yn(e,t){e.blockedOn===t&&(e.blockedOn=null,ns||(ns=!0,m.unstable_scheduleCallback(m.unstable_NormalPriority,Wc)))}function Kn(e){function t(l){return Yn(l,e)}if(0<Mr.length){Yn(Mr[0],e);for(var n=1;n<Mr.length;n++){var r=Mr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(zt!==null&&Yn(zt,e),Mt!==null&&Yn(Mt,e),Rt!==null&&Yn(Rt,e),Bn.forEach(t),Hn.forEach(t),n=0;n<Ft.length;n++)r=Ft[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Ft.length&&(n=Ft[0],n.blockedOn===null);)Ni(n),n.blockedOn===null&&Ft.shift()}var pn=re.ReactCurrentBatchConfig,Fr=!0;function Bc(e,t,n,r){var l=de,o=pn.transition;pn.transition=null;try{de=1,rs(e,t,n,r)}finally{de=l,pn.transition=o}}function Hc(e,t,n,r){var l=de,o=pn.transition;pn.transition=null;try{de=4,rs(e,t,n,r)}finally{de=l,pn.transition=o}}function rs(e,t,n,r){if(Fr){var l=ls(e,t,n,r);if(l===null)Ss(e,t,r,Dr,n),ji(e,r);else if(Vc(l,e,t,n,r))r.stopPropagation();else if(ji(e,r),t&4&&-1<Uc.indexOf(e)){for(;l!==null;){var o=sr(l);if(o!==null&&yi(o),o=ls(e,t,n,r),o===null&&Ss(e,t,r,Dr,n),o===l)break;l=o}l!==null&&r.stopPropagation()}else Ss(e,t,r,null,n)}}var Dr=null;function ls(e,t,n,r){if(Dr=null,e=Yl(r),e=Jt(e),e!==null)if(t=Zt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=ai(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Dr=e,null}function Ei(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(zc()){case Jl:return 1;case mi:return 4;case Tr:case Mc:return 16;case hi:return 536870912;default:return 16}default:return 16}}var Dt=null,ss=null,Ir=null;function Ci(){if(Ir)return Ir;var e,t=ss,n=t.length,r,l="value"in Dt?Dt.value:Dt.textContent,o=l.length;for(e=0;e<n&&t[e]===l[e];e++);var u=n-e;for(r=1;r<=u&&t[n-r]===l[o-r];r++);return Ir=l.slice(e,1<r?1-r:void 0)}function Or(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 $r(){return!0}function Ti(){return!1}function be(e){function t(n,r,l,o,u){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=o,this.target=u,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(n=e[p],this[p]=n?n(o):o[p]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?$r:Ti,this.isPropagationStopped=Ti,this}return V(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=$r)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=$r)},persist:function(){},isPersistent:$r}),t}var mn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},os=be(mn),Xn=V({},mn,{view:0,detail:0}),Qc=be(Xn),is,as,Gn,Ar=V({},Xn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cs,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!==Gn&&(Gn&&e.type==="mousemove"?(is=e.screenX-Gn.screenX,as=e.screenY-Gn.screenY):as=is=0,Gn=e),is)},movementY:function(e){return"movementY"in e?e.movementY:as}}),_i=be(Ar),Yc=V({},Ar,{dataTransfer:0}),Kc=be(Yc),Xc=V({},Xn,{relatedTarget:0}),us=be(Xc),Gc=V({},mn,{animationName:0,elapsedTime:0,pseudoElement:0}),Zc=be(Gc),Jc=V({},mn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),qc=be(Jc),bc=V({},mn,{data:0}),Li=be(bc),ed={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},td={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"},nd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rd(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=nd[e])?!!t[e]:!1}function cs(){return rd}var ld=V({},Xn,{key:function(e){if(e.key){var t=ed[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Or(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?td[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cs,charCode:function(e){return e.type==="keypress"?Or(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Or(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),sd=be(ld),od=V({},Ar,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pi=be(od),id=V({},Xn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cs}),ad=be(id),ud=V({},mn,{propertyName:0,elapsedTime:0,pseudoElement:0}),cd=be(ud),dd=V({},Ar,{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}),fd=be(dd),pd=[9,13,27,32],ds=w&&"CompositionEvent"in window,Zn=null;w&&"documentMode"in document&&(Zn=document.documentMode);var md=w&&"TextEvent"in window&&!Zn,zi=w&&(!ds||Zn&&8<Zn&&11>=Zn),Mi=" ",Ri=!1;function Fi(e,t){switch(e){case"keyup":return pd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Di(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var hn=!1;function hd(e,t){switch(e){case"compositionend":return Di(t);case"keypress":return t.which!==32?null:(Ri=!0,Mi);case"textInput":return e=t.data,e===Mi&&Ri?null:e;default:return null}}function vd(e,t){if(hn)return e==="compositionend"||!ds&&Fi(e,t)?(e=Ci(),Ir=ss=Dt=null,hn=!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 zi&&t.locale!=="ko"?null:t.data;default:return null}}var gd={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 Ii(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gd[e.type]:t==="textarea"}function Oi(e,t,n,r){ri(r),t=Hr(t,"onChange"),0<t.length&&(n=new os("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Jn=null,qn=null;function yd(e){ta(e,0)}function Ur(e){var t=wn(e);if(Qo(t))return e}function xd(e,t){if(e==="change")return t}var $i=!1;if(w){var fs;if(w){var ps="oninput"in document;if(!ps){var Ai=document.createElement("div");Ai.setAttribute("oninput","return;"),ps=typeof Ai.oninput=="function"}fs=ps}else fs=!1;$i=fs&&(!document.documentMode||9<document.documentMode)}function Ui(){Jn&&(Jn.detachEvent("onpropertychange",Vi),qn=Jn=null)}function Vi(e){if(e.propertyName==="value"&&Ur(qn)){var t=[];Oi(t,qn,e,Yl(e)),ii(yd,t)}}function wd(e,t,n){e==="focusin"?(Ui(),Jn=t,qn=n,Jn.attachEvent("onpropertychange",Vi)):e==="focusout"&&Ui()}function Sd(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ur(qn)}function jd(e,t){if(e==="click")return Ur(t)}function Nd(e,t){if(e==="input"||e==="change")return Ur(t)}function kd(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var dt=typeof Object.is=="function"?Object.is:kd;function bn(e,t){if(dt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var l=n[r];if(!E.call(t,l)||!dt(e[l],t[l]))return!1}return!0}function Wi(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Bi(e,t){var n=Wi(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Wi(n)}}function Hi(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Hi(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Qi(){for(var e=window,t=Nr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nr(e.document)}return t}function ms(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")}function Ed(e){var t=Qi(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Hi(n.ownerDocument.documentElement,n)){if(r!==null&&ms(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=Bi(n,o);var u=Bi(n,r);l&&u&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==u.node||e.focusOffset!==u.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(u.node,u.offset)):(t.setEnd(u.node,u.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Cd=w&&"documentMode"in document&&11>=document.documentMode,vn=null,hs=null,er=null,vs=!1;function Yi(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;vs||vn==null||vn!==Nr(r)||(r=vn,"selectionStart"in r&&ms(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),er&&bn(er,r)||(er=r,r=Hr(hs,"onSelect"),0<r.length&&(t=new os("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=vn)))}function Vr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var gn={animationend:Vr("Animation","AnimationEnd"),animationiteration:Vr("Animation","AnimationIteration"),animationstart:Vr("Animation","AnimationStart"),transitionend:Vr("Transition","TransitionEnd")},gs={},Ki={};w&&(Ki=document.createElement("div").style,"AnimationEvent"in window||(delete gn.animationend.animation,delete gn.animationiteration.animation,delete gn.animationstart.animation),"TransitionEvent"in window||delete gn.transitionend.transition);function Wr(e){if(gs[e])return gs[e];if(!gn[e])return e;var t=gn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ki)return gs[e]=t[n];return e}var Xi=Wr("animationend"),Gi=Wr("animationiteration"),Zi=Wr("animationstart"),Ji=Wr("transitionend"),qi=new Map,bi="abort auxClick 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(" ");function It(e,t){qi.set(e,t),d(t,[e])}for(var ys=0;ys<bi.length;ys++){var xs=bi[ys],Td=xs.toLowerCase(),_d=xs[0].toUpperCase()+xs.slice(1);It(Td,"on"+_d)}It(Xi,"onAnimationEnd"),It(Gi,"onAnimationIteration"),It(Zi,"onAnimationStart"),It("dblclick","onDoubleClick"),It("focusin","onFocus"),It("focusout","onBlur"),It(Ji,"onTransitionEnd"),g("onMouseEnter",["mouseout","mouseover"]),g("onMouseLeave",["mouseout","mouseover"]),g("onPointerEnter",["pointerout","pointerover"]),g("onPointerLeave",["pointerout","pointerover"]),d("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),d("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),d("onBeforeInput",["compositionend","keypress","textInput","paste"]),d("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var tr="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(" "),Ld=new Set("cancel close invalid load scroll toggle".split(" ").concat(tr));function ea(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Tc(r,t,void 0,e),e.currentTarget=null}function ta(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var u=r.length-1;0<=u;u--){var p=r[u],h=p.instance,j=p.currentTarget;if(p=p.listener,h!==o&&l.isPropagationStopped())break e;ea(l,p,j),o=h}else for(u=0;u<r.length;u++){if(p=r[u],h=p.instance,j=p.currentTarget,p=p.listener,h!==o&&l.isPropagationStopped())break e;ea(l,p,j),o=h}}}if(Cr)throw e=Zl,Cr=!1,Zl=null,e}function he(e,t){var n=t[Ts];n===void 0&&(n=t[Ts]=new Set);var r=e+"__bubble";n.has(r)||(na(t,e,2,!1),n.add(r))}function ws(e,t,n){var r=0;t&&(r|=4),na(n,e,r,t)}var Br="_reactListening"+Math.random().toString(36).slice(2);function nr(e){if(!e[Br]){e[Br]=!0,c.forEach(function(n){n!=="selectionchange"&&(Ld.has(n)||ws(n,!1,e),ws(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Br]||(t[Br]=!0,ws("selectionchange",!1,t))}}function na(e,t,n,r){switch(Ei(t)){case 1:var l=Bc;break;case 4:l=Hc;break;default:l=rs}n=l.bind(null,t,n,e),l=void 0,!Gl||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function Ss(e,t,n,r,l){var o=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var u=r.tag;if(u===3||u===4){var p=r.stateNode.containerInfo;if(p===l||p.nodeType===8&&p.parentNode===l)break;if(u===4)for(u=r.return;u!==null;){var h=u.tag;if((h===3||h===4)&&(h=u.stateNode.containerInfo,h===l||h.nodeType===8&&h.parentNode===l))return;u=u.return}for(;p!==null;){if(u=Jt(p),u===null)return;if(h=u.tag,h===5||h===6){r=o=u;continue e}p=p.parentNode}}r=r.return}ii(function(){var j=o,R=Yl(n),D=[];e:{var M=qi.get(e);if(M!==void 0){var W=os,Q=e;switch(e){case"keypress":if(Or(n)===0)break e;case"keydown":case"keyup":W=sd;break;case"focusin":Q="focus",W=us;break;case"focusout":Q="blur",W=us;break;case"beforeblur":case"afterblur":W=us;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":W=_i;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":W=Kc;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":W=ad;break;case Xi:case Gi:case Zi:W=Zc;break;case Ji:W=cd;break;case"scroll":W=Qc;break;case"wheel":W=fd;break;case"copy":case"cut":case"paste":W=qc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":W=Pi}var Y=(t&4)!==0,ke=!Y&&e==="scroll",x=Y?M!==null?M+"Capture":null:M;Y=[];for(var v=j,S;v!==null;){S=v;var O=S.stateNode;if(S.tag===5&&O!==null&&(S=O,x!==null&&(O=$n(v,x),O!=null&&Y.push(rr(v,O,S)))),ke)break;v=v.return}0<Y.length&&(M=new W(M,Q,null,n,R),D.push({event:M,listeners:Y}))}}if((t&7)===0){e:{if(M=e==="mouseover"||e==="pointerover",W=e==="mouseout"||e==="pointerout",M&&n!==Ql&&(Q=n.relatedTarget||n.fromElement)&&(Jt(Q)||Q[jt]))break e;if((W||M)&&(M=R.window===R?R:(M=R.ownerDocument)?M.defaultView||M.parentWindow:window,W?(Q=n.relatedTarget||n.toElement,W=j,Q=Q?Jt(Q):null,Q!==null&&(ke=Zt(Q),Q!==ke||Q.tag!==5&&Q.tag!==6)&&(Q=null)):(W=null,Q=j),W!==Q)){if(Y=_i,O="onMouseLeave",x="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(Y=Pi,O="onPointerLeave",x="onPointerEnter",v="pointer"),ke=W==null?M:wn(W),S=Q==null?M:wn(Q),M=new Y(O,v+"leave",W,n,R),M.target=ke,M.relatedTarget=S,O=null,Jt(R)===j&&(Y=new Y(x,v+"enter",Q,n,R),Y.target=S,Y.relatedTarget=ke,O=Y),ke=O,W&&Q)t:{for(Y=W,x=Q,v=0,S=Y;S;S=yn(S))v++;for(S=0,O=x;O;O=yn(O))S++;for(;0<v-S;)Y=yn(Y),v--;for(;0<S-v;)x=yn(x),S--;for(;v--;){if(Y===x||x!==null&&Y===x.alternate)break t;Y=yn(Y),x=yn(x)}Y=null}else Y=null;W!==null&&ra(D,M,W,Y,!1),Q!==null&&ke!==null&&ra(D,ke,Q,Y,!0)}}e:{if(M=j?wn(j):window,W=M.nodeName&&M.nodeName.toLowerCase(),W==="select"||W==="input"&&M.type==="file")var K=xd;else if(Ii(M))if($i)K=Nd;else{K=Sd;var Z=wd}else(W=M.nodeName)&&W.toLowerCase()==="input"&&(M.type==="checkbox"||M.type==="radio")&&(K=jd);if(K&&(K=K(e,j))){Oi(D,K,n,R);break e}Z&&Z(e,M,j),e==="focusout"&&(Z=M._wrapperState)&&Z.controlled&&M.type==="number"&&Ul(M,"number",M.value)}switch(Z=j?wn(j):window,e){case"focusin":(Ii(Z)||Z.contentEditable==="true")&&(vn=Z,hs=j,er=null);break;case"focusout":er=hs=vn=null;break;case"mousedown":vs=!0;break;case"contextmenu":case"mouseup":case"dragend":vs=!1,Yi(D,n,R);break;case"selectionchange":if(Cd)break;case"keydown":case"keyup":Yi(D,n,R)}var J;if(ds)e:{switch(e){case"compositionstart":var ee="onCompositionStart";break e;case"compositionend":ee="onCompositionEnd";break e;case"compositionupdate":ee="onCompositionUpdate";break e}ee=void 0}else hn?Fi(e,n)&&(ee="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(ee="onCompositionStart");ee&&(zi&&n.locale!=="ko"&&(hn||ee!=="onCompositionStart"?ee==="onCompositionEnd"&&hn&&(J=Ci()):(Dt=R,ss="value"in Dt?Dt.value:Dt.textContent,hn=!0)),Z=Hr(j,ee),0<Z.length&&(ee=new Li(ee,e,null,n,R),D.push({event:ee,listeners:Z}),J?ee.data=J:(J=Di(n),J!==null&&(ee.data=J)))),(J=md?hd(e,n):vd(e,n))&&(j=Hr(j,"onBeforeInput"),0<j.length&&(R=new Li("onBeforeInput","beforeinput",null,n,R),D.push({event:R,listeners:j}),R.data=J))}ta(D,t)})}function rr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Hr(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,o=l.stateNode;l.tag===5&&o!==null&&(l=o,o=$n(e,n),o!=null&&r.unshift(rr(e,o,l)),o=$n(e,t),o!=null&&r.push(rr(e,o,l))),e=e.return}return r}function yn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ra(e,t,n,r,l){for(var o=t._reactName,u=[];n!==null&&n!==r;){var p=n,h=p.alternate,j=p.stateNode;if(h!==null&&h===r)break;p.tag===5&&j!==null&&(p=j,l?(h=$n(n,o),h!=null&&u.unshift(rr(n,h,p))):l||(h=$n(n,o),h!=null&&u.push(rr(n,h,p)))),n=n.return}u.length!==0&&e.push({event:t,listeners:u})}var Pd=/\r\n?/g,zd=/\u0000|\uFFFD/g;function la(e){return(typeof e=="string"?e:""+e).replace(Pd,`
|
|
38
|
+
`).replace(zd,"")}function Qr(e,t,n){if(t=la(t),la(e)!==t&&n)throw Error(i(425))}function Yr(){}var js=null,Ns=null;function ks(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Es=typeof setTimeout=="function"?setTimeout:void 0,Md=typeof clearTimeout=="function"?clearTimeout:void 0,sa=typeof Promise=="function"?Promise:void 0,Rd=typeof queueMicrotask=="function"?queueMicrotask:typeof sa<"u"?function(e){return sa.resolve(null).then(e).catch(Fd)}:Es;function Fd(e){setTimeout(function(){throw e})}function Cs(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),Kn(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);Kn(t)}function Ot(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==="$?")break;if(t==="/$")return null}}return e}function oa(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var xn=Math.random().toString(36).slice(2),yt="__reactFiber$"+xn,lr="__reactProps$"+xn,jt="__reactContainer$"+xn,Ts="__reactEvents$"+xn,Dd="__reactListeners$"+xn,Id="__reactHandles$"+xn;function Jt(e){var t=e[yt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[jt]||n[yt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=oa(e);e!==null;){if(n=e[yt])return n;e=oa(e)}return t}e=n,n=e.parentNode}return null}function sr(e){return e=e[yt]||e[jt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function wn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(i(33))}function Kr(e){return e[lr]||null}var _s=[],Sn=-1;function $t(e){return{current:e}}function ve(e){0>Sn||(e.current=_s[Sn],_s[Sn]=null,Sn--)}function me(e,t){Sn++,_s[Sn]=e.current,e.current=t}var At={},$e=$t(At),Qe=$t(!1),qt=At;function jn(e,t){var n=e.type.contextTypes;if(!n)return At;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Ye(e){return e=e.childContextTypes,e!=null}function Xr(){ve(Qe),ve($e)}function ia(e,t,n){if($e.current!==At)throw Error(i(168));me($e,t),me(Qe,n)}function aa(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(i(108,ue(e)||"Unknown",l));return V({},n,r)}function Gr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||At,qt=$e.current,me($e,e),me(Qe,Qe.current),!0}function ua(e,t,n){var r=e.stateNode;if(!r)throw Error(i(169));n?(e=aa(e,t,qt),r.__reactInternalMemoizedMergedChildContext=e,ve(Qe),ve($e),me($e,e)):ve(Qe),me(Qe,n)}var Nt=null,Zr=!1,Ls=!1;function ca(e){Nt===null?Nt=[e]:Nt.push(e)}function Od(e){Zr=!0,ca(e)}function Ut(){if(!Ls&&Nt!==null){Ls=!0;var e=0,t=de;try{var n=Nt;for(de=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Nt=null,Zr=!1}catch(l){throw Nt!==null&&(Nt=Nt.slice(e+1)),fi(Jl,Ut),l}finally{de=t,Ls=!1}}return null}var Nn=[],kn=0,Jr=null,qr=0,lt=[],st=0,bt=null,kt=1,Et="";function en(e,t){Nn[kn++]=qr,Nn[kn++]=Jr,Jr=e,qr=t}function da(e,t,n){lt[st++]=kt,lt[st++]=Et,lt[st++]=bt,bt=e;var r=kt;e=Et;var l=32-ct(r)-1;r&=~(1<<l),n+=1;var o=32-ct(t)+l;if(30<o){var u=l-l%5;o=(r&(1<<u)-1).toString(32),r>>=u,l-=u,kt=1<<32-ct(t)+l|n<<l|r,Et=o+e}else kt=1<<o|n<<l|r,Et=e}function Ps(e){e.return!==null&&(en(e,1),da(e,1,0))}function zs(e){for(;e===Jr;)Jr=Nn[--kn],Nn[kn]=null,qr=Nn[--kn],Nn[kn]=null;for(;e===bt;)bt=lt[--st],lt[st]=null,Et=lt[--st],lt[st]=null,kt=lt[--st],lt[st]=null}var et=null,tt=null,ye=!1,ft=null;function fa(e,t){var n=ut(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function pa(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,et=e,tt=Ot(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,et=e,tt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=bt!==null?{id:kt,overflow:Et}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ut(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,et=e,tt=null,!0):!1;default:return!1}}function Ms(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Rs(e){if(ye){var t=tt;if(t){var n=t;if(!pa(e,t)){if(Ms(e))throw Error(i(418));t=Ot(n.nextSibling);var r=et;t&&pa(e,t)?fa(r,n):(e.flags=e.flags&-4097|2,ye=!1,et=e)}}else{if(Ms(e))throw Error(i(418));e.flags=e.flags&-4097|2,ye=!1,et=e}}}function ma(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;et=e}function br(e){if(e!==et)return!1;if(!ye)return ma(e),ye=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ks(e.type,e.memoizedProps)),t&&(t=tt)){if(Ms(e))throw ha(),Error(i(418));for(;t;)fa(e,t),t=Ot(t.nextSibling)}if(ma(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){tt=Ot(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}tt=null}}else tt=et?Ot(e.stateNode.nextSibling):null;return!0}function ha(){for(var e=tt;e;)e=Ot(e.nextSibling)}function En(){tt=et=null,ye=!1}function Fs(e){ft===null?ft=[e]:ft.push(e)}var $d=re.ReactCurrentBatchConfig;function or(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(i(309));var r=n.stateNode}if(!r)throw Error(i(147,e));var l=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(u){var p=l.refs;u===null?delete p[o]:p[o]=u},t._stringRef=o,t)}if(typeof e!="string")throw Error(i(284));if(!n._owner)throw Error(i(290,e))}return e}function el(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function va(e){var t=e._init;return t(e._payload)}function ga(e){function t(x,v){if(e){var S=x.deletions;S===null?(x.deletions=[v],x.flags|=16):S.push(v)}}function n(x,v){if(!e)return null;for(;v!==null;)t(x,v),v=v.sibling;return null}function r(x,v){for(x=new Map;v!==null;)v.key!==null?x.set(v.key,v):x.set(v.index,v),v=v.sibling;return x}function l(x,v){return x=Xt(x,v),x.index=0,x.sibling=null,x}function o(x,v,S){return x.index=S,e?(S=x.alternate,S!==null?(S=S.index,S<v?(x.flags|=2,v):S):(x.flags|=2,v)):(x.flags|=1048576,v)}function u(x){return e&&x.alternate===null&&(x.flags|=2),x}function p(x,v,S,O){return v===null||v.tag!==6?(v=Co(S,x.mode,O),v.return=x,v):(v=l(v,S),v.return=x,v)}function h(x,v,S,O){var K=S.type;return K===H?R(x,v,S.props.children,O,S.key):v!==null&&(v.elementType===K||typeof K=="object"&&K!==null&&K.$$typeof===Oe&&va(K)===v.type)?(O=l(v,S.props),O.ref=or(x,v,S),O.return=x,O):(O=kl(S.type,S.key,S.props,null,x.mode,O),O.ref=or(x,v,S),O.return=x,O)}function j(x,v,S,O){return v===null||v.tag!==4||v.stateNode.containerInfo!==S.containerInfo||v.stateNode.implementation!==S.implementation?(v=To(S,x.mode,O),v.return=x,v):(v=l(v,S.children||[]),v.return=x,v)}function R(x,v,S,O,K){return v===null||v.tag!==7?(v=un(S,x.mode,O,K),v.return=x,v):(v=l(v,S),v.return=x,v)}function D(x,v,S){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Co(""+v,x.mode,S),v.return=x,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case fe:return S=kl(v.type,v.key,v.props,null,x.mode,S),S.ref=or(x,null,v),S.return=x,S;case b:return v=To(v,x.mode,S),v.return=x,v;case Oe:var O=v._init;return D(x,O(v._payload),S)}if(Dn(v)||q(v))return v=un(v,x.mode,S,null),v.return=x,v;el(x,v)}return null}function M(x,v,S,O){var K=v!==null?v.key:null;if(typeof S=="string"&&S!==""||typeof S=="number")return K!==null?null:p(x,v,""+S,O);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case fe:return S.key===K?h(x,v,S,O):null;case b:return S.key===K?j(x,v,S,O):null;case Oe:return K=S._init,M(x,v,K(S._payload),O)}if(Dn(S)||q(S))return K!==null?null:R(x,v,S,O,null);el(x,S)}return null}function W(x,v,S,O,K){if(typeof O=="string"&&O!==""||typeof O=="number")return x=x.get(S)||null,p(v,x,""+O,K);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case fe:return x=x.get(O.key===null?S:O.key)||null,h(v,x,O,K);case b:return x=x.get(O.key===null?S:O.key)||null,j(v,x,O,K);case Oe:var Z=O._init;return W(x,v,S,Z(O._payload),K)}if(Dn(O)||q(O))return x=x.get(S)||null,R(v,x,O,K,null);el(v,O)}return null}function Q(x,v,S,O){for(var K=null,Z=null,J=v,ee=v=0,Me=null;J!==null&&ee<S.length;ee++){J.index>ee?(Me=J,J=null):Me=J.sibling;var ae=M(x,J,S[ee],O);if(ae===null){J===null&&(J=Me);break}e&&J&&ae.alternate===null&&t(x,J),v=o(ae,v,ee),Z===null?K=ae:Z.sibling=ae,Z=ae,J=Me}if(ee===S.length)return n(x,J),ye&&en(x,ee),K;if(J===null){for(;ee<S.length;ee++)J=D(x,S[ee],O),J!==null&&(v=o(J,v,ee),Z===null?K=J:Z.sibling=J,Z=J);return ye&&en(x,ee),K}for(J=r(x,J);ee<S.length;ee++)Me=W(J,x,ee,S[ee],O),Me!==null&&(e&&Me.alternate!==null&&J.delete(Me.key===null?ee:Me.key),v=o(Me,v,ee),Z===null?K=Me:Z.sibling=Me,Z=Me);return e&&J.forEach(function(Gt){return t(x,Gt)}),ye&&en(x,ee),K}function Y(x,v,S,O){var K=q(S);if(typeof K!="function")throw Error(i(150));if(S=K.call(S),S==null)throw Error(i(151));for(var Z=K=null,J=v,ee=v=0,Me=null,ae=S.next();J!==null&&!ae.done;ee++,ae=S.next()){J.index>ee?(Me=J,J=null):Me=J.sibling;var Gt=M(x,J,ae.value,O);if(Gt===null){J===null&&(J=Me);break}e&&J&&Gt.alternate===null&&t(x,J),v=o(Gt,v,ee),Z===null?K=Gt:Z.sibling=Gt,Z=Gt,J=Me}if(ae.done)return n(x,J),ye&&en(x,ee),K;if(J===null){for(;!ae.done;ee++,ae=S.next())ae=D(x,ae.value,O),ae!==null&&(v=o(ae,v,ee),Z===null?K=ae:Z.sibling=ae,Z=ae);return ye&&en(x,ee),K}for(J=r(x,J);!ae.done;ee++,ae=S.next())ae=W(J,x,ee,ae.value,O),ae!==null&&(e&&ae.alternate!==null&&J.delete(ae.key===null?ee:ae.key),v=o(ae,v,ee),Z===null?K=ae:Z.sibling=ae,Z=ae);return e&&J.forEach(function(yf){return t(x,yf)}),ye&&en(x,ee),K}function ke(x,v,S,O){if(typeof S=="object"&&S!==null&&S.type===H&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case fe:e:{for(var K=S.key,Z=v;Z!==null;){if(Z.key===K){if(K=S.type,K===H){if(Z.tag===7){n(x,Z.sibling),v=l(Z,S.props.children),v.return=x,x=v;break e}}else if(Z.elementType===K||typeof K=="object"&&K!==null&&K.$$typeof===Oe&&va(K)===Z.type){n(x,Z.sibling),v=l(Z,S.props),v.ref=or(x,Z,S),v.return=x,x=v;break e}n(x,Z);break}else t(x,Z);Z=Z.sibling}S.type===H?(v=un(S.props.children,x.mode,O,S.key),v.return=x,x=v):(O=kl(S.type,S.key,S.props,null,x.mode,O),O.ref=or(x,v,S),O.return=x,x=O)}return u(x);case b:e:{for(Z=S.key;v!==null;){if(v.key===Z)if(v.tag===4&&v.stateNode.containerInfo===S.containerInfo&&v.stateNode.implementation===S.implementation){n(x,v.sibling),v=l(v,S.children||[]),v.return=x,x=v;break e}else{n(x,v);break}else t(x,v);v=v.sibling}v=To(S,x.mode,O),v.return=x,x=v}return u(x);case Oe:return Z=S._init,ke(x,v,Z(S._payload),O)}if(Dn(S))return Q(x,v,S,O);if(q(S))return Y(x,v,S,O);el(x,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,v!==null&&v.tag===6?(n(x,v.sibling),v=l(v,S),v.return=x,x=v):(n(x,v),v=Co(S,x.mode,O),v.return=x,x=v),u(x)):n(x,v)}return ke}var Cn=ga(!0),ya=ga(!1),tl=$t(null),nl=null,Tn=null,Ds=null;function Is(){Ds=Tn=nl=null}function Os(e){var t=tl.current;ve(tl),e._currentValue=t}function $s(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function _n(e,t){nl=e,Ds=Tn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ke=!0),e.firstContext=null)}function ot(e){var t=e._currentValue;if(Ds!==e)if(e={context:e,memoizedValue:t,next:null},Tn===null){if(nl===null)throw Error(i(308));Tn=e,nl.dependencies={lanes:0,firstContext:e}}else Tn=Tn.next=e;return t}var tn=null;function As(e){tn===null?tn=[e]:tn.push(e)}function xa(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,As(t)):(n.next=l.next,l.next=n),t.interleaved=n,Ct(e,r)}function Ct(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Vt=!1;function Us(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function wa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Tt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Wt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(ie&2)!==0){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Ct(e,n)}return l=r.interleaved,l===null?(t.next=t,As(r)):(t.next=l.next,l.next=t),r.interleaved=t,Ct(e,n)}function rl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,es(e,n)}}function Sa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var u={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?l=o=u:o=o.next=u,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ll(e,t,n,r){var l=e.updateQueue;Vt=!1;var o=l.firstBaseUpdate,u=l.lastBaseUpdate,p=l.shared.pending;if(p!==null){l.shared.pending=null;var h=p,j=h.next;h.next=null,u===null?o=j:u.next=j,u=h;var R=e.alternate;R!==null&&(R=R.updateQueue,p=R.lastBaseUpdate,p!==u&&(p===null?R.firstBaseUpdate=j:p.next=j,R.lastBaseUpdate=h))}if(o!==null){var D=l.baseState;u=0,R=j=h=null,p=o;do{var M=p.lane,W=p.eventTime;if((r&M)===M){R!==null&&(R=R.next={eventTime:W,lane:0,tag:p.tag,payload:p.payload,callback:p.callback,next:null});e:{var Q=e,Y=p;switch(M=t,W=n,Y.tag){case 1:if(Q=Y.payload,typeof Q=="function"){D=Q.call(W,D,M);break e}D=Q;break e;case 3:Q.flags=Q.flags&-65537|128;case 0:if(Q=Y.payload,M=typeof Q=="function"?Q.call(W,D,M):Q,M==null)break e;D=V({},D,M);break e;case 2:Vt=!0}}p.callback!==null&&p.lane!==0&&(e.flags|=64,M=l.effects,M===null?l.effects=[p]:M.push(p))}else W={eventTime:W,lane:M,tag:p.tag,payload:p.payload,callback:p.callback,next:null},R===null?(j=R=W,h=D):R=R.next=W,u|=M;if(p=p.next,p===null){if(p=l.shared.pending,p===null)break;M=p,p=M.next,M.next=null,l.lastBaseUpdate=M,l.shared.pending=null}}while(!0);if(R===null&&(h=D),l.baseState=h,l.firstBaseUpdate=j,l.lastBaseUpdate=R,t=l.shared.interleaved,t!==null){l=t;do u|=l.lane,l=l.next;while(l!==t)}else o===null&&(l.shared.lanes=0);ln|=u,e.lanes=u,e.memoizedState=D}}function ja(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],l=r.callback;if(l!==null){if(r.callback=null,r=n,typeof l!="function")throw Error(i(191,l));l.call(r)}}}var ir={},xt=$t(ir),ar=$t(ir),ur=$t(ir);function nn(e){if(e===ir)throw Error(i(174));return e}function Vs(e,t){switch(me(ur,t),me(ar,e),me(xt,ir),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Wl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Wl(t,e)}ve(xt),me(xt,t)}function Ln(){ve(xt),ve(ar),ve(ur)}function Na(e){nn(ur.current);var t=nn(xt.current),n=Wl(t,e.type);t!==n&&(me(ar,e),me(xt,n))}function Ws(e){ar.current===e&&(ve(xt),ve(ar))}var we=$t(0);function sl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Bs=[];function Hs(){for(var e=0;e<Bs.length;e++)Bs[e]._workInProgressVersionPrimary=null;Bs.length=0}var ol=re.ReactCurrentDispatcher,Qs=re.ReactCurrentBatchConfig,rn=0,Se=null,_e=null,Pe=null,il=!1,cr=!1,dr=0,Ad=0;function Ae(){throw Error(i(321))}function Ys(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!dt(e[n],t[n]))return!1;return!0}function Ks(e,t,n,r,l,o){if(rn=o,Se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ol.current=e===null||e.memoizedState===null?Bd:Hd,e=n(r,l),cr){o=0;do{if(cr=!1,dr=0,25<=o)throw Error(i(301));o+=1,Pe=_e=null,t.updateQueue=null,ol.current=Qd,e=n(r,l)}while(cr)}if(ol.current=cl,t=_e!==null&&_e.next!==null,rn=0,Pe=_e=Se=null,il=!1,t)throw Error(i(300));return e}function Xs(){var e=dr!==0;return dr=0,e}function wt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pe===null?Se.memoizedState=Pe=e:Pe=Pe.next=e,Pe}function it(){if(_e===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=_e.next;var t=Pe===null?Se.memoizedState:Pe.next;if(t!==null)Pe=t,_e=e;else{if(e===null)throw Error(i(310));_e=e,e={memoizedState:_e.memoizedState,baseState:_e.baseState,baseQueue:_e.baseQueue,queue:_e.queue,next:null},Pe===null?Se.memoizedState=Pe=e:Pe=Pe.next=e}return Pe}function fr(e,t){return typeof t=="function"?t(e):t}function Gs(e){var t=it(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=_e,l=r.baseQueue,o=n.pending;if(o!==null){if(l!==null){var u=l.next;l.next=o.next,o.next=u}r.baseQueue=l=o,n.pending=null}if(l!==null){o=l.next,r=r.baseState;var p=u=null,h=null,j=o;do{var R=j.lane;if((rn&R)===R)h!==null&&(h=h.next={lane:0,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null}),r=j.hasEagerState?j.eagerState:e(r,j.action);else{var D={lane:R,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null};h===null?(p=h=D,u=r):h=h.next=D,Se.lanes|=R,ln|=R}j=j.next}while(j!==null&&j!==o);h===null?u=r:h.next=p,dt(r,t.memoizedState)||(Ke=!0),t.memoizedState=r,t.baseState=u,t.baseQueue=h,n.lastRenderedState=r}if(e=n.interleaved,e!==null){l=e;do o=l.lane,Se.lanes|=o,ln|=o,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Zs(e){var t=it(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,o=t.memoizedState;if(l!==null){n.pending=null;var u=l=l.next;do o=e(o,u.action),u=u.next;while(u!==l);dt(o,t.memoizedState)||(Ke=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ka(){}function Ea(e,t){var n=Se,r=it(),l=t(),o=!dt(r.memoizedState,l);if(o&&(r.memoizedState=l,Ke=!0),r=r.queue,Js(_a.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Pe!==null&&Pe.memoizedState.tag&1){if(n.flags|=2048,pr(9,Ta.bind(null,n,r,l,t),void 0,null),ze===null)throw Error(i(349));(rn&30)!==0||Ca(n,t,l)}return l}function Ca(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ta(e,t,n,r){t.value=n,t.getSnapshot=r,La(t)&&Pa(e)}function _a(e,t,n){return n(function(){La(t)&&Pa(e)})}function La(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!dt(e,n)}catch{return!0}}function Pa(e){var t=Ct(e,1);t!==null&&vt(t,e,1,-1)}function za(e){var t=wt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:fr,lastRenderedState:e},t.queue=e,e=e.dispatch=Wd.bind(null,Se,e),[t.memoizedState,e]}function pr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Ma(){return it().memoizedState}function al(e,t,n,r){var l=wt();Se.flags|=e,l.memoizedState=pr(1|t,n,void 0,r===void 0?null:r)}function ul(e,t,n,r){var l=it();r=r===void 0?null:r;var o=void 0;if(_e!==null){var u=_e.memoizedState;if(o=u.destroy,r!==null&&Ys(r,u.deps)){l.memoizedState=pr(t,n,o,r);return}}Se.flags|=e,l.memoizedState=pr(1|t,n,o,r)}function Ra(e,t){return al(8390656,8,e,t)}function Js(e,t){return ul(2048,8,e,t)}function Fa(e,t){return ul(4,2,e,t)}function Da(e,t){return ul(4,4,e,t)}function Ia(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Oa(e,t,n){return n=n!=null?n.concat([e]):null,ul(4,4,Ia.bind(null,t,e),n)}function qs(){}function $a(e,t){var n=it();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ys(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Aa(e,t){var n=it();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ys(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ua(e,t,n){return(rn&21)===0?(e.baseState&&(e.baseState=!1,Ke=!0),e.memoizedState=n):(dt(n,t)||(n=vi(),Se.lanes|=n,ln|=n,e.baseState=!0),t)}function Ud(e,t){var n=de;de=n!==0&&4>n?n:4,e(!0);var r=Qs.transition;Qs.transition={};try{e(!1),t()}finally{de=n,Qs.transition=r}}function Va(){return it().memoizedState}function Vd(e,t,n){var r=Yt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Wa(e))Ba(t,n);else if(n=xa(e,t,n,r),n!==null){var l=He();vt(n,e,r,l),Ha(n,t,r)}}function Wd(e,t,n){var r=Yt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Wa(e))Ba(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var u=t.lastRenderedState,p=o(u,n);if(l.hasEagerState=!0,l.eagerState=p,dt(p,u)){var h=t.interleaved;h===null?(l.next=l,As(t)):(l.next=h.next,h.next=l),t.interleaved=l;return}}catch{}finally{}n=xa(e,t,l,r),n!==null&&(l=He(),vt(n,e,r,l),Ha(n,t,r))}}function Wa(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function Ba(e,t){cr=il=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ha(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,es(e,n)}}var cl={readContext:ot,useCallback:Ae,useContext:Ae,useEffect:Ae,useImperativeHandle:Ae,useInsertionEffect:Ae,useLayoutEffect:Ae,useMemo:Ae,useReducer:Ae,useRef:Ae,useState:Ae,useDebugValue:Ae,useDeferredValue:Ae,useTransition:Ae,useMutableSource:Ae,useSyncExternalStore:Ae,useId:Ae,unstable_isNewReconciler:!1},Bd={readContext:ot,useCallback:function(e,t){return wt().memoizedState=[e,t===void 0?null:t],e},useContext:ot,useEffect:Ra,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,al(4194308,4,Ia.bind(null,t,e),n)},useLayoutEffect:function(e,t){return al(4194308,4,e,t)},useInsertionEffect:function(e,t){return al(4,2,e,t)},useMemo:function(e,t){var n=wt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=wt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Vd.bind(null,Se,e),[r.memoizedState,e]},useRef:function(e){var t=wt();return e={current:e},t.memoizedState=e},useState:za,useDebugValue:qs,useDeferredValue:function(e){return wt().memoizedState=e},useTransition:function(){var e=za(!1),t=e[0];return e=Ud.bind(null,e[1]),wt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Se,l=wt();if(ye){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),ze===null)throw Error(i(349));(rn&30)!==0||Ca(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,Ra(_a.bind(null,r,o,e),[e]),r.flags|=2048,pr(9,Ta.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=wt(),t=ze.identifierPrefix;if(ye){var n=Et,r=kt;n=(r&~(1<<32-ct(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=dr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Ad++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Hd={readContext:ot,useCallback:$a,useContext:ot,useEffect:Js,useImperativeHandle:Oa,useInsertionEffect:Fa,useLayoutEffect:Da,useMemo:Aa,useReducer:Gs,useRef:Ma,useState:function(){return Gs(fr)},useDebugValue:qs,useDeferredValue:function(e){var t=it();return Ua(t,_e.memoizedState,e)},useTransition:function(){var e=Gs(fr)[0],t=it().memoizedState;return[e,t]},useMutableSource:ka,useSyncExternalStore:Ea,useId:Va,unstable_isNewReconciler:!1},Qd={readContext:ot,useCallback:$a,useContext:ot,useEffect:Js,useImperativeHandle:Oa,useInsertionEffect:Fa,useLayoutEffect:Da,useMemo:Aa,useReducer:Zs,useRef:Ma,useState:function(){return Zs(fr)},useDebugValue:qs,useDeferredValue:function(e){var t=it();return _e===null?t.memoizedState=e:Ua(t,_e.memoizedState,e)},useTransition:function(){var e=Zs(fr)[0],t=it().memoizedState;return[e,t]},useMutableSource:ka,useSyncExternalStore:Ea,useId:Va,unstable_isNewReconciler:!1};function pt(e,t){if(e&&e.defaultProps){t=V({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function bs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:V({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var dl={isMounted:function(e){return(e=e._reactInternals)?Zt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=He(),l=Yt(e),o=Tt(r,l);o.payload=t,n!=null&&(o.callback=n),t=Wt(e,o,l),t!==null&&(vt(t,e,l,r),rl(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=He(),l=Yt(e),o=Tt(r,l);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Wt(e,o,l),t!==null&&(vt(t,e,l,r),rl(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=He(),r=Yt(e),l=Tt(n,r);l.tag=2,t!=null&&(l.callback=t),t=Wt(e,l,r),t!==null&&(vt(t,e,r,n),rl(t,e,r))}};function Qa(e,t,n,r,l,o,u){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,u):t.prototype&&t.prototype.isPureReactComponent?!bn(n,r)||!bn(l,o):!0}function Ya(e,t,n){var r=!1,l=At,o=t.contextType;return typeof o=="object"&&o!==null?o=ot(o):(l=Ye(t)?qt:$e.current,r=t.contextTypes,o=(r=r!=null)?jn(e,l):At),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=dl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=o),t}function Ka(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&dl.enqueueReplaceState(t,t.state,null)}function eo(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},Us(e);var o=t.contextType;typeof o=="object"&&o!==null?l.context=ot(o):(o=Ye(t)?qt:$e.current,l.context=jn(e,o)),l.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(bs(e,t,o,n),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&dl.enqueueReplaceState(l,l.state,null),ll(e,n,l,r),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function Pn(e,t){try{var n="",r=t;do n+=U(r),r=r.return;while(r);var l=n}catch(o){l=`
|
|
39
|
+
Error generating stack: `+o.message+`
|
|
40
|
+
`+o.stack}return{value:e,source:t,stack:l,digest:null}}function to(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function no(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Yd=typeof WeakMap=="function"?WeakMap:Map;function Xa(e,t,n){n=Tt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){yl||(yl=!0,yo=r),no(e,t)},n}function Ga(e,t,n){n=Tt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){no(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){no(e,t),typeof r!="function"&&(Ht===null?Ht=new Set([this]):Ht.add(this));var u=t.stack;this.componentDidCatch(t.value,{componentStack:u!==null?u:""})}),n}function Za(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Yd;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=of.bind(null,e,t,n),t.then(e,e))}function Ja(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function qa(e,t,n,r,l){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Tt(-1,1),t.tag=2,Wt(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=l,e)}var Kd=re.ReactCurrentOwner,Ke=!1;function Be(e,t,n,r){t.child=e===null?ya(t,null,n,r):Cn(t,e.child,n,r)}function ba(e,t,n,r,l){n=n.render;var o=t.ref;return _n(t,l),r=Ks(e,t,n,r,o,l),n=Xs(),e!==null&&!Ke?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,_t(e,t,l)):(ye&&n&&Ps(t),t.flags|=1,Be(e,t,r,l),t.child)}function eu(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!Eo(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,tu(e,t,o,r,l)):(e=kl(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,(e.lanes&l)===0){var u=o.memoizedProps;if(n=n.compare,n=n!==null?n:bn,n(u,r)&&e.ref===t.ref)return _t(e,t,l)}return t.flags|=1,e=Xt(o,r),e.ref=t.ref,e.return=t,t.child=e}function tu(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(bn(o,r)&&e.ref===t.ref)if(Ke=!1,t.pendingProps=r=o,(e.lanes&l)!==0)(e.flags&131072)!==0&&(Ke=!0);else return t.lanes=e.lanes,_t(e,t,l)}return ro(e,t,n,r,l)}function nu(e,t,n){var r=t.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},me(Mn,nt),nt|=n;else{if((n&1073741824)===0)return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,me(Mn,nt),nt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,me(Mn,nt),nt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,me(Mn,nt),nt|=r;return Be(e,t,l,n),t.child}function ru(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ro(e,t,n,r,l){var o=Ye(n)?qt:$e.current;return o=jn(t,o),_n(t,l),n=Ks(e,t,n,r,o,l),r=Xs(),e!==null&&!Ke?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,_t(e,t,l)):(ye&&r&&Ps(t),t.flags|=1,Be(e,t,n,l),t.child)}function lu(e,t,n,r,l){if(Ye(n)){var o=!0;Gr(t)}else o=!1;if(_n(t,l),t.stateNode===null)pl(e,t),Ya(t,n,r),eo(t,n,r,l),r=!0;else if(e===null){var u=t.stateNode,p=t.memoizedProps;u.props=p;var h=u.context,j=n.contextType;typeof j=="object"&&j!==null?j=ot(j):(j=Ye(n)?qt:$e.current,j=jn(t,j));var R=n.getDerivedStateFromProps,D=typeof R=="function"||typeof u.getSnapshotBeforeUpdate=="function";D||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(p!==r||h!==j)&&Ka(t,u,r,j),Vt=!1;var M=t.memoizedState;u.state=M,ll(t,r,u,l),h=t.memoizedState,p!==r||M!==h||Qe.current||Vt?(typeof R=="function"&&(bs(t,n,R,r),h=t.memoizedState),(p=Vt||Qa(t,n,p,r,M,h,j))?(D||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=h),u.props=r,u.state=h,u.context=j,r=p):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{u=t.stateNode,wa(e,t),p=t.memoizedProps,j=t.type===t.elementType?p:pt(t.type,p),u.props=j,D=t.pendingProps,M=u.context,h=n.contextType,typeof h=="object"&&h!==null?h=ot(h):(h=Ye(n)?qt:$e.current,h=jn(t,h));var W=n.getDerivedStateFromProps;(R=typeof W=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(p!==D||M!==h)&&Ka(t,u,r,h),Vt=!1,M=t.memoizedState,u.state=M,ll(t,r,u,l);var Q=t.memoizedState;p!==D||M!==Q||Qe.current||Vt?(typeof W=="function"&&(bs(t,n,W,r),Q=t.memoizedState),(j=Vt||Qa(t,n,j,r,M,Q,h)||!1)?(R||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(r,Q,h),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(r,Q,h)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||p===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=Q),u.props=r,u.state=Q,u.context=h,r=j):(typeof u.componentDidUpdate!="function"||p===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),r=!1)}return lo(e,t,n,r,o,l)}function lo(e,t,n,r,l,o){ru(e,t);var u=(t.flags&128)!==0;if(!r&&!u)return l&&ua(t,n,!1),_t(e,t,o);r=t.stateNode,Kd.current=t;var p=u&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&u?(t.child=Cn(t,e.child,null,o),t.child=Cn(t,null,p,o)):Be(e,t,p,o),t.memoizedState=r.state,l&&ua(t,n,!0),t.child}function su(e){var t=e.stateNode;t.pendingContext?ia(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ia(e,t.context,!1),Vs(e,t.containerInfo)}function ou(e,t,n,r,l){return En(),Fs(l),t.flags|=256,Be(e,t,n,r),t.child}var so={dehydrated:null,treeContext:null,retryLane:0};function oo(e){return{baseLanes:e,cachePool:null,transitions:null}}function iu(e,t,n){var r=t.pendingProps,l=we.current,o=!1,u=(t.flags&128)!==0,p;if((p=u)||(p=e!==null&&e.memoizedState===null?!1:(l&2)!==0),p?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),me(we,l&1),e===null)return Rs(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(u=r.children,e=r.fallback,o?(r=t.mode,o=t.child,u={mode:"hidden",children:u},(r&1)===0&&o!==null?(o.childLanes=0,o.pendingProps=u):o=El(u,r,0,null),e=un(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=oo(n),t.memoizedState=so,e):io(t,u));if(l=e.memoizedState,l!==null&&(p=l.dehydrated,p!==null))return Xd(e,t,u,r,p,l,n);if(o){o=r.fallback,u=t.mode,l=e.child,p=l.sibling;var h={mode:"hidden",children:r.children};return(u&1)===0&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=h,t.deletions=null):(r=Xt(l,h),r.subtreeFlags=l.subtreeFlags&14680064),p!==null?o=Xt(p,o):(o=un(o,u,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,u=e.child.memoizedState,u=u===null?oo(n):{baseLanes:u.baseLanes|n,cachePool:null,transitions:u.transitions},o.memoizedState=u,o.childLanes=e.childLanes&~n,t.memoizedState=so,r}return o=e.child,e=o.sibling,r=Xt(o,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function io(e,t){return t=El({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function fl(e,t,n,r){return r!==null&&Fs(r),Cn(t,e.child,null,n),e=io(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Xd(e,t,n,r,l,o,u){if(n)return t.flags&256?(t.flags&=-257,r=to(Error(i(422))),fl(e,t,u,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,l=t.mode,r=El({mode:"visible",children:r.children},l,0,null),o=un(o,l,u,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,(t.mode&1)!==0&&Cn(t,e.child,null,u),t.child.memoizedState=oo(u),t.memoizedState=so,o);if((t.mode&1)===0)return fl(e,t,u,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var p=r.dgst;return r=p,o=Error(i(419)),r=to(o,r,void 0),fl(e,t,u,r)}if(p=(u&e.childLanes)!==0,Ke||p){if(r=ze,r!==null){switch(u&-u){case 4:l=2;break;case 16:l=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=(l&(r.suspendedLanes|u))!==0?0:l,l!==0&&l!==o.retryLane&&(o.retryLane=l,Ct(e,l),vt(r,e,l,-1))}return ko(),r=to(Error(i(421))),fl(e,t,u,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=af.bind(null,e),l._reactRetry=t,null):(e=o.treeContext,tt=Ot(l.nextSibling),et=t,ye=!0,ft=null,e!==null&&(lt[st++]=kt,lt[st++]=Et,lt[st++]=bt,kt=e.id,Et=e.overflow,bt=t),t=io(t,r.children),t.flags|=4096,t)}function au(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),$s(e.return,t,n)}function ao(e,t,n,r,l){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=l)}function uu(e,t,n){var r=t.pendingProps,l=r.revealOrder,o=r.tail;if(Be(e,t,r.children,n),r=we.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&au(e,n,t);else if(e.tag===19)au(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(me(we,r),(t.mode&1)===0)t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&sl(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),ao(t,!1,l,n,o);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&sl(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}ao(t,!0,n,null,o);break;case"together":ao(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function pl(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function _t(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ln|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Xt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Xt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Gd(e,t,n){switch(t.tag){case 3:su(t),En();break;case 5:Na(t);break;case 1:Ye(t.type)&&Gr(t);break;case 4:Vs(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;me(tl,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(me(we,we.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?iu(e,t,n):(me(we,we.current&1),e=_t(e,t,n),e!==null?e.sibling:null);me(we,we.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return uu(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),me(we,we.current),r)break;return null;case 22:case 23:return t.lanes=0,nu(e,t,n)}return _t(e,t,n)}var cu,uo,du,fu;cu=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},uo=function(){},du=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,nn(xt.current);var o=null;switch(n){case"input":l=$l(e,l),r=$l(e,r),o=[];break;case"select":l=V({},l,{value:void 0}),r=V({},r,{value:void 0}),o=[];break;case"textarea":l=Vl(e,l),r=Vl(e,r),o=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Yr)}Bl(n,r);var u;n=null;for(j in l)if(!r.hasOwnProperty(j)&&l.hasOwnProperty(j)&&l[j]!=null)if(j==="style"){var p=l[j];for(u in p)p.hasOwnProperty(u)&&(n||(n={}),n[u]="")}else j!=="dangerouslySetInnerHTML"&&j!=="children"&&j!=="suppressContentEditableWarning"&&j!=="suppressHydrationWarning"&&j!=="autoFocus"&&(f.hasOwnProperty(j)?o||(o=[]):(o=o||[]).push(j,null));for(j in r){var h=r[j];if(p=l!=null?l[j]:void 0,r.hasOwnProperty(j)&&h!==p&&(h!=null||p!=null))if(j==="style")if(p){for(u in p)!p.hasOwnProperty(u)||h&&h.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in h)h.hasOwnProperty(u)&&p[u]!==h[u]&&(n||(n={}),n[u]=h[u])}else n||(o||(o=[]),o.push(j,n)),n=h;else j==="dangerouslySetInnerHTML"?(h=h?h.__html:void 0,p=p?p.__html:void 0,h!=null&&p!==h&&(o=o||[]).push(j,h)):j==="children"?typeof h!="string"&&typeof h!="number"||(o=o||[]).push(j,""+h):j!=="suppressContentEditableWarning"&&j!=="suppressHydrationWarning"&&(f.hasOwnProperty(j)?(h!=null&&j==="onScroll"&&he("scroll",e),o||p===h||(o=[])):(o=o||[]).push(j,h))}n&&(o=o||[]).push("style",n);var j=o;(t.updateQueue=j)&&(t.flags|=4)}},fu=function(e,t,n,r){n!==r&&(t.flags|=4)};function mr(e,t){if(!ye)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ue(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Zd(e,t,n){var r=t.pendingProps;switch(zs(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(t),null;case 1:return Ye(t.type)&&Xr(),Ue(t),null;case 3:return r=t.stateNode,Ln(),ve(Qe),ve($e),Hs(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(br(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ft!==null&&(So(ft),ft=null))),uo(e,t),Ue(t),null;case 5:Ws(t);var l=nn(ur.current);if(n=t.type,e!==null&&t.stateNode!=null)du(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Ue(t),null}if(e=nn(xt.current),br(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[yt]=t,r[lr]=o,e=(t.mode&1)!==0,n){case"dialog":he("cancel",r),he("close",r);break;case"iframe":case"object":case"embed":he("load",r);break;case"video":case"audio":for(l=0;l<tr.length;l++)he(tr[l],r);break;case"source":he("error",r);break;case"img":case"image":case"link":he("error",r),he("load",r);break;case"details":he("toggle",r);break;case"input":Yo(r,o),he("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},he("invalid",r);break;case"textarea":Go(r,o),he("invalid",r)}Bl(n,o),l=null;for(var u in o)if(o.hasOwnProperty(u)){var p=o[u];u==="children"?typeof p=="string"?r.textContent!==p&&(o.suppressHydrationWarning!==!0&&Qr(r.textContent,p,e),l=["children",p]):typeof p=="number"&&r.textContent!==""+p&&(o.suppressHydrationWarning!==!0&&Qr(r.textContent,p,e),l=["children",""+p]):f.hasOwnProperty(u)&&p!=null&&u==="onScroll"&&he("scroll",r)}switch(n){case"input":jr(r),Xo(r,o,!0);break;case"textarea":jr(r),Jo(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Yr)}r=l,t.updateQueue=r,r!==null&&(t.flags|=4)}else{u=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=qo(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=u.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),n==="select"&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[yt]=t,e[lr]=r,cu(e,t,!1,!1),t.stateNode=e;e:{switch(u=Hl(n,r),n){case"dialog":he("cancel",e),he("close",e),l=r;break;case"iframe":case"object":case"embed":he("load",e),l=r;break;case"video":case"audio":for(l=0;l<tr.length;l++)he(tr[l],e);l=r;break;case"source":he("error",e),l=r;break;case"img":case"image":case"link":he("error",e),he("load",e),l=r;break;case"details":he("toggle",e),l=r;break;case"input":Yo(e,r),l=$l(e,r),he("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=V({},r,{value:void 0}),he("invalid",e);break;case"textarea":Go(e,r),l=Vl(e,r),he("invalid",e);break;default:l=r}Bl(n,l),p=l;for(o in p)if(p.hasOwnProperty(o)){var h=p[o];o==="style"?ti(e,h):o==="dangerouslySetInnerHTML"?(h=h?h.__html:void 0,h!=null&&bo(e,h)):o==="children"?typeof h=="string"?(n!=="textarea"||h!=="")&&In(e,h):typeof h=="number"&&In(e,""+h):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(f.hasOwnProperty(o)?h!=null&&o==="onScroll"&&he("scroll",e):h!=null&&X(e,o,h,u))}switch(n){case"input":jr(e),Xo(e,r,!1);break;case"textarea":jr(e),Jo(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ce(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?cn(e,!!r.multiple,o,!1):r.defaultValue!=null&&cn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=Yr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ue(t),null;case 6:if(e&&t.stateNode!=null)fu(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(i(166));if(n=nn(ur.current),nn(xt.current),br(t)){if(r=t.stateNode,n=t.memoizedProps,r[yt]=t,(o=r.nodeValue!==n)&&(e=et,e!==null))switch(e.tag){case 3:Qr(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Qr(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[yt]=t,t.stateNode=r}return Ue(t),null;case 13:if(ve(we),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ye&&tt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)ha(),En(),t.flags|=98560,o=!1;else if(o=br(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(i(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(i(317));o[yt]=t}else En(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ue(t),o=!1}else ft!==null&&(So(ft),ft=null),o=!0;if(!o)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(we.current&1)!==0?Le===0&&(Le=3):ko())),t.updateQueue!==null&&(t.flags|=4),Ue(t),null);case 4:return Ln(),uo(e,t),e===null&&nr(t.stateNode.containerInfo),Ue(t),null;case 10:return Os(t.type._context),Ue(t),null;case 17:return Ye(t.type)&&Xr(),Ue(t),null;case 19:if(ve(we),o=t.memoizedState,o===null)return Ue(t),null;if(r=(t.flags&128)!==0,u=o.rendering,u===null)if(r)mr(o,!1);else{if(Le!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=sl(e),u!==null){for(t.flags|=128,mr(o,!1),r=u.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,u=o.alternate,u===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=u.childLanes,o.lanes=u.lanes,o.child=u.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=u.memoizedProps,o.memoizedState=u.memoizedState,o.updateQueue=u.updateQueue,o.type=u.type,e=u.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return me(we,we.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ne()>Rn&&(t.flags|=128,r=!0,mr(o,!1),t.lanes=4194304)}else{if(!r)if(e=sl(u),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),mr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!u.alternate&&!ye)return Ue(t),null}else 2*Ne()-o.renderingStartTime>Rn&&n!==1073741824&&(t.flags|=128,r=!0,mr(o,!1),t.lanes=4194304);o.isBackwards?(u.sibling=t.child,t.child=u):(n=o.last,n!==null?n.sibling=u:t.child=u,o.last=u)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ne(),t.sibling=null,n=we.current,me(we,r?n&1|2:n&1),t):(Ue(t),null);case 22:case 23:return No(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(nt&1073741824)!==0&&(Ue(t),t.subtreeFlags&6&&(t.flags|=8192)):Ue(t),null;case 24:return null;case 25:return null}throw Error(i(156,t.tag))}function Jd(e,t){switch(zs(t),t.tag){case 1:return Ye(t.type)&&Xr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ln(),ve(Qe),ve($e),Hs(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Ws(t),null;case 13:if(ve(we),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));En()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ve(we),null;case 4:return Ln(),null;case 10:return Os(t.type._context),null;case 22:case 23:return No(),null;case 24:return null;default:return null}}var ml=!1,Ve=!1,qd=typeof WeakSet=="function"?WeakSet:Set,B=null;function zn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){je(e,t,r)}else n.current=null}function co(e,t,n){try{n()}catch(r){je(e,t,r)}}var pu=!1;function bd(e,t){if(js=Fr,e=Qi(),ms(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var u=0,p=-1,h=-1,j=0,R=0,D=e,M=null;t:for(;;){for(var W;D!==n||l!==0&&D.nodeType!==3||(p=u+l),D!==o||r!==0&&D.nodeType!==3||(h=u+r),D.nodeType===3&&(u+=D.nodeValue.length),(W=D.firstChild)!==null;)M=D,D=W;for(;;){if(D===e)break t;if(M===n&&++j===l&&(p=u),M===o&&++R===r&&(h=u),(W=D.nextSibling)!==null)break;D=M,M=D.parentNode}D=W}n=p===-1||h===-1?null:{start:p,end:h}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ns={focusedElem:e,selectionRange:n},Fr=!1,B=t;B!==null;)if(t=B,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,B=e;else for(;B!==null;){t=B;try{var Q=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(Q!==null){var Y=Q.memoizedProps,ke=Q.memoizedState,x=t.stateNode,v=x.getSnapshotBeforeUpdate(t.elementType===t.type?Y:pt(t.type,Y),ke);x.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(O){je(t,t.return,O)}if(e=t.sibling,e!==null){e.return=t.return,B=e;break}B=t.return}return Q=pu,pu=!1,Q}function hr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&co(t,n,o)}l=l.next}while(l!==r)}}function hl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function fo(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function mu(e){var t=e.alternate;t!==null&&(e.alternate=null,mu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[yt],delete t[lr],delete t[Ts],delete t[Dd],delete t[Id])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function hu(e){return e.tag===5||e.tag===3||e.tag===4}function vu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hu(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.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 po(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Yr));else if(r!==4&&(e=e.child,e!==null))for(po(e,t,n),e=e.sibling;e!==null;)po(e,t,n),e=e.sibling}function mo(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(mo(e,t,n),e=e.sibling;e!==null;)mo(e,t,n),e=e.sibling}var Re=null,mt=!1;function Bt(e,t,n){for(n=n.child;n!==null;)gu(e,t,n),n=n.sibling}function gu(e,t,n){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(_r,n)}catch{}switch(n.tag){case 5:Ve||zn(n,t);case 6:var r=Re,l=mt;Re=null,Bt(e,t,n),Re=r,mt=l,Re!==null&&(mt?(e=Re,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Re.removeChild(n.stateNode));break;case 18:Re!==null&&(mt?(e=Re,n=n.stateNode,e.nodeType===8?Cs(e.parentNode,n):e.nodeType===1&&Cs(e,n),Kn(e)):Cs(Re,n.stateNode));break;case 4:r=Re,l=mt,Re=n.stateNode.containerInfo,mt=!0,Bt(e,t,n),Re=r,mt=l;break;case 0:case 11:case 14:case 15:if(!Ve&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,u=o.destroy;o=o.tag,u!==void 0&&((o&2)!==0||(o&4)!==0)&&co(n,t,u),l=l.next}while(l!==r)}Bt(e,t,n);break;case 1:if(!Ve&&(zn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(p){je(n,t,p)}Bt(e,t,n);break;case 21:Bt(e,t,n);break;case 22:n.mode&1?(Ve=(r=Ve)||n.memoizedState!==null,Bt(e,t,n),Ve=r):Bt(e,t,n);break;default:Bt(e,t,n)}}function yu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new qd),t.forEach(function(r){var l=uf.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function ht(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];try{var o=e,u=t,p=u;e:for(;p!==null;){switch(p.tag){case 5:Re=p.stateNode,mt=!1;break e;case 3:Re=p.stateNode.containerInfo,mt=!0;break e;case 4:Re=p.stateNode.containerInfo,mt=!0;break e}p=p.return}if(Re===null)throw Error(i(160));gu(o,u,l),Re=null,mt=!1;var h=l.alternate;h!==null&&(h.return=null),l.return=null}catch(j){je(l,t,j)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)xu(t,e),t=t.sibling}function xu(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ht(t,e),St(e),r&4){try{hr(3,e,e.return),hl(3,e)}catch(Y){je(e,e.return,Y)}try{hr(5,e,e.return)}catch(Y){je(e,e.return,Y)}}break;case 1:ht(t,e),St(e),r&512&&n!==null&&zn(n,n.return);break;case 5:if(ht(t,e),St(e),r&512&&n!==null&&zn(n,n.return),e.flags&32){var l=e.stateNode;try{In(l,"")}catch(Y){je(e,e.return,Y)}}if(r&4&&(l=e.stateNode,l!=null)){var o=e.memoizedProps,u=n!==null?n.memoizedProps:o,p=e.type,h=e.updateQueue;if(e.updateQueue=null,h!==null)try{p==="input"&&o.type==="radio"&&o.name!=null&&Ko(l,o),Hl(p,u);var j=Hl(p,o);for(u=0;u<h.length;u+=2){var R=h[u],D=h[u+1];R==="style"?ti(l,D):R==="dangerouslySetInnerHTML"?bo(l,D):R==="children"?In(l,D):X(l,R,D,j)}switch(p){case"input":Al(l,o);break;case"textarea":Zo(l,o);break;case"select":var M=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!o.multiple;var W=o.value;W!=null?cn(l,!!o.multiple,W,!1):M!==!!o.multiple&&(o.defaultValue!=null?cn(l,!!o.multiple,o.defaultValue,!0):cn(l,!!o.multiple,o.multiple?[]:"",!1))}l[lr]=o}catch(Y){je(e,e.return,Y)}}break;case 6:if(ht(t,e),St(e),r&4){if(e.stateNode===null)throw Error(i(162));l=e.stateNode,o=e.memoizedProps;try{l.nodeValue=o}catch(Y){je(e,e.return,Y)}}break;case 3:if(ht(t,e),St(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Kn(t.containerInfo)}catch(Y){je(e,e.return,Y)}break;case 4:ht(t,e),St(e);break;case 13:ht(t,e),St(e),l=e.child,l.flags&8192&&(o=l.memoizedState!==null,l.stateNode.isHidden=o,!o||l.alternate!==null&&l.alternate.memoizedState!==null||(go=Ne())),r&4&&yu(e);break;case 22:if(R=n!==null&&n.memoizedState!==null,e.mode&1?(Ve=(j=Ve)||R,ht(t,e),Ve=j):ht(t,e),St(e),r&8192){if(j=e.memoizedState!==null,(e.stateNode.isHidden=j)&&!R&&(e.mode&1)!==0)for(B=e,R=e.child;R!==null;){for(D=B=R;B!==null;){switch(M=B,W=M.child,M.tag){case 0:case 11:case 14:case 15:hr(4,M,M.return);break;case 1:zn(M,M.return);var Q=M.stateNode;if(typeof Q.componentWillUnmount=="function"){r=M,n=M.return;try{t=r,Q.props=t.memoizedProps,Q.state=t.memoizedState,Q.componentWillUnmount()}catch(Y){je(r,n,Y)}}break;case 5:zn(M,M.return);break;case 22:if(M.memoizedState!==null){ju(D);continue}}W!==null?(W.return=M,B=W):ju(D)}R=R.sibling}e:for(R=null,D=e;;){if(D.tag===5){if(R===null){R=D;try{l=D.stateNode,j?(o=l.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(p=D.stateNode,h=D.memoizedProps.style,u=h!=null&&h.hasOwnProperty("display")?h.display:null,p.style.display=ei("display",u))}catch(Y){je(e,e.return,Y)}}}else if(D.tag===6){if(R===null)try{D.stateNode.nodeValue=j?"":D.memoizedProps}catch(Y){je(e,e.return,Y)}}else if((D.tag!==22&&D.tag!==23||D.memoizedState===null||D===e)&&D.child!==null){D.child.return=D,D=D.child;continue}if(D===e)break e;for(;D.sibling===null;){if(D.return===null||D.return===e)break e;R===D&&(R=null),D=D.return}R===D&&(R=null),D.sibling.return=D.return,D=D.sibling}}break;case 19:ht(t,e),St(e),r&4&&yu(e);break;case 21:break;default:ht(t,e),St(e)}}function St(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(hu(n)){var r=n;break e}n=n.return}throw Error(i(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(In(l,""),r.flags&=-33);var o=vu(e);mo(e,o,l);break;case 3:case 4:var u=r.stateNode.containerInfo,p=vu(e);po(e,p,u);break;default:throw Error(i(161))}}catch(h){je(e,e.return,h)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ef(e,t,n){B=e,wu(e)}function wu(e,t,n){for(var r=(e.mode&1)!==0;B!==null;){var l=B,o=l.child;if(l.tag===22&&r){var u=l.memoizedState!==null||ml;if(!u){var p=l.alternate,h=p!==null&&p.memoizedState!==null||Ve;p=ml;var j=Ve;if(ml=u,(Ve=h)&&!j)for(B=l;B!==null;)u=B,h=u.child,u.tag===22&&u.memoizedState!==null?Nu(l):h!==null?(h.return=u,B=h):Nu(l);for(;o!==null;)B=o,wu(o),o=o.sibling;B=l,ml=p,Ve=j}Su(e)}else(l.subtreeFlags&8772)!==0&&o!==null?(o.return=l,B=o):Su(e)}}function Su(e){for(;B!==null;){var t=B;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Ve||hl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ve)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:pt(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&ja(t,o,r);break;case 3:var u=t.updateQueue;if(u!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}ja(t,u,n)}break;case 5:var p=t.stateNode;if(n===null&&t.flags&4){n=p;var h=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":h.autoFocus&&n.focus();break;case"img":h.src&&(n.src=h.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var j=t.alternate;if(j!==null){var R=j.memoizedState;if(R!==null){var D=R.dehydrated;D!==null&&Kn(D)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(i(163))}Ve||t.flags&512&&fo(t)}catch(M){je(t,t.return,M)}}if(t===e){B=null;break}if(n=t.sibling,n!==null){n.return=t.return,B=n;break}B=t.return}}function ju(e){for(;B!==null;){var t=B;if(t===e){B=null;break}var n=t.sibling;if(n!==null){n.return=t.return,B=n;break}B=t.return}}function Nu(e){for(;B!==null;){var t=B;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{hl(4,t)}catch(h){je(t,n,h)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(h){je(t,l,h)}}var o=t.return;try{fo(t)}catch(h){je(t,o,h)}break;case 5:var u=t.return;try{fo(t)}catch(h){je(t,u,h)}}}catch(h){je(t,t.return,h)}if(t===e){B=null;break}var p=t.sibling;if(p!==null){p.return=t.return,B=p;break}B=t.return}}var tf=Math.ceil,vl=re.ReactCurrentDispatcher,ho=re.ReactCurrentOwner,at=re.ReactCurrentBatchConfig,ie=0,ze=null,Ce=null,Fe=0,nt=0,Mn=$t(0),Le=0,vr=null,ln=0,gl=0,vo=0,gr=null,Xe=null,go=0,Rn=1/0,Lt=null,yl=!1,yo=null,Ht=null,xl=!1,Qt=null,wl=0,yr=0,xo=null,Sl=-1,jl=0;function He(){return(ie&6)!==0?Ne():Sl!==-1?Sl:Sl=Ne()}function Yt(e){return(e.mode&1)===0?1:(ie&2)!==0&&Fe!==0?Fe&-Fe:$d.transition!==null?(jl===0&&(jl=vi()),jl):(e=de,e!==0||(e=window.event,e=e===void 0?16:Ei(e.type)),e)}function vt(e,t,n,r){if(50<yr)throw yr=0,xo=null,Error(i(185));Wn(e,n,r),((ie&2)===0||e!==ze)&&(e===ze&&((ie&2)===0&&(gl|=n),Le===4&&Kt(e,Fe)),Ge(e,r),n===1&&ie===0&&(t.mode&1)===0&&(Rn=Ne()+500,Zr&&Ut()))}function Ge(e,t){var n=e.callbackNode;$c(e,t);var r=zr(e,e===ze?Fe:0);if(r===0)n!==null&&pi(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&pi(n),t===1)e.tag===0?Od(Eu.bind(null,e)):ca(Eu.bind(null,e)),Rd(function(){(ie&6)===0&&Ut()}),n=null;else{switch(gi(r)){case 1:n=Jl;break;case 4:n=mi;break;case 16:n=Tr;break;case 536870912:n=hi;break;default:n=Tr}n=Ru(n,ku.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ku(e,t){if(Sl=-1,jl=0,(ie&6)!==0)throw Error(i(327));var n=e.callbackNode;if(Fn()&&e.callbackNode!==n)return null;var r=zr(e,e===ze?Fe:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Nl(e,r);else{t=r;var l=ie;ie|=2;var o=Tu();(ze!==e||Fe!==t)&&(Lt=null,Rn=Ne()+500,on(e,t));do try{lf();break}catch(p){Cu(e,p)}while(!0);Is(),vl.current=o,ie=l,Ce!==null?t=0:(ze=null,Fe=0,t=Le)}if(t!==0){if(t===2&&(l=ql(e),l!==0&&(r=l,t=wo(e,l))),t===1)throw n=vr,on(e,0),Kt(e,r),Ge(e,Ne()),n;if(t===6)Kt(e,r);else{if(l=e.current.alternate,(r&30)===0&&!nf(l)&&(t=Nl(e,r),t===2&&(o=ql(e),o!==0&&(r=o,t=wo(e,o))),t===1))throw n=vr,on(e,0),Kt(e,r),Ge(e,Ne()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(i(345));case 2:an(e,Xe,Lt);break;case 3:if(Kt(e,r),(r&130023424)===r&&(t=go+500-Ne(),10<t)){if(zr(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){He(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=Es(an.bind(null,e,Xe,Lt),t);break}an(e,Xe,Lt);break;case 4:if(Kt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var u=31-ct(r);o=1<<u,u=t[u],u>l&&(l=u),r&=~o}if(r=l,r=Ne()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*tf(r/1960))-r,10<r){e.timeoutHandle=Es(an.bind(null,e,Xe,Lt),r);break}an(e,Xe,Lt);break;case 5:an(e,Xe,Lt);break;default:throw Error(i(329))}}}return Ge(e,Ne()),e.callbackNode===n?ku.bind(null,e):null}function wo(e,t){var n=gr;return e.current.memoizedState.isDehydrated&&(on(e,t).flags|=256),e=Nl(e,t),e!==2&&(t=Xe,Xe=n,t!==null&&So(t)),e}function So(e){Xe===null?Xe=e:Xe.push.apply(Xe,e)}function nf(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var l=n[r],o=l.getSnapshot;l=l.value;try{if(!dt(o(),l))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Kt(e,t){for(t&=~vo,t&=~gl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ct(t),r=1<<n;e[n]=-1,t&=~r}}function Eu(e){if((ie&6)!==0)throw Error(i(327));Fn();var t=zr(e,0);if((t&1)===0)return Ge(e,Ne()),null;var n=Nl(e,t);if(e.tag!==0&&n===2){var r=ql(e);r!==0&&(t=r,n=wo(e,r))}if(n===1)throw n=vr,on(e,0),Kt(e,t),Ge(e,Ne()),n;if(n===6)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,an(e,Xe,Lt),Ge(e,Ne()),null}function jo(e,t){var n=ie;ie|=1;try{return e(t)}finally{ie=n,ie===0&&(Rn=Ne()+500,Zr&&Ut())}}function sn(e){Qt!==null&&Qt.tag===0&&(ie&6)===0&&Fn();var t=ie;ie|=1;var n=at.transition,r=de;try{if(at.transition=null,de=1,e)return e()}finally{de=r,at.transition=n,ie=t,(ie&6)===0&&Ut()}}function No(){nt=Mn.current,ve(Mn)}function on(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Md(n)),Ce!==null)for(n=Ce.return;n!==null;){var r=n;switch(zs(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Xr();break;case 3:Ln(),ve(Qe),ve($e),Hs();break;case 5:Ws(r);break;case 4:Ln();break;case 13:ve(we);break;case 19:ve(we);break;case 10:Os(r.type._context);break;case 22:case 23:No()}n=n.return}if(ze=e,Ce=e=Xt(e.current,null),Fe=nt=t,Le=0,vr=null,vo=gl=ln=0,Xe=gr=null,tn!==null){for(t=0;t<tn.length;t++)if(n=tn[t],r=n.interleaved,r!==null){n.interleaved=null;var l=r.next,o=n.pending;if(o!==null){var u=o.next;o.next=l,r.next=u}n.pending=r}tn=null}return e}function Cu(e,t){do{var n=Ce;try{if(Is(),ol.current=cl,il){for(var r=Se.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}il=!1}if(rn=0,Pe=_e=Se=null,cr=!1,dr=0,ho.current=null,n===null||n.return===null){Le=1,vr=t,Ce=null;break}e:{var o=e,u=n.return,p=n,h=t;if(t=Fe,p.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){var j=h,R=p,D=R.tag;if((R.mode&1)===0&&(D===0||D===11||D===15)){var M=R.alternate;M?(R.updateQueue=M.updateQueue,R.memoizedState=M.memoizedState,R.lanes=M.lanes):(R.updateQueue=null,R.memoizedState=null)}var W=Ja(u);if(W!==null){W.flags&=-257,qa(W,u,p,o,t),W.mode&1&&Za(o,j,t),t=W,h=j;var Q=t.updateQueue;if(Q===null){var Y=new Set;Y.add(h),t.updateQueue=Y}else Q.add(h);break e}else{if((t&1)===0){Za(o,j,t),ko();break e}h=Error(i(426))}}else if(ye&&p.mode&1){var ke=Ja(u);if(ke!==null){(ke.flags&65536)===0&&(ke.flags|=256),qa(ke,u,p,o,t),Fs(Pn(h,p));break e}}o=h=Pn(h,p),Le!==4&&(Le=2),gr===null?gr=[o]:gr.push(o),o=u;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var x=Xa(o,h,t);Sa(o,x);break e;case 1:p=h;var v=o.type,S=o.stateNode;if((o.flags&128)===0&&(typeof v.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(Ht===null||!Ht.has(S)))){o.flags|=65536,t&=-t,o.lanes|=t;var O=Ga(o,p,t);Sa(o,O);break e}}o=o.return}while(o!==null)}Lu(n)}catch(K){t=K,Ce===n&&n!==null&&(Ce=n=n.return);continue}break}while(!0)}function Tu(){var e=vl.current;return vl.current=cl,e===null?cl:e}function ko(){(Le===0||Le===3||Le===2)&&(Le=4),ze===null||(ln&268435455)===0&&(gl&268435455)===0||Kt(ze,Fe)}function Nl(e,t){var n=ie;ie|=2;var r=Tu();(ze!==e||Fe!==t)&&(Lt=null,on(e,t));do try{rf();break}catch(l){Cu(e,l)}while(!0);if(Is(),ie=n,vl.current=r,Ce!==null)throw Error(i(261));return ze=null,Fe=0,Le}function rf(){for(;Ce!==null;)_u(Ce)}function lf(){for(;Ce!==null&&!Lc();)_u(Ce)}function _u(e){var t=Mu(e.alternate,e,nt);e.memoizedProps=e.pendingProps,t===null?Lu(e):Ce=t,ho.current=null}function Lu(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=Zd(n,t,nt),n!==null){Ce=n;return}}else{if(n=Jd(n,t),n!==null){n.flags&=32767,Ce=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Le=6,Ce=null;return}}if(t=t.sibling,t!==null){Ce=t;return}Ce=t=e}while(t!==null);Le===0&&(Le=5)}function an(e,t,n){var r=de,l=at.transition;try{at.transition=null,de=1,sf(e,t,n,r)}finally{at.transition=l,de=r}return null}function sf(e,t,n,r){do Fn();while(Qt!==null);if((ie&6)!==0)throw Error(i(327));n=e.finishedWork;var l=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Ac(e,o),e===ze&&(Ce=ze=null,Fe=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||xl||(xl=!0,Ru(Tr,function(){return Fn(),null})),o=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||o){o=at.transition,at.transition=null;var u=de;de=1;var p=ie;ie|=4,ho.current=null,bd(e,n),xu(n,e),Ed(Ns),Fr=!!js,Ns=js=null,e.current=n,ef(n),Pc(),ie=p,de=u,at.transition=o}else e.current=n;if(xl&&(xl=!1,Qt=e,wl=l),o=e.pendingLanes,o===0&&(Ht=null),Rc(n.stateNode),Ge(e,Ne()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],r(l.value,{componentStack:l.stack,digest:l.digest});if(yl)throw yl=!1,e=yo,yo=null,e;return(wl&1)!==0&&e.tag!==0&&Fn(),o=e.pendingLanes,(o&1)!==0?e===xo?yr++:(yr=0,xo=e):yr=0,Ut(),null}function Fn(){if(Qt!==null){var e=gi(wl),t=at.transition,n=de;try{if(at.transition=null,de=16>e?16:e,Qt===null)var r=!1;else{if(e=Qt,Qt=null,wl=0,(ie&6)!==0)throw Error(i(331));var l=ie;for(ie|=4,B=e.current;B!==null;){var o=B,u=o.child;if((B.flags&16)!==0){var p=o.deletions;if(p!==null){for(var h=0;h<p.length;h++){var j=p[h];for(B=j;B!==null;){var R=B;switch(R.tag){case 0:case 11:case 15:hr(8,R,o)}var D=R.child;if(D!==null)D.return=R,B=D;else for(;B!==null;){R=B;var M=R.sibling,W=R.return;if(mu(R),R===j){B=null;break}if(M!==null){M.return=W,B=M;break}B=W}}}var Q=o.alternate;if(Q!==null){var Y=Q.child;if(Y!==null){Q.child=null;do{var ke=Y.sibling;Y.sibling=null,Y=ke}while(Y!==null)}}B=o}}if((o.subtreeFlags&2064)!==0&&u!==null)u.return=o,B=u;else e:for(;B!==null;){if(o=B,(o.flags&2048)!==0)switch(o.tag){case 0:case 11:case 15:hr(9,o,o.return)}var x=o.sibling;if(x!==null){x.return=o.return,B=x;break e}B=o.return}}var v=e.current;for(B=v;B!==null;){u=B;var S=u.child;if((u.subtreeFlags&2064)!==0&&S!==null)S.return=u,B=S;else e:for(u=v;B!==null;){if(p=B,(p.flags&2048)!==0)try{switch(p.tag){case 0:case 11:case 15:hl(9,p)}}catch(K){je(p,p.return,K)}if(p===u){B=null;break e}var O=p.sibling;if(O!==null){O.return=p.return,B=O;break e}B=p.return}}if(ie=l,Ut(),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(_r,e)}catch{}r=!0}return r}finally{de=n,at.transition=t}}return!1}function Pu(e,t,n){t=Pn(n,t),t=Xa(e,t,1),e=Wt(e,t,1),t=He(),e!==null&&(Wn(e,1,t),Ge(e,t))}function je(e,t,n){if(e.tag===3)Pu(e,e,n);else for(;t!==null;){if(t.tag===3){Pu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ht===null||!Ht.has(r))){e=Pn(n,e),e=Ga(t,e,1),t=Wt(t,e,1),e=He(),t!==null&&(Wn(t,1,e),Ge(t,e));break}}t=t.return}}function of(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=He(),e.pingedLanes|=e.suspendedLanes&n,ze===e&&(Fe&n)===n&&(Le===4||Le===3&&(Fe&130023424)===Fe&&500>Ne()-go?on(e,0):vo|=n),Ge(e,t)}function zu(e,t){t===0&&((e.mode&1)===0?t=1:(t=Pr,Pr<<=1,(Pr&130023424)===0&&(Pr=4194304)));var n=He();e=Ct(e,t),e!==null&&(Wn(e,t,n),Ge(e,n))}function af(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),zu(e,n)}function uf(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(i(314))}r!==null&&r.delete(t),zu(e,n)}var Mu;Mu=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Qe.current)Ke=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Ke=!1,Gd(e,t,n);Ke=(e.flags&131072)!==0}else Ke=!1,ye&&(t.flags&1048576)!==0&&da(t,qr,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;pl(e,t),e=t.pendingProps;var l=jn(t,$e.current);_n(t,n),l=Ks(null,t,r,e,l,n);var o=Xs();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ye(r)?(o=!0,Gr(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Us(t),l.updater=dl,t.stateNode=l,l._reactInternals=t,eo(t,r,e,n),t=lo(null,t,r,!0,o,n)):(t.tag=0,ye&&o&&Ps(t),Be(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(pl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=df(r),e=pt(r,e),l){case 0:t=ro(null,t,r,e,n);break e;case 1:t=lu(null,t,r,e,n);break e;case 11:t=ba(null,t,r,e,n);break e;case 14:t=eu(null,t,r,pt(r.type,e),n);break e}throw Error(i(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:pt(r,l),ro(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:pt(r,l),lu(e,t,r,l,n);case 3:e:{if(su(t),e===null)throw Error(i(387));r=t.pendingProps,o=t.memoizedState,l=o.element,wa(e,t),ll(t,r,null,n);var u=t.memoizedState;if(r=u.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=Pn(Error(i(423)),t),t=ou(e,t,r,n,l);break e}else if(r!==l){l=Pn(Error(i(424)),t),t=ou(e,t,r,n,l);break e}else for(tt=Ot(t.stateNode.containerInfo.firstChild),et=t,ye=!0,ft=null,n=ya(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(En(),r===l){t=_t(e,t,n);break e}Be(e,t,r,n)}t=t.child}return t;case 5:return Na(t),e===null&&Rs(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,u=l.children,ks(r,l)?u=null:o!==null&&ks(r,o)&&(t.flags|=32),ru(e,t),Be(e,t,u,n),t.child;case 6:return e===null&&Rs(t),null;case 13:return iu(e,t,n);case 4:return Vs(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Cn(t,null,r,n):Be(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:pt(r,l),ba(e,t,r,l,n);case 7:return Be(e,t,t.pendingProps,n),t.child;case 8:return Be(e,t,t.pendingProps.children,n),t.child;case 12:return Be(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,u=l.value,me(tl,r._currentValue),r._currentValue=u,o!==null)if(dt(o.value,u)){if(o.children===l.children&&!Qe.current){t=_t(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var p=o.dependencies;if(p!==null){u=o.child;for(var h=p.firstContext;h!==null;){if(h.context===r){if(o.tag===1){h=Tt(-1,n&-n),h.tag=2;var j=o.updateQueue;if(j!==null){j=j.shared;var R=j.pending;R===null?h.next=h:(h.next=R.next,R.next=h),j.pending=h}}o.lanes|=n,h=o.alternate,h!==null&&(h.lanes|=n),$s(o.return,n,t),p.lanes|=n;break}h=h.next}}else if(o.tag===10)u=o.type===t.type?null:o.child;else if(o.tag===18){if(u=o.return,u===null)throw Error(i(341));u.lanes|=n,p=u.alternate,p!==null&&(p.lanes|=n),$s(u,n,t),u=o.sibling}else u=o.child;if(u!==null)u.return=o;else for(u=o;u!==null;){if(u===t){u=null;break}if(o=u.sibling,o!==null){o.return=u.return,u=o;break}u=u.return}o=u}Be(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,_n(t,n),l=ot(l),r=r(l),t.flags|=1,Be(e,t,r,n),t.child;case 14:return r=t.type,l=pt(r,t.pendingProps),l=pt(r.type,l),eu(e,t,r,l,n);case 15:return tu(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:pt(r,l),pl(e,t),t.tag=1,Ye(r)?(e=!0,Gr(t)):e=!1,_n(t,n),Ya(t,r,l),eo(t,r,l,n),lo(null,t,r,!0,e,n);case 19:return uu(e,t,n);case 22:return nu(e,t,n)}throw Error(i(156,t.tag))};function Ru(e,t){return fi(e,t)}function cf(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ut(e,t,n,r){return new cf(e,t,n,r)}function Eo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function df(e){if(typeof e=="function")return Eo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Je)return 11;if(e===Ie)return 14}return 2}function Xt(e,t){var n=e.alternate;return n===null?(n=ut(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function kl(e,t,n,r,l,o){var u=2;if(r=e,typeof e=="function")Eo(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case H:return un(n.children,l,o,t);case pe:u=8,l|=8;break;case xe:return e=ut(12,n,t,l|2),e.elementType=xe,e.lanes=o,e;case Te:return e=ut(13,n,t,l),e.elementType=Te,e.lanes=o,e;case We:return e=ut(19,n,t,l),e.elementType=We,e.lanes=o,e;case oe:return El(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case De:u=10;break e;case Ee:u=9;break e;case Je:u=11;break e;case Ie:u=14;break e;case Oe:u=16,r=null;break e}throw Error(i(130,e==null?e:typeof e,""))}return t=ut(u,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function un(e,t,n,r){return e=ut(7,e,r,t),e.lanes=n,e}function El(e,t,n,r){return e=ut(22,e,r,t),e.elementType=oe,e.lanes=n,e.stateNode={isHidden:!1},e}function Co(e,t,n){return e=ut(6,e,null,t),e.lanes=n,e}function To(e,t,n){return t=ut(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ff(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bl(0),this.expirationTimes=bl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function _o(e,t,n,r,l,o,u,p,h){return e=new ff(e,t,n,p,h),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ut(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Us(o),e}function pf(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:b,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Fu(e){if(!e)return At;e=e._reactInternals;e:{if(Zt(e)!==e||e.tag!==1)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ye(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(i(171))}if(e.tag===1){var n=e.type;if(Ye(n))return aa(e,n,t)}return t}function Du(e,t,n,r,l,o,u,p,h){return e=_o(n,r,!0,e,l,o,u,p,h),e.context=Fu(null),n=e.current,r=He(),l=Yt(n),o=Tt(r,l),o.callback=t??null,Wt(n,o,l),e.current.lanes=l,Wn(e,l,r),Ge(e,r),e}function Cl(e,t,n,r){var l=t.current,o=He(),u=Yt(l);return n=Fu(n),t.context===null?t.context=n:t.pendingContext=n,t=Tt(o,u),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Wt(l,t,u),e!==null&&(vt(e,l,u,o),rl(e,l,u)),u}function Tl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Iu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Lo(e,t){Iu(e,t),(e=e.alternate)&&Iu(e,t)}function mf(){return null}var Ou=typeof reportError=="function"?reportError:function(e){console.error(e)};function Po(e){this._internalRoot=e}_l.prototype.render=Po.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));Cl(e,t,null,null)},_l.prototype.unmount=Po.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;sn(function(){Cl(null,e,null,null)}),t[jt]=null}};function _l(e){this._internalRoot=e}_l.prototype.unstable_scheduleHydration=function(e){if(e){var t=wi();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ft.length&&t!==0&&t<Ft[n].priority;n++);Ft.splice(n,0,e),n===0&&Ni(e)}};function zo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ll(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function $u(){}function hf(e,t,n,r,l){if(l){if(typeof r=="function"){var o=r;r=function(){var j=Tl(u);o.call(j)}}var u=Du(t,r,e,0,null,!1,!1,"",$u);return e._reactRootContainer=u,e[jt]=u.current,nr(e.nodeType===8?e.parentNode:e),sn(),u}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var p=r;r=function(){var j=Tl(h);p.call(j)}}var h=_o(e,0,!1,null,null,!1,!1,"",$u);return e._reactRootContainer=h,e[jt]=h.current,nr(e.nodeType===8?e.parentNode:e),sn(function(){Cl(t,h,n,r)}),h}function Pl(e,t,n,r,l){var o=n._reactRootContainer;if(o){var u=o;if(typeof l=="function"){var p=l;l=function(){var h=Tl(u);p.call(h)}}Cl(t,u,e,l)}else u=hf(n,t,e,l,r);return Tl(u)}yi=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Vn(t.pendingLanes);n!==0&&(es(t,n|1),Ge(t,Ne()),(ie&6)===0&&(Rn=Ne()+500,Ut()))}break;case 13:sn(function(){var r=Ct(e,1);if(r!==null){var l=He();vt(r,e,1,l)}}),Lo(e,1)}},ts=function(e){if(e.tag===13){var t=Ct(e,134217728);if(t!==null){var n=He();vt(t,e,134217728,n)}Lo(e,134217728)}},xi=function(e){if(e.tag===13){var t=Yt(e),n=Ct(e,t);if(n!==null){var r=He();vt(n,e,t,r)}Lo(e,t)}},wi=function(){return de},Si=function(e,t){var n=de;try{return de=e,t()}finally{de=n}},Kl=function(e,t,n){switch(t){case"input":if(Al(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=Kr(r);if(!l)throw Error(i(90));Qo(r),Al(r,l)}}}break;case"textarea":Zo(e,n);break;case"select":t=n.value,t!=null&&cn(e,!!n.multiple,t,!1)}},si=jo,oi=sn;var vf={usingClientEntryPoint:!1,Events:[sr,wn,Kr,ri,li,jo]},xr={findFiberByHostInstance:Jt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},gf={bundleType:xr.bundleType,version:xr.version,rendererPackageName:xr.rendererPackageName,rendererConfig:xr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:re.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ci(e),e===null?null:e.stateNode},findFiberByHostInstance:xr.findFiberByHostInstance||mf,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zl.isDisabled&&zl.supportsFiber)try{_r=zl.inject(gf),gt=zl}catch{}}return Ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vf,Ze.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!zo(t))throw Error(i(200));return pf(e,t,null,n)},Ze.createRoot=function(e,t){if(!zo(e))throw Error(i(299));var n=!1,r="",l=Ou;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=_o(e,1,!1,null,null,n,!1,r,l),e[jt]=t.current,nr(e.nodeType===8?e.parentNode:e),new Po(t)},Ze.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=ci(t),e=e===null?null:e.stateNode,e},Ze.flushSync=function(e){return sn(e)},Ze.hydrate=function(e,t,n){if(!Ll(t))throw Error(i(200));return Pl(null,e,t,!0,n)},Ze.hydrateRoot=function(e,t,n){if(!zo(e))throw Error(i(405));var r=n!=null&&n.hydratedSources||null,l=!1,o="",u=Ou;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(u=n.onRecoverableError)),t=Du(t,null,e,1,n??null,l,!1,o,u),e[jt]=t.current,nr(e),r)for(e=0;e<r.length;e++)n=r[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new _l(t)},Ze.render=function(e,t,n){if(!Ll(t))throw Error(i(200));return Pl(null,e,t,!1,n)},Ze.unmountComponentAtNode=function(e){if(!Ll(e))throw Error(i(40));return e._reactRootContainer?(sn(function(){Pl(null,null,e,!1,function(){e._reactRootContainer=null,e[jt]=null})}),!0):!1},Ze.unstable_batchedUpdates=jo,Ze.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ll(n))throw Error(i(200));if(e==null||e._reactInternals===void 0)throw Error(i(38));return Pl(e,t,n,!1,r)},Ze.version="18.3.1-next-f1338f8080-20240426",Ze}var Yu;function Ef(){if(Yu)return Fo.exports;Yu=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(m){console.error(m)}}return a(),Fo.exports=kf(),Fo.exports}var Ku;function Cf(){if(Ku)return Ml;Ku=1;var a=Ef();return Ml.createRoot=a.createRoot,Ml.hydrateRoot=a.hydrateRoot,Ml}var Tf=Cf();const _f=Ho(Tf),Lf={},Xu=a=>{let m;const i=new Set,c=(F,T)=>{const _=typeof F=="function"?F(m):F;if(!Object.is(_,m)){const L=m;m=T??(typeof _!="object"||_===null)?_:Object.assign({},m,_),i.forEach(P=>P(m,L))}},f=()=>m,E={setState:c,getState:f,getInitialState:()=>C,subscribe:F=>(i.add(F),()=>i.delete(F)),destroy:()=>{(Lf?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),i.clear()}},C=m=a(c,f,E);return E},Pf=a=>a?Xu(a):Xu;var Oo={exports:{}},$o={},Ao={exports:{}},Uo={};/**
|
|
41
|
+
* @license React
|
|
42
|
+
* use-sync-external-store-shim.production.js
|
|
43
|
+
*
|
|
44
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the MIT license found in the
|
|
47
|
+
* LICENSE file in the root directory of this source tree.
|
|
48
|
+
*/var Gu;function zf(){if(Gu)return Uo;Gu=1;var a=Sr();function m(T,_){return T===_&&(T!==0||1/T===1/_)||T!==T&&_!==_}var i=typeof Object.is=="function"?Object.is:m,c=a.useState,f=a.useEffect,d=a.useLayoutEffect,g=a.useDebugValue;function w(T,_){var L=_(),P=c({inst:{value:L,getSnapshot:_}}),N=P[0].inst,k=P[1];return d(function(){N.value=L,N.getSnapshot=_,E(N)&&k({inst:N})},[T,L,_]),f(function(){return E(N)&&k({inst:N}),T(function(){E(N)&&k({inst:N})})},[T]),g(L),L}function E(T){var _=T.getSnapshot;T=T.value;try{var L=_();return!i(T,L)}catch{return!0}}function C(T,_){return _()}var F=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?C:w;return Uo.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:F,Uo}var Zu;function Mf(){return Zu||(Zu=1,Ao.exports=zf()),Ao.exports}/**
|
|
49
|
+
* @license React
|
|
50
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/var Ju;function Rf(){if(Ju)return $o;Ju=1;var a=Sr(),m=Mf();function i(C,F){return C===F&&(C!==0||1/C===1/F)||C!==C&&F!==F}var c=typeof Object.is=="function"?Object.is:i,f=m.useSyncExternalStore,d=a.useRef,g=a.useEffect,w=a.useMemo,E=a.useDebugValue;return $o.useSyncExternalStoreWithSelector=function(C,F,T,_,L){var P=d(null);if(P.current===null){var N={hasValue:!1,value:null};P.current=N}else N=P.current;P=w(function(){function I(b){if(!G){if(G=!0,X=b,b=_(b),L!==void 0&&N.hasValue){var H=N.value;if(L(H,b))return re=H}return re=b}if(H=re,c(X,b))return H;var pe=_(b);return L!==void 0&&L(H,pe)?(X=b,H):(X=b,re=pe)}var G=!1,X,re,fe=T===void 0?null:T;return[function(){return I(F())},fe===null?void 0:function(){return I(fe())}]},[F,T,_,L]);var k=f(C,P[0],P[1]);return g(function(){N.hasValue=!0,N.value=k},[k]),E(k),k},$o}var qu;function Ff(){return qu||(qu=1,Oo.exports=Rf()),Oo.exports}var Df=Ff();const If=Ho(Df),dc={},{useDebugValue:Of}=cc,{useSyncExternalStoreWithSelector:$f}=If;let bu=!1;const Af=a=>a;function Uf(a,m=Af,i){(dc?"production":void 0)!=="production"&&i&&!bu&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),bu=!0);const c=$f(a.subscribe,a.getState,a.getServerState||a.getInitialState,m,i);return Of(c),c}const ec=a=>{(dc?"production":void 0)!=="production"&&typeof a!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const m=typeof a=="function"?Pf(a):a,i=(c,f)=>Uf(m,c,f);return Object.assign(i,m),i},Pt=a=>a?ec(a):ec,tc={x:0,y:0,zoom:1},nc=.1,rc=5,fc=Pt(a=>({viewport:tc,isDragging:!1,dragStart:null,setViewport:m=>a({viewport:m}),pan:(m,i)=>a(c=>({viewport:{...c.viewport,x:c.viewport.x+m,y:c.viewport.y+i}})),zoom:(m,i=0,c=0)=>a(f=>{const d=Math.max(nc,Math.min(rc,f.viewport.zoom*m)),g=d/f.viewport.zoom,w=i-(i-f.viewport.x)*g,E=c-(c-f.viewport.y)*g;return{viewport:{x:w,y:E,zoom:d}}}),setZoom:m=>a(i=>({viewport:{...i.viewport,zoom:Math.max(nc,Math.min(rc,m))}})),resetViewport:()=>a({viewport:tc}),startDrag:(m,i)=>a({isDragging:!0,dragStart:{x:m,y:i}}),endDrag:()=>a({isDragging:!1,dragStart:null})})),Vf={"#":"component",$:"flow","^":"gate","!":"signal","~":"aspect"};function Il(a){if(a.length<2)return null;const m=a[0],i=a.slice(1),c=Vf[m];return c?{type:c,name:i}:null}function Wf(){return{entries:new Map,byType:new Map,bySource:new Map,timestamp:0}}function Bf(a,m){return`${{component:"#",flow:"$",gate:"^",signal:"!",aspect:"~"}[a]}${m}`}const Hf=["component","flow","gate","signal","aspect"];function Qf(a){const g=Math.ceil(Math.sqrt(a.length*1.5));return a.map((w,E)=>({id:w.id,symbol:w.symbol,type:w.type,source:w.source||"purpose",filePath:w.filePath,data:w.data||{},description:w.description,references:w.references||[],referencedBy:w.referencedBy||[],tags:w.tags||[],position:{x:100+E%g*240,y:100+Math.floor(E/g)*160}}))}const lc={component:1,flow:2,gate:3,signal:4,aspect:5},rt=Pt((a,m)=>({nodes:[],selectedId:null,hoveredId:null,isLoading:!0,loadError:null,projectName:null,visibleTypes:Hf,filterTags:[],searchQuery:"",layoutMode:"grid",sortOption:"type",setNodes:i=>a({nodes:i}),loadFromApi:async()=>{a({isLoading:!0,loadError:null});try{const i=await fetch("/api/symbols");if(!i.ok)throw new Error(`API error: ${i.status}`);const c=await i.json(),f=Qf(c.symbols||[]),d=await fetch("/api/info"),g=d.ok?await d.json():{};a({nodes:f,isLoading:!1,projectName:g.projectName||null})}catch(i){console.error("Failed to load symbols from API:",i),a({isLoading:!1,loadError:i instanceof Error?i.message:"Failed to load",nodes:[]})}},selectNode:i=>a({selectedId:i}),hoverNode:i=>a({hoveredId:i}),updateNodePosition:(i,c)=>a(f=>({nodes:f.nodes.map(d=>d.id===i?{...d,position:c}:d)})),updateNode:(i,c)=>a(f=>{const d=f.nodes.find(w=>w.id===i);if(!d)return f;let g={...c};if(c.type&&c.type!==d.type){const w=Il(d.symbol);if(w){const E=w.name,C=Bf(c.type,E);g.symbol=C}}if(c.symbol&&c.symbol!==d.symbol){const w=Il(c.symbol);w&&(g.type=w.type)}return g.modified=new Date().toISOString(),{nodes:f.nodes.map(w=>w.id===i?{...w,...g}:w)}}),addNode:i=>a(c=>({nodes:[...c.nodes,i]})),removeNode:i=>a(c=>({nodes:c.nodes.filter(f=>f.id!==i),selectedId:c.selectedId===i?null:c.selectedId})),addTag:(i,c)=>a(f=>({nodes:f.nodes.map(d=>d.id===i?{...d,tags:[...d.tags||[],c]}:d)})),removeTag:(i,c)=>a(f=>({nodes:f.nodes.map(d=>d.id===i?{...d,tags:(d.tags||[]).filter(g=>g!==c)}:d)})),setVisibleTypes:i=>{a({visibleTypes:i}),setTimeout(()=>{m().reorganizeVisibleNodes()},50)},toggleType:i=>{a(c=>({visibleTypes:c.visibleTypes.includes(i)?c.visibleTypes.filter(f=>f!==i):[...c.visibleTypes,i]})),setTimeout(()=>{m().reorganizeVisibleNodes()},50)},setFilterTags:i=>a({filterTags:i}),setSearchQuery:i=>a({searchQuery:i}),setLayoutMode:i=>{a({layoutMode:i}),i==="canvas"&&setTimeout(()=>m().reorganizeVisibleNodes(),50)},setSortOption:i=>{a({sortOption:i}),m().layoutMode==="canvas"&&setTimeout(()=>m().reorganizeVisibleNodes(),50)},reorganizeVisibleNodes:()=>{const i=m(),c=i.getFilteredNodes();if(c.length===0)return;const f=200,d=120,g=40,w=100,E=100,C=Math.ceil(Math.sqrt(c.length*1.5)),F=i.nodes.map(T=>{const _=c.findIndex(k=>k.id===T.id);if(_===-1)return T;const L=_%C,P=Math.floor(_/C),N={x:w+L*(f+g),y:E+P*(d+g)};return{...T,position:N}});a({nodes:F})},getFilteredNodes:()=>{const i=m();let c=i.nodes;if(c=c.filter(f=>i.visibleTypes.includes(f.type)),i.filterTags.length>0&&(c=c.filter(f=>i.filterTags.some(d=>{var g;return(g=f.tags)==null?void 0:g.includes(d)}))),i.searchQuery){const f=i.searchQuery.toLowerCase();c=c.filter(d=>{var g;return d.symbol.toLowerCase().includes(f)||((g=d.description)==null?void 0:g.toLowerCase().includes(f))})}return c},getSortedNodes:()=>{const i=m();return[...i.getFilteredNodes()].sort((d,g)=>{switch(i.sortOption){case"alpha":return d.symbol.localeCompare(g.symbol);case"type":const w=lc[d.type]-lc[g.type];return w!==0?w:d.symbol.localeCompare(g.symbol);case"updated":const E=d.modified?new Date(d.modified).getTime():0;return(g.modified?new Date(g.modified).getTime():0)-E;case"stale":const F=d.modified?new Date(d.modified).getTime():0,T=g.modified?new Date(g.modified).getTime():0;return F-T;default:return 0}})},getSelectedNode:()=>{const i=m();return i.nodes.find(c=>c.id===i.selectedId)}}));function Yf({viewport:a}){const m={backgroundPosition:`${a.x}px ${a.y}px`,backgroundSize:`
|
|
57
|
+
${20*a.zoom}px ${20*a.zoom}px,
|
|
58
|
+
${20*a.zoom}px ${20*a.zoom}px,
|
|
59
|
+
${100*a.zoom}px ${100*a.zoom}px,
|
|
60
|
+
${100*a.zoom}px ${100*a.zoom}px
|
|
61
|
+
`};return s.jsx("div",{className:"canvas-grid",style:m})}const Kf={component:"#",flow:"$",gate:"^",signal:"!",aspect:"~"};function Xf(a){return a.slice(1)}function Gf(a){return Kf[a]}function Zf({node:a}){const{selectedId:m,selectNode:i,hoverNode:c}=rt(),f=m===a.id,d=Gf(a.type),g=Xf(a.symbol),w=a.position||{x:Math.random()*400,y:Math.random()*400},E=$.useCallback(F=>{F.stopPropagation(),i(a.id)},[a.id,i]),C=["node",`node--${a.type}`,f?"selected":""].filter(Boolean).join(" ");return s.jsxs("div",{className:C,style:{left:w.x,top:w.y},onClick:E,onMouseEnter:()=>c(a.id),onMouseLeave:()=>c(null),children:[s.jsxs("div",{className:"node-header",children:[s.jsx("span",{className:"node-symbol",children:d}),s.jsx("span",{className:"node-name",children:g})]}),a.description&&s.jsx("div",{className:"node-description",children:a.description}),a.tags&&a.tags.length>0&&s.jsxs("div",{className:"node-tags",children:[a.tags.slice(0,3).map(F=>s.jsx("span",{className:"node-tag",children:F},F)),a.tags.length>3&&s.jsxs("span",{className:"node-tag",children:["+",a.tags.length-3]})]})]})}function Jf({nodes:a}){const m=new Map;for(const c of a)c.position&&m.set(c.symbol,c.position);const i=[];for(const c of a)if(c.position)for(const f of c.references){const d=m.get(f);d&&i.push({from:{x:c.position.x+60,y:c.position.y+20},to:{x:d.x+60,y:d.y+20},key:`${c.symbol}-${f}`})}return i.length===0?null:s.jsxs("svg",{className:"connections-layer",children:[s.jsx("defs",{children:s.jsx("marker",{id:"arrowhead",markerWidth:"10",markerHeight:"7",refX:"9",refY:"3.5",orient:"auto",children:s.jsx("polygon",{points:"0 0, 10 3.5, 0 7",fill:"currentColor"})})}),i.map(({from:c,to:f,key:d})=>{const g=f.x-c.x,w=c.x+g*.5,E=c.y,C=c.x+g*.5,F=f.y;return s.jsx("path",{className:"connection-line",d:`M ${c.x} ${c.y} C ${w} ${E}, ${C} ${F}, ${f.x} ${f.y}`,markerEnd:"url(#arrowhead)"},d)})]})}function qf(){const a=$.useRef(null),{viewport:m,isDragging:i,dragStart:c,pan:f,zoom:d,startDrag:g,endDrag:w}=fc(),{getFilteredNodes:E,selectNode:C}=rt(),F=E(),T=$.useCallback(k=>{k.preventDefault();const I=k.deltaY>0?.9:1.1;d(I,k.clientX,k.clientY)},[d]),_=$.useCallback(k=>{const I=k.target,G=I.closest(".node"),X=k.button===1,re=k.button===0&&k.altKey,fe=k.button===0&&!G&&(I===a.current||I.classList.contains("canvas-content")||I.classList.contains("canvas-grid")||I.classList.contains("connections-layer")||I.tagName==="svg"||I.tagName==="path");X||re||fe?(k.preventDefault(),g(k.clientX,k.clientY),fe&&C(null)):k.button===0&&!G&&I===a.current&&C(null)},[g,C]),L=$.useCallback(k=>{if(i&&c){const I=k.clientX-c.x,G=k.clientY-c.y;f(I,G),g(k.clientX,k.clientY)}},[i,c,f,g]),P=$.useCallback(()=>{i&&w()},[i,w]);$.useEffect(()=>{const k=a.current;if(k)return k.addEventListener("wheel",T,{passive:!1}),()=>{k.removeEventListener("wheel",T)}},[T]),$.useEffect(()=>{if(i)return window.addEventListener("mousemove",L),window.addEventListener("mouseup",P),()=>{window.removeEventListener("mousemove",L),window.removeEventListener("mouseup",P)}},[i,L,P]);const N=`translate(${m.x}px, ${m.y}px) scale(${m.zoom})`;return s.jsxs("div",{ref:a,className:`canvas-container ${i?"dragging":""}`,onMouseDown:_,children:[s.jsx(Yf,{viewport:m}),s.jsxs("div",{className:"canvas-content",style:{transform:N},children:[s.jsx(Jf,{nodes:F}),F.map(k=>s.jsx(Zf,{node:k},k.id))]})]})}const pc={component:{prefix:"#",label:"Components",color:"var(--color-component)"},flow:{prefix:"$",label:"Flows",color:"var(--color-flow)"},gate:{prefix:"^",label:"Gates",color:"var(--color-gate)"},signal:{prefix:"!",label:"Signals",color:"var(--color-signal)"},aspect:{prefix:"~",label:"Aspects",color:"var(--color-aspect)"}},bf=["component","flow","gate","signal","aspect"];function ep({node:a,isSelected:m,onClick:i}){const c=pc[a.type],f=a.symbol.slice(1);return s.jsxs("div",{className:`grid-card grid-card--${a.type} ${m?"selected":""}`,onClick:i,children:[s.jsxs("div",{className:"grid-card-header",children:[s.jsx("span",{className:"grid-card-symbol",style:{color:c.color},children:c.prefix}),s.jsx("span",{className:"grid-card-name",children:f})]}),a.description&&s.jsx("div",{className:"grid-card-description",children:a.description}),a.tags&&a.tags.length>0&&s.jsxs("div",{className:"grid-card-tags",children:[a.tags.slice(0,2).map(d=>s.jsx("span",{className:"grid-card-tag",children:d},d)),a.tags.length>2&&s.jsxs("span",{className:"grid-card-tag",children:["+",a.tags.length-2]})]})]})}function tp(){const{getSortedNodes:a,selectedId:m,selectNode:i,visibleTypes:c}=rt(),f=a(),d=$.useMemo(()=>{const w={component:[],flow:[],gate:[],signal:[],aspect:[]};return f.forEach(E=>{w[E.type]&&w[E.type].push(E)}),w},[f]),g=bf.filter(w=>c.includes(w)&&d[w].length>0);return f.length===0?s.jsx("div",{className:"grid-view grid-view--empty",children:s.jsx("p",{children:"No symbols match the current filters"})}):s.jsx("div",{className:"grid-view",children:s.jsx("div",{className:"grid-columns",style:{gridTemplateColumns:`repeat(${g.length}, 1fr)`},children:g.map(w=>{const E=pc[w],C=d[w];return s.jsxs("div",{className:"grid-column",children:[s.jsxs("div",{className:"grid-column-header",style:{borderColor:E.color},children:[s.jsx("span",{className:"grid-column-prefix",style:{color:E.color},children:E.prefix}),s.jsx("span",{className:"grid-column-label",children:E.label}),s.jsx("span",{className:"grid-column-count",children:C.length})]}),s.jsx("div",{className:"grid-column-content",children:C.map(F=>s.jsx(ep,{node:F,isSelected:m===F.id,onClick:()=>i(F.id)},F.id))})]},w)})})})}const np={component:{prefix:"#",label:"Component",color:"var(--color-component)"},flow:{prefix:"$",label:"Flow",color:"var(--color-flow)"},gate:{prefix:"^",label:"Gate",color:"var(--color-gate)"},signal:{prefix:"!",label:"Signal",color:"var(--color-signal)"},aspect:{prefix:"~",label:"Aspect",color:"var(--color-aspect)"}};function rp({node:a,isSelected:m,onClick:i}){const c=np[a.type],f=a.symbol.slice(1),d=a.modified?new Date(a.modified).toLocaleDateString():"-";return s.jsxs("tr",{className:`list-row ${m?"selected":""}`,onClick:i,children:[s.jsxs("td",{className:"list-cell list-cell--symbol",children:[s.jsx("span",{className:"list-symbol",style:{color:c.color},children:c.prefix}),s.jsx("span",{className:"list-name",children:f})]}),s.jsx("td",{className:"list-cell list-cell--type",children:s.jsx("span",{className:"list-type-badge",style:{backgroundColor:c.color},children:c.label})}),s.jsx("td",{className:"list-cell list-cell--description",children:a.description||s.jsx("span",{className:"list-empty",children:"-"})}),s.jsx("td",{className:"list-cell list-cell--tags",children:a.tags&&a.tags.length>0?s.jsxs("div",{className:"list-tags",children:[a.tags.slice(0,3).map(g=>s.jsx("span",{className:"list-tag",children:g},g)),a.tags.length>3&&s.jsxs("span",{className:"list-tag-more",children:["+",a.tags.length-3]})]}):s.jsx("span",{className:"list-empty",children:"-"})}),s.jsx("td",{className:"list-cell list-cell--modified",children:d})]})}function Vo({label:a,sortKey:m,currentSort:i,onSort:c}){const f=i===m;return s.jsxs("th",{className:`list-header ${f?"list-header--active":""}`,onClick:()=>c(m),children:[a,f&&s.jsx("span",{className:"list-sort-indicator",children:"↓"})]})}function lp(){const{getSortedNodes:a,selectedId:m,selectNode:i,sortOption:c,setSortOption:f}=rt(),d=a();return d.length===0?s.jsx("div",{className:"list-view list-view--empty",children:s.jsx("p",{children:"No symbols match the current filters"})}):s.jsx("div",{className:"list-view",children:s.jsx("div",{className:"list-table-container",children:s.jsxs("table",{className:"list-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx(Vo,{label:"Symbol",sortKey:"alpha",currentSort:c,onSort:f}),s.jsx(Vo,{label:"Type",sortKey:"type",currentSort:c,onSort:f}),s.jsx("th",{className:"list-header",children:"Description"}),s.jsx("th",{className:"list-header",children:"Tags"}),s.jsx(Vo,{label:"Modified",sortKey:"updated",currentSort:c,onSort:f})]})}),s.jsx("tbody",{children:d.map(g=>s.jsx(rp,{node:g,isSelected:m===g.id,onClick:()=>i(g.id)},g.id))})]})})})}const sp=Pt((a,m)=>({index:Wf(),isLoading:!1,error:null,lastUpdated:null,setIndex:i=>a({index:i,lastUpdated:Date.now(),error:null}),setLoading:i=>a({isLoading:i}),setError:i=>a({error:i,isLoading:!1}),search:i=>{var g;const{index:c}=m(),f=i.toLowerCase(),d=[];for(const w of c.entries.values())(w.symbol.toLowerCase().includes(f)||(g=w.description)!=null&&g.toLowerCase().includes(f))&&d.push(w);return d.slice(0,20)},getAutocomplete:i=>{const{index:c}=m();if(!i)return[];const f=i.toLowerCase(),d=[];for(const g of c.entries.values())g.symbol.toLowerCase().startsWith(f)&&d.push(g);return d.sort((g,w)=>{const E=g.symbol.toLowerCase()===f,C=w.symbol.toLowerCase()===f;return E&&!C?-1:!E&&C?1:g.symbol.localeCompare(w.symbol)}),d.slice(0,10)}})),op={component:"var(--color-component)",flow:"var(--color-flow)",gate:"var(--color-gate)",signal:"var(--color-signal)",aspect:"var(--color-aspect)"};function ip({suggestions:a,selectedIndex:m,onSelect:i,onHover:c}){return s.jsx("div",{className:"autocomplete-dropdown",children:a.map((f,d)=>s.jsxs("div",{className:`autocomplete-item ${d===m?"selected":""}`,onClick:()=>i(f),onMouseEnter:()=>c(d),children:[s.jsx("span",{className:"autocomplete-item-symbol",style:{color:op[f.type]},children:f.symbol}),f.description&&s.jsx("span",{className:"autocomplete-item-desc",children:f.description})]},f.id))})}function ap(){const[a,m]=$.useState(""),[i,c]=$.useState(!1),[f,d]=$.useState(0),g=$.useRef(null),{getAutocomplete:w}=sp(),{addNode:E,selectNode:C}=rt(),F=a.length>0?w(a):[],T=$.useCallback(N=>{const k=N.target.value;m(k),c(k.length>0),d(0)},[]),_=$.useCallback(()=>{if(!a.trim())return;if(F.length>0&&f<F.length){const G=F[f];C(G.id),m(""),c(!1);return}const N=a.trim().split(/\s+/),k=N[0],I=Il(k);if(I){const G=k,X=N.slice(1).join(" "),re={id:`premise-${Date.now()}`,symbol:G,type:I.type,source:"premise",filePath:".premise",data:{content:X},description:X||void 0,references:[],referencedBy:[],position:{x:200+Math.random()*200,y:200+Math.random()*200},tags:[],created:new Date().toISOString()};E(re),C(re.id),m(""),c(!1)}},[a,F,f,C,E]),L=$.useCallback(N=>{var k;if(N.key==="Enter")N.preventDefault(),_();else if(N.key==="ArrowDown")N.preventDefault(),d(I=>Math.min(I+1,F.length-1));else if(N.key==="ArrowUp")N.preventDefault(),d(I=>Math.max(I-1,0));else if(N.key==="Escape")c(!1),(k=g.current)==null||k.blur();else if(N.key==="Tab"&&F.length>0){N.preventDefault();const I=F[f];I&&(m(I.symbol+" "),d(0))}},[_,F,f]),P=$.useCallback(N=>{C(N.id),m(""),c(!1)},[C]);return $.useEffect(()=>{const N=k=>{var I;k.key==="/"&&document.activeElement!==g.current&&(k.preventDefault(),(I=g.current)==null||I.focus())};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[]),s.jsxs("div",{className:"command-input-container",children:[i&&F.length>0&&s.jsx(ip,{suggestions:F,selectedIndex:f,onSelect:P,onHover:d}),s.jsxs("div",{className:"command-input",children:[s.jsx("span",{className:"command-input-prefix",children:">"}),s.jsx("input",{ref:g,type:"text",value:a,onChange:T,onKeyDown:L,onFocus:()=>c(a.length>0),onBlur:()=>setTimeout(()=>c(!1),200),placeholder:"Type @ # ^ ! ? to create nodes, or search..."}),s.jsx("span",{className:"command-input-hint",children:"Press / to focus"})]})]})}const Wo={component:"Component",flow:"Flow",gate:"Gate",signal:"Signal",aspect:"Aspect"},up={purpose:"Purpose",gate:"Gate",dream:"Dream"};function cp(){const{getSelectedNode:a,selectNode:m,addTag:i,removeTag:c,updateNode:f}=rt(),d=a(),[g,w]=$.useState(null),[E,C]=$.useState({});if($.useEffect(()=>{w(null),C({})},[d==null?void 0:d.id]),!d)return null;const F=$.useCallback((N,k)=>{w(N),C({[N]:k})},[]),T=$.useCallback(async(N,k)=>{try{const I=await fetch(`/api/symbols/${N}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)});if(!I.ok){const G=await I.json();return console.error("Failed to save:",G.error),!1}return!0}catch(I){return console.error("Failed to save:",I),!1}},[]),_=$.useCallback(async N=>{if(!d)return;const k=E[N];if(k===void 0){w(null);return}if(N==="symbol"&&typeof k=="string"&&!Il(k)){alert("Invalid symbol format. Must start with #, $, ^, !, or ~ (v2 symbols)");return}f(d.id,{[N]:k}),N==="description"&&await T(d.id,{description:k}),w(null),C({})},[d,E,f,T]),L=$.useCallback(()=>{w(null),C({})},[]),P=$.useCallback((N,k)=>{N.key==="Enter"&&!N.shiftKey?(N.preventDefault(),_(k)):N.key==="Escape"&&(N.preventDefault(),L())},[_,L]);return s.jsxs("aside",{className:"properties-panel",children:[s.jsxs("header",{className:"properties-header",children:[g==="symbol"?s.jsx("input",{type:"text",className:"properties-title-input",value:E.symbol??d.symbol,onChange:N=>C({symbol:N.target.value}),onBlur:()=>_("symbol"),onKeyDown:N=>P(N,"symbol"),autoFocus:!0}):s.jsx("h2",{className:"properties-title properties-title-editable",onClick:()=>F("symbol",d.symbol),title:"Click to edit",children:d.symbol}),s.jsx("button",{className:"properties-close",onClick:()=>m(null),"aria-label":"Close panel",children:"×"})]}),s.jsxs("div",{className:"properties-content",children:[s.jsxs("section",{className:"properties-section",children:[s.jsx("h3",{className:"properties-section-title",children:"Details"}),s.jsxs("div",{className:"properties-field",children:[s.jsx("div",{className:"properties-field-label",children:"Type"}),g==="type"?s.jsx("select",{className:"properties-field-input",value:E.type??d.type,onChange:N=>{const k=N.target.value;C({type:k}),f(d.id,{type:k}),w(null)},onBlur:()=>w(null),autoFocus:!0,children:Object.keys(Wo).map(N=>s.jsx("option",{value:N,children:Wo[N]},N))}):s.jsx("div",{className:"properties-field-value properties-field-value-editable",onClick:()=>F("type",d.type),title:"Click to edit",children:Wo[d.type]})]}),s.jsxs("div",{className:"properties-field",children:[s.jsx("div",{className:"properties-field-label",children:"Source"}),s.jsx("div",{className:"properties-field-value",children:up[d.source]})]}),s.jsxs("div",{className:"properties-field",children:[s.jsx("div",{className:"properties-field-label",children:"Description"}),g==="description"?s.jsx("textarea",{className:"properties-field-textarea",value:E.description??d.description??"",onChange:N=>C({description:N.target.value}),onBlur:()=>_("description"),onKeyDown:N=>P(N,"description"),placeholder:"Enter description...",rows:3,autoFocus:!0}):s.jsx("div",{className:"properties-field-value properties-field-value-editable",onClick:()=>F("description",d.description??""),title:"Click to edit",children:d.description||s.jsx("span",{style:{color:"var(--text-muted)",fontStyle:"italic"},children:"No description (click to add)"})})]}),s.jsxs("div",{className:"properties-field",children:[s.jsx("div",{className:"properties-field-label",children:"File"}),s.jsxs("a",{href:"#",className:"properties-source-link",children:[d.filePath,s.jsx("span",{children:"↗"})]})]})]}),s.jsxs("section",{className:"properties-section",children:[s.jsx("h3",{className:"properties-section-title",children:"Tags"}),s.jsxs("div",{className:"properties-tags",children:[(d.tags||[]).map(N=>s.jsxs("span",{className:"properties-tag",onClick:async()=>{c(d.id,N);const k=(d.tags||[]).filter(I=>I!==N);await T(d.id,{tags:k})},title:"Click to remove",style:{cursor:"pointer"},children:[N," ×"]},N)),s.jsx("button",{className:"properties-tag",style:{background:"transparent",border:"1px dashed var(--input-border)"},onClick:async()=>{const N=prompt("Enter tag name:");if(N){i(d.id,N);const k=[...d.tags||[],N];await T(d.id,{tags:k})}},children:"+ Add"})]})]}),(d.references.length>0||d.referencedBy.length>0)&&s.jsxs("section",{className:"properties-section",children:[s.jsx("h3",{className:"properties-section-title",children:"References"}),d.references.length>0&&s.jsxs("div",{className:"properties-field",children:[s.jsxs("div",{className:"properties-field-label",children:["References (",d.references.length,")"]}),s.jsx("div",{className:"properties-field-value properties-field-value--mono",children:d.references.join(", ")})]}),d.referencedBy.length>0&&s.jsxs("div",{className:"properties-field",children:[s.jsxs("div",{className:"properties-field-label",children:["Referenced by (",d.referencedBy.length,")"]}),s.jsx("div",{className:"properties-field-value properties-field-value--mono",children:d.referencedBy.join(", ")})]})]}),d.position&&s.jsxs("section",{className:"properties-section",children:[s.jsx("h3",{className:"properties-section-title",children:"Position"}),s.jsx("div",{className:"properties-field",children:s.jsxs("div",{className:"properties-field-value properties-field-value--mono",children:["x: ",Math.round(d.position.x),", y: ",Math.round(d.position.y)]})})]}),(d.created||d.modified)&&s.jsxs("section",{className:"properties-section",children:[s.jsx("h3",{className:"properties-section-title",children:"Timeline"}),d.created&&s.jsxs("div",{className:"properties-field",children:[s.jsx("div",{className:"properties-field-label",children:"Created"}),s.jsx("div",{className:"properties-field-value",children:new Date(d.created).toLocaleString()})]}),d.modified&&s.jsxs("div",{className:"properties-field",children:[s.jsx("div",{className:"properties-field-label",children:"Modified"}),s.jsx("div",{className:"properties-field-value",children:new Date(d.modified).toLocaleString()})]})]}),s.jsxs("section",{className:"properties-section",children:[s.jsx("h3",{className:"properties-section-title",children:"Raw Data"}),s.jsx("pre",{style:{fontSize:"11px",fontFamily:"var(--font-mono)",background:"var(--input-bg)",padding:"12px",borderRadius:"8px",overflow:"auto",maxHeight:"200px"},children:JSON.stringify(d.data,null,2)})]})]})]})}const dp=()=>{if(typeof window>"u")return"focus";const a=localStorage.getItem("paradigm-theme");return a==="spectrum"||a==="focus"||a==="deep"?a:a==="morning"?"spectrum":a==="daytime"?"focus":a==="nighttime"?"deep":"focus"},mc=a=>{typeof document<"u"&&(document.documentElement.setAttribute("data-theme",a),localStorage.setItem("paradigm-theme",a))},hc=dp();mc(hc);const vc=Pt(a=>({theme:hc,setTheme:m=>{a({theme:m}),mc(m)}})),fp=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[s.jsx("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1"}),s.jsx("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1"}),s.jsx("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1"}),s.jsx("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1"})]}),pp=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[s.jsx("rect",{x:"3",y:"3",width:"5",height:"18",rx:"1"}),s.jsx("rect",{x:"10",y:"3",width:"5",height:"18",rx:"1"}),s.jsx("rect",{x:"17",y:"3",width:"5",height:"18",rx:"1"})]}),mp=()=>s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[s.jsx("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),s.jsx("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),s.jsx("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),s.jsx("circle",{cx:"4",cy:"6",r:"1",fill:"currentColor"}),s.jsx("circle",{cx:"4",cy:"12",r:"1",fill:"currentColor"}),s.jsx("circle",{cx:"4",cy:"18",r:"1",fill:"currentColor"})]}),hp={component:"var(--color-component)",flow:"var(--color-flow)",gate:"var(--color-gate)",signal:"var(--color-signal)",aspect:"var(--color-aspect)"};function vp({projectName:a}){const{nodes:m,visibleTypes:i,toggleType:c,setVisibleTypes:f,layoutMode:d,setLayoutMode:g,sortOption:w,setSortOption:E}=rt(),{viewport:C,setZoom:F,resetViewport:T}=fc(),{theme:_,setTheme:L}=vc(),P=m.reduce((I,G)=>(I[G.type]=(I[G.type]||0)+1,I),{}),N=[{mode:"canvas",icon:s.jsx(fp,{}),title:"Canvas view"},{mode:"grid",icon:s.jsx(pp,{}),title:"Grid view (by type)"},{mode:"list",icon:s.jsx(mp,{}),title:"List view"}],k=[{value:"type",label:"Sort by Type"},{value:"alpha",label:"Sort A-Z"},{value:"updated",label:"Recently Updated"},{value:"stale",label:"Stale First"}];return s.jsxs("header",{className:"toolbar",children:[s.jsx("div",{className:"toolbar-left",children:a&&s.jsx("span",{className:"toolbar-project-name",children:a})}),s.jsx("div",{className:"toolbar-center",children:s.jsxs("div",{className:"toolbar-stats",children:[s.jsx("button",{className:"toolbar-toggle-all",onClick:()=>{const I=Object.keys(P).length;if(i.length===I)f([]);else{const X=Object.keys(P);f(X)}},title:i.length===Object.keys(P).length?"Hide all types":(i.length===0,"Show all types"),children:(()=>{const I=Object.keys(P).length,G=i.length===I,X=i.length===0;return G?s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[s.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),s.jsx("circle",{cx:"12",cy:"12",r:"3"})]}):X?s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[s.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),s.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}):s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[s.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),s.jsx("path",{d:"M12 9v6"}),s.jsx("path",{d:"M9 12h6"})]})})()}),Object.entries(P).map(([I,G])=>{const X=i.includes(I);return s.jsxs("button",{className:`toolbar-stat ${X?"toolbar-stat--active":"toolbar-stat--inactive"}`,onClick:()=>c(I),style:{cursor:"pointer",background:"none",border:"none",color:"inherit",font:"inherit"},title:`Toggle ${I} visibility`,children:[s.jsx("span",{className:`toolbar-stat-icon-wrapper ${X?"toolbar-stat-icon-wrapper--active":"toolbar-stat-icon-wrapper--inactive"}`,children:s.jsx("span",{className:`toolbar-stat-icon ${X?"toolbar-stat-icon--active":"toolbar-stat-icon--inactive"}`,style:{background:X?hp[I]:"transparent"}})}),s.jsx("span",{className:X?"toolbar-stat-count--active":"toolbar-stat-count--inactive",children:G})]},I)})]})}),s.jsxs("div",{className:"toolbar-right",children:[s.jsxs("div",{className:"layout-controls",children:[s.jsx("div",{className:"layout-toggle",children:N.map(({mode:I,icon:G,title:X})=>s.jsx("button",{className:`layout-btn ${d===I?"active":""}`,onClick:()=>g(I),title:X,children:G},I))}),d!=="canvas"&&s.jsx("select",{className:"sort-select",value:w,onChange:I=>E(I.target.value),children:k.map(({value:I,label:G})=>s.jsx("option",{value:I,children:G},I))})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[s.jsxs("div",{className:"theme-toggle",children:[s.jsx("button",{onClick:()=>L("spectrum"),className:`theme-btn ${_==="spectrum"?"active":""}`,title:"Spectrum theme","aria-label":"Spectrum theme",children:"S"}),s.jsx("button",{onClick:()=>L("focus"),className:`theme-btn ${_==="focus"?"active":""}`,title:"Focus theme","aria-label":"Focus theme",children:"F"}),s.jsx("button",{onClick:()=>L("deep"),className:`theme-btn ${_==="deep"?"active":""}`,title:"Deep theme","aria-label":"Deep theme",children:"D"})]}),d==="canvas"&&s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:()=>F(C.zoom/1.2),style:{background:"var(--input-bg)",border:"1px solid var(--input-border)",borderRadius:"4px",padding:"4px 8px",color:"var(--text-secondary)",cursor:"pointer"},children:"-"}),s.jsxs("span",{style:{fontSize:"12px",color:"var(--text-muted)",minWidth:"50px",textAlign:"center"},children:[Math.round(C.zoom*100),"%"]}),s.jsx("button",{onClick:()=>F(C.zoom*1.2),style:{background:"var(--input-bg)",border:"1px solid var(--input-border)",borderRadius:"4px",padding:"4px 8px",color:"var(--text-secondary)",cursor:"pointer"},children:"+"}),s.jsx("button",{onClick:T,style:{background:"var(--input-bg)",border:"1px solid var(--input-border)",borderRadius:"4px",padding:"4px 8px",color:"var(--text-secondary)",cursor:"pointer",fontSize:"12px"},children:"Reset"})]})]})]})]})}const gp=[{key:"Click + Drag",description:"Pan the canvas",category:"navigation"},{key:"Wheel",description:"Zoom in/out",category:"navigation"},{key:"Click Node",description:"Select a node",category:"interaction"},{key:"Drag Node",description:"Move a node",category:"interaction"},{key:"/",description:"Focus command input",category:"general"},{key:"?",description:"Toggle this help panel",category:"general"},{key:"Esc",description:"Deselect / Close panels",category:"general"}],yp={navigation:"Navigation",interaction:"Interaction",general:"Keyboard Shortcuts"};function xp(){const[a,m]=$.useState(!1),i=$.useCallback(()=>{m(f=>!f)},[]);if($.useEffect(()=>{const f=d=>{const g=document.activeElement,w=(g==null?void 0:g.tagName)==="INPUT"||(g==null?void 0:g.tagName)==="TEXTAREA";d.key==="?"&&!w&&!d.ctrlKey&&!d.metaKey&&!d.altKey&&(d.preventDefault(),i()),d.key==="Escape"&&a&&!w&&m(!1)};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[i,a]),!a)return s.jsx("button",{className:"help-toggle",onClick:i,title:"Show help (?)","aria-label":"Show help",children:"?"});const c=gp.reduce((f,d)=>(f[d.category]||(f[d.category]=[]),f[d.category].push(d),f),{});return s.jsxs("div",{className:"help-panel",children:[s.jsxs("div",{className:"help-panel-header",children:[s.jsx("h3",{children:"Help & Shortcuts"}),s.jsx("button",{className:"help-panel-close",onClick:i,"aria-label":"Close help",children:"×"})]}),s.jsx("div",{className:"help-panel-content",children:Object.entries(c).map(([f,d])=>s.jsxs("div",{className:"help-category",children:[s.jsx("h4",{children:yp[f]}),s.jsx("div",{className:"help-hotkeys",children:d.map((g,w)=>s.jsxs("div",{className:"help-hotkey",children:[s.jsx("kbd",{className:"help-key",children:g.key}),s.jsx("span",{className:"help-description",children:g.description})]},w))})]},f))}),s.jsx("div",{className:"help-panel-footer",children:s.jsxs("span",{className:"help-hint",children:["Press ",s.jsx("kbd",{children:"?"})," to toggle"]})})]})}function wp(){const a=rt(w=>w.selectedId),m=rt(w=>w.isLoading),i=rt(w=>w.loadError),c=rt(w=>w.projectName),f=rt(w=>w.loadFromApi),d=rt(w=>w.layoutMode);$.useEffect(()=>{f()},[f]);const g=()=>{switch(d){case"grid":return s.jsx(tp,{});case"list":return s.jsx(lp,{});case"canvas":default:return s.jsx(qf,{})}};return m?s.jsx("div",{className:"design-view loading-state",children:s.jsxs("div",{className:"loading-content",children:[s.jsx("div",{className:"loading-spinner"}),s.jsx("p",{children:"Loading symbols..."})]})}):i?s.jsx("div",{className:"design-view error-state",children:s.jsxs("div",{className:"error-content",children:[s.jsx("h2",{children:"Failed to load symbols"}),s.jsx("p",{children:i}),s.jsx("button",{onClick:()=>f(),children:"Retry"})]})}):s.jsxs("div",{className:"design-view",children:[s.jsx(vp,{projectName:c}),s.jsxs("div",{className:"design-content",children:[g(),a&&s.jsx(cp,{})]}),d==="canvas"&&s.jsx(ap,{}),s.jsx(xp,{})]})}const Sp=Pt((a,m)=>({incidents:[],patterns:[],selectedIncidentId:null,isLoading:!1,error:null,statusFilter:"all",environmentFilter:null,symbolFilter:null,loadIncidents:async()=>{a({isLoading:!0,error:null});try{const i=await fetch("/api/incidents");if(!i.ok)throw new Error(`API error: ${i.status}`);const c=await i.json();a({incidents:c.incidents||[],isLoading:!1})}catch(i){console.error("Failed to load incidents:",i),a({isLoading:!1,error:i instanceof Error?i.message:"Failed to load incidents",incidents:[]})}},loadPatterns:async()=>{try{const i=await fetch("/api/patterns");if(!i.ok)throw new Error(`API error: ${i.status}`);const c=await i.json();a({patterns:c.patterns||[]})}catch(i){console.error("Failed to load patterns:",i)}},selectIncident:i=>a({selectedIncidentId:i}),setStatusFilter:i=>a({statusFilter:i}),setEnvironmentFilter:i=>a({environmentFilter:i}),setSymbolFilter:i=>a({symbolFilter:i}),resolveIncident:async i=>{try{const c=await fetch(`/api/incidents/${i}/resolve`,{method:"POST",headers:{"Content-Type":"application/json"}});if(!c.ok)throw new Error(`API error: ${c.status}`);await m().loadIncidents()}catch(c){throw console.error("Failed to resolve incident:",c),c}},getFilteredIncidents:()=>{const i=m();let c=i.incidents;return i.statusFilter!=="all"&&(c=c.filter(f=>f.status===i.statusFilter)),i.environmentFilter&&(c=c.filter(f=>f.environment===i.environmentFilter)),i.symbolFilter&&(c=c.filter(f=>{const d=f.symbols;return d.feature===i.symbolFilter||d.component===i.symbolFilter||d.flow===i.symbolFilter||d.gate===i.symbolFilter||d.signal===i.symbolFilter})),c},getSelectedIncident:()=>{const i=m();return i.incidents.find(c=>c.id===i.selectedIncidentId)}})),sc={open:"#ef4444",investigating:"#f59e0b",resolved:"#22c55e","wont-fix":"#6b7280"},oc={open:"Open",investigating:"Investigating",resolved:"Resolved","wont-fix":"Won't Fix"};function jp(){const{isLoading:a,error:m,statusFilter:i,selectedIncidentId:c,loadIncidents:f,loadPatterns:d,selectIncident:g,setStatusFilter:w,getFilteredIncidents:E,getSelectedIncident:C,resolveIncident:F}=Sp(),T=E(),_=C();return $.useEffect(()=>{f(),d()},[f,d]),a?s.jsx("div",{className:"incidents-view loading-state",children:s.jsxs("div",{className:"loading-content",children:[s.jsx("div",{className:"loading-spinner"}),s.jsx("p",{children:"Loading incidents..."})]})}):m?s.jsx("div",{className:"incidents-view error-state",children:s.jsxs("div",{className:"error-content",children:[s.jsx("h2",{children:"Failed to load incidents"}),s.jsx("p",{children:m}),s.jsx("button",{onClick:()=>f(),children:"Retry"})]})}):s.jsxs("div",{className:"incidents-view",children:[s.jsxs("div",{className:"incidents-filters",children:[s.jsxs("div",{className:"filter-group",children:[s.jsx("label",{children:"Status:"}),s.jsxs("select",{value:i,onChange:L=>w(L.target.value),children:[s.jsx("option",{value:"all",children:"All"}),s.jsx("option",{value:"open",children:"Open"}),s.jsx("option",{value:"investigating",children:"Investigating"}),s.jsx("option",{value:"resolved",children:"Resolved"}),s.jsx("option",{value:"wont-fix",children:"Won't Fix"})]})]}),s.jsxs("div",{className:"filter-stats",children:[T.length," incident",T.length!==1?"s":""]})]}),s.jsxs("div",{className:"incidents-content",children:[s.jsx("div",{className:"incidents-list",children:T.length===0?s.jsxs("div",{className:"incidents-empty",children:[s.jsx("p",{children:"No incidents found."}),s.jsx("p",{className:"hint",children:"Incidents are recorded when errors occur in your application."})]}):T.map(L=>s.jsxs("div",{className:`incident-card ${c===L.id?"selected":""}`,onClick:()=>g(L.id),children:[s.jsxs("div",{className:"incident-header",children:[s.jsx("span",{className:"incident-id",children:L.id}),s.jsx("span",{className:"incident-status",style:{color:sc[L.status]},children:oc[L.status]})]}),s.jsx("div",{className:"incident-error",children:L.error.message}),s.jsxs("div",{className:"incident-meta",children:[s.jsx("span",{className:"incident-env",children:L.environment}),s.jsx("span",{className:"incident-time",children:new Date(L.timestamp).toLocaleString()})]}),L.symbols&&Object.keys(L.symbols).length>0&&s.jsxs("div",{className:"incident-symbols",children:[L.symbols.feature&&s.jsxs("span",{className:"symbol-tag feature",children:["@",L.symbols.feature]}),L.symbols.component&&s.jsxs("span",{className:"symbol-tag component",children:["#",L.symbols.component]}),L.symbols.flow&&s.jsxs("span",{className:"symbol-tag flow",children:["$",L.symbols.flow]}),L.symbols.gate&&s.jsxs("span",{className:"symbol-tag gate",children:["^",L.symbols.gate]}),L.symbols.signal&&s.jsxs("span",{className:"symbol-tag signal",children:["!",L.symbols.signal]})]}),L.patternMatches&&L.patternMatches.length>0&&s.jsx("div",{className:"incident-patterns",children:s.jsxs("span",{className:"pattern-match",children:["Matched: ",L.patternMatches[0].patternName,"(",Math.round(L.patternMatches[0].confidence),"%)"]})})]},L.id))}),_&&s.jsxs("div",{className:"incident-detail",children:[s.jsxs("div",{className:"detail-header",children:[s.jsx("h2",{children:_.id}),s.jsx("button",{className:"detail-close",onClick:()=>g(null),children:"×"})]}),s.jsxs("div",{className:"detail-content",children:[s.jsxs("section",{className:"detail-section",children:[s.jsx("h3",{children:"Error"}),s.jsx("div",{className:"error-message",children:_.error.message}),_.error.type&&s.jsxs("div",{className:"error-type",children:["Type: ",_.error.type]})]}),s.jsxs("section",{className:"detail-section",children:[s.jsx("h3",{children:"Context"}),s.jsxs("div",{className:"detail-field",children:[s.jsx("label",{children:"Status"}),s.jsx("span",{className:"status-badge",style:{backgroundColor:sc[_.status]},children:oc[_.status]})]}),s.jsxs("div",{className:"detail-field",children:[s.jsx("label",{children:"Environment"}),s.jsx("span",{children:_.environment})]}),s.jsxs("div",{className:"detail-field",children:[s.jsx("label",{children:"Timestamp"}),s.jsx("span",{children:new Date(_.timestamp).toLocaleString()})]})]}),_.symbols&&Object.keys(_.symbols).length>0&&s.jsxs("section",{className:"detail-section",children:[s.jsx("h3",{children:"Symbols"}),s.jsx("div",{className:"symbols-list",children:Object.entries(_.symbols).map(([L,P])=>P&&s.jsxs("div",{className:"symbol-item",children:[s.jsx("label",{children:L}),s.jsx("span",{className:`symbol-value ${L}`,children:P})]},L))})]}),_.patternMatches&&_.patternMatches.length>0&&s.jsxs("section",{className:"detail-section",children:[s.jsx("h3",{children:"Pattern Matches"}),s.jsx("div",{className:"patterns-list",children:_.patternMatches.map(L=>s.jsxs("div",{className:"pattern-item",children:[s.jsx("div",{className:"pattern-name",children:L.patternName}),s.jsxs("div",{className:"pattern-confidence",children:[Math.round(L.confidence),"% confidence"]})]},L.patternId))})]}),_.status==="open"&&s.jsx("section",{className:"detail-actions",children:s.jsx("button",{className:"action-btn resolve",onClick:()=>F(_.id),children:"Mark Resolved"})})]})]})]})]})}const gc=Pt((a,m)=>({logs:[],services:[],flowEvents:[],isLoading:!1,error:null,isLive:!1,ws:null,levelFilter:"all",serviceFilter:null,symbolFilter:null,searchQuery:"",excludedSymbols:new Set,excludedSymbolTypes:new Set,excludedMessages:new Set,excludedServices:new Set,loadLogs:async()=>{a({isLoading:!0,error:null});try{const i=new URLSearchParams,c=m();c.levelFilter!=="all"&&i.set("level",c.levelFilter),c.serviceFilter&&i.set("service",c.serviceFilter),c.symbolFilter&&i.set("symbol",c.symbolFilter),c.searchQuery&&i.set("search",c.searchQuery),i.set("limit","200");const f=await fetch(`/api/logs?${i}`);if(!f.ok)throw new Error(`API error: ${f.status}`);const d=await f.json();a({logs:d.logs||[],isLoading:!1})}catch(i){a({isLoading:!1,error:i instanceof Error?i.message:"Failed to load logs",logs:[]})}},loadServices:async()=>{try{const i=await fetch("/api/services");if(!i.ok)return;const c=await i.json();a({services:c.services||[]})}catch{}},connectWebSocket:()=>{const i=m().ws;if(i&&i.readyState===WebSocket.OPEN)return;const c=window.location.protocol==="https:"?"wss:":"ws:",f=new WebSocket(`${c}//${window.location.host}`);f.onopen=()=>{f.send(JSON.stringify({method:"subscribe",id:1})),a({isLive:!0,ws:f})},f.onmessage=d=>{try{const g=JSON.parse(d.data);g.type==="log"&&g.entry&&a(w=>({logs:[g.entry,...w.logs].slice(0,500)})),g.type==="flow_event"&&a(w=>({flowEvents:[g,...w.flowEvents].slice(0,200)}))}catch{}},f.onclose=()=>{a({isLive:!1,ws:null})},f.onerror=()=>{a({isLive:!1,ws:null})}},disconnectWebSocket:()=>{const i=m().ws;i&&(i.close(),a({isLive:!1,ws:null}))},setLevelFilter:i=>a({levelFilter:i}),setServiceFilter:i=>a({serviceFilter:i}),setSymbolFilter:i=>a({symbolFilter:i}),setSearchQuery:i=>a({searchQuery:i}),clearLogs:()=>a({logs:[],flowEvents:[]}),toggleExcludedSymbol:i=>{const c=new Set(m().excludedSymbols);c.has(i)?c.delete(i):c.add(i),a({excludedSymbols:c})},toggleExcludedSymbolType:i=>{const c=new Set(m().excludedSymbolTypes);c.has(i)?c.delete(i):c.add(i),a({excludedSymbolTypes:c})},toggleExcludedMessage:i=>{const c=new Set(m().excludedMessages);c.has(i)?c.delete(i):c.add(i),a({excludedMessages:c})},toggleExcludedService:i=>{const c=new Set(m().excludedServices);c.has(i)?c.delete(i):c.add(i),a({excludedServices:c})},clearAllExclusions:()=>a({excludedSymbols:new Set,excludedSymbolTypes:new Set,excludedMessages:new Set,excludedServices:new Set}),getFilteredLogs:()=>{const i=m();let c=i.logs;if(i.levelFilter!=="all"&&(c=c.filter(f=>f.level===i.levelFilter)),i.serviceFilter&&(c=c.filter(f=>f.service===i.serviceFilter)),i.symbolFilter&&(c=c.filter(f=>f.symbol.includes(i.symbolFilter))),i.searchQuery){const f=i.searchQuery.toLowerCase();c=c.filter(d=>d.message.toLowerCase().includes(f)||d.symbol.toLowerCase().includes(f))}return i.excludedSymbols.size>0&&(c=c.filter(f=>!i.excludedSymbols.has(f.symbol))),i.excludedSymbolTypes.size>0&&(c=c.filter(f=>!i.excludedSymbolTypes.has(f.symbolType))),i.excludedMessages.size>0&&(c=c.filter(f=>!i.excludedMessages.has(f.message))),i.excludedServices.size>0&&(c=c.filter(f=>!i.excludedServices.has(f.service))),c}}));function Np(a){const[m,i]=$.useState(a),c=$.useRef(null),f=$.useCallback((g,w)=>{w.preventDefault(),c.current={idx:g,startX:w.clientX,startW:m[g]};const E=F=>{const T=c.current;if(!T)return;const _=Math.max(40,T.startW+(F.clientX-T.startX));i(L=>{const P=[...L];return P[T.idx]=_,P})},C=()=>{c.current=null,window.removeEventListener("mousemove",E),window.removeEventListener("mouseup",C)};window.addEventListener("mousemove",E),window.addEventListener("mouseup",C)},[m]),d=m.map(g=>`${g}px`).join(" ")+" 1fr";return{widths:m,gridTemplate:d,onMouseDown:f}}function Rl({idx:a,onMouseDown:m}){return s.jsx("span",{className:"col-resize-handle",onMouseDown:i=>m(a,i)})}const kp={debug:"#94a3b8",info:"#3b82f6",warn:"#f59e0b",error:"#ef4444"},ic={component:"var(--color-component)",gate:"#f59e0b",signal:"var(--color-signal)",flow:"var(--color-flow)",aspect:"var(--color-aspect)",raw:"var(--text-muted)"};function Ep(a){const m=new Date(a),i=(c,f=2)=>String(c).padStart(f,"0");return`${m.getFullYear()}-${i(m.getMonth()+1)}-${i(m.getDate())} ${i(m.getHours())}:${i(m.getMinutes())}:${i(m.getSeconds())}`}function Cp({entry:a,isExpanded:m,onToggle:i,onContextMenu:c}){const f=ic[a.symbolType]||ic.raw;return s.jsxs("div",{className:`log-row log-row--${a.level}${m?" log-row--expanded":""}`,onClick:i,onContextMenu:c,children:[s.jsx("span",{className:"log-time",children:Ep(a.timestamp)}),s.jsx("span",{className:"log-level",style:{color:kp[a.level]},children:a.level.toUpperCase().padEnd(5)}),s.jsx("span",{className:"log-symbol",style:{color:f},children:a.symbol}),s.jsx("span",{className:"log-service",children:a.service}),s.jsxs("span",{className:"log-message",children:[a.message,a.durationMs!==void 0&&s.jsxs("span",{className:"log-duration",children:[a.durationMs.toFixed(1),"ms"]})]}),m&&a.data&&s.jsx("div",{className:"log-data",onClick:d=>d.stopPropagation(),children:s.jsx("pre",{children:JSON.stringify(a.data,null,2)})})]})}function Tp(){const{isLoading:a,error:m,isLive:i,services:c,levelFilter:f,serviceFilter:d,searchQuery:g,excludedSymbols:w,excludedSymbolTypes:E,excludedMessages:C,excludedServices:F,loadLogs:T,loadServices:_,connectWebSocket:L,disconnectWebSocket:P,setLevelFilter:N,setServiceFilter:k,setSearchQuery:I,getFilteredLogs:G,clearLogs:X,toggleExcludedSymbol:re,toggleExcludedSymbolType:fe,toggleExcludedMessage:b,toggleExcludedService:H,clearAllExclusions:pe}=gc(),xe=G(),De=$.useRef(null),[Ee,Je]=$.useState(new Set),[Te,We]=$.useState(!1),[Ie,Oe]=$.useState(!0),[oe,A]=$.useState(null),{gridTemplate:q,onMouseDown:V}=Np([180,50,160,100]),y=w.size>0||E.size>0||C.size>0||F.size>0,z=$.useCallback((U,le)=>{U.preventDefault(),A({x:U.clientX,y:U.clientY,entry:le})},[]);$.useEffect(()=>{if(!oe)return;const U=()=>A(null);return window.addEventListener("click",U),()=>window.removeEventListener("click",U)},[oe]);const te=U=>{Je(le=>{const ue=new Set(le);return ue.has(U)?(ue.delete(U),We(!1)):ue.add(U),ue})},ne=()=>{Te?(Je(new Set),We(!1)):We(!0)};return $.useEffect(()=>(T(),_(),L(),()=>P()),[T,_,L,P]),$.useEffect(()=>{Ie&&De.current&&De.current.scrollIntoView({behavior:"smooth"})},[xe.length,Ie]),a&&xe.length===0?s.jsx("div",{className:"logs-view loading-state",children:s.jsxs("div",{className:"loading-content",children:[s.jsx("div",{className:"loading-spinner"}),s.jsx("p",{children:"Loading logs..."})]})}):m&&xe.length===0?s.jsx("div",{className:"logs-view error-state",children:s.jsxs("div",{className:"error-content",children:[s.jsx("h2",{children:"Failed to load logs"}),s.jsx("p",{children:m}),s.jsx("button",{onClick:()=>T(),children:"Retry"})]})}):s.jsxs("div",{className:"logs-view",children:[s.jsxs("div",{className:"logs-toolbar",children:[s.jsxs("div",{className:"logs-filters",children:[s.jsxs("select",{value:f,onChange:U=>N(U.target.value),className:"logs-select",children:[s.jsx("option",{value:"all",children:"All Levels"}),s.jsx("option",{value:"debug",children:"Debug"}),s.jsx("option",{value:"info",children:"Info"}),s.jsx("option",{value:"warn",children:"Warn"}),s.jsx("option",{value:"error",children:"Error"})]}),s.jsxs("select",{value:d||"",onChange:U=>k(U.target.value||null),className:"logs-select",children:[s.jsx("option",{value:"",children:"All Services"}),c.map(U=>s.jsx("option",{value:U.name,children:U.name},U.name))]}),s.jsx("input",{type:"text",placeholder:"Search logs...",value:g,onChange:U=>I(U.target.value),className:"logs-search"})]}),s.jsxs("div",{className:"logs-actions",children:[s.jsxs("span",{className:"logs-count",children:[xe.length," entries"]}),s.jsx("button",{className:`logs-expand-btn ${Te?"active":""}`,onClick:ne,title:Te?"Collapse all payloads":"Expand all payloads",children:Te?"Collapse All":"Expand All"}),s.jsxs("button",{className:`logs-live-btn ${i?"active":""}`,onClick:()=>i?P():L(),title:i?"Streaming live":"Click to connect",children:[s.jsx("span",{className:`live-dot ${i?"live":""}`}),i?"Live":"Paused"]}),s.jsx("button",{className:`logs-scroll-btn ${Ie?"active":""}`,onClick:()=>Oe(!Ie),title:"Auto-scroll to new logs",children:Ie?"Auto":"Manual"}),s.jsx("button",{className:"logs-clear-btn",onClick:X,title:"Clear log buffer",children:"Clear"})]})]}),y&&s.jsxs("div",{className:"exclusion-bar",children:[[...w].map(U=>s.jsxs("span",{className:"exclusion-chip",children:["symbol: ",U," ",s.jsx("button",{onClick:()=>re(U),children:"×"})]},`sym-${U}`)),[...E].map(U=>s.jsxs("span",{className:"exclusion-chip",children:["type: ",U," ",s.jsx("button",{onClick:()=>fe(U),children:"×"})]},`type-${U}`)),[...C].map(U=>s.jsxs("span",{className:"exclusion-chip",children:["msg: ",U.length>40?U.slice(0,40)+"...":U," ",s.jsx("button",{onClick:()=>b(U),children:"×"})]},`msg-${U}`)),[...F].map(U=>s.jsxs("span",{className:"exclusion-chip",children:["service: ",U," ",s.jsx("button",{onClick:()=>H(U),children:"×"})]},`svc-${U}`)),s.jsx("button",{className:"exclusion-clear",onClick:pe,children:"Clear all"})]}),oe&&s.jsxs("div",{className:"context-menu",style:{top:oe.y,left:oe.x},onClick:U=>U.stopPropagation(),children:[s.jsxs("button",{onClick:()=>{re(oe.entry.symbol),A(null)},children:['Exclude symbol "',oe.entry.symbol,'"']}),s.jsxs("button",{onClick:()=>{fe(oe.entry.symbolType),A(null)},children:['Exclude type "',oe.entry.symbolType,'"']}),s.jsx("button",{onClick:()=>{b(oe.entry.message),A(null)},children:"Exclude this message"}),s.jsxs("button",{onClick:()=>{H(oe.entry.service),A(null)},children:['Exclude service "',oe.entry.service,'"']})]}),s.jsxs("div",{className:"logs-table",style:{"--log-cols":q},children:[s.jsxs("div",{className:"logs-header",children:[s.jsxs("span",{className:"log-time",children:["Time",s.jsx(Rl,{idx:0,onMouseDown:V})]}),s.jsxs("span",{className:"log-level",children:["Level",s.jsx(Rl,{idx:1,onMouseDown:V})]}),s.jsxs("span",{className:"log-symbol",children:["Symbol",s.jsx(Rl,{idx:2,onMouseDown:V})]}),s.jsxs("span",{className:"log-service",children:["Service",s.jsx(Rl,{idx:3,onMouseDown:V})]}),s.jsx("span",{className:"log-message",children:"Message"})]}),s.jsxs("div",{className:"logs-body",children:[s.jsx("div",{ref:De}),xe.length===0?s.jsxs("div",{className:"logs-empty",children:[s.jsx("p",{children:"No logs yet."}),s.jsxs("p",{className:"hint",children:["POST structured logs to ",s.jsx("code",{children:"/api/logs"})," or connect an app with the Sentinel client SDK."]})]}):xe.map(U=>s.jsx(Cp,{entry:U,isExpanded:Te||Ee.has(U.id),onToggle:()=>te(U.id),onContextMenu:le=>z(le,U)},U.id))]})]})]})}const yc={gate:"#f59e0b",action:"var(--color-component)",signal:"var(--color-signal)"},_p={gate:"^",action:"#",signal:"!"};function xc(a,m){const i=Date.now();return m.some(c=>c.nodeSymbol===a&&i-new Date(c.timestamp).getTime()<5e3)}function Lp({flow:a,flowEvents:m,isSelected:i,onSelect:c}){return s.jsxs("div",{className:`flow-card ${i?"selected":""}`,onClick:c,children:[s.jsxs("div",{className:"flow-card-header",children:[s.jsx("span",{className:"flow-card-id",children:a.id}),a.trigger&&s.jsx("span",{className:"flow-card-trigger",children:a.trigger})]}),s.jsx("div",{className:"flow-card-name",children:a.name}),s.jsx("div",{className:"flow-card-steps",children:a.steps.map((f,d)=>{const g=xc(f.symbol,m);return s.jsxs("div",{className:"flow-step-mini",children:[d>0&&s.jsx("span",{className:"flow-arrow",children:"→"}),s.jsx("span",{className:`flow-step-dot ${g?"active pulse":""}`,style:{backgroundColor:g?yc[f.type]:"var(--text-muted)"},title:`${f.symbol} (${f.type})`})]},d)})})]})}function Pp({flow:a,flowEvents:m}){return s.jsxs("div",{className:"flow-diagram",children:[s.jsx("h3",{children:a.name}),a.trigger&&s.jsxs("div",{className:"flow-trigger-label",children:["Trigger: ",s.jsx("code",{children:a.trigger})]}),s.jsx("div",{className:"flow-steps",children:a.steps.map((i,c)=>{const f=xc(i.symbol,m),d=m.find(g=>g.nodeSymbol===i.symbol);return s.jsxs("div",{className:"flow-step-container",children:[c>0&&s.jsx("div",{className:"flow-connector",children:s.jsx("div",{className:`flow-line ${f?"active":""}`})}),s.jsxs("div",{className:`flow-step-node ${f?"active":""}`,style:{borderColor:yc[i.type]},children:[s.jsx("span",{className:"flow-step-icon",children:_p[i.type]}),s.jsx("span",{className:"flow-step-symbol",children:i.symbol}),s.jsx("span",{className:"flow-step-type",children:i.type}),f&&d&&s.jsxs("span",{className:"flow-step-live",children:[d.service," · ",new Date(d.timestamp).toLocaleTimeString()]})]})]},c)})})]})}function zp({symbols:a,onSave:m,onCancel:i}){const[c,f]=$.useState(""),[d,g]=$.useState(""),[w,E]=$.useState([]),C=$.useCallback(P=>{E(N=>[...N,{type:P,symbol:""}])},[]),F=$.useCallback((P,N,k)=>{E(I=>I.map((G,X)=>X===P?{...G,[N]:k}:G))},[]),T=$.useCallback(P=>{E(N=>N.filter((k,I)=>I!==P))},[]),_=()=>{if(!c||w.length===0)return;const P=`$${c.toLowerCase().replace(/\s+/g,"-")}`;m({id:P,name:c,trigger:d||void 0,steps:w})},L=P=>P==="gate"?a.filter(N=>N.type==="gate"):P==="signal"?a.filter(N=>N.type==="signal"):a.filter(N=>N.type==="component");return s.jsxs("div",{className:"flow-composer",children:[s.jsx("h3",{children:"New Flow"}),s.jsxs("div",{className:"composer-field",children:[s.jsx("label",{children:"Flow Name"}),s.jsx("input",{type:"text",placeholder:"e.g. Checkout Flow",value:c,onChange:P=>f(P.target.value)})]}),s.jsxs("div",{className:"composer-field",children:[s.jsx("label",{children:"Trigger (optional)"}),s.jsx("input",{type:"text",placeholder:"e.g. POST /api/checkout",value:d,onChange:P=>g(P.target.value)})]}),s.jsxs("div",{className:"composer-steps",children:[s.jsx("label",{children:"Steps"}),w.map((P,N)=>s.jsxs("div",{className:"composer-step",children:[s.jsxs("select",{value:P.type,onChange:k=>F(N,"type",k.target.value),children:[s.jsx("option",{value:"gate",children:"Gate (^)"}),s.jsx("option",{value:"action",children:"Action (#)"}),s.jsx("option",{value:"signal",children:"Signal (!)"})]}),s.jsxs("select",{value:P.symbol,onChange:k=>F(N,"symbol",k.target.value),children:[s.jsx("option",{value:"",children:"Select symbol..."}),L(P.type).map(k=>s.jsx("option",{value:k.symbol,children:k.symbol},k.symbol))]}),s.jsx("button",{className:"composer-remove",onClick:()=>T(N),children:"×"})]},N)),s.jsxs("div",{className:"composer-add-buttons",children:[s.jsx("button",{onClick:()=>C("gate"),children:"+ Gate"}),s.jsx("button",{onClick:()=>C("action"),children:"+ Action"}),s.jsx("button",{onClick:()=>C("signal"),children:"+ Signal"})]})]}),s.jsxs("div",{className:"composer-actions",children:[s.jsx("button",{className:"action-btn",onClick:_,disabled:!c||w.length===0,children:"Save Flow"}),s.jsx("button",{className:"action-btn cancel",onClick:i,children:"Cancel"})]})]})}function Mp(){const{flowEvents:a,connectWebSocket:m,disconnectWebSocket:i,isLive:c}=gc(),[f,d]=$.useState([]),[g,w]=$.useState([]),[E,C]=$.useState(null),[F,T]=$.useState(!1),[_,L]=$.useState(!0),P=f.find(k=>k.id===E);$.useEffect(()=>{async function k(){try{const I=await fetch("/api/symbols");if(!I.ok){L(!1);return}const G=await I.json(),X=(G.symbols||[]).map(b=>({symbol:b.symbol,type:b.type}));w(X);const fe=(G.symbols||[]).filter(b=>b.type==="flow").map(b=>{var pe,xe,De;const H=[];if((pe=b.data)!=null&&pe.steps&&Array.isArray(b.data.steps))for(const Ee of b.data.steps)H.push({type:Ee.type||"action",symbol:Ee.symbol||"",label:Ee.label});if(H.length===0&&b.references)for(const Ee of b.references)Ee.startsWith("^")?H.push({type:"gate",symbol:Ee}):Ee.startsWith("!")?H.push({type:"signal",symbol:Ee}):Ee.startsWith("#")&&H.push({type:"action",symbol:Ee});return{id:b.symbol,name:((xe=b.data)==null?void 0:xe.name)||b.symbol.replace("$",""),trigger:(De=b.data)==null?void 0:De.trigger,steps:H}});d(fe),L(!1)}catch{L(!1)}}k()},[]),$.useEffect(()=>(m(),()=>i()),[m,i]);const N=k=>{d(I=>[...I,k]),T(!1),C(k.id)};return _?s.jsx("div",{className:"flows-view loading-state",children:s.jsxs("div",{className:"loading-content",children:[s.jsx("div",{className:"loading-spinner"}),s.jsx("p",{children:"Loading flows..."})]})}):s.jsxs("div",{className:"flows-view",children:[s.jsxs("div",{className:"flows-toolbar",children:[s.jsxs("div",{className:"flows-toolbar-left",children:[s.jsxs("span",{className:"flows-count",children:[f.length," flow",f.length!==1?"s":""]}),s.jsxs("button",{className:`logs-live-btn ${c?"active":""}`,onClick:()=>c?i():m(),children:[s.jsx("span",{className:`live-dot ${c?"live":""}`}),c?"Live":"Paused"]})]}),s.jsx("div",{className:"flows-toolbar-right",children:s.jsx("button",{className:"action-btn",onClick:()=>{T(!0),C(null)},children:"+ New Flow"})})]}),s.jsxs("div",{className:"flows-content",children:[s.jsx("div",{className:"flows-list",children:f.length===0&&!F?s.jsxs("div",{className:"flows-empty",children:[s.jsx("p",{children:"No flows defined."}),s.jsxs("p",{className:"hint",children:["Define flows in ",s.jsx("code",{children:".purpose"})," files or use the composer to create one."]})]}):f.map(k=>s.jsx(Lp,{flow:k,flowEvents:a,isSelected:E===k.id,onSelect:()=>{C(k.id),T(!1)}},k.id))}),s.jsx("div",{className:"flows-detail",children:F?s.jsx(zp,{symbols:g,onSave:N,onCancel:()=>T(!1)}):P?s.jsx(Pp,{flow:P,flowEvents:a}):s.jsx("div",{className:"flows-empty-detail",children:s.jsx("p",{children:"Select a flow to visualize or create a new one."})})})]})]})}const Ol=Pt((a,m)=>({events:[],scopes:[],selectedScope:null,excludedTypes:new Set,excludedServices:new Set,categoryFilter:null,loading:!1,error:null,total:0,fetchEvents:async(i,c={})=>{a({loading:!0,error:null});try{const f=new URLSearchParams({schemaId:i,...c}),d=await fetch(`/api/events?${f}`);if(!d.ok)throw new Error(`Failed to fetch events: ${d.status}`);const g=await d.json();a({events:g.events||[],total:g.total||0,loading:!1})}catch(f){a({error:f instanceof Error?f.message:"Failed to fetch events",loading:!1})}},fetchScopes:async i=>{try{const c=await fetch(`/api/events/scopes?schemaId=${encodeURIComponent(i)}`);if(!c.ok)throw new Error(`Failed to fetch scopes: ${c.status}`);const f=await c.json();a({scopes:f.scopes||[]})}catch(c){a({error:c instanceof Error?c.message:"Failed to fetch scopes"})}},fetchScopeEvents:async(i,c)=>{a({loading:!0,error:null,selectedScope:c});try{const f=await fetch(`/api/events/scope/${encodeURIComponent(c)}?schemaId=${encodeURIComponent(i)}`);if(!f.ok)throw new Error(`Failed to fetch scope events: ${f.status}`);const d=await f.json();a({events:d.events||[],total:d.count||0,loading:!1})}catch(f){a({error:f instanceof Error?f.message:"Failed to fetch scope events",loading:!1})}},selectScope:i=>a({selectedScope:i}),toggleExcludedType:i=>{const c=new Set(m().excludedTypes);c.has(i)?c.delete(i):c.add(i),a({excludedTypes:c})},toggleExcludedService:i=>{const c=new Set(m().excludedServices);c.has(i)?c.delete(i):c.add(i),a({excludedServices:c})},clearAllExclusions:()=>a({excludedTypes:new Set,excludedServices:new Set}),setCategoryFilter:i=>a({categoryFilter:i}),addRealtimeEvent:i=>{a(c=>({events:[i,...c.events].slice(0,500),total:c.total+1}))}})),Bo=Pt((a,m)=>({schemas:[],selectedSchemaId:null,loading:!1,error:null,fetchSchemas:async()=>{a({loading:!0,error:null});try{const i=await fetch("/api/schemas");if(!i.ok)throw new Error(`Failed to fetch schemas: ${i.status}`);const f=(await i.json()).schemas||[];a({schemas:f,loading:!1}),!m().selectedSchemaId&&f.length>0&&a({selectedSchemaId:f[0].id})}catch(i){a({error:i instanceof Error?i.message:"Failed to fetch schemas",loading:!1})}},selectSchema:i=>a({selectedSchemaId:i}),getSelectedSchema:()=>{const i=m();return i.schemas.find(c=>c.id===i.selectedSchemaId)}}));function Rp(a){const[m,i]=$.useState(a),c=$.useRef(null),f=$.useCallback((g,w)=>{w.preventDefault(),c.current={idx:g,startX:w.clientX,startW:m[g]};const E=F=>{const T=c.current;if(!T)return;const _=Math.max(40,T.startW+(F.clientX-T.startX));i(L=>{const P=[...L];return P[T.idx]=_,P})},C=()=>{c.current=null,window.removeEventListener("mousemove",E),window.removeEventListener("mouseup",C)};window.addEventListener("mousemove",E),window.addEventListener("mouseup",C)},[m]),d=m.map(g=>`${g}px`).join(" ")+" 1fr";return{widths:m,gridTemplate:d,onMouseDown:f}}function Fl({idx:a,onMouseDown:m}){return s.jsx("span",{className:"col-resize-handle",onMouseDown:i=>m(a,i)})}const Fp={debug:"#94a3b8",info:"#3b82f6",warn:"#f59e0b",error:"#ef4444"},Dp={logs:"#3b82f6",metrics:"#22c55e",traces:"#a855f7",incidents:"#ef4444",rules:"#f59e0b",state:"#06b6d4",cascade:"#ec4899",lifecycle:"#84cc16"};function Ip(a){const m=new Date(a),i=(c,f=2)=>String(c).padStart(f,"0");return`${m.getFullYear()}-${i(m.getMonth()+1)}-${i(m.getDate())} ${i(m.getHours())}:${i(m.getMinutes())}:${i(m.getSeconds())}`}function Dl(a,m){var c;const i=(c=m==null?void 0:m.visualization)==null?void 0:c.categoryColors;return i&&i[a]?i[a]:Dp[a]||"var(--text-muted)"}function Op(){const{schemas:a,selectedSchemaId:m,selectSchema:i,fetchSchemas:c,loading:f}=Bo();return $.useEffect(()=>{c()},[]),f?s.jsx("div",{className:"events-loading",children:"Loading schemas..."}):a.length===0?s.jsxs("div",{className:"events-empty-state",children:[s.jsx("p",{children:"No event schemas registered."}),s.jsxs("p",{className:"hint",children:["Applications register schemas via ",s.jsx("code",{children:"POST /api/schemas"})," or"," ",s.jsx("code",{children:"SentinelWebClient.registerSchema()"}),"."]})]}):s.jsx("select",{className:"events-schema-select",value:m||"",onChange:d=>i(d.target.value||null),children:a.map(d=>s.jsxs("option",{value:d.id,children:[d.name," (v",d.version,")"]},d.id))})}function $p({schema:a}){const{scopes:m,selectedScope:i,fetchScopes:c,fetchScopeEvents:f,selectScope:d,fetchEvents:g}=Ol();$.useEffect(()=>{c(a.id)},[a.id]);const w=E=>{i===E?(d(null),g(a.id)):f(a.id,E)};return m.length===0?null:s.jsxs("div",{className:"events-scope-nav",children:[s.jsxs("div",{className:"events-scope-label",children:[a.scope.label,"s"]}),s.jsx("div",{className:"events-scope-list",children:m.slice(0,50).map(E=>s.jsxs("button",{className:`events-scope-chip ${i===E.scopeValue?"active":""}`,onClick:()=>w(E.scopeValue),title:`${E.eventCount} events`,children:[s.jsx("span",{className:"scope-value",children:a.scope.type==="number"?`#${E.scopeValue}`:E.scopeValue}),s.jsx("span",{className:"scope-count",children:E.eventCount})]},E.scopeValue))})]})}function Ap({schema:a}){var E;const{events:m,categoryFilter:i,setCategoryFilter:c,excludedTypes:f,toggleExcludedType:d}=Ol(),g=[...new Set(m.map(C=>C.category))],w=((E=a.visualization)==null?void 0:E.defaultExcluded)||[];return $.useEffect(()=>{for(const C of w)f.has(C)||d(C)},[a.id]),s.jsxs("div",{className:"events-category-filters",children:[s.jsx("button",{className:`events-category-chip ${i?"":"active"}`,onClick:()=>c(null),children:"All"}),g.map(C=>s.jsx("button",{className:`events-category-chip ${i===C?"active":""}`,onClick:()=>c(i===C?null:C),style:{borderColor:Dl(C,a),color:i===C?"#fff":Dl(C,a),backgroundColor:i===C?Dl(C,a):"transparent"},children:C},C))]})}function Up({event:a,schema:m,isExpanded:i,onToggle:c,onContextMenu:f}){const d=Dl(a.category,m);return s.jsxs("div",{className:`event-row event-row--${a.severity||"info"}${i?" event-row--expanded":""}`,onClick:c,onContextMenu:f,children:[s.jsx("span",{className:"event-time",children:Ip(a.timestamp)}),s.jsx("span",{className:"event-severity",style:{color:Fp[a.severity||"info"]},children:(a.severity||"info").toUpperCase().padEnd(5)}),s.jsxs("span",{className:"event-type",children:[a.category&&a.category!=="unknown"&&s.jsxs("span",{className:"event-category-badge",style:{color:d},children:["[",a.category,"]"]})," ",a.eventType]}),s.jsx("span",{className:"event-service",children:a.service}),a.scopeValue&&s.jsx("span",{className:"event-scope",children:a.scopeValue}),a.depth!=null&&a.depth>0&&s.jsx("span",{className:"event-depth",style:{paddingLeft:`${a.depth*12}px`},children:" ".repeat(a.depth)}),i&&a.data&&s.jsx("div",{className:"event-data",onClick:g=>g.stopPropagation(),children:s.jsx("pre",{children:JSON.stringify(a.data,null,2)})})]})}function Vp({schema:a}){const{events:m,excludedTypes:i,excludedServices:c,categoryFilter:f,loading:d,toggleExcludedType:g,toggleExcludedService:w,clearAllExclusions:E}=Ol(),[C,F]=$.useState(new Set),[T,_]=$.useState(!1),L=$.useRef(null),{gridTemplate:P,onMouseDown:N}=Rp([180,50,200,100]),k=H=>{F(pe=>{const xe=new Set(pe);return xe.has(H)?(xe.delete(H),_(!1)):xe.add(H),xe})},I=m.filter(H=>!(i.has(H.eventType)||c.has(H.service)||f&&H.category!==f)),G=i.size>0||c.size>0,[X,re]=$.useState(null),fe=$.useCallback((H,pe)=>{H.preventDefault(),re({x:H.clientX,y:H.clientY,event:pe})},[]);$.useEffect(()=>{if(!X)return;const H=()=>re(null);return window.addEventListener("click",H),()=>window.removeEventListener("click",H)},[X]);const b=()=>{T?(F(new Set),_(!1)):_(!0)};return d?s.jsx("div",{className:"events-loading",children:"Loading events..."}):I.length===0?s.jsxs("div",{className:"events-empty-state",children:[s.jsx("p",{children:"No events to display."}),s.jsx("p",{className:"hint",children:"Events will appear here when applications send them to Sentinel."})]}):s.jsxs("div",{className:"events-table",ref:L,style:{"--evt-cols":P},children:[s.jsxs("div",{className:"events-table-actions",children:[s.jsxs("span",{className:"events-count",children:[I.length," events"]}),s.jsx("button",{className:`events-expand-btn ${T?"active":""}`,onClick:b,title:T?"Collapse all payloads":"Expand all payloads",children:T?"Collapse All":"Expand All"})]}),G&&s.jsxs("div",{className:"exclusion-bar",children:[[...i].map(H=>s.jsxs("span",{className:"exclusion-chip",children:["type: ",H," ",s.jsx("button",{onClick:()=>g(H),children:"×"})]},`type-${H}`)),[...c].map(H=>s.jsxs("span",{className:"exclusion-chip",children:["service: ",H," ",s.jsx("button",{onClick:()=>w(H),children:"×"})]},`svc-${H}`)),s.jsx("button",{className:"exclusion-clear",onClick:E,children:"Clear all"})]}),X&&s.jsxs("div",{className:"context-menu",style:{top:X.y,left:X.x},onClick:H=>H.stopPropagation(),children:[s.jsxs("button",{onClick:()=>{g(X.event.eventType),re(null)},children:['Exclude type "',X.event.eventType,'"']}),s.jsxs("button",{onClick:()=>{w(X.event.service),re(null)},children:['Exclude service "',X.event.service,'"']})]}),s.jsxs("div",{className:"events-table-header",children:[s.jsxs("span",{className:"event-time",children:["Time",s.jsx(Fl,{idx:0,onMouseDown:N})]}),s.jsxs("span",{className:"event-severity",children:["Level",s.jsx(Fl,{idx:1,onMouseDown:N})]}),s.jsxs("span",{className:"event-type",children:["Type",s.jsx(Fl,{idx:2,onMouseDown:N})]}),s.jsxs("span",{className:"event-service",children:["Service",s.jsx(Fl,{idx:3,onMouseDown:N})]}),s.jsx("span",{className:"event-scope",children:"Scope"})]}),s.jsx("div",{className:"events-table-body",children:I.map(H=>s.jsx(Up,{event:H,schema:a,isExpanded:T||C.has(H.id),onToggle:()=>k(H.id),onContextMenu:pe=>fe(pe,H)},H.id))})]})}function Wp(){const{selectedSchemaId:a}=Bo(),m=Bo(f=>f.getSelectedSchema()),{fetchEvents:i,addRealtimeEvent:c}=Ol();return $.useEffect(()=>{a&&i(a)},[a]),$.useEffect(()=>{if(!a)return;const d=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`;let g;try{g=new WebSocket(d)}catch{return}return g.onmessage=w=>{var E;try{const C=JSON.parse(w.data);C.type==="event"&&((E=C.event)==null?void 0:E.schemaId)===a&&c(C.event)}catch{}},()=>{g.close()}},[a]),s.jsxs("div",{className:"events-view",children:[s.jsxs("div",{className:"events-toolbar",children:[s.jsx(Op,{}),m&&s.jsx(Ap,{schema:m})]}),m&&s.jsx($p,{schema:m}),m?s.jsx(Vp,{schema:m}):s.jsx("div",{className:"events-empty-state",children:s.jsx("p",{children:"Select a schema to view events."})})]})}const ac="paradigm-symphony",Bp=Pt((a,m)=>({threads:[],selectedThreadId:null,threadFilter:"all",notes:[],decisions:[],loading:!1,error:null,isLive:!0,fetchThreads:async()=>{a({loading:!0,error:null});try{const i=await fetch(`/api/events/scopes?schemaId=${encodeURIComponent(ac)}`);if(!i.ok)throw new Error(`Failed to fetch threads: ${i.status}`);const d=((await i.json()).scopes||[]).map(g=>{var E;const w=(((E=g.categories)==null?void 0:E.lifecycle)||0)>0;return{id:g.scopeValue,topic:g.scopeValue,status:w?"resolved":"active",participantCount:0,noteCount:g.eventCount,lastActivity:g.lastTimestamp}});d.sort((g,w)=>w.lastActivity.localeCompare(g.lastActivity)),a({threads:d,loading:!1})}catch(i){a({error:i instanceof Error?i.message:"Failed to fetch threads",loading:!1})}},fetchThreadNotes:async i=>{var c,f;a({loading:!0,error:null,selectedThreadId:i});try{const d=new URLSearchParams({schemaId:ac,scopeValue:i}),g=await fetch(`/api/events?${d}`);if(!g.ok)throw new Error(`Failed to fetch notes: ${g.status}`);const E=(await g.json()).events||[];E.sort((T,_)=>T.timestamp.localeCompare(_.timestamp));const C=[];for(const T of E)T.eventType==="note:decision"&&((c=T.data)!=null&&c.decision)&&C.push(T.data.decision),T.eventType==="note:decision"&&((f=T.data)!=null&&f.text)&&C.push(T.data.text);const F=[...new Set(C)];a({notes:E,decisions:F,loading:!1})}catch(d){a({error:d instanceof Error?d.message:"Failed to fetch notes",loading:!1})}},selectThread:i=>{a({selectedThreadId:i,notes:[],decisions:[]}),i&&m().fetchThreadNotes(i)},setThreadFilter:i=>a({threadFilter:i}),setLive:i=>a({isLive:i}),addRealtimeNote:i=>{var f;const c=m();c.selectedThreadId&&i.scopeValue===c.selectedThreadId&&(a(d=>({notes:[...d.notes,i]})),i.eventType==="note:decision"&&((f=i.data)!=null&&f.decision)&&a(d=>({decisions:[...d.decisions,i.data.decision]}))),a(d=>{const g=d.threads.findIndex(w=>w.id===i.scopeValue);if(g>=0){const w=[...d.threads];return w[g]={...w[g],noteCount:w[g].noteCount+1,lastActivity:i.timestamp},{threads:w}}return{threads:[{id:i.scopeValue||i.id,topic:i.scopeValue||"Direct",status:"active",participantCount:1,noteCount:1,lastActivity:i.timestamp},...d.threads]}})}})),wc={dialogue:"#7dd3fc",action:"#86efac",outcome:"#fbbf24",system:"#f87171",lifecycle:"#a78bfa",transfer:"#34d399"};function uc({eventType:a}){var d;const i=((d=a.split(":")[1])==null?void 0:d.toUpperCase())||a.toUpperCase(),c=Sc(a),f=wc[c]||"#94a3b8";return s.jsx("span",{className:"conv-intent-badge",style:{backgroundColor:f,color:"#0f172a"},children:i})}function Sc(a){return["note:question","note:context","note:clarification","note:verification","note:reference"].includes(a)?"dialogue":["note:proposal","note:action"].includes(a)?"action":["note:decision","note:approval","note:rejection"].includes(a)?"outcome":a==="note:alert"?"system":a.startsWith("thread:")||a.startsWith("participant:")||a==="note:handoff"?"lifecycle":a.startsWith("file:")?"transfer":"dialogue"}function Hp({sender:a,role:m}){const i=m==="human";return s.jsxs("span",{className:`conv-participant ${i?"conv-participant-human":"conv-participant-agent"}`,children:[s.jsx("span",{className:"conv-participant-icon",children:i?"👤":"🤖"}),s.jsx("span",{className:"conv-participant-name",children:a}),m&&m!=="human"&&s.jsx("span",{className:"conv-participant-role",children:m})]})}function Qp({event:a}){var L,P,N,k,I,G,X,re,fe;const m=((L=a.data)==null?void 0:L.sender)||a.service||"unknown",i=((P=a.data)==null?void 0:P.senderRole)||"agent",c=((N=a.data)==null?void 0:N.text)||"",f=(k=a.data)==null?void 0:k.diff,d=(I=a.data)==null?void 0:I.decision,g=(G=a.data)==null?void 0:G.symbols,w=Sc(a.eventType),E=wc[w]||"#334155",C=new Date(a.timestamp).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"}),F=a.eventType.startsWith("file:"),T=(X=a.data)==null?void 0:X.filePath;return a.eventType.startsWith("thread:")||a.eventType.startsWith("participant:")?s.jsx("div",{className:"conv-note conv-note-lifecycle",children:s.jsxs("span",{className:"conv-note-lifecycle-line",style:{borderColor:E},children:[s.jsx(uc,{eventType:a.eventType}),s.jsx("span",{className:"conv-note-lifecycle-text",children:c||((re=a.data)==null?void 0:re.topic)||a.eventType}),s.jsx("span",{className:"conv-note-time",children:C})]})}):s.jsxs("div",{className:"conv-note",style:{borderLeftColor:E},children:[s.jsxs("div",{className:"conv-note-header",children:[s.jsx(Hp,{sender:m,role:i}),s.jsx(uc,{eventType:a.eventType}),s.jsx("span",{className:"conv-note-time",children:C})]}),s.jsx("div",{className:"conv-note-text",children:c}),d&&s.jsxs("div",{className:"conv-note-decision",children:[s.jsx("strong",{children:"Decision:"})," ",d]}),F&&T&&s.jsxs("div",{className:"conv-note-file",children:[s.jsx("code",{children:T}),((fe=a.data)==null?void 0:fe.size)!=null&&s.jsxs("span",{className:"conv-note-file-size",children:[String(a.data.size)," bytes"]})]}),f&&s.jsxs("details",{className:"conv-note-diff",children:[s.jsx("summary",{children:"Diff"}),s.jsx("pre",{children:f})]}),g&&g.length>0&&s.jsx("div",{className:"conv-note-symbols",children:g.map((b,H)=>s.jsx("span",{className:"conv-symbol-chip",children:b},H))})]})}function Yp({thread:a,isSelected:m,onSelect:i}){const c=new Date(a.lastActivity).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"});return s.jsxs("button",{className:`conv-thread-card ${m?"conv-thread-card-selected":""}`,onClick:i,children:[s.jsxs("div",{className:"conv-thread-card-header",children:[s.jsx("span",{className:`conv-thread-status-dot ${a.status==="active"?"conv-status-active":"conv-status-resolved"}`}),s.jsx("span",{className:"conv-thread-topic",children:a.topic})]}),s.jsxs("div",{className:"conv-thread-card-meta",children:[s.jsxs("span",{children:[a.noteCount," notes"]}),s.jsx("span",{children:c})]})]})}function Kp({decisions:a}){return a.length===0?null:s.jsxs("details",{className:"conv-decision-summary",children:[s.jsxs("summary",{children:["Decisions (",a.length,")"]}),s.jsx("ul",{children:a.map((m,i)=>s.jsx("li",{children:m},i))})]})}function Xp(){const{threads:a,selectedThreadId:m,threadFilter:i,notes:c,decisions:f,loading:d,isLive:g,fetchThreads:w,selectThread:E,setThreadFilter:C,setLive:F,addRealtimeNote:T}=Bp(),_=$.useRef(null);$.useEffect(()=>{w()},[w]),$.useEffect(()=>{if(!g)return;const N=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`;let k;try{k=new WebSocket(N)}catch{return}return k.onmessage=I=>{var G;try{const X=JSON.parse(I.data);X.type==="event"&&((G=X.event)==null?void 0:G.schemaId)==="paradigm-symphony"&&T(X.event)}catch{}},()=>{k.close()}},[g,T]),$.useEffect(()=>{var P;(P=_.current)==null||P.scrollIntoView({behavior:"smooth"})},[c.length]);const L=a.filter(P=>i==="all"?!0:P.status===i);return s.jsxs("div",{className:"conv-view",children:[s.jsxs("div",{className:"conv-toolbar",children:[s.jsx("div",{className:"conv-filter-chips",children:["all","active","resolved"].map(P=>s.jsx("button",{className:`conv-filter-chip ${i===P?"conv-filter-active":""}`,onClick:()=>C(P),children:P.charAt(0).toUpperCase()+P.slice(1)},P))}),s.jsxs("label",{className:"conv-live-toggle",children:[s.jsx("input",{type:"checkbox",checked:g,onChange:P=>F(P.target.checked)}),"Live"]})]}),s.jsxs("div",{className:"conv-content",children:[s.jsx("div",{className:"conv-thread-list",children:L.length===0?s.jsx("div",{className:"conv-empty",children:"No threads"}):L.map(P=>s.jsx(Yp,{thread:P,isSelected:P.id===m,onSelect:()=>E(P.id)},P.id))}),s.jsx("div",{className:"conv-panel",children:m?d?s.jsx("div",{className:"conv-loading",children:"Loading..."}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"conv-thread-header",children:[s.jsx("h3",{children:m}),s.jsxs("span",{className:"conv-note-count",children:[c.length," notes"]})]}),s.jsxs("div",{className:"conv-notes-scroll",children:[c.map(P=>s.jsx(Qp,{event:P},P.id)),s.jsx("div",{ref:_})]}),s.jsx(Kp,{decisions:f})]}):s.jsx("div",{className:"conv-empty-panel",children:s.jsx("p",{children:"Select a thread to view the conversation"})})})]})]})}function Gp(){const[a,m]=$.useState("design"),[i,c]=$.useState(null),[f,d]=$.useState(null),[g,w]=$.useState(!0),[E,C]=$.useState(null),F=vc(T=>T.theme);return $.useEffect(()=>{document.documentElement.setAttribute("data-theme",F)},[F]),$.useEffect(()=>{async function T(){try{const _=await fetch("/api/info");if(_.ok){const L=await _.json();c(L.projectName||null),d(L.projectDir||null)}w(!1)}catch(_){console.error("Failed to load project info:",_),C(_ instanceof Error?_.message:"Failed to connect to server"),w(!1)}}T()},[]),g?s.jsx("div",{className:"app loading-state",children:s.jsxs("div",{className:"loading-content",children:[s.jsx("div",{className:"loading-spinner"}),s.jsx("p",{children:"Connecting to Sentinel..."})]})}):E?s.jsx("div",{className:"app error-state",children:s.jsxs("div",{className:"error-content",children:[s.jsx("h2",{children:"Failed to connect"}),s.jsx("p",{children:E}),s.jsxs("p",{className:"hint",children:["Make sure you're running ",s.jsx("code",{children:"paradigm sentinel"})," from your project directory."]}),s.jsx("button",{onClick:()=>window.location.reload(),children:"Retry"})]})}):s.jsxs("div",{className:"app",children:[s.jsxs("header",{className:"view-tabs-header",children:[s.jsx("div",{className:"view-tabs-left",children:s.jsxs("div",{className:"toolbar-logo",children:[s.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 32 32",fill:"none",children:[s.jsx("rect",{width:"32",height:"32",rx:"8",fill:"#0f172a"}),s.jsx("path",{d:"M16 6L6 26h20L16 6z",fill:"none",stroke:"url(#sentinel-grad)",strokeWidth:"2"}),s.jsx("path",{d:"M4 14L14 16",stroke:"#f8fafc",strokeWidth:"2",strokeLinecap:"round"}),s.jsx("path",{d:"M18 17L28 12",stroke:"#ef4444",strokeWidth:"1.5",strokeLinecap:"round"}),s.jsx("path",{d:"M18 18L28 16",stroke:"#f59e0b",strokeWidth:"1.5",strokeLinecap:"round"}),s.jsx("path",{d:"M18 19L28 20",stroke:"#22c55e",strokeWidth:"1.5",strokeLinecap:"round"}),s.jsx("path",{d:"M18 20L28 24",stroke:"#3b82f6",strokeWidth:"1.5",strokeLinecap:"round"}),s.jsx("defs",{children:s.jsxs("linearGradient",{id:"sentinel-grad",x1:"6",y1:"26",x2:"26",y2:"6",children:[s.jsx("stop",{offset:"0%",stopColor:"#818cf8"}),s.jsx("stop",{offset:"100%",stopColor:"#c084fc"})]})})]}),s.jsx("span",{children:"Sentinel"}),i&&s.jsx("span",{className:"toolbar-title",children:i})]})}),s.jsxs("div",{className:"view-tabs",children:[s.jsxs("button",{className:`view-tab ${a==="design"?"active":""}`,onClick:()=>m("design"),children:[s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[s.jsx("circle",{cx:"12",cy:"12",r:"3"}),s.jsx("path",{d:"M12 1v6m0 6v6M1 12h6m6 0h6"}),s.jsx("path",{d:"M4.93 4.93l4.24 4.24m5.66 5.66l4.24 4.24M4.93 19.07l4.24-4.24m5.66-5.66l4.24-4.24"})]}),"Design"]}),s.jsxs("button",{className:`view-tab ${a==="logs"?"active":""}`,onClick:()=>m("logs"),children:[s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[s.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"}),s.jsx("polyline",{points:"14 2 14 8 20 8"}),s.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),s.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"}),s.jsx("polyline",{points:"10 9 9 9 8 9"})]}),"Logs"]}),s.jsxs("button",{className:`view-tab ${a==="incidents"?"active":""}`,onClick:()=>m("incidents"),children:[s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[s.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"}),s.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),s.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),"Incidents"]}),s.jsxs("button",{className:`view-tab ${a==="flows"?"active":""}`,onClick:()=>m("flows"),children:[s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[s.jsx("circle",{cx:"5",cy:"12",r:"3"}),s.jsx("circle",{cx:"19",cy:"6",r:"3"}),s.jsx("circle",{cx:"19",cy:"18",r:"3"}),s.jsx("line",{x1:"8",y1:"12",x2:"16",y2:"6"}),s.jsx("line",{x1:"8",y1:"12",x2:"16",y2:"18"})]}),"Flows"]}),s.jsxs("button",{className:`view-tab ${a==="events"?"active":""}`,onClick:()=>m("events"),children:[s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[s.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),s.jsx("path",{d:"M3 9h18"}),s.jsx("path",{d:"M9 21V9"})]}),"Events"]}),s.jsxs("button",{className:`view-tab ${a==="conversations"?"active":""}`,onClick:()=>m("conversations"),children:[s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"})}),"Conversations"]})]}),s.jsxs("div",{className:"view-tabs-right",children:[f&&s.jsx("div",{className:"project-dir-badge",title:f,children:f}),s.jsxs("div",{className:"version-badge-inline",children:["v","0.1.1"]})]})]}),s.jsxs("main",{className:"main-content",children:[a==="design"&&s.jsx(wp,{}),a==="logs"&&s.jsx(Tp,{}),a==="incidents"&&s.jsx(jp,{}),a==="flows"&&s.jsx(Mp,{}),a==="events"&&s.jsx(Wp,{}),a==="conversations"&&s.jsx(Xp,{})]})]})}_f.createRoot(document.getElementById("root")).render(s.jsx(cc.StrictMode,{children:s.jsx(Gp,{})}));
|
|
62
|
+
//# sourceMappingURL=index-S1VJ67dT.js.map
|