octie-cli 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/octie.js +21 -0
- package/dist/cli/commands/create.d.ts.map +1 -1
- package/dist/cli/commands/create.js +11 -0
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/delete.d.ts.map +1 -1
- package/dist/cli/commands/delete.js +17 -0
- package/dist/cli/commands/delete.js.map +1 -1
- package/dist/web/routes/graph.d.ts.map +1 -1
- package/dist/web/routes/graph.js +24 -8
- package/dist/web/routes/graph.js.map +1 -1
- package/dist/web/routes/tasks.d.ts.map +1 -1
- package/dist/web/routes/tasks.js +28 -8
- package/dist/web/routes/tasks.js.map +1 -1
- package/dist/web-ui/assets/index-DHRZUDlD.css +1 -0
- package/dist/web-ui/assets/index-DIkt2ISd.js +34 -0
- package/dist/web-ui/index.html +2 -2
- package/package.json +2 -9
- package/dist/web-ui/assets/index-BB0qvF1y.css +0 -1
- package/dist/web-ui/assets/index-Vmm72oKY.js +0 -34
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))l(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&l(c)}).observe(document,{childList:!0,subtree:!0});function i(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(o){if(o.ep)return;o.ep=!0;const u=i(o);fetch(o.href,u)}})();var ws=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ip(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Xf={exports:{}},xl={};var fb;function pM(){if(fb)return xl;fb=1;var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function i(l,o,u){var c=null;if(u!==void 0&&(c=""+u),o.key!==void 0&&(c=""+o.key),"key"in o){u={};for(var f in o)f!=="key"&&(u[f]=o[f])}else u=o;return o=u.ref,{$$typeof:t,type:l,key:c,ref:o!==void 0?o:null,props:u}}return xl.Fragment=r,xl.jsx=i,xl.jsxs=i,xl}var db;function yM(){return db||(db=1,Xf.exports=pM()),Xf.exports}var x=yM(),Zf={exports:{}},Ee={};var hb;function xM(){if(hb)return Ee;hb=1;var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),y=Symbol.iterator;function b(z){return z===null||typeof z!="object"?null:(z=y&&z[y]||z["@@iterator"],typeof z=="function"?z:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,E={};function C(z,Y,ae){this.props=z,this.context=Y,this.refs=E,this.updater=ae||S}C.prototype.isReactComponent={},C.prototype.setState=function(z,Y){if(typeof z!="object"&&typeof z!="function"&&z!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,z,Y,"setState")},C.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function A(){}A.prototype=C.prototype;function w(z,Y,ae){this.props=z,this.context=Y,this.refs=E,this.updater=ae||S}var T=w.prototype=new A;T.constructor=w,N(T,C.prototype),T.isPureReactComponent=!0;var q=Array.isArray;function R(){}var M={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function H(z,Y,ae){var k=ae.ref;return{$$typeof:t,type:z,key:Y,ref:k!==void 0?k:null,props:ae}}function Q(z,Y){return H(z.type,Y,z.props)}function B(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function F(z){var Y={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(ae){return Y[ae]})}var W=/\/+/g;function D(z,Y){return typeof z=="object"&&z!==null&&z.key!=null?F(""+z.key):Y.toString(36)}function K(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(R,R):(z.status="pending",z.then(function(Y){z.status==="pending"&&(z.status="fulfilled",z.value=Y)},function(Y){z.status==="pending"&&(z.status="rejected",z.reason=Y)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function O(z,Y,ae,k,V){var I=typeof z;(I==="undefined"||I==="boolean")&&(z=null);var ne=!1;if(z===null)ne=!0;else switch(I){case"bigint":case"string":case"number":ne=!0;break;case"object":switch(z.$$typeof){case t:case r:ne=!0;break;case m:return ne=z._init,O(ne(z._payload),Y,ae,k,V)}}if(ne)return V=V(z),ne=k===""?"."+D(z,0):k,q(V)?(ae="",ne!=null&&(ae=ne.replace(W,"$&/")+"/"),O(V,Y,ae,"",function(he){return he})):V!=null&&(B(V)&&(V=Q(V,ae+(V.key==null||z&&z.key===V.key?"":(""+V.key).replace(W,"$&/")+"/")+ne)),Y.push(V)),1;ne=0;var le=k===""?".":k+":";if(q(z))for(var fe=0;fe<z.length;fe++)k=z[fe],I=le+D(k,fe),ne+=O(k,Y,ae,I,V);else if(fe=b(z),typeof fe=="function")for(z=fe.call(z),fe=0;!(k=z.next()).done;)k=k.value,I=le+D(k,fe++),ne+=O(k,Y,ae,I,V);else if(I==="object"){if(typeof z.then=="function")return O(K(z),Y,ae,k,V);throw Y=String(z),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return ne}function G(z,Y,ae){if(z==null)return z;var k=[],V=0;return O(z,k,"","",function(I){return Y.call(ae,I,V++)}),k}function X(z){if(z._status===-1){var Y=z._result;Y=Y(),Y.then(function(ae){(z._status===0||z._status===-1)&&(z._status=1,z._result=ae)},function(ae){(z._status===0||z._status===-1)&&(z._status=2,z._result=ae)}),z._status===-1&&(z._status=0,z._result=Y)}if(z._status===1)return z._result.default;throw z._result}var P=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},oe={map:G,forEach:function(z,Y,ae){G(z,function(){Y.apply(this,arguments)},ae)},count:function(z){var Y=0;return G(z,function(){Y++}),Y},toArray:function(z){return G(z,function(Y){return Y})||[]},only:function(z){if(!B(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return Ee.Activity=p,Ee.Children=oe,Ee.Component=C,Ee.Fragment=i,Ee.Profiler=o,Ee.PureComponent=w,Ee.StrictMode=l,Ee.Suspense=g,Ee.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Ee.__COMPILER_RUNTIME={__proto__:null,c:function(z){return M.H.useMemoCache(z)}},Ee.cache=function(z){return function(){return z.apply(null,arguments)}},Ee.cacheSignal=function(){return null},Ee.cloneElement=function(z,Y,ae){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var k=N({},z.props),V=z.key;if(Y!=null)for(I in Y.key!==void 0&&(V=""+Y.key),Y)!L.call(Y,I)||I==="key"||I==="__self"||I==="__source"||I==="ref"&&Y.ref===void 0||(k[I]=Y[I]);var I=arguments.length-2;if(I===1)k.children=ae;else if(1<I){for(var ne=Array(I),le=0;le<I;le++)ne[le]=arguments[le+2];k.children=ne}return H(z.type,V,k)},Ee.createContext=function(z){return z={$$typeof:c,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:u,_context:z},z},Ee.createElement=function(z,Y,ae){var k,V={},I=null;if(Y!=null)for(k in Y.key!==void 0&&(I=""+Y.key),Y)L.call(Y,k)&&k!=="key"&&k!=="__self"&&k!=="__source"&&(V[k]=Y[k]);var ne=arguments.length-2;if(ne===1)V.children=ae;else if(1<ne){for(var le=Array(ne),fe=0;fe<ne;fe++)le[fe]=arguments[fe+2];V.children=le}if(z&&z.defaultProps)for(k in ne=z.defaultProps,ne)V[k]===void 0&&(V[k]=ne[k]);return H(z,I,V)},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(z){return{$$typeof:f,render:z}},Ee.isValidElement=B,Ee.lazy=function(z){return{$$typeof:m,_payload:{_status:-1,_result:z},_init:X}},Ee.memo=function(z,Y){return{$$typeof:d,type:z,compare:Y===void 0?null:Y}},Ee.startTransition=function(z){var Y=M.T,ae={};M.T=ae;try{var k=z(),V=M.S;V!==null&&V(ae,k),typeof k=="object"&&k!==null&&typeof k.then=="function"&&k.then(R,P)}catch(I){P(I)}finally{Y!==null&&ae.types!==null&&(Y.types=ae.types),M.T=Y}},Ee.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Ee.use=function(z){return M.H.use(z)},Ee.useActionState=function(z,Y,ae){return M.H.useActionState(z,Y,ae)},Ee.useCallback=function(z,Y){return M.H.useCallback(z,Y)},Ee.useContext=function(z){return M.H.useContext(z)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(z,Y){return M.H.useDeferredValue(z,Y)},Ee.useEffect=function(z,Y){return M.H.useEffect(z,Y)},Ee.useEffectEvent=function(z){return M.H.useEffectEvent(z)},Ee.useId=function(){return M.H.useId()},Ee.useImperativeHandle=function(z,Y,ae){return M.H.useImperativeHandle(z,Y,ae)},Ee.useInsertionEffect=function(z,Y){return M.H.useInsertionEffect(z,Y)},Ee.useLayoutEffect=function(z,Y){return M.H.useLayoutEffect(z,Y)},Ee.useMemo=function(z,Y){return M.H.useMemo(z,Y)},Ee.useOptimistic=function(z,Y){return M.H.useOptimistic(z,Y)},Ee.useReducer=function(z,Y,ae){return M.H.useReducer(z,Y,ae)},Ee.useRef=function(z){return M.H.useRef(z)},Ee.useState=function(z){return M.H.useState(z)},Ee.useSyncExternalStore=function(z,Y,ae){return M.H.useSyncExternalStore(z,Y,ae)},Ee.useTransition=function(){return M.H.useTransition()},Ee.version="19.2.4",Ee}var gb;function Ul(){return gb||(gb=1,Zf.exports=xM()),Zf.exports}var J=Ul();const Sl=Ip(J);var Ff={exports:{}},bl={},Kf={exports:{}},Qf={};var vb;function bM(){return vb||(vb=1,(function(t){function r(O,G){var X=O.length;O.push(G);e:for(;0<X;){var P=X-1>>>1,oe=O[P];if(0<o(oe,G))O[P]=G,O[X]=oe,X=P;else break e}}function i(O){return O.length===0?null:O[0]}function l(O){if(O.length===0)return null;var G=O[0],X=O.pop();if(X!==G){O[0]=X;e:for(var P=0,oe=O.length,z=oe>>>1;P<z;){var Y=2*(P+1)-1,ae=O[Y],k=Y+1,V=O[k];if(0>o(ae,X))k<oe&&0>o(V,ae)?(O[P]=V,O[k]=X,P=k):(O[P]=ae,O[Y]=X,P=Y);else if(k<oe&&0>o(V,X))O[P]=V,O[k]=X,P=k;else break e}}return G}function o(O,G){var X=O.sortIndex-G.sortIndex;return X!==0?X:O.id-G.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();t.unstable_now=function(){return c.now()-f}}var g=[],d=[],m=1,p=null,y=3,b=!1,S=!1,N=!1,E=!1,C=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function T(O){for(var G=i(d);G!==null;){if(G.callback===null)l(d);else if(G.startTime<=O)l(d),G.sortIndex=G.expirationTime,r(g,G);else break;G=i(d)}}function q(O){if(N=!1,T(O),!S)if(i(g)!==null)S=!0,R||(R=!0,F());else{var G=i(d);G!==null&&K(q,G.startTime-O)}}var R=!1,M=-1,L=5,H=-1;function Q(){return E?!0:!(t.unstable_now()-H<L)}function B(){if(E=!1,R){var O=t.unstable_now();H=O;var G=!0;try{e:{S=!1,N&&(N=!1,A(M),M=-1),b=!0;var X=y;try{t:{for(T(O),p=i(g);p!==null&&!(p.expirationTime>O&&Q());){var P=p.callback;if(typeof P=="function"){p.callback=null,y=p.priorityLevel;var oe=P(p.expirationTime<=O);if(O=t.unstable_now(),typeof oe=="function"){p.callback=oe,T(O),G=!0;break t}p===i(g)&&l(g),T(O)}else l(g);p=i(g)}if(p!==null)G=!0;else{var z=i(d);z!==null&&K(q,z.startTime-O),G=!1}}break e}finally{p=null,y=X,b=!1}G=void 0}}finally{G?F():R=!1}}}var F;if(typeof w=="function")F=function(){w(B)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,D=W.port2;W.port1.onmessage=B,F=function(){D.postMessage(null)}}else F=function(){C(B,0)};function K(O,G){M=C(function(){O(t.unstable_now())},G)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(O){O.callback=null},t.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<O?Math.floor(1e3/O):5},t.unstable_getCurrentPriorityLevel=function(){return y},t.unstable_next=function(O){switch(y){case 1:case 2:case 3:var G=3;break;default:G=y}var X=y;y=G;try{return O()}finally{y=X}},t.unstable_requestPaint=function(){E=!0},t.unstable_runWithPriority=function(O,G){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var X=y;y=O;try{return G()}finally{y=X}},t.unstable_scheduleCallback=function(O,G,X){var P=t.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?P+X:P):X=P,O){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=X+oe,O={id:m++,callback:G,priorityLevel:O,startTime:X,expirationTime:oe,sortIndex:-1},X>P?(O.sortIndex=X,r(d,O),i(g)===null&&O===i(d)&&(N?(A(M),M=-1):N=!0,K(q,X-P))):(O.sortIndex=oe,r(g,O),S||b||(S=!0,R||(R=!0,F()))),O},t.unstable_shouldYield=Q,t.unstable_wrapCallback=function(O){var G=y;return function(){var X=y;y=G;try{return O.apply(this,arguments)}finally{y=X}}}})(Qf)),Qf}var mb;function _M(){return mb||(mb=1,Kf.exports=bM()),Kf.exports}var $f={exports:{}},_t={};var pb;function wM(){if(pb)return _t;pb=1;var t=Ul();function r(g){var d="https://react.dev/errors/"+g;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)d+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+g+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var l={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(g,d,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:p==null?null:""+p,children:g,containerInfo:d,implementation:m}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(g,d){if(g==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return _t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,_t.createPortal=function(g,d){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(r(299));return u(g,d,null,m)},_t.flushSync=function(g){var d=c.T,m=l.p;try{if(c.T=null,l.p=2,g)return g()}finally{c.T=d,l.p=m,l.d.f()}},_t.preconnect=function(g,d){typeof g=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,l.d.C(g,d))},_t.prefetchDNS=function(g){typeof g=="string"&&l.d.D(g)},_t.preinit=function(g,d){if(typeof g=="string"&&d&&typeof d.as=="string"){var m=d.as,p=f(m,d.crossOrigin),y=typeof d.integrity=="string"?d.integrity:void 0,b=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;m==="style"?l.d.S(g,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:p,integrity:y,fetchPriority:b}):m==="script"&&l.d.X(g,{crossOrigin:p,integrity:y,fetchPriority:b,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},_t.preinitModule=function(g,d){if(typeof g=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var m=f(d.as,d.crossOrigin);l.d.M(g,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&l.d.M(g)},_t.preload=function(g,d){if(typeof g=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var m=d.as,p=f(m,d.crossOrigin);l.d.L(g,m,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},_t.preloadModule=function(g,d){if(typeof g=="string")if(d){var m=f(d.as,d.crossOrigin);l.d.m(g,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else l.d.m(g)},_t.requestFormReset=function(g){l.d.r(g)},_t.unstable_batchedUpdates=function(g,d){return g(d)},_t.useFormState=function(g,d,m){return c.H.useFormState(g,d,m)},_t.useFormStatus=function(){return c.H.useHostTransitionStatus()},_t.version="19.2.4",_t}var yb;function hC(){if(yb)return $f.exports;yb=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),$f.exports=wM(),$f.exports}var xb;function SM(){if(xb)return bl;xb=1;var t=_M(),r=Ul(),i=hC();function l(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var n=e,a=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(a=n.return),e=n.return;while(e)}return n.tag===3?a:null}function c(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function f(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function g(e){if(u(e)!==e)throw Error(l(188))}function d(e){var n=e.alternate;if(!n){if(n=u(e),n===null)throw Error(l(188));return n!==e?null:e}for(var a=e,s=n;;){var h=a.return;if(h===null)break;var v=h.alternate;if(v===null){if(s=h.return,s!==null){a=s;continue}break}if(h.child===v.child){for(v=h.child;v;){if(v===a)return g(h),e;if(v===s)return g(h),n;v=v.sibling}throw Error(l(188))}if(a.return!==s.return)a=h,s=v;else{for(var _=!1,j=h.child;j;){if(j===a){_=!0,a=h,s=v;break}if(j===s){_=!0,s=h,a=v;break}j=j.sibling}if(!_){for(j=v.child;j;){if(j===a){_=!0,a=v,s=h;break}if(j===s){_=!0,s=v,a=h;break}j=j.sibling}if(!_)throw Error(l(189))}}if(a.alternate!==s)throw Error(l(190))}if(a.tag!==3)throw Error(l(188));return a.stateNode.current===a?e:n}function m(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=m(e),n!==null)return n;e=e.sibling}return null}var p=Object.assign,y=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),w=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),Q=Symbol.for("react.memo_cache_sentinel"),B=Symbol.iterator;function F(e){return e===null||typeof e!="object"?null:(e=B&&e[B]||e["@@iterator"],typeof e=="function"?e:null)}var W=Symbol.for("react.client.reference");function D(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===W?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case C:return"Profiler";case E:return"StrictMode";case q:return"Suspense";case R:return"SuspenseList";case H:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case S:return"Portal";case w:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case T:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case M:return n=e.displayName||null,n!==null?n:D(e.type)||"Memo";case L:n=e._payload,e=e._init;try{return D(e(n))}catch{}}return null}var K=Array.isArray,O=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X={pending:!1,data:null,method:null,action:null},P=[],oe=-1;function z(e){return{current:e}}function Y(e){0>oe||(e.current=P[oe],P[oe]=null,oe--)}function ae(e,n){oe++,P[oe]=e.current,e.current=n}var k=z(null),V=z(null),I=z(null),ne=z(null);function le(e,n){switch(ae(I,n),ae(V,e),ae(k,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?zx(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=zx(n),e=Dx(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Y(k),ae(k,e)}function fe(){Y(k),Y(V),Y(I)}function he(e){e.memoizedState!==null&&ae(ne,e);var n=k.current,a=Dx(n,e.type);n!==a&&(ae(V,e),ae(k,a))}function ye(e){V.current===e&&(Y(k),Y(V)),ne.current===e&&(Y(ne),vl._currentValue=X)}var xe,ge;function _e(e){if(xe===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);xe=n&&n[1]||"",ge=-1<a.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+xe+e+ge}var ve=!1;function Te(e,n){if(!e||ve)return"";ve=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(n){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(ie){var re=ie}Reflect.construct(e,[],ce)}else{try{ce.call()}catch(ie){re=ie}e.call(ce.prototype)}}else{try{throw Error()}catch(ie){re=ie}(ce=e())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(ie){if(ie&&re&&typeof ie.stack=="string")return[ie.stack,re.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=s.DetermineComponentFrameRoot(),_=v[0],j=v[1];if(_&&j){var U=_.split(`
|
|
4
|
+
`),te=j.split(`
|
|
5
|
+
`);for(h=s=0;s<U.length&&!U[s].includes("DetermineComponentFrameRoot");)s++;for(;h<te.length&&!te[h].includes("DetermineComponentFrameRoot");)h++;if(s===U.length||h===te.length)for(s=U.length-1,h=te.length-1;1<=s&&0<=h&&U[s]!==te[h];)h--;for(;1<=s&&0<=h;s--,h--)if(U[s]!==te[h]){if(s!==1||h!==1)do if(s--,h--,0>h||U[s]!==te[h]){var se=`
|
|
6
|
+
`+U[s].replace(" at new "," at ");return e.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",e.displayName)),se}while(1<=s&&0<=h);break}}}finally{ve=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?_e(a):""}function we(e,n){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e("Lazy");case 13:return e.child!==n&&n!==null?_e("Suspense Fallback"):_e("Suspense");case 19:return _e("SuspenseList");case 0:case 15:return Te(e.type,!1);case 11:return Te(e.type.render,!1);case 1:return Te(e.type,!0);case 31:return _e("Activity");default:return""}}function dt(e){try{var n="",a=null;do n+=we(e,a),a=e,e=e.return;while(e);return n}catch(s){return`
|
|
7
|
+
Error generating stack: `+s.message+`
|
|
8
|
+
`+s.stack}}var nt=Object.prototype.hasOwnProperty,Ht=t.unstable_scheduleCallback,Et=t.unstable_cancelCallback,yt=t.unstable_shouldYield,$e=t.unstable_requestPaint,Pe=t.unstable_now,an=t.unstable_getCurrentPriorityLevel,ln=t.unstable_ImmediatePriority,on=t.unstable_UserBlockingPriority,Nt=t.unstable_NormalPriority,xa=t.unstable_LowPriority,Mn=t.unstable_IdlePriority,Ni=t.log,ba=t.unstable_setDisableYieldValue,xt=null,Qe=null;function xn(e){if(typeof Ni=="function"&&ba(e),Qe&&typeof Qe.setStrictMode=="function")try{Qe.setStrictMode(xt,e)}catch{}}var wt=Math.clz32?Math.clz32:qu,Mu=Math.log,Ru=Math.LN2;function qu(e){return e>>>=0,e===0?32:31-(Mu(e)/Ru|0)|0}var _a=256,wa=262144,Sa=4194304;function Rn(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ea(e,n,a){var s=e.pendingLanes;if(s===0)return 0;var h=0,v=e.suspendedLanes,_=e.pingedLanes;e=e.warmLanes;var j=s&134217727;return j!==0?(s=j&~v,s!==0?h=Rn(s):(_&=j,_!==0?h=Rn(_):a||(a=j&~e,a!==0&&(h=Rn(a))))):(j=s&~v,j!==0?h=Rn(j):_!==0?h=Rn(_):a||(a=s&~e,a!==0&&(h=Rn(a)))),h===0?0:n!==0&&n!==h&&(n&v)===0&&(v=h&-h,a=n&-n,v>=a||v===32&&(a&4194048)!==0)?n:h}function Ur(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function Ou(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Jl(){var e=Sa;return Sa<<=1,(Sa&62914560)===0&&(Sa=4194304),e}function Ci(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function Gr(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function zu(e,n,a,s,h,v){var _=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var j=e.entanglements,U=e.expirationTimes,te=e.hiddenUpdates;for(a=_&~a;0<a;){var se=31-wt(a),ce=1<<se;j[se]=0,U[se]=-1;var re=te[se];if(re!==null)for(te[se]=null,se=0;se<re.length;se++){var ie=re[se];ie!==null&&(ie.lane&=-536870913)}a&=~ce}s!==0&&Wl(e,s,0),v!==0&&h===0&&e.tag!==0&&(e.suspendedLanes|=v&~(_&~n))}function Wl(e,n,a){e.pendingLanes|=n,e.suspendedLanes&=~n;var s=31-wt(n);e.entangledLanes|=n,e.entanglements[s]=e.entanglements[s]|1073741824|a&261930}function eo(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var s=31-wt(a),h=1<<s;h&n|e[s]&n&&(e[s]|=n),a&=~h}}function to(e,n){var a=n&-n;return a=(a&42)!==0?1:Ti(a),(a&(e.suspendedLanes|n))!==0?0:a}function Ti(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ai(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function no(){var e=G.p;return e!==0?e:(e=window.event,e===void 0?32:ab(e.type))}function ro(e,n){var a=G.p;try{return G.p=e,n()}finally{G.p=a}}var bn=Math.random().toString(36).slice(2),ct="__reactFiber$"+bn,bt="__reactProps$"+bn,qn="__reactContainer$"+bn,Na="__reactEvents$"+bn,ao="__reactListeners$"+bn,Du="__reactHandles$"+bn,io="__reactResources$"+bn,Vr="__reactMarker$"+bn;function ji(e){delete e[ct],delete e[bt],delete e[Na],delete e[ao],delete e[Du]}function lr(e){var n=e[ct];if(n)return n;for(var a=e.parentNode;a;){if(n=a[qn]||a[ct]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=Vx(e);e!==null;){if(a=e[ct])return a;e=Vx(e)}return n}e=a,a=e.parentNode}return null}function or(e){if(e=e[ct]||e[qn]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function sr(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(l(33))}function ur(e){var n=e[io];return n||(n=e[io]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function rt(e){e[Vr]=!0}var lo=new Set,oo={};function On(e,n){cr(e,n),cr(e+"Capture",n)}function cr(e,n){for(oo[e]=n,e=0;e<n.length;e++)lo.add(n[e])}var ku=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Mi={},so={};function Hu(e){return nt.call(so,e)?!0:nt.call(Mi,e)?!1:ku.test(e)?so[e]=!0:(Mi[e]=!0,!1)}function Ca(e,n,a){if(Hu(n))if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var s=n.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+a)}}function Ta(e,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+a)}}function sn(e,n,a,s){if(s===null)e.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(n,a,""+s)}}function Ct(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function uo(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Lu(e,n,a){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var h=s.get,v=s.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return h.call(this)},set:function(_){a=""+_,v.call(this,_)}}),Object.defineProperty(e,n,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(_){a=""+_},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Aa(e){if(!e._valueTracker){var n=uo(e)?"checked":"value";e._valueTracker=Lu(e,n,""+e[n])}}function co(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),s="";return e&&(s=uo(e)?e.checked?"true":"false":e.value),e=s,e!==a?(n.setValue(e),!0):!1}function Yr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Bu=/[\n"\\]/g;function Tt(e){return e.replace(Bu,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Ir(e,n,a,s,h,v,_,j){e.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.type=_:e.removeAttribute("type"),n!=null?_==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+Ct(n)):e.value!==""+Ct(n)&&(e.value=""+Ct(n)):_!=="submit"&&_!=="reset"||e.removeAttribute("value"),n!=null?Ri(e,_,Ct(n)):a!=null?Ri(e,_,Ct(a)):s!=null&&e.removeAttribute("value"),h==null&&v!=null&&(e.defaultChecked=!!v),h!=null&&(e.checked=h&&typeof h!="function"&&typeof h!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?e.name=""+Ct(j):e.removeAttribute("name")}function fo(e,n,a,s,h,v,_,j){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.type=v),n!=null||a!=null){if(!(v!=="submit"&&v!=="reset"||n!=null)){Aa(e);return}a=a!=null?""+Ct(a):"",n=n!=null?""+Ct(n):a,j||n===e.value||(e.value=n),e.defaultValue=n}s=s??h,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=j?e.checked:!!s,e.defaultChecked=!!s,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(e.name=_),Aa(e)}function Ri(e,n,a){n==="number"&&Yr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function zn(e,n,a,s){if(e=e.options,n){n={};for(var h=0;h<a.length;h++)n["$"+a[h]]=!0;for(a=0;a<e.length;a++)h=n.hasOwnProperty("$"+e[a].value),e[a].selected!==h&&(e[a].selected=h),h&&s&&(e[a].defaultSelected=!0)}else{for(a=""+Ct(a),n=null,h=0;h<e.length;h++){if(e[h].value===a){e[h].selected=!0,s&&(e[h].defaultSelected=!0);return}n!==null||e[h].disabled||(n=e[h])}n!==null&&(n.selected=!0)}}function jy(e,n,a){if(n!=null&&(n=""+Ct(n),n!==e.value&&(e.value=n),a==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=a!=null?""+Ct(a):""}function My(e,n,a,s){if(n==null){if(s!=null){if(a!=null)throw Error(l(92));if(K(s)){if(1<s.length)throw Error(l(93));s=s[0]}a=s}a==null&&(a=""),n=a}a=Ct(n),e.defaultValue=a,s=e.textContent,s===a&&s!==""&&s!==null&&(e.value=s),Aa(e)}function ja(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var dj=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Ry(e,n,a){var s=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?s?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":s?e.setProperty(n,a):typeof a!="number"||a===0||dj.has(n)?n==="float"?e.cssFloat=a:e[n]=(""+a).trim():e[n]=a+"px"}function qy(e,n,a){if(n!=null&&typeof n!="object")throw Error(l(62));if(e=e.style,a!=null){for(var s in a)!a.hasOwnProperty(s)||n!=null&&n.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var h in n)s=n[h],n.hasOwnProperty(h)&&a[h]!==s&&Ry(e,h,s)}else for(var v in n)n.hasOwnProperty(v)&&Ry(e,v,n[v])}function Uu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var hj=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),gj=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ho(e){return gj.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Dn(){}var Gu=null;function Vu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ma=null,Ra=null;function Oy(e){var n=or(e);if(n&&(e=n.stateNode)){var a=e[bt]||null;e:switch(e=n.stateNode,n.type){case"input":if(Ir(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Tt(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var s=a[n];if(s!==e&&s.form===e.form){var h=s[bt]||null;if(!h)throw Error(l(90));Ir(s,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(n=0;n<a.length;n++)s=a[n],s.form===e.form&&co(s)}break e;case"textarea":jy(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&zn(e,!!a.multiple,n,!1)}}}var Yu=!1;function zy(e,n,a){if(Yu)return e(n,a);Yu=!0;try{var s=e(n);return s}finally{if(Yu=!1,(Ma!==null||Ra!==null)&&(es(),Ma&&(n=Ma,e=Ra,Ra=Ma=null,Oy(n),e)))for(n=0;n<e.length;n++)Oy(e[n])}}function qi(e,n){var a=e.stateNode;if(a===null)return null;var s=a[bt]||null;if(s===null)return null;a=s[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(l(231,n,typeof a));return a}var kn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Iu=!1;if(kn)try{var Oi={};Object.defineProperty(Oi,"passive",{get:function(){Iu=!0}}),window.addEventListener("test",Oi,Oi),window.removeEventListener("test",Oi,Oi)}catch{Iu=!1}var fr=null,Xu=null,go=null;function Dy(){if(go)return go;var e,n=Xu,a=n.length,s,h="value"in fr?fr.value:fr.textContent,v=h.length;for(e=0;e<a&&n[e]===h[e];e++);var _=a-e;for(s=1;s<=_&&n[a-s]===h[v-s];s++);return go=h.slice(e,1<s?1-s:void 0)}function vo(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function mo(){return!0}function ky(){return!1}function At(e){function n(a,s,h,v,_){this._reactName=a,this._targetInst=h,this.type=s,this.nativeEvent=v,this.target=_,this.currentTarget=null;for(var j in e)e.hasOwnProperty(j)&&(a=e[j],this[j]=a?a(v):v[j]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?mo:ky,this.isPropagationStopped=ky,this}return p(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=mo)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=mo)},persist:function(){},isPersistent:mo}),n}var Xr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},po=At(Xr),zi=p({},Xr,{view:0,detail:0}),vj=At(zi),Zu,Fu,Di,yo=p({},zi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qu,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!==Di&&(Di&&e.type==="mousemove"?(Zu=e.screenX-Di.screenX,Fu=e.screenY-Di.screenY):Fu=Zu=0,Di=e),Zu)},movementY:function(e){return"movementY"in e?e.movementY:Fu}}),Hy=At(yo),mj=p({},yo,{dataTransfer:0}),pj=At(mj),yj=p({},zi,{relatedTarget:0}),Ku=At(yj),xj=p({},Xr,{animationName:0,elapsedTime:0,pseudoElement:0}),bj=At(xj),_j=p({},Xr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),wj=At(_j),Sj=p({},Xr,{data:0}),Ly=At(Sj),Ej={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nj={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"},Cj={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Tj(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Cj[e])?!!n[e]:!1}function Qu(){return Tj}var Aj=p({},zi,{key:function(e){if(e.key){var n=Ej[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=vo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Nj[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qu,charCode:function(e){return e.type==="keypress"?vo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?vo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),jj=At(Aj),Mj=p({},yo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),By=At(Mj),Rj=p({},zi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qu}),qj=At(Rj),Oj=p({},Xr,{propertyName:0,elapsedTime:0,pseudoElement:0}),zj=At(Oj),Dj=p({},yo,{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}),kj=At(Dj),Hj=p({},Xr,{newState:0,oldState:0}),Lj=At(Hj),Bj=[9,13,27,32],$u=kn&&"CompositionEvent"in window,ki=null;kn&&"documentMode"in document&&(ki=document.documentMode);var Uj=kn&&"TextEvent"in window&&!ki,Uy=kn&&(!$u||ki&&8<ki&&11>=ki),Gy=" ",Vy=!1;function Yy(e,n){switch(e){case"keyup":return Bj.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Iy(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qa=!1;function Gj(e,n){switch(e){case"compositionend":return Iy(n);case"keypress":return n.which!==32?null:(Vy=!0,Gy);case"textInput":return e=n.data,e===Gy&&Vy?null:e;default:return null}}function Vj(e,n){if(qa)return e==="compositionend"||!$u&&Yy(e,n)?(e=Dy(),go=Xu=fr=null,qa=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Uy&&n.locale!=="ko"?null:n.data;default:return null}}var Yj={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 Xy(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Yj[e.type]:n==="textarea"}function Zy(e,n,a,s){Ma?Ra?Ra.push(s):Ra=[s]:Ma=s,n=os(n,"onChange"),0<n.length&&(a=new po("onChange","change",null,a,s),e.push({event:a,listeners:n}))}var Hi=null,Li=null;function Ij(e){Ax(e,0)}function xo(e){var n=sr(e);if(co(n))return e}function Fy(e,n){if(e==="change")return n}var Ky=!1;if(kn){var Pu;if(kn){var Ju="oninput"in document;if(!Ju){var Qy=document.createElement("div");Qy.setAttribute("oninput","return;"),Ju=typeof Qy.oninput=="function"}Pu=Ju}else Pu=!1;Ky=Pu&&(!document.documentMode||9<document.documentMode)}function $y(){Hi&&(Hi.detachEvent("onpropertychange",Py),Li=Hi=null)}function Py(e){if(e.propertyName==="value"&&xo(Li)){var n=[];Zy(n,Li,e,Vu(e)),zy(Ij,n)}}function Xj(e,n,a){e==="focusin"?($y(),Hi=n,Li=a,Hi.attachEvent("onpropertychange",Py)):e==="focusout"&&$y()}function Zj(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return xo(Li)}function Fj(e,n){if(e==="click")return xo(n)}function Kj(e,n){if(e==="input"||e==="change")return xo(n)}function Qj(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Lt=typeof Object.is=="function"?Object.is:Qj;function Bi(e,n){if(Lt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var a=Object.keys(e),s=Object.keys(n);if(a.length!==s.length)return!1;for(s=0;s<a.length;s++){var h=a[s];if(!nt.call(n,h)||!Lt(e[h],n[h]))return!1}return!0}function Jy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wy(e,n){var a=Jy(e);e=0;for(var s;a;){if(a.nodeType===3){if(s=e+a.textContent.length,e<=n&&s>=n)return{node:a,offset:n-e};e=s}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Jy(a)}}function e0(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?e0(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function t0(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Yr(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=Yr(e.document)}return n}function Wu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var $j=kn&&"documentMode"in document&&11>=document.documentMode,Oa=null,ec=null,Ui=null,tc=!1;function n0(e,n,a){var s=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;tc||Oa==null||Oa!==Yr(s)||(s=Oa,"selectionStart"in s&&Wu(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Ui&&Bi(Ui,s)||(Ui=s,s=os(ec,"onSelect"),0<s.length&&(n=new po("onSelect","select",null,n,a),e.push({event:n,listeners:s}),n.target=Oa)))}function Zr(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var za={animationend:Zr("Animation","AnimationEnd"),animationiteration:Zr("Animation","AnimationIteration"),animationstart:Zr("Animation","AnimationStart"),transitionrun:Zr("Transition","TransitionRun"),transitionstart:Zr("Transition","TransitionStart"),transitioncancel:Zr("Transition","TransitionCancel"),transitionend:Zr("Transition","TransitionEnd")},nc={},r0={};kn&&(r0=document.createElement("div").style,"AnimationEvent"in window||(delete za.animationend.animation,delete za.animationiteration.animation,delete za.animationstart.animation),"TransitionEvent"in window||delete za.transitionend.transition);function Fr(e){if(nc[e])return nc[e];if(!za[e])return e;var n=za[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in r0)return nc[e]=n[a];return e}var a0=Fr("animationend"),i0=Fr("animationiteration"),l0=Fr("animationstart"),Pj=Fr("transitionrun"),Jj=Fr("transitionstart"),Wj=Fr("transitioncancel"),o0=Fr("transitionend"),s0=new Map,rc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");rc.push("scrollEnd");function un(e,n){s0.set(e,n),On(n,[e])}var bo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Kt=[],Da=0,ac=0;function _o(){for(var e=Da,n=ac=Da=0;n<e;){var a=Kt[n];Kt[n++]=null;var s=Kt[n];Kt[n++]=null;var h=Kt[n];Kt[n++]=null;var v=Kt[n];if(Kt[n++]=null,s!==null&&h!==null){var _=s.pending;_===null?h.next=h:(h.next=_.next,_.next=h),s.pending=h}v!==0&&u0(a,h,v)}}function wo(e,n,a,s){Kt[Da++]=e,Kt[Da++]=n,Kt[Da++]=a,Kt[Da++]=s,ac|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function ic(e,n,a,s){return wo(e,n,a,s),So(e)}function Kr(e,n){return wo(e,null,null,n),So(e)}function u0(e,n,a){e.lanes|=a;var s=e.alternate;s!==null&&(s.lanes|=a);for(var h=!1,v=e.return;v!==null;)v.childLanes|=a,s=v.alternate,s!==null&&(s.childLanes|=a),v.tag===22&&(e=v.stateNode,e===null||e._visibility&1||(h=!0)),e=v,v=v.return;return e.tag===3?(v=e.stateNode,h&&n!==null&&(h=31-wt(a),e=v.hiddenUpdates,s=e[h],s===null?e[h]=[n]:s.push(n),n.lane=a|536870912),v):null}function So(e){if(50<sl)throw sl=0,vf=null,Error(l(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var ka={};function e3(e,n,a,s){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bt(e,n,a,s){return new e3(e,n,a,s)}function lc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Hn(e,n){var a=e.alternate;return a===null?(a=Bt(e.tag,n,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=n,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,n=e.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function c0(e,n){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,n=a.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Eo(e,n,a,s,h,v){var _=0;if(s=e,typeof e=="function")lc(e)&&(_=1);else if(typeof e=="string")_=iM(e,a,k.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case H:return e=Bt(31,a,n,h),e.elementType=H,e.lanes=v,e;case N:return Qr(a.children,h,v,n);case E:_=8,h|=24;break;case C:return e=Bt(12,a,n,h|2),e.elementType=C,e.lanes=v,e;case q:return e=Bt(13,a,n,h),e.elementType=q,e.lanes=v,e;case R:return e=Bt(19,a,n,h),e.elementType=R,e.lanes=v,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case w:_=10;break e;case A:_=9;break e;case T:_=11;break e;case M:_=14;break e;case L:_=16,s=null;break e}_=29,a=Error(l(130,e===null?"null":typeof e,"")),s=null}return n=Bt(_,a,n,h),n.elementType=e,n.type=s,n.lanes=v,n}function Qr(e,n,a,s){return e=Bt(7,e,s,n),e.lanes=a,e}function oc(e,n,a){return e=Bt(6,e,null,n),e.lanes=a,e}function f0(e){var n=Bt(18,null,null,0);return n.stateNode=e,n}function sc(e,n,a){return n=Bt(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var d0=new WeakMap;function Qt(e,n){if(typeof e=="object"&&e!==null){var a=d0.get(e);return a!==void 0?a:(n={value:e,source:n,stack:dt(n)},d0.set(e,n),n)}return{value:e,source:n,stack:dt(n)}}var Ha=[],La=0,No=null,Gi=0,$t=[],Pt=0,dr=null,_n=1,wn="";function Ln(e,n){Ha[La++]=Gi,Ha[La++]=No,No=e,Gi=n}function h0(e,n,a){$t[Pt++]=_n,$t[Pt++]=wn,$t[Pt++]=dr,dr=e;var s=_n;e=wn;var h=32-wt(s)-1;s&=~(1<<h),a+=1;var v=32-wt(n)+h;if(30<v){var _=h-h%5;v=(s&(1<<_)-1).toString(32),s>>=_,h-=_,_n=1<<32-wt(n)+h|a<<h|s,wn=v+e}else _n=1<<v|a<<h|s,wn=e}function uc(e){e.return!==null&&(Ln(e,1),h0(e,1,0))}function cc(e){for(;e===No;)No=Ha[--La],Ha[La]=null,Gi=Ha[--La],Ha[La]=null;for(;e===dr;)dr=$t[--Pt],$t[Pt]=null,wn=$t[--Pt],$t[Pt]=null,_n=$t[--Pt],$t[Pt]=null}function g0(e,n){$t[Pt++]=_n,$t[Pt++]=wn,$t[Pt++]=dr,_n=n.id,wn=n.overflow,dr=e}var gt=null,Ye=null,qe=!1,hr=null,Jt=!1,fc=Error(l(519));function gr(e){var n=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Vi(Qt(n,e)),fc}function v0(e){var n=e.stateNode,a=e.type,s=e.memoizedProps;switch(n[ct]=e,n[bt]=s,a){case"dialog":je("cancel",n),je("close",n);break;case"iframe":case"object":case"embed":je("load",n);break;case"video":case"audio":for(a=0;a<cl.length;a++)je(cl[a],n);break;case"source":je("error",n);break;case"img":case"image":case"link":je("error",n),je("load",n);break;case"details":je("toggle",n);break;case"input":je("invalid",n),fo(n,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":je("invalid",n);break;case"textarea":je("invalid",n),My(n,s.value,s.defaultValue,s.children)}a=s.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||s.suppressHydrationWarning===!0||qx(n.textContent,a)?(s.popover!=null&&(je("beforetoggle",n),je("toggle",n)),s.onScroll!=null&&je("scroll",n),s.onScrollEnd!=null&&je("scrollend",n),s.onClick!=null&&(n.onclick=Dn),n=!0):n=!1,n||gr(e,!0)}function m0(e){for(gt=e.return;gt;)switch(gt.tag){case 5:case 31:case 13:Jt=!1;return;case 27:case 3:Jt=!0;return;default:gt=gt.return}}function Ba(e){if(e!==gt)return!1;if(!qe)return m0(e),qe=!0,!1;var n=e.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Mf(e.type,e.memoizedProps)),a=!a),a&&Ye&&gr(e),m0(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Ye=Gx(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Ye=Gx(e)}else n===27?(n=Ye,Ar(e.type)?(e=Df,Df=null,Ye=e):Ye=n):Ye=gt?en(e.stateNode.nextSibling):null;return!0}function $r(){Ye=gt=null,qe=!1}function dc(){var e=hr;return e!==null&&(qt===null?qt=e:qt.push.apply(qt,e),hr=null),e}function Vi(e){hr===null?hr=[e]:hr.push(e)}var hc=z(null),Pr=null,Bn=null;function vr(e,n,a){ae(hc,n._currentValue),n._currentValue=a}function Un(e){e._currentValue=hc.current,Y(hc)}function gc(e,n,a){for(;e!==null;){var s=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,s!==null&&(s.childLanes|=n)):s!==null&&(s.childLanes&n)!==n&&(s.childLanes|=n),e===a)break;e=e.return}}function vc(e,n,a,s){var h=e.child;for(h!==null&&(h.return=e);h!==null;){var v=h.dependencies;if(v!==null){var _=h.child;v=v.firstContext;e:for(;v!==null;){var j=v;v=h;for(var U=0;U<n.length;U++)if(j.context===n[U]){v.lanes|=a,j=v.alternate,j!==null&&(j.lanes|=a),gc(v.return,a,e),s||(_=null);break e}v=j.next}}else if(h.tag===18){if(_=h.return,_===null)throw Error(l(341));_.lanes|=a,v=_.alternate,v!==null&&(v.lanes|=a),gc(_,a,e),_=null}else _=h.child;if(_!==null)_.return=h;else for(_=h;_!==null;){if(_===e){_=null;break}if(h=_.sibling,h!==null){h.return=_.return,_=h;break}_=_.return}h=_}}function Ua(e,n,a,s){e=null;for(var h=n,v=!1;h!==null;){if(!v){if((h.flags&524288)!==0)v=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var _=h.alternate;if(_===null)throw Error(l(387));if(_=_.memoizedProps,_!==null){var j=h.type;Lt(h.pendingProps.value,_.value)||(e!==null?e.push(j):e=[j])}}else if(h===ne.current){if(_=h.alternate,_===null)throw Error(l(387));_.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(e!==null?e.push(vl):e=[vl])}h=h.return}e!==null&&vc(n,e,a,s),n.flags|=262144}function Co(e){for(e=e.firstContext;e!==null;){if(!Lt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Jr(e){Pr=e,Bn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function vt(e){return p0(Pr,e)}function To(e,n){return Pr===null&&Jr(e),p0(e,n)}function p0(e,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},Bn===null){if(e===null)throw Error(l(308));Bn=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Bn=Bn.next=n;return a}var t3=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(a,s){e.push(s)}};this.abort=function(){n.aborted=!0,e.forEach(function(a){return a()})}},n3=t.unstable_scheduleCallback,r3=t.unstable_NormalPriority,at={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function mc(){return{controller:new t3,data:new Map,refCount:0}}function Yi(e){e.refCount--,e.refCount===0&&n3(r3,function(){e.controller.abort()})}var Ii=null,pc=0,Ga=0,Va=null;function a3(e,n){if(Ii===null){var a=Ii=[];pc=0,Ga=_f(),Va={status:"pending",value:void 0,then:function(s){a.push(s)}}}return pc++,n.then(y0,y0),n}function y0(){if(--pc===0&&Ii!==null){Va!==null&&(Va.status="fulfilled");var e=Ii;Ii=null,Ga=0,Va=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function i3(e,n){var a=[],s={status:"pending",value:null,reason:null,then:function(h){a.push(h)}};return e.then(function(){s.status="fulfilled",s.value=n;for(var h=0;h<a.length;h++)(0,a[h])(n)},function(h){for(s.status="rejected",s.reason=h,h=0;h<a.length;h++)(0,a[h])(void 0)}),s}var x0=O.S;O.S=function(e,n){nx=Pe(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&a3(e,n),x0!==null&&x0(e,n)};var Wr=z(null);function yc(){var e=Wr.current;return e!==null?e:Ve.pooledCache}function Ao(e,n){n===null?ae(Wr,Wr.current):ae(Wr,n.pool)}function b0(){var e=yc();return e===null?null:{parent:at._currentValue,pool:e}}var Ya=Error(l(460)),xc=Error(l(474)),jo=Error(l(542)),Mo={then:function(){}};function _0(e){return e=e.status,e==="fulfilled"||e==="rejected"}function w0(e,n,a){switch(a=e[a],a===void 0?e.push(n):a!==n&&(n.then(Dn,Dn),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,E0(e),e;default:if(typeof n.status=="string")n.then(Dn,Dn);else{if(e=Ve,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=n,e.status="pending",e.then(function(s){if(n.status==="pending"){var h=n;h.status="fulfilled",h.value=s}},function(s){if(n.status==="pending"){var h=n;h.status="rejected",h.reason=s}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,E0(e),e}throw ta=n,Ya}}function ea(e){try{var n=e._init;return n(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ta=a,Ya):a}}var ta=null;function S0(){if(ta===null)throw Error(l(459));var e=ta;return ta=null,e}function E0(e){if(e===Ya||e===jo)throw Error(l(483))}var Ia=null,Xi=0;function Ro(e){var n=Xi;return Xi+=1,Ia===null&&(Ia=[]),w0(Ia,e,n)}function Zi(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function qo(e,n){throw n.$$typeof===y?Error(l(525)):(e=Object.prototype.toString.call(n),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function N0(e){function n($,Z){if(e){var ee=$.deletions;ee===null?($.deletions=[Z],$.flags|=16):ee.push(Z)}}function a($,Z){if(!e)return null;for(;Z!==null;)n($,Z),Z=Z.sibling;return null}function s($){for(var Z=new Map;$!==null;)$.key!==null?Z.set($.key,$):Z.set($.index,$),$=$.sibling;return Z}function h($,Z){return $=Hn($,Z),$.index=0,$.sibling=null,$}function v($,Z,ee){return $.index=ee,e?(ee=$.alternate,ee!==null?(ee=ee.index,ee<Z?($.flags|=67108866,Z):ee):($.flags|=67108866,Z)):($.flags|=1048576,Z)}function _($){return e&&$.alternate===null&&($.flags|=67108866),$}function j($,Z,ee,ue){return Z===null||Z.tag!==6?(Z=oc(ee,$.mode,ue),Z.return=$,Z):(Z=h(Z,ee),Z.return=$,Z)}function U($,Z,ee,ue){var be=ee.type;return be===N?se($,Z,ee.props.children,ue,ee.key):Z!==null&&(Z.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===L&&ea(be)===Z.type)?(Z=h(Z,ee.props),Zi(Z,ee),Z.return=$,Z):(Z=Eo(ee.type,ee.key,ee.props,null,$.mode,ue),Zi(Z,ee),Z.return=$,Z)}function te($,Z,ee,ue){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==ee.containerInfo||Z.stateNode.implementation!==ee.implementation?(Z=sc(ee,$.mode,ue),Z.return=$,Z):(Z=h(Z,ee.children||[]),Z.return=$,Z)}function se($,Z,ee,ue,be){return Z===null||Z.tag!==7?(Z=Qr(ee,$.mode,ue,be),Z.return=$,Z):(Z=h(Z,ee),Z.return=$,Z)}function ce($,Z,ee){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=oc(""+Z,$.mode,ee),Z.return=$,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case b:return ee=Eo(Z.type,Z.key,Z.props,null,$.mode,ee),Zi(ee,Z),ee.return=$,ee;case S:return Z=sc(Z,$.mode,ee),Z.return=$,Z;case L:return Z=ea(Z),ce($,Z,ee)}if(K(Z)||F(Z))return Z=Qr(Z,$.mode,ee,null),Z.return=$,Z;if(typeof Z.then=="function")return ce($,Ro(Z),ee);if(Z.$$typeof===w)return ce($,To($,Z),ee);qo($,Z)}return null}function re($,Z,ee,ue){var be=Z!==null?Z.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return be!==null?null:j($,Z,""+ee,ue);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case b:return ee.key===be?U($,Z,ee,ue):null;case S:return ee.key===be?te($,Z,ee,ue):null;case L:return ee=ea(ee),re($,Z,ee,ue)}if(K(ee)||F(ee))return be!==null?null:se($,Z,ee,ue,null);if(typeof ee.then=="function")return re($,Z,Ro(ee),ue);if(ee.$$typeof===w)return re($,Z,To($,ee),ue);qo($,ee)}return null}function ie($,Z,ee,ue,be){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return $=$.get(ee)||null,j(Z,$,""+ue,be);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case b:return $=$.get(ue.key===null?ee:ue.key)||null,U(Z,$,ue,be);case S:return $=$.get(ue.key===null?ee:ue.key)||null,te(Z,$,ue,be);case L:return ue=ea(ue),ie($,Z,ee,ue,be)}if(K(ue)||F(ue))return $=$.get(ee)||null,se(Z,$,ue,be,null);if(typeof ue.then=="function")return ie($,Z,ee,Ro(ue),be);if(ue.$$typeof===w)return ie($,Z,ee,To(Z,ue),be);qo(Z,ue)}return null}function de($,Z,ee,ue){for(var be=null,ze=null,me=Z,Ce=Z=0,Re=null;me!==null&&Ce<ee.length;Ce++){me.index>Ce?(Re=me,me=null):Re=me.sibling;var De=re($,me,ee[Ce],ue);if(De===null){me===null&&(me=Re);break}e&&me&&De.alternate===null&&n($,me),Z=v(De,Z,Ce),ze===null?be=De:ze.sibling=De,ze=De,me=Re}if(Ce===ee.length)return a($,me),qe&&Ln($,Ce),be;if(me===null){for(;Ce<ee.length;Ce++)me=ce($,ee[Ce],ue),me!==null&&(Z=v(me,Z,Ce),ze===null?be=me:ze.sibling=me,ze=me);return qe&&Ln($,Ce),be}for(me=s(me);Ce<ee.length;Ce++)Re=ie(me,$,Ce,ee[Ce],ue),Re!==null&&(e&&Re.alternate!==null&&me.delete(Re.key===null?Ce:Re.key),Z=v(Re,Z,Ce),ze===null?be=Re:ze.sibling=Re,ze=Re);return e&&me.forEach(function(Or){return n($,Or)}),qe&&Ln($,Ce),be}function Se($,Z,ee,ue){if(ee==null)throw Error(l(151));for(var be=null,ze=null,me=Z,Ce=Z=0,Re=null,De=ee.next();me!==null&&!De.done;Ce++,De=ee.next()){me.index>Ce?(Re=me,me=null):Re=me.sibling;var Or=re($,me,De.value,ue);if(Or===null){me===null&&(me=Re);break}e&&me&&Or.alternate===null&&n($,me),Z=v(Or,Z,Ce),ze===null?be=Or:ze.sibling=Or,ze=Or,me=Re}if(De.done)return a($,me),qe&&Ln($,Ce),be;if(me===null){for(;!De.done;Ce++,De=ee.next())De=ce($,De.value,ue),De!==null&&(Z=v(De,Z,Ce),ze===null?be=De:ze.sibling=De,ze=De);return qe&&Ln($,Ce),be}for(me=s(me);!De.done;Ce++,De=ee.next())De=ie(me,$,Ce,De.value,ue),De!==null&&(e&&De.alternate!==null&&me.delete(De.key===null?Ce:De.key),Z=v(De,Z,Ce),ze===null?be=De:ze.sibling=De,ze=De);return e&&me.forEach(function(mM){return n($,mM)}),qe&&Ln($,Ce),be}function Ge($,Z,ee,ue){if(typeof ee=="object"&&ee!==null&&ee.type===N&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case b:e:{for(var be=ee.key;Z!==null;){if(Z.key===be){if(be=ee.type,be===N){if(Z.tag===7){a($,Z.sibling),ue=h(Z,ee.props.children),ue.return=$,$=ue;break e}}else if(Z.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===L&&ea(be)===Z.type){a($,Z.sibling),ue=h(Z,ee.props),Zi(ue,ee),ue.return=$,$=ue;break e}a($,Z);break}else n($,Z);Z=Z.sibling}ee.type===N?(ue=Qr(ee.props.children,$.mode,ue,ee.key),ue.return=$,$=ue):(ue=Eo(ee.type,ee.key,ee.props,null,$.mode,ue),Zi(ue,ee),ue.return=$,$=ue)}return _($);case S:e:{for(be=ee.key;Z!==null;){if(Z.key===be)if(Z.tag===4&&Z.stateNode.containerInfo===ee.containerInfo&&Z.stateNode.implementation===ee.implementation){a($,Z.sibling),ue=h(Z,ee.children||[]),ue.return=$,$=ue;break e}else{a($,Z);break}else n($,Z);Z=Z.sibling}ue=sc(ee,$.mode,ue),ue.return=$,$=ue}return _($);case L:return ee=ea(ee),Ge($,Z,ee,ue)}if(K(ee))return de($,Z,ee,ue);if(F(ee)){if(be=F(ee),typeof be!="function")throw Error(l(150));return ee=be.call(ee),Se($,Z,ee,ue)}if(typeof ee.then=="function")return Ge($,Z,Ro(ee),ue);if(ee.$$typeof===w)return Ge($,Z,To($,ee),ue);qo($,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint"?(ee=""+ee,Z!==null&&Z.tag===6?(a($,Z.sibling),ue=h(Z,ee),ue.return=$,$=ue):(a($,Z),ue=oc(ee,$.mode,ue),ue.return=$,$=ue),_($)):a($,Z)}return function($,Z,ee,ue){try{Xi=0;var be=Ge($,Z,ee,ue);return Ia=null,be}catch(me){if(me===Ya||me===jo)throw me;var ze=Bt(29,me,null,$.mode);return ze.lanes=ue,ze.return=$,ze}}}var na=N0(!0),C0=N0(!1),mr=!1;function bc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _c(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function pr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function yr(e,n,a){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(ke&2)!==0){var h=s.pending;return h===null?n.next=n:(n.next=h.next,h.next=n),s.pending=n,n=So(e),u0(e,null,a),n}return wo(e,s,n,a),So(e)}function Fi(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var s=n.lanes;s&=e.pendingLanes,a|=s,n.lanes=a,eo(e,a)}}function wc(e,n){var a=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,a===s)){var h=null,v=null;if(a=a.firstBaseUpdate,a!==null){do{var _={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};v===null?h=v=_:v=v.next=_,a=a.next}while(a!==null);v===null?h=v=n:v=v.next=n}else h=v=n;a={baseState:s.baseState,firstBaseUpdate:h,lastBaseUpdate:v,shared:s.shared,callbacks:s.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var Sc=!1;function Ki(){if(Sc){var e=Va;if(e!==null)throw e}}function Qi(e,n,a,s){Sc=!1;var h=e.updateQueue;mr=!1;var v=h.firstBaseUpdate,_=h.lastBaseUpdate,j=h.shared.pending;if(j!==null){h.shared.pending=null;var U=j,te=U.next;U.next=null,_===null?v=te:_.next=te,_=U;var se=e.alternate;se!==null&&(se=se.updateQueue,j=se.lastBaseUpdate,j!==_&&(j===null?se.firstBaseUpdate=te:j.next=te,se.lastBaseUpdate=U))}if(v!==null){var ce=h.baseState;_=0,se=te=U=null,j=v;do{var re=j.lane&-536870913,ie=re!==j.lane;if(ie?(Me&re)===re:(s&re)===re){re!==0&&re===Ga&&(Sc=!0),se!==null&&(se=se.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var de=e,Se=j;re=n;var Ge=a;switch(Se.tag){case 1:if(de=Se.payload,typeof de=="function"){ce=de.call(Ge,ce,re);break e}ce=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=Se.payload,re=typeof de=="function"?de.call(Ge,ce,re):de,re==null)break e;ce=p({},ce,re);break e;case 2:mr=!0}}re=j.callback,re!==null&&(e.flags|=64,ie&&(e.flags|=8192),ie=h.callbacks,ie===null?h.callbacks=[re]:ie.push(re))}else ie={lane:re,tag:j.tag,payload:j.payload,callback:j.callback,next:null},se===null?(te=se=ie,U=ce):se=se.next=ie,_|=re;if(j=j.next,j===null){if(j=h.shared.pending,j===null)break;ie=j,j=ie.next,ie.next=null,h.lastBaseUpdate=ie,h.shared.pending=null}}while(!0);se===null&&(U=ce),h.baseState=U,h.firstBaseUpdate=te,h.lastBaseUpdate=se,v===null&&(h.shared.lanes=0),Sr|=_,e.lanes=_,e.memoizedState=ce}}function T0(e,n){if(typeof e!="function")throw Error(l(191,e));e.call(n)}function A0(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)T0(a[e],n)}var Xa=z(null),Oo=z(0);function j0(e,n){e=Qn,ae(Oo,e),ae(Xa,n),Qn=e|n.baseLanes}function Ec(){ae(Oo,Qn),ae(Xa,Xa.current)}function Nc(){Qn=Oo.current,Y(Xa),Y(Oo)}var Ut=z(null),Wt=null;function xr(e){var n=e.alternate;ae(et,et.current&1),ae(Ut,e),Wt===null&&(n===null||Xa.current!==null||n.memoizedState!==null)&&(Wt=e)}function Cc(e){ae(et,et.current),ae(Ut,e),Wt===null&&(Wt=e)}function M0(e){e.tag===22?(ae(et,et.current),ae(Ut,e),Wt===null&&(Wt=e)):br()}function br(){ae(et,et.current),ae(Ut,Ut.current)}function Gt(e){Y(Ut),Wt===e&&(Wt=null),Y(et)}var et=z(0);function zo(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Of(a)||zf(a)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Gn=0,Ne=null,Be=null,it=null,Do=!1,Za=!1,ra=!1,ko=0,$i=0,Fa=null,l3=0;function Je(){throw Error(l(321))}function Tc(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!Lt(e[a],n[a]))return!1;return!0}function Ac(e,n,a,s,h,v){return Gn=v,Ne=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,O.H=e===null||e.memoizedState===null?h1:Yc,ra=!1,v=a(s,h),ra=!1,Za&&(v=q0(n,a,s,h)),R0(e),v}function R0(e){O.H=Wi;var n=Be!==null&&Be.next!==null;if(Gn=0,it=Be=Ne=null,Do=!1,$i=0,Fa=null,n)throw Error(l(300));e===null||lt||(e=e.dependencies,e!==null&&Co(e)&&(lt=!0))}function q0(e,n,a,s){Ne=e;var h=0;do{if(Za&&(Fa=null),$i=0,Za=!1,25<=h)throw Error(l(301));if(h+=1,it=Be=null,e.updateQueue!=null){var v=e.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}O.H=g1,v=n(a,s)}while(Za);return v}function o3(){var e=O.H,n=e.useState()[0];return n=typeof n.then=="function"?Pi(n):n,e=e.useState()[0],(Be!==null?Be.memoizedState:null)!==e&&(Ne.flags|=1024),n}function jc(){var e=ko!==0;return ko=0,e}function Mc(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function Rc(e){if(Do){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Do=!1}Gn=0,it=Be=Ne=null,Za=!1,$i=ko=0,Fa=null}function St(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return it===null?Ne.memoizedState=it=e:it=it.next=e,it}function tt(){if(Be===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=Be.next;var n=it===null?Ne.memoizedState:it.next;if(n!==null)it=n,Be=e;else{if(e===null)throw Ne.alternate===null?Error(l(467)):Error(l(310));Be=e,e={memoizedState:Be.memoizedState,baseState:Be.baseState,baseQueue:Be.baseQueue,queue:Be.queue,next:null},it===null?Ne.memoizedState=it=e:it=it.next=e}return it}function Ho(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Pi(e){var n=$i;return $i+=1,Fa===null&&(Fa=[]),e=w0(Fa,e,n),n=Ne,(it===null?n.memoizedState:it.next)===null&&(n=n.alternate,O.H=n===null||n.memoizedState===null?h1:Yc),e}function Lo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Pi(e);if(e.$$typeof===w)return vt(e)}throw Error(l(438,String(e)))}function qc(e){var n=null,a=Ne.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var s=Ne.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(n={data:s.data.map(function(h){return h.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=Ho(),Ne.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(e),s=0;s<e;s++)a[s]=Q;return n.index++,a}function Vn(e,n){return typeof n=="function"?n(e):n}function Bo(e){var n=tt();return Oc(n,Be,e)}function Oc(e,n,a){var s=e.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=a;var h=e.baseQueue,v=s.pending;if(v!==null){if(h!==null){var _=h.next;h.next=v.next,v.next=_}n.baseQueue=h=v,s.pending=null}if(v=e.baseState,h===null)e.memoizedState=v;else{n=h.next;var j=_=null,U=null,te=n,se=!1;do{var ce=te.lane&-536870913;if(ce!==te.lane?(Me&ce)===ce:(Gn&ce)===ce){var re=te.revertLane;if(re===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),ce===Ga&&(se=!0);else if((Gn&re)===re){te=te.next,re===Ga&&(se=!0);continue}else ce={lane:0,revertLane:te.revertLane,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},U===null?(j=U=ce,_=v):U=U.next=ce,Ne.lanes|=re,Sr|=re;ce=te.action,ra&&a(v,ce),v=te.hasEagerState?te.eagerState:a(v,ce)}else re={lane:ce,revertLane:te.revertLane,gesture:te.gesture,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},U===null?(j=U=re,_=v):U=U.next=re,Ne.lanes|=ce,Sr|=ce;te=te.next}while(te!==null&&te!==n);if(U===null?_=v:U.next=j,!Lt(v,e.memoizedState)&&(lt=!0,se&&(a=Va,a!==null)))throw a;e.memoizedState=v,e.baseState=_,e.baseQueue=U,s.lastRenderedState=v}return h===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function zc(e){var n=tt(),a=n.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=e;var s=a.dispatch,h=a.pending,v=n.memoizedState;if(h!==null){a.pending=null;var _=h=h.next;do v=e(v,_.action),_=_.next;while(_!==h);Lt(v,n.memoizedState)||(lt=!0),n.memoizedState=v,n.baseQueue===null&&(n.baseState=v),a.lastRenderedState=v}return[v,s]}function O0(e,n,a){var s=Ne,h=tt(),v=qe;if(v){if(a===void 0)throw Error(l(407));a=a()}else a=n();var _=!Lt((Be||h).memoizedState,a);if(_&&(h.memoizedState=a,lt=!0),h=h.queue,Hc(k0.bind(null,s,h,e),[e]),h.getSnapshot!==n||_||it!==null&&it.memoizedState.tag&1){if(s.flags|=2048,Ka(9,{destroy:void 0},D0.bind(null,s,h,a,n),null),Ve===null)throw Error(l(349));v||(Gn&127)!==0||z0(s,n,a)}return a}function z0(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=Ne.updateQueue,n===null?(n=Ho(),Ne.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function D0(e,n,a,s){n.value=a,n.getSnapshot=s,H0(n)&&L0(e)}function k0(e,n,a){return a(function(){H0(n)&&L0(e)})}function H0(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!Lt(e,a)}catch{return!0}}function L0(e){var n=Kr(e,2);n!==null&&Ot(n,e,2)}function Dc(e){var n=St();if(typeof e=="function"){var a=e;if(e=a(),ra){xn(!0);try{a()}finally{xn(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:e},n}function B0(e,n,a,s){return e.baseState=a,Oc(e,Be,typeof s=="function"?s:Vn)}function s3(e,n,a,s,h){if(Vo(e))throw Error(l(485));if(e=n.action,e!==null){var v={payload:h,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){v.listeners.push(_)}};O.T!==null?a(!0):v.isTransition=!1,s(v),a=n.pending,a===null?(v.next=n.pending=v,U0(n,v)):(v.next=a.next,n.pending=a.next=v)}}function U0(e,n){var a=n.action,s=n.payload,h=e.state;if(n.isTransition){var v=O.T,_={};O.T=_;try{var j=a(h,s),U=O.S;U!==null&&U(_,j),G0(e,n,j)}catch(te){kc(e,n,te)}finally{v!==null&&_.types!==null&&(v.types=_.types),O.T=v}}else try{v=a(h,s),G0(e,n,v)}catch(te){kc(e,n,te)}}function G0(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(s){V0(e,n,s)},function(s){return kc(e,n,s)}):V0(e,n,a)}function V0(e,n,a){n.status="fulfilled",n.value=a,Y0(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,U0(e,a)))}function kc(e,n,a){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do n.status="rejected",n.reason=a,Y0(n),n=n.next;while(n!==s)}e.action=null}function Y0(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function I0(e,n){return n}function X0(e,n){if(qe){var a=Ve.formState;if(a!==null){e:{var s=Ne;if(qe){if(Ye){t:{for(var h=Ye,v=Jt;h.nodeType!==8;){if(!v){h=null;break t}if(h=en(h.nextSibling),h===null){h=null;break t}}v=h.data,h=v==="F!"||v==="F"?h:null}if(h){Ye=en(h.nextSibling),s=h.data==="F!";break e}}gr(s)}s=!1}s&&(n=a[0])}}return a=St(),a.memoizedState=a.baseState=n,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:I0,lastRenderedState:n},a.queue=s,a=c1.bind(null,Ne,s),s.dispatch=a,s=Dc(!1),v=Vc.bind(null,Ne,!1,s.queue),s=St(),h={state:n,dispatch:null,action:e,pending:null},s.queue=h,a=s3.bind(null,Ne,h,v,a),h.dispatch=a,s.memoizedState=e,[n,a,!1]}function Z0(e){var n=tt();return F0(n,Be,e)}function F0(e,n,a){if(n=Oc(e,n,I0)[0],e=Bo(Vn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var s=Pi(n)}catch(_){throw _===Ya?jo:_}else s=n;n=tt();var h=n.queue,v=h.dispatch;return a!==n.memoizedState&&(Ne.flags|=2048,Ka(9,{destroy:void 0},u3.bind(null,h,a),null)),[s,v,e]}function u3(e,n){e.action=n}function K0(e){var n=tt(),a=Be;if(a!==null)return F0(n,a,e);tt(),n=n.memoizedState,a=tt();var s=a.queue.dispatch;return a.memoizedState=e,[n,s,!1]}function Ka(e,n,a,s){return e={tag:e,create:a,deps:s,inst:n,next:null},n=Ne.updateQueue,n===null&&(n=Ho(),Ne.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=e.next=e:(s=a.next,a.next=e,e.next=s,n.lastEffect=e),e}function Q0(){return tt().memoizedState}function Uo(e,n,a,s){var h=St();Ne.flags|=e,h.memoizedState=Ka(1|n,{destroy:void 0},a,s===void 0?null:s)}function Go(e,n,a,s){var h=tt();s=s===void 0?null:s;var v=h.memoizedState.inst;Be!==null&&s!==null&&Tc(s,Be.memoizedState.deps)?h.memoizedState=Ka(n,v,a,s):(Ne.flags|=e,h.memoizedState=Ka(1|n,v,a,s))}function $0(e,n){Uo(8390656,8,e,n)}function Hc(e,n){Go(2048,8,e,n)}function c3(e){Ne.flags|=4;var n=Ne.updateQueue;if(n===null)n=Ho(),Ne.updateQueue=n,n.events=[e];else{var a=n.events;a===null?n.events=[e]:a.push(e)}}function P0(e){var n=tt().memoizedState;return c3({ref:n,nextImpl:e}),function(){if((ke&2)!==0)throw Error(l(440));return n.impl.apply(void 0,arguments)}}function J0(e,n){return Go(4,2,e,n)}function W0(e,n){return Go(4,4,e,n)}function e1(e,n){if(typeof n=="function"){e=e();var a=n(e);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function t1(e,n,a){a=a!=null?a.concat([e]):null,Go(4,4,e1.bind(null,n,e),a)}function Lc(){}function n1(e,n){var a=tt();n=n===void 0?null:n;var s=a.memoizedState;return n!==null&&Tc(n,s[1])?s[0]:(a.memoizedState=[e,n],e)}function r1(e,n){var a=tt();n=n===void 0?null:n;var s=a.memoizedState;if(n!==null&&Tc(n,s[1]))return s[0];if(s=e(),ra){xn(!0);try{e()}finally{xn(!1)}}return a.memoizedState=[s,n],s}function Bc(e,n,a){return a===void 0||(Gn&1073741824)!==0&&(Me&261930)===0?e.memoizedState=n:(e.memoizedState=a,e=ax(),Ne.lanes|=e,Sr|=e,a)}function a1(e,n,a,s){return Lt(a,n)?a:Xa.current!==null?(e=Bc(e,a,s),Lt(e,n)||(lt=!0),e):(Gn&42)===0||(Gn&1073741824)!==0&&(Me&261930)===0?(lt=!0,e.memoizedState=a):(e=ax(),Ne.lanes|=e,Sr|=e,n)}function i1(e,n,a,s,h){var v=G.p;G.p=v!==0&&8>v?v:8;var _=O.T,j={};O.T=j,Vc(e,!1,n,a);try{var U=h(),te=O.S;if(te!==null&&te(j,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var se=i3(U,s);Ji(e,n,se,It(e))}else Ji(e,n,s,It(e))}catch(ce){Ji(e,n,{then:function(){},status:"rejected",reason:ce},It())}finally{G.p=v,_!==null&&j.types!==null&&(_.types=j.types),O.T=_}}function f3(){}function Uc(e,n,a,s){if(e.tag!==5)throw Error(l(476));var h=l1(e).queue;i1(e,h,n,X,a===null?f3:function(){return o1(e),a(s)})}function l1(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:X,baseState:X,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:X},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function o1(e){var n=l1(e);n.next===null&&(n=e.alternate.memoizedState),Ji(e,n.next.queue,{},It())}function Gc(){return vt(vl)}function s1(){return tt().memoizedState}function u1(){return tt().memoizedState}function d3(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=It();e=pr(a);var s=yr(n,e,a);s!==null&&(Ot(s,n,a),Fi(s,n,a)),n={cache:mc()},e.payload=n;return}n=n.return}}function h3(e,n,a){var s=It();a={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Vo(e)?f1(n,a):(a=ic(e,n,a,s),a!==null&&(Ot(a,e,s),d1(a,n,s)))}function c1(e,n,a){var s=It();Ji(e,n,a,s)}function Ji(e,n,a,s){var h={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Vo(e))f1(n,h);else{var v=e.alternate;if(e.lanes===0&&(v===null||v.lanes===0)&&(v=n.lastRenderedReducer,v!==null))try{var _=n.lastRenderedState,j=v(_,a);if(h.hasEagerState=!0,h.eagerState=j,Lt(j,_))return wo(e,n,h,0),Ve===null&&_o(),!1}catch{}if(a=ic(e,n,h,s),a!==null)return Ot(a,e,s),d1(a,n,s),!0}return!1}function Vc(e,n,a,s){if(s={lane:2,revertLane:_f(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Vo(e)){if(n)throw Error(l(479))}else n=ic(e,a,s,2),n!==null&&Ot(n,e,2)}function Vo(e){var n=e.alternate;return e===Ne||n!==null&&n===Ne}function f1(e,n){Za=Do=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function d1(e,n,a){if((a&4194048)!==0){var s=n.lanes;s&=e.pendingLanes,a|=s,n.lanes=a,eo(e,a)}}var Wi={readContext:vt,use:Lo,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useLayoutEffect:Je,useInsertionEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useSyncExternalStore:Je,useId:Je,useHostTransitionStatus:Je,useFormState:Je,useActionState:Je,useOptimistic:Je,useMemoCache:Je,useCacheRefresh:Je};Wi.useEffectEvent=Je;var h1={readContext:vt,use:Lo,useCallback:function(e,n){return St().memoizedState=[e,n===void 0?null:n],e},useContext:vt,useEffect:$0,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,Uo(4194308,4,e1.bind(null,n,e),a)},useLayoutEffect:function(e,n){return Uo(4194308,4,e,n)},useInsertionEffect:function(e,n){Uo(4,2,e,n)},useMemo:function(e,n){var a=St();n=n===void 0?null:n;var s=e();if(ra){xn(!0);try{e()}finally{xn(!1)}}return a.memoizedState=[s,n],s},useReducer:function(e,n,a){var s=St();if(a!==void 0){var h=a(n);if(ra){xn(!0);try{a(n)}finally{xn(!1)}}}else h=n;return s.memoizedState=s.baseState=h,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:h},s.queue=e,e=e.dispatch=h3.bind(null,Ne,e),[s.memoizedState,e]},useRef:function(e){var n=St();return e={current:e},n.memoizedState=e},useState:function(e){e=Dc(e);var n=e.queue,a=c1.bind(null,Ne,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:Lc,useDeferredValue:function(e,n){var a=St();return Bc(a,e,n)},useTransition:function(){var e=Dc(!1);return e=i1.bind(null,Ne,e.queue,!0,!1),St().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var s=Ne,h=St();if(qe){if(a===void 0)throw Error(l(407));a=a()}else{if(a=n(),Ve===null)throw Error(l(349));(Me&127)!==0||z0(s,n,a)}h.memoizedState=a;var v={value:a,getSnapshot:n};return h.queue=v,$0(k0.bind(null,s,v,e),[e]),s.flags|=2048,Ka(9,{destroy:void 0},D0.bind(null,s,v,a,n),null),a},useId:function(){var e=St(),n=Ve.identifierPrefix;if(qe){var a=wn,s=_n;a=(s&~(1<<32-wt(s)-1)).toString(32)+a,n="_"+n+"R_"+a,a=ko++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=l3++,n="_"+n+"r_"+a.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:Gc,useFormState:X0,useActionState:X0,useOptimistic:function(e){var n=St();n.memoizedState=n.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=Vc.bind(null,Ne,!0,a),a.dispatch=n,[e,n]},useMemoCache:qc,useCacheRefresh:function(){return St().memoizedState=d3.bind(null,Ne)},useEffectEvent:function(e){var n=St(),a={impl:e};return n.memoizedState=a,function(){if((ke&2)!==0)throw Error(l(440));return a.impl.apply(void 0,arguments)}}},Yc={readContext:vt,use:Lo,useCallback:n1,useContext:vt,useEffect:Hc,useImperativeHandle:t1,useInsertionEffect:J0,useLayoutEffect:W0,useMemo:r1,useReducer:Bo,useRef:Q0,useState:function(){return Bo(Vn)},useDebugValue:Lc,useDeferredValue:function(e,n){var a=tt();return a1(a,Be.memoizedState,e,n)},useTransition:function(){var e=Bo(Vn)[0],n=tt().memoizedState;return[typeof e=="boolean"?e:Pi(e),n]},useSyncExternalStore:O0,useId:s1,useHostTransitionStatus:Gc,useFormState:Z0,useActionState:Z0,useOptimistic:function(e,n){var a=tt();return B0(a,Be,e,n)},useMemoCache:qc,useCacheRefresh:u1};Yc.useEffectEvent=P0;var g1={readContext:vt,use:Lo,useCallback:n1,useContext:vt,useEffect:Hc,useImperativeHandle:t1,useInsertionEffect:J0,useLayoutEffect:W0,useMemo:r1,useReducer:zc,useRef:Q0,useState:function(){return zc(Vn)},useDebugValue:Lc,useDeferredValue:function(e,n){var a=tt();return Be===null?Bc(a,e,n):a1(a,Be.memoizedState,e,n)},useTransition:function(){var e=zc(Vn)[0],n=tt().memoizedState;return[typeof e=="boolean"?e:Pi(e),n]},useSyncExternalStore:O0,useId:s1,useHostTransitionStatus:Gc,useFormState:K0,useActionState:K0,useOptimistic:function(e,n){var a=tt();return Be!==null?B0(a,Be,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:qc,useCacheRefresh:u1};g1.useEffectEvent=P0;function Ic(e,n,a,s){n=e.memoizedState,a=a(s,n),a=a==null?n:p({},n,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Xc={enqueueSetState:function(e,n,a){e=e._reactInternals;var s=It(),h=pr(s);h.payload=n,a!=null&&(h.callback=a),n=yr(e,h,s),n!==null&&(Ot(n,e,s),Fi(n,e,s))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var s=It(),h=pr(s);h.tag=1,h.payload=n,a!=null&&(h.callback=a),n=yr(e,h,s),n!==null&&(Ot(n,e,s),Fi(n,e,s))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=It(),s=pr(a);s.tag=2,n!=null&&(s.callback=n),n=yr(e,s,a),n!==null&&(Ot(n,e,a),Fi(n,e,a))}};function v1(e,n,a,s,h,v,_){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,v,_):n.prototype&&n.prototype.isPureReactComponent?!Bi(a,s)||!Bi(h,v):!0}function m1(e,n,a,s){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,s),n.state!==e&&Xc.enqueueReplaceState(n,n.state,null)}function aa(e,n){var a=n;if("ref"in n){a={};for(var s in n)s!=="ref"&&(a[s]=n[s])}if(e=e.defaultProps){a===n&&(a=p({},a));for(var h in e)a[h]===void 0&&(a[h]=e[h])}return a}function p1(e){bo(e)}function y1(e){console.error(e)}function x1(e){bo(e)}function Yo(e,n){try{var a=e.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(s){setTimeout(function(){throw s})}}function b1(e,n,a){try{var s=e.onCaughtError;s(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function Zc(e,n,a){return a=pr(a),a.tag=3,a.payload={element:null},a.callback=function(){Yo(e,n)},a}function _1(e){return e=pr(e),e.tag=3,e}function w1(e,n,a,s){var h=a.type.getDerivedStateFromError;if(typeof h=="function"){var v=s.value;e.payload=function(){return h(v)},e.callback=function(){b1(n,a,s)}}var _=a.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(e.callback=function(){b1(n,a,s),typeof h!="function"&&(Er===null?Er=new Set([this]):Er.add(this));var j=s.stack;this.componentDidCatch(s.value,{componentStack:j!==null?j:""})})}function g3(e,n,a,s,h){if(a.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(n=a.alternate,n!==null&&Ua(n,a,h,!0),a=Ut.current,a!==null){switch(a.tag){case 31:case 13:return Wt===null?ts():a.alternate===null&&We===0&&(We=3),a.flags&=-257,a.flags|=65536,a.lanes=h,s===Mo?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([s]):n.add(s),yf(e,s,h)),!1;case 22:return a.flags|=65536,s===Mo?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([s])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([s]):a.add(s)),yf(e,s,h)),!1}throw Error(l(435,a.tag))}return yf(e,s,h),ts(),!1}if(qe)return n=Ut.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=h,s!==fc&&(e=Error(l(422),{cause:s}),Vi(Qt(e,a)))):(s!==fc&&(n=Error(l(423),{cause:s}),Vi(Qt(n,a))),e=e.current.alternate,e.flags|=65536,h&=-h,e.lanes|=h,s=Qt(s,a),h=Zc(e.stateNode,s,h),wc(e,h),We!==4&&(We=2)),!1;var v=Error(l(520),{cause:s});if(v=Qt(v,a),ol===null?ol=[v]:ol.push(v),We!==4&&(We=2),n===null)return!0;s=Qt(s,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,e=h&-h,a.lanes|=e,e=Zc(a.stateNode,s,e),wc(a,e),!1;case 1:if(n=a.type,v=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Er===null||!Er.has(v))))return a.flags|=65536,h&=-h,a.lanes|=h,h=_1(h),w1(h,e,a,s),wc(a,h),!1}a=a.return}while(a!==null);return!1}var Fc=Error(l(461)),lt=!1;function mt(e,n,a,s){n.child=e===null?C0(n,null,a,s):na(n,e.child,a,s)}function S1(e,n,a,s,h){a=a.render;var v=n.ref;if("ref"in s){var _={};for(var j in s)j!=="ref"&&(_[j]=s[j])}else _=s;return Jr(n),s=Ac(e,n,a,_,v,h),j=jc(),e!==null&&!lt?(Mc(e,n,h),Yn(e,n,h)):(qe&&j&&uc(n),n.flags|=1,mt(e,n,s,h),n.child)}function E1(e,n,a,s,h){if(e===null){var v=a.type;return typeof v=="function"&&!lc(v)&&v.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=v,N1(e,n,v,s,h)):(e=Eo(a.type,null,s,n,n.mode,h),e.ref=n.ref,e.return=n,n.child=e)}if(v=e.child,!tf(e,h)){var _=v.memoizedProps;if(a=a.compare,a=a!==null?a:Bi,a(_,s)&&e.ref===n.ref)return Yn(e,n,h)}return n.flags|=1,e=Hn(v,s),e.ref=n.ref,e.return=n,n.child=e}function N1(e,n,a,s,h){if(e!==null){var v=e.memoizedProps;if(Bi(v,s)&&e.ref===n.ref)if(lt=!1,n.pendingProps=s=v,tf(e,h))(e.flags&131072)!==0&&(lt=!0);else return n.lanes=e.lanes,Yn(e,n,h)}return Kc(e,n,a,s,h)}function C1(e,n,a,s){var h=s.children,v=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((n.flags&128)!==0){if(v=v!==null?v.baseLanes|a:a,e!==null){for(s=n.child=e.child,h=0;s!==null;)h=h|s.lanes|s.childLanes,s=s.sibling;s=h&~v}else s=0,n.child=null;return T1(e,n,v,a,s)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ao(n,v!==null?v.cachePool:null),v!==null?j0(n,v):Ec(),M0(n);else return s=n.lanes=536870912,T1(e,n,v!==null?v.baseLanes|a:a,a,s)}else v!==null?(Ao(n,v.cachePool),j0(n,v),br(),n.memoizedState=null):(e!==null&&Ao(n,null),Ec(),br());return mt(e,n,h,a),n.child}function el(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function T1(e,n,a,s,h){var v=yc();return v=v===null?null:{parent:at._currentValue,pool:v},n.memoizedState={baseLanes:a,cachePool:v},e!==null&&Ao(n,null),Ec(),M0(n),e!==null&&Ua(e,n,s,!0),n.childLanes=h,null}function Io(e,n){return n=Zo({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function A1(e,n,a){return na(n,e.child,null,a),e=Io(n,n.pendingProps),e.flags|=2,Gt(n),n.memoizedState=null,e}function v3(e,n,a){var s=n.pendingProps,h=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(qe){if(s.mode==="hidden")return e=Io(n,s),n.lanes=536870912,el(null,e);if(Cc(n),(e=Ye)?(e=Ux(e,Jt),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:dr!==null?{id:_n,overflow:wn}:null,retryLane:536870912,hydrationErrors:null},a=f0(e),a.return=n,n.child=a,gt=n,Ye=null)):e=null,e===null)throw gr(n);return n.lanes=536870912,null}return Io(n,s)}var v=e.memoizedState;if(v!==null){var _=v.dehydrated;if(Cc(n),h)if(n.flags&256)n.flags&=-257,n=A1(e,n,a);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(l(558));else if(lt||Ua(e,n,a,!1),h=(a&e.childLanes)!==0,lt||h){if(s=Ve,s!==null&&(_=to(s,a),_!==0&&_!==v.retryLane))throw v.retryLane=_,Kr(e,_),Ot(s,e,_),Fc;ts(),n=A1(e,n,a)}else e=v.treeContext,Ye=en(_.nextSibling),gt=n,qe=!0,hr=null,Jt=!1,e!==null&&g0(n,e),n=Io(n,s),n.flags|=4096;return n}return e=Hn(e.child,{mode:s.mode,children:s.children}),e.ref=n.ref,n.child=e,e.return=n,e}function Xo(e,n){var a=n.ref;if(a===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(l(284));(e===null||e.ref!==a)&&(n.flags|=4194816)}}function Kc(e,n,a,s,h){return Jr(n),a=Ac(e,n,a,s,void 0,h),s=jc(),e!==null&&!lt?(Mc(e,n,h),Yn(e,n,h)):(qe&&s&&uc(n),n.flags|=1,mt(e,n,a,h),n.child)}function j1(e,n,a,s,h,v){return Jr(n),n.updateQueue=null,a=q0(n,s,a,h),R0(e),s=jc(),e!==null&&!lt?(Mc(e,n,v),Yn(e,n,v)):(qe&&s&&uc(n),n.flags|=1,mt(e,n,a,v),n.child)}function M1(e,n,a,s,h){if(Jr(n),n.stateNode===null){var v=ka,_=a.contextType;typeof _=="object"&&_!==null&&(v=vt(_)),v=new a(s,v),n.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=Xc,n.stateNode=v,v._reactInternals=n,v=n.stateNode,v.props=s,v.state=n.memoizedState,v.refs={},bc(n),_=a.contextType,v.context=typeof _=="object"&&_!==null?vt(_):ka,v.state=n.memoizedState,_=a.getDerivedStateFromProps,typeof _=="function"&&(Ic(n,a,_,s),v.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(_=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),_!==v.state&&Xc.enqueueReplaceState(v,v.state,null),Qi(n,s,v,h),Ki(),v.state=n.memoizedState),typeof v.componentDidMount=="function"&&(n.flags|=4194308),s=!0}else if(e===null){v=n.stateNode;var j=n.memoizedProps,U=aa(a,j);v.props=U;var te=v.context,se=a.contextType;_=ka,typeof se=="object"&&se!==null&&(_=vt(se));var ce=a.getDerivedStateFromProps;se=typeof ce=="function"||typeof v.getSnapshotBeforeUpdate=="function",j=n.pendingProps!==j,se||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(j||te!==_)&&m1(n,v,s,_),mr=!1;var re=n.memoizedState;v.state=re,Qi(n,s,v,h),Ki(),te=n.memoizedState,j||re!==te||mr?(typeof ce=="function"&&(Ic(n,a,ce,s),te=n.memoizedState),(U=mr||v1(n,a,U,s,re,te,_))?(se||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(n.flags|=4194308)):(typeof v.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=s,n.memoizedState=te),v.props=s,v.state=te,v.context=_,s=U):(typeof v.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{v=n.stateNode,_c(e,n),_=n.memoizedProps,se=aa(a,_),v.props=se,ce=n.pendingProps,re=v.context,te=a.contextType,U=ka,typeof te=="object"&&te!==null&&(U=vt(te)),j=a.getDerivedStateFromProps,(te=typeof j=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(_!==ce||re!==U)&&m1(n,v,s,U),mr=!1,re=n.memoizedState,v.state=re,Qi(n,s,v,h),Ki();var ie=n.memoizedState;_!==ce||re!==ie||mr||e!==null&&e.dependencies!==null&&Co(e.dependencies)?(typeof j=="function"&&(Ic(n,a,j,s),ie=n.memoizedState),(se=mr||v1(n,a,se,s,re,ie,U)||e!==null&&e.dependencies!==null&&Co(e.dependencies))?(te||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(s,ie,U),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(s,ie,U)),typeof v.componentDidUpdate=="function"&&(n.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof v.componentDidUpdate!="function"||_===e.memoizedProps&&re===e.memoizedState||(n.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||_===e.memoizedProps&&re===e.memoizedState||(n.flags|=1024),n.memoizedProps=s,n.memoizedState=ie),v.props=s,v.state=ie,v.context=U,s=se):(typeof v.componentDidUpdate!="function"||_===e.memoizedProps&&re===e.memoizedState||(n.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||_===e.memoizedProps&&re===e.memoizedState||(n.flags|=1024),s=!1)}return v=s,Xo(e,n),s=(n.flags&128)!==0,v||s?(v=n.stateNode,a=s&&typeof a.getDerivedStateFromError!="function"?null:v.render(),n.flags|=1,e!==null&&s?(n.child=na(n,e.child,null,h),n.child=na(n,null,a,h)):mt(e,n,a,h),n.memoizedState=v.state,e=n.child):e=Yn(e,n,h),e}function R1(e,n,a,s){return $r(),n.flags|=256,mt(e,n,a,s),n.child}var Qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function $c(e){return{baseLanes:e,cachePool:b0()}}function Pc(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=Yt),e}function q1(e,n,a){var s=n.pendingProps,h=!1,v=(n.flags&128)!==0,_;if((_=v)||(_=e!==null&&e.memoizedState===null?!1:(et.current&2)!==0),_&&(h=!0,n.flags&=-129),_=(n.flags&32)!==0,n.flags&=-33,e===null){if(qe){if(h?xr(n):br(),(e=Ye)?(e=Ux(e,Jt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:dr!==null?{id:_n,overflow:wn}:null,retryLane:536870912,hydrationErrors:null},a=f0(e),a.return=n,n.child=a,gt=n,Ye=null)):e=null,e===null)throw gr(n);return zf(e)?n.lanes=32:n.lanes=536870912,null}var j=s.children;return s=s.fallback,h?(br(),h=n.mode,j=Zo({mode:"hidden",children:j},h),s=Qr(s,h,a,null),j.return=n,s.return=n,j.sibling=s,n.child=j,s=n.child,s.memoizedState=$c(a),s.childLanes=Pc(e,_,a),n.memoizedState=Qc,el(null,s)):(xr(n),Jc(n,j))}var U=e.memoizedState;if(U!==null&&(j=U.dehydrated,j!==null)){if(v)n.flags&256?(xr(n),n.flags&=-257,n=Wc(e,n,a)):n.memoizedState!==null?(br(),n.child=e.child,n.flags|=128,n=null):(br(),j=s.fallback,h=n.mode,s=Zo({mode:"visible",children:s.children},h),j=Qr(j,h,a,null),j.flags|=2,s.return=n,j.return=n,s.sibling=j,n.child=s,na(n,e.child,null,a),s=n.child,s.memoizedState=$c(a),s.childLanes=Pc(e,_,a),n.memoizedState=Qc,n=el(null,s));else if(xr(n),zf(j)){if(_=j.nextSibling&&j.nextSibling.dataset,_)var te=_.dgst;_=te,s=Error(l(419)),s.stack="",s.digest=_,Vi({value:s,source:null,stack:null}),n=Wc(e,n,a)}else if(lt||Ua(e,n,a,!1),_=(a&e.childLanes)!==0,lt||_){if(_=Ve,_!==null&&(s=to(_,a),s!==0&&s!==U.retryLane))throw U.retryLane=s,Kr(e,s),Ot(_,e,s),Fc;Of(j)||ts(),n=Wc(e,n,a)}else Of(j)?(n.flags|=192,n.child=e.child,n=null):(e=U.treeContext,Ye=en(j.nextSibling),gt=n,qe=!0,hr=null,Jt=!1,e!==null&&g0(n,e),n=Jc(n,s.children),n.flags|=4096);return n}return h?(br(),j=s.fallback,h=n.mode,U=e.child,te=U.sibling,s=Hn(U,{mode:"hidden",children:s.children}),s.subtreeFlags=U.subtreeFlags&65011712,te!==null?j=Hn(te,j):(j=Qr(j,h,a,null),j.flags|=2),j.return=n,s.return=n,s.sibling=j,n.child=s,el(null,s),s=n.child,j=e.child.memoizedState,j===null?j=$c(a):(h=j.cachePool,h!==null?(U=at._currentValue,h=h.parent!==U?{parent:U,pool:U}:h):h=b0(),j={baseLanes:j.baseLanes|a,cachePool:h}),s.memoizedState=j,s.childLanes=Pc(e,_,a),n.memoizedState=Qc,el(e.child,s)):(xr(n),a=e.child,e=a.sibling,a=Hn(a,{mode:"visible",children:s.children}),a.return=n,a.sibling=null,e!==null&&(_=n.deletions,_===null?(n.deletions=[e],n.flags|=16):_.push(e)),n.child=a,n.memoizedState=null,a)}function Jc(e,n){return n=Zo({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Zo(e,n){return e=Bt(22,e,null,n),e.lanes=0,e}function Wc(e,n,a){return na(n,e.child,null,a),e=Jc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function O1(e,n,a){e.lanes|=n;var s=e.alternate;s!==null&&(s.lanes|=n),gc(e.return,n,a)}function ef(e,n,a,s,h,v){var _=e.memoizedState;_===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:a,tailMode:h,treeForkCount:v}:(_.isBackwards=n,_.rendering=null,_.renderingStartTime=0,_.last=s,_.tail=a,_.tailMode=h,_.treeForkCount=v)}function z1(e,n,a){var s=n.pendingProps,h=s.revealOrder,v=s.tail;s=s.children;var _=et.current,j=(_&2)!==0;if(j?(_=_&1|2,n.flags|=128):_&=1,ae(et,_),mt(e,n,s,a),s=qe?Gi:0,!j&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&O1(e,a,n);else if(e.tag===19)O1(e,a,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(h){case"forwards":for(a=n.child,h=null;a!==null;)e=a.alternate,e!==null&&zo(e)===null&&(h=a),a=a.sibling;a=h,a===null?(h=n.child,n.child=null):(h=a.sibling,a.sibling=null),ef(n,!1,h,a,v,s);break;case"backwards":case"unstable_legacy-backwards":for(a=null,h=n.child,n.child=null;h!==null;){if(e=h.alternate,e!==null&&zo(e)===null){n.child=h;break}e=h.sibling,h.sibling=a,a=h,h=e}ef(n,!0,a,null,v,s);break;case"together":ef(n,!1,null,null,void 0,s);break;default:n.memoizedState=null}return n.child}function Yn(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),Sr|=n.lanes,(a&n.childLanes)===0)if(e!==null){if(Ua(e,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(l(153));if(n.child!==null){for(e=n.child,a=Hn(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=Hn(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function tf(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Co(e)))}function m3(e,n,a){switch(n.tag){case 3:le(n,n.stateNode.containerInfo),vr(n,at,e.memoizedState.cache),$r();break;case 27:case 5:he(n);break;case 4:le(n,n.stateNode.containerInfo);break;case 10:vr(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Cc(n),null;break;case 13:var s=n.memoizedState;if(s!==null)return s.dehydrated!==null?(xr(n),n.flags|=128,null):(a&n.child.childLanes)!==0?q1(e,n,a):(xr(n),e=Yn(e,n,a),e!==null?e.sibling:null);xr(n);break;case 19:var h=(e.flags&128)!==0;if(s=(a&n.childLanes)!==0,s||(Ua(e,n,a,!1),s=(a&n.childLanes)!==0),h){if(s)return z1(e,n,a);n.flags|=128}if(h=n.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),ae(et,et.current),s)break;return null;case 22:return n.lanes=0,C1(e,n,a,n.pendingProps);case 24:vr(n,at,e.memoizedState.cache)}return Yn(e,n,a)}function D1(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)lt=!0;else{if(!tf(e,a)&&(n.flags&128)===0)return lt=!1,m3(e,n,a);lt=(e.flags&131072)!==0}else lt=!1,qe&&(n.flags&1048576)!==0&&h0(n,Gi,n.index);switch(n.lanes=0,n.tag){case 16:e:{var s=n.pendingProps;if(e=ea(n.elementType),n.type=e,typeof e=="function")lc(e)?(s=aa(e,s),n.tag=1,n=M1(null,n,e,s,a)):(n.tag=0,n=Kc(null,n,e,s,a));else{if(e!=null){var h=e.$$typeof;if(h===T){n.tag=11,n=S1(null,n,e,s,a);break e}else if(h===M){n.tag=14,n=E1(null,n,e,s,a);break e}}throw n=D(e)||e,Error(l(306,n,""))}}return n;case 0:return Kc(e,n,n.type,n.pendingProps,a);case 1:return s=n.type,h=aa(s,n.pendingProps),M1(e,n,s,h,a);case 3:e:{if(le(n,n.stateNode.containerInfo),e===null)throw Error(l(387));s=n.pendingProps;var v=n.memoizedState;h=v.element,_c(e,n),Qi(n,s,null,a);var _=n.memoizedState;if(s=_.cache,vr(n,at,s),s!==v.cache&&vc(n,[at],a,!0),Ki(),s=_.element,v.isDehydrated)if(v={element:s,isDehydrated:!1,cache:_.cache},n.updateQueue.baseState=v,n.memoizedState=v,n.flags&256){n=R1(e,n,s,a);break e}else if(s!==h){h=Qt(Error(l(424)),n),Vi(h),n=R1(e,n,s,a);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ye=en(e.firstChild),gt=n,qe=!0,hr=null,Jt=!0,a=C0(n,null,s,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if($r(),s===h){n=Yn(e,n,a);break e}mt(e,n,s,a)}n=n.child}return n;case 26:return Xo(e,n),e===null?(a=Zx(n.type,null,n.pendingProps,null))?n.memoizedState=a:qe||(a=n.type,e=n.pendingProps,s=ss(I.current).createElement(a),s[ct]=n,s[bt]=e,pt(s,a,e),rt(s),n.stateNode=s):n.memoizedState=Zx(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return he(n),e===null&&qe&&(s=n.stateNode=Yx(n.type,n.pendingProps,I.current),gt=n,Jt=!0,h=Ye,Ar(n.type)?(Df=h,Ye=en(s.firstChild)):Ye=h),mt(e,n,n.pendingProps.children,a),Xo(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&qe&&((h=s=Ye)&&(s=Z3(s,n.type,n.pendingProps,Jt),s!==null?(n.stateNode=s,gt=n,Ye=en(s.firstChild),Jt=!1,h=!0):h=!1),h||gr(n)),he(n),h=n.type,v=n.pendingProps,_=e!==null?e.memoizedProps:null,s=v.children,Mf(h,v)?s=null:_!==null&&Mf(h,_)&&(n.flags|=32),n.memoizedState!==null&&(h=Ac(e,n,o3,null,null,a),vl._currentValue=h),Xo(e,n),mt(e,n,s,a),n.child;case 6:return e===null&&qe&&((e=a=Ye)&&(a=F3(a,n.pendingProps,Jt),a!==null?(n.stateNode=a,gt=n,Ye=null,e=!0):e=!1),e||gr(n)),null;case 13:return q1(e,n,a);case 4:return le(n,n.stateNode.containerInfo),s=n.pendingProps,e===null?n.child=na(n,null,s,a):mt(e,n,s,a),n.child;case 11:return S1(e,n,n.type,n.pendingProps,a);case 7:return mt(e,n,n.pendingProps,a),n.child;case 8:return mt(e,n,n.pendingProps.children,a),n.child;case 12:return mt(e,n,n.pendingProps.children,a),n.child;case 10:return s=n.pendingProps,vr(n,n.type,s.value),mt(e,n,s.children,a),n.child;case 9:return h=n.type._context,s=n.pendingProps.children,Jr(n),h=vt(h),s=s(h),n.flags|=1,mt(e,n,s,a),n.child;case 14:return E1(e,n,n.type,n.pendingProps,a);case 15:return N1(e,n,n.type,n.pendingProps,a);case 19:return z1(e,n,a);case 31:return v3(e,n,a);case 22:return C1(e,n,a,n.pendingProps);case 24:return Jr(n),s=vt(at),e===null?(h=yc(),h===null&&(h=Ve,v=mc(),h.pooledCache=v,v.refCount++,v!==null&&(h.pooledCacheLanes|=a),h=v),n.memoizedState={parent:s,cache:h},bc(n),vr(n,at,h)):((e.lanes&a)!==0&&(_c(e,n),Qi(n,null,null,a),Ki()),h=e.memoizedState,v=n.memoizedState,h.parent!==s?(h={parent:s,cache:s},n.memoizedState=h,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=h),vr(n,at,s)):(s=v.cache,vr(n,at,s),s!==h.cache&&vc(n,[at],a,!0))),mt(e,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(l(156,n.tag))}function In(e){e.flags|=4}function nf(e,n,a,s,h){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(h&335544128)===h)if(e.stateNode.complete)e.flags|=8192;else if(sx())e.flags|=8192;else throw ta=Mo,xc}else e.flags&=-16777217}function k1(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Px(n))if(sx())e.flags|=8192;else throw ta=Mo,xc}function Fo(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Jl():536870912,e.lanes|=n,Ja|=n)}function tl(e,n){if(!qe)switch(e.tailMode){case"hidden":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Ie(e){var n=e.alternate!==null&&e.alternate.child===e.child,a=0,s=0;if(n)for(var h=e.child;h!==null;)a|=h.lanes|h.childLanes,s|=h.subtreeFlags&65011712,s|=h.flags&65011712,h.return=e,h=h.sibling;else for(h=e.child;h!==null;)a|=h.lanes|h.childLanes,s|=h.subtreeFlags,s|=h.flags,h.return=e,h=h.sibling;return e.subtreeFlags|=s,e.childLanes=a,n}function p3(e,n,a){var s=n.pendingProps;switch(cc(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ie(n),null;case 1:return Ie(n),null;case 3:return a=n.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),Un(at),fe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ba(n)?In(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,dc())),Ie(n),null;case 26:var h=n.type,v=n.memoizedState;return e===null?(In(n),v!==null?(Ie(n),k1(n,v)):(Ie(n),nf(n,h,null,s,a))):v?v!==e.memoizedState?(In(n),Ie(n),k1(n,v)):(Ie(n),n.flags&=-16777217):(e=e.memoizedProps,e!==s&&In(n),Ie(n),nf(n,h,e,s,a)),null;case 27:if(ye(n),a=I.current,h=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==s&&In(n);else{if(!s){if(n.stateNode===null)throw Error(l(166));return Ie(n),null}e=k.current,Ba(n)?v0(n):(e=Yx(h,s,a),n.stateNode=e,In(n))}return Ie(n),null;case 5:if(ye(n),h=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==s&&In(n);else{if(!s){if(n.stateNode===null)throw Error(l(166));return Ie(n),null}if(v=k.current,Ba(n))v0(n);else{var _=ss(I.current);switch(v){case 1:v=_.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:v=_.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":v=_.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":v=_.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":v=_.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof s.is=="string"?_.createElement("select",{is:s.is}):_.createElement("select"),s.multiple?v.multiple=!0:s.size&&(v.size=s.size);break;default:v=typeof s.is=="string"?_.createElement(h,{is:s.is}):_.createElement(h)}}v[ct]=n,v[bt]=s;e:for(_=n.child;_!==null;){if(_.tag===5||_.tag===6)v.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===n)break e;for(;_.sibling===null;){if(_.return===null||_.return===n)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}n.stateNode=v;e:switch(pt(v,h,s),h){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&In(n)}}return Ie(n),nf(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==s&&In(n);else{if(typeof s!="string"&&n.stateNode===null)throw Error(l(166));if(e=I.current,Ba(n)){if(e=n.stateNode,a=n.memoizedProps,s=null,h=gt,h!==null)switch(h.tag){case 27:case 5:s=h.memoizedProps}e[ct]=n,e=!!(e.nodeValue===a||s!==null&&s.suppressHydrationWarning===!0||qx(e.nodeValue,a)),e||gr(n,!0)}else e=ss(e).createTextNode(s),e[ct]=n,n.stateNode=e}return Ie(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(s=Ba(n),a!==null){if(e===null){if(!s)throw Error(l(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[ct]=n}else $r(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ie(n),e=!1}else a=dc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(Gt(n),n):(Gt(n),null);if((n.flags&128)!==0)throw Error(l(558))}return Ie(n),null;case 13:if(s=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(h=Ba(n),s!==null&&s.dehydrated!==null){if(e===null){if(!h)throw Error(l(318));if(h=n.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(l(317));h[ct]=n}else $r(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ie(n),h=!1}else h=dc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=h),h=!0;if(!h)return n.flags&256?(Gt(n),n):(Gt(n),null)}return Gt(n),(n.flags&128)!==0?(n.lanes=a,n):(a=s!==null,e=e!==null&&e.memoizedState!==null,a&&(s=n.child,h=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(h=s.alternate.memoizedState.cachePool.pool),v=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(v=s.memoizedState.cachePool.pool),v!==h&&(s.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),Fo(n,n.updateQueue),Ie(n),null);case 4:return fe(),e===null&&Nf(n.stateNode.containerInfo),Ie(n),null;case 10:return Un(n.type),Ie(n),null;case 19:if(Y(et),s=n.memoizedState,s===null)return Ie(n),null;if(h=(n.flags&128)!==0,v=s.rendering,v===null)if(h)tl(s,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(v=zo(e),v!==null){for(n.flags|=128,tl(s,!1),e=v.updateQueue,n.updateQueue=e,Fo(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)c0(a,e),a=a.sibling;return ae(et,et.current&1|2),qe&&Ln(n,s.treeForkCount),n.child}e=e.sibling}s.tail!==null&&Pe()>Jo&&(n.flags|=128,h=!0,tl(s,!1),n.lanes=4194304)}else{if(!h)if(e=zo(v),e!==null){if(n.flags|=128,h=!0,e=e.updateQueue,n.updateQueue=e,Fo(n,e),tl(s,!0),s.tail===null&&s.tailMode==="hidden"&&!v.alternate&&!qe)return Ie(n),null}else 2*Pe()-s.renderingStartTime>Jo&&a!==536870912&&(n.flags|=128,h=!0,tl(s,!1),n.lanes=4194304);s.isBackwards?(v.sibling=n.child,n.child=v):(e=s.last,e!==null?e.sibling=v:n.child=v,s.last=v)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Pe(),e.sibling=null,a=et.current,ae(et,h?a&1|2:a&1),qe&&Ln(n,s.treeForkCount),e):(Ie(n),null);case 22:case 23:return Gt(n),Nc(),s=n.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(n.flags|=8192):s&&(n.flags|=8192),s?(a&536870912)!==0&&(n.flags&128)===0&&(Ie(n),n.subtreeFlags&6&&(n.flags|=8192)):Ie(n),a=n.updateQueue,a!==null&&Fo(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==a&&(n.flags|=2048),e!==null&&Y(Wr),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Un(at),Ie(n),null;case 25:return null;case 30:return null}throw Error(l(156,n.tag))}function y3(e,n){switch(cc(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Un(at),fe(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return ye(n),null;case 31:if(n.memoizedState!==null){if(Gt(n),n.alternate===null)throw Error(l(340));$r()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(Gt(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(l(340));$r()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Y(et),null;case 4:return fe(),null;case 10:return Un(n.type),null;case 22:case 23:return Gt(n),Nc(),e!==null&&Y(Wr),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Un(at),null;case 25:return null;default:return null}}function H1(e,n){switch(cc(n),n.tag){case 3:Un(at),fe();break;case 26:case 27:case 5:ye(n);break;case 4:fe();break;case 31:n.memoizedState!==null&&Gt(n);break;case 13:Gt(n);break;case 19:Y(et);break;case 10:Un(n.type);break;case 22:case 23:Gt(n),Nc(),e!==null&&Y(Wr);break;case 24:Un(at)}}function nl(e,n){try{var a=n.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var h=s.next;a=h;do{if((a.tag&e)===e){s=void 0;var v=a.create,_=a.inst;s=v(),_.destroy=s}a=a.next}while(a!==h)}}catch(j){Le(n,n.return,j)}}function _r(e,n,a){try{var s=n.updateQueue,h=s!==null?s.lastEffect:null;if(h!==null){var v=h.next;s=v;do{if((s.tag&e)===e){var _=s.inst,j=_.destroy;if(j!==void 0){_.destroy=void 0,h=n;var U=a,te=j;try{te()}catch(se){Le(h,U,se)}}}s=s.next}while(s!==v)}}catch(se){Le(n,n.return,se)}}function L1(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{A0(n,a)}catch(s){Le(e,e.return,s)}}}function B1(e,n,a){a.props=aa(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(s){Le(e,n,s)}}function rl(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof a=="function"?e.refCleanup=a(s):a.current=s}}catch(h){Le(e,n,h)}}function Sn(e,n){var a=e.ref,s=e.refCleanup;if(a!==null)if(typeof s=="function")try{s()}catch(h){Le(e,n,h)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(h){Le(e,n,h)}else a.current=null}function U1(e){var n=e.type,a=e.memoizedProps,s=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&s.focus();break e;case"img":a.src?s.src=a.src:a.srcSet&&(s.srcset=a.srcSet)}}catch(h){Le(e,e.return,h)}}function rf(e,n,a){try{var s=e.stateNode;U3(s,e.type,a,n),s[bt]=n}catch(h){Le(e,e.return,h)}}function G1(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ar(e.type)||e.tag===4}function af(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||G1(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ar(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function lf(e,n,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=Dn));else if(s!==4&&(s===27&&Ar(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(lf(e,n,a),e=e.sibling;e!==null;)lf(e,n,a),e=e.sibling}function Ko(e,n,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(s!==4&&(s===27&&Ar(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Ko(e,n,a),e=e.sibling;e!==null;)Ko(e,n,a),e=e.sibling}function V1(e){var n=e.stateNode,a=e.memoizedProps;try{for(var s=e.type,h=n.attributes;h.length;)n.removeAttributeNode(h[0]);pt(n,s,a),n[ct]=e,n[bt]=a}catch(v){Le(e,e.return,v)}}var Xn=!1,ot=!1,of=!1,Y1=typeof WeakSet=="function"?WeakSet:Set,ht=null;function x3(e,n){if(e=e.containerInfo,Af=vs,e=t0(e),Wu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var s=a.getSelection&&a.getSelection();if(s&&s.rangeCount!==0){a=s.anchorNode;var h=s.anchorOffset,v=s.focusNode;s=s.focusOffset;try{a.nodeType,v.nodeType}catch{a=null;break e}var _=0,j=-1,U=-1,te=0,se=0,ce=e,re=null;t:for(;;){for(var ie;ce!==a||h!==0&&ce.nodeType!==3||(j=_+h),ce!==v||s!==0&&ce.nodeType!==3||(U=_+s),ce.nodeType===3&&(_+=ce.nodeValue.length),(ie=ce.firstChild)!==null;)re=ce,ce=ie;for(;;){if(ce===e)break t;if(re===a&&++te===h&&(j=_),re===v&&++se===s&&(U=_),(ie=ce.nextSibling)!==null)break;ce=re,re=ce.parentNode}ce=ie}a=j===-1||U===-1?null:{start:j,end:U}}else a=null}a=a||{start:0,end:0}}else a=null;for(jf={focusedElem:e,selectionRange:a},vs=!1,ht=n;ht!==null;)if(n=ht,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,ht=e;else for(;ht!==null;){switch(n=ht,v=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)h=e[a],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&v!==null){e=void 0,a=n,h=v.memoizedProps,v=v.memoizedState,s=a.stateNode;try{var de=aa(a.type,h);e=s.getSnapshotBeforeUpdate(de,v),s.__reactInternalSnapshotBeforeUpdate=e}catch(Se){Le(a,a.return,Se)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,a=e.nodeType,a===9)qf(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":qf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(l(163))}if(e=n.sibling,e!==null){e.return=n.return,ht=e;break}ht=n.return}}function I1(e,n,a){var s=a.flags;switch(a.tag){case 0:case 11:case 15:Fn(e,a),s&4&&nl(5,a);break;case 1:if(Fn(e,a),s&4)if(e=a.stateNode,n===null)try{e.componentDidMount()}catch(_){Le(a,a.return,_)}else{var h=aa(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(h,n,e.__reactInternalSnapshotBeforeUpdate)}catch(_){Le(a,a.return,_)}}s&64&&L1(a),s&512&&rl(a,a.return);break;case 3:if(Fn(e,a),s&64&&(e=a.updateQueue,e!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{A0(e,n)}catch(_){Le(a,a.return,_)}}break;case 27:n===null&&s&4&&V1(a);case 26:case 5:Fn(e,a),n===null&&s&4&&U1(a),s&512&&rl(a,a.return);break;case 12:Fn(e,a);break;case 31:Fn(e,a),s&4&&F1(e,a);break;case 13:Fn(e,a),s&4&&K1(e,a),s&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=A3.bind(null,a),K3(e,a))));break;case 22:if(s=a.memoizedState!==null||Xn,!s){n=n!==null&&n.memoizedState!==null||ot,h=Xn;var v=ot;Xn=s,(ot=n)&&!v?Kn(e,a,(a.subtreeFlags&8772)!==0):Fn(e,a),Xn=h,ot=v}break;case 30:break;default:Fn(e,a)}}function X1(e){var n=e.alternate;n!==null&&(e.alternate=null,X1(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&ji(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Xe=null,jt=!1;function Zn(e,n,a){for(a=a.child;a!==null;)Z1(e,n,a),a=a.sibling}function Z1(e,n,a){if(Qe&&typeof Qe.onCommitFiberUnmount=="function")try{Qe.onCommitFiberUnmount(xt,a)}catch{}switch(a.tag){case 26:ot||Sn(a,n),Zn(e,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:ot||Sn(a,n);var s=Xe,h=jt;Ar(a.type)&&(Xe=a.stateNode,jt=!1),Zn(e,n,a),dl(a.stateNode),Xe=s,jt=h;break;case 5:ot||Sn(a,n);case 6:if(s=Xe,h=jt,Xe=null,Zn(e,n,a),Xe=s,jt=h,Xe!==null)if(jt)try{(Xe.nodeType===9?Xe.body:Xe.nodeName==="HTML"?Xe.ownerDocument.body:Xe).removeChild(a.stateNode)}catch(v){Le(a,n,v)}else try{Xe.removeChild(a.stateNode)}catch(v){Le(a,n,v)}break;case 18:Xe!==null&&(jt?(e=Xe,Lx(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),li(e)):Lx(Xe,a.stateNode));break;case 4:s=Xe,h=jt,Xe=a.stateNode.containerInfo,jt=!0,Zn(e,n,a),Xe=s,jt=h;break;case 0:case 11:case 14:case 15:_r(2,a,n),ot||_r(4,a,n),Zn(e,n,a);break;case 1:ot||(Sn(a,n),s=a.stateNode,typeof s.componentWillUnmount=="function"&&B1(a,n,s)),Zn(e,n,a);break;case 21:Zn(e,n,a);break;case 22:ot=(s=ot)||a.memoizedState!==null,Zn(e,n,a),ot=s;break;default:Zn(e,n,a)}}function F1(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{li(e)}catch(a){Le(n,n.return,a)}}}function K1(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{li(e)}catch(a){Le(n,n.return,a)}}function b3(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new Y1),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new Y1),n;default:throw Error(l(435,e.tag))}}function Qo(e,n){var a=b3(e);n.forEach(function(s){if(!a.has(s)){a.add(s);var h=j3.bind(null,e,s);s.then(h,h)}})}function Mt(e,n){var a=n.deletions;if(a!==null)for(var s=0;s<a.length;s++){var h=a[s],v=e,_=n,j=_;e:for(;j!==null;){switch(j.tag){case 27:if(Ar(j.type)){Xe=j.stateNode,jt=!1;break e}break;case 5:Xe=j.stateNode,jt=!1;break e;case 3:case 4:Xe=j.stateNode.containerInfo,jt=!0;break e}j=j.return}if(Xe===null)throw Error(l(160));Z1(v,_,h),Xe=null,jt=!1,v=h.alternate,v!==null&&(v.return=null),h.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Q1(n,e),n=n.sibling}var cn=null;function Q1(e,n){var a=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Mt(n,e),Rt(e),s&4&&(_r(3,e,e.return),nl(3,e),_r(5,e,e.return));break;case 1:Mt(n,e),Rt(e),s&512&&(ot||a===null||Sn(a,a.return)),s&64&&Xn&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?s:a.concat(s))));break;case 26:var h=cn;if(Mt(n,e),Rt(e),s&512&&(ot||a===null||Sn(a,a.return)),s&4){var v=a!==null?a.memoizedState:null;if(s=e.memoizedState,a===null)if(s===null)if(e.stateNode===null){e:{s=e.type,a=e.memoizedProps,h=h.ownerDocument||h;t:switch(s){case"title":v=h.getElementsByTagName("title")[0],(!v||v[Vr]||v[ct]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=h.createElement(s),h.head.insertBefore(v,h.querySelector("head > title"))),pt(v,s,a),v[ct]=e,rt(v),s=v;break e;case"link":var _=Qx("link","href",h).get(s+(a.href||""));if(_){for(var j=0;j<_.length;j++)if(v=_[j],v.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&v.getAttribute("rel")===(a.rel==null?null:a.rel)&&v.getAttribute("title")===(a.title==null?null:a.title)&&v.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){_.splice(j,1);break t}}v=h.createElement(s),pt(v,s,a),h.head.appendChild(v);break;case"meta":if(_=Qx("meta","content",h).get(s+(a.content||""))){for(j=0;j<_.length;j++)if(v=_[j],v.getAttribute("content")===(a.content==null?null:""+a.content)&&v.getAttribute("name")===(a.name==null?null:a.name)&&v.getAttribute("property")===(a.property==null?null:a.property)&&v.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&v.getAttribute("charset")===(a.charSet==null?null:a.charSet)){_.splice(j,1);break t}}v=h.createElement(s),pt(v,s,a),h.head.appendChild(v);break;default:throw Error(l(468,s))}v[ct]=e,rt(v),s=v}e.stateNode=s}else $x(h,e.type,e.stateNode);else e.stateNode=Kx(h,s,e.memoizedProps);else v!==s?(v===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):v.count--,s===null?$x(h,e.type,e.stateNode):Kx(h,s,e.memoizedProps)):s===null&&e.stateNode!==null&&rf(e,e.memoizedProps,a.memoizedProps)}break;case 27:Mt(n,e),Rt(e),s&512&&(ot||a===null||Sn(a,a.return)),a!==null&&s&4&&rf(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Mt(n,e),Rt(e),s&512&&(ot||a===null||Sn(a,a.return)),e.flags&32){h=e.stateNode;try{ja(h,"")}catch(de){Le(e,e.return,de)}}s&4&&e.stateNode!=null&&(h=e.memoizedProps,rf(e,h,a!==null?a.memoizedProps:h)),s&1024&&(of=!0);break;case 6:if(Mt(n,e),Rt(e),s&4){if(e.stateNode===null)throw Error(l(162));s=e.memoizedProps,a=e.stateNode;try{a.nodeValue=s}catch(de){Le(e,e.return,de)}}break;case 3:if(fs=null,h=cn,cn=us(n.containerInfo),Mt(n,e),cn=h,Rt(e),s&4&&a!==null&&a.memoizedState.isDehydrated)try{li(n.containerInfo)}catch(de){Le(e,e.return,de)}of&&(of=!1,$1(e));break;case 4:s=cn,cn=us(e.stateNode.containerInfo),Mt(n,e),Rt(e),cn=s;break;case 12:Mt(n,e),Rt(e);break;case 31:Mt(n,e),Rt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Qo(e,s)));break;case 13:Mt(n,e),Rt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Po=Pe()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Qo(e,s)));break;case 22:h=e.memoizedState!==null;var U=a!==null&&a.memoizedState!==null,te=Xn,se=ot;if(Xn=te||h,ot=se||U,Mt(n,e),ot=se,Xn=te,Rt(e),s&8192)e:for(n=e.stateNode,n._visibility=h?n._visibility&-2:n._visibility|1,h&&(a===null||U||Xn||ot||ia(e)),a=null,n=e;;){if(n.tag===5||n.tag===26){if(a===null){U=a=n;try{if(v=U.stateNode,h)_=v.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{j=U.stateNode;var ce=U.memoizedProps.style,re=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;j.style.display=re==null||typeof re=="boolean"?"":(""+re).trim()}}catch(de){Le(U,U.return,de)}}}else if(n.tag===6){if(a===null){U=n;try{U.stateNode.nodeValue=h?"":U.memoizedProps}catch(de){Le(U,U.return,de)}}}else if(n.tag===18){if(a===null){U=n;try{var ie=U.stateNode;h?Bx(ie,!0):Bx(U.stateNode,!1)}catch(de){Le(U,U.return,de)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}s&4&&(s=e.updateQueue,s!==null&&(a=s.retryQueue,a!==null&&(s.retryQueue=null,Qo(e,a))));break;case 19:Mt(n,e),Rt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Qo(e,s)));break;case 30:break;case 21:break;default:Mt(n,e),Rt(e)}}function Rt(e){var n=e.flags;if(n&2){try{for(var a,s=e.return;s!==null;){if(G1(s)){a=s;break}s=s.return}if(a==null)throw Error(l(160));switch(a.tag){case 27:var h=a.stateNode,v=af(e);Ko(e,v,h);break;case 5:var _=a.stateNode;a.flags&32&&(ja(_,""),a.flags&=-33);var j=af(e);Ko(e,j,_);break;case 3:case 4:var U=a.stateNode.containerInfo,te=af(e);lf(e,te,U);break;default:throw Error(l(161))}}catch(se){Le(e,e.return,se)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function $1(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;$1(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Fn(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)I1(e,n.alternate,n),n=n.sibling}function ia(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:_r(4,n,n.return),ia(n);break;case 1:Sn(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&B1(n,n.return,a),ia(n);break;case 27:dl(n.stateNode);case 26:case 5:Sn(n,n.return),ia(n);break;case 22:n.memoizedState===null&&ia(n);break;case 30:ia(n);break;default:ia(n)}e=e.sibling}}function Kn(e,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var s=n.alternate,h=e,v=n,_=v.flags;switch(v.tag){case 0:case 11:case 15:Kn(h,v,a),nl(4,v);break;case 1:if(Kn(h,v,a),s=v,h=s.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(te){Le(s,s.return,te)}if(s=v,h=s.updateQueue,h!==null){var j=s.stateNode;try{var U=h.shared.hiddenCallbacks;if(U!==null)for(h.shared.hiddenCallbacks=null,h=0;h<U.length;h++)T0(U[h],j)}catch(te){Le(s,s.return,te)}}a&&_&64&&L1(v),rl(v,v.return);break;case 27:V1(v);case 26:case 5:Kn(h,v,a),a&&s===null&&_&4&&U1(v),rl(v,v.return);break;case 12:Kn(h,v,a);break;case 31:Kn(h,v,a),a&&_&4&&F1(h,v);break;case 13:Kn(h,v,a),a&&_&4&&K1(h,v);break;case 22:v.memoizedState===null&&Kn(h,v,a),rl(v,v.return);break;case 30:break;default:Kn(h,v,a)}n=n.sibling}}function sf(e,n){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Yi(a))}function uf(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Yi(e))}function fn(e,n,a,s){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)P1(e,n,a,s),n=n.sibling}function P1(e,n,a,s){var h=n.flags;switch(n.tag){case 0:case 11:case 15:fn(e,n,a,s),h&2048&&nl(9,n);break;case 1:fn(e,n,a,s);break;case 3:fn(e,n,a,s),h&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Yi(e)));break;case 12:if(h&2048){fn(e,n,a,s),e=n.stateNode;try{var v=n.memoizedProps,_=v.id,j=v.onPostCommit;typeof j=="function"&&j(_,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(U){Le(n,n.return,U)}}else fn(e,n,a,s);break;case 31:fn(e,n,a,s);break;case 13:fn(e,n,a,s);break;case 23:break;case 22:v=n.stateNode,_=n.alternate,n.memoizedState!==null?v._visibility&2?fn(e,n,a,s):al(e,n):v._visibility&2?fn(e,n,a,s):(v._visibility|=2,Qa(e,n,a,s,(n.subtreeFlags&10256)!==0||!1)),h&2048&&sf(_,n);break;case 24:fn(e,n,a,s),h&2048&&uf(n.alternate,n);break;default:fn(e,n,a,s)}}function Qa(e,n,a,s,h){for(h=h&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var v=e,_=n,j=a,U=s,te=_.flags;switch(_.tag){case 0:case 11:case 15:Qa(v,_,j,U,h),nl(8,_);break;case 23:break;case 22:var se=_.stateNode;_.memoizedState!==null?se._visibility&2?Qa(v,_,j,U,h):al(v,_):(se._visibility|=2,Qa(v,_,j,U,h)),h&&te&2048&&sf(_.alternate,_);break;case 24:Qa(v,_,j,U,h),h&&te&2048&&uf(_.alternate,_);break;default:Qa(v,_,j,U,h)}n=n.sibling}}function al(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=e,s=n,h=s.flags;switch(s.tag){case 22:al(a,s),h&2048&&sf(s.alternate,s);break;case 24:al(a,s),h&2048&&uf(s.alternate,s);break;default:al(a,s)}n=n.sibling}}var il=8192;function $a(e,n,a){if(e.subtreeFlags&il)for(e=e.child;e!==null;)J1(e,n,a),e=e.sibling}function J1(e,n,a){switch(e.tag){case 26:$a(e,n,a),e.flags&il&&e.memoizedState!==null&&lM(a,cn,e.memoizedState,e.memoizedProps);break;case 5:$a(e,n,a);break;case 3:case 4:var s=cn;cn=us(e.stateNode.containerInfo),$a(e,n,a),cn=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=il,il=16777216,$a(e,n,a),il=s):$a(e,n,a));break;default:$a(e,n,a)}}function W1(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function ll(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var s=n[a];ht=s,tx(s,e)}W1(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ex(e),e=e.sibling}function ex(e){switch(e.tag){case 0:case 11:case 15:ll(e),e.flags&2048&&_r(9,e,e.return);break;case 3:ll(e);break;case 12:ll(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,$o(e)):ll(e);break;default:ll(e)}}function $o(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var s=n[a];ht=s,tx(s,e)}W1(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:_r(8,n,n.return),$o(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,$o(n));break;default:$o(n)}e=e.sibling}}function tx(e,n){for(;ht!==null;){var a=ht;switch(a.tag){case 0:case 11:case 15:_r(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var s=a.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Yi(a.memoizedState.cache)}if(s=a.child,s!==null)s.return=a,ht=s;else e:for(a=e;ht!==null;){s=ht;var h=s.sibling,v=s.return;if(X1(s),s===a){ht=null;break e}if(h!==null){h.return=v,ht=h;break e}ht=v}}}var _3={getCacheForType:function(e){var n=vt(at),a=n.data.get(e);return a===void 0&&(a=e(),n.data.set(e,a)),a},cacheSignal:function(){return vt(at).controller.signal}},w3=typeof WeakMap=="function"?WeakMap:Map,ke=0,Ve=null,Ae=null,Me=0,He=0,Vt=null,wr=!1,Pa=!1,cf=!1,Qn=0,We=0,Sr=0,la=0,ff=0,Yt=0,Ja=0,ol=null,qt=null,df=!1,Po=0,nx=0,Jo=1/0,Wo=null,Er=null,ft=0,Nr=null,Wa=null,$n=0,hf=0,gf=null,rx=null,sl=0,vf=null;function It(){return(ke&2)!==0&&Me!==0?Me&-Me:O.T!==null?_f():no()}function ax(){if(Yt===0)if((Me&536870912)===0||qe){var e=wa;wa<<=1,(wa&3932160)===0&&(wa=262144),Yt=e}else Yt=536870912;return e=Ut.current,e!==null&&(e.flags|=32),Yt}function Ot(e,n,a){(e===Ve&&(He===2||He===9)||e.cancelPendingCommit!==null)&&(ei(e,0),Cr(e,Me,Yt,!1)),Gr(e,a),((ke&2)===0||e!==Ve)&&(e===Ve&&((ke&2)===0&&(la|=a),We===4&&Cr(e,Me,Yt,!1)),En(e))}function ix(e,n,a){if((ke&6)!==0)throw Error(l(327));var s=!a&&(n&127)===0&&(n&e.expiredLanes)===0||Ur(e,n),h=s?N3(e,n):pf(e,n,!0),v=s;do{if(h===0){Pa&&!s&&Cr(e,n,0,!1);break}else{if(a=e.current.alternate,v&&!S3(a)){h=pf(e,n,!1),v=!1;continue}if(h===2){if(v=n,e.errorRecoveryDisabledLanes&v)var _=0;else _=e.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){n=_;e:{var j=e;h=ol;var U=j.current.memoizedState.isDehydrated;if(U&&(ei(j,_).flags|=256),_=pf(j,_,!1),_!==2){if(cf&&!U){j.errorRecoveryDisabledLanes|=v,la|=v,h=4;break e}v=qt,qt=h,v!==null&&(qt===null?qt=v:qt.push.apply(qt,v))}h=_}if(v=!1,h!==2)continue}}if(h===1){ei(e,0),Cr(e,n,0,!0);break}e:{switch(s=e,v=h,v){case 0:case 1:throw Error(l(345));case 4:if((n&4194048)!==n)break;case 6:Cr(s,n,Yt,!wr);break e;case 2:qt=null;break;case 3:case 5:break;default:throw Error(l(329))}if((n&62914560)===n&&(h=Po+300-Pe(),10<h)){if(Cr(s,n,Yt,!wr),Ea(s,0,!0)!==0)break e;$n=n,s.timeoutHandle=kx(lx.bind(null,s,a,qt,Wo,df,n,Yt,la,Ja,wr,v,"Throttled",-0,0),h);break e}lx(s,a,qt,Wo,df,n,Yt,la,Ja,wr,v,null,-0,0)}}break}while(!0);En(e)}function lx(e,n,a,s,h,v,_,j,U,te,se,ce,re,ie){if(e.timeoutHandle=-1,ce=n.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Dn},J1(n,v,ce);var de=(v&62914560)===v?Po-Pe():(v&4194048)===v?nx-Pe():0;if(de=oM(ce,de),de!==null){$n=v,e.cancelPendingCommit=de(gx.bind(null,e,n,v,a,s,h,_,j,U,se,ce,null,re,ie)),Cr(e,v,_,!te);return}}gx(e,n,v,a,s,h,_,j,U)}function S3(e){for(var n=e;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var s=0;s<a.length;s++){var h=a[s],v=h.getSnapshot;h=h.value;try{if(!Lt(v(),h))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Cr(e,n,a,s){n&=~ff,n&=~la,e.suspendedLanes|=n,e.pingedLanes&=~n,s&&(e.warmLanes|=n),s=e.expirationTimes;for(var h=n;0<h;){var v=31-wt(h),_=1<<v;s[v]=-1,h&=~_}a!==0&&Wl(e,a,n)}function es(){return(ke&6)===0?(ul(0),!1):!0}function mf(){if(Ae!==null){if(He===0)var e=Ae.return;else e=Ae,Bn=Pr=null,Rc(e),Ia=null,Xi=0,e=Ae;for(;e!==null;)H1(e.alternate,e),e=e.return;Ae=null}}function ei(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Y3(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),$n=0,mf(),Ve=e,Ae=a=Hn(e.current,null),Me=n,He=0,Vt=null,wr=!1,Pa=Ur(e,n),cf=!1,Ja=Yt=ff=la=Sr=We=0,qt=ol=null,df=!1,(n&8)!==0&&(n|=n&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=n;0<s;){var h=31-wt(s),v=1<<h;n|=e[h],s&=~v}return Qn=n,_o(),a}function ox(e,n){Ne=null,O.H=Wi,n===Ya||n===jo?(n=S0(),He=3):n===xc?(n=S0(),He=4):He=n===Fc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Vt=n,Ae===null&&(We=1,Yo(e,Qt(n,e.current)))}function sx(){var e=Ut.current;return e===null?!0:(Me&4194048)===Me?Wt===null:(Me&62914560)===Me||(Me&536870912)!==0?e===Wt:!1}function ux(){var e=O.H;return O.H=Wi,e===null?Wi:e}function cx(){var e=O.A;return O.A=_3,e}function ts(){We=4,wr||(Me&4194048)!==Me&&Ut.current!==null||(Pa=!0),(Sr&134217727)===0&&(la&134217727)===0||Ve===null||Cr(Ve,Me,Yt,!1)}function pf(e,n,a){var s=ke;ke|=2;var h=ux(),v=cx();(Ve!==e||Me!==n)&&(Wo=null,ei(e,n)),n=!1;var _=We;e:do try{if(He!==0&&Ae!==null){var j=Ae,U=Vt;switch(He){case 8:mf(),_=6;break e;case 3:case 2:case 9:case 6:Ut.current===null&&(n=!0);var te=He;if(He=0,Vt=null,ti(e,j,U,te),a&&Pa){_=0;break e}break;default:te=He,He=0,Vt=null,ti(e,j,U,te)}}E3(),_=We;break}catch(se){ox(e,se)}while(!0);return n&&e.shellSuspendCounter++,Bn=Pr=null,ke=s,O.H=h,O.A=v,Ae===null&&(Ve=null,Me=0,_o()),_}function E3(){for(;Ae!==null;)fx(Ae)}function N3(e,n){var a=ke;ke|=2;var s=ux(),h=cx();Ve!==e||Me!==n?(Wo=null,Jo=Pe()+500,ei(e,n)):Pa=Ur(e,n);e:do try{if(He!==0&&Ae!==null){n=Ae;var v=Vt;t:switch(He){case 1:He=0,Vt=null,ti(e,n,v,1);break;case 2:case 9:if(_0(v)){He=0,Vt=null,dx(n);break}n=function(){He!==2&&He!==9||Ve!==e||(He=7),En(e)},v.then(n,n);break e;case 3:He=7;break e;case 4:He=5;break e;case 7:_0(v)?(He=0,Vt=null,dx(n)):(He=0,Vt=null,ti(e,n,v,7));break;case 5:var _=null;switch(Ae.tag){case 26:_=Ae.memoizedState;case 5:case 27:var j=Ae;if(_?Px(_):j.stateNode.complete){He=0,Vt=null;var U=j.sibling;if(U!==null)Ae=U;else{var te=j.return;te!==null?(Ae=te,ns(te)):Ae=null}break t}}He=0,Vt=null,ti(e,n,v,5);break;case 6:He=0,Vt=null,ti(e,n,v,6);break;case 8:mf(),We=6;break e;default:throw Error(l(462))}}C3();break}catch(se){ox(e,se)}while(!0);return Bn=Pr=null,O.H=s,O.A=h,ke=a,Ae!==null?0:(Ve=null,Me=0,_o(),We)}function C3(){for(;Ae!==null&&!yt();)fx(Ae)}function fx(e){var n=D1(e.alternate,e,Qn);e.memoizedProps=e.pendingProps,n===null?ns(e):Ae=n}function dx(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=j1(a,n,n.pendingProps,n.type,void 0,Me);break;case 11:n=j1(a,n,n.pendingProps,n.type.render,n.ref,Me);break;case 5:Rc(n);default:H1(a,n),n=Ae=c0(n,Qn),n=D1(a,n,Qn)}e.memoizedProps=e.pendingProps,n===null?ns(e):Ae=n}function ti(e,n,a,s){Bn=Pr=null,Rc(n),Ia=null,Xi=0;var h=n.return;try{if(g3(e,h,n,a,Me)){We=1,Yo(e,Qt(a,e.current)),Ae=null;return}}catch(v){if(h!==null)throw Ae=h,v;We=1,Yo(e,Qt(a,e.current)),Ae=null;return}n.flags&32768?(qe||s===1?e=!0:Pa||(Me&536870912)!==0?e=!1:(wr=e=!0,(s===2||s===9||s===3||s===6)&&(s=Ut.current,s!==null&&s.tag===13&&(s.flags|=16384))),hx(n,e)):ns(n)}function ns(e){var n=e;do{if((n.flags&32768)!==0){hx(n,wr);return}e=n.return;var a=p3(n.alternate,n,Qn);if(a!==null){Ae=a;return}if(n=n.sibling,n!==null){Ae=n;return}Ae=n=e}while(n!==null);We===0&&(We=5)}function hx(e,n){do{var a=y3(e.alternate,e);if(a!==null){a.flags&=32767,Ae=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(e=e.sibling,e!==null)){Ae=e;return}Ae=e=a}while(e!==null);We=6,Ae=null}function gx(e,n,a,s,h,v,_,j,U){e.cancelPendingCommit=null;do rs();while(ft!==0);if((ke&6)!==0)throw Error(l(327));if(n!==null){if(n===e.current)throw Error(l(177));if(v=n.lanes|n.childLanes,v|=ac,zu(e,a,v,_,j,U),e===Ve&&(Ae=Ve=null,Me=0),Wa=n,Nr=e,$n=a,hf=v,gf=h,rx=s,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,M3(Nt,function(){return xx(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||s){s=O.T,O.T=null,h=G.p,G.p=2,_=ke,ke|=4;try{x3(e,n,a)}finally{ke=_,G.p=h,O.T=s}}ft=1,vx(),mx(),px()}}function vx(){if(ft===1){ft=0;var e=Nr,n=Wa,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=O.T,O.T=null;var s=G.p;G.p=2;var h=ke;ke|=4;try{Q1(n,e);var v=jf,_=t0(e.containerInfo),j=v.focusedElem,U=v.selectionRange;if(_!==j&&j&&j.ownerDocument&&e0(j.ownerDocument.documentElement,j)){if(U!==null&&Wu(j)){var te=U.start,se=U.end;if(se===void 0&&(se=te),"selectionStart"in j)j.selectionStart=te,j.selectionEnd=Math.min(se,j.value.length);else{var ce=j.ownerDocument||document,re=ce&&ce.defaultView||window;if(re.getSelection){var ie=re.getSelection(),de=j.textContent.length,Se=Math.min(U.start,de),Ge=U.end===void 0?Se:Math.min(U.end,de);!ie.extend&&Se>Ge&&(_=Ge,Ge=Se,Se=_);var $=Wy(j,Se),Z=Wy(j,Ge);if($&&Z&&(ie.rangeCount!==1||ie.anchorNode!==$.node||ie.anchorOffset!==$.offset||ie.focusNode!==Z.node||ie.focusOffset!==Z.offset)){var ee=ce.createRange();ee.setStart($.node,$.offset),ie.removeAllRanges(),Se>Ge?(ie.addRange(ee),ie.extend(Z.node,Z.offset)):(ee.setEnd(Z.node,Z.offset),ie.addRange(ee))}}}}for(ce=[],ie=j;ie=ie.parentNode;)ie.nodeType===1&&ce.push({element:ie,left:ie.scrollLeft,top:ie.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<ce.length;j++){var ue=ce[j];ue.element.scrollLeft=ue.left,ue.element.scrollTop=ue.top}}vs=!!Af,jf=Af=null}finally{ke=h,G.p=s,O.T=a}}e.current=n,ft=2}}function mx(){if(ft===2){ft=0;var e=Nr,n=Wa,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=O.T,O.T=null;var s=G.p;G.p=2;var h=ke;ke|=4;try{I1(e,n.alternate,n)}finally{ke=h,G.p=s,O.T=a}}ft=3}}function px(){if(ft===4||ft===3){ft=0,$e();var e=Nr,n=Wa,a=$n,s=rx;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?ft=5:(ft=0,Wa=Nr=null,yx(e,e.pendingLanes));var h=e.pendingLanes;if(h===0&&(Er=null),Ai(a),n=n.stateNode,Qe&&typeof Qe.onCommitFiberRoot=="function")try{Qe.onCommitFiberRoot(xt,n,void 0,(n.current.flags&128)===128)}catch{}if(s!==null){n=O.T,h=G.p,G.p=2,O.T=null;try{for(var v=e.onRecoverableError,_=0;_<s.length;_++){var j=s[_];v(j.value,{componentStack:j.stack})}}finally{O.T=n,G.p=h}}($n&3)!==0&&rs(),En(e),h=e.pendingLanes,(a&261930)!==0&&(h&42)!==0?e===vf?sl++:(sl=0,vf=e):sl=0,ul(0)}}function yx(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Yi(n)))}function rs(){return vx(),mx(),px(),xx()}function xx(){if(ft!==5)return!1;var e=Nr,n=hf;hf=0;var a=Ai($n),s=O.T,h=G.p;try{G.p=32>a?32:a,O.T=null,a=gf,gf=null;var v=Nr,_=$n;if(ft=0,Wa=Nr=null,$n=0,(ke&6)!==0)throw Error(l(331));var j=ke;if(ke|=4,ex(v.current),P1(v,v.current,_,a),ke=j,ul(0,!1),Qe&&typeof Qe.onPostCommitFiberRoot=="function")try{Qe.onPostCommitFiberRoot(xt,v)}catch{}return!0}finally{G.p=h,O.T=s,yx(e,n)}}function bx(e,n,a){n=Qt(a,n),n=Zc(e.stateNode,n,2),e=yr(e,n,2),e!==null&&(Gr(e,2),En(e))}function Le(e,n,a){if(e.tag===3)bx(e,e,a);else for(;n!==null;){if(n.tag===3){bx(n,e,a);break}else if(n.tag===1){var s=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Er===null||!Er.has(s))){e=Qt(a,e),a=_1(2),s=yr(n,a,2),s!==null&&(w1(a,s,n,e),Gr(s,2),En(s));break}}n=n.return}}function yf(e,n,a){var s=e.pingCache;if(s===null){s=e.pingCache=new w3;var h=new Set;s.set(n,h)}else h=s.get(n),h===void 0&&(h=new Set,s.set(n,h));h.has(a)||(cf=!0,h.add(a),e=T3.bind(null,e,n,a),n.then(e,e))}function T3(e,n,a){var s=e.pingCache;s!==null&&s.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ve===e&&(Me&a)===a&&(We===4||We===3&&(Me&62914560)===Me&&300>Pe()-Po?(ke&2)===0&&ei(e,0):ff|=a,Ja===Me&&(Ja=0)),En(e)}function _x(e,n){n===0&&(n=Jl()),e=Kr(e,n),e!==null&&(Gr(e,n),En(e))}function A3(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),_x(e,a)}function j3(e,n){var a=0;switch(e.tag){case 31:case 13:var s=e.stateNode,h=e.memoizedState;h!==null&&(a=h.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(l(314))}s!==null&&s.delete(n),_x(e,a)}function M3(e,n){return Ht(e,n)}var as=null,ni=null,xf=!1,is=!1,bf=!1,Tr=0;function En(e){e!==ni&&e.next===null&&(ni===null?as=ni=e:ni=ni.next=e),is=!0,xf||(xf=!0,q3())}function ul(e,n){if(!bf&&is){bf=!0;do for(var a=!1,s=as;s!==null;){if(e!==0){var h=s.pendingLanes;if(h===0)var v=0;else{var _=s.suspendedLanes,j=s.pingedLanes;v=(1<<31-wt(42|e)+1)-1,v&=h&~(_&~j),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(a=!0,Nx(s,v))}else v=Me,v=Ea(s,s===Ve?v:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(v&3)===0||Ur(s,v)||(a=!0,Nx(s,v));s=s.next}while(a);bf=!1}}function R3(){wx()}function wx(){is=xf=!1;var e=0;Tr!==0&&V3()&&(e=Tr);for(var n=Pe(),a=null,s=as;s!==null;){var h=s.next,v=Sx(s,n);v===0?(s.next=null,a===null?as=h:a.next=h,h===null&&(ni=a)):(a=s,(e!==0||(v&3)!==0)&&(is=!0)),s=h}ft!==0&&ft!==5||ul(e),Tr!==0&&(Tr=0)}function Sx(e,n){for(var a=e.suspendedLanes,s=e.pingedLanes,h=e.expirationTimes,v=e.pendingLanes&-62914561;0<v;){var _=31-wt(v),j=1<<_,U=h[_];U===-1?((j&a)===0||(j&s)!==0)&&(h[_]=Ou(j,n)):U<=n&&(e.expiredLanes|=j),v&=~j}if(n=Ve,a=Me,a=Ea(e,e===n?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,a===0||e===n&&(He===2||He===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Et(s),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Ur(e,a)){if(n=a&-a,n===e.callbackPriority)return n;switch(s!==null&&Et(s),Ai(a)){case 2:case 8:a=on;break;case 32:a=Nt;break;case 268435456:a=Mn;break;default:a=Nt}return s=Ex.bind(null,e),a=Ht(a,s),e.callbackPriority=n,e.callbackNode=a,n}return s!==null&&s!==null&&Et(s),e.callbackPriority=2,e.callbackNode=null,2}function Ex(e,n){if(ft!==0&&ft!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(rs()&&e.callbackNode!==a)return null;var s=Me;return s=Ea(e,e===Ve?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(ix(e,s,n),Sx(e,Pe()),e.callbackNode!=null&&e.callbackNode===a?Ex.bind(null,e):null)}function Nx(e,n){if(rs())return null;ix(e,n,!0)}function q3(){I3(function(){(ke&6)!==0?Ht(ln,R3):wx()})}function _f(){if(Tr===0){var e=Ga;e===0&&(e=_a,_a<<=1,(_a&261888)===0&&(_a=256)),Tr=e}return Tr}function Cx(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ho(""+e)}function Tx(e,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,e.id&&a.setAttribute("form",e.id),n.parentNode.insertBefore(a,n),e=new FormData(e),a.parentNode.removeChild(a),e}function O3(e,n,a,s,h){if(n==="submit"&&a&&a.stateNode===h){var v=Cx((h[bt]||null).action),_=s.submitter;_&&(n=(n=_[bt]||null)?Cx(n.formAction):_.getAttribute("formAction"),n!==null&&(v=n,_=null));var j=new po("action","action",null,s,h);e.push({event:j,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Tr!==0){var U=_?Tx(h,_):new FormData(h);Uc(a,{pending:!0,data:U,method:h.method,action:v},null,U)}}else typeof v=="function"&&(j.preventDefault(),U=_?Tx(h,_):new FormData(h),Uc(a,{pending:!0,data:U,method:h.method,action:v},v,U))},currentTarget:h}]})}}for(var wf=0;wf<rc.length;wf++){var Sf=rc[wf],z3=Sf.toLowerCase(),D3=Sf[0].toUpperCase()+Sf.slice(1);un(z3,"on"+D3)}un(a0,"onAnimationEnd"),un(i0,"onAnimationIteration"),un(l0,"onAnimationStart"),un("dblclick","onDoubleClick"),un("focusin","onFocus"),un("focusout","onBlur"),un(Pj,"onTransitionRun"),un(Jj,"onTransitionStart"),un(Wj,"onTransitionCancel"),un(o0,"onTransitionEnd"),cr("onMouseEnter",["mouseout","mouseover"]),cr("onMouseLeave",["mouseout","mouseover"]),cr("onPointerEnter",["pointerout","pointerover"]),cr("onPointerLeave",["pointerout","pointerover"]),On("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),On("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),On("onBeforeInput",["compositionend","keypress","textInput","paste"]),On("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),On("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),On("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cl="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(" "),k3=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(cl));function Ax(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var s=e[a],h=s.event;s=s.listeners;e:{var v=void 0;if(n)for(var _=s.length-1;0<=_;_--){var j=s[_],U=j.instance,te=j.currentTarget;if(j=j.listener,U!==v&&h.isPropagationStopped())break e;v=j,h.currentTarget=te;try{v(h)}catch(se){bo(se)}h.currentTarget=null,v=U}else for(_=0;_<s.length;_++){if(j=s[_],U=j.instance,te=j.currentTarget,j=j.listener,U!==v&&h.isPropagationStopped())break e;v=j,h.currentTarget=te;try{v(h)}catch(se){bo(se)}h.currentTarget=null,v=U}}}}function je(e,n){var a=n[Na];a===void 0&&(a=n[Na]=new Set);var s=e+"__bubble";a.has(s)||(jx(n,e,2,!1),a.add(s))}function Ef(e,n,a){var s=0;n&&(s|=4),jx(a,e,s,n)}var ls="_reactListening"+Math.random().toString(36).slice(2);function Nf(e){if(!e[ls]){e[ls]=!0,lo.forEach(function(a){a!=="selectionchange"&&(k3.has(a)||Ef(a,!1,e),Ef(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[ls]||(n[ls]=!0,Ef("selectionchange",!1,n))}}function jx(e,n,a,s){switch(ab(n)){case 2:var h=cM;break;case 8:h=fM;break;default:h=Uf}a=h.bind(null,n,a,e),h=void 0,!Iu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(h=!0),s?h!==void 0?e.addEventListener(n,a,{capture:!0,passive:h}):e.addEventListener(n,a,!0):h!==void 0?e.addEventListener(n,a,{passive:h}):e.addEventListener(n,a,!1)}function Cf(e,n,a,s,h){var v=s;if((n&1)===0&&(n&2)===0&&s!==null)e:for(;;){if(s===null)return;var _=s.tag;if(_===3||_===4){var j=s.stateNode.containerInfo;if(j===h)break;if(_===4)for(_=s.return;_!==null;){var U=_.tag;if((U===3||U===4)&&_.stateNode.containerInfo===h)return;_=_.return}for(;j!==null;){if(_=lr(j),_===null)return;if(U=_.tag,U===5||U===6||U===26||U===27){s=v=_;continue e}j=j.parentNode}}s=s.return}zy(function(){var te=v,se=Vu(a),ce=[];e:{var re=s0.get(e);if(re!==void 0){var ie=po,de=e;switch(e){case"keypress":if(vo(a)===0)break e;case"keydown":case"keyup":ie=jj;break;case"focusin":de="focus",ie=Ku;break;case"focusout":de="blur",ie=Ku;break;case"beforeblur":case"afterblur":ie=Ku;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ie=Hy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ie=pj;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ie=qj;break;case a0:case i0:case l0:ie=bj;break;case o0:ie=zj;break;case"scroll":case"scrollend":ie=vj;break;case"wheel":ie=kj;break;case"copy":case"cut":case"paste":ie=wj;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ie=By;break;case"toggle":case"beforetoggle":ie=Lj}var Se=(n&4)!==0,Ge=!Se&&(e==="scroll"||e==="scrollend"),$=Se?re!==null?re+"Capture":null:re;Se=[];for(var Z=te,ee;Z!==null;){var ue=Z;if(ee=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||ee===null||$===null||(ue=qi(Z,$),ue!=null&&Se.push(fl(Z,ue,ee))),Ge)break;Z=Z.return}0<Se.length&&(re=new ie(re,de,null,a,se),ce.push({event:re,listeners:Se}))}}if((n&7)===0){e:{if(re=e==="mouseover"||e==="pointerover",ie=e==="mouseout"||e==="pointerout",re&&a!==Gu&&(de=a.relatedTarget||a.fromElement)&&(lr(de)||de[qn]))break e;if((ie||re)&&(re=se.window===se?se:(re=se.ownerDocument)?re.defaultView||re.parentWindow:window,ie?(de=a.relatedTarget||a.toElement,ie=te,de=de?lr(de):null,de!==null&&(Ge=u(de),Se=de.tag,de!==Ge||Se!==5&&Se!==27&&Se!==6)&&(de=null)):(ie=null,de=te),ie!==de)){if(Se=Hy,ue="onMouseLeave",$="onMouseEnter",Z="mouse",(e==="pointerout"||e==="pointerover")&&(Se=By,ue="onPointerLeave",$="onPointerEnter",Z="pointer"),Ge=ie==null?re:sr(ie),ee=de==null?re:sr(de),re=new Se(ue,Z+"leave",ie,a,se),re.target=Ge,re.relatedTarget=ee,ue=null,lr(se)===te&&(Se=new Se($,Z+"enter",de,a,se),Se.target=ee,Se.relatedTarget=Ge,ue=Se),Ge=ue,ie&&de)t:{for(Se=H3,$=ie,Z=de,ee=0,ue=$;ue;ue=Se(ue))ee++;ue=0;for(var be=Z;be;be=Se(be))ue++;for(;0<ee-ue;)$=Se($),ee--;for(;0<ue-ee;)Z=Se(Z),ue--;for(;ee--;){if($===Z||Z!==null&&$===Z.alternate){Se=$;break t}$=Se($),Z=Se(Z)}Se=null}else Se=null;ie!==null&&Mx(ce,re,ie,Se,!1),de!==null&&Ge!==null&&Mx(ce,Ge,de,Se,!0)}}e:{if(re=te?sr(te):window,ie=re.nodeName&&re.nodeName.toLowerCase(),ie==="select"||ie==="input"&&re.type==="file")var ze=Fy;else if(Xy(re))if(Ky)ze=Kj;else{ze=Zj;var me=Xj}else ie=re.nodeName,!ie||ie.toLowerCase()!=="input"||re.type!=="checkbox"&&re.type!=="radio"?te&&Uu(te.elementType)&&(ze=Fy):ze=Fj;if(ze&&(ze=ze(e,te))){Zy(ce,ze,a,se);break e}me&&me(e,re,te),e==="focusout"&&te&&re.type==="number"&&te.memoizedProps.value!=null&&Ri(re,"number",re.value)}switch(me=te?sr(te):window,e){case"focusin":(Xy(me)||me.contentEditable==="true")&&(Oa=me,ec=te,Ui=null);break;case"focusout":Ui=ec=Oa=null;break;case"mousedown":tc=!0;break;case"contextmenu":case"mouseup":case"dragend":tc=!1,n0(ce,a,se);break;case"selectionchange":if($j)break;case"keydown":case"keyup":n0(ce,a,se)}var Ce;if($u)e:{switch(e){case"compositionstart":var Re="onCompositionStart";break e;case"compositionend":Re="onCompositionEnd";break e;case"compositionupdate":Re="onCompositionUpdate";break e}Re=void 0}else qa?Yy(e,a)&&(Re="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Re="onCompositionStart");Re&&(Uy&&a.locale!=="ko"&&(qa||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&qa&&(Ce=Dy()):(fr=se,Xu="value"in fr?fr.value:fr.textContent,qa=!0)),me=os(te,Re),0<me.length&&(Re=new Ly(Re,e,null,a,se),ce.push({event:Re,listeners:me}),Ce?Re.data=Ce:(Ce=Iy(a),Ce!==null&&(Re.data=Ce)))),(Ce=Uj?Gj(e,a):Vj(e,a))&&(Re=os(te,"onBeforeInput"),0<Re.length&&(me=new Ly("onBeforeInput","beforeinput",null,a,se),ce.push({event:me,listeners:Re}),me.data=Ce)),O3(ce,e,te,a,se)}Ax(ce,n)})}function fl(e,n,a){return{instance:e,listener:n,currentTarget:a}}function os(e,n){for(var a=n+"Capture",s=[];e!==null;){var h=e,v=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||v===null||(h=qi(e,a),h!=null&&s.unshift(fl(e,h,v)),h=qi(e,n),h!=null&&s.push(fl(e,h,v))),e.tag===3)return s;e=e.return}return[]}function H3(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Mx(e,n,a,s,h){for(var v=n._reactName,_=[];a!==null&&a!==s;){var j=a,U=j.alternate,te=j.stateNode;if(j=j.tag,U!==null&&U===s)break;j!==5&&j!==26&&j!==27||te===null||(U=te,h?(te=qi(a,v),te!=null&&_.unshift(fl(a,te,U))):h||(te=qi(a,v),te!=null&&_.push(fl(a,te,U)))),a=a.return}_.length!==0&&e.push({event:n,listeners:_})}var L3=/\r\n?/g,B3=/\u0000|\uFFFD/g;function Rx(e){return(typeof e=="string"?e:""+e).replace(L3,`
|
|
9
|
+
`).replace(B3,"")}function qx(e,n){return n=Rx(n),Rx(e)===n}function Ue(e,n,a,s,h,v){switch(a){case"children":typeof s=="string"?n==="body"||n==="textarea"&&s===""||ja(e,s):(typeof s=="number"||typeof s=="bigint")&&n!=="body"&&ja(e,""+s);break;case"className":Ta(e,"class",s);break;case"tabIndex":Ta(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Ta(e,a,s);break;case"style":qy(e,s,v);break;case"data":if(n!=="object"){Ta(e,"data",s);break}case"src":case"href":if(s===""&&(n!=="a"||a!=="href")){e.removeAttribute(a);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=ho(""+s),e.setAttribute(a,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof v=="function"&&(a==="formAction"?(n!=="input"&&Ue(e,n,"name",h.name,h,null),Ue(e,n,"formEncType",h.formEncType,h,null),Ue(e,n,"formMethod",h.formMethod,h,null),Ue(e,n,"formTarget",h.formTarget,h,null)):(Ue(e,n,"encType",h.encType,h,null),Ue(e,n,"method",h.method,h,null),Ue(e,n,"target",h.target,h,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=ho(""+s),e.setAttribute(a,s);break;case"onClick":s!=null&&(e.onclick=Dn);break;case"onScroll":s!=null&&je("scroll",e);break;case"onScrollEnd":s!=null&&je("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(a=s.__html,a!=null){if(h.children!=null)throw Error(l(60));e.innerHTML=a}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}a=ho(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""+s):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":s===!0?e.setAttribute(a,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,s):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(a,s):e.removeAttribute(a);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(a):e.setAttribute(a,s);break;case"popover":je("beforetoggle",e),je("toggle",e),Ca(e,"popover",s);break;case"xlinkActuate":sn(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":sn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":sn(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":sn(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":sn(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":sn(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":sn(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":sn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":sn(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Ca(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=hj.get(a)||a,Ca(e,a,s))}}function Tf(e,n,a,s,h,v){switch(a){case"style":qy(e,s,v);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(a=s.__html,a!=null){if(h.children!=null)throw Error(l(60));e.innerHTML=a}}break;case"children":typeof s=="string"?ja(e,s):(typeof s=="number"||typeof s=="bigint")&&ja(e,""+s);break;case"onScroll":s!=null&&je("scroll",e);break;case"onScrollEnd":s!=null&&je("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Dn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!oo.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(h=a.endsWith("Capture"),n=a.slice(2,h?a.length-7:void 0),v=e[bt]||null,v=v!=null?v[a]:null,typeof v=="function"&&e.removeEventListener(n,v,h),typeof s=="function")){typeof v!="function"&&v!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(n,s,h);break e}a in e?e[a]=s:s===!0?e.setAttribute(a,""):Ca(e,a,s)}}}function pt(e,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":je("error",e),je("load",e);var s=!1,h=!1,v;for(v in a)if(a.hasOwnProperty(v)){var _=a[v];if(_!=null)switch(v){case"src":s=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,n));default:Ue(e,n,v,_,a,null)}}h&&Ue(e,n,"srcSet",a.srcSet,a,null),s&&Ue(e,n,"src",a.src,a,null);return;case"input":je("invalid",e);var j=v=_=h=null,U=null,te=null;for(s in a)if(a.hasOwnProperty(s)){var se=a[s];if(se!=null)switch(s){case"name":h=se;break;case"type":_=se;break;case"checked":U=se;break;case"defaultChecked":te=se;break;case"value":v=se;break;case"defaultValue":j=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(l(137,n));break;default:Ue(e,n,s,se,a,null)}}fo(e,v,j,U,te,_,h,!1);return;case"select":je("invalid",e),s=_=v=null;for(h in a)if(a.hasOwnProperty(h)&&(j=a[h],j!=null))switch(h){case"value":v=j;break;case"defaultValue":_=j;break;case"multiple":s=j;default:Ue(e,n,h,j,a,null)}n=v,a=_,e.multiple=!!s,n!=null?zn(e,!!s,n,!1):a!=null&&zn(e,!!s,a,!0);return;case"textarea":je("invalid",e),v=h=s=null;for(_ in a)if(a.hasOwnProperty(_)&&(j=a[_],j!=null))switch(_){case"value":s=j;break;case"defaultValue":h=j;break;case"children":v=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(l(91));break;default:Ue(e,n,_,j,a,null)}My(e,s,h,v);return;case"option":for(U in a)a.hasOwnProperty(U)&&(s=a[U],s!=null)&&(U==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":Ue(e,n,U,s,a,null));return;case"dialog":je("beforetoggle",e),je("toggle",e),je("cancel",e),je("close",e);break;case"iframe":case"object":je("load",e);break;case"video":case"audio":for(s=0;s<cl.length;s++)je(cl[s],e);break;case"image":je("error",e),je("load",e);break;case"details":je("toggle",e);break;case"embed":case"source":case"link":je("error",e),je("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(te in a)if(a.hasOwnProperty(te)&&(s=a[te],s!=null))switch(te){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,n));default:Ue(e,n,te,s,a,null)}return;default:if(Uu(n)){for(se in a)a.hasOwnProperty(se)&&(s=a[se],s!==void 0&&Tf(e,n,se,s,a,void 0));return}}for(j in a)a.hasOwnProperty(j)&&(s=a[j],s!=null&&Ue(e,n,j,s,a,null))}function U3(e,n,a,s){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,v=null,_=null,j=null,U=null,te=null,se=null;for(ie in a){var ce=a[ie];if(a.hasOwnProperty(ie)&&ce!=null)switch(ie){case"checked":break;case"value":break;case"defaultValue":U=ce;default:s.hasOwnProperty(ie)||Ue(e,n,ie,null,s,ce)}}for(var re in s){var ie=s[re];if(ce=a[re],s.hasOwnProperty(re)&&(ie!=null||ce!=null))switch(re){case"type":v=ie;break;case"name":h=ie;break;case"checked":te=ie;break;case"defaultChecked":se=ie;break;case"value":_=ie;break;case"defaultValue":j=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(l(137,n));break;default:ie!==ce&&Ue(e,n,re,ie,s,ce)}}Ir(e,_,j,U,te,se,v,h);return;case"select":ie=_=j=re=null;for(v in a)if(U=a[v],a.hasOwnProperty(v)&&U!=null)switch(v){case"value":break;case"multiple":ie=U;default:s.hasOwnProperty(v)||Ue(e,n,v,null,s,U)}for(h in s)if(v=s[h],U=a[h],s.hasOwnProperty(h)&&(v!=null||U!=null))switch(h){case"value":re=v;break;case"defaultValue":j=v;break;case"multiple":_=v;default:v!==U&&Ue(e,n,h,v,s,U)}n=j,a=_,s=ie,re!=null?zn(e,!!a,re,!1):!!s!=!!a&&(n!=null?zn(e,!!a,n,!0):zn(e,!!a,a?[]:"",!1));return;case"textarea":ie=re=null;for(j in a)if(h=a[j],a.hasOwnProperty(j)&&h!=null&&!s.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:Ue(e,n,j,null,s,h)}for(_ in s)if(h=s[_],v=a[_],s.hasOwnProperty(_)&&(h!=null||v!=null))switch(_){case"value":re=h;break;case"defaultValue":ie=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(l(91));break;default:h!==v&&Ue(e,n,_,h,s,v)}jy(e,re,ie);return;case"option":for(var de in a)re=a[de],a.hasOwnProperty(de)&&re!=null&&!s.hasOwnProperty(de)&&(de==="selected"?e.selected=!1:Ue(e,n,de,null,s,re));for(U in s)re=s[U],ie=a[U],s.hasOwnProperty(U)&&re!==ie&&(re!=null||ie!=null)&&(U==="selected"?e.selected=re&&typeof re!="function"&&typeof re!="symbol":Ue(e,n,U,re,s,ie));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Se in a)re=a[Se],a.hasOwnProperty(Se)&&re!=null&&!s.hasOwnProperty(Se)&&Ue(e,n,Se,null,s,re);for(te in s)if(re=s[te],ie=a[te],s.hasOwnProperty(te)&&re!==ie&&(re!=null||ie!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(l(137,n));break;default:Ue(e,n,te,re,s,ie)}return;default:if(Uu(n)){for(var Ge in a)re=a[Ge],a.hasOwnProperty(Ge)&&re!==void 0&&!s.hasOwnProperty(Ge)&&Tf(e,n,Ge,void 0,s,re);for(se in s)re=s[se],ie=a[se],!s.hasOwnProperty(se)||re===ie||re===void 0&&ie===void 0||Tf(e,n,se,re,s,ie);return}}for(var $ in a)re=a[$],a.hasOwnProperty($)&&re!=null&&!s.hasOwnProperty($)&&Ue(e,n,$,null,s,re);for(ce in s)re=s[ce],ie=a[ce],!s.hasOwnProperty(ce)||re===ie||re==null&&ie==null||Ue(e,n,ce,re,s,ie)}function Ox(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function G3(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,a=performance.getEntriesByType("resource"),s=0;s<a.length;s++){var h=a[s],v=h.transferSize,_=h.initiatorType,j=h.duration;if(v&&j&&Ox(_)){for(_=0,j=h.responseEnd,s+=1;s<a.length;s++){var U=a[s],te=U.startTime;if(te>j)break;var se=U.transferSize,ce=U.initiatorType;se&&Ox(ce)&&(U=U.responseEnd,_+=se*(U<j?1:(j-te)/(U-te)))}if(--s,n+=8*(v+_)/(h.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Af=null,jf=null;function ss(e){return e.nodeType===9?e:e.ownerDocument}function zx(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Dx(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Mf(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Rf=null;function V3(){var e=window.event;return e&&e.type==="popstate"?e===Rf?!1:(Rf=e,!0):(Rf=null,!1)}var kx=typeof setTimeout=="function"?setTimeout:void 0,Y3=typeof clearTimeout=="function"?clearTimeout:void 0,Hx=typeof Promise=="function"?Promise:void 0,I3=typeof queueMicrotask=="function"?queueMicrotask:typeof Hx<"u"?function(e){return Hx.resolve(null).then(e).catch(X3)}:kx;function X3(e){setTimeout(function(){throw e})}function Ar(e){return e==="head"}function Lx(e,n){var a=n,s=0;do{var h=a.nextSibling;if(e.removeChild(a),h&&h.nodeType===8)if(a=h.data,a==="/$"||a==="/&"){if(s===0){e.removeChild(h),li(n);return}s--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")s++;else if(a==="html")dl(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,dl(a);for(var v=a.firstChild;v;){var _=v.nextSibling,j=v.nodeName;v[Vr]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&v.rel.toLowerCase()==="stylesheet"||a.removeChild(v),v=_}}else a==="body"&&dl(e.ownerDocument.body);a=h}while(a);li(n)}function Bx(e,n){var a=e;e=0;do{var s=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),s&&s.nodeType===8)if(a=s.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=s}while(a)}function qf(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":qf(a),ji(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Z3(e,n,a,s){for(;e.nodeType===1;){var h=a;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[Vr])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(v=e.getAttribute("rel"),v==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(v!==h.rel||e.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||e.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||e.getAttribute("title")!==(h.title==null?null:h.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(v=e.getAttribute("src"),(v!==(h.src==null?null:h.src)||e.getAttribute("type")!==(h.type==null?null:h.type)||e.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&v&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var v=h.name==null?null:""+h.name;if(h.type==="hidden"&&e.getAttribute("name")===v)return e}else return e;if(e=en(e.nextSibling),e===null)break}return null}function F3(e,n,a){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=en(e.nextSibling),e===null))return null;return e}function Ux(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=en(e.nextSibling),e===null))return null;return e}function Of(e){return e.data==="$?"||e.data==="$~"}function zf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function K3(e,n){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||a.readyState!=="loading")n();else{var s=function(){n(),a.removeEventListener("DOMContentLoaded",s)};a.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function en(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var Df=null;function Gx(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(n===0)return en(e.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}e=e.nextSibling}return null}function Vx(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return e;n--}else a!=="/$"&&a!=="/&"||n++}e=e.previousSibling}return null}function Yx(e,n,a){switch(n=ss(a),e){case"html":if(e=n.documentElement,!e)throw Error(l(452));return e;case"head":if(e=n.head,!e)throw Error(l(453));return e;case"body":if(e=n.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function dl(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);ji(e)}var tn=new Map,Ix=new Set;function us(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Pn=G.d;G.d={f:Q3,r:$3,D:P3,C:J3,L:W3,m:eM,X:nM,S:tM,M:rM};function Q3(){var e=Pn.f(),n=es();return e||n}function $3(e){var n=or(e);n!==null&&n.tag===5&&n.type==="form"?o1(n):Pn.r(e)}var ri=typeof document>"u"?null:document;function Xx(e,n,a){var s=ri;if(s&&typeof n=="string"&&n){var h=Tt(n);h='link[rel="'+e+'"][href="'+h+'"]',typeof a=="string"&&(h+='[crossorigin="'+a+'"]'),Ix.has(h)||(Ix.add(h),e={rel:e,crossOrigin:a,href:n},s.querySelector(h)===null&&(n=s.createElement("link"),pt(n,"link",e),rt(n),s.head.appendChild(n)))}}function P3(e){Pn.D(e),Xx("dns-prefetch",e,null)}function J3(e,n){Pn.C(e,n),Xx("preconnect",e,n)}function W3(e,n,a){Pn.L(e,n,a);var s=ri;if(s&&e&&n){var h='link[rel="preload"][as="'+Tt(n)+'"]';n==="image"&&a&&a.imageSrcSet?(h+='[imagesrcset="'+Tt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(h+='[imagesizes="'+Tt(a.imageSizes)+'"]')):h+='[href="'+Tt(e)+'"]';var v=h;switch(n){case"style":v=ai(e);break;case"script":v=ii(e)}tn.has(v)||(e=p({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),tn.set(v,e),s.querySelector(h)!==null||n==="style"&&s.querySelector(hl(v))||n==="script"&&s.querySelector(gl(v))||(n=s.createElement("link"),pt(n,"link",e),rt(n),s.head.appendChild(n)))}}function eM(e,n){Pn.m(e,n);var a=ri;if(a&&e){var s=n&&typeof n.as=="string"?n.as:"script",h='link[rel="modulepreload"][as="'+Tt(s)+'"][href="'+Tt(e)+'"]',v=h;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=ii(e)}if(!tn.has(v)&&(e=p({rel:"modulepreload",href:e},n),tn.set(v,e),a.querySelector(h)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(gl(v)))return}s=a.createElement("link"),pt(s,"link",e),rt(s),a.head.appendChild(s)}}}function tM(e,n,a){Pn.S(e,n,a);var s=ri;if(s&&e){var h=ur(s).hoistableStyles,v=ai(e);n=n||"default";var _=h.get(v);if(!_){var j={loading:0,preload:null};if(_=s.querySelector(hl(v)))j.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":n},a),(a=tn.get(v))&&kf(e,a);var U=_=s.createElement("link");rt(U),pt(U,"link",e),U._p=new Promise(function(te,se){U.onload=te,U.onerror=se}),U.addEventListener("load",function(){j.loading|=1}),U.addEventListener("error",function(){j.loading|=2}),j.loading|=4,cs(_,n,s)}_={type:"stylesheet",instance:_,count:1,state:j},h.set(v,_)}}}function nM(e,n){Pn.X(e,n);var a=ri;if(a&&e){var s=ur(a).hoistableScripts,h=ii(e),v=s.get(h);v||(v=a.querySelector(gl(h)),v||(e=p({src:e,async:!0},n),(n=tn.get(h))&&Hf(e,n),v=a.createElement("script"),rt(v),pt(v,"link",e),a.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},s.set(h,v))}}function rM(e,n){Pn.M(e,n);var a=ri;if(a&&e){var s=ur(a).hoistableScripts,h=ii(e),v=s.get(h);v||(v=a.querySelector(gl(h)),v||(e=p({src:e,async:!0,type:"module"},n),(n=tn.get(h))&&Hf(e,n),v=a.createElement("script"),rt(v),pt(v,"link",e),a.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},s.set(h,v))}}function Zx(e,n,a,s){var h=(h=I.current)?us(h):null;if(!h)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=ai(a.href),a=ur(h).hoistableStyles,s=a.get(n),s||(s={type:"style",instance:null,count:0,state:null},a.set(n,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=ai(a.href);var v=ur(h).hoistableStyles,_=v.get(e);if(_||(h=h.ownerDocument||h,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(e,_),(v=h.querySelector(hl(e)))&&!v._p&&(_.instance=v,_.state.loading=5),tn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},tn.set(e,a),v||aM(h,e,a,_.state))),n&&s===null)throw Error(l(528,""));return _}if(n&&s!==null)throw Error(l(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=ii(a),a=ur(h).hoistableScripts,s=a.get(n),s||(s={type:"script",instance:null,count:0,state:null},a.set(n,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function ai(e){return'href="'+Tt(e)+'"'}function hl(e){return'link[rel="stylesheet"]['+e+"]"}function Fx(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function aM(e,n,a,s){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?s.loading=1:(n=e.createElement("link"),s.preload=n,n.addEventListener("load",function(){return s.loading|=1}),n.addEventListener("error",function(){return s.loading|=2}),pt(n,"link",a),rt(n),e.head.appendChild(n))}function ii(e){return'[src="'+Tt(e)+'"]'}function gl(e){return"script[async]"+e}function Kx(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var s=e.querySelector('style[data-href~="'+Tt(a.href)+'"]');if(s)return n.instance=s,rt(s),s;var h=p({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),rt(s),pt(s,"style",h),cs(s,a.precedence,e),n.instance=s;case"stylesheet":h=ai(a.href);var v=e.querySelector(hl(h));if(v)return n.state.loading|=4,n.instance=v,rt(v),v;s=Fx(a),(h=tn.get(h))&&kf(s,h),v=(e.ownerDocument||e).createElement("link"),rt(v);var _=v;return _._p=new Promise(function(j,U){_.onload=j,_.onerror=U}),pt(v,"link",s),n.state.loading|=4,cs(v,a.precedence,e),n.instance=v;case"script":return v=ii(a.src),(h=e.querySelector(gl(v)))?(n.instance=h,rt(h),h):(s=a,(h=tn.get(v))&&(s=p({},a),Hf(s,h)),e=e.ownerDocument||e,h=e.createElement("script"),rt(h),pt(h,"link",s),e.head.appendChild(h),n.instance=h);case"void":return null;default:throw Error(l(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(s=n.instance,n.state.loading|=4,cs(s,a.precedence,e));return n.instance}function cs(e,n,a){for(var s=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=s.length?s[s.length-1]:null,v=h,_=0;_<s.length;_++){var j=s[_];if(j.dataset.precedence===n)v=j;else if(v!==h)break}v?v.parentNode.insertBefore(e,v.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(e,n.firstChild))}function kf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Hf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var fs=null;function Qx(e,n,a){if(fs===null){var s=new Map,h=fs=new Map;h.set(a,s)}else h=fs,s=h.get(a),s||(s=new Map,h.set(a,s));if(s.has(e))return s;for(s.set(e,null),a=a.getElementsByTagName(e),h=0;h<a.length;h++){var v=a[h];if(!(v[Vr]||v[ct]||e==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var _=v.getAttribute(n)||"";_=e+_;var j=s.get(_);j?j.push(v):s.set(_,[v])}}return s}function $x(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function iM(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(e=n.disabled,typeof n.precedence=="string"&&e==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Px(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function lM(e,n,a,s){if(a.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var h=ai(s.href),v=n.querySelector(hl(h));if(v){n=v._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=ds.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=v,rt(v);return}v=n.ownerDocument||n,s=Fx(s),(h=tn.get(h))&&kf(s,h),v=v.createElement("link"),rt(v);var _=v;_._p=new Promise(function(j,U){_.onload=j,_.onerror=U}),pt(v,"link",s),a.instance=v}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=ds.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var Lf=0;function oM(e,n){return e.stylesheets&&e.count===0&&gs(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var s=setTimeout(function(){if(e.stylesheets&&gs(e,e.stylesheets),e.unsuspend){var v=e.unsuspend;e.unsuspend=null,v()}},6e4+n);0<e.imgBytes&&Lf===0&&(Lf=62500*G3());var h=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&gs(e,e.stylesheets),e.unsuspend)){var v=e.unsuspend;e.unsuspend=null,v()}},(e.imgBytes>Lf?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(h)}}:null}function ds(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)gs(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var hs=null;function gs(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,hs=new Map,n.forEach(sM,e),hs=null,ds.call(e))}function sM(e,n){if(!(n.state.loading&4)){var a=hs.get(e);if(a)var s=a.get(null);else{a=new Map,hs.set(e,a);for(var h=e.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<h.length;v++){var _=h[v];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(a.set(_.dataset.precedence,_),s=_)}s&&a.set(null,s)}h=n.instance,_=h.getAttribute("data-precedence"),v=a.get(_)||s,v===s&&a.set(null,h),a.set(_,h),this.count++,s=ds.bind(this),h.addEventListener("load",s),h.addEventListener("error",s),v?v.parentNode.insertBefore(h,v.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(h,e.firstChild)),n.state.loading|=4}}var vl={$$typeof:w,Provider:null,Consumer:null,_currentValue:X,_currentValue2:X,_threadCount:0};function uM(e,n,a,s,h,v,_,j,U){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ci(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ci(0),this.hiddenUpdates=Ci(null),this.identifierPrefix=s,this.onUncaughtError=h,this.onCaughtError=v,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function Jx(e,n,a,s,h,v,_,j,U,te,se,ce){return e=new uM(e,n,a,_,U,te,se,ce,j),n=1,v===!0&&(n|=24),v=Bt(3,null,null,n),e.current=v,v.stateNode=e,n=mc(),n.refCount++,e.pooledCache=n,n.refCount++,v.memoizedState={element:s,isDehydrated:a,cache:n},bc(v),e}function Wx(e){return e?(e=ka,e):ka}function eb(e,n,a,s,h,v){h=Wx(h),s.context===null?s.context=h:s.pendingContext=h,s=pr(n),s.payload={element:a},v=v===void 0?null:v,v!==null&&(s.callback=v),a=yr(e,s,n),a!==null&&(Ot(a,e,n),Fi(a,e,n))}function tb(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function Bf(e,n){tb(e,n),(e=e.alternate)&&tb(e,n)}function nb(e){if(e.tag===13||e.tag===31){var n=Kr(e,67108864);n!==null&&Ot(n,e,67108864),Bf(e,67108864)}}function rb(e){if(e.tag===13||e.tag===31){var n=It();n=Ti(n);var a=Kr(e,n);a!==null&&Ot(a,e,n),Bf(e,n)}}var vs=!0;function cM(e,n,a,s){var h=O.T;O.T=null;var v=G.p;try{G.p=2,Uf(e,n,a,s)}finally{G.p=v,O.T=h}}function fM(e,n,a,s){var h=O.T;O.T=null;var v=G.p;try{G.p=8,Uf(e,n,a,s)}finally{G.p=v,O.T=h}}function Uf(e,n,a,s){if(vs){var h=Gf(s);if(h===null)Cf(e,n,s,ms,a),ib(e,s);else if(hM(h,e,n,a,s))s.stopPropagation();else if(ib(e,s),n&4&&-1<dM.indexOf(e)){for(;h!==null;){var v=or(h);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var _=Rn(v.pendingLanes);if(_!==0){var j=v;for(j.pendingLanes|=2,j.entangledLanes|=2;_;){var U=1<<31-wt(_);j.entanglements[1]|=U,_&=~U}En(v),(ke&6)===0&&(Jo=Pe()+500,ul(0))}}break;case 31:case 13:j=Kr(v,2),j!==null&&Ot(j,v,2),es(),Bf(v,2)}if(v=Gf(s),v===null&&Cf(e,n,s,ms,a),v===h)break;h=v}h!==null&&s.stopPropagation()}else Cf(e,n,s,null,a)}}function Gf(e){return e=Vu(e),Vf(e)}var ms=null;function Vf(e){if(ms=null,e=lr(e),e!==null){var n=u(e);if(n===null)e=null;else{var a=n.tag;if(a===13){if(e=c(n),e!==null)return e;e=null}else if(a===31){if(e=f(n),e!==null)return e;e=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return ms=e,null}function ab(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(an()){case ln:return 2;case on:return 8;case Nt:case xa:return 32;case Mn:return 268435456;default:return 32}default:return 32}}var Yf=!1,jr=null,Mr=null,Rr=null,ml=new Map,pl=new Map,qr=[],dM="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ib(e,n){switch(e){case"focusin":case"focusout":jr=null;break;case"dragenter":case"dragleave":Mr=null;break;case"mouseover":case"mouseout":Rr=null;break;case"pointerover":case"pointerout":ml.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":pl.delete(n.pointerId)}}function yl(e,n,a,s,h,v){return e===null||e.nativeEvent!==v?(e={blockedOn:n,domEventName:a,eventSystemFlags:s,nativeEvent:v,targetContainers:[h]},n!==null&&(n=or(n),n!==null&&nb(n)),e):(e.eventSystemFlags|=s,n=e.targetContainers,h!==null&&n.indexOf(h)===-1&&n.push(h),e)}function hM(e,n,a,s,h){switch(n){case"focusin":return jr=yl(jr,e,n,a,s,h),!0;case"dragenter":return Mr=yl(Mr,e,n,a,s,h),!0;case"mouseover":return Rr=yl(Rr,e,n,a,s,h),!0;case"pointerover":var v=h.pointerId;return ml.set(v,yl(ml.get(v)||null,e,n,a,s,h)),!0;case"gotpointercapture":return v=h.pointerId,pl.set(v,yl(pl.get(v)||null,e,n,a,s,h)),!0}return!1}function lb(e){var n=lr(e.target);if(n!==null){var a=u(n);if(a!==null){if(n=a.tag,n===13){if(n=c(a),n!==null){e.blockedOn=n,ro(e.priority,function(){rb(a)});return}}else if(n===31){if(n=f(a),n!==null){e.blockedOn=n,ro(e.priority,function(){rb(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ps(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=Gf(e.nativeEvent);if(a===null){a=e.nativeEvent;var s=new a.constructor(a.type,a);Gu=s,a.target.dispatchEvent(s),Gu=null}else return n=or(a),n!==null&&nb(n),e.blockedOn=a,!1;n.shift()}return!0}function ob(e,n,a){ps(e)&&a.delete(n)}function gM(){Yf=!1,jr!==null&&ps(jr)&&(jr=null),Mr!==null&&ps(Mr)&&(Mr=null),Rr!==null&&ps(Rr)&&(Rr=null),ml.forEach(ob),pl.forEach(ob)}function ys(e,n){e.blockedOn===n&&(e.blockedOn=null,Yf||(Yf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,gM)))}var xs=null;function sb(e){xs!==e&&(xs=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){xs===e&&(xs=null);for(var n=0;n<e.length;n+=3){var a=e[n],s=e[n+1],h=e[n+2];if(typeof s!="function"){if(Vf(s||a)===null)continue;break}var v=or(a);v!==null&&(e.splice(n,3),n-=3,Uc(v,{pending:!0,data:h,method:a.method,action:s},s,h))}}))}function li(e){function n(U){return ys(U,e)}jr!==null&&ys(jr,e),Mr!==null&&ys(Mr,e),Rr!==null&&ys(Rr,e),ml.forEach(n),pl.forEach(n);for(var a=0;a<qr.length;a++){var s=qr[a];s.blockedOn===e&&(s.blockedOn=null)}for(;0<qr.length&&(a=qr[0],a.blockedOn===null);)lb(a),a.blockedOn===null&&qr.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var h=a[s],v=a[s+1],_=h[bt]||null;if(typeof v=="function")_||sb(a);else if(_){var j=null;if(v&&v.hasAttribute("formAction")){if(h=v,_=v[bt]||null)j=_.formAction;else if(Vf(h)!==null)continue}else j=_.action;typeof j=="function"?a[s+1]=j:(a.splice(s,3),s-=3),sb(a)}}}function ub(){function e(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(_){return h=_})},focusReset:"manual",scroll:"manual"})}function n(){h!==null&&(h(),h=null),s||setTimeout(a,20)}function a(){if(!s&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,h=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),h!==null&&(h(),h=null)}}}function If(e){this._internalRoot=e}bs.prototype.render=If.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(l(409));var a=n.current,s=It();eb(a,s,e,n,null,null)},bs.prototype.unmount=If.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;eb(e.current,2,null,e,null,null),es(),n[qn]=null}};function bs(e){this._internalRoot=e}bs.prototype.unstable_scheduleHydration=function(e){if(e){var n=no();e={blockedOn:null,target:e,priority:n};for(var a=0;a<qr.length&&n!==0&&n<qr[a].priority;a++);qr.splice(a,0,e),a===0&&lb(e)}};var cb=r.version;if(cb!=="19.2.4")throw Error(l(527,cb,"19.2.4"));G.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=d(n),e=e!==null?m(e):null,e=e===null?null:e.stateNode,e};var vM={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _s=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_s.isDisabled&&_s.supportsFiber)try{xt=_s.inject(vM),Qe=_s}catch{}}return bl.createRoot=function(e,n){if(!o(e))throw Error(l(299));var a=!1,s="",h=p1,v=y1,_=x1;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onUncaughtError!==void 0&&(h=n.onUncaughtError),n.onCaughtError!==void 0&&(v=n.onCaughtError),n.onRecoverableError!==void 0&&(_=n.onRecoverableError)),n=Jx(e,1,!1,null,null,a,s,null,h,v,_,ub),e[qn]=n.current,Nf(e),new If(n)},bl.hydrateRoot=function(e,n,a){if(!o(e))throw Error(l(299));var s=!1,h="",v=p1,_=y1,j=x1,U=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(v=a.onUncaughtError),a.onCaughtError!==void 0&&(_=a.onCaughtError),a.onRecoverableError!==void 0&&(j=a.onRecoverableError),a.formState!==void 0&&(U=a.formState)),n=Jx(e,1,!0,n,a??null,s,h,U,v,_,j,ub),n.context=Wx(null),a=n.current,s=It(),s=Ti(s),h=pr(s),h.callback=null,yr(a,h,s),a=s,n.current.lanes=a,Gr(n,a),En(n),e[qn]=n.current,Nf(e),new bs(n)},bl.version="19.2.4",bl}var bb;function EM(){if(bb)return Ff.exports;bb=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),Ff.exports=SM(),Ff.exports}var NM=EM();const _b=t=>{let r;const i=new Set,l=(d,m)=>{const p=typeof d=="function"?d(r):d;if(!Object.is(p,r)){const y=r;r=m??(typeof p!="object"||p===null)?p:Object.assign({},r,p),i.forEach(b=>b(r,y))}},o=()=>r,f={setState:l,getState:o,getInitialState:()=>g,subscribe:d=>(i.add(d),()=>i.delete(d))},g=r=t(l,o,f);return f},CM=(t=>t?_b(t):_b),TM=t=>t;function AM(t,r=TM){const i=Sl.useSyncExternalStore(t.subscribe,Sl.useCallback(()=>r(t.getState()),[t,r]),Sl.useCallback(()=>r(t.getInitialState()),[t,r]));return Sl.useDebugValue(i),i}const wb=t=>{const r=CM(t),i=l=>AM(r,l);return Object.assign(i,r),i},gC=(t=>t?wb(t):wb),jM="/api";function zr(t,r,i){const l=i||new URLSearchParams;r&&l.set("project",r);const o=l.toString();return`${jM}${t}${o?`?${o}`:""}`}const vC=gC()((t,r)=>({tasks:[],selectedTaskId:null,loading:!1,error:null,queryOptions:{},currentProjectPath:null,graphData:null,projectStats:null,setQueryOptions:i=>{t(l=>({queryOptions:typeof i=="function"?i(l.queryOptions):i})),r().fetchTasks()},setSelectedTask:i=>{t({selectedTaskId:i})},setCurrentProjectPath:i=>{t({currentProjectPath:i})},clearError:()=>{t({error:null})},fetchTasks:async()=>{t({loading:!0,error:null});try{const{queryOptions:i,currentProjectPath:l}=r(),o=new URLSearchParams;i.status&&o.append("status",i.status),i.priority&&o.append("priority",i.priority),i.search&&o.append("search",i.search),i.limit&&o.append("limit",i.limit.toString()),i.offset&&o.append("offset",i.offset.toString());const u=zr("/tasks",l,o),c=await fetch(u),f=await c.json();if(!c.ok||!f.success)throw new Error(f.error?.message||"Failed to fetch tasks");t({tasks:f.data?.tasks||[],loading:!1})}catch(i){t({error:i instanceof Error?i.message:"Unknown error",loading:!1})}},fetchTask:async i=>{const{currentProjectPath:l}=r(),o=await fetch(zr(`/tasks/${i}`,l)),u=await o.json();if(!o.ok||!u.success)throw new Error(u.error?.message||"Failed to fetch task");return u.data},createTask:async i=>{t({loading:!0,error:null});try{const{currentProjectPath:l}=r(),o=await fetch(zr("/tasks",l),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),u=await o.json();if(!o.ok||!u.success)throw new Error(u.error?.message||"Failed to create task");return t(c=>({tasks:[...c.tasks,u.data],loading:!1})),u.data}catch(l){throw t({error:l instanceof Error?l.message:"Unknown error",loading:!1}),l}},updateTask:async(i,l)=>{t({loading:!0,error:null});try{const{currentProjectPath:o}=r(),u=await fetch(zr(`/tasks/${i}`,o),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)}),c=await u.json();if(!u.ok||!c.success)throw new Error(c.error?.message||"Failed to update task");return t(f=>({tasks:f.tasks.map(g=>g.id===i?c.data:g),loading:!1})),c.data}catch(o){throw t({error:o instanceof Error?o.message:"Unknown error",loading:!1}),o}},deleteTask:async(i,l=!0)=>{t({loading:!0,error:null});try{const{currentProjectPath:o}=r(),u=new URLSearchParams;l&&u.set("reconnect","true");const c=await fetch(zr(`/tasks/${i}`,o,u),{method:"DELETE"});if(!c.ok){const f=await c.json();throw new Error(f.error?.message||"Failed to delete task")}t(f=>({tasks:f.tasks.filter(g=>g.id!==i),selectedTaskId:f.selectedTaskId===i?null:f.selectedTaskId,loading:!1}))}catch(o){throw t({error:o instanceof Error?o.message:"Unknown error",loading:!1}),o}},fetchGraph:async()=>{t({loading:!0,error:null});try{const{currentProjectPath:i}=r(),l=await fetch(zr("/graph",i)),o=await l.json();if(!l.ok||!o.success)throw new Error(o.error?.message||"Failed to fetch graph");t({graphData:o.data||null,loading:!1})}catch(i){t({error:i instanceof Error?i.message:"Unknown error",loading:!1})}},fetchStats:async()=>{t({loading:!0,error:null});try{const{currentProjectPath:i}=r(),l=await fetch(zr("/stats",i)),o=await l.json();if(!l.ok||!o.success)throw new Error(o.error?.message||"Failed to fetch stats");t({projectStats:o.data||null,loading:!1})}catch(i){t({error:i instanceof Error?i.message:"Unknown error",loading:!1})}},validateGraph:async()=>{const{currentProjectPath:i}=r(),l=await fetch(zr("/graph/validate",i),{method:"POST"}),o=await l.json();if(!l.ok||!o.success)throw new Error(o.error?.message||"Failed to validate graph");return o.data}})),Sb="/api",Ws=gC((t,r)=>({projects:[],currentProjectPath:null,loading:!1,error:null,sidebarOpen:!0,setCurrentProject:i=>{t({currentProjectPath:i}),r().setProjectInUrl(i)},setSidebarOpen:i=>t({sidebarOpen:i}),toggleSidebar:()=>t(i=>({sidebarOpen:!i.sidebarOpen})),clearError:()=>t({error:null}),fetchProjects:async()=>{t({loading:!0,error:null});try{const l=await(await fetch(`${Sb}/projects`)).json();if(!l.success||!l.data)throw new Error(l.error?.message||"Failed to fetch projects");t({projects:l.data.projects,loading:!1})}catch(i){t({error:i instanceof Error?i.message:"Failed to fetch projects",loading:!1})}},removeProject:async i=>{try{const l=encodeURIComponent(i),u=await(await fetch(`${Sb}/projects/${l}`,{method:"DELETE"})).json();if(!u.success)throw new Error(u.error?.message||"Failed to remove project");r().fetchProjects()}catch(l){t({error:l instanceof Error?l.message:"Failed to remove project"})}},getProjectFromUrl:()=>new URLSearchParams(window.location.search).get("project"),setProjectInUrl:i=>{const l=new URL(window.location.href);i?l.searchParams.set("project",i):l.searchParams.delete("project"),window.history.replaceState({},"",l.toString())}})),mC=J.createContext(void 0);function MM({children:t}){const[r,i]=J.useState(()=>{const o=localStorage.getItem("octie-theme");return o==="dark"||o==="light"?o:"light"});J.useEffect(()=>{localStorage.setItem("octie-theme",r),document.documentElement.setAttribute("data-theme",r),document.documentElement.classList.toggle("dark",r==="dark")},[r]);const l=()=>{i(o=>o==="light"?"dark":"light")};return x.jsx(mC.Provider,{value:{theme:r,toggleTheme:l},children:t})}function pC(){const t=J.useContext(mC);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t}function RM({view:t,onViewChange:r,onRefresh:i,loading:l,onExportPNG:o,onExportSVG:u}){return x.jsx("div",{className:"px-4 py-3",style:{background:"var(--surface-abyss)",borderBottom:"1px solid var(--border-default)"},children:x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx("div",{className:"flex items-center gap-2",children:x.jsxs("div",{className:"flex rounded-lg overflow-hidden",style:{border:"1px solid var(--border-default)"},children:[x.jsxs("button",{type:"button",onClick:()=>r("kanban"),className:"flex items-center gap-2 px-3 py-2 text-sm transition-all duration-200",style:{background:t==="kanban"?"linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(167, 139, 250, 0.15))":"var(--surface-raised)",color:t==="kanban"?"var(--accent-cyan)":"var(--text-secondary)",borderRight:"1px solid var(--border-default)"},children:[x.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("rect",{x:"3",y:"3",width:"5",height:"18",rx:"1"}),x.jsx("rect",{x:"10",y:"3",width:"5",height:"18",rx:"1"}),x.jsx("rect",{x:"17",y:"3",width:"5",height:"14",rx:"1"})]}),"Kanban",x.jsx("kbd",{className:"text-[10px] px-1 rounded",style:{background:t==="kanban"?"var(--surface-elevated)":"var(--surface-base)",color:"var(--text-muted)",fontFamily:"var(--font-mono)"},children:"K"})]}),x.jsxs("button",{type:"button",onClick:()=>r("graph"),className:"flex items-center gap-2 px-3 py-2 text-sm transition-all duration-200",style:{background:t==="graph"?"linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(167, 139, 250, 0.15))":"var(--surface-raised)",color:t==="graph"?"var(--accent-cyan)":"var(--text-secondary)"},children:[x.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("circle",{cx:"5",cy:"6",r:"3"}),x.jsx("circle",{cx:"19",cy:"6",r:"3"}),x.jsx("circle",{cx:"12",cy:"18",r:"3"}),x.jsx("line",{x1:"7",y1:"8",x2:"10",y2:"16"}),x.jsx("line",{x1:"17",y1:"8",x2:"14",y2:"16"})]}),"Graph",x.jsx("kbd",{className:"text-[10px] px-1 rounded",style:{background:t==="graph"?"var(--surface-elevated)":"var(--surface-base)",color:"var(--text-muted)",fontFamily:"var(--font-mono)"},children:"G"})]})]})}),x.jsxs("div",{className:"flex items-center gap-2",children:[t==="graph"&&x.jsxs(x.Fragment,{children:[x.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-2 px-3 py-2 text-sm rounded-lg transition-colors",style:{background:"var(--surface-raised)",border:"1px solid var(--border-default)",color:"var(--text-secondary)"},title:"Export as PNG",children:[x.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),x.jsx("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),x.jsx("polyline",{points:"21 15 16 10 5 21"})]}),"PNG"]}),x.jsxs("button",{type:"button",onClick:u,className:"flex items-center gap-2 px-3 py-2 text-sm rounded-lg transition-colors",style:{background:"var(--surface-raised)",border:"1px solid var(--border-default)",color:"var(--text-secondary)"},title:"Export as SVG",children:[x.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("polygon",{points:"12 2 2 7 12 12 22 7 12 2"}),x.jsx("polyline",{points:"2 17 12 22 22 17"}),x.jsx("polyline",{points:"2 12 12 17 22 12"})]}),"SVG"]})]}),x.jsx("button",{type:"button",onClick:i,disabled:l,className:"flex items-center gap-2 px-3 py-2 text-sm rounded-lg transition-colors",style:{background:l?"var(--surface-base)":"var(--accent-cyan)",border:"none",color:l?"var(--text-muted)":"white",opacity:l?.7:1,cursor:l?"not-allowed":"pointer"},title:"Refresh (Ctrl+R)",children:l?x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"w-4 h-4 rounded-full animate-spin",style:{border:"2px solid var(--text-muted)",borderTopColor:"transparent"}}),x.jsx("span",{children:"Refreshing..."})]}):x.jsxs(x.Fragment,{children:[x.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("polyline",{points:"23 4 23 10 17 10"}),x.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]}),"Refresh"]})})]})]})})}const Eb={completed:{bg:"rgba(16, 185, 129, 0.15)",color:"var(--status-completed)"},in_progress:{bg:"rgba(0, 212, 255, 0.15)",color:"var(--status-in-progress)"},in_review:{bg:"rgba(167, 139, 250, 0.15)",color:"var(--accent-violet)"},ready:{bg:"rgba(255, 159, 28, 0.1)",color:"var(--accent-amber)"},blocked:{bg:"rgba(244, 63, 94, 0.15)",color:"var(--status-blocked)"}},Nb={top:{bg:"var(--priority-top-glow)",color:"var(--priority-top)"},second:{bg:"var(--priority-second-glow)",color:"var(--priority-second)"},later:{bg:"var(--priority-later-glow)",color:"var(--priority-later)"}};function qM({task:t,loading:r}){if(r)return x.jsx("div",{className:"flex items-center justify-center py-8",children:x.jsx("div",{className:"w-8 h-8 rounded-full animate-spin",style:{border:"2px solid var(--border-default)",borderTopColor:"var(--accent-cyan)"}})});if(!t)return x.jsxs("div",{className:"text-center py-8",children:[x.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-xl flex items-center justify-center",style:{background:"var(--surface-elevated)"},children:x.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-muted)",strokeWidth:"1.5",children:[x.jsx("path",{d:"M9 11l3 3L22 4"}),x.jsx("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"})]})}),x.jsx("p",{className:"text-sm",style:{color:"var(--text-muted)"},children:"Select a task to view details"})]});const i=Eb[t.status]||Eb.ready,l=Nb[t.priority]||Nb.later;return x.jsxs("div",{className:"space-y-6",children:[x.jsxs("div",{children:[x.jsx("div",{className:"text-[10px] tabular-nums mb-2",style:{color:"var(--text-muted)",fontFamily:"var(--font-mono)"},children:t.id}),x.jsx("h2",{className:"text-lg font-semibold",style:{color:"var(--text-primary)",fontFamily:"var(--font-display)"},children:t.title}),x.jsxs("div",{className:"flex items-center gap-2 mt-3",children:[x.jsx("span",{className:"px-2 py-1 rounded-md text-xs uppercase tracking-wide",style:{background:i.bg,color:i.color,fontFamily:"var(--font-mono)"},children:t.status.replace("_"," ")}),x.jsx("span",{className:"px-2 py-1 rounded-md text-xs uppercase tracking-wide",style:{background:l.bg,color:l.color,fontFamily:"var(--font-mono)"},children:t.priority})]})]}),t.description&&x.jsxs("div",{children:[x.jsx(Jn,{children:"Description"}),x.jsx("p",{className:"text-sm whitespace-pre-wrap",style:{color:"var(--text-secondary)"},children:t.description})]}),t.success_criteria.length>0&&x.jsxs("div",{children:[x.jsxs(Jn,{children:["Success Criteria",x.jsxs("span",{style:{color:"var(--accent-cyan)"},children:[" ","(",t.success_criteria.filter(o=>o.completed).length,"/",t.success_criteria.length,")"]})]}),x.jsx("ul",{className:"space-y-2",children:t.success_criteria.map(o=>x.jsxs("li",{className:"flex items-start gap-3 text-sm",children:[x.jsx("div",{className:"w-4 h-4 rounded flex items-center justify-center flex-shrink-0 mt-0.5",style:{background:o.completed?"var(--status-completed)":"var(--surface-elevated)",border:o.completed?"none":"1px solid var(--border-default)"},children:o.completed&&x.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"3",children:x.jsx("polyline",{points:"20 6 9 17 4 12"})})}),x.jsx("span",{className:o.completed?"line-through":"",style:{color:o.completed?"var(--text-muted)":"var(--text-secondary)"},children:o.text})]},o.id))})]}),t.deliverables.length>0&&x.jsxs("div",{children:[x.jsxs(Jn,{children:["Deliverables",x.jsxs("span",{style:{color:"var(--accent-amber)"},children:[" ","(",t.deliverables.filter(o=>o.completed).length,"/",t.deliverables.length,")"]})]}),x.jsx("ul",{className:"space-y-2",children:t.deliverables.map(o=>x.jsxs("li",{className:"flex items-start gap-3 text-sm",children:[x.jsx("div",{className:"w-4 h-4 rounded flex items-center justify-center flex-shrink-0 mt-0.5",style:{background:o.completed?"var(--status-completed)":"var(--surface-elevated)",border:o.completed?"none":"1px solid var(--border-default)"},children:o.completed&&x.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"3",children:x.jsx("polyline",{points:"20 6 9 17 4 12"})})}),x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsx("span",{className:o.completed?"line-through":"",style:{color:o.completed?"var(--text-muted)":"var(--text-secondary)"},children:o.text}),o.file_path&&x.jsx("code",{className:"block mt-1 text-xs px-2 py-1 rounded",style:{background:"var(--surface-elevated)",color:"var(--text-muted)",fontFamily:"var(--font-mono)"},children:o.file_path})]})]},o.id))})]}),t.need_fix&&t.need_fix.length>0&&x.jsxs("div",{children:[x.jsxs(Jn,{children:["Need Fix",x.jsxs("span",{style:{color:"var(--status-blocked)"},children:[" ","(",t.need_fix.filter(o=>o.completed).length,"/",t.need_fix.length,")"]})]}),x.jsx("ul",{className:"space-y-2",children:t.need_fix.map(o=>x.jsxs("li",{className:"flex items-start gap-3 text-sm",children:[x.jsx("div",{className:"w-4 h-4 rounded flex items-center justify-center flex-shrink-0 mt-0.5",style:{background:o.completed?"var(--status-completed)":"rgba(244, 63, 94, 0.3)",border:o.completed?"none":"1px solid rgba(244, 63, 94, 0.5)"},children:o.completed&&x.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"3",children:x.jsx("polyline",{points:"20 6 9 17 4 12"})})}),x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsx("span",{className:o.completed?"line-through":"",style:{color:o.completed?"var(--text-muted)":"var(--text-secondary)"},children:o.text}),o.file_path&&x.jsx("code",{className:"block mt-1 text-xs px-2 py-1 rounded",style:{background:"var(--surface-elevated)",color:"var(--text-muted)",fontFamily:"var(--font-mono)"},children:o.file_path}),o.source&&x.jsx("span",{className:"inline-block mt-1 text-[10px] px-1.5 py-0.5 rounded uppercase",style:{background:"rgba(244, 63, 94, 0.1)",color:"var(--status-blocked)",fontFamily:"var(--font-mono)"},children:o.source})]})]},o.id))})]}),t.related_files&&t.related_files.length>0&&x.jsxs("div",{children:[x.jsx(Jn,{children:"Related Files"}),x.jsx("ul",{className:"space-y-1",children:t.related_files.map((o,u)=>x.jsx("li",{children:x.jsx("code",{className:"text-xs px-2 py-1 rounded inline-block",style:{background:"var(--surface-elevated)",color:"var(--text-secondary)",fontFamily:"var(--font-mono)"},children:o})},u))})]}),t.blockers&&t.blockers.length>0&&x.jsxs("div",{children:[x.jsxs(Jn,{children:["Blocked By",x.jsxs("span",{style:{color:"var(--status-blocked)"},children:[" ","(",t.blockers.length,")"]})]}),x.jsx("ul",{className:"space-y-1",children:t.blockers.map((o,u)=>x.jsx("li",{children:x.jsx("code",{className:"text-xs px-2 py-1 rounded inline-block",style:{background:"rgba(244, 63, 94, 0.1)",color:"var(--status-blocked)",fontFamily:"var(--font-mono)",border:"1px solid rgba(244, 63, 94, 0.3)"},children:o})},u))})]}),t.dependencies&&x.jsxs("div",{children:[x.jsx(Jn,{children:"Dependencies"}),x.jsx("div",{className:"p-3 rounded-lg text-sm",style:{background:"var(--surface-elevated)",color:"var(--text-secondary)",borderLeft:"3px solid var(--accent-amber)"},children:t.dependencies})]}),t.c7_verified&&t.c7_verified.length>0&&x.jsxs("div",{children:[x.jsxs(Jn,{children:["C7 Verified",x.jsxs("span",{style:{color:"var(--accent-cyan)"},children:[" ","(",t.c7_verified.length,")"]})]}),x.jsx("ul",{className:"space-y-1",children:t.c7_verified.map((o,u)=>x.jsx("li",{children:x.jsx("code",{className:"text-xs px-2 py-1 rounded inline-block",style:{background:"rgba(0, 212, 255, 0.1)",color:"var(--accent-cyan)",fontFamily:"var(--font-mono)",border:"1px solid rgba(0, 212, 255, 0.3)"},children:o})},u))})]}),t.notes&&x.jsxs("div",{children:[x.jsx(Jn,{children:"Notes"}),x.jsx("div",{className:"p-3 rounded-lg text-sm whitespace-pre-wrap",style:{background:"var(--surface-elevated)",color:"var(--text-secondary)",borderLeft:"3px solid var(--accent-violet)"},children:t.notes})]}),x.jsx("div",{className:"pt-4",style:{borderTop:"1px solid var(--border-muted)"},children:x.jsxs("div",{className:"grid grid-cols-2 gap-3 text-xs",children:[x.jsxs("div",{children:[x.jsx("span",{style:{color:"var(--text-muted)"},children:"Created:"}),x.jsx("div",{className:"mt-0.5",style:{color:"var(--text-secondary)",fontFamily:"var(--font-mono)"},children:new Date(t.created_at).toLocaleString()})]}),x.jsxs("div",{children:[x.jsx("span",{style:{color:"var(--text-muted)"},children:"Updated:"}),x.jsx("div",{className:"mt-0.5",style:{color:"var(--text-secondary)",fontFamily:"var(--font-mono)"},children:new Date(t.updated_at).toLocaleString()})]}),t.completed_at&&x.jsxs("div",{className:"col-span-2",children:[x.jsx("span",{style:{color:"var(--text-muted)"},children:"Completed:"}),x.jsx("div",{className:"mt-0.5",style:{color:"var(--status-completed)",fontFamily:"var(--font-mono)"},children:new Date(t.completed_at).toLocaleString()})]})]})})]})}function Jn({children:t}){return x.jsx("h3",{className:"text-xs font-medium uppercase tracking-wide mb-2",style:{color:"var(--text-muted)",fontFamily:"var(--font-mono)"},children:t})}function OM({selectedStatus:t,selectedPriority:r,searchQuery:i,onStatusChange:l,onPriorityChange:o,onSearchChange:u,compact:c=!1}){const f=["all","ready","in_progress","in_review","completed","blocked"],g=["all","top","second","later"];return c?x.jsxs("div",{className:"flex items-center gap-2 flex-wrap min-w-0 overflow-hidden",children:[x.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded-lg flex-1 min-w-0 max-w-[200px]",style:{background:"var(--surface-elevated)",border:"1px solid var(--border-default)"},children:[x.jsxs("svg",{className:"flex-shrink-0",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-muted)",strokeWidth:"2",children:[x.jsx("circle",{cx:"11",cy:"11",r:"8"}),x.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),x.jsx("input",{id:"search-compact",type:"text",value:i,onChange:d=>u(d.target.value),placeholder:"Search...",className:"flex-1 min-w-0 bg-transparent border-none outline-none text-xs w-0",style:{color:"var(--text-primary)"}})]}),x.jsxs("div",{className:"relative flex-shrink-0",children:[x.jsx("select",{value:t,onChange:d=>l(d.target.value),className:"px-2 py-1.5 text-xs rounded-lg focus-ring appearance-none cursor-pointer pr-5",style:{background:"var(--surface-elevated)",border:"1px solid var(--border-default)",color:"var(--text-primary)"},children:f.map(d=>x.jsx("option",{value:d,children:d==="all"?"All Status":d.replace("_"," ")},d))}),x.jsx("svg",{className:"absolute right-1 top-1/2 -translate-y-1/2 pointer-events-none",width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-muted)",strokeWidth:"2",children:x.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),x.jsxs("div",{className:"relative flex-shrink-0",children:[x.jsx("select",{value:r,onChange:d=>o(d.target.value),className:"px-2 py-1.5 text-xs rounded-lg focus-ring appearance-none cursor-pointer pr-5",style:{background:"var(--surface-elevated)",border:"1px solid var(--border-default)",color:"var(--text-primary)"},children:g.map(d=>x.jsx("option",{value:d,children:d==="all"?"All Priority":d},d))}),x.jsx("svg",{className:"absolute right-1 top-1/2 -translate-y-1/2 pointer-events-none",width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-muted)",strokeWidth:"2",children:x.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),(t!=="all"||r!=="all"||i)&&x.jsx("button",{onClick:()=>{l("all"),o("all"),u("")},className:"px-2 py-1.5 text-xs rounded-lg transition-colors flex-shrink-0",style:{background:"transparent",border:"1px solid var(--border-default)",color:"var(--text-muted)"},children:"Clear"})]}):x.jsxs("div",{className:"space-y-4",children:[x.jsxs("div",{children:[x.jsxs("label",{htmlFor:"search",className:"block text-xs font-medium uppercase tracking-wide mb-2",style:{color:"var(--text-muted)",fontFamily:"var(--font-mono)"},children:["Search",x.jsx("span",{className:"ml-2 normal-case",style:{color:"var(--text-tertiary)"},children:"(Ctrl+K)"})]}),x.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg",style:{background:"var(--surface-elevated)",border:"1px solid var(--border-default)"},children:[x.jsxs("svg",{className:"flex-shrink-0",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-muted)",strokeWidth:"2",children:[x.jsx("circle",{cx:"11",cy:"11",r:"8"}),x.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),x.jsx("input",{id:"search",type:"text",value:i,onChange:d=>u(d.target.value),placeholder:"Search tasks...",className:"flex-1 bg-transparent border-none outline-none text-sm",style:{color:"var(--text-primary)"}})]})]}),x.jsxs("div",{children:[x.jsx("label",{htmlFor:"status",className:"block text-xs font-medium uppercase tracking-wide mb-2",style:{color:"var(--text-muted)",fontFamily:"var(--font-mono)"},children:"Status"}),x.jsxs("div",{className:"relative",children:[x.jsx("select",{id:"status",value:t,onChange:d=>l(d.target.value),className:"w-full px-3 py-2 text-sm rounded-lg focus-ring appearance-none cursor-pointer pr-8",style:{background:"var(--surface-elevated)",border:"1px solid var(--border-default)",color:"var(--text-primary)"},children:f.map(d=>x.jsx("option",{value:d,children:d==="all"?"All Statuses":d.replace("_"," ")},d))}),x.jsx("svg",{className:"absolute right-2.5 top-1/2 -translate-y-1/2 pointer-events-none",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-muted)",strokeWidth:"2",children:x.jsx("polyline",{points:"6 9 12 15 18 9"})})]})]}),x.jsxs("div",{children:[x.jsx("label",{htmlFor:"priority",className:"block text-xs font-medium uppercase tracking-wide mb-2",style:{color:"var(--text-muted)",fontFamily:"var(--font-mono)"},children:"Priority"}),x.jsxs("div",{className:"relative",children:[x.jsx("select",{id:"priority",value:r,onChange:d=>o(d.target.value),className:"w-full px-3 py-2 text-sm rounded-lg focus-ring appearance-none cursor-pointer pr-8",style:{background:"var(--surface-elevated)",border:"1px solid var(--border-default)",color:"var(--text-primary)"},children:g.map(d=>x.jsx("option",{value:d,children:d==="all"?"All Priorities":d},d))}),x.jsx("svg",{className:"absolute right-2.5 top-1/2 -translate-y-1/2 pointer-events-none",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-muted)",strokeWidth:"2",children:x.jsx("polyline",{points:"6 9 12 15 18 9"})})]})]}),(t!=="all"||r!=="all"||i)&&x.jsx("button",{onClick:()=>{l("all"),o("all"),u("")},className:"w-full px-3 py-2 text-xs uppercase tracking-wide rounded-lg transition-colors",style:{background:"transparent",border:"1px solid var(--border-default)",color:"var(--text-muted)"},children:"Clear Filters"})]})}function zM({stats:t,loading:r}){if(r)return x.jsxs("div",{className:"px-4 py-2 flex items-center gap-2 text-xs",style:{background:"var(--surface-abyss)",borderTop:"1px solid var(--border-default)",color:"var(--text-muted)"},children:[x.jsx("div",{className:"w-3 h-3 rounded-full animate-spin",style:{border:"2px solid var(--border-default)",borderTopColor:"var(--accent-cyan)"}}),x.jsx("span",{children:"Loading stats..."})]});if(!t)return null;const{tasks:i}=t;return x.jsxs("div",{className:"px-4 py-2 flex items-center justify-between",style:{background:"var(--surface-abyss)",borderBottom:"1px solid var(--border-default)"},children:[x.jsxs("div",{className:"flex items-center gap-4 text-xs",children:[x.jsxs("div",{className:"flex items-center gap-1.5",children:[x.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-muted)",strokeWidth:"2",children:[x.jsx("path",{d:"M9 11l3 3L22 4"}),x.jsx("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"})]}),x.jsx("span",{className:"tabular-nums font-semibold",style:{color:"var(--text-primary)",fontFamily:"var(--font-mono)"},children:i.total}),x.jsx("span",{style:{color:"var(--text-muted)"},children:"tasks"})]}),x.jsx("div",{style:{width:"1px",height:"12px",background:"var(--border-default)"}}),x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsxs("div",{className:"flex items-center gap-1",title:"Completed",children:[x.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:"var(--status-completed)",boxShadow:"0 0 4px rgba(16, 185, 129, 0.4)"}}),x.jsx("span",{className:"tabular-nums",style:{color:"var(--status-completed)",fontFamily:"var(--font-mono)"},children:i.statusCounts.completed}),x.jsx("span",{style:{color:"var(--text-muted)",fontSize:"10px"},children:"done"})]}),x.jsxs("div",{className:"flex items-center gap-1",title:"In Progress",children:[x.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:"var(--status-in-progress)",boxShadow:"0 0 4px rgba(0, 212, 255, 0.4)"}}),x.jsx("span",{className:"tabular-nums",style:{color:"var(--status-in-progress)",fontFamily:"var(--font-mono)"},children:i.statusCounts.in_progress}),x.jsx("span",{style:{color:"var(--text-muted)",fontSize:"10px"},children:"prog"})]}),x.jsxs("div",{className:"flex items-center gap-1",title:"Ready",children:[x.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:"var(--accent-amber)",boxShadow:"0 0 4px rgba(255, 159, 28, 0.4)"}}),x.jsx("span",{className:"tabular-nums",style:{color:"var(--accent-amber)",fontFamily:"var(--font-mono)"},children:i.statusCounts.ready}),x.jsx("span",{style:{color:"var(--accent-amber)",fontSize:"10px"},children:"ready"})]}),x.jsxs("div",{className:"flex items-center gap-1",title:"In Review",children:[x.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:"var(--accent-violet)",boxShadow:"0 0 4px rgba(167, 139, 250, 0.4)"}}),x.jsx("span",{className:"tabular-nums",style:{color:"var(--accent-violet)",fontFamily:"var(--font-mono)"},children:i.statusCounts.in_review}),x.jsx("span",{style:{color:"var(--text-muted)",fontSize:"10px"},children:"revw"})]}),x.jsxs("div",{className:"flex items-center gap-1",title:"Blocked",children:[x.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:"var(--status-blocked)",boxShadow:"0 0 4px rgba(244, 63, 94, 0.4)"}}),x.jsx("span",{className:"tabular-nums",style:{color:"var(--status-blocked)",fontFamily:"var(--font-mono)"},children:i.statusCounts.blocked}),x.jsx("span",{style:{color:"var(--text-muted)",fontSize:"10px"},children:"block"})]})]})]}),x.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[x.jsxs("div",{className:"flex items-center gap-1.5",children:[x.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:"var(--priority-top)",boxShadow:"0 0 4px rgba(244, 63, 94, 0.4)"}}),x.jsx("span",{className:"tabular-nums",style:{color:"var(--priority-top)",fontFamily:"var(--font-mono)"},children:i.priorityCounts.top}),x.jsx("span",{style:{color:"var(--text-muted)"},children:"top"})]}),x.jsxs("div",{className:"flex items-center gap-1.5",children:[x.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:"var(--priority-second)",boxShadow:"0 0 4px rgba(255, 159, 28, 0.4)"}}),x.jsx("span",{className:"tabular-nums",style:{color:"var(--priority-second)",fontFamily:"var(--font-mono)"},children:i.priorityCounts.second}),x.jsx("span",{style:{color:"var(--text-muted)"},children:"second"})]}),i.root>0&&x.jsxs("div",{className:"flex items-center gap-1.5",children:[x.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-muted)",strokeWidth:"2",children:x.jsx("circle",{cx:"12",cy:"12",r:"3"})}),x.jsx("span",{className:"tabular-nums",style:{color:"var(--text-secondary)",fontFamily:"var(--font-mono)"},children:i.root}),x.jsx("span",{style:{color:"var(--text-muted)"},children:"root"})]}),i.orphan>0&&x.jsxs("div",{className:"flex items-center gap-1.5",children:[x.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent-amber)",strokeWidth:"2",children:[x.jsx("circle",{cx:"12",cy:"12",r:"10"}),x.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),x.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),x.jsx("span",{className:"tabular-nums",style:{color:"var(--accent-amber)",fontFamily:"var(--font-mono)"},children:i.orphan}),x.jsx("span",{style:{color:"var(--text-muted)"},children:"orphan"})]})]})]})}function st(t){if(typeof t=="string"||typeof t=="number")return""+t;let r="";if(Array.isArray(t))for(let i=0,l;i<t.length;i++)(l=st(t[i]))!==""&&(r+=(r&&" ")+l);else for(let i in t)t[i]&&(r+=(r&&" ")+i);return r}var DM={value:()=>{}};function eu(){for(var t=0,r=arguments.length,i={},l;t<r;++t){if(!(l=arguments[t]+"")||l in i||/[\s.]/.test(l))throw new Error("illegal type: "+l);i[l]=[]}return new zs(i)}function zs(t){this._=t}function kM(t,r){return t.trim().split(/^|\s+/).map(function(i){var l="",o=i.indexOf(".");if(o>=0&&(l=i.slice(o+1),i=i.slice(0,o)),i&&!r.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:l}})}zs.prototype=eu.prototype={constructor:zs,on:function(t,r){var i=this._,l=kM(t+"",i),o,u=-1,c=l.length;if(arguments.length<2){for(;++u<c;)if((o=(t=l[u]).type)&&(o=HM(i[o],t.name)))return o;return}if(r!=null&&typeof r!="function")throw new Error("invalid callback: "+r);for(;++u<c;)if(o=(t=l[u]).type)i[o]=Cb(i[o],t.name,r);else if(r==null)for(o in i)i[o]=Cb(i[o],t.name,null);return this},copy:function(){var t={},r=this._;for(var i in r)t[i]=r[i].slice();return new zs(t)},call:function(t,r){if((o=arguments.length-2)>0)for(var i=new Array(o),l=0,o,u;l<o;++l)i[l]=arguments[l+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(u=this._[t],l=0,o=u.length;l<o;++l)u[l].value.apply(r,i)},apply:function(t,r,i){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var l=this._[t],o=0,u=l.length;o<u;++o)l[o].value.apply(r,i)}};function HM(t,r){for(var i=0,l=t.length,o;i<l;++i)if((o=t[i]).name===r)return o.value}function Cb(t,r,i){for(var l=0,o=t.length;l<o;++l)if(t[l].name===r){t[l]=DM,t=t.slice(0,l).concat(t.slice(l+1));break}return i!=null&&t.push({name:r,value:i}),t}var Ap="http://www.w3.org/1999/xhtml";const Tb={svg:"http://www.w3.org/2000/svg",xhtml:Ap,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function tu(t){var r=t+="",i=r.indexOf(":");return i>=0&&(r=t.slice(0,i))!=="xmlns"&&(t=t.slice(i+1)),Tb.hasOwnProperty(r)?{space:Tb[r],local:t}:t}function LM(t){return function(){var r=this.ownerDocument,i=this.namespaceURI;return i===Ap&&r.documentElement.namespaceURI===Ap?r.createElement(t):r.createElementNS(i,t)}}function BM(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function yC(t){var r=tu(t);return(r.local?BM:LM)(r)}function UM(){}function Xp(t){return t==null?UM:function(){return this.querySelector(t)}}function GM(t){typeof t!="function"&&(t=Xp(t));for(var r=this._groups,i=r.length,l=new Array(i),o=0;o<i;++o)for(var u=r[o],c=u.length,f=l[o]=new Array(c),g,d,m=0;m<c;++m)(g=u[m])&&(d=t.call(g,g.__data__,m,u))&&("__data__"in g&&(d.__data__=g.__data__),f[m]=d);return new Ft(l,this._parents)}function VM(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function YM(){return[]}function xC(t){return t==null?YM:function(){return this.querySelectorAll(t)}}function IM(t){return function(){return VM(t.apply(this,arguments))}}function XM(t){typeof t=="function"?t=IM(t):t=xC(t);for(var r=this._groups,i=r.length,l=[],o=[],u=0;u<i;++u)for(var c=r[u],f=c.length,g,d=0;d<f;++d)(g=c[d])&&(l.push(t.call(g,g.__data__,d,c)),o.push(g));return new Ft(l,o)}function bC(t){return function(){return this.matches(t)}}function _C(t){return function(r){return r.matches(t)}}var ZM=Array.prototype.find;function FM(t){return function(){return ZM.call(this.children,t)}}function KM(){return this.firstElementChild}function QM(t){return this.select(t==null?KM:FM(typeof t=="function"?t:_C(t)))}var $M=Array.prototype.filter;function PM(){return Array.from(this.children)}function JM(t){return function(){return $M.call(this.children,t)}}function WM(t){return this.selectAll(t==null?PM:JM(typeof t=="function"?t:_C(t)))}function eR(t){typeof t!="function"&&(t=bC(t));for(var r=this._groups,i=r.length,l=new Array(i),o=0;o<i;++o)for(var u=r[o],c=u.length,f=l[o]=[],g,d=0;d<c;++d)(g=u[d])&&t.call(g,g.__data__,d,u)&&f.push(g);return new Ft(l,this._parents)}function wC(t){return new Array(t.length)}function tR(){return new Ft(this._enter||this._groups.map(wC),this._parents)}function Bs(t,r){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=r}Bs.prototype={constructor:Bs,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,r){return this._parent.insertBefore(t,r)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function nR(t){return function(){return t}}function rR(t,r,i,l,o,u){for(var c=0,f,g=r.length,d=u.length;c<d;++c)(f=r[c])?(f.__data__=u[c],l[c]=f):i[c]=new Bs(t,u[c]);for(;c<g;++c)(f=r[c])&&(o[c]=f)}function aR(t,r,i,l,o,u,c){var f,g,d=new Map,m=r.length,p=u.length,y=new Array(m),b;for(f=0;f<m;++f)(g=r[f])&&(y[f]=b=c.call(g,g.__data__,f,r)+"",d.has(b)?o[f]=g:d.set(b,g));for(f=0;f<p;++f)b=c.call(t,u[f],f,u)+"",(g=d.get(b))?(l[f]=g,g.__data__=u[f],d.delete(b)):i[f]=new Bs(t,u[f]);for(f=0;f<m;++f)(g=r[f])&&d.get(y[f])===g&&(o[f]=g)}function iR(t){return t.__data__}function lR(t,r){if(!arguments.length)return Array.from(this,iR);var i=r?aR:rR,l=this._parents,o=this._groups;typeof t!="function"&&(t=nR(t));for(var u=o.length,c=new Array(u),f=new Array(u),g=new Array(u),d=0;d<u;++d){var m=l[d],p=o[d],y=p.length,b=oR(t.call(m,m&&m.__data__,d,l)),S=b.length,N=f[d]=new Array(S),E=c[d]=new Array(S),C=g[d]=new Array(y);i(m,p,N,E,C,b,r);for(var A=0,w=0,T,q;A<S;++A)if(T=N[A]){for(A>=w&&(w=A+1);!(q=E[w])&&++w<S;);T._next=q||null}}return c=new Ft(c,l),c._enter=f,c._exit=g,c}function oR(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function sR(){return new Ft(this._exit||this._groups.map(wC),this._parents)}function uR(t,r,i){var l=this.enter(),o=this,u=this.exit();return typeof t=="function"?(l=t(l),l&&(l=l.selection())):l=l.append(t+""),r!=null&&(o=r(o),o&&(o=o.selection())),i==null?u.remove():i(u),l&&o?l.merge(o).order():o}function cR(t){for(var r=t.selection?t.selection():t,i=this._groups,l=r._groups,o=i.length,u=l.length,c=Math.min(o,u),f=new Array(o),g=0;g<c;++g)for(var d=i[g],m=l[g],p=d.length,y=f[g]=new Array(p),b,S=0;S<p;++S)(b=d[S]||m[S])&&(y[S]=b);for(;g<o;++g)f[g]=i[g];return new Ft(f,this._parents)}function fR(){for(var t=this._groups,r=-1,i=t.length;++r<i;)for(var l=t[r],o=l.length-1,u=l[o],c;--o>=0;)(c=l[o])&&(u&&c.compareDocumentPosition(u)^4&&u.parentNode.insertBefore(c,u),u=c);return this}function dR(t){t||(t=hR);function r(p,y){return p&&y?t(p.__data__,y.__data__):!p-!y}for(var i=this._groups,l=i.length,o=new Array(l),u=0;u<l;++u){for(var c=i[u],f=c.length,g=o[u]=new Array(f),d,m=0;m<f;++m)(d=c[m])&&(g[m]=d);g.sort(r)}return new Ft(o,this._parents).order()}function hR(t,r){return t<r?-1:t>r?1:t>=r?0:NaN}function gR(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function vR(){return Array.from(this)}function mR(){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var l=t[r],o=0,u=l.length;o<u;++o){var c=l[o];if(c)return c}return null}function pR(){let t=0;for(const r of this)++t;return t}function yR(){return!this.node()}function xR(t){for(var r=this._groups,i=0,l=r.length;i<l;++i)for(var o=r[i],u=0,c=o.length,f;u<c;++u)(f=o[u])&&t.call(f,f.__data__,u,o);return this}function bR(t){return function(){this.removeAttribute(t)}}function _R(t){return function(){this.removeAttributeNS(t.space,t.local)}}function wR(t,r){return function(){this.setAttribute(t,r)}}function SR(t,r){return function(){this.setAttributeNS(t.space,t.local,r)}}function ER(t,r){return function(){var i=r.apply(this,arguments);i==null?this.removeAttribute(t):this.setAttribute(t,i)}}function NR(t,r){return function(){var i=r.apply(this,arguments);i==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}function CR(t,r){var i=tu(t);if(arguments.length<2){var l=this.node();return i.local?l.getAttributeNS(i.space,i.local):l.getAttribute(i)}return this.each((r==null?i.local?_R:bR:typeof r=="function"?i.local?NR:ER:i.local?SR:wR)(i,r))}function SC(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function TR(t){return function(){this.style.removeProperty(t)}}function AR(t,r,i){return function(){this.style.setProperty(t,r,i)}}function jR(t,r,i){return function(){var l=r.apply(this,arguments);l==null?this.style.removeProperty(t):this.style.setProperty(t,l,i)}}function MR(t,r,i){return arguments.length>1?this.each((r==null?TR:typeof r=="function"?jR:AR)(t,r,i??"")):di(this.node(),t)}function di(t,r){return t.style.getPropertyValue(r)||SC(t).getComputedStyle(t,null).getPropertyValue(r)}function RR(t){return function(){delete this[t]}}function qR(t,r){return function(){this[t]=r}}function OR(t,r){return function(){var i=r.apply(this,arguments);i==null?delete this[t]:this[t]=i}}function zR(t,r){return arguments.length>1?this.each((r==null?RR:typeof r=="function"?OR:qR)(t,r)):this.node()[t]}function EC(t){return t.trim().split(/^|\s+/)}function Zp(t){return t.classList||new NC(t)}function NC(t){this._node=t,this._names=EC(t.getAttribute("class")||"")}NC.prototype={add:function(t){var r=this._names.indexOf(t);r<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var r=this._names.indexOf(t);r>=0&&(this._names.splice(r,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function CC(t,r){for(var i=Zp(t),l=-1,o=r.length;++l<o;)i.add(r[l])}function TC(t,r){for(var i=Zp(t),l=-1,o=r.length;++l<o;)i.remove(r[l])}function DR(t){return function(){CC(this,t)}}function kR(t){return function(){TC(this,t)}}function HR(t,r){return function(){(r.apply(this,arguments)?CC:TC)(this,t)}}function LR(t,r){var i=EC(t+"");if(arguments.length<2){for(var l=Zp(this.node()),o=-1,u=i.length;++o<u;)if(!l.contains(i[o]))return!1;return!0}return this.each((typeof r=="function"?HR:r?DR:kR)(i,r))}function BR(){this.textContent=""}function UR(t){return function(){this.textContent=t}}function GR(t){return function(){var r=t.apply(this,arguments);this.textContent=r??""}}function VR(t){return arguments.length?this.each(t==null?BR:(typeof t=="function"?GR:UR)(t)):this.node().textContent}function YR(){this.innerHTML=""}function IR(t){return function(){this.innerHTML=t}}function XR(t){return function(){var r=t.apply(this,arguments);this.innerHTML=r??""}}function ZR(t){return arguments.length?this.each(t==null?YR:(typeof t=="function"?XR:IR)(t)):this.node().innerHTML}function FR(){this.nextSibling&&this.parentNode.appendChild(this)}function KR(){return this.each(FR)}function QR(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function $R(){return this.each(QR)}function PR(t){var r=typeof t=="function"?t:yC(t);return this.select(function(){return this.appendChild(r.apply(this,arguments))})}function JR(){return null}function WR(t,r){var i=typeof t=="function"?t:yC(t),l=r==null?JR:typeof r=="function"?r:Xp(r);return this.select(function(){return this.insertBefore(i.apply(this,arguments),l.apply(this,arguments)||null)})}function e4(){var t=this.parentNode;t&&t.removeChild(this)}function t4(){return this.each(e4)}function n4(){var t=this.cloneNode(!1),r=this.parentNode;return r?r.insertBefore(t,this.nextSibling):t}function r4(){var t=this.cloneNode(!0),r=this.parentNode;return r?r.insertBefore(t,this.nextSibling):t}function a4(t){return this.select(t?r4:n4)}function i4(t){return arguments.length?this.property("__data__",t):this.node().__data__}function l4(t){return function(r){t.call(this,r,this.__data__)}}function o4(t){return t.trim().split(/^|\s+/).map(function(r){var i="",l=r.indexOf(".");return l>=0&&(i=r.slice(l+1),r=r.slice(0,l)),{type:r,name:i}})}function s4(t){return function(){var r=this.__on;if(r){for(var i=0,l=-1,o=r.length,u;i<o;++i)u=r[i],(!t.type||u.type===t.type)&&u.name===t.name?this.removeEventListener(u.type,u.listener,u.options):r[++l]=u;++l?r.length=l:delete this.__on}}}function u4(t,r,i){return function(){var l=this.__on,o,u=l4(r);if(l){for(var c=0,f=l.length;c<f;++c)if((o=l[c]).type===t.type&&o.name===t.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=u,o.options=i),o.value=r;return}}this.addEventListener(t.type,u,i),o={type:t.type,name:t.name,value:r,listener:u,options:i},l?l.push(o):this.__on=[o]}}function c4(t,r,i){var l=o4(t+""),o,u=l.length,c;if(arguments.length<2){var f=this.node().__on;if(f){for(var g=0,d=f.length,m;g<d;++g)for(o=0,m=f[g];o<u;++o)if((c=l[o]).type===m.type&&c.name===m.name)return m.value}return}for(f=r?u4:s4,o=0;o<u;++o)this.each(f(l[o],r,i));return this}function AC(t,r,i){var l=SC(t),o=l.CustomEvent;typeof o=="function"?o=new o(r,i):(o=l.document.createEvent("Event"),i?(o.initEvent(r,i.bubbles,i.cancelable),o.detail=i.detail):o.initEvent(r,!1,!1)),t.dispatchEvent(o)}function f4(t,r){return function(){return AC(this,t,r)}}function d4(t,r){return function(){return AC(this,t,r.apply(this,arguments))}}function h4(t,r){return this.each((typeof r=="function"?d4:f4)(t,r))}function*g4(){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var l=t[r],o=0,u=l.length,c;o<u;++o)(c=l[o])&&(yield c)}var jC=[null];function Ft(t,r){this._groups=t,this._parents=r}function Gl(){return new Ft([[document.documentElement]],jC)}function v4(){return this}Ft.prototype=Gl.prototype={constructor:Ft,select:GM,selectAll:XM,selectChild:QM,selectChildren:WM,filter:eR,data:lR,enter:tR,exit:sR,join:uR,merge:cR,selection:v4,order:fR,sort:dR,call:gR,nodes:vR,node:mR,size:pR,empty:yR,each:xR,attr:CR,style:MR,property:zR,classed:LR,text:VR,html:ZR,raise:KR,lower:$R,append:PR,insert:WR,remove:t4,clone:a4,datum:i4,on:c4,dispatch:h4,[Symbol.iterator]:g4};function Zt(t){return typeof t=="string"?new Ft([[document.querySelector(t)]],[document.documentElement]):new Ft([[t]],jC)}function m4(t){let r;for(;r=t.sourceEvent;)t=r;return t}function dn(t,r){if(t=m4(t),r===void 0&&(r=t.currentTarget),r){var i=r.ownerSVGElement||r;if(i.createSVGPoint){var l=i.createSVGPoint();return l.x=t.clientX,l.y=t.clientY,l=l.matrixTransform(r.getScreenCTM().inverse()),[l.x,l.y]}if(r.getBoundingClientRect){var o=r.getBoundingClientRect();return[t.clientX-o.left-r.clientLeft,t.clientY-o.top-r.clientTop]}}return[t.pageX,t.pageY]}const p4={passive:!1},Rl={capture:!0,passive:!1};function Pf(t){t.stopImmediatePropagation()}function ci(t){t.preventDefault(),t.stopImmediatePropagation()}function MC(t){var r=t.document.documentElement,i=Zt(t).on("dragstart.drag",ci,Rl);"onselectstart"in r?i.on("selectstart.drag",ci,Rl):(r.__noselect=r.style.MozUserSelect,r.style.MozUserSelect="none")}function RC(t,r){var i=t.document.documentElement,l=Zt(t).on("dragstart.drag",null);r&&(l.on("click.drag",ci,Rl),setTimeout(function(){l.on("click.drag",null)},0)),"onselectstart"in i?l.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}const Ss=t=>()=>t;function jp(t,{sourceEvent:r,subject:i,target:l,identifier:o,active:u,x:c,y:f,dx:g,dy:d,dispatch:m}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},subject:{value:i,enumerable:!0,configurable:!0},target:{value:l,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:u,enumerable:!0,configurable:!0},x:{value:c,enumerable:!0,configurable:!0},y:{value:f,enumerable:!0,configurable:!0},dx:{value:g,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:m}})}jp.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function y4(t){return!t.ctrlKey&&!t.button}function x4(){return this.parentNode}function b4(t,r){return r??{x:t.x,y:t.y}}function _4(){return navigator.maxTouchPoints||"ontouchstart"in this}function qC(){var t=y4,r=x4,i=b4,l=_4,o={},u=eu("start","drag","end"),c=0,f,g,d,m,p=0;function y(T){T.on("mousedown.drag",b).filter(l).on("touchstart.drag",E).on("touchmove.drag",C,p4).on("touchend.drag touchcancel.drag",A).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(T,q){if(!(m||!t.call(this,T,q))){var R=w(this,r.call(this,T,q),T,q,"mouse");R&&(Zt(T.view).on("mousemove.drag",S,Rl).on("mouseup.drag",N,Rl),MC(T.view),Pf(T),d=!1,f=T.clientX,g=T.clientY,R("start",T))}}function S(T){if(ci(T),!d){var q=T.clientX-f,R=T.clientY-g;d=q*q+R*R>p}o.mouse("drag",T)}function N(T){Zt(T.view).on("mousemove.drag mouseup.drag",null),RC(T.view,d),ci(T),o.mouse("end",T)}function E(T,q){if(t.call(this,T,q)){var R=T.changedTouches,M=r.call(this,T,q),L=R.length,H,Q;for(H=0;H<L;++H)(Q=w(this,M,T,q,R[H].identifier,R[H]))&&(Pf(T),Q("start",T,R[H]))}}function C(T){var q=T.changedTouches,R=q.length,M,L;for(M=0;M<R;++M)(L=o[q[M].identifier])&&(ci(T),L("drag",T,q[M]))}function A(T){var q=T.changedTouches,R=q.length,M,L;for(m&&clearTimeout(m),m=setTimeout(function(){m=null},500),M=0;M<R;++M)(L=o[q[M].identifier])&&(Pf(T),L("end",T,q[M]))}function w(T,q,R,M,L,H){var Q=u.copy(),B=dn(H||R,q),F,W,D;if((D=i.call(T,new jp("beforestart",{sourceEvent:R,target:y,identifier:L,active:c,x:B[0],y:B[1],dx:0,dy:0,dispatch:Q}),M))!=null)return F=D.x-B[0]||0,W=D.y-B[1]||0,function K(O,G,X){var P=B,oe;switch(O){case"start":o[L]=K,oe=c++;break;case"end":delete o[L],--c;case"drag":B=dn(X||G,q),oe=c;break}Q.call(O,T,new jp(O,{sourceEvent:G,subject:D,target:y,identifier:L,active:oe,x:B[0]+F,y:B[1]+W,dx:B[0]-P[0],dy:B[1]-P[1],dispatch:Q}),M)}}return y.filter=function(T){return arguments.length?(t=typeof T=="function"?T:Ss(!!T),y):t},y.container=function(T){return arguments.length?(r=typeof T=="function"?T:Ss(T),y):r},y.subject=function(T){return arguments.length?(i=typeof T=="function"?T:Ss(T),y):i},y.touchable=function(T){return arguments.length?(l=typeof T=="function"?T:Ss(!!T),y):l},y.on=function(){var T=u.on.apply(u,arguments);return T===u?y:T},y.clickDistance=function(T){return arguments.length?(p=(T=+T)*T,y):Math.sqrt(p)},y}function Fp(t,r,i){t.prototype=r.prototype=i,i.constructor=t}function OC(t,r){var i=Object.create(t.prototype);for(var l in r)i[l]=r[l];return i}function Vl(){}var ql=.7,Us=1/ql,fi="\\s*([+-]?\\d+)\\s*",Ol="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Cn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",w4=/^#([0-9a-f]{3,8})$/,S4=new RegExp(`^rgb\\(${fi},${fi},${fi}\\)$`),E4=new RegExp(`^rgb\\(${Cn},${Cn},${Cn}\\)$`),N4=new RegExp(`^rgba\\(${fi},${fi},${fi},${Ol}\\)$`),C4=new RegExp(`^rgba\\(${Cn},${Cn},${Cn},${Ol}\\)$`),T4=new RegExp(`^hsl\\(${Ol},${Cn},${Cn}\\)$`),A4=new RegExp(`^hsla\\(${Ol},${Cn},${Cn},${Ol}\\)$`),Ab={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Fp(Vl,fa,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:jb,formatHex:jb,formatHex8:j4,formatHsl:M4,formatRgb:Mb,toString:Mb});function jb(){return this.rgb().formatHex()}function j4(){return this.rgb().formatHex8()}function M4(){return zC(this).formatHsl()}function Mb(){return this.rgb().formatRgb()}function fa(t){var r,i;return t=(t+"").trim().toLowerCase(),(r=w4.exec(t))?(i=r[1].length,r=parseInt(r[1],16),i===6?Rb(r):i===3?new zt(r>>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):i===8?Es(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):i===4?Es(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=S4.exec(t))?new zt(r[1],r[2],r[3],1):(r=E4.exec(t))?new zt(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=N4.exec(t))?Es(r[1],r[2],r[3],r[4]):(r=C4.exec(t))?Es(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=T4.exec(t))?zb(r[1],r[2]/100,r[3]/100,1):(r=A4.exec(t))?zb(r[1],r[2]/100,r[3]/100,r[4]):Ab.hasOwnProperty(t)?Rb(Ab[t]):t==="transparent"?new zt(NaN,NaN,NaN,0):null}function Rb(t){return new zt(t>>16&255,t>>8&255,t&255,1)}function Es(t,r,i,l){return l<=0&&(t=r=i=NaN),new zt(t,r,i,l)}function R4(t){return t instanceof Vl||(t=fa(t)),t?(t=t.rgb(),new zt(t.r,t.g,t.b,t.opacity)):new zt}function Mp(t,r,i,l){return arguments.length===1?R4(t):new zt(t,r,i,l??1)}function zt(t,r,i,l){this.r=+t,this.g=+r,this.b=+i,this.opacity=+l}Fp(zt,Mp,OC(Vl,{brighter(t){return t=t==null?Us:Math.pow(Us,t),new zt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ql:Math.pow(ql,t),new zt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new zt(ua(this.r),ua(this.g),ua(this.b),Gs(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:qb,formatHex:qb,formatHex8:q4,formatRgb:Ob,toString:Ob}));function qb(){return`#${sa(this.r)}${sa(this.g)}${sa(this.b)}`}function q4(){return`#${sa(this.r)}${sa(this.g)}${sa(this.b)}${sa((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ob(){const t=Gs(this.opacity);return`${t===1?"rgb(":"rgba("}${ua(this.r)}, ${ua(this.g)}, ${ua(this.b)}${t===1?")":`, ${t})`}`}function Gs(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ua(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function sa(t){return t=ua(t),(t<16?"0":"")+t.toString(16)}function zb(t,r,i,l){return l<=0?t=r=i=NaN:i<=0||i>=1?t=r=NaN:r<=0&&(t=NaN),new hn(t,r,i,l)}function zC(t){if(t instanceof hn)return new hn(t.h,t.s,t.l,t.opacity);if(t instanceof Vl||(t=fa(t)),!t)return new hn;if(t instanceof hn)return t;t=t.rgb();var r=t.r/255,i=t.g/255,l=t.b/255,o=Math.min(r,i,l),u=Math.max(r,i,l),c=NaN,f=u-o,g=(u+o)/2;return f?(r===u?c=(i-l)/f+(i<l)*6:i===u?c=(l-r)/f+2:c=(r-i)/f+4,f/=g<.5?u+o:2-u-o,c*=60):f=g>0&&g<1?0:c,new hn(c,f,g,t.opacity)}function O4(t,r,i,l){return arguments.length===1?zC(t):new hn(t,r,i,l??1)}function hn(t,r,i,l){this.h=+t,this.s=+r,this.l=+i,this.opacity=+l}Fp(hn,O4,OC(Vl,{brighter(t){return t=t==null?Us:Math.pow(Us,t),new hn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ql:Math.pow(ql,t),new hn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,r=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,l=i+(i<.5?i:1-i)*r,o=2*i-l;return new zt(Jf(t>=240?t-240:t+120,o,l),Jf(t,o,l),Jf(t<120?t+240:t-120,o,l),this.opacity)},clamp(){return new hn(Db(this.h),Ns(this.s),Ns(this.l),Gs(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Gs(this.opacity);return`${t===1?"hsl(":"hsla("}${Db(this.h)}, ${Ns(this.s)*100}%, ${Ns(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Db(t){return t=(t||0)%360,t<0?t+360:t}function Ns(t){return Math.max(0,Math.min(1,t||0))}function Jf(t,r,i){return(t<60?r+(i-r)*t/60:t<180?i:t<240?r+(i-r)*(240-t)/60:r)*255}const Kp=t=>()=>t;function z4(t,r){return function(i){return t+i*r}}function D4(t,r,i){return t=Math.pow(t,i),r=Math.pow(r,i)-t,i=1/i,function(l){return Math.pow(t+l*r,i)}}function k4(t){return(t=+t)==1?DC:function(r,i){return i-r?D4(r,i,t):Kp(isNaN(r)?i:r)}}function DC(t,r){var i=r-t;return i?z4(t,i):Kp(isNaN(t)?r:t)}const Vs=(function t(r){var i=k4(r);function l(o,u){var c=i((o=Mp(o)).r,(u=Mp(u)).r),f=i(o.g,u.g),g=i(o.b,u.b),d=DC(o.opacity,u.opacity);return function(m){return o.r=c(m),o.g=f(m),o.b=g(m),o.opacity=d(m),o+""}}return l.gamma=t,l})(1);function H4(t,r){r||(r=[]);var i=t?Math.min(r.length,t.length):0,l=r.slice(),o;return function(u){for(o=0;o<i;++o)l[o]=t[o]*(1-u)+r[o]*u;return l}}function L4(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function B4(t,r){var i=r?r.length:0,l=t?Math.min(i,t.length):0,o=new Array(l),u=new Array(i),c;for(c=0;c<l;++c)o[c]=jl(t[c],r[c]);for(;c<i;++c)u[c]=r[c];return function(f){for(c=0;c<l;++c)u[c]=o[c](f);return u}}function U4(t,r){var i=new Date;return t=+t,r=+r,function(l){return i.setTime(t*(1-l)+r*l),i}}function Nn(t,r){return t=+t,r=+r,function(i){return t*(1-i)+r*i}}function G4(t,r){var i={},l={},o;(t===null||typeof t!="object")&&(t={}),(r===null||typeof r!="object")&&(r={});for(o in r)o in t?i[o]=jl(t[o],r[o]):l[o]=r[o];return function(u){for(o in i)l[o]=i[o](u);return l}}var Rp=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Wf=new RegExp(Rp.source,"g");function V4(t){return function(){return t}}function Y4(t){return function(r){return t(r)+""}}function kC(t,r){var i=Rp.lastIndex=Wf.lastIndex=0,l,o,u,c=-1,f=[],g=[];for(t=t+"",r=r+"";(l=Rp.exec(t))&&(o=Wf.exec(r));)(u=o.index)>i&&(u=r.slice(i,u),f[c]?f[c]+=u:f[++c]=u),(l=l[0])===(o=o[0])?f[c]?f[c]+=o:f[++c]=o:(f[++c]=null,g.push({i:c,x:Nn(l,o)})),i=Wf.lastIndex;return i<r.length&&(u=r.slice(i),f[c]?f[c]+=u:f[++c]=u),f.length<2?g[0]?Y4(g[0].x):V4(r):(r=g.length,function(d){for(var m=0,p;m<r;++m)f[(p=g[m]).i]=p.x(d);return f.join("")})}function jl(t,r){var i=typeof r,l;return r==null||i==="boolean"?Kp(r):(i==="number"?Nn:i==="string"?(l=fa(r))?(r=l,Vs):kC:r instanceof fa?Vs:r instanceof Date?U4:L4(r)?H4:Array.isArray(r)?B4:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?G4:Nn)(t,r)}var kb=180/Math.PI,qp={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function HC(t,r,i,l,o,u){var c,f,g;return(c=Math.sqrt(t*t+r*r))&&(t/=c,r/=c),(g=t*i+r*l)&&(i-=t*g,l-=r*g),(f=Math.sqrt(i*i+l*l))&&(i/=f,l/=f,g/=f),t*l<r*i&&(t=-t,r=-r,g=-g,c=-c),{translateX:o,translateY:u,rotate:Math.atan2(r,t)*kb,skewX:Math.atan(g)*kb,scaleX:c,scaleY:f}}var Cs;function I4(t){const r=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return r.isIdentity?qp:HC(r.a,r.b,r.c,r.d,r.e,r.f)}function X4(t){return t==null||(Cs||(Cs=document.createElementNS("http://www.w3.org/2000/svg","g")),Cs.setAttribute("transform",t),!(t=Cs.transform.baseVal.consolidate()))?qp:(t=t.matrix,HC(t.a,t.b,t.c,t.d,t.e,t.f))}function LC(t,r,i,l){function o(d){return d.length?d.pop()+" ":""}function u(d,m,p,y,b,S){if(d!==p||m!==y){var N=b.push("translate(",null,r,null,i);S.push({i:N-4,x:Nn(d,p)},{i:N-2,x:Nn(m,y)})}else(p||y)&&b.push("translate("+p+r+y+i)}function c(d,m,p,y){d!==m?(d-m>180?m+=360:m-d>180&&(d+=360),y.push({i:p.push(o(p)+"rotate(",null,l)-2,x:Nn(d,m)})):m&&p.push(o(p)+"rotate("+m+l)}function f(d,m,p,y){d!==m?y.push({i:p.push(o(p)+"skewX(",null,l)-2,x:Nn(d,m)}):m&&p.push(o(p)+"skewX("+m+l)}function g(d,m,p,y,b,S){if(d!==p||m!==y){var N=b.push(o(b)+"scale(",null,",",null,")");S.push({i:N-4,x:Nn(d,p)},{i:N-2,x:Nn(m,y)})}else(p!==1||y!==1)&&b.push(o(b)+"scale("+p+","+y+")")}return function(d,m){var p=[],y=[];return d=t(d),m=t(m),u(d.translateX,d.translateY,m.translateX,m.translateY,p,y),c(d.rotate,m.rotate,p,y),f(d.skewX,m.skewX,p,y),g(d.scaleX,d.scaleY,m.scaleX,m.scaleY,p,y),d=m=null,function(b){for(var S=-1,N=y.length,E;++S<N;)p[(E=y[S]).i]=E.x(b);return p.join("")}}}var Z4=LC(I4,"px, ","px)","deg)"),F4=LC(X4,", ",")",")"),K4=1e-12;function Hb(t){return((t=Math.exp(t))+1/t)/2}function Q4(t){return((t=Math.exp(t))-1/t)/2}function $4(t){return((t=Math.exp(2*t))-1)/(t+1)}const Ds=(function t(r,i,l){function o(u,c){var f=u[0],g=u[1],d=u[2],m=c[0],p=c[1],y=c[2],b=m-f,S=p-g,N=b*b+S*S,E,C;if(N<K4)C=Math.log(y/d)/r,E=function(M){return[f+M*b,g+M*S,d*Math.exp(r*M*C)]};else{var A=Math.sqrt(N),w=(y*y-d*d+l*N)/(2*d*i*A),T=(y*y-d*d-l*N)/(2*y*i*A),q=Math.log(Math.sqrt(w*w+1)-w),R=Math.log(Math.sqrt(T*T+1)-T);C=(R-q)/r,E=function(M){var L=M*C,H=Hb(q),Q=d/(i*A)*(H*$4(r*L+q)-Q4(q));return[f+Q*b,g+Q*S,d*H/Hb(r*L+q)]}}return E.duration=C*1e3*r/Math.SQRT2,E}return o.rho=function(u){var c=Math.max(.001,+u),f=c*c,g=f*f;return t(c,f,g)},o})(Math.SQRT2,2,4);var hi=0,El=0,_l=0,BC=1e3,Ys,Nl,Is=0,da=0,nu=0,zl=typeof performance=="object"&&performance.now?performance:Date,UC=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Qp(){return da||(UC(P4),da=zl.now()+nu)}function P4(){da=0}function Xs(){this._call=this._time=this._next=null}Xs.prototype=GC.prototype={constructor:Xs,restart:function(t,r,i){if(typeof t!="function")throw new TypeError("callback is not a function");i=(i==null?Qp():+i)+(r==null?0:+r),!this._next&&Nl!==this&&(Nl?Nl._next=this:Ys=this,Nl=this),this._call=t,this._time=i,Op()},stop:function(){this._call&&(this._call=null,this._time=1/0,Op())}};function GC(t,r,i){var l=new Xs;return l.restart(t,r,i),l}function J4(){Qp(),++hi;for(var t=Ys,r;t;)(r=da-t._time)>=0&&t._call.call(void 0,r),t=t._next;--hi}function Lb(){da=(Is=zl.now())+nu,hi=El=0;try{J4()}finally{hi=0,eq(),da=0}}function W4(){var t=zl.now(),r=t-Is;r>BC&&(nu-=r,Is=t)}function eq(){for(var t,r=Ys,i,l=1/0;r;)r._call?(l>r._time&&(l=r._time),t=r,r=r._next):(i=r._next,r._next=null,r=t?t._next=i:Ys=i);Nl=t,Op(l)}function Op(t){if(!hi){El&&(El=clearTimeout(El));var r=t-da;r>24?(t<1/0&&(El=setTimeout(Lb,t-zl.now()-nu)),_l&&(_l=clearInterval(_l))):(_l||(Is=zl.now(),_l=setInterval(W4,BC)),hi=1,UC(Lb))}}function Bb(t,r,i){var l=new Xs;return r=r==null?0:+r,l.restart(o=>{l.stop(),t(o+r)},r,i),l}var tq=eu("start","end","cancel","interrupt"),nq=[],VC=0,Ub=1,zp=2,ks=3,Gb=4,Dp=5,Hs=6;function ru(t,r,i,l,o,u){var c=t.__transition;if(!c)t.__transition={};else if(i in c)return;rq(t,i,{name:r,index:l,group:o,on:tq,tween:nq,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:VC})}function $p(t,r){var i=pn(t,r);if(i.state>VC)throw new Error("too late; already scheduled");return i}function An(t,r){var i=pn(t,r);if(i.state>ks)throw new Error("too late; already running");return i}function pn(t,r){var i=t.__transition;if(!i||!(i=i[r]))throw new Error("transition not found");return i}function rq(t,r,i){var l=t.__transition,o;l[r]=i,i.timer=GC(u,0,i.time);function u(d){i.state=Ub,i.timer.restart(c,i.delay,i.time),i.delay<=d&&c(d-i.delay)}function c(d){var m,p,y,b;if(i.state!==Ub)return g();for(m in l)if(b=l[m],b.name===i.name){if(b.state===ks)return Bb(c);b.state===Gb?(b.state=Hs,b.timer.stop(),b.on.call("interrupt",t,t.__data__,b.index,b.group),delete l[m]):+m<r&&(b.state=Hs,b.timer.stop(),b.on.call("cancel",t,t.__data__,b.index,b.group),delete l[m])}if(Bb(function(){i.state===ks&&(i.state=Gb,i.timer.restart(f,i.delay,i.time),f(d))}),i.state=zp,i.on.call("start",t,t.__data__,i.index,i.group),i.state===zp){for(i.state=ks,o=new Array(y=i.tween.length),m=0,p=-1;m<y;++m)(b=i.tween[m].value.call(t,t.__data__,i.index,i.group))&&(o[++p]=b);o.length=p+1}}function f(d){for(var m=d<i.duration?i.ease.call(null,d/i.duration):(i.timer.restart(g),i.state=Dp,1),p=-1,y=o.length;++p<y;)o[p].call(t,m);i.state===Dp&&(i.on.call("end",t,t.__data__,i.index,i.group),g())}function g(){i.state=Hs,i.timer.stop(),delete l[r];for(var d in l)return;delete t.__transition}}function Ls(t,r){var i=t.__transition,l,o,u=!0,c;if(i){r=r==null?null:r+"";for(c in i){if((l=i[c]).name!==r){u=!1;continue}o=l.state>zp&&l.state<Dp,l.state=Hs,l.timer.stop(),l.on.call(o?"interrupt":"cancel",t,t.__data__,l.index,l.group),delete i[c]}u&&delete t.__transition}}function aq(t){return this.each(function(){Ls(this,t)})}function iq(t,r){var i,l;return function(){var o=An(this,t),u=o.tween;if(u!==i){l=i=u;for(var c=0,f=l.length;c<f;++c)if(l[c].name===r){l=l.slice(),l.splice(c,1);break}}o.tween=l}}function lq(t,r,i){var l,o;if(typeof i!="function")throw new Error;return function(){var u=An(this,t),c=u.tween;if(c!==l){o=(l=c).slice();for(var f={name:r,value:i},g=0,d=o.length;g<d;++g)if(o[g].name===r){o[g]=f;break}g===d&&o.push(f)}u.tween=o}}function oq(t,r){var i=this._id;if(t+="",arguments.length<2){for(var l=pn(this.node(),i).tween,o=0,u=l.length,c;o<u;++o)if((c=l[o]).name===t)return c.value;return null}return this.each((r==null?iq:lq)(i,t,r))}function Pp(t,r,i){var l=t._id;return t.each(function(){var o=An(this,l);(o.value||(o.value={}))[r]=i.apply(this,arguments)}),function(o){return pn(o,l).value[r]}}function YC(t,r){var i;return(typeof r=="number"?Nn:r instanceof fa?Vs:(i=fa(r))?(r=i,Vs):kC)(t,r)}function sq(t){return function(){this.removeAttribute(t)}}function uq(t){return function(){this.removeAttributeNS(t.space,t.local)}}function cq(t,r,i){var l,o=i+"",u;return function(){var c=this.getAttribute(t);return c===o?null:c===l?u:u=r(l=c,i)}}function fq(t,r,i){var l,o=i+"",u;return function(){var c=this.getAttributeNS(t.space,t.local);return c===o?null:c===l?u:u=r(l=c,i)}}function dq(t,r,i){var l,o,u;return function(){var c,f=i(this),g;return f==null?void this.removeAttribute(t):(c=this.getAttribute(t),g=f+"",c===g?null:c===l&&g===o?u:(o=g,u=r(l=c,f)))}}function hq(t,r,i){var l,o,u;return function(){var c,f=i(this),g;return f==null?void this.removeAttributeNS(t.space,t.local):(c=this.getAttributeNS(t.space,t.local),g=f+"",c===g?null:c===l&&g===o?u:(o=g,u=r(l=c,f)))}}function gq(t,r){var i=tu(t),l=i==="transform"?F4:YC;return this.attrTween(t,typeof r=="function"?(i.local?hq:dq)(i,l,Pp(this,"attr."+t,r)):r==null?(i.local?uq:sq)(i):(i.local?fq:cq)(i,l,r))}function vq(t,r){return function(i){this.setAttribute(t,r.call(this,i))}}function mq(t,r){return function(i){this.setAttributeNS(t.space,t.local,r.call(this,i))}}function pq(t,r){var i,l;function o(){var u=r.apply(this,arguments);return u!==l&&(i=(l=u)&&mq(t,u)),i}return o._value=r,o}function yq(t,r){var i,l;function o(){var u=r.apply(this,arguments);return u!==l&&(i=(l=u)&&vq(t,u)),i}return o._value=r,o}function xq(t,r){var i="attr."+t;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(r==null)return this.tween(i,null);if(typeof r!="function")throw new Error;var l=tu(t);return this.tween(i,(l.local?pq:yq)(l,r))}function bq(t,r){return function(){$p(this,t).delay=+r.apply(this,arguments)}}function _q(t,r){return r=+r,function(){$p(this,t).delay=r}}function wq(t){var r=this._id;return arguments.length?this.each((typeof t=="function"?bq:_q)(r,t)):pn(this.node(),r).delay}function Sq(t,r){return function(){An(this,t).duration=+r.apply(this,arguments)}}function Eq(t,r){return r=+r,function(){An(this,t).duration=r}}function Nq(t){var r=this._id;return arguments.length?this.each((typeof t=="function"?Sq:Eq)(r,t)):pn(this.node(),r).duration}function Cq(t,r){if(typeof r!="function")throw new Error;return function(){An(this,t).ease=r}}function Tq(t){var r=this._id;return arguments.length?this.each(Cq(r,t)):pn(this.node(),r).ease}function Aq(t,r){return function(){var i=r.apply(this,arguments);if(typeof i!="function")throw new Error;An(this,t).ease=i}}function jq(t){if(typeof t!="function")throw new Error;return this.each(Aq(this._id,t))}function Mq(t){typeof t!="function"&&(t=bC(t));for(var r=this._groups,i=r.length,l=new Array(i),o=0;o<i;++o)for(var u=r[o],c=u.length,f=l[o]=[],g,d=0;d<c;++d)(g=u[d])&&t.call(g,g.__data__,d,u)&&f.push(g);return new nr(l,this._parents,this._name,this._id)}function Rq(t){if(t._id!==this._id)throw new Error;for(var r=this._groups,i=t._groups,l=r.length,o=i.length,u=Math.min(l,o),c=new Array(l),f=0;f<u;++f)for(var g=r[f],d=i[f],m=g.length,p=c[f]=new Array(m),y,b=0;b<m;++b)(y=g[b]||d[b])&&(p[b]=y);for(;f<l;++f)c[f]=r[f];return new nr(c,this._parents,this._name,this._id)}function qq(t){return(t+"").trim().split(/^|\s+/).every(function(r){var i=r.indexOf(".");return i>=0&&(r=r.slice(0,i)),!r||r==="start"})}function Oq(t,r,i){var l,o,u=qq(r)?$p:An;return function(){var c=u(this,t),f=c.on;f!==l&&(o=(l=f).copy()).on(r,i),c.on=o}}function zq(t,r){var i=this._id;return arguments.length<2?pn(this.node(),i).on.on(t):this.each(Oq(i,t,r))}function Dq(t){return function(){var r=this.parentNode;for(var i in this.__transition)if(+i!==t)return;r&&r.removeChild(this)}}function kq(){return this.on("end.remove",Dq(this._id))}function Hq(t){var r=this._name,i=this._id;typeof t!="function"&&(t=Xp(t));for(var l=this._groups,o=l.length,u=new Array(o),c=0;c<o;++c)for(var f=l[c],g=f.length,d=u[c]=new Array(g),m,p,y=0;y<g;++y)(m=f[y])&&(p=t.call(m,m.__data__,y,f))&&("__data__"in m&&(p.__data__=m.__data__),d[y]=p,ru(d[y],r,i,y,d,pn(m,i)));return new nr(u,this._parents,r,i)}function Lq(t){var r=this._name,i=this._id;typeof t!="function"&&(t=xC(t));for(var l=this._groups,o=l.length,u=[],c=[],f=0;f<o;++f)for(var g=l[f],d=g.length,m,p=0;p<d;++p)if(m=g[p]){for(var y=t.call(m,m.__data__,p,g),b,S=pn(m,i),N=0,E=y.length;N<E;++N)(b=y[N])&&ru(b,r,i,N,y,S);u.push(y),c.push(m)}return new nr(u,c,r,i)}var Bq=Gl.prototype.constructor;function Uq(){return new Bq(this._groups,this._parents)}function Gq(t,r){var i,l,o;return function(){var u=di(this,t),c=(this.style.removeProperty(t),di(this,t));return u===c?null:u===i&&c===l?o:o=r(i=u,l=c)}}function IC(t){return function(){this.style.removeProperty(t)}}function Vq(t,r,i){var l,o=i+"",u;return function(){var c=di(this,t);return c===o?null:c===l?u:u=r(l=c,i)}}function Yq(t,r,i){var l,o,u;return function(){var c=di(this,t),f=i(this),g=f+"";return f==null&&(g=f=(this.style.removeProperty(t),di(this,t))),c===g?null:c===l&&g===o?u:(o=g,u=r(l=c,f))}}function Iq(t,r){var i,l,o,u="style."+r,c="end."+u,f;return function(){var g=An(this,t),d=g.on,m=g.value[u]==null?f||(f=IC(r)):void 0;(d!==i||o!==m)&&(l=(i=d).copy()).on(c,o=m),g.on=l}}function Xq(t,r,i){var l=(t+="")=="transform"?Z4:YC;return r==null?this.styleTween(t,Gq(t,l)).on("end.style."+t,IC(t)):typeof r=="function"?this.styleTween(t,Yq(t,l,Pp(this,"style."+t,r))).each(Iq(this._id,t)):this.styleTween(t,Vq(t,l,r),i).on("end.style."+t,null)}function Zq(t,r,i){return function(l){this.style.setProperty(t,r.call(this,l),i)}}function Fq(t,r,i){var l,o;function u(){var c=r.apply(this,arguments);return c!==o&&(l=(o=c)&&Zq(t,c,i)),l}return u._value=r,u}function Kq(t,r,i){var l="style."+(t+="");if(arguments.length<2)return(l=this.tween(l))&&l._value;if(r==null)return this.tween(l,null);if(typeof r!="function")throw new Error;return this.tween(l,Fq(t,r,i??""))}function Qq(t){return function(){this.textContent=t}}function $q(t){return function(){var r=t(this);this.textContent=r??""}}function Pq(t){return this.tween("text",typeof t=="function"?$q(Pp(this,"text",t)):Qq(t==null?"":t+""))}function Jq(t){return function(r){this.textContent=t.call(this,r)}}function Wq(t){var r,i;function l(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&Jq(o)),r}return l._value=t,l}function eO(t){var r="text";if(arguments.length<1)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,Wq(t))}function tO(){for(var t=this._name,r=this._id,i=XC(),l=this._groups,o=l.length,u=0;u<o;++u)for(var c=l[u],f=c.length,g,d=0;d<f;++d)if(g=c[d]){var m=pn(g,r);ru(g,t,i,d,c,{time:m.time+m.delay+m.duration,delay:0,duration:m.duration,ease:m.ease})}return new nr(l,this._parents,t,i)}function nO(){var t,r,i=this,l=i._id,o=i.size();return new Promise(function(u,c){var f={value:c},g={value:function(){--o===0&&u()}};i.each(function(){var d=An(this,l),m=d.on;m!==t&&(r=(t=m).copy(),r._.cancel.push(f),r._.interrupt.push(f),r._.end.push(g)),d.on=r}),o===0&&u()})}var rO=0;function nr(t,r,i,l){this._groups=t,this._parents=r,this._name=i,this._id=l}function XC(){return++rO}var Wn=Gl.prototype;nr.prototype={constructor:nr,select:Hq,selectAll:Lq,selectChild:Wn.selectChild,selectChildren:Wn.selectChildren,filter:Mq,merge:Rq,selection:Uq,transition:tO,call:Wn.call,nodes:Wn.nodes,node:Wn.node,size:Wn.size,empty:Wn.empty,each:Wn.each,on:zq,attr:gq,attrTween:xq,style:Xq,styleTween:Kq,text:Pq,textTween:eO,remove:kq,tween:oq,delay:wq,duration:Nq,ease:Tq,easeVarying:jq,end:nO,[Symbol.iterator]:Wn[Symbol.iterator]};function aO(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var iO={time:null,delay:0,duration:250,ease:aO};function lO(t,r){for(var i;!(i=t.__transition)||!(i=i[r]);)if(!(t=t.parentNode))throw new Error(`transition ${r} not found`);return i}function oO(t){var r,i;t instanceof nr?(r=t._id,t=t._name):(r=XC(),(i=iO).time=Qp(),t=t==null?null:t+"");for(var l=this._groups,o=l.length,u=0;u<o;++u)for(var c=l[u],f=c.length,g,d=0;d<f;++d)(g=c[d])&&ru(g,t,r,d,c,i||lO(g,r));return new nr(l,this._parents,t,r)}Gl.prototype.interrupt=aq;Gl.prototype.transition=oO;const Ts=t=>()=>t;function sO(t,{sourceEvent:r,target:i,transform:l,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:l,enumerable:!0,configurable:!0},_:{value:o}})}function er(t,r,i){this.k=t,this.x=r,this.y=i}er.prototype={constructor:er,scale:function(t){return t===1?this:new er(this.k*t,this.x,this.y)},translate:function(t,r){return t===0&r===0?this:new er(this.k,this.x+this.k*t,this.y+this.k*r)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var au=new er(1,0,0);ZC.prototype=er.prototype;function ZC(t){for(;!t.__zoom;)if(!(t=t.parentNode))return au;return t.__zoom}function ed(t){t.stopImmediatePropagation()}function wl(t){t.preventDefault(),t.stopImmediatePropagation()}function uO(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function cO(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Vb(){return this.__zoom||au}function fO(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function dO(){return navigator.maxTouchPoints||"ontouchstart"in this}function hO(t,r,i){var l=t.invertX(r[0][0])-i[0][0],o=t.invertX(r[1][0])-i[1][0],u=t.invertY(r[0][1])-i[0][1],c=t.invertY(r[1][1])-i[1][1];return t.translate(o>l?(l+o)/2:Math.min(0,l)||Math.max(0,o),c>u?(u+c)/2:Math.min(0,u)||Math.max(0,c))}function FC(){var t=uO,r=cO,i=hO,l=fO,o=dO,u=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],f=250,g=Ds,d=eu("start","zoom","end"),m,p,y,b=500,S=150,N=0,E=10;function C(D){D.property("__zoom",Vb).on("wheel.zoom",L,{passive:!1}).on("mousedown.zoom",H).on("dblclick.zoom",Q).filter(o).on("touchstart.zoom",B).on("touchmove.zoom",F).on("touchend.zoom touchcancel.zoom",W).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}C.transform=function(D,K,O,G){var X=D.selection?D.selection():D;X.property("__zoom",Vb),D!==X?q(D,K,O,G):X.interrupt().each(function(){R(this,arguments).event(G).start().zoom(null,typeof K=="function"?K.apply(this,arguments):K).end()})},C.scaleBy=function(D,K,O,G){C.scaleTo(D,function(){var X=this.__zoom.k,P=typeof K=="function"?K.apply(this,arguments):K;return X*P},O,G)},C.scaleTo=function(D,K,O,G){C.transform(D,function(){var X=r.apply(this,arguments),P=this.__zoom,oe=O==null?T(X):typeof O=="function"?O.apply(this,arguments):O,z=P.invert(oe),Y=typeof K=="function"?K.apply(this,arguments):K;return i(w(A(P,Y),oe,z),X,c)},O,G)},C.translateBy=function(D,K,O,G){C.transform(D,function(){return i(this.__zoom.translate(typeof K=="function"?K.apply(this,arguments):K,typeof O=="function"?O.apply(this,arguments):O),r.apply(this,arguments),c)},null,G)},C.translateTo=function(D,K,O,G,X){C.transform(D,function(){var P=r.apply(this,arguments),oe=this.__zoom,z=G==null?T(P):typeof G=="function"?G.apply(this,arguments):G;return i(au.translate(z[0],z[1]).scale(oe.k).translate(typeof K=="function"?-K.apply(this,arguments):-K,typeof O=="function"?-O.apply(this,arguments):-O),P,c)},G,X)};function A(D,K){return K=Math.max(u[0],Math.min(u[1],K)),K===D.k?D:new er(K,D.x,D.y)}function w(D,K,O){var G=K[0]-O[0]*D.k,X=K[1]-O[1]*D.k;return G===D.x&&X===D.y?D:new er(D.k,G,X)}function T(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function q(D,K,O,G){D.on("start.zoom",function(){R(this,arguments).event(G).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(G).end()}).tween("zoom",function(){var X=this,P=arguments,oe=R(X,P).event(G),z=r.apply(X,P),Y=O==null?T(z):typeof O=="function"?O.apply(X,P):O,ae=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),k=X.__zoom,V=typeof K=="function"?K.apply(X,P):K,I=g(k.invert(Y).concat(ae/k.k),V.invert(Y).concat(ae/V.k));return function(ne){if(ne===1)ne=V;else{var le=I(ne),fe=ae/le[2];ne=new er(fe,Y[0]-le[0]*fe,Y[1]-le[1]*fe)}oe.zoom(null,ne)}})}function R(D,K,O){return!O&&D.__zooming||new M(D,K)}function M(D,K){this.that=D,this.args=K,this.active=0,this.sourceEvent=null,this.extent=r.apply(D,K),this.taps=0}M.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,K){return this.mouse&&D!=="mouse"&&(this.mouse[1]=K.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=K.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=K.invert(this.touch1[0])),this.that.__zoom=K,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var K=Zt(this.that).datum();d.call(D,this.that,new sO(D,{sourceEvent:this.sourceEvent,target:C,transform:this.that.__zoom,dispatch:d}),K)}};function L(D,...K){if(!t.apply(this,arguments))return;var O=R(this,K).event(D),G=this.__zoom,X=Math.max(u[0],Math.min(u[1],G.k*Math.pow(2,l.apply(this,arguments)))),P=dn(D);if(O.wheel)(O.mouse[0][0]!==P[0]||O.mouse[0][1]!==P[1])&&(O.mouse[1]=G.invert(O.mouse[0]=P)),clearTimeout(O.wheel);else{if(G.k===X)return;O.mouse=[P,G.invert(P)],Ls(this),O.start()}wl(D),O.wheel=setTimeout(oe,S),O.zoom("mouse",i(w(A(G,X),O.mouse[0],O.mouse[1]),O.extent,c));function oe(){O.wheel=null,O.end()}}function H(D,...K){if(y||!t.apply(this,arguments))return;var O=D.currentTarget,G=R(this,K,!0).event(D),X=Zt(D.view).on("mousemove.zoom",Y,!0).on("mouseup.zoom",ae,!0),P=dn(D,O),oe=D.clientX,z=D.clientY;MC(D.view),ed(D),G.mouse=[P,this.__zoom.invert(P)],Ls(this),G.start();function Y(k){if(wl(k),!G.moved){var V=k.clientX-oe,I=k.clientY-z;G.moved=V*V+I*I>N}G.event(k).zoom("mouse",i(w(G.that.__zoom,G.mouse[0]=dn(k,O),G.mouse[1]),G.extent,c))}function ae(k){X.on("mousemove.zoom mouseup.zoom",null),RC(k.view,G.moved),wl(k),G.event(k).end()}}function Q(D,...K){if(t.apply(this,arguments)){var O=this.__zoom,G=dn(D.changedTouches?D.changedTouches[0]:D,this),X=O.invert(G),P=O.k*(D.shiftKey?.5:2),oe=i(w(A(O,P),G,X),r.apply(this,K),c);wl(D),f>0?Zt(this).transition().duration(f).call(q,oe,G,D):Zt(this).call(C.transform,oe,G,D)}}function B(D,...K){if(t.apply(this,arguments)){var O=D.touches,G=O.length,X=R(this,K,D.changedTouches.length===G).event(D),P,oe,z,Y;for(ed(D),oe=0;oe<G;++oe)z=O[oe],Y=dn(z,this),Y=[Y,this.__zoom.invert(Y),z.identifier],X.touch0?!X.touch1&&X.touch0[2]!==Y[2]&&(X.touch1=Y,X.taps=0):(X.touch0=Y,P=!0,X.taps=1+!!m);m&&(m=clearTimeout(m)),P&&(X.taps<2&&(p=Y[0],m=setTimeout(function(){m=null},b)),Ls(this),X.start())}}function F(D,...K){if(this.__zooming){var O=R(this,K).event(D),G=D.changedTouches,X=G.length,P,oe,z,Y;for(wl(D),P=0;P<X;++P)oe=G[P],z=dn(oe,this),O.touch0&&O.touch0[2]===oe.identifier?O.touch0[0]=z:O.touch1&&O.touch1[2]===oe.identifier&&(O.touch1[0]=z);if(oe=O.that.__zoom,O.touch1){var ae=O.touch0[0],k=O.touch0[1],V=O.touch1[0],I=O.touch1[1],ne=(ne=V[0]-ae[0])*ne+(ne=V[1]-ae[1])*ne,le=(le=I[0]-k[0])*le+(le=I[1]-k[1])*le;oe=A(oe,Math.sqrt(ne/le)),z=[(ae[0]+V[0])/2,(ae[1]+V[1])/2],Y=[(k[0]+I[0])/2,(k[1]+I[1])/2]}else if(O.touch0)z=O.touch0[0],Y=O.touch0[1];else return;O.zoom("touch",i(w(oe,z,Y),O.extent,c))}}function W(D,...K){if(this.__zooming){var O=R(this,K).event(D),G=D.changedTouches,X=G.length,P,oe;for(ed(D),y&&clearTimeout(y),y=setTimeout(function(){y=null},b),P=0;P<X;++P)oe=G[P],O.touch0&&O.touch0[2]===oe.identifier?delete O.touch0:O.touch1&&O.touch1[2]===oe.identifier&&delete O.touch1;if(O.touch1&&!O.touch0&&(O.touch0=O.touch1,delete O.touch1),O.touch0)O.touch0[1]=this.__zoom.invert(O.touch0[0]);else if(O.end(),O.taps===2&&(oe=dn(oe,this),Math.hypot(p[0]-oe[0],p[1]-oe[1])<E)){var z=Zt(this).on("dblclick.zoom");z&&z.apply(this,arguments)}}}return C.wheelDelta=function(D){return arguments.length?(l=typeof D=="function"?D:Ts(+D),C):l},C.filter=function(D){return arguments.length?(t=typeof D=="function"?D:Ts(!!D),C):t},C.touchable=function(D){return arguments.length?(o=typeof D=="function"?D:Ts(!!D),C):o},C.extent=function(D){return arguments.length?(r=typeof D=="function"?D:Ts([[+D[0][0],+D[0][1]],[+D[1][0],+D[1][1]]]),C):r},C.scaleExtent=function(D){return arguments.length?(u[0]=+D[0],u[1]=+D[1],C):[u[0],u[1]]},C.translateExtent=function(D){return arguments.length?(c[0][0]=+D[0][0],c[1][0]=+D[1][0],c[0][1]=+D[0][1],c[1][1]=+D[1][1],C):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},C.constrain=function(D){return arguments.length?(i=D,C):i},C.duration=function(D){return arguments.length?(f=+D,C):f},C.interpolate=function(D){return arguments.length?(g=D,C):g},C.on=function(){var D=d.on.apply(d,arguments);return D===d?C:D},C.clickDistance=function(D){return arguments.length?(N=(D=+D)*D,C):Math.sqrt(N)},C.tapDistance=function(D){return arguments.length?(E=+D,C):E},C}const Tn={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:t=>`Node type "${t}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,{id:r,sourceHandle:i,targetHandle:l})=>`Couldn't create edge for ${t} handle id: "${t==="source"?i:l}", edge id: ${r}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(t="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${t}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Dl=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],KC=["Enter"," ","Escape"],QC={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:t,x:r,y:i})=>`Moved selected node ${t}. New position, x: ${r}, y: ${i}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var gi;(function(t){t.Strict="strict",t.Loose="loose"})(gi||(gi={}));var ca;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(ca||(ca={}));var kl;(function(t){t.Partial="partial",t.Full="full"})(kl||(kl={}));const $C={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Hr;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(Hr||(Hr={}));var Zs;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(Zs||(Zs={}));var pe;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(pe||(pe={}));const Yb={[pe.Left]:pe.Right,[pe.Right]:pe.Left,[pe.Top]:pe.Bottom,[pe.Bottom]:pe.Top};function PC(t){return t===null?null:t?"valid":"invalid"}const JC=t=>"id"in t&&"source"in t&&"target"in t,gO=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),Jp=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),Yl=(t,r=[0,0])=>{const{width:i,height:l}=rr(t),o=t.origin??r,u=i*o[0],c=l*o[1];return{x:t.position.x-u,y:t.position.y-c}},vO=(t,r={nodeOrigin:[0,0]})=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const i=t.reduce((l,o)=>{const u=typeof o=="string";let c=!r.nodeLookup&&!u?o:void 0;r.nodeLookup&&(c=u?r.nodeLookup.get(o):Jp(o)?o:r.nodeLookup.get(o.id));const f=c?Fs(c,r.nodeOrigin):{x:0,y:0,x2:0,y2:0};return iu(l,f)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return lu(i)},Il=(t,r={})=>{let i={x:1/0,y:1/0,x2:-1/0,y2:-1/0},l=!1;return t.forEach(o=>{(r.filter===void 0||r.filter(o))&&(i=iu(i,Fs(o)),l=!0)}),l?lu(i):{x:0,y:0,width:0,height:0}},Wp=(t,r,[i,l,o]=[0,0,1],u=!1,c=!1)=>{const f={...Zl(r,[i,l,o]),width:r.width/o,height:r.height/o},g=[];for(const d of t.values()){const{measured:m,selectable:p=!0,hidden:y=!1}=d;if(c&&!p||y)continue;const b=m.width??d.width??d.initialWidth??null,S=m.height??d.height??d.initialHeight??null,N=Hl(f,mi(d)),E=(b??0)*(S??0),C=u&&N>0;(!d.internals.handleBounds||C||N>=E||d.dragging)&&g.push(d)}return g},mO=(t,r)=>{const i=new Set;return t.forEach(l=>{i.add(l.id)}),r.filter(l=>i.has(l.source)||i.has(l.target))};function pO(t,r){const i=new Map,l=r?.nodes?new Set(r.nodes.map(o=>o.id)):null;return t.forEach(o=>{o.measured.width&&o.measured.height&&(r?.includeHiddenNodes||!o.hidden)&&(!l||l.has(o.id))&&i.set(o.id,o)}),i}async function yO({nodes:t,width:r,height:i,panZoom:l,minZoom:o,maxZoom:u},c){if(t.size===0)return Promise.resolve(!0);const f=pO(t,c),g=Il(f),d=ey(g,r,i,c?.minZoom??o,c?.maxZoom??u,c?.padding??.1);return await l.setViewport(d,{duration:c?.duration,ease:c?.ease,interpolate:c?.interpolate}),Promise.resolve(!0)}function WC({nodeId:t,nextPosition:r,nodeLookup:i,nodeOrigin:l=[0,0],nodeExtent:o,onError:u}){const c=i.get(t),f=c.parentId?i.get(c.parentId):void 0,{x:g,y:d}=f?f.internals.positionAbsolute:{x:0,y:0},m=c.origin??l;let p=c.extent||o;if(c.extent==="parent"&&!c.expandParent)if(!f)u?.("005",Tn.error005());else{const b=f.measured.width,S=f.measured.height;b&&S&&(p=[[g,d],[g+b,d+S]])}else f&&pi(c.extent)&&(p=[[c.extent[0][0]+g,c.extent[0][1]+d],[c.extent[1][0]+g,c.extent[1][1]+d]]);const y=pi(p)?ha(r,p,c.measured):r;return(c.measured.width===void 0||c.measured.height===void 0)&&u?.("015",Tn.error015()),{position:{x:y.x-g+(c.measured.width??0)*m[0],y:y.y-d+(c.measured.height??0)*m[1]},positionAbsolute:y}}async function xO({nodesToRemove:t=[],edgesToRemove:r=[],nodes:i,edges:l,onBeforeDelete:o}){const u=new Set(t.map(y=>y.id)),c=[];for(const y of i){if(y.deletable===!1)continue;const b=u.has(y.id),S=!b&&y.parentId&&c.find(N=>N.id===y.parentId);(b||S)&&c.push(y)}const f=new Set(r.map(y=>y.id)),g=l.filter(y=>y.deletable!==!1),m=mO(c,g);for(const y of g)f.has(y.id)&&!m.find(S=>S.id===y.id)&&m.push(y);if(!o)return{edges:m,nodes:c};const p=await o({nodes:c,edges:m});return typeof p=="boolean"?p?{edges:m,nodes:c}:{edges:[],nodes:[]}:p}const vi=(t,r=0,i=1)=>Math.min(Math.max(t,r),i),ha=(t={x:0,y:0},r,i)=>({x:vi(t.x,r[0][0],r[1][0]-(i?.width??0)),y:vi(t.y,r[0][1],r[1][1]-(i?.height??0))});function eT(t,r,i){const{width:l,height:o}=rr(i),{x:u,y:c}=i.internals.positionAbsolute;return ha(t,[[u,c],[u+l,c+o]],r)}const Ib=(t,r,i)=>t<r?vi(Math.abs(t-r),1,r)/r:t>i?-vi(Math.abs(t-i),1,r)/r:0,tT=(t,r,i=15,l=40)=>{const o=Ib(t.x,l,r.width-l)*i,u=Ib(t.y,l,r.height-l)*i;return[o,u]},iu=(t,r)=>({x:Math.min(t.x,r.x),y:Math.min(t.y,r.y),x2:Math.max(t.x2,r.x2),y2:Math.max(t.y2,r.y2)}),kp=({x:t,y:r,width:i,height:l})=>({x:t,y:r,x2:t+i,y2:r+l}),lu=({x:t,y:r,x2:i,y2:l})=>({x:t,y:r,width:i-t,height:l-r}),mi=(t,r=[0,0])=>{const{x:i,y:l}=Jp(t)?t.internals.positionAbsolute:Yl(t,r);return{x:i,y:l,width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}},Fs=(t,r=[0,0])=>{const{x:i,y:l}=Jp(t)?t.internals.positionAbsolute:Yl(t,r);return{x:i,y:l,x2:i+(t.measured?.width??t.width??t.initialWidth??0),y2:l+(t.measured?.height??t.height??t.initialHeight??0)}},nT=(t,r)=>lu(iu(kp(t),kp(r))),Hl=(t,r)=>{const i=Math.max(0,Math.min(t.x+t.width,r.x+r.width)-Math.max(t.x,r.x)),l=Math.max(0,Math.min(t.y+t.height,r.y+r.height)-Math.max(t.y,r.y));return Math.ceil(i*l)},Xb=t=>gn(t.width)&&gn(t.height)&&gn(t.x)&&gn(t.y),gn=t=>!isNaN(t)&&isFinite(t),bO=(t,r)=>{},Xl=(t,r=[1,1])=>({x:r[0]*Math.round(t.x/r[0]),y:r[1]*Math.round(t.y/r[1])}),Zl=({x:t,y:r},[i,l,o],u=!1,c=[1,1])=>{const f={x:(t-i)/o,y:(r-l)/o};return u?Xl(f,c):f},Ks=({x:t,y:r},[i,l,o])=>({x:t*o+i,y:r*o+l});function oi(t,r){if(typeof t=="number")return Math.floor((r-r/(1+t))*.5);if(typeof t=="string"&&t.endsWith("px")){const i=parseFloat(t);if(!Number.isNaN(i))return Math.floor(i)}if(typeof t=="string"&&t.endsWith("%")){const i=parseFloat(t);if(!Number.isNaN(i))return Math.floor(r*i*.01)}return console.error(`[React Flow] The padding value "${t}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function _O(t,r,i){if(typeof t=="string"||typeof t=="number"){const l=oi(t,i),o=oi(t,r);return{top:l,right:o,bottom:l,left:o,x:o*2,y:l*2}}if(typeof t=="object"){const l=oi(t.top??t.y??0,i),o=oi(t.bottom??t.y??0,i),u=oi(t.left??t.x??0,r),c=oi(t.right??t.x??0,r);return{top:l,right:c,bottom:o,left:u,x:u+c,y:l+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function wO(t,r,i,l,o,u){const{x:c,y:f}=Ks(t,[r,i,l]),{x:g,y:d}=Ks({x:t.x+t.width,y:t.y+t.height},[r,i,l]),m=o-g,p=u-d;return{left:Math.floor(c),top:Math.floor(f),right:Math.floor(m),bottom:Math.floor(p)}}const ey=(t,r,i,l,o,u)=>{const c=_O(u,r,i),f=(r-c.x)/t.width,g=(i-c.y)/t.height,d=Math.min(f,g),m=vi(d,l,o),p=t.x+t.width/2,y=t.y+t.height/2,b=r/2-p*m,S=i/2-y*m,N=wO(t,b,S,m,r,i),E={left:Math.min(N.left-c.left,0),top:Math.min(N.top-c.top,0),right:Math.min(N.right-c.right,0),bottom:Math.min(N.bottom-c.bottom,0)};return{x:b-E.left+E.right,y:S-E.top+E.bottom,zoom:m}},Ll=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function pi(t){return t!=null&&t!=="parent"}function rr(t){return{width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}}function rT(t){return(t.measured?.width??t.width??t.initialWidth)!==void 0&&(t.measured?.height??t.height??t.initialHeight)!==void 0}function aT(t,r={width:0,height:0},i,l,o){const u={...t},c=l.get(i);if(c){const f=c.origin||o;u.x+=c.internals.positionAbsolute.x-(r.width??0)*f[0],u.y+=c.internals.positionAbsolute.y-(r.height??0)*f[1]}return u}function Zb(t,r){if(t.size!==r.size)return!1;for(const i of t)if(!r.has(i))return!1;return!0}function SO(){let t,r;return{promise:new Promise((l,o)=>{t=l,r=o}),resolve:t,reject:r}}function EO(t){return{...QC,...t||{}}}function Ml(t,{snapGrid:r=[0,0],snapToGrid:i=!1,transform:l,containerBounds:o}){const{x:u,y:c}=vn(t),f=Zl({x:u-(o?.left??0),y:c-(o?.top??0)},l),{x:g,y:d}=i?Xl(f,r):f;return{xSnapped:g,ySnapped:d,...f}}const ty=t=>({width:t.offsetWidth,height:t.offsetHeight}),iT=t=>t?.getRootNode?.()||window?.document,NO=["INPUT","SELECT","TEXTAREA"];function lT(t){const r=t.composedPath?.()?.[0]||t.target;return r?.nodeType!==1?!1:NO.includes(r.nodeName)||r.hasAttribute("contenteditable")||!!r.closest(".nokey")}const oT=t=>"clientX"in t,vn=(t,r)=>{const i=oT(t),l=i?t.clientX:t.touches?.[0].clientX,o=i?t.clientY:t.touches?.[0].clientY;return{x:l-(r?.left??0),y:o-(r?.top??0)}},Fb=(t,r,i,l,o)=>{const u=r.querySelectorAll(`.${t}`);return!u||!u.length?null:Array.from(u).map(c=>{const f=c.getBoundingClientRect();return{id:c.getAttribute("data-handleid"),type:t,nodeId:o,position:c.getAttribute("data-handlepos"),x:(f.left-i.left)/l,y:(f.top-i.top)/l,...ty(c)}})};function sT({sourceX:t,sourceY:r,targetX:i,targetY:l,sourceControlX:o,sourceControlY:u,targetControlX:c,targetControlY:f}){const g=t*.125+o*.375+c*.375+i*.125,d=r*.125+u*.375+f*.375+l*.125,m=Math.abs(g-t),p=Math.abs(d-r);return[g,d,m,p]}function As(t,r){return t>=0?.5*t:r*25*Math.sqrt(-t)}function Kb({pos:t,x1:r,y1:i,x2:l,y2:o,c:u}){switch(t){case pe.Left:return[r-As(r-l,u),i];case pe.Right:return[r+As(l-r,u),i];case pe.Top:return[r,i-As(i-o,u)];case pe.Bottom:return[r,i+As(o-i,u)]}}function uT({sourceX:t,sourceY:r,sourcePosition:i=pe.Bottom,targetX:l,targetY:o,targetPosition:u=pe.Top,curvature:c=.25}){const[f,g]=Kb({pos:i,x1:t,y1:r,x2:l,y2:o,c}),[d,m]=Kb({pos:u,x1:l,y1:o,x2:t,y2:r,c}),[p,y,b,S]=sT({sourceX:t,sourceY:r,targetX:l,targetY:o,sourceControlX:f,sourceControlY:g,targetControlX:d,targetControlY:m});return[`M${t},${r} C${f},${g} ${d},${m} ${l},${o}`,p,y,b,S]}function cT({sourceX:t,sourceY:r,targetX:i,targetY:l}){const o=Math.abs(i-t)/2,u=i<t?i+o:i-o,c=Math.abs(l-r)/2,f=l<r?l+c:l-c;return[u,f,o,c]}function CO({sourceNode:t,targetNode:r,selected:i=!1,zIndex:l=0,elevateOnSelect:o=!1,zIndexMode:u="basic"}){if(u==="manual")return l;const c=o&&i?l+1e3:l,f=Math.max(t.parentId||o&&t.selected?t.internals.z:0,r.parentId||o&&r.selected?r.internals.z:0);return c+f}function TO({sourceNode:t,targetNode:r,width:i,height:l,transform:o}){const u=iu(Fs(t),Fs(r));u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const c={x:-o[0]/o[2],y:-o[1]/o[2],width:i/o[2],height:l/o[2]};return Hl(c,lu(u))>0}const AO=({source:t,sourceHandle:r,target:i,targetHandle:l})=>`xy-edge__${t}${r||""}-${i}${l||""}`,jO=(t,r)=>r.some(i=>i.source===t.source&&i.target===t.target&&(i.sourceHandle===t.sourceHandle||!i.sourceHandle&&!t.sourceHandle)&&(i.targetHandle===t.targetHandle||!i.targetHandle&&!t.targetHandle)),fT=(t,r,i={})=>{if(!t.source||!t.target)return r;const l=i.getEdgeId||AO;let o;return JC(t)?o={...t}:o={...t,id:l(t)},jO(o,r)?r:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,r.concat(o))};function dT({sourceX:t,sourceY:r,targetX:i,targetY:l}){const[o,u,c,f]=cT({sourceX:t,sourceY:r,targetX:i,targetY:l});return[`M ${t},${r}L ${i},${l}`,o,u,c,f]}const Qb={[pe.Left]:{x:-1,y:0},[pe.Right]:{x:1,y:0},[pe.Top]:{x:0,y:-1},[pe.Bottom]:{x:0,y:1}},MO=({source:t,sourcePosition:r=pe.Bottom,target:i})=>r===pe.Left||r===pe.Right?t.x<i.x?{x:1,y:0}:{x:-1,y:0}:t.y<i.y?{x:0,y:1}:{x:0,y:-1},$b=(t,r)=>Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2));function RO({source:t,sourcePosition:r=pe.Bottom,target:i,targetPosition:l=pe.Top,center:o,offset:u,stepPosition:c}){const f=Qb[r],g=Qb[l],d={x:t.x+f.x*u,y:t.y+f.y*u},m={x:i.x+g.x*u,y:i.y+g.y*u},p=MO({source:d,sourcePosition:r,target:m}),y=p.x!==0?"x":"y",b=p[y];let S=[],N,E;const C={x:0,y:0},A={x:0,y:0},[,,w,T]=cT({sourceX:t.x,sourceY:t.y,targetX:i.x,targetY:i.y});if(f[y]*g[y]===-1){y==="x"?(N=o.x??d.x+(m.x-d.x)*c,E=o.y??(d.y+m.y)/2):(N=o.x??(d.x+m.x)/2,E=o.y??d.y+(m.y-d.y)*c);const R=[{x:N,y:d.y},{x:N,y:m.y}],M=[{x:d.x,y:E},{x:m.x,y:E}];f[y]===b?S=y==="x"?R:M:S=y==="x"?M:R}else{const R=[{x:d.x,y:m.y}],M=[{x:m.x,y:d.y}];if(y==="x"?S=f.x===b?M:R:S=f.y===b?R:M,r===l){const F=Math.abs(t[y]-i[y]);if(F<=u){const W=Math.min(u-1,u-F);f[y]===b?C[y]=(d[y]>t[y]?-1:1)*W:A[y]=(m[y]>i[y]?-1:1)*W}}if(r!==l){const F=y==="x"?"y":"x",W=f[y]===g[F],D=d[F]>m[F],K=d[F]<m[F];(f[y]===1&&(!W&&D||W&&K)||f[y]!==1&&(!W&&K||W&&D))&&(S=y==="x"?R:M)}const L={x:d.x+C.x,y:d.y+C.y},H={x:m.x+A.x,y:m.y+A.y},Q=Math.max(Math.abs(L.x-S[0].x),Math.abs(H.x-S[0].x)),B=Math.max(Math.abs(L.y-S[0].y),Math.abs(H.y-S[0].y));Q>=B?(N=(L.x+H.x)/2,E=S[0].y):(N=S[0].x,E=(L.y+H.y)/2)}return[[t,{x:d.x+C.x,y:d.y+C.y},...S,{x:m.x+A.x,y:m.y+A.y},i],N,E,w,T]}function qO(t,r,i,l){const o=Math.min($b(t,r)/2,$b(r,i)/2,l),{x:u,y:c}=r;if(t.x===u&&u===i.x||t.y===c&&c===i.y)return`L${u} ${c}`;if(t.y===c){const d=t.x<i.x?-1:1,m=t.y<i.y?1:-1;return`L ${u+o*d},${c}Q ${u},${c} ${u},${c+o*m}`}const f=t.x<i.x?1:-1,g=t.y<i.y?-1:1;return`L ${u},${c+o*g}Q ${u},${c} ${u+o*f},${c}`}function Hp({sourceX:t,sourceY:r,sourcePosition:i=pe.Bottom,targetX:l,targetY:o,targetPosition:u=pe.Top,borderRadius:c=5,centerX:f,centerY:g,offset:d=20,stepPosition:m=.5}){const[p,y,b,S,N]=RO({source:{x:t,y:r},sourcePosition:i,target:{x:l,y:o},targetPosition:u,center:{x:f,y:g},offset:d,stepPosition:m});return[p.reduce((C,A,w)=>{let T="";return w>0&&w<p.length-1?T=qO(p[w-1],A,p[w+1],c):T=`${w===0?"M":"L"}${A.x} ${A.y}`,C+=T,C},""),y,b,S,N]}function Pb(t){return t&&!!(t.internals.handleBounds||t.handles?.length)&&!!(t.measured.width||t.width||t.initialWidth)}function OO(t){const{sourceNode:r,targetNode:i}=t;if(!Pb(r)||!Pb(i))return null;const l=r.internals.handleBounds||Jb(r.handles),o=i.internals.handleBounds||Jb(i.handles),u=Wb(l?.source??[],t.sourceHandle),c=Wb(t.connectionMode===gi.Strict?o?.target??[]:(o?.target??[]).concat(o?.source??[]),t.targetHandle);if(!u||!c)return t.onError?.("008",Tn.error008(u?"target":"source",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;const f=u?.position||pe.Bottom,g=c?.position||pe.Top,d=ga(r,u,f),m=ga(i,c,g);return{sourceX:d.x,sourceY:d.y,targetX:m.x,targetY:m.y,sourcePosition:f,targetPosition:g}}function Jb(t){if(!t)return null;const r=[],i=[];for(const l of t)l.width=l.width??1,l.height=l.height??1,l.type==="source"?r.push(l):l.type==="target"&&i.push(l);return{source:r,target:i}}function ga(t,r,i=pe.Left,l=!1){const o=(r?.x??0)+t.internals.positionAbsolute.x,u=(r?.y??0)+t.internals.positionAbsolute.y,{width:c,height:f}=r??rr(t);if(l)return{x:o+c/2,y:u+f/2};switch(r?.position??i){case pe.Top:return{x:o+c/2,y:u};case pe.Right:return{x:o+c,y:u+f/2};case pe.Bottom:return{x:o+c/2,y:u+f};case pe.Left:return{x:o,y:u+f/2}}}function Wb(t,r){return t&&(r?t.find(i=>i.id===r):t[0])||null}function Lp(t,r){return t?typeof t=="string"?t:`${r?`${r}__`:""}${Object.keys(t).sort().map(l=>`${l}=${t[l]}`).join("&")}`:""}function zO(t,{id:r,defaultColor:i,defaultMarkerStart:l,defaultMarkerEnd:o}){const u=new Set;return t.reduce((c,f)=>([f.markerStart||l,f.markerEnd||o].forEach(g=>{if(g&&typeof g=="object"){const d=Lp(g,r);u.has(d)||(c.push({id:d,color:g.color||i,...g}),u.add(d))}}),c),[]).sort((c,f)=>c.id.localeCompare(f.id))}const hT=1e3,DO=10,ny={nodeOrigin:[0,0],nodeExtent:Dl,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},kO={...ny,checkEquality:!0};function ry(t,r){const i={...t};for(const l in r)r[l]!==void 0&&(i[l]=r[l]);return i}function HO(t,r,i){const l=ry(ny,i);for(const o of t.values())if(o.parentId)iy(o,t,r,l);else{const u=Yl(o,l.nodeOrigin),c=pi(o.extent)?o.extent:l.nodeExtent,f=ha(u,c,rr(o));o.internals.positionAbsolute=f}}function LO(t,r){if(!t.handles)return t.measured?r?.internals.handleBounds:void 0;const i=[],l=[];for(const o of t.handles){const u={id:o.id,width:o.width??1,height:o.height??1,nodeId:t.id,x:o.x,y:o.y,position:o.position,type:o.type};o.type==="source"?i.push(u):o.type==="target"&&l.push(u)}return{source:i,target:l}}function ay(t){return t==="manual"}function Bp(t,r,i,l={}){const o=ry(kO,l),u={i:0},c=new Map(r),f=o?.elevateNodesOnSelect&&!ay(o.zIndexMode)?hT:0;let g=t.length>0;r.clear(),i.clear();for(const d of t){let m=c.get(d.id);if(o.checkEquality&&d===m?.internals.userNode)r.set(d.id,m);else{const p=Yl(d,o.nodeOrigin),y=pi(d.extent)?d.extent:o.nodeExtent,b=ha(p,y,rr(d));m={...o.defaults,...d,measured:{width:d.measured?.width,height:d.measured?.height},internals:{positionAbsolute:b,handleBounds:LO(d,m),z:gT(d,f,o.zIndexMode),userNode:d}},r.set(d.id,m)}(m.measured===void 0||m.measured.width===void 0||m.measured.height===void 0)&&!m.hidden&&(g=!1),d.parentId&&iy(m,r,i,l,u)}return g}function BO(t,r){if(!t.parentId)return;const i=r.get(t.parentId);i?i.set(t.id,t):r.set(t.parentId,new Map([[t.id,t]]))}function iy(t,r,i,l,o){const{elevateNodesOnSelect:u,nodeOrigin:c,nodeExtent:f,zIndexMode:g}=ry(ny,l),d=t.parentId,m=r.get(d);if(!m){console.warn(`Parent node ${d} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}BO(t,i),o&&!m.parentId&&m.internals.rootParentIndex===void 0&&g==="auto"&&(m.internals.rootParentIndex=++o.i,m.internals.z=m.internals.z+o.i*DO),o&&m.internals.rootParentIndex!==void 0&&(o.i=m.internals.rootParentIndex);const p=u&&!ay(g)?hT:0,{x:y,y:b,z:S}=UO(t,m,c,f,p,g),{positionAbsolute:N}=t.internals,E=y!==N.x||b!==N.y;(E||S!==t.internals.z)&&r.set(t.id,{...t,internals:{...t.internals,positionAbsolute:E?{x:y,y:b}:N,z:S}})}function gT(t,r,i){const l=gn(t.zIndex)?t.zIndex:0;return ay(i)?l:l+(t.selected?r:0)}function UO(t,r,i,l,o,u){const{x:c,y:f}=r.internals.positionAbsolute,g=rr(t),d=Yl(t,i),m=pi(t.extent)?ha(d,t.extent,g):d;let p=ha({x:c+m.x,y:f+m.y},l,g);t.extent==="parent"&&(p=eT(p,g,r));const y=gT(t,o,u),b=r.internals.z??0;return{x:p.x,y:p.y,z:b>=y?b+1:y}}function ly(t,r,i,l=[0,0]){const o=[],u=new Map;for(const c of t){const f=r.get(c.parentId);if(!f)continue;const g=u.get(c.parentId)?.expandedRect??mi(f),d=nT(g,c.rect);u.set(c.parentId,{expandedRect:d,parent:f})}return u.size>0&&u.forEach(({expandedRect:c,parent:f},g)=>{const d=f.internals.positionAbsolute,m=rr(f),p=f.origin??l,y=c.x<d.x?Math.round(Math.abs(d.x-c.x)):0,b=c.y<d.y?Math.round(Math.abs(d.y-c.y)):0,S=Math.max(m.width,Math.round(c.width)),N=Math.max(m.height,Math.round(c.height)),E=(S-m.width)*p[0],C=(N-m.height)*p[1];(y>0||b>0||E||C)&&(o.push({id:g,type:"position",position:{x:f.position.x-y+E,y:f.position.y-b+C}}),i.get(g)?.forEach(A=>{t.some(w=>w.id===A.id)||o.push({id:A.id,type:"position",position:{x:A.position.x+y,y:A.position.y+b}})})),(m.width<c.width||m.height<c.height||y||b)&&o.push({id:g,type:"dimensions",setAttributes:!0,dimensions:{width:S+(y?p[0]*y-E:0),height:N+(b?p[1]*b-C:0)}})}),o}function GO(t,r,i,l,o,u,c){const f=l?.querySelector(".xyflow__viewport");let g=!1;if(!f)return{changes:[],updatedInternals:g};const d=[],m=window.getComputedStyle(f),{m22:p}=new window.DOMMatrixReadOnly(m.transform),y=[];for(const b of t.values()){const S=r.get(b.id);if(!S)continue;if(S.hidden){r.set(S.id,{...S,internals:{...S.internals,handleBounds:void 0}}),g=!0;continue}const N=ty(b.nodeElement),E=S.measured.width!==N.width||S.measured.height!==N.height;if(!!(N.width&&N.height&&(E||!S.internals.handleBounds||b.force))){const A=b.nodeElement.getBoundingClientRect(),w=pi(S.extent)?S.extent:u;let{positionAbsolute:T}=S.internals;S.parentId&&S.extent==="parent"?T=eT(T,N,r.get(S.parentId)):w&&(T=ha(T,w,N));const q={...S,measured:N,internals:{...S.internals,positionAbsolute:T,handleBounds:{source:Fb("source",b.nodeElement,A,p,S.id),target:Fb("target",b.nodeElement,A,p,S.id)}}};r.set(S.id,q),S.parentId&&iy(q,r,i,{nodeOrigin:o,zIndexMode:c}),g=!0,E&&(d.push({id:S.id,type:"dimensions",dimensions:N}),S.expandParent&&S.parentId&&y.push({id:S.id,parentId:S.parentId,rect:mi(q,o)}))}}if(y.length>0){const b=ly(y,r,i,o);d.push(...b)}return{changes:d,updatedInternals:g}}async function VO({delta:t,panZoom:r,transform:i,translateExtent:l,width:o,height:u}){if(!r||!t.x&&!t.y)return Promise.resolve(!1);const c=await r.setViewportConstrained({x:i[0]+t.x,y:i[1]+t.y,zoom:i[2]},[[0,0],[o,u]],l),f=!!c&&(c.x!==i[0]||c.y!==i[1]||c.k!==i[2]);return Promise.resolve(f)}function e_(t,r,i,l,o,u){let c=o;const f=l.get(c)||new Map;l.set(c,f.set(i,r)),c=`${o}-${t}`;const g=l.get(c)||new Map;if(l.set(c,g.set(i,r)),u){c=`${o}-${t}-${u}`;const d=l.get(c)||new Map;l.set(c,d.set(i,r))}}function vT(t,r,i){t.clear(),r.clear();for(const l of i){const{source:o,target:u,sourceHandle:c=null,targetHandle:f=null}=l,g={edgeId:l.id,source:o,target:u,sourceHandle:c,targetHandle:f},d=`${o}-${c}--${u}-${f}`,m=`${u}-${f}--${o}-${c}`;e_("source",g,m,t,o,c),e_("target",g,d,t,u,f),r.set(l.id,l)}}function mT(t,r){if(!t.parentId)return!1;const i=r.get(t.parentId);return i?i.selected?!0:mT(i,r):!1}function t_(t,r,i){let l=t;do{if(l?.matches?.(r))return!0;if(l===i)return!1;l=l?.parentElement}while(l);return!1}function YO(t,r,i,l){const o=new Map;for(const[u,c]of t)if((c.selected||c.id===l)&&(!c.parentId||!mT(c,t))&&(c.draggable||r&&typeof c.draggable>"u")){const f=t.get(u);f&&o.set(u,{id:u,position:f.position||{x:0,y:0},distance:{x:i.x-f.internals.positionAbsolute.x,y:i.y-f.internals.positionAbsolute.y},extent:f.extent,parentId:f.parentId,origin:f.origin,expandParent:f.expandParent,internals:{positionAbsolute:f.internals.positionAbsolute||{x:0,y:0}},measured:{width:f.measured.width??0,height:f.measured.height??0}})}return o}function td({nodeId:t,dragItems:r,nodeLookup:i,dragging:l=!0}){const o=[];for(const[c,f]of r){const g=i.get(c)?.internals.userNode;g&&o.push({...g,position:f.position,dragging:l})}if(!t)return[o[0],o];const u=i.get(t)?.internals.userNode;return[u?{...u,position:r.get(t)?.position||u.position,dragging:l}:o[0],o]}function IO({dragItems:t,snapGrid:r,x:i,y:l}){const o=t.values().next().value;if(!o)return null;const u={x:i-o.distance.x,y:l-o.distance.y},c=Xl(u,r);return{x:c.x-u.x,y:c.y-u.y}}function XO({onNodeMouseDown:t,getStoreItems:r,onDragStart:i,onDrag:l,onDragStop:o}){let u={x:null,y:null},c=0,f=new Map,g=!1,d={x:0,y:0},m=null,p=!1,y=null,b=!1,S=!1,N=null;function E({noDragClassName:A,handleSelector:w,domNode:T,isSelectable:q,nodeId:R,nodeClickDistance:M=0}){y=Zt(T);function L({x:F,y:W}){const{nodeLookup:D,nodeExtent:K,snapGrid:O,snapToGrid:G,nodeOrigin:X,onNodeDrag:P,onSelectionDrag:oe,onError:z,updateNodePositions:Y}=r();u={x:F,y:W};let ae=!1;const k=f.size>1,V=k&&K?kp(Il(f)):null,I=k&&G?IO({dragItems:f,snapGrid:O,x:F,y:W}):null;for(const[ne,le]of f){if(!D.has(ne))continue;let fe={x:F-le.distance.x,y:W-le.distance.y};G&&(fe=I?{x:Math.round(fe.x+I.x),y:Math.round(fe.y+I.y)}:Xl(fe,O));let he=null;if(k&&K&&!le.extent&&V){const{positionAbsolute:ge}=le.internals,_e=ge.x-V.x+K[0][0],ve=ge.x+le.measured.width-V.x2+K[1][0],Te=ge.y-V.y+K[0][1],we=ge.y+le.measured.height-V.y2+K[1][1];he=[[_e,Te],[ve,we]]}const{position:ye,positionAbsolute:xe}=WC({nodeId:ne,nextPosition:fe,nodeLookup:D,nodeExtent:he||K,nodeOrigin:X,onError:z});ae=ae||le.position.x!==ye.x||le.position.y!==ye.y,le.position=ye,le.internals.positionAbsolute=xe}if(S=S||ae,!!ae&&(Y(f,!0),N&&(l||P||!R&&oe))){const[ne,le]=td({nodeId:R,dragItems:f,nodeLookup:D});l?.(N,f,ne,le),P?.(N,ne,le),R||oe?.(N,le)}}async function H(){if(!m)return;const{transform:F,panBy:W,autoPanSpeed:D,autoPanOnNodeDrag:K}=r();if(!K){g=!1,cancelAnimationFrame(c);return}const[O,G]=tT(d,m,D);(O!==0||G!==0)&&(u.x=(u.x??0)-O/F[2],u.y=(u.y??0)-G/F[2],await W({x:O,y:G})&&L(u)),c=requestAnimationFrame(H)}function Q(F){const{nodeLookup:W,multiSelectionActive:D,nodesDraggable:K,transform:O,snapGrid:G,snapToGrid:X,selectNodesOnDrag:P,onNodeDragStart:oe,onSelectionDragStart:z,unselectNodesAndEdges:Y}=r();p=!0,(!P||!q)&&!D&&R&&(W.get(R)?.selected||Y()),q&&P&&R&&t?.(R);const ae=Ml(F.sourceEvent,{transform:O,snapGrid:G,snapToGrid:X,containerBounds:m});if(u=ae,f=YO(W,K,ae,R),f.size>0&&(i||oe||!R&&z)){const[k,V]=td({nodeId:R,dragItems:f,nodeLookup:W});i?.(F.sourceEvent,f,k,V),oe?.(F.sourceEvent,k,V),R||z?.(F.sourceEvent,V)}}const B=qC().clickDistance(M).on("start",F=>{const{domNode:W,nodeDragThreshold:D,transform:K,snapGrid:O,snapToGrid:G}=r();m=W?.getBoundingClientRect()||null,b=!1,S=!1,N=F.sourceEvent,D===0&&Q(F),u=Ml(F.sourceEvent,{transform:K,snapGrid:O,snapToGrid:G,containerBounds:m}),d=vn(F.sourceEvent,m)}).on("drag",F=>{const{autoPanOnNodeDrag:W,transform:D,snapGrid:K,snapToGrid:O,nodeDragThreshold:G,nodeLookup:X}=r(),P=Ml(F.sourceEvent,{transform:D,snapGrid:K,snapToGrid:O,containerBounds:m});if(N=F.sourceEvent,(F.sourceEvent.type==="touchmove"&&F.sourceEvent.touches.length>1||R&&!X.has(R))&&(b=!0),!b){if(!g&&W&&p&&(g=!0,H()),!p){const oe=vn(F.sourceEvent,m),z=oe.x-d.x,Y=oe.y-d.y;Math.sqrt(z*z+Y*Y)>G&&Q(F)}(u.x!==P.xSnapped||u.y!==P.ySnapped)&&f&&p&&(d=vn(F.sourceEvent,m),L(P))}}).on("end",F=>{if(!(!p||b)&&(g=!1,p=!1,cancelAnimationFrame(c),f.size>0)){const{nodeLookup:W,updateNodePositions:D,onNodeDragStop:K,onSelectionDragStop:O}=r();if(S&&(D(f,!1),S=!1),o||K||!R&&O){const[G,X]=td({nodeId:R,dragItems:f,nodeLookup:W,dragging:!1});o?.(F.sourceEvent,f,G,X),K?.(F.sourceEvent,G,X),R||O?.(F.sourceEvent,X)}}}).filter(F=>{const W=F.target;return!F.button&&(!A||!t_(W,`.${A}`,T))&&(!w||t_(W,w,T))});y.call(B)}function C(){y?.on(".drag",null)}return{update:E,destroy:C}}function ZO(t,r,i){const l=[],o={x:t.x-i,y:t.y-i,width:i*2,height:i*2};for(const u of r.values())Hl(o,mi(u))>0&&l.push(u);return l}const FO=250;function KO(t,r,i,l){let o=[],u=1/0;const c=ZO(t,i,r+FO);for(const f of c){const g=[...f.internals.handleBounds?.source??[],...f.internals.handleBounds?.target??[]];for(const d of g){if(l.nodeId===d.nodeId&&l.type===d.type&&l.id===d.id)continue;const{x:m,y:p}=ga(f,d,d.position,!0),y=Math.sqrt(Math.pow(m-t.x,2)+Math.pow(p-t.y,2));y>r||(y<u?(o=[{...d,x:m,y:p}],u=y):y===u&&o.push({...d,x:m,y:p}))}}if(!o.length)return null;if(o.length>1){const f=l.type==="source"?"target":"source";return o.find(g=>g.type===f)??o[0]}return o[0]}function pT(t,r,i,l,o,u=!1){const c=l.get(t);if(!c)return null;const f=o==="strict"?c.internals.handleBounds?.[r]:[...c.internals.handleBounds?.source??[],...c.internals.handleBounds?.target??[]],g=(i?f?.find(d=>d.id===i):f?.[0])??null;return g&&u?{...g,...ga(c,g,g.position,!0)}:g}function yT(t,r){return t||(r?.classList.contains("target")?"target":r?.classList.contains("source")?"source":null)}function QO(t,r){let i=null;return r?i=!0:t&&!r&&(i=!1),i}const xT=()=>!0;function $O(t,{connectionMode:r,connectionRadius:i,handleId:l,nodeId:o,edgeUpdaterType:u,isTarget:c,domNode:f,nodeLookup:g,lib:d,autoPanOnConnect:m,flowId:p,panBy:y,cancelConnection:b,onConnectStart:S,onConnect:N,onConnectEnd:E,isValidConnection:C=xT,onReconnectEnd:A,updateConnection:w,getTransform:T,getFromHandle:q,autoPanSpeed:R,dragThreshold:M=1,handleDomNode:L}){const H=iT(t.target);let Q=0,B;const{x:F,y:W}=vn(t),D=yT(u,L),K=f?.getBoundingClientRect();let O=!1;if(!K||!D)return;const G=pT(o,D,l,g,r);if(!G)return;let X=vn(t,K),P=!1,oe=null,z=!1,Y=null;function ae(){if(!m||!K)return;const[ye,xe]=tT(X,K,R);y({x:ye,y:xe}),Q=requestAnimationFrame(ae)}const k={...G,nodeId:o,type:D,position:G.position},V=g.get(o);let ne={inProgress:!0,isValid:null,from:ga(V,k,pe.Left,!0),fromHandle:k,fromPosition:k.position,fromNode:V,to:X,toHandle:null,toPosition:Yb[k.position],toNode:null,pointer:X};function le(){O=!0,w(ne),S?.(t,{nodeId:o,handleId:l,handleType:D})}M===0&&le();function fe(ye){if(!O){const{x:we,y:dt}=vn(ye),nt=we-F,Ht=dt-W;if(!(nt*nt+Ht*Ht>M*M))return;le()}if(!q()||!k){he(ye);return}const xe=T();X=vn(ye,K),B=KO(Zl(X,xe,!1,[1,1]),i,g,k),P||(ae(),P=!0);const ge=bT(ye,{handle:B,connectionMode:r,fromNodeId:o,fromHandleId:l,fromType:c?"target":"source",isValidConnection:C,doc:H,lib:d,flowId:p,nodeLookup:g});Y=ge.handleDomNode,oe=ge.connection,z=QO(!!B,ge.isValid);const _e=g.get(o),ve=_e?ga(_e,k,pe.Left,!0):ne.from,Te={...ne,from:ve,isValid:z,to:ge.toHandle&&z?Ks({x:ge.toHandle.x,y:ge.toHandle.y},xe):X,toHandle:ge.toHandle,toPosition:z&&ge.toHandle?ge.toHandle.position:Yb[k.position],toNode:ge.toHandle?g.get(ge.toHandle.nodeId):null,pointer:X};w(Te),ne=Te}function he(ye){if(!("touches"in ye&&ye.touches.length>0)){if(O){(B||Y)&&oe&&z&&N?.(oe);const{inProgress:xe,...ge}=ne,_e={...ge,toPosition:ne.toHandle?ne.toPosition:null};E?.(ye,_e),u&&A?.(ye,_e)}b(),cancelAnimationFrame(Q),P=!1,z=!1,oe=null,Y=null,H.removeEventListener("mousemove",fe),H.removeEventListener("mouseup",he),H.removeEventListener("touchmove",fe),H.removeEventListener("touchend",he)}}H.addEventListener("mousemove",fe),H.addEventListener("mouseup",he),H.addEventListener("touchmove",fe),H.addEventListener("touchend",he)}function bT(t,{handle:r,connectionMode:i,fromNodeId:l,fromHandleId:o,fromType:u,doc:c,lib:f,flowId:g,isValidConnection:d=xT,nodeLookup:m}){const p=u==="target",y=r?c.querySelector(`.${f}-flow__handle[data-id="${g}-${r?.nodeId}-${r?.id}-${r?.type}"]`):null,{x:b,y:S}=vn(t),N=c.elementFromPoint(b,S),E=N?.classList.contains(`${f}-flow__handle`)?N:y,C={handleDomNode:E,isValid:!1,connection:null,toHandle:null};if(E){const A=yT(void 0,E),w=E.getAttribute("data-nodeid"),T=E.getAttribute("data-handleid"),q=E.classList.contains("connectable"),R=E.classList.contains("connectableend");if(!w||!A)return C;const M={source:p?w:l,sourceHandle:p?T:o,target:p?l:w,targetHandle:p?o:T};C.connection=M;const H=q&&R&&(i===gi.Strict?p&&A==="source"||!p&&A==="target":w!==l||T!==o);C.isValid=H&&d(M),C.toHandle=pT(w,A,T,m,i,!0)}return C}const Up={onPointerDown:$O,isValid:bT};function PO({domNode:t,panZoom:r,getTransform:i,getViewScale:l}){const o=Zt(t);function u({translateExtent:f,width:g,height:d,zoomStep:m=1,pannable:p=!0,zoomable:y=!0,inversePan:b=!1}){const S=w=>{if(w.sourceEvent.type!=="wheel"||!r)return;const T=i(),q=w.sourceEvent.ctrlKey&&Ll()?10:1,R=-w.sourceEvent.deltaY*(w.sourceEvent.deltaMode===1?.05:w.sourceEvent.deltaMode?1:.002)*m,M=T[2]*Math.pow(2,R*q);r.scaleTo(M)};let N=[0,0];const E=w=>{(w.sourceEvent.type==="mousedown"||w.sourceEvent.type==="touchstart")&&(N=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY])},C=w=>{const T=i();if(w.sourceEvent.type!=="mousemove"&&w.sourceEvent.type!=="touchmove"||!r)return;const q=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY],R=[q[0]-N[0],q[1]-N[1]];N=q;const M=l()*Math.max(T[2],Math.log(T[2]))*(b?-1:1),L={x:T[0]-R[0]*M,y:T[1]-R[1]*M},H=[[0,0],[g,d]];r.setViewportConstrained({x:L.x,y:L.y,zoom:T[2]},H,f)},A=FC().on("start",E).on("zoom",p?C:null).on("zoom.wheel",y?S:null);o.call(A,{})}function c(){o.on("zoom",null)}return{update:u,destroy:c,pointer:dn}}const ou=t=>({x:t.x,y:t.y,zoom:t.k}),nd=({x:t,y:r,zoom:i})=>au.translate(t,r).scale(i),si=(t,r)=>t.target.closest(`.${r}`),_T=(t,r)=>r===2&&Array.isArray(t)&&t.includes(2),JO=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,rd=(t,r=0,i=JO,l=()=>{})=>{const o=typeof r=="number"&&r>0;return o||l(),o?t.transition().duration(r).ease(i).on("end",l):t},wT=t=>{const r=t.ctrlKey&&Ll()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*r};function WO({zoomPanValues:t,noWheelClassName:r,d3Selection:i,d3Zoom:l,panOnScrollMode:o,panOnScrollSpeed:u,zoomOnPinch:c,onPanZoomStart:f,onPanZoom:g,onPanZoomEnd:d}){return m=>{if(si(m,r))return m.ctrlKey&&m.preventDefault(),!1;m.preventDefault(),m.stopImmediatePropagation();const p=i.property("__zoom").k||1;if(m.ctrlKey&&c){const E=dn(m),C=wT(m),A=p*Math.pow(2,C);l.scaleTo(i,A,E,m);return}const y=m.deltaMode===1?20:1;let b=o===ca.Vertical?0:m.deltaX*y,S=o===ca.Horizontal?0:m.deltaY*y;!Ll()&&m.shiftKey&&o!==ca.Vertical&&(b=m.deltaY*y,S=0),l.translateBy(i,-(b/p)*u,-(S/p)*u,{internal:!0});const N=ou(i.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?(g?.(m,N),t.panScrollTimeout=setTimeout(()=>{d?.(m,N),t.isPanScrolling=!1},150)):(t.isPanScrolling=!0,f?.(m,N))}}function e5({noWheelClassName:t,preventScrolling:r,d3ZoomHandler:i}){return function(l,o){const u=l.type==="wheel",c=!r&&u&&!l.ctrlKey,f=si(l,t);if(l.ctrlKey&&u&&f&&l.preventDefault(),c||f)return null;l.preventDefault(),i.call(this,l,o)}}function t5({zoomPanValues:t,onDraggingChange:r,onPanZoomStart:i}){return l=>{if(l.sourceEvent?.internal)return;const o=ou(l.transform);t.mouseButton=l.sourceEvent?.button||0,t.isZoomingOrPanning=!0,t.prevViewport=o,l.sourceEvent?.type==="mousedown"&&r(!0),i&&i?.(l.sourceEvent,o)}}function n5({zoomPanValues:t,panOnDrag:r,onPaneContextMenu:i,onTransformChange:l,onPanZoom:o}){return u=>{t.usedRightMouseButton=!!(i&&_T(r,t.mouseButton??0)),u.sourceEvent?.sync||l([u.transform.x,u.transform.y,u.transform.k]),o&&!u.sourceEvent?.internal&&o?.(u.sourceEvent,ou(u.transform))}}function r5({zoomPanValues:t,panOnDrag:r,panOnScroll:i,onDraggingChange:l,onPanZoomEnd:o,onPaneContextMenu:u}){return c=>{if(!c.sourceEvent?.internal&&(t.isZoomingOrPanning=!1,u&&_T(r,t.mouseButton??0)&&!t.usedRightMouseButton&&c.sourceEvent&&u(c.sourceEvent),t.usedRightMouseButton=!1,l(!1),o)){const f=ou(c.transform);t.prevViewport=f,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{o?.(c.sourceEvent,f)},i?150:0)}}}function a5({zoomActivationKeyPressed:t,zoomOnScroll:r,zoomOnPinch:i,panOnDrag:l,panOnScroll:o,zoomOnDoubleClick:u,userSelectionActive:c,noWheelClassName:f,noPanClassName:g,lib:d,connectionInProgress:m}){return p=>{const y=t||r,b=i&&p.ctrlKey,S=p.type==="wheel";if(p.button===1&&p.type==="mousedown"&&(si(p,`${d}-flow__node`)||si(p,`${d}-flow__edge`)))return!0;if(!l&&!y&&!o&&!u&&!i||c||m&&!S||si(p,f)&&S||si(p,g)&&(!S||o&&S&&!t)||!i&&p.ctrlKey&&S)return!1;if(!i&&p.type==="touchstart"&&p.touches?.length>1)return p.preventDefault(),!1;if(!y&&!o&&!b&&S||!l&&(p.type==="mousedown"||p.type==="touchstart")||Array.isArray(l)&&!l.includes(p.button)&&p.type==="mousedown")return!1;const N=Array.isArray(l)&&l.includes(p.button)||!p.button||p.button<=1;return(!p.ctrlKey||S)&&N}}function i5({domNode:t,minZoom:r,maxZoom:i,translateExtent:l,viewport:o,onPanZoom:u,onPanZoomStart:c,onPanZoomEnd:f,onDraggingChange:g}){const d={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},m=t.getBoundingClientRect(),p=FC().scaleExtent([r,i]).translateExtent(l),y=Zt(t).call(p);A({x:o.x,y:o.y,zoom:vi(o.zoom,r,i)},[[0,0],[m.width,m.height]],l);const b=y.on("wheel.zoom"),S=y.on("dblclick.zoom");p.wheelDelta(wT);function N(B,F){return y?new Promise(W=>{p?.interpolate(F?.interpolate==="linear"?jl:Ds).transform(rd(y,F?.duration,F?.ease,()=>W(!0)),B)}):Promise.resolve(!1)}function E({noWheelClassName:B,noPanClassName:F,onPaneContextMenu:W,userSelectionActive:D,panOnScroll:K,panOnDrag:O,panOnScrollMode:G,panOnScrollSpeed:X,preventScrolling:P,zoomOnPinch:oe,zoomOnScroll:z,zoomOnDoubleClick:Y,zoomActivationKeyPressed:ae,lib:k,onTransformChange:V,connectionInProgress:I,paneClickDistance:ne,selectionOnDrag:le}){D&&!d.isZoomingOrPanning&&C();const fe=K&&!ae&&!D;p.clickDistance(le?1/0:!gn(ne)||ne<0?0:ne);const he=fe?WO({zoomPanValues:d,noWheelClassName:B,d3Selection:y,d3Zoom:p,panOnScrollMode:G,panOnScrollSpeed:X,zoomOnPinch:oe,onPanZoomStart:c,onPanZoom:u,onPanZoomEnd:f}):e5({noWheelClassName:B,preventScrolling:P,d3ZoomHandler:b});if(y.on("wheel.zoom",he,{passive:!1}),!D){const xe=t5({zoomPanValues:d,onDraggingChange:g,onPanZoomStart:c});p.on("start",xe);const ge=n5({zoomPanValues:d,panOnDrag:O,onPaneContextMenu:!!W,onPanZoom:u,onTransformChange:V});p.on("zoom",ge);const _e=r5({zoomPanValues:d,panOnDrag:O,panOnScroll:K,onPaneContextMenu:W,onPanZoomEnd:f,onDraggingChange:g});p.on("end",_e)}const ye=a5({zoomActivationKeyPressed:ae,panOnDrag:O,zoomOnScroll:z,panOnScroll:K,zoomOnDoubleClick:Y,zoomOnPinch:oe,userSelectionActive:D,noPanClassName:F,noWheelClassName:B,lib:k,connectionInProgress:I});p.filter(ye),Y?y.on("dblclick.zoom",S):y.on("dblclick.zoom",null)}function C(){p.on("zoom",null)}async function A(B,F,W){const D=nd(B),K=p?.constrain()(D,F,W);return K&&await N(K),new Promise(O=>O(K))}async function w(B,F){const W=nd(B);return await N(W,F),new Promise(D=>D(W))}function T(B){if(y){const F=nd(B),W=y.property("__zoom");(W.k!==B.zoom||W.x!==B.x||W.y!==B.y)&&p?.transform(y,F,null,{sync:!0})}}function q(){const B=y?ZC(y.node()):{x:0,y:0,k:1};return{x:B.x,y:B.y,zoom:B.k}}function R(B,F){return y?new Promise(W=>{p?.interpolate(F?.interpolate==="linear"?jl:Ds).scaleTo(rd(y,F?.duration,F?.ease,()=>W(!0)),B)}):Promise.resolve(!1)}function M(B,F){return y?new Promise(W=>{p?.interpolate(F?.interpolate==="linear"?jl:Ds).scaleBy(rd(y,F?.duration,F?.ease,()=>W(!0)),B)}):Promise.resolve(!1)}function L(B){p?.scaleExtent(B)}function H(B){p?.translateExtent(B)}function Q(B){const F=!gn(B)||B<0?0:B;p?.clickDistance(F)}return{update:E,destroy:C,setViewport:w,setViewportConstrained:A,getViewport:q,scaleTo:R,scaleBy:M,setScaleExtent:L,setTranslateExtent:H,syncViewport:T,setClickDistance:Q}}var yi;(function(t){t.Line="line",t.Handle="handle"})(yi||(yi={}));function l5({width:t,prevWidth:r,height:i,prevHeight:l,affectsX:o,affectsY:u}){const c=t-r,f=i-l,g=[c>0?1:c<0?-1:0,f>0?1:f<0?-1:0];return c&&o&&(g[0]=g[0]*-1),f&&u&&(g[1]=g[1]*-1),g}function n_(t){const r=t.includes("right")||t.includes("left"),i=t.includes("bottom")||t.includes("top"),l=t.includes("left"),o=t.includes("top");return{isHorizontal:r,isVertical:i,affectsX:l,affectsY:o}}function Dr(t,r){return Math.max(0,r-t)}function kr(t,r){return Math.max(0,t-r)}function js(t,r,i){return Math.max(0,r-t,t-i)}function r_(t,r){return t?!r:r}function o5(t,r,i,l,o,u,c,f){let{affectsX:g,affectsY:d}=r;const{isHorizontal:m,isVertical:p}=r,y=m&&p,{xSnapped:b,ySnapped:S}=i,{minWidth:N,maxWidth:E,minHeight:C,maxHeight:A}=l,{x:w,y:T,width:q,height:R,aspectRatio:M}=t;let L=Math.floor(m?b-t.pointerX:0),H=Math.floor(p?S-t.pointerY:0);const Q=q+(g?-L:L),B=R+(d?-H:H),F=-u[0]*q,W=-u[1]*R;let D=js(Q,N,E),K=js(B,C,A);if(c){let X=0,P=0;g&&L<0?X=Dr(w+L+F,c[0][0]):!g&&L>0&&(X=kr(w+Q+F,c[1][0])),d&&H<0?P=Dr(T+H+W,c[0][1]):!d&&H>0&&(P=kr(T+B+W,c[1][1])),D=Math.max(D,X),K=Math.max(K,P)}if(f){let X=0,P=0;g&&L>0?X=kr(w+L,f[0][0]):!g&&L<0&&(X=Dr(w+Q,f[1][0])),d&&H>0?P=kr(T+H,f[0][1]):!d&&H<0&&(P=Dr(T+B,f[1][1])),D=Math.max(D,X),K=Math.max(K,P)}if(o){if(m){const X=js(Q/M,C,A)*M;if(D=Math.max(D,X),c){let P=0;!g&&!d||g&&!d&&y?P=kr(T+W+Q/M,c[1][1])*M:P=Dr(T+W+(g?L:-L)/M,c[0][1])*M,D=Math.max(D,P)}if(f){let P=0;!g&&!d||g&&!d&&y?P=Dr(T+Q/M,f[1][1])*M:P=kr(T+(g?L:-L)/M,f[0][1])*M,D=Math.max(D,P)}}if(p){const X=js(B*M,N,E)/M;if(K=Math.max(K,X),c){let P=0;!g&&!d||d&&!g&&y?P=kr(w+B*M+F,c[1][0])/M:P=Dr(w+(d?H:-H)*M+F,c[0][0])/M,K=Math.max(K,P)}if(f){let P=0;!g&&!d||d&&!g&&y?P=Dr(w+B*M,f[1][0])/M:P=kr(w+(d?H:-H)*M,f[0][0])/M,K=Math.max(K,P)}}}H=H+(H<0?K:-K),L=L+(L<0?D:-D),o&&(y?Q>B*M?H=(r_(g,d)?-L:L)/M:L=(r_(g,d)?-H:H)*M:m?(H=L/M,d=g):(L=H*M,g=d));const O=g?w+L:w,G=d?T+H:T;return{width:q+(g?-L:L),height:R+(d?-H:H),x:u[0]*L*(g?-1:1)+O,y:u[1]*H*(d?-1:1)+G}}const ST={width:0,height:0,x:0,y:0},s5={...ST,pointerX:0,pointerY:0,aspectRatio:1};function u5(t){return[[0,0],[t.measured.width,t.measured.height]]}function c5(t,r,i){const l=r.position.x+t.position.x,o=r.position.y+t.position.y,u=t.measured.width??0,c=t.measured.height??0,f=i[0]*u,g=i[1]*c;return[[l-f,o-g],[l+u-f,o+c-g]]}function f5({domNode:t,nodeId:r,getStoreItems:i,onChange:l,onEnd:o}){const u=Zt(t);let c={controlDirection:n_("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function f({controlPosition:d,boundaries:m,keepAspectRatio:p,resizeDirection:y,onResizeStart:b,onResize:S,onResizeEnd:N,shouldResize:E}){let C={...ST},A={...s5};c={boundaries:m,resizeDirection:y,keepAspectRatio:p,controlDirection:n_(d)};let w,T=null,q=[],R,M,L,H=!1;const Q=qC().on("start",B=>{const{nodeLookup:F,transform:W,snapGrid:D,snapToGrid:K,nodeOrigin:O,paneDomNode:G}=i();if(w=F.get(r),!w)return;T=G?.getBoundingClientRect()??null;const{xSnapped:X,ySnapped:P}=Ml(B.sourceEvent,{transform:W,snapGrid:D,snapToGrid:K,containerBounds:T});C={width:w.measured.width??0,height:w.measured.height??0,x:w.position.x??0,y:w.position.y??0},A={...C,pointerX:X,pointerY:P,aspectRatio:C.width/C.height},R=void 0,w.parentId&&(w.extent==="parent"||w.expandParent)&&(R=F.get(w.parentId),M=R&&w.extent==="parent"?u5(R):void 0),q=[],L=void 0;for(const[oe,z]of F)if(z.parentId===r&&(q.push({id:oe,position:{...z.position},extent:z.extent}),z.extent==="parent"||z.expandParent)){const Y=c5(z,w,z.origin??O);L?L=[[Math.min(Y[0][0],L[0][0]),Math.min(Y[0][1],L[0][1])],[Math.max(Y[1][0],L[1][0]),Math.max(Y[1][1],L[1][1])]]:L=Y}b?.(B,{...C})}).on("drag",B=>{const{transform:F,snapGrid:W,snapToGrid:D,nodeOrigin:K}=i(),O=Ml(B.sourceEvent,{transform:F,snapGrid:W,snapToGrid:D,containerBounds:T}),G=[];if(!w)return;const{x:X,y:P,width:oe,height:z}=C,Y={},ae=w.origin??K,{width:k,height:V,x:I,y:ne}=o5(A,c.controlDirection,O,c.boundaries,c.keepAspectRatio,ae,M,L),le=k!==oe,fe=V!==z,he=I!==X&&le,ye=ne!==P&&fe;if(!he&&!ye&&!le&&!fe)return;if((he||ye||ae[0]===1||ae[1]===1)&&(Y.x=he?I:C.x,Y.y=ye?ne:C.y,C.x=Y.x,C.y=Y.y,q.length>0)){const ve=I-X,Te=ne-P;for(const we of q)we.position={x:we.position.x-ve+ae[0]*(k-oe),y:we.position.y-Te+ae[1]*(V-z)},G.push(we)}if((le||fe)&&(Y.width=le&&(!c.resizeDirection||c.resizeDirection==="horizontal")?k:C.width,Y.height=fe&&(!c.resizeDirection||c.resizeDirection==="vertical")?V:C.height,C.width=Y.width,C.height=Y.height),R&&w.expandParent){const ve=ae[0]*(Y.width??0);Y.x&&Y.x<ve&&(C.x=ve,A.x=A.x-(Y.x-ve));const Te=ae[1]*(Y.height??0);Y.y&&Y.y<Te&&(C.y=Te,A.y=A.y-(Y.y-Te))}const xe=l5({width:C.width,prevWidth:oe,height:C.height,prevHeight:z,affectsX:c.controlDirection.affectsX,affectsY:c.controlDirection.affectsY}),ge={...C,direction:xe};E?.(B,ge)!==!1&&(H=!0,S?.(B,ge),l(Y,G))}).on("end",B=>{H&&(N?.(B,{...C}),o?.({...C}),H=!1)});u.call(Q)}function g(){u.on(".drag",null)}return{update:f,destroy:g}}var ad={exports:{}},id={},ld={exports:{}},od={};var a_;function d5(){if(a_)return od;a_=1;var t=Ul();function r(p,y){return p===y&&(p!==0||1/p===1/y)||p!==p&&y!==y}var i=typeof Object.is=="function"?Object.is:r,l=t.useState,o=t.useEffect,u=t.useLayoutEffect,c=t.useDebugValue;function f(p,y){var b=y(),S=l({inst:{value:b,getSnapshot:y}}),N=S[0].inst,E=S[1];return u(function(){N.value=b,N.getSnapshot=y,g(N)&&E({inst:N})},[p,b,y]),o(function(){return g(N)&&E({inst:N}),p(function(){g(N)&&E({inst:N})})},[p]),c(b),b}function g(p){var y=p.getSnapshot;p=p.value;try{var b=y();return!i(p,b)}catch{return!0}}function d(p,y){return y()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:f;return od.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:m,od}var i_;function h5(){return i_||(i_=1,ld.exports=d5()),ld.exports}var l_;function g5(){if(l_)return id;l_=1;var t=Ul(),r=h5();function i(d,m){return d===m&&(d!==0||1/d===1/m)||d!==d&&m!==m}var l=typeof Object.is=="function"?Object.is:i,o=r.useSyncExternalStore,u=t.useRef,c=t.useEffect,f=t.useMemo,g=t.useDebugValue;return id.useSyncExternalStoreWithSelector=function(d,m,p,y,b){var S=u(null);if(S.current===null){var N={hasValue:!1,value:null};S.current=N}else N=S.current;S=f(function(){function C(R){if(!A){if(A=!0,w=R,R=y(R),b!==void 0&&N.hasValue){var M=N.value;if(b(M,R))return T=M}return T=R}if(M=T,l(w,R))return M;var L=y(R);return b!==void 0&&b(M,L)?(w=R,M):(w=R,T=L)}var A=!1,w,T,q=p===void 0?null:p;return[function(){return C(m())},q===null?void 0:function(){return C(q())}]},[m,p,y,b]);var E=o(d,S[0],S[1]);return c(function(){N.hasValue=!0,N.value=E},[E]),g(E),E},id}var o_;function v5(){return o_||(o_=1,ad.exports=g5()),ad.exports}var m5=v5();const p5=Ip(m5),y5={},s_=t=>{let r;const i=new Set,l=(m,p)=>{const y=typeof m=="function"?m(r):m;if(!Object.is(y,r)){const b=r;r=p??(typeof y!="object"||y===null)?y:Object.assign({},r,y),i.forEach(S=>S(r,b))}},o=()=>r,g={setState:l,getState:o,getInitialState:()=>d,subscribe:m=>(i.add(m),()=>i.delete(m)),destroy:()=>{(y5?"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()}},d=r=t(l,o,g);return g},x5=t=>t?s_(t):s_,{useDebugValue:b5}=Sl,{useSyncExternalStoreWithSelector:_5}=p5,w5=t=>t;function ET(t,r=w5,i){const l=_5(t.subscribe,t.getState,t.getServerState||t.getInitialState,r,i);return b5(l),l}const u_=(t,r)=>{const i=x5(t),l=(o,u=r)=>ET(i,o,u);return Object.assign(l,i),l},S5=(t,r)=>t?u_(t,r):u_;function Ze(t,r){if(Object.is(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(const[l,o]of t)if(!Object.is(o,r.get(l)))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(const l of t)if(!r.has(l))return!1;return!0}const i=Object.keys(t);if(i.length!==Object.keys(r).length)return!1;for(const l of i)if(!Object.prototype.hasOwnProperty.call(r,l)||!Object.is(t[l],r[l]))return!1;return!0}hC();const su=J.createContext(null),E5=su.Provider,NT=Tn.error001();function Oe(t,r){const i=J.useContext(su);if(i===null)throw new Error(NT);return ET(i,t,r)}function Fe(){const t=J.useContext(su);if(t===null)throw new Error(NT);return J.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe}),[t])}const c_={display:"none"},N5={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},CT="react-flow__node-desc",TT="react-flow__edge-desc",C5="react-flow__aria-live",T5=t=>t.ariaLiveMessage,A5=t=>t.ariaLabelConfig;function j5({rfId:t}){const r=Oe(T5);return x.jsx("div",{id:`${C5}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:N5,children:r})}function M5({rfId:t,disableKeyboardA11y:r}){const i=Oe(A5);return x.jsxs(x.Fragment,{children:[x.jsx("div",{id:`${CT}-${t}`,style:c_,children:r?i["node.a11yDescription.default"]:i["node.a11yDescription.keyboardDisabled"]}),x.jsx("div",{id:`${TT}-${t}`,style:c_,children:i["edge.a11yDescription.default"]}),!r&&x.jsx(j5,{rfId:t})]})}const uu=J.forwardRef(({position:t="top-left",children:r,className:i,style:l,...o},u)=>{const c=`${t}`.split("-");return x.jsx("div",{className:st(["react-flow__panel",i,...c]),style:l,ref:u,...o,children:r})});uu.displayName="Panel";function R5({proOptions:t,position:r="bottom-right"}){return t?.hideAttribution?null:x.jsx(uu,{position:r,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:x.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const q5=t=>{const r=[],i=[];for(const[,l]of t.nodeLookup)l.selected&&r.push(l.internals.userNode);for(const[,l]of t.edgeLookup)l.selected&&i.push(l);return{selectedNodes:r,selectedEdges:i}},Ms=t=>t.id;function O5(t,r){return Ze(t.selectedNodes.map(Ms),r.selectedNodes.map(Ms))&&Ze(t.selectedEdges.map(Ms),r.selectedEdges.map(Ms))}function z5({onSelectionChange:t}){const r=Fe(),{selectedNodes:i,selectedEdges:l}=Oe(q5,O5);return J.useEffect(()=>{const o={nodes:i,edges:l};t?.(o),r.getState().onSelectionChangeHandlers.forEach(u=>u(o))},[i,l,t]),null}const D5=t=>!!t.onSelectionChangeHandlers;function k5({onSelectionChange:t}){const r=Oe(D5);return t||r?x.jsx(z5,{onSelectionChange:t}):null}const AT=[0,0],H5={x:0,y:0,zoom:1},L5=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],f_=[...L5,"rfId"],B5=t=>({setNodes:t.setNodes,setEdges:t.setEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges}),d_={translateExtent:Dl,nodeOrigin:AT,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function U5(t){const{setNodes:r,setEdges:i,setMinZoom:l,setMaxZoom:o,setTranslateExtent:u,setNodeExtent:c,reset:f,setDefaultNodesAndEdges:g}=Oe(B5,Ze),d=Fe();J.useEffect(()=>(g(t.defaultNodes,t.defaultEdges),()=>{m.current=d_,f()}),[]);const m=J.useRef(d_);return J.useEffect(()=>{for(const p of f_){const y=t[p],b=m.current[p];y!==b&&(typeof t[p]>"u"||(p==="nodes"?r(y):p==="edges"?i(y):p==="minZoom"?l(y):p==="maxZoom"?o(y):p==="translateExtent"?u(y):p==="nodeExtent"?c(y):p==="ariaLabelConfig"?d.setState({ariaLabelConfig:EO(y)}):p==="fitView"?d.setState({fitViewQueued:y}):p==="fitViewOptions"?d.setState({fitViewOptions:y}):d.setState({[p]:y})))}m.current=t},f_.map(p=>t[p])),null}function h_(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function G5(t){const[r,i]=J.useState(t==="system"?null:t);return J.useEffect(()=>{if(t!=="system"){i(t);return}const l=h_(),o=()=>i(l?.matches?"dark":"light");return o(),l?.addEventListener("change",o),()=>{l?.removeEventListener("change",o)}},[t]),r!==null?r:h_()?.matches?"dark":"light"}const g_=typeof document<"u"?document:null;function Bl(t=null,r={target:g_,actInsideInputWithModifier:!0}){const[i,l]=J.useState(!1),o=J.useRef(!1),u=J.useRef(new Set([])),[c,f]=J.useMemo(()=>{if(t!==null){const d=(Array.isArray(t)?t:[t]).filter(p=>typeof p=="string").map(p=>p.replace("+",`
|
|
10
|
+
`).replace(`
|
|
11
|
+
|
|
12
|
+
`,`
|
|
13
|
+
+`).split(`
|
|
14
|
+
`)),m=d.reduce((p,y)=>p.concat(...y),[]);return[d,m]}return[[],[]]},[t]);return J.useEffect(()=>{const g=r?.target??g_,d=r?.actInsideInputWithModifier??!0;if(t!==null){const m=b=>{if(o.current=b.ctrlKey||b.metaKey||b.shiftKey||b.altKey,(!o.current||o.current&&!d)&&lT(b))return!1;const N=m_(b.code,f);if(u.current.add(b[N]),v_(c,u.current,!1)){const E=b.composedPath?.()?.[0]||b.target,C=E?.nodeName==="BUTTON"||E?.nodeName==="A";r.preventDefault!==!1&&(o.current||!C)&&b.preventDefault(),l(!0)}},p=b=>{const S=m_(b.code,f);v_(c,u.current,!0)?(l(!1),u.current.clear()):u.current.delete(b[S]),b.key==="Meta"&&u.current.clear(),o.current=!1},y=()=>{u.current.clear(),l(!1)};return g?.addEventListener("keydown",m),g?.addEventListener("keyup",p),window.addEventListener("blur",y),window.addEventListener("contextmenu",y),()=>{g?.removeEventListener("keydown",m),g?.removeEventListener("keyup",p),window.removeEventListener("blur",y),window.removeEventListener("contextmenu",y)}}},[t,l]),i}function v_(t,r,i){return t.filter(l=>i||l.length===r.size).some(l=>l.every(o=>r.has(o)))}function m_(t,r){return r.includes(t)?"code":"key"}const V5=()=>{const t=Fe();return J.useMemo(()=>({zoomIn:r=>{const{panZoom:i}=t.getState();return i?i.scaleBy(1.2,{duration:r?.duration}):Promise.resolve(!1)},zoomOut:r=>{const{panZoom:i}=t.getState();return i?i.scaleBy(1/1.2,{duration:r?.duration}):Promise.resolve(!1)},zoomTo:(r,i)=>{const{panZoom:l}=t.getState();return l?l.scaleTo(r,{duration:i?.duration}):Promise.resolve(!1)},getZoom:()=>t.getState().transform[2],setViewport:async(r,i)=>{const{transform:[l,o,u],panZoom:c}=t.getState();return c?(await c.setViewport({x:r.x??l,y:r.y??o,zoom:r.zoom??u},i),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[r,i,l]=t.getState().transform;return{x:r,y:i,zoom:l}},setCenter:async(r,i,l)=>t.getState().setCenter(r,i,l),fitBounds:async(r,i)=>{const{width:l,height:o,minZoom:u,maxZoom:c,panZoom:f}=t.getState(),g=ey(r,l,o,u,c,i?.padding??.1);return f?(await f.setViewport(g,{duration:i?.duration,ease:i?.ease,interpolate:i?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(r,i={})=>{const{transform:l,snapGrid:o,snapToGrid:u,domNode:c}=t.getState();if(!c)return r;const{x:f,y:g}=c.getBoundingClientRect(),d={x:r.x-f,y:r.y-g},m=i.snapGrid??o,p=i.snapToGrid??u;return Zl(d,l,p,m)},flowToScreenPosition:r=>{const{transform:i,domNode:l}=t.getState();if(!l)return r;const{x:o,y:u}=l.getBoundingClientRect(),c=Ks(r,i);return{x:c.x+o,y:c.y+u}}}),[])};function jT(t,r){const i=[],l=new Map,o=[];for(const u of t)if(u.type==="add"){o.push(u);continue}else if(u.type==="remove"||u.type==="replace")l.set(u.id,[u]);else{const c=l.get(u.id);c?c.push(u):l.set(u.id,[u])}for(const u of r){const c=l.get(u.id);if(!c){i.push(u);continue}if(c[0].type==="remove")continue;if(c[0].type==="replace"){i.push({...c[0].item});continue}const f={...u};for(const g of c)Y5(g,f);i.push(f)}return o.length&&o.forEach(u=>{u.index!==void 0?i.splice(u.index,0,{...u.item}):i.push({...u.item})}),i}function Y5(t,r){switch(t.type){case"select":{r.selected=t.selected;break}case"position":{typeof t.position<"u"&&(r.position=t.position),typeof t.dragging<"u"&&(r.dragging=t.dragging);break}case"dimensions":{typeof t.dimensions<"u"&&(r.measured={...t.dimensions},t.setAttributes&&((t.setAttributes===!0||t.setAttributes==="width")&&(r.width=t.dimensions.width),(t.setAttributes===!0||t.setAttributes==="height")&&(r.height=t.dimensions.height))),typeof t.resizing=="boolean"&&(r.resizing=t.resizing);break}}}function MT(t,r){return jT(t,r)}function RT(t,r){return jT(t,r)}function oa(t,r){return{id:t,type:"select",selected:r}}function ui(t,r=new Set,i=!1){const l=[];for(const[o,u]of t){const c=r.has(o);!(u.selected===void 0&&!c)&&u.selected!==c&&(i&&(u.selected=c),l.push(oa(u.id,c)))}return l}function p_({items:t=[],lookup:r}){const i=[],l=new Map(t.map(o=>[o.id,o]));for(const[o,u]of t.entries()){const c=r.get(u.id),f=c?.internals?.userNode??c;f!==void 0&&f!==u&&i.push({id:u.id,item:u,type:"replace"}),f===void 0&&i.push({item:u,type:"add",index:o})}for(const[o]of r)l.get(o)===void 0&&i.push({id:o,type:"remove"});return i}function y_(t){return{id:t.id,type:"remove"}}const x_=t=>gO(t),I5=t=>JC(t);function qT(t){return J.forwardRef(t)}const X5=typeof window<"u"?J.useLayoutEffect:J.useEffect;function b_(t){const[r,i]=J.useState(BigInt(0)),[l]=J.useState(()=>Z5(()=>i(o=>o+BigInt(1))));return X5(()=>{const o=l.get();o.length&&(t(o),l.reset())},[r]),l}function Z5(t){let r=[];return{get:()=>r,reset:()=>{r=[]},push:i=>{r.push(i),t()}}}const OT=J.createContext(null);function F5({children:t}){const r=Fe(),i=J.useCallback(f=>{const{nodes:g=[],setNodes:d,hasDefaultNodes:m,onNodesChange:p,nodeLookup:y,fitViewQueued:b,onNodesChangeMiddlewareMap:S}=r.getState();let N=g;for(const C of f)N=typeof C=="function"?C(N):C;let E=p_({items:N,lookup:y});for(const C of S.values())E=C(E);m&&d(N),E.length>0?p?.(E):b&&window.requestAnimationFrame(()=>{const{fitViewQueued:C,nodes:A,setNodes:w}=r.getState();C&&w(A)})},[]),l=b_(i),o=J.useCallback(f=>{const{edges:g=[],setEdges:d,hasDefaultEdges:m,onEdgesChange:p,edgeLookup:y}=r.getState();let b=g;for(const S of f)b=typeof S=="function"?S(b):S;m?d(b):p&&p(p_({items:b,lookup:y}))},[]),u=b_(o),c=J.useMemo(()=>({nodeQueue:l,edgeQueue:u}),[]);return x.jsx(OT.Provider,{value:c,children:t})}function K5(){const t=J.useContext(OT);if(!t)throw new Error("useBatchContext must be used within a BatchProvider");return t}const Q5=t=>!!t.panZoom;function oy(){const t=V5(),r=Fe(),i=K5(),l=Oe(Q5),o=J.useMemo(()=>{const u=p=>r.getState().nodeLookup.get(p),c=p=>{i.nodeQueue.push(p)},f=p=>{i.edgeQueue.push(p)},g=p=>{const{nodeLookup:y,nodeOrigin:b}=r.getState(),S=x_(p)?p:y.get(p.id),N=S.parentId?aT(S.position,S.measured,S.parentId,y,b):S.position,E={...S,position:N,width:S.measured?.width??S.width,height:S.measured?.height??S.height};return mi(E)},d=(p,y,b={replace:!1})=>{c(S=>S.map(N=>{if(N.id===p){const E=typeof y=="function"?y(N):y;return b.replace&&x_(E)?E:{...N,...E}}return N}))},m=(p,y,b={replace:!1})=>{f(S=>S.map(N=>{if(N.id===p){const E=typeof y=="function"?y(N):y;return b.replace&&I5(E)?E:{...N,...E}}return N}))};return{getNodes:()=>r.getState().nodes.map(p=>({...p})),getNode:p=>u(p)?.internals.userNode,getInternalNode:u,getEdges:()=>{const{edges:p=[]}=r.getState();return p.map(y=>({...y}))},getEdge:p=>r.getState().edgeLookup.get(p),setNodes:c,setEdges:f,addNodes:p=>{const y=Array.isArray(p)?p:[p];i.nodeQueue.push(b=>[...b,...y])},addEdges:p=>{const y=Array.isArray(p)?p:[p];i.edgeQueue.push(b=>[...b,...y])},toObject:()=>{const{nodes:p=[],edges:y=[],transform:b}=r.getState(),[S,N,E]=b;return{nodes:p.map(C=>({...C})),edges:y.map(C=>({...C})),viewport:{x:S,y:N,zoom:E}}},deleteElements:async({nodes:p=[],edges:y=[]})=>{const{nodes:b,edges:S,onNodesDelete:N,onEdgesDelete:E,triggerNodeChanges:C,triggerEdgeChanges:A,onDelete:w,onBeforeDelete:T}=r.getState(),{nodes:q,edges:R}=await xO({nodesToRemove:p,edgesToRemove:y,nodes:b,edges:S,onBeforeDelete:T}),M=R.length>0,L=q.length>0;if(M){const H=R.map(y_);E?.(R),A(H)}if(L){const H=q.map(y_);N?.(q),C(H)}return(L||M)&&w?.({nodes:q,edges:R}),{deletedNodes:q,deletedEdges:R}},getIntersectingNodes:(p,y=!0,b)=>{const S=Xb(p),N=S?p:g(p),E=b!==void 0;return N?(b||r.getState().nodes).filter(C=>{const A=r.getState().nodeLookup.get(C.id);if(A&&!S&&(C.id===p.id||!A.internals.positionAbsolute))return!1;const w=mi(E?C:A),T=Hl(w,N);return y&&T>0||T>=w.width*w.height||T>=N.width*N.height}):[]},isNodeIntersecting:(p,y,b=!0)=>{const N=Xb(p)?p:g(p);if(!N)return!1;const E=Hl(N,y);return b&&E>0||E>=y.width*y.height||E>=N.width*N.height},updateNode:d,updateNodeData:(p,y,b={replace:!1})=>{d(p,S=>{const N=typeof y=="function"?y(S):y;return b.replace?{...S,data:N}:{...S,data:{...S.data,...N}}},b)},updateEdge:m,updateEdgeData:(p,y,b={replace:!1})=>{m(p,S=>{const N=typeof y=="function"?y(S):y;return b.replace?{...S,data:N}:{...S,data:{...S.data,...N}}},b)},getNodesBounds:p=>{const{nodeLookup:y,nodeOrigin:b}=r.getState();return vO(p,{nodeLookup:y,nodeOrigin:b})},getHandleConnections:({type:p,id:y,nodeId:b})=>Array.from(r.getState().connectionLookup.get(`${b}-${p}${y?`-${y}`:""}`)?.values()??[]),getNodeConnections:({type:p,handleId:y,nodeId:b})=>Array.from(r.getState().connectionLookup.get(`${b}${p?y?`-${p}-${y}`:`-${p}`:""}`)?.values()??[]),fitView:async p=>{const y=r.getState().fitViewResolver??SO();return r.setState({fitViewQueued:!0,fitViewOptions:p,fitViewResolver:y}),i.nodeQueue.push(b=>[...b]),y.promise}}},[]);return J.useMemo(()=>({...o,...t,viewportInitialized:l}),[l])}const __=t=>t.selected,$5=typeof window<"u"?window:void 0;function P5({deleteKeyCode:t,multiSelectionKeyCode:r}){const i=Fe(),{deleteElements:l}=oy(),o=Bl(t,{actInsideInputWithModifier:!1}),u=Bl(r,{target:$5});J.useEffect(()=>{if(o){const{edges:c,nodes:f}=i.getState();l({nodes:f.filter(__),edges:c.filter(__)}),i.setState({nodesSelectionActive:!1})}},[o]),J.useEffect(()=>{i.setState({multiSelectionActive:u})},[u])}function J5(t){const r=Fe();J.useEffect(()=>{const i=()=>{if(!t.current||!(t.current.checkVisibility?.()??!0))return!1;const l=ty(t.current);(l.height===0||l.width===0)&&r.getState().onError?.("004",Tn.error004()),r.setState({width:l.width||500,height:l.height||500})};if(t.current){i(),window.addEventListener("resize",i);const l=new ResizeObserver(()=>i());return l.observe(t.current),()=>{window.removeEventListener("resize",i),l&&t.current&&l.unobserve(t.current)}}},[])}const cu={position:"absolute",width:"100%",height:"100%",top:0,left:0},W5=t=>({userSelectionActive:t.userSelectionActive,lib:t.lib,connectionInProgress:t.connection.inProgress});function ez({onPaneContextMenu:t,zoomOnScroll:r=!0,zoomOnPinch:i=!0,panOnScroll:l=!1,panOnScrollSpeed:o=.5,panOnScrollMode:u=ca.Free,zoomOnDoubleClick:c=!0,panOnDrag:f=!0,defaultViewport:g,translateExtent:d,minZoom:m,maxZoom:p,zoomActivationKeyCode:y,preventScrolling:b=!0,children:S,noWheelClassName:N,noPanClassName:E,onViewportChange:C,isControlledViewport:A,paneClickDistance:w,selectionOnDrag:T}){const q=Fe(),R=J.useRef(null),{userSelectionActive:M,lib:L,connectionInProgress:H}=Oe(W5,Ze),Q=Bl(y),B=J.useRef();J5(R);const F=J.useCallback(W=>{C?.({x:W[0],y:W[1],zoom:W[2]}),A||q.setState({transform:W})},[C,A]);return J.useEffect(()=>{if(R.current){B.current=i5({domNode:R.current,minZoom:m,maxZoom:p,translateExtent:d,viewport:g,onDraggingChange:O=>q.setState({paneDragging:O}),onPanZoomStart:(O,G)=>{const{onViewportChangeStart:X,onMoveStart:P}=q.getState();P?.(O,G),X?.(G)},onPanZoom:(O,G)=>{const{onViewportChange:X,onMove:P}=q.getState();P?.(O,G),X?.(G)},onPanZoomEnd:(O,G)=>{const{onViewportChangeEnd:X,onMoveEnd:P}=q.getState();P?.(O,G),X?.(G)}});const{x:W,y:D,zoom:K}=B.current.getViewport();return q.setState({panZoom:B.current,transform:[W,D,K],domNode:R.current.closest(".react-flow")}),()=>{B.current?.destroy()}}},[]),J.useEffect(()=>{B.current?.update({onPaneContextMenu:t,zoomOnScroll:r,zoomOnPinch:i,panOnScroll:l,panOnScrollSpeed:o,panOnScrollMode:u,zoomOnDoubleClick:c,panOnDrag:f,zoomActivationKeyPressed:Q,preventScrolling:b,noPanClassName:E,userSelectionActive:M,noWheelClassName:N,lib:L,onTransformChange:F,connectionInProgress:H,selectionOnDrag:T,paneClickDistance:w})},[t,r,i,l,o,u,c,f,Q,b,E,M,N,L,F,H,T,w]),x.jsx("div",{className:"react-flow__renderer",ref:R,style:cu,children:S})}const tz=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function nz(){const{userSelectionActive:t,userSelectionRect:r}=Oe(tz,Ze);return t&&r?x.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:r.width,height:r.height,transform:`translate(${r.x}px, ${r.y}px)`}}):null}const sd=(t,r)=>i=>{i.target===r.current&&t?.(i)},rz=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,connectionInProgress:t.connection.inProgress,dragging:t.paneDragging});function az({isSelecting:t,selectionKeyPressed:r,selectionMode:i=kl.Full,panOnDrag:l,paneClickDistance:o,selectionOnDrag:u,onSelectionStart:c,onSelectionEnd:f,onPaneClick:g,onPaneContextMenu:d,onPaneScroll:m,onPaneMouseEnter:p,onPaneMouseMove:y,onPaneMouseLeave:b,children:S}){const N=Fe(),{userSelectionActive:E,elementsSelectable:C,dragging:A,connectionInProgress:w}=Oe(rz,Ze),T=C&&(t||E),q=J.useRef(null),R=J.useRef(),M=J.useRef(new Set),L=J.useRef(new Set),H=J.useRef(!1),Q=X=>{if(H.current||w){H.current=!1;return}g?.(X),N.getState().resetSelectedElements(),N.setState({nodesSelectionActive:!1})},B=X=>{if(Array.isArray(l)&&l?.includes(2)){X.preventDefault();return}d?.(X)},F=m?X=>m(X):void 0,W=X=>{H.current&&(X.stopPropagation(),H.current=!1)},D=X=>{const{domNode:P}=N.getState();if(R.current=P?.getBoundingClientRect(),!R.current)return;const oe=X.target===q.current;if(!oe&&!!X.target.closest(".nokey")||!t||!(u&&oe||r)||X.button!==0||!X.isPrimary)return;X.target?.setPointerCapture?.(X.pointerId),H.current=!1;const{x:ae,y:k}=vn(X.nativeEvent,R.current);N.setState({userSelectionRect:{width:0,height:0,startX:ae,startY:k,x:ae,y:k}}),oe||(X.stopPropagation(),X.preventDefault())},K=X=>{const{userSelectionRect:P,transform:oe,nodeLookup:z,edgeLookup:Y,connectionLookup:ae,triggerNodeChanges:k,triggerEdgeChanges:V,defaultEdgeOptions:I,resetSelectedElements:ne}=N.getState();if(!R.current||!P)return;const{x:le,y:fe}=vn(X.nativeEvent,R.current),{startX:he,startY:ye}=P;if(!H.current){const Te=r?0:o;if(Math.hypot(le-he,fe-ye)<=Te)return;ne(),c?.(X)}H.current=!0;const xe={startX:he,startY:ye,x:le<he?le:he,y:fe<ye?fe:ye,width:Math.abs(le-he),height:Math.abs(fe-ye)},ge=M.current,_e=L.current;M.current=new Set(Wp(z,xe,oe,i===kl.Partial,!0).map(Te=>Te.id)),L.current=new Set;const ve=I?.selectable??!0;for(const Te of M.current){const we=ae.get(Te);if(we)for(const{edgeId:dt}of we.values()){const nt=Y.get(dt);nt&&(nt.selectable??ve)&&L.current.add(dt)}}if(!Zb(ge,M.current)){const Te=ui(z,M.current,!0);k(Te)}if(!Zb(_e,L.current)){const Te=ui(Y,L.current);V(Te)}N.setState({userSelectionRect:xe,userSelectionActive:!0,nodesSelectionActive:!1})},O=X=>{X.button===0&&(X.target?.releasePointerCapture?.(X.pointerId),!E&&X.target===q.current&&N.getState().userSelectionRect&&Q?.(X),N.setState({userSelectionActive:!1,userSelectionRect:null}),H.current&&(f?.(X),N.setState({nodesSelectionActive:M.current.size>0})))},G=l===!0||Array.isArray(l)&&l.includes(0);return x.jsxs("div",{className:st(["react-flow__pane",{draggable:G,dragging:A,selection:t}]),onClick:T?void 0:sd(Q,q),onContextMenu:sd(B,q),onWheel:sd(F,q),onPointerEnter:T?void 0:p,onPointerMove:T?K:y,onPointerUp:T?O:void 0,onPointerDownCapture:T?D:void 0,onClickCapture:T?W:void 0,onPointerLeave:b,ref:q,style:cu,children:[S,x.jsx(nz,{})]})}function Gp({id:t,store:r,unselect:i=!1,nodeRef:l}){const{addSelectedNodes:o,unselectNodesAndEdges:u,multiSelectionActive:c,nodeLookup:f,onError:g}=r.getState(),d=f.get(t);if(!d){g?.("012",Tn.error012(t));return}r.setState({nodesSelectionActive:!1}),d.selected?(i||d.selected&&c)&&(u({nodes:[d],edges:[]}),requestAnimationFrame(()=>l?.current?.blur())):o([t])}function zT({nodeRef:t,disabled:r=!1,noDragClassName:i,handleSelector:l,nodeId:o,isSelectable:u,nodeClickDistance:c}){const f=Fe(),[g,d]=J.useState(!1),m=J.useRef();return J.useEffect(()=>{m.current=XO({getStoreItems:()=>f.getState(),onNodeMouseDown:p=>{Gp({id:p,store:f,nodeRef:t})},onDragStart:()=>{d(!0)},onDragStop:()=>{d(!1)}})},[]),J.useEffect(()=>{if(r)m.current?.destroy();else if(t.current)return m.current?.update({noDragClassName:i,handleSelector:l,domNode:t.current,isSelectable:u,nodeId:o,nodeClickDistance:c}),()=>{m.current?.destroy()}},[i,l,r,u,t,o]),g}const iz=t=>r=>r.selected&&(r.draggable||t&&typeof r.draggable>"u");function DT(){const t=Fe();return J.useCallback(i=>{const{nodeExtent:l,snapToGrid:o,snapGrid:u,nodesDraggable:c,onError:f,updateNodePositions:g,nodeLookup:d,nodeOrigin:m}=t.getState(),p=new Map,y=iz(c),b=o?u[0]:5,S=o?u[1]:5,N=i.direction.x*b*i.factor,E=i.direction.y*S*i.factor;for(const[,C]of d){if(!y(C))continue;let A={x:C.internals.positionAbsolute.x+N,y:C.internals.positionAbsolute.y+E};o&&(A=Xl(A,u));const{position:w,positionAbsolute:T}=WC({nodeId:C.id,nextPosition:A,nodeLookup:d,nodeExtent:l,nodeOrigin:m,onError:f});C.position=w,C.internals.positionAbsolute=T,p.set(C.id,C)}g(p)},[])}const sy=J.createContext(null),lz=sy.Provider;sy.Consumer;const kT=()=>J.useContext(sy),oz=t=>({connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName,rfId:t.rfId}),sz=(t,r,i)=>l=>{const{connectionClickStartHandle:o,connectionMode:u,connection:c}=l,{fromHandle:f,toHandle:g,isValid:d}=c,m=g?.nodeId===t&&g?.id===r&&g?.type===i;return{connectingFrom:f?.nodeId===t&&f?.id===r&&f?.type===i,connectingTo:m,clickConnecting:o?.nodeId===t&&o?.id===r&&o?.type===i,isPossibleEndHandle:u===gi.Strict?f?.type!==i:t!==f?.nodeId||r!==f?.id,connectionInProcess:!!f,clickConnectionInProcess:!!o,valid:m&&d}};function uz({type:t="source",position:r=pe.Top,isValidConnection:i,isConnectable:l=!0,isConnectableStart:o=!0,isConnectableEnd:u=!0,id:c,onConnect:f,children:g,className:d,onMouseDown:m,onTouchStart:p,...y},b){const S=c||null,N=t==="target",E=Fe(),C=kT(),{connectOnClick:A,noPanClassName:w,rfId:T}=Oe(oz,Ze),{connectingFrom:q,connectingTo:R,clickConnecting:M,isPossibleEndHandle:L,connectionInProcess:H,clickConnectionInProcess:Q,valid:B}=Oe(sz(C,S,t),Ze);C||E.getState().onError?.("010",Tn.error010());const F=K=>{const{defaultEdgeOptions:O,onConnect:G,hasDefaultEdges:X}=E.getState(),P={...O,...K};if(X){const{edges:oe,setEdges:z}=E.getState();z(fT(P,oe))}G?.(P),f?.(P)},W=K=>{if(!C)return;const O=oT(K.nativeEvent);if(o&&(O&&K.button===0||!O)){const G=E.getState();Up.onPointerDown(K.nativeEvent,{handleDomNode:K.currentTarget,autoPanOnConnect:G.autoPanOnConnect,connectionMode:G.connectionMode,connectionRadius:G.connectionRadius,domNode:G.domNode,nodeLookup:G.nodeLookup,lib:G.lib,isTarget:N,handleId:S,nodeId:C,flowId:G.rfId,panBy:G.panBy,cancelConnection:G.cancelConnection,onConnectStart:G.onConnectStart,onConnectEnd:G.onConnectEnd,updateConnection:G.updateConnection,onConnect:F,isValidConnection:i||G.isValidConnection,getTransform:()=>E.getState().transform,getFromHandle:()=>E.getState().connection.fromHandle,autoPanSpeed:G.autoPanSpeed,dragThreshold:G.connectionDragThreshold})}O?m?.(K):p?.(K)},D=K=>{const{onClickConnectStart:O,onClickConnectEnd:G,connectionClickStartHandle:X,connectionMode:P,isValidConnection:oe,lib:z,rfId:Y,nodeLookup:ae,connection:k}=E.getState();if(!C||!X&&!o)return;if(!X){O?.(K.nativeEvent,{nodeId:C,handleId:S,handleType:t}),E.setState({connectionClickStartHandle:{nodeId:C,type:t,id:S}});return}const V=iT(K.target),I=i||oe,{connection:ne,isValid:le}=Up.isValid(K.nativeEvent,{handle:{nodeId:C,id:S,type:t},connectionMode:P,fromNodeId:X.nodeId,fromHandleId:X.id||null,fromType:X.type,isValidConnection:I,flowId:Y,doc:V,lib:z,nodeLookup:ae});le&&ne&&F(ne);const fe=structuredClone(k);delete fe.inProgress,fe.toPosition=fe.toHandle?fe.toHandle.position:null,G?.(K,fe),E.setState({connectionClickStartHandle:null})};return x.jsx("div",{"data-handleid":S,"data-nodeid":C,"data-handlepos":r,"data-id":`${T}-${C}-${S}-${t}`,className:st(["react-flow__handle",`react-flow__handle-${r}`,"nodrag",w,d,{source:!N,target:N,connectable:l,connectablestart:o,connectableend:u,clickconnecting:M,connectingfrom:q,connectingto:R,valid:B,connectionindicator:l&&(!H||L)&&(H||Q?u:o)}]),onMouseDown:W,onTouchStart:W,onClick:A?D:void 0,ref:b,...y,children:g})}const xi=J.memo(qT(uz));function cz({data:t,isConnectable:r,sourcePosition:i=pe.Bottom}){return x.jsxs(x.Fragment,{children:[t?.label,x.jsx(xi,{type:"source",position:i,isConnectable:r})]})}function fz({data:t,isConnectable:r,targetPosition:i=pe.Top,sourcePosition:l=pe.Bottom}){return x.jsxs(x.Fragment,{children:[x.jsx(xi,{type:"target",position:i,isConnectable:r}),t?.label,x.jsx(xi,{type:"source",position:l,isConnectable:r})]})}function dz(){return null}function hz({data:t,isConnectable:r,targetPosition:i=pe.Top}){return x.jsxs(x.Fragment,{children:[x.jsx(xi,{type:"target",position:i,isConnectable:r}),t?.label]})}const Qs={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},w_={input:cz,default:fz,output:hz,group:dz};function gz(t){return t.internals.handleBounds===void 0?{width:t.width??t.initialWidth??t.style?.width,height:t.height??t.initialHeight??t.style?.height}:{width:t.width??t.style?.width,height:t.height??t.style?.height}}const vz=t=>{const{width:r,height:i,x:l,y:o}=Il(t.nodeLookup,{filter:u=>!!u.selected});return{width:gn(r)?r:null,height:gn(i)?i:null,userSelectionActive:t.userSelectionActive,transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]}) translate(${l}px,${o}px)`}};function mz({onSelectionContextMenu:t,noPanClassName:r,disableKeyboardA11y:i}){const l=Fe(),{width:o,height:u,transformString:c,userSelectionActive:f}=Oe(vz,Ze),g=DT(),d=J.useRef(null);if(J.useEffect(()=>{i||d.current?.focus({preventScroll:!0})},[i]),zT({nodeRef:d}),f||!o||!u)return null;const m=t?y=>{const b=l.getState().nodes.filter(S=>S.selected);t(y,b)}:void 0,p=y=>{Object.prototype.hasOwnProperty.call(Qs,y.key)&&(y.preventDefault(),g({direction:Qs[y.key],factor:y.shiftKey?4:1}))};return x.jsx("div",{className:st(["react-flow__nodesselection","react-flow__container",r]),style:{transform:c},children:x.jsx("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:m,tabIndex:i?void 0:-1,onKeyDown:i?void 0:p,style:{width:o,height:u}})})}const S_=typeof window<"u"?window:void 0,pz=t=>({nodesSelectionActive:t.nodesSelectionActive,userSelectionActive:t.userSelectionActive});function HT({children:t,onPaneClick:r,onPaneMouseEnter:i,onPaneMouseMove:l,onPaneMouseLeave:o,onPaneContextMenu:u,onPaneScroll:c,paneClickDistance:f,deleteKeyCode:g,selectionKeyCode:d,selectionOnDrag:m,selectionMode:p,onSelectionStart:y,onSelectionEnd:b,multiSelectionKeyCode:S,panActivationKeyCode:N,zoomActivationKeyCode:E,elementsSelectable:C,zoomOnScroll:A,zoomOnPinch:w,panOnScroll:T,panOnScrollSpeed:q,panOnScrollMode:R,zoomOnDoubleClick:M,panOnDrag:L,defaultViewport:H,translateExtent:Q,minZoom:B,maxZoom:F,preventScrolling:W,onSelectionContextMenu:D,noWheelClassName:K,noPanClassName:O,disableKeyboardA11y:G,onViewportChange:X,isControlledViewport:P}){const{nodesSelectionActive:oe,userSelectionActive:z}=Oe(pz,Ze),Y=Bl(d,{target:S_}),ae=Bl(N,{target:S_}),k=ae||L,V=ae||T,I=m&&k!==!0,ne=Y||z||I;return P5({deleteKeyCode:g,multiSelectionKeyCode:S}),x.jsx(ez,{onPaneContextMenu:u,elementsSelectable:C,zoomOnScroll:A,zoomOnPinch:w,panOnScroll:V,panOnScrollSpeed:q,panOnScrollMode:R,zoomOnDoubleClick:M,panOnDrag:!Y&&k,defaultViewport:H,translateExtent:Q,minZoom:B,maxZoom:F,zoomActivationKeyCode:E,preventScrolling:W,noWheelClassName:K,noPanClassName:O,onViewportChange:X,isControlledViewport:P,paneClickDistance:f,selectionOnDrag:I,children:x.jsxs(az,{onSelectionStart:y,onSelectionEnd:b,onPaneClick:r,onPaneMouseEnter:i,onPaneMouseMove:l,onPaneMouseLeave:o,onPaneContextMenu:u,onPaneScroll:c,panOnDrag:k,isSelecting:!!ne,selectionMode:p,selectionKeyPressed:Y,paneClickDistance:f,selectionOnDrag:I,children:[t,oe&&x.jsx(mz,{onSelectionContextMenu:D,noPanClassName:O,disableKeyboardA11y:G})]})})}HT.displayName="FlowRenderer";const yz=J.memo(HT),xz=t=>r=>t?Wp(r.nodeLookup,{x:0,y:0,width:r.width,height:r.height},r.transform,!0).map(i=>i.id):Array.from(r.nodeLookup.keys());function bz(t){return Oe(J.useCallback(xz(t),[t]),Ze)}const _z=t=>t.updateNodeInternals;function wz(){const t=Oe(_z),[r]=J.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(i=>{const l=new Map;i.forEach(o=>{const u=o.target.getAttribute("data-id");l.set(u,{id:u,nodeElement:o.target,force:!0})}),t(l)}));return J.useEffect(()=>()=>{r?.disconnect()},[r]),r}function Sz({node:t,nodeType:r,hasDimensions:i,resizeObserver:l}){const o=Fe(),u=J.useRef(null),c=J.useRef(null),f=J.useRef(t.sourcePosition),g=J.useRef(t.targetPosition),d=J.useRef(r),m=i&&!!t.internals.handleBounds;return J.useEffect(()=>{u.current&&!t.hidden&&(!m||c.current!==u.current)&&(c.current&&l?.unobserve(c.current),l?.observe(u.current),c.current=u.current)},[m,t.hidden]),J.useEffect(()=>()=>{c.current&&(l?.unobserve(c.current),c.current=null)},[]),J.useEffect(()=>{if(u.current){const p=d.current!==r,y=f.current!==t.sourcePosition,b=g.current!==t.targetPosition;(p||y||b)&&(d.current=r,f.current=t.sourcePosition,g.current=t.targetPosition,o.getState().updateNodeInternals(new Map([[t.id,{id:t.id,nodeElement:u.current,force:!0}]])))}},[t.id,r,t.sourcePosition,t.targetPosition]),u}function Ez({id:t,onClick:r,onMouseEnter:i,onMouseMove:l,onMouseLeave:o,onContextMenu:u,onDoubleClick:c,nodesDraggable:f,elementsSelectable:g,nodesConnectable:d,nodesFocusable:m,resizeObserver:p,noDragClassName:y,noPanClassName:b,disableKeyboardA11y:S,rfId:N,nodeTypes:E,nodeClickDistance:C,onError:A}){const{node:w,internals:T,isParent:q}=Oe(le=>{const fe=le.nodeLookup.get(t),he=le.parentLookup.has(t);return{node:fe,internals:fe.internals,isParent:he}},Ze);let R=w.type||"default",M=E?.[R]||w_[R];M===void 0&&(A?.("003",Tn.error003(R)),R="default",M=E?.default||w_.default);const L=!!(w.draggable||f&&typeof w.draggable>"u"),H=!!(w.selectable||g&&typeof w.selectable>"u"),Q=!!(w.connectable||d&&typeof w.connectable>"u"),B=!!(w.focusable||m&&typeof w.focusable>"u"),F=Fe(),W=rT(w),D=Sz({node:w,nodeType:R,hasDimensions:W,resizeObserver:p}),K=zT({nodeRef:D,disabled:w.hidden||!L,noDragClassName:y,handleSelector:w.dragHandle,nodeId:t,isSelectable:H,nodeClickDistance:C}),O=DT();if(w.hidden)return null;const G=rr(w),X=gz(w),P=H||L||r||i||l||o,oe=i?le=>i(le,{...T.userNode}):void 0,z=l?le=>l(le,{...T.userNode}):void 0,Y=o?le=>o(le,{...T.userNode}):void 0,ae=u?le=>u(le,{...T.userNode}):void 0,k=c?le=>c(le,{...T.userNode}):void 0,V=le=>{const{selectNodesOnDrag:fe,nodeDragThreshold:he}=F.getState();H&&(!fe||!L||he>0)&&Gp({id:t,store:F,nodeRef:D}),r&&r(le,{...T.userNode})},I=le=>{if(!(lT(le.nativeEvent)||S)){if(KC.includes(le.key)&&H){const fe=le.key==="Escape";Gp({id:t,store:F,unselect:fe,nodeRef:D})}else if(L&&w.selected&&Object.prototype.hasOwnProperty.call(Qs,le.key)){le.preventDefault();const{ariaLabelConfig:fe}=F.getState();F.setState({ariaLiveMessage:fe["node.a11yDescription.ariaLiveMessage"]({direction:le.key.replace("Arrow","").toLowerCase(),x:~~T.positionAbsolute.x,y:~~T.positionAbsolute.y})}),O({direction:Qs[le.key],factor:le.shiftKey?4:1})}}},ne=()=>{if(S||!D.current?.matches(":focus-visible"))return;const{transform:le,width:fe,height:he,autoPanOnNodeFocus:ye,setCenter:xe}=F.getState();if(!ye)return;Wp(new Map([[t,w]]),{x:0,y:0,width:fe,height:he},le,!0).length>0||xe(w.position.x+G.width/2,w.position.y+G.height/2,{zoom:le[2]})};return x.jsx("div",{className:st(["react-flow__node",`react-flow__node-${R}`,{[b]:L},w.className,{selected:w.selected,selectable:H,parent:q,draggable:L,dragging:K}]),ref:D,style:{zIndex:T.z,transform:`translate(${T.positionAbsolute.x}px,${T.positionAbsolute.y}px)`,pointerEvents:P?"all":"none",visibility:W?"visible":"hidden",...w.style,...X},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:oe,onMouseMove:z,onMouseLeave:Y,onContextMenu:ae,onClick:V,onDoubleClick:k,onKeyDown:B?I:void 0,tabIndex:B?0:void 0,onFocus:B?ne:void 0,role:w.ariaRole??(B?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${CT}-${N}`,"aria-label":w.ariaLabel,...w.domAttributes,children:x.jsx(lz,{value:t,children:x.jsx(M,{id:t,data:w.data,type:R,positionAbsoluteX:T.positionAbsolute.x,positionAbsoluteY:T.positionAbsolute.y,selected:w.selected??!1,selectable:H,draggable:L,deletable:w.deletable??!0,isConnectable:Q,sourcePosition:w.sourcePosition,targetPosition:w.targetPosition,dragging:K,dragHandle:w.dragHandle,zIndex:T.z,parentId:w.parentId,...G})})})}var Nz=J.memo(Ez);const Cz=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,onError:t.onError});function LT(t){const{nodesDraggable:r,nodesConnectable:i,nodesFocusable:l,elementsSelectable:o,onError:u}=Oe(Cz,Ze),c=bz(t.onlyRenderVisibleElements),f=wz();return x.jsx("div",{className:"react-flow__nodes",style:cu,children:c.map(g=>x.jsx(Nz,{id:g,nodeTypes:t.nodeTypes,nodeExtent:t.nodeExtent,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,rfId:t.rfId,disableKeyboardA11y:t.disableKeyboardA11y,resizeObserver:f,nodesDraggable:r,nodesConnectable:i,nodesFocusable:l,elementsSelectable:o,nodeClickDistance:t.nodeClickDistance,onError:u},g))})}LT.displayName="NodeRenderer";const Tz=J.memo(LT);function Az(t){return Oe(J.useCallback(i=>{if(!t)return i.edges.map(o=>o.id);const l=[];if(i.width&&i.height)for(const o of i.edges){const u=i.nodeLookup.get(o.source),c=i.nodeLookup.get(o.target);u&&c&&TO({sourceNode:u,targetNode:c,width:i.width,height:i.height,transform:i.transform})&&l.push(o.id)}return l},[t]),Ze)}const jz=({color:t="none",strokeWidth:r=1})=>{const i={strokeWidth:r,...t&&{stroke:t}};return x.jsx("polyline",{className:"arrow",style:i,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},Mz=({color:t="none",strokeWidth:r=1})=>{const i={strokeWidth:r,...t&&{stroke:t,fill:t}};return x.jsx("polyline",{className:"arrowclosed",style:i,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},E_={[Zs.Arrow]:jz,[Zs.ArrowClosed]:Mz};function Rz(t){const r=Fe();return J.useMemo(()=>Object.prototype.hasOwnProperty.call(E_,t)?E_[t]:(r.getState().onError?.("009",Tn.error009(t)),null),[t])}const qz=({id:t,type:r,color:i,width:l=12.5,height:o=12.5,markerUnits:u="strokeWidth",strokeWidth:c,orient:f="auto-start-reverse"})=>{const g=Rz(r);return g?x.jsx("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${l}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:u,orient:f,refX:"0",refY:"0",children:x.jsx(g,{color:i,strokeWidth:c})}):null},BT=({defaultColor:t,rfId:r})=>{const i=Oe(u=>u.edges),l=Oe(u=>u.defaultEdgeOptions),o=J.useMemo(()=>zO(i,{id:r,defaultColor:t,defaultMarkerStart:l?.markerStart,defaultMarkerEnd:l?.markerEnd}),[i,l,r,t]);return o.length?x.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:x.jsx("defs",{children:o.map(u=>x.jsx(qz,{id:u.id,type:u.type,color:u.color,width:u.width,height:u.height,markerUnits:u.markerUnits,strokeWidth:u.strokeWidth,orient:u.orient},u.id))})}):null};BT.displayName="MarkerDefinitions";var Oz=J.memo(BT);function UT({x:t,y:r,label:i,labelStyle:l,labelShowBg:o=!0,labelBgStyle:u,labelBgPadding:c=[2,4],labelBgBorderRadius:f=2,children:g,className:d,...m}){const[p,y]=J.useState({x:1,y:0,width:0,height:0}),b=st(["react-flow__edge-textwrapper",d]),S=J.useRef(null);return J.useEffect(()=>{if(S.current){const N=S.current.getBBox();y({x:N.x,y:N.y,width:N.width,height:N.height})}},[i]),i?x.jsxs("g",{transform:`translate(${t-p.width/2} ${r-p.height/2})`,className:b,visibility:p.width?"visible":"hidden",...m,children:[o&&x.jsx("rect",{width:p.width+2*c[0],x:-c[0],y:-c[1],height:p.height+2*c[1],className:"react-flow__edge-textbg",style:u,rx:f,ry:f}),x.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:S,style:l,children:i}),g]}):null}UT.displayName="EdgeText";const zz=J.memo(UT);function fu({path:t,labelX:r,labelY:i,label:l,labelStyle:o,labelShowBg:u,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:g,interactionWidth:d=20,...m}){return x.jsxs(x.Fragment,{children:[x.jsx("path",{...m,d:t,fill:"none",className:st(["react-flow__edge-path",m.className])}),d?x.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}):null,l&&gn(r)&&gn(i)?x.jsx(zz,{x:r,y:i,label:l,labelStyle:o,labelShowBg:u,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:g}):null]})}function N_({pos:t,x1:r,y1:i,x2:l,y2:o}){return t===pe.Left||t===pe.Right?[.5*(r+l),i]:[r,.5*(i+o)]}function GT({sourceX:t,sourceY:r,sourcePosition:i=pe.Bottom,targetX:l,targetY:o,targetPosition:u=pe.Top}){const[c,f]=N_({pos:i,x1:t,y1:r,x2:l,y2:o}),[g,d]=N_({pos:u,x1:l,y1:o,x2:t,y2:r}),[m,p,y,b]=sT({sourceX:t,sourceY:r,targetX:l,targetY:o,sourceControlX:c,sourceControlY:f,targetControlX:g,targetControlY:d});return[`M${t},${r} C${c},${f} ${g},${d} ${l},${o}`,m,p,y,b]}function VT(t){return J.memo(({id:r,sourceX:i,sourceY:l,targetX:o,targetY:u,sourcePosition:c,targetPosition:f,label:g,labelStyle:d,labelShowBg:m,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:b,style:S,markerEnd:N,markerStart:E,interactionWidth:C})=>{const[A,w,T]=GT({sourceX:i,sourceY:l,sourcePosition:c,targetX:o,targetY:u,targetPosition:f}),q=t.isInternal?void 0:r;return x.jsx(fu,{id:q,path:A,labelX:w,labelY:T,label:g,labelStyle:d,labelShowBg:m,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:b,style:S,markerEnd:N,markerStart:E,interactionWidth:C})})}const Dz=VT({isInternal:!1}),YT=VT({isInternal:!0});Dz.displayName="SimpleBezierEdge";YT.displayName="SimpleBezierEdgeInternal";function IT(t){return J.memo(({id:r,sourceX:i,sourceY:l,targetX:o,targetY:u,label:c,labelStyle:f,labelShowBg:g,labelBgStyle:d,labelBgPadding:m,labelBgBorderRadius:p,style:y,sourcePosition:b=pe.Bottom,targetPosition:S=pe.Top,markerEnd:N,markerStart:E,pathOptions:C,interactionWidth:A})=>{const[w,T,q]=Hp({sourceX:i,sourceY:l,sourcePosition:b,targetX:o,targetY:u,targetPosition:S,borderRadius:C?.borderRadius,offset:C?.offset,stepPosition:C?.stepPosition}),R=t.isInternal?void 0:r;return x.jsx(fu,{id:R,path:w,labelX:T,labelY:q,label:c,labelStyle:f,labelShowBg:g,labelBgStyle:d,labelBgPadding:m,labelBgBorderRadius:p,style:y,markerEnd:N,markerStart:E,interactionWidth:A})})}const XT=IT({isInternal:!1}),ZT=IT({isInternal:!0});XT.displayName="SmoothStepEdge";ZT.displayName="SmoothStepEdgeInternal";function FT(t){return J.memo(({id:r,...i})=>{const l=t.isInternal?void 0:r;return x.jsx(XT,{...i,id:l,pathOptions:J.useMemo(()=>({borderRadius:0,offset:i.pathOptions?.offset}),[i.pathOptions?.offset])})})}const kz=FT({isInternal:!1}),KT=FT({isInternal:!0});kz.displayName="StepEdge";KT.displayName="StepEdgeInternal";function QT(t){return J.memo(({id:r,sourceX:i,sourceY:l,targetX:o,targetY:u,label:c,labelStyle:f,labelShowBg:g,labelBgStyle:d,labelBgPadding:m,labelBgBorderRadius:p,style:y,markerEnd:b,markerStart:S,interactionWidth:N})=>{const[E,C,A]=dT({sourceX:i,sourceY:l,targetX:o,targetY:u}),w=t.isInternal?void 0:r;return x.jsx(fu,{id:w,path:E,labelX:C,labelY:A,label:c,labelStyle:f,labelShowBg:g,labelBgStyle:d,labelBgPadding:m,labelBgBorderRadius:p,style:y,markerEnd:b,markerStart:S,interactionWidth:N})})}const Hz=QT({isInternal:!1}),$T=QT({isInternal:!0});Hz.displayName="StraightEdge";$T.displayName="StraightEdgeInternal";function PT(t){return J.memo(({id:r,sourceX:i,sourceY:l,targetX:o,targetY:u,sourcePosition:c=pe.Bottom,targetPosition:f=pe.Top,label:g,labelStyle:d,labelShowBg:m,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:b,style:S,markerEnd:N,markerStart:E,pathOptions:C,interactionWidth:A})=>{const[w,T,q]=uT({sourceX:i,sourceY:l,sourcePosition:c,targetX:o,targetY:u,targetPosition:f,curvature:C?.curvature}),R=t.isInternal?void 0:r;return x.jsx(fu,{id:R,path:w,labelX:T,labelY:q,label:g,labelStyle:d,labelShowBg:m,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:b,style:S,markerEnd:N,markerStart:E,interactionWidth:A})})}const Lz=PT({isInternal:!1}),JT=PT({isInternal:!0});Lz.displayName="BezierEdge";JT.displayName="BezierEdgeInternal";const C_={default:JT,straight:$T,step:KT,smoothstep:ZT,simplebezier:YT},T_={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},Bz=(t,r,i)=>i===pe.Left?t-r:i===pe.Right?t+r:t,Uz=(t,r,i)=>i===pe.Top?t-r:i===pe.Bottom?t+r:t,A_="react-flow__edgeupdater";function j_({position:t,centerX:r,centerY:i,radius:l=10,onMouseDown:o,onMouseEnter:u,onMouseOut:c,type:f}){return x.jsx("circle",{onMouseDown:o,onMouseEnter:u,onMouseOut:c,className:st([A_,`${A_}-${f}`]),cx:Bz(r,l,t),cy:Uz(i,l,t),r:l,stroke:"transparent",fill:"transparent"})}function Gz({isReconnectable:t,reconnectRadius:r,edge:i,sourceX:l,sourceY:o,targetX:u,targetY:c,sourcePosition:f,targetPosition:g,onReconnect:d,onReconnectStart:m,onReconnectEnd:p,setReconnecting:y,setUpdateHover:b}){const S=Fe(),N=(T,q)=>{if(T.button!==0)return;const{autoPanOnConnect:R,domNode:M,isValidConnection:L,connectionMode:H,connectionRadius:Q,lib:B,onConnectStart:F,onConnectEnd:W,cancelConnection:D,nodeLookup:K,rfId:O,panBy:G,updateConnection:X}=S.getState(),P=q.type==="target",oe=(ae,k)=>{y(!1),p?.(ae,i,q.type,k)},z=ae=>d?.(i,ae),Y=(ae,k)=>{y(!0),m?.(T,i,q.type),F?.(ae,k)};Up.onPointerDown(T.nativeEvent,{autoPanOnConnect:R,connectionMode:H,connectionRadius:Q,domNode:M,handleId:q.id,nodeId:q.nodeId,nodeLookup:K,isTarget:P,edgeUpdaterType:q.type,lib:B,flowId:O,cancelConnection:D,panBy:G,isValidConnection:L,onConnect:z,onConnectStart:Y,onConnectEnd:W,onReconnectEnd:oe,updateConnection:X,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,dragThreshold:S.getState().connectionDragThreshold,handleDomNode:T.currentTarget})},E=T=>N(T,{nodeId:i.target,id:i.targetHandle??null,type:"target"}),C=T=>N(T,{nodeId:i.source,id:i.sourceHandle??null,type:"source"}),A=()=>b(!0),w=()=>b(!1);return x.jsxs(x.Fragment,{children:[(t===!0||t==="source")&&x.jsx(j_,{position:f,centerX:l,centerY:o,radius:r,onMouseDown:E,onMouseEnter:A,onMouseOut:w,type:"source"}),(t===!0||t==="target")&&x.jsx(j_,{position:g,centerX:u,centerY:c,radius:r,onMouseDown:C,onMouseEnter:A,onMouseOut:w,type:"target"})]})}function Vz({id:t,edgesFocusable:r,edgesReconnectable:i,elementsSelectable:l,onClick:o,onDoubleClick:u,onContextMenu:c,onMouseEnter:f,onMouseMove:g,onMouseLeave:d,reconnectRadius:m,onReconnect:p,onReconnectStart:y,onReconnectEnd:b,rfId:S,edgeTypes:N,noPanClassName:E,onError:C,disableKeyboardA11y:A}){let w=Oe(xe=>xe.edgeLookup.get(t));const T=Oe(xe=>xe.defaultEdgeOptions);w=T?{...T,...w}:w;let q=w.type||"default",R=N?.[q]||C_[q];R===void 0&&(C?.("011",Tn.error011(q)),q="default",R=N?.default||C_.default);const M=!!(w.focusable||r&&typeof w.focusable>"u"),L=typeof p<"u"&&(w.reconnectable||i&&typeof w.reconnectable>"u"),H=!!(w.selectable||l&&typeof w.selectable>"u"),Q=J.useRef(null),[B,F]=J.useState(!1),[W,D]=J.useState(!1),K=Fe(),{zIndex:O,sourceX:G,sourceY:X,targetX:P,targetY:oe,sourcePosition:z,targetPosition:Y}=Oe(J.useCallback(xe=>{const ge=xe.nodeLookup.get(w.source),_e=xe.nodeLookup.get(w.target);if(!ge||!_e)return{zIndex:w.zIndex,...T_};const ve=OO({id:t,sourceNode:ge,targetNode:_e,sourceHandle:w.sourceHandle||null,targetHandle:w.targetHandle||null,connectionMode:xe.connectionMode,onError:C});return{zIndex:CO({selected:w.selected,zIndex:w.zIndex,sourceNode:ge,targetNode:_e,elevateOnSelect:xe.elevateEdgesOnSelect,zIndexMode:xe.zIndexMode}),...ve||T_}},[w.source,w.target,w.sourceHandle,w.targetHandle,w.selected,w.zIndex]),Ze),ae=J.useMemo(()=>w.markerStart?`url('#${Lp(w.markerStart,S)}')`:void 0,[w.markerStart,S]),k=J.useMemo(()=>w.markerEnd?`url('#${Lp(w.markerEnd,S)}')`:void 0,[w.markerEnd,S]);if(w.hidden||G===null||X===null||P===null||oe===null)return null;const V=xe=>{const{addSelectedEdges:ge,unselectNodesAndEdges:_e,multiSelectionActive:ve}=K.getState();H&&(K.setState({nodesSelectionActive:!1}),w.selected&&ve?(_e({nodes:[],edges:[w]}),Q.current?.blur()):ge([t])),o&&o(xe,w)},I=u?xe=>{u(xe,{...w})}:void 0,ne=c?xe=>{c(xe,{...w})}:void 0,le=f?xe=>{f(xe,{...w})}:void 0,fe=g?xe=>{g(xe,{...w})}:void 0,he=d?xe=>{d(xe,{...w})}:void 0,ye=xe=>{if(!A&&KC.includes(xe.key)&&H){const{unselectNodesAndEdges:ge,addSelectedEdges:_e}=K.getState();xe.key==="Escape"?(Q.current?.blur(),ge({edges:[w]})):_e([t])}};return x.jsx("svg",{style:{zIndex:O},children:x.jsxs("g",{className:st(["react-flow__edge",`react-flow__edge-${q}`,w.className,E,{selected:w.selected,animated:w.animated,inactive:!H&&!o,updating:B,selectable:H}]),onClick:V,onDoubleClick:I,onContextMenu:ne,onMouseEnter:le,onMouseMove:fe,onMouseLeave:he,onKeyDown:M?ye:void 0,tabIndex:M?0:void 0,role:w.ariaRole??(M?"group":"img"),"aria-roledescription":"edge","data-id":t,"data-testid":`rf__edge-${t}`,"aria-label":w.ariaLabel===null?void 0:w.ariaLabel||`Edge from ${w.source} to ${w.target}`,"aria-describedby":M?`${TT}-${S}`:void 0,ref:Q,...w.domAttributes,children:[!W&&x.jsx(R,{id:t,source:w.source,target:w.target,type:w.type,selected:w.selected,animated:w.animated,selectable:H,deletable:w.deletable??!0,label:w.label,labelStyle:w.labelStyle,labelShowBg:w.labelShowBg,labelBgStyle:w.labelBgStyle,labelBgPadding:w.labelBgPadding,labelBgBorderRadius:w.labelBgBorderRadius,sourceX:G,sourceY:X,targetX:P,targetY:oe,sourcePosition:z,targetPosition:Y,data:w.data,style:w.style,sourceHandleId:w.sourceHandle,targetHandleId:w.targetHandle,markerStart:ae,markerEnd:k,pathOptions:"pathOptions"in w?w.pathOptions:void 0,interactionWidth:w.interactionWidth}),L&&x.jsx(Gz,{edge:w,isReconnectable:L,reconnectRadius:m,onReconnect:p,onReconnectStart:y,onReconnectEnd:b,sourceX:G,sourceY:X,targetX:P,targetY:oe,sourcePosition:z,targetPosition:Y,setUpdateHover:F,setReconnecting:D})]})})}var Yz=J.memo(Vz);const Iz=t=>({edgesFocusable:t.edgesFocusable,edgesReconnectable:t.edgesReconnectable,elementsSelectable:t.elementsSelectable,connectionMode:t.connectionMode,onError:t.onError});function WT({defaultMarkerColor:t,onlyRenderVisibleElements:r,rfId:i,edgeTypes:l,noPanClassName:o,onReconnect:u,onEdgeContextMenu:c,onEdgeMouseEnter:f,onEdgeMouseMove:g,onEdgeMouseLeave:d,onEdgeClick:m,reconnectRadius:p,onEdgeDoubleClick:y,onReconnectStart:b,onReconnectEnd:S,disableKeyboardA11y:N}){const{edgesFocusable:E,edgesReconnectable:C,elementsSelectable:A,onError:w}=Oe(Iz,Ze),T=Az(r);return x.jsxs("div",{className:"react-flow__edges",children:[x.jsx(Oz,{defaultColor:t,rfId:i}),T.map(q=>x.jsx(Yz,{id:q,edgesFocusable:E,edgesReconnectable:C,elementsSelectable:A,noPanClassName:o,onReconnect:u,onContextMenu:c,onMouseEnter:f,onMouseMove:g,onMouseLeave:d,onClick:m,reconnectRadius:p,onDoubleClick:y,onReconnectStart:b,onReconnectEnd:S,rfId:i,onError:w,edgeTypes:l,disableKeyboardA11y:N},q))]})}WT.displayName="EdgeRenderer";const Xz=J.memo(WT),Zz=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function Fz({children:t}){const r=Oe(Zz);return x.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:r},children:t})}function Kz(t){const r=oy(),i=J.useRef(!1);J.useEffect(()=>{!i.current&&r.viewportInitialized&&t&&(setTimeout(()=>t(r),1),i.current=!0)},[t,r.viewportInitialized])}const Qz=t=>t.panZoom?.syncViewport;function $z(t){const r=Oe(Qz),i=Fe();return J.useEffect(()=>{t&&(r?.(t),i.setState({transform:[t.x,t.y,t.zoom]}))},[t,r]),null}function Pz(t){return t.connection.inProgress?{...t.connection,to:Zl(t.connection.to,t.transform)}:{...t.connection}}function Jz(t){return Pz}function Wz(t){const r=Jz();return Oe(r,Ze)}const eD=t=>({nodesConnectable:t.nodesConnectable,isValid:t.connection.isValid,inProgress:t.connection.inProgress,width:t.width,height:t.height});function tD({containerStyle:t,style:r,type:i,component:l}){const{nodesConnectable:o,width:u,height:c,isValid:f,inProgress:g}=Oe(eD,Ze);return!(u&&o&&g)?null:x.jsx("svg",{style:t,width:u,height:c,className:"react-flow__connectionline react-flow__container",children:x.jsx("g",{className:st(["react-flow__connection",PC(f)]),children:x.jsx(eA,{style:r,type:i,CustomComponent:l,isValid:f})})})}const eA=({style:t,type:r=Hr.Bezier,CustomComponent:i,isValid:l})=>{const{inProgress:o,from:u,fromNode:c,fromHandle:f,fromPosition:g,to:d,toNode:m,toHandle:p,toPosition:y,pointer:b}=Wz();if(!o)return;if(i)return x.jsx(i,{connectionLineType:r,connectionLineStyle:t,fromNode:c,fromHandle:f,fromX:u.x,fromY:u.y,toX:d.x,toY:d.y,fromPosition:g,toPosition:y,connectionStatus:PC(l),toNode:m,toHandle:p,pointer:b});let S="";const N={sourceX:u.x,sourceY:u.y,sourcePosition:g,targetX:d.x,targetY:d.y,targetPosition:y};switch(r){case Hr.Bezier:[S]=uT(N);break;case Hr.SimpleBezier:[S]=GT(N);break;case Hr.Step:[S]=Hp({...N,borderRadius:0});break;case Hr.SmoothStep:[S]=Hp(N);break;default:[S]=dT(N)}return x.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:t})};eA.displayName="ConnectionLine";const nD={};function M_(t=nD){J.useRef(t),Fe(),J.useEffect(()=>{},[t])}function rD(){Fe(),J.useRef(!1),J.useEffect(()=>{},[])}function tA({nodeTypes:t,edgeTypes:r,onInit:i,onNodeClick:l,onEdgeClick:o,onNodeDoubleClick:u,onEdgeDoubleClick:c,onNodeMouseEnter:f,onNodeMouseMove:g,onNodeMouseLeave:d,onNodeContextMenu:m,onSelectionContextMenu:p,onSelectionStart:y,onSelectionEnd:b,connectionLineType:S,connectionLineStyle:N,connectionLineComponent:E,connectionLineContainerStyle:C,selectionKeyCode:A,selectionOnDrag:w,selectionMode:T,multiSelectionKeyCode:q,panActivationKeyCode:R,zoomActivationKeyCode:M,deleteKeyCode:L,onlyRenderVisibleElements:H,elementsSelectable:Q,defaultViewport:B,translateExtent:F,minZoom:W,maxZoom:D,preventScrolling:K,defaultMarkerColor:O,zoomOnScroll:G,zoomOnPinch:X,panOnScroll:P,panOnScrollSpeed:oe,panOnScrollMode:z,zoomOnDoubleClick:Y,panOnDrag:ae,onPaneClick:k,onPaneMouseEnter:V,onPaneMouseMove:I,onPaneMouseLeave:ne,onPaneScroll:le,onPaneContextMenu:fe,paneClickDistance:he,nodeClickDistance:ye,onEdgeContextMenu:xe,onEdgeMouseEnter:ge,onEdgeMouseMove:_e,onEdgeMouseLeave:ve,reconnectRadius:Te,onReconnect:we,onReconnectStart:dt,onReconnectEnd:nt,noDragClassName:Ht,noWheelClassName:Et,noPanClassName:yt,disableKeyboardA11y:$e,nodeExtent:Pe,rfId:an,viewport:ln,onViewportChange:on}){return M_(t),M_(r),rD(),Kz(i),$z(ln),x.jsx(yz,{onPaneClick:k,onPaneMouseEnter:V,onPaneMouseMove:I,onPaneMouseLeave:ne,onPaneContextMenu:fe,onPaneScroll:le,paneClickDistance:he,deleteKeyCode:L,selectionKeyCode:A,selectionOnDrag:w,selectionMode:T,onSelectionStart:y,onSelectionEnd:b,multiSelectionKeyCode:q,panActivationKeyCode:R,zoomActivationKeyCode:M,elementsSelectable:Q,zoomOnScroll:G,zoomOnPinch:X,zoomOnDoubleClick:Y,panOnScroll:P,panOnScrollSpeed:oe,panOnScrollMode:z,panOnDrag:ae,defaultViewport:B,translateExtent:F,minZoom:W,maxZoom:D,onSelectionContextMenu:p,preventScrolling:K,noDragClassName:Ht,noWheelClassName:Et,noPanClassName:yt,disableKeyboardA11y:$e,onViewportChange:on,isControlledViewport:!!ln,children:x.jsxs(Fz,{children:[x.jsx(Xz,{edgeTypes:r,onEdgeClick:o,onEdgeDoubleClick:c,onReconnect:we,onReconnectStart:dt,onReconnectEnd:nt,onlyRenderVisibleElements:H,onEdgeContextMenu:xe,onEdgeMouseEnter:ge,onEdgeMouseMove:_e,onEdgeMouseLeave:ve,reconnectRadius:Te,defaultMarkerColor:O,noPanClassName:yt,disableKeyboardA11y:$e,rfId:an}),x.jsx(tD,{style:N,type:S,component:E,containerStyle:C}),x.jsx("div",{className:"react-flow__edgelabel-renderer"}),x.jsx(Tz,{nodeTypes:t,onNodeClick:l,onNodeDoubleClick:u,onNodeMouseEnter:f,onNodeMouseMove:g,onNodeMouseLeave:d,onNodeContextMenu:m,nodeClickDistance:ye,onlyRenderVisibleElements:H,noPanClassName:yt,noDragClassName:Ht,disableKeyboardA11y:$e,nodeExtent:Pe,rfId:an}),x.jsx("div",{className:"react-flow__viewport-portal"})]})})}tA.displayName="GraphView";const aD=J.memo(tA),R_=({nodes:t,edges:r,defaultNodes:i,defaultEdges:l,width:o,height:u,fitView:c,fitViewOptions:f,minZoom:g=.5,maxZoom:d=2,nodeOrigin:m,nodeExtent:p,zIndexMode:y="basic"}={})=>{const b=new Map,S=new Map,N=new Map,E=new Map,C=l??r??[],A=i??t??[],w=m??[0,0],T=p??Dl;vT(N,E,C);const q=Bp(A,b,S,{nodeOrigin:w,nodeExtent:T,zIndexMode:y});let R=[0,0,1];if(c&&o&&u){const M=Il(b,{filter:B=>!!((B.width||B.initialWidth)&&(B.height||B.initialHeight))}),{x:L,y:H,zoom:Q}=ey(M,o,u,g,d,f?.padding??.1);R=[L,H,Q]}return{rfId:"1",width:o??0,height:u??0,transform:R,nodes:A,nodesInitialized:q,nodeLookup:b,parentLookup:S,edges:C,edgeLookup:E,connectionLookup:N,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:i!==void 0,hasDefaultEdges:l!==void 0,panZoom:null,minZoom:g,maxZoom:d,translateExtent:Dl,nodeExtent:T,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:gi.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:w,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:c??!1,fitViewOptions:f,fitViewResolver:null,connection:{...$C},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:bO,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:QC,zIndexMode:y,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},iD=({nodes:t,edges:r,defaultNodes:i,defaultEdges:l,width:o,height:u,fitView:c,fitViewOptions:f,minZoom:g,maxZoom:d,nodeOrigin:m,nodeExtent:p,zIndexMode:y})=>S5((b,S)=>{async function N(){const{nodeLookup:E,panZoom:C,fitViewOptions:A,fitViewResolver:w,width:T,height:q,minZoom:R,maxZoom:M}=S();C&&(await yO({nodes:E,width:T,height:q,panZoom:C,minZoom:R,maxZoom:M},A),w?.resolve(!0),b({fitViewResolver:null}))}return{...R_({nodes:t,edges:r,width:o,height:u,fitView:c,fitViewOptions:f,minZoom:g,maxZoom:d,nodeOrigin:m,nodeExtent:p,defaultNodes:i,defaultEdges:l,zIndexMode:y}),setNodes:E=>{const{nodeLookup:C,parentLookup:A,nodeOrigin:w,elevateNodesOnSelect:T,fitViewQueued:q,zIndexMode:R}=S(),M=Bp(E,C,A,{nodeOrigin:w,nodeExtent:p,elevateNodesOnSelect:T,checkEquality:!0,zIndexMode:R});q&&M?(N(),b({nodes:E,nodesInitialized:M,fitViewQueued:!1,fitViewOptions:void 0})):b({nodes:E,nodesInitialized:M})},setEdges:E=>{const{connectionLookup:C,edgeLookup:A}=S();vT(C,A,E),b({edges:E})},setDefaultNodesAndEdges:(E,C)=>{if(E){const{setNodes:A}=S();A(E),b({hasDefaultNodes:!0})}if(C){const{setEdges:A}=S();A(C),b({hasDefaultEdges:!0})}},updateNodeInternals:E=>{const{triggerNodeChanges:C,nodeLookup:A,parentLookup:w,domNode:T,nodeOrigin:q,nodeExtent:R,debug:M,fitViewQueued:L,zIndexMode:H}=S(),{changes:Q,updatedInternals:B}=GO(E,A,w,T,q,R,H);B&&(HO(A,w,{nodeOrigin:q,nodeExtent:R,zIndexMode:H}),L?(N(),b({fitViewQueued:!1,fitViewOptions:void 0})):b({}),Q?.length>0&&(M&&console.log("React Flow: trigger node changes",Q),C?.(Q)))},updateNodePositions:(E,C=!1)=>{const A=[];let w=[];const{nodeLookup:T,triggerNodeChanges:q,connection:R,updateConnection:M,onNodesChangeMiddlewareMap:L}=S();for(const[H,Q]of E){const B=T.get(H),F=!!(B?.expandParent&&B?.parentId&&Q?.position),W={id:H,type:"position",position:F?{x:Math.max(0,Q.position.x),y:Math.max(0,Q.position.y)}:Q.position,dragging:C};if(B&&R.inProgress&&R.fromNode.id===B.id){const D=ga(B,R.fromHandle,pe.Left,!0);M({...R,from:D})}F&&B.parentId&&A.push({id:H,parentId:B.parentId,rect:{...Q.internals.positionAbsolute,width:Q.measured.width??0,height:Q.measured.height??0}}),w.push(W)}if(A.length>0){const{parentLookup:H,nodeOrigin:Q}=S(),B=ly(A,T,H,Q);w.push(...B)}for(const H of L.values())w=H(w);q(w)},triggerNodeChanges:E=>{const{onNodesChange:C,setNodes:A,nodes:w,hasDefaultNodes:T,debug:q}=S();if(E?.length){if(T){const R=MT(E,w);A(R)}q&&console.log("React Flow: trigger node changes",E),C?.(E)}},triggerEdgeChanges:E=>{const{onEdgesChange:C,setEdges:A,edges:w,hasDefaultEdges:T,debug:q}=S();if(E?.length){if(T){const R=RT(E,w);A(R)}q&&console.log("React Flow: trigger edge changes",E),C?.(E)}},addSelectedNodes:E=>{const{multiSelectionActive:C,edgeLookup:A,nodeLookup:w,triggerNodeChanges:T,triggerEdgeChanges:q}=S();if(C){const R=E.map(M=>oa(M,!0));T(R);return}T(ui(w,new Set([...E]),!0)),q(ui(A))},addSelectedEdges:E=>{const{multiSelectionActive:C,edgeLookup:A,nodeLookup:w,triggerNodeChanges:T,triggerEdgeChanges:q}=S();if(C){const R=E.map(M=>oa(M,!0));q(R);return}q(ui(A,new Set([...E]))),T(ui(w,new Set,!0))},unselectNodesAndEdges:({nodes:E,edges:C}={})=>{const{edges:A,nodes:w,nodeLookup:T,triggerNodeChanges:q,triggerEdgeChanges:R}=S(),M=E||w,L=C||A,H=M.map(B=>{const F=T.get(B.id);return F&&(F.selected=!1),oa(B.id,!1)}),Q=L.map(B=>oa(B.id,!1));q(H),R(Q)},setMinZoom:E=>{const{panZoom:C,maxZoom:A}=S();C?.setScaleExtent([E,A]),b({minZoom:E})},setMaxZoom:E=>{const{panZoom:C,minZoom:A}=S();C?.setScaleExtent([A,E]),b({maxZoom:E})},setTranslateExtent:E=>{S().panZoom?.setTranslateExtent(E),b({translateExtent:E})},resetSelectedElements:()=>{const{edges:E,nodes:C,triggerNodeChanges:A,triggerEdgeChanges:w,elementsSelectable:T}=S();if(!T)return;const q=C.reduce((M,L)=>L.selected?[...M,oa(L.id,!1)]:M,[]),R=E.reduce((M,L)=>L.selected?[...M,oa(L.id,!1)]:M,[]);A(q),w(R)},setNodeExtent:E=>{const{nodes:C,nodeLookup:A,parentLookup:w,nodeOrigin:T,elevateNodesOnSelect:q,nodeExtent:R,zIndexMode:M}=S();E[0][0]===R[0][0]&&E[0][1]===R[0][1]&&E[1][0]===R[1][0]&&E[1][1]===R[1][1]||(Bp(C,A,w,{nodeOrigin:T,nodeExtent:E,elevateNodesOnSelect:q,checkEquality:!1,zIndexMode:M}),b({nodeExtent:E}))},panBy:E=>{const{transform:C,width:A,height:w,panZoom:T,translateExtent:q}=S();return VO({delta:E,panZoom:T,transform:C,translateExtent:q,width:A,height:w})},setCenter:async(E,C,A)=>{const{width:w,height:T,maxZoom:q,panZoom:R}=S();if(!R)return Promise.resolve(!1);const M=typeof A?.zoom<"u"?A.zoom:q;return await R.setViewport({x:w/2-E*M,y:T/2-C*M,zoom:M},{duration:A?.duration,ease:A?.ease,interpolate:A?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{b({connection:{...$C}})},updateConnection:E=>{b({connection:E})},reset:()=>b({...R_()})}},Object.is);function lD({initialNodes:t,initialEdges:r,defaultNodes:i,defaultEdges:l,initialWidth:o,initialHeight:u,initialMinZoom:c,initialMaxZoom:f,initialFitViewOptions:g,fitView:d,nodeOrigin:m,nodeExtent:p,zIndexMode:y,children:b}){const[S]=J.useState(()=>iD({nodes:t,edges:r,defaultNodes:i,defaultEdges:l,width:o,height:u,fitView:d,minZoom:c,maxZoom:f,fitViewOptions:g,nodeOrigin:m,nodeExtent:p,zIndexMode:y}));return x.jsx(E5,{value:S,children:x.jsx(F5,{children:b})})}function oD({children:t,nodes:r,edges:i,defaultNodes:l,defaultEdges:o,width:u,height:c,fitView:f,fitViewOptions:g,minZoom:d,maxZoom:m,nodeOrigin:p,nodeExtent:y,zIndexMode:b}){return J.useContext(su)?x.jsx(x.Fragment,{children:t}):x.jsx(lD,{initialNodes:r,initialEdges:i,defaultNodes:l,defaultEdges:o,initialWidth:u,initialHeight:c,fitView:f,initialFitViewOptions:g,initialMinZoom:d,initialMaxZoom:m,nodeOrigin:p,nodeExtent:y,zIndexMode:b,children:t})}const sD={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function uD({nodes:t,edges:r,defaultNodes:i,defaultEdges:l,className:o,nodeTypes:u,edgeTypes:c,onNodeClick:f,onEdgeClick:g,onInit:d,onMove:m,onMoveStart:p,onMoveEnd:y,onConnect:b,onConnectStart:S,onConnectEnd:N,onClickConnectStart:E,onClickConnectEnd:C,onNodeMouseEnter:A,onNodeMouseMove:w,onNodeMouseLeave:T,onNodeContextMenu:q,onNodeDoubleClick:R,onNodeDragStart:M,onNodeDrag:L,onNodeDragStop:H,onNodesDelete:Q,onEdgesDelete:B,onDelete:F,onSelectionChange:W,onSelectionDragStart:D,onSelectionDrag:K,onSelectionDragStop:O,onSelectionContextMenu:G,onSelectionStart:X,onSelectionEnd:P,onBeforeDelete:oe,connectionMode:z,connectionLineType:Y=Hr.Bezier,connectionLineStyle:ae,connectionLineComponent:k,connectionLineContainerStyle:V,deleteKeyCode:I="Backspace",selectionKeyCode:ne="Shift",selectionOnDrag:le=!1,selectionMode:fe=kl.Full,panActivationKeyCode:he="Space",multiSelectionKeyCode:ye=Ll()?"Meta":"Control",zoomActivationKeyCode:xe=Ll()?"Meta":"Control",snapToGrid:ge,snapGrid:_e,onlyRenderVisibleElements:ve=!1,selectNodesOnDrag:Te,nodesDraggable:we,autoPanOnNodeFocus:dt,nodesConnectable:nt,nodesFocusable:Ht,nodeOrigin:Et=AT,edgesFocusable:yt,edgesReconnectable:$e,elementsSelectable:Pe=!0,defaultViewport:an=H5,minZoom:ln=.5,maxZoom:on=2,translateExtent:Nt=Dl,preventScrolling:xa=!0,nodeExtent:Mn,defaultMarkerColor:Ni="#b1b1b7",zoomOnScroll:ba=!0,zoomOnPinch:xt=!0,panOnScroll:Qe=!1,panOnScrollSpeed:xn=.5,panOnScrollMode:wt=ca.Free,zoomOnDoubleClick:Mu=!0,panOnDrag:Ru=!0,onPaneClick:qu,onPaneMouseEnter:_a,onPaneMouseMove:wa,onPaneMouseLeave:Sa,onPaneScroll:Rn,onPaneContextMenu:Ea,paneClickDistance:Ur=1,nodeClickDistance:Ou=0,children:Jl,onReconnect:Ci,onReconnectStart:Gr,onReconnectEnd:zu,onEdgeContextMenu:Wl,onEdgeDoubleClick:eo,onEdgeMouseEnter:to,onEdgeMouseMove:Ti,onEdgeMouseLeave:Ai,reconnectRadius:no=10,onNodesChange:ro,onEdgesChange:bn,noDragClassName:ct="nodrag",noWheelClassName:bt="nowheel",noPanClassName:qn="nopan",fitView:Na,fitViewOptions:ao,connectOnClick:Du,attributionPosition:io,proOptions:Vr,defaultEdgeOptions:ji,elevateNodesOnSelect:lr=!0,elevateEdgesOnSelect:or=!1,disableKeyboardA11y:sr=!1,autoPanOnConnect:ur,autoPanOnNodeDrag:rt,autoPanSpeed:lo,connectionRadius:oo,isValidConnection:On,onError:cr,style:ku,id:Mi,nodeDragThreshold:so,connectionDragThreshold:Hu,viewport:Ca,onViewportChange:Ta,width:sn,height:Ct,colorMode:uo="light",debug:Lu,onScroll:Aa,ariaLabelConfig:co,zIndexMode:Yr="basic",...Bu},Tt){const Ir=Mi||"1",fo=G5(uo),Ri=J.useCallback(zn=>{zn.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Aa?.(zn)},[Aa]);return x.jsx("div",{"data-testid":"rf__wrapper",...Bu,onScroll:Ri,style:{...ku,...sD},ref:Tt,className:st(["react-flow",o,fo]),id:Mi,role:"application",children:x.jsxs(oD,{nodes:t,edges:r,width:sn,height:Ct,fitView:Na,fitViewOptions:ao,minZoom:ln,maxZoom:on,nodeOrigin:Et,nodeExtent:Mn,zIndexMode:Yr,children:[x.jsx(aD,{onInit:d,onNodeClick:f,onEdgeClick:g,onNodeMouseEnter:A,onNodeMouseMove:w,onNodeMouseLeave:T,onNodeContextMenu:q,onNodeDoubleClick:R,nodeTypes:u,edgeTypes:c,connectionLineType:Y,connectionLineStyle:ae,connectionLineComponent:k,connectionLineContainerStyle:V,selectionKeyCode:ne,selectionOnDrag:le,selectionMode:fe,deleteKeyCode:I,multiSelectionKeyCode:ye,panActivationKeyCode:he,zoomActivationKeyCode:xe,onlyRenderVisibleElements:ve,defaultViewport:an,translateExtent:Nt,minZoom:ln,maxZoom:on,preventScrolling:xa,zoomOnScroll:ba,zoomOnPinch:xt,zoomOnDoubleClick:Mu,panOnScroll:Qe,panOnScrollSpeed:xn,panOnScrollMode:wt,panOnDrag:Ru,onPaneClick:qu,onPaneMouseEnter:_a,onPaneMouseMove:wa,onPaneMouseLeave:Sa,onPaneScroll:Rn,onPaneContextMenu:Ea,paneClickDistance:Ur,nodeClickDistance:Ou,onSelectionContextMenu:G,onSelectionStart:X,onSelectionEnd:P,onReconnect:Ci,onReconnectStart:Gr,onReconnectEnd:zu,onEdgeContextMenu:Wl,onEdgeDoubleClick:eo,onEdgeMouseEnter:to,onEdgeMouseMove:Ti,onEdgeMouseLeave:Ai,reconnectRadius:no,defaultMarkerColor:Ni,noDragClassName:ct,noWheelClassName:bt,noPanClassName:qn,rfId:Ir,disableKeyboardA11y:sr,nodeExtent:Mn,viewport:Ca,onViewportChange:Ta}),x.jsx(U5,{nodes:t,edges:r,defaultNodes:i,defaultEdges:l,onConnect:b,onConnectStart:S,onConnectEnd:N,onClickConnectStart:E,onClickConnectEnd:C,nodesDraggable:we,autoPanOnNodeFocus:dt,nodesConnectable:nt,nodesFocusable:Ht,edgesFocusable:yt,edgesReconnectable:$e,elementsSelectable:Pe,elevateNodesOnSelect:lr,elevateEdgesOnSelect:or,minZoom:ln,maxZoom:on,nodeExtent:Mn,onNodesChange:ro,onEdgesChange:bn,snapToGrid:ge,snapGrid:_e,connectionMode:z,translateExtent:Nt,connectOnClick:Du,defaultEdgeOptions:ji,fitView:Na,fitViewOptions:ao,onNodesDelete:Q,onEdgesDelete:B,onDelete:F,onNodeDragStart:M,onNodeDrag:L,onNodeDragStop:H,onSelectionDrag:K,onSelectionDragStart:D,onSelectionDragStop:O,onMove:m,onMoveStart:p,onMoveEnd:y,noPanClassName:qn,nodeOrigin:Et,rfId:Ir,autoPanOnConnect:ur,autoPanOnNodeDrag:rt,autoPanSpeed:lo,onError:cr,connectionRadius:oo,isValidConnection:On,selectNodesOnDrag:Te,nodeDragThreshold:so,connectionDragThreshold:Hu,onBeforeDelete:oe,debug:Lu,ariaLabelConfig:co,zIndexMode:Yr}),x.jsx(k5,{onSelectionChange:W}),Jl,x.jsx(R5,{proOptions:Vr,position:io}),x.jsx(M5,{rfId:Ir,disableKeyboardA11y:sr})]})})}var cD=qT(uD);function fD(t){const[r,i]=J.useState(t),l=J.useCallback(o=>i(u=>MT(o,u)),[]);return[r,i,l]}function dD(t){const[r,i]=J.useState(t),l=J.useCallback(o=>i(u=>RT(o,u)),[]);return[r,i,l]}function hD({dimensions:t,lineWidth:r,variant:i,className:l}){return x.jsx("path",{strokeWidth:r,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`,className:st(["react-flow__background-pattern",i,l])})}function gD({radius:t,className:r}){return x.jsx("circle",{cx:t,cy:t,r:t,className:st(["react-flow__background-pattern","dots",r])})}var Lr;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(Lr||(Lr={}));const vD={[Lr.Dots]:1,[Lr.Lines]:1,[Lr.Cross]:6},mD=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function nA({id:t,variant:r=Lr.Dots,gap:i=20,size:l,lineWidth:o=1,offset:u=0,color:c,bgColor:f,style:g,className:d,patternClassName:m}){const p=J.useRef(null),{transform:y,patternId:b}=Oe(mD,Ze),S=l||vD[r],N=r===Lr.Dots,E=r===Lr.Cross,C=Array.isArray(i)?i:[i,i],A=[C[0]*y[2]||1,C[1]*y[2]||1],w=S*y[2],T=Array.isArray(u)?u:[u,u],q=E?[w,w]:A,R=[T[0]*y[2]||1+q[0]/2,T[1]*y[2]||1+q[1]/2],M=`${b}${t||""}`;return x.jsxs("svg",{className:st(["react-flow__background",d]),style:{...g,...cu,"--xy-background-color-props":f,"--xy-background-pattern-color-props":c},ref:p,"data-testid":"rf__background",children:[x.jsx("pattern",{id:M,x:y[0]%A[0],y:y[1]%A[1],width:A[0],height:A[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${R[0]},-${R[1]})`,children:N?x.jsx(gD,{radius:w/2,className:m}):x.jsx(hD,{dimensions:q,lineWidth:o,variant:r,className:m})}),x.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${M})`})]})}nA.displayName="Background";const pD=J.memo(nA);function yD(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:x.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function xD(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:x.jsx("path",{d:"M0 0h32v4.2H0z"})})}function bD(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:x.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function _D(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:x.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function wD(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:x.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Rs({children:t,className:r,...i}){return x.jsx("button",{type:"button",className:st(["react-flow__controls-button",r]),...i,children:t})}const SD=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom,ariaLabelConfig:t.ariaLabelConfig});function rA({style:t,showZoom:r=!0,showFitView:i=!0,showInteractive:l=!0,fitViewOptions:o,onZoomIn:u,onZoomOut:c,onFitView:f,onInteractiveChange:g,className:d,children:m,position:p="bottom-left",orientation:y="vertical","aria-label":b}){const S=Fe(),{isInteractive:N,minZoomReached:E,maxZoomReached:C,ariaLabelConfig:A}=Oe(SD,Ze),{zoomIn:w,zoomOut:T,fitView:q}=oy(),R=()=>{w(),u?.()},M=()=>{T(),c?.()},L=()=>{q(o),f?.()},H=()=>{S.setState({nodesDraggable:!N,nodesConnectable:!N,elementsSelectable:!N}),g?.(!N)},Q=y==="horizontal"?"horizontal":"vertical";return x.jsxs(uu,{className:st(["react-flow__controls",Q,d]),position:p,style:t,"data-testid":"rf__controls","aria-label":b??A["controls.ariaLabel"],children:[r&&x.jsxs(x.Fragment,{children:[x.jsx(Rs,{onClick:R,className:"react-flow__controls-zoomin",title:A["controls.zoomIn.ariaLabel"],"aria-label":A["controls.zoomIn.ariaLabel"],disabled:C,children:x.jsx(yD,{})}),x.jsx(Rs,{onClick:M,className:"react-flow__controls-zoomout",title:A["controls.zoomOut.ariaLabel"],"aria-label":A["controls.zoomOut.ariaLabel"],disabled:E,children:x.jsx(xD,{})})]}),i&&x.jsx(Rs,{className:"react-flow__controls-fitview",onClick:L,title:A["controls.fitView.ariaLabel"],"aria-label":A["controls.fitView.ariaLabel"],children:x.jsx(bD,{})}),l&&x.jsx(Rs,{className:"react-flow__controls-interactive",onClick:H,title:A["controls.interactive.ariaLabel"],"aria-label":A["controls.interactive.ariaLabel"],children:N?x.jsx(wD,{}):x.jsx(_D,{})}),m]})}rA.displayName="Controls";const ED=J.memo(rA);function ND({id:t,x:r,y:i,width:l,height:o,style:u,color:c,strokeColor:f,strokeWidth:g,className:d,borderRadius:m,shapeRendering:p,selected:y,onClick:b}){const{background:S,backgroundColor:N}=u||{},E=c||S||N;return x.jsx("rect",{className:st(["react-flow__minimap-node",{selected:y},d]),x:r,y:i,rx:m,ry:m,width:l,height:o,style:{fill:E,stroke:f,strokeWidth:g},shapeRendering:p,onClick:b?C=>b(C,t):void 0})}const CD=J.memo(ND),TD=t=>t.nodes.map(r=>r.id),ud=t=>t instanceof Function?t:()=>t;function AD({nodeStrokeColor:t,nodeColor:r,nodeClassName:i="",nodeBorderRadius:l=5,nodeStrokeWidth:o,nodeComponent:u=CD,onClick:c}){const f=Oe(TD,Ze),g=ud(r),d=ud(t),m=ud(i),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return x.jsx(x.Fragment,{children:f.map(y=>x.jsx(MD,{id:y,nodeColorFunc:g,nodeStrokeColorFunc:d,nodeClassNameFunc:m,nodeBorderRadius:l,nodeStrokeWidth:o,NodeComponent:u,onClick:c,shapeRendering:p},y))})}function jD({id:t,nodeColorFunc:r,nodeStrokeColorFunc:i,nodeClassNameFunc:l,nodeBorderRadius:o,nodeStrokeWidth:u,shapeRendering:c,NodeComponent:f,onClick:g}){const{node:d,x:m,y:p,width:y,height:b}=Oe(S=>{const{internals:N}=S.nodeLookup.get(t),E=N.userNode,{x:C,y:A}=N.positionAbsolute,{width:w,height:T}=rr(E);return{node:E,x:C,y:A,width:w,height:T}},Ze);return!d||d.hidden||!rT(d)?null:x.jsx(f,{x:m,y:p,width:y,height:b,style:d.style,selected:!!d.selected,className:l(d),color:r(d),borderRadius:o,strokeColor:i(d),strokeWidth:u,shapeRendering:c,onClick:g,id:d.id})}const MD=J.memo(jD);var RD=J.memo(AD);const qD=200,OD=150,zD=t=>!t.hidden,DD=t=>{const r={x:-t.transform[0]/t.transform[2],y:-t.transform[1]/t.transform[2],width:t.width/t.transform[2],height:t.height/t.transform[2]};return{viewBB:r,boundingRect:t.nodeLookup.size>0?nT(Il(t.nodeLookup,{filter:zD}),r):r,rfId:t.rfId,panZoom:t.panZoom,translateExtent:t.translateExtent,flowWidth:t.width,flowHeight:t.height,ariaLabelConfig:t.ariaLabelConfig}},kD="react-flow__minimap-desc";function aA({style:t,className:r,nodeStrokeColor:i,nodeColor:l,nodeClassName:o="",nodeBorderRadius:u=5,nodeStrokeWidth:c,nodeComponent:f,bgColor:g,maskColor:d,maskStrokeColor:m,maskStrokeWidth:p,position:y="bottom-right",onClick:b,onNodeClick:S,pannable:N=!1,zoomable:E=!1,ariaLabel:C,inversePan:A,zoomStep:w=1,offsetScale:T=5}){const q=Fe(),R=J.useRef(null),{boundingRect:M,viewBB:L,rfId:H,panZoom:Q,translateExtent:B,flowWidth:F,flowHeight:W,ariaLabelConfig:D}=Oe(DD,Ze),K=t?.width??qD,O=t?.height??OD,G=M.width/K,X=M.height/O,P=Math.max(G,X),oe=P*K,z=P*O,Y=T*P,ae=M.x-(oe-M.width)/2-Y,k=M.y-(z-M.height)/2-Y,V=oe+Y*2,I=z+Y*2,ne=`${kD}-${H}`,le=J.useRef(0),fe=J.useRef();le.current=P,J.useEffect(()=>{if(R.current&&Q)return fe.current=PO({domNode:R.current,panZoom:Q,getTransform:()=>q.getState().transform,getViewScale:()=>le.current}),()=>{fe.current?.destroy()}},[Q]),J.useEffect(()=>{fe.current?.update({translateExtent:B,width:F,height:W,inversePan:A,pannable:N,zoomStep:w,zoomable:E})},[N,E,A,w,B,F,W]);const he=b?ge=>{const[_e,ve]=fe.current?.pointer(ge)||[0,0];b(ge,{x:_e,y:ve})}:void 0,ye=S?J.useCallback((ge,_e)=>{const ve=q.getState().nodeLookup.get(_e).internals.userNode;S(ge,ve)},[]):void 0,xe=C??D["minimap.ariaLabel"];return x.jsx(uu,{position:y,style:{...t,"--xy-minimap-background-color-props":typeof g=="string"?g:void 0,"--xy-minimap-mask-background-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-color-props":typeof m=="string"?m:void 0,"--xy-minimap-mask-stroke-width-props":typeof p=="number"?p*P:void 0,"--xy-minimap-node-background-color-props":typeof l=="string"?l:void 0,"--xy-minimap-node-stroke-color-props":typeof i=="string"?i:void 0,"--xy-minimap-node-stroke-width-props":typeof c=="number"?c:void 0},className:st(["react-flow__minimap",r]),"data-testid":"rf__minimap",children:x.jsxs("svg",{width:K,height:O,viewBox:`${ae} ${k} ${V} ${I}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ne,ref:R,onClick:he,children:[xe&&x.jsx("title",{id:ne,children:xe}),x.jsx(RD,{onClick:ye,nodeColor:l,nodeStrokeColor:i,nodeBorderRadius:u,nodeClassName:o,nodeStrokeWidth:c,nodeComponent:f}),x.jsx("path",{className:"react-flow__minimap-mask",d:`M${ae-Y},${k-Y}h${V+Y*2}v${I+Y*2}h${-V-Y*2}z
|
|
15
|
+
M${L.x},${L.y}h${L.width}v${L.height}h${-L.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}aA.displayName="MiniMap";const HD=J.memo(aA),LD=t=>r=>t?`${Math.max(1/r.transform[2],1)}`:void 0,BD={[yi.Line]:"right",[yi.Handle]:"bottom-right"};function UD({nodeId:t,position:r,variant:i=yi.Handle,className:l,style:o=void 0,children:u,color:c,minWidth:f=10,minHeight:g=10,maxWidth:d=Number.MAX_VALUE,maxHeight:m=Number.MAX_VALUE,keepAspectRatio:p=!1,resizeDirection:y,autoScale:b=!0,shouldResize:S,onResizeStart:N,onResize:E,onResizeEnd:C}){const A=kT(),w=typeof t=="string"?t:A,T=Fe(),q=J.useRef(null),R=i===yi.Handle,M=Oe(J.useCallback(LD(R&&b),[R,b]),Ze),L=J.useRef(null),H=r??BD[i];J.useEffect(()=>{if(!(!q.current||!w))return L.current||(L.current=f5({domNode:q.current,nodeId:w,getStoreItems:()=>{const{nodeLookup:B,transform:F,snapGrid:W,snapToGrid:D,nodeOrigin:K,domNode:O}=T.getState();return{nodeLookup:B,transform:F,snapGrid:W,snapToGrid:D,nodeOrigin:K,paneDomNode:O}},onChange:(B,F)=>{const{triggerNodeChanges:W,nodeLookup:D,parentLookup:K,nodeOrigin:O}=T.getState(),G=[],X={x:B.x,y:B.y},P=D.get(w);if(P&&P.expandParent&&P.parentId){const oe=P.origin??O,z=B.width??P.measured.width??0,Y=B.height??P.measured.height??0,ae={id:P.id,parentId:P.parentId,rect:{width:z,height:Y,...aT({x:B.x??P.position.x,y:B.y??P.position.y},{width:z,height:Y},P.parentId,D,oe)}},k=ly([ae],D,K,O);G.push(...k),X.x=B.x?Math.max(oe[0]*z,B.x):void 0,X.y=B.y?Math.max(oe[1]*Y,B.y):void 0}if(X.x!==void 0&&X.y!==void 0){const oe={id:w,type:"position",position:{...X}};G.push(oe)}if(B.width!==void 0&&B.height!==void 0){const z={id:w,type:"dimensions",resizing:!0,setAttributes:y?y==="horizontal"?"width":"height":!0,dimensions:{width:B.width,height:B.height}};G.push(z)}for(const oe of F){const z={...oe,type:"position"};G.push(z)}W(G)},onEnd:({width:B,height:F})=>{const W={id:w,type:"dimensions",resizing:!1,dimensions:{width:B,height:F}};T.getState().triggerNodeChanges([W])}})),L.current.update({controlPosition:H,boundaries:{minWidth:f,minHeight:g,maxWidth:d,maxHeight:m},keepAspectRatio:p,resizeDirection:y,onResizeStart:N,onResize:E,onResizeEnd:C,shouldResize:S}),()=>{L.current?.destroy()}},[H,f,g,d,m,p,N,E,C,S]);const Q=H.split("-");return x.jsx("div",{className:st(["react-flow__resize-control","nodrag",...Q,i,l]),ref:q,style:{...o,scale:M,...c&&{[R?"backgroundColor":"borderColor"]:c}},children:u})}J.memo(UD);function GD(t,r){if(t.match(/^[a-z]+:\/\//i))return t;if(t.match(/^\/\//))return window.location.protocol+t;if(t.match(/^[a-z]+:/i))return t;const i=document.implementation.createHTMLDocument(),l=i.createElement("base"),o=i.createElement("a");return i.head.appendChild(l),i.body.appendChild(o),r&&(l.href=r),o.href=t,o.href}const VD=(()=>{let t=0;const r=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(t+=1,`u${r()}${t}`)})();function tr(t){const r=[];for(let i=0,l=t.length;i<l;i++)r.push(t[i]);return r}function $s(t,r){const l=(t.ownerDocument.defaultView||window).getComputedStyle(t).getPropertyValue(r);return l?parseFloat(l.replace("px","")):0}function YD(t){const r=$s(t,"border-left-width"),i=$s(t,"border-right-width");return t.clientWidth+r+i}function ID(t){const r=$s(t,"border-top-width"),i=$s(t,"border-bottom-width");return t.clientHeight+r+i}function iA(t,r={}){const i=r.width||YD(t),l=r.height||ID(t);return{width:i,height:l}}function XD(){let t,r;try{r=process}catch{}const i=r&&r.env?r.env.devicePixelRatio:null;return i&&(t=parseInt(i,10),Number.isNaN(t)&&(t=1)),t||window.devicePixelRatio||1}const Xt=16384;function ZD(t){(t.width>Xt||t.height>Xt)&&(t.width>Xt&&t.height>Xt?t.width>t.height?(t.height*=Xt/t.width,t.width=Xt):(t.width*=Xt/t.height,t.height=Xt):t.width>Xt?(t.height*=Xt/t.width,t.width=Xt):(t.width*=Xt/t.height,t.height=Xt))}function Ps(t){return new Promise((r,i)=>{const l=new Image;l.decode=()=>r(l),l.onload=()=>r(l),l.onerror=i,l.crossOrigin="anonymous",l.decoding="async",l.src=t})}async function FD(t){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(t)).then(encodeURIComponent).then(r=>`data:image/svg+xml;charset=utf-8,${r}`)}async function KD(t,r,i){const l="http://www.w3.org/2000/svg",o=document.createElementNS(l,"svg"),u=document.createElementNS(l,"foreignObject");return o.setAttribute("width",`${r}`),o.setAttribute("height",`${i}`),o.setAttribute("viewBox",`0 0 ${r} ${i}`),u.setAttribute("width","100%"),u.setAttribute("height","100%"),u.setAttribute("x","0"),u.setAttribute("y","0"),u.setAttribute("externalResourcesRequired","true"),o.appendChild(u),u.appendChild(t),FD(o)}const Dt=(t,r)=>{if(t instanceof r)return!0;const i=Object.getPrototypeOf(t);return i===null?!1:i.constructor.name===r.name||Dt(i,r)};function QD(t){const r=t.getPropertyValue("content");return`${t.cssText} content: '${r.replace(/'|"/g,"")}';`}function $D(t){return tr(t).map(r=>{const i=t.getPropertyValue(r),l=t.getPropertyPriority(r);return`${r}: ${i}${l?" !important":""};`}).join(" ")}function PD(t,r,i){const l=`.${t}:${r}`,o=i.cssText?QD(i):$D(i);return document.createTextNode(`${l}{${o}}`)}function q_(t,r,i){const l=window.getComputedStyle(t,i),o=l.getPropertyValue("content");if(o===""||o==="none")return;const u=VD();try{r.className=`${r.className} ${u}`}catch{return}const c=document.createElement("style");c.appendChild(PD(u,i,l)),r.appendChild(c)}function JD(t,r){q_(t,r,":before"),q_(t,r,":after")}const O_="application/font-woff",z_="image/jpeg",WD={woff:O_,woff2:O_,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:z_,jpeg:z_,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function e6(t){const r=/\.([^./]*?)$/g.exec(t);return r?r[1]:""}function uy(t){const r=e6(t).toLowerCase();return WD[r]||""}function t6(t){return t.split(/,/)[1]}function Vp(t){return t.search(/^(data:)/)!==-1}function n6(t,r){return`data:${r};base64,${t}`}async function lA(t,r,i){const l=await fetch(t,r);if(l.status===404)throw new Error(`Resource "${l.url}" not found`);const o=await l.blob();return new Promise((u,c)=>{const f=new FileReader;f.onerror=c,f.onloadend=()=>{try{u(i({res:l,result:f.result}))}catch(g){c(g)}},f.readAsDataURL(o)})}const cd={};function r6(t,r,i){let l=t.replace(/\?.*/,"");return i&&(l=t),/ttf|otf|eot|woff2?/i.test(l)&&(l=l.replace(/.*\//,"")),r?`[${r}]${l}`:l}async function cy(t,r,i){const l=r6(t,r,i.includeQueryParams);if(cd[l]!=null)return cd[l];i.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+new Date().getTime());let o;try{const u=await lA(t,i.fetchRequestInit,({res:c,result:f})=>(r||(r=c.headers.get("Content-Type")||""),t6(f)));o=n6(u,r)}catch(u){o=i.imagePlaceholder||"";let c=`Failed to fetch resource: ${t}`;u&&(c=typeof u=="string"?u:u.message),c&&console.warn(c)}return cd[l]=o,o}async function a6(t){const r=t.toDataURL();return r==="data:,"?t.cloneNode(!1):Ps(r)}async function i6(t,r){if(t.currentSrc){const u=document.createElement("canvas"),c=u.getContext("2d");u.width=t.clientWidth,u.height=t.clientHeight,c?.drawImage(t,0,0,u.width,u.height);const f=u.toDataURL();return Ps(f)}const i=t.poster,l=uy(i),o=await cy(i,l,r);return Ps(o)}async function l6(t){var r;try{if(!((r=t?.contentDocument)===null||r===void 0)&&r.body)return await du(t.contentDocument.body,{},!0)}catch{}return t.cloneNode(!1)}async function o6(t,r){return Dt(t,HTMLCanvasElement)?a6(t):Dt(t,HTMLVideoElement)?i6(t,r):Dt(t,HTMLIFrameElement)?l6(t):t.cloneNode(!1)}const s6=t=>t.tagName!=null&&t.tagName.toUpperCase()==="SLOT";async function u6(t,r,i){var l,o;let u=[];return s6(t)&&t.assignedNodes?u=tr(t.assignedNodes()):Dt(t,HTMLIFrameElement)&&(!((l=t.contentDocument)===null||l===void 0)&&l.body)?u=tr(t.contentDocument.body.childNodes):u=tr(((o=t.shadowRoot)!==null&&o!==void 0?o:t).childNodes),u.length===0||Dt(t,HTMLVideoElement)||await u.reduce((c,f)=>c.then(()=>du(f,i)).then(g=>{g&&r.appendChild(g)}),Promise.resolve()),r}function c6(t,r){const i=r.style;if(!i)return;const l=window.getComputedStyle(t);l.cssText?(i.cssText=l.cssText,i.transformOrigin=l.transformOrigin):tr(l).forEach(o=>{let u=l.getPropertyValue(o);o==="font-size"&&u.endsWith("px")&&(u=`${Math.floor(parseFloat(u.substring(0,u.length-2)))-.1}px`),Dt(t,HTMLIFrameElement)&&o==="display"&&u==="inline"&&(u="block"),o==="d"&&r.getAttribute("d")&&(u=`path(${r.getAttribute("d")})`),i.setProperty(o,u,l.getPropertyPriority(o))})}function f6(t,r){Dt(t,HTMLTextAreaElement)&&(r.innerHTML=t.value),Dt(t,HTMLInputElement)&&r.setAttribute("value",t.value)}function d6(t,r){if(Dt(t,HTMLSelectElement)){const l=Array.from(r.children).find(o=>t.value===o.getAttribute("value"));l&&l.setAttribute("selected","")}}function h6(t,r){return Dt(r,Element)&&(c6(t,r),JD(t,r),f6(t,r),d6(t,r)),r}async function g6(t,r){const i=t.querySelectorAll?t.querySelectorAll("use"):[];if(i.length===0)return t;const l={};for(let u=0;u<i.length;u++){const f=i[u].getAttribute("xlink:href");if(f){const g=t.querySelector(f),d=document.querySelector(f);!g&&d&&!l[f]&&(l[f]=await du(d,r,!0))}}const o=Object.values(l);if(o.length){const u="http://www.w3.org/1999/xhtml",c=document.createElementNS(u,"svg");c.setAttribute("xmlns",u),c.style.position="absolute",c.style.width="0",c.style.height="0",c.style.overflow="hidden",c.style.display="none";const f=document.createElementNS(u,"defs");c.appendChild(f);for(let g=0;g<o.length;g++)f.appendChild(o[g]);t.appendChild(c)}return t}async function du(t,r,i){return!i&&r.filter&&!r.filter(t)?null:Promise.resolve(t).then(l=>o6(l,r)).then(l=>u6(t,l,r)).then(l=>h6(t,l)).then(l=>g6(l,r))}const oA=/url\((['"]?)([^'"]+?)\1\)/g,v6=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,m6=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function p6(t){const r=t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${r})(['"]?\\))`,"g")}function y6(t){const r=[];return t.replace(oA,(i,l,o)=>(r.push(o),i)),r.filter(i=>!Vp(i))}async function x6(t,r,i,l,o){try{const u=i?GD(r,i):r,c=uy(r);let f;return o||(f=await cy(u,c,l)),t.replace(p6(r),`$1${f}$3`)}catch{}return t}function b6(t,{preferredFontFormat:r}){return r?t.replace(m6,i=>{for(;;){const[l,,o]=v6.exec(i)||[];if(!o)return"";if(o===r)return`src: ${l};`}}):t}function sA(t){return t.search(oA)!==-1}async function uA(t,r,i){if(!sA(t))return t;const l=b6(t,i);return y6(l).reduce((u,c)=>u.then(f=>x6(f,c,r,i)),Promise.resolve(l))}async function qs(t,r,i){var l;const o=(l=r.style)===null||l===void 0?void 0:l.getPropertyValue(t);if(o){const u=await uA(o,null,i);return r.style.setProperty(t,u,r.style.getPropertyPriority(t)),!0}return!1}async function _6(t,r){await qs("background",t,r)||await qs("background-image",t,r),await qs("mask",t,r)||await qs("mask-image",t,r)}async function w6(t,r){const i=Dt(t,HTMLImageElement);if(!(i&&!Vp(t.src))&&!(Dt(t,SVGImageElement)&&!Vp(t.href.baseVal)))return;const l=i?t.src:t.href.baseVal,o=await cy(l,uy(l),r);await new Promise((u,c)=>{t.onload=u,t.onerror=c;const f=t;f.decode&&(f.decode=u),f.loading==="lazy"&&(f.loading="eager"),i?(t.srcset="",t.src=o):t.href.baseVal=o})}async function S6(t,r){const l=tr(t.childNodes).map(o=>cA(o,r));await Promise.all(l).then(()=>t)}async function cA(t,r){Dt(t,Element)&&(await _6(t,r),await w6(t,r),await S6(t,r))}function E6(t,r){const{style:i}=t;r.backgroundColor&&(i.backgroundColor=r.backgroundColor),r.width&&(i.width=`${r.width}px`),r.height&&(i.height=`${r.height}px`);const l=r.style;return l!=null&&Object.keys(l).forEach(o=>{i[o]=l[o]}),t}const D_={};async function k_(t){let r=D_[t];if(r!=null)return r;const l=await(await fetch(t)).text();return r={url:t,cssText:l},D_[t]=r,r}async function H_(t,r){let i=t.cssText;const l=/url\(["']?([^"')]+)["']?\)/g,u=(i.match(/url\([^)]+\)/g)||[]).map(async c=>{let f=c.replace(l,"$1");return f.startsWith("https://")||(f=new URL(f,t.url).href),lA(f,r.fetchRequestInit,({result:g})=>(i=i.replace(c,`url(${g})`),[c,g]))});return Promise.all(u).then(()=>i)}function L_(t){if(t==null)return[];const r=[],i=/(\/\*[\s\S]*?\*\/)/gi;let l=t.replace(i,"");const o=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const g=o.exec(l);if(g===null)break;r.push(g[0])}l=l.replace(o,"");const u=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,c="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",f=new RegExp(c,"gi");for(;;){let g=u.exec(l);if(g===null){if(g=f.exec(l),g===null)break;u.lastIndex=f.lastIndex}else f.lastIndex=u.lastIndex;r.push(g[0])}return r}async function N6(t,r){const i=[],l=[];return t.forEach(o=>{if("cssRules"in o)try{tr(o.cssRules||[]).forEach((u,c)=>{if(u.type===CSSRule.IMPORT_RULE){let f=c+1;const g=u.href,d=k_(g).then(m=>H_(m,r)).then(m=>L_(m).forEach(p=>{try{o.insertRule(p,p.startsWith("@import")?f+=1:o.cssRules.length)}catch(y){console.error("Error inserting rule from remote css",{rule:p,error:y})}})).catch(m=>{console.error("Error loading remote css",m.toString())});l.push(d)}})}catch(u){const c=t.find(f=>f.href==null)||document.styleSheets[0];o.href!=null&&l.push(k_(o.href).then(f=>H_(f,r)).then(f=>L_(f).forEach(g=>{c.insertRule(g,o.cssRules.length)})).catch(f=>{console.error("Error loading remote stylesheet",f)})),console.error("Error inlining remote css file",u)}}),Promise.all(l).then(()=>(t.forEach(o=>{if("cssRules"in o)try{tr(o.cssRules||[]).forEach(u=>{i.push(u)})}catch(u){console.error(`Error while reading CSS rules from ${o.href}`,u)}}),i))}function C6(t){return t.filter(r=>r.type===CSSRule.FONT_FACE_RULE).filter(r=>sA(r.style.getPropertyValue("src")))}async function T6(t,r){if(t.ownerDocument==null)throw new Error("Provided element is not within a Document");const i=tr(t.ownerDocument.styleSheets),l=await N6(i,r);return C6(l)}async function A6(t,r){const i=await T6(t,r);return(await Promise.all(i.map(o=>{const u=o.parentStyleSheet?o.parentStyleSheet.href:null;return uA(o.cssText,u,r)}))).join(`
|
|
16
|
+
`)}async function j6(t,r){const i=r.fontEmbedCSS!=null?r.fontEmbedCSS:r.skipFonts?null:await A6(t,r);if(i){const l=document.createElement("style"),o=document.createTextNode(i);l.appendChild(o),t.firstChild?t.insertBefore(l,t.firstChild):t.appendChild(l)}}async function fA(t,r={}){const{width:i,height:l}=iA(t,r),o=await du(t,r,!0);return await j6(o,r),await cA(o,r),E6(o,r),await KD(o,i,l)}async function M6(t,r={}){const{width:i,height:l}=iA(t,r),o=await fA(t,r),u=await Ps(o),c=document.createElement("canvas"),f=c.getContext("2d"),g=r.pixelRatio||XD(),d=r.canvasWidth||i,m=r.canvasHeight||l;return c.width=d*g,c.height=m*g,r.skipAutoScale||ZD(c),c.style.width=`${d}`,c.style.height=`${m}`,r.backgroundColor&&(f.fillStyle=r.backgroundColor,f.fillRect(0,0,c.width,c.height)),f.drawImage(u,0,0,c.width,c.height),c}async function R6(t,r={}){return(await M6(t,r)).toDataURL()}function fy(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var fd,B_;function q6(){if(B_)return fd;B_=1;function t(){this.__data__=[],this.size=0}return fd=t,fd}var dd,U_;function bi(){if(U_)return dd;U_=1;function t(r,i){return r===i||r!==r&&i!==i}return dd=t,dd}var hd,G_;function hu(){if(G_)return hd;G_=1;var t=bi();function r(i,l){for(var o=i.length;o--;)if(t(i[o][0],l))return o;return-1}return hd=r,hd}var gd,V_;function O6(){if(V_)return gd;V_=1;var t=hu(),r=Array.prototype,i=r.splice;function l(o){var u=this.__data__,c=t(u,o);if(c<0)return!1;var f=u.length-1;return c==f?u.pop():i.call(u,c,1),--this.size,!0}return gd=l,gd}var vd,Y_;function z6(){if(Y_)return vd;Y_=1;var t=hu();function r(i){var l=this.__data__,o=t(l,i);return o<0?void 0:l[o][1]}return vd=r,vd}var md,I_;function D6(){if(I_)return md;I_=1;var t=hu();function r(i){return t(this.__data__,i)>-1}return md=r,md}var pd,X_;function k6(){if(X_)return pd;X_=1;var t=hu();function r(i,l){var o=this.__data__,u=t(o,i);return u<0?(++this.size,o.push([i,l])):o[u][1]=l,this}return pd=r,pd}var yd,Z_;function gu(){if(Z_)return yd;Z_=1;var t=q6(),r=O6(),i=z6(),l=D6(),o=k6();function u(c){var f=-1,g=c==null?0:c.length;for(this.clear();++f<g;){var d=c[f];this.set(d[0],d[1])}}return u.prototype.clear=t,u.prototype.delete=r,u.prototype.get=i,u.prototype.has=l,u.prototype.set=o,yd=u,yd}var xd,F_;function H6(){if(F_)return xd;F_=1;var t=gu();function r(){this.__data__=new t,this.size=0}return xd=r,xd}var bd,K_;function L6(){if(K_)return bd;K_=1;function t(r){var i=this.__data__,l=i.delete(r);return this.size=i.size,l}return bd=t,bd}var _d,Q_;function B6(){if(Q_)return _d;Q_=1;function t(r){return this.__data__.get(r)}return _d=t,_d}var wd,$_;function U6(){if($_)return wd;$_=1;function t(r){return this.__data__.has(r)}return wd=t,wd}var Sd,P_;function dA(){if(P_)return Sd;P_=1;var t=typeof ws=="object"&&ws&&ws.Object===Object&&ws;return Sd=t,Sd}var Ed,J_;function yn(){if(J_)return Ed;J_=1;var t=dA(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=t||r||Function("return this")();return Ed=i,Ed}var Nd,W_;function _i(){if(W_)return Nd;W_=1;var t=yn(),r=t.Symbol;return Nd=r,Nd}var Cd,e2;function G6(){if(e2)return Cd;e2=1;var t=_i(),r=Object.prototype,i=r.hasOwnProperty,l=r.toString,o=t?t.toStringTag:void 0;function u(c){var f=i.call(c,o),g=c[o];try{c[o]=void 0;var d=!0}catch{}var m=l.call(c);return d&&(f?c[o]=g:delete c[o]),m}return Cd=u,Cd}var Td,t2;function V6(){if(t2)return Td;t2=1;var t=Object.prototype,r=t.toString;function i(l){return r.call(l)}return Td=i,Td}var Ad,n2;function va(){if(n2)return Ad;n2=1;var t=_i(),r=G6(),i=V6(),l="[object Null]",o="[object Undefined]",u=t?t.toStringTag:void 0;function c(f){return f==null?f===void 0?o:l:u&&u in Object(f)?r(f):i(f)}return Ad=c,Ad}var jd,r2;function nn(){if(r2)return jd;r2=1;function t(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}return jd=t,jd}var Md,a2;function Fl(){if(a2)return Md;a2=1;var t=va(),r=nn(),i="[object AsyncFunction]",l="[object Function]",o="[object GeneratorFunction]",u="[object Proxy]";function c(f){if(!r(f))return!1;var g=t(f);return g==l||g==o||g==i||g==u}return Md=c,Md}var Rd,i2;function Y6(){if(i2)return Rd;i2=1;var t=yn(),r=t["__core-js_shared__"];return Rd=r,Rd}var qd,l2;function I6(){if(l2)return qd;l2=1;var t=Y6(),r=(function(){var l=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})();function i(l){return!!r&&r in l}return qd=i,qd}var Od,o2;function hA(){if(o2)return Od;o2=1;var t=Function.prototype,r=t.toString;function i(l){if(l!=null){try{return r.call(l)}catch{}try{return l+""}catch{}}return""}return Od=i,Od}var zd,s2;function X6(){if(s2)return zd;s2=1;var t=Fl(),r=I6(),i=nn(),l=hA(),o=/[\\^$.*+?()[\]{}|]/g,u=/^\[object .+?Constructor\]$/,c=Function.prototype,f=Object.prototype,g=c.toString,d=f.hasOwnProperty,m=RegExp("^"+g.call(d).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p(y){if(!i(y)||r(y))return!1;var b=t(y)?m:u;return b.test(l(y))}return zd=p,zd}var Dd,u2;function Z6(){if(u2)return Dd;u2=1;function t(r,i){return r?.[i]}return Dd=t,Dd}var kd,c2;function ma(){if(c2)return kd;c2=1;var t=X6(),r=Z6();function i(l,o){var u=r(l,o);return t(u)?u:void 0}return kd=i,kd}var Hd,f2;function dy(){if(f2)return Hd;f2=1;var t=ma(),r=yn(),i=t(r,"Map");return Hd=i,Hd}var Ld,d2;function vu(){if(d2)return Ld;d2=1;var t=ma(),r=t(Object,"create");return Ld=r,Ld}var Bd,h2;function F6(){if(h2)return Bd;h2=1;var t=vu();function r(){this.__data__=t?t(null):{},this.size=0}return Bd=r,Bd}var Ud,g2;function K6(){if(g2)return Ud;g2=1;function t(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}return Ud=t,Ud}var Gd,v2;function Q6(){if(v2)return Gd;v2=1;var t=vu(),r="__lodash_hash_undefined__",i=Object.prototype,l=i.hasOwnProperty;function o(u){var c=this.__data__;if(t){var f=c[u];return f===r?void 0:f}return l.call(c,u)?c[u]:void 0}return Gd=o,Gd}var Vd,m2;function $6(){if(m2)return Vd;m2=1;var t=vu(),r=Object.prototype,i=r.hasOwnProperty;function l(o){var u=this.__data__;return t?u[o]!==void 0:i.call(u,o)}return Vd=l,Vd}var Yd,p2;function P6(){if(p2)return Yd;p2=1;var t=vu(),r="__lodash_hash_undefined__";function i(l,o){var u=this.__data__;return this.size+=this.has(l)?0:1,u[l]=t&&o===void 0?r:o,this}return Yd=i,Yd}var Id,y2;function J6(){if(y2)return Id;y2=1;var t=F6(),r=K6(),i=Q6(),l=$6(),o=P6();function u(c){var f=-1,g=c==null?0:c.length;for(this.clear();++f<g;){var d=c[f];this.set(d[0],d[1])}}return u.prototype.clear=t,u.prototype.delete=r,u.prototype.get=i,u.prototype.has=l,u.prototype.set=o,Id=u,Id}var Xd,x2;function W6(){if(x2)return Xd;x2=1;var t=J6(),r=gu(),i=dy();function l(){this.size=0,this.__data__={hash:new t,map:new(i||r),string:new t}}return Xd=l,Xd}var Zd,b2;function e8(){if(b2)return Zd;b2=1;function t(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}return Zd=t,Zd}var Fd,_2;function mu(){if(_2)return Fd;_2=1;var t=e8();function r(i,l){var o=i.__data__;return t(l)?o[typeof l=="string"?"string":"hash"]:o.map}return Fd=r,Fd}var Kd,w2;function t8(){if(w2)return Kd;w2=1;var t=mu();function r(i){var l=t(this,i).delete(i);return this.size-=l?1:0,l}return Kd=r,Kd}var Qd,S2;function n8(){if(S2)return Qd;S2=1;var t=mu();function r(i){return t(this,i).get(i)}return Qd=r,Qd}var $d,E2;function r8(){if(E2)return $d;E2=1;var t=mu();function r(i){return t(this,i).has(i)}return $d=r,$d}var Pd,N2;function a8(){if(N2)return Pd;N2=1;var t=mu();function r(i,l){var o=t(this,i),u=o.size;return o.set(i,l),this.size+=o.size==u?0:1,this}return Pd=r,Pd}var Jd,C2;function hy(){if(C2)return Jd;C2=1;var t=W6(),r=t8(),i=n8(),l=r8(),o=a8();function u(c){var f=-1,g=c==null?0:c.length;for(this.clear();++f<g;){var d=c[f];this.set(d[0],d[1])}}return u.prototype.clear=t,u.prototype.delete=r,u.prototype.get=i,u.prototype.has=l,u.prototype.set=o,Jd=u,Jd}var Wd,T2;function i8(){if(T2)return Wd;T2=1;var t=gu(),r=dy(),i=hy(),l=200;function o(u,c){var f=this.__data__;if(f instanceof t){var g=f.__data__;if(!r||g.length<l-1)return g.push([u,c]),this.size=++f.size,this;f=this.__data__=new i(g)}return f.set(u,c),this.size=f.size,this}return Wd=o,Wd}var eh,A2;function pu(){if(A2)return eh;A2=1;var t=gu(),r=H6(),i=L6(),l=B6(),o=U6(),u=i8();function c(f){var g=this.__data__=new t(f);this.size=g.size}return c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=l,c.prototype.has=o,c.prototype.set=u,eh=c,eh}var th,j2;function gy(){if(j2)return th;j2=1;function t(r,i){for(var l=-1,o=r==null?0:r.length;++l<o&&i(r[l],l,r)!==!1;);return r}return th=t,th}var nh,M2;function gA(){if(M2)return nh;M2=1;var t=ma(),r=(function(){try{var i=t(Object,"defineProperty");return i({},"",{}),i}catch{}})();return nh=r,nh}var rh,R2;function yu(){if(R2)return rh;R2=1;var t=gA();function r(i,l,o){l=="__proto__"&&t?t(i,l,{configurable:!0,enumerable:!0,value:o,writable:!0}):i[l]=o}return rh=r,rh}var ah,q2;function xu(){if(q2)return ah;q2=1;var t=yu(),r=bi(),i=Object.prototype,l=i.hasOwnProperty;function o(u,c,f){var g=u[c];(!(l.call(u,c)&&r(g,f))||f===void 0&&!(c in u))&&t(u,c,f)}return ah=o,ah}var ih,O2;function Kl(){if(O2)return ih;O2=1;var t=xu(),r=yu();function i(l,o,u,c){var f=!u;u||(u={});for(var g=-1,d=o.length;++g<d;){var m=o[g],p=c?c(u[m],l[m],m,u,l):void 0;p===void 0&&(p=l[m]),f?r(u,m,p):t(u,m,p)}return u}return ih=i,ih}var lh,z2;function l8(){if(z2)return lh;z2=1;function t(r,i){for(var l=-1,o=Array(r);++l<r;)o[l]=i(l);return o}return lh=t,lh}var oh,D2;function jn(){if(D2)return oh;D2=1;function t(r){return r!=null&&typeof r=="object"}return oh=t,oh}var sh,k2;function o8(){if(k2)return sh;k2=1;var t=va(),r=jn(),i="[object Arguments]";function l(o){return r(o)&&t(o)==i}return sh=l,sh}var uh,H2;function Ql(){if(H2)return uh;H2=1;var t=o8(),r=jn(),i=Object.prototype,l=i.hasOwnProperty,o=i.propertyIsEnumerable,u=t((function(){return arguments})())?t:function(c){return r(c)&&l.call(c,"callee")&&!o.call(c,"callee")};return uh=u,uh}var ch,L2;function ut(){if(L2)return ch;L2=1;var t=Array.isArray;return ch=t,ch}var Cl={exports:{}},fh,B2;function s8(){if(B2)return fh;B2=1;function t(){return!1}return fh=t,fh}Cl.exports;var U2;function wi(){return U2||(U2=1,(function(t,r){var i=yn(),l=s8(),o=r&&!r.nodeType&&r,u=o&&!0&&t&&!t.nodeType&&t,c=u&&u.exports===o,f=c?i.Buffer:void 0,g=f?f.isBuffer:void 0,d=g||l;t.exports=d})(Cl,Cl.exports)),Cl.exports}var dh,G2;function bu(){if(G2)return dh;G2=1;var t=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(l,o){var u=typeof l;return o=o??t,!!o&&(u=="number"||u!="symbol"&&r.test(l))&&l>-1&&l%1==0&&l<o}return dh=i,dh}var hh,V2;function vy(){if(V2)return hh;V2=1;var t=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=t}return hh=r,hh}var gh,Y2;function u8(){if(Y2)return gh;Y2=1;var t=va(),r=vy(),i=jn(),l="[object Arguments]",o="[object Array]",u="[object Boolean]",c="[object Date]",f="[object Error]",g="[object Function]",d="[object Map]",m="[object Number]",p="[object Object]",y="[object RegExp]",b="[object Set]",S="[object String]",N="[object WeakMap]",E="[object ArrayBuffer]",C="[object DataView]",A="[object Float32Array]",w="[object Float64Array]",T="[object Int8Array]",q="[object Int16Array]",R="[object Int32Array]",M="[object Uint8Array]",L="[object Uint8ClampedArray]",H="[object Uint16Array]",Q="[object Uint32Array]",B={};B[A]=B[w]=B[T]=B[q]=B[R]=B[M]=B[L]=B[H]=B[Q]=!0,B[l]=B[o]=B[E]=B[u]=B[C]=B[c]=B[f]=B[g]=B[d]=B[m]=B[p]=B[y]=B[b]=B[S]=B[N]=!1;function F(W){return i(W)&&r(W.length)&&!!B[t(W)]}return gh=F,gh}var vh,I2;function _u(){if(I2)return vh;I2=1;function t(r){return function(i){return r(i)}}return vh=t,vh}var Tl={exports:{}};Tl.exports;var X2;function my(){return X2||(X2=1,(function(t,r){var i=dA(),l=r&&!r.nodeType&&r,o=l&&!0&&t&&!t.nodeType&&t,u=o&&o.exports===l,c=u&&i.process,f=(function(){try{var g=o&&o.require&&o.require("util").types;return g||c&&c.binding&&c.binding("util")}catch{}})();t.exports=f})(Tl,Tl.exports)),Tl.exports}var mh,Z2;function $l(){if(Z2)return mh;Z2=1;var t=u8(),r=_u(),i=my(),l=i&&i.isTypedArray,o=l?r(l):t;return mh=o,mh}var ph,F2;function vA(){if(F2)return ph;F2=1;var t=l8(),r=Ql(),i=ut(),l=wi(),o=bu(),u=$l(),c=Object.prototype,f=c.hasOwnProperty;function g(d,m){var p=i(d),y=!p&&r(d),b=!p&&!y&&l(d),S=!p&&!y&&!b&&u(d),N=p||y||b||S,E=N?t(d.length,String):[],C=E.length;for(var A in d)(m||f.call(d,A))&&!(N&&(A=="length"||b&&(A=="offset"||A=="parent")||S&&(A=="buffer"||A=="byteLength"||A=="byteOffset")||o(A,C)))&&E.push(A);return E}return ph=g,ph}var yh,K2;function wu(){if(K2)return yh;K2=1;var t=Object.prototype;function r(i){var l=i&&i.constructor,o=typeof l=="function"&&l.prototype||t;return i===o}return yh=r,yh}var xh,Q2;function mA(){if(Q2)return xh;Q2=1;function t(r,i){return function(l){return r(i(l))}}return xh=t,xh}var bh,$2;function c8(){if($2)return bh;$2=1;var t=mA(),r=t(Object.keys,Object);return bh=r,bh}var _h,P2;function py(){if(P2)return _h;P2=1;var t=wu(),r=c8(),i=Object.prototype,l=i.hasOwnProperty;function o(u){if(!t(u))return r(u);var c=[];for(var f in Object(u))l.call(u,f)&&f!="constructor"&&c.push(f);return c}return _h=o,_h}var wh,J2;function ar(){if(J2)return wh;J2=1;var t=Fl(),r=vy();function i(l){return l!=null&&r(l.length)&&!t(l)}return wh=i,wh}var Sh,W2;function Br(){if(W2)return Sh;W2=1;var t=vA(),r=py(),i=ar();function l(o){return i(o)?t(o):r(o)}return Sh=l,Sh}var Eh,ew;function f8(){if(ew)return Eh;ew=1;var t=Kl(),r=Br();function i(l,o){return l&&t(o,r(o),l)}return Eh=i,Eh}var Nh,tw;function d8(){if(tw)return Nh;tw=1;function t(r){var i=[];if(r!=null)for(var l in Object(r))i.push(l);return i}return Nh=t,Nh}var Ch,nw;function h8(){if(nw)return Ch;nw=1;var t=nn(),r=wu(),i=d8(),l=Object.prototype,o=l.hasOwnProperty;function u(c){if(!t(c))return i(c);var f=r(c),g=[];for(var d in c)d=="constructor"&&(f||!o.call(c,d))||g.push(d);return g}return Ch=u,Ch}var Th,rw;function pa(){if(rw)return Th;rw=1;var t=vA(),r=h8(),i=ar();function l(o){return i(o)?t(o,!0):r(o)}return Th=l,Th}var Ah,aw;function g8(){if(aw)return Ah;aw=1;var t=Kl(),r=pa();function i(l,o){return l&&t(o,r(o),l)}return Ah=i,Ah}var Al={exports:{}};Al.exports;var iw;function pA(){return iw||(iw=1,(function(t,r){var i=yn(),l=r&&!r.nodeType&&r,o=l&&!0&&t&&!t.nodeType&&t,u=o&&o.exports===l,c=u?i.Buffer:void 0,f=c?c.allocUnsafe:void 0;function g(d,m){if(m)return d.slice();var p=d.length,y=f?f(p):new d.constructor(p);return d.copy(y),y}t.exports=g})(Al,Al.exports)),Al.exports}var jh,lw;function yA(){if(lw)return jh;lw=1;function t(r,i){var l=-1,o=r.length;for(i||(i=Array(o));++l<o;)i[l]=r[l];return i}return jh=t,jh}var Mh,ow;function xA(){if(ow)return Mh;ow=1;function t(r,i){for(var l=-1,o=r==null?0:r.length,u=0,c=[];++l<o;){var f=r[l];i(f,l,r)&&(c[u++]=f)}return c}return Mh=t,Mh}var Rh,sw;function bA(){if(sw)return Rh;sw=1;function t(){return[]}return Rh=t,Rh}var qh,uw;function yy(){if(uw)return qh;uw=1;var t=xA(),r=bA(),i=Object.prototype,l=i.propertyIsEnumerable,o=Object.getOwnPropertySymbols,u=o?function(c){return c==null?[]:(c=Object(c),t(o(c),function(f){return l.call(c,f)}))}:r;return qh=u,qh}var Oh,cw;function v8(){if(cw)return Oh;cw=1;var t=Kl(),r=yy();function i(l,o){return t(l,r(l),o)}return Oh=i,Oh}var zh,fw;function xy(){if(fw)return zh;fw=1;function t(r,i){for(var l=-1,o=i.length,u=r.length;++l<o;)r[u+l]=i[l];return r}return zh=t,zh}var Dh,dw;function Su(){if(dw)return Dh;dw=1;var t=mA(),r=t(Object.getPrototypeOf,Object);return Dh=r,Dh}var kh,hw;function _A(){if(hw)return kh;hw=1;var t=xy(),r=Su(),i=yy(),l=bA(),o=Object.getOwnPropertySymbols,u=o?function(c){for(var f=[];c;)t(f,i(c)),c=r(c);return f}:l;return kh=u,kh}var Hh,gw;function m8(){if(gw)return Hh;gw=1;var t=Kl(),r=_A();function i(l,o){return t(l,r(l),o)}return Hh=i,Hh}var Lh,vw;function wA(){if(vw)return Lh;vw=1;var t=xy(),r=ut();function i(l,o,u){var c=o(l);return r(l)?c:t(c,u(l))}return Lh=i,Lh}var Bh,mw;function SA(){if(mw)return Bh;mw=1;var t=wA(),r=yy(),i=Br();function l(o){return t(o,i,r)}return Bh=l,Bh}var Uh,pw;function p8(){if(pw)return Uh;pw=1;var t=wA(),r=_A(),i=pa();function l(o){return t(o,i,r)}return Uh=l,Uh}var Gh,yw;function y8(){if(yw)return Gh;yw=1;var t=ma(),r=yn(),i=t(r,"DataView");return Gh=i,Gh}var Vh,xw;function x8(){if(xw)return Vh;xw=1;var t=ma(),r=yn(),i=t(r,"Promise");return Vh=i,Vh}var Yh,bw;function EA(){if(bw)return Yh;bw=1;var t=ma(),r=yn(),i=t(r,"Set");return Yh=i,Yh}var Ih,_w;function b8(){if(_w)return Ih;_w=1;var t=ma(),r=yn(),i=t(r,"WeakMap");return Ih=i,Ih}var Xh,ww;function Si(){if(ww)return Xh;ww=1;var t=y8(),r=dy(),i=x8(),l=EA(),o=b8(),u=va(),c=hA(),f="[object Map]",g="[object Object]",d="[object Promise]",m="[object Set]",p="[object WeakMap]",y="[object DataView]",b=c(t),S=c(r),N=c(i),E=c(l),C=c(o),A=u;return(t&&A(new t(new ArrayBuffer(1)))!=y||r&&A(new r)!=f||i&&A(i.resolve())!=d||l&&A(new l)!=m||o&&A(new o)!=p)&&(A=function(w){var T=u(w),q=T==g?w.constructor:void 0,R=q?c(q):"";if(R)switch(R){case b:return y;case S:return f;case N:return d;case E:return m;case C:return p}return T}),Xh=A,Xh}var Zh,Sw;function _8(){if(Sw)return Zh;Sw=1;var t=Object.prototype,r=t.hasOwnProperty;function i(l){var o=l.length,u=new l.constructor(o);return o&&typeof l[0]=="string"&&r.call(l,"index")&&(u.index=l.index,u.input=l.input),u}return Zh=i,Zh}var Fh,Ew;function NA(){if(Ew)return Fh;Ew=1;var t=yn(),r=t.Uint8Array;return Fh=r,Fh}var Kh,Nw;function by(){if(Nw)return Kh;Nw=1;var t=NA();function r(i){var l=new i.constructor(i.byteLength);return new t(l).set(new t(i)),l}return Kh=r,Kh}var Qh,Cw;function w8(){if(Cw)return Qh;Cw=1;var t=by();function r(i,l){var o=l?t(i.buffer):i.buffer;return new i.constructor(o,i.byteOffset,i.byteLength)}return Qh=r,Qh}var $h,Tw;function S8(){if(Tw)return $h;Tw=1;var t=/\w*$/;function r(i){var l=new i.constructor(i.source,t.exec(i));return l.lastIndex=i.lastIndex,l}return $h=r,$h}var Ph,Aw;function E8(){if(Aw)return Ph;Aw=1;var t=_i(),r=t?t.prototype:void 0,i=r?r.valueOf:void 0;function l(o){return i?Object(i.call(o)):{}}return Ph=l,Ph}var Jh,jw;function CA(){if(jw)return Jh;jw=1;var t=by();function r(i,l){var o=l?t(i.buffer):i.buffer;return new i.constructor(o,i.byteOffset,i.length)}return Jh=r,Jh}var Wh,Mw;function N8(){if(Mw)return Wh;Mw=1;var t=by(),r=w8(),i=S8(),l=E8(),o=CA(),u="[object Boolean]",c="[object Date]",f="[object Map]",g="[object Number]",d="[object RegExp]",m="[object Set]",p="[object String]",y="[object Symbol]",b="[object ArrayBuffer]",S="[object DataView]",N="[object Float32Array]",E="[object Float64Array]",C="[object Int8Array]",A="[object Int16Array]",w="[object Int32Array]",T="[object Uint8Array]",q="[object Uint8ClampedArray]",R="[object Uint16Array]",M="[object Uint32Array]";function L(H,Q,B){var F=H.constructor;switch(Q){case b:return t(H);case u:case c:return new F(+H);case S:return r(H,B);case N:case E:case C:case A:case w:case T:case q:case R:case M:return o(H,B);case f:return new F;case g:case p:return new F(H);case d:return i(H);case m:return new F;case y:return l(H)}}return Wh=L,Wh}var eg,Rw;function TA(){if(Rw)return eg;Rw=1;var t=nn(),r=Object.create,i=(function(){function l(){}return function(o){if(!t(o))return{};if(r)return r(o);l.prototype=o;var u=new l;return l.prototype=void 0,u}})();return eg=i,eg}var tg,qw;function AA(){if(qw)return tg;qw=1;var t=TA(),r=Su(),i=wu();function l(o){return typeof o.constructor=="function"&&!i(o)?t(r(o)):{}}return tg=l,tg}var ng,Ow;function C8(){if(Ow)return ng;Ow=1;var t=Si(),r=jn(),i="[object Map]";function l(o){return r(o)&&t(o)==i}return ng=l,ng}var rg,zw;function T8(){if(zw)return rg;zw=1;var t=C8(),r=_u(),i=my(),l=i&&i.isMap,o=l?r(l):t;return rg=o,rg}var ag,Dw;function A8(){if(Dw)return ag;Dw=1;var t=Si(),r=jn(),i="[object Set]";function l(o){return r(o)&&t(o)==i}return ag=l,ag}var ig,kw;function j8(){if(kw)return ig;kw=1;var t=A8(),r=_u(),i=my(),l=i&&i.isSet,o=l?r(l):t;return ig=o,ig}var lg,Hw;function jA(){if(Hw)return lg;Hw=1;var t=pu(),r=gy(),i=xu(),l=f8(),o=g8(),u=pA(),c=yA(),f=v8(),g=m8(),d=SA(),m=p8(),p=Si(),y=_8(),b=N8(),S=AA(),N=ut(),E=wi(),C=T8(),A=nn(),w=j8(),T=Br(),q=pa(),R=1,M=2,L=4,H="[object Arguments]",Q="[object Array]",B="[object Boolean]",F="[object Date]",W="[object Error]",D="[object Function]",K="[object GeneratorFunction]",O="[object Map]",G="[object Number]",X="[object Object]",P="[object RegExp]",oe="[object Set]",z="[object String]",Y="[object Symbol]",ae="[object WeakMap]",k="[object ArrayBuffer]",V="[object DataView]",I="[object Float32Array]",ne="[object Float64Array]",le="[object Int8Array]",fe="[object Int16Array]",he="[object Int32Array]",ye="[object Uint8Array]",xe="[object Uint8ClampedArray]",ge="[object Uint16Array]",_e="[object Uint32Array]",ve={};ve[H]=ve[Q]=ve[k]=ve[V]=ve[B]=ve[F]=ve[I]=ve[ne]=ve[le]=ve[fe]=ve[he]=ve[O]=ve[G]=ve[X]=ve[P]=ve[oe]=ve[z]=ve[Y]=ve[ye]=ve[xe]=ve[ge]=ve[_e]=!0,ve[W]=ve[D]=ve[ae]=!1;function Te(we,dt,nt,Ht,Et,yt){var $e,Pe=dt&R,an=dt&M,ln=dt&L;if(nt&&($e=Et?nt(we,Ht,Et,yt):nt(we)),$e!==void 0)return $e;if(!A(we))return we;var on=N(we);if(on){if($e=y(we),!Pe)return c(we,$e)}else{var Nt=p(we),xa=Nt==D||Nt==K;if(E(we))return u(we,Pe);if(Nt==X||Nt==H||xa&&!Et){if($e=an||xa?{}:S(we),!Pe)return an?g(we,o($e,we)):f(we,l($e,we))}else{if(!ve[Nt])return Et?we:{};$e=b(we,Nt,Pe)}}yt||(yt=new t);var Mn=yt.get(we);if(Mn)return Mn;yt.set(we,$e),w(we)?we.forEach(function(xt){$e.add(Te(xt,dt,nt,xt,we,yt))}):C(we)&&we.forEach(function(xt,Qe){$e.set(Qe,Te(xt,dt,nt,Qe,we,yt))});var Ni=ln?an?m:d:an?q:T,ba=on?void 0:Ni(we);return r(ba||we,function(xt,Qe){ba&&(Qe=xt,xt=we[Qe]),i($e,Qe,Te(xt,dt,nt,Qe,we,yt))}),$e}return lg=Te,lg}var og,Lw;function M8(){if(Lw)return og;Lw=1;var t=jA(),r=4;function i(l){return t(l,r)}return og=i,og}var sg,Bw;function _y(){if(Bw)return sg;Bw=1;function t(r){return function(){return r}}return sg=t,sg}var ug,Uw;function R8(){if(Uw)return ug;Uw=1;function t(r){return function(i,l,o){for(var u=-1,c=Object(i),f=o(i),g=f.length;g--;){var d=f[r?g:++u];if(l(c[d],d,c)===!1)break}return i}}return ug=t,ug}var cg,Gw;function wy(){if(Gw)return cg;Gw=1;var t=R8(),r=t();return cg=r,cg}var fg,Vw;function Sy(){if(Vw)return fg;Vw=1;var t=wy(),r=Br();function i(l,o){return l&&t(l,o,r)}return fg=i,fg}var dg,Yw;function q8(){if(Yw)return dg;Yw=1;var t=ar();function r(i,l){return function(o,u){if(o==null)return o;if(!t(o))return i(o,u);for(var c=o.length,f=l?c:-1,g=Object(o);(l?f--:++f<c)&&u(g[f],f,g)!==!1;);return o}}return dg=r,dg}var hg,Iw;function Eu(){if(Iw)return hg;Iw=1;var t=Sy(),r=q8(),i=r(t);return hg=i,hg}var gg,Xw;function ya(){if(Xw)return gg;Xw=1;function t(r){return r}return gg=t,gg}var vg,Zw;function MA(){if(Zw)return vg;Zw=1;var t=ya();function r(i){return typeof i=="function"?i:t}return vg=r,vg}var mg,Fw;function RA(){if(Fw)return mg;Fw=1;var t=gy(),r=Eu(),i=MA(),l=ut();function o(u,c){var f=l(u)?t:r;return f(u,i(c))}return mg=o,mg}var pg,Kw;function qA(){return Kw||(Kw=1,pg=RA()),pg}var yg,Qw;function O8(){if(Qw)return yg;Qw=1;var t=Eu();function r(i,l){var o=[];return t(i,function(u,c,f){l(u,c,f)&&o.push(u)}),o}return yg=r,yg}var xg,$w;function z8(){if($w)return xg;$w=1;var t="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,t),this}return xg=r,xg}var bg,Pw;function D8(){if(Pw)return bg;Pw=1;function t(r){return this.__data__.has(r)}return bg=t,bg}var _g,Jw;function OA(){if(Jw)return _g;Jw=1;var t=hy(),r=z8(),i=D8();function l(o){var u=-1,c=o==null?0:o.length;for(this.__data__=new t;++u<c;)this.add(o[u])}return l.prototype.add=l.prototype.push=r,l.prototype.has=i,_g=l,_g}var wg,Ww;function k8(){if(Ww)return wg;Ww=1;function t(r,i){for(var l=-1,o=r==null?0:r.length;++l<o;)if(i(r[l],l,r))return!0;return!1}return wg=t,wg}var Sg,eS;function zA(){if(eS)return Sg;eS=1;function t(r,i){return r.has(i)}return Sg=t,Sg}var Eg,tS;function DA(){if(tS)return Eg;tS=1;var t=OA(),r=k8(),i=zA(),l=1,o=2;function u(c,f,g,d,m,p){var y=g&l,b=c.length,S=f.length;if(b!=S&&!(y&&S>b))return!1;var N=p.get(c),E=p.get(f);if(N&&E)return N==f&&E==c;var C=-1,A=!0,w=g&o?new t:void 0;for(p.set(c,f),p.set(f,c);++C<b;){var T=c[C],q=f[C];if(d)var R=y?d(q,T,C,f,c,p):d(T,q,C,c,f,p);if(R!==void 0){if(R)continue;A=!1;break}if(w){if(!r(f,function(M,L){if(!i(w,L)&&(T===M||m(T,M,g,d,p)))return w.push(L)})){A=!1;break}}else if(!(T===q||m(T,q,g,d,p))){A=!1;break}}return p.delete(c),p.delete(f),A}return Eg=u,Eg}var Ng,nS;function H8(){if(nS)return Ng;nS=1;function t(r){var i=-1,l=Array(r.size);return r.forEach(function(o,u){l[++i]=[u,o]}),l}return Ng=t,Ng}var Cg,rS;function Ey(){if(rS)return Cg;rS=1;function t(r){var i=-1,l=Array(r.size);return r.forEach(function(o){l[++i]=o}),l}return Cg=t,Cg}var Tg,aS;function L8(){if(aS)return Tg;aS=1;var t=_i(),r=NA(),i=bi(),l=DA(),o=H8(),u=Ey(),c=1,f=2,g="[object Boolean]",d="[object Date]",m="[object Error]",p="[object Map]",y="[object Number]",b="[object RegExp]",S="[object Set]",N="[object String]",E="[object Symbol]",C="[object ArrayBuffer]",A="[object DataView]",w=t?t.prototype:void 0,T=w?w.valueOf:void 0;function q(R,M,L,H,Q,B,F){switch(L){case A:if(R.byteLength!=M.byteLength||R.byteOffset!=M.byteOffset)return!1;R=R.buffer,M=M.buffer;case C:return!(R.byteLength!=M.byteLength||!B(new r(R),new r(M)));case g:case d:case y:return i(+R,+M);case m:return R.name==M.name&&R.message==M.message;case b:case N:return R==M+"";case p:var W=o;case S:var D=H&c;if(W||(W=u),R.size!=M.size&&!D)return!1;var K=F.get(R);if(K)return K==M;H|=f,F.set(R,M);var O=l(W(R),W(M),H,Q,B,F);return F.delete(R),O;case E:if(T)return T.call(R)==T.call(M)}return!1}return Tg=q,Tg}var Ag,iS;function B8(){if(iS)return Ag;iS=1;var t=SA(),r=1,i=Object.prototype,l=i.hasOwnProperty;function o(u,c,f,g,d,m){var p=f&r,y=t(u),b=y.length,S=t(c),N=S.length;if(b!=N&&!p)return!1;for(var E=b;E--;){var C=y[E];if(!(p?C in c:l.call(c,C)))return!1}var A=m.get(u),w=m.get(c);if(A&&w)return A==c&&w==u;var T=!0;m.set(u,c),m.set(c,u);for(var q=p;++E<b;){C=y[E];var R=u[C],M=c[C];if(g)var L=p?g(M,R,C,c,u,m):g(R,M,C,u,c,m);if(!(L===void 0?R===M||d(R,M,f,g,m):L)){T=!1;break}q||(q=C=="constructor")}if(T&&!q){var H=u.constructor,Q=c.constructor;H!=Q&&"constructor"in u&&"constructor"in c&&!(typeof H=="function"&&H instanceof H&&typeof Q=="function"&&Q instanceof Q)&&(T=!1)}return m.delete(u),m.delete(c),T}return Ag=o,Ag}var jg,lS;function U8(){if(lS)return jg;lS=1;var t=pu(),r=DA(),i=L8(),l=B8(),o=Si(),u=ut(),c=wi(),f=$l(),g=1,d="[object Arguments]",m="[object Array]",p="[object Object]",y=Object.prototype,b=y.hasOwnProperty;function S(N,E,C,A,w,T){var q=u(N),R=u(E),M=q?m:o(N),L=R?m:o(E);M=M==d?p:M,L=L==d?p:L;var H=M==p,Q=L==p,B=M==L;if(B&&c(N)){if(!c(E))return!1;q=!0,H=!1}if(B&&!H)return T||(T=new t),q||f(N)?r(N,E,C,A,w,T):i(N,E,M,C,A,w,T);if(!(C&g)){var F=H&&b.call(N,"__wrapped__"),W=Q&&b.call(E,"__wrapped__");if(F||W){var D=F?N.value():N,K=W?E.value():E;return T||(T=new t),w(D,K,C,A,T)}}return B?(T||(T=new t),l(N,E,C,A,w,T)):!1}return jg=S,jg}var Mg,oS;function kA(){if(oS)return Mg;oS=1;var t=U8(),r=jn();function i(l,o,u,c,f){return l===o?!0:l==null||o==null||!r(l)&&!r(o)?l!==l&&o!==o:t(l,o,u,c,i,f)}return Mg=i,Mg}var Rg,sS;function G8(){if(sS)return Rg;sS=1;var t=pu(),r=kA(),i=1,l=2;function o(u,c,f,g){var d=f.length,m=d,p=!g;if(u==null)return!m;for(u=Object(u);d--;){var y=f[d];if(p&&y[2]?y[1]!==u[y[0]]:!(y[0]in u))return!1}for(;++d<m;){y=f[d];var b=y[0],S=u[b],N=y[1];if(p&&y[2]){if(S===void 0&&!(b in u))return!1}else{var E=new t;if(g)var C=g(S,N,b,u,c,E);if(!(C===void 0?r(N,S,i|l,g,E):C))return!1}}return!0}return Rg=o,Rg}var qg,uS;function HA(){if(uS)return qg;uS=1;var t=nn();function r(i){return i===i&&!t(i)}return qg=r,qg}var Og,cS;function V8(){if(cS)return Og;cS=1;var t=HA(),r=Br();function i(l){for(var o=r(l),u=o.length;u--;){var c=o[u],f=l[c];o[u]=[c,f,t(f)]}return o}return Og=i,Og}var zg,fS;function LA(){if(fS)return zg;fS=1;function t(r,i){return function(l){return l==null?!1:l[r]===i&&(i!==void 0||r in Object(l))}}return zg=t,zg}var Dg,dS;function Y8(){if(dS)return Dg;dS=1;var t=G8(),r=V8(),i=LA();function l(o){var u=r(o);return u.length==1&&u[0][2]?i(u[0][0],u[0][1]):function(c){return c===o||t(c,o,u)}}return Dg=l,Dg}var kg,hS;function Ei(){if(hS)return kg;hS=1;var t=va(),r=jn(),i="[object Symbol]";function l(o){return typeof o=="symbol"||r(o)&&t(o)==i}return kg=l,kg}var Hg,gS;function Ny(){if(gS)return Hg;gS=1;var t=ut(),r=Ei(),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/;function o(u,c){if(t(u))return!1;var f=typeof u;return f=="number"||f=="symbol"||f=="boolean"||u==null||r(u)?!0:l.test(u)||!i.test(u)||c!=null&&u in Object(c)}return Hg=o,Hg}var Lg,vS;function I8(){if(vS)return Lg;vS=1;var t=hy(),r="Expected a function";function i(l,o){if(typeof l!="function"||o!=null&&typeof o!="function")throw new TypeError(r);var u=function(){var c=arguments,f=o?o.apply(this,c):c[0],g=u.cache;if(g.has(f))return g.get(f);var d=l.apply(this,c);return u.cache=g.set(f,d)||g,d};return u.cache=new(i.Cache||t),u}return i.Cache=t,Lg=i,Lg}var Bg,mS;function X8(){if(mS)return Bg;mS=1;var t=I8(),r=500;function i(l){var o=t(l,function(c){return u.size===r&&u.clear(),c}),u=o.cache;return o}return Bg=i,Bg}var Ug,pS;function Z8(){if(pS)return Ug;pS=1;var t=X8(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,l=t(function(o){var u=[];return o.charCodeAt(0)===46&&u.push(""),o.replace(r,function(c,f,g,d){u.push(g?d.replace(i,"$1"):f||c)}),u});return Ug=l,Ug}var Gg,yS;function Nu(){if(yS)return Gg;yS=1;function t(r,i){for(var l=-1,o=r==null?0:r.length,u=Array(o);++l<o;)u[l]=i(r[l],l,r);return u}return Gg=t,Gg}var Vg,xS;function F8(){if(xS)return Vg;xS=1;var t=_i(),r=Nu(),i=ut(),l=Ei(),o=t?t.prototype:void 0,u=o?o.toString:void 0;function c(f){if(typeof f=="string")return f;if(i(f))return r(f,c)+"";if(l(f))return u?u.call(f):"";var g=f+"";return g=="0"&&1/f==-1/0?"-0":g}return Vg=c,Vg}var Yg,bS;function BA(){if(bS)return Yg;bS=1;var t=F8();function r(i){return i==null?"":t(i)}return Yg=r,Yg}var Ig,_S;function Cu(){if(_S)return Ig;_S=1;var t=ut(),r=Ny(),i=Z8(),l=BA();function o(u,c){return t(u)?u:r(u,c)?[u]:i(l(u))}return Ig=o,Ig}var Xg,wS;function Pl(){if(wS)return Xg;wS=1;var t=Ei();function r(i){if(typeof i=="string"||t(i))return i;var l=i+"";return l=="0"&&1/i==-1/0?"-0":l}return Xg=r,Xg}var Zg,SS;function Tu(){if(SS)return Zg;SS=1;var t=Cu(),r=Pl();function i(l,o){o=t(o,l);for(var u=0,c=o.length;l!=null&&u<c;)l=l[r(o[u++])];return u&&u==c?l:void 0}return Zg=i,Zg}var Fg,ES;function K8(){if(ES)return Fg;ES=1;var t=Tu();function r(i,l,o){var u=i==null?void 0:t(i,l);return u===void 0?o:u}return Fg=r,Fg}var Kg,NS;function Q8(){if(NS)return Kg;NS=1;function t(r,i){return r!=null&&i in Object(r)}return Kg=t,Kg}var Qg,CS;function UA(){if(CS)return Qg;CS=1;var t=Cu(),r=Ql(),i=ut(),l=bu(),o=vy(),u=Pl();function c(f,g,d){g=t(g,f);for(var m=-1,p=g.length,y=!1;++m<p;){var b=u(g[m]);if(!(y=f!=null&&d(f,b)))break;f=f[b]}return y||++m!=p?y:(p=f==null?0:f.length,!!p&&o(p)&&l(b,p)&&(i(f)||r(f)))}return Qg=c,Qg}var $g,TS;function GA(){if(TS)return $g;TS=1;var t=Q8(),r=UA();function i(l,o){return l!=null&&r(l,o,t)}return $g=i,$g}var Pg,AS;function $8(){if(AS)return Pg;AS=1;var t=kA(),r=K8(),i=GA(),l=Ny(),o=HA(),u=LA(),c=Pl(),f=1,g=2;function d(m,p){return l(m)&&o(p)?u(c(m),p):function(y){var b=r(y,m);return b===void 0&&b===p?i(y,m):t(p,b,f|g)}}return Pg=d,Pg}var Jg,jS;function VA(){if(jS)return Jg;jS=1;function t(r){return function(i){return i?.[r]}}return Jg=t,Jg}var Wg,MS;function P8(){if(MS)return Wg;MS=1;var t=Tu();function r(i){return function(l){return t(l,i)}}return Wg=r,Wg}var ev,RS;function J8(){if(RS)return ev;RS=1;var t=VA(),r=P8(),i=Ny(),l=Pl();function o(u){return i(u)?t(l(u)):r(u)}return ev=o,ev}var tv,qS;function ir(){if(qS)return tv;qS=1;var t=Y8(),r=$8(),i=ya(),l=ut(),o=J8();function u(c){return typeof c=="function"?c:c==null?i:typeof c=="object"?l(c)?r(c[0],c[1]):t(c):o(c)}return tv=u,tv}var nv,OS;function YA(){if(OS)return nv;OS=1;var t=xA(),r=O8(),i=ir(),l=ut();function o(u,c){var f=l(u)?t:r;return f(u,i(c,3))}return nv=o,nv}var rv,zS;function W8(){if(zS)return rv;zS=1;var t=Object.prototype,r=t.hasOwnProperty;function i(l,o){return l!=null&&r.call(l,o)}return rv=i,rv}var av,DS;function IA(){if(DS)return av;DS=1;var t=W8(),r=UA();function i(l,o){return l!=null&&r(l,o,t)}return av=i,av}var iv,kS;function ek(){if(kS)return iv;kS=1;var t=py(),r=Si(),i=Ql(),l=ut(),o=ar(),u=wi(),c=wu(),f=$l(),g="[object Map]",d="[object Set]",m=Object.prototype,p=m.hasOwnProperty;function y(b){if(b==null)return!0;if(o(b)&&(l(b)||typeof b=="string"||typeof b.splice=="function"||u(b)||f(b)||i(b)))return!b.length;var S=r(b);if(S==g||S==d)return!b.size;if(c(b))return!t(b).length;for(var N in b)if(p.call(b,N))return!1;return!0}return iv=y,iv}var lv,HS;function XA(){if(HS)return lv;HS=1;function t(r){return r===void 0}return lv=t,lv}var ov,LS;function ZA(){if(LS)return ov;LS=1;var t=Eu(),r=ar();function i(l,o){var u=-1,c=r(l)?Array(l.length):[];return t(l,function(f,g,d){c[++u]=o(f,g,d)}),c}return ov=i,ov}var sv,BS;function FA(){if(BS)return sv;BS=1;var t=Nu(),r=ir(),i=ZA(),l=ut();function o(u,c){var f=l(u)?t:i;return f(u,r(c,3))}return sv=o,sv}var uv,US;function tk(){if(US)return uv;US=1;function t(r,i,l,o){var u=-1,c=r==null?0:r.length;for(o&&c&&(l=r[++u]);++u<c;)l=i(l,r[u],u,r);return l}return uv=t,uv}var cv,GS;function nk(){if(GS)return cv;GS=1;function t(r,i,l,o,u){return u(r,function(c,f,g){l=o?(o=!1,c):i(l,c,f,g)}),l}return cv=t,cv}var fv,VS;function KA(){if(VS)return fv;VS=1;var t=tk(),r=Eu(),i=ir(),l=nk(),o=ut();function u(c,f,g){var d=o(c)?t:l,m=arguments.length<3;return d(c,i(f,4),g,m,r)}return fv=u,fv}var dv,YS;function rk(){if(YS)return dv;YS=1;var t=va(),r=ut(),i=jn(),l="[object String]";function o(u){return typeof u=="string"||!r(u)&&i(u)&&t(u)==l}return dv=o,dv}var hv,IS;function ak(){if(IS)return hv;IS=1;var t=VA(),r=t("length");return hv=r,hv}var gv,XS;function ik(){if(XS)return gv;XS=1;var t="\\ud800-\\udfff",r="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",l="\\u20d0-\\u20ff",o=r+i+l,u="\\ufe0e\\ufe0f",c="\\u200d",f=RegExp("["+c+t+o+u+"]");function g(d){return f.test(d)}return gv=g,gv}var vv,ZS;function lk(){if(ZS)return vv;ZS=1;var t="\\ud800-\\udfff",r="\\u0300-\\u036f",i="\\ufe20-\\ufe2f",l="\\u20d0-\\u20ff",o=r+i+l,u="\\ufe0e\\ufe0f",c="["+t+"]",f="["+o+"]",g="\\ud83c[\\udffb-\\udfff]",d="(?:"+f+"|"+g+")",m="[^"+t+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",y="[\\ud800-\\udbff][\\udc00-\\udfff]",b="\\u200d",S=d+"?",N="["+u+"]?",E="(?:"+b+"(?:"+[m,p,y].join("|")+")"+N+S+")*",C=N+S+E,A="(?:"+[m+f+"?",f,p,y,c].join("|")+")",w=RegExp(g+"(?="+g+")|"+A+C,"g");function T(q){for(var R=w.lastIndex=0;w.test(q);)++R;return R}return vv=T,vv}var mv,FS;function ok(){if(FS)return mv;FS=1;var t=ak(),r=ik(),i=lk();function l(o){return r(o)?i(o):t(o)}return mv=l,mv}var pv,KS;function sk(){if(KS)return pv;KS=1;var t=py(),r=Si(),i=ar(),l=rk(),o=ok(),u="[object Map]",c="[object Set]";function f(g){if(g==null)return 0;if(i(g))return l(g)?o(g):g.length;var d=r(g);return d==u||d==c?g.size:t(g).length}return pv=f,pv}var yv,QS;function uk(){if(QS)return yv;QS=1;var t=gy(),r=TA(),i=Sy(),l=ir(),o=Su(),u=ut(),c=wi(),f=Fl(),g=nn(),d=$l();function m(p,y,b){var S=u(p),N=S||c(p)||d(p);if(y=l(y,4),b==null){var E=p&&p.constructor;N?b=S?new E:[]:g(p)?b=f(E)?r(o(p)):{}:b={}}return(N?t:i)(p,function(C,A,w){return y(b,C,A,w)}),b}return yv=m,yv}var xv,$S;function ck(){if($S)return xv;$S=1;var t=_i(),r=Ql(),i=ut(),l=t?t.isConcatSpreadable:void 0;function o(u){return i(u)||r(u)||!!(l&&u&&u[l])}return xv=o,xv}var bv,PS;function Cy(){if(PS)return bv;PS=1;var t=xy(),r=ck();function i(l,o,u,c,f){var g=-1,d=l.length;for(u||(u=r),f||(f=[]);++g<d;){var m=l[g];o>0&&u(m)?o>1?i(m,o-1,u,c,f):t(f,m):c||(f[f.length]=m)}return f}return bv=i,bv}var _v,JS;function fk(){if(JS)return _v;JS=1;function t(r,i,l){switch(l.length){case 0:return r.call(i);case 1:return r.call(i,l[0]);case 2:return r.call(i,l[0],l[1]);case 3:return r.call(i,l[0],l[1],l[2])}return r.apply(i,l)}return _v=t,_v}var wv,WS;function QA(){if(WS)return wv;WS=1;var t=fk(),r=Math.max;function i(l,o,u){return o=r(o===void 0?l.length-1:o,0),function(){for(var c=arguments,f=-1,g=r(c.length-o,0),d=Array(g);++f<g;)d[f]=c[o+f];f=-1;for(var m=Array(o+1);++f<o;)m[f]=c[f];return m[o]=u(d),t(l,this,m)}}return wv=i,wv}var Sv,eE;function dk(){if(eE)return Sv;eE=1;var t=_y(),r=gA(),i=ya(),l=r?function(o,u){return r(o,"toString",{configurable:!0,enumerable:!1,value:t(u),writable:!0})}:i;return Sv=l,Sv}var Ev,tE;function hk(){if(tE)return Ev;tE=1;var t=800,r=16,i=Date.now;function l(o){var u=0,c=0;return function(){var f=i(),g=r-(f-c);if(c=f,g>0){if(++u>=t)return arguments[0]}else u=0;return o.apply(void 0,arguments)}}return Ev=l,Ev}var Nv,nE;function $A(){if(nE)return Nv;nE=1;var t=dk(),r=hk(),i=r(t);return Nv=i,Nv}var Cv,rE;function Au(){if(rE)return Cv;rE=1;var t=ya(),r=QA(),i=$A();function l(o,u){return i(r(o,u,t),o+"")}return Cv=l,Cv}var Tv,aE;function PA(){if(aE)return Tv;aE=1;function t(r,i,l,o){for(var u=r.length,c=l+(o?1:-1);o?c--:++c<u;)if(i(r[c],c,r))return c;return-1}return Tv=t,Tv}var Av,iE;function gk(){if(iE)return Av;iE=1;function t(r){return r!==r}return Av=t,Av}var jv,lE;function vk(){if(lE)return jv;lE=1;function t(r,i,l){for(var o=l-1,u=r.length;++o<u;)if(r[o]===i)return o;return-1}return jv=t,jv}var Mv,oE;function mk(){if(oE)return Mv;oE=1;var t=PA(),r=gk(),i=vk();function l(o,u,c){return u===u?i(o,u,c):t(o,r,c)}return Mv=l,Mv}var Rv,sE;function pk(){if(sE)return Rv;sE=1;var t=mk();function r(i,l){var o=i==null?0:i.length;return!!o&&t(i,l,0)>-1}return Rv=r,Rv}var qv,uE;function yk(){if(uE)return qv;uE=1;function t(r,i,l){for(var o=-1,u=r==null?0:r.length;++o<u;)if(l(i,r[o]))return!0;return!1}return qv=t,qv}var Ov,cE;function xk(){if(cE)return Ov;cE=1;function t(){}return Ov=t,Ov}var zv,fE;function bk(){if(fE)return zv;fE=1;var t=EA(),r=xk(),i=Ey(),l=1/0,o=t&&1/i(new t([,-0]))[1]==l?function(u){return new t(u)}:r;return zv=o,zv}var Dv,dE;function _k(){if(dE)return Dv;dE=1;var t=OA(),r=pk(),i=yk(),l=zA(),o=bk(),u=Ey(),c=200;function f(g,d,m){var p=-1,y=r,b=g.length,S=!0,N=[],E=N;if(m)S=!1,y=i;else if(b>=c){var C=d?null:o(g);if(C)return u(C);S=!1,y=l,E=new t}else E=d?[]:N;e:for(;++p<b;){var A=g[p],w=d?d(A):A;if(A=m||A!==0?A:0,S&&w===w){for(var T=E.length;T--;)if(E[T]===w)continue e;d&&E.push(w),N.push(A)}else y(E,w,m)||(E!==N&&E.push(w),N.push(A))}return N}return Dv=f,Dv}var kv,hE;function JA(){if(hE)return kv;hE=1;var t=ar(),r=jn();function i(l){return r(l)&&t(l)}return kv=i,kv}var Hv,gE;function wk(){if(gE)return Hv;gE=1;var t=Cy(),r=Au(),i=_k(),l=JA(),o=r(function(u){return i(t(u,1,l,!0))});return Hv=o,Hv}var Lv,vE;function Sk(){if(vE)return Lv;vE=1;var t=Nu();function r(i,l){return t(l,function(o){return i[o]})}return Lv=r,Lv}var Bv,mE;function WA(){if(mE)return Bv;mE=1;var t=Sk(),r=Br();function i(l){return l==null?[]:t(l,r(l))}return Bv=i,Bv}var Uv,pE;function rn(){if(pE)return Uv;pE=1;var t;if(typeof fy=="function")try{t={clone:M8(),constant:_y(),each:qA(),filter:YA(),has:IA(),isArray:ut(),isEmpty:ek(),isFunction:Fl(),isUndefined:XA(),keys:Br(),map:FA(),reduce:KA(),size:sk(),transform:uk(),union:wk(),values:WA()}}catch{}return t||(t=window._),Uv=t,Uv}var Gv,yE;function Ty(){if(yE)return Gv;yE=1;var t=rn();Gv=o;var r="\0",i="\0",l="";function o(m){this._isDirected=t.has(m,"directed")?m.directed:!0,this._isMultigraph=t.has(m,"multigraph")?m.multigraph:!1,this._isCompound=t.has(m,"compound")?m.compound:!1,this._label=void 0,this._defaultNodeLabelFn=t.constant(void 0),this._defaultEdgeLabelFn=t.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[i]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}o.prototype._nodeCount=0,o.prototype._edgeCount=0,o.prototype.isDirected=function(){return this._isDirected},o.prototype.isMultigraph=function(){return this._isMultigraph},o.prototype.isCompound=function(){return this._isCompound},o.prototype.setGraph=function(m){return this._label=m,this},o.prototype.graph=function(){return this._label},o.prototype.setDefaultNodeLabel=function(m){return t.isFunction(m)||(m=t.constant(m)),this._defaultNodeLabelFn=m,this},o.prototype.nodeCount=function(){return this._nodeCount},o.prototype.nodes=function(){return t.keys(this._nodes)},o.prototype.sources=function(){var m=this;return t.filter(this.nodes(),function(p){return t.isEmpty(m._in[p])})},o.prototype.sinks=function(){var m=this;return t.filter(this.nodes(),function(p){return t.isEmpty(m._out[p])})},o.prototype.setNodes=function(m,p){var y=arguments,b=this;return t.each(m,function(S){y.length>1?b.setNode(S,p):b.setNode(S)}),this},o.prototype.setNode=function(m,p){return t.has(this._nodes,m)?(arguments.length>1&&(this._nodes[m]=p),this):(this._nodes[m]=arguments.length>1?p:this._defaultNodeLabelFn(m),this._isCompound&&(this._parent[m]=i,this._children[m]={},this._children[i][m]=!0),this._in[m]={},this._preds[m]={},this._out[m]={},this._sucs[m]={},++this._nodeCount,this)},o.prototype.node=function(m){return this._nodes[m]},o.prototype.hasNode=function(m){return t.has(this._nodes,m)},o.prototype.removeNode=function(m){var p=this;if(t.has(this._nodes,m)){var y=function(b){p.removeEdge(p._edgeObjs[b])};delete this._nodes[m],this._isCompound&&(this._removeFromParentsChildList(m),delete this._parent[m],t.each(this.children(m),function(b){p.setParent(b)}),delete this._children[m]),t.each(t.keys(this._in[m]),y),delete this._in[m],delete this._preds[m],t.each(t.keys(this._out[m]),y),delete this._out[m],delete this._sucs[m],--this._nodeCount}return this},o.prototype.setParent=function(m,p){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(t.isUndefined(p))p=i;else{p+="";for(var y=p;!t.isUndefined(y);y=this.parent(y))if(y===m)throw new Error("Setting "+p+" as parent of "+m+" would create a cycle");this.setNode(p)}return this.setNode(m),this._removeFromParentsChildList(m),this._parent[m]=p,this._children[p][m]=!0,this},o.prototype._removeFromParentsChildList=function(m){delete this._children[this._parent[m]][m]},o.prototype.parent=function(m){if(this._isCompound){var p=this._parent[m];if(p!==i)return p}},o.prototype.children=function(m){if(t.isUndefined(m)&&(m=i),this._isCompound){var p=this._children[m];if(p)return t.keys(p)}else{if(m===i)return this.nodes();if(this.hasNode(m))return[]}},o.prototype.predecessors=function(m){var p=this._preds[m];if(p)return t.keys(p)},o.prototype.successors=function(m){var p=this._sucs[m];if(p)return t.keys(p)},o.prototype.neighbors=function(m){var p=this.predecessors(m);if(p)return t.union(p,this.successors(m))},o.prototype.isLeaf=function(m){var p;return this.isDirected()?p=this.successors(m):p=this.neighbors(m),p.length===0},o.prototype.filterNodes=function(m){var p=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});p.setGraph(this.graph());var y=this;t.each(this._nodes,function(N,E){m(E)&&p.setNode(E,N)}),t.each(this._edgeObjs,function(N){p.hasNode(N.v)&&p.hasNode(N.w)&&p.setEdge(N,y.edge(N))});var b={};function S(N){var E=y.parent(N);return E===void 0||p.hasNode(E)?(b[N]=E,E):E in b?b[E]:S(E)}return this._isCompound&&t.each(p.nodes(),function(N){p.setParent(N,S(N))}),p},o.prototype.setDefaultEdgeLabel=function(m){return t.isFunction(m)||(m=t.constant(m)),this._defaultEdgeLabelFn=m,this},o.prototype.edgeCount=function(){return this._edgeCount},o.prototype.edges=function(){return t.values(this._edgeObjs)},o.prototype.setPath=function(m,p){var y=this,b=arguments;return t.reduce(m,function(S,N){return b.length>1?y.setEdge(S,N,p):y.setEdge(S,N),N}),this},o.prototype.setEdge=function(){var m,p,y,b,S=!1,N=arguments[0];typeof N=="object"&&N!==null&&"v"in N?(m=N.v,p=N.w,y=N.name,arguments.length===2&&(b=arguments[1],S=!0)):(m=N,p=arguments[1],y=arguments[3],arguments.length>2&&(b=arguments[2],S=!0)),m=""+m,p=""+p,t.isUndefined(y)||(y=""+y);var E=f(this._isDirected,m,p,y);if(t.has(this._edgeLabels,E))return S&&(this._edgeLabels[E]=b),this;if(!t.isUndefined(y)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(m),this.setNode(p),this._edgeLabels[E]=S?b:this._defaultEdgeLabelFn(m,p,y);var C=g(this._isDirected,m,p,y);return m=C.v,p=C.w,Object.freeze(C),this._edgeObjs[E]=C,u(this._preds[p],m),u(this._sucs[m],p),this._in[p][E]=C,this._out[m][E]=C,this._edgeCount++,this},o.prototype.edge=function(m,p,y){var b=arguments.length===1?d(this._isDirected,arguments[0]):f(this._isDirected,m,p,y);return this._edgeLabels[b]},o.prototype.hasEdge=function(m,p,y){var b=arguments.length===1?d(this._isDirected,arguments[0]):f(this._isDirected,m,p,y);return t.has(this._edgeLabels,b)},o.prototype.removeEdge=function(m,p,y){var b=arguments.length===1?d(this._isDirected,arguments[0]):f(this._isDirected,m,p,y),S=this._edgeObjs[b];return S&&(m=S.v,p=S.w,delete this._edgeLabels[b],delete this._edgeObjs[b],c(this._preds[p],m),c(this._sucs[m],p),delete this._in[p][b],delete this._out[m][b],this._edgeCount--),this},o.prototype.inEdges=function(m,p){var y=this._in[m];if(y){var b=t.values(y);return p?t.filter(b,function(S){return S.v===p}):b}},o.prototype.outEdges=function(m,p){var y=this._out[m];if(y){var b=t.values(y);return p?t.filter(b,function(S){return S.w===p}):b}},o.prototype.nodeEdges=function(m,p){var y=this.inEdges(m,p);if(y)return y.concat(this.outEdges(m,p))};function u(m,p){m[p]?m[p]++:m[p]=1}function c(m,p){--m[p]||delete m[p]}function f(m,p,y,b){var S=""+p,N=""+y;if(!m&&S>N){var E=S;S=N,N=E}return S+l+N+l+(t.isUndefined(b)?r:b)}function g(m,p,y,b){var S=""+p,N=""+y;if(!m&&S>N){var E=S;S=N,N=E}var C={v:S,w:N};return b&&(C.name=b),C}function d(m,p){return f(m,p.v,p.w,p.name)}return Gv}var Vv,xE;function Ek(){return xE||(xE=1,Vv="2.1.8"),Vv}var Yv,bE;function Nk(){return bE||(bE=1,Yv={Graph:Ty(),version:Ek()}),Yv}var Iv,_E;function Ck(){if(_E)return Iv;_E=1;var t=rn(),r=Ty();Iv={write:i,read:u};function i(c){var f={options:{directed:c.isDirected(),multigraph:c.isMultigraph(),compound:c.isCompound()},nodes:l(c),edges:o(c)};return t.isUndefined(c.graph())||(f.value=t.clone(c.graph())),f}function l(c){return t.map(c.nodes(),function(f){var g=c.node(f),d=c.parent(f),m={v:f};return t.isUndefined(g)||(m.value=g),t.isUndefined(d)||(m.parent=d),m})}function o(c){return t.map(c.edges(),function(f){var g=c.edge(f),d={v:f.v,w:f.w};return t.isUndefined(f.name)||(d.name=f.name),t.isUndefined(g)||(d.value=g),d})}function u(c){var f=new r(c.options).setGraph(c.value);return t.each(c.nodes,function(g){f.setNode(g.v,g.value),g.parent&&f.setParent(g.v,g.parent)}),t.each(c.edges,function(g){f.setEdge({v:g.v,w:g.w,name:g.name},g.value)}),f}return Iv}var Xv,wE;function Tk(){if(wE)return Xv;wE=1;var t=rn();Xv=r;function r(i){var l={},o=[],u;function c(f){t.has(l,f)||(l[f]=!0,u.push(f),t.each(i.successors(f),c),t.each(i.predecessors(f),c))}return t.each(i.nodes(),function(f){u=[],c(f),u.length&&o.push(u)}),o}return Xv}var Zv,SE;function ej(){if(SE)return Zv;SE=1;var t=rn();Zv=r;function r(){this._arr=[],this._keyIndices={}}return r.prototype.size=function(){return this._arr.length},r.prototype.keys=function(){return this._arr.map(function(i){return i.key})},r.prototype.has=function(i){return t.has(this._keyIndices,i)},r.prototype.priority=function(i){var l=this._keyIndices[i];if(l!==void 0)return this._arr[l].priority},r.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},r.prototype.add=function(i,l){var o=this._keyIndices;if(i=String(i),!t.has(o,i)){var u=this._arr,c=u.length;return o[i]=c,u.push({key:i,priority:l}),this._decrease(c),!0}return!1},r.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var i=this._arr.pop();return delete this._keyIndices[i.key],this._heapify(0),i.key},r.prototype.decrease=function(i,l){var o=this._keyIndices[i];if(l>this._arr[o].priority)throw new Error("New priority is greater than current priority. Key: "+i+" Old: "+this._arr[o].priority+" New: "+l);this._arr[o].priority=l,this._decrease(o)},r.prototype._heapify=function(i){var l=this._arr,o=2*i,u=o+1,c=i;o<l.length&&(c=l[o].priority<l[c].priority?o:c,u<l.length&&(c=l[u].priority<l[c].priority?u:c),c!==i&&(this._swap(i,c),this._heapify(c)))},r.prototype._decrease=function(i){for(var l=this._arr,o=l[i].priority,u;i!==0&&(u=i>>1,!(l[u].priority<o));)this._swap(i,u),i=u},r.prototype._swap=function(i,l){var o=this._arr,u=this._keyIndices,c=o[i],f=o[l];o[i]=f,o[l]=c,u[f.key]=i,u[c.key]=l},Zv}var Fv,EE;function tj(){if(EE)return Fv;EE=1;var t=rn(),r=ej();Fv=l;var i=t.constant(1);function l(u,c,f,g){return o(u,String(c),f||i,g||function(d){return u.outEdges(d)})}function o(u,c,f,g){var d={},m=new r,p,y,b=function(S){var N=S.v!==p?S.v:S.w,E=d[N],C=f(S),A=y.distance+C;if(C<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+S+" Weight: "+C);A<E.distance&&(E.distance=A,E.predecessor=p,m.decrease(N,A))};for(u.nodes().forEach(function(S){var N=S===c?0:Number.POSITIVE_INFINITY;d[S]={distance:N},m.add(S,N)});m.size()>0&&(p=m.removeMin(),y=d[p],y.distance!==Number.POSITIVE_INFINITY);)g(p).forEach(b);return d}return Fv}var Kv,NE;function Ak(){if(NE)return Kv;NE=1;var t=tj(),r=rn();Kv=i;function i(l,o,u){return r.transform(l.nodes(),function(c,f){c[f]=t(l,f,o,u)},{})}return Kv}var Qv,CE;function nj(){if(CE)return Qv;CE=1;var t=rn();Qv=r;function r(i){var l=0,o=[],u={},c=[];function f(g){var d=u[g]={onStack:!0,lowlink:l,index:l++};if(o.push(g),i.successors(g).forEach(function(y){t.has(u,y)?u[y].onStack&&(d.lowlink=Math.min(d.lowlink,u[y].index)):(f(y),d.lowlink=Math.min(d.lowlink,u[y].lowlink))}),d.lowlink===d.index){var m=[],p;do p=o.pop(),u[p].onStack=!1,m.push(p);while(g!==p);c.push(m)}}return i.nodes().forEach(function(g){t.has(u,g)||f(g)}),c}return Qv}var $v,TE;function jk(){if(TE)return $v;TE=1;var t=rn(),r=nj();$v=i;function i(l){return t.filter(r(l),function(o){return o.length>1||o.length===1&&l.hasEdge(o[0],o[0])})}return $v}var Pv,AE;function Mk(){if(AE)return Pv;AE=1;var t=rn();Pv=i;var r=t.constant(1);function i(o,u,c){return l(o,u||r,c||function(f){return o.outEdges(f)})}function l(o,u,c){var f={},g=o.nodes();return g.forEach(function(d){f[d]={},f[d][d]={distance:0},g.forEach(function(m){d!==m&&(f[d][m]={distance:Number.POSITIVE_INFINITY})}),c(d).forEach(function(m){var p=m.v===d?m.w:m.v,y=u(m);f[d][p]={distance:y,predecessor:d}})}),g.forEach(function(d){var m=f[d];g.forEach(function(p){var y=f[p];g.forEach(function(b){var S=y[d],N=m[b],E=y[b],C=S.distance+N.distance;C<E.distance&&(E.distance=C,E.predecessor=N.predecessor)})})}),f}return Pv}var Jv,jE;function rj(){if(jE)return Jv;jE=1;var t=rn();Jv=r,r.CycleException=i;function r(l){var o={},u={},c=[];function f(g){if(t.has(u,g))throw new i;t.has(o,g)||(u[g]=!0,o[g]=!0,t.each(l.predecessors(g),f),delete u[g],c.push(g))}if(t.each(l.sinks(),f),t.size(o)!==l.nodeCount())throw new i;return c}function i(){}return i.prototype=new Error,Jv}var Wv,ME;function Rk(){if(ME)return Wv;ME=1;var t=rj();Wv=r;function r(i){try{t(i)}catch(l){if(l instanceof t.CycleException)return!1;throw l}return!0}return Wv}var em,RE;function aj(){if(RE)return em;RE=1;var t=rn();em=r;function r(l,o,u){t.isArray(o)||(o=[o]);var c=(l.isDirected()?l.successors:l.neighbors).bind(l),f=[],g={};return t.each(o,function(d){if(!l.hasNode(d))throw new Error("Graph does not have node: "+d);i(l,d,u==="post",g,c,f)}),f}function i(l,o,u,c,f,g){t.has(c,o)||(c[o]=!0,u||g.push(o),t.each(f(o),function(d){i(l,d,u,c,f,g)}),u&&g.push(o))}return em}var tm,qE;function qk(){if(qE)return tm;qE=1;var t=aj();tm=r;function r(i,l){return t(i,l,"post")}return tm}var nm,OE;function Ok(){if(OE)return nm;OE=1;var t=aj();nm=r;function r(i,l){return t(i,l,"pre")}return nm}var rm,zE;function zk(){if(zE)return rm;zE=1;var t=rn(),r=Ty(),i=ej();rm=l;function l(o,u){var c=new r,f={},g=new i,d;function m(y){var b=y.v===d?y.w:y.v,S=g.priority(b);if(S!==void 0){var N=u(y);N<S&&(f[b]=d,g.decrease(b,N))}}if(o.nodeCount()===0)return c;t.each(o.nodes(),function(y){g.add(y,Number.POSITIVE_INFINITY),c.setNode(y)}),g.decrease(o.nodes()[0],0);for(var p=!1;g.size()>0;){if(d=g.removeMin(),t.has(f,d))c.setEdge(d,f[d]);else{if(p)throw new Error("Input graph is not connected: "+o);p=!0}o.nodeEdges(d).forEach(m)}return c}return rm}var am,DE;function Dk(){return DE||(DE=1,am={components:Tk(),dijkstra:tj(),dijkstraAll:Ak(),findCycles:jk(),floydWarshall:Mk(),isAcyclic:Rk(),postorder:qk(),preorder:Ok(),prim:zk(),tarjan:nj(),topsort:rj()}),am}var im,kE;function kk(){if(kE)return im;kE=1;var t=Nk();return im={Graph:t.Graph,json:Ck(),alg:Dk(),version:t.version},im}var lm,HE;function mn(){if(HE)return lm;HE=1;var t;if(typeof fy=="function")try{t=kk()}catch{}return t||(t=window.graphlib),lm=t,lm}var om,LE;function Hk(){if(LE)return om;LE=1;var t=jA(),r=1,i=4;function l(o){return t(o,r|i)}return om=l,om}var sm,BE;function ju(){if(BE)return sm;BE=1;var t=bi(),r=ar(),i=bu(),l=nn();function o(u,c,f){if(!l(f))return!1;var g=typeof c;return(g=="number"?r(f)&&i(c,f.length):g=="string"&&c in f)?t(f[c],u):!1}return sm=o,sm}var um,UE;function Lk(){if(UE)return um;UE=1;var t=Au(),r=bi(),i=ju(),l=pa(),o=Object.prototype,u=o.hasOwnProperty,c=t(function(f,g){f=Object(f);var d=-1,m=g.length,p=m>2?g[2]:void 0;for(p&&i(g[0],g[1],p)&&(m=1);++d<m;)for(var y=g[d],b=l(y),S=-1,N=b.length;++S<N;){var E=b[S],C=f[E];(C===void 0||r(C,o[E])&&!u.call(f,E))&&(f[E]=y[E])}return f});return um=c,um}var cm,GE;function Bk(){if(GE)return cm;GE=1;var t=ir(),r=ar(),i=Br();function l(o){return function(u,c,f){var g=Object(u);if(!r(u)){var d=t(c,3);u=i(u),c=function(p){return d(g[p],p,g)}}var m=o(u,c,f);return m>-1?g[d?u[m]:m]:void 0}}return cm=l,cm}var fm,VE;function Uk(){if(VE)return fm;VE=1;var t=/\s/;function r(i){for(var l=i.length;l--&&t.test(i.charAt(l)););return l}return fm=r,fm}var dm,YE;function Gk(){if(YE)return dm;YE=1;var t=Uk(),r=/^\s+/;function i(l){return l&&l.slice(0,t(l)+1).replace(r,"")}return dm=i,dm}var hm,IE;function Vk(){if(IE)return hm;IE=1;var t=Gk(),r=nn(),i=Ei(),l=NaN,o=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,f=parseInt;function g(d){if(typeof d=="number")return d;if(i(d))return l;if(r(d)){var m=typeof d.valueOf=="function"?d.valueOf():d;d=r(m)?m+"":m}if(typeof d!="string")return d===0?d:+d;d=t(d);var p=u.test(d);return p||c.test(d)?f(d.slice(2),p?2:8):o.test(d)?l:+d}return hm=g,hm}var gm,XE;function ij(){if(XE)return gm;XE=1;var t=Vk(),r=1/0,i=17976931348623157e292;function l(o){if(!o)return o===0?o:0;if(o=t(o),o===r||o===-r){var u=o<0?-1:1;return u*i}return o===o?o:0}return gm=l,gm}var vm,ZE;function Yk(){if(ZE)return vm;ZE=1;var t=ij();function r(i){var l=t(i),o=l%1;return l===l?o?l-o:l:0}return vm=r,vm}var mm,FE;function Ik(){if(FE)return mm;FE=1;var t=PA(),r=ir(),i=Yk(),l=Math.max;function o(u,c,f){var g=u==null?0:u.length;if(!g)return-1;var d=f==null?0:i(f);return d<0&&(d=l(g+d,0)),t(u,r(c,3),d)}return mm=o,mm}var pm,KE;function Xk(){if(KE)return pm;KE=1;var t=Bk(),r=Ik(),i=t(r);return pm=i,pm}var ym,QE;function lj(){if(QE)return ym;QE=1;var t=Cy();function r(i){var l=i==null?0:i.length;return l?t(i,1):[]}return ym=r,ym}var xm,$E;function Zk(){if($E)return xm;$E=1;var t=wy(),r=MA(),i=pa();function l(o,u){return o==null?o:t(o,r(u),i)}return xm=l,xm}var bm,PE;function Fk(){if(PE)return bm;PE=1;function t(r){var i=r==null?0:r.length;return i?r[i-1]:void 0}return bm=t,bm}var _m,JE;function Kk(){if(JE)return _m;JE=1;var t=yu(),r=Sy(),i=ir();function l(o,u){var c={};return u=i(u,3),r(o,function(f,g,d){t(c,g,u(f,g,d))}),c}return _m=l,_m}var wm,WE;function Ay(){if(WE)return wm;WE=1;var t=Ei();function r(i,l,o){for(var u=-1,c=i.length;++u<c;){var f=i[u],g=l(f);if(g!=null&&(d===void 0?g===g&&!t(g):o(g,d)))var d=g,m=f}return m}return wm=r,wm}var Sm,eN;function Qk(){if(eN)return Sm;eN=1;function t(r,i){return r>i}return Sm=t,Sm}var Em,tN;function $k(){if(tN)return Em;tN=1;var t=Ay(),r=Qk(),i=ya();function l(o){return o&&o.length?t(o,i,r):void 0}return Em=l,Em}var Nm,nN;function oj(){if(nN)return Nm;nN=1;var t=yu(),r=bi();function i(l,o,u){(u!==void 0&&!r(l[o],u)||u===void 0&&!(o in l))&&t(l,o,u)}return Nm=i,Nm}var Cm,rN;function Pk(){if(rN)return Cm;rN=1;var t=va(),r=Su(),i=jn(),l="[object Object]",o=Function.prototype,u=Object.prototype,c=o.toString,f=u.hasOwnProperty,g=c.call(Object);function d(m){if(!i(m)||t(m)!=l)return!1;var p=r(m);if(p===null)return!0;var y=f.call(p,"constructor")&&p.constructor;return typeof y=="function"&&y instanceof y&&c.call(y)==g}return Cm=d,Cm}var Tm,aN;function sj(){if(aN)return Tm;aN=1;function t(r,i){if(!(i==="constructor"&&typeof r[i]=="function")&&i!="__proto__")return r[i]}return Tm=t,Tm}var Am,iN;function Jk(){if(iN)return Am;iN=1;var t=Kl(),r=pa();function i(l){return t(l,r(l))}return Am=i,Am}var jm,lN;function Wk(){if(lN)return jm;lN=1;var t=oj(),r=pA(),i=CA(),l=yA(),o=AA(),u=Ql(),c=ut(),f=JA(),g=wi(),d=Fl(),m=nn(),p=Pk(),y=$l(),b=sj(),S=Jk();function N(E,C,A,w,T,q,R){var M=b(E,A),L=b(C,A),H=R.get(L);if(H){t(E,A,H);return}var Q=q?q(M,L,A+"",E,C,R):void 0,B=Q===void 0;if(B){var F=c(L),W=!F&&g(L),D=!F&&!W&&y(L);Q=L,F||W||D?c(M)?Q=M:f(M)?Q=l(M):W?(B=!1,Q=r(L,!0)):D?(B=!1,Q=i(L,!0)):Q=[]:p(L)||u(L)?(Q=M,u(M)?Q=S(M):(!m(M)||d(M))&&(Q=o(L))):B=!1}B&&(R.set(L,Q),T(Q,L,w,q,R),R.delete(L)),t(E,A,Q)}return jm=N,jm}var Mm,oN;function eH(){if(oN)return Mm;oN=1;var t=pu(),r=oj(),i=wy(),l=Wk(),o=nn(),u=pa(),c=sj();function f(g,d,m,p,y){g!==d&&i(d,function(b,S){if(y||(y=new t),o(b))l(g,d,S,m,f,p,y);else{var N=p?p(c(g,S),b,S+"",g,d,y):void 0;N===void 0&&(N=b),r(g,S,N)}},u)}return Mm=f,Mm}var Rm,sN;function tH(){if(sN)return Rm;sN=1;var t=Au(),r=ju();function i(l){return t(function(o,u){var c=-1,f=u.length,g=f>1?u[f-1]:void 0,d=f>2?u[2]:void 0;for(g=l.length>3&&typeof g=="function"?(f--,g):void 0,d&&r(u[0],u[1],d)&&(g=f<3?void 0:g,f=1),o=Object(o);++c<f;){var m=u[c];m&&l(o,m,c,g)}return o})}return Rm=i,Rm}var qm,uN;function nH(){if(uN)return qm;uN=1;var t=eH(),r=tH(),i=r(function(l,o,u){t(l,o,u)});return qm=i,qm}var Om,cN;function uj(){if(cN)return Om;cN=1;function t(r,i){return r<i}return Om=t,Om}var zm,fN;function rH(){if(fN)return zm;fN=1;var t=Ay(),r=uj(),i=ya();function l(o){return o&&o.length?t(o,i,r):void 0}return zm=l,zm}var Dm,dN;function aH(){if(dN)return Dm;dN=1;var t=Ay(),r=ir(),i=uj();function l(o,u){return o&&o.length?t(o,r(u,2),i):void 0}return Dm=l,Dm}var km,hN;function iH(){if(hN)return km;hN=1;var t=yn(),r=function(){return t.Date.now()};return km=r,km}var Hm,gN;function lH(){if(gN)return Hm;gN=1;var t=xu(),r=Cu(),i=bu(),l=nn(),o=Pl();function u(c,f,g,d){if(!l(c))return c;f=r(f,c);for(var m=-1,p=f.length,y=p-1,b=c;b!=null&&++m<p;){var S=o(f[m]),N=g;if(S==="__proto__"||S==="constructor"||S==="prototype")return c;if(m!=y){var E=b[S];N=d?d(E,S,b):void 0,N===void 0&&(N=l(E)?E:i(f[m+1])?[]:{})}t(b,S,N),b=b[S]}return c}return Hm=u,Hm}var Lm,vN;function oH(){if(vN)return Lm;vN=1;var t=Tu(),r=lH(),i=Cu();function l(o,u,c){for(var f=-1,g=u.length,d={};++f<g;){var m=u[f],p=t(o,m);c(p,m)&&r(d,i(m,o),p)}return d}return Lm=l,Lm}var Bm,mN;function sH(){if(mN)return Bm;mN=1;var t=oH(),r=GA();function i(l,o){return t(l,o,function(u,c){return r(l,c)})}return Bm=i,Bm}var Um,pN;function uH(){if(pN)return Um;pN=1;var t=lj(),r=QA(),i=$A();function l(o){return i(r(o,void 0,t),o+"")}return Um=l,Um}var Gm,yN;function cH(){if(yN)return Gm;yN=1;var t=sH(),r=uH(),i=r(function(l,o){return l==null?{}:t(l,o)});return Gm=i,Gm}var Vm,xN;function fH(){if(xN)return Vm;xN=1;var t=Math.ceil,r=Math.max;function i(l,o,u,c){for(var f=-1,g=r(t((o-l)/(u||1)),0),d=Array(g);g--;)d[c?g:++f]=l,l+=u;return d}return Vm=i,Vm}var Ym,bN;function dH(){if(bN)return Ym;bN=1;var t=fH(),r=ju(),i=ij();function l(o){return function(u,c,f){return f&&typeof f!="number"&&r(u,c,f)&&(c=f=void 0),u=i(u),c===void 0?(c=u,u=0):c=i(c),f=f===void 0?u<c?1:-1:i(f),t(u,c,f,o)}}return Ym=l,Ym}var Im,_N;function hH(){if(_N)return Im;_N=1;var t=dH(),r=t();return Im=r,Im}var Xm,wN;function gH(){if(wN)return Xm;wN=1;function t(r,i){var l=r.length;for(r.sort(i);l--;)r[l]=r[l].value;return r}return Xm=t,Xm}var Zm,SN;function vH(){if(SN)return Zm;SN=1;var t=Ei();function r(i,l){if(i!==l){var o=i!==void 0,u=i===null,c=i===i,f=t(i),g=l!==void 0,d=l===null,m=l===l,p=t(l);if(!d&&!p&&!f&&i>l||f&&g&&m&&!d&&!p||u&&g&&m||!o&&m||!c)return 1;if(!u&&!f&&!p&&i<l||p&&o&&c&&!u&&!f||d&&o&&c||!g&&c||!m)return-1}return 0}return Zm=r,Zm}var Fm,EN;function mH(){if(EN)return Fm;EN=1;var t=vH();function r(i,l,o){for(var u=-1,c=i.criteria,f=l.criteria,g=c.length,d=o.length;++u<g;){var m=t(c[u],f[u]);if(m){if(u>=d)return m;var p=o[u];return m*(p=="desc"?-1:1)}}return i.index-l.index}return Fm=r,Fm}var Km,NN;function pH(){if(NN)return Km;NN=1;var t=Nu(),r=Tu(),i=ir(),l=ZA(),o=gH(),u=_u(),c=mH(),f=ya(),g=ut();function d(m,p,y){p.length?p=t(p,function(N){return g(N)?function(E){return r(E,N.length===1?N[0]:N)}:N}):p=[f];var b=-1;p=t(p,u(i));var S=l(m,function(N,E,C){var A=t(p,function(w){return w(N)});return{criteria:A,index:++b,value:N}});return o(S,function(N,E){return c(N,E,y)})}return Km=d,Km}var Qm,CN;function yH(){if(CN)return Qm;CN=1;var t=Cy(),r=pH(),i=Au(),l=ju(),o=i(function(u,c){if(u==null)return[];var f=c.length;return f>1&&l(u,c[0],c[1])?c=[]:f>2&&l(c[0],c[1],c[2])&&(c=[c[0]]),r(u,t(c,1),[])});return Qm=o,Qm}var $m,TN;function xH(){if(TN)return $m;TN=1;var t=BA(),r=0;function i(l){var o=++r;return t(l)+o}return $m=i,$m}var Pm,AN;function bH(){if(AN)return Pm;AN=1;function t(r,i,l){for(var o=-1,u=r.length,c=i.length,f={};++o<u;){var g=o<c?i[o]:void 0;l(f,r[o],g)}return f}return Pm=t,Pm}var Jm,jN;function _H(){if(jN)return Jm;jN=1;var t=xu(),r=bH();function i(l,o){return r(l||[],o||[],t)}return Jm=i,Jm}var Wm,MN;function Ke(){if(MN)return Wm;MN=1;var t;if(typeof fy=="function")try{t={cloneDeep:Hk(),constant:_y(),defaults:Lk(),each:qA(),filter:YA(),find:Xk(),flatten:lj(),forEach:RA(),forIn:Zk(),has:IA(),isUndefined:XA(),last:Fk(),map:FA(),mapValues:Kk(),max:$k(),merge:nH(),min:rH(),minBy:aH(),now:iH(),pick:cH(),range:hH(),reduce:KA(),sortBy:yH(),uniqueId:xH(),values:WA(),zipObject:_H()}}catch{}return t||(t=window._),Wm=t,Wm}var ep,RN;function wH(){if(RN)return ep;RN=1,ep=t;function t(){var l={};l._next=l._prev=l,this._sentinel=l}t.prototype.dequeue=function(){var l=this._sentinel,o=l._prev;if(o!==l)return r(o),o},t.prototype.enqueue=function(l){var o=this._sentinel;l._prev&&l._next&&r(l),l._next=o._next,o._next._prev=l,o._next=l,l._prev=o},t.prototype.toString=function(){for(var l=[],o=this._sentinel,u=o._prev;u!==o;)l.push(JSON.stringify(u,i)),u=u._prev;return"["+l.join(", ")+"]"};function r(l){l._prev._next=l._next,l._next._prev=l._prev,delete l._next,delete l._prev}function i(l,o){if(l!=="_next"&&l!=="_prev")return o}return ep}var tp,qN;function SH(){if(qN)return tp;qN=1;var t=Ke(),r=mn().Graph,i=wH();tp=o;var l=t.constant(1);function o(d,m){if(d.nodeCount()<=1)return[];var p=f(d,m||l),y=u(p.graph,p.buckets,p.zeroIdx);return t.flatten(t.map(y,function(b){return d.outEdges(b.v,b.w)}),!0)}function u(d,m,p){for(var y=[],b=m[m.length-1],S=m[0],N;d.nodeCount();){for(;N=S.dequeue();)c(d,m,p,N);for(;N=b.dequeue();)c(d,m,p,N);if(d.nodeCount()){for(var E=m.length-2;E>0;--E)if(N=m[E].dequeue(),N){y=y.concat(c(d,m,p,N,!0));break}}}return y}function c(d,m,p,y,b){var S=b?[]:void 0;return t.forEach(d.inEdges(y.v),function(N){var E=d.edge(N),C=d.node(N.v);b&&S.push({v:N.v,w:N.w}),C.out-=E,g(m,p,C)}),t.forEach(d.outEdges(y.v),function(N){var E=d.edge(N),C=N.w,A=d.node(C);A.in-=E,g(m,p,A)}),d.removeNode(y.v),S}function f(d,m){var p=new r,y=0,b=0;t.forEach(d.nodes(),function(E){p.setNode(E,{v:E,in:0,out:0})}),t.forEach(d.edges(),function(E){var C=p.edge(E.v,E.w)||0,A=m(E),w=C+A;p.setEdge(E.v,E.w,w),b=Math.max(b,p.node(E.v).out+=A),y=Math.max(y,p.node(E.w).in+=A)});var S=t.range(b+y+3).map(function(){return new i}),N=y+1;return t.forEach(p.nodes(),function(E){g(S,N,p.node(E))}),{graph:p,buckets:S,zeroIdx:N}}function g(d,m,p){p.out?p.in?d[p.out-p.in+m].enqueue(p):d[d.length-1].enqueue(p):d[0].enqueue(p)}return tp}var np,ON;function EH(){if(ON)return np;ON=1;var t=Ke(),r=SH();np={run:i,undo:o};function i(u){var c=u.graph().acyclicer==="greedy"?r(u,f(u)):l(u);t.forEach(c,function(g){var d=u.edge(g);u.removeEdge(g),d.forwardName=g.name,d.reversed=!0,u.setEdge(g.w,g.v,d,t.uniqueId("rev"))});function f(g){return function(d){return g.edge(d).weight}}}function l(u){var c=[],f={},g={};function d(m){t.has(g,m)||(g[m]=!0,f[m]=!0,t.forEach(u.outEdges(m),function(p){t.has(f,p.w)?c.push(p):d(p.w)}),delete f[m])}return t.forEach(u.nodes(),d),c}function o(u){t.forEach(u.edges(),function(c){var f=u.edge(c);if(f.reversed){u.removeEdge(c);var g=f.forwardName;delete f.reversed,delete f.forwardName,u.setEdge(c.w,c.v,f,g)}})}return np}var rp,zN;function kt(){if(zN)return rp;zN=1;var t=Ke(),r=mn().Graph;rp={addDummyNode:i,simplify:l,asNonCompoundGraph:o,successorWeights:u,predecessorWeights:c,intersectRect:f,buildLayerMatrix:g,normalizeRanks:d,removeEmptyRanks:m,addBorderNode:p,maxRank:y,partition:b,time:S,notime:N};function i(E,C,A,w){var T;do T=t.uniqueId(w);while(E.hasNode(T));return A.dummy=C,E.setNode(T,A),T}function l(E){var C=new r().setGraph(E.graph());return t.forEach(E.nodes(),function(A){C.setNode(A,E.node(A))}),t.forEach(E.edges(),function(A){var w=C.edge(A.v,A.w)||{weight:0,minlen:1},T=E.edge(A);C.setEdge(A.v,A.w,{weight:w.weight+T.weight,minlen:Math.max(w.minlen,T.minlen)})}),C}function o(E){var C=new r({multigraph:E.isMultigraph()}).setGraph(E.graph());return t.forEach(E.nodes(),function(A){E.children(A).length||C.setNode(A,E.node(A))}),t.forEach(E.edges(),function(A){C.setEdge(A,E.edge(A))}),C}function u(E){var C=t.map(E.nodes(),function(A){var w={};return t.forEach(E.outEdges(A),function(T){w[T.w]=(w[T.w]||0)+E.edge(T).weight}),w});return t.zipObject(E.nodes(),C)}function c(E){var C=t.map(E.nodes(),function(A){var w={};return t.forEach(E.inEdges(A),function(T){w[T.v]=(w[T.v]||0)+E.edge(T).weight}),w});return t.zipObject(E.nodes(),C)}function f(E,C){var A=E.x,w=E.y,T=C.x-A,q=C.y-w,R=E.width/2,M=E.height/2;if(!T&&!q)throw new Error("Not possible to find intersection inside of the rectangle");var L,H;return Math.abs(q)*R>Math.abs(T)*M?(q<0&&(M=-M),L=M*T/q,H=M):(T<0&&(R=-R),L=R,H=R*q/T),{x:A+L,y:w+H}}function g(E){var C=t.map(t.range(y(E)+1),function(){return[]});return t.forEach(E.nodes(),function(A){var w=E.node(A),T=w.rank;t.isUndefined(T)||(C[T][w.order]=A)}),C}function d(E){var C=t.min(t.map(E.nodes(),function(A){return E.node(A).rank}));t.forEach(E.nodes(),function(A){var w=E.node(A);t.has(w,"rank")&&(w.rank-=C)})}function m(E){var C=t.min(t.map(E.nodes(),function(q){return E.node(q).rank})),A=[];t.forEach(E.nodes(),function(q){var R=E.node(q).rank-C;A[R]||(A[R]=[]),A[R].push(q)});var w=0,T=E.graph().nodeRankFactor;t.forEach(A,function(q,R){t.isUndefined(q)&&R%T!==0?--w:w&&t.forEach(q,function(M){E.node(M).rank+=w})})}function p(E,C,A,w){var T={width:0,height:0};return arguments.length>=4&&(T.rank=A,T.order=w),i(E,"border",T,C)}function y(E){return t.max(t.map(E.nodes(),function(C){var A=E.node(C).rank;if(!t.isUndefined(A))return A}))}function b(E,C){var A={lhs:[],rhs:[]};return t.forEach(E,function(w){C(w)?A.lhs.push(w):A.rhs.push(w)}),A}function S(E,C){var A=t.now();try{return C()}finally{console.log(E+" time: "+(t.now()-A)+"ms")}}function N(E,C){return C()}return rp}var ap,DN;function NH(){if(DN)return ap;DN=1;var t=Ke(),r=kt();ap={run:i,undo:o};function i(u){u.graph().dummyChains=[],t.forEach(u.edges(),function(c){l(u,c)})}function l(u,c){var f=c.v,g=u.node(f).rank,d=c.w,m=u.node(d).rank,p=c.name,y=u.edge(c),b=y.labelRank;if(m!==g+1){u.removeEdge(c);var S,N,E;for(E=0,++g;g<m;++E,++g)y.points=[],N={width:0,height:0,edgeLabel:y,edgeObj:c,rank:g},S=r.addDummyNode(u,"edge",N,"_d"),g===b&&(N.width=y.width,N.height=y.height,N.dummy="edge-label",N.labelpos=y.labelpos),u.setEdge(f,S,{weight:y.weight},p),E===0&&u.graph().dummyChains.push(S),f=S;u.setEdge(f,d,{weight:y.weight},p)}}function o(u){t.forEach(u.graph().dummyChains,function(c){var f=u.node(c),g=f.edgeLabel,d;for(u.setEdge(f.edgeObj,g);f.dummy;)d=u.successors(c)[0],u.removeNode(c),g.points.push({x:f.x,y:f.y}),f.dummy==="edge-label"&&(g.x=f.x,g.y=f.y,g.width=f.width,g.height=f.height),c=d,f=u.node(c)})}return ap}var ip,kN;function Js(){if(kN)return ip;kN=1;var t=Ke();ip={longestPath:r,slack:i};function r(l){var o={};function u(c){var f=l.node(c);if(t.has(o,c))return f.rank;o[c]=!0;var g=t.min(t.map(l.outEdges(c),function(d){return u(d.w)-l.edge(d).minlen}));return(g===Number.POSITIVE_INFINITY||g===void 0||g===null)&&(g=0),f.rank=g}t.forEach(l.sources(),u)}function i(l,o){return l.node(o.w).rank-l.node(o.v).rank-l.edge(o).minlen}return ip}var lp,HN;function cj(){if(HN)return lp;HN=1;var t=Ke(),r=mn().Graph,i=Js().slack;lp=l;function l(f){var g=new r({directed:!1}),d=f.nodes()[0],m=f.nodeCount();g.setNode(d,{});for(var p,y;o(g,f)<m;)p=u(g,f),y=g.hasNode(p.v)?i(f,p):-i(f,p),c(g,f,y);return g}function o(f,g){function d(m){t.forEach(g.nodeEdges(m),function(p){var y=p.v,b=m===y?p.w:y;!f.hasNode(b)&&!i(g,p)&&(f.setNode(b,{}),f.setEdge(m,b,{}),d(b))})}return t.forEach(f.nodes(),d),f.nodeCount()}function u(f,g){return t.minBy(g.edges(),function(d){if(f.hasNode(d.v)!==f.hasNode(d.w))return i(g,d)})}function c(f,g,d){t.forEach(f.nodes(),function(m){g.node(m).rank+=d})}return lp}var op,LN;function CH(){if(LN)return op;LN=1;var t=Ke(),r=cj(),i=Js().slack,l=Js().longestPath,o=mn().alg.preorder,u=mn().alg.postorder,c=kt().simplify;op=f,f.initLowLimValues=p,f.initCutValues=g,f.calcCutValue=m,f.leaveEdge=b,f.enterEdge=S,f.exchangeEdges=N;function f(w){w=c(w),l(w);var T=r(w);p(T),g(T,w);for(var q,R;q=b(T);)R=S(T,w,q),N(T,w,q,R)}function g(w,T){var q=u(w,w.nodes());q=q.slice(0,q.length-1),t.forEach(q,function(R){d(w,T,R)})}function d(w,T,q){var R=w.node(q),M=R.parent;w.edge(q,M).cutvalue=m(w,T,q)}function m(w,T,q){var R=w.node(q),M=R.parent,L=!0,H=T.edge(q,M),Q=0;return H||(L=!1,H=T.edge(M,q)),Q=H.weight,t.forEach(T.nodeEdges(q),function(B){var F=B.v===q,W=F?B.w:B.v;if(W!==M){var D=F===L,K=T.edge(B).weight;if(Q+=D?K:-K,C(w,q,W)){var O=w.edge(q,W).cutvalue;Q+=D?-O:O}}}),Q}function p(w,T){arguments.length<2&&(T=w.nodes()[0]),y(w,{},1,T)}function y(w,T,q,R,M){var L=q,H=w.node(R);return T[R]=!0,t.forEach(w.neighbors(R),function(Q){t.has(T,Q)||(q=y(w,T,q,Q,R))}),H.low=L,H.lim=q++,M?H.parent=M:delete H.parent,q}function b(w){return t.find(w.edges(),function(T){return w.edge(T).cutvalue<0})}function S(w,T,q){var R=q.v,M=q.w;T.hasEdge(R,M)||(R=q.w,M=q.v);var L=w.node(R),H=w.node(M),Q=L,B=!1;L.lim>H.lim&&(Q=H,B=!0);var F=t.filter(T.edges(),function(W){return B===A(w,w.node(W.v),Q)&&B!==A(w,w.node(W.w),Q)});return t.minBy(F,function(W){return i(T,W)})}function N(w,T,q,R){var M=q.v,L=q.w;w.removeEdge(M,L),w.setEdge(R.v,R.w,{}),p(w),g(w,T),E(w,T)}function E(w,T){var q=t.find(w.nodes(),function(M){return!T.node(M).parent}),R=o(w,q);R=R.slice(1),t.forEach(R,function(M){var L=w.node(M).parent,H=T.edge(M,L),Q=!1;H||(H=T.edge(L,M),Q=!0),T.node(M).rank=T.node(L).rank+(Q?H.minlen:-H.minlen)})}function C(w,T,q){return w.hasEdge(T,q)}function A(w,T,q){return q.low<=T.lim&&T.lim<=q.lim}return op}var sp,BN;function TH(){if(BN)return sp;BN=1;var t=Js(),r=t.longestPath,i=cj(),l=CH();sp=o;function o(g){switch(g.graph().ranker){case"network-simplex":f(g);break;case"tight-tree":c(g);break;case"longest-path":u(g);break;default:f(g)}}var u=r;function c(g){r(g),i(g)}function f(g){l(g)}return sp}var up,UN;function AH(){if(UN)return up;UN=1;var t=Ke();up=r;function r(o){var u=l(o);t.forEach(o.graph().dummyChains,function(c){for(var f=o.node(c),g=f.edgeObj,d=i(o,u,g.v,g.w),m=d.path,p=d.lca,y=0,b=m[y],S=!0;c!==g.w;){if(f=o.node(c),S){for(;(b=m[y])!==p&&o.node(b).maxRank<f.rank;)y++;b===p&&(S=!1)}if(!S){for(;y<m.length-1&&o.node(b=m[y+1]).minRank<=f.rank;)y++;b=m[y]}o.setParent(c,b),c=o.successors(c)[0]}})}function i(o,u,c,f){var g=[],d=[],m=Math.min(u[c].low,u[f].low),p=Math.max(u[c].lim,u[f].lim),y,b;y=c;do y=o.parent(y),g.push(y);while(y&&(u[y].low>m||p>u[y].lim));for(b=y,y=f;(y=o.parent(y))!==b;)d.push(y);return{path:g.concat(d.reverse()),lca:b}}function l(o){var u={},c=0;function f(g){var d=c;t.forEach(o.children(g),f),u[g]={low:d,lim:c++}}return t.forEach(o.children(),f),u}return up}var cp,GN;function jH(){if(GN)return cp;GN=1;var t=Ke(),r=kt();cp={run:i,cleanup:c};function i(f){var g=r.addDummyNode(f,"root",{},"_root"),d=o(f),m=t.max(t.values(d))-1,p=2*m+1;f.graph().nestingRoot=g,t.forEach(f.edges(),function(b){f.edge(b).minlen*=p});var y=u(f)+1;t.forEach(f.children(),function(b){l(f,g,p,y,m,d,b)}),f.graph().nodeRankFactor=p}function l(f,g,d,m,p,y,b){var S=f.children(b);if(!S.length){b!==g&&f.setEdge(g,b,{weight:0,minlen:d});return}var N=r.addBorderNode(f,"_bt"),E=r.addBorderNode(f,"_bb"),C=f.node(b);f.setParent(N,b),C.borderTop=N,f.setParent(E,b),C.borderBottom=E,t.forEach(S,function(A){l(f,g,d,m,p,y,A);var w=f.node(A),T=w.borderTop?w.borderTop:A,q=w.borderBottom?w.borderBottom:A,R=w.borderTop?m:2*m,M=T!==q?1:p-y[b]+1;f.setEdge(N,T,{weight:R,minlen:M,nestingEdge:!0}),f.setEdge(q,E,{weight:R,minlen:M,nestingEdge:!0})}),f.parent(b)||f.setEdge(g,N,{weight:0,minlen:p+y[b]})}function o(f){var g={};function d(m,p){var y=f.children(m);y&&y.length&&t.forEach(y,function(b){d(b,p+1)}),g[m]=p}return t.forEach(f.children(),function(m){d(m,1)}),g}function u(f){return t.reduce(f.edges(),function(g,d){return g+f.edge(d).weight},0)}function c(f){var g=f.graph();f.removeNode(g.nestingRoot),delete g.nestingRoot,t.forEach(f.edges(),function(d){var m=f.edge(d);m.nestingEdge&&f.removeEdge(d)})}return cp}var fp,VN;function MH(){if(VN)return fp;VN=1;var t=Ke(),r=kt();fp=i;function i(o){function u(c){var f=o.children(c),g=o.node(c);if(f.length&&t.forEach(f,u),t.has(g,"minRank")){g.borderLeft=[],g.borderRight=[];for(var d=g.minRank,m=g.maxRank+1;d<m;++d)l(o,"borderLeft","_bl",c,g,d),l(o,"borderRight","_br",c,g,d)}}t.forEach(o.children(),u)}function l(o,u,c,f,g,d){var m={width:0,height:0,rank:d,borderType:u},p=g[u][d-1],y=r.addDummyNode(o,"border",m,c);g[u][d]=y,o.setParent(y,f),p&&o.setEdge(p,y,{weight:1})}return fp}var dp,YN;function RH(){if(YN)return dp;YN=1;var t=Ke();dp={adjust:r,undo:i};function r(d){var m=d.graph().rankdir.toLowerCase();(m==="lr"||m==="rl")&&l(d)}function i(d){var m=d.graph().rankdir.toLowerCase();(m==="bt"||m==="rl")&&u(d),(m==="lr"||m==="rl")&&(f(d),l(d))}function l(d){t.forEach(d.nodes(),function(m){o(d.node(m))}),t.forEach(d.edges(),function(m){o(d.edge(m))})}function o(d){var m=d.width;d.width=d.height,d.height=m}function u(d){t.forEach(d.nodes(),function(m){c(d.node(m))}),t.forEach(d.edges(),function(m){var p=d.edge(m);t.forEach(p.points,c),t.has(p,"y")&&c(p)})}function c(d){d.y=-d.y}function f(d){t.forEach(d.nodes(),function(m){g(d.node(m))}),t.forEach(d.edges(),function(m){var p=d.edge(m);t.forEach(p.points,g),t.has(p,"x")&&g(p)})}function g(d){var m=d.x;d.x=d.y,d.y=m}return dp}var hp,IN;function qH(){if(IN)return hp;IN=1;var t=Ke();hp=r;function r(i){var l={},o=t.filter(i.nodes(),function(d){return!i.children(d).length}),u=t.max(t.map(o,function(d){return i.node(d).rank})),c=t.map(t.range(u+1),function(){return[]});function f(d){if(!t.has(l,d)){l[d]=!0;var m=i.node(d);c[m.rank].push(d),t.forEach(i.successors(d),f)}}var g=t.sortBy(o,function(d){return i.node(d).rank});return t.forEach(g,f),c}return hp}var gp,XN;function OH(){if(XN)return gp;XN=1;var t=Ke();gp=r;function r(l,o){for(var u=0,c=1;c<o.length;++c)u+=i(l,o[c-1],o[c]);return u}function i(l,o,u){for(var c=t.zipObject(u,t.map(u,function(y,b){return b})),f=t.flatten(t.map(o,function(y){return t.sortBy(t.map(l.outEdges(y),function(b){return{pos:c[b.w],weight:l.edge(b).weight}}),"pos")}),!0),g=1;g<u.length;)g<<=1;var d=2*g-1;g-=1;var m=t.map(new Array(d),function(){return 0}),p=0;return t.forEach(f.forEach(function(y){var b=y.pos+g;m[b]+=y.weight;for(var S=0;b>0;)b%2&&(S+=m[b+1]),b=b-1>>1,m[b]+=y.weight;p+=y.weight*S})),p}return gp}var vp,ZN;function zH(){if(ZN)return vp;ZN=1;var t=Ke();vp=r;function r(i,l){return t.map(l,function(o){var u=i.inEdges(o);if(u.length){var c=t.reduce(u,function(f,g){var d=i.edge(g),m=i.node(g.v);return{sum:f.sum+d.weight*m.order,weight:f.weight+d.weight}},{sum:0,weight:0});return{v:o,barycenter:c.sum/c.weight,weight:c.weight}}else return{v:o}})}return vp}var mp,FN;function DH(){if(FN)return mp;FN=1;var t=Ke();mp=r;function r(o,u){var c={};t.forEach(o,function(g,d){var m=c[g.v]={indegree:0,in:[],out:[],vs:[g.v],i:d};t.isUndefined(g.barycenter)||(m.barycenter=g.barycenter,m.weight=g.weight)}),t.forEach(u.edges(),function(g){var d=c[g.v],m=c[g.w];!t.isUndefined(d)&&!t.isUndefined(m)&&(m.indegree++,d.out.push(c[g.w]))});var f=t.filter(c,function(g){return!g.indegree});return i(f)}function i(o){var u=[];function c(d){return function(m){m.merged||(t.isUndefined(m.barycenter)||t.isUndefined(d.barycenter)||m.barycenter>=d.barycenter)&&l(d,m)}}function f(d){return function(m){m.in.push(d),--m.indegree===0&&o.push(m)}}for(;o.length;){var g=o.pop();u.push(g),t.forEach(g.in.reverse(),c(g)),t.forEach(g.out,f(g))}return t.map(t.filter(u,function(d){return!d.merged}),function(d){return t.pick(d,["vs","i","barycenter","weight"])})}function l(o,u){var c=0,f=0;o.weight&&(c+=o.barycenter*o.weight,f+=o.weight),u.weight&&(c+=u.barycenter*u.weight,f+=u.weight),o.vs=u.vs.concat(o.vs),o.barycenter=c/f,o.weight=f,o.i=Math.min(u.i,o.i),u.merged=!0}return mp}var pp,KN;function kH(){if(KN)return pp;KN=1;var t=Ke(),r=kt();pp=i;function i(u,c){var f=r.partition(u,function(N){return t.has(N,"barycenter")}),g=f.lhs,d=t.sortBy(f.rhs,function(N){return-N.i}),m=[],p=0,y=0,b=0;g.sort(o(!!c)),b=l(m,d,b),t.forEach(g,function(N){b+=N.vs.length,m.push(N.vs),p+=N.barycenter*N.weight,y+=N.weight,b=l(m,d,b)});var S={vs:t.flatten(m,!0)};return y&&(S.barycenter=p/y,S.weight=y),S}function l(u,c,f){for(var g;c.length&&(g=t.last(c)).i<=f;)c.pop(),u.push(g.vs),f++;return f}function o(u){return function(c,f){return c.barycenter<f.barycenter?-1:c.barycenter>f.barycenter?1:u?f.i-c.i:c.i-f.i}}return pp}var yp,QN;function HH(){if(QN)return yp;QN=1;var t=Ke(),r=zH(),i=DH(),l=kH();yp=o;function o(f,g,d,m){var p=f.children(g),y=f.node(g),b=y?y.borderLeft:void 0,S=y?y.borderRight:void 0,N={};b&&(p=t.filter(p,function(q){return q!==b&&q!==S}));var E=r(f,p);t.forEach(E,function(q){if(f.children(q.v).length){var R=o(f,q.v,d,m);N[q.v]=R,t.has(R,"barycenter")&&c(q,R)}});var C=i(E,d);u(C,N);var A=l(C,m);if(b&&(A.vs=t.flatten([b,A.vs,S],!0),f.predecessors(b).length)){var w=f.node(f.predecessors(b)[0]),T=f.node(f.predecessors(S)[0]);t.has(A,"barycenter")||(A.barycenter=0,A.weight=0),A.barycenter=(A.barycenter*A.weight+w.order+T.order)/(A.weight+2),A.weight+=2}return A}function u(f,g){t.forEach(f,function(d){d.vs=t.flatten(d.vs.map(function(m){return g[m]?g[m].vs:m}),!0)})}function c(f,g){t.isUndefined(f.barycenter)?(f.barycenter=g.barycenter,f.weight=g.weight):(f.barycenter=(f.barycenter*f.weight+g.barycenter*g.weight)/(f.weight+g.weight),f.weight+=g.weight)}return yp}var xp,$N;function LH(){if($N)return xp;$N=1;var t=Ke(),r=mn().Graph;xp=i;function i(o,u,c){var f=l(o),g=new r({compound:!0}).setGraph({root:f}).setDefaultNodeLabel(function(d){return o.node(d)});return t.forEach(o.nodes(),function(d){var m=o.node(d),p=o.parent(d);(m.rank===u||m.minRank<=u&&u<=m.maxRank)&&(g.setNode(d),g.setParent(d,p||f),t.forEach(o[c](d),function(y){var b=y.v===d?y.w:y.v,S=g.edge(b,d),N=t.isUndefined(S)?0:S.weight;g.setEdge(b,d,{weight:o.edge(y).weight+N})}),t.has(m,"minRank")&&g.setNode(d,{borderLeft:m.borderLeft[u],borderRight:m.borderRight[u]}))}),g}function l(o){for(var u;o.hasNode(u=t.uniqueId("_root")););return u}return xp}var bp,PN;function BH(){if(PN)return bp;PN=1;var t=Ke();bp=r;function r(i,l,o){var u={},c;t.forEach(o,function(f){for(var g=i.parent(f),d,m;g;){if(d=i.parent(g),d?(m=u[d],u[d]=g):(m=c,c=g),m&&m!==g){l.setEdge(m,g);return}g=d}})}return bp}var _p,JN;function UH(){if(JN)return _p;JN=1;var t=Ke(),r=qH(),i=OH(),l=HH(),o=LH(),u=BH(),c=mn().Graph,f=kt();_p=g;function g(y){var b=f.maxRank(y),S=d(y,t.range(1,b+1),"inEdges"),N=d(y,t.range(b-1,-1,-1),"outEdges"),E=r(y);p(y,E);for(var C=Number.POSITIVE_INFINITY,A,w=0,T=0;T<4;++w,++T){m(w%2?S:N,w%4>=2),E=f.buildLayerMatrix(y);var q=i(y,E);q<C&&(T=0,A=t.cloneDeep(E),C=q)}p(y,A)}function d(y,b,S){return t.map(b,function(N){return o(y,N,S)})}function m(y,b){var S=new c;t.forEach(y,function(N){var E=N.graph().root,C=l(N,E,S,b);t.forEach(C.vs,function(A,w){N.node(A).order=w}),u(N,S,C.vs)})}function p(y,b){t.forEach(b,function(S){t.forEach(S,function(N,E){y.node(N).order=E})})}return _p}var wp,WN;function GH(){if(WN)return wp;WN=1;var t=Ke(),r=mn().Graph,i=kt();wp={positionX:S,findType1Conflicts:l,findType2Conflicts:o,addConflict:c,hasConflict:f,verticalAlignment:g,horizontalCompaction:d,alignCoordinates:y,findSmallestWidthAlignment:p,balance:b};function l(C,A){var w={};function T(q,R){var M=0,L=0,H=q.length,Q=t.last(R);return t.forEach(R,function(B,F){var W=u(C,B),D=W?C.node(W).order:H;(W||B===Q)&&(t.forEach(R.slice(L,F+1),function(K){t.forEach(C.predecessors(K),function(O){var G=C.node(O),X=G.order;(X<M||D<X)&&!(G.dummy&&C.node(K).dummy)&&c(w,O,K)})}),L=F+1,M=D)}),R}return t.reduce(A,T),w}function o(C,A){var w={};function T(R,M,L,H,Q){var B;t.forEach(t.range(M,L),function(F){B=R[F],C.node(B).dummy&&t.forEach(C.predecessors(B),function(W){var D=C.node(W);D.dummy&&(D.order<H||D.order>Q)&&c(w,W,B)})})}function q(R,M){var L=-1,H,Q=0;return t.forEach(M,function(B,F){if(C.node(B).dummy==="border"){var W=C.predecessors(B);W.length&&(H=C.node(W[0]).order,T(M,Q,F,L,H),Q=F,L=H)}T(M,Q,M.length,H,R.length)}),M}return t.reduce(A,q),w}function u(C,A){if(C.node(A).dummy)return t.find(C.predecessors(A),function(w){return C.node(w).dummy})}function c(C,A,w){if(A>w){var T=A;A=w,w=T}var q=C[A];q||(C[A]=q={}),q[w]=!0}function f(C,A,w){if(A>w){var T=A;A=w,w=T}return t.has(C[A],w)}function g(C,A,w,T){var q={},R={},M={};return t.forEach(A,function(L){t.forEach(L,function(H,Q){q[H]=H,R[H]=H,M[H]=Q})}),t.forEach(A,function(L){var H=-1;t.forEach(L,function(Q){var B=T(Q);if(B.length){B=t.sortBy(B,function(O){return M[O]});for(var F=(B.length-1)/2,W=Math.floor(F),D=Math.ceil(F);W<=D;++W){var K=B[W];R[Q]===Q&&H<M[K]&&!f(w,Q,K)&&(R[K]=Q,R[Q]=q[Q]=q[K],H=M[K])}}})}),{root:q,align:R}}function d(C,A,w,T,q){var R={},M=m(C,A,w,q),L=q?"borderLeft":"borderRight";function H(F,W){for(var D=M.nodes(),K=D.pop(),O={};K;)O[K]?F(K):(O[K]=!0,D.push(K),D=D.concat(W(K))),K=D.pop()}function Q(F){R[F]=M.inEdges(F).reduce(function(W,D){return Math.max(W,R[D.v]+M.edge(D))},0)}function B(F){var W=M.outEdges(F).reduce(function(K,O){return Math.min(K,R[O.w]-M.edge(O))},Number.POSITIVE_INFINITY),D=C.node(F);W!==Number.POSITIVE_INFINITY&&D.borderType!==L&&(R[F]=Math.max(R[F],W))}return H(Q,M.predecessors.bind(M)),H(B,M.successors.bind(M)),t.forEach(T,function(F){R[F]=R[w[F]]}),R}function m(C,A,w,T){var q=new r,R=C.graph(),M=N(R.nodesep,R.edgesep,T);return t.forEach(A,function(L){var H;t.forEach(L,function(Q){var B=w[Q];if(q.setNode(B),H){var F=w[H],W=q.edge(F,B);q.setEdge(F,B,Math.max(M(C,Q,H),W||0))}H=Q})}),q}function p(C,A){return t.minBy(t.values(A),function(w){var T=Number.NEGATIVE_INFINITY,q=Number.POSITIVE_INFINITY;return t.forIn(w,function(R,M){var L=E(C,M)/2;T=Math.max(R+L,T),q=Math.min(R-L,q)}),T-q})}function y(C,A){var w=t.values(A),T=t.min(w),q=t.max(w);t.forEach(["u","d"],function(R){t.forEach(["l","r"],function(M){var L=R+M,H=C[L],Q;if(H!==A){var B=t.values(H);Q=M==="l"?T-t.min(B):q-t.max(B),Q&&(C[L]=t.mapValues(H,function(F){return F+Q}))}})})}function b(C,A){return t.mapValues(C.ul,function(w,T){if(A)return C[A.toLowerCase()][T];var q=t.sortBy(t.map(C,T));return(q[1]+q[2])/2})}function S(C){var A=i.buildLayerMatrix(C),w=t.merge(l(C,A),o(C,A)),T={},q;t.forEach(["u","d"],function(M){q=M==="u"?A:t.values(A).reverse(),t.forEach(["l","r"],function(L){L==="r"&&(q=t.map(q,function(F){return t.values(F).reverse()}));var H=(M==="u"?C.predecessors:C.successors).bind(C),Q=g(C,q,w,H),B=d(C,q,Q.root,Q.align,L==="r");L==="r"&&(B=t.mapValues(B,function(F){return-F})),T[M+L]=B})});var R=p(C,T);return y(T,R),b(T,C.graph().align)}function N(C,A,w){return function(T,q,R){var M=T.node(q),L=T.node(R),H=0,Q;if(H+=M.width/2,t.has(M,"labelpos"))switch(M.labelpos.toLowerCase()){case"l":Q=-M.width/2;break;case"r":Q=M.width/2;break}if(Q&&(H+=w?Q:-Q),Q=0,H+=(M.dummy?A:C)/2,H+=(L.dummy?A:C)/2,H+=L.width/2,t.has(L,"labelpos"))switch(L.labelpos.toLowerCase()){case"l":Q=L.width/2;break;case"r":Q=-L.width/2;break}return Q&&(H+=w?Q:-Q),Q=0,H}}function E(C,A){return C.node(A).width}return wp}var Sp,eC;function VH(){if(eC)return Sp;eC=1;var t=Ke(),r=kt(),i=GH().positionX;Sp=l;function l(u){u=r.asNonCompoundGraph(u),o(u),t.forEach(i(u),function(c,f){u.node(f).x=c})}function o(u){var c=r.buildLayerMatrix(u),f=u.graph().ranksep,g=0;t.forEach(c,function(d){var m=t.max(t.map(d,function(p){return u.node(p).height}));t.forEach(d,function(p){u.node(p).y=g+m/2}),g+=m+f})}return Sp}var Ep,tC;function YH(){if(tC)return Ep;tC=1;var t=Ke(),r=EH(),i=NH(),l=TH(),o=kt().normalizeRanks,u=AH(),c=kt().removeEmptyRanks,f=jH(),g=MH(),d=RH(),m=UH(),p=VH(),y=kt(),b=mn().Graph;Ep=S;function S(k,V){var I=V&&V.debugTiming?y.time:y.notime;I("layout",function(){var ne=I(" buildLayoutGraph",function(){return H(k)});I(" runLayout",function(){N(ne,I)}),I(" updateInputGraph",function(){E(k,ne)})})}function N(k,V){V(" makeSpaceForEdgeLabels",function(){Q(k)}),V(" removeSelfEdges",function(){P(k)}),V(" acyclic",function(){r.run(k)}),V(" nestingGraph.run",function(){f.run(k)}),V(" rank",function(){l(y.asNonCompoundGraph(k))}),V(" injectEdgeLabelProxies",function(){B(k)}),V(" removeEmptyRanks",function(){c(k)}),V(" nestingGraph.cleanup",function(){f.cleanup(k)}),V(" normalizeRanks",function(){o(k)}),V(" assignRankMinMax",function(){F(k)}),V(" removeEdgeLabelProxies",function(){W(k)}),V(" normalize.run",function(){i.run(k)}),V(" parentDummyChains",function(){u(k)}),V(" addBorderSegments",function(){g(k)}),V(" order",function(){m(k)}),V(" insertSelfEdges",function(){oe(k)}),V(" adjustCoordinateSystem",function(){d.adjust(k)}),V(" position",function(){p(k)}),V(" positionSelfEdges",function(){z(k)}),V(" removeBorderNodes",function(){X(k)}),V(" normalize.undo",function(){i.undo(k)}),V(" fixupEdgeLabelCoords",function(){O(k)}),V(" undoCoordinateSystem",function(){d.undo(k)}),V(" translateGraph",function(){D(k)}),V(" assignNodeIntersects",function(){K(k)}),V(" reversePoints",function(){G(k)}),V(" acyclic.undo",function(){r.undo(k)})}function E(k,V){t.forEach(k.nodes(),function(I){var ne=k.node(I),le=V.node(I);ne&&(ne.x=le.x,ne.y=le.y,V.children(I).length&&(ne.width=le.width,ne.height=le.height))}),t.forEach(k.edges(),function(I){var ne=k.edge(I),le=V.edge(I);ne.points=le.points,t.has(le,"x")&&(ne.x=le.x,ne.y=le.y)}),k.graph().width=V.graph().width,k.graph().height=V.graph().height}var C=["nodesep","edgesep","ranksep","marginx","marginy"],A={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},w=["acyclicer","ranker","rankdir","align"],T=["width","height"],q={width:0,height:0},R=["minlen","weight","width","height","labeloffset"],M={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},L=["labelpos"];function H(k){var V=new b({multigraph:!0,compound:!0}),I=ae(k.graph());return V.setGraph(t.merge({},A,Y(I,C),t.pick(I,w))),t.forEach(k.nodes(),function(ne){var le=ae(k.node(ne));V.setNode(ne,t.defaults(Y(le,T),q)),V.setParent(ne,k.parent(ne))}),t.forEach(k.edges(),function(ne){var le=ae(k.edge(ne));V.setEdge(ne,t.merge({},M,Y(le,R),t.pick(le,L)))}),V}function Q(k){var V=k.graph();V.ranksep/=2,t.forEach(k.edges(),function(I){var ne=k.edge(I);ne.minlen*=2,ne.labelpos.toLowerCase()!=="c"&&(V.rankdir==="TB"||V.rankdir==="BT"?ne.width+=ne.labeloffset:ne.height+=ne.labeloffset)})}function B(k){t.forEach(k.edges(),function(V){var I=k.edge(V);if(I.width&&I.height){var ne=k.node(V.v),le=k.node(V.w),fe={rank:(le.rank-ne.rank)/2+ne.rank,e:V};y.addDummyNode(k,"edge-proxy",fe,"_ep")}})}function F(k){var V=0;t.forEach(k.nodes(),function(I){var ne=k.node(I);ne.borderTop&&(ne.minRank=k.node(ne.borderTop).rank,ne.maxRank=k.node(ne.borderBottom).rank,V=t.max(V,ne.maxRank))}),k.graph().maxRank=V}function W(k){t.forEach(k.nodes(),function(V){var I=k.node(V);I.dummy==="edge-proxy"&&(k.edge(I.e).labelRank=I.rank,k.removeNode(V))})}function D(k){var V=Number.POSITIVE_INFINITY,I=0,ne=Number.POSITIVE_INFINITY,le=0,fe=k.graph(),he=fe.marginx||0,ye=fe.marginy||0;function xe(ge){var _e=ge.x,ve=ge.y,Te=ge.width,we=ge.height;V=Math.min(V,_e-Te/2),I=Math.max(I,_e+Te/2),ne=Math.min(ne,ve-we/2),le=Math.max(le,ve+we/2)}t.forEach(k.nodes(),function(ge){xe(k.node(ge))}),t.forEach(k.edges(),function(ge){var _e=k.edge(ge);t.has(_e,"x")&&xe(_e)}),V-=he,ne-=ye,t.forEach(k.nodes(),function(ge){var _e=k.node(ge);_e.x-=V,_e.y-=ne}),t.forEach(k.edges(),function(ge){var _e=k.edge(ge);t.forEach(_e.points,function(ve){ve.x-=V,ve.y-=ne}),t.has(_e,"x")&&(_e.x-=V),t.has(_e,"y")&&(_e.y-=ne)}),fe.width=I-V+he,fe.height=le-ne+ye}function K(k){t.forEach(k.edges(),function(V){var I=k.edge(V),ne=k.node(V.v),le=k.node(V.w),fe,he;I.points?(fe=I.points[0],he=I.points[I.points.length-1]):(I.points=[],fe=le,he=ne),I.points.unshift(y.intersectRect(ne,fe)),I.points.push(y.intersectRect(le,he))})}function O(k){t.forEach(k.edges(),function(V){var I=k.edge(V);if(t.has(I,"x"))switch((I.labelpos==="l"||I.labelpos==="r")&&(I.width-=I.labeloffset),I.labelpos){case"l":I.x-=I.width/2+I.labeloffset;break;case"r":I.x+=I.width/2+I.labeloffset;break}})}function G(k){t.forEach(k.edges(),function(V){var I=k.edge(V);I.reversed&&I.points.reverse()})}function X(k){t.forEach(k.nodes(),function(V){if(k.children(V).length){var I=k.node(V),ne=k.node(I.borderTop),le=k.node(I.borderBottom),fe=k.node(t.last(I.borderLeft)),he=k.node(t.last(I.borderRight));I.width=Math.abs(he.x-fe.x),I.height=Math.abs(le.y-ne.y),I.x=fe.x+I.width/2,I.y=ne.y+I.height/2}}),t.forEach(k.nodes(),function(V){k.node(V).dummy==="border"&&k.removeNode(V)})}function P(k){t.forEach(k.edges(),function(V){if(V.v===V.w){var I=k.node(V.v);I.selfEdges||(I.selfEdges=[]),I.selfEdges.push({e:V,label:k.edge(V)}),k.removeEdge(V)}})}function oe(k){var V=y.buildLayerMatrix(k);t.forEach(V,function(I){var ne=0;t.forEach(I,function(le,fe){var he=k.node(le);he.order=fe+ne,t.forEach(he.selfEdges,function(ye){y.addDummyNode(k,"selfedge",{width:ye.label.width,height:ye.label.height,rank:he.rank,order:fe+ ++ne,e:ye.e,label:ye.label},"_se")}),delete he.selfEdges})})}function z(k){t.forEach(k.nodes(),function(V){var I=k.node(V);if(I.dummy==="selfedge"){var ne=k.node(I.e.v),le=ne.x+ne.width/2,fe=ne.y,he=I.x-le,ye=ne.height/2;k.setEdge(I.e,I.label),k.removeNode(V),I.label.points=[{x:le+2*he/3,y:fe-ye},{x:le+5*he/6,y:fe-ye},{x:le+he,y:fe},{x:le+5*he/6,y:fe+ye},{x:le+2*he/3,y:fe+ye}],I.label.x=I.x,I.label.y=I.y}})}function Y(k,V){return t.mapValues(t.pick(k,V),Number)}function ae(k){var V={};return t.forEach(k,function(I,ne){V[ne.toLowerCase()]=I}),V}return Ep}var Np,nC;function IH(){if(nC)return Np;nC=1;var t=Ke(),r=kt(),i=mn().Graph;Np={debugOrdering:l};function l(o){var u=r.buildLayerMatrix(o),c=new i({compound:!0,multigraph:!0}).setGraph({});return t.forEach(o.nodes(),function(f){c.setNode(f,{label:f}),c.setParent(f,"layer"+o.node(f).rank)}),t.forEach(o.edges(),function(f){c.setEdge(f.v,f.w,{},f.name)}),t.forEach(u,function(f,g){var d="layer"+g;c.setNode(d,{rank:"same"}),t.reduce(f,function(m,p){return c.setEdge(m,p,{style:"invis"}),p})}),c}return Np}var Cp,rC;function XH(){return rC||(rC=1,Cp="0.8.5"),Cp}var Tp,aC;function ZH(){return aC||(aC=1,Tp={graphlib:mn(),layout:YH(),debug:IH(),util:{time:kt().time,notime:kt().notime},version:XH()}),Tp}var FH=ZH();const iC=Ip(FH);function KH({data:t,selected:r}){const i=t;return x.jsxs("div",{className:`px-4 py-2 rounded-lg border-2 min-w-[200px] max-w-[300px] ${r?"border-blue-500 shadow-lg":"border-gray-300 shadow-md"} ${i.status==="completed"?"bg-green-50 border-green-300":i.status==="in_progress"?"bg-blue-50 border-blue-300":i.status==="blocked"?"bg-red-50 border-red-300":"bg-white"}`,style:{background:"var(--surface-elevated)",borderColor:r?"var(--accent-cyan)":"var(--border-default)"},children:[x.jsx(xi,{type:"target",position:pe.Top,className:"!bg-cyan-500 !w-3 !h-3 !border-2 !border-white",style:{background:"var(--accent-cyan)"}}),x.jsxs("div",{className:"flex items-center justify-between mb-2",children:[x.jsx("h3",{className:"font-semibold text-sm truncate flex-1",style:{color:"var(--text-primary)"},children:i.title}),x.jsx("span",{className:"ml-2 px-1.5 py-0.5 rounded text-xs flex-shrink-0",style:{background:i.priority==="top"?"var(--accent-red)":i.priority==="second"?"var(--accent-yellow)":"var(--surface-base)",color:i.priority==="later"?"var(--text-muted)":"white"},children:i.priority})]}),i.description&&x.jsx("p",{className:"text-xs line-clamp-2 mb-2",style:{color:"var(--text-secondary)"},children:i.description}),x.jsxs("div",{className:"flex items-center justify-between text-xs",style:{color:"var(--text-muted)"},children:[x.jsx("span",{className:"capitalize",children:i.status.replace("_"," ")}),x.jsxs("span",{children:[i.success_criteria?.filter(l=>l.completed).length||0,"/",i.success_criteria?.length||0]})]}),x.jsx(xi,{type:"source",position:pe.Bottom,className:"!bg-cyan-500 !w-3 !h-3 !border-2 !border-white",style:{background:"var(--accent-cyan)"}})]})}const QH=J.memo(KH),$H={taskNode:QH},lC=280,oC=120,PH=80,JH=30;function sC(t){return Array.isArray(t)?t:Object.values(t)}function uC(t,r,i="TB"){const l=new iC.graphlib.Graph;return l.setDefaultEdgeLabel(()=>({})),l.setGraph({rankdir:i,ranksep:PH,nodesep:JH,marginx:50,marginy:50,align:"UL",ranker:"tight-tree"}),t.forEach(u=>{l.setNode(u.id,{width:lC,height:oC})}),r.forEach(u=>{l.setEdge(u.source,u.target)}),iC.layout(l),{nodes:t.map(u=>{const c=l.node(u.id);return{...u,targetPosition:i==="TB"?pe.Top:pe.Left,sourcePosition:i==="TB"?pe.Bottom:pe.Right,position:{x:c.x-lC/2,y:c.y-oC/2}}}),edges:r}}function cC(t,r){const i=new Set(t.map(l=>l.id));return r.filter(l=>{if(!l.source||!l.target||l.source==="null"||l.target==="null"||l.source==="undefined"||l.target==="undefined")return console.warn("[GraphView] Filtering edge with invalid IDs:",l),!1;const o=i.has(l.source),u=i.has(l.target);return!o||!u?(console.warn(`[GraphView] Filtering edge with missing nodes: ${l.source} -> ${l.target}`),!1):!0})}const fj=J.forwardRef(({graphData:t,onNodeClick:r,colorMode:i="dark"},l)=>{const o=J.useRef(null),u=J.useRef(null),{initialNodes:c,initialEdges:f}=J.useMemo(()=>{if(!t)return{initialNodes:[],initialEdges:[]};console.log("[GraphView] Raw graphData:",{nodeCount:t.nodes?Array.isArray(t.nodes)?t.nodes.length:Object.keys(t.nodes).length:0,outgoingEdgesKeys:t.outgoingEdges?Object.keys(t.outgoingEdges):[]});const w=sC(t.nodes).map(M=>({id:M.id,type:"taskNode",position:{x:0,y:0},data:M})),T=[];Object.entries(t.outgoingEdges||{}).forEach(([M,L])=>{!M||M==="null"||M==="undefined"||(L||[]).forEach(H=>{!H||H==="null"||H==="undefined"||T.push({id:`${M}-${H}`,source:M,target:H,type:"smoothstep",animated:!0,style:{stroke:"var(--accent-cyan)",strokeWidth:2}})})});const q=cC(w,T),R=uC(w,q,"TB");return{initialNodes:R.nodes,initialEdges:R.edges}},[t]),[g,d,m]=fD(c),[p,y,b]=dD(f);J.useEffect(()=>{if(t){const w=sC(t.nodes).map(M=>({id:M.id,type:"taskNode",position:{x:0,y:0},data:M})),T=[];Object.entries(t.outgoingEdges||{}).forEach(([M,L])=>{!M||M==="null"||M==="undefined"||(L||[]).forEach(H=>{!H||H==="null"||H==="undefined"||T.push({id:`${M}-${H}`,source:M,target:H,type:"smoothstep",animated:!0,style:{stroke:"var(--accent-cyan)",strokeWidth:2}})})});const q=cC(w,T),R=uC(w,q,"TB");d(R.nodes),y(R.edges),requestAnimationFrame(()=>{u.current?.fitView({padding:.2,duration:200})})}},[t,d,y]);const S=J.useCallback(A=>{y(w=>fT(A,w))},[y]),N=J.useCallback((A,w)=>{r?.(w.id)},[r]),E=J.useCallback(async()=>{if(g.length===0||!o.current)return;const A=o.current.querySelector(".react-flow");if(A)try{const w=await R6(A,{backgroundColor:"#0d0d14",pixelRatio:2,filter:q=>!(q.classList?.contains("react-flow__controls")||q.classList?.contains("react-flow__minimap"))}),T=document.createElement("a");T.download=`octie-graph-${Date.now()}.png`,T.href=w,T.click()}catch(w){console.error("[GraphView] Failed to export PNG:",w)}},[g]),C=J.useCallback(async()=>{if(g.length===0||!o.current)return;const A=o.current.querySelector(".react-flow");if(A)try{const w=await fA(A,{backgroundColor:"#0d0d14",filter:q=>!(q.classList?.contains("react-flow__controls")||q.classList?.contains("react-flow__minimap"))}),T=document.createElement("a");T.download=`octie-graph-${Date.now()}.svg`,T.href=w,T.click()}catch(w){console.error("[GraphView] Failed to export SVG:",w)}},[g]);return J.useImperativeHandle(l,()=>({exportAsPNG:E,exportAsSVG:C})),t?g.length===0?x.jsx("div",{className:"flex items-center justify-center h-full",style:{background:"var(--surface-base)"},children:x.jsxs("div",{className:"text-center",children:[x.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-xl flex items-center justify-center",style:{background:"var(--surface-elevated)"},children:x.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-muted)",strokeWidth:"1.5",children:[x.jsx("circle",{cx:"12",cy:"12",r:"3"}),x.jsx("path",{d:"M12 2v4m0 12v4M2 12h4m12 0h4"})]})}),x.jsx("p",{style:{color:"var(--text-muted)"},children:"No tasks to display"})]})}):x.jsx("div",{className:"w-full h-full",ref:o,children:x.jsxs(cD,{nodes:g,edges:p,onNodesChange:m,onEdgesChange:b,onConnect:S,onNodeClick:N,nodeTypes:$H,colorMode:i,fitView:!0,fitViewOptions:{padding:.2},minZoom:.1,maxZoom:2,defaultEdgeOptions:{type:"smoothstep",animated:!0},style:{background:"var(--surface-base)"},onInit:A=>{u.current=A},children:[x.jsx(pD,{style:{background:"var(--surface-base)"}}),x.jsx(ED,{}),x.jsx(HD,{nodeColor:"var(--accent-cyan)",style:{background:"var(--surface-elevated)"}})]})}):x.jsx("div",{className:"flex items-center justify-center h-full",style:{background:"var(--surface-base)"},children:x.jsx("p",{style:{color:"var(--text-muted)"},children:"Loading graph..."})})});fj.displayName="GraphView";const Os=[{status:"ready",label:"Ready",icon:x.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("circle",{cx:"12",cy:"12",r:"10"}),x.jsx("polyline",{points:"12 6 12 12 16 14"})]})},{status:"in_progress",label:"In Progress",icon:x.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:x.jsx("path",{d:"M12 2v4m0 12v4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83"})})},{status:"in_review",label:"In Review",icon:x.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),x.jsx("circle",{cx:"12",cy:"12",r:"3"})]})},{status:"completed",label:"Completed",icon:x.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),x.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]})},{status:"blocked",label:"Blocked",icon:x.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("circle",{cx:"12",cy:"12",r:"10"}),x.jsx("line",{x1:"4.93",y1:"4.93",x2:"19.07",y2:"19.07"})]})}],Yp={ready:{bg:"rgba(255, 159, 28, 0.1)",color:"var(--accent-amber)",glow:"0 0 20px rgba(255, 159, 28, 0.2)",border:"rgba(255, 159, 28, 0.25)"},in_progress:{bg:"rgba(0, 212, 255, 0.12)",color:"var(--status-in-progress)",glow:"0 0 20px rgba(0, 212, 255, 0.3)",border:"rgba(0, 212, 255, 0.3)"},in_review:{bg:"rgba(167, 139, 250, 0.12)",color:"var(--accent-violet)",glow:"0 0 20px rgba(167, 139, 250, 0.3)",border:"rgba(167, 139, 250, 0.3)"},completed:{bg:"rgba(16, 185, 129, 0.12)",color:"var(--status-completed)",glow:"0 0 20px rgba(16, 185, 129, 0.3)",border:"rgba(16, 185, 129, 0.3)"},blocked:{bg:"rgba(244, 63, 94, 0.12)",color:"var(--status-blocked)",glow:"0 0 20px rgba(244, 63, 94, 0.3)",border:"rgba(244, 63, 94, 0.3)"}},fC={top:"var(--priority-top)",second:"var(--priority-second)",later:"var(--priority-later)"};function WH(){const[t,r]=J.useState(()=>typeof window<"u"?window.innerWidth:1280);return J.useEffect(()=>{const i=()=>r(window.innerWidth);return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]),t}function dC({task:t,isSelected:r,onClick:i}){return x.jsxs("button",{onClick:i,className:"w-full text-left p-3 rounded-lg transition-all duration-200 mb-2",style:{background:r?"linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(167, 139, 250, 0.08))":"var(--surface-raised)",border:r?"1px solid var(--accent-cyan)":"1px solid var(--border-default)",boxShadow:r?"var(--glow-cyan)":"none"},children:[x.jsxs("div",{className:"flex items-center justify-between mb-2",children:[x.jsx("span",{className:"text-[10px] tabular-nums",style:{color:"var(--text-muted)",fontFamily:"var(--font-mono)"},children:t.id.slice(0,8)}),x.jsx("div",{className:"px-1.5 py-0.5 rounded text-[10px] uppercase",style:{background:`${fC[t.priority]}20`,color:fC[t.priority],fontFamily:"var(--font-mono)"},children:t.priority})]}),x.jsx("h4",{className:"text-sm font-medium mb-1.5 line-clamp-2",style:{color:r?"var(--accent-cyan)":"var(--text-primary)"},children:t.title}),t.description&&x.jsx("p",{className:"text-xs mb-2 line-clamp-2",style:{color:"var(--text-muted)"},children:t.description}),x.jsxs("div",{className:"flex items-center gap-2",children:[t.success_criteria.length>0&&x.jsxs("div",{className:"flex items-center gap-1",children:[x.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-muted)",strokeWidth:"2",children:[x.jsx("polyline",{points:"9 11 12 14 22 4"}),x.jsx("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"})]}),x.jsxs("span",{className:"text-[10px]",style:{color:"var(--text-muted)"},children:[t.success_criteria.filter(l=>l.completed).length,"/",t.success_criteria.length]})]}),t.blockers.length>0&&x.jsxs("div",{className:"flex items-center gap-1",children:[x.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent-rose)",strokeWidth:"2",children:[x.jsx("circle",{cx:"12",cy:"12",r:"10"}),x.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),x.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),x.jsx("span",{className:"text-[10px]",style:{color:"var(--accent-rose)"},children:t.blockers.length})]})]})]})}function eL({status:t,label:r,icon:i,count:l,onClick:o,isActive:u}){const c=Yp[t];return x.jsxs("button",{onClick:o,className:"flex flex-col items-center justify-center p-3 rounded-lg transition-all duration-200 min-w-[60px]",style:{background:u?c.bg:"var(--surface-raised)",border:u?`2px solid ${c.border}`:"1px solid var(--border-default)",boxShadow:u?c.glow:"none"},children:[x.jsx("div",{style:{color:u?c.color:"var(--text-muted)"},children:i}),x.jsx("span",{className:"text-xl font-bold mt-1 tabular-nums",style:{color:u?c.color:"var(--text-primary)"},children:l}),x.jsx("span",{className:"text-[10px] uppercase tracking-wide mt-0.5",style:{color:u?c.color:"var(--text-muted)",fontFamily:"var(--font-mono)"},children:r})]})}function tL({tasks:t,selectedTaskId:r,onTaskClick:i,loading:l}){const o=WH(),[u,c]=J.useState(null),f=o<768,g=J.useMemo(()=>{const d={ready:[],in_progress:[],in_review:[],completed:[],blocked:[]};return t.forEach(m=>{d[m.status]&&d[m.status].push(m)}),d},[t]);return l?x.jsx("div",{className:"flex items-center justify-center h-full",children:x.jsx("div",{className:"w-8 h-8 rounded-full animate-spin",style:{border:"2px solid var(--border-default)",borderTopColor:"var(--accent-cyan)"}})}):f?x.jsxs("div",{className:"h-full overflow-y-auto p-4",children:[x.jsx("div",{className:"flex flex-wrap gap-3 justify-center mb-4",children:Os.map(({status:d,label:m,icon:p})=>x.jsx(eL,{status:d,label:m,icon:p,count:g[d].length,onClick:()=>c(u===d?null:d),isActive:u===d},d))}),u&&x.jsxs("div",{className:"rounded-xl p-3 mt-4",style:{background:"var(--surface-abyss)",border:"1px solid var(--border-default)"},children:[x.jsxs("div",{className:"flex items-center justify-between mb-3",children:[x.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2",style:{color:Yp[u].color},children:[Os.find(d=>d.status===u)?.icon,Os.find(d=>d.status===u)?.label]}),x.jsx("button",{onClick:()=>c(null),className:"p-1 rounded",style:{color:"var(--text-muted)"},children:x.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),x.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),x.jsx("div",{className:"space-y-1.5 max-h-[50vh] overflow-y-auto",children:g[u].length===0?x.jsx("p",{className:"text-xs text-center py-4",style:{color:"var(--text-muted)"},children:"No tasks"}):g[u].map(d=>x.jsx(dC,{task:d,isSelected:r===d.id,onClick:()=>i(d.id)},d.id))})]}),x.jsx("div",{className:"mt-4 p-3 rounded-lg text-center",style:{background:"var(--surface-raised)",border:"1px solid var(--border-default)"},children:x.jsxs("span",{className:"text-xs",style:{color:"var(--text-muted)"},children:["Total:"," ",x.jsx("span",{className:"font-medium",style:{color:"var(--accent-cyan)"},children:t.length})," ","tasks"]})})]}):x.jsx("div",{className:"h-full overflow-x-auto overflow-y-hidden",children:x.jsx("div",{className:"flex gap-3 p-4 h-full min-w-max",children:Os.map(({status:d,label:m,icon:p})=>{const y=Yp[d],b=g[d];return x.jsxs("div",{className:"flex flex-col w-64 flex-shrink-0",style:{maxHeight:"calc(100vh - 220px)"},children:[x.jsxs("div",{className:"flex items-center justify-between px-3 py-2 rounded-t-lg",style:{background:y.bg,borderBottom:`2px solid ${y.border}`},children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{style:{color:y.color},children:p}),x.jsx("h3",{className:"text-sm font-medium",style:{color:y.color,fontFamily:"var(--font-mono)"},children:m})]}),x.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium tabular-nums",style:{background:y.border,color:y.color},children:b.length})]}),x.jsx("div",{className:"flex-1 overflow-y-auto p-2 rounded-b-lg",style:{background:"var(--surface-abyss)",border:"1px solid var(--border-default)",borderTop:"none"},children:b.length===0?x.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",style:{color:"var(--text-muted)"},children:[x.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",className:"mb-2 opacity-50",children:x.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"})}),x.jsx("p",{className:"text-xs",children:"No tasks"})]}):b.map(S=>x.jsx(dC,{task:S,isSelected:r===S.id,onClick:()=>i(S.id)},S.id))})]},d)})})})}function nL({project:t,isActive:r,onClick:i,index:l}){const o=t.taskCount>50?"var(--accent-rose)":t.taskCount>20?"var(--accent-amber)":"var(--accent-cyan)";return x.jsx("button",{onClick:i,disabled:!t.exists,className:`
|
|
17
|
+
w-full text-left px-3 py-2.5 rounded-lg transition-all duration-200
|
|
18
|
+
focus-ring
|
|
19
|
+
${t.exists?"cursor-pointer":"opacity-50 cursor-not-allowed"}
|
|
20
|
+
`,style:{background:r?"linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(167, 139, 250, 0.1))":"transparent",border:r?"1px solid var(--accent-cyan)":"1px solid transparent",boxShadow:r?"var(--glow-cyan)":"none",animationDelay:`${l*50}ms`},children:x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center text-sm font-bold flex-shrink-0",style:{background:r?"linear-gradient(135deg, var(--accent-cyan), var(--accent-violet))":"var(--surface-elevated)",border:r?"none":"1px solid var(--border-default)",color:r?"white":"var(--text-secondary)",fontFamily:"var(--font-mono)"},children:t.name.charAt(0).toUpperCase()}),x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx("span",{className:"font-medium text-sm truncate",style:{color:r?"var(--accent-cyan)":"var(--text-primary)"},children:t.name}),!t.exists&&x.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent-amber)",strokeWidth:"2",className:"flex-shrink-0",children:[x.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),x.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),x.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]})]}),x.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[x.jsx("span",{className:"text-xs tabular-nums transition-all duration-300 ease-out",style:{color:o,fontFamily:"var(--font-mono)",minWidth:"1.5em",textAlign:"center"},children:t.taskCount}),x.jsx("span",{className:"text-xs",style:{color:"var(--text-muted)"},children:"tasks"}),t.exists&&x.jsxs(x.Fragment,{children:[x.jsx("span",{style:{color:"var(--border-default)"},children:"·"}),x.jsx("span",{className:"text-xs truncate",style:{color:"var(--text-muted)"},title:t.path,children:t.path.split(/[\\/]/).pop()})]})]})]})]})})}function rL({isOpen:t,onToggle:r}){const{projects:i,currentProjectPath:l,fetchProjects:o,setCurrentProject:u}=Ws(),{fetchTasks:c,fetchGraph:f,fetchStats:g,setCurrentProjectPath:d}=vC();J.useEffect(()=>{o()},[o,l]);const m=b=>{b.exists&&(u(b.path),d(b.path),c(),f(),g())},p=()=>{u(null),d(null)},y=!l;return x.jsxs(x.Fragment,{children:[t&&x.jsx("div",{className:"fixed inset-0 z-40 md:hidden",style:{background:"rgba(5, 5, 8, 0.8)",backdropFilter:"blur(4px)"},onClick:r}),x.jsx("aside",{className:`
|
|
21
|
+
h-full flex flex-col overflow-hidden
|
|
22
|
+
fixed z-50 md:static
|
|
23
|
+
transition-[width,min-width,border-color] duration-300 ease-out
|
|
24
|
+
`,style:{width:t?"256px":"0",minWidth:t?"256px":"0",background:"var(--surface-abyss)",borderRight:t?"1px solid var(--border-default)":"1px solid transparent"},children:x.jsxs("div",{className:"w-64 h-full flex flex-col",children:[x.jsxs("div",{className:"p-4 flex items-center justify-between",style:{borderBottom:"1px solid var(--border-muted)"},children:[x.jsxs("div",{className:"flex items-center gap-2.5",children:[x.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:"linear-gradient(135deg, var(--accent-cyan), var(--accent-violet))"},children:x.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2.5",children:[x.jsx("circle",{cx:"12",cy:"12",r:"3"}),x.jsx("path",{d:"M12 2v4m0 12v4M2 12h4m12 0h4"})]})}),x.jsx("span",{className:"font-semibold text-sm",style:{color:"var(--text-primary)",fontFamily:"var(--font-display)"},children:"octie"})]}),x.jsx("button",{onClick:r,className:"md:hidden w-6 h-6 flex items-center justify-center rounded",style:{color:"var(--text-muted)"},children:x.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),x.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),x.jsx("div",{className:"p-2",children:x.jsxs("button",{onClick:p,className:"w-full text-left px-3 py-2.5 rounded-lg transition-all duration-200 flex items-center gap-3 focus-ring",style:{background:y?"linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(167, 139, 250, 0.1))":"transparent",border:y?"1px solid var(--accent-cyan)":"1px solid transparent",boxShadow:y?"var(--glow-cyan)":"none"},children:[x.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center",style:{background:y?"linear-gradient(135deg, var(--accent-cyan), var(--accent-violet))":"var(--surface-elevated)",border:y?"none":"1px solid var(--border-default)"},children:x.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:y?"white":"var(--text-secondary)",strokeWidth:"2",children:[x.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),x.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]})}),x.jsx("span",{className:"font-medium text-sm",style:{color:y?"var(--accent-cyan)":"var(--text-primary)"},children:"Home"})]})}),x.jsxs("div",{className:"mx-3 my-2 flex items-center gap-2",style:{color:"var(--text-muted)"},children:[x.jsx("div",{className:"flex-1",style:{height:"1px",background:"var(--border-muted)"}}),x.jsx("span",{className:"text-[10px] uppercase tracking-wider",style:{fontFamily:"var(--font-mono)"},children:"Projects"}),x.jsx("div",{className:"flex-1",style:{height:"1px",background:"var(--border-muted)"}})]}),x.jsx("div",{className:"flex-1 overflow-y-auto p-2",children:i.length===0?x.jsxs("div",{className:"text-center py-8 px-4",children:[x.jsx("div",{className:"w-12 h-12 mx-auto mb-3 rounded-xl flex items-center justify-center",style:{background:"var(--surface-elevated)"},children:x.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-muted)",strokeWidth:"1.5",children:[x.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"}),x.jsx("line",{x1:"12",y1:"11",x2:"12",y2:"17"}),x.jsx("line",{x1:"9",y1:"14",x2:"15",y2:"14"})]})}),x.jsx("p",{className:"text-xs mb-1",style:{color:"var(--text-tertiary)"},children:"No projects registered"}),x.jsx("code",{className:"text-[10px] px-2 py-1 rounded",style:{background:"var(--surface-elevated)",color:"var(--accent-cyan)",fontFamily:"var(--font-mono)"},children:"octie init"})]}):x.jsx("div",{className:"space-y-1",children:i.map((b,S)=>x.jsx(nL,{project:b,isActive:l===b.path,onClick:()=>m(b),index:S},b.path))})}),x.jsx("div",{className:"p-3",style:{borderTop:"1px solid var(--border-muted)"},children:x.jsxs("div",{className:"flex items-center justify-between text-xs",children:[x.jsxs("span",{style:{color:"var(--text-muted)"},children:[i.length," project",i.length!==1?"s":""]}),x.jsxs("div",{className:"flex items-center gap-1",style:{color:"var(--text-muted)"},children:[x.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent-emerald)",boxShadow:"0 0 4px rgba(16, 185, 129, 0.4)"}}),x.jsx("span",{children:"Online"})]})]})})]})})]})}function aL({onMenuClick:t}){const{currentProjectPath:r,projects:i}=Ws(),{theme:l,toggleTheme:o}=pC(),u=i.find(c=>c.path===r);return x.jsxs("header",{className:"flex items-center justify-between px-4 h-14 flex-shrink-0",style:{background:"var(--surface-abyss)",borderBottom:"1px solid var(--border-default)"},children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("button",{onClick:t,className:"w-8 h-8 flex items-center justify-center rounded-lg transition-colors focus-ring",style:{background:"var(--surface-raised)",border:"1px solid var(--border-default)",color:"var(--text-secondary)"},title:"Toggle sidebar ([)",children:x.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),x.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),x.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),x.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[x.jsx("a",{href:"/",className:"hover:opacity-80 transition-opacity",style:{color:"var(--text-muted)"},children:"octie"}),u&&x.jsxs(x.Fragment,{children:[x.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-muted)",strokeWidth:"2",children:x.jsx("polyline",{points:"9 18 15 12 9 6"})}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("div",{className:"w-5 h-5 rounded flex items-center justify-center text-[10px] font-bold",style:{background:"linear-gradient(135deg, var(--accent-cyan), var(--accent-violet))",color:"white",fontFamily:"var(--font-mono)"},children:u.name.charAt(0).toUpperCase()}),x.jsx("span",{style:{color:"var(--text-primary)"},children:u.name})]})]})]})]}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("button",{onClick:o,className:"w-8 h-8 flex items-center justify-center rounded-lg transition-colors focus-ring",style:{background:"var(--surface-raised)",border:"1px solid var(--border-default)",color:"var(--text-secondary)"},title:"Toggle theme (T)",children:l==="dark"?x.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("circle",{cx:"12",cy:"12",r:"5"}),x.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),x.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),x.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),x.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),x.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),x.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),x.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),x.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}):x.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:x.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})}),x.jsx("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg transition-colors focus-ring",style:{background:"var(--surface-raised)",border:"1px solid var(--border-default)",color:"var(--text-secondary)"},title:"Keyboard shortcuts",children:x.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("circle",{cx:"12",cy:"12",r:"10"}),x.jsx("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),x.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]})})]})]})}function iL({project:t,onClick:r,index:i}){const l=t.exists?"var(--accent-emerald)":"var(--accent-amber)",o=t.exists?"0 0 8px rgba(16, 185, 129, 0.4)":"0 0 8px rgba(255, 159, 28, 0.4)";return x.jsxs("button",{onClick:r,disabled:!t.exists,className:`
|
|
25
|
+
interactive-card gradient-border
|
|
26
|
+
w-full text-left p-5 rounded-xl
|
|
27
|
+
bg-[var(--surface-raised)] border border-[var(--border-default)]
|
|
28
|
+
animate-fade-in-up opacity-0
|
|
29
|
+
focus-ring
|
|
30
|
+
${t.exists?"":"opacity-60"}
|
|
31
|
+
`,style:{animationDelay:`${i*80+200}ms`,animationFillMode:"forwards"},children:[x.jsxs("div",{className:"flex items-start justify-between mb-3",children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center text-lg font-bold",style:{background:"linear-gradient(135deg, var(--surface-elevated), var(--surface-floating))",border:"1px solid var(--border-default)",color:"var(--accent-cyan)",fontFamily:"var(--font-mono)"},children:t.name.charAt(0).toUpperCase()}),x.jsxs("div",{children:[x.jsx("h3",{className:"font-semibold text-base",style:{color:"var(--text-primary)",fontFamily:"var(--font-display)"},children:t.name}),!t.exists&&x.jsx("span",{className:"badge",style:{background:"rgba(255, 159, 28, 0.15)",color:"var(--accent-amber)",fontSize:"0.65rem",padding:"2px 6px"},children:"MISSING"})]})]}),x.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:l,boxShadow:o}})]}),x.jsxs("div",{className:"flex items-center gap-2 mb-4 text-xs",style:{color:"var(--text-tertiary)",fontFamily:"var(--font-mono)"},children:[x.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:x.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})}),x.jsx("span",{className:"truncate",title:t.path,children:t.path})]}),x.jsxs("div",{className:"flex items-center gap-4 text-xs",style:{color:"var(--text-secondary)"},children:[x.jsxs("div",{className:"flex items-center gap-1.5",children:[x.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("path",{d:"M9 11l3 3L22 4"}),x.jsx("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"})]}),x.jsx("span",{className:"tabular-nums",style:{color:"var(--accent-cyan)"},children:t.taskCount}),x.jsx("span",{children:"tasks"})]}),x.jsxs("div",{className:"flex items-center gap-1.5",children:[x.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("circle",{cx:"12",cy:"12",r:"10"}),x.jsx("polyline",{points:"12 6 12 12 16 14"})]}),x.jsx("span",{children:new Date(t.lastAccessed).toLocaleDateString(void 0,{month:"short",day:"numeric"})})]})]})]})}function lL(){const{projects:t,loading:r,fetchProjects:i,setCurrentProject:l}=Ws();J.useEffect(()=>{i()},[i]);const o=u=>{u.exists&&l(u.path)};return x.jsxs("div",{className:"min-h-screen relative overflow-hidden",style:{background:"var(--surface-base)"},children:[x.jsx("div",{className:"absolute inset-0 grid-pattern opacity-50",style:{pointerEvents:"none"}}),x.jsx("div",{className:"absolute top-0 right-0 w-[600px] h-[600px] rounded-full blur-[120px] opacity-20",style:{background:"radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%)",transform:"translate(30%, -30%)"}}),x.jsx("div",{className:"absolute bottom-0 left-0 w-[500px] h-[500px] rounded-full blur-[100px] opacity-15",style:{background:"radial-gradient(circle, var(--accent-violet) 0%, transparent 70%)",transform:"translate(-30%, 30%)"}}),x.jsxs("div",{className:"relative z-10 max-w-5xl mx-auto px-6 py-16",children:[x.jsxs("header",{className:"text-center mb-16 animate-fade-in-up",children:[x.jsxs("div",{className:"inline-flex items-center gap-3 mb-6",children:[x.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center",style:{background:"linear-gradient(135deg, var(--accent-cyan), var(--accent-violet))",boxShadow:"var(--glow-cyan)"},children:x.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2.5",children:[x.jsx("circle",{cx:"12",cy:"12",r:"3"}),x.jsx("path",{d:"M12 2v4m0 12v4M2 12h4m12 0h4"}),x.jsx("path",{d:"M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83"})]})}),x.jsx("h1",{className:"text-3xl font-bold gradient-text",style:{fontFamily:"var(--font-display)"},children:"octie"})]}),x.jsxs("p",{className:"text-lg max-w-xl mx-auto mb-4",style:{color:"var(--text-secondary)",lineHeight:"1.6"},children:["Graph-based task management for complex projects.",x.jsx("br",{}),x.jsx("span",{style:{color:"var(--text-tertiary)"},children:"Visualize dependencies. Track progress. Ship faster."})]}),x.jsxs("div",{className:"inline-flex items-center gap-6 px-5 py-2.5 rounded-full",style:{background:"var(--surface-raised)",border:"1px solid var(--border-default)"},children:[x.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[x.jsx("span",{style:{color:"var(--text-muted)"},children:"Projects:"}),x.jsx("span",{className:"tabular-nums font-semibold",style:{color:"var(--accent-cyan)"},children:t.length})]}),x.jsx("div",{style:{width:"1px",height:"16px",background:"var(--border-default)"}}),x.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[x.jsx("span",{style:{color:"var(--text-muted)"},children:"Total tasks:"}),x.jsx("span",{className:"tabular-nums font-semibold",style:{color:"var(--accent-amber)"},children:t.reduce((u,c)=>u+c.taskCount,0)})]})]})]}),x.jsx("section",{className:"mb-12 animate-fade-in-up opacity-0",style:{animationDelay:"100ms",animationFillMode:"forwards"},children:x.jsxs("div",{className:"glass-card p-6",children:[x.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[x.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center",style:{background:"var(--surface-elevated)"},children:x.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent-cyan)",strokeWidth:"2",children:x.jsx("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})})}),x.jsx("h2",{className:"text-base font-semibold",style:{color:"var(--text-primary)"},children:"Quick Start"})]}),x.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[{step:"01",text:"Select a project from the list or sidebar"},{step:"02",text:"Browse tasks in list or graph view"},{step:"03",text:"Filter by status, priority, or search"}].map((u,c)=>x.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-lg",style:{background:"var(--surface-elevated)",border:"1px solid var(--border-muted)"},children:[x.jsx("span",{className:"text-xs font-bold tabular-nums",style:{color:"var(--accent-cyan)",fontFamily:"var(--font-mono)"},children:u.step}),x.jsx("span",{className:"text-sm",style:{color:"var(--text-secondary)"},children:u.text})]},c))})]})}),x.jsxs("section",{className:"animate-fade-in-up opacity-0",style:{animationDelay:"150ms",animationFillMode:"forwards"},children:[x.jsxs("div",{className:"flex items-center justify-between mb-5",children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center",style:{background:"var(--surface-raised)"},children:x.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent-amber)",strokeWidth:"2",children:x.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})}),x.jsx("h2",{className:"text-base font-semibold",style:{color:"var(--text-primary)"},children:"Projects"})]}),x.jsxs("span",{className:"text-xs px-2 py-1 rounded-full",style:{background:"var(--surface-raised)",color:"var(--text-tertiary)",fontFamily:"var(--font-mono)"},children:[t.length," registered"]})]}),r?x.jsx("div",{className:"flex items-center justify-center py-16",children:x.jsx("div",{className:"w-8 h-8 rounded-full animate-spin",style:{border:"2px solid var(--border-default)",borderTopColor:"var(--accent-cyan)"}})}):t.length===0?x.jsxs("div",{className:"text-center py-16 rounded-xl",style:{background:"var(--surface-raised)",border:"1px dashed var(--border-default)"},children:[x.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-xl flex items-center justify-center",style:{background:"var(--surface-elevated)"},children:x.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-muted)",strokeWidth:"1.5",children:[x.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"}),x.jsx("line",{x1:"12",y1:"11",x2:"12",y2:"17"}),x.jsx("line",{x1:"9",y1:"14",x2:"15",y2:"14"})]})}),x.jsx("h3",{className:"text-base font-medium mb-2",style:{color:"var(--text-primary)"},children:"No projects yet"}),x.jsx("p",{className:"text-sm mb-5",style:{color:"var(--text-tertiary)"},children:"Initialize a project to get started with Octie"}),x.jsxs("code",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm",style:{background:"var(--surface-elevated)",border:"1px solid var(--border-default)",color:"var(--accent-cyan)",fontFamily:"var(--font-mono)"},children:[x.jsx("span",{style:{color:"var(--text-muted)"},children:"$"}),"octie init"]})]}):x.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:t.map((u,c)=>x.jsx(iL,{project:u,onClick:()=>o(u),index:c},u.path))})]}),x.jsx("footer",{className:"mt-12 text-center animate-fade-in-up opacity-0",style:{animationDelay:"400ms",animationFillMode:"forwards"},children:x.jsxs("div",{className:"inline-flex items-center gap-4 px-4 py-2 rounded-full text-xs",style:{background:"var(--surface-raised)",border:"1px solid var(--border-muted)",color:"var(--text-muted)"},children:[x.jsxs("span",{children:[x.jsx("kbd",{className:"px-1.5 py-0.5 rounded",style:{background:"var(--surface-elevated)",fontFamily:"var(--font-mono)"},children:"["})," ","toggle sidebar"]}),x.jsxs("span",{children:[x.jsx("kbd",{className:"px-1.5 py-0.5 rounded",style:{background:"var(--surface-elevated)",fontFamily:"var(--font-mono)"},children:"T"})," ","toggle theme"]}),x.jsxs("span",{children:[x.jsx("kbd",{className:"px-1.5 py-0.5 rounded",style:{background:"var(--surface-elevated)",fontFamily:"var(--font-mono)"},children:"Ctrl+K"})," ","search"]})]})})]})]})}function oL(){const{theme:t,toggleTheme:r}=pC(),i=J.useRef(null),{tasks:l,loading:o,error:u,selectedTaskId:c,graphData:f,projectStats:g,fetchTasks:d,fetchGraph:m,fetchStats:p,setQueryOptions:y,setSelectedTask:b,setCurrentProjectPath:S,clearError:N}=vC(),{currentProjectPath:E,sidebarOpen:C,getProjectFromUrl:A,setCurrentProject:w,toggleSidebar:T,fetchProjects:q}=Ws(),[R,M]=J.useState("kanban"),[L,H]=J.useState("all"),[Q,B]=J.useState("all"),[F,W]=J.useState(""),[D,K]=J.useState("");J.useEffect(()=>{const V=setTimeout(()=>{K(F)},500);return()=>clearTimeout(V)},[F]);const O=J.useMemo(()=>{let V=l;if(L!=="all"&&(V=V.filter(I=>I.status===L)),Q!=="all"&&(V=V.filter(I=>I.priority===Q)),D.trim()){const I=D.toLowerCase().trim();V=V.filter(ne=>ne.title.toLowerCase().includes(I)||ne.description?.toLowerCase().includes(I)||ne.notes?.toLowerCase().includes(I))}return V},[l,L,Q,D]);J.useEffect(()=>{const V=A();V&&w(V),q()},[A,w,q]),J.useEffect(()=>{S(E)},[E,S]),J.useEffect(()=>{E&&(d(),m(),p())},[E,d,m,p]);const G=J.useCallback(()=>{q(),d(),m(),p()},[q,d,m,p]),X=J.useCallback(V=>{H(V),y(I=>({...I,status:V==="all"?void 0:V}))},[y]),P=J.useCallback(V=>{B(V),y(I=>({...I,priority:V==="all"?void 0:V}))},[y]),oe=J.useCallback(V=>{W(V),y(I=>({...I,search:V||void 0}))},[y]),z=J.useCallback(V=>{V==="graph"&&(H("all"),B("all"),W(""),K(""),y({})),M(V)},[y]),Y=J.useCallback(()=>{i.current?.exportAsPNG()},[]),ae=J.useCallback(()=>{i.current?.exportAsSVG()},[]);J.useEffect(()=>{const V=I=>{if(!(I.target.tagName==="INPUT"||I.target.tagName==="TEXTAREA")&&((I.ctrlKey||I.metaKey)&&I.key==="r"&&(I.preventDefault(),G()),(I.ctrlKey||I.metaKey)&&I.key==="k"&&(I.preventDefault(),document.getElementById("search")?.focus()),I.key==="g"&&!I.ctrlKey&&!I.metaKey&&z("graph"),I.key==="k"&&!I.ctrlKey&&!I.metaKey&&z("kanban"),I.key==="t"&&!I.ctrlKey&&!I.metaKey&&r(),I.key==="Escape"&&b(null),I.key==="["&&!I.ctrlKey&&!I.metaKey&&T(),R==="kanban"&&l.length>0)){if(I.key==="ArrowDown"||I.key==="j"){I.preventDefault();const ne=c?l.findIndex(fe=>fe.id===c):-1,le=Math.min(ne+1,l.length-1);b(l[le]?.id||null)}if(I.key==="ArrowUp"){I.preventDefault();const ne=c?l.findIndex(fe=>fe.id===c):0,le=Math.max(ne-1,0);b(l[le]?.id||null)}}};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[R,l,c,G,r,b,T,z]);const k=!E;return x.jsxs("div",{className:"h-screen flex flex-col overflow-hidden",style:{background:"var(--surface-base)"},children:[x.jsx(aL,{onMenuClick:T}),x.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[x.jsx(rL,{isOpen:C,onToggle:T}),k?x.jsx("main",{className:"flex-1 overflow-y-auto",children:x.jsx(lL,{})}):x.jsxs(x.Fragment,{children:[u&&x.jsx("div",{className:"m-4 p-4 rounded-xl",style:{background:"rgba(244, 63, 94, 0.1)",border:"1px solid var(--accent-rose)"},children:x.jsxs("div",{className:"flex items-start gap-3",children:[x.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent-rose)",strokeWidth:"2",children:[x.jsx("circle",{cx:"12",cy:"12",r:"10"}),x.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),x.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),x.jsxs("div",{className:"flex-1",children:[x.jsxs("p",{className:"text-sm font-medium",style:{color:"var(--accent-rose)"},children:["Error: ",u]}),x.jsxs("p",{className:"text-xs mt-1",style:{color:"var(--text-muted)"},children:["Make sure the Octie CLI server is running:"," ",x.jsx("code",{className:"px-1.5 py-0.5 rounded text-xs",style:{background:"var(--surface-elevated)",color:"var(--accent-cyan)",fontFamily:"var(--font-mono)"},children:"octie serve"})]}),x.jsx("button",{onClick:N,className:"mt-3 px-3 py-1.5 text-xs rounded-lg transition-colors",style:{background:"var(--surface-elevated)",color:"var(--text-secondary)",border:"1px solid var(--border-default)"},children:"Dismiss"})]})]})}),x.jsxs("main",{className:"flex-1 flex flex-col overflow-hidden min-w-0",children:[x.jsx(RM,{view:R,onViewChange:z,onRefresh:G,loading:o,onExportPNG:Y,onExportSVG:ae}),x.jsx(zM,{stats:g,loading:o}),x.jsxs("div",{className:"flex-1 flex overflow-hidden min-w-0 min-h-0",children:[R==="graph"&&x.jsx("div",{className:"flex-1 min-w-0 min-h-0 overflow-hidden",children:x.jsx(fj,{ref:i,graphData:f,onNodeClick:b,colorMode:t})}),R==="kanban"&&x.jsxs("div",{className:"flex-1 min-w-0 min-h-0 overflow-hidden flex flex-col",children:[x.jsx("div",{className:"px-3 py-2 flex-shrink-0 min-w-0 overflow-hidden",style:{background:"var(--surface-abyss)",borderBottom:"1px solid var(--border-default)"},children:x.jsx(OM,{selectedStatus:L,selectedPriority:Q,searchQuery:F,onStatusChange:X,onPriorityChange:P,onSearchChange:oe,compact:!0})}),x.jsx("div",{className:"flex-1 min-h-0",children:x.jsx(tL,{tasks:O,selectedTaskId:c,onTaskClick:b,loading:o})})]}),x.jsxs("aside",{className:`
|
|
32
|
+
w-[400px] flex-shrink-0 overflow-hidden hidden md:flex md:flex-col
|
|
33
|
+
${c?"fixed inset-0 z-50 md:relative md:z-auto md:flex":""}
|
|
34
|
+
`,style:{background:"var(--surface-abyss)",borderLeft:"1px solid var(--border-default)"},children:[c&&x.jsx("button",{onClick:()=>b(null),className:"md:hidden absolute top-4 right-4 w-8 h-8 flex items-center justify-center rounded-lg z-10",style:{background:"var(--surface-raised)",border:"1px solid var(--border-default)",color:"var(--text-secondary)"},children:x.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[x.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),x.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),x.jsx("div",{className:"flex-1 overflow-y-auto p-4 min-h-0",children:x.jsx(qM,{task:l.find(V=>V.id===c)||null,loading:o})})]})]})]})]})]})]})}NM.createRoot(document.getElementById("root")).render(x.jsx(J.StrictMode,{children:x.jsx(MM,{children:x.jsx(oL,{})})}));
|