octie-cli 1.0.1 → 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.
@@ -1,34 +0,0 @@
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 Vp(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var If={exports:{}},xl={};var ub;function vM(){if(ub)return xl;ub=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 cb;function mM(){return cb||(cb=1,If.exports=vM()),If.exports}var x=mM(),Xf={exports:{}},Ee={};var fb;function pM(){if(fb)return Ee;fb=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"),h=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 R=Array.isArray;function q(){}var M={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function H(z,Y,ae){var D=ae.ref;return{$$typeof:t,type:z,key:Y,ref:D!==void 0?D:null,props:ae}}function K(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 J=/\/+/g;function k(z,Y){return typeof z=="object"&&z!==null&&z.key!=null?F(""+z.key):Y.toString(36)}function Z(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(q,q):(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,D,U){var $=typeof z;($==="undefined"||$==="boolean")&&(z=null);var re=!1;if(z===null)re=!0;else switch($){case"bigint":case"string":case"number":re=!0;break;case"object":switch(z.$$typeof){case t:case r:re=!0;break;case m:return re=z._init,O(re(z._payload),Y,ae,D,U)}}if(re)return U=U(z),re=D===""?"."+k(z,0):D,R(U)?(ae="",re!=null&&(ae=re.replace(J,"$&/")+"/"),O(U,Y,ae,"",function(he){return he})):U!=null&&(B(U)&&(U=K(U,ae+(U.key==null||z&&z.key===U.key?"":(""+U.key).replace(J,"$&/")+"/")+re)),Y.push(U)),1;re=0;var oe=D===""?".":D+":";if(R(z))for(var fe=0;fe<z.length;fe++)D=z[fe],$=oe+k(D,fe),re+=O(D,Y,ae,$,U);else if(fe=b(z),typeof fe=="function")for(z=fe.call(z),fe=0;!(D=z.next()).done;)D=D.value,$=oe+k(D,fe++),re+=O(D,Y,ae,$,U);else if($==="object"){if(typeof z.then=="function")return O(Z(z),Y,ae,D,U);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 re}function V(z,Y,ae){if(z==null)return z;var D=[],U=0;return O(z,D,"","",function($){return Y.call(ae,$,U++)}),D}function I(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)},le={map:V,forEach:function(z,Y,ae){V(z,function(){Y.apply(this,arguments)},ae)},count:function(z){var Y=0;return V(z,function(){Y++}),Y},toArray:function(z){return V(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=le,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 D=N({},z.props),U=z.key;if(Y!=null)for($ in Y.key!==void 0&&(U=""+Y.key),Y)!L.call(Y,$)||$==="key"||$==="__self"||$==="__source"||$==="ref"&&Y.ref===void 0||(D[$]=Y[$]);var $=arguments.length-2;if($===1)D.children=ae;else if(1<$){for(var re=Array($),oe=0;oe<$;oe++)re[oe]=arguments[oe+2];D.children=re}return H(z.type,U,D)},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 D,U={},$=null;if(Y!=null)for(D in Y.key!==void 0&&($=""+Y.key),Y)L.call(Y,D)&&D!=="key"&&D!=="__self"&&D!=="__source"&&(U[D]=Y[D]);var re=arguments.length-2;if(re===1)U.children=ae;else if(1<re){for(var oe=Array(re),fe=0;fe<re;fe++)oe[fe]=arguments[fe+2];U.children=oe}if(z&&z.defaultProps)for(D in re=z.defaultProps,re)U[D]===void 0&&(U[D]=re[D]);return H(z,$,U)},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:I}},Ee.memo=function(z,Y){return{$$typeof:h,type:z,compare:Y===void 0?null:Y}},Ee.startTransition=function(z){var Y=M.T,ae={};M.T=ae;try{var D=z(),U=M.S;U!==null&&U(ae,D),typeof D=="object"&&D!==null&&typeof D.then=="function"&&D.then(q,P)}catch($){P($)}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 db;function Ul(){return db||(db=1,Xf.exports=pM()),Xf.exports}var ee=Ul();const Sl=Vp(ee);var Zf={exports:{}},bl={},Ff={exports:{}},Kf={};var hb;function yM(){return hb||(hb=1,(function(t){function r(O,V){var I=O.length;O.push(V);e:for(;0<I;){var P=I-1>>>1,le=O[P];if(0<o(le,V))O[P]=V,O[I]=le,I=P;else break e}}function i(O){return O.length===0?null:O[0]}function l(O){if(O.length===0)return null;var V=O[0],I=O.pop();if(I!==V){O[0]=I;e:for(var P=0,le=O.length,z=le>>>1;P<z;){var Y=2*(P+1)-1,ae=O[Y],D=Y+1,U=O[D];if(0>o(ae,I))D<le&&0>o(U,ae)?(O[P]=U,O[D]=I,P=D):(O[P]=ae,O[Y]=I,P=Y);else if(D<le&&0>o(U,I))O[P]=U,O[D]=I,P=D;else break e}}return V}function o(O,V){var I=O.sortIndex-V.sortIndex;return I!==0?I:O.id-V.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=[],h=[],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 V=i(h);V!==null;){if(V.callback===null)l(h);else if(V.startTime<=O)l(h),V.sortIndex=V.expirationTime,r(g,V);else break;V=i(h)}}function R(O){if(N=!1,T(O),!S)if(i(g)!==null)S=!0,q||(q=!0,F());else{var V=i(h);V!==null&&Z(R,V.startTime-O)}}var q=!1,M=-1,L=5,H=-1;function K(){return E?!0:!(t.unstable_now()-H<L)}function B(){if(E=!1,q){var O=t.unstable_now();H=O;var V=!0;try{e:{S=!1,N&&(N=!1,A(M),M=-1),b=!0;var I=y;try{t:{for(T(O),p=i(g);p!==null&&!(p.expirationTime>O&&K());){var P=p.callback;if(typeof P=="function"){p.callback=null,y=p.priorityLevel;var le=P(p.expirationTime<=O);if(O=t.unstable_now(),typeof le=="function"){p.callback=le,T(O),V=!0;break t}p===i(g)&&l(g),T(O)}else l(g);p=i(g)}if(p!==null)V=!0;else{var z=i(h);z!==null&&Z(R,z.startTime-O),V=!1}}break e}finally{p=null,y=I,b=!1}V=void 0}}finally{V?F():q=!1}}}var F;if(typeof w=="function")F=function(){w(B)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,k=J.port2;J.port1.onmessage=B,F=function(){k.postMessage(null)}}else F=function(){C(B,0)};function Z(O,V){M=C(function(){O(t.unstable_now())},V)}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 V=3;break;default:V=y}var I=y;y=V;try{return O()}finally{y=I}},t.unstable_requestPaint=function(){E=!0},t.unstable_runWithPriority=function(O,V){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var I=y;y=O;try{return V()}finally{y=I}},t.unstable_scheduleCallback=function(O,V,I){var P=t.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?P+I:P):I=P,O){case 1:var le=-1;break;case 2:le=250;break;case 5:le=1073741823;break;case 4:le=1e4;break;default:le=5e3}return le=I+le,O={id:m++,callback:V,priorityLevel:O,startTime:I,expirationTime:le,sortIndex:-1},I>P?(O.sortIndex=I,r(h,O),i(g)===null&&O===i(h)&&(N?(A(M),M=-1):N=!0,Z(R,I-P))):(O.sortIndex=le,r(g,O),S||b||(S=!0,q||(q=!0,F()))),O},t.unstable_shouldYield=K,t.unstable_wrapCallback=function(O){var V=y;return function(){var I=y;y=V;try{return O.apply(this,arguments)}finally{y=I}}}})(Kf)),Kf}var gb;function xM(){return gb||(gb=1,Ff.exports=yM()),Ff.exports}var Qf={exports:{}},_t={};var vb;function bM(){if(vb)return _t;vb=1;var t=Ul();function r(g){var h="https://react.dev/errors/"+g;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+g+"; visit "+h+" 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,h,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:p==null?null:""+p,children:g,containerInfo:h,implementation:m}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(g,h){if(g==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return _t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,_t.createPortal=function(g,h){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(r(299));return u(g,h,null,m)},_t.flushSync=function(g){var h=c.T,m=l.p;try{if(c.T=null,l.p=2,g)return g()}finally{c.T=h,l.p=m,l.d.f()}},_t.preconnect=function(g,h){typeof g=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,l.d.C(g,h))},_t.prefetchDNS=function(g){typeof g=="string"&&l.d.D(g)},_t.preinit=function(g,h){if(typeof g=="string"&&h&&typeof h.as=="string"){var m=h.as,p=f(m,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;m==="style"?l.d.S(g,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:y,fetchPriority:b}):m==="script"&&l.d.X(g,{crossOrigin:p,integrity:y,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},_t.preinitModule=function(g,h){if(typeof g=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=f(h.as,h.crossOrigin);l.d.M(g,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&l.d.M(g)},_t.preload=function(g,h){if(typeof g=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,p=f(m,h.crossOrigin);l.d.L(g,m,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},_t.preloadModule=function(g,h){if(typeof g=="string")if(h){var m=f(h.as,h.crossOrigin);l.d.m(g,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else l.d.m(g)},_t.requestFormReset=function(g){l.d.r(g)},_t.unstable_batchedUpdates=function(g,h){return g(h)},_t.useFormState=function(g,h,m){return c.H.useFormState(g,h,m)},_t.useFormStatus=function(){return c.H.useHostTransitionStatus()},_t.version="19.2.4",_t}var mb;function fC(){if(mb)return Qf.exports;mb=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(),Qf.exports=bM(),Qf.exports}var pb;function _M(){if(pb)return bl;pb=1;var t=xM(),r=Ul(),i=fC();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 h(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 d=a.return;if(d===null)break;var v=d.alternate;if(v===null){if(s=d.return,s!==null){a=s;continue}break}if(d.child===v.child){for(v=d.child;v;){if(v===a)return g(d),e;if(v===s)return g(d),n;v=v.sibling}throw Error(l(188))}if(a.return!==s.return)a=d,s=v;else{for(var _=!1,j=d.child;j;){if(j===a){_=!0,a=d,s=v;break}if(j===s){_=!0,s=d,a=v;break}j=j.sibling}if(!_){for(j=v.child;j;){if(j===a){_=!0,a=v,s=d;break}if(j===s){_=!0,s=v,a=d;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"),R=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),K=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 J=Symbol.for("react.client.reference");function k(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===J?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 R:return"Suspense";case q: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:k(e.type)||"Memo";case L:n=e._payload,e=e._init;try{return k(e(n))}catch{}}return null}var Z=Array.isArray,O=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},P=[],le=-1;function z(e){return{current:e}}function Y(e){0>le||(e.current=P[le],P[le]=null,le--)}function ae(e,n){le++,P[le]=e.current,e.current=n}var D=z(null),U=z(null),$=z(null),re=z(null);function oe(e,n){switch(ae($,n),ae(U,e),ae(D,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?qx(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=qx(n),e=Ox(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Y(D),ae(D,e)}function fe(){Y(D),Y(U),Y($)}function he(e){e.memoizedState!==null&&ae(re,e);var n=D.current,a=Ox(n,e.type);n!==a&&(ae(U,e),ae(D,a))}function ye(e){U.current===e&&(Y(D),Y(U)),re.current===e&&(Y(re),vl._currentValue=I)}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 ne=ie}Reflect.construct(e,[],ce)}else{try{ce.call()}catch(ie){ne=ie}e.call(ce.prototype)}}else{try{throw Error()}catch(ie){ne=ie}(ce=e())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(ie){if(ie&&ne&&typeof ie.stack=="string")return[ie.stack,ne.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=s.DetermineComponentFrameRoot(),_=v[0],j=v[1];if(_&&j){var G=_.split(`
4
- `),te=j.split(`
5
- `);for(d=s=0;s<G.length&&!G[s].includes("DetermineComponentFrameRoot");)s++;for(;d<te.length&&!te[d].includes("DetermineComponentFrameRoot");)d++;if(s===G.length||d===te.length)for(s=G.length-1,d=te.length-1;1<=s&&0<=d&&G[s]!==te[d];)d--;for(;1<=s&&0<=d;s--,d--)if(G[s]!==te[d]){if(s!==1||d!==1)do if(s--,d--,0>d||G[s]!==te[d]){var se=`
6
- `+G[s].replace(" at new "," at ");return e.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",e.displayName)),se}while(1<=s&&0<=d);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:Ru,ju=Math.log,Mu=Math.LN2;function Ru(e){return e>>>=0,e===0?32:31-(ju(e)/Mu|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 d=0,v=e.suspendedLanes,_=e.pingedLanes;e=e.warmLanes;var j=s&134217727;return j!==0?(s=j&~v,s!==0?d=Rn(s):(_&=j,_!==0?d=Rn(_):a||(a=j&~e,a!==0&&(d=Rn(a))))):(j=s&~v,j!==0?d=Rn(j):_!==0?d=Rn(_):a||(a=s&~e,a!==0&&(d=Rn(a)))),d===0?0:n!==0&&n!==d&&(n&v)===0&&(v=d&-d,a=n&-n,v>=a||v===32&&(a&4194048)!==0)?n:d}function Ur(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function qu(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 Ou(e,n,a,s,d,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,G=e.expirationTimes,te=e.hiddenUpdates;for(a=_&~a;0<a;){var se=31-wt(a),ce=1<<se;j[se]=0,G[se]=-1;var ne=te[se];if(ne!==null)for(te[se]=null,se=0;se<ne.length;se++){var ie=ne[se];ie!==null&&(ie.lane&=-536870913)}a&=~ce}s!==0&&Wl(e,s,0),v!==0&&d===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),d=1<<s;d&n|e[s]&n&&(e[s]|=n),a&=~d}}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=V.p;return e!==0?e:(e=window.event,e===void 0?32:nb(e.type))}function ro(e,n){var a=V.p;try{return V.p=e,n()}finally{V.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,zu="__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[zu]}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=Ux(e);e!==null;){if(a=e[ct])return a;e=Ux(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 Du=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 ku(e){return nt.call(so,e)?!0:nt.call(Mi,e)?!1:Du.test(e)?so[e]=!0:(Mi[e]=!0,!1)}function Ca(e,n,a){if(ku(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 Hu(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 d=s.get,v=s.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return d.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=Hu(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 Lu=/[\n"\\]/g;function Tt(e){return e.replace(Lu,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Ir(e,n,a,s,d,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"),d==null&&v!=null&&(e.defaultChecked=!!v),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="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,d,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??d,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 d=0;d<a.length;d++)n["$"+a[d]]=!0;for(a=0;a<e.length;a++)d=n.hasOwnProperty("$"+e[a].value),e[a].selected!==d&&(e[a].selected=d),d&&s&&(e[a].defaultSelected=!0)}else{for(a=""+Ct(a),n=null,d=0;d<e.length;d++){if(e[d].value===a){e[d].selected=!0,s&&(e[d].defaultSelected=!0);return}n!==null||e[d].disabled||(n=e[d])}n!==null&&(n.selected=!0)}}function Ty(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 Ay(e,n,a,s){if(n==null){if(s!=null){if(a!=null)throw Error(l(92));if(Z(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 c3=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 jy(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||c3.has(n)?n==="float"?e.cssFloat=a:e[n]=(""+a).trim():e[n]=a+"px"}function My(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 d in n)s=n[d],n.hasOwnProperty(d)&&a[d]!==s&&jy(e,d,s)}else for(var v in n)n.hasOwnProperty(v)&&jy(e,v,n[v])}function Bu(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 f3=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"]]),d3=/^[\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 d3.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Dn(){}var Uu=null;function Gu(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 Ry(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 d=s[bt]||null;if(!d)throw Error(l(90));Ir(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(n=0;n<a.length;n++)s=a[n],s.form===e.form&&co(s)}break e;case"textarea":Ty(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&zn(e,!!a.multiple,n,!1)}}}var Vu=!1;function qy(e,n,a){if(Vu)return e(n,a);Vu=!0;try{var s=e(n);return s}finally{if(Vu=!1,(Ma!==null||Ra!==null)&&(es(),Ma&&(n=Ma,e=Ra,Ra=Ma=null,Ry(n),e)))for(n=0;n<e.length;n++)Ry(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"),Yu=!1;if(kn)try{var Oi={};Object.defineProperty(Oi,"passive",{get:function(){Yu=!0}}),window.addEventListener("test",Oi,Oi),window.removeEventListener("test",Oi,Oi)}catch{Yu=!1}var fr=null,Iu=null,go=null;function Oy(){if(go)return go;var e,n=Iu,a=n.length,s,d="value"in fr?fr.value:fr.textContent,v=d.length;for(e=0;e<a&&n[e]===d[e];e++);var _=a-e;for(s=1;s<=_&&n[a-s]===d[v-s];s++);return go=d.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 zy(){return!1}function At(e){function n(a,s,d,v,_){this._reactName=a,this._targetInst=d,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:zy,this.isPropagationStopped=zy,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}),h3=At(zi),Xu,Zu,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:Ku,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"?(Xu=e.screenX-Di.screenX,Zu=e.screenY-Di.screenY):Zu=Xu=0,Di=e),Xu)},movementY:function(e){return"movementY"in e?e.movementY:Zu}}),Dy=At(yo),g3=p({},yo,{dataTransfer:0}),v3=At(g3),m3=p({},zi,{relatedTarget:0}),Fu=At(m3),p3=p({},Xr,{animationName:0,elapsedTime:0,pseudoElement:0}),y3=At(p3),x3=p({},Xr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),b3=At(x3),_3=p({},Xr,{data:0}),ky=At(_3),w3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},S3={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"},E3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function N3(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=E3[e])?!!n[e]:!1}function Ku(){return N3}var C3=p({},zi,{key:function(e){if(e.key){var n=w3[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"?S3[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ku,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}}),T3=At(C3),A3=p({},yo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hy=At(A3),j3=p({},zi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ku}),M3=At(j3),R3=p({},Xr,{propertyName:0,elapsedTime:0,pseudoElement:0}),q3=At(R3),O3=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}),z3=At(O3),D3=p({},Xr,{newState:0,oldState:0}),k3=At(D3),H3=[9,13,27,32],Qu=kn&&"CompositionEvent"in window,ki=null;kn&&"documentMode"in document&&(ki=document.documentMode);var L3=kn&&"TextEvent"in window&&!ki,Ly=kn&&(!Qu||ki&&8<ki&&11>=ki),By=" ",Uy=!1;function Gy(e,n){switch(e){case"keyup":return H3.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vy(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qa=!1;function B3(e,n){switch(e){case"compositionend":return Vy(n);case"keypress":return n.which!==32?null:(Uy=!0,By);case"textInput":return e=n.data,e===By&&Uy?null:e;default:return null}}function U3(e,n){if(qa)return e==="compositionend"||!Qu&&Gy(e,n)?(e=Oy(),go=Iu=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 Ly&&n.locale!=="ko"?null:n.data;default:return null}}var G3={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 Yy(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!G3[e.type]:n==="textarea"}function Iy(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 V3(e){Cx(e,0)}function xo(e){var n=sr(e);if(co(n))return e}function Xy(e,n){if(e==="change")return n}var Zy=!1;if(kn){var $u;if(kn){var Pu="oninput"in document;if(!Pu){var Fy=document.createElement("div");Fy.setAttribute("oninput","return;"),Pu=typeof Fy.oninput=="function"}$u=Pu}else $u=!1;Zy=$u&&(!document.documentMode||9<document.documentMode)}function Ky(){Hi&&(Hi.detachEvent("onpropertychange",Qy),Li=Hi=null)}function Qy(e){if(e.propertyName==="value"&&xo(Li)){var n=[];Iy(n,Li,e,Gu(e)),qy(V3,n)}}function Y3(e,n,a){e==="focusin"?(Ky(),Hi=n,Li=a,Hi.attachEvent("onpropertychange",Qy)):e==="focusout"&&Ky()}function I3(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return xo(Li)}function X3(e,n){if(e==="click")return xo(n)}function Z3(e,n){if(e==="input"||e==="change")return xo(n)}function F3(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Lt=typeof Object.is=="function"?Object.is:F3;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 d=a[s];if(!nt.call(n,d)||!Lt(e[d],n[d]))return!1}return!0}function $y(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Py(e,n){var a=$y(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=$y(a)}}function Jy(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Jy(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Wy(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 Ju(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 K3=kn&&"documentMode"in document&&11>=document.documentMode,Oa=null,Wu=null,Ui=null,ec=!1;function e0(e,n,a){var s=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ec||Oa==null||Oa!==Yr(s)||(s=Oa,"selectionStart"in s&&Ju(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(Wu,"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")},tc={},t0={};kn&&(t0=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(tc[e])return tc[e];if(!za[e])return e;var n=za[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in t0)return tc[e]=n[a];return e}var n0=Fr("animationend"),r0=Fr("animationiteration"),a0=Fr("animationstart"),Q3=Fr("transitionrun"),$3=Fr("transitionstart"),P3=Fr("transitioncancel"),i0=Fr("transitionend"),l0=new Map,nc="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(" ");nc.push("scrollEnd");function un(e,n){l0.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,rc=0;function _o(){for(var e=Da,n=rc=Da=0;n<e;){var a=Kt[n];Kt[n++]=null;var s=Kt[n];Kt[n++]=null;var d=Kt[n];Kt[n++]=null;var v=Kt[n];if(Kt[n++]=null,s!==null&&d!==null){var _=s.pending;_===null?d.next=d:(d.next=_.next,_.next=d),s.pending=d}v!==0&&o0(a,d,v)}}function wo(e,n,a,s){Kt[Da++]=e,Kt[Da++]=n,Kt[Da++]=a,Kt[Da++]=s,rc|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function ac(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 o0(e,n,a){e.lanes|=a;var s=e.alternate;s!==null&&(s.lanes|=a);for(var d=!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||(d=!0)),e=v,v=v.return;return e.tag===3?(v=e.stateNode,d&&n!==null&&(d=31-wt(a),e=v.hiddenUpdates,s=e[d],s===null?e[d]=[n]:s.push(n),n.lane=a|536870912),v):null}function So(e){if(50<sl)throw sl=0,gf=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 J3(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 J3(e,n,a,s)}function ic(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 s0(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,d,v){var _=0;if(s=e,typeof e=="function")ic(e)&&(_=1);else if(typeof e=="string")_=rM(e,a,D.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case H:return e=Bt(31,a,n,d),e.elementType=H,e.lanes=v,e;case N:return Qr(a.children,d,v,n);case E:_=8,d|=24;break;case C:return e=Bt(12,a,n,d|2),e.elementType=C,e.lanes=v,e;case R:return e=Bt(13,a,n,d),e.elementType=R,e.lanes=v,e;case q:return e=Bt(19,a,n,d),e.elementType=q,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,d),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 lc(e,n,a){return e=Bt(6,e,null,n),e.lanes=a,e}function u0(e){var n=Bt(18,null,null,0);return n.stateNode=e,n}function oc(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 c0=new WeakMap;function Qt(e,n){if(typeof e=="object"&&e!==null){var a=c0.get(e);return a!==void 0?a:(n={value:e,source:n,stack:dt(n)},c0.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 f0(e,n,a){$t[Pt++]=_n,$t[Pt++]=wn,$t[Pt++]=dr,dr=e;var s=_n;e=wn;var d=32-wt(s)-1;s&=~(1<<d),a+=1;var v=32-wt(n)+d;if(30<v){var _=d-d%5;v=(s&(1<<_)-1).toString(32),s>>=_,d-=_,_n=1<<32-wt(n)+d|a<<d|s,wn=v+e}else _n=1<<v|a<<d|s,wn=e}function sc(e){e.return!==null&&(Ln(e,1),f0(e,1,0))}function uc(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 d0(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,cc=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)),cc}function h0(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),Ay(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||Mx(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 g0(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 g0(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")||jf(e.type,e.memoizedProps)),a=!a),a&&Ye&&gr(e),g0(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Ye=Bx(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Ye=Bx(e)}else n===27?(n=Ye,Ar(e.type)?(e=zf,zf=null,Ye=e):Ye=n):Ye=gt?en(e.stateNode.nextSibling):null;return!0}function $r(){Ye=gt=null,qe=!1}function fc(){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 dc=z(null),Pr=null,Bn=null;function vr(e,n,a){ae(dc,n._currentValue),n._currentValue=a}function Un(e){e._currentValue=dc.current,Y(dc)}function hc(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 gc(e,n,a,s){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var v=d.dependencies;if(v!==null){var _=d.child;v=v.firstContext;e:for(;v!==null;){var j=v;v=d;for(var G=0;G<n.length;G++)if(j.context===n[G]){v.lanes|=a,j=v.alternate,j!==null&&(j.lanes|=a),hc(v.return,a,e),s||(_=null);break e}v=j.next}}else if(d.tag===18){if(_=d.return,_===null)throw Error(l(341));_.lanes|=a,v=_.alternate,v!==null&&(v.lanes|=a),hc(_,a,e),_=null}else _=d.child;if(_!==null)_.return=d;else for(_=d;_!==null;){if(_===e){_=null;break}if(d=_.sibling,d!==null){d.return=_.return,_=d;break}_=_.return}d=_}}function Ua(e,n,a,s){e=null;for(var d=n,v=!1;d!==null;){if(!v){if((d.flags&524288)!==0)v=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var _=d.alternate;if(_===null)throw Error(l(387));if(_=_.memoizedProps,_!==null){var j=d.type;Lt(d.pendingProps.value,_.value)||(e!==null?e.push(j):e=[j])}}else if(d===re.current){if(_=d.alternate,_===null)throw Error(l(387));_.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(vl):e=[vl])}d=d.return}e!==null&&gc(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 v0(Pr,e)}function To(e,n){return Pr===null&&Jr(e),v0(e,n)}function v0(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 W3=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()})}},ej=t.unstable_scheduleCallback,tj=t.unstable_NormalPriority,at={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vc(){return{controller:new W3,data:new Map,refCount:0}}function Yi(e){e.refCount--,e.refCount===0&&ej(tj,function(){e.controller.abort()})}var Ii=null,mc=0,Ga=0,Va=null;function nj(e,n){if(Ii===null){var a=Ii=[];mc=0,Ga=bf(),Va={status:"pending",value:void 0,then:function(s){a.push(s)}}}return mc++,n.then(m0,m0),n}function m0(){if(--mc===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 rj(e,n){var a=[],s={status:"pending",value:null,reason:null,then:function(d){a.push(d)}};return e.then(function(){s.status="fulfilled",s.value=n;for(var d=0;d<a.length;d++)(0,a[d])(n)},function(d){for(s.status="rejected",s.reason=d,d=0;d<a.length;d++)(0,a[d])(void 0)}),s}var p0=O.S;O.S=function(e,n){ex=Pe(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&nj(e,n),p0!==null&&p0(e,n)};var Wr=z(null);function pc(){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 y0(){var e=pc();return e===null?null:{parent:at._currentValue,pool:e}}var Ya=Error(l(460)),yc=Error(l(474)),jo=Error(l(542)),Mo={then:function(){}};function x0(e){return e=e.status,e==="fulfilled"||e==="rejected"}function b0(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,w0(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 d=n;d.status="fulfilled",d.value=s}},function(s){if(n.status==="pending"){var d=n;d.status="rejected",d.reason=s}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,w0(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 _0(){if(ta===null)throw Error(l(459));var e=ta;return ta=null,e}function w0(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=[]),b0(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 S0(e){function n(Q,X){if(e){var W=Q.deletions;W===null?(Q.deletions=[X],Q.flags|=16):W.push(X)}}function a(Q,X){if(!e)return null;for(;X!==null;)n(Q,X),X=X.sibling;return null}function s(Q){for(var X=new Map;Q!==null;)Q.key!==null?X.set(Q.key,Q):X.set(Q.index,Q),Q=Q.sibling;return X}function d(Q,X){return Q=Hn(Q,X),Q.index=0,Q.sibling=null,Q}function v(Q,X,W){return Q.index=W,e?(W=Q.alternate,W!==null?(W=W.index,W<X?(Q.flags|=67108866,X):W):(Q.flags|=67108866,X)):(Q.flags|=1048576,X)}function _(Q){return e&&Q.alternate===null&&(Q.flags|=67108866),Q}function j(Q,X,W,ue){return X===null||X.tag!==6?(X=lc(W,Q.mode,ue),X.return=Q,X):(X=d(X,W),X.return=Q,X)}function G(Q,X,W,ue){var be=W.type;return be===N?se(Q,X,W.props.children,ue,W.key):X!==null&&(X.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===L&&ea(be)===X.type)?(X=d(X,W.props),Zi(X,W),X.return=Q,X):(X=Eo(W.type,W.key,W.props,null,Q.mode,ue),Zi(X,W),X.return=Q,X)}function te(Q,X,W,ue){return X===null||X.tag!==4||X.stateNode.containerInfo!==W.containerInfo||X.stateNode.implementation!==W.implementation?(X=oc(W,Q.mode,ue),X.return=Q,X):(X=d(X,W.children||[]),X.return=Q,X)}function se(Q,X,W,ue,be){return X===null||X.tag!==7?(X=Qr(W,Q.mode,ue,be),X.return=Q,X):(X=d(X,W),X.return=Q,X)}function ce(Q,X,W){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=lc(""+X,Q.mode,W),X.return=Q,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case b:return W=Eo(X.type,X.key,X.props,null,Q.mode,W),Zi(W,X),W.return=Q,W;case S:return X=oc(X,Q.mode,W),X.return=Q,X;case L:return X=ea(X),ce(Q,X,W)}if(Z(X)||F(X))return X=Qr(X,Q.mode,W,null),X.return=Q,X;if(typeof X.then=="function")return ce(Q,Ro(X),W);if(X.$$typeof===w)return ce(Q,To(Q,X),W);qo(Q,X)}return null}function ne(Q,X,W,ue){var be=X!==null?X.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return be!==null?null:j(Q,X,""+W,ue);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case b:return W.key===be?G(Q,X,W,ue):null;case S:return W.key===be?te(Q,X,W,ue):null;case L:return W=ea(W),ne(Q,X,W,ue)}if(Z(W)||F(W))return be!==null?null:se(Q,X,W,ue,null);if(typeof W.then=="function")return ne(Q,X,Ro(W),ue);if(W.$$typeof===w)return ne(Q,X,To(Q,W),ue);qo(Q,W)}return null}function ie(Q,X,W,ue,be){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Q=Q.get(W)||null,j(X,Q,""+ue,be);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case b:return Q=Q.get(ue.key===null?W:ue.key)||null,G(X,Q,ue,be);case S:return Q=Q.get(ue.key===null?W:ue.key)||null,te(X,Q,ue,be);case L:return ue=ea(ue),ie(Q,X,W,ue,be)}if(Z(ue)||F(ue))return Q=Q.get(W)||null,se(X,Q,ue,be,null);if(typeof ue.then=="function")return ie(Q,X,W,Ro(ue),be);if(ue.$$typeof===w)return ie(Q,X,W,To(X,ue),be);qo(X,ue)}return null}function de(Q,X,W,ue){for(var be=null,ze=null,me=X,Ce=X=0,Re=null;me!==null&&Ce<W.length;Ce++){me.index>Ce?(Re=me,me=null):Re=me.sibling;var De=ne(Q,me,W[Ce],ue);if(De===null){me===null&&(me=Re);break}e&&me&&De.alternate===null&&n(Q,me),X=v(De,X,Ce),ze===null?be=De:ze.sibling=De,ze=De,me=Re}if(Ce===W.length)return a(Q,me),qe&&Ln(Q,Ce),be;if(me===null){for(;Ce<W.length;Ce++)me=ce(Q,W[Ce],ue),me!==null&&(X=v(me,X,Ce),ze===null?be=me:ze.sibling=me,ze=me);return qe&&Ln(Q,Ce),be}for(me=s(me);Ce<W.length;Ce++)Re=ie(me,Q,Ce,W[Ce],ue),Re!==null&&(e&&Re.alternate!==null&&me.delete(Re.key===null?Ce:Re.key),X=v(Re,X,Ce),ze===null?be=Re:ze.sibling=Re,ze=Re);return e&&me.forEach(function(Or){return n(Q,Or)}),qe&&Ln(Q,Ce),be}function Se(Q,X,W,ue){if(W==null)throw Error(l(151));for(var be=null,ze=null,me=X,Ce=X=0,Re=null,De=W.next();me!==null&&!De.done;Ce++,De=W.next()){me.index>Ce?(Re=me,me=null):Re=me.sibling;var Or=ne(Q,me,De.value,ue);if(Or===null){me===null&&(me=Re);break}e&&me&&Or.alternate===null&&n(Q,me),X=v(Or,X,Ce),ze===null?be=Or:ze.sibling=Or,ze=Or,me=Re}if(De.done)return a(Q,me),qe&&Ln(Q,Ce),be;if(me===null){for(;!De.done;Ce++,De=W.next())De=ce(Q,De.value,ue),De!==null&&(X=v(De,X,Ce),ze===null?be=De:ze.sibling=De,ze=De);return qe&&Ln(Q,Ce),be}for(me=s(me);!De.done;Ce++,De=W.next())De=ie(me,Q,Ce,De.value,ue),De!==null&&(e&&De.alternate!==null&&me.delete(De.key===null?Ce:De.key),X=v(De,X,Ce),ze===null?be=De:ze.sibling=De,ze=De);return e&&me.forEach(function(gM){return n(Q,gM)}),qe&&Ln(Q,Ce),be}function Ge(Q,X,W,ue){if(typeof W=="object"&&W!==null&&W.type===N&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case b:e:{for(var be=W.key;X!==null;){if(X.key===be){if(be=W.type,be===N){if(X.tag===7){a(Q,X.sibling),ue=d(X,W.props.children),ue.return=Q,Q=ue;break e}}else if(X.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===L&&ea(be)===X.type){a(Q,X.sibling),ue=d(X,W.props),Zi(ue,W),ue.return=Q,Q=ue;break e}a(Q,X);break}else n(Q,X);X=X.sibling}W.type===N?(ue=Qr(W.props.children,Q.mode,ue,W.key),ue.return=Q,Q=ue):(ue=Eo(W.type,W.key,W.props,null,Q.mode,ue),Zi(ue,W),ue.return=Q,Q=ue)}return _(Q);case S:e:{for(be=W.key;X!==null;){if(X.key===be)if(X.tag===4&&X.stateNode.containerInfo===W.containerInfo&&X.stateNode.implementation===W.implementation){a(Q,X.sibling),ue=d(X,W.children||[]),ue.return=Q,Q=ue;break e}else{a(Q,X);break}else n(Q,X);X=X.sibling}ue=oc(W,Q.mode,ue),ue.return=Q,Q=ue}return _(Q);case L:return W=ea(W),Ge(Q,X,W,ue)}if(Z(W))return de(Q,X,W,ue);if(F(W)){if(be=F(W),typeof be!="function")throw Error(l(150));return W=be.call(W),Se(Q,X,W,ue)}if(typeof W.then=="function")return Ge(Q,X,Ro(W),ue);if(W.$$typeof===w)return Ge(Q,X,To(Q,W),ue);qo(Q,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,X!==null&&X.tag===6?(a(Q,X.sibling),ue=d(X,W),ue.return=Q,Q=ue):(a(Q,X),ue=lc(W,Q.mode,ue),ue.return=Q,Q=ue),_(Q)):a(Q,X)}return function(Q,X,W,ue){try{Xi=0;var be=Ge(Q,X,W,ue);return Ia=null,be}catch(me){if(me===Ya||me===jo)throw me;var ze=Bt(29,me,null,Q.mode);return ze.lanes=ue,ze.return=Q,ze}}}var na=S0(!0),E0=S0(!1),mr=!1;function xc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bc(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 d=s.pending;return d===null?n.next=n:(n.next=d.next,d.next=n),s.pending=n,n=So(e),o0(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 _c(e,n){var a=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,a===s)){var d=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?d=v=_:v=v.next=_,a=a.next}while(a!==null);v===null?d=v=n:v=v.next=n}else d=v=n;a={baseState:s.baseState,firstBaseUpdate:d,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 wc=!1;function Ki(){if(wc){var e=Va;if(e!==null)throw e}}function Qi(e,n,a,s){wc=!1;var d=e.updateQueue;mr=!1;var v=d.firstBaseUpdate,_=d.lastBaseUpdate,j=d.shared.pending;if(j!==null){d.shared.pending=null;var G=j,te=G.next;G.next=null,_===null?v=te:_.next=te,_=G;var se=e.alternate;se!==null&&(se=se.updateQueue,j=se.lastBaseUpdate,j!==_&&(j===null?se.firstBaseUpdate=te:j.next=te,se.lastBaseUpdate=G))}if(v!==null){var ce=d.baseState;_=0,se=te=G=null,j=v;do{var ne=j.lane&-536870913,ie=ne!==j.lane;if(ie?(Me&ne)===ne:(s&ne)===ne){ne!==0&&ne===Ga&&(wc=!0),se!==null&&(se=se.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var de=e,Se=j;ne=n;var Ge=a;switch(Se.tag){case 1:if(de=Se.payload,typeof de=="function"){ce=de.call(Ge,ce,ne);break e}ce=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=Se.payload,ne=typeof de=="function"?de.call(Ge,ce,ne):de,ne==null)break e;ce=p({},ce,ne);break e;case 2:mr=!0}}ne=j.callback,ne!==null&&(e.flags|=64,ie&&(e.flags|=8192),ie=d.callbacks,ie===null?d.callbacks=[ne]:ie.push(ne))}else ie={lane:ne,tag:j.tag,payload:j.payload,callback:j.callback,next:null},se===null?(te=se=ie,G=ce):se=se.next=ie,_|=ne;if(j=j.next,j===null){if(j=d.shared.pending,j===null)break;ie=j,j=ie.next,ie.next=null,d.lastBaseUpdate=ie,d.shared.pending=null}}while(!0);se===null&&(G=ce),d.baseState=G,d.firstBaseUpdate=te,d.lastBaseUpdate=se,v===null&&(d.shared.lanes=0),Sr|=_,e.lanes=_,e.memoizedState=ce}}function N0(e,n){if(typeof e!="function")throw Error(l(191,e));e.call(n)}function C0(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)N0(a[e],n)}var Xa=z(null),Oo=z(0);function T0(e,n){e=Qn,ae(Oo,e),ae(Xa,n),Qn=e|n.baseLanes}function Sc(){ae(Oo,Qn),ae(Xa,Xa.current)}function Ec(){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 Nc(e){ae(et,et.current),ae(Ut,e),Wt===null&&(Wt=e)}function A0(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||qf(a)||Of(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,aj=0;function Je(){throw Error(l(321))}function Cc(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 Tc(e,n,a,s,d,v){return Gn=v,Ne=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,O.H=e===null||e.memoizedState===null?f1:Vc,ra=!1,v=a(s,d),ra=!1,Za&&(v=M0(n,a,s,d)),j0(e),v}function j0(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 M0(e,n,a,s){Ne=e;var d=0;do{if(Za&&(Fa=null),$i=0,Za=!1,25<=d)throw Error(l(301));if(d+=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=d1,v=n(a,s)}while(Za);return v}function ij(){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 Ac(){var e=ko!==0;return ko=0,e}function jc(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function Mc(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=b0(Fa,e,n),n=Ne,(it===null?n.memoizedState:it.next)===null&&(n=n.alternate,O.H=n===null||n.memoizedState===null?f1:Vc),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 Rc(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(d){return d.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]=K;return n.index++,a}function Vn(e,n){return typeof n=="function"?n(e):n}function Bo(e){var n=tt();return qc(n,Be,e)}function qc(e,n,a){var s=e.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=a;var d=e.baseQueue,v=s.pending;if(v!==null){if(d!==null){var _=d.next;d.next=v.next,v.next=_}n.baseQueue=d=v,s.pending=null}if(v=e.baseState,d===null)e.memoizedState=v;else{n=d.next;var j=_=null,G=null,te=n,se=!1;do{var ce=te.lane&-536870913;if(ce!==te.lane?(Me&ce)===ce:(Gn&ce)===ce){var ne=te.revertLane;if(ne===0)G!==null&&(G=G.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&ne)===ne){te=te.next,ne===Ga&&(se=!0);continue}else ce={lane:0,revertLane:te.revertLane,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},G===null?(j=G=ce,_=v):G=G.next=ce,Ne.lanes|=ne,Sr|=ne;ce=te.action,ra&&a(v,ce),v=te.hasEagerState?te.eagerState:a(v,ce)}else ne={lane:ce,revertLane:te.revertLane,gesture:te.gesture,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},G===null?(j=G=ne,_=v):G=G.next=ne,Ne.lanes|=ce,Sr|=ce;te=te.next}while(te!==null&&te!==n);if(G===null?_=v:G.next=j,!Lt(v,e.memoizedState)&&(lt=!0,se&&(a=Va,a!==null)))throw a;e.memoizedState=v,e.baseState=_,e.baseQueue=G,s.lastRenderedState=v}return d===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Oc(e){var n=tt(),a=n.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=e;var s=a.dispatch,d=a.pending,v=n.memoizedState;if(d!==null){a.pending=null;var _=d=d.next;do v=e(v,_.action),_=_.next;while(_!==d);Lt(v,n.memoizedState)||(lt=!0),n.memoizedState=v,n.baseQueue===null&&(n.baseState=v),a.lastRenderedState=v}return[v,s]}function R0(e,n,a){var s=Ne,d=tt(),v=qe;if(v){if(a===void 0)throw Error(l(407));a=a()}else a=n();var _=!Lt((Be||d).memoizedState,a);if(_&&(d.memoizedState=a,lt=!0),d=d.queue,kc(z0.bind(null,s,d,e),[e]),d.getSnapshot!==n||_||it!==null&&it.memoizedState.tag&1){if(s.flags|=2048,Ka(9,{destroy:void 0},O0.bind(null,s,d,a,n),null),Ve===null)throw Error(l(349));v||(Gn&127)!==0||q0(s,n,a)}return a}function q0(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 O0(e,n,a,s){n.value=a,n.getSnapshot=s,D0(n)&&k0(e)}function z0(e,n,a){return a(function(){D0(n)&&k0(e)})}function D0(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!Lt(e,a)}catch{return!0}}function k0(e){var n=Kr(e,2);n!==null&&Ot(n,e,2)}function zc(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 H0(e,n,a,s){return e.baseState=a,qc(e,Be,typeof s=="function"?s:Vn)}function lj(e,n,a,s,d){if(Vo(e))throw Error(l(485));if(e=n.action,e!==null){var v={payload:d,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,L0(n,v)):(v.next=a.next,n.pending=a.next=v)}}function L0(e,n){var a=n.action,s=n.payload,d=e.state;if(n.isTransition){var v=O.T,_={};O.T=_;try{var j=a(d,s),G=O.S;G!==null&&G(_,j),B0(e,n,j)}catch(te){Dc(e,n,te)}finally{v!==null&&_.types!==null&&(v.types=_.types),O.T=v}}else try{v=a(d,s),B0(e,n,v)}catch(te){Dc(e,n,te)}}function B0(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(s){U0(e,n,s)},function(s){return Dc(e,n,s)}):U0(e,n,a)}function U0(e,n,a){n.status="fulfilled",n.value=a,G0(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,L0(e,a)))}function Dc(e,n,a){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do n.status="rejected",n.reason=a,G0(n),n=n.next;while(n!==s)}e.action=null}function G0(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function V0(e,n){return n}function Y0(e,n){if(qe){var a=Ve.formState;if(a!==null){e:{var s=Ne;if(qe){if(Ye){t:{for(var d=Ye,v=Jt;d.nodeType!==8;){if(!v){d=null;break t}if(d=en(d.nextSibling),d===null){d=null;break t}}v=d.data,d=v==="F!"||v==="F"?d:null}if(d){Ye=en(d.nextSibling),s=d.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:V0,lastRenderedState:n},a.queue=s,a=s1.bind(null,Ne,s),s.dispatch=a,s=zc(!1),v=Gc.bind(null,Ne,!1,s.queue),s=St(),d={state:n,dispatch:null,action:e,pending:null},s.queue=d,a=lj.bind(null,Ne,d,v,a),d.dispatch=a,s.memoizedState=e,[n,a,!1]}function I0(e){var n=tt();return X0(n,Be,e)}function X0(e,n,a){if(n=qc(e,n,V0)[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 d=n.queue,v=d.dispatch;return a!==n.memoizedState&&(Ne.flags|=2048,Ka(9,{destroy:void 0},oj.bind(null,d,a),null)),[s,v,e]}function oj(e,n){e.action=n}function Z0(e){var n=tt(),a=Be;if(a!==null)return X0(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 F0(){return tt().memoizedState}function Uo(e,n,a,s){var d=St();Ne.flags|=e,d.memoizedState=Ka(1|n,{destroy:void 0},a,s===void 0?null:s)}function Go(e,n,a,s){var d=tt();s=s===void 0?null:s;var v=d.memoizedState.inst;Be!==null&&s!==null&&Cc(s,Be.memoizedState.deps)?d.memoizedState=Ka(n,v,a,s):(Ne.flags|=e,d.memoizedState=Ka(1|n,v,a,s))}function K0(e,n){Uo(8390656,8,e,n)}function kc(e,n){Go(2048,8,e,n)}function sj(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 Q0(e){var n=tt().memoizedState;return sj({ref:n,nextImpl:e}),function(){if((ke&2)!==0)throw Error(l(440));return n.impl.apply(void 0,arguments)}}function $0(e,n){return Go(4,2,e,n)}function P0(e,n){return Go(4,4,e,n)}function J0(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 W0(e,n,a){a=a!=null?a.concat([e]):null,Go(4,4,J0.bind(null,n,e),a)}function Hc(){}function e1(e,n){var a=tt();n=n===void 0?null:n;var s=a.memoizedState;return n!==null&&Cc(n,s[1])?s[0]:(a.memoizedState=[e,n],e)}function t1(e,n){var a=tt();n=n===void 0?null:n;var s=a.memoizedState;if(n!==null&&Cc(n,s[1]))return s[0];if(s=e(),ra){xn(!0);try{e()}finally{xn(!1)}}return a.memoizedState=[s,n],s}function Lc(e,n,a){return a===void 0||(Gn&1073741824)!==0&&(Me&261930)===0?e.memoizedState=n:(e.memoizedState=a,e=nx(),Ne.lanes|=e,Sr|=e,a)}function n1(e,n,a,s){return Lt(a,n)?a:Xa.current!==null?(e=Lc(e,a,s),Lt(e,n)||(lt=!0),e):(Gn&42)===0||(Gn&1073741824)!==0&&(Me&261930)===0?(lt=!0,e.memoizedState=a):(e=nx(),Ne.lanes|=e,Sr|=e,n)}function r1(e,n,a,s,d){var v=V.p;V.p=v!==0&&8>v?v:8;var _=O.T,j={};O.T=j,Gc(e,!1,n,a);try{var G=d(),te=O.S;if(te!==null&&te(j,G),G!==null&&typeof G=="object"&&typeof G.then=="function"){var se=rj(G,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{V.p=v,_!==null&&j.types!==null&&(_.types=j.types),O.T=_}}function uj(){}function Bc(e,n,a,s){if(e.tag!==5)throw Error(l(476));var d=a1(e).queue;r1(e,d,n,I,a===null?uj:function(){return i1(e),a(s)})}function a1(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:I},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 i1(e){var n=a1(e);n.next===null&&(n=e.alternate.memoizedState),Ji(e,n.next.queue,{},It())}function Uc(){return vt(vl)}function l1(){return tt().memoizedState}function o1(){return tt().memoizedState}function cj(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:vc()},e.payload=n;return}n=n.return}}function fj(e,n,a){var s=It();a={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Vo(e)?u1(n,a):(a=ac(e,n,a,s),a!==null&&(Ot(a,e,s),c1(a,n,s)))}function s1(e,n,a){var s=It();Ji(e,n,a,s)}function Ji(e,n,a,s){var d={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Vo(e))u1(n,d);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(d.hasEagerState=!0,d.eagerState=j,Lt(j,_))return wo(e,n,d,0),Ve===null&&_o(),!1}catch{}if(a=ac(e,n,d,s),a!==null)return Ot(a,e,s),c1(a,n,s),!0}return!1}function Gc(e,n,a,s){if(s={lane:2,revertLane:bf(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Vo(e)){if(n)throw Error(l(479))}else n=ac(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 u1(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 c1(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 f1={readContext:vt,use:Lo,useCallback:function(e,n){return St().memoizedState=[e,n===void 0?null:n],e},useContext:vt,useEffect:K0,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,Uo(4194308,4,J0.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 d=a(n);if(ra){xn(!0);try{a(n)}finally{xn(!1)}}}else d=n;return s.memoizedState=s.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},s.queue=e,e=e.dispatch=fj.bind(null,Ne,e),[s.memoizedState,e]},useRef:function(e){var n=St();return e={current:e},n.memoizedState=e},useState:function(e){e=zc(e);var n=e.queue,a=s1.bind(null,Ne,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:Hc,useDeferredValue:function(e,n){var a=St();return Lc(a,e,n)},useTransition:function(){var e=zc(!1);return e=r1.bind(null,Ne,e.queue,!0,!1),St().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var s=Ne,d=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||q0(s,n,a)}d.memoizedState=a;var v={value:a,getSnapshot:n};return d.queue=v,K0(z0.bind(null,s,v,e),[e]),s.flags|=2048,Ka(9,{destroy:void 0},O0.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=aj++,n="_"+n+"r_"+a.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:Uc,useFormState:Y0,useActionState:Y0,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=Gc.bind(null,Ne,!0,a),a.dispatch=n,[e,n]},useMemoCache:Rc,useCacheRefresh:function(){return St().memoizedState=cj.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)}}},Vc={readContext:vt,use:Lo,useCallback:e1,useContext:vt,useEffect:kc,useImperativeHandle:W0,useInsertionEffect:$0,useLayoutEffect:P0,useMemo:t1,useReducer:Bo,useRef:F0,useState:function(){return Bo(Vn)},useDebugValue:Hc,useDeferredValue:function(e,n){var a=tt();return n1(a,Be.memoizedState,e,n)},useTransition:function(){var e=Bo(Vn)[0],n=tt().memoizedState;return[typeof e=="boolean"?e:Pi(e),n]},useSyncExternalStore:R0,useId:l1,useHostTransitionStatus:Uc,useFormState:I0,useActionState:I0,useOptimistic:function(e,n){var a=tt();return H0(a,Be,e,n)},useMemoCache:Rc,useCacheRefresh:o1};Vc.useEffectEvent=Q0;var d1={readContext:vt,use:Lo,useCallback:e1,useContext:vt,useEffect:kc,useImperativeHandle:W0,useInsertionEffect:$0,useLayoutEffect:P0,useMemo:t1,useReducer:Oc,useRef:F0,useState:function(){return Oc(Vn)},useDebugValue:Hc,useDeferredValue:function(e,n){var a=tt();return Be===null?Lc(a,e,n):n1(a,Be.memoizedState,e,n)},useTransition:function(){var e=Oc(Vn)[0],n=tt().memoizedState;return[typeof e=="boolean"?e:Pi(e),n]},useSyncExternalStore:R0,useId:l1,useHostTransitionStatus:Uc,useFormState:Z0,useActionState:Z0,useOptimistic:function(e,n){var a=tt();return Be!==null?H0(a,Be,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Rc,useCacheRefresh:o1};d1.useEffectEvent=Q0;function Yc(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 Ic={enqueueSetState:function(e,n,a){e=e._reactInternals;var s=It(),d=pr(s);d.payload=n,a!=null&&(d.callback=a),n=yr(e,d,s),n!==null&&(Ot(n,e,s),Fi(n,e,s))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var s=It(),d=pr(s);d.tag=1,d.payload=n,a!=null&&(d.callback=a),n=yr(e,d,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 h1(e,n,a,s,d,v,_){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,v,_):n.prototype&&n.prototype.isPureReactComponent?!Bi(a,s)||!Bi(d,v):!0}function g1(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&&Ic.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 d in e)a[d]===void 0&&(a[d]=e[d])}return a}function v1(e){bo(e)}function m1(e){console.error(e)}function p1(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 y1(e,n,a){try{var s=e.onCaughtError;s(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Xc(e,n,a){return a=pr(a),a.tag=3,a.payload={element:null},a.callback=function(){Yo(e,n)},a}function x1(e){return e=pr(e),e.tag=3,e}function b1(e,n,a,s){var d=a.type.getDerivedStateFromError;if(typeof d=="function"){var v=s.value;e.payload=function(){return d(v)},e.callback=function(){y1(n,a,s)}}var _=a.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(e.callback=function(){y1(n,a,s),typeof d!="function"&&(Er===null?Er=new Set([this]):Er.add(this));var j=s.stack;this.componentDidCatch(s.value,{componentStack:j!==null?j:""})})}function dj(e,n,a,s,d){if(a.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(n=a.alternate,n!==null&&Ua(n,a,d,!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=d,s===Mo?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([s]):n.add(s),pf(e,s,d)),!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)),pf(e,s,d)),!1}throw Error(l(435,a.tag))}return pf(e,s,d),ts(),!1}if(qe)return n=Ut.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=d,s!==cc&&(e=Error(l(422),{cause:s}),Vi(Qt(e,a)))):(s!==cc&&(n=Error(l(423),{cause:s}),Vi(Qt(n,a))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,s=Qt(s,a),d=Xc(e.stateNode,s,d),_c(e,d),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=d&-d,a.lanes|=e,e=Xc(a.stateNode,s,e),_c(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,d&=-d,a.lanes|=d,d=x1(d),b1(d,e,a,s),_c(a,d),!1}a=a.return}while(a!==null);return!1}var Zc=Error(l(461)),lt=!1;function mt(e,n,a,s){n.child=e===null?E0(n,null,a,s):na(n,e.child,a,s)}function _1(e,n,a,s,d){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=Tc(e,n,a,_,v,d),j=Ac(),e!==null&&!lt?(jc(e,n,d),Yn(e,n,d)):(qe&&j&&sc(n),n.flags|=1,mt(e,n,s,d),n.child)}function w1(e,n,a,s,d){if(e===null){var v=a.type;return typeof v=="function"&&!ic(v)&&v.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=v,S1(e,n,v,s,d)):(e=Eo(a.type,null,s,n,n.mode,d),e.ref=n.ref,e.return=n,n.child=e)}if(v=e.child,!ef(e,d)){var _=v.memoizedProps;if(a=a.compare,a=a!==null?a:Bi,a(_,s)&&e.ref===n.ref)return Yn(e,n,d)}return n.flags|=1,e=Hn(v,s),e.ref=n.ref,e.return=n,n.child=e}function S1(e,n,a,s,d){if(e!==null){var v=e.memoizedProps;if(Bi(v,s)&&e.ref===n.ref)if(lt=!1,n.pendingProps=s=v,ef(e,d))(e.flags&131072)!==0&&(lt=!0);else return n.lanes=e.lanes,Yn(e,n,d)}return Fc(e,n,a,s,d)}function E1(e,n,a,s){var d=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,d=0;s!==null;)d=d|s.lanes|s.childLanes,s=s.sibling;s=d&~v}else s=0,n.child=null;return N1(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?T0(n,v):Sc(),A0(n);else return s=n.lanes=536870912,N1(e,n,v!==null?v.baseLanes|a:a,a,s)}else v!==null?(Ao(n,v.cachePool),T0(n,v),br(),n.memoizedState=null):(e!==null&&Ao(n,null),Sc(),br());return mt(e,n,d,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 N1(e,n,a,s,d){var v=pc();return v=v===null?null:{parent:at._currentValue,pool:v},n.memoizedState={baseLanes:a,cachePool:v},e!==null&&Ao(n,null),Sc(),A0(n),e!==null&&Ua(e,n,s,!0),n.childLanes=d,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 C1(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 hj(e,n,a){var s=n.pendingProps,d=(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(Nc(n),(e=Ye)?(e=Lx(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=u0(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(Nc(n),d)if(n.flags&256)n.flags&=-257,n=C1(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),d=(a&e.childLanes)!==0,lt||d){if(s=Ve,s!==null&&(_=to(s,a),_!==0&&_!==v.retryLane))throw v.retryLane=_,Kr(e,_),Ot(s,e,_),Zc;ts(),n=C1(e,n,a)}else e=v.treeContext,Ye=en(_.nextSibling),gt=n,qe=!0,hr=null,Jt=!1,e!==null&&d0(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 Fc(e,n,a,s,d){return Jr(n),a=Tc(e,n,a,s,void 0,d),s=Ac(),e!==null&&!lt?(jc(e,n,d),Yn(e,n,d)):(qe&&s&&sc(n),n.flags|=1,mt(e,n,a,d),n.child)}function T1(e,n,a,s,d,v){return Jr(n),n.updateQueue=null,a=M0(n,s,a,d),j0(e),s=Ac(),e!==null&&!lt?(jc(e,n,v),Yn(e,n,v)):(qe&&s&&sc(n),n.flags|=1,mt(e,n,a,v),n.child)}function A1(e,n,a,s,d){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=Ic,n.stateNode=v,v._reactInternals=n,v=n.stateNode,v.props=s,v.state=n.memoizedState,v.refs={},xc(n),_=a.contextType,v.context=typeof _=="object"&&_!==null?vt(_):ka,v.state=n.memoizedState,_=a.getDerivedStateFromProps,typeof _=="function"&&(Yc(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&&Ic.enqueueReplaceState(v,v.state,null),Qi(n,s,v,d),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,G=aa(a,j);v.props=G;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!==_)&&g1(n,v,s,_),mr=!1;var ne=n.memoizedState;v.state=ne,Qi(n,s,v,d),Ki(),te=n.memoizedState,j||ne!==te||mr?(typeof ce=="function"&&(Yc(n,a,ce,s),te=n.memoizedState),(G=mr||h1(n,a,G,s,ne,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=G):(typeof v.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{v=n.stateNode,bc(e,n),_=n.memoizedProps,se=aa(a,_),v.props=se,ce=n.pendingProps,ne=v.context,te=a.contextType,G=ka,typeof te=="object"&&te!==null&&(G=vt(te)),j=a.getDerivedStateFromProps,(te=typeof j=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(_!==ce||ne!==G)&&g1(n,v,s,G),mr=!1,ne=n.memoizedState,v.state=ne,Qi(n,s,v,d),Ki();var ie=n.memoizedState;_!==ce||ne!==ie||mr||e!==null&&e.dependencies!==null&&Co(e.dependencies)?(typeof j=="function"&&(Yc(n,a,j,s),ie=n.memoizedState),(se=mr||h1(n,a,se,s,ne,ie,G)||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,G),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(s,ie,G)),typeof v.componentDidUpdate=="function"&&(n.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof v.componentDidUpdate!="function"||_===e.memoizedProps&&ne===e.memoizedState||(n.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||_===e.memoizedProps&&ne===e.memoizedState||(n.flags|=1024),n.memoizedProps=s,n.memoizedState=ie),v.props=s,v.state=ie,v.context=G,s=se):(typeof v.componentDidUpdate!="function"||_===e.memoizedProps&&ne===e.memoizedState||(n.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||_===e.memoizedProps&&ne===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,d),n.child=na(n,null,a,d)):mt(e,n,a,d),n.memoizedState=v.state,e=n.child):e=Yn(e,n,d),e}function j1(e,n,a,s){return $r(),n.flags|=256,mt(e,n,a,s),n.child}var Kc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qc(e){return{baseLanes:e,cachePool:y0()}}function $c(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=Yt),e}function M1(e,n,a){var s=n.pendingProps,d=!1,v=(n.flags&128)!==0,_;if((_=v)||(_=e!==null&&e.memoizedState===null?!1:(et.current&2)!==0),_&&(d=!0,n.flags&=-129),_=(n.flags&32)!==0,n.flags&=-33,e===null){if(qe){if(d?xr(n):br(),(e=Ye)?(e=Lx(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=u0(e),a.return=n,n.child=a,gt=n,Ye=null)):e=null,e===null)throw gr(n);return Of(e)?n.lanes=32:n.lanes=536870912,null}var j=s.children;return s=s.fallback,d?(br(),d=n.mode,j=Zo({mode:"hidden",children:j},d),s=Qr(s,d,a,null),j.return=n,s.return=n,j.sibling=s,n.child=j,s=n.child,s.memoizedState=Qc(a),s.childLanes=$c(e,_,a),n.memoizedState=Kc,el(null,s)):(xr(n),Pc(n,j))}var G=e.memoizedState;if(G!==null&&(j=G.dehydrated,j!==null)){if(v)n.flags&256?(xr(n),n.flags&=-257,n=Jc(e,n,a)):n.memoizedState!==null?(br(),n.child=e.child,n.flags|=128,n=null):(br(),j=s.fallback,d=n.mode,s=Zo({mode:"visible",children:s.children},d),j=Qr(j,d,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=Qc(a),s.childLanes=$c(e,_,a),n.memoizedState=Kc,n=el(null,s));else if(xr(n),Of(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=Jc(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!==G.retryLane))throw G.retryLane=s,Kr(e,s),Ot(_,e,s),Zc;qf(j)||ts(),n=Jc(e,n,a)}else qf(j)?(n.flags|=192,n.child=e.child,n=null):(e=G.treeContext,Ye=en(j.nextSibling),gt=n,qe=!0,hr=null,Jt=!1,e!==null&&d0(n,e),n=Pc(n,s.children),n.flags|=4096);return n}return d?(br(),j=s.fallback,d=n.mode,G=e.child,te=G.sibling,s=Hn(G,{mode:"hidden",children:s.children}),s.subtreeFlags=G.subtreeFlags&65011712,te!==null?j=Hn(te,j):(j=Qr(j,d,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=Qc(a):(d=j.cachePool,d!==null?(G=at._currentValue,d=d.parent!==G?{parent:G,pool:G}:d):d=y0(),j={baseLanes:j.baseLanes|a,cachePool:d}),s.memoizedState=j,s.childLanes=$c(e,_,a),n.memoizedState=Kc,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 Pc(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 Jc(e,n,a){return na(n,e.child,null,a),e=Pc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function R1(e,n,a){e.lanes|=n;var s=e.alternate;s!==null&&(s.lanes|=n),hc(e.return,n,a)}function Wc(e,n,a,s,d,v){var _=e.memoizedState;_===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:a,tailMode:d,treeForkCount:v}:(_.isBackwards=n,_.rendering=null,_.renderingStartTime=0,_.last=s,_.tail=a,_.tailMode=d,_.treeForkCount=v)}function q1(e,n,a){var s=n.pendingProps,d=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&&R1(e,a,n);else if(e.tag===19)R1(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(d){case"forwards":for(a=n.child,d=null;a!==null;)e=a.alternate,e!==null&&zo(e)===null&&(d=a),a=a.sibling;a=d,a===null?(d=n.child,n.child=null):(d=a.sibling,a.sibling=null),Wc(n,!1,d,a,v,s);break;case"backwards":case"unstable_legacy-backwards":for(a=null,d=n.child,n.child=null;d!==null;){if(e=d.alternate,e!==null&&zo(e)===null){n.child=d;break}e=d.sibling,d.sibling=a,a=d,d=e}Wc(n,!0,a,null,v,s);break;case"together":Wc(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 ef(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Co(e)))}function gj(e,n,a){switch(n.tag){case 3:oe(n,n.stateNode.containerInfo),vr(n,at,e.memoizedState.cache),$r();break;case 27:case 5:he(n);break;case 4:oe(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,Nc(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?M1(e,n,a):(xr(n),e=Yn(e,n,a),e!==null?e.sibling:null);xr(n);break;case 19:var d=(e.flags&128)!==0;if(s=(a&n.childLanes)!==0,s||(Ua(e,n,a,!1),s=(a&n.childLanes)!==0),d){if(s)return q1(e,n,a);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),ae(et,et.current),s)break;return null;case 22:return n.lanes=0,E1(e,n,a,n.pendingProps);case 24:vr(n,at,e.memoizedState.cache)}return Yn(e,n,a)}function O1(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)lt=!0;else{if(!ef(e,a)&&(n.flags&128)===0)return lt=!1,gj(e,n,a);lt=(e.flags&131072)!==0}else lt=!1,qe&&(n.flags&1048576)!==0&&f0(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")ic(e)?(s=aa(e,s),n.tag=1,n=A1(null,n,e,s,a)):(n.tag=0,n=Fc(null,n,e,s,a));else{if(e!=null){var d=e.$$typeof;if(d===T){n.tag=11,n=_1(null,n,e,s,a);break e}else if(d===M){n.tag=14,n=w1(null,n,e,s,a);break e}}throw n=k(e)||e,Error(l(306,n,""))}}return n;case 0:return Fc(e,n,n.type,n.pendingProps,a);case 1:return s=n.type,d=aa(s,n.pendingProps),A1(e,n,s,d,a);case 3:e:{if(oe(n,n.stateNode.containerInfo),e===null)throw Error(l(387));s=n.pendingProps;var v=n.memoizedState;d=v.element,bc(e,n),Qi(n,s,null,a);var _=n.memoizedState;if(s=_.cache,vr(n,at,s),s!==v.cache&&gc(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=j1(e,n,s,a);break e}else if(s!==d){d=Qt(Error(l(424)),n),Vi(d),n=j1(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=E0(n,null,s,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if($r(),s===d){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=Ix(n.type,null,n.pendingProps,null))?n.memoizedState=a:qe||(a=n.type,e=n.pendingProps,s=ss($.current).createElement(a),s[ct]=n,s[bt]=e,pt(s,a,e),rt(s),n.stateNode=s):n.memoizedState=Ix(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return he(n),e===null&&qe&&(s=n.stateNode=Gx(n.type,n.pendingProps,$.current),gt=n,Jt=!0,d=Ye,Ar(n.type)?(zf=d,Ye=en(s.firstChild)):Ye=d),mt(e,n,n.pendingProps.children,a),Xo(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&qe&&((d=s=Ye)&&(s=Ij(s,n.type,n.pendingProps,Jt),s!==null?(n.stateNode=s,gt=n,Ye=en(s.firstChild),Jt=!1,d=!0):d=!1),d||gr(n)),he(n),d=n.type,v=n.pendingProps,_=e!==null?e.memoizedProps:null,s=v.children,jf(d,v)?s=null:_!==null&&jf(d,_)&&(n.flags|=32),n.memoizedState!==null&&(d=Tc(e,n,ij,null,null,a),vl._currentValue=d),Xo(e,n),mt(e,n,s,a),n.child;case 6:return e===null&&qe&&((e=a=Ye)&&(a=Xj(a,n.pendingProps,Jt),a!==null?(n.stateNode=a,gt=n,Ye=null,e=!0):e=!1),e||gr(n)),null;case 13:return M1(e,n,a);case 4:return oe(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 _1(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 d=n.type._context,s=n.pendingProps.children,Jr(n),d=vt(d),s=s(d),n.flags|=1,mt(e,n,s,a),n.child;case 14:return w1(e,n,n.type,n.pendingProps,a);case 15:return S1(e,n,n.type,n.pendingProps,a);case 19:return q1(e,n,a);case 31:return hj(e,n,a);case 22:return E1(e,n,a,n.pendingProps);case 24:return Jr(n),s=vt(at),e===null?(d=pc(),d===null&&(d=Ve,v=vc(),d.pooledCache=v,v.refCount++,v!==null&&(d.pooledCacheLanes|=a),d=v),n.memoizedState={parent:s,cache:d},xc(n),vr(n,at,d)):((e.lanes&a)!==0&&(bc(e,n),Qi(n,null,null,a),Ki()),d=e.memoizedState,v=n.memoizedState,d.parent!==s?(d={parent:s,cache:s},n.memoizedState=d,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=d),vr(n,at,s)):(s=v.cache,vr(n,at,s),s!==d.cache&&gc(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 tf(e,n,a,s,d){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(d&335544128)===d)if(e.stateNode.complete)e.flags|=8192;else if(lx())e.flags|=8192;else throw ta=Mo,yc}else e.flags&=-16777217}function z1(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Qx(n))if(lx())e.flags|=8192;else throw ta=Mo,yc}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 d=e.child;d!==null;)a|=d.lanes|d.childLanes,s|=d.subtreeFlags&65011712,s|=d.flags&65011712,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)a|=d.lanes|d.childLanes,s|=d.subtreeFlags,s|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=s,e.childLanes=a,n}function vj(e,n,a){var s=n.pendingProps;switch(uc(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,fc())),Ie(n),null;case 26:var d=n.type,v=n.memoizedState;return e===null?(In(n),v!==null?(Ie(n),z1(n,v)):(Ie(n),tf(n,d,null,s,a))):v?v!==e.memoizedState?(In(n),Ie(n),z1(n,v)):(Ie(n),n.flags&=-16777217):(e=e.memoizedProps,e!==s&&In(n),Ie(n),tf(n,d,e,s,a)),null;case 27:if(ye(n),a=$.current,d=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=D.current,Ba(n)?h0(n):(e=Gx(d,s,a),n.stateNode=e,In(n))}return Ie(n),null;case 5:if(ye(n),d=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=D.current,Ba(n))h0(n);else{var _=ss($.current);switch(v){case 1:v=_.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:v=_.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":v=_.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":v=_.createElementNS("http://www.w3.org/1998/Math/MathML",d);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(d,{is:s.is}):_.createElement(d)}}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,d,s),d){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),tf(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=$.current,Ba(n)){if(e=n.stateNode,a=n.memoizedProps,s=null,d=gt,d!==null)switch(d.tag){case 27:case 5:s=d.memoizedProps}e[ct]=n,e=!!(e.nodeValue===a||s!==null&&s.suppressHydrationWarning===!0||Mx(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=fc(),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(d=Ba(n),s!==null&&s.dehydrated!==null){if(e===null){if(!d)throw Error(l(318));if(d=n.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(l(317));d[ct]=n}else $r(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ie(n),d=!1}else d=fc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)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,d=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(d=s.alternate.memoizedState.cachePool.pool),v=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(v=s.memoizedState.cachePool.pool),v!==d&&(s.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),Fo(n,n.updateQueue),Ie(n),null);case 4:return fe(),e===null&&Ef(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(d=(n.flags&128)!==0,v=s.rendering,v===null)if(d)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;)s0(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,d=!0,tl(s,!1),n.lanes=4194304)}else{if(!d)if(e=zo(v),e!==null){if(n.flags|=128,d=!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,d=!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,d?a&1|2:a&1),qe&&Ln(n,s.treeForkCount),e):(Ie(n),null);case 22:case 23:return Gt(n),Ec(),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 mj(e,n){switch(uc(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),Ec(),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 D1(e,n){switch(uc(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),Ec(),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 d=s.next;a=d;do{if((a.tag&e)===e){s=void 0;var v=a.create,_=a.inst;s=v(),_.destroy=s}a=a.next}while(a!==d)}}catch(j){Le(n,n.return,j)}}function _r(e,n,a){try{var s=n.updateQueue,d=s!==null?s.lastEffect:null;if(d!==null){var v=d.next;s=v;do{if((s.tag&e)===e){var _=s.inst,j=_.destroy;if(j!==void 0){_.destroy=void 0,d=n;var G=a,te=j;try{te()}catch(se){Le(d,G,se)}}}s=s.next}while(s!==v)}}catch(se){Le(n,n.return,se)}}function k1(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{C0(n,a)}catch(s){Le(e,e.return,s)}}}function H1(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(d){Le(e,n,d)}}function Sn(e,n){var a=e.ref,s=e.refCleanup;if(a!==null)if(typeof s=="function")try{s()}catch(d){Le(e,n,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(d){Le(e,n,d)}else a.current=null}function L1(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(d){Le(e,e.return,d)}}function nf(e,n,a){try{var s=e.stateNode;Lj(s,e.type,a,n),s[bt]=n}catch(d){Le(e,e.return,d)}}function B1(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ar(e.type)||e.tag===4}function rf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||B1(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 af(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(af(e,n,a),e=e.sibling;e!==null;)af(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 U1(e){var n=e.stateNode,a=e.memoizedProps;try{for(var s=e.type,d=n.attributes;d.length;)n.removeAttributeNode(d[0]);pt(n,s,a),n[ct]=e,n[bt]=a}catch(v){Le(e,e.return,v)}}var Xn=!1,ot=!1,lf=!1,G1=typeof WeakSet=="function"?WeakSet:Set,ht=null;function pj(e,n){if(e=e.containerInfo,Tf=vs,e=Wy(e),Ju(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 d=s.anchorOffset,v=s.focusNode;s=s.focusOffset;try{a.nodeType,v.nodeType}catch{a=null;break e}var _=0,j=-1,G=-1,te=0,se=0,ce=e,ne=null;t:for(;;){for(var ie;ce!==a||d!==0&&ce.nodeType!==3||(j=_+d),ce!==v||s!==0&&ce.nodeType!==3||(G=_+s),ce.nodeType===3&&(_+=ce.nodeValue.length),(ie=ce.firstChild)!==null;)ne=ce,ce=ie;for(;;){if(ce===e)break t;if(ne===a&&++te===d&&(j=_),ne===v&&++se===s&&(G=_),(ie=ce.nextSibling)!==null)break;ce=ne,ne=ce.parentNode}ce=ie}a=j===-1||G===-1?null:{start:j,end:G}}else a=null}a=a||{start:0,end:0}}else a=null;for(Af={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++)d=e[a],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&v!==null){e=void 0,a=n,d=v.memoizedProps,v=v.memoizedState,s=a.stateNode;try{var de=aa(a.type,d);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)Rf(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Rf(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 V1(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 d=aa(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(d,n,e.__reactInternalSnapshotBeforeUpdate)}catch(_){Le(a,a.return,_)}}s&64&&k1(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{C0(e,n)}catch(_){Le(a,a.return,_)}}break;case 27:n===null&&s&4&&U1(a);case 26:case 5:Fn(e,a),n===null&&s&4&&L1(a),s&512&&rl(a,a.return);break;case 12:Fn(e,a);break;case 31:Fn(e,a),s&4&&X1(e,a);break;case 13:Fn(e,a),s&4&&Z1(e,a),s&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Cj.bind(null,a),Zj(e,a))));break;case 22:if(s=a.memoizedState!==null||Xn,!s){n=n!==null&&n.memoizedState!==null||ot,d=Xn;var v=ot;Xn=s,(ot=n)&&!v?Kn(e,a,(a.subtreeFlags&8772)!==0):Fn(e,a),Xn=d,ot=v}break;case 30:break;default:Fn(e,a)}}function Y1(e){var n=e.alternate;n!==null&&(e.alternate=null,Y1(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;)I1(e,n,a),a=a.sibling}function I1(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,d=jt;Ar(a.type)&&(Xe=a.stateNode,jt=!1),Zn(e,n,a),dl(a.stateNode),Xe=s,jt=d;break;case 5:ot||Sn(a,n);case 6:if(s=Xe,d=jt,Xe=null,Zn(e,n,a),Xe=s,jt=d,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,kx(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),li(e)):kx(Xe,a.stateNode));break;case 4:s=Xe,d=jt,Xe=a.stateNode.containerInfo,jt=!0,Zn(e,n,a),Xe=s,jt=d;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"&&H1(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 X1(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 Z1(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 yj(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new G1),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new G1),n;default:throw Error(l(435,e.tag))}}function Qo(e,n){var a=yj(e);n.forEach(function(s){if(!a.has(s)){a.add(s);var d=Tj.bind(null,e,s);s.then(d,d)}})}function Mt(e,n){var a=n.deletions;if(a!==null)for(var s=0;s<a.length;s++){var d=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));I1(v,_,d),Xe=null,jt=!1,v=d.alternate,v!==null&&(v.return=null),d.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)F1(n,e),n=n.sibling}var cn=null;function F1(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 d=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,d=d.ownerDocument||d;t:switch(s){case"title":v=d.getElementsByTagName("title")[0],(!v||v[Vr]||v[ct]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=d.createElement(s),d.head.insertBefore(v,d.querySelector("head > title"))),pt(v,s,a),v[ct]=e,rt(v),s=v;break e;case"link":var _=Fx("link","href",d).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=d.createElement(s),pt(v,s,a),d.head.appendChild(v);break;case"meta":if(_=Fx("meta","content",d).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=d.createElement(s),pt(v,s,a),d.head.appendChild(v);break;default:throw Error(l(468,s))}v[ct]=e,rt(v),s=v}e.stateNode=s}else Kx(d,e.type,e.stateNode);else e.stateNode=Zx(d,s,e.memoizedProps);else v!==s?(v===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):v.count--,s===null?Kx(d,e.type,e.stateNode):Zx(d,s,e.memoizedProps)):s===null&&e.stateNode!==null&&nf(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&&nf(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){d=e.stateNode;try{ja(d,"")}catch(de){Le(e,e.return,de)}}s&4&&e.stateNode!=null&&(d=e.memoizedProps,nf(e,d,a!==null?a.memoizedProps:d)),s&1024&&(lf=!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,d=cn,cn=us(n.containerInfo),Mt(n,e),cn=d,Rt(e),s&4&&a!==null&&a.memoizedState.isDehydrated)try{li(n.containerInfo)}catch(de){Le(e,e.return,de)}lf&&(lf=!1,K1(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:d=e.memoizedState!==null;var G=a!==null&&a.memoizedState!==null,te=Xn,se=ot;if(Xn=te||d,ot=se||G,Mt(n,e),ot=se,Xn=te,Rt(e),s&8192)e:for(n=e.stateNode,n._visibility=d?n._visibility&-2:n._visibility|1,d&&(a===null||G||Xn||ot||ia(e)),a=null,n=e;;){if(n.tag===5||n.tag===26){if(a===null){G=a=n;try{if(v=G.stateNode,d)_=v.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{j=G.stateNode;var ce=G.memoizedProps.style,ne=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;j.style.display=ne==null||typeof ne=="boolean"?"":(""+ne).trim()}}catch(de){Le(G,G.return,de)}}}else if(n.tag===6){if(a===null){G=n;try{G.stateNode.nodeValue=d?"":G.memoizedProps}catch(de){Le(G,G.return,de)}}}else if(n.tag===18){if(a===null){G=n;try{var ie=G.stateNode;d?Hx(ie,!0):Hx(G.stateNode,!1)}catch(de){Le(G,G.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(B1(s)){a=s;break}s=s.return}if(a==null)throw Error(l(160));switch(a.tag){case 27:var d=a.stateNode,v=rf(e);Ko(e,v,d);break;case 5:var _=a.stateNode;a.flags&32&&(ja(_,""),a.flags&=-33);var j=rf(e);Ko(e,j,_);break;case 3:case 4:var G=a.stateNode.containerInfo,te=rf(e);af(e,te,G);break;default:throw Error(l(161))}}catch(se){Le(e,e.return,se)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function K1(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;K1(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;)V1(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"&&H1(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,d=e,v=n,_=v.flags;switch(v.tag){case 0:case 11:case 15:Kn(d,v,a),nl(4,v);break;case 1:if(Kn(d,v,a),s=v,d=s.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(te){Le(s,s.return,te)}if(s=v,d=s.updateQueue,d!==null){var j=s.stateNode;try{var G=d.shared.hiddenCallbacks;if(G!==null)for(d.shared.hiddenCallbacks=null,d=0;d<G.length;d++)N0(G[d],j)}catch(te){Le(s,s.return,te)}}a&&_&64&&k1(v),rl(v,v.return);break;case 27:U1(v);case 26:case 5:Kn(d,v,a),a&&s===null&&_&4&&L1(v),rl(v,v.return);break;case 12:Kn(d,v,a);break;case 31:Kn(d,v,a),a&&_&4&&X1(d,v);break;case 13:Kn(d,v,a),a&&_&4&&Z1(d,v);break;case 22:v.memoizedState===null&&Kn(d,v,a),rl(v,v.return);break;case 30:break;default:Kn(d,v,a)}n=n.sibling}}function of(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 sf(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;)Q1(e,n,a,s),n=n.sibling}function Q1(e,n,a,s){var d=n.flags;switch(n.tag){case 0:case 11:case 15:fn(e,n,a,s),d&2048&&nl(9,n);break;case 1:fn(e,n,a,s);break;case 3:fn(e,n,a,s),d&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(d&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(G){Le(n,n.return,G)}}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)),d&2048&&of(_,n);break;case 24:fn(e,n,a,s),d&2048&&sf(n.alternate,n);break;default:fn(e,n,a,s)}}function Qa(e,n,a,s,d){for(d=d&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var v=e,_=n,j=a,G=s,te=_.flags;switch(_.tag){case 0:case 11:case 15:Qa(v,_,j,G,d),nl(8,_);break;case 23:break;case 22:var se=_.stateNode;_.memoizedState!==null?se._visibility&2?Qa(v,_,j,G,d):al(v,_):(se._visibility|=2,Qa(v,_,j,G,d)),d&&te&2048&&of(_.alternate,_);break;case 24:Qa(v,_,j,G,d),d&&te&2048&&sf(_.alternate,_);break;default:Qa(v,_,j,G,d)}n=n.sibling}}function al(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=e,s=n,d=s.flags;switch(s.tag){case 22:al(a,s),d&2048&&of(s.alternate,s);break;case 24:al(a,s),d&2048&&sf(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;)$1(e,n,a),e=e.sibling}function $1(e,n,a){switch(e.tag){case 26:$a(e,n,a),e.flags&il&&e.memoizedState!==null&&aM(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 P1(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,W1(s,e)}P1(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)J1(e),e=e.sibling}function J1(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,W1(s,e)}P1(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 W1(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 d=s.sibling,v=s.return;if(Y1(s),s===a){ht=null;break e}if(d!==null){d.return=v,ht=d;break e}ht=v}}}var xj={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}},bj=typeof WeakMap=="function"?WeakMap:Map,ke=0,Ve=null,Ae=null,Me=0,He=0,Vt=null,wr=!1,Pa=!1,uf=!1,Qn=0,We=0,Sr=0,la=0,cf=0,Yt=0,Ja=0,ol=null,qt=null,ff=!1,Po=0,ex=0,Jo=1/0,Wo=null,Er=null,ft=0,Nr=null,Wa=null,$n=0,df=0,hf=null,tx=null,sl=0,gf=null;function It(){return(ke&2)!==0&&Me!==0?Me&-Me:O.T!==null?bf():no()}function nx(){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 rx(e,n,a){if((ke&6)!==0)throw Error(l(327));var s=!a&&(n&127)===0&&(n&e.expiredLanes)===0||Ur(e,n),d=s?Sj(e,n):mf(e,n,!0),v=s;do{if(d===0){Pa&&!s&&Cr(e,n,0,!1);break}else{if(a=e.current.alternate,v&&!_j(a)){d=mf(e,n,!1),v=!1;continue}if(d===2){if(v=n,e.errorRecoveryDisabledLanes&v)var _=0;else _=e.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){n=_;e:{var j=e;d=ol;var G=j.current.memoizedState.isDehydrated;if(G&&(ei(j,_).flags|=256),_=mf(j,_,!1),_!==2){if(uf&&!G){j.errorRecoveryDisabledLanes|=v,la|=v,d=4;break e}v=qt,qt=d,v!==null&&(qt===null?qt=v:qt.push.apply(qt,v))}d=_}if(v=!1,d!==2)continue}}if(d===1){ei(e,0),Cr(e,n,0,!0);break}e:{switch(s=e,v=d,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&&(d=Po+300-Pe(),10<d)){if(Cr(s,n,Yt,!wr),Ea(s,0,!0)!==0)break e;$n=n,s.timeoutHandle=zx(ax.bind(null,s,a,qt,Wo,ff,n,Yt,la,Ja,wr,v,"Throttled",-0,0),d);break e}ax(s,a,qt,Wo,ff,n,Yt,la,Ja,wr,v,null,-0,0)}}break}while(!0);En(e)}function ax(e,n,a,s,d,v,_,j,G,te,se,ce,ne,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},$1(n,v,ce);var de=(v&62914560)===v?Po-Pe():(v&4194048)===v?ex-Pe():0;if(de=iM(ce,de),de!==null){$n=v,e.cancelPendingCommit=de(dx.bind(null,e,n,v,a,s,d,_,j,G,se,ce,null,ne,ie)),Cr(e,v,_,!te);return}}dx(e,n,v,a,s,d,_,j,G)}function _j(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 d=a[s],v=d.getSnapshot;d=d.value;try{if(!Lt(v(),d))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&=~cf,n&=~la,e.suspendedLanes|=n,e.pingedLanes&=~n,s&&(e.warmLanes|=n),s=e.expirationTimes;for(var d=n;0<d;){var v=31-wt(d),_=1<<v;s[v]=-1,d&=~_}a!==0&&Wl(e,a,n)}function es(){return(ke&6)===0?(ul(0),!1):!0}function vf(){if(Ae!==null){if(He===0)var e=Ae.return;else e=Ae,Bn=Pr=null,Mc(e),Ia=null,Xi=0,e=Ae;for(;e!==null;)D1(e.alternate,e),e=e.return;Ae=null}}function ei(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Gj(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),$n=0,vf(),Ve=e,Ae=a=Hn(e.current,null),Me=n,He=0,Vt=null,wr=!1,Pa=Ur(e,n),uf=!1,Ja=Yt=cf=la=Sr=We=0,qt=ol=null,ff=!1,(n&8)!==0&&(n|=n&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=n;0<s;){var d=31-wt(s),v=1<<d;n|=e[d],s&=~v}return Qn=n,_o(),a}function ix(e,n){Ne=null,O.H=Wi,n===Ya||n===jo?(n=_0(),He=3):n===yc?(n=_0(),He=4):He=n===Zc?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 lx(){var e=Ut.current;return e===null?!0:(Me&4194048)===Me?Wt===null:(Me&62914560)===Me||(Me&536870912)!==0?e===Wt:!1}function ox(){var e=O.H;return O.H=Wi,e===null?Wi:e}function sx(){var e=O.A;return O.A=xj,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 mf(e,n,a){var s=ke;ke|=2;var d=ox(),v=sx();(Ve!==e||Me!==n)&&(Wo=null,ei(e,n)),n=!1;var _=We;e:do try{if(He!==0&&Ae!==null){var j=Ae,G=Vt;switch(He){case 8:vf(),_=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,G,te),a&&Pa){_=0;break e}break;default:te=He,He=0,Vt=null,ti(e,j,G,te)}}wj(),_=We;break}catch(se){ix(e,se)}while(!0);return n&&e.shellSuspendCounter++,Bn=Pr=null,ke=s,O.H=d,O.A=v,Ae===null&&(Ve=null,Me=0,_o()),_}function wj(){for(;Ae!==null;)ux(Ae)}function Sj(e,n){var a=ke;ke|=2;var s=ox(),d=sx();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(x0(v)){He=0,Vt=null,cx(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:x0(v)?(He=0,Vt=null,cx(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(_?Qx(_):j.stateNode.complete){He=0,Vt=null;var G=j.sibling;if(G!==null)Ae=G;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:vf(),We=6;break e;default:throw Error(l(462))}}Ej();break}catch(se){ix(e,se)}while(!0);return Bn=Pr=null,O.H=s,O.A=d,ke=a,Ae!==null?0:(Ve=null,Me=0,_o(),We)}function Ej(){for(;Ae!==null&&!yt();)ux(Ae)}function ux(e){var n=O1(e.alternate,e,Qn);e.memoizedProps=e.pendingProps,n===null?ns(e):Ae=n}function cx(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=T1(a,n,n.pendingProps,n.type,void 0,Me);break;case 11:n=T1(a,n,n.pendingProps,n.type.render,n.ref,Me);break;case 5:Mc(n);default:D1(a,n),n=Ae=s0(n,Qn),n=O1(a,n,Qn)}e.memoizedProps=e.pendingProps,n===null?ns(e):Ae=n}function ti(e,n,a,s){Bn=Pr=null,Mc(n),Ia=null,Xi=0;var d=n.return;try{if(dj(e,d,n,a,Me)){We=1,Yo(e,Qt(a,e.current)),Ae=null;return}}catch(v){if(d!==null)throw Ae=d,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))),fx(n,e)):ns(n)}function ns(e){var n=e;do{if((n.flags&32768)!==0){fx(n,wr);return}e=n.return;var a=vj(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 fx(e,n){do{var a=mj(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 dx(e,n,a,s,d,v,_,j,G){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|=rc,Ou(e,a,v,_,j,G),e===Ve&&(Ae=Ve=null,Me=0),Wa=n,Nr=e,$n=a,df=v,hf=d,tx=s,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Aj(Nt,function(){return px(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||s){s=O.T,O.T=null,d=V.p,V.p=2,_=ke,ke|=4;try{pj(e,n,a)}finally{ke=_,V.p=d,O.T=s}}ft=1,hx(),gx(),vx()}}function hx(){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=V.p;V.p=2;var d=ke;ke|=4;try{F1(n,e);var v=Af,_=Wy(e.containerInfo),j=v.focusedElem,G=v.selectionRange;if(_!==j&&j&&j.ownerDocument&&Jy(j.ownerDocument.documentElement,j)){if(G!==null&&Ju(j)){var te=G.start,se=G.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,ne=ce&&ce.defaultView||window;if(ne.getSelection){var ie=ne.getSelection(),de=j.textContent.length,Se=Math.min(G.start,de),Ge=G.end===void 0?Se:Math.min(G.end,de);!ie.extend&&Se>Ge&&(_=Ge,Ge=Se,Se=_);var Q=Py(j,Se),X=Py(j,Ge);if(Q&&X&&(ie.rangeCount!==1||ie.anchorNode!==Q.node||ie.anchorOffset!==Q.offset||ie.focusNode!==X.node||ie.focusOffset!==X.offset)){var W=ce.createRange();W.setStart(Q.node,Q.offset),ie.removeAllRanges(),Se>Ge?(ie.addRange(W),ie.extend(X.node,X.offset)):(W.setEnd(X.node,X.offset),ie.addRange(W))}}}}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=!!Tf,Af=Tf=null}finally{ke=d,V.p=s,O.T=a}}e.current=n,ft=2}}function gx(){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=V.p;V.p=2;var d=ke;ke|=4;try{V1(e,n.alternate,n)}finally{ke=d,V.p=s,O.T=a}}ft=3}}function vx(){if(ft===4||ft===3){ft=0,$e();var e=Nr,n=Wa,a=$n,s=tx;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?ft=5:(ft=0,Wa=Nr=null,mx(e,e.pendingLanes));var d=e.pendingLanes;if(d===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,d=V.p,V.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,V.p=d}}($n&3)!==0&&rs(),En(e),d=e.pendingLanes,(a&261930)!==0&&(d&42)!==0?e===gf?sl++:(sl=0,gf=e):sl=0,ul(0)}}function mx(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Yi(n)))}function rs(){return hx(),gx(),vx(),px()}function px(){if(ft!==5)return!1;var e=Nr,n=df;df=0;var a=Ai($n),s=O.T,d=V.p;try{V.p=32>a?32:a,O.T=null,a=hf,hf=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,J1(v.current),Q1(v,v.current,_,a),ke=j,ul(0,!1),Qe&&typeof Qe.onPostCommitFiberRoot=="function")try{Qe.onPostCommitFiberRoot(xt,v)}catch{}return!0}finally{V.p=d,O.T=s,mx(e,n)}}function yx(e,n,a){n=Qt(a,n),n=Xc(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)yx(e,e,a);else for(;n!==null;){if(n.tag===3){yx(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=x1(2),s=yr(n,a,2),s!==null&&(b1(a,s,n,e),Gr(s,2),En(s));break}}n=n.return}}function pf(e,n,a){var s=e.pingCache;if(s===null){s=e.pingCache=new bj;var d=new Set;s.set(n,d)}else d=s.get(n),d===void 0&&(d=new Set,s.set(n,d));d.has(a)||(uf=!0,d.add(a),e=Nj.bind(null,e,n,a),n.then(e,e))}function Nj(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):cf|=a,Ja===Me&&(Ja=0)),En(e)}function xx(e,n){n===0&&(n=Jl()),e=Kr(e,n),e!==null&&(Gr(e,n),En(e))}function Cj(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),xx(e,a)}function Tj(e,n){var a=0;switch(e.tag){case 31:case 13:var s=e.stateNode,d=e.memoizedState;d!==null&&(a=d.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),xx(e,a)}function Aj(e,n){return Ht(e,n)}var as=null,ni=null,yf=!1,is=!1,xf=!1,Tr=0;function En(e){e!==ni&&e.next===null&&(ni===null?as=ni=e:ni=ni.next=e),is=!0,yf||(yf=!0,Mj())}function ul(e,n){if(!xf&&is){xf=!0;do for(var a=!1,s=as;s!==null;){if(e!==0){var d=s.pendingLanes;if(d===0)var v=0;else{var _=s.suspendedLanes,j=s.pingedLanes;v=(1<<31-wt(42|e)+1)-1,v&=d&~(_&~j),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(a=!0,Sx(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,Sx(s,v));s=s.next}while(a);xf=!1}}function jj(){bx()}function bx(){is=yf=!1;var e=0;Tr!==0&&Uj()&&(e=Tr);for(var n=Pe(),a=null,s=as;s!==null;){var d=s.next,v=_x(s,n);v===0?(s.next=null,a===null?as=d:a.next=d,d===null&&(ni=a)):(a=s,(e!==0||(v&3)!==0)&&(is=!0)),s=d}ft!==0&&ft!==5||ul(e),Tr!==0&&(Tr=0)}function _x(e,n){for(var a=e.suspendedLanes,s=e.pingedLanes,d=e.expirationTimes,v=e.pendingLanes&-62914561;0<v;){var _=31-wt(v),j=1<<_,G=d[_];G===-1?((j&a)===0||(j&s)!==0)&&(d[_]=qu(j,n)):G<=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=wx.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 wx(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:(rx(e,s,n),_x(e,Pe()),e.callbackNode!=null&&e.callbackNode===a?wx.bind(null,e):null)}function Sx(e,n){if(rs())return null;rx(e,n,!0)}function Mj(){Vj(function(){(ke&6)!==0?Ht(ln,jj):bx()})}function bf(){if(Tr===0){var e=Ga;e===0&&(e=_a,_a<<=1,(_a&261888)===0&&(_a=256)),Tr=e}return Tr}function Ex(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ho(""+e)}function Nx(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 Rj(e,n,a,s,d){if(n==="submit"&&a&&a.stateNode===d){var v=Ex((d[bt]||null).action),_=s.submitter;_&&(n=(n=_[bt]||null)?Ex(n.formAction):_.getAttribute("formAction"),n!==null&&(v=n,_=null));var j=new po("action","action",null,s,d);e.push({event:j,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Tr!==0){var G=_?Nx(d,_):new FormData(d);Bc(a,{pending:!0,data:G,method:d.method,action:v},null,G)}}else typeof v=="function"&&(j.preventDefault(),G=_?Nx(d,_):new FormData(d),Bc(a,{pending:!0,data:G,method:d.method,action:v},v,G))},currentTarget:d}]})}}for(var _f=0;_f<nc.length;_f++){var wf=nc[_f],qj=wf.toLowerCase(),Oj=wf[0].toUpperCase()+wf.slice(1);un(qj,"on"+Oj)}un(n0,"onAnimationEnd"),un(r0,"onAnimationIteration"),un(a0,"onAnimationStart"),un("dblclick","onDoubleClick"),un("focusin","onFocus"),un("focusout","onBlur"),un(Q3,"onTransitionRun"),un($3,"onTransitionStart"),un(P3,"onTransitionCancel"),un(i0,"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(" "),zj=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(cl));function Cx(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var s=e[a],d=s.event;s=s.listeners;e:{var v=void 0;if(n)for(var _=s.length-1;0<=_;_--){var j=s[_],G=j.instance,te=j.currentTarget;if(j=j.listener,G!==v&&d.isPropagationStopped())break e;v=j,d.currentTarget=te;try{v(d)}catch(se){bo(se)}d.currentTarget=null,v=G}else for(_=0;_<s.length;_++){if(j=s[_],G=j.instance,te=j.currentTarget,j=j.listener,G!==v&&d.isPropagationStopped())break e;v=j,d.currentTarget=te;try{v(d)}catch(se){bo(se)}d.currentTarget=null,v=G}}}}function je(e,n){var a=n[Na];a===void 0&&(a=n[Na]=new Set);var s=e+"__bubble";a.has(s)||(Tx(n,e,2,!1),a.add(s))}function Sf(e,n,a){var s=0;n&&(s|=4),Tx(a,e,s,n)}var ls="_reactListening"+Math.random().toString(36).slice(2);function Ef(e){if(!e[ls]){e[ls]=!0,lo.forEach(function(a){a!=="selectionchange"&&(zj.has(a)||Sf(a,!1,e),Sf(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[ls]||(n[ls]=!0,Sf("selectionchange",!1,n))}}function Tx(e,n,a,s){switch(nb(n)){case 2:var d=sM;break;case 8:d=uM;break;default:d=Bf}a=d.bind(null,n,a,e),d=void 0,!Yu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),s?d!==void 0?e.addEventListener(n,a,{capture:!0,passive:d}):e.addEventListener(n,a,!0):d!==void 0?e.addEventListener(n,a,{passive:d}):e.addEventListener(n,a,!1)}function Nf(e,n,a,s,d){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===d)break;if(_===4)for(_=s.return;_!==null;){var G=_.tag;if((G===3||G===4)&&_.stateNode.containerInfo===d)return;_=_.return}for(;j!==null;){if(_=lr(j),_===null)return;if(G=_.tag,G===5||G===6||G===26||G===27){s=v=_;continue e}j=j.parentNode}}s=s.return}qy(function(){var te=v,se=Gu(a),ce=[];e:{var ne=l0.get(e);if(ne!==void 0){var ie=po,de=e;switch(e){case"keypress":if(vo(a)===0)break e;case"keydown":case"keyup":ie=T3;break;case"focusin":de="focus",ie=Fu;break;case"focusout":de="blur",ie=Fu;break;case"beforeblur":case"afterblur":ie=Fu;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=Dy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ie=v3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ie=M3;break;case n0:case r0:case a0:ie=y3;break;case i0:ie=q3;break;case"scroll":case"scrollend":ie=h3;break;case"wheel":ie=z3;break;case"copy":case"cut":case"paste":ie=b3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ie=Hy;break;case"toggle":case"beforetoggle":ie=k3}var Se=(n&4)!==0,Ge=!Se&&(e==="scroll"||e==="scrollend"),Q=Se?ne!==null?ne+"Capture":null:ne;Se=[];for(var X=te,W;X!==null;){var ue=X;if(W=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||W===null||Q===null||(ue=qi(X,Q),ue!=null&&Se.push(fl(X,ue,W))),Ge)break;X=X.return}0<Se.length&&(ne=new ie(ne,de,null,a,se),ce.push({event:ne,listeners:Se}))}}if((n&7)===0){e:{if(ne=e==="mouseover"||e==="pointerover",ie=e==="mouseout"||e==="pointerout",ne&&a!==Uu&&(de=a.relatedTarget||a.fromElement)&&(lr(de)||de[qn]))break e;if((ie||ne)&&(ne=se.window===se?se:(ne=se.ownerDocument)?ne.defaultView||ne.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=Dy,ue="onMouseLeave",Q="onMouseEnter",X="mouse",(e==="pointerout"||e==="pointerover")&&(Se=Hy,ue="onPointerLeave",Q="onPointerEnter",X="pointer"),Ge=ie==null?ne:sr(ie),W=de==null?ne:sr(de),ne=new Se(ue,X+"leave",ie,a,se),ne.target=Ge,ne.relatedTarget=W,ue=null,lr(se)===te&&(Se=new Se(Q,X+"enter",de,a,se),Se.target=W,Se.relatedTarget=Ge,ue=Se),Ge=ue,ie&&de)t:{for(Se=Dj,Q=ie,X=de,W=0,ue=Q;ue;ue=Se(ue))W++;ue=0;for(var be=X;be;be=Se(be))ue++;for(;0<W-ue;)Q=Se(Q),W--;for(;0<ue-W;)X=Se(X),ue--;for(;W--;){if(Q===X||X!==null&&Q===X.alternate){Se=Q;break t}Q=Se(Q),X=Se(X)}Se=null}else Se=null;ie!==null&&Ax(ce,ne,ie,Se,!1),de!==null&&Ge!==null&&Ax(ce,Ge,de,Se,!0)}}e:{if(ne=te?sr(te):window,ie=ne.nodeName&&ne.nodeName.toLowerCase(),ie==="select"||ie==="input"&&ne.type==="file")var ze=Xy;else if(Yy(ne))if(Zy)ze=Z3;else{ze=I3;var me=Y3}else ie=ne.nodeName,!ie||ie.toLowerCase()!=="input"||ne.type!=="checkbox"&&ne.type!=="radio"?te&&Bu(te.elementType)&&(ze=Xy):ze=X3;if(ze&&(ze=ze(e,te))){Iy(ce,ze,a,se);break e}me&&me(e,ne,te),e==="focusout"&&te&&ne.type==="number"&&te.memoizedProps.value!=null&&Ri(ne,"number",ne.value)}switch(me=te?sr(te):window,e){case"focusin":(Yy(me)||me.contentEditable==="true")&&(Oa=me,Wu=te,Ui=null);break;case"focusout":Ui=Wu=Oa=null;break;case"mousedown":ec=!0;break;case"contextmenu":case"mouseup":case"dragend":ec=!1,e0(ce,a,se);break;case"selectionchange":if(K3)break;case"keydown":case"keyup":e0(ce,a,se)}var Ce;if(Qu)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?Gy(e,a)&&(Re="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Re="onCompositionStart");Re&&(Ly&&a.locale!=="ko"&&(qa||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&qa&&(Ce=Oy()):(fr=se,Iu="value"in fr?fr.value:fr.textContent,qa=!0)),me=os(te,Re),0<me.length&&(Re=new ky(Re,e,null,a,se),ce.push({event:Re,listeners:me}),Ce?Re.data=Ce:(Ce=Vy(a),Ce!==null&&(Re.data=Ce)))),(Ce=L3?B3(e,a):U3(e,a))&&(Re=os(te,"onBeforeInput"),0<Re.length&&(me=new ky("onBeforeInput","beforeinput",null,a,se),ce.push({event:me,listeners:Re}),me.data=Ce)),Rj(ce,e,te,a,se)}Cx(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 d=e,v=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||v===null||(d=qi(e,a),d!=null&&s.unshift(fl(e,d,v)),d=qi(e,n),d!=null&&s.push(fl(e,d,v))),e.tag===3)return s;e=e.return}return[]}function Dj(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ax(e,n,a,s,d){for(var v=n._reactName,_=[];a!==null&&a!==s;){var j=a,G=j.alternate,te=j.stateNode;if(j=j.tag,G!==null&&G===s)break;j!==5&&j!==26&&j!==27||te===null||(G=te,d?(te=qi(a,v),te!=null&&_.unshift(fl(a,te,G))):d||(te=qi(a,v),te!=null&&_.push(fl(a,te,G)))),a=a.return}_.length!==0&&e.push({event:n,listeners:_})}var kj=/\r\n?/g,Hj=/\u0000|\uFFFD/g;function jx(e){return(typeof e=="string"?e:""+e).replace(kj,`
9
- `).replace(Hj,"")}function Mx(e,n){return n=jx(n),jx(e)===n}function Ue(e,n,a,s,d,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":My(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",d.name,d,null),Ue(e,n,"formEncType",d.formEncType,d,null),Ue(e,n,"formMethod",d.formMethod,d,null),Ue(e,n,"formTarget",d.formTarget,d,null)):(Ue(e,n,"encType",d.encType,d,null),Ue(e,n,"method",d.method,d,null),Ue(e,n,"target",d.target,d,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(d.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=f3.get(a)||a,Ca(e,a,s))}}function Cf(e,n,a,s,d,v){switch(a){case"style":My(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(d.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"&&(d=a.endsWith("Capture"),n=a.slice(2,d?a.length-7:void 0),v=e[bt]||null,v=v!=null?v[a]:null,typeof v=="function"&&e.removeEventListener(n,v,d),typeof s=="function")){typeof v!="function"&&v!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(n,s,d);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,d=!1,v;for(v in a)if(a.hasOwnProperty(v)){var _=a[v];if(_!=null)switch(v){case"src":s=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,n));default:Ue(e,n,v,_,a,null)}}d&&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=_=d=null,G=null,te=null;for(s in a)if(a.hasOwnProperty(s)){var se=a[s];if(se!=null)switch(s){case"name":d=se;break;case"type":_=se;break;case"checked":G=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,G,te,_,d,!1);return;case"select":je("invalid",e),s=_=v=null;for(d in a)if(a.hasOwnProperty(d)&&(j=a[d],j!=null))switch(d){case"value":v=j;break;case"defaultValue":_=j;break;case"multiple":s=j;default:Ue(e,n,d,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=d=s=null;for(_ in a)if(a.hasOwnProperty(_)&&(j=a[_],j!=null))switch(_){case"value":s=j;break;case"defaultValue":d=j;break;case"children":v=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(l(91));break;default:Ue(e,n,_,j,a,null)}Ay(e,s,d,v);return;case"option":for(G in a)a.hasOwnProperty(G)&&(s=a[G],s!=null)&&(G==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":Ue(e,n,G,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(Bu(n)){for(se in a)a.hasOwnProperty(se)&&(s=a[se],s!==void 0&&Cf(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 Lj(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 d=null,v=null,_=null,j=null,G=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":G=ce;default:s.hasOwnProperty(ie)||Ue(e,n,ie,null,s,ce)}}for(var ne in s){var ie=s[ne];if(ce=a[ne],s.hasOwnProperty(ne)&&(ie!=null||ce!=null))switch(ne){case"type":v=ie;break;case"name":d=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,ne,ie,s,ce)}}Ir(e,_,j,G,te,se,v,d);return;case"select":ie=_=j=ne=null;for(v in a)if(G=a[v],a.hasOwnProperty(v)&&G!=null)switch(v){case"value":break;case"multiple":ie=G;default:s.hasOwnProperty(v)||Ue(e,n,v,null,s,G)}for(d in s)if(v=s[d],G=a[d],s.hasOwnProperty(d)&&(v!=null||G!=null))switch(d){case"value":ne=v;break;case"defaultValue":j=v;break;case"multiple":_=v;default:v!==G&&Ue(e,n,d,v,s,G)}n=j,a=_,s=ie,ne!=null?zn(e,!!a,ne,!1):!!s!=!!a&&(n!=null?zn(e,!!a,n,!0):zn(e,!!a,a?[]:"",!1));return;case"textarea":ie=ne=null;for(j in a)if(d=a[j],a.hasOwnProperty(j)&&d!=null&&!s.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:Ue(e,n,j,null,s,d)}for(_ in s)if(d=s[_],v=a[_],s.hasOwnProperty(_)&&(d!=null||v!=null))switch(_){case"value":ne=d;break;case"defaultValue":ie=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(l(91));break;default:d!==v&&Ue(e,n,_,d,s,v)}Ty(e,ne,ie);return;case"option":for(var de in a)ne=a[de],a.hasOwnProperty(de)&&ne!=null&&!s.hasOwnProperty(de)&&(de==="selected"?e.selected=!1:Ue(e,n,de,null,s,ne));for(G in s)ne=s[G],ie=a[G],s.hasOwnProperty(G)&&ne!==ie&&(ne!=null||ie!=null)&&(G==="selected"?e.selected=ne&&typeof ne!="function"&&typeof ne!="symbol":Ue(e,n,G,ne,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)ne=a[Se],a.hasOwnProperty(Se)&&ne!=null&&!s.hasOwnProperty(Se)&&Ue(e,n,Se,null,s,ne);for(te in s)if(ne=s[te],ie=a[te],s.hasOwnProperty(te)&&ne!==ie&&(ne!=null||ie!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(l(137,n));break;default:Ue(e,n,te,ne,s,ie)}return;default:if(Bu(n)){for(var Ge in a)ne=a[Ge],a.hasOwnProperty(Ge)&&ne!==void 0&&!s.hasOwnProperty(Ge)&&Cf(e,n,Ge,void 0,s,ne);for(se in s)ne=s[se],ie=a[se],!s.hasOwnProperty(se)||ne===ie||ne===void 0&&ie===void 0||Cf(e,n,se,ne,s,ie);return}}for(var Q in a)ne=a[Q],a.hasOwnProperty(Q)&&ne!=null&&!s.hasOwnProperty(Q)&&Ue(e,n,Q,null,s,ne);for(ce in s)ne=s[ce],ie=a[ce],!s.hasOwnProperty(ce)||ne===ie||ne==null&&ie==null||Ue(e,n,ce,ne,s,ie)}function Rx(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Bj(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,a=performance.getEntriesByType("resource"),s=0;s<a.length;s++){var d=a[s],v=d.transferSize,_=d.initiatorType,j=d.duration;if(v&&j&&Rx(_)){for(_=0,j=d.responseEnd,s+=1;s<a.length;s++){var G=a[s],te=G.startTime;if(te>j)break;var se=G.transferSize,ce=G.initiatorType;se&&Rx(ce)&&(G=G.responseEnd,_+=se*(G<j?1:(j-te)/(G-te)))}if(--s,n+=8*(v+_)/(d.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 Tf=null,Af=null;function ss(e){return e.nodeType===9?e:e.ownerDocument}function qx(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 Ox(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 jf(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 Mf=null;function Uj(){var e=window.event;return e&&e.type==="popstate"?e===Mf?!1:(Mf=e,!0):(Mf=null,!1)}var zx=typeof setTimeout=="function"?setTimeout:void 0,Gj=typeof clearTimeout=="function"?clearTimeout:void 0,Dx=typeof Promise=="function"?Promise:void 0,Vj=typeof queueMicrotask=="function"?queueMicrotask:typeof Dx<"u"?function(e){return Dx.resolve(null).then(e).catch(Yj)}:zx;function Yj(e){setTimeout(function(){throw e})}function Ar(e){return e==="head"}function kx(e,n){var a=n,s=0;do{var d=a.nextSibling;if(e.removeChild(a),d&&d.nodeType===8)if(a=d.data,a==="/$"||a==="/&"){if(s===0){e.removeChild(d),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=d}while(a);li(n)}function Hx(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 Rf(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":Rf(a),ji(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Ij(e,n,a,s){for(;e.nodeType===1;){var d=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!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(v=e.getAttribute("src"),(v!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&v&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var v=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===v)return e}else return e;if(e=en(e.nextSibling),e===null)break}return null}function Xj(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 Lx(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 qf(e){return e.data==="$?"||e.data==="$~"}function Of(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Zj(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 zf=null;function Bx(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 Ux(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 Gx(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,Vx=new Set;function us(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Pn=V.d;V.d={f:Fj,r:Kj,D:Qj,C:$j,L:Pj,m:Jj,X:eM,S:Wj,M:tM};function Fj(){var e=Pn.f(),n=es();return e||n}function Kj(e){var n=or(e);n!==null&&n.tag===5&&n.type==="form"?i1(n):Pn.r(e)}var ri=typeof document>"u"?null:document;function Yx(e,n,a){var s=ri;if(s&&typeof n=="string"&&n){var d=Tt(n);d='link[rel="'+e+'"][href="'+d+'"]',typeof a=="string"&&(d+='[crossorigin="'+a+'"]'),Vx.has(d)||(Vx.add(d),e={rel:e,crossOrigin:a,href:n},s.querySelector(d)===null&&(n=s.createElement("link"),pt(n,"link",e),rt(n),s.head.appendChild(n)))}}function Qj(e){Pn.D(e),Yx("dns-prefetch",e,null)}function $j(e,n){Pn.C(e,n),Yx("preconnect",e,n)}function Pj(e,n,a){Pn.L(e,n,a);var s=ri;if(s&&e&&n){var d='link[rel="preload"][as="'+Tt(n)+'"]';n==="image"&&a&&a.imageSrcSet?(d+='[imagesrcset="'+Tt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(d+='[imagesizes="'+Tt(a.imageSizes)+'"]')):d+='[href="'+Tt(e)+'"]';var v=d;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(d)!==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 Jj(e,n){Pn.m(e,n);var a=ri;if(a&&e){var s=n&&typeof n.as=="string"?n.as:"script",d='link[rel="modulepreload"][as="'+Tt(s)+'"][href="'+Tt(e)+'"]',v=d;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(d)===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 Wj(e,n,a){Pn.S(e,n,a);var s=ri;if(s&&e){var d=ur(s).hoistableStyles,v=ai(e);n=n||"default";var _=d.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))&&Df(e,a);var G=_=s.createElement("link");rt(G),pt(G,"link",e),G._p=new Promise(function(te,se){G.onload=te,G.onerror=se}),G.addEventListener("load",function(){j.loading|=1}),G.addEventListener("error",function(){j.loading|=2}),j.loading|=4,cs(_,n,s)}_={type:"stylesheet",instance:_,count:1,state:j},d.set(v,_)}}}function eM(e,n){Pn.X(e,n);var a=ri;if(a&&e){var s=ur(a).hoistableScripts,d=ii(e),v=s.get(d);v||(v=a.querySelector(gl(d)),v||(e=p({src:e,async:!0},n),(n=tn.get(d))&&kf(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(d,v))}}function tM(e,n){Pn.M(e,n);var a=ri;if(a&&e){var s=ur(a).hoistableScripts,d=ii(e),v=s.get(d);v||(v=a.querySelector(gl(d)),v||(e=p({src:e,async:!0,type:"module"},n),(n=tn.get(d))&&kf(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(d,v))}}function Ix(e,n,a,s){var d=(d=$.current)?us(d):null;if(!d)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(d).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(d).hoistableStyles,_=v.get(e);if(_||(d=d.ownerDocument||d,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(e,_),(v=d.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||nM(d,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(d).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 Xx(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function nM(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 Zx(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 d=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",d),cs(s,a.precedence,e),n.instance=s;case"stylesheet":d=ai(a.href);var v=e.querySelector(hl(d));if(v)return n.state.loading|=4,n.instance=v,rt(v),v;s=Xx(a),(d=tn.get(d))&&Df(s,d),v=(e.ownerDocument||e).createElement("link"),rt(v);var _=v;return _._p=new Promise(function(j,G){_.onload=j,_.onerror=G}),pt(v,"link",s),n.state.loading|=4,cs(v,a.precedence,e),n.instance=v;case"script":return v=ii(a.src),(d=e.querySelector(gl(v)))?(n.instance=d,rt(d),d):(s=a,(d=tn.get(v))&&(s=p({},a),kf(s,d)),e=e.ownerDocument||e,d=e.createElement("script"),rt(d),pt(d,"link",s),e.head.appendChild(d),n.instance=d);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]'),d=s.length?s[s.length-1]:null,v=d,_=0;_<s.length;_++){var j=s[_];if(j.dataset.precedence===n)v=j;else if(v!==d)break}v?v.parentNode.insertBefore(e,v.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(e,n.firstChild))}function Df(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function kf(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 Fx(e,n,a){if(fs===null){var s=new Map,d=fs=new Map;d.set(a,s)}else d=fs,s=d.get(a),s||(s=new Map,d.set(a,s));if(s.has(e))return s;for(s.set(e,null),a=a.getElementsByTagName(e),d=0;d<a.length;d++){var v=a[d];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 Kx(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function rM(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 Qx(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function aM(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 d=ai(s.href),v=n.querySelector(hl(d));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=Xx(s),(d=tn.get(d))&&Df(s,d),v=v.createElement("link"),rt(v);var _=v;_._p=new Promise(function(j,G){_.onload=j,_.onerror=G}),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 Hf=0;function iM(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&&Hf===0&&(Hf=62500*Bj());var d=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>Hf?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(d)}}: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(lM,e),hs=null,ds.call(e))}function lM(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 d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<d.length;v++){var _=d[v];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(a.set(_.dataset.precedence,_),s=_)}s&&a.set(null,s)}d=n.instance,_=d.getAttribute("data-precedence"),v=a.get(_)||s,v===s&&a.set(null,d),a.set(_,d),this.count++,s=ds.bind(this),d.addEventListener("load",s),d.addEventListener("error",s),v?v.parentNode.insertBefore(d,v.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),n.state.loading|=4}}var vl={$$typeof:w,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function oM(e,n,a,s,d,v,_,j,G){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=d,this.onCaughtError=v,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=G,this.incompleteTransitions=new Map}function $x(e,n,a,s,d,v,_,j,G,te,se,ce){return e=new oM(e,n,a,_,G,te,se,ce,j),n=1,v===!0&&(n|=24),v=Bt(3,null,null,n),e.current=v,v.stateNode=e,n=vc(),n.refCount++,e.pooledCache=n,n.refCount++,v.memoizedState={element:s,isDehydrated:a,cache:n},xc(v),e}function Px(e){return e?(e=ka,e):ka}function Jx(e,n,a,s,d,v){d=Px(d),s.context===null?s.context=d:s.pendingContext=d,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 Wx(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function Lf(e,n){Wx(e,n),(e=e.alternate)&&Wx(e,n)}function eb(e){if(e.tag===13||e.tag===31){var n=Kr(e,67108864);n!==null&&Ot(n,e,67108864),Lf(e,67108864)}}function tb(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),Lf(e,n)}}var vs=!0;function sM(e,n,a,s){var d=O.T;O.T=null;var v=V.p;try{V.p=2,Bf(e,n,a,s)}finally{V.p=v,O.T=d}}function uM(e,n,a,s){var d=O.T;O.T=null;var v=V.p;try{V.p=8,Bf(e,n,a,s)}finally{V.p=v,O.T=d}}function Bf(e,n,a,s){if(vs){var d=Uf(s);if(d===null)Nf(e,n,s,ms,a),rb(e,s);else if(fM(d,e,n,a,s))s.stopPropagation();else if(rb(e,s),n&4&&-1<cM.indexOf(e)){for(;d!==null;){var v=or(d);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 G=1<<31-wt(_);j.entanglements[1]|=G,_&=~G}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(),Lf(v,2)}if(v=Uf(s),v===null&&Nf(e,n,s,ms,a),v===d)break;d=v}d!==null&&s.stopPropagation()}else Nf(e,n,s,null,a)}}function Uf(e){return e=Gu(e),Gf(e)}var ms=null;function Gf(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 nb(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 Vf=!1,jr=null,Mr=null,Rr=null,ml=new Map,pl=new Map,qr=[],cM="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 rb(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,d,v){return e===null||e.nativeEvent!==v?(e={blockedOn:n,domEventName:a,eventSystemFlags:s,nativeEvent:v,targetContainers:[d]},n!==null&&(n=or(n),n!==null&&eb(n)),e):(e.eventSystemFlags|=s,n=e.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),e)}function fM(e,n,a,s,d){switch(n){case"focusin":return jr=yl(jr,e,n,a,s,d),!0;case"dragenter":return Mr=yl(Mr,e,n,a,s,d),!0;case"mouseover":return Rr=yl(Rr,e,n,a,s,d),!0;case"pointerover":var v=d.pointerId;return ml.set(v,yl(ml.get(v)||null,e,n,a,s,d)),!0;case"gotpointercapture":return v=d.pointerId,pl.set(v,yl(pl.get(v)||null,e,n,a,s,d)),!0}return!1}function ab(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(){tb(a)});return}}else if(n===31){if(n=f(a),n!==null){e.blockedOn=n,ro(e.priority,function(){tb(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=Uf(e.nativeEvent);if(a===null){a=e.nativeEvent;var s=new a.constructor(a.type,a);Uu=s,a.target.dispatchEvent(s),Uu=null}else return n=or(a),n!==null&&eb(n),e.blockedOn=a,!1;n.shift()}return!0}function ib(e,n,a){ps(e)&&a.delete(n)}function dM(){Vf=!1,jr!==null&&ps(jr)&&(jr=null),Mr!==null&&ps(Mr)&&(Mr=null),Rr!==null&&ps(Rr)&&(Rr=null),ml.forEach(ib),pl.forEach(ib)}function ys(e,n){e.blockedOn===n&&(e.blockedOn=null,Vf||(Vf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,dM)))}var xs=null;function lb(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],d=e[n+2];if(typeof s!="function"){if(Gf(s||a)===null)continue;break}var v=or(a);v!==null&&(e.splice(n,3),n-=3,Bc(v,{pending:!0,data:d,method:a.method,action:s},s,d))}}))}function li(e){function n(G){return ys(G,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);)ab(a),a.blockedOn===null&&qr.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var d=a[s],v=a[s+1],_=d[bt]||null;if(typeof v=="function")_||lb(a);else if(_){var j=null;if(v&&v.hasAttribute("formAction")){if(d=v,_=v[bt]||null)j=_.formAction;else if(Gf(d)!==null)continue}else j=_.action;typeof j=="function"?a[s+1]=j:(a.splice(s,3),s-=3),lb(a)}}}function ob(){function e(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(_){return d=_})},focusReset:"manual",scroll:"manual"})}function n(){d!==null&&(d(),d=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,d=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),d!==null&&(d(),d=null)}}}function Yf(e){this._internalRoot=e}bs.prototype.render=Yf.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(l(409));var a=n.current,s=It();Jx(a,s,e,n,null,null)},bs.prototype.unmount=Yf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Jx(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&&ab(e)}};var sb=r.version;if(sb!=="19.2.4")throw Error(l(527,sb,"19.2.4"));V.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=h(n),e=e!==null?m(e):null,e=e===null?null:e.stateNode,e};var hM={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(hM),Qe=_s}catch{}}return bl.createRoot=function(e,n){if(!o(e))throw Error(l(299));var a=!1,s="",d=v1,v=m1,_=p1;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onUncaughtError!==void 0&&(d=n.onUncaughtError),n.onCaughtError!==void 0&&(v=n.onCaughtError),n.onRecoverableError!==void 0&&(_=n.onRecoverableError)),n=$x(e,1,!1,null,null,a,s,null,d,v,_,ob),e[qn]=n.current,Ef(e),new Yf(n)},bl.hydrateRoot=function(e,n,a){if(!o(e))throw Error(l(299));var s=!1,d="",v=v1,_=m1,j=p1,G=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(d=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&&(G=a.formState)),n=$x(e,1,!0,n,a??null,s,d,G,v,_,j,ob),n.context=Px(null),a=n.current,s=It(),s=Ti(s),d=pr(s),d.callback=null,yr(a,d,s),a=s,n.current.lanes=a,Gr(n,a),En(n),e[qn]=n.current,Ef(e),new bs(n)},bl.version="19.2.4",bl}var yb;function wM(){if(yb)return Zf.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(),Zf.exports=_M(),Zf.exports}var SM=wM();const xb=t=>{let r;const i=new Set,l=(h,m)=>{const p=typeof h=="function"?h(r):h;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:h=>(i.add(h),()=>i.delete(h))},g=r=t(l,o,f);return f},EM=(t=>t?xb(t):xb),NM=t=>t;function CM(t,r=NM){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 bb=t=>{const r=EM(t),i=l=>CM(r,l);return Object.assign(i,r),i},dC=(t=>t?bb(t):bb),TM="/api";function zr(t,r,i){const l=i||new URLSearchParams;r&&l.set("project",r);const o=l.toString();return`${TM}${t}${o?`?${o}`:""}`}const hC=dC()((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}})),_b="/api",Js=dC((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(`${_b}/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(`${_b}/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())}})),gC=ee.createContext(void 0);function AM({children:t}){const[r,i]=ee.useState(()=>{const o=localStorage.getItem("octie-theme");return o==="dark"||o==="light"?o:"light"});ee.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(gC.Provider,{value:{theme:r,toggleTheme:l},children:t})}function vC(){const t=ee.useContext(gC);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t}function jM({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("list"),className:"flex items-center gap-2 px-3 py-2 text-sm transition-all duration-200",style:{background:t==="list"?"linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(167, 139, 250, 0.15))":"var(--surface-raised)",color:t==="list"?"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("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),x.jsx("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),x.jsx("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),x.jsx("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),x.jsx("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),x.jsx("line",{x1:"3",y1:"18",x2:"3.01",y2:"18"})]}),"List",x.jsx("kbd",{className:"text-[10px] px-1 rounded",style:{background:t==="list"?"var(--surface-elevated)":"var(--surface-base)",color:"var(--text-muted)",fontFamily:"var(--font-mono)"},children:"L"})]}),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 wb={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(110, 118, 129, 0.15)",color:"var(--text-muted)"},blocked:{bg:"rgba(244, 63, 94, 0.15)",color:"var(--status-blocked)"}},Sb={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 MM({tasks:t,selectedTaskId:r,onTaskClick:i,loading:l}){return l?x.jsx("div",{className:"flex items-center justify-center py-8",children:x.jsx("div",{className:"w-6 h-6 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-8",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:"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:"No tasks found"})]}):x.jsx("div",{className:"space-y-2",children:t.map(o=>{const u=r===o.id,c=wb[o.status]||wb.ready,f=Sb[o.priority]||Sb.later;return x.jsx("button",{onClick:()=>i(o.id),className:"w-full text-left px-3 py-2.5 rounded-lg transition-all duration-200 focus-ring",style:{background:u?"linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(167, 139, 250, 0.08))":"transparent",border:u?"1px solid var(--accent-cyan)":"1px solid transparent",boxShadow:u?"var(--glow-cyan)":"none"},children:x.jsxs("div",{className:"flex items-start justify-between gap-2",children:[x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"text-[10px] tabular-nums flex-shrink-0",style:{color:"var(--text-muted)",fontFamily:"var(--font-mono)"},children:o.id.slice(0,8)}),x.jsx("h3",{className:"text-sm font-medium truncate",style:{color:u?"var(--accent-cyan)":"var(--text-primary)"},children:o.title})]}),o.description&&x.jsx("p",{className:"text-xs mt-1 line-clamp-2",style:{color:"var(--text-muted)"},children:o.description})]}),x.jsxs("div",{className:"flex flex-col items-end gap-0.5 flex-shrink-0",children:[x.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] uppercase tracking-wide whitespace-nowrap",style:{background:c.bg,color:c.color,fontFamily:"var(--font-mono)"},children:o.status.replace("_"," ")}),x.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] uppercase tracking-wide whitespace-nowrap",style:{background:f.bg,color:f.color,fontFamily:"var(--font-mono)"},children:o.priority})]})]})},o.id)})})}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(110, 118, 129, 0.15)",color:"var(--text-muted)"},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 RM({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 qM({selectedStatus:t,selectedPriority:r,searchQuery:i,onStatusChange:l,onPriorityChange:o,onSearchChange:u}){const c=["all","ready","in_progress","in_review","completed","blocked"],f=["all","top","second","later"];return 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:g=>u(g.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:g=>l(g.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:c.map(g=>x.jsx("option",{value:g,children:g==="all"?"All Statuses":g.replace("_"," ")},g))}),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:g=>o(g.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(g=>x.jsx("option",{value:g,children:g==="all"?"All Priorities":g},g))}),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 OM({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(--text-muted)",boxShadow:"0 0 4px rgba(110, 118, 129, 0.4)"}}),x.jsx("span",{className:"tabular-nums",style:{color:"var(--text-muted)",fontFamily:"var(--font-mono)"},children:i.statusCounts.ready}),x.jsx("span",{style:{color:"var(--text-muted)",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 zM={value:()=>{}};function Ws(){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 Os(i)}function Os(t){this._=t}function DM(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}})}Os.prototype=Ws.prototype={constructor:Os,on:function(t,r){var i=this._,l=DM(t+"",i),o,u=-1,c=l.length;if(arguments.length<2){for(;++u<c;)if((o=(t=l[u]).type)&&(o=kM(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 Os(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 kM(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]=zM,t=t.slice(0,l).concat(t.slice(l+1));break}return i!=null&&t.push({name:r,value:i}),t}var Tp="http://www.w3.org/1999/xhtml";const Tb={svg:"http://www.w3.org/2000/svg",xhtml:Tp,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function eu(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 HM(t){return function(){var r=this.ownerDocument,i=this.namespaceURI;return i===Tp&&r.documentElement.namespaceURI===Tp?r.createElement(t):r.createElementNS(i,t)}}function LM(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function mC(t){var r=eu(t);return(r.local?LM:HM)(r)}function BM(){}function Yp(t){return t==null?BM:function(){return this.querySelector(t)}}function UM(t){typeof t!="function"&&(t=Yp(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,h,m=0;m<c;++m)(g=u[m])&&(h=t.call(g,g.__data__,m,u))&&("__data__"in g&&(h.__data__=g.__data__),f[m]=h);return new Ft(l,this._parents)}function GM(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function VM(){return[]}function pC(t){return t==null?VM:function(){return this.querySelectorAll(t)}}function YM(t){return function(){return GM(t.apply(this,arguments))}}function IM(t){typeof t=="function"?t=YM(t):t=pC(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,h=0;h<f;++h)(g=c[h])&&(l.push(t.call(g,g.__data__,h,c)),o.push(g));return new Ft(l,o)}function yC(t){return function(){return this.matches(t)}}function xC(t){return function(r){return r.matches(t)}}var XM=Array.prototype.find;function ZM(t){return function(){return XM.call(this.children,t)}}function FM(){return this.firstElementChild}function KM(t){return this.select(t==null?FM:ZM(typeof t=="function"?t:xC(t)))}var QM=Array.prototype.filter;function $M(){return Array.from(this.children)}function PM(t){return function(){return QM.call(this.children,t)}}function JM(t){return this.selectAll(t==null?$M:PM(typeof t=="function"?t:xC(t)))}function WM(t){typeof t!="function"&&(t=yC(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,h=0;h<c;++h)(g=u[h])&&t.call(g,g.__data__,h,u)&&f.push(g);return new Ft(l,this._parents)}function bC(t){return new Array(t.length)}function eR(){return new Ft(this._enter||this._groups.map(bC),this._parents)}function Ls(t,r){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=r}Ls.prototype={constructor:Ls,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 tR(t){return function(){return t}}function nR(t,r,i,l,o,u){for(var c=0,f,g=r.length,h=u.length;c<h;++c)(f=r[c])?(f.__data__=u[c],l[c]=f):i[c]=new Ls(t,u[c]);for(;c<g;++c)(f=r[c])&&(o[c]=f)}function rR(t,r,i,l,o,u,c){var f,g,h=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)+"",h.has(b)?o[f]=g:h.set(b,g));for(f=0;f<p;++f)b=c.call(t,u[f],f,u)+"",(g=h.get(b))?(l[f]=g,g.__data__=u[f],h.delete(b)):i[f]=new Ls(t,u[f]);for(f=0;f<m;++f)(g=r[f])&&h.get(y[f])===g&&(o[f]=g)}function aR(t){return t.__data__}function iR(t,r){if(!arguments.length)return Array.from(this,aR);var i=r?rR:nR,l=this._parents,o=this._groups;typeof t!="function"&&(t=tR(t));for(var u=o.length,c=new Array(u),f=new Array(u),g=new Array(u),h=0;h<u;++h){var m=l[h],p=o[h],y=p.length,b=lR(t.call(m,m&&m.__data__,h,l)),S=b.length,N=f[h]=new Array(S),E=c[h]=new Array(S),C=g[h]=new Array(y);i(m,p,N,E,C,b,r);for(var A=0,w=0,T,R;A<S;++A)if(T=N[A]){for(A>=w&&(w=A+1);!(R=E[w])&&++w<S;);T._next=R||null}}return c=new Ft(c,l),c._enter=f,c._exit=g,c}function lR(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function oR(){return new Ft(this._exit||this._groups.map(bC),this._parents)}function sR(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 uR(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 h=i[g],m=l[g],p=h.length,y=f[g]=new Array(p),b,S=0;S<p;++S)(b=h[S]||m[S])&&(y[S]=b);for(;g<o;++g)f[g]=i[g];return new Ft(f,this._parents)}function cR(){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 fR(t){t||(t=dR);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),h,m=0;m<f;++m)(h=c[m])&&(g[m]=h);g.sort(r)}return new Ft(o,this._parents).order()}function dR(t,r){return t<r?-1:t>r?1:t>=r?0:NaN}function hR(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function gR(){return Array.from(this)}function vR(){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 mR(){let t=0;for(const r of this)++t;return t}function pR(){return!this.node()}function yR(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 xR(t){return function(){this.removeAttribute(t)}}function bR(t){return function(){this.removeAttributeNS(t.space,t.local)}}function _R(t,r){return function(){this.setAttribute(t,r)}}function wR(t,r){return function(){this.setAttributeNS(t.space,t.local,r)}}function SR(t,r){return function(){var i=r.apply(this,arguments);i==null?this.removeAttribute(t):this.setAttribute(t,i)}}function ER(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 NR(t,r){var i=eu(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?bR:xR:typeof r=="function"?i.local?ER:SR:i.local?wR:_R)(i,r))}function _C(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function CR(t){return function(){this.style.removeProperty(t)}}function TR(t,r,i){return function(){this.style.setProperty(t,r,i)}}function AR(t,r,i){return function(){var l=r.apply(this,arguments);l==null?this.style.removeProperty(t):this.style.setProperty(t,l,i)}}function jR(t,r,i){return arguments.length>1?this.each((r==null?CR:typeof r=="function"?AR:TR)(t,r,i??"")):di(this.node(),t)}function di(t,r){return t.style.getPropertyValue(r)||_C(t).getComputedStyle(t,null).getPropertyValue(r)}function MR(t){return function(){delete this[t]}}function RR(t,r){return function(){this[t]=r}}function qR(t,r){return function(){var i=r.apply(this,arguments);i==null?delete this[t]:this[t]=i}}function OR(t,r){return arguments.length>1?this.each((r==null?MR:typeof r=="function"?qR:RR)(t,r)):this.node()[t]}function wC(t){return t.trim().split(/^|\s+/)}function Ip(t){return t.classList||new SC(t)}function SC(t){this._node=t,this._names=wC(t.getAttribute("class")||"")}SC.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 EC(t,r){for(var i=Ip(t),l=-1,o=r.length;++l<o;)i.add(r[l])}function NC(t,r){for(var i=Ip(t),l=-1,o=r.length;++l<o;)i.remove(r[l])}function zR(t){return function(){EC(this,t)}}function DR(t){return function(){NC(this,t)}}function kR(t,r){return function(){(r.apply(this,arguments)?EC:NC)(this,t)}}function HR(t,r){var i=wC(t+"");if(arguments.length<2){for(var l=Ip(this.node()),o=-1,u=i.length;++o<u;)if(!l.contains(i[o]))return!1;return!0}return this.each((typeof r=="function"?kR:r?zR:DR)(i,r))}function LR(){this.textContent=""}function BR(t){return function(){this.textContent=t}}function UR(t){return function(){var r=t.apply(this,arguments);this.textContent=r??""}}function GR(t){return arguments.length?this.each(t==null?LR:(typeof t=="function"?UR:BR)(t)):this.node().textContent}function VR(){this.innerHTML=""}function YR(t){return function(){this.innerHTML=t}}function IR(t){return function(){var r=t.apply(this,arguments);this.innerHTML=r??""}}function XR(t){return arguments.length?this.each(t==null?VR:(typeof t=="function"?IR:YR)(t)):this.node().innerHTML}function ZR(){this.nextSibling&&this.parentNode.appendChild(this)}function FR(){return this.each(ZR)}function KR(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function QR(){return this.each(KR)}function $R(t){var r=typeof t=="function"?t:mC(t);return this.select(function(){return this.appendChild(r.apply(this,arguments))})}function PR(){return null}function JR(t,r){var i=typeof t=="function"?t:mC(t),l=r==null?PR:typeof r=="function"?r:Yp(r);return this.select(function(){return this.insertBefore(i.apply(this,arguments),l.apply(this,arguments)||null)})}function WR(){var t=this.parentNode;t&&t.removeChild(this)}function eq(){return this.each(WR)}function tq(){var t=this.cloneNode(!1),r=this.parentNode;return r?r.insertBefore(t,this.nextSibling):t}function nq(){var t=this.cloneNode(!0),r=this.parentNode;return r?r.insertBefore(t,this.nextSibling):t}function rq(t){return this.select(t?nq:tq)}function aq(t){return arguments.length?this.property("__data__",t):this.node().__data__}function iq(t){return function(r){t.call(this,r,this.__data__)}}function lq(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 oq(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 sq(t,r,i){return function(){var l=this.__on,o,u=iq(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 uq(t,r,i){var l=lq(t+""),o,u=l.length,c;if(arguments.length<2){var f=this.node().__on;if(f){for(var g=0,h=f.length,m;g<h;++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?sq:oq,o=0;o<u;++o)this.each(f(l[o],r,i));return this}function CC(t,r,i){var l=_C(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 cq(t,r){return function(){return CC(this,t,r)}}function fq(t,r){return function(){return CC(this,t,r.apply(this,arguments))}}function dq(t,r){return this.each((typeof r=="function"?fq:cq)(t,r))}function*hq(){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 TC=[null];function Ft(t,r){this._groups=t,this._parents=r}function Gl(){return new Ft([[document.documentElement]],TC)}function gq(){return this}Ft.prototype=Gl.prototype={constructor:Ft,select:UM,selectAll:IM,selectChild:KM,selectChildren:JM,filter:WM,data:iR,enter:eR,exit:oR,join:sR,merge:uR,selection:gq,order:cR,sort:fR,call:hR,nodes:gR,node:vR,size:mR,empty:pR,each:yR,attr:NR,style:jR,property:OR,classed:HR,text:GR,html:XR,raise:FR,lower:QR,append:$R,insert:JR,remove:eq,clone:rq,datum:aq,on:uq,dispatch:dq,[Symbol.iterator]:hq};function Zt(t){return typeof t=="string"?new Ft([[document.querySelector(t)]],[document.documentElement]):new Ft([[t]],TC)}function vq(t){let r;for(;r=t.sourceEvent;)t=r;return t}function dn(t,r){if(t=vq(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 mq={passive:!1},Rl={capture:!0,passive:!1};function $f(t){t.stopImmediatePropagation()}function ci(t){t.preventDefault(),t.stopImmediatePropagation()}function AC(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 jC(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 Ap(t,{sourceEvent:r,subject:i,target:l,identifier:o,active:u,x:c,y:f,dx:g,dy:h,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:h,enumerable:!0,configurable:!0},_:{value:m}})}Ap.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function pq(t){return!t.ctrlKey&&!t.button}function yq(){return this.parentNode}function xq(t,r){return r??{x:t.x,y:t.y}}function bq(){return navigator.maxTouchPoints||"ontouchstart"in this}function MC(){var t=pq,r=yq,i=xq,l=bq,o={},u=Ws("start","drag","end"),c=0,f,g,h,m,p=0;function y(T){T.on("mousedown.drag",b).filter(l).on("touchstart.drag",E).on("touchmove.drag",C,mq).on("touchend.drag touchcancel.drag",A).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(T,R){if(!(m||!t.call(this,T,R))){var q=w(this,r.call(this,T,R),T,R,"mouse");q&&(Zt(T.view).on("mousemove.drag",S,Rl).on("mouseup.drag",N,Rl),AC(T.view),$f(T),h=!1,f=T.clientX,g=T.clientY,q("start",T))}}function S(T){if(ci(T),!h){var R=T.clientX-f,q=T.clientY-g;h=R*R+q*q>p}o.mouse("drag",T)}function N(T){Zt(T.view).on("mousemove.drag mouseup.drag",null),jC(T.view,h),ci(T),o.mouse("end",T)}function E(T,R){if(t.call(this,T,R)){var q=T.changedTouches,M=r.call(this,T,R),L=q.length,H,K;for(H=0;H<L;++H)(K=w(this,M,T,R,q[H].identifier,q[H]))&&($f(T),K("start",T,q[H]))}}function C(T){var R=T.changedTouches,q=R.length,M,L;for(M=0;M<q;++M)(L=o[R[M].identifier])&&(ci(T),L("drag",T,R[M]))}function A(T){var R=T.changedTouches,q=R.length,M,L;for(m&&clearTimeout(m),m=setTimeout(function(){m=null},500),M=0;M<q;++M)(L=o[R[M].identifier])&&($f(T),L("end",T,R[M]))}function w(T,R,q,M,L,H){var K=u.copy(),B=dn(H||q,R),F,J,k;if((k=i.call(T,new Ap("beforestart",{sourceEvent:q,target:y,identifier:L,active:c,x:B[0],y:B[1],dx:0,dy:0,dispatch:K}),M))!=null)return F=k.x-B[0]||0,J=k.y-B[1]||0,function Z(O,V,I){var P=B,le;switch(O){case"start":o[L]=Z,le=c++;break;case"end":delete o[L],--c;case"drag":B=dn(I||V,R),le=c;break}K.call(O,T,new Ap(O,{sourceEvent:V,subject:k,target:y,identifier:L,active:le,x:B[0]+F,y:B[1]+J,dx:B[0]-P[0],dy:B[1]-P[1],dispatch:K}),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 Xp(t,r,i){t.prototype=r.prototype=i,i.constructor=t}function RC(t,r){var i=Object.create(t.prototype);for(var l in r)i[l]=r[l];return i}function Vl(){}var ql=.7,Bs=1/ql,fi="\\s*([+-]?\\d+)\\s*",Ol="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Cn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",_q=/^#([0-9a-f]{3,8})$/,wq=new RegExp(`^rgb\\(${fi},${fi},${fi}\\)$`),Sq=new RegExp(`^rgb\\(${Cn},${Cn},${Cn}\\)$`),Eq=new RegExp(`^rgba\\(${fi},${fi},${fi},${Ol}\\)$`),Nq=new RegExp(`^rgba\\(${Cn},${Cn},${Cn},${Ol}\\)$`),Cq=new RegExp(`^hsl\\(${Ol},${Cn},${Cn}\\)$`),Tq=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};Xp(Vl,fa,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:jb,formatHex:jb,formatHex8:Aq,formatHsl:jq,formatRgb:Mb,toString:Mb});function jb(){return this.rgb().formatHex()}function Aq(){return this.rgb().formatHex8()}function jq(){return qC(this).formatHsl()}function Mb(){return this.rgb().formatRgb()}function fa(t){var r,i;return t=(t+"").trim().toLowerCase(),(r=_q.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=wq.exec(t))?new zt(r[1],r[2],r[3],1):(r=Sq.exec(t))?new zt(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=Eq.exec(t))?Es(r[1],r[2],r[3],r[4]):(r=Nq.exec(t))?Es(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=Cq.exec(t))?zb(r[1],r[2]/100,r[3]/100,1):(r=Tq.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 Mq(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 jp(t,r,i,l){return arguments.length===1?Mq(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}Xp(zt,jp,RC(Vl,{brighter(t){return t=t==null?Bs:Math.pow(Bs,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),Us(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:Rq,formatRgb:Ob,toString:Ob}));function qb(){return`#${sa(this.r)}${sa(this.g)}${sa(this.b)}`}function Rq(){return`#${sa(this.r)}${sa(this.g)}${sa(this.b)}${sa((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ob(){const t=Us(this.opacity);return`${t===1?"rgb(":"rgba("}${ua(this.r)}, ${ua(this.g)}, ${ua(this.b)}${t===1?")":`, ${t})`}`}function Us(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 qC(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 qq(t,r,i,l){return arguments.length===1?qC(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}Xp(hn,qq,RC(Vl,{brighter(t){return t=t==null?Bs:Math.pow(Bs,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(Pf(t>=240?t-240:t+120,o,l),Pf(t,o,l),Pf(t<120?t+240:t-120,o,l),this.opacity)},clamp(){return new hn(Db(this.h),Ns(this.s),Ns(this.l),Us(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=Us(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 Pf(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 Zp=t=>()=>t;function Oq(t,r){return function(i){return t+i*r}}function zq(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 Dq(t){return(t=+t)==1?OC:function(r,i){return i-r?zq(r,i,t):Zp(isNaN(r)?i:r)}}function OC(t,r){var i=r-t;return i?Oq(t,i):Zp(isNaN(t)?r:t)}const Gs=(function t(r){var i=Dq(r);function l(o,u){var c=i((o=jp(o)).r,(u=jp(u)).r),f=i(o.g,u.g),g=i(o.b,u.b),h=OC(o.opacity,u.opacity);return function(m){return o.r=c(m),o.g=f(m),o.b=g(m),o.opacity=h(m),o+""}}return l.gamma=t,l})(1);function kq(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 Hq(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Lq(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 Bq(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 Uq(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 Mp=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Jf=new RegExp(Mp.source,"g");function Gq(t){return function(){return t}}function Vq(t){return function(r){return t(r)+""}}function zC(t,r){var i=Mp.lastIndex=Jf.lastIndex=0,l,o,u,c=-1,f=[],g=[];for(t=t+"",r=r+"";(l=Mp.exec(t))&&(o=Jf.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=Jf.lastIndex;return i<r.length&&(u=r.slice(i),f[c]?f[c]+=u:f[++c]=u),f.length<2?g[0]?Vq(g[0].x):Gq(r):(r=g.length,function(h){for(var m=0,p;m<r;++m)f[(p=g[m]).i]=p.x(h);return f.join("")})}function jl(t,r){var i=typeof r,l;return r==null||i==="boolean"?Zp(r):(i==="number"?Nn:i==="string"?(l=fa(r))?(r=l,Gs):zC:r instanceof fa?Gs:r instanceof Date?Bq:Hq(r)?kq:Array.isArray(r)?Lq:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?Uq:Nn)(t,r)}var kb=180/Math.PI,Rp={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function DC(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 Yq(t){const r=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return r.isIdentity?Rp:DC(r.a,r.b,r.c,r.d,r.e,r.f)}function Iq(t){return t==null||(Cs||(Cs=document.createElementNS("http://www.w3.org/2000/svg","g")),Cs.setAttribute("transform",t),!(t=Cs.transform.baseVal.consolidate()))?Rp:(t=t.matrix,DC(t.a,t.b,t.c,t.d,t.e,t.f))}function kC(t,r,i,l){function o(h){return h.length?h.pop()+" ":""}function u(h,m,p,y,b,S){if(h!==p||m!==y){var N=b.push("translate(",null,r,null,i);S.push({i:N-4,x:Nn(h,p)},{i:N-2,x:Nn(m,y)})}else(p||y)&&b.push("translate("+p+r+y+i)}function c(h,m,p,y){h!==m?(h-m>180?m+=360:m-h>180&&(h+=360),y.push({i:p.push(o(p)+"rotate(",null,l)-2,x:Nn(h,m)})):m&&p.push(o(p)+"rotate("+m+l)}function f(h,m,p,y){h!==m?y.push({i:p.push(o(p)+"skewX(",null,l)-2,x:Nn(h,m)}):m&&p.push(o(p)+"skewX("+m+l)}function g(h,m,p,y,b,S){if(h!==p||m!==y){var N=b.push(o(b)+"scale(",null,",",null,")");S.push({i:N-4,x:Nn(h,p)},{i:N-2,x:Nn(m,y)})}else(p!==1||y!==1)&&b.push(o(b)+"scale("+p+","+y+")")}return function(h,m){var p=[],y=[];return h=t(h),m=t(m),u(h.translateX,h.translateY,m.translateX,m.translateY,p,y),c(h.rotate,m.rotate,p,y),f(h.skewX,m.skewX,p,y),g(h.scaleX,h.scaleY,m.scaleX,m.scaleY,p,y),h=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 Xq=kC(Yq,"px, ","px)","deg)"),Zq=kC(Iq,", ",")",")"),Fq=1e-12;function Hb(t){return((t=Math.exp(t))+1/t)/2}function Kq(t){return((t=Math.exp(t))-1/t)/2}function Qq(t){return((t=Math.exp(2*t))-1)/(t+1)}const zs=(function t(r,i,l){function o(u,c){var f=u[0],g=u[1],h=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<Fq)C=Math.log(y/h)/r,E=function(M){return[f+M*b,g+M*S,h*Math.exp(r*M*C)]};else{var A=Math.sqrt(N),w=(y*y-h*h+l*N)/(2*h*i*A),T=(y*y-h*h-l*N)/(2*y*i*A),R=Math.log(Math.sqrt(w*w+1)-w),q=Math.log(Math.sqrt(T*T+1)-T);C=(q-R)/r,E=function(M){var L=M*C,H=Hb(R),K=h/(i*A)*(H*Qq(r*L+R)-Kq(R));return[f+K*b,g+K*S,h*H/Hb(r*L+R)]}}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,HC=1e3,Vs,Nl,Ys=0,da=0,tu=0,zl=typeof performance=="object"&&performance.now?performance:Date,LC=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Fp(){return da||(LC($q),da=zl.now()+tu)}function $q(){da=0}function Is(){this._call=this._time=this._next=null}Is.prototype=BC.prototype={constructor:Is,restart:function(t,r,i){if(typeof t!="function")throw new TypeError("callback is not a function");i=(i==null?Fp():+i)+(r==null?0:+r),!this._next&&Nl!==this&&(Nl?Nl._next=this:Vs=this,Nl=this),this._call=t,this._time=i,qp()},stop:function(){this._call&&(this._call=null,this._time=1/0,qp())}};function BC(t,r,i){var l=new Is;return l.restart(t,r,i),l}function Pq(){Fp(),++hi;for(var t=Vs,r;t;)(r=da-t._time)>=0&&t._call.call(void 0,r),t=t._next;--hi}function Lb(){da=(Ys=zl.now())+tu,hi=El=0;try{Pq()}finally{hi=0,Wq(),da=0}}function Jq(){var t=zl.now(),r=t-Ys;r>HC&&(tu-=r,Ys=t)}function Wq(){for(var t,r=Vs,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:Vs=i);Nl=t,qp(l)}function qp(t){if(!hi){El&&(El=clearTimeout(El));var r=t-da;r>24?(t<1/0&&(El=setTimeout(Lb,t-zl.now()-tu)),_l&&(_l=clearInterval(_l))):(_l||(Ys=zl.now(),_l=setInterval(Jq,HC)),hi=1,LC(Lb))}}function Bb(t,r,i){var l=new Is;return r=r==null?0:+r,l.restart(o=>{l.stop(),t(o+r)},r,i),l}var e4=Ws("start","end","cancel","interrupt"),t4=[],UC=0,Ub=1,Op=2,Ds=3,Gb=4,zp=5,ks=6;function nu(t,r,i,l,o,u){var c=t.__transition;if(!c)t.__transition={};else if(i in c)return;n4(t,i,{name:r,index:l,group:o,on:e4,tween:t4,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:UC})}function Kp(t,r){var i=pn(t,r);if(i.state>UC)throw new Error("too late; already scheduled");return i}function An(t,r){var i=pn(t,r);if(i.state>Ds)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 n4(t,r,i){var l=t.__transition,o;l[r]=i,i.timer=BC(u,0,i.time);function u(h){i.state=Ub,i.timer.restart(c,i.delay,i.time),i.delay<=h&&c(h-i.delay)}function c(h){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===Ds)return Bb(c);b.state===Gb?(b.state=ks,b.timer.stop(),b.on.call("interrupt",t,t.__data__,b.index,b.group),delete l[m]):+m<r&&(b.state=ks,b.timer.stop(),b.on.call("cancel",t,t.__data__,b.index,b.group),delete l[m])}if(Bb(function(){i.state===Ds&&(i.state=Gb,i.timer.restart(f,i.delay,i.time),f(h))}),i.state=Op,i.on.call("start",t,t.__data__,i.index,i.group),i.state===Op){for(i.state=Ds,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(h){for(var m=h<i.duration?i.ease.call(null,h/i.duration):(i.timer.restart(g),i.state=zp,1),p=-1,y=o.length;++p<y;)o[p].call(t,m);i.state===zp&&(i.on.call("end",t,t.__data__,i.index,i.group),g())}function g(){i.state=ks,i.timer.stop(),delete l[r];for(var h in l)return;delete t.__transition}}function Hs(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>Op&&l.state<zp,l.state=ks,l.timer.stop(),l.on.call(o?"interrupt":"cancel",t,t.__data__,l.index,l.group),delete i[c]}u&&delete t.__transition}}function r4(t){return this.each(function(){Hs(this,t)})}function a4(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 i4(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,h=o.length;g<h;++g)if(o[g].name===r){o[g]=f;break}g===h&&o.push(f)}u.tween=o}}function l4(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?a4:i4)(i,t,r))}function Qp(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 GC(t,r){var i;return(typeof r=="number"?Nn:r instanceof fa?Gs:(i=fa(r))?(r=i,Gs):zC)(t,r)}function o4(t){return function(){this.removeAttribute(t)}}function s4(t){return function(){this.removeAttributeNS(t.space,t.local)}}function u4(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 c4(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 f4(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 d4(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 h4(t,r){var i=eu(t),l=i==="transform"?Zq:GC;return this.attrTween(t,typeof r=="function"?(i.local?d4:f4)(i,l,Qp(this,"attr."+t,r)):r==null?(i.local?s4:o4)(i):(i.local?c4:u4)(i,l,r))}function g4(t,r){return function(i){this.setAttribute(t,r.call(this,i))}}function v4(t,r){return function(i){this.setAttributeNS(t.space,t.local,r.call(this,i))}}function m4(t,r){var i,l;function o(){var u=r.apply(this,arguments);return u!==l&&(i=(l=u)&&v4(t,u)),i}return o._value=r,o}function p4(t,r){var i,l;function o(){var u=r.apply(this,arguments);return u!==l&&(i=(l=u)&&g4(t,u)),i}return o._value=r,o}function y4(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=eu(t);return this.tween(i,(l.local?m4:p4)(l,r))}function x4(t,r){return function(){Kp(this,t).delay=+r.apply(this,arguments)}}function b4(t,r){return r=+r,function(){Kp(this,t).delay=r}}function _4(t){var r=this._id;return arguments.length?this.each((typeof t=="function"?x4:b4)(r,t)):pn(this.node(),r).delay}function w4(t,r){return function(){An(this,t).duration=+r.apply(this,arguments)}}function S4(t,r){return r=+r,function(){An(this,t).duration=r}}function E4(t){var r=this._id;return arguments.length?this.each((typeof t=="function"?w4:S4)(r,t)):pn(this.node(),r).duration}function N4(t,r){if(typeof r!="function")throw new Error;return function(){An(this,t).ease=r}}function C4(t){var r=this._id;return arguments.length?this.each(N4(r,t)):pn(this.node(),r).ease}function T4(t,r){return function(){var i=r.apply(this,arguments);if(typeof i!="function")throw new Error;An(this,t).ease=i}}function A4(t){if(typeof t!="function")throw new Error;return this.each(T4(this._id,t))}function j4(t){typeof t!="function"&&(t=yC(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,h=0;h<c;++h)(g=u[h])&&t.call(g,g.__data__,h,u)&&f.push(g);return new nr(l,this._parents,this._name,this._id)}function M4(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],h=i[f],m=g.length,p=c[f]=new Array(m),y,b=0;b<m;++b)(y=g[b]||h[b])&&(p[b]=y);for(;f<l;++f)c[f]=r[f];return new nr(c,this._parents,this._name,this._id)}function R4(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 q4(t,r,i){var l,o,u=R4(r)?Kp:An;return function(){var c=u(this,t),f=c.on;f!==l&&(o=(l=f).copy()).on(r,i),c.on=o}}function O4(t,r){var i=this._id;return arguments.length<2?pn(this.node(),i).on.on(t):this.each(q4(i,t,r))}function z4(t){return function(){var r=this.parentNode;for(var i in this.__transition)if(+i!==t)return;r&&r.removeChild(this)}}function D4(){return this.on("end.remove",z4(this._id))}function k4(t){var r=this._name,i=this._id;typeof t!="function"&&(t=Yp(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,h=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__),h[y]=p,nu(h[y],r,i,y,h,pn(m,i)));return new nr(u,this._parents,r,i)}function H4(t){var r=this._name,i=this._id;typeof t!="function"&&(t=pC(t));for(var l=this._groups,o=l.length,u=[],c=[],f=0;f<o;++f)for(var g=l[f],h=g.length,m,p=0;p<h;++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])&&nu(b,r,i,N,y,S);u.push(y),c.push(m)}return new nr(u,c,r,i)}var L4=Gl.prototype.constructor;function B4(){return new L4(this._groups,this._parents)}function U4(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 VC(t){return function(){this.style.removeProperty(t)}}function G4(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 V4(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 Y4(t,r){var i,l,o,u="style."+r,c="end."+u,f;return function(){var g=An(this,t),h=g.on,m=g.value[u]==null?f||(f=VC(r)):void 0;(h!==i||o!==m)&&(l=(i=h).copy()).on(c,o=m),g.on=l}}function I4(t,r,i){var l=(t+="")=="transform"?Xq:GC;return r==null?this.styleTween(t,U4(t,l)).on("end.style."+t,VC(t)):typeof r=="function"?this.styleTween(t,V4(t,l,Qp(this,"style."+t,r))).each(Y4(this._id,t)):this.styleTween(t,G4(t,l,r),i).on("end.style."+t,null)}function X4(t,r,i){return function(l){this.style.setProperty(t,r.call(this,l),i)}}function Z4(t,r,i){var l,o;function u(){var c=r.apply(this,arguments);return c!==o&&(l=(o=c)&&X4(t,c,i)),l}return u._value=r,u}function F4(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,Z4(t,r,i??""))}function K4(t){return function(){this.textContent=t}}function Q4(t){return function(){var r=t(this);this.textContent=r??""}}function $4(t){return this.tween("text",typeof t=="function"?Q4(Qp(this,"text",t)):K4(t==null?"":t+""))}function P4(t){return function(r){this.textContent=t.call(this,r)}}function J4(t){var r,i;function l(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&P4(o)),r}return l._value=t,l}function W4(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,J4(t))}function eO(){for(var t=this._name,r=this._id,i=YC(),l=this._groups,o=l.length,u=0;u<o;++u)for(var c=l[u],f=c.length,g,h=0;h<f;++h)if(g=c[h]){var m=pn(g,r);nu(g,t,i,h,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 tO(){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 h=An(this,l),m=h.on;m!==t&&(r=(t=m).copy(),r._.cancel.push(f),r._.interrupt.push(f),r._.end.push(g)),h.on=r}),o===0&&u()})}var nO=0;function nr(t,r,i,l){this._groups=t,this._parents=r,this._name=i,this._id=l}function YC(){return++nO}var Wn=Gl.prototype;nr.prototype={constructor:nr,select:k4,selectAll:H4,selectChild:Wn.selectChild,selectChildren:Wn.selectChildren,filter:j4,merge:M4,selection:B4,transition:eO,call:Wn.call,nodes:Wn.nodes,node:Wn.node,size:Wn.size,empty:Wn.empty,each:Wn.each,on:O4,attr:h4,attrTween:y4,style:I4,styleTween:F4,text:$4,textTween:W4,remove:D4,tween:l4,delay:_4,duration:E4,ease:C4,easeVarying:A4,end:tO,[Symbol.iterator]:Wn[Symbol.iterator]};function rO(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var aO={time:null,delay:0,duration:250,ease:rO};function iO(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 lO(t){var r,i;t instanceof nr?(r=t._id,t=t._name):(r=YC(),(i=aO).time=Fp(),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,h=0;h<f;++h)(g=c[h])&&nu(g,t,r,h,c,i||iO(g,r));return new nr(l,this._parents,t,r)}Gl.prototype.interrupt=r4;Gl.prototype.transition=lO;const Ts=t=>()=>t;function oO(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 ru=new er(1,0,0);IC.prototype=er.prototype;function IC(t){for(;!t.__zoom;)if(!(t=t.parentNode))return ru;return t.__zoom}function Wf(t){t.stopImmediatePropagation()}function wl(t){t.preventDefault(),t.stopImmediatePropagation()}function sO(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function uO(){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||ru}function cO(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function fO(){return navigator.maxTouchPoints||"ontouchstart"in this}function dO(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 XC(){var t=sO,r=uO,i=dO,l=cO,o=fO,u=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],f=250,g=zs,h=Ws("start","zoom","end"),m,p,y,b=500,S=150,N=0,E=10;function C(k){k.property("__zoom",Vb).on("wheel.zoom",L,{passive:!1}).on("mousedown.zoom",H).on("dblclick.zoom",K).filter(o).on("touchstart.zoom",B).on("touchmove.zoom",F).on("touchend.zoom touchcancel.zoom",J).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}C.transform=function(k,Z,O,V){var I=k.selection?k.selection():k;I.property("__zoom",Vb),k!==I?R(k,Z,O,V):I.interrupt().each(function(){q(this,arguments).event(V).start().zoom(null,typeof Z=="function"?Z.apply(this,arguments):Z).end()})},C.scaleBy=function(k,Z,O,V){C.scaleTo(k,function(){var I=this.__zoom.k,P=typeof Z=="function"?Z.apply(this,arguments):Z;return I*P},O,V)},C.scaleTo=function(k,Z,O,V){C.transform(k,function(){var I=r.apply(this,arguments),P=this.__zoom,le=O==null?T(I):typeof O=="function"?O.apply(this,arguments):O,z=P.invert(le),Y=typeof Z=="function"?Z.apply(this,arguments):Z;return i(w(A(P,Y),le,z),I,c)},O,V)},C.translateBy=function(k,Z,O,V){C.transform(k,function(){return i(this.__zoom.translate(typeof Z=="function"?Z.apply(this,arguments):Z,typeof O=="function"?O.apply(this,arguments):O),r.apply(this,arguments),c)},null,V)},C.translateTo=function(k,Z,O,V,I){C.transform(k,function(){var P=r.apply(this,arguments),le=this.__zoom,z=V==null?T(P):typeof V=="function"?V.apply(this,arguments):V;return i(ru.translate(z[0],z[1]).scale(le.k).translate(typeof Z=="function"?-Z.apply(this,arguments):-Z,typeof O=="function"?-O.apply(this,arguments):-O),P,c)},V,I)};function A(k,Z){return Z=Math.max(u[0],Math.min(u[1],Z)),Z===k.k?k:new er(Z,k.x,k.y)}function w(k,Z,O){var V=Z[0]-O[0]*k.k,I=Z[1]-O[1]*k.k;return V===k.x&&I===k.y?k:new er(k.k,V,I)}function T(k){return[(+k[0][0]+ +k[1][0])/2,(+k[0][1]+ +k[1][1])/2]}function R(k,Z,O,V){k.on("start.zoom",function(){q(this,arguments).event(V).start()}).on("interrupt.zoom end.zoom",function(){q(this,arguments).event(V).end()}).tween("zoom",function(){var I=this,P=arguments,le=q(I,P).event(V),z=r.apply(I,P),Y=O==null?T(z):typeof O=="function"?O.apply(I,P):O,ae=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),D=I.__zoom,U=typeof Z=="function"?Z.apply(I,P):Z,$=g(D.invert(Y).concat(ae/D.k),U.invert(Y).concat(ae/U.k));return function(re){if(re===1)re=U;else{var oe=$(re),fe=ae/oe[2];re=new er(fe,Y[0]-oe[0]*fe,Y[1]-oe[1]*fe)}le.zoom(null,re)}})}function q(k,Z,O){return!O&&k.__zooming||new M(k,Z)}function M(k,Z){this.that=k,this.args=Z,this.active=0,this.sourceEvent=null,this.extent=r.apply(k,Z),this.taps=0}M.prototype={event:function(k){return k&&(this.sourceEvent=k),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(k,Z){return this.mouse&&k!=="mouse"&&(this.mouse[1]=Z.invert(this.mouse[0])),this.touch0&&k!=="touch"&&(this.touch0[1]=Z.invert(this.touch0[0])),this.touch1&&k!=="touch"&&(this.touch1[1]=Z.invert(this.touch1[0])),this.that.__zoom=Z,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(k){var Z=Zt(this.that).datum();h.call(k,this.that,new oO(k,{sourceEvent:this.sourceEvent,target:C,transform:this.that.__zoom,dispatch:h}),Z)}};function L(k,...Z){if(!t.apply(this,arguments))return;var O=q(this,Z).event(k),V=this.__zoom,I=Math.max(u[0],Math.min(u[1],V.k*Math.pow(2,l.apply(this,arguments)))),P=dn(k);if(O.wheel)(O.mouse[0][0]!==P[0]||O.mouse[0][1]!==P[1])&&(O.mouse[1]=V.invert(O.mouse[0]=P)),clearTimeout(O.wheel);else{if(V.k===I)return;O.mouse=[P,V.invert(P)],Hs(this),O.start()}wl(k),O.wheel=setTimeout(le,S),O.zoom("mouse",i(w(A(V,I),O.mouse[0],O.mouse[1]),O.extent,c));function le(){O.wheel=null,O.end()}}function H(k,...Z){if(y||!t.apply(this,arguments))return;var O=k.currentTarget,V=q(this,Z,!0).event(k),I=Zt(k.view).on("mousemove.zoom",Y,!0).on("mouseup.zoom",ae,!0),P=dn(k,O),le=k.clientX,z=k.clientY;AC(k.view),Wf(k),V.mouse=[P,this.__zoom.invert(P)],Hs(this),V.start();function Y(D){if(wl(D),!V.moved){var U=D.clientX-le,$=D.clientY-z;V.moved=U*U+$*$>N}V.event(D).zoom("mouse",i(w(V.that.__zoom,V.mouse[0]=dn(D,O),V.mouse[1]),V.extent,c))}function ae(D){I.on("mousemove.zoom mouseup.zoom",null),jC(D.view,V.moved),wl(D),V.event(D).end()}}function K(k,...Z){if(t.apply(this,arguments)){var O=this.__zoom,V=dn(k.changedTouches?k.changedTouches[0]:k,this),I=O.invert(V),P=O.k*(k.shiftKey?.5:2),le=i(w(A(O,P),V,I),r.apply(this,Z),c);wl(k),f>0?Zt(this).transition().duration(f).call(R,le,V,k):Zt(this).call(C.transform,le,V,k)}}function B(k,...Z){if(t.apply(this,arguments)){var O=k.touches,V=O.length,I=q(this,Z,k.changedTouches.length===V).event(k),P,le,z,Y;for(Wf(k),le=0;le<V;++le)z=O[le],Y=dn(z,this),Y=[Y,this.__zoom.invert(Y),z.identifier],I.touch0?!I.touch1&&I.touch0[2]!==Y[2]&&(I.touch1=Y,I.taps=0):(I.touch0=Y,P=!0,I.taps=1+!!m);m&&(m=clearTimeout(m)),P&&(I.taps<2&&(p=Y[0],m=setTimeout(function(){m=null},b)),Hs(this),I.start())}}function F(k,...Z){if(this.__zooming){var O=q(this,Z).event(k),V=k.changedTouches,I=V.length,P,le,z,Y;for(wl(k),P=0;P<I;++P)le=V[P],z=dn(le,this),O.touch0&&O.touch0[2]===le.identifier?O.touch0[0]=z:O.touch1&&O.touch1[2]===le.identifier&&(O.touch1[0]=z);if(le=O.that.__zoom,O.touch1){var ae=O.touch0[0],D=O.touch0[1],U=O.touch1[0],$=O.touch1[1],re=(re=U[0]-ae[0])*re+(re=U[1]-ae[1])*re,oe=(oe=$[0]-D[0])*oe+(oe=$[1]-D[1])*oe;le=A(le,Math.sqrt(re/oe)),z=[(ae[0]+U[0])/2,(ae[1]+U[1])/2],Y=[(D[0]+$[0])/2,(D[1]+$[1])/2]}else if(O.touch0)z=O.touch0[0],Y=O.touch0[1];else return;O.zoom("touch",i(w(le,z,Y),O.extent,c))}}function J(k,...Z){if(this.__zooming){var O=q(this,Z).event(k),V=k.changedTouches,I=V.length,P,le;for(Wf(k),y&&clearTimeout(y),y=setTimeout(function(){y=null},b),P=0;P<I;++P)le=V[P],O.touch0&&O.touch0[2]===le.identifier?delete O.touch0:O.touch1&&O.touch1[2]===le.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&&(le=dn(le,this),Math.hypot(p[0]-le[0],p[1]-le[1])<E)){var z=Zt(this).on("dblclick.zoom");z&&z.apply(this,arguments)}}}return C.wheelDelta=function(k){return arguments.length?(l=typeof k=="function"?k:Ts(+k),C):l},C.filter=function(k){return arguments.length?(t=typeof k=="function"?k:Ts(!!k),C):t},C.touchable=function(k){return arguments.length?(o=typeof k=="function"?k:Ts(!!k),C):o},C.extent=function(k){return arguments.length?(r=typeof k=="function"?k:Ts([[+k[0][0],+k[0][1]],[+k[1][0],+k[1][1]]]),C):r},C.scaleExtent=function(k){return arguments.length?(u[0]=+k[0],u[1]=+k[1],C):[u[0],u[1]]},C.translateExtent=function(k){return arguments.length?(c[0][0]=+k[0][0],c[1][0]=+k[1][0],c[0][1]=+k[0][1],c[1][1]=+k[1][1],C):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},C.constrain=function(k){return arguments.length?(i=k,C):i},C.duration=function(k){return arguments.length?(f=+k,C):f},C.interpolate=function(k){return arguments.length?(g=k,C):g},C.on=function(){var k=h.on.apply(h,arguments);return k===h?C:k},C.clickDistance=function(k){return arguments.length?(N=(k=+k)*k,C):Math.sqrt(N)},C.tapDistance=function(k){return arguments.length?(E=+k,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]],ZC=["Enter"," ","Escape"],FC={"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 KC={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 Xs;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(Xs||(Xs={}));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 QC(t){return t===null?null:t?"valid":"invalid"}const $C=t=>"id"in t&&"source"in t&&"target"in t,hO=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),$p=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}},gO=(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):$p(o)?o:r.nodeLookup.get(o.id));const f=c?Zs(c,r.nodeOrigin):{x:0,y:0,x2:0,y2:0};return au(l,f)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return iu(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=au(i,Zs(o)),l=!0)}),l?iu(i):{x:0,y:0,width:0,height:0}},Pp=(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 h of t.values()){const{measured:m,selectable:p=!0,hidden:y=!1}=h;if(c&&!p||y)continue;const b=m.width??h.width??h.initialWidth??null,S=m.height??h.height??h.initialHeight??null,N=Hl(f,mi(h)),E=(b??0)*(S??0),C=u&&N>0;(!h.internals.handleBounds||C||N>=E||h.dragging)&&g.push(h)}return g},vO=(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 mO(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 pO({nodes:t,width:r,height:i,panZoom:l,minZoom:o,maxZoom:u},c){if(t.size===0)return Promise.resolve(!0);const f=mO(t,c),g=Il(f),h=Jp(g,r,i,c?.minZoom??o,c?.maxZoom??u,c?.padding??.1);return await l.setViewport(h,{duration:c?.duration,ease:c?.ease,interpolate:c?.interpolate}),Promise.resolve(!0)}function PC({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:h}=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,h],[g+b,h+S]])}else f&&pi(c.extent)&&(p=[[c.extent[0][0]+g,c.extent[0][1]+h],[c.extent[1][0]+g,c.extent[1][1]+h]]);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-h+(c.measured.height??0)*m[1]},positionAbsolute:y}}async function yO({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=vO(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 JC(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,WC=(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]},au=(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)}),Dp=({x:t,y:r,width:i,height:l})=>({x:t,y:r,x2:t+i,y2:r+l}),iu=({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}=$p(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}},Zs=(t,r=[0,0])=>{const{x:i,y:l}=$p(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)}},eT=(t,r)=>iu(au(Dp(t),Dp(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),xO=(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},Fs=({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 bO(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 _O(t,r,i,l,o,u){const{x:c,y:f}=Fs(t,[r,i,l]),{x:g,y:h}=Fs({x:t.x+t.width,y:t.y+t.height},[r,i,l]),m=o-g,p=u-h;return{left:Math.floor(c),top:Math.floor(f),right:Math.floor(m),bottom:Math.floor(p)}}const Jp=(t,r,i,l,o,u)=>{const c=bO(u,r,i),f=(r-c.x)/t.width,g=(i-c.y)/t.height,h=Math.min(f,g),m=vi(h,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=_O(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 tT(t){return(t.measured?.width??t.width??t.initialWidth)!==void 0&&(t.measured?.height??t.height??t.initialHeight)!==void 0}function nT(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 wO(){let t,r;return{promise:new Promise((l,o)=>{t=l,r=o}),resolve:t,reject:r}}function SO(t){return{...FC,...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:h}=i?Xl(f,r):f;return{xSnapped:g,ySnapped:h,...f}}const Wp=t=>({width:t.offsetWidth,height:t.offsetHeight}),rT=t=>t?.getRootNode?.()||window?.document,EO=["INPUT","SELECT","TEXTAREA"];function aT(t){const r=t.composedPath?.()?.[0]||t.target;return r?.nodeType!==1?!1:EO.includes(r.nodeName)||r.hasAttribute("contenteditable")||!!r.closest(".nokey")}const iT=t=>"clientX"in t,vn=(t,r)=>{const i=iT(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,...Wp(c)}})};function lT({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,h=r*.125+u*.375+f*.375+l*.125,m=Math.abs(g-t),p=Math.abs(h-r);return[g,h,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 oT({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}),[h,m]=Kb({pos:u,x1:l,y1:o,x2:t,y2:r,c}),[p,y,b,S]=lT({sourceX:t,sourceY:r,targetX:l,targetY:o,sourceControlX:f,sourceControlY:g,targetControlX:h,targetControlY:m});return[`M${t},${r} C${f},${g} ${h},${m} ${l},${o}`,p,y,b,S]}function sT({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 NO({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 CO({sourceNode:t,targetNode:r,width:i,height:l,transform:o}){const u=au(Zs(t),Zs(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,iu(u))>0}const TO=({source:t,sourceHandle:r,target:i,targetHandle:l})=>`xy-edge__${t}${r||""}-${i}${l||""}`,AO=(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)),uT=(t,r,i={})=>{if(!t.source||!t.target)return r;const l=i.getEdgeId||TO;let o;return $C(t)?o={...t}:o={...t,id:l(t)},AO(o,r)?r:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,r.concat(o))};function cT({sourceX:t,sourceY:r,targetX:i,targetY:l}){const[o,u,c,f]=sT({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}},jO=({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 MO({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],h={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=jO({source:h,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]=sT({sourceX:t.x,sourceY:t.y,targetX:i.x,targetY:i.y});if(f[y]*g[y]===-1){y==="x"?(N=o.x??h.x+(m.x-h.x)*c,E=o.y??(h.y+m.y)/2):(N=o.x??(h.x+m.x)/2,E=o.y??h.y+(m.y-h.y)*c);const q=[{x:N,y:h.y},{x:N,y:m.y}],M=[{x:h.x,y:E},{x:m.x,y:E}];f[y]===b?S=y==="x"?q:M:S=y==="x"?M:q}else{const q=[{x:h.x,y:m.y}],M=[{x:m.x,y:h.y}];if(y==="x"?S=f.x===b?M:q:S=f.y===b?q:M,r===l){const F=Math.abs(t[y]-i[y]);if(F<=u){const J=Math.min(u-1,u-F);f[y]===b?C[y]=(h[y]>t[y]?-1:1)*J:A[y]=(m[y]>i[y]?-1:1)*J}}if(r!==l){const F=y==="x"?"y":"x",J=f[y]===g[F],k=h[F]>m[F],Z=h[F]<m[F];(f[y]===1&&(!J&&k||J&&Z)||f[y]!==1&&(!J&&Z||J&&k))&&(S=y==="x"?q:M)}const L={x:h.x+C.x,y:h.y+C.y},H={x:m.x+A.x,y:m.y+A.y},K=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));K>=B?(N=(L.x+H.x)/2,E=S[0].y):(N=S[0].x,E=(L.y+H.y)/2)}return[[t,{x:h.x+C.x,y:h.y+C.y},...S,{x:m.x+A.x,y:m.y+A.y},i],N,E,w,T]}function RO(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 h=t.x<i.x?-1:1,m=t.y<i.y?1:-1;return`L ${u+o*h},${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 kp({sourceX:t,sourceY:r,sourcePosition:i=pe.Bottom,targetX:l,targetY:o,targetPosition:u=pe.Top,borderRadius:c=5,centerX:f,centerY:g,offset:h=20,stepPosition:m=.5}){const[p,y,b,S,N]=MO({source:{x:t,y:r},sourcePosition:i,target:{x:l,y:o},targetPosition:u,center:{x:f,y:g},offset:h,stepPosition:m});return[p.reduce((C,A,w)=>{let T="";return w>0&&w<p.length-1?T=RO(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 qO(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,h=ga(r,u,f),m=ga(i,c,g);return{sourceX:h.x,sourceY:h.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 Hp(t,r){return t?typeof t=="string"?t:`${r?`${r}__`:""}${Object.keys(t).sort().map(l=>`${l}=${t[l]}`).join("&")}`:""}function OO(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 h=Hp(g,r);u.has(h)||(c.push({id:h,color:g.color||i,...g}),u.add(h))}}),c),[]).sort((c,f)=>c.id.localeCompare(f.id))}const fT=1e3,zO=10,ey={nodeOrigin:[0,0],nodeExtent:Dl,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},DO={...ey,checkEquality:!0};function ty(t,r){const i={...t};for(const l in r)r[l]!==void 0&&(i[l]=r[l]);return i}function kO(t,r,i){const l=ty(ey,i);for(const o of t.values())if(o.parentId)ry(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 HO(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 ny(t){return t==="manual"}function Lp(t,r,i,l={}){const o=ty(DO,l),u={i:0},c=new Map(r),f=o?.elevateNodesOnSelect&&!ny(o.zIndexMode)?fT:0;let g=t.length>0;r.clear(),i.clear();for(const h of t){let m=c.get(h.id);if(o.checkEquality&&h===m?.internals.userNode)r.set(h.id,m);else{const p=Yl(h,o.nodeOrigin),y=pi(h.extent)?h.extent:o.nodeExtent,b=ha(p,y,rr(h));m={...o.defaults,...h,measured:{width:h.measured?.width,height:h.measured?.height},internals:{positionAbsolute:b,handleBounds:HO(h,m),z:dT(h,f,o.zIndexMode),userNode:h}},r.set(h.id,m)}(m.measured===void 0||m.measured.width===void 0||m.measured.height===void 0)&&!m.hidden&&(g=!1),h.parentId&&ry(m,r,i,l,u)}return g}function LO(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 ry(t,r,i,l,o){const{elevateNodesOnSelect:u,nodeOrigin:c,nodeExtent:f,zIndexMode:g}=ty(ey,l),h=t.parentId,m=r.get(h);if(!m){console.warn(`Parent node ${h} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}LO(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*zO),o&&m.internals.rootParentIndex!==void 0&&(o.i=m.internals.rootParentIndex);const p=u&&!ny(g)?fT:0,{x:y,y:b,z:S}=BO(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 dT(t,r,i){const l=gn(t.zIndex)?t.zIndex:0;return ny(i)?l:l+(t.selected?r:0)}function BO(t,r,i,l,o,u){const{x:c,y:f}=r.internals.positionAbsolute,g=rr(t),h=Yl(t,i),m=pi(t.extent)?ha(h,t.extent,g):h;let p=ha({x:c+m.x,y:f+m.y},l,g);t.extent==="parent"&&(p=JC(p,g,r));const y=dT(t,o,u),b=r.internals.z??0;return{x:p.x,y:p.y,z:b>=y?b+1:y}}function ay(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),h=eT(g,c.rect);u.set(c.parentId,{expandedRect:h,parent:f})}return u.size>0&&u.forEach(({expandedRect:c,parent:f},g)=>{const h=f.internals.positionAbsolute,m=rr(f),p=f.origin??l,y=c.x<h.x?Math.round(Math.abs(h.x-c.x)):0,b=c.y<h.y?Math.round(Math.abs(h.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 UO(t,r,i,l,o,u,c){const f=l?.querySelector(".xyflow__viewport");let g=!1;if(!f)return{changes:[],updatedInternals:g};const h=[],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=Wp(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=JC(T,N,r.get(S.parentId)):w&&(T=ha(T,w,N));const R={...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,R),S.parentId&&ry(R,r,i,{nodeOrigin:o,zIndexMode:c}),g=!0,E&&(h.push({id:S.id,type:"dimensions",dimensions:N}),S.expandParent&&S.parentId&&y.push({id:S.id,parentId:S.parentId,rect:mi(R,o)}))}}if(y.length>0){const b=ay(y,r,i,o);h.push(...b)}return{changes:h,updatedInternals:g}}async function GO({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 h=l.get(c)||new Map;l.set(c,h.set(i,r))}}function hT(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},h=`${o}-${c}--${u}-${f}`,m=`${u}-${f}--${o}-${c}`;e_("source",g,m,t,o,c),e_("target",g,h,t,u,f),r.set(l.id,l)}}function gT(t,r){if(!t.parentId)return!1;const i=r.get(t.parentId);return i?i.selected?!0:gT(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 VO(t,r,i,l){const o=new Map;for(const[u,c]of t)if((c.selected||c.id===l)&&(!c.parentId||!gT(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 ed({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 YO({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 IO({onNodeMouseDown:t,getStoreItems:r,onDragStart:i,onDrag:l,onDragStop:o}){let u={x:null,y:null},c=0,f=new Map,g=!1,h={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:R,nodeId:q,nodeClickDistance:M=0}){y=Zt(T);function L({x:F,y:J}){const{nodeLookup:k,nodeExtent:Z,snapGrid:O,snapToGrid:V,nodeOrigin:I,onNodeDrag:P,onSelectionDrag:le,onError:z,updateNodePositions:Y}=r();u={x:F,y:J};let ae=!1;const D=f.size>1,U=D&&Z?Dp(Il(f)):null,$=D&&V?YO({dragItems:f,snapGrid:O,x:F,y:J}):null;for(const[re,oe]of f){if(!k.has(re))continue;let fe={x:F-oe.distance.x,y:J-oe.distance.y};V&&(fe=$?{x:Math.round(fe.x+$.x),y:Math.round(fe.y+$.y)}:Xl(fe,O));let he=null;if(D&&Z&&!oe.extent&&U){const{positionAbsolute:ge}=oe.internals,_e=ge.x-U.x+Z[0][0],ve=ge.x+oe.measured.width-U.x2+Z[1][0],Te=ge.y-U.y+Z[0][1],we=ge.y+oe.measured.height-U.y2+Z[1][1];he=[[_e,Te],[ve,we]]}const{position:ye,positionAbsolute:xe}=PC({nodeId:re,nextPosition:fe,nodeLookup:k,nodeExtent:he||Z,nodeOrigin:I,onError:z});ae=ae||oe.position.x!==ye.x||oe.position.y!==ye.y,oe.position=ye,oe.internals.positionAbsolute=xe}if(S=S||ae,!!ae&&(Y(f,!0),N&&(l||P||!q&&le))){const[re,oe]=ed({nodeId:q,dragItems:f,nodeLookup:k});l?.(N,f,re,oe),P?.(N,re,oe),q||le?.(N,oe)}}async function H(){if(!m)return;const{transform:F,panBy:J,autoPanSpeed:k,autoPanOnNodeDrag:Z}=r();if(!Z){g=!1,cancelAnimationFrame(c);return}const[O,V]=WC(h,m,k);(O!==0||V!==0)&&(u.x=(u.x??0)-O/F[2],u.y=(u.y??0)-V/F[2],await J({x:O,y:V})&&L(u)),c=requestAnimationFrame(H)}function K(F){const{nodeLookup:J,multiSelectionActive:k,nodesDraggable:Z,transform:O,snapGrid:V,snapToGrid:I,selectNodesOnDrag:P,onNodeDragStart:le,onSelectionDragStart:z,unselectNodesAndEdges:Y}=r();p=!0,(!P||!R)&&!k&&q&&(J.get(q)?.selected||Y()),R&&P&&q&&t?.(q);const ae=Ml(F.sourceEvent,{transform:O,snapGrid:V,snapToGrid:I,containerBounds:m});if(u=ae,f=VO(J,Z,ae,q),f.size>0&&(i||le||!q&&z)){const[D,U]=ed({nodeId:q,dragItems:f,nodeLookup:J});i?.(F.sourceEvent,f,D,U),le?.(F.sourceEvent,D,U),q||z?.(F.sourceEvent,U)}}const B=MC().clickDistance(M).on("start",F=>{const{domNode:J,nodeDragThreshold:k,transform:Z,snapGrid:O,snapToGrid:V}=r();m=J?.getBoundingClientRect()||null,b=!1,S=!1,N=F.sourceEvent,k===0&&K(F),u=Ml(F.sourceEvent,{transform:Z,snapGrid:O,snapToGrid:V,containerBounds:m}),h=vn(F.sourceEvent,m)}).on("drag",F=>{const{autoPanOnNodeDrag:J,transform:k,snapGrid:Z,snapToGrid:O,nodeDragThreshold:V,nodeLookup:I}=r(),P=Ml(F.sourceEvent,{transform:k,snapGrid:Z,snapToGrid:O,containerBounds:m});if(N=F.sourceEvent,(F.sourceEvent.type==="touchmove"&&F.sourceEvent.touches.length>1||q&&!I.has(q))&&(b=!0),!b){if(!g&&J&&p&&(g=!0,H()),!p){const le=vn(F.sourceEvent,m),z=le.x-h.x,Y=le.y-h.y;Math.sqrt(z*z+Y*Y)>V&&K(F)}(u.x!==P.xSnapped||u.y!==P.ySnapped)&&f&&p&&(h=vn(F.sourceEvent,m),L(P))}}).on("end",F=>{if(!(!p||b)&&(g=!1,p=!1,cancelAnimationFrame(c),f.size>0)){const{nodeLookup:J,updateNodePositions:k,onNodeDragStop:Z,onSelectionDragStop:O}=r();if(S&&(k(f,!1),S=!1),o||Z||!q&&O){const[V,I]=ed({nodeId:q,dragItems:f,nodeLookup:J,dragging:!1});o?.(F.sourceEvent,f,V,I),Z?.(F.sourceEvent,V,I),q||O?.(F.sourceEvent,I)}}}).filter(F=>{const J=F.target;return!F.button&&(!A||!t_(J,`.${A}`,T))&&(!w||t_(J,w,T))});y.call(B)}function C(){y?.on(".drag",null)}return{update:E,destroy:C}}function XO(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 ZO=250;function FO(t,r,i,l){let o=[],u=1/0;const c=XO(t,i,r+ZO);for(const f of c){const g=[...f.internals.handleBounds?.source??[],...f.internals.handleBounds?.target??[]];for(const h of g){if(l.nodeId===h.nodeId&&l.type===h.type&&l.id===h.id)continue;const{x:m,y:p}=ga(f,h,h.position,!0),y=Math.sqrt(Math.pow(m-t.x,2)+Math.pow(p-t.y,2));y>r||(y<u?(o=[{...h,x:m,y:p}],u=y):y===u&&o.push({...h,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 vT(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(h=>h.id===i):f?.[0])??null;return g&&u?{...g,...ga(c,g,g.position,!0)}:g}function mT(t,r){return t||(r?.classList.contains("target")?"target":r?.classList.contains("source")?"source":null)}function KO(t,r){let i=null;return r?i=!0:t&&!r&&(i=!1),i}const pT=()=>!0;function QO(t,{connectionMode:r,connectionRadius:i,handleId:l,nodeId:o,edgeUpdaterType:u,isTarget:c,domNode:f,nodeLookup:g,lib:h,autoPanOnConnect:m,flowId:p,panBy:y,cancelConnection:b,onConnectStart:S,onConnect:N,onConnectEnd:E,isValidConnection:C=pT,onReconnectEnd:A,updateConnection:w,getTransform:T,getFromHandle:R,autoPanSpeed:q,dragThreshold:M=1,handleDomNode:L}){const H=rT(t.target);let K=0,B;const{x:F,y:J}=vn(t),k=mT(u,L),Z=f?.getBoundingClientRect();let O=!1;if(!Z||!k)return;const V=vT(o,k,l,g,r);if(!V)return;let I=vn(t,Z),P=!1,le=null,z=!1,Y=null;function ae(){if(!m||!Z)return;const[ye,xe]=WC(I,Z,q);y({x:ye,y:xe}),K=requestAnimationFrame(ae)}const D={...V,nodeId:o,type:k,position:V.position},U=g.get(o);let re={inProgress:!0,isValid:null,from:ga(U,D,pe.Left,!0),fromHandle:D,fromPosition:D.position,fromNode:U,to:I,toHandle:null,toPosition:Yb[D.position],toNode:null,pointer:I};function oe(){O=!0,w(re),S?.(t,{nodeId:o,handleId:l,handleType:k})}M===0&&oe();function fe(ye){if(!O){const{x:we,y:dt}=vn(ye),nt=we-F,Ht=dt-J;if(!(nt*nt+Ht*Ht>M*M))return;oe()}if(!R()||!D){he(ye);return}const xe=T();I=vn(ye,Z),B=FO(Zl(I,xe,!1,[1,1]),i,g,D),P||(ae(),P=!0);const ge=yT(ye,{handle:B,connectionMode:r,fromNodeId:o,fromHandleId:l,fromType:c?"target":"source",isValidConnection:C,doc:H,lib:h,flowId:p,nodeLookup:g});Y=ge.handleDomNode,le=ge.connection,z=KO(!!B,ge.isValid);const _e=g.get(o),ve=_e?ga(_e,D,pe.Left,!0):re.from,Te={...re,from:ve,isValid:z,to:ge.toHandle&&z?Fs({x:ge.toHandle.x,y:ge.toHandle.y},xe):I,toHandle:ge.toHandle,toPosition:z&&ge.toHandle?ge.toHandle.position:Yb[D.position],toNode:ge.toHandle?g.get(ge.toHandle.nodeId):null,pointer:I};w(Te),re=Te}function he(ye){if(!("touches"in ye&&ye.touches.length>0)){if(O){(B||Y)&&le&&z&&N?.(le);const{inProgress:xe,...ge}=re,_e={...ge,toPosition:re.toHandle?re.toPosition:null};E?.(ye,_e),u&&A?.(ye,_e)}b(),cancelAnimationFrame(K),P=!1,z=!1,le=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 yT(t,{handle:r,connectionMode:i,fromNodeId:l,fromHandleId:o,fromType:u,doc:c,lib:f,flowId:g,isValidConnection:h=pT,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=mT(void 0,E),w=E.getAttribute("data-nodeid"),T=E.getAttribute("data-handleid"),R=E.classList.contains("connectable"),q=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=R&&q&&(i===gi.Strict?p&&A==="source"||!p&&A==="target":w!==l||T!==o);C.isValid=H&&h(M),C.toHandle=vT(w,A,T,m,i,!0)}return C}const Bp={onPointerDown:QO,isValid:yT};function $O({domNode:t,panZoom:r,getTransform:i,getViewScale:l}){const o=Zt(t);function u({translateExtent:f,width:g,height:h,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(),R=w.sourceEvent.ctrlKey&&Ll()?10:1,q=-w.sourceEvent.deltaY*(w.sourceEvent.deltaMode===1?.05:w.sourceEvent.deltaMode?1:.002)*m,M=T[2]*Math.pow(2,q*R);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 R=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY],q=[R[0]-N[0],R[1]-N[1]];N=R;const M=l()*Math.max(T[2],Math.log(T[2]))*(b?-1:1),L={x:T[0]-q[0]*M,y:T[1]-q[1]*M},H=[[0,0],[g,h]];r.setViewportConstrained({x:L.x,y:L.y,zoom:T[2]},H,f)},A=XC().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 lu=t=>({x:t.x,y:t.y,zoom:t.k}),td=({x:t,y:r,zoom:i})=>ru.translate(t,r).scale(i),si=(t,r)=>t.target.closest(`.${r}`),xT=(t,r)=>r===2&&Array.isArray(t)&&t.includes(2),PO=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,nd=(t,r=0,i=PO,l=()=>{})=>{const o=typeof r=="number"&&r>0;return o||l(),o?t.transition().duration(r).ease(i).on("end",l):t},bT=t=>{const r=t.ctrlKey&&Ll()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*r};function JO({zoomPanValues:t,noWheelClassName:r,d3Selection:i,d3Zoom:l,panOnScrollMode:o,panOnScrollSpeed:u,zoomOnPinch:c,onPanZoomStart:f,onPanZoom:g,onPanZoomEnd:h}){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=bT(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=lu(i.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?(g?.(m,N),t.panScrollTimeout=setTimeout(()=>{h?.(m,N),t.isPanScrolling=!1},150)):(t.isPanScrolling=!0,f?.(m,N))}}function WO({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 e5({zoomPanValues:t,onDraggingChange:r,onPanZoomStart:i}){return l=>{if(l.sourceEvent?.internal)return;const o=lu(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 t5({zoomPanValues:t,panOnDrag:r,onPaneContextMenu:i,onTransformChange:l,onPanZoom:o}){return u=>{t.usedRightMouseButton=!!(i&&xT(r,t.mouseButton??0)),u.sourceEvent?.sync||l([u.transform.x,u.transform.y,u.transform.k]),o&&!u.sourceEvent?.internal&&o?.(u.sourceEvent,lu(u.transform))}}function n5({zoomPanValues:t,panOnDrag:r,panOnScroll:i,onDraggingChange:l,onPanZoomEnd:o,onPaneContextMenu:u}){return c=>{if(!c.sourceEvent?.internal&&(t.isZoomingOrPanning=!1,u&&xT(r,t.mouseButton??0)&&!t.usedRightMouseButton&&c.sourceEvent&&u(c.sourceEvent),t.usedRightMouseButton=!1,l(!1),o)){const f=lu(c.transform);t.prevViewport=f,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{o?.(c.sourceEvent,f)},i?150:0)}}}function r5({zoomActivationKeyPressed:t,zoomOnScroll:r,zoomOnPinch:i,panOnDrag:l,panOnScroll:o,zoomOnDoubleClick:u,userSelectionActive:c,noWheelClassName:f,noPanClassName:g,lib:h,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,`${h}-flow__node`)||si(p,`${h}-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 a5({domNode:t,minZoom:r,maxZoom:i,translateExtent:l,viewport:o,onPanZoom:u,onPanZoomStart:c,onPanZoomEnd:f,onDraggingChange:g}){const h={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},m=t.getBoundingClientRect(),p=XC().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(bT);function N(B,F){return y?new Promise(J=>{p?.interpolate(F?.interpolate==="linear"?jl:zs).transform(nd(y,F?.duration,F?.ease,()=>J(!0)),B)}):Promise.resolve(!1)}function E({noWheelClassName:B,noPanClassName:F,onPaneContextMenu:J,userSelectionActive:k,panOnScroll:Z,panOnDrag:O,panOnScrollMode:V,panOnScrollSpeed:I,preventScrolling:P,zoomOnPinch:le,zoomOnScroll:z,zoomOnDoubleClick:Y,zoomActivationKeyPressed:ae,lib:D,onTransformChange:U,connectionInProgress:$,paneClickDistance:re,selectionOnDrag:oe}){k&&!h.isZoomingOrPanning&&C();const fe=Z&&!ae&&!k;p.clickDistance(oe?1/0:!gn(re)||re<0?0:re);const he=fe?JO({zoomPanValues:h,noWheelClassName:B,d3Selection:y,d3Zoom:p,panOnScrollMode:V,panOnScrollSpeed:I,zoomOnPinch:le,onPanZoomStart:c,onPanZoom:u,onPanZoomEnd:f}):WO({noWheelClassName:B,preventScrolling:P,d3ZoomHandler:b});if(y.on("wheel.zoom",he,{passive:!1}),!k){const xe=e5({zoomPanValues:h,onDraggingChange:g,onPanZoomStart:c});p.on("start",xe);const ge=t5({zoomPanValues:h,panOnDrag:O,onPaneContextMenu:!!J,onPanZoom:u,onTransformChange:U});p.on("zoom",ge);const _e=n5({zoomPanValues:h,panOnDrag:O,panOnScroll:Z,onPaneContextMenu:J,onPanZoomEnd:f,onDraggingChange:g});p.on("end",_e)}const ye=r5({zoomActivationKeyPressed:ae,panOnDrag:O,zoomOnScroll:z,panOnScroll:Z,zoomOnDoubleClick:Y,zoomOnPinch:le,userSelectionActive:k,noPanClassName:F,noWheelClassName:B,lib:D,connectionInProgress:$});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,J){const k=td(B),Z=p?.constrain()(k,F,J);return Z&&await N(Z),new Promise(O=>O(Z))}async function w(B,F){const J=td(B);return await N(J,F),new Promise(k=>k(J))}function T(B){if(y){const F=td(B),J=y.property("__zoom");(J.k!==B.zoom||J.x!==B.x||J.y!==B.y)&&p?.transform(y,F,null,{sync:!0})}}function R(){const B=y?IC(y.node()):{x:0,y:0,k:1};return{x:B.x,y:B.y,zoom:B.k}}function q(B,F){return y?new Promise(J=>{p?.interpolate(F?.interpolate==="linear"?jl:zs).scaleTo(nd(y,F?.duration,F?.ease,()=>J(!0)),B)}):Promise.resolve(!1)}function M(B,F){return y?new Promise(J=>{p?.interpolate(F?.interpolate==="linear"?jl:zs).scaleBy(nd(y,F?.duration,F?.ease,()=>J(!0)),B)}):Promise.resolve(!1)}function L(B){p?.scaleExtent(B)}function H(B){p?.translateExtent(B)}function K(B){const F=!gn(B)||B<0?0:B;p?.clickDistance(F)}return{update:E,destroy:C,setViewport:w,setViewportConstrained:A,getViewport:R,scaleTo:q,scaleBy:M,setScaleExtent:L,setTranslateExtent:H,syncViewport:T,setClickDistance:K}}var yi;(function(t){t.Line="line",t.Handle="handle"})(yi||(yi={}));function i5({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 l5(t,r,i,l,o,u,c,f){let{affectsX:g,affectsY:h}=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:R,height:q,aspectRatio:M}=t;let L=Math.floor(m?b-t.pointerX:0),H=Math.floor(p?S-t.pointerY:0);const K=R+(g?-L:L),B=q+(h?-H:H),F=-u[0]*R,J=-u[1]*q;let k=js(K,N,E),Z=js(B,C,A);if(c){let I=0,P=0;g&&L<0?I=Dr(w+L+F,c[0][0]):!g&&L>0&&(I=kr(w+K+F,c[1][0])),h&&H<0?P=Dr(T+H+J,c[0][1]):!h&&H>0&&(P=kr(T+B+J,c[1][1])),k=Math.max(k,I),Z=Math.max(Z,P)}if(f){let I=0,P=0;g&&L>0?I=kr(w+L,f[0][0]):!g&&L<0&&(I=Dr(w+K,f[1][0])),h&&H>0?P=kr(T+H,f[0][1]):!h&&H<0&&(P=Dr(T+B,f[1][1])),k=Math.max(k,I),Z=Math.max(Z,P)}if(o){if(m){const I=js(K/M,C,A)*M;if(k=Math.max(k,I),c){let P=0;!g&&!h||g&&!h&&y?P=kr(T+J+K/M,c[1][1])*M:P=Dr(T+J+(g?L:-L)/M,c[0][1])*M,k=Math.max(k,P)}if(f){let P=0;!g&&!h||g&&!h&&y?P=Dr(T+K/M,f[1][1])*M:P=kr(T+(g?L:-L)/M,f[0][1])*M,k=Math.max(k,P)}}if(p){const I=js(B*M,N,E)/M;if(Z=Math.max(Z,I),c){let P=0;!g&&!h||h&&!g&&y?P=kr(w+B*M+F,c[1][0])/M:P=Dr(w+(h?H:-H)*M+F,c[0][0])/M,Z=Math.max(Z,P)}if(f){let P=0;!g&&!h||h&&!g&&y?P=Dr(w+B*M,f[1][0])/M:P=kr(w+(h?H:-H)*M,f[0][0])/M,Z=Math.max(Z,P)}}}H=H+(H<0?Z:-Z),L=L+(L<0?k:-k),o&&(y?K>B*M?H=(r_(g,h)?-L:L)/M:L=(r_(g,h)?-H:H)*M:m?(H=L/M,h=g):(L=H*M,g=h));const O=g?w+L:w,V=h?T+H:T;return{width:R+(g?-L:L),height:q+(h?-H:H),x:u[0]*L*(g?-1:1)+O,y:u[1]*H*(h?-1:1)+V}}const _T={width:0,height:0,x:0,y:0},o5={..._T,pointerX:0,pointerY:0,aspectRatio:1};function s5(t){return[[0,0],[t.measured.width,t.measured.height]]}function u5(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 c5({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:h,boundaries:m,keepAspectRatio:p,resizeDirection:y,onResizeStart:b,onResize:S,onResizeEnd:N,shouldResize:E}){let C={..._T},A={...o5};c={boundaries:m,resizeDirection:y,keepAspectRatio:p,controlDirection:n_(h)};let w,T=null,R=[],q,M,L,H=!1;const K=MC().on("start",B=>{const{nodeLookup:F,transform:J,snapGrid:k,snapToGrid:Z,nodeOrigin:O,paneDomNode:V}=i();if(w=F.get(r),!w)return;T=V?.getBoundingClientRect()??null;const{xSnapped:I,ySnapped:P}=Ml(B.sourceEvent,{transform:J,snapGrid:k,snapToGrid:Z,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:I,pointerY:P,aspectRatio:C.width/C.height},q=void 0,w.parentId&&(w.extent==="parent"||w.expandParent)&&(q=F.get(w.parentId),M=q&&w.extent==="parent"?s5(q):void 0),R=[],L=void 0;for(const[le,z]of F)if(z.parentId===r&&(R.push({id:le,position:{...z.position},extent:z.extent}),z.extent==="parent"||z.expandParent)){const Y=u5(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:J,snapToGrid:k,nodeOrigin:Z}=i(),O=Ml(B.sourceEvent,{transform:F,snapGrid:J,snapToGrid:k,containerBounds:T}),V=[];if(!w)return;const{x:I,y:P,width:le,height:z}=C,Y={},ae=w.origin??Z,{width:D,height:U,x:$,y:re}=l5(A,c.controlDirection,O,c.boundaries,c.keepAspectRatio,ae,M,L),oe=D!==le,fe=U!==z,he=$!==I&&oe,ye=re!==P&&fe;if(!he&&!ye&&!oe&&!fe)return;if((he||ye||ae[0]===1||ae[1]===1)&&(Y.x=he?$:C.x,Y.y=ye?re:C.y,C.x=Y.x,C.y=Y.y,R.length>0)){const ve=$-I,Te=re-P;for(const we of R)we.position={x:we.position.x-ve+ae[0]*(D-le),y:we.position.y-Te+ae[1]*(U-z)},V.push(we)}if((oe||fe)&&(Y.width=oe&&(!c.resizeDirection||c.resizeDirection==="horizontal")?D:C.width,Y.height=fe&&(!c.resizeDirection||c.resizeDirection==="vertical")?U:C.height,C.width=Y.width,C.height=Y.height),q&&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=i5({width:C.width,prevWidth:le,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,V))}).on("end",B=>{H&&(N?.(B,{...C}),o?.({...C}),H=!1)});u.call(K)}function g(){u.on(".drag",null)}return{update:f,destroy:g}}var rd={exports:{}},ad={},id={exports:{}},ld={};var a_;function f5(){if(a_)return ld;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 h(p,y){return y()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:f;return ld.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:m,ld}var i_;function d5(){return i_||(i_=1,id.exports=f5()),id.exports}var l_;function h5(){if(l_)return ad;l_=1;var t=Ul(),r=d5();function i(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&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 ad.useSyncExternalStoreWithSelector=function(h,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(q){if(!A){if(A=!0,w=q,q=y(q),b!==void 0&&N.hasValue){var M=N.value;if(b(M,q))return T=M}return T=q}if(M=T,l(w,q))return M;var L=y(q);return b!==void 0&&b(M,L)?(w=q,M):(w=q,T=L)}var A=!1,w,T,R=p===void 0?null:p;return[function(){return C(m())},R===null?void 0:function(){return C(R())}]},[m,p,y,b]);var E=o(h,S[0],S[1]);return c(function(){N.hasValue=!0,N.value=E},[E]),g(E),E},ad}var o_;function g5(){return o_||(o_=1,rd.exports=h5()),rd.exports}var v5=g5();const m5=Vp(v5),p5={},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:()=>h,subscribe:m=>(i.add(m),()=>i.delete(m)),destroy:()=>{(p5?"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()}},h=r=t(l,o,g);return g},y5=t=>t?s_(t):s_,{useDebugValue:x5}=Sl,{useSyncExternalStoreWithSelector:b5}=m5,_5=t=>t;function wT(t,r=_5,i){const l=b5(t.subscribe,t.getState,t.getServerState||t.getInitialState,r,i);return x5(l),l}const u_=(t,r)=>{const i=y5(t),l=(o,u=r)=>wT(i,o,u);return Object.assign(l,i),l},w5=(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}fC();const ou=ee.createContext(null),S5=ou.Provider,ST=Tn.error001();function Oe(t,r){const i=ee.useContext(ou);if(i===null)throw new Error(ST);return wT(i,t,r)}function Fe(){const t=ee.useContext(ou);if(t===null)throw new Error(ST);return ee.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe}),[t])}const c_={display:"none"},E5={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},ET="react-flow__node-desc",NT="react-flow__edge-desc",N5="react-flow__aria-live",C5=t=>t.ariaLiveMessage,T5=t=>t.ariaLabelConfig;function A5({rfId:t}){const r=Oe(C5);return x.jsx("div",{id:`${N5}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:E5,children:r})}function j5({rfId:t,disableKeyboardA11y:r}){const i=Oe(T5);return x.jsxs(x.Fragment,{children:[x.jsx("div",{id:`${ET}-${t}`,style:c_,children:r?i["node.a11yDescription.default"]:i["node.a11yDescription.keyboardDisabled"]}),x.jsx("div",{id:`${NT}-${t}`,style:c_,children:i["edge.a11yDescription.default"]}),!r&&x.jsx(A5,{rfId:t})]})}const su=ee.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})});su.displayName="Panel";function M5({proOptions:t,position:r="bottom-right"}){return t?.hideAttribution?null:x.jsx(su,{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 R5=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 q5(t,r){return Ze(t.selectedNodes.map(Ms),r.selectedNodes.map(Ms))&&Ze(t.selectedEdges.map(Ms),r.selectedEdges.map(Ms))}function O5({onSelectionChange:t}){const r=Fe(),{selectedNodes:i,selectedEdges:l}=Oe(R5,q5);return ee.useEffect(()=>{const o={nodes:i,edges:l};t?.(o),r.getState().onSelectionChangeHandlers.forEach(u=>u(o))},[i,l,t]),null}const z5=t=>!!t.onSelectionChangeHandlers;function D5({onSelectionChange:t}){const r=Oe(z5);return t||r?x.jsx(O5,{onSelectionChange:t}):null}const CT=[0,0],k5={x:0,y:0,zoom:1},H5=["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_=[...H5,"rfId"],L5=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:CT,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function B5(t){const{setNodes:r,setEdges:i,setMinZoom:l,setMaxZoom:o,setTranslateExtent:u,setNodeExtent:c,reset:f,setDefaultNodesAndEdges:g}=Oe(L5,Ze),h=Fe();ee.useEffect(()=>(g(t.defaultNodes,t.defaultEdges),()=>{m.current=d_,f()}),[]);const m=ee.useRef(d_);return ee.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"?h.setState({ariaLabelConfig:SO(y)}):p==="fitView"?h.setState({fitViewQueued:y}):p==="fitViewOptions"?h.setState({fitViewOptions:y}):h.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 U5(t){const[r,i]=ee.useState(t==="system"?null:t);return ee.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]=ee.useState(!1),o=ee.useRef(!1),u=ee.useRef(new Set([])),[c,f]=ee.useMemo(()=>{if(t!==null){const h=(Array.isArray(t)?t:[t]).filter(p=>typeof p=="string").map(p=>p.replace("+",`
10
- `).replace(`
11
-
12
- `,`
13
- +`).split(`
14
- `)),m=h.reduce((p,y)=>p.concat(...y),[]);return[h,m]}return[[],[]]},[t]);return ee.useEffect(()=>{const g=r?.target??g_,h=r?.actInsideInputWithModifier??!0;if(t!==null){const m=b=>{if(o.current=b.ctrlKey||b.metaKey||b.shiftKey||b.altKey,(!o.current||o.current&&!h)&&aT(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 G5=()=>{const t=Fe();return ee.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=Jp(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(),h={x:r.x-f,y:r.y-g},m=i.snapGrid??o,p=i.snapToGrid??u;return Zl(h,l,p,m)},flowToScreenPosition:r=>{const{transform:i,domNode:l}=t.getState();if(!l)return r;const{x:o,y:u}=l.getBoundingClientRect(),c=Fs(r,i);return{x:c.x+o,y:c.y+u}}}),[])};function TT(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)V5(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 V5(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 AT(t,r){return TT(t,r)}function jT(t,r){return TT(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=>hO(t),Y5=t=>$C(t);function MT(t){return ee.forwardRef(t)}const I5=typeof window<"u"?ee.useLayoutEffect:ee.useEffect;function b_(t){const[r,i]=ee.useState(BigInt(0)),[l]=ee.useState(()=>X5(()=>i(o=>o+BigInt(1))));return I5(()=>{const o=l.get();o.length&&(t(o),l.reset())},[r]),l}function X5(t){let r=[];return{get:()=>r,reset:()=>{r=[]},push:i=>{r.push(i),t()}}}const RT=ee.createContext(null);function Z5({children:t}){const r=Fe(),i=ee.useCallback(f=>{const{nodes:g=[],setNodes:h,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&&h(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=ee.useCallback(f=>{const{edges:g=[],setEdges:h,hasDefaultEdges:m,onEdgesChange:p,edgeLookup:y}=r.getState();let b=g;for(const S of f)b=typeof S=="function"?S(b):S;m?h(b):p&&p(p_({items:b,lookup:y}))},[]),u=b_(o),c=ee.useMemo(()=>({nodeQueue:l,edgeQueue:u}),[]);return x.jsx(RT.Provider,{value:c,children:t})}function F5(){const t=ee.useContext(RT);if(!t)throw new Error("useBatchContext must be used within a BatchProvider");return t}const K5=t=>!!t.panZoom;function iy(){const t=G5(),r=Fe(),i=F5(),l=Oe(K5),o=ee.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?nT(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)},h=(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&&Y5(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:R,edges:q}=await yO({nodesToRemove:p,edgesToRemove:y,nodes:b,edges:S,onBeforeDelete:T}),M=q.length>0,L=R.length>0;if(M){const H=q.map(y_);E?.(q),A(H)}if(L){const H=R.map(y_);N?.(R),C(H)}return(L||M)&&w?.({nodes:R,edges:q}),{deletedNodes:R,deletedEdges:q}},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:h,updateNodeData:(p,y,b={replace:!1})=>{h(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 gO(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??wO();return r.setState({fitViewQueued:!0,fitViewOptions:p,fitViewResolver:y}),i.nodeQueue.push(b=>[...b]),y.promise}}},[]);return ee.useMemo(()=>({...o,...t,viewportInitialized:l}),[l])}const __=t=>t.selected,Q5=typeof window<"u"?window:void 0;function $5({deleteKeyCode:t,multiSelectionKeyCode:r}){const i=Fe(),{deleteElements:l}=iy(),o=Bl(t,{actInsideInputWithModifier:!1}),u=Bl(r,{target:Q5});ee.useEffect(()=>{if(o){const{edges:c,nodes:f}=i.getState();l({nodes:f.filter(__),edges:c.filter(__)}),i.setState({nodesSelectionActive:!1})}},[o]),ee.useEffect(()=>{i.setState({multiSelectionActive:u})},[u])}function P5(t){const r=Fe();ee.useEffect(()=>{const i=()=>{if(!t.current||!(t.current.checkVisibility?.()??!0))return!1;const l=Wp(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 uu={position:"absolute",width:"100%",height:"100%",top:0,left:0},J5=t=>({userSelectionActive:t.userSelectionActive,lib:t.lib,connectionInProgress:t.connection.inProgress});function W5({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:h,minZoom:m,maxZoom:p,zoomActivationKeyCode:y,preventScrolling:b=!0,children:S,noWheelClassName:N,noPanClassName:E,onViewportChange:C,isControlledViewport:A,paneClickDistance:w,selectionOnDrag:T}){const R=Fe(),q=ee.useRef(null),{userSelectionActive:M,lib:L,connectionInProgress:H}=Oe(J5,Ze),K=Bl(y),B=ee.useRef();P5(q);const F=ee.useCallback(J=>{C?.({x:J[0],y:J[1],zoom:J[2]}),A||R.setState({transform:J})},[C,A]);return ee.useEffect(()=>{if(q.current){B.current=a5({domNode:q.current,minZoom:m,maxZoom:p,translateExtent:h,viewport:g,onDraggingChange:O=>R.setState({paneDragging:O}),onPanZoomStart:(O,V)=>{const{onViewportChangeStart:I,onMoveStart:P}=R.getState();P?.(O,V),I?.(V)},onPanZoom:(O,V)=>{const{onViewportChange:I,onMove:P}=R.getState();P?.(O,V),I?.(V)},onPanZoomEnd:(O,V)=>{const{onViewportChangeEnd:I,onMoveEnd:P}=R.getState();P?.(O,V),I?.(V)}});const{x:J,y:k,zoom:Z}=B.current.getViewport();return R.setState({panZoom:B.current,transform:[J,k,Z],domNode:q.current.closest(".react-flow")}),()=>{B.current?.destroy()}}},[]),ee.useEffect(()=>{B.current?.update({onPaneContextMenu:t,zoomOnScroll:r,zoomOnPinch:i,panOnScroll:l,panOnScrollSpeed:o,panOnScrollMode:u,zoomOnDoubleClick:c,panOnDrag:f,zoomActivationKeyPressed:K,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,K,b,E,M,N,L,F,H,T,w]),x.jsx("div",{className:"react-flow__renderer",ref:q,style:uu,children:S})}const ez=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function tz(){const{userSelectionActive:t,userSelectionRect:r}=Oe(ez,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 od=(t,r)=>i=>{i.target===r.current&&t?.(i)},nz=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,connectionInProgress:t.connection.inProgress,dragging:t.paneDragging});function rz({isSelecting:t,selectionKeyPressed:r,selectionMode:i=kl.Full,panOnDrag:l,paneClickDistance:o,selectionOnDrag:u,onSelectionStart:c,onSelectionEnd:f,onPaneClick:g,onPaneContextMenu:h,onPaneScroll:m,onPaneMouseEnter:p,onPaneMouseMove:y,onPaneMouseLeave:b,children:S}){const N=Fe(),{userSelectionActive:E,elementsSelectable:C,dragging:A,connectionInProgress:w}=Oe(nz,Ze),T=C&&(t||E),R=ee.useRef(null),q=ee.useRef(),M=ee.useRef(new Set),L=ee.useRef(new Set),H=ee.useRef(!1),K=I=>{if(H.current||w){H.current=!1;return}g?.(I),N.getState().resetSelectedElements(),N.setState({nodesSelectionActive:!1})},B=I=>{if(Array.isArray(l)&&l?.includes(2)){I.preventDefault();return}h?.(I)},F=m?I=>m(I):void 0,J=I=>{H.current&&(I.stopPropagation(),H.current=!1)},k=I=>{const{domNode:P}=N.getState();if(q.current=P?.getBoundingClientRect(),!q.current)return;const le=I.target===R.current;if(!le&&!!I.target.closest(".nokey")||!t||!(u&&le||r)||I.button!==0||!I.isPrimary)return;I.target?.setPointerCapture?.(I.pointerId),H.current=!1;const{x:ae,y:D}=vn(I.nativeEvent,q.current);N.setState({userSelectionRect:{width:0,height:0,startX:ae,startY:D,x:ae,y:D}}),le||(I.stopPropagation(),I.preventDefault())},Z=I=>{const{userSelectionRect:P,transform:le,nodeLookup:z,edgeLookup:Y,connectionLookup:ae,triggerNodeChanges:D,triggerEdgeChanges:U,defaultEdgeOptions:$,resetSelectedElements:re}=N.getState();if(!q.current||!P)return;const{x:oe,y:fe}=vn(I.nativeEvent,q.current),{startX:he,startY:ye}=P;if(!H.current){const Te=r?0:o;if(Math.hypot(oe-he,fe-ye)<=Te)return;re(),c?.(I)}H.current=!0;const xe={startX:he,startY:ye,x:oe<he?oe:he,y:fe<ye?fe:ye,width:Math.abs(oe-he),height:Math.abs(fe-ye)},ge=M.current,_e=L.current;M.current=new Set(Pp(z,xe,le,i===kl.Partial,!0).map(Te=>Te.id)),L.current=new Set;const ve=$?.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);D(Te)}if(!Zb(_e,L.current)){const Te=ui(Y,L.current);U(Te)}N.setState({userSelectionRect:xe,userSelectionActive:!0,nodesSelectionActive:!1})},O=I=>{I.button===0&&(I.target?.releasePointerCapture?.(I.pointerId),!E&&I.target===R.current&&N.getState().userSelectionRect&&K?.(I),N.setState({userSelectionActive:!1,userSelectionRect:null}),H.current&&(f?.(I),N.setState({nodesSelectionActive:M.current.size>0})))},V=l===!0||Array.isArray(l)&&l.includes(0);return x.jsxs("div",{className:st(["react-flow__pane",{draggable:V,dragging:A,selection:t}]),onClick:T?void 0:od(K,R),onContextMenu:od(B,R),onWheel:od(F,R),onPointerEnter:T?void 0:p,onPointerMove:T?Z:y,onPointerUp:T?O:void 0,onPointerDownCapture:T?k:void 0,onClickCapture:T?J:void 0,onPointerLeave:b,ref:R,style:uu,children:[S,x.jsx(tz,{})]})}function Up({id:t,store:r,unselect:i=!1,nodeRef:l}){const{addSelectedNodes:o,unselectNodesAndEdges:u,multiSelectionActive:c,nodeLookup:f,onError:g}=r.getState(),h=f.get(t);if(!h){g?.("012",Tn.error012(t));return}r.setState({nodesSelectionActive:!1}),h.selected?(i||h.selected&&c)&&(u({nodes:[h],edges:[]}),requestAnimationFrame(()=>l?.current?.blur())):o([t])}function qT({nodeRef:t,disabled:r=!1,noDragClassName:i,handleSelector:l,nodeId:o,isSelectable:u,nodeClickDistance:c}){const f=Fe(),[g,h]=ee.useState(!1),m=ee.useRef();return ee.useEffect(()=>{m.current=IO({getStoreItems:()=>f.getState(),onNodeMouseDown:p=>{Up({id:p,store:f,nodeRef:t})},onDragStart:()=>{h(!0)},onDragStop:()=>{h(!1)}})},[]),ee.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 az=t=>r=>r.selected&&(r.draggable||t&&typeof r.draggable>"u");function OT(){const t=Fe();return ee.useCallback(i=>{const{nodeExtent:l,snapToGrid:o,snapGrid:u,nodesDraggable:c,onError:f,updateNodePositions:g,nodeLookup:h,nodeOrigin:m}=t.getState(),p=new Map,y=az(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 h){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}=PC({nodeId:C.id,nextPosition:A,nodeLookup:h,nodeExtent:l,nodeOrigin:m,onError:f});C.position=w,C.internals.positionAbsolute=T,p.set(C.id,C)}g(p)},[])}const ly=ee.createContext(null),iz=ly.Provider;ly.Consumer;const zT=()=>ee.useContext(ly),lz=t=>({connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName,rfId:t.rfId}),oz=(t,r,i)=>l=>{const{connectionClickStartHandle:o,connectionMode:u,connection:c}=l,{fromHandle:f,toHandle:g,isValid:h}=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&&h}};function sz({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:h,onMouseDown:m,onTouchStart:p,...y},b){const S=c||null,N=t==="target",E=Fe(),C=zT(),{connectOnClick:A,noPanClassName:w,rfId:T}=Oe(lz,Ze),{connectingFrom:R,connectingTo:q,clickConnecting:M,isPossibleEndHandle:L,connectionInProcess:H,clickConnectionInProcess:K,valid:B}=Oe(oz(C,S,t),Ze);C||E.getState().onError?.("010",Tn.error010());const F=Z=>{const{defaultEdgeOptions:O,onConnect:V,hasDefaultEdges:I}=E.getState(),P={...O,...Z};if(I){const{edges:le,setEdges:z}=E.getState();z(uT(P,le))}V?.(P),f?.(P)},J=Z=>{if(!C)return;const O=iT(Z.nativeEvent);if(o&&(O&&Z.button===0||!O)){const V=E.getState();Bp.onPointerDown(Z.nativeEvent,{handleDomNode:Z.currentTarget,autoPanOnConnect:V.autoPanOnConnect,connectionMode:V.connectionMode,connectionRadius:V.connectionRadius,domNode:V.domNode,nodeLookup:V.nodeLookup,lib:V.lib,isTarget:N,handleId:S,nodeId:C,flowId:V.rfId,panBy:V.panBy,cancelConnection:V.cancelConnection,onConnectStart:V.onConnectStart,onConnectEnd:V.onConnectEnd,updateConnection:V.updateConnection,onConnect:F,isValidConnection:i||V.isValidConnection,getTransform:()=>E.getState().transform,getFromHandle:()=>E.getState().connection.fromHandle,autoPanSpeed:V.autoPanSpeed,dragThreshold:V.connectionDragThreshold})}O?m?.(Z):p?.(Z)},k=Z=>{const{onClickConnectStart:O,onClickConnectEnd:V,connectionClickStartHandle:I,connectionMode:P,isValidConnection:le,lib:z,rfId:Y,nodeLookup:ae,connection:D}=E.getState();if(!C||!I&&!o)return;if(!I){O?.(Z.nativeEvent,{nodeId:C,handleId:S,handleType:t}),E.setState({connectionClickStartHandle:{nodeId:C,type:t,id:S}});return}const U=rT(Z.target),$=i||le,{connection:re,isValid:oe}=Bp.isValid(Z.nativeEvent,{handle:{nodeId:C,id:S,type:t},connectionMode:P,fromNodeId:I.nodeId,fromHandleId:I.id||null,fromType:I.type,isValidConnection:$,flowId:Y,doc:U,lib:z,nodeLookup:ae});oe&&re&&F(re);const fe=structuredClone(D);delete fe.inProgress,fe.toPosition=fe.toHandle?fe.toHandle.position:null,V?.(Z,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,h,{source:!N,target:N,connectable:l,connectablestart:o,connectableend:u,clickconnecting:M,connectingfrom:R,connectingto:q,valid:B,connectionindicator:l&&(!H||L)&&(H||K?u:o)}]),onMouseDown:J,onTouchStart:J,onClick:A?k:void 0,ref:b,...y,children:g})}const xi=ee.memo(MT(sz));function uz({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 cz({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 fz(){return null}function dz({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 Ks={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},w_={input:uz,default:cz,output:dz,group:fz};function hz(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 gz=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 vz({onSelectionContextMenu:t,noPanClassName:r,disableKeyboardA11y:i}){const l=Fe(),{width:o,height:u,transformString:c,userSelectionActive:f}=Oe(gz,Ze),g=OT(),h=ee.useRef(null);if(ee.useEffect(()=>{i||h.current?.focus({preventScroll:!0})},[i]),qT({nodeRef:h}),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(Ks,y.key)&&(y.preventDefault(),g({direction:Ks[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:h,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,mz=t=>({nodesSelectionActive:t.nodesSelectionActive,userSelectionActive:t.userSelectionActive});function DT({children:t,onPaneClick:r,onPaneMouseEnter:i,onPaneMouseMove:l,onPaneMouseLeave:o,onPaneContextMenu:u,onPaneScroll:c,paneClickDistance:f,deleteKeyCode:g,selectionKeyCode:h,selectionOnDrag:m,selectionMode:p,onSelectionStart:y,onSelectionEnd:b,multiSelectionKeyCode:S,panActivationKeyCode:N,zoomActivationKeyCode:E,elementsSelectable:C,zoomOnScroll:A,zoomOnPinch:w,panOnScroll:T,panOnScrollSpeed:R,panOnScrollMode:q,zoomOnDoubleClick:M,panOnDrag:L,defaultViewport:H,translateExtent:K,minZoom:B,maxZoom:F,preventScrolling:J,onSelectionContextMenu:k,noWheelClassName:Z,noPanClassName:O,disableKeyboardA11y:V,onViewportChange:I,isControlledViewport:P}){const{nodesSelectionActive:le,userSelectionActive:z}=Oe(mz,Ze),Y=Bl(h,{target:S_}),ae=Bl(N,{target:S_}),D=ae||L,U=ae||T,$=m&&D!==!0,re=Y||z||$;return $5({deleteKeyCode:g,multiSelectionKeyCode:S}),x.jsx(W5,{onPaneContextMenu:u,elementsSelectable:C,zoomOnScroll:A,zoomOnPinch:w,panOnScroll:U,panOnScrollSpeed:R,panOnScrollMode:q,zoomOnDoubleClick:M,panOnDrag:!Y&&D,defaultViewport:H,translateExtent:K,minZoom:B,maxZoom:F,zoomActivationKeyCode:E,preventScrolling:J,noWheelClassName:Z,noPanClassName:O,onViewportChange:I,isControlledViewport:P,paneClickDistance:f,selectionOnDrag:$,children:x.jsxs(rz,{onSelectionStart:y,onSelectionEnd:b,onPaneClick:r,onPaneMouseEnter:i,onPaneMouseMove:l,onPaneMouseLeave:o,onPaneContextMenu:u,onPaneScroll:c,panOnDrag:D,isSelecting:!!re,selectionMode:p,selectionKeyPressed:Y,paneClickDistance:f,selectionOnDrag:$,children:[t,le&&x.jsx(vz,{onSelectionContextMenu:k,noPanClassName:O,disableKeyboardA11y:V})]})})}DT.displayName="FlowRenderer";const pz=ee.memo(DT),yz=t=>r=>t?Pp(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 xz(t){return Oe(ee.useCallback(yz(t),[t]),Ze)}const bz=t=>t.updateNodeInternals;function _z(){const t=Oe(bz),[r]=ee.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 ee.useEffect(()=>()=>{r?.disconnect()},[r]),r}function wz({node:t,nodeType:r,hasDimensions:i,resizeObserver:l}){const o=Fe(),u=ee.useRef(null),c=ee.useRef(null),f=ee.useRef(t.sourcePosition),g=ee.useRef(t.targetPosition),h=ee.useRef(r),m=i&&!!t.internals.handleBounds;return ee.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]),ee.useEffect(()=>()=>{c.current&&(l?.unobserve(c.current),c.current=null)},[]),ee.useEffect(()=>{if(u.current){const p=h.current!==r,y=f.current!==t.sourcePosition,b=g.current!==t.targetPosition;(p||y||b)&&(h.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 Sz({id:t,onClick:r,onMouseEnter:i,onMouseMove:l,onMouseLeave:o,onContextMenu:u,onDoubleClick:c,nodesDraggable:f,elementsSelectable:g,nodesConnectable:h,nodesFocusable:m,resizeObserver:p,noDragClassName:y,noPanClassName:b,disableKeyboardA11y:S,rfId:N,nodeTypes:E,nodeClickDistance:C,onError:A}){const{node:w,internals:T,isParent:R}=Oe(oe=>{const fe=oe.nodeLookup.get(t),he=oe.parentLookup.has(t);return{node:fe,internals:fe.internals,isParent:he}},Ze);let q=w.type||"default",M=E?.[q]||w_[q];M===void 0&&(A?.("003",Tn.error003(q)),q="default",M=E?.default||w_.default);const L=!!(w.draggable||f&&typeof w.draggable>"u"),H=!!(w.selectable||g&&typeof w.selectable>"u"),K=!!(w.connectable||h&&typeof w.connectable>"u"),B=!!(w.focusable||m&&typeof w.focusable>"u"),F=Fe(),J=tT(w),k=wz({node:w,nodeType:q,hasDimensions:J,resizeObserver:p}),Z=qT({nodeRef:k,disabled:w.hidden||!L,noDragClassName:y,handleSelector:w.dragHandle,nodeId:t,isSelectable:H,nodeClickDistance:C}),O=OT();if(w.hidden)return null;const V=rr(w),I=hz(w),P=H||L||r||i||l||o,le=i?oe=>i(oe,{...T.userNode}):void 0,z=l?oe=>l(oe,{...T.userNode}):void 0,Y=o?oe=>o(oe,{...T.userNode}):void 0,ae=u?oe=>u(oe,{...T.userNode}):void 0,D=c?oe=>c(oe,{...T.userNode}):void 0,U=oe=>{const{selectNodesOnDrag:fe,nodeDragThreshold:he}=F.getState();H&&(!fe||!L||he>0)&&Up({id:t,store:F,nodeRef:k}),r&&r(oe,{...T.userNode})},$=oe=>{if(!(aT(oe.nativeEvent)||S)){if(ZC.includes(oe.key)&&H){const fe=oe.key==="Escape";Up({id:t,store:F,unselect:fe,nodeRef:k})}else if(L&&w.selected&&Object.prototype.hasOwnProperty.call(Ks,oe.key)){oe.preventDefault();const{ariaLabelConfig:fe}=F.getState();F.setState({ariaLiveMessage:fe["node.a11yDescription.ariaLiveMessage"]({direction:oe.key.replace("Arrow","").toLowerCase(),x:~~T.positionAbsolute.x,y:~~T.positionAbsolute.y})}),O({direction:Ks[oe.key],factor:oe.shiftKey?4:1})}}},re=()=>{if(S||!k.current?.matches(":focus-visible"))return;const{transform:oe,width:fe,height:he,autoPanOnNodeFocus:ye,setCenter:xe}=F.getState();if(!ye)return;Pp(new Map([[t,w]]),{x:0,y:0,width:fe,height:he},oe,!0).length>0||xe(w.position.x+V.width/2,w.position.y+V.height/2,{zoom:oe[2]})};return x.jsx("div",{className:st(["react-flow__node",`react-flow__node-${q}`,{[b]:L},w.className,{selected:w.selected,selectable:H,parent:R,draggable:L,dragging:Z}]),ref:k,style:{zIndex:T.z,transform:`translate(${T.positionAbsolute.x}px,${T.positionAbsolute.y}px)`,pointerEvents:P?"all":"none",visibility:J?"visible":"hidden",...w.style,...I},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:le,onMouseMove:z,onMouseLeave:Y,onContextMenu:ae,onClick:U,onDoubleClick:D,onKeyDown:B?$:void 0,tabIndex:B?0:void 0,onFocus:B?re:void 0,role:w.ariaRole??(B?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${ET}-${N}`,"aria-label":w.ariaLabel,...w.domAttributes,children:x.jsx(iz,{value:t,children:x.jsx(M,{id:t,data:w.data,type:q,positionAbsoluteX:T.positionAbsolute.x,positionAbsoluteY:T.positionAbsolute.y,selected:w.selected??!1,selectable:H,draggable:L,deletable:w.deletable??!0,isConnectable:K,sourcePosition:w.sourcePosition,targetPosition:w.targetPosition,dragging:Z,dragHandle:w.dragHandle,zIndex:T.z,parentId:w.parentId,...V})})})}var Ez=ee.memo(Sz);const Nz=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,onError:t.onError});function kT(t){const{nodesDraggable:r,nodesConnectable:i,nodesFocusable:l,elementsSelectable:o,onError:u}=Oe(Nz,Ze),c=xz(t.onlyRenderVisibleElements),f=_z();return x.jsx("div",{className:"react-flow__nodes",style:uu,children:c.map(g=>x.jsx(Ez,{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))})}kT.displayName="NodeRenderer";const Cz=ee.memo(kT);function Tz(t){return Oe(ee.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&&CO({sourceNode:u,targetNode:c,width:i.width,height:i.height,transform:i.transform})&&l.push(o.id)}return l},[t]),Ze)}const Az=({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"})},jz=({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_={[Xs.Arrow]:Az,[Xs.ArrowClosed]:jz};function Mz(t){const r=Fe();return ee.useMemo(()=>Object.prototype.hasOwnProperty.call(E_,t)?E_[t]:(r.getState().onError?.("009",Tn.error009(t)),null),[t])}const Rz=({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=Mz(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},HT=({defaultColor:t,rfId:r})=>{const i=Oe(u=>u.edges),l=Oe(u=>u.defaultEdgeOptions),o=ee.useMemo(()=>OO(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(Rz,{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};HT.displayName="MarkerDefinitions";var qz=ee.memo(HT);function LT({x:t,y:r,label:i,labelStyle:l,labelShowBg:o=!0,labelBgStyle:u,labelBgPadding:c=[2,4],labelBgBorderRadius:f=2,children:g,className:h,...m}){const[p,y]=ee.useState({x:1,y:0,width:0,height:0}),b=st(["react-flow__edge-textwrapper",h]),S=ee.useRef(null);return ee.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}LT.displayName="EdgeText";const Oz=ee.memo(LT);function cu({path:t,labelX:r,labelY:i,label:l,labelStyle:o,labelShowBg:u,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:g,interactionWidth:h=20,...m}){return x.jsxs(x.Fragment,{children:[x.jsx("path",{...m,d:t,fill:"none",className:st(["react-flow__edge-path",m.className])}),h?x.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}):null,l&&gn(r)&&gn(i)?x.jsx(Oz,{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 BT({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,h]=N_({pos:u,x1:l,y1:o,x2:t,y2:r}),[m,p,y,b]=lT({sourceX:t,sourceY:r,targetX:l,targetY:o,sourceControlX:c,sourceControlY:f,targetControlX:g,targetControlY:h});return[`M${t},${r} C${c},${f} ${g},${h} ${l},${o}`,m,p,y,b]}function UT(t){return ee.memo(({id:r,sourceX:i,sourceY:l,targetX:o,targetY:u,sourcePosition:c,targetPosition:f,label:g,labelStyle:h,labelShowBg:m,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:b,style:S,markerEnd:N,markerStart:E,interactionWidth:C})=>{const[A,w,T]=BT({sourceX:i,sourceY:l,sourcePosition:c,targetX:o,targetY:u,targetPosition:f}),R=t.isInternal?void 0:r;return x.jsx(cu,{id:R,path:A,labelX:w,labelY:T,label:g,labelStyle:h,labelShowBg:m,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:b,style:S,markerEnd:N,markerStart:E,interactionWidth:C})})}const zz=UT({isInternal:!1}),GT=UT({isInternal:!0});zz.displayName="SimpleBezierEdge";GT.displayName="SimpleBezierEdgeInternal";function VT(t){return ee.memo(({id:r,sourceX:i,sourceY:l,targetX:o,targetY:u,label:c,labelStyle:f,labelShowBg:g,labelBgStyle:h,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,R]=kp({sourceX:i,sourceY:l,sourcePosition:b,targetX:o,targetY:u,targetPosition:S,borderRadius:C?.borderRadius,offset:C?.offset,stepPosition:C?.stepPosition}),q=t.isInternal?void 0:r;return x.jsx(cu,{id:q,path:w,labelX:T,labelY:R,label:c,labelStyle:f,labelShowBg:g,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:p,style:y,markerEnd:N,markerStart:E,interactionWidth:A})})}const YT=VT({isInternal:!1}),IT=VT({isInternal:!0});YT.displayName="SmoothStepEdge";IT.displayName="SmoothStepEdgeInternal";function XT(t){return ee.memo(({id:r,...i})=>{const l=t.isInternal?void 0:r;return x.jsx(YT,{...i,id:l,pathOptions:ee.useMemo(()=>({borderRadius:0,offset:i.pathOptions?.offset}),[i.pathOptions?.offset])})})}const Dz=XT({isInternal:!1}),ZT=XT({isInternal:!0});Dz.displayName="StepEdge";ZT.displayName="StepEdgeInternal";function FT(t){return ee.memo(({id:r,sourceX:i,sourceY:l,targetX:o,targetY:u,label:c,labelStyle:f,labelShowBg:g,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:p,style:y,markerEnd:b,markerStart:S,interactionWidth:N})=>{const[E,C,A]=cT({sourceX:i,sourceY:l,targetX:o,targetY:u}),w=t.isInternal?void 0:r;return x.jsx(cu,{id:w,path:E,labelX:C,labelY:A,label:c,labelStyle:f,labelShowBg:g,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:p,style:y,markerEnd:b,markerStart:S,interactionWidth:N})})}const kz=FT({isInternal:!1}),KT=FT({isInternal:!0});kz.displayName="StraightEdge";KT.displayName="StraightEdgeInternal";function QT(t){return ee.memo(({id:r,sourceX:i,sourceY:l,targetX:o,targetY:u,sourcePosition:c=pe.Bottom,targetPosition:f=pe.Top,label:g,labelStyle:h,labelShowBg:m,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:b,style:S,markerEnd:N,markerStart:E,pathOptions:C,interactionWidth:A})=>{const[w,T,R]=oT({sourceX:i,sourceY:l,sourcePosition:c,targetX:o,targetY:u,targetPosition:f,curvature:C?.curvature}),q=t.isInternal?void 0:r;return x.jsx(cu,{id:q,path:w,labelX:T,labelY:R,label:g,labelStyle:h,labelShowBg:m,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:b,style:S,markerEnd:N,markerStart:E,interactionWidth:A})})}const Hz=QT({isInternal:!1}),$T=QT({isInternal:!0});Hz.displayName="BezierEdge";$T.displayName="BezierEdgeInternal";const C_={default:$T,straight:KT,step:ZT,smoothstep:IT,simplebezier:GT},T_={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},Lz=(t,r,i)=>i===pe.Left?t-r:i===pe.Right?t+r:t,Bz=(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:Lz(r,l,t),cy:Bz(i,l,t),r:l,stroke:"transparent",fill:"transparent"})}function Uz({isReconnectable:t,reconnectRadius:r,edge:i,sourceX:l,sourceY:o,targetX:u,targetY:c,sourcePosition:f,targetPosition:g,onReconnect:h,onReconnectStart:m,onReconnectEnd:p,setReconnecting:y,setUpdateHover:b}){const S=Fe(),N=(T,R)=>{if(T.button!==0)return;const{autoPanOnConnect:q,domNode:M,isValidConnection:L,connectionMode:H,connectionRadius:K,lib:B,onConnectStart:F,onConnectEnd:J,cancelConnection:k,nodeLookup:Z,rfId:O,panBy:V,updateConnection:I}=S.getState(),P=R.type==="target",le=(ae,D)=>{y(!1),p?.(ae,i,R.type,D)},z=ae=>h?.(i,ae),Y=(ae,D)=>{y(!0),m?.(T,i,R.type),F?.(ae,D)};Bp.onPointerDown(T.nativeEvent,{autoPanOnConnect:q,connectionMode:H,connectionRadius:K,domNode:M,handleId:R.id,nodeId:R.nodeId,nodeLookup:Z,isTarget:P,edgeUpdaterType:R.type,lib:B,flowId:O,cancelConnection:k,panBy:V,isValidConnection:L,onConnect:z,onConnectStart:Y,onConnectEnd:J,onReconnectEnd:le,updateConnection:I,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 Gz({id:t,edgesFocusable:r,edgesReconnectable:i,elementsSelectable:l,onClick:o,onDoubleClick:u,onContextMenu:c,onMouseEnter:f,onMouseMove:g,onMouseLeave:h,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 R=w.type||"default",q=N?.[R]||C_[R];q===void 0&&(C?.("011",Tn.error011(R)),R="default",q=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"),K=ee.useRef(null),[B,F]=ee.useState(!1),[J,k]=ee.useState(!1),Z=Fe(),{zIndex:O,sourceX:V,sourceY:I,targetX:P,targetY:le,sourcePosition:z,targetPosition:Y}=Oe(ee.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=qO({id:t,sourceNode:ge,targetNode:_e,sourceHandle:w.sourceHandle||null,targetHandle:w.targetHandle||null,connectionMode:xe.connectionMode,onError:C});return{zIndex:NO({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=ee.useMemo(()=>w.markerStart?`url('#${Hp(w.markerStart,S)}')`:void 0,[w.markerStart,S]),D=ee.useMemo(()=>w.markerEnd?`url('#${Hp(w.markerEnd,S)}')`:void 0,[w.markerEnd,S]);if(w.hidden||V===null||I===null||P===null||le===null)return null;const U=xe=>{const{addSelectedEdges:ge,unselectNodesAndEdges:_e,multiSelectionActive:ve}=Z.getState();H&&(Z.setState({nodesSelectionActive:!1}),w.selected&&ve?(_e({nodes:[],edges:[w]}),K.current?.blur()):ge([t])),o&&o(xe,w)},$=u?xe=>{u(xe,{...w})}:void 0,re=c?xe=>{c(xe,{...w})}:void 0,oe=f?xe=>{f(xe,{...w})}:void 0,fe=g?xe=>{g(xe,{...w})}:void 0,he=h?xe=>{h(xe,{...w})}:void 0,ye=xe=>{if(!A&&ZC.includes(xe.key)&&H){const{unselectNodesAndEdges:ge,addSelectedEdges:_e}=Z.getState();xe.key==="Escape"?(K.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-${R}`,w.className,E,{selected:w.selected,animated:w.animated,inactive:!H&&!o,updating:B,selectable:H}]),onClick:U,onDoubleClick:$,onContextMenu:re,onMouseEnter:oe,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?`${NT}-${S}`:void 0,ref:K,...w.domAttributes,children:[!J&&x.jsx(q,{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:V,sourceY:I,targetX:P,targetY:le,sourcePosition:z,targetPosition:Y,data:w.data,style:w.style,sourceHandleId:w.sourceHandle,targetHandleId:w.targetHandle,markerStart:ae,markerEnd:D,pathOptions:"pathOptions"in w?w.pathOptions:void 0,interactionWidth:w.interactionWidth}),L&&x.jsx(Uz,{edge:w,isReconnectable:L,reconnectRadius:m,onReconnect:p,onReconnectStart:y,onReconnectEnd:b,sourceX:V,sourceY:I,targetX:P,targetY:le,sourcePosition:z,targetPosition:Y,setUpdateHover:F,setReconnecting:k})]})})}var Vz=ee.memo(Gz);const Yz=t=>({edgesFocusable:t.edgesFocusable,edgesReconnectable:t.edgesReconnectable,elementsSelectable:t.elementsSelectable,connectionMode:t.connectionMode,onError:t.onError});function PT({defaultMarkerColor:t,onlyRenderVisibleElements:r,rfId:i,edgeTypes:l,noPanClassName:o,onReconnect:u,onEdgeContextMenu:c,onEdgeMouseEnter:f,onEdgeMouseMove:g,onEdgeMouseLeave:h,onEdgeClick:m,reconnectRadius:p,onEdgeDoubleClick:y,onReconnectStart:b,onReconnectEnd:S,disableKeyboardA11y:N}){const{edgesFocusable:E,edgesReconnectable:C,elementsSelectable:A,onError:w}=Oe(Yz,Ze),T=Tz(r);return x.jsxs("div",{className:"react-flow__edges",children:[x.jsx(qz,{defaultColor:t,rfId:i}),T.map(R=>x.jsx(Vz,{id:R,edgesFocusable:E,edgesReconnectable:C,elementsSelectable:A,noPanClassName:o,onReconnect:u,onContextMenu:c,onMouseEnter:f,onMouseMove:g,onMouseLeave:h,onClick:m,reconnectRadius:p,onDoubleClick:y,onReconnectStart:b,onReconnectEnd:S,rfId:i,onError:w,edgeTypes:l,disableKeyboardA11y:N},R))]})}PT.displayName="EdgeRenderer";const Iz=ee.memo(PT),Xz=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function Zz({children:t}){const r=Oe(Xz);return x.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:r},children:t})}function Fz(t){const r=iy(),i=ee.useRef(!1);ee.useEffect(()=>{!i.current&&r.viewportInitialized&&t&&(setTimeout(()=>t(r),1),i.current=!0)},[t,r.viewportInitialized])}const Kz=t=>t.panZoom?.syncViewport;function Qz(t){const r=Oe(Kz),i=Fe();return ee.useEffect(()=>{t&&(r?.(t),i.setState({transform:[t.x,t.y,t.zoom]}))},[t,r]),null}function $z(t){return t.connection.inProgress?{...t.connection,to:Zl(t.connection.to,t.transform)}:{...t.connection}}function Pz(t){return $z}function Jz(t){const r=Pz();return Oe(r,Ze)}const Wz=t=>({nodesConnectable:t.nodesConnectable,isValid:t.connection.isValid,inProgress:t.connection.inProgress,width:t.width,height:t.height});function eD({containerStyle:t,style:r,type:i,component:l}){const{nodesConnectable:o,width:u,height:c,isValid:f,inProgress:g}=Oe(Wz,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",QC(f)]),children:x.jsx(JT,{style:r,type:i,CustomComponent:l,isValid:f})})})}const JT=({style:t,type:r=Hr.Bezier,CustomComponent:i,isValid:l})=>{const{inProgress:o,from:u,fromNode:c,fromHandle:f,fromPosition:g,to:h,toNode:m,toHandle:p,toPosition:y,pointer:b}=Jz();if(!o)return;if(i)return x.jsx(i,{connectionLineType:r,connectionLineStyle:t,fromNode:c,fromHandle:f,fromX:u.x,fromY:u.y,toX:h.x,toY:h.y,fromPosition:g,toPosition:y,connectionStatus:QC(l),toNode:m,toHandle:p,pointer:b});let S="";const N={sourceX:u.x,sourceY:u.y,sourcePosition:g,targetX:h.x,targetY:h.y,targetPosition:y};switch(r){case Hr.Bezier:[S]=oT(N);break;case Hr.SimpleBezier:[S]=BT(N);break;case Hr.Step:[S]=kp({...N,borderRadius:0});break;case Hr.SmoothStep:[S]=kp(N);break;default:[S]=cT(N)}return x.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:t})};JT.displayName="ConnectionLine";const tD={};function M_(t=tD){ee.useRef(t),Fe(),ee.useEffect(()=>{},[t])}function nD(){Fe(),ee.useRef(!1),ee.useEffect(()=>{},[])}function WT({nodeTypes:t,edgeTypes:r,onInit:i,onNodeClick:l,onEdgeClick:o,onNodeDoubleClick:u,onEdgeDoubleClick:c,onNodeMouseEnter:f,onNodeMouseMove:g,onNodeMouseLeave:h,onNodeContextMenu:m,onSelectionContextMenu:p,onSelectionStart:y,onSelectionEnd:b,connectionLineType:S,connectionLineStyle:N,connectionLineComponent:E,connectionLineContainerStyle:C,selectionKeyCode:A,selectionOnDrag:w,selectionMode:T,multiSelectionKeyCode:R,panActivationKeyCode:q,zoomActivationKeyCode:M,deleteKeyCode:L,onlyRenderVisibleElements:H,elementsSelectable:K,defaultViewport:B,translateExtent:F,minZoom:J,maxZoom:k,preventScrolling:Z,defaultMarkerColor:O,zoomOnScroll:V,zoomOnPinch:I,panOnScroll:P,panOnScrollSpeed:le,panOnScrollMode:z,zoomOnDoubleClick:Y,panOnDrag:ae,onPaneClick:D,onPaneMouseEnter:U,onPaneMouseMove:$,onPaneMouseLeave:re,onPaneScroll:oe,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),nD(),Fz(i),Qz(ln),x.jsx(pz,{onPaneClick:D,onPaneMouseEnter:U,onPaneMouseMove:$,onPaneMouseLeave:re,onPaneContextMenu:fe,onPaneScroll:oe,paneClickDistance:he,deleteKeyCode:L,selectionKeyCode:A,selectionOnDrag:w,selectionMode:T,onSelectionStart:y,onSelectionEnd:b,multiSelectionKeyCode:R,panActivationKeyCode:q,zoomActivationKeyCode:M,elementsSelectable:K,zoomOnScroll:V,zoomOnPinch:I,zoomOnDoubleClick:Y,panOnScroll:P,panOnScrollSpeed:le,panOnScrollMode:z,panOnDrag:ae,defaultViewport:B,translateExtent:F,minZoom:J,maxZoom:k,onSelectionContextMenu:p,preventScrolling:Z,noDragClassName:Ht,noWheelClassName:Et,noPanClassName:yt,disableKeyboardA11y:$e,onViewportChange:on,isControlledViewport:!!ln,children:x.jsxs(Zz,{children:[x.jsx(Iz,{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(eD,{style:N,type:S,component:E,containerStyle:C}),x.jsx("div",{className:"react-flow__edgelabel-renderer"}),x.jsx(Cz,{nodeTypes:t,onNodeClick:l,onNodeDoubleClick:u,onNodeMouseEnter:f,onNodeMouseMove:g,onNodeMouseLeave:h,onNodeContextMenu:m,nodeClickDistance:ye,onlyRenderVisibleElements:H,noPanClassName:yt,noDragClassName:Ht,disableKeyboardA11y:$e,nodeExtent:Pe,rfId:an}),x.jsx("div",{className:"react-flow__viewport-portal"})]})})}WT.displayName="GraphView";const rD=ee.memo(WT),R_=({nodes:t,edges:r,defaultNodes:i,defaultEdges:l,width:o,height:u,fitView:c,fitViewOptions:f,minZoom:g=.5,maxZoom:h=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;hT(N,E,C);const R=Lp(A,b,S,{nodeOrigin:w,nodeExtent:T,zIndexMode:y});let q=[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:K}=Jp(M,o,u,g,h,f?.padding??.1);q=[L,H,K]}return{rfId:"1",width:o??0,height:u??0,transform:q,nodes:A,nodesInitialized:R,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:h,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:{...KC},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:xO,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:FC,zIndexMode:y,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},aD=({nodes:t,edges:r,defaultNodes:i,defaultEdges:l,width:o,height:u,fitView:c,fitViewOptions:f,minZoom:g,maxZoom:h,nodeOrigin:m,nodeExtent:p,zIndexMode:y})=>w5((b,S)=>{async function N(){const{nodeLookup:E,panZoom:C,fitViewOptions:A,fitViewResolver:w,width:T,height:R,minZoom:q,maxZoom:M}=S();C&&(await pO({nodes:E,width:T,height:R,panZoom:C,minZoom:q,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:h,nodeOrigin:m,nodeExtent:p,defaultNodes:i,defaultEdges:l,zIndexMode:y}),setNodes:E=>{const{nodeLookup:C,parentLookup:A,nodeOrigin:w,elevateNodesOnSelect:T,fitViewQueued:R,zIndexMode:q}=S(),M=Lp(E,C,A,{nodeOrigin:w,nodeExtent:p,elevateNodesOnSelect:T,checkEquality:!0,zIndexMode:q});R&&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();hT(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:R,nodeExtent:q,debug:M,fitViewQueued:L,zIndexMode:H}=S(),{changes:K,updatedInternals:B}=UO(E,A,w,T,R,q,H);B&&(kO(A,w,{nodeOrigin:R,nodeExtent:q,zIndexMode:H}),L?(N(),b({fitViewQueued:!1,fitViewOptions:void 0})):b({}),K?.length>0&&(M&&console.log("React Flow: trigger node changes",K),C?.(K)))},updateNodePositions:(E,C=!1)=>{const A=[];let w=[];const{nodeLookup:T,triggerNodeChanges:R,connection:q,updateConnection:M,onNodesChangeMiddlewareMap:L}=S();for(const[H,K]of E){const B=T.get(H),F=!!(B?.expandParent&&B?.parentId&&K?.position),J={id:H,type:"position",position:F?{x:Math.max(0,K.position.x),y:Math.max(0,K.position.y)}:K.position,dragging:C};if(B&&q.inProgress&&q.fromNode.id===B.id){const k=ga(B,q.fromHandle,pe.Left,!0);M({...q,from:k})}F&&B.parentId&&A.push({id:H,parentId:B.parentId,rect:{...K.internals.positionAbsolute,width:K.measured.width??0,height:K.measured.height??0}}),w.push(J)}if(A.length>0){const{parentLookup:H,nodeOrigin:K}=S(),B=ay(A,T,H,K);w.push(...B)}for(const H of L.values())w=H(w);R(w)},triggerNodeChanges:E=>{const{onNodesChange:C,setNodes:A,nodes:w,hasDefaultNodes:T,debug:R}=S();if(E?.length){if(T){const q=AT(E,w);A(q)}R&&console.log("React Flow: trigger node changes",E),C?.(E)}},triggerEdgeChanges:E=>{const{onEdgesChange:C,setEdges:A,edges:w,hasDefaultEdges:T,debug:R}=S();if(E?.length){if(T){const q=jT(E,w);A(q)}R&&console.log("React Flow: trigger edge changes",E),C?.(E)}},addSelectedNodes:E=>{const{multiSelectionActive:C,edgeLookup:A,nodeLookup:w,triggerNodeChanges:T,triggerEdgeChanges:R}=S();if(C){const q=E.map(M=>oa(M,!0));T(q);return}T(ui(w,new Set([...E]),!0)),R(ui(A))},addSelectedEdges:E=>{const{multiSelectionActive:C,edgeLookup:A,nodeLookup:w,triggerNodeChanges:T,triggerEdgeChanges:R}=S();if(C){const q=E.map(M=>oa(M,!0));R(q);return}R(ui(A,new Set([...E]))),T(ui(w,new Set,!0))},unselectNodesAndEdges:({nodes:E,edges:C}={})=>{const{edges:A,nodes:w,nodeLookup:T,triggerNodeChanges:R,triggerEdgeChanges:q}=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)}),K=L.map(B=>oa(B.id,!1));R(H),q(K)},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 R=C.reduce((M,L)=>L.selected?[...M,oa(L.id,!1)]:M,[]),q=E.reduce((M,L)=>L.selected?[...M,oa(L.id,!1)]:M,[]);A(R),w(q)},setNodeExtent:E=>{const{nodes:C,nodeLookup:A,parentLookup:w,nodeOrigin:T,elevateNodesOnSelect:R,nodeExtent:q,zIndexMode:M}=S();E[0][0]===q[0][0]&&E[0][1]===q[0][1]&&E[1][0]===q[1][0]&&E[1][1]===q[1][1]||(Lp(C,A,w,{nodeOrigin:T,nodeExtent:E,elevateNodesOnSelect:R,checkEquality:!1,zIndexMode:M}),b({nodeExtent:E}))},panBy:E=>{const{transform:C,width:A,height:w,panZoom:T,translateExtent:R}=S();return GO({delta:E,panZoom:T,transform:C,translateExtent:R,width:A,height:w})},setCenter:async(E,C,A)=>{const{width:w,height:T,maxZoom:R,panZoom:q}=S();if(!q)return Promise.resolve(!1);const M=typeof A?.zoom<"u"?A.zoom:R;return await q.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:{...KC}})},updateConnection:E=>{b({connection:E})},reset:()=>b({...R_()})}},Object.is);function iD({initialNodes:t,initialEdges:r,defaultNodes:i,defaultEdges:l,initialWidth:o,initialHeight:u,initialMinZoom:c,initialMaxZoom:f,initialFitViewOptions:g,fitView:h,nodeOrigin:m,nodeExtent:p,zIndexMode:y,children:b}){const[S]=ee.useState(()=>aD({nodes:t,edges:r,defaultNodes:i,defaultEdges:l,width:o,height:u,fitView:h,minZoom:c,maxZoom:f,fitViewOptions:g,nodeOrigin:m,nodeExtent:p,zIndexMode:y}));return x.jsx(S5,{value:S,children:x.jsx(Z5,{children:b})})}function lD({children:t,nodes:r,edges:i,defaultNodes:l,defaultEdges:o,width:u,height:c,fitView:f,fitViewOptions:g,minZoom:h,maxZoom:m,nodeOrigin:p,nodeExtent:y,zIndexMode:b}){return ee.useContext(ou)?x.jsx(x.Fragment,{children:t}):x.jsx(iD,{initialNodes:r,initialEdges:i,defaultNodes:l,defaultEdges:o,initialWidth:u,initialHeight:c,fitView:f,initialFitViewOptions:g,initialMinZoom:h,initialMaxZoom:m,nodeOrigin:p,nodeExtent:y,zIndexMode:b,children:t})}const oD={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function sD({nodes:t,edges:r,defaultNodes:i,defaultEdges:l,className:o,nodeTypes:u,edgeTypes:c,onNodeClick:f,onEdgeClick:g,onInit:h,onMove:m,onMoveStart:p,onMoveEnd:y,onConnect:b,onConnectStart:S,onConnectEnd:N,onClickConnectStart:E,onClickConnectEnd:C,onNodeMouseEnter:A,onNodeMouseMove:w,onNodeMouseLeave:T,onNodeContextMenu:R,onNodeDoubleClick:q,onNodeDragStart:M,onNodeDrag:L,onNodeDragStop:H,onNodesDelete:K,onEdgesDelete:B,onDelete:F,onSelectionChange:J,onSelectionDragStart:k,onSelectionDrag:Z,onSelectionDragStop:O,onSelectionContextMenu:V,onSelectionStart:I,onSelectionEnd:P,onBeforeDelete:le,connectionMode:z,connectionLineType:Y=Hr.Bezier,connectionLineStyle:ae,connectionLineComponent:D,connectionLineContainerStyle:U,deleteKeyCode:$="Backspace",selectionKeyCode:re="Shift",selectionOnDrag:oe=!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=CT,edgesFocusable:yt,edgesReconnectable:$e,elementsSelectable:Pe=!0,defaultViewport:an=k5,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:ju=!0,panOnDrag:Mu=!0,onPaneClick:Ru,onPaneMouseEnter:_a,onPaneMouseMove:wa,onPaneMouseLeave:Sa,onPaneScroll:Rn,onPaneContextMenu:Ea,paneClickDistance:Ur=1,nodeClickDistance:qu=0,children:Jl,onReconnect:Ci,onReconnectStart:Gr,onReconnectEnd:Ou,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:zu,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:Du,id:Mi,nodeDragThreshold:so,connectionDragThreshold:ku,viewport:Ca,onViewportChange:Ta,width:sn,height:Ct,colorMode:uo="light",debug:Hu,onScroll:Aa,ariaLabelConfig:co,zIndexMode:Yr="basic",...Lu},Tt){const Ir=Mi||"1",fo=U5(uo),Ri=ee.useCallback(zn=>{zn.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Aa?.(zn)},[Aa]);return x.jsx("div",{"data-testid":"rf__wrapper",...Lu,onScroll:Ri,style:{...Du,...oD},ref:Tt,className:st(["react-flow",o,fo]),id:Mi,role:"application",children:x.jsxs(lD,{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(rD,{onInit:h,onNodeClick:f,onEdgeClick:g,onNodeMouseEnter:A,onNodeMouseMove:w,onNodeMouseLeave:T,onNodeContextMenu:R,onNodeDoubleClick:q,nodeTypes:u,edgeTypes:c,connectionLineType:Y,connectionLineStyle:ae,connectionLineComponent:D,connectionLineContainerStyle:U,selectionKeyCode:re,selectionOnDrag:oe,selectionMode:fe,deleteKeyCode:$,multiSelectionKeyCode:ye,panActivationKeyCode:he,zoomActivationKeyCode:xe,onlyRenderVisibleElements:ve,defaultViewport:an,translateExtent:Nt,minZoom:ln,maxZoom:on,preventScrolling:xa,zoomOnScroll:ba,zoomOnPinch:xt,zoomOnDoubleClick:ju,panOnScroll:Qe,panOnScrollSpeed:xn,panOnScrollMode:wt,panOnDrag:Mu,onPaneClick:Ru,onPaneMouseEnter:_a,onPaneMouseMove:wa,onPaneMouseLeave:Sa,onPaneScroll:Rn,onPaneContextMenu:Ea,paneClickDistance:Ur,nodeClickDistance:qu,onSelectionContextMenu:V,onSelectionStart:I,onSelectionEnd:P,onReconnect:Ci,onReconnectStart:Gr,onReconnectEnd:Ou,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(B5,{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:zu,defaultEdgeOptions:ji,fitView:Na,fitViewOptions:ao,onNodesDelete:K,onEdgesDelete:B,onDelete:F,onNodeDragStart:M,onNodeDrag:L,onNodeDragStop:H,onSelectionDrag:Z,onSelectionDragStart:k,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:ku,onBeforeDelete:le,debug:Hu,ariaLabelConfig:co,zIndexMode:Yr}),x.jsx(D5,{onSelectionChange:J}),Jl,x.jsx(M5,{proOptions:Vr,position:io}),x.jsx(j5,{rfId:Ir,disableKeyboardA11y:sr})]})})}var uD=MT(sD);function cD(t){const[r,i]=ee.useState(t),l=ee.useCallback(o=>i(u=>AT(o,u)),[]);return[r,i,l]}function fD(t){const[r,i]=ee.useState(t),l=ee.useCallback(o=>i(u=>jT(o,u)),[]);return[r,i,l]}function dD({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 hD({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 gD={[Lr.Dots]:1,[Lr.Lines]:1,[Lr.Cross]:6},vD=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function eA({id:t,variant:r=Lr.Dots,gap:i=20,size:l,lineWidth:o=1,offset:u=0,color:c,bgColor:f,style:g,className:h,patternClassName:m}){const p=ee.useRef(null),{transform:y,patternId:b}=Oe(vD,Ze),S=l||gD[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],R=E?[w,w]:A,q=[T[0]*y[2]||1+R[0]/2,T[1]*y[2]||1+R[1]/2],M=`${b}${t||""}`;return x.jsxs("svg",{className:st(["react-flow__background",h]),style:{...g,...uu,"--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(-${q[0]},-${q[1]})`,children:N?x.jsx(hD,{radius:w/2,className:m}):x.jsx(dD,{dimensions:R,lineWidth:o,variant:r,className:m})}),x.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${M})`})]})}eA.displayName="Background";const mD=ee.memo(eA);function pD(){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 yD(){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 xD(){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 bD(){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 _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 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 wD=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom,ariaLabelConfig:t.ariaLabelConfig});function tA({style:t,showZoom:r=!0,showFitView:i=!0,showInteractive:l=!0,fitViewOptions:o,onZoomIn:u,onZoomOut:c,onFitView:f,onInteractiveChange:g,className:h,children:m,position:p="bottom-left",orientation:y="vertical","aria-label":b}){const S=Fe(),{isInteractive:N,minZoomReached:E,maxZoomReached:C,ariaLabelConfig:A}=Oe(wD,Ze),{zoomIn:w,zoomOut:T,fitView:R}=iy(),q=()=>{w(),u?.()},M=()=>{T(),c?.()},L=()=>{R(o),f?.()},H=()=>{S.setState({nodesDraggable:!N,nodesConnectable:!N,elementsSelectable:!N}),g?.(!N)},K=y==="horizontal"?"horizontal":"vertical";return x.jsxs(su,{className:st(["react-flow__controls",K,h]),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:q,className:"react-flow__controls-zoomin",title:A["controls.zoomIn.ariaLabel"],"aria-label":A["controls.zoomIn.ariaLabel"],disabled:C,children:x.jsx(pD,{})}),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(yD,{})})]}),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(xD,{})}),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(_D,{}):x.jsx(bD,{})}),m]})}tA.displayName="Controls";const SD=ee.memo(tA);function ED({id:t,x:r,y:i,width:l,height:o,style:u,color:c,strokeColor:f,strokeWidth:g,className:h,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},h]),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 ND=ee.memo(ED),CD=t=>t.nodes.map(r=>r.id),sd=t=>t instanceof Function?t:()=>t;function TD({nodeStrokeColor:t,nodeColor:r,nodeClassName:i="",nodeBorderRadius:l=5,nodeStrokeWidth:o,nodeComponent:u=ND,onClick:c}){const f=Oe(CD,Ze),g=sd(r),h=sd(t),m=sd(i),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return x.jsx(x.Fragment,{children:f.map(y=>x.jsx(jD,{id:y,nodeColorFunc:g,nodeStrokeColorFunc:h,nodeClassNameFunc:m,nodeBorderRadius:l,nodeStrokeWidth:o,NodeComponent:u,onClick:c,shapeRendering:p},y))})}function AD({id:t,nodeColorFunc:r,nodeStrokeColorFunc:i,nodeClassNameFunc:l,nodeBorderRadius:o,nodeStrokeWidth:u,shapeRendering:c,NodeComponent:f,onClick:g}){const{node:h,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!h||h.hidden||!tT(h)?null:x.jsx(f,{x:m,y:p,width:y,height:b,style:h.style,selected:!!h.selected,className:l(h),color:r(h),borderRadius:o,strokeColor:i(h),strokeWidth:u,shapeRendering:c,onClick:g,id:h.id})}const jD=ee.memo(AD);var MD=ee.memo(TD);const RD=200,qD=150,OD=t=>!t.hidden,zD=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?eT(Il(t.nodeLookup,{filter:OD}),r):r,rfId:t.rfId,panZoom:t.panZoom,translateExtent:t.translateExtent,flowWidth:t.width,flowHeight:t.height,ariaLabelConfig:t.ariaLabelConfig}},DD="react-flow__minimap-desc";function nA({style:t,className:r,nodeStrokeColor:i,nodeColor:l,nodeClassName:o="",nodeBorderRadius:u=5,nodeStrokeWidth:c,nodeComponent:f,bgColor:g,maskColor:h,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 R=Fe(),q=ee.useRef(null),{boundingRect:M,viewBB:L,rfId:H,panZoom:K,translateExtent:B,flowWidth:F,flowHeight:J,ariaLabelConfig:k}=Oe(zD,Ze),Z=t?.width??RD,O=t?.height??qD,V=M.width/Z,I=M.height/O,P=Math.max(V,I),le=P*Z,z=P*O,Y=T*P,ae=M.x-(le-M.width)/2-Y,D=M.y-(z-M.height)/2-Y,U=le+Y*2,$=z+Y*2,re=`${DD}-${H}`,oe=ee.useRef(0),fe=ee.useRef();oe.current=P,ee.useEffect(()=>{if(q.current&&K)return fe.current=$O({domNode:q.current,panZoom:K,getTransform:()=>R.getState().transform,getViewScale:()=>oe.current}),()=>{fe.current?.destroy()}},[K]),ee.useEffect(()=>{fe.current?.update({translateExtent:B,width:F,height:J,inversePan:A,pannable:N,zoomStep:w,zoomable:E})},[N,E,A,w,B,F,J]);const he=b?ge=>{const[_e,ve]=fe.current?.pointer(ge)||[0,0];b(ge,{x:_e,y:ve})}:void 0,ye=S?ee.useCallback((ge,_e)=>{const ve=R.getState().nodeLookup.get(_e).internals.userNode;S(ge,ve)},[]):void 0,xe=C??k["minimap.ariaLabel"];return x.jsx(su,{position:y,style:{...t,"--xy-minimap-background-color-props":typeof g=="string"?g:void 0,"--xy-minimap-mask-background-color-props":typeof h=="string"?h: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:Z,height:O,viewBox:`${ae} ${D} ${U} ${$}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":re,ref:q,onClick:he,children:[xe&&x.jsx("title",{id:re,children:xe}),x.jsx(MD,{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},${D-Y}h${U+Y*2}v${$+Y*2}h${-U-Y*2}z
15
- M${L.x},${L.y}h${L.width}v${L.height}h${-L.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}nA.displayName="MiniMap";const kD=ee.memo(nA),HD=t=>r=>t?`${Math.max(1/r.transform[2],1)}`:void 0,LD={[yi.Line]:"right",[yi.Handle]:"bottom-right"};function BD({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:h=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=zT(),w=typeof t=="string"?t:A,T=Fe(),R=ee.useRef(null),q=i===yi.Handle,M=Oe(ee.useCallback(HD(q&&b),[q,b]),Ze),L=ee.useRef(null),H=r??LD[i];ee.useEffect(()=>{if(!(!R.current||!w))return L.current||(L.current=c5({domNode:R.current,nodeId:w,getStoreItems:()=>{const{nodeLookup:B,transform:F,snapGrid:J,snapToGrid:k,nodeOrigin:Z,domNode:O}=T.getState();return{nodeLookup:B,transform:F,snapGrid:J,snapToGrid:k,nodeOrigin:Z,paneDomNode:O}},onChange:(B,F)=>{const{triggerNodeChanges:J,nodeLookup:k,parentLookup:Z,nodeOrigin:O}=T.getState(),V=[],I={x:B.x,y:B.y},P=k.get(w);if(P&&P.expandParent&&P.parentId){const le=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,...nT({x:B.x??P.position.x,y:B.y??P.position.y},{width:z,height:Y},P.parentId,k,le)}},D=ay([ae],k,Z,O);V.push(...D),I.x=B.x?Math.max(le[0]*z,B.x):void 0,I.y=B.y?Math.max(le[1]*Y,B.y):void 0}if(I.x!==void 0&&I.y!==void 0){const le={id:w,type:"position",position:{...I}};V.push(le)}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}};V.push(z)}for(const le of F){const z={...le,type:"position"};V.push(z)}J(V)},onEnd:({width:B,height:F})=>{const J={id:w,type:"dimensions",resizing:!1,dimensions:{width:B,height:F}};T.getState().triggerNodeChanges([J])}})),L.current.update({controlPosition:H,boundaries:{minWidth:f,minHeight:g,maxWidth:h,maxHeight:m},keepAspectRatio:p,resizeDirection:y,onResizeStart:N,onResize:E,onResizeEnd:C,shouldResize:S}),()=>{L.current?.destroy()}},[H,f,g,h,m,p,N,E,C,S]);const K=H.split("-");return x.jsx("div",{className:st(["react-flow__resize-control","nodrag",...K,i,l]),ref:R,style:{...o,scale:M,...c&&{[q?"backgroundColor":"borderColor"]:c}},children:u})}ee.memo(BD);function UD(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 GD=(()=>{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 Qs(t,r){const l=(t.ownerDocument.defaultView||window).getComputedStyle(t).getPropertyValue(r);return l?parseFloat(l.replace("px","")):0}function VD(t){const r=Qs(t,"border-left-width"),i=Qs(t,"border-right-width");return t.clientWidth+r+i}function YD(t){const r=Qs(t,"border-top-width"),i=Qs(t,"border-bottom-width");return t.clientHeight+r+i}function rA(t,r={}){const i=r.width||VD(t),l=r.height||YD(t);return{width:i,height:l}}function ID(){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 XD(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 $s(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 ZD(t){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(t)).then(encodeURIComponent).then(r=>`data:image/svg+xml;charset=utf-8,${r}`)}async function FD(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),ZD(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 KD(t){const r=t.getPropertyValue("content");return`${t.cssText} content: '${r.replace(/'|"/g,"")}';`}function QD(t){return tr(t).map(r=>{const i=t.getPropertyValue(r),l=t.getPropertyPriority(r);return`${r}: ${i}${l?" !important":""};`}).join(" ")}function $D(t,r,i){const l=`.${t}:${r}`,o=i.cssText?KD(i):QD(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=GD();try{r.className=`${r.className} ${u}`}catch{return}const c=document.createElement("style");c.appendChild($D(u,i,l)),r.appendChild(c)}function PD(t,r){q_(t,r,":before"),q_(t,r,":after")}const O_="application/font-woff",z_="image/jpeg",JD={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 WD(t){const r=/\.([^./]*?)$/g.exec(t);return r?r[1]:""}function oy(t){const r=WD(t).toLowerCase();return JD[r]||""}function e6(t){return t.split(/,/)[1]}function Gp(t){return t.search(/^(data:)/)!==-1}function t6(t,r){return`data:${r};base64,${t}`}async function aA(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 ud={};function n6(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 sy(t,r,i){const l=n6(t,r,i.includeQueryParams);if(ud[l]!=null)return ud[l];i.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+new Date().getTime());let o;try{const u=await aA(t,i.fetchRequestInit,({res:c,result:f})=>(r||(r=c.headers.get("Content-Type")||""),e6(f)));o=t6(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 ud[l]=o,o}async function r6(t){const r=t.toDataURL();return r==="data:,"?t.cloneNode(!1):$s(r)}async function a6(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 $s(f)}const i=t.poster,l=oy(i),o=await sy(i,l,r);return $s(o)}async function i6(t){var r;try{if(!((r=t?.contentDocument)===null||r===void 0)&&r.body)return await fu(t.contentDocument.body,{},!0)}catch{}return t.cloneNode(!1)}async function l6(t,r){return Dt(t,HTMLCanvasElement)?r6(t):Dt(t,HTMLVideoElement)?a6(t,r):Dt(t,HTMLIFrameElement)?i6(t):t.cloneNode(!1)}const o6=t=>t.tagName!=null&&t.tagName.toUpperCase()==="SLOT";async function s6(t,r,i){var l,o;let u=[];return o6(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(()=>fu(f,i)).then(g=>{g&&r.appendChild(g)}),Promise.resolve()),r}function u6(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 c6(t,r){Dt(t,HTMLTextAreaElement)&&(r.innerHTML=t.value),Dt(t,HTMLInputElement)&&r.setAttribute("value",t.value)}function f6(t,r){if(Dt(t,HTMLSelectElement)){const l=Array.from(r.children).find(o=>t.value===o.getAttribute("value"));l&&l.setAttribute("selected","")}}function d6(t,r){return Dt(r,Element)&&(u6(t,r),PD(t,r),c6(t,r),f6(t,r)),r}async function h6(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),h=document.querySelector(f);!g&&h&&!l[f]&&(l[f]=await fu(h,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 fu(t,r,i){return!i&&r.filter&&!r.filter(t)?null:Promise.resolve(t).then(l=>l6(l,r)).then(l=>s6(t,l,r)).then(l=>d6(t,l)).then(l=>h6(l,r))}const iA=/url\((['"]?)([^'"]+?)\1\)/g,g6=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,v6=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function m6(t){const r=t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${r})(['"]?\\))`,"g")}function p6(t){const r=[];return t.replace(iA,(i,l,o)=>(r.push(o),i)),r.filter(i=>!Gp(i))}async function y6(t,r,i,l,o){try{const u=i?UD(r,i):r,c=oy(r);let f;return o||(f=await sy(u,c,l)),t.replace(m6(r),`$1${f}$3`)}catch{}return t}function x6(t,{preferredFontFormat:r}){return r?t.replace(v6,i=>{for(;;){const[l,,o]=g6.exec(i)||[];if(!o)return"";if(o===r)return`src: ${l};`}}):t}function lA(t){return t.search(iA)!==-1}async function oA(t,r,i){if(!lA(t))return t;const l=x6(t,i);return p6(l).reduce((u,c)=>u.then(f=>y6(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 oA(o,null,i);return r.style.setProperty(t,u,r.style.getPropertyPriority(t)),!0}return!1}async function b6(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 _6(t,r){const i=Dt(t,HTMLImageElement);if(!(i&&!Gp(t.src))&&!(Dt(t,SVGImageElement)&&!Gp(t.href.baseVal)))return;const l=i?t.src:t.href.baseVal,o=await sy(l,oy(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 w6(t,r){const l=tr(t.childNodes).map(o=>sA(o,r));await Promise.all(l).then(()=>t)}async function sA(t,r){Dt(t,Element)&&(await b6(t,r),await _6(t,r),await w6(t,r))}function S6(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),aA(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 E6(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,h=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(h)}})}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 N6(t){return t.filter(r=>r.type===CSSRule.FONT_FACE_RULE).filter(r=>lA(r.style.getPropertyValue("src")))}async function C6(t,r){if(t.ownerDocument==null)throw new Error("Provided element is not within a Document");const i=tr(t.ownerDocument.styleSheets),l=await E6(i,r);return N6(l)}async function T6(t,r){const i=await C6(t,r);return(await Promise.all(i.map(o=>{const u=o.parentStyleSheet?o.parentStyleSheet.href:null;return oA(o.cssText,u,r)}))).join(`
16
- `)}async function A6(t,r){const i=r.fontEmbedCSS!=null?r.fontEmbedCSS:r.skipFonts?null:await T6(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 uA(t,r={}){const{width:i,height:l}=rA(t,r),o=await fu(t,r,!0);return await A6(o,r),await sA(o,r),S6(o,r),await FD(o,i,l)}async function j6(t,r={}){const{width:i,height:l}=rA(t,r),o=await uA(t,r),u=await $s(o),c=document.createElement("canvas"),f=c.getContext("2d"),g=r.pixelRatio||ID(),h=r.canvasWidth||i,m=r.canvasHeight||l;return c.width=h*g,c.height=m*g,r.skipAutoScale||XD(c),c.style.width=`${h}`,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 M6(t,r={}){return(await j6(t,r)).toDataURL()}function uy(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 cd,B_;function R6(){if(B_)return cd;B_=1;function t(){this.__data__=[],this.size=0}return cd=t,cd}var fd,U_;function bi(){if(U_)return fd;U_=1;function t(r,i){return r===i||r!==r&&i!==i}return fd=t,fd}var dd,G_;function du(){if(G_)return dd;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 dd=r,dd}var hd,V_;function q6(){if(V_)return hd;V_=1;var t=du(),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 hd=l,hd}var gd,Y_;function O6(){if(Y_)return gd;Y_=1;var t=du();function r(i){var l=this.__data__,o=t(l,i);return o<0?void 0:l[o][1]}return gd=r,gd}var vd,I_;function z6(){if(I_)return vd;I_=1;var t=du();function r(i){return t(this.__data__,i)>-1}return vd=r,vd}var md,X_;function D6(){if(X_)return md;X_=1;var t=du();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 md=r,md}var pd,Z_;function hu(){if(Z_)return pd;Z_=1;var t=R6(),r=q6(),i=O6(),l=z6(),o=D6();function u(c){var f=-1,g=c==null?0:c.length;for(this.clear();++f<g;){var h=c[f];this.set(h[0],h[1])}}return u.prototype.clear=t,u.prototype.delete=r,u.prototype.get=i,u.prototype.has=l,u.prototype.set=o,pd=u,pd}var yd,F_;function k6(){if(F_)return yd;F_=1;var t=hu();function r(){this.__data__=new t,this.size=0}return yd=r,yd}var xd,K_;function H6(){if(K_)return xd;K_=1;function t(r){var i=this.__data__,l=i.delete(r);return this.size=i.size,l}return xd=t,xd}var bd,Q_;function L6(){if(Q_)return bd;Q_=1;function t(r){return this.__data__.get(r)}return bd=t,bd}var _d,$_;function B6(){if($_)return _d;$_=1;function t(r){return this.__data__.has(r)}return _d=t,_d}var wd,P_;function cA(){if(P_)return wd;P_=1;var t=typeof ws=="object"&&ws&&ws.Object===Object&&ws;return wd=t,wd}var Sd,J_;function yn(){if(J_)return Sd;J_=1;var t=cA(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=t||r||Function("return this")();return Sd=i,Sd}var Ed,W_;function _i(){if(W_)return Ed;W_=1;var t=yn(),r=t.Symbol;return Ed=r,Ed}var Nd,e2;function U6(){if(e2)return Nd;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 h=!0}catch{}var m=l.call(c);return h&&(f?c[o]=g:delete c[o]),m}return Nd=u,Nd}var Cd,t2;function G6(){if(t2)return Cd;t2=1;var t=Object.prototype,r=t.toString;function i(l){return r.call(l)}return Cd=i,Cd}var Td,n2;function va(){if(n2)return Td;n2=1;var t=_i(),r=U6(),i=G6(),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 Td=c,Td}var Ad,r2;function nn(){if(r2)return Ad;r2=1;function t(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}return Ad=t,Ad}var jd,a2;function Fl(){if(a2)return jd;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 jd=c,jd}var Md,i2;function V6(){if(i2)return Md;i2=1;var t=yn(),r=t["__core-js_shared__"];return Md=r,Md}var Rd,l2;function Y6(){if(l2)return Rd;l2=1;var t=V6(),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 Rd=i,Rd}var qd,o2;function fA(){if(o2)return qd;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 qd=i,qd}var Od,s2;function I6(){if(s2)return Od;s2=1;var t=Fl(),r=Y6(),i=nn(),l=fA(),o=/[\\^$.*+?()[\]{}|]/g,u=/^\[object .+?Constructor\]$/,c=Function.prototype,f=Object.prototype,g=c.toString,h=f.hasOwnProperty,m=RegExp("^"+g.call(h).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 Od=p,Od}var zd,u2;function X6(){if(u2)return zd;u2=1;function t(r,i){return r?.[i]}return zd=t,zd}var Dd,c2;function ma(){if(c2)return Dd;c2=1;var t=I6(),r=X6();function i(l,o){var u=r(l,o);return t(u)?u:void 0}return Dd=i,Dd}var kd,f2;function cy(){if(f2)return kd;f2=1;var t=ma(),r=yn(),i=t(r,"Map");return kd=i,kd}var Hd,d2;function gu(){if(d2)return Hd;d2=1;var t=ma(),r=t(Object,"create");return Hd=r,Hd}var Ld,h2;function Z6(){if(h2)return Ld;h2=1;var t=gu();function r(){this.__data__=t?t(null):{},this.size=0}return Ld=r,Ld}var Bd,g2;function F6(){if(g2)return Bd;g2=1;function t(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}return Bd=t,Bd}var Ud,v2;function K6(){if(v2)return Ud;v2=1;var t=gu(),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 Ud=o,Ud}var Gd,m2;function Q6(){if(m2)return Gd;m2=1;var t=gu(),r=Object.prototype,i=r.hasOwnProperty;function l(o){var u=this.__data__;return t?u[o]!==void 0:i.call(u,o)}return Gd=l,Gd}var Vd,p2;function $6(){if(p2)return Vd;p2=1;var t=gu(),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 Vd=i,Vd}var Yd,y2;function P6(){if(y2)return Yd;y2=1;var t=Z6(),r=F6(),i=K6(),l=Q6(),o=$6();function u(c){var f=-1,g=c==null?0:c.length;for(this.clear();++f<g;){var h=c[f];this.set(h[0],h[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 Id,x2;function J6(){if(x2)return Id;x2=1;var t=P6(),r=hu(),i=cy();function l(){this.size=0,this.__data__={hash:new t,map:new(i||r),string:new t}}return Id=l,Id}var Xd,b2;function W6(){if(b2)return Xd;b2=1;function t(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}return Xd=t,Xd}var Zd,_2;function vu(){if(_2)return Zd;_2=1;var t=W6();function r(i,l){var o=i.__data__;return t(l)?o[typeof l=="string"?"string":"hash"]:o.map}return Zd=r,Zd}var Fd,w2;function e8(){if(w2)return Fd;w2=1;var t=vu();function r(i){var l=t(this,i).delete(i);return this.size-=l?1:0,l}return Fd=r,Fd}var Kd,S2;function t8(){if(S2)return Kd;S2=1;var t=vu();function r(i){return t(this,i).get(i)}return Kd=r,Kd}var Qd,E2;function n8(){if(E2)return Qd;E2=1;var t=vu();function r(i){return t(this,i).has(i)}return Qd=r,Qd}var $d,N2;function r8(){if(N2)return $d;N2=1;var t=vu();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 $d=r,$d}var Pd,C2;function fy(){if(C2)return Pd;C2=1;var t=J6(),r=e8(),i=t8(),l=n8(),o=r8();function u(c){var f=-1,g=c==null?0:c.length;for(this.clear();++f<g;){var h=c[f];this.set(h[0],h[1])}}return u.prototype.clear=t,u.prototype.delete=r,u.prototype.get=i,u.prototype.has=l,u.prototype.set=o,Pd=u,Pd}var Jd,T2;function a8(){if(T2)return Jd;T2=1;var t=hu(),r=cy(),i=fy(),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 Jd=o,Jd}var Wd,A2;function mu(){if(A2)return Wd;A2=1;var t=hu(),r=k6(),i=H6(),l=L6(),o=B6(),u=a8();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,Wd=c,Wd}var eh,j2;function dy(){if(j2)return eh;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 eh=t,eh}var th,M2;function dA(){if(M2)return th;M2=1;var t=ma(),r=(function(){try{var i=t(Object,"defineProperty");return i({},"",{}),i}catch{}})();return th=r,th}var nh,R2;function pu(){if(R2)return nh;R2=1;var t=dA();function r(i,l,o){l=="__proto__"&&t?t(i,l,{configurable:!0,enumerable:!0,value:o,writable:!0}):i[l]=o}return nh=r,nh}var rh,q2;function yu(){if(q2)return rh;q2=1;var t=pu(),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 rh=o,rh}var ah,O2;function Kl(){if(O2)return ah;O2=1;var t=yu(),r=pu();function i(l,o,u,c){var f=!u;u||(u={});for(var g=-1,h=o.length;++g<h;){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 ah=i,ah}var ih,z2;function i8(){if(z2)return ih;z2=1;function t(r,i){for(var l=-1,o=Array(r);++l<r;)o[l]=i(l);return o}return ih=t,ih}var lh,D2;function jn(){if(D2)return lh;D2=1;function t(r){return r!=null&&typeof r=="object"}return lh=t,lh}var oh,k2;function l8(){if(k2)return oh;k2=1;var t=va(),r=jn(),i="[object Arguments]";function l(o){return r(o)&&t(o)==i}return oh=l,oh}var sh,H2;function Ql(){if(H2)return sh;H2=1;var t=l8(),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 sh=u,sh}var uh,L2;function ut(){if(L2)return uh;L2=1;var t=Array.isArray;return uh=t,uh}var Cl={exports:{}},ch,B2;function o8(){if(B2)return ch;B2=1;function t(){return!1}return ch=t,ch}Cl.exports;var U2;function wi(){return U2||(U2=1,(function(t,r){var i=yn(),l=o8(),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,h=g||l;t.exports=h})(Cl,Cl.exports)),Cl.exports}var fh,G2;function xu(){if(G2)return fh;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 fh=i,fh}var dh,V2;function hy(){if(V2)return dh;V2=1;var t=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=t}return dh=r,dh}var hh,Y2;function s8(){if(Y2)return hh;Y2=1;var t=va(),r=hy(),i=jn(),l="[object Arguments]",o="[object Array]",u="[object Boolean]",c="[object Date]",f="[object Error]",g="[object Function]",h="[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]",R="[object Int16Array]",q="[object Int32Array]",M="[object Uint8Array]",L="[object Uint8ClampedArray]",H="[object Uint16Array]",K="[object Uint32Array]",B={};B[A]=B[w]=B[T]=B[R]=B[q]=B[M]=B[L]=B[H]=B[K]=!0,B[l]=B[o]=B[E]=B[u]=B[C]=B[c]=B[f]=B[g]=B[h]=B[m]=B[p]=B[y]=B[b]=B[S]=B[N]=!1;function F(J){return i(J)&&r(J.length)&&!!B[t(J)]}return hh=F,hh}var gh,I2;function bu(){if(I2)return gh;I2=1;function t(r){return function(i){return r(i)}}return gh=t,gh}var Tl={exports:{}};Tl.exports;var X2;function gy(){return X2||(X2=1,(function(t,r){var i=cA(),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 vh,Z2;function $l(){if(Z2)return vh;Z2=1;var t=s8(),r=bu(),i=gy(),l=i&&i.isTypedArray,o=l?r(l):t;return vh=o,vh}var mh,F2;function hA(){if(F2)return mh;F2=1;var t=i8(),r=Ql(),i=ut(),l=wi(),o=xu(),u=$l(),c=Object.prototype,f=c.hasOwnProperty;function g(h,m){var p=i(h),y=!p&&r(h),b=!p&&!y&&l(h),S=!p&&!y&&!b&&u(h),N=p||y||b||S,E=N?t(h.length,String):[],C=E.length;for(var A in h)(m||f.call(h,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 mh=g,mh}var ph,K2;function _u(){if(K2)return ph;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 ph=r,ph}var yh,Q2;function gA(){if(Q2)return yh;Q2=1;function t(r,i){return function(l){return r(i(l))}}return yh=t,yh}var xh,$2;function u8(){if($2)return xh;$2=1;var t=gA(),r=t(Object.keys,Object);return xh=r,xh}var bh,P2;function vy(){if(P2)return bh;P2=1;var t=_u(),r=u8(),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 bh=o,bh}var _h,J2;function ar(){if(J2)return _h;J2=1;var t=Fl(),r=hy();function i(l){return l!=null&&r(l.length)&&!t(l)}return _h=i,_h}var wh,W2;function Br(){if(W2)return wh;W2=1;var t=hA(),r=vy(),i=ar();function l(o){return i(o)?t(o):r(o)}return wh=l,wh}var Sh,ew;function c8(){if(ew)return Sh;ew=1;var t=Kl(),r=Br();function i(l,o){return l&&t(o,r(o),l)}return Sh=i,Sh}var Eh,tw;function f8(){if(tw)return Eh;tw=1;function t(r){var i=[];if(r!=null)for(var l in Object(r))i.push(l);return i}return Eh=t,Eh}var Nh,nw;function d8(){if(nw)return Nh;nw=1;var t=nn(),r=_u(),i=f8(),l=Object.prototype,o=l.hasOwnProperty;function u(c){if(!t(c))return i(c);var f=r(c),g=[];for(var h in c)h=="constructor"&&(f||!o.call(c,h))||g.push(h);return g}return Nh=u,Nh}var Ch,rw;function pa(){if(rw)return Ch;rw=1;var t=hA(),r=d8(),i=ar();function l(o){return i(o)?t(o,!0):r(o)}return Ch=l,Ch}var Th,aw;function h8(){if(aw)return Th;aw=1;var t=Kl(),r=pa();function i(l,o){return l&&t(o,r(o),l)}return Th=i,Th}var Al={exports:{}};Al.exports;var iw;function vA(){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(h,m){if(m)return h.slice();var p=h.length,y=f?f(p):new h.constructor(p);return h.copy(y),y}t.exports=g})(Al,Al.exports)),Al.exports}var Ah,lw;function mA(){if(lw)return Ah;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 Ah=t,Ah}var jh,ow;function pA(){if(ow)return jh;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 jh=t,jh}var Mh,sw;function yA(){if(sw)return Mh;sw=1;function t(){return[]}return Mh=t,Mh}var Rh,uw;function my(){if(uw)return Rh;uw=1;var t=pA(),r=yA(),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 Rh=u,Rh}var qh,cw;function g8(){if(cw)return qh;cw=1;var t=Kl(),r=my();function i(l,o){return t(l,r(l),o)}return qh=i,qh}var Oh,fw;function py(){if(fw)return Oh;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 Oh=t,Oh}var zh,dw;function wu(){if(dw)return zh;dw=1;var t=gA(),r=t(Object.getPrototypeOf,Object);return zh=r,zh}var Dh,hw;function xA(){if(hw)return Dh;hw=1;var t=py(),r=wu(),i=my(),l=yA(),o=Object.getOwnPropertySymbols,u=o?function(c){for(var f=[];c;)t(f,i(c)),c=r(c);return f}:l;return Dh=u,Dh}var kh,gw;function v8(){if(gw)return kh;gw=1;var t=Kl(),r=xA();function i(l,o){return t(l,r(l),o)}return kh=i,kh}var Hh,vw;function bA(){if(vw)return Hh;vw=1;var t=py(),r=ut();function i(l,o,u){var c=o(l);return r(l)?c:t(c,u(l))}return Hh=i,Hh}var Lh,mw;function _A(){if(mw)return Lh;mw=1;var t=bA(),r=my(),i=Br();function l(o){return t(o,i,r)}return Lh=l,Lh}var Bh,pw;function m8(){if(pw)return Bh;pw=1;var t=bA(),r=xA(),i=pa();function l(o){return t(o,i,r)}return Bh=l,Bh}var Uh,yw;function p8(){if(yw)return Uh;yw=1;var t=ma(),r=yn(),i=t(r,"DataView");return Uh=i,Uh}var Gh,xw;function y8(){if(xw)return Gh;xw=1;var t=ma(),r=yn(),i=t(r,"Promise");return Gh=i,Gh}var Vh,bw;function wA(){if(bw)return Vh;bw=1;var t=ma(),r=yn(),i=t(r,"Set");return Vh=i,Vh}var Yh,_w;function x8(){if(_w)return Yh;_w=1;var t=ma(),r=yn(),i=t(r,"WeakMap");return Yh=i,Yh}var Ih,ww;function Si(){if(ww)return Ih;ww=1;var t=p8(),r=cy(),i=y8(),l=wA(),o=x8(),u=va(),c=fA(),f="[object Map]",g="[object Object]",h="[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())!=h||l&&A(new l)!=m||o&&A(new o)!=p)&&(A=function(w){var T=u(w),R=T==g?w.constructor:void 0,q=R?c(R):"";if(q)switch(q){case b:return y;case S:return f;case N:return h;case E:return m;case C:return p}return T}),Ih=A,Ih}var Xh,Sw;function b8(){if(Sw)return Xh;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 Xh=i,Xh}var Zh,Ew;function SA(){if(Ew)return Zh;Ew=1;var t=yn(),r=t.Uint8Array;return Zh=r,Zh}var Fh,Nw;function yy(){if(Nw)return Fh;Nw=1;var t=SA();function r(i){var l=new i.constructor(i.byteLength);return new t(l).set(new t(i)),l}return Fh=r,Fh}var Kh,Cw;function _8(){if(Cw)return Kh;Cw=1;var t=yy();function r(i,l){var o=l?t(i.buffer):i.buffer;return new i.constructor(o,i.byteOffset,i.byteLength)}return Kh=r,Kh}var Qh,Tw;function w8(){if(Tw)return Qh;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 Qh=r,Qh}var $h,Aw;function S8(){if(Aw)return $h;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 $h=l,$h}var Ph,jw;function EA(){if(jw)return Ph;jw=1;var t=yy();function r(i,l){var o=l?t(i.buffer):i.buffer;return new i.constructor(o,i.byteOffset,i.length)}return Ph=r,Ph}var Jh,Mw;function E8(){if(Mw)return Jh;Mw=1;var t=yy(),r=_8(),i=w8(),l=S8(),o=EA(),u="[object Boolean]",c="[object Date]",f="[object Map]",g="[object Number]",h="[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]",R="[object Uint8ClampedArray]",q="[object Uint16Array]",M="[object Uint32Array]";function L(H,K,B){var F=H.constructor;switch(K){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 R:case q:case M:return o(H,B);case f:return new F;case g:case p:return new F(H);case h:return i(H);case m:return new F;case y:return l(H)}}return Jh=L,Jh}var Wh,Rw;function NA(){if(Rw)return Wh;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 Wh=i,Wh}var eg,qw;function CA(){if(qw)return eg;qw=1;var t=NA(),r=wu(),i=_u();function l(o){return typeof o.constructor=="function"&&!i(o)?t(r(o)):{}}return eg=l,eg}var tg,Ow;function N8(){if(Ow)return tg;Ow=1;var t=Si(),r=jn(),i="[object Map]";function l(o){return r(o)&&t(o)==i}return tg=l,tg}var ng,zw;function C8(){if(zw)return ng;zw=1;var t=N8(),r=bu(),i=gy(),l=i&&i.isMap,o=l?r(l):t;return ng=o,ng}var rg,Dw;function T8(){if(Dw)return rg;Dw=1;var t=Si(),r=jn(),i="[object Set]";function l(o){return r(o)&&t(o)==i}return rg=l,rg}var ag,kw;function A8(){if(kw)return ag;kw=1;var t=T8(),r=bu(),i=gy(),l=i&&i.isSet,o=l?r(l):t;return ag=o,ag}var ig,Hw;function TA(){if(Hw)return ig;Hw=1;var t=mu(),r=dy(),i=yu(),l=c8(),o=h8(),u=vA(),c=mA(),f=g8(),g=v8(),h=_A(),m=m8(),p=Si(),y=b8(),b=E8(),S=CA(),N=ut(),E=wi(),C=C8(),A=nn(),w=A8(),T=Br(),R=pa(),q=1,M=2,L=4,H="[object Arguments]",K="[object Array]",B="[object Boolean]",F="[object Date]",J="[object Error]",k="[object Function]",Z="[object GeneratorFunction]",O="[object Map]",V="[object Number]",I="[object Object]",P="[object RegExp]",le="[object Set]",z="[object String]",Y="[object Symbol]",ae="[object WeakMap]",D="[object ArrayBuffer]",U="[object DataView]",$="[object Float32Array]",re="[object Float64Array]",oe="[object Int8Array]",fe="[object Int16Array]",he="[object Int32Array]",ye="[object Uint8Array]",xe="[object Uint8ClampedArray]",ge="[object Uint16Array]",_e="[object Uint32Array]",ve={};ve[H]=ve[K]=ve[D]=ve[U]=ve[B]=ve[F]=ve[$]=ve[re]=ve[oe]=ve[fe]=ve[he]=ve[O]=ve[V]=ve[I]=ve[P]=ve[le]=ve[z]=ve[Y]=ve[ye]=ve[xe]=ve[ge]=ve[_e]=!0,ve[J]=ve[k]=ve[ae]=!1;function Te(we,dt,nt,Ht,Et,yt){var $e,Pe=dt&q,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==k||Nt==Z;if(E(we))return u(we,Pe);if(Nt==I||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:h:an?R: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 ig=Te,ig}var lg,Lw;function j8(){if(Lw)return lg;Lw=1;var t=TA(),r=4;function i(l){return t(l,r)}return lg=i,lg}var og,Bw;function xy(){if(Bw)return og;Bw=1;function t(r){return function(){return r}}return og=t,og}var sg,Uw;function M8(){if(Uw)return sg;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 h=f[r?g:++u];if(l(c[h],h,c)===!1)break}return i}}return sg=t,sg}var ug,Gw;function by(){if(Gw)return ug;Gw=1;var t=M8(),r=t();return ug=r,ug}var cg,Vw;function _y(){if(Vw)return cg;Vw=1;var t=by(),r=Br();function i(l,o){return l&&t(l,o,r)}return cg=i,cg}var fg,Yw;function R8(){if(Yw)return fg;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 fg=r,fg}var dg,Iw;function Su(){if(Iw)return dg;Iw=1;var t=_y(),r=R8(),i=r(t);return dg=i,dg}var hg,Xw;function ya(){if(Xw)return hg;Xw=1;function t(r){return r}return hg=t,hg}var gg,Zw;function AA(){if(Zw)return gg;Zw=1;var t=ya();function r(i){return typeof i=="function"?i:t}return gg=r,gg}var vg,Fw;function jA(){if(Fw)return vg;Fw=1;var t=dy(),r=Su(),i=AA(),l=ut();function o(u,c){var f=l(u)?t:r;return f(u,i(c))}return vg=o,vg}var mg,Kw;function MA(){return Kw||(Kw=1,mg=jA()),mg}var pg,Qw;function q8(){if(Qw)return pg;Qw=1;var t=Su();function r(i,l){var o=[];return t(i,function(u,c,f){l(u,c,f)&&o.push(u)}),o}return pg=r,pg}var yg,$w;function O8(){if($w)return yg;$w=1;var t="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,t),this}return yg=r,yg}var xg,Pw;function z8(){if(Pw)return xg;Pw=1;function t(r){return this.__data__.has(r)}return xg=t,xg}var bg,Jw;function RA(){if(Jw)return bg;Jw=1;var t=fy(),r=O8(),i=z8();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,bg=l,bg}var _g,Ww;function D8(){if(Ww)return _g;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 _g=t,_g}var wg,eS;function qA(){if(eS)return wg;eS=1;function t(r,i){return r.has(i)}return wg=t,wg}var Sg,tS;function OA(){if(tS)return Sg;tS=1;var t=RA(),r=D8(),i=qA(),l=1,o=2;function u(c,f,g,h,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],R=f[C];if(h)var q=y?h(R,T,C,f,c,p):h(T,R,C,c,f,p);if(q!==void 0){if(q)continue;A=!1;break}if(w){if(!r(f,function(M,L){if(!i(w,L)&&(T===M||m(T,M,g,h,p)))return w.push(L)})){A=!1;break}}else if(!(T===R||m(T,R,g,h,p))){A=!1;break}}return p.delete(c),p.delete(f),A}return Sg=u,Sg}var Eg,nS;function k8(){if(nS)return Eg;nS=1;function t(r){var i=-1,l=Array(r.size);return r.forEach(function(o,u){l[++i]=[u,o]}),l}return Eg=t,Eg}var Ng,rS;function wy(){if(rS)return Ng;rS=1;function t(r){var i=-1,l=Array(r.size);return r.forEach(function(o){l[++i]=o}),l}return Ng=t,Ng}var Cg,aS;function H8(){if(aS)return Cg;aS=1;var t=_i(),r=SA(),i=bi(),l=OA(),o=k8(),u=wy(),c=1,f=2,g="[object Boolean]",h="[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 R(q,M,L,H,K,B,F){switch(L){case A:if(q.byteLength!=M.byteLength||q.byteOffset!=M.byteOffset)return!1;q=q.buffer,M=M.buffer;case C:return!(q.byteLength!=M.byteLength||!B(new r(q),new r(M)));case g:case h:case y:return i(+q,+M);case m:return q.name==M.name&&q.message==M.message;case b:case N:return q==M+"";case p:var J=o;case S:var k=H&c;if(J||(J=u),q.size!=M.size&&!k)return!1;var Z=F.get(q);if(Z)return Z==M;H|=f,F.set(q,M);var O=l(J(q),J(M),H,K,B,F);return F.delete(q),O;case E:if(T)return T.call(q)==T.call(M)}return!1}return Cg=R,Cg}var Tg,iS;function L8(){if(iS)return Tg;iS=1;var t=_A(),r=1,i=Object.prototype,l=i.hasOwnProperty;function o(u,c,f,g,h,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 R=p;++E<b;){C=y[E];var q=u[C],M=c[C];if(g)var L=p?g(M,q,C,c,u,m):g(q,M,C,u,c,m);if(!(L===void 0?q===M||h(q,M,f,g,m):L)){T=!1;break}R||(R=C=="constructor")}if(T&&!R){var H=u.constructor,K=c.constructor;H!=K&&"constructor"in u&&"constructor"in c&&!(typeof H=="function"&&H instanceof H&&typeof K=="function"&&K instanceof K)&&(T=!1)}return m.delete(u),m.delete(c),T}return Tg=o,Tg}var Ag,lS;function B8(){if(lS)return Ag;lS=1;var t=mu(),r=OA(),i=H8(),l=L8(),o=Si(),u=ut(),c=wi(),f=$l(),g=1,h="[object Arguments]",m="[object Array]",p="[object Object]",y=Object.prototype,b=y.hasOwnProperty;function S(N,E,C,A,w,T){var R=u(N),q=u(E),M=R?m:o(N),L=q?m:o(E);M=M==h?p:M,L=L==h?p:L;var H=M==p,K=L==p,B=M==L;if(B&&c(N)){if(!c(E))return!1;R=!0,H=!1}if(B&&!H)return T||(T=new t),R||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__"),J=K&&b.call(E,"__wrapped__");if(F||J){var k=F?N.value():N,Z=J?E.value():E;return T||(T=new t),w(k,Z,C,A,T)}}return B?(T||(T=new t),l(N,E,C,A,w,T)):!1}return Ag=S,Ag}var jg,oS;function zA(){if(oS)return jg;oS=1;var t=B8(),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 jg=i,jg}var Mg,sS;function U8(){if(sS)return Mg;sS=1;var t=mu(),r=zA(),i=1,l=2;function o(u,c,f,g){var h=f.length,m=h,p=!g;if(u==null)return!m;for(u=Object(u);h--;){var y=f[h];if(p&&y[2]?y[1]!==u[y[0]]:!(y[0]in u))return!1}for(;++h<m;){y=f[h];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 Mg=o,Mg}var Rg,uS;function DA(){if(uS)return Rg;uS=1;var t=nn();function r(i){return i===i&&!t(i)}return Rg=r,Rg}var qg,cS;function G8(){if(cS)return qg;cS=1;var t=DA(),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 qg=i,qg}var Og,fS;function kA(){if(fS)return Og;fS=1;function t(r,i){return function(l){return l==null?!1:l[r]===i&&(i!==void 0||r in Object(l))}}return Og=t,Og}var zg,dS;function V8(){if(dS)return zg;dS=1;var t=U8(),r=G8(),i=kA();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 zg=l,zg}var Dg,hS;function Ei(){if(hS)return Dg;hS=1;var t=va(),r=jn(),i="[object Symbol]";function l(o){return typeof o=="symbol"||r(o)&&t(o)==i}return Dg=l,Dg}var kg,gS;function Sy(){if(gS)return kg;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 kg=o,kg}var Hg,vS;function Y8(){if(vS)return Hg;vS=1;var t=fy(),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 h=l.apply(this,c);return u.cache=g.set(f,h)||g,h};return u.cache=new(i.Cache||t),u}return i.Cache=t,Hg=i,Hg}var Lg,mS;function I8(){if(mS)return Lg;mS=1;var t=Y8(),r=500;function i(l){var o=t(l,function(c){return u.size===r&&u.clear(),c}),u=o.cache;return o}return Lg=i,Lg}var Bg,pS;function X8(){if(pS)return Bg;pS=1;var t=I8(),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,h){u.push(g?h.replace(i,"$1"):f||c)}),u});return Bg=l,Bg}var Ug,yS;function Eu(){if(yS)return Ug;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 Ug=t,Ug}var Gg,xS;function Z8(){if(xS)return Gg;xS=1;var t=_i(),r=Eu(),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 Gg=c,Gg}var Vg,bS;function HA(){if(bS)return Vg;bS=1;var t=Z8();function r(i){return i==null?"":t(i)}return Vg=r,Vg}var Yg,_S;function Nu(){if(_S)return Yg;_S=1;var t=ut(),r=Sy(),i=X8(),l=HA();function o(u,c){return t(u)?u:r(u,c)?[u]:i(l(u))}return Yg=o,Yg}var Ig,wS;function Pl(){if(wS)return Ig;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 Ig=r,Ig}var Xg,SS;function Cu(){if(SS)return Xg;SS=1;var t=Nu(),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 Xg=i,Xg}var Zg,ES;function F8(){if(ES)return Zg;ES=1;var t=Cu();function r(i,l,o){var u=i==null?void 0:t(i,l);return u===void 0?o:u}return Zg=r,Zg}var Fg,NS;function K8(){if(NS)return Fg;NS=1;function t(r,i){return r!=null&&i in Object(r)}return Fg=t,Fg}var Kg,CS;function LA(){if(CS)return Kg;CS=1;var t=Nu(),r=Ql(),i=ut(),l=xu(),o=hy(),u=Pl();function c(f,g,h){g=t(g,f);for(var m=-1,p=g.length,y=!1;++m<p;){var b=u(g[m]);if(!(y=f!=null&&h(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 Kg=c,Kg}var Qg,TS;function BA(){if(TS)return Qg;TS=1;var t=K8(),r=LA();function i(l,o){return l!=null&&r(l,o,t)}return Qg=i,Qg}var $g,AS;function Q8(){if(AS)return $g;AS=1;var t=zA(),r=F8(),i=BA(),l=Sy(),o=DA(),u=kA(),c=Pl(),f=1,g=2;function h(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 $g=h,$g}var Pg,jS;function UA(){if(jS)return Pg;jS=1;function t(r){return function(i){return i?.[r]}}return Pg=t,Pg}var Jg,MS;function $8(){if(MS)return Jg;MS=1;var t=Cu();function r(i){return function(l){return t(l,i)}}return Jg=r,Jg}var Wg,RS;function P8(){if(RS)return Wg;RS=1;var t=UA(),r=$8(),i=Sy(),l=Pl();function o(u){return i(u)?t(l(u)):r(u)}return Wg=o,Wg}var ev,qS;function ir(){if(qS)return ev;qS=1;var t=V8(),r=Q8(),i=ya(),l=ut(),o=P8();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 ev=u,ev}var tv,OS;function GA(){if(OS)return tv;OS=1;var t=pA(),r=q8(),i=ir(),l=ut();function o(u,c){var f=l(u)?t:r;return f(u,i(c,3))}return tv=o,tv}var nv,zS;function J8(){if(zS)return nv;zS=1;var t=Object.prototype,r=t.hasOwnProperty;function i(l,o){return l!=null&&r.call(l,o)}return nv=i,nv}var rv,DS;function VA(){if(DS)return rv;DS=1;var t=J8(),r=LA();function i(l,o){return l!=null&&r(l,o,t)}return rv=i,rv}var av,kS;function W8(){if(kS)return av;kS=1;var t=vy(),r=Si(),i=Ql(),l=ut(),o=ar(),u=wi(),c=_u(),f=$l(),g="[object Map]",h="[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==h)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 av=y,av}var iv,HS;function YA(){if(HS)return iv;HS=1;function t(r){return r===void 0}return iv=t,iv}var lv,LS;function IA(){if(LS)return lv;LS=1;var t=Su(),r=ar();function i(l,o){var u=-1,c=r(l)?Array(l.length):[];return t(l,function(f,g,h){c[++u]=o(f,g,h)}),c}return lv=i,lv}var ov,BS;function XA(){if(BS)return ov;BS=1;var t=Eu(),r=ir(),i=IA(),l=ut();function o(u,c){var f=l(u)?t:i;return f(u,r(c,3))}return ov=o,ov}var sv,US;function ek(){if(US)return sv;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 sv=t,sv}var uv,GS;function tk(){if(GS)return uv;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 uv=t,uv}var cv,VS;function ZA(){if(VS)return cv;VS=1;var t=ek(),r=Su(),i=ir(),l=tk(),o=ut();function u(c,f,g){var h=o(c)?t:l,m=arguments.length<3;return h(c,i(f,4),g,m,r)}return cv=u,cv}var fv,YS;function nk(){if(YS)return fv;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 fv=o,fv}var dv,IS;function rk(){if(IS)return dv;IS=1;var t=UA(),r=t("length");return dv=r,dv}var hv,XS;function ak(){if(XS)return hv;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(h){return f.test(h)}return hv=g,hv}var gv,ZS;function ik(){if(ZS)return gv;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]",h="(?:"+f+"|"+g+")",m="[^"+t+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",y="[\\ud800-\\udbff][\\udc00-\\udfff]",b="\\u200d",S=h+"?",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(R){for(var q=w.lastIndex=0;w.test(R);)++q;return q}return gv=T,gv}var vv,FS;function lk(){if(FS)return vv;FS=1;var t=rk(),r=ak(),i=ik();function l(o){return r(o)?i(o):t(o)}return vv=l,vv}var mv,KS;function ok(){if(KS)return mv;KS=1;var t=vy(),r=Si(),i=ar(),l=nk(),o=lk(),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 h=r(g);return h==u||h==c?g.size:t(g).length}return mv=f,mv}var pv,QS;function sk(){if(QS)return pv;QS=1;var t=dy(),r=NA(),i=_y(),l=ir(),o=wu(),u=ut(),c=wi(),f=Fl(),g=nn(),h=$l();function m(p,y,b){var S=u(p),N=S||c(p)||h(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 pv=m,pv}var yv,$S;function uk(){if($S)return yv;$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 yv=o,yv}var xv,PS;function Ey(){if(PS)return xv;PS=1;var t=py(),r=uk();function i(l,o,u,c,f){var g=-1,h=l.length;for(u||(u=r),f||(f=[]);++g<h;){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 xv=i,xv}var bv,JS;function ck(){if(JS)return bv;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 bv=t,bv}var _v,WS;function FA(){if(WS)return _v;WS=1;var t=ck(),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),h=Array(g);++f<g;)h[f]=c[o+f];f=-1;for(var m=Array(o+1);++f<o;)m[f]=c[f];return m[o]=u(h),t(l,this,m)}}return _v=i,_v}var wv,eE;function fk(){if(eE)return wv;eE=1;var t=xy(),r=dA(),i=ya(),l=r?function(o,u){return r(o,"toString",{configurable:!0,enumerable:!1,value:t(u),writable:!0})}:i;return wv=l,wv}var Sv,tE;function dk(){if(tE)return Sv;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 Sv=l,Sv}var Ev,nE;function KA(){if(nE)return Ev;nE=1;var t=fk(),r=dk(),i=r(t);return Ev=i,Ev}var Nv,rE;function Tu(){if(rE)return Nv;rE=1;var t=ya(),r=FA(),i=KA();function l(o,u){return i(r(o,u,t),o+"")}return Nv=l,Nv}var Cv,aE;function QA(){if(aE)return Cv;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 Cv=t,Cv}var Tv,iE;function hk(){if(iE)return Tv;iE=1;function t(r){return r!==r}return Tv=t,Tv}var Av,lE;function gk(){if(lE)return Av;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 Av=t,Av}var jv,oE;function vk(){if(oE)return jv;oE=1;var t=QA(),r=hk(),i=gk();function l(o,u,c){return u===u?i(o,u,c):t(o,r,c)}return jv=l,jv}var Mv,sE;function mk(){if(sE)return Mv;sE=1;var t=vk();function r(i,l){var o=i==null?0:i.length;return!!o&&t(i,l,0)>-1}return Mv=r,Mv}var Rv,uE;function pk(){if(uE)return Rv;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 Rv=t,Rv}var qv,cE;function yk(){if(cE)return qv;cE=1;function t(){}return qv=t,qv}var Ov,fE;function xk(){if(fE)return Ov;fE=1;var t=wA(),r=yk(),i=wy(),l=1/0,o=t&&1/i(new t([,-0]))[1]==l?function(u){return new t(u)}:r;return Ov=o,Ov}var zv,dE;function bk(){if(dE)return zv;dE=1;var t=RA(),r=mk(),i=pk(),l=qA(),o=xk(),u=wy(),c=200;function f(g,h,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=h?null:o(g);if(C)return u(C);S=!1,y=l,E=new t}else E=h?[]:N;e:for(;++p<b;){var A=g[p],w=h?h(A):A;if(A=m||A!==0?A:0,S&&w===w){for(var T=E.length;T--;)if(E[T]===w)continue e;h&&E.push(w),N.push(A)}else y(E,w,m)||(E!==N&&E.push(w),N.push(A))}return N}return zv=f,zv}var Dv,hE;function $A(){if(hE)return Dv;hE=1;var t=ar(),r=jn();function i(l){return r(l)&&t(l)}return Dv=i,Dv}var kv,gE;function _k(){if(gE)return kv;gE=1;var t=Ey(),r=Tu(),i=bk(),l=$A(),o=r(function(u){return i(t(u,1,l,!0))});return kv=o,kv}var Hv,vE;function wk(){if(vE)return Hv;vE=1;var t=Eu();function r(i,l){return t(l,function(o){return i[o]})}return Hv=r,Hv}var Lv,mE;function PA(){if(mE)return Lv;mE=1;var t=wk(),r=Br();function i(l){return l==null?[]:t(l,r(l))}return Lv=i,Lv}var Bv,pE;function rn(){if(pE)return Bv;pE=1;var t;if(typeof uy=="function")try{t={clone:j8(),constant:xy(),each:MA(),filter:GA(),has:VA(),isArray:ut(),isEmpty:W8(),isFunction:Fl(),isUndefined:YA(),keys:Br(),map:XA(),reduce:ZA(),size:ok(),transform:sk(),union:_k(),values:PA()}}catch{}return t||(t=window._),Bv=t,Bv}var Uv,yE;function Ny(){if(yE)return Uv;yE=1;var t=rn();Uv=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?h(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?h(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?h(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 h(m,p){return f(m,p.v,p.w,p.name)}return Uv}var Gv,xE;function Sk(){return xE||(xE=1,Gv="2.1.8"),Gv}var Vv,bE;function Ek(){return bE||(bE=1,Vv={Graph:Ny(),version:Sk()}),Vv}var Yv,_E;function Nk(){if(_E)return Yv;_E=1;var t=rn(),r=Ny();Yv={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),h=c.parent(f),m={v:f};return t.isUndefined(g)||(m.value=g),t.isUndefined(h)||(m.parent=h),m})}function o(c){return t.map(c.edges(),function(f){var g=c.edge(f),h={v:f.v,w:f.w};return t.isUndefined(f.name)||(h.name=f.name),t.isUndefined(g)||(h.value=g),h})}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 Yv}var Iv,wE;function Ck(){if(wE)return Iv;wE=1;var t=rn();Iv=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 Iv}var Xv,SE;function JA(){if(SE)return Xv;SE=1;var t=rn();Xv=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},Xv}var Zv,EE;function WA(){if(EE)return Zv;EE=1;var t=rn(),r=JA();Zv=l;var i=t.constant(1);function l(u,c,f,g){return o(u,String(c),f||i,g||function(h){return u.outEdges(h)})}function o(u,c,f,g){var h={},m=new r,p,y,b=function(S){var N=S.v!==p?S.v:S.w,E=h[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;h[S]={distance:N},m.add(S,N)});m.size()>0&&(p=m.removeMin(),y=h[p],y.distance!==Number.POSITIVE_INFINITY);)g(p).forEach(b);return h}return Zv}var Fv,NE;function Tk(){if(NE)return Fv;NE=1;var t=WA(),r=rn();Fv=i;function i(l,o,u){return r.transform(l.nodes(),function(c,f){c[f]=t(l,f,o,u)},{})}return Fv}var Kv,CE;function e3(){if(CE)return Kv;CE=1;var t=rn();Kv=r;function r(i){var l=0,o=[],u={},c=[];function f(g){var h=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&&(h.lowlink=Math.min(h.lowlink,u[y].index)):(f(y),h.lowlink=Math.min(h.lowlink,u[y].lowlink))}),h.lowlink===h.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 Kv}var Qv,TE;function Ak(){if(TE)return Qv;TE=1;var t=rn(),r=e3();Qv=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 Qv}var $v,AE;function jk(){if(AE)return $v;AE=1;var t=rn();$v=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(h){f[h]={},f[h][h]={distance:0},g.forEach(function(m){h!==m&&(f[h][m]={distance:Number.POSITIVE_INFINITY})}),c(h).forEach(function(m){var p=m.v===h?m.w:m.v,y=u(m);f[h][p]={distance:y,predecessor:h}})}),g.forEach(function(h){var m=f[h];g.forEach(function(p){var y=f[p];g.forEach(function(b){var S=y[h],N=m[b],E=y[b],C=S.distance+N.distance;C<E.distance&&(E.distance=C,E.predecessor=N.predecessor)})})}),f}return $v}var Pv,jE;function t3(){if(jE)return Pv;jE=1;var t=rn();Pv=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,Pv}var Jv,ME;function Mk(){if(ME)return Jv;ME=1;var t=t3();Jv=r;function r(i){try{t(i)}catch(l){if(l instanceof t.CycleException)return!1;throw l}return!0}return Jv}var Wv,RE;function n3(){if(RE)return Wv;RE=1;var t=rn();Wv=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(h){if(!l.hasNode(h))throw new Error("Graph does not have node: "+h);i(l,h,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(h){i(l,h,u,c,f,g)}),u&&g.push(o))}return Wv}var em,qE;function Rk(){if(qE)return em;qE=1;var t=n3();em=r;function r(i,l){return t(i,l,"post")}return em}var tm,OE;function qk(){if(OE)return tm;OE=1;var t=n3();tm=r;function r(i,l){return t(i,l,"pre")}return tm}var nm,zE;function Ok(){if(zE)return nm;zE=1;var t=rn(),r=Ny(),i=JA();nm=l;function l(o,u){var c=new r,f={},g=new i,h;function m(y){var b=y.v===h?y.w:y.v,S=g.priority(b);if(S!==void 0){var N=u(y);N<S&&(f[b]=h,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(h=g.removeMin(),t.has(f,h))c.setEdge(h,f[h]);else{if(p)throw new Error("Input graph is not connected: "+o);p=!0}o.nodeEdges(h).forEach(m)}return c}return nm}var rm,DE;function zk(){return DE||(DE=1,rm={components:Ck(),dijkstra:WA(),dijkstraAll:Tk(),findCycles:Ak(),floydWarshall:jk(),isAcyclic:Mk(),postorder:Rk(),preorder:qk(),prim:Ok(),tarjan:e3(),topsort:t3()}),rm}var am,kE;function Dk(){if(kE)return am;kE=1;var t=Ek();return am={Graph:t.Graph,json:Nk(),alg:zk(),version:t.version},am}var im,HE;function mn(){if(HE)return im;HE=1;var t;if(typeof uy=="function")try{t=Dk()}catch{}return t||(t=window.graphlib),im=t,im}var lm,LE;function kk(){if(LE)return lm;LE=1;var t=TA(),r=1,i=4;function l(o){return t(o,r|i)}return lm=l,lm}var om,BE;function Au(){if(BE)return om;BE=1;var t=bi(),r=ar(),i=xu(),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 om=o,om}var sm,UE;function Hk(){if(UE)return sm;UE=1;var t=Tu(),r=bi(),i=Au(),l=pa(),o=Object.prototype,u=o.hasOwnProperty,c=t(function(f,g){f=Object(f);var h=-1,m=g.length,p=m>2?g[2]:void 0;for(p&&i(g[0],g[1],p)&&(m=1);++h<m;)for(var y=g[h],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 sm=c,sm}var um,GE;function Lk(){if(GE)return um;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 h=t(c,3);u=i(u),c=function(p){return h(g[p],p,g)}}var m=o(u,c,f);return m>-1?g[h?u[m]:m]:void 0}}return um=l,um}var cm,VE;function Bk(){if(VE)return cm;VE=1;var t=/\s/;function r(i){for(var l=i.length;l--&&t.test(i.charAt(l)););return l}return cm=r,cm}var fm,YE;function Uk(){if(YE)return fm;YE=1;var t=Bk(),r=/^\s+/;function i(l){return l&&l.slice(0,t(l)+1).replace(r,"")}return fm=i,fm}var dm,IE;function Gk(){if(IE)return dm;IE=1;var t=Uk(),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(h){if(typeof h=="number")return h;if(i(h))return l;if(r(h)){var m=typeof h.valueOf=="function"?h.valueOf():h;h=r(m)?m+"":m}if(typeof h!="string")return h===0?h:+h;h=t(h);var p=u.test(h);return p||c.test(h)?f(h.slice(2),p?2:8):o.test(h)?l:+h}return dm=g,dm}var hm,XE;function r3(){if(XE)return hm;XE=1;var t=Gk(),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 hm=l,hm}var gm,ZE;function Vk(){if(ZE)return gm;ZE=1;var t=r3();function r(i){var l=t(i),o=l%1;return l===l?o?l-o:l:0}return gm=r,gm}var vm,FE;function Yk(){if(FE)return vm;FE=1;var t=QA(),r=ir(),i=Vk(),l=Math.max;function o(u,c,f){var g=u==null?0:u.length;if(!g)return-1;var h=f==null?0:i(f);return h<0&&(h=l(g+h,0)),t(u,r(c,3),h)}return vm=o,vm}var mm,KE;function Ik(){if(KE)return mm;KE=1;var t=Lk(),r=Yk(),i=t(r);return mm=i,mm}var pm,QE;function a3(){if(QE)return pm;QE=1;var t=Ey();function r(i){var l=i==null?0:i.length;return l?t(i,1):[]}return pm=r,pm}var ym,$E;function Xk(){if($E)return ym;$E=1;var t=by(),r=AA(),i=pa();function l(o,u){return o==null?o:t(o,r(u),i)}return ym=l,ym}var xm,PE;function Zk(){if(PE)return xm;PE=1;function t(r){var i=r==null?0:r.length;return i?r[i-1]:void 0}return xm=t,xm}var bm,JE;function Fk(){if(JE)return bm;JE=1;var t=pu(),r=_y(),i=ir();function l(o,u){var c={};return u=i(u,3),r(o,function(f,g,h){t(c,g,u(f,g,h))}),c}return bm=l,bm}var _m,WE;function Cy(){if(WE)return _m;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&&(h===void 0?g===g&&!t(g):o(g,h)))var h=g,m=f}return m}return _m=r,_m}var wm,eN;function Kk(){if(eN)return wm;eN=1;function t(r,i){return r>i}return wm=t,wm}var Sm,tN;function Qk(){if(tN)return Sm;tN=1;var t=Cy(),r=Kk(),i=ya();function l(o){return o&&o.length?t(o,i,r):void 0}return Sm=l,Sm}var Em,nN;function i3(){if(nN)return Em;nN=1;var t=pu(),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 Em=i,Em}var Nm,rN;function $k(){if(rN)return Nm;rN=1;var t=va(),r=wu(),i=jn(),l="[object Object]",o=Function.prototype,u=Object.prototype,c=o.toString,f=u.hasOwnProperty,g=c.call(Object);function h(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 Nm=h,Nm}var Cm,aN;function l3(){if(aN)return Cm;aN=1;function t(r,i){if(!(i==="constructor"&&typeof r[i]=="function")&&i!="__proto__")return r[i]}return Cm=t,Cm}var Tm,iN;function Pk(){if(iN)return Tm;iN=1;var t=Kl(),r=pa();function i(l){return t(l,r(l))}return Tm=i,Tm}var Am,lN;function Jk(){if(lN)return Am;lN=1;var t=i3(),r=vA(),i=EA(),l=mA(),o=CA(),u=Ql(),c=ut(),f=$A(),g=wi(),h=Fl(),m=nn(),p=$k(),y=$l(),b=l3(),S=Pk();function N(E,C,A,w,T,R,q){var M=b(E,A),L=b(C,A),H=q.get(L);if(H){t(E,A,H);return}var K=R?R(M,L,A+"",E,C,q):void 0,B=K===void 0;if(B){var F=c(L),J=!F&&g(L),k=!F&&!J&&y(L);K=L,F||J||k?c(M)?K=M:f(M)?K=l(M):J?(B=!1,K=r(L,!0)):k?(B=!1,K=i(L,!0)):K=[]:p(L)||u(L)?(K=M,u(M)?K=S(M):(!m(M)||h(M))&&(K=o(L))):B=!1}B&&(q.set(L,K),T(K,L,w,R,q),q.delete(L)),t(E,A,K)}return Am=N,Am}var jm,oN;function Wk(){if(oN)return jm;oN=1;var t=mu(),r=i3(),i=by(),l=Jk(),o=nn(),u=pa(),c=l3();function f(g,h,m,p,y){g!==h&&i(h,function(b,S){if(y||(y=new t),o(b))l(g,h,S,m,f,p,y);else{var N=p?p(c(g,S),b,S+"",g,h,y):void 0;N===void 0&&(N=b),r(g,S,N)}},u)}return jm=f,jm}var Mm,sN;function eH(){if(sN)return Mm;sN=1;var t=Tu(),r=Au();function i(l){return t(function(o,u){var c=-1,f=u.length,g=f>1?u[f-1]:void 0,h=f>2?u[2]:void 0;for(g=l.length>3&&typeof g=="function"?(f--,g):void 0,h&&r(u[0],u[1],h)&&(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 Mm=i,Mm}var Rm,uN;function tH(){if(uN)return Rm;uN=1;var t=Wk(),r=eH(),i=r(function(l,o,u){t(l,o,u)});return Rm=i,Rm}var qm,cN;function o3(){if(cN)return qm;cN=1;function t(r,i){return r<i}return qm=t,qm}var Om,fN;function nH(){if(fN)return Om;fN=1;var t=Cy(),r=o3(),i=ya();function l(o){return o&&o.length?t(o,i,r):void 0}return Om=l,Om}var zm,dN;function rH(){if(dN)return zm;dN=1;var t=Cy(),r=ir(),i=o3();function l(o,u){return o&&o.length?t(o,r(u,2),i):void 0}return zm=l,zm}var Dm,hN;function aH(){if(hN)return Dm;hN=1;var t=yn(),r=function(){return t.Date.now()};return Dm=r,Dm}var km,gN;function iH(){if(gN)return km;gN=1;var t=yu(),r=Nu(),i=xu(),l=nn(),o=Pl();function u(c,f,g,h){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=h?h(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 km=u,km}var Hm,vN;function lH(){if(vN)return Hm;vN=1;var t=Cu(),r=iH(),i=Nu();function l(o,u,c){for(var f=-1,g=u.length,h={};++f<g;){var m=u[f],p=t(o,m);c(p,m)&&r(h,i(m,o),p)}return h}return Hm=l,Hm}var Lm,mN;function oH(){if(mN)return Lm;mN=1;var t=lH(),r=BA();function i(l,o){return t(l,o,function(u,c){return r(l,c)})}return Lm=i,Lm}var Bm,pN;function sH(){if(pN)return Bm;pN=1;var t=a3(),r=FA(),i=KA();function l(o){return i(r(o,void 0,t),o+"")}return Bm=l,Bm}var Um,yN;function uH(){if(yN)return Um;yN=1;var t=oH(),r=sH(),i=r(function(l,o){return l==null?{}:t(l,o)});return Um=i,Um}var Gm,xN;function cH(){if(xN)return Gm;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),h=Array(g);g--;)h[c?g:++f]=l,l+=u;return h}return Gm=i,Gm}var Vm,bN;function fH(){if(bN)return Vm;bN=1;var t=cH(),r=Au(),i=r3();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 Vm=l,Vm}var Ym,_N;function dH(){if(_N)return Ym;_N=1;var t=fH(),r=t();return Ym=r,Ym}var Im,wN;function hH(){if(wN)return Im;wN=1;function t(r,i){var l=r.length;for(r.sort(i);l--;)r[l]=r[l].value;return r}return Im=t,Im}var Xm,SN;function gH(){if(SN)return Xm;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,h=l===null,m=l===l,p=t(l);if(!h&&!p&&!f&&i>l||f&&g&&m&&!h&&!p||u&&g&&m||!o&&m||!c)return 1;if(!u&&!f&&!p&&i<l||p&&o&&c&&!u&&!f||h&&o&&c||!g&&c||!m)return-1}return 0}return Xm=r,Xm}var Zm,EN;function vH(){if(EN)return Zm;EN=1;var t=gH();function r(i,l,o){for(var u=-1,c=i.criteria,f=l.criteria,g=c.length,h=o.length;++u<g;){var m=t(c[u],f[u]);if(m){if(u>=h)return m;var p=o[u];return m*(p=="desc"?-1:1)}}return i.index-l.index}return Zm=r,Zm}var Fm,NN;function mH(){if(NN)return Fm;NN=1;var t=Eu(),r=Cu(),i=ir(),l=IA(),o=hH(),u=bu(),c=vH(),f=ya(),g=ut();function h(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 Fm=h,Fm}var Km,CN;function pH(){if(CN)return Km;CN=1;var t=Ey(),r=mH(),i=Tu(),l=Au(),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 Km=o,Km}var Qm,TN;function yH(){if(TN)return Qm;TN=1;var t=HA(),r=0;function i(l){var o=++r;return t(l)+o}return Qm=i,Qm}var $m,AN;function xH(){if(AN)return $m;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 $m=t,$m}var Pm,jN;function bH(){if(jN)return Pm;jN=1;var t=yu(),r=xH();function i(l,o){return r(l||[],o||[],t)}return Pm=i,Pm}var Jm,MN;function Ke(){if(MN)return Jm;MN=1;var t;if(typeof uy=="function")try{t={cloneDeep:kk(),constant:xy(),defaults:Hk(),each:MA(),filter:GA(),find:Ik(),flatten:a3(),forEach:jA(),forIn:Xk(),has:VA(),isUndefined:YA(),last:Zk(),map:XA(),mapValues:Fk(),max:Qk(),merge:tH(),min:nH(),minBy:rH(),now:aH(),pick:uH(),range:dH(),reduce:ZA(),sortBy:pH(),uniqueId:yH(),values:PA(),zipObject:bH()}}catch{}return t||(t=window._),Jm=t,Jm}var Wm,RN;function _H(){if(RN)return Wm;RN=1,Wm=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 Wm}var ep,qN;function wH(){if(qN)return ep;qN=1;var t=Ke(),r=mn().Graph,i=_H();ep=o;var l=t.constant(1);function o(h,m){if(h.nodeCount()<=1)return[];var p=f(h,m||l),y=u(p.graph,p.buckets,p.zeroIdx);return t.flatten(t.map(y,function(b){return h.outEdges(b.v,b.w)}),!0)}function u(h,m,p){for(var y=[],b=m[m.length-1],S=m[0],N;h.nodeCount();){for(;N=S.dequeue();)c(h,m,p,N);for(;N=b.dequeue();)c(h,m,p,N);if(h.nodeCount()){for(var E=m.length-2;E>0;--E)if(N=m[E].dequeue(),N){y=y.concat(c(h,m,p,N,!0));break}}}return y}function c(h,m,p,y,b){var S=b?[]:void 0;return t.forEach(h.inEdges(y.v),function(N){var E=h.edge(N),C=h.node(N.v);b&&S.push({v:N.v,w:N.w}),C.out-=E,g(m,p,C)}),t.forEach(h.outEdges(y.v),function(N){var E=h.edge(N),C=N.w,A=h.node(C);A.in-=E,g(m,p,A)}),h.removeNode(y.v),S}function f(h,m){var p=new r,y=0,b=0;t.forEach(h.nodes(),function(E){p.setNode(E,{v:E,in:0,out:0})}),t.forEach(h.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(h,m,p){p.out?p.in?h[p.out-p.in+m].enqueue(p):h[h.length-1].enqueue(p):h[0].enqueue(p)}return ep}var tp,ON;function SH(){if(ON)return tp;ON=1;var t=Ke(),r=wH();tp={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 h=u.edge(g);u.removeEdge(g),h.forwardName=g.name,h.reversed=!0,u.setEdge(g.w,g.v,h,t.uniqueId("rev"))});function f(g){return function(h){return g.edge(h).weight}}}function l(u){var c=[],f={},g={};function h(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):h(p.w)}),delete f[m])}return t.forEach(u.nodes(),h),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 tp}var np,zN;function kt(){if(zN)return np;zN=1;var t=Ke(),r=mn().Graph;np={addDummyNode:i,simplify:l,asNonCompoundGraph:o,successorWeights:u,predecessorWeights:c,intersectRect:f,buildLayerMatrix:g,normalizeRanks:h,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,R=C.y-w,q=E.width/2,M=E.height/2;if(!T&&!R)throw new Error("Not possible to find intersection inside of the rectangle");var L,H;return Math.abs(R)*q>Math.abs(T)*M?(R<0&&(M=-M),L=M*T/R,H=M):(T<0&&(q=-q),L=q,H=q*R/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 h(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(R){return E.node(R).rank})),A=[];t.forEach(E.nodes(),function(R){var q=E.node(R).rank-C;A[q]||(A[q]=[]),A[q].push(R)});var w=0,T=E.graph().nodeRankFactor;t.forEach(A,function(R,q){t.isUndefined(R)&&q%T!==0?--w:w&&t.forEach(R,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 np}var rp,DN;function EH(){if(DN)return rp;DN=1;var t=Ke(),r=kt();rp={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,h=c.w,m=u.node(h).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,h,{weight:y.weight},p)}}function o(u){t.forEach(u.graph().dummyChains,function(c){var f=u.node(c),g=f.edgeLabel,h;for(u.setEdge(f.edgeObj,g);f.dummy;)h=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=h,f=u.node(c)})}return rp}var ap,kN;function Ps(){if(kN)return ap;kN=1;var t=Ke();ap={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(h){return u(h.w)-l.edge(h).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 ap}var ip,HN;function s3(){if(HN)return ip;HN=1;var t=Ke(),r=mn().Graph,i=Ps().slack;ip=l;function l(f){var g=new r({directed:!1}),h=f.nodes()[0],m=f.nodeCount();g.setNode(h,{});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 h(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,{}),h(b))})}return t.forEach(f.nodes(),h),f.nodeCount()}function u(f,g){return t.minBy(g.edges(),function(h){if(f.hasNode(h.v)!==f.hasNode(h.w))return i(g,h)})}function c(f,g,h){t.forEach(f.nodes(),function(m){g.node(m).rank+=h})}return ip}var lp,LN;function NH(){if(LN)return lp;LN=1;var t=Ke(),r=s3(),i=Ps().slack,l=Ps().longestPath,o=mn().alg.preorder,u=mn().alg.postorder,c=kt().simplify;lp=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 R,q;R=b(T);)q=S(T,w,R),N(T,w,R,q)}function g(w,T){var R=u(w,w.nodes());R=R.slice(0,R.length-1),t.forEach(R,function(q){h(w,T,q)})}function h(w,T,R){var q=w.node(R),M=q.parent;w.edge(R,M).cutvalue=m(w,T,R)}function m(w,T,R){var q=w.node(R),M=q.parent,L=!0,H=T.edge(R,M),K=0;return H||(L=!1,H=T.edge(M,R)),K=H.weight,t.forEach(T.nodeEdges(R),function(B){var F=B.v===R,J=F?B.w:B.v;if(J!==M){var k=F===L,Z=T.edge(B).weight;if(K+=k?Z:-Z,C(w,R,J)){var O=w.edge(R,J).cutvalue;K+=k?-O:O}}}),K}function p(w,T){arguments.length<2&&(T=w.nodes()[0]),y(w,{},1,T)}function y(w,T,R,q,M){var L=R,H=w.node(q);return T[q]=!0,t.forEach(w.neighbors(q),function(K){t.has(T,K)||(R=y(w,T,R,K,q))}),H.low=L,H.lim=R++,M?H.parent=M:delete H.parent,R}function b(w){return t.find(w.edges(),function(T){return w.edge(T).cutvalue<0})}function S(w,T,R){var q=R.v,M=R.w;T.hasEdge(q,M)||(q=R.w,M=R.v);var L=w.node(q),H=w.node(M),K=L,B=!1;L.lim>H.lim&&(K=H,B=!0);var F=t.filter(T.edges(),function(J){return B===A(w,w.node(J.v),K)&&B!==A(w,w.node(J.w),K)});return t.minBy(F,function(J){return i(T,J)})}function N(w,T,R,q){var M=R.v,L=R.w;w.removeEdge(M,L),w.setEdge(q.v,q.w,{}),p(w),g(w,T),E(w,T)}function E(w,T){var R=t.find(w.nodes(),function(M){return!T.node(M).parent}),q=o(w,R);q=q.slice(1),t.forEach(q,function(M){var L=w.node(M).parent,H=T.edge(M,L),K=!1;H||(H=T.edge(L,M),K=!0),T.node(M).rank=T.node(L).rank+(K?H.minlen:-H.minlen)})}function C(w,T,R){return w.hasEdge(T,R)}function A(w,T,R){return R.low<=T.lim&&T.lim<=R.lim}return lp}var op,BN;function CH(){if(BN)return op;BN=1;var t=Ps(),r=t.longestPath,i=s3(),l=NH();op=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 op}var sp,UN;function TH(){if(UN)return sp;UN=1;var t=Ke();sp=r;function r(o){var u=l(o);t.forEach(o.graph().dummyChains,function(c){for(var f=o.node(c),g=f.edgeObj,h=i(o,u,g.v,g.w),m=h.path,p=h.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=[],h=[],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;)h.push(y);return{path:g.concat(h.reverse()),lca:b}}function l(o){var u={},c=0;function f(g){var h=c;t.forEach(o.children(g),f),u[g]={low:h,lim:c++}}return t.forEach(o.children(),f),u}return sp}var up,GN;function AH(){if(GN)return up;GN=1;var t=Ke(),r=kt();up={run:i,cleanup:c};function i(f){var g=r.addDummyNode(f,"root",{},"_root"),h=o(f),m=t.max(t.values(h))-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,h,b)}),f.graph().nodeRankFactor=p}function l(f,g,h,m,p,y,b){var S=f.children(b);if(!S.length){b!==g&&f.setEdge(g,b,{weight:0,minlen:h});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,h,m,p,y,A);var w=f.node(A),T=w.borderTop?w.borderTop:A,R=w.borderBottom?w.borderBottom:A,q=w.borderTop?m:2*m,M=T!==R?1:p-y[b]+1;f.setEdge(N,T,{weight:q,minlen:M,nestingEdge:!0}),f.setEdge(R,E,{weight:q,minlen:M,nestingEdge:!0})}),f.parent(b)||f.setEdge(g,N,{weight:0,minlen:p+y[b]})}function o(f){var g={};function h(m,p){var y=f.children(m);y&&y.length&&t.forEach(y,function(b){h(b,p+1)}),g[m]=p}return t.forEach(f.children(),function(m){h(m,1)}),g}function u(f){return t.reduce(f.edges(),function(g,h){return g+f.edge(h).weight},0)}function c(f){var g=f.graph();f.removeNode(g.nestingRoot),delete g.nestingRoot,t.forEach(f.edges(),function(h){var m=f.edge(h);m.nestingEdge&&f.removeEdge(h)})}return up}var cp,VN;function jH(){if(VN)return cp;VN=1;var t=Ke(),r=kt();cp=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 h=g.minRank,m=g.maxRank+1;h<m;++h)l(o,"borderLeft","_bl",c,g,h),l(o,"borderRight","_br",c,g,h)}}t.forEach(o.children(),u)}function l(o,u,c,f,g,h){var m={width:0,height:0,rank:h,borderType:u},p=g[u][h-1],y=r.addDummyNode(o,"border",m,c);g[u][h]=y,o.setParent(y,f),p&&o.setEdge(p,y,{weight:1})}return cp}var fp,YN;function MH(){if(YN)return fp;YN=1;var t=Ke();fp={adjust:r,undo:i};function r(h){var m=h.graph().rankdir.toLowerCase();(m==="lr"||m==="rl")&&l(h)}function i(h){var m=h.graph().rankdir.toLowerCase();(m==="bt"||m==="rl")&&u(h),(m==="lr"||m==="rl")&&(f(h),l(h))}function l(h){t.forEach(h.nodes(),function(m){o(h.node(m))}),t.forEach(h.edges(),function(m){o(h.edge(m))})}function o(h){var m=h.width;h.width=h.height,h.height=m}function u(h){t.forEach(h.nodes(),function(m){c(h.node(m))}),t.forEach(h.edges(),function(m){var p=h.edge(m);t.forEach(p.points,c),t.has(p,"y")&&c(p)})}function c(h){h.y=-h.y}function f(h){t.forEach(h.nodes(),function(m){g(h.node(m))}),t.forEach(h.edges(),function(m){var p=h.edge(m);t.forEach(p.points,g),t.has(p,"x")&&g(p)})}function g(h){var m=h.x;h.x=h.y,h.y=m}return fp}var dp,IN;function RH(){if(IN)return dp;IN=1;var t=Ke();dp=r;function r(i){var l={},o=t.filter(i.nodes(),function(h){return!i.children(h).length}),u=t.max(t.map(o,function(h){return i.node(h).rank})),c=t.map(t.range(u+1),function(){return[]});function f(h){if(!t.has(l,h)){l[h]=!0;var m=i.node(h);c[m.rank].push(h),t.forEach(i.successors(h),f)}}var g=t.sortBy(o,function(h){return i.node(h).rank});return t.forEach(g,f),c}return dp}var hp,XN;function qH(){if(XN)return hp;XN=1;var t=Ke();hp=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 h=2*g-1;g-=1;var m=t.map(new Array(h),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 hp}var gp,ZN;function OH(){if(ZN)return gp;ZN=1;var t=Ke();gp=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 h=i.edge(g),m=i.node(g.v);return{sum:f.sum+h.weight*m.order,weight:f.weight+h.weight}},{sum:0,weight:0});return{v:o,barycenter:c.sum/c.weight,weight:c.weight}}else return{v:o}})}return gp}var vp,FN;function zH(){if(FN)return vp;FN=1;var t=Ke();vp=r;function r(o,u){var c={};t.forEach(o,function(g,h){var m=c[g.v]={indegree:0,in:[],out:[],vs:[g.v],i:h};t.isUndefined(g.barycenter)||(m.barycenter=g.barycenter,m.weight=g.weight)}),t.forEach(u.edges(),function(g){var h=c[g.v],m=c[g.w];!t.isUndefined(h)&&!t.isUndefined(m)&&(m.indegree++,h.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(h){return function(m){m.merged||(t.isUndefined(m.barycenter)||t.isUndefined(h.barycenter)||m.barycenter>=h.barycenter)&&l(h,m)}}function f(h){return function(m){m.in.push(h),--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(h){return!h.merged}),function(h){return t.pick(h,["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 vp}var mp,KN;function DH(){if(KN)return mp;KN=1;var t=Ke(),r=kt();mp=i;function i(u,c){var f=r.partition(u,function(N){return t.has(N,"barycenter")}),g=f.lhs,h=t.sortBy(f.rhs,function(N){return-N.i}),m=[],p=0,y=0,b=0;g.sort(o(!!c)),b=l(m,h,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,h,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 mp}var pp,QN;function kH(){if(QN)return pp;QN=1;var t=Ke(),r=OH(),i=zH(),l=DH();pp=o;function o(f,g,h,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(R){return R!==b&&R!==S}));var E=r(f,p);t.forEach(E,function(R){if(f.children(R.v).length){var q=o(f,R.v,h,m);N[R.v]=q,t.has(q,"barycenter")&&c(R,q)}});var C=i(E,h);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(h){h.vs=t.flatten(h.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 pp}var yp,$N;function HH(){if($N)return yp;$N=1;var t=Ke(),r=mn().Graph;yp=i;function i(o,u,c){var f=l(o),g=new r({compound:!0}).setGraph({root:f}).setDefaultNodeLabel(function(h){return o.node(h)});return t.forEach(o.nodes(),function(h){var m=o.node(h),p=o.parent(h);(m.rank===u||m.minRank<=u&&u<=m.maxRank)&&(g.setNode(h),g.setParent(h,p||f),t.forEach(o[c](h),function(y){var b=y.v===h?y.w:y.v,S=g.edge(b,h),N=t.isUndefined(S)?0:S.weight;g.setEdge(b,h,{weight:o.edge(y).weight+N})}),t.has(m,"minRank")&&g.setNode(h,{borderLeft:m.borderLeft[u],borderRight:m.borderRight[u]}))}),g}function l(o){for(var u;o.hasNode(u=t.uniqueId("_root")););return u}return yp}var xp,PN;function LH(){if(PN)return xp;PN=1;var t=Ke();xp=r;function r(i,l,o){var u={},c;t.forEach(o,function(f){for(var g=i.parent(f),h,m;g;){if(h=i.parent(g),h?(m=u[h],u[h]=g):(m=c,c=g),m&&m!==g){l.setEdge(m,g);return}g=h}})}return xp}var bp,JN;function BH(){if(JN)return bp;JN=1;var t=Ke(),r=RH(),i=qH(),l=kH(),o=HH(),u=LH(),c=mn().Graph,f=kt();bp=g;function g(y){var b=f.maxRank(y),S=h(y,t.range(1,b+1),"inEdges"),N=h(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 R=i(y,E);R<C&&(T=0,A=t.cloneDeep(E),C=R)}p(y,A)}function h(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 bp}var _p,WN;function UH(){if(WN)return _p;WN=1;var t=Ke(),r=mn().Graph,i=kt();_p={positionX:S,findType1Conflicts:l,findType2Conflicts:o,addConflict:c,hasConflict:f,verticalAlignment:g,horizontalCompaction:h,alignCoordinates:y,findSmallestWidthAlignment:p,balance:b};function l(C,A){var w={};function T(R,q){var M=0,L=0,H=R.length,K=t.last(q);return t.forEach(q,function(B,F){var J=u(C,B),k=J?C.node(J).order:H;(J||B===K)&&(t.forEach(q.slice(L,F+1),function(Z){t.forEach(C.predecessors(Z),function(O){var V=C.node(O),I=V.order;(I<M||k<I)&&!(V.dummy&&C.node(Z).dummy)&&c(w,O,Z)})}),L=F+1,M=k)}),q}return t.reduce(A,T),w}function o(C,A){var w={};function T(q,M,L,H,K){var B;t.forEach(t.range(M,L),function(F){B=q[F],C.node(B).dummy&&t.forEach(C.predecessors(B),function(J){var k=C.node(J);k.dummy&&(k.order<H||k.order>K)&&c(w,J,B)})})}function R(q,M){var L=-1,H,K=0;return t.forEach(M,function(B,F){if(C.node(B).dummy==="border"){var J=C.predecessors(B);J.length&&(H=C.node(J[0]).order,T(M,K,F,L,H),K=F,L=H)}T(M,K,M.length,H,q.length)}),M}return t.reduce(A,R),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 R=C[A];R||(C[A]=R={}),R[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 R={},q={},M={};return t.forEach(A,function(L){t.forEach(L,function(H,K){R[H]=H,q[H]=H,M[H]=K})}),t.forEach(A,function(L){var H=-1;t.forEach(L,function(K){var B=T(K);if(B.length){B=t.sortBy(B,function(O){return M[O]});for(var F=(B.length-1)/2,J=Math.floor(F),k=Math.ceil(F);J<=k;++J){var Z=B[J];q[K]===K&&H<M[Z]&&!f(w,K,Z)&&(q[Z]=K,q[K]=R[K]=R[Z],H=M[Z])}}})}),{root:R,align:q}}function h(C,A,w,T,R){var q={},M=m(C,A,w,R),L=R?"borderLeft":"borderRight";function H(F,J){for(var k=M.nodes(),Z=k.pop(),O={};Z;)O[Z]?F(Z):(O[Z]=!0,k.push(Z),k=k.concat(J(Z))),Z=k.pop()}function K(F){q[F]=M.inEdges(F).reduce(function(J,k){return Math.max(J,q[k.v]+M.edge(k))},0)}function B(F){var J=M.outEdges(F).reduce(function(Z,O){return Math.min(Z,q[O.w]-M.edge(O))},Number.POSITIVE_INFINITY),k=C.node(F);J!==Number.POSITIVE_INFINITY&&k.borderType!==L&&(q[F]=Math.max(q[F],J))}return H(K,M.predecessors.bind(M)),H(B,M.successors.bind(M)),t.forEach(T,function(F){q[F]=q[w[F]]}),q}function m(C,A,w,T){var R=new r,q=C.graph(),M=N(q.nodesep,q.edgesep,T);return t.forEach(A,function(L){var H;t.forEach(L,function(K){var B=w[K];if(R.setNode(B),H){var F=w[H],J=R.edge(F,B);R.setEdge(F,B,Math.max(M(C,K,H),J||0))}H=K})}),R}function p(C,A){return t.minBy(t.values(A),function(w){var T=Number.NEGATIVE_INFINITY,R=Number.POSITIVE_INFINITY;return t.forIn(w,function(q,M){var L=E(C,M)/2;T=Math.max(q+L,T),R=Math.min(q-L,R)}),T-R})}function y(C,A){var w=t.values(A),T=t.min(w),R=t.max(w);t.forEach(["u","d"],function(q){t.forEach(["l","r"],function(M){var L=q+M,H=C[L],K;if(H!==A){var B=t.values(H);K=M==="l"?T-t.min(B):R-t.max(B),K&&(C[L]=t.mapValues(H,function(F){return F+K}))}})})}function b(C,A){return t.mapValues(C.ul,function(w,T){if(A)return C[A.toLowerCase()][T];var R=t.sortBy(t.map(C,T));return(R[1]+R[2])/2})}function S(C){var A=i.buildLayerMatrix(C),w=t.merge(l(C,A),o(C,A)),T={},R;t.forEach(["u","d"],function(M){R=M==="u"?A:t.values(A).reverse(),t.forEach(["l","r"],function(L){L==="r"&&(R=t.map(R,function(F){return t.values(F).reverse()}));var H=(M==="u"?C.predecessors:C.successors).bind(C),K=g(C,R,w,H),B=h(C,R,K.root,K.align,L==="r");L==="r"&&(B=t.mapValues(B,function(F){return-F})),T[M+L]=B})});var q=p(C,T);return y(T,q),b(T,C.graph().align)}function N(C,A,w){return function(T,R,q){var M=T.node(R),L=T.node(q),H=0,K;if(H+=M.width/2,t.has(M,"labelpos"))switch(M.labelpos.toLowerCase()){case"l":K=-M.width/2;break;case"r":K=M.width/2;break}if(K&&(H+=w?K:-K),K=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":K=L.width/2;break;case"r":K=-L.width/2;break}return K&&(H+=w?K:-K),K=0,H}}function E(C,A){return C.node(A).width}return _p}var wp,eC;function GH(){if(eC)return wp;eC=1;var t=Ke(),r=kt(),i=UH().positionX;wp=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(h){var m=t.max(t.map(h,function(p){return u.node(p).height}));t.forEach(h,function(p){u.node(p).y=g+m/2}),g+=m+f})}return wp}var Sp,tC;function VH(){if(tC)return Sp;tC=1;var t=Ke(),r=SH(),i=EH(),l=CH(),o=kt().normalizeRanks,u=TH(),c=kt().removeEmptyRanks,f=AH(),g=jH(),h=MH(),m=BH(),p=GH(),y=kt(),b=mn().Graph;Sp=S;function S(D,U){var $=U&&U.debugTiming?y.time:y.notime;$("layout",function(){var re=$(" buildLayoutGraph",function(){return H(D)});$(" runLayout",function(){N(re,$)}),$(" updateInputGraph",function(){E(D,re)})})}function N(D,U){U(" makeSpaceForEdgeLabels",function(){K(D)}),U(" removeSelfEdges",function(){P(D)}),U(" acyclic",function(){r.run(D)}),U(" nestingGraph.run",function(){f.run(D)}),U(" rank",function(){l(y.asNonCompoundGraph(D))}),U(" injectEdgeLabelProxies",function(){B(D)}),U(" removeEmptyRanks",function(){c(D)}),U(" nestingGraph.cleanup",function(){f.cleanup(D)}),U(" normalizeRanks",function(){o(D)}),U(" assignRankMinMax",function(){F(D)}),U(" removeEdgeLabelProxies",function(){J(D)}),U(" normalize.run",function(){i.run(D)}),U(" parentDummyChains",function(){u(D)}),U(" addBorderSegments",function(){g(D)}),U(" order",function(){m(D)}),U(" insertSelfEdges",function(){le(D)}),U(" adjustCoordinateSystem",function(){h.adjust(D)}),U(" position",function(){p(D)}),U(" positionSelfEdges",function(){z(D)}),U(" removeBorderNodes",function(){I(D)}),U(" normalize.undo",function(){i.undo(D)}),U(" fixupEdgeLabelCoords",function(){O(D)}),U(" undoCoordinateSystem",function(){h.undo(D)}),U(" translateGraph",function(){k(D)}),U(" assignNodeIntersects",function(){Z(D)}),U(" reversePoints",function(){V(D)}),U(" acyclic.undo",function(){r.undo(D)})}function E(D,U){t.forEach(D.nodes(),function($){var re=D.node($),oe=U.node($);re&&(re.x=oe.x,re.y=oe.y,U.children($).length&&(re.width=oe.width,re.height=oe.height))}),t.forEach(D.edges(),function($){var re=D.edge($),oe=U.edge($);re.points=oe.points,t.has(oe,"x")&&(re.x=oe.x,re.y=oe.y)}),D.graph().width=U.graph().width,D.graph().height=U.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"],R={width:0,height:0},q=["minlen","weight","width","height","labeloffset"],M={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},L=["labelpos"];function H(D){var U=new b({multigraph:!0,compound:!0}),$=ae(D.graph());return U.setGraph(t.merge({},A,Y($,C),t.pick($,w))),t.forEach(D.nodes(),function(re){var oe=ae(D.node(re));U.setNode(re,t.defaults(Y(oe,T),R)),U.setParent(re,D.parent(re))}),t.forEach(D.edges(),function(re){var oe=ae(D.edge(re));U.setEdge(re,t.merge({},M,Y(oe,q),t.pick(oe,L)))}),U}function K(D){var U=D.graph();U.ranksep/=2,t.forEach(D.edges(),function($){var re=D.edge($);re.minlen*=2,re.labelpos.toLowerCase()!=="c"&&(U.rankdir==="TB"||U.rankdir==="BT"?re.width+=re.labeloffset:re.height+=re.labeloffset)})}function B(D){t.forEach(D.edges(),function(U){var $=D.edge(U);if($.width&&$.height){var re=D.node(U.v),oe=D.node(U.w),fe={rank:(oe.rank-re.rank)/2+re.rank,e:U};y.addDummyNode(D,"edge-proxy",fe,"_ep")}})}function F(D){var U=0;t.forEach(D.nodes(),function($){var re=D.node($);re.borderTop&&(re.minRank=D.node(re.borderTop).rank,re.maxRank=D.node(re.borderBottom).rank,U=t.max(U,re.maxRank))}),D.graph().maxRank=U}function J(D){t.forEach(D.nodes(),function(U){var $=D.node(U);$.dummy==="edge-proxy"&&(D.edge($.e).labelRank=$.rank,D.removeNode(U))})}function k(D){var U=Number.POSITIVE_INFINITY,$=0,re=Number.POSITIVE_INFINITY,oe=0,fe=D.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;U=Math.min(U,_e-Te/2),$=Math.max($,_e+Te/2),re=Math.min(re,ve-we/2),oe=Math.max(oe,ve+we/2)}t.forEach(D.nodes(),function(ge){xe(D.node(ge))}),t.forEach(D.edges(),function(ge){var _e=D.edge(ge);t.has(_e,"x")&&xe(_e)}),U-=he,re-=ye,t.forEach(D.nodes(),function(ge){var _e=D.node(ge);_e.x-=U,_e.y-=re}),t.forEach(D.edges(),function(ge){var _e=D.edge(ge);t.forEach(_e.points,function(ve){ve.x-=U,ve.y-=re}),t.has(_e,"x")&&(_e.x-=U),t.has(_e,"y")&&(_e.y-=re)}),fe.width=$-U+he,fe.height=oe-re+ye}function Z(D){t.forEach(D.edges(),function(U){var $=D.edge(U),re=D.node(U.v),oe=D.node(U.w),fe,he;$.points?(fe=$.points[0],he=$.points[$.points.length-1]):($.points=[],fe=oe,he=re),$.points.unshift(y.intersectRect(re,fe)),$.points.push(y.intersectRect(oe,he))})}function O(D){t.forEach(D.edges(),function(U){var $=D.edge(U);if(t.has($,"x"))switch(($.labelpos==="l"||$.labelpos==="r")&&($.width-=$.labeloffset),$.labelpos){case"l":$.x-=$.width/2+$.labeloffset;break;case"r":$.x+=$.width/2+$.labeloffset;break}})}function V(D){t.forEach(D.edges(),function(U){var $=D.edge(U);$.reversed&&$.points.reverse()})}function I(D){t.forEach(D.nodes(),function(U){if(D.children(U).length){var $=D.node(U),re=D.node($.borderTop),oe=D.node($.borderBottom),fe=D.node(t.last($.borderLeft)),he=D.node(t.last($.borderRight));$.width=Math.abs(he.x-fe.x),$.height=Math.abs(oe.y-re.y),$.x=fe.x+$.width/2,$.y=re.y+$.height/2}}),t.forEach(D.nodes(),function(U){D.node(U).dummy==="border"&&D.removeNode(U)})}function P(D){t.forEach(D.edges(),function(U){if(U.v===U.w){var $=D.node(U.v);$.selfEdges||($.selfEdges=[]),$.selfEdges.push({e:U,label:D.edge(U)}),D.removeEdge(U)}})}function le(D){var U=y.buildLayerMatrix(D);t.forEach(U,function($){var re=0;t.forEach($,function(oe,fe){var he=D.node(oe);he.order=fe+re,t.forEach(he.selfEdges,function(ye){y.addDummyNode(D,"selfedge",{width:ye.label.width,height:ye.label.height,rank:he.rank,order:fe+ ++re,e:ye.e,label:ye.label},"_se")}),delete he.selfEdges})})}function z(D){t.forEach(D.nodes(),function(U){var $=D.node(U);if($.dummy==="selfedge"){var re=D.node($.e.v),oe=re.x+re.width/2,fe=re.y,he=$.x-oe,ye=re.height/2;D.setEdge($.e,$.label),D.removeNode(U),$.label.points=[{x:oe+2*he/3,y:fe-ye},{x:oe+5*he/6,y:fe-ye},{x:oe+he,y:fe},{x:oe+5*he/6,y:fe+ye},{x:oe+2*he/3,y:fe+ye}],$.label.x=$.x,$.label.y=$.y}})}function Y(D,U){return t.mapValues(t.pick(D,U),Number)}function ae(D){var U={};return t.forEach(D,function($,re){U[re.toLowerCase()]=$}),U}return Sp}var Ep,nC;function YH(){if(nC)return Ep;nC=1;var t=Ke(),r=kt(),i=mn().Graph;Ep={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 h="layer"+g;c.setNode(h,{rank:"same"}),t.reduce(f,function(m,p){return c.setEdge(m,p,{style:"invis"}),p})}),c}return Ep}var Np,rC;function IH(){return rC||(rC=1,Np="0.8.5"),Np}var Cp,aC;function XH(){return aC||(aC=1,Cp={graphlib:mn(),layout:VH(),debug:YH(),util:{time:kt().time,notime:kt().notime},version:IH()}),Cp}var ZH=XH();const iC=Vp(ZH);function FH({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 KH=ee.memo(FH),QH={taskNode:KH},lC=280,oC=120,$H=80,PH=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:$H,nodesep:PH,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 u3=ee.forwardRef(({graphData:t,onNodeClick:r,colorMode:i="dark"},l)=>{const o=ee.useRef(null),u=ee.useRef(null),{initialNodes:c,initialEdges:f}=ee.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 R=cC(w,T),q=uC(w,R,"TB");return{initialNodes:q.nodes,initialEdges:q.edges}},[t]),[g,h,m]=cD(c),[p,y,b]=fD(f);ee.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 R=cC(w,T),q=uC(w,R,"TB");h(q.nodes),y(q.edges),requestAnimationFrame(()=>{u.current?.fitView({padding:.2,duration:200})})}},[t,h,y]);const S=ee.useCallback(A=>{y(w=>uT(A,w))},[y]),N=ee.useCallback((A,w)=>{r?.(w.id)},[r]),E=ee.useCallback(async()=>{if(g.length===0||!o.current)return;const A=o.current.querySelector(".react-flow");if(A)try{const w=await M6(A,{backgroundColor:"#0d0d14",pixelRatio:2,filter:R=>!(R.classList?.contains("react-flow__controls")||R.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=ee.useCallback(async()=>{if(g.length===0||!o.current)return;const A=o.current.querySelector(".react-flow");if(A)try{const w=await uA(A,{backgroundColor:"#0d0d14",filter:R=>!(R.classList?.contains("react-flow__controls")||R.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 ee.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(uD,{nodes:g,edges:p,onNodesChange:m,onEdgesChange:b,onConnect:S,onNodeClick:N,nodeTypes:QH,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(mD,{style:{background:"var(--surface-base)"}}),x.jsx(SD,{}),x.jsx(kD,{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..."})})});u3.displayName="GraphView";function JH({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",style:{color:o,fontFamily:"var(--font-mono)"},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 WH({isOpen:t,onToggle:r}){const{projects:i,currentProjectPath:l,loading:o,fetchProjects:u,setCurrentProject:c}=Js(),{fetchTasks:f,fetchGraph:g,fetchStats:h}=hC();ee.useEffect(()=>{u()},[u]);const m=b=>{b.exists&&(c(b.path),f(),g(),h())},p=()=>{c(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:o?x.jsx("div",{className:"flex items-center justify-center py-8",children:x.jsx("div",{className:"w-6 h-6 rounded-full animate-spin",style:{border:"2px solid var(--border-default)",borderTopColor:"var(--accent-cyan)"}})}):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(JH,{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 eL({onMenuClick:t}){const{currentProjectPath:r,projects:i}=Js(),{theme:l,toggleTheme:o}=vC(),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 tL({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 nL(){const{projects:t,loading:r,fetchProjects:i,setCurrentProject:l}=Js();ee.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(tL,{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 rL(){const{theme:t,toggleTheme:r}=vC(),i=ee.useRef(null),{tasks:l,loading:o,error:u,selectedTaskId:c,graphData:f,projectStats:g,fetchTasks:h,fetchGraph:m,fetchStats:p,setQueryOptions:y,setSelectedTask:b,setCurrentProjectPath:S,clearError:N}=hC(),{currentProjectPath:E,sidebarOpen:C,getProjectFromUrl:A,setCurrentProject:w,toggleSidebar:T}=Js(),[R,q]=ee.useState("list"),[M,L]=ee.useState("all"),[H,K]=ee.useState("all"),[B,F]=ee.useState(""),[J,k]=ee.useState("");ee.useEffect(()=>{const D=setTimeout(()=>{k(B)},500);return()=>clearTimeout(D)},[B]);const Z=ee.useMemo(()=>{let D=l;if(M!=="all"&&(D=D.filter(U=>U.status===M)),H!=="all"&&(D=D.filter(U=>U.priority===H)),J.trim()){const U=J.toLowerCase().trim();D=D.filter($=>$.title.toLowerCase().includes(U)||$.description?.toLowerCase().includes(U)||$.notes?.toLowerCase().includes(U))}return D},[l,M,H,J]);ee.useEffect(()=>{const D=A();D&&w(D)},[A,w]),ee.useEffect(()=>{S(E)},[E,S]),ee.useEffect(()=>{E&&(h(),m(),p())},[E,h,m,p]);const O=ee.useCallback(()=>{h(),m(),p()},[h,m,p]),V=ee.useCallback(D=>{L(D),y(U=>({...U,status:D==="all"?void 0:D}))},[y]),I=ee.useCallback(D=>{K(D),y(U=>({...U,priority:D==="all"?void 0:D}))},[y]),P=ee.useCallback(D=>{F(D),y(U=>({...U,search:D||void 0}))},[y]),le=ee.useCallback(D=>{D==="graph"&&(L("all"),K("all"),F(""),k(""),y({})),q(D)},[y]),z=ee.useCallback(()=>{i.current?.exportAsPNG()},[]),Y=ee.useCallback(()=>{i.current?.exportAsSVG()},[]);ee.useEffect(()=>{const D=U=>{if(!(U.target.tagName==="INPUT"||U.target.tagName==="TEXTAREA")&&((U.ctrlKey||U.metaKey)&&U.key==="r"&&(U.preventDefault(),O()),(U.ctrlKey||U.metaKey)&&U.key==="k"&&(U.preventDefault(),document.getElementById("search")?.focus()),U.key==="l"&&!U.ctrlKey&&!U.metaKey&&le("list"),U.key==="g"&&!U.ctrlKey&&!U.metaKey&&le("graph"),U.key==="t"&&!U.ctrlKey&&!U.metaKey&&r(),U.key==="Escape"&&b(null),U.key==="["&&!U.ctrlKey&&!U.metaKey&&T(),R==="list"&&l.length>0)){if(U.key==="ArrowDown"||U.key==="j"){U.preventDefault();const $=c?l.findIndex(oe=>oe.id===c):-1,re=Math.min($+1,l.length-1);b(l[re]?.id||null)}if(U.key==="ArrowUp"||U.key==="k"){U.preventDefault();const $=c?l.findIndex(oe=>oe.id===c):0,re=Math.max($-1,0);b(l[re]?.id||null)}}};return window.addEventListener("keydown",D),()=>window.removeEventListener("keydown",D)},[R,l,c,O,r,b,T,le]);const ae=!E;return x.jsxs("div",{className:"h-screen flex flex-col overflow-hidden",style:{background:"var(--surface-base)"},children:[x.jsx(eL,{onMenuClick:T}),x.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[x.jsx(WH,{isOpen:C,onToggle:T}),ae?x.jsx("main",{className:"flex-1 overflow-y-auto",children:x.jsx(nL,{})}):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(jM,{view:R,onViewChange:le,onRefresh:O,loading:o,onExportPNG:z,onExportSVG:Y}),x.jsx(OM,{stats:g,loading:o}),x.jsxs("div",{className:"flex-1 flex overflow-hidden min-w-0 min-h-0",children:[R==="list"&&x.jsxs("aside",{className:"w-80 flex-shrink-0 overflow-y-auto hidden md:flex md:flex-col",style:{background:"var(--surface-abyss)",borderRight:"1px solid var(--border-default)"},children:[x.jsxs("div",{className:"p-4 flex-shrink-0",style:{borderBottom:"1px solid var(--border-muted)"},children:[x.jsx("h2",{className:"text-xs font-medium uppercase tracking-wide mb-3",style:{color:"var(--text-muted)",fontFamily:"var(--font-mono)"},children:"Filters"}),x.jsx(qM,{selectedStatus:M,selectedPriority:H,searchQuery:B,onStatusChange:V,onPriorityChange:I,onSearchChange:P})]}),x.jsx("div",{className:"flex-1 overflow-y-auto min-h-0",children:x.jsxs("div",{className:"p-4",children:[x.jsxs("h2",{className:"text-xs font-medium uppercase tracking-wide mb-3 flex items-center gap-2",style:{color:"var(--text-muted)",fontFamily:"var(--font-mono)"},children:["Tasks",x.jsxs("span",{className:"tabular-nums",style:{color:"var(--accent-cyan)"},children:[Z.length,Z.length!==l.length&&x.jsxs("span",{style:{color:"var(--text-muted)"},children:["/",l.length]})]})]}),x.jsx(MM,{tasks:Z,selectedTaskId:c,onTaskClick:b,loading:o})]})})]}),R==="graph"&&x.jsx("div",{className:"flex-1 min-w-0 min-h-0 overflow-hidden",children:x.jsx(u3,{ref:i,graphData:f,onNodeClick:b,colorMode:t})}),x.jsxs("aside",{className:`
32
- w-80 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(RM,{task:l.find(D=>D.id===c)||null,loading:o})})]})]})]})]})]})]})}SM.createRoot(document.getElementById("root")).render(x.jsx(ee.StrictMode,{children:x.jsx(AM,{children:x.jsx(rL,{})})}));