hyperbook 0.71.3 → 0.71.5
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.
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Xh;function
|
|
9
|
+
*/var Xh;function fb(){if(Xh)return Ce;Xh=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function S(A){return A===null||typeof A!="object"?null:(A=v&&A[v]||A["@@iterator"],typeof A=="function"?A:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,_={};function T(A,O,G){this.props=A,this.context=O,this.refs=_,this.updater=G||b}T.prototype.isReactComponent={},T.prototype.setState=function(A,O){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,O,"setState")},T.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function z(){}z.prototype=T.prototype;function N(A,O,G){this.props=A,this.context=O,this.refs=_,this.updater=G||b}var C=N.prototype=new z;C.constructor=N,E(C,T.prototype),C.isPureReactComponent=!0;var D=Array.isArray;function R(){}var j={H:null,A:null,T:null,S:null},K=Object.prototype.hasOwnProperty;function J(A,O,G){var P=G.ref;return{$$typeof:n,type:A,key:O,ref:P!==void 0?P:null,props:G}}function fe(A,O){return J(A.type,O,A.props)}function U(A){return typeof A=="object"&&A!==null&&A.$$typeof===n}function F(A){var O={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(G){return O[G]})}var ae=/\/+/g;function H(A,O){return typeof A=="object"&&A!==null&&A.key!=null?F(""+A.key):O.toString(36)}function I(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(R,R):(A.status="pending",A.then(function(O){A.status==="pending"&&(A.status="fulfilled",A.value=O)},function(O){A.status==="pending"&&(A.status="rejected",A.reason=O)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function k(A,O,G,P,se){var ge=typeof A;(ge==="undefined"||ge==="boolean")&&(A=null);var he=!1;if(A===null)he=!0;else switch(ge){case"bigint":case"string":case"number":he=!0;break;case"object":switch(A.$$typeof){case n:case a:he=!0;break;case x:return he=A._init,k(he(A._payload),O,G,P,se)}}if(he)return se=se(A),he=P===""?"."+H(A,0):P,D(se)?(G="",he!=null&&(G=he.replace(ae,"$&/")+"/"),k(se,O,G,"",function(Ne){return Ne})):se!=null&&(U(se)&&(se=fe(se,G+(se.key==null||A&&A.key===se.key?"":(""+se.key).replace(ae,"$&/")+"/")+he)),O.push(se)),1;he=0;var ue=P===""?".":P+":";if(D(A))for(var me=0;me<A.length;me++)P=A[me],ge=ue+H(P,me),he+=k(P,O,G,ge,se);else if(me=S(A),typeof me=="function")for(A=me.call(A),me=0;!(P=A.next()).done;)P=P.value,ge=ue+H(P,me++),he+=k(P,O,G,ge,se);else if(ge==="object"){if(typeof A.then=="function")return k(I(A),O,G,P,se);throw O=String(A),Error("Objects are not valid as a React child (found: "+(O==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":O)+"). If you meant to render a collection of children, use an array instead.")}return he}function L(A,O,G){if(A==null)return A;var P=[],se=0;return k(A,P,"","",function(ge){return O.call(G,ge,se++)}),P}function $(A){if(A._status===-1){var O=A._result;O=O(),O.then(function(G){(A._status===0||A._status===-1)&&(A._status=1,A._result=G)},function(G){(A._status===0||A._status===-1)&&(A._status=2,A._result=G)}),A._status===-1&&(A._status=0,A._result=O)}if(A._status===1)return A._result.default;throw A._result}var Z=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var O=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(O))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},Y={map:L,forEach:function(A,O,G){L(A,function(){O.apply(this,arguments)},G)},count:function(A){var O=0;return L(A,function(){O++}),O},toArray:function(A){return L(A,function(O){return O})||[]},only:function(A){if(!U(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return Ce.Activity=y,Ce.Children=Y,Ce.Component=T,Ce.Fragment=i,Ce.Profiler=r,Ce.PureComponent=N,Ce.StrictMode=s,Ce.Suspense=g,Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,Ce.__COMPILER_RUNTIME={__proto__:null,c:function(A){return j.H.useMemoCache(A)}},Ce.cache=function(A){return function(){return A.apply(null,arguments)}},Ce.cacheSignal=function(){return null},Ce.cloneElement=function(A,O,G){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var P=E({},A.props),se=A.key;if(O!=null)for(ge in O.key!==void 0&&(se=""+O.key),O)!K.call(O,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&O.ref===void 0||(P[ge]=O[ge]);var ge=arguments.length-2;if(ge===1)P.children=G;else if(1<ge){for(var he=Array(ge),ue=0;ue<ge;ue++)he[ue]=arguments[ue+2];P.children=he}return J(A.type,se,P)},Ce.createContext=function(A){return A={$$typeof:u,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:c,_context:A},A},Ce.createElement=function(A,O,G){var P,se={},ge=null;if(O!=null)for(P in O.key!==void 0&&(ge=""+O.key),O)K.call(O,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(se[P]=O[P]);var he=arguments.length-2;if(he===1)se.children=G;else if(1<he){for(var ue=Array(he),me=0;me<he;me++)ue[me]=arguments[me+2];se.children=ue}if(A&&A.defaultProps)for(P in he=A.defaultProps,he)se[P]===void 0&&(se[P]=he[P]);return J(A,ge,se)},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(A){return{$$typeof:h,render:A}},Ce.isValidElement=U,Ce.lazy=function(A){return{$$typeof:x,_payload:{_status:-1,_result:A},_init:$}},Ce.memo=function(A,O){return{$$typeof:p,type:A,compare:O===void 0?null:O}},Ce.startTransition=function(A){var O=j.T,G={};j.T=G;try{var P=A(),se=j.S;se!==null&&se(G,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then(R,Z)}catch(ge){Z(ge)}finally{O!==null&&G.types!==null&&(O.types=G.types),j.T=O}},Ce.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},Ce.use=function(A){return j.H.use(A)},Ce.useActionState=function(A,O,G){return j.H.useActionState(A,O,G)},Ce.useCallback=function(A,O){return j.H.useCallback(A,O)},Ce.useContext=function(A){return j.H.useContext(A)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(A,O){return j.H.useDeferredValue(A,O)},Ce.useEffect=function(A,O){return j.H.useEffect(A,O)},Ce.useEffectEvent=function(A){return j.H.useEffectEvent(A)},Ce.useId=function(){return j.H.useId()},Ce.useImperativeHandle=function(A,O,G){return j.H.useImperativeHandle(A,O,G)},Ce.useInsertionEffect=function(A,O){return j.H.useInsertionEffect(A,O)},Ce.useLayoutEffect=function(A,O){return j.H.useLayoutEffect(A,O)},Ce.useMemo=function(A,O){return j.H.useMemo(A,O)},Ce.useOptimistic=function(A,O){return j.H.useOptimistic(A,O)},Ce.useReducer=function(A,O,G){return j.H.useReducer(A,O,G)},Ce.useRef=function(A){return j.H.useRef(A)},Ce.useState=function(A){return j.H.useState(A)},Ce.useSyncExternalStore=function(A,O,G){return j.H.useSyncExternalStore(A,O,G)},Ce.useTransition=function(){return j.H.useTransition()},Ce.version="19.2.0",Ce}var Gh;function oo(){return Gh||(Gh=1,Kc.exports=fb()),Kc.exports}var B=oo();const Ka=ii(B);var Fc={exports:{}},so={},Jc={exports:{}},Pc={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* scheduler.production.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Zh;function
|
|
17
|
+
*/var Zh;function db(){return Zh||(Zh=1,(function(n){function a(k,L){var $=k.length;k.push(L);e:for(;0<$;){var Z=$-1>>>1,Y=k[Z];if(0<r(Y,L))k[Z]=L,k[$]=Y,$=Z;else break e}}function i(k){return k.length===0?null:k[0]}function s(k){if(k.length===0)return null;var L=k[0],$=k.pop();if($!==L){k[0]=$;e:for(var Z=0,Y=k.length,A=Y>>>1;Z<A;){var O=2*(Z+1)-1,G=k[O],P=O+1,se=k[P];if(0>r(G,$))P<Y&&0>r(se,G)?(k[Z]=se,k[P]=$,Z=P):(k[Z]=G,k[O]=$,Z=O);else if(P<Y&&0>r(se,$))k[Z]=se,k[P]=$,Z=P;else break e}}return L}function r(k,L){var $=k.sortIndex-L.sortIndex;return $!==0?$:k.id-L.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var u=Date,h=u.now();n.unstable_now=function(){return u.now()-h}}var g=[],p=[],x=1,y=null,v=3,S=!1,b=!1,E=!1,_=!1,T=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function C(k){for(var L=i(p);L!==null;){if(L.callback===null)s(p);else if(L.startTime<=k)s(p),L.sortIndex=L.expirationTime,a(g,L);else break;L=i(p)}}function D(k){if(E=!1,C(k),!b)if(i(g)!==null)b=!0,R||(R=!0,F());else{var L=i(p);L!==null&&I(D,L.startTime-k)}}var R=!1,j=-1,K=5,J=-1;function fe(){return _?!0:!(n.unstable_now()-J<K)}function U(){if(_=!1,R){var k=n.unstable_now();J=k;var L=!0;try{e:{b=!1,E&&(E=!1,z(j),j=-1),S=!0;var $=v;try{t:{for(C(k),y=i(g);y!==null&&!(y.expirationTime>k&&fe());){var Z=y.callback;if(typeof Z=="function"){y.callback=null,v=y.priorityLevel;var Y=Z(y.expirationTime<=k);if(k=n.unstable_now(),typeof Y=="function"){y.callback=Y,C(k),L=!0;break t}y===i(g)&&s(g),C(k)}else s(g);y=i(g)}if(y!==null)L=!0;else{var A=i(p);A!==null&&I(D,A.startTime-k),L=!1}}break e}finally{y=null,v=$,S=!1}L=void 0}}finally{L?F():R=!1}}}var F;if(typeof N=="function")F=function(){N(U)};else if(typeof MessageChannel<"u"){var ae=new MessageChannel,H=ae.port2;ae.port1.onmessage=U,F=function(){H.postMessage(null)}}else F=function(){T(U,0)};function I(k,L){j=T(function(){k(n.unstable_now())},L)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(k){k.callback=null},n.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<k?Math.floor(1e3/k):5},n.unstable_getCurrentPriorityLevel=function(){return v},n.unstable_next=function(k){switch(v){case 1:case 2:case 3:var L=3;break;default:L=v}var $=v;v=L;try{return k()}finally{v=$}},n.unstable_requestPaint=function(){_=!0},n.unstable_runWithPriority=function(k,L){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var $=v;v=k;try{return L()}finally{v=$}},n.unstable_scheduleCallback=function(k,L,$){var Z=n.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?Z+$:Z):$=Z,k){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=$+Y,k={id:x++,callback:L,priorityLevel:k,startTime:$,expirationTime:Y,sortIndex:-1},$>Z?(k.sortIndex=$,a(p,k),i(g)===null&&k===i(p)&&(E?(z(j),j=-1):E=!0,I(D,$-Z))):(k.sortIndex=Y,a(g,k),b||S||(b=!0,R||(R=!0,F()))),k},n.unstable_shouldYield=fe,n.unstable_wrapCallback=function(k){var L=v;return function(){var $=v;v=L;try{return k.apply(this,arguments)}finally{v=$}}}})(Pc)),Pc}var Ih;function hb(){return Ih||(Ih=1,Jc.exports=db()),Jc.exports}var Wc={exports:{}},It={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* react-dom.production.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var Qh;function
|
|
25
|
+
*/var Qh;function pb(){if(Qh)return It;Qh=1;var n=oo();function a(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)p+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var s={d:{f:i,r:function(){throw Error(a(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},r=Symbol.for("react.portal");function c(g,p,x){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:y==null?null:""+y,children:g,containerInfo:p,implementation:x}}var u=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return It.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,It.createPortal=function(g,p){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(a(299));return c(g,p,null,x)},It.flushSync=function(g){var p=u.T,x=s.p;try{if(u.T=null,s.p=2,g)return g()}finally{u.T=p,s.p=x,s.d.f()}},It.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,s.d.C(g,p))},It.prefetchDNS=function(g){typeof g=="string"&&s.d.D(g)},It.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var x=p.as,y=h(x,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,S=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;x==="style"?s.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:S}):x==="script"&&s.d.X(g,{crossOrigin:y,integrity:v,fetchPriority:S,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},It.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var x=h(p.as,p.crossOrigin);s.d.M(g,{crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&s.d.M(g)},It.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var x=p.as,y=h(x,p.crossOrigin);s.d.L(g,x,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},It.preloadModule=function(g,p){if(typeof g=="string")if(p){var x=h(p.as,p.crossOrigin);s.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else s.d.m(g)},It.requestFormReset=function(g){s.d.r(g)},It.unstable_batchedUpdates=function(g,p){return g(p)},It.useFormState=function(g,p,x){return u.H.useFormState(g,p,x)},It.useFormStatus=function(){return u.H.useHostTransitionStatus()},It.version="19.2.0",It}var Kh;function Fh(){if(Kh)return Wc.exports;Kh=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),Wc.exports=pb(),Wc.exports}/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom-client.production.js
|
|
28
28
|
*
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Jh;function
|
|
33
|
+
*/var Jh;function gb(){if(Jh)return so;Jh=1;var n=hb(),a=oo(),i=Fh();function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function u(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(c(e)!==e)throw Error(s(188))}function p(e){var t=e.alternate;if(!t){if(t=c(e),t===null)throw Error(s(188));return t!==e?null:e}for(var l=e,o=t;;){var f=l.return;if(f===null)break;var d=f.alternate;if(d===null){if(o=f.return,o!==null){l=o;continue}break}if(f.child===d.child){for(d=f.child;d;){if(d===l)return g(f),e;if(d===o)return g(f),t;d=d.sibling}throw Error(s(188))}if(l.return!==o.return)l=f,o=d;else{for(var w=!1,M=f.child;M;){if(M===l){w=!0,l=f,o=d;break}if(M===o){w=!0,o=f,l=d;break}M=M.sibling}if(!w){for(M=d.child;M;){if(M===l){w=!0,l=d,o=f;break}if(M===o){w=!0,o=d,l=f;break}M=M.sibling}if(!w)throw Error(s(189))}}if(l.alternate!==o)throw Error(s(190))}if(l.tag!==3)throw Error(s(188));return l.stateNode.current===l?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,v=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),N=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),fe=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function F(e){return e===null||typeof e!="object"?null:(e=U&&e[U]||e["@@iterator"],typeof e=="function"?e:null)}var ae=Symbol.for("react.client.reference");function H(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ae?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case T:return"Profiler";case _:return"StrictMode";case D:return"Suspense";case R:return"SuspenseList";case J:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case b:return"Portal";case N:return e.displayName||"Context";case z:return(e._context.displayName||"Context")+".Consumer";case C:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case j:return t=e.displayName||null,t!==null?t:H(e.type)||"Memo";case K:t=e._payload,e=e._init;try{return H(e(t))}catch{}}return null}var I=Array.isArray,k=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},Z=[],Y=-1;function A(e){return{current:e}}function O(e){0>Y||(e.current=Z[Y],Z[Y]=null,Y--)}function G(e,t){Y++,Z[Y]=e.current,e.current=t}var P=A(null),se=A(null),ge=A(null),he=A(null);function ue(e,t){switch(G(ge,t),G(se,e),G(P,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Rv(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Rv(t),e=jv(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}O(P),G(P,e)}function me(){O(P),O(se),O(ge)}function Ne(e){e.memoizedState!==null&&G(he,e);var t=P.current,l=jv(t,e.type);t!==l&&(G(se,e),G(P,l))}function ke(e){se.current===e&&(O(P),O(se)),he.current===e&&(O(he),Os._currentValue=$)}var Se,_e;function we(e){if(Se===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Se=t&&t[1]||"",_e=-1<l.stack.indexOf(`
|
|
34
34
|
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
35
35
|
`+Se+e+_e}var Me=!1;function Re(e,t){if(!e||Me)return"";Me=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(t){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(ne){var te=ne}Reflect.construct(e,[],ce)}else{try{ce.call()}catch(ne){te=ne}e.call(ce.prototype)}}else{try{throw Error()}catch(ne){te=ne}(ce=e())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(ne){if(ne&&te&&typeof ne.stack=="string")return[ne.stack,te.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=o.DetermineComponentFrameRoot(),w=d[0],M=d[1];if(w&&M){var V=w.split(`
|
|
36
36
|
`),ee=M.split(`
|
|
37
37
|
`);for(f=o=0;o<V.length&&!V[o].includes("DetermineComponentFrameRoot");)o++;for(;f<ee.length&&!ee[f].includes("DetermineComponentFrameRoot");)f++;if(o===V.length||f===ee.length)for(o=V.length-1,f=ee.length-1;1<=o&&0<=f&&V[o]!==ee[f];)f--;for(;1<=o&&0<=f;o--,f--)if(V[o]!==ee[f]){if(o!==1||f!==1)do if(o--,f--,0>f||V[o]!==ee[f]){var oe=`
|
|
38
38
|
`+V[o].replace(" at new "," at ");return e.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",e.displayName)),oe}while(1<=o&&0<=f);break}}}finally{Me=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?we(l):""}function le(e,t){switch(e.tag){case 26:case 27:case 5:return we(e.type);case 16:return we("Lazy");case 13:return e.child!==t&&t!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return Re(e.type,!1);case 11:return Re(e.type.render,!1);case 1:return Re(e.type,!0);case 31:return we("Activity");default:return""}}function de(e){try{var t="",l=null;do t+=le(e,l),l=e,e=e.return;while(e);return t}catch(o){return`
|
|
39
39
|
Error generating stack: `+o.message+`
|
|
40
|
-
`+o.stack}}var Je=Object.prototype.hasOwnProperty,et=n.unstable_scheduleCallback,on=n.unstable_cancelCallback,wn=n.unstable_shouldYield,_t=n.unstable_requestPaint,gt=n.unstable_now,sn=n.unstable_getCurrentPriorityLevel,Bt=n.unstable_ImmediatePriority,$t=n.unstable_UserBlockingPriority,Rt=n.unstable_NormalPriority,Na=n.unstable_LowPriority,ea=n.unstable_IdlePriority,ta=n.log,pa=n.unstable_setDisableYieldValue,rn=null,vt=null;function mt(e){if(typeof ta=="function"&&pa(e),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(rn,e)}catch{}}var dt=Math.clz32?Math.clz32:je,ka=Math.log,ga=Math.LN2;function je(e){return e>>>=0,e===0?32:31-(ka(e)/ga|0)|0}var tt=256,yt=262144,jt=4194304;function Ye(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function En(e,t,l){var o=e.pendingLanes;if(o===0)return 0;var f=0,d=e.suspendedLanes,w=e.pingedLanes;e=e.warmLanes;var M=o&134217727;return M!==0?(o=M&~d,o!==0?f=Ye(o):(w&=M,w!==0?f=Ye(w):l||(l=M&~e,l!==0&&(f=Ye(l))))):(M=o&~d,M!==0?f=Ye(M):w!==0?f=Ye(w):l||(l=o&~e,l!==0&&(f=Ye(l)))),f===0?0:t!==0&&t!==f&&(t&d)===0&&(d=f&-f,l=t&-t,d>=l||d===32&&(l&4194048)!==0)?t:f}function na(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ht(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ft(){var e=jt;return jt<<=1,(jt&62914560)===0&&(jt=4194304),e}function Ta(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Dn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ma(e,t,l,o,f,d){var w=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var M=e.entanglements,V=e.expirationTimes,ee=e.hiddenUpdates;for(l=w&~l;0<l;){var oe=31-dt(l),ce=1<<oe;M[oe]=0,V[oe]=-1;var te=ee[oe];if(te!==null)for(ee[oe]=null,oe=0;oe<te.length;oe++){var ne=te[oe];ne!==null&&(ne.lane&=-536870913)}l&=~ce}o!==0&&Ca(e,o,0),d!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=d&~(w&~t))}function Ca(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-dt(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|l&261930}function Ma(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var o=31-dt(l),f=1<<o;f&t|e[o]&t&&(e[o]|=t),l&=~f}}function On(e,t){var l=t&-t;return l=(l&42)!==0?1:Ct(l),(l&(e.suspendedLanes|t))!==0?0:l}function Ct(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 Yt(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Rn(){var e=L.p;return e!==0?e:(e=window.event,e===void 0?32:ab(e.type))}function Vl(e,t){var l=L.p;try{return L.p=e,t()}finally{L.p=l}}var cn=Math.random().toString(36).slice(2),bt="__reactFiber$"+cn,ot="__reactProps$"+cn,jn="__reactContainer$"+cn,za="__reactEvents$"+cn,$l="__reactListeners$"+cn,bi="__reactHandles$"+cn,Si="__reactResources$"+cn,ve="__reactMarker$"+cn;function q(e){delete e[bt],delete e[ot],delete e[za],delete e[$l],delete e[bi]}function pe(e){var t=e[bt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[jn]||l[bt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=$v(e);e!==null;){if(l=e[bt])return l;e=$v(e)}return t}e=l,l=e.parentNode}return null}function ye(e){if(e=e[bt]||e[jn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Xe(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function st(e){var t=e[Si];return t||(t=e[Si]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function De(e){e[ve]=!0}var Lt=new Set,un={};function Jt(e,t){Ln(e,t),Ln(e+"Capture",t)}function Ln(e,t){for(un[e]=t,e=0;e<t.length;e++)Lt.add(t[e])}var At=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]*$"),al={},Yl={};function jf(e){return Je.call(Yl,e)?!0:Je.call(al,e)?!1:At.test(e)?Yl[e]=!0:(al[e]=!0,!1)}function wi(e,t,l){if(jf(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var o=t.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function Ei(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function aa(e,t,l,o){if(o===null)e.removeAttribute(l);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+o)}}function fn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Hr(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Lf(e,t,l){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var f=o.get,d=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return f.call(this)},set:function(w){l=""+w,d.call(this,w)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(w){l=""+w},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _i(e){if(!e._valueTracker){var t=Hr(e)?"checked":"value";e._valueTracker=Lf(e,t,""+e[t])}}function Br(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),o="";return e&&(o=Hr(e)?e.checked?"true":"false":e.value),e=o,e!==l?(t.setValue(e),!0):!1}function Ai(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 Hf=/[\n"\\]/g;function Pt(e){return e.replace(Hf,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ko(e,t,l,o,f,d,w,M){e.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.type=w:e.removeAttribute("type"),t!=null?w==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+fn(t)):e.value!==""+fn(t)&&(e.value=""+fn(t)):w!=="submit"&&w!=="reset"||e.removeAttribute("value"),t!=null?Ni(e,w,fn(t)):l!=null?Ni(e,w,fn(l)):o!=null&&e.removeAttribute("value"),f==null&&d!=null&&(e.defaultChecked=!!d),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?e.name=""+fn(M):e.removeAttribute("name")}function Ur(e,t,l,o,f,d,w,M){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||l!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){_i(e);return}l=l!=null?""+fn(l):"",t=t!=null?""+fn(t):l,M||t===e.value||(e.value=t),e.defaultValue=t}o=o??f,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=M?e.checked:!!o,e.defaultChecked=!!o,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(e.name=w),_i(e)}function Ni(e,t,l){t==="number"&&Ai(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function ki(e,t,l,o){if(e=e.options,t){t={};for(var f=0;f<l.length;f++)t["$"+l[f]]=!0;for(l=0;l<e.length;l++)f=t.hasOwnProperty("$"+e[l].value),e[l].selected!==f&&(e[l].selected=f),f&&o&&(e[l].defaultSelected=!0)}else{for(l=""+fn(l),t=null,f=0;f<e.length;f++){if(e[f].value===l){e[f].selected=!0,o&&(e[f].defaultSelected=!0);return}t!==null||e[f].disabled||(t=e[f])}t!==null&&(t.selected=!0)}}function Ty(e,t,l){if(t!=null&&(t=""+fn(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+fn(l):""}function Cy(e,t,l,o){if(t==null){if(o!=null){if(l!=null)throw Error(s(92));if(I(o)){if(1<o.length)throw Error(s(93));o=o[0]}l=o}l==null&&(l=""),t=l}l=fn(t),e.defaultValue=l,o=e.textContent,o===l&&o!==""&&o!==null&&(e.value=o),_i(e)}function Ti(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var JT=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 My(e,t,l){var o=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,l):typeof l!="number"||l===0||JT.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function zy(e,t,l){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,l!=null){for(var o in l)!l.hasOwnProperty(o)||t!=null&&t.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var f in t)o=t[f],t.hasOwnProperty(f)&&l[f]!==o&&My(e,f,o)}else for(var d in t)t.hasOwnProperty(d)&&My(e,d,t[d])}function Bf(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 PT=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"]]),WT=/^[\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 Vr(e){return WT.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Da(){}var Uf=null;function Vf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ci=null,Mi=null;function Dy(e){var t=ye(e);if(t&&(e=t.stateNode)){var l=e[ot]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ko(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Pt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var o=l[t];if(o!==e&&o.form===e.form){var f=o[ot]||null;if(!f)throw Error(s(90));Ko(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(t=0;t<l.length;t++)o=l[t],o.form===e.form&&Br(o)}break e;case"textarea":Ty(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&ki(e,!!l.multiple,t,!1)}}}var $f=!1;function Oy(e,t,l){if($f)return e(t,l);$f=!0;try{var o=e(t);return o}finally{if($f=!1,(Ci!==null||Mi!==null)&&(kc(),Ci&&(t=Ci,e=Mi,Mi=Ci=null,Dy(t),e)))for(t=0;t<e.length;t++)Dy(e[t])}}function Fo(e,t){var l=e.stateNode;if(l===null)return null;var o=l[ot]||null;if(o===null)return null;l=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(s(231,t,typeof l));return l}var Oa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yf=!1;if(Oa)try{var Jo={};Object.defineProperty(Jo,"passive",{get:function(){Yf=!0}}),window.addEventListener("test",Jo,Jo),window.removeEventListener("test",Jo,Jo)}catch{Yf=!1}var ll=null,qf=null,$r=null;function Ry(){if($r)return $r;var e,t=qf,l=t.length,o,f="value"in ll?ll.value:ll.textContent,d=f.length;for(e=0;e<l&&t[e]===f[e];e++);var w=l-e;for(o=1;o<=w&&t[l-o]===f[d-o];o++);return $r=f.slice(e,1<o?1-o:void 0)}function Yr(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function qr(){return!0}function jy(){return!1}function dn(e){function t(l,o,f,d,w){this._reactName=l,this._targetInst=f,this.type=o,this.nativeEvent=d,this.target=w,this.currentTarget=null;for(var M in e)e.hasOwnProperty(M)&&(l=e[M],this[M]=l?l(d):d[M]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?qr:jy,this.isPropagationStopped=jy,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=qr)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=qr)},persist:function(){},isPersistent:qr}),t}var ql={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xr=dn(ql),Po=y({},ql,{view:0,detail:0}),eC=dn(Po),Xf,Gf,Wo,Gr=y({},Po,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:If,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!==Wo&&(Wo&&e.type==="mousemove"?(Xf=e.screenX-Wo.screenX,Gf=e.screenY-Wo.screenY):Gf=Xf=0,Wo=e),Xf)},movementY:function(e){return"movementY"in e?e.movementY:Gf}}),Ly=dn(Gr),tC=y({},Gr,{dataTransfer:0}),nC=dn(tC),aC=y({},Po,{relatedTarget:0}),Zf=dn(aC),lC=y({},ql,{animationName:0,elapsedTime:0,pseudoElement:0}),iC=dn(lC),oC=y({},ql,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),sC=dn(oC),rC=y({},ql,{data:0}),Hy=dn(rC),cC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},uC={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"},fC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dC(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=fC[e])?!!t[e]:!1}function If(){return dC}var hC=y({},Po,{key:function(e){if(e.key){var t=cC[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Yr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?uC[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:If,charCode:function(e){return e.type==="keypress"?Yr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Yr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),pC=dn(hC),gC=y({},Gr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),By=dn(gC),mC=y({},Po,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:If}),yC=dn(mC),xC=y({},ql,{propertyName:0,elapsedTime:0,pseudoElement:0}),vC=dn(xC),bC=y({},Gr,{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}),SC=dn(bC),wC=y({},ql,{newState:0,oldState:0}),EC=dn(wC),_C=[9,13,27,32],Qf=Oa&&"CompositionEvent"in window,es=null;Oa&&"documentMode"in document&&(es=document.documentMode);var AC=Oa&&"TextEvent"in window&&!es,Uy=Oa&&(!Qf||es&&8<es&&11>=es),Vy=" ",$y=!1;function Yy(e,t){switch(e){case"keyup":return _C.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qy(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zi=!1;function NC(e,t){switch(e){case"compositionend":return qy(t);case"keypress":return t.which!==32?null:($y=!0,Vy);case"textInput":return e=t.data,e===Vy&&$y?null:e;default:return null}}function kC(e,t){if(zi)return e==="compositionend"||!Qf&&Yy(e,t)?(e=Ry(),$r=qf=ll=null,zi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Uy&&t.locale!=="ko"?null:t.data;default:return null}}var TC={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Xy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!TC[e.type]:t==="textarea"}function Gy(e,t,l,o){Ci?Mi?Mi.push(o):Mi=[o]:Ci=o,t=Rc(t,"onChange"),0<t.length&&(l=new Xr("onChange","change",null,l,o),e.push({event:l,listeners:t}))}var ts=null,ns=null;function CC(e){kv(e,0)}function Zr(e){var t=Xe(e);if(Br(t))return e}function Zy(e,t){if(e==="change")return t}var Iy=!1;if(Oa){var Kf;if(Oa){var Ff="oninput"in document;if(!Ff){var Qy=document.createElement("div");Qy.setAttribute("oninput","return;"),Ff=typeof Qy.oninput=="function"}Kf=Ff}else Kf=!1;Iy=Kf&&(!document.documentMode||9<document.documentMode)}function Ky(){ts&&(ts.detachEvent("onpropertychange",Fy),ns=ts=null)}function Fy(e){if(e.propertyName==="value"&&Zr(ns)){var t=[];Gy(t,ns,e,Vf(e)),Oy(CC,t)}}function MC(e,t,l){e==="focusin"?(Ky(),ts=t,ns=l,ts.attachEvent("onpropertychange",Fy)):e==="focusout"&&Ky()}function zC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Zr(ns)}function DC(e,t){if(e==="click")return Zr(t)}function OC(e,t){if(e==="input"||e==="change")return Zr(t)}function RC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _n=typeof Object.is=="function"?Object.is:RC;function as(e,t){if(_n(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),o=Object.keys(t);if(l.length!==o.length)return!1;for(o=0;o<l.length;o++){var f=l[o];if(!Je.call(t,f)||!_n(e[f],t[f]))return!1}return!0}function Jy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Py(e,t){var l=Jy(e);e=0;for(var o;l;){if(l.nodeType===3){if(o=e+l.textContent.length,e<=t&&o>=t)return{node:l,offset:t-e};e=o}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Jy(l)}}function Wy(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wy(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function e1(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ai(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Ai(e.document)}return t}function Jf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var jC=Oa&&"documentMode"in document&&11>=document.documentMode,Di=null,Pf=null,ls=null,Wf=!1;function t1(e,t,l){var o=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Wf||Di==null||Di!==Ai(o)||(o=Di,"selectionStart"in o&&Jf(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),ls&&as(ls,o)||(ls=o,o=Rc(Pf,"onSelect"),0<o.length&&(t=new Xr("onSelect","select",null,t,l),e.push({event:t,listeners:o}),t.target=Di)))}function Xl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Oi={animationend:Xl("Animation","AnimationEnd"),animationiteration:Xl("Animation","AnimationIteration"),animationstart:Xl("Animation","AnimationStart"),transitionrun:Xl("Transition","TransitionRun"),transitionstart:Xl("Transition","TransitionStart"),transitioncancel:Xl("Transition","TransitionCancel"),transitionend:Xl("Transition","TransitionEnd")},ed={},n1={};Oa&&(n1=document.createElement("div").style,"AnimationEvent"in window||(delete Oi.animationend.animation,delete Oi.animationiteration.animation,delete Oi.animationstart.animation),"TransitionEvent"in window||delete Oi.transitionend.transition);function Gl(e){if(ed[e])return ed[e];if(!Oi[e])return e;var t=Oi[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in n1)return ed[e]=t[l];return e}var a1=Gl("animationend"),l1=Gl("animationiteration"),i1=Gl("animationstart"),LC=Gl("transitionrun"),HC=Gl("transitionstart"),BC=Gl("transitioncancel"),o1=Gl("transitionend"),s1=new Map,td="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(" ");td.push("scrollEnd");function la(e,t){s1.set(e,t),Jt(t,[e])}var Ir=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Hn=[],Ri=0,nd=0;function Qr(){for(var e=Ri,t=nd=Ri=0;t<e;){var l=Hn[t];Hn[t++]=null;var o=Hn[t];Hn[t++]=null;var f=Hn[t];Hn[t++]=null;var d=Hn[t];if(Hn[t++]=null,o!==null&&f!==null){var w=o.pending;w===null?f.next=f:(f.next=w.next,w.next=f),o.pending=f}d!==0&&r1(l,f,d)}}function Kr(e,t,l,o){Hn[Ri++]=e,Hn[Ri++]=t,Hn[Ri++]=l,Hn[Ri++]=o,nd|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function ad(e,t,l,o){return Kr(e,t,l,o),Fr(e)}function Zl(e,t){return Kr(e,null,null,t),Fr(e)}function r1(e,t,l){e.lanes|=l;var o=e.alternate;o!==null&&(o.lanes|=l);for(var f=!1,d=e.return;d!==null;)d.childLanes|=l,o=d.alternate,o!==null&&(o.childLanes|=l),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(f=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,f&&t!==null&&(f=31-dt(l),e=d.hiddenUpdates,o=e[f],o===null?e[f]=[t]:o.push(t),t.lane=l|536870912),d):null}function Fr(e){if(50<Ns)throw Ns=0,dh=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ji={};function UC(e,t,l,o){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function An(e,t,l,o){return new UC(e,t,l,o)}function ld(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ra(e,t){var l=e.alternate;return l===null?(l=An(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function c1(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Jr(e,t,l,o,f,d){var w=0;if(o=e,typeof e=="function")ld(e)&&(w=1);else if(typeof e=="string")w=X4(e,l,P.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case J:return e=An(31,l,t,f),e.elementType=J,e.lanes=d,e;case E:return Il(l.children,f,d,t);case _:w=8,f|=24;break;case T:return e=An(12,l,t,f|2),e.elementType=T,e.lanes=d,e;case D:return e=An(13,l,t,f),e.elementType=D,e.lanes=d,e;case R:return e=An(19,l,t,f),e.elementType=R,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case N:w=10;break e;case z:w=9;break e;case C:w=11;break e;case j:w=14;break e;case K:w=16,o=null;break e}w=29,l=Error(s(130,e===null?"null":typeof e,"")),o=null}return t=An(w,l,t,f),t.elementType=e,t.type=o,t.lanes=d,t}function Il(e,t,l,o){return e=An(7,e,o,t),e.lanes=l,e}function id(e,t,l){return e=An(6,e,null,t),e.lanes=l,e}function u1(e){var t=An(18,null,null,0);return t.stateNode=e,t}function od(e,t,l){return t=An(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var f1=new WeakMap;function Bn(e,t){if(typeof e=="object"&&e!==null){var l=f1.get(e);return l!==void 0?l:(t={value:e,source:t,stack:de(t)},f1.set(e,t),t)}return{value:e,source:t,stack:de(t)}}var Li=[],Hi=0,Pr=null,is=0,Un=[],Vn=0,il=null,ya=1,xa="";function ja(e,t){Li[Hi++]=is,Li[Hi++]=Pr,Pr=e,is=t}function d1(e,t,l){Un[Vn++]=ya,Un[Vn++]=xa,Un[Vn++]=il,il=e;var o=ya;e=xa;var f=32-dt(o)-1;o&=~(1<<f),l+=1;var d=32-dt(t)+f;if(30<d){var w=f-f%5;d=(o&(1<<w)-1).toString(32),o>>=w,f-=w,ya=1<<32-dt(t)+f|l<<f|o,xa=d+e}else ya=1<<d|l<<f|o,xa=e}function sd(e){e.return!==null&&(ja(e,1),d1(e,1,0))}function rd(e){for(;e===Pr;)Pr=Li[--Hi],Li[Hi]=null,is=Li[--Hi],Li[Hi]=null;for(;e===il;)il=Un[--Vn],Un[Vn]=null,xa=Un[--Vn],Un[Vn]=null,ya=Un[--Vn],Un[Vn]=null}function h1(e,t){Un[Vn++]=ya,Un[Vn++]=xa,Un[Vn++]=il,ya=t.id,xa=t.overflow,il=e}var qt=null,rt=null,qe=!1,ol=null,$n=!1,cd=Error(s(519));function sl(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw os(Bn(t,e)),cd}function p1(e){var t=e.stateNode,l=e.type,o=e.memoizedProps;switch(t[bt]=e,t[ot]=o,l){case"dialog":Be("cancel",t),Be("close",t);break;case"iframe":case"object":case"embed":Be("load",t);break;case"video":case"audio":for(l=0;l<Ts.length;l++)Be(Ts[l],t);break;case"source":Be("error",t);break;case"img":case"image":case"link":Be("error",t),Be("load",t);break;case"details":Be("toggle",t);break;case"input":Be("invalid",t),Ur(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Be("invalid",t);break;case"textarea":Be("invalid",t),Cy(t,o.value,o.defaultValue,o.children)}l=o.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||o.suppressHydrationWarning===!0||zv(t.textContent,l)?(o.popover!=null&&(Be("beforetoggle",t),Be("toggle",t)),o.onScroll!=null&&Be("scroll",t),o.onScrollEnd!=null&&Be("scrollend",t),o.onClick!=null&&(t.onclick=Da),t=!0):t=!1,t||sl(e,!0)}function g1(e){for(qt=e.return;qt;)switch(qt.tag){case 5:case 31:case 13:$n=!1;return;case 27:case 3:$n=!0;return;default:qt=qt.return}}function Bi(e){if(e!==qt)return!1;if(!qe)return g1(e),qe=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||kh(e.type,e.memoizedProps)),l=!l),l&&rt&&sl(e),g1(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));rt=Vv(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));rt=Vv(e)}else t===27?(t=rt,Sl(e.type)?(e=Dh,Dh=null,rt=e):rt=t):rt=qt?qn(e.stateNode.nextSibling):null;return!0}function Ql(){rt=qt=null,qe=!1}function ud(){var e=ol;return e!==null&&(mn===null?mn=e:mn.push.apply(mn,e),ol=null),e}function os(e){ol===null?ol=[e]:ol.push(e)}var fd=A(null),Kl=null,La=null;function rl(e,t,l){G(fd,t._currentValue),t._currentValue=l}function Ha(e){e._currentValue=fd.current,O(fd)}function dd(e,t,l){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===l)break;e=e.return}}function hd(e,t,l,o){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var d=f.dependencies;if(d!==null){var w=f.child;d=d.firstContext;e:for(;d!==null;){var M=d;d=f;for(var V=0;V<t.length;V++)if(M.context===t[V]){d.lanes|=l,M=d.alternate,M!==null&&(M.lanes|=l),dd(d.return,l,e),o||(w=null);break e}d=M.next}}else if(f.tag===18){if(w=f.return,w===null)throw Error(s(341));w.lanes|=l,d=w.alternate,d!==null&&(d.lanes|=l),dd(w,l,e),w=null}else w=f.child;if(w!==null)w.return=f;else for(w=f;w!==null;){if(w===e){w=null;break}if(f=w.sibling,f!==null){f.return=w.return,w=f;break}w=w.return}f=w}}function Ui(e,t,l,o){e=null;for(var f=t,d=!1;f!==null;){if(!d){if((f.flags&524288)!==0)d=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var w=f.alternate;if(w===null)throw Error(s(387));if(w=w.memoizedProps,w!==null){var M=f.type;_n(f.pendingProps.value,w.value)||(e!==null?e.push(M):e=[M])}}else if(f===he.current){if(w=f.alternate,w===null)throw Error(s(387));w.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Os):e=[Os])}f=f.return}e!==null&&hd(t,e,l,o),t.flags|=262144}function Wr(e){for(e=e.firstContext;e!==null;){if(!_n(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Fl(e){Kl=e,La=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Xt(e){return m1(Kl,e)}function ec(e,t){return Kl===null&&Fl(e),m1(e,t)}function m1(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},La===null){if(e===null)throw Error(s(308));La=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else La=La.next=t;return l}var VC=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,o){e.push(o)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},$C=n.unstable_scheduleCallback,YC=n.unstable_NormalPriority,Mt={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function pd(){return{controller:new VC,data:new Map,refCount:0}}function ss(e){e.refCount--,e.refCount===0&&$C(YC,function(){e.controller.abort()})}var rs=null,gd=0,Vi=0,$i=null;function qC(e,t){if(rs===null){var l=rs=[];gd=0,Vi=xh(),$i={status:"pending",value:void 0,then:function(o){l.push(o)}}}return gd++,t.then(y1,y1),t}function y1(){if(--gd===0&&rs!==null){$i!==null&&($i.status="fulfilled");var e=rs;rs=null,Vi=0,$i=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function XC(e,t){var l=[],o={status:"pending",value:null,reason:null,then:function(f){l.push(f)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var f=0;f<l.length;f++)(0,l[f])(t)},function(f){for(o.status="rejected",o.reason=f,f=0;f<l.length;f++)(0,l[f])(void 0)}),o}var x1=k.S;k.S=function(e,t){tv=gt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&qC(e,t),x1!==null&&x1(e,t)};var Jl=A(null);function md(){var e=Jl.current;return e!==null?e:it.pooledCache}function tc(e,t){t===null?G(Jl,Jl.current):G(Jl,t.pool)}function v1(){var e=md();return e===null?null:{parent:Mt._currentValue,pool:e}}var Yi=Error(s(460)),yd=Error(s(474)),nc=Error(s(542)),ac={then:function(){}};function b1(e){return e=e.status,e==="fulfilled"||e==="rejected"}function S1(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Da,Da),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,E1(e),e;default:if(typeof t.status=="string")t.then(Da,Da);else{if(e=it,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var f=t;f.status="fulfilled",f.value=o}},function(o){if(t.status==="pending"){var f=t;f.status="rejected",f.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,E1(e),e}throw Wl=t,Yi}}function Pl(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Wl=l,Yi):l}}var Wl=null;function w1(){if(Wl===null)throw Error(s(459));var e=Wl;return Wl=null,e}function E1(e){if(e===Yi||e===nc)throw Error(s(483))}var qi=null,cs=0;function lc(e){var t=cs;return cs+=1,qi===null&&(qi=[]),S1(qi,e,t)}function us(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ic(e,t){throw t.$$typeof===v?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function _1(e){function t(Q,X){if(e){var W=Q.deletions;W===null?(Q.deletions=[X],Q.flags|=16):W.push(X)}}function l(Q,X){if(!e)return null;for(;X!==null;)t(Q,X),X=X.sibling;return null}function o(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 f(Q,X){return Q=Ra(Q,X),Q.index=0,Q.sibling=null,Q}function d(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 w(Q){return e&&Q.alternate===null&&(Q.flags|=67108866),Q}function M(Q,X,W,re){return X===null||X.tag!==6?(X=id(W,Q.mode,re),X.return=Q,X):(X=f(X,W),X.return=Q,X)}function V(Q,X,W,re){var Ae=W.type;return Ae===E?oe(Q,X,W.props.children,re,W.key):X!==null&&(X.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===K&&Pl(Ae)===X.type)?(X=f(X,W.props),us(X,W),X.return=Q,X):(X=Jr(W.type,W.key,W.props,null,Q.mode,re),us(X,W),X.return=Q,X)}function ee(Q,X,W,re){return X===null||X.tag!==4||X.stateNode.containerInfo!==W.containerInfo||X.stateNode.implementation!==W.implementation?(X=od(W,Q.mode,re),X.return=Q,X):(X=f(X,W.children||[]),X.return=Q,X)}function oe(Q,X,W,re,Ae){return X===null||X.tag!==7?(X=Il(W,Q.mode,re,Ae),X.return=Q,X):(X=f(X,W),X.return=Q,X)}function ce(Q,X,W){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=id(""+X,Q.mode,W),X.return=Q,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case S:return W=Jr(X.type,X.key,X.props,null,Q.mode,W),us(W,X),W.return=Q,W;case b:return X=od(X,Q.mode,W),X.return=Q,X;case K:return X=Pl(X),ce(Q,X,W)}if(I(X)||F(X))return X=Il(X,Q.mode,W,null),X.return=Q,X;if(typeof X.then=="function")return ce(Q,lc(X),W);if(X.$$typeof===N)return ce(Q,ec(Q,X),W);ic(Q,X)}return null}function te(Q,X,W,re){var Ae=X!==null?X.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Ae!==null?null:M(Q,X,""+W,re);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case S:return W.key===Ae?V(Q,X,W,re):null;case b:return W.key===Ae?ee(Q,X,W,re):null;case K:return W=Pl(W),te(Q,X,W,re)}if(I(W)||F(W))return Ae!==null?null:oe(Q,X,W,re,null);if(typeof W.then=="function")return te(Q,X,lc(W),re);if(W.$$typeof===N)return te(Q,X,ec(Q,W),re);ic(Q,W)}return null}function ne(Q,X,W,re,Ae){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return Q=Q.get(W)||null,M(X,Q,""+re,Ae);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case S:return Q=Q.get(re.key===null?W:re.key)||null,V(X,Q,re,Ae);case b:return Q=Q.get(re.key===null?W:re.key)||null,ee(X,Q,re,Ae);case K:return re=Pl(re),ne(Q,X,W,re,Ae)}if(I(re)||F(re))return Q=Q.get(W)||null,oe(X,Q,re,Ae,null);if(typeof re.then=="function")return ne(Q,X,W,lc(re),Ae);if(re.$$typeof===N)return ne(Q,X,W,ec(X,re),Ae);ic(X,re)}return null}function xe(Q,X,W,re){for(var Ae=null,Ie=null,Ee=X,Oe=X=0,Ve=null;Ee!==null&&Oe<W.length;Oe++){Ee.index>Oe?(Ve=Ee,Ee=null):Ve=Ee.sibling;var Qe=te(Q,Ee,W[Oe],re);if(Qe===null){Ee===null&&(Ee=Ve);break}e&&Ee&&Qe.alternate===null&&t(Q,Ee),X=d(Qe,X,Oe),Ie===null?Ae=Qe:Ie.sibling=Qe,Ie=Qe,Ee=Ve}if(Oe===W.length)return l(Q,Ee),qe&&ja(Q,Oe),Ae;if(Ee===null){for(;Oe<W.length;Oe++)Ee=ce(Q,W[Oe],re),Ee!==null&&(X=d(Ee,X,Oe),Ie===null?Ae=Ee:Ie.sibling=Ee,Ie=Ee);return qe&&ja(Q,Oe),Ae}for(Ee=o(Ee);Oe<W.length;Oe++)Ve=ne(Ee,Q,Oe,W[Oe],re),Ve!==null&&(e&&Ve.alternate!==null&&Ee.delete(Ve.key===null?Oe:Ve.key),X=d(Ve,X,Oe),Ie===null?Ae=Ve:Ie.sibling=Ve,Ie=Ve);return e&&Ee.forEach(function(Nl){return t(Q,Nl)}),qe&&ja(Q,Oe),Ae}function Te(Q,X,W,re){if(W==null)throw Error(s(151));for(var Ae=null,Ie=null,Ee=X,Oe=X=0,Ve=null,Qe=W.next();Ee!==null&&!Qe.done;Oe++,Qe=W.next()){Ee.index>Oe?(Ve=Ee,Ee=null):Ve=Ee.sibling;var Nl=te(Q,Ee,Qe.value,re);if(Nl===null){Ee===null&&(Ee=Ve);break}e&&Ee&&Nl.alternate===null&&t(Q,Ee),X=d(Nl,X,Oe),Ie===null?Ae=Nl:Ie.sibling=Nl,Ie=Nl,Ee=Ve}if(Qe.done)return l(Q,Ee),qe&&ja(Q,Oe),Ae;if(Ee===null){for(;!Qe.done;Oe++,Qe=W.next())Qe=ce(Q,Qe.value,re),Qe!==null&&(X=d(Qe,X,Oe),Ie===null?Ae=Qe:Ie.sibling=Qe,Ie=Qe);return qe&&ja(Q,Oe),Ae}for(Ee=o(Ee);!Qe.done;Oe++,Qe=W.next())Qe=ne(Ee,Q,Oe,Qe.value,re),Qe!==null&&(e&&Qe.alternate!==null&&Ee.delete(Qe.key===null?Oe:Qe.key),X=d(Qe,X,Oe),Ie===null?Ae=Qe:Ie.sibling=Qe,Ie=Qe);return e&&Ee.forEach(function(tM){return t(Q,tM)}),qe&&ja(Q,Oe),Ae}function lt(Q,X,W,re){if(typeof W=="object"&&W!==null&&W.type===E&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case S:e:{for(var Ae=W.key;X!==null;){if(X.key===Ae){if(Ae=W.type,Ae===E){if(X.tag===7){l(Q,X.sibling),re=f(X,W.props.children),re.return=Q,Q=re;break e}}else if(X.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===K&&Pl(Ae)===X.type){l(Q,X.sibling),re=f(X,W.props),us(re,W),re.return=Q,Q=re;break e}l(Q,X);break}else t(Q,X);X=X.sibling}W.type===E?(re=Il(W.props.children,Q.mode,re,W.key),re.return=Q,Q=re):(re=Jr(W.type,W.key,W.props,null,Q.mode,re),us(re,W),re.return=Q,Q=re)}return w(Q);case b:e:{for(Ae=W.key;X!==null;){if(X.key===Ae)if(X.tag===4&&X.stateNode.containerInfo===W.containerInfo&&X.stateNode.implementation===W.implementation){l(Q,X.sibling),re=f(X,W.children||[]),re.return=Q,Q=re;break e}else{l(Q,X);break}else t(Q,X);X=X.sibling}re=od(W,Q.mode,re),re.return=Q,Q=re}return w(Q);case K:return W=Pl(W),lt(Q,X,W,re)}if(I(W))return xe(Q,X,W,re);if(F(W)){if(Ae=F(W),typeof Ae!="function")throw Error(s(150));return W=Ae.call(W),Te(Q,X,W,re)}if(typeof W.then=="function")return lt(Q,X,lc(W),re);if(W.$$typeof===N)return lt(Q,X,ec(Q,W),re);ic(Q,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,X!==null&&X.tag===6?(l(Q,X.sibling),re=f(X,W),re.return=Q,Q=re):(l(Q,X),re=id(W,Q.mode,re),re.return=Q,Q=re),w(Q)):l(Q,X)}return function(Q,X,W,re){try{cs=0;var Ae=lt(Q,X,W,re);return qi=null,Ae}catch(Ee){if(Ee===Yi||Ee===nc)throw Ee;var Ie=An(29,Ee,null,Q.mode);return Ie.lanes=re,Ie.return=Q,Ie}finally{}}}var ei=_1(!0),A1=_1(!1),cl=!1;function xd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vd(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ul(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function fl(e,t,l){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ke&2)!==0){var f=o.pending;return f===null?t.next=t:(t.next=f.next,f.next=t),o.pending=t,t=Fr(e),r1(e,null,l),t}return Kr(e,o,t,l),Fr(e)}function fs(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var o=t.lanes;o&=e.pendingLanes,l|=o,t.lanes=l,Ma(e,l)}}function bd(e,t){var l=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,l===o)){var f=null,d=null;if(l=l.firstBaseUpdate,l!==null){do{var w={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};d===null?f=d=w:d=d.next=w,l=l.next}while(l!==null);d===null?f=d=t:d=d.next=t}else f=d=t;l={baseState:o.baseState,firstBaseUpdate:f,lastBaseUpdate:d,shared:o.shared,callbacks:o.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Sd=!1;function ds(){if(Sd){var e=$i;if(e!==null)throw e}}function hs(e,t,l,o){Sd=!1;var f=e.updateQueue;cl=!1;var d=f.firstBaseUpdate,w=f.lastBaseUpdate,M=f.shared.pending;if(M!==null){f.shared.pending=null;var V=M,ee=V.next;V.next=null,w===null?d=ee:w.next=ee,w=V;var oe=e.alternate;oe!==null&&(oe=oe.updateQueue,M=oe.lastBaseUpdate,M!==w&&(M===null?oe.firstBaseUpdate=ee:M.next=ee,oe.lastBaseUpdate=V))}if(d!==null){var ce=f.baseState;w=0,oe=ee=V=null,M=d;do{var te=M.lane&-536870913,ne=te!==M.lane;if(ne?(Ue&te)===te:(o&te)===te){te!==0&&te===Vi&&(Sd=!0),oe!==null&&(oe=oe.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var xe=e,Te=M;te=t;var lt=l;switch(Te.tag){case 1:if(xe=Te.payload,typeof xe=="function"){ce=xe.call(lt,ce,te);break e}ce=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=Te.payload,te=typeof xe=="function"?xe.call(lt,ce,te):xe,te==null)break e;ce=y({},ce,te);break e;case 2:cl=!0}}te=M.callback,te!==null&&(e.flags|=64,ne&&(e.flags|=8192),ne=f.callbacks,ne===null?f.callbacks=[te]:ne.push(te))}else ne={lane:te,tag:M.tag,payload:M.payload,callback:M.callback,next:null},oe===null?(ee=oe=ne,V=ce):oe=oe.next=ne,w|=te;if(M=M.next,M===null){if(M=f.shared.pending,M===null)break;ne=M,M=ne.next,ne.next=null,f.lastBaseUpdate=ne,f.shared.pending=null}}while(!0);oe===null&&(V=ce),f.baseState=V,f.firstBaseUpdate=ee,f.lastBaseUpdate=oe,d===null&&(f.shared.lanes=0),ml|=w,e.lanes=w,e.memoizedState=ce}}function N1(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function k1(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)N1(l[e],t)}var Xi=A(null),oc=A(0);function T1(e,t){e=Za,G(oc,e),G(Xi,t),Za=e|t.baseLanes}function wd(){G(oc,Za),G(Xi,Xi.current)}function Ed(){Za=oc.current,O(Xi),O(oc)}var Nn=A(null),Yn=null;function dl(e){var t=e.alternate;G(Nt,Nt.current&1),G(Nn,e),Yn===null&&(t===null||Xi.current!==null||t.memoizedState!==null)&&(Yn=e)}function _d(e){G(Nt,Nt.current),G(Nn,e),Yn===null&&(Yn=e)}function C1(e){e.tag===22?(G(Nt,Nt.current),G(Nn,e),Yn===null&&(Yn=e)):hl()}function hl(){G(Nt,Nt.current),G(Nn,Nn.current)}function kn(e){O(Nn),Yn===e&&(Yn=null),O(Nt)}var Nt=A(0);function sc(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Mh(l)||zh(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ba=0,ze=null,nt=null,zt=null,rc=!1,Gi=!1,ti=!1,cc=0,ps=0,Zi=null,GC=0;function St(){throw Error(s(321))}function Ad(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!_n(e[l],t[l]))return!1;return!0}function Nd(e,t,l,o,f,d){return Ba=d,ze=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?dx:$d,ti=!1,d=l(o,f),ti=!1,Gi&&(d=z1(t,l,o,f)),M1(e),d}function M1(e){k.H=ys;var t=nt!==null&&nt.next!==null;if(Ba=0,zt=nt=ze=null,rc=!1,ps=0,Zi=null,t)throw Error(s(300));e===null||Dt||(e=e.dependencies,e!==null&&Wr(e)&&(Dt=!0))}function z1(e,t,l,o){ze=e;var f=0;do{if(Gi&&(Zi=null),ps=0,Gi=!1,25<=f)throw Error(s(301));if(f+=1,zt=nt=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}k.H=hx,d=t(l,o)}while(Gi);return d}function ZC(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?gs(t):t,e=e.useState()[0],(nt!==null?nt.memoizedState:null)!==e&&(ze.flags|=1024),t}function kd(){var e=cc!==0;return cc=0,e}function Td(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Cd(e){if(rc){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}rc=!1}Ba=0,zt=nt=ze=null,Gi=!1,ps=cc=0,Zi=null}function an(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zt===null?ze.memoizedState=zt=e:zt=zt.next=e,zt}function kt(){if(nt===null){var e=ze.alternate;e=e!==null?e.memoizedState:null}else e=nt.next;var t=zt===null?ze.memoizedState:zt.next;if(t!==null)zt=t,nt=e;else{if(e===null)throw ze.alternate===null?Error(s(467)):Error(s(310));nt=e,e={memoizedState:nt.memoizedState,baseState:nt.baseState,baseQueue:nt.baseQueue,queue:nt.queue,next:null},zt===null?ze.memoizedState=zt=e:zt=zt.next=e}return zt}function uc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function gs(e){var t=ps;return ps+=1,Zi===null&&(Zi=[]),e=S1(Zi,e,t),t=ze,(zt===null?t.memoizedState:zt.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?dx:$d),e}function fc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return gs(e);if(e.$$typeof===N)return Xt(e)}throw Error(s(438,String(e)))}function Md(e){var t=null,l=ze.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var o=ze.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(f){return f.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=uc(),ze.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),o=0;o<e;o++)l[o]=fe;return t.index++,l}function Ua(e,t){return typeof t=="function"?t(e):t}function dc(e){var t=kt();return zd(t,nt,e)}function zd(e,t,l){var o=e.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=l;var f=e.baseQueue,d=o.pending;if(d!==null){if(f!==null){var w=f.next;f.next=d.next,d.next=w}t.baseQueue=f=d,o.pending=null}if(d=e.baseState,f===null)e.memoizedState=d;else{t=f.next;var M=w=null,V=null,ee=t,oe=!1;do{var ce=ee.lane&-536870913;if(ce!==ee.lane?(Ue&ce)===ce:(Ba&ce)===ce){var te=ee.revertLane;if(te===0)V!==null&&(V=V.next={lane:0,revertLane:0,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),ce===Vi&&(oe=!0);else if((Ba&te)===te){ee=ee.next,te===Vi&&(oe=!0);continue}else ce={lane:0,revertLane:ee.revertLane,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},V===null?(M=V=ce,w=d):V=V.next=ce,ze.lanes|=te,ml|=te;ce=ee.action,ti&&l(d,ce),d=ee.hasEagerState?ee.eagerState:l(d,ce)}else te={lane:ce,revertLane:ee.revertLane,gesture:ee.gesture,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},V===null?(M=V=te,w=d):V=V.next=te,ze.lanes|=ce,ml|=ce;ee=ee.next}while(ee!==null&&ee!==t);if(V===null?w=d:V.next=M,!_n(d,e.memoizedState)&&(Dt=!0,oe&&(l=$i,l!==null)))throw l;e.memoizedState=d,e.baseState=w,e.baseQueue=V,o.lastRenderedState=d}return f===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Dd(e){var t=kt(),l=t.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=e;var o=l.dispatch,f=l.pending,d=t.memoizedState;if(f!==null){l.pending=null;var w=f=f.next;do d=e(d,w.action),w=w.next;while(w!==f);_n(d,t.memoizedState)||(Dt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),l.lastRenderedState=d}return[d,o]}function D1(e,t,l){var o=ze,f=kt(),d=qe;if(d){if(l===void 0)throw Error(s(407));l=l()}else l=t();var w=!_n((nt||f).memoizedState,l);if(w&&(f.memoizedState=l,Dt=!0),f=f.queue,jd(j1.bind(null,o,f,e),[e]),f.getSnapshot!==t||w||zt!==null&&zt.memoizedState.tag&1){if(o.flags|=2048,Ii(9,{destroy:void 0},R1.bind(null,o,f,l,t),null),it===null)throw Error(s(349));d||(Ba&127)!==0||O1(o,t,l)}return l}function O1(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=ze.updateQueue,t===null?(t=uc(),ze.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function R1(e,t,l,o){t.value=l,t.getSnapshot=o,L1(t)&&H1(e)}function j1(e,t,l){return l(function(){L1(t)&&H1(e)})}function L1(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!_n(e,l)}catch{return!0}}function H1(e){var t=Zl(e,2);t!==null&&yn(t,e,2)}function Od(e){var t=an();if(typeof e=="function"){var l=e;if(e=l(),ti){mt(!0);try{l()}finally{mt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ua,lastRenderedState:e},t}function B1(e,t,l,o){return e.baseState=l,zd(e,nt,typeof o=="function"?o:Ua)}function IC(e,t,l,o,f){if(gc(e))throw Error(s(485));if(e=t.action,e!==null){var d={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){d.listeners.push(w)}};k.T!==null?l(!0):d.isTransition=!1,o(d),l=t.pending,l===null?(d.next=t.pending=d,U1(t,d)):(d.next=l.next,t.pending=l.next=d)}}function U1(e,t){var l=t.action,o=t.payload,f=e.state;if(t.isTransition){var d=k.T,w={};k.T=w;try{var M=l(f,o),V=k.S;V!==null&&V(w,M),V1(e,t,M)}catch(ee){Rd(e,t,ee)}finally{d!==null&&w.types!==null&&(d.types=w.types),k.T=d}}else try{d=l(f,o),V1(e,t,d)}catch(ee){Rd(e,t,ee)}}function V1(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(o){$1(e,t,o)},function(o){return Rd(e,t,o)}):$1(e,t,l)}function $1(e,t,l){t.status="fulfilled",t.value=l,Y1(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,U1(e,l)))}function Rd(e,t,l){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=l,Y1(t),t=t.next;while(t!==o)}e.action=null}function Y1(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function q1(e,t){return t}function X1(e,t){if(qe){var l=it.formState;if(l!==null){e:{var o=ze;if(qe){if(rt){t:{for(var f=rt,d=$n;f.nodeType!==8;){if(!d){f=null;break t}if(f=qn(f.nextSibling),f===null){f=null;break t}}d=f.data,f=d==="F!"||d==="F"?f:null}if(f){rt=qn(f.nextSibling),o=f.data==="F!";break e}}sl(o)}o=!1}o&&(t=l[0])}}return l=an(),l.memoizedState=l.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:q1,lastRenderedState:t},l.queue=o,l=cx.bind(null,ze,o),o.dispatch=l,o=Od(!1),d=Vd.bind(null,ze,!1,o.queue),o=an(),f={state:t,dispatch:null,action:e,pending:null},o.queue=f,l=IC.bind(null,ze,f,d,l),f.dispatch=l,o.memoizedState=e,[t,l,!1]}function G1(e){var t=kt();return Z1(t,nt,e)}function Z1(e,t,l){if(t=zd(e,t,q1)[0],e=dc(Ua)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=gs(t)}catch(w){throw w===Yi?nc:w}else o=t;t=kt();var f=t.queue,d=f.dispatch;return l!==t.memoizedState&&(ze.flags|=2048,Ii(9,{destroy:void 0},QC.bind(null,f,l),null)),[o,d,e]}function QC(e,t){e.action=t}function I1(e){var t=kt(),l=nt;if(l!==null)return Z1(t,l,e);kt(),t=t.memoizedState,l=kt();var o=l.queue.dispatch;return l.memoizedState=e,[t,o,!1]}function Ii(e,t,l,o){return e={tag:e,create:l,deps:o,inst:t,next:null},t=ze.updateQueue,t===null&&(t=uc(),ze.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(o=l.next,l.next=e,e.next=o,t.lastEffect=e),e}function Q1(){return kt().memoizedState}function hc(e,t,l,o){var f=an();ze.flags|=e,f.memoizedState=Ii(1|t,{destroy:void 0},l,o===void 0?null:o)}function pc(e,t,l,o){var f=kt();o=o===void 0?null:o;var d=f.memoizedState.inst;nt!==null&&o!==null&&Ad(o,nt.memoizedState.deps)?f.memoizedState=Ii(t,d,l,o):(ze.flags|=e,f.memoizedState=Ii(1|t,d,l,o))}function K1(e,t){hc(8390656,8,e,t)}function jd(e,t){pc(2048,8,e,t)}function KC(e){ze.flags|=4;var t=ze.updateQueue;if(t===null)t=uc(),ze.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function F1(e){var t=kt().memoizedState;return KC({ref:t,nextImpl:e}),function(){if((Ke&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function J1(e,t){return pc(4,2,e,t)}function P1(e,t){return pc(4,4,e,t)}function W1(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ex(e,t,l){l=l!=null?l.concat([e]):null,pc(4,4,W1.bind(null,t,e),l)}function Ld(){}function tx(e,t){var l=kt();t=t===void 0?null:t;var o=l.memoizedState;return t!==null&&Ad(t,o[1])?o[0]:(l.memoizedState=[e,t],e)}function nx(e,t){var l=kt();t=t===void 0?null:t;var o=l.memoizedState;if(t!==null&&Ad(t,o[1]))return o[0];if(o=e(),ti){mt(!0);try{e()}finally{mt(!1)}}return l.memoizedState=[o,t],o}function Hd(e,t,l){return l===void 0||(Ba&1073741824)!==0&&(Ue&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=av(),ze.lanes|=e,ml|=e,l)}function ax(e,t,l,o){return _n(l,t)?l:Xi.current!==null?(e=Hd(e,l,o),_n(e,t)||(Dt=!0),e):(Ba&42)===0||(Ba&1073741824)!==0&&(Ue&261930)===0?(Dt=!0,e.memoizedState=l):(e=av(),ze.lanes|=e,ml|=e,t)}function lx(e,t,l,o,f){var d=L.p;L.p=d!==0&&8>d?d:8;var w=k.T,M={};k.T=M,Vd(e,!1,t,l);try{var V=f(),ee=k.S;if(ee!==null&&ee(M,V),V!==null&&typeof V=="object"&&typeof V.then=="function"){var oe=XC(V,o);ms(e,t,oe,Mn(e))}else ms(e,t,o,Mn(e))}catch(ce){ms(e,t,{then:function(){},status:"rejected",reason:ce},Mn())}finally{L.p=d,w!==null&&M.types!==null&&(w.types=M.types),k.T=w}}function FC(){}function Bd(e,t,l,o){if(e.tag!==5)throw Error(s(476));var f=ix(e).queue;lx(e,f,t,$,l===null?FC:function(){return ox(e),l(o)})}function ix(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ua,lastRenderedState:$},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ua,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ox(e){var t=ix(e);t.next===null&&(t=e.alternate.memoizedState),ms(e,t.next.queue,{},Mn())}function Ud(){return Xt(Os)}function sx(){return kt().memoizedState}function rx(){return kt().memoizedState}function JC(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Mn();e=ul(l);var o=fl(t,e,l);o!==null&&(yn(o,t,l),fs(o,t,l)),t={cache:pd()},e.payload=t;return}t=t.return}}function PC(e,t,l){var o=Mn();l={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},gc(e)?ux(t,l):(l=ad(e,t,l,o),l!==null&&(yn(l,e,o),fx(l,t,o)))}function cx(e,t,l){var o=Mn();ms(e,t,l,o)}function ms(e,t,l,o){var f={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(gc(e))ux(t,f);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var w=t.lastRenderedState,M=d(w,l);if(f.hasEagerState=!0,f.eagerState=M,_n(M,w))return Kr(e,t,f,0),it===null&&Qr(),!1}catch{}finally{}if(l=ad(e,t,f,o),l!==null)return yn(l,e,o),fx(l,t,o),!0}return!1}function Vd(e,t,l,o){if(o={lane:2,revertLane:xh(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},gc(e)){if(t)throw Error(s(479))}else t=ad(e,l,o,2),t!==null&&yn(t,e,2)}function gc(e){var t=e.alternate;return e===ze||t!==null&&t===ze}function ux(e,t){Gi=rc=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function fx(e,t,l){if((l&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,l|=o,t.lanes=l,Ma(e,l)}}var ys={readContext:Xt,use:fc,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useLayoutEffect:St,useInsertionEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useSyncExternalStore:St,useId:St,useHostTransitionStatus:St,useFormState:St,useActionState:St,useOptimistic:St,useMemoCache:St,useCacheRefresh:St};ys.useEffectEvent=St;var dx={readContext:Xt,use:fc,useCallback:function(e,t){return an().memoizedState=[e,t===void 0?null:t],e},useContext:Xt,useEffect:K1,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,hc(4194308,4,W1.bind(null,t,e),l)},useLayoutEffect:function(e,t){return hc(4194308,4,e,t)},useInsertionEffect:function(e,t){hc(4,2,e,t)},useMemo:function(e,t){var l=an();t=t===void 0?null:t;var o=e();if(ti){mt(!0);try{e()}finally{mt(!1)}}return l.memoizedState=[o,t],o},useReducer:function(e,t,l){var o=an();if(l!==void 0){var f=l(t);if(ti){mt(!0);try{l(t)}finally{mt(!1)}}}else f=t;return o.memoizedState=o.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},o.queue=e,e=e.dispatch=PC.bind(null,ze,e),[o.memoizedState,e]},useRef:function(e){var t=an();return e={current:e},t.memoizedState=e},useState:function(e){e=Od(e);var t=e.queue,l=cx.bind(null,ze,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Ld,useDeferredValue:function(e,t){var l=an();return Hd(l,e,t)},useTransition:function(){var e=Od(!1);return e=lx.bind(null,ze,e.queue,!0,!1),an().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var o=ze,f=an();if(qe){if(l===void 0)throw Error(s(407));l=l()}else{if(l=t(),it===null)throw Error(s(349));(Ue&127)!==0||O1(o,t,l)}f.memoizedState=l;var d={value:l,getSnapshot:t};return f.queue=d,K1(j1.bind(null,o,d,e),[e]),o.flags|=2048,Ii(9,{destroy:void 0},R1.bind(null,o,d,l,t),null),l},useId:function(){var e=an(),t=it.identifierPrefix;if(qe){var l=xa,o=ya;l=(o&~(1<<32-dt(o)-1)).toString(32)+l,t="_"+t+"R_"+l,l=cc++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=GC++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ud,useFormState:X1,useActionState:X1,useOptimistic:function(e){var t=an();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Vd.bind(null,ze,!0,l),l.dispatch=t,[e,t]},useMemoCache:Md,useCacheRefresh:function(){return an().memoizedState=JC.bind(null,ze)},useEffectEvent:function(e){var t=an(),l={impl:e};return t.memoizedState=l,function(){if((Ke&2)!==0)throw Error(s(440));return l.impl.apply(void 0,arguments)}}},$d={readContext:Xt,use:fc,useCallback:tx,useContext:Xt,useEffect:jd,useImperativeHandle:ex,useInsertionEffect:J1,useLayoutEffect:P1,useMemo:nx,useReducer:dc,useRef:Q1,useState:function(){return dc(Ua)},useDebugValue:Ld,useDeferredValue:function(e,t){var l=kt();return ax(l,nt.memoizedState,e,t)},useTransition:function(){var e=dc(Ua)[0],t=kt().memoizedState;return[typeof e=="boolean"?e:gs(e),t]},useSyncExternalStore:D1,useId:sx,useHostTransitionStatus:Ud,useFormState:G1,useActionState:G1,useOptimistic:function(e,t){var l=kt();return B1(l,nt,e,t)},useMemoCache:Md,useCacheRefresh:rx};$d.useEffectEvent=F1;var hx={readContext:Xt,use:fc,useCallback:tx,useContext:Xt,useEffect:jd,useImperativeHandle:ex,useInsertionEffect:J1,useLayoutEffect:P1,useMemo:nx,useReducer:Dd,useRef:Q1,useState:function(){return Dd(Ua)},useDebugValue:Ld,useDeferredValue:function(e,t){var l=kt();return nt===null?Hd(l,e,t):ax(l,nt.memoizedState,e,t)},useTransition:function(){var e=Dd(Ua)[0],t=kt().memoizedState;return[typeof e=="boolean"?e:gs(e),t]},useSyncExternalStore:D1,useId:sx,useHostTransitionStatus:Ud,useFormState:I1,useActionState:I1,useOptimistic:function(e,t){var l=kt();return nt!==null?B1(l,nt,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Md,useCacheRefresh:rx};hx.useEffectEvent=F1;function Yd(e,t,l,o){t=e.memoizedState,l=l(o,t),l=l==null?t:y({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var qd={enqueueSetState:function(e,t,l){e=e._reactInternals;var o=Mn(),f=ul(o);f.payload=t,l!=null&&(f.callback=l),t=fl(e,f,o),t!==null&&(yn(t,e,o),fs(t,e,o))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var o=Mn(),f=ul(o);f.tag=1,f.payload=t,l!=null&&(f.callback=l),t=fl(e,f,o),t!==null&&(yn(t,e,o),fs(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Mn(),o=ul(l);o.tag=2,t!=null&&(o.callback=t),t=fl(e,o,l),t!==null&&(yn(t,e,l),fs(t,e,l))}};function px(e,t,l,o,f,d,w){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,d,w):t.prototype&&t.prototype.isPureReactComponent?!as(l,o)||!as(f,d):!0}function gx(e,t,l,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,o),t.state!==e&&qd.enqueueReplaceState(t,t.state,null)}function ni(e,t){var l=t;if("ref"in t){l={};for(var o in t)o!=="ref"&&(l[o]=t[o])}if(e=e.defaultProps){l===t&&(l=y({},l));for(var f in e)l[f]===void 0&&(l[f]=e[f])}return l}function mx(e){Ir(e)}function yx(e){console.error(e)}function xx(e){Ir(e)}function mc(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function vx(e,t,l){try{var o=e.onCaughtError;o(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Xd(e,t,l){return l=ul(l),l.tag=3,l.payload={element:null},l.callback=function(){mc(e,t)},l}function bx(e){return e=ul(e),e.tag=3,e}function Sx(e,t,l,o){var f=l.type.getDerivedStateFromError;if(typeof f=="function"){var d=o.value;e.payload=function(){return f(d)},e.callback=function(){vx(t,l,o)}}var w=l.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(e.callback=function(){vx(t,l,o),typeof f!="function"&&(yl===null?yl=new Set([this]):yl.add(this));var M=o.stack;this.componentDidCatch(o.value,{componentStack:M!==null?M:""})})}function WC(e,t,l,o,f){if(l.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=l.alternate,t!==null&&Ui(t,l,f,!0),l=Nn.current,l!==null){switch(l.tag){case 31:case 13:return Yn===null?Tc():l.alternate===null&&wt===0&&(wt=3),l.flags&=-257,l.flags|=65536,l.lanes=f,o===ac?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([o]):t.add(o),gh(e,o,f)),!1;case 22:return l.flags|=65536,o===ac?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([o]):l.add(o)),gh(e,o,f)),!1}throw Error(s(435,l.tag))}return gh(e,o,f),Tc(),!1}if(qe)return t=Nn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=f,o!==cd&&(e=Error(s(422),{cause:o}),os(Bn(e,l)))):(o!==cd&&(t=Error(s(423),{cause:o}),os(Bn(t,l))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,o=Bn(o,l),f=Xd(e.stateNode,o,f),bd(e,f),wt!==4&&(wt=2)),!1;var d=Error(s(520),{cause:o});if(d=Bn(d,l),As===null?As=[d]:As.push(d),wt!==4&&(wt=2),t===null)return!0;o=Bn(o,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=f&-f,l.lanes|=e,e=Xd(l.stateNode,o,e),bd(l,e),!1;case 1:if(t=l.type,d=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(yl===null||!yl.has(d))))return l.flags|=65536,f&=-f,l.lanes|=f,f=bx(f),Sx(f,e,l,o),bd(l,f),!1}l=l.return}while(l!==null);return!1}var Gd=Error(s(461)),Dt=!1;function Gt(e,t,l,o){t.child=e===null?A1(t,null,l,o):ei(t,e.child,l,o)}function wx(e,t,l,o,f){l=l.render;var d=t.ref;if("ref"in o){var w={};for(var M in o)M!=="ref"&&(w[M]=o[M])}else w=o;return Fl(t),o=Nd(e,t,l,w,d,f),M=kd(),e!==null&&!Dt?(Td(e,t,f),Va(e,t,f)):(qe&&M&&sd(t),t.flags|=1,Gt(e,t,o,f),t.child)}function Ex(e,t,l,o,f){if(e===null){var d=l.type;return typeof d=="function"&&!ld(d)&&d.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=d,_x(e,t,d,o,f)):(e=Jr(l.type,null,o,t,t.mode,f),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!Wd(e,f)){var w=d.memoizedProps;if(l=l.compare,l=l!==null?l:as,l(w,o)&&e.ref===t.ref)return Va(e,t,f)}return t.flags|=1,e=Ra(d,o),e.ref=t.ref,e.return=t,t.child=e}function _x(e,t,l,o,f){if(e!==null){var d=e.memoizedProps;if(as(d,o)&&e.ref===t.ref)if(Dt=!1,t.pendingProps=o=d,Wd(e,f))(e.flags&131072)!==0&&(Dt=!0);else return t.lanes=e.lanes,Va(e,t,f)}return Zd(e,t,l,o,f)}function Ax(e,t,l,o){var f=o.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|l:l,e!==null){for(o=t.child=e.child,f=0;o!==null;)f=f|o.lanes|o.childLanes,o=o.sibling;o=f&~d}else o=0,t.child=null;return Nx(e,t,d,l,o)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&tc(t,d!==null?d.cachePool:null),d!==null?T1(t,d):wd(),C1(t);else return o=t.lanes=536870912,Nx(e,t,d!==null?d.baseLanes|l:l,l,o)}else d!==null?(tc(t,d.cachePool),T1(t,d),hl(),t.memoizedState=null):(e!==null&&tc(t,null),wd(),hl());return Gt(e,t,f,l),t.child}function xs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Nx(e,t,l,o,f){var d=md();return d=d===null?null:{parent:Mt._currentValue,pool:d},t.memoizedState={baseLanes:l,cachePool:d},e!==null&&tc(t,null),wd(),C1(t),e!==null&&Ui(e,t,o,!0),t.childLanes=f,null}function yc(e,t){return t=vc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function kx(e,t,l){return ei(t,e.child,null,l),e=yc(t,t.pendingProps),e.flags|=2,kn(t),t.memoizedState=null,e}function e4(e,t,l){var o=t.pendingProps,f=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(qe){if(o.mode==="hidden")return e=yc(t,o),t.lanes=536870912,xs(null,e);if(_d(t),(e=rt)?(e=Uv(e,$n),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:il!==null?{id:ya,overflow:xa}:null,retryLane:536870912,hydrationErrors:null},l=u1(e),l.return=t,t.child=l,qt=t,rt=null)):e=null,e===null)throw sl(t);return t.lanes=536870912,null}return yc(t,o)}var d=e.memoizedState;if(d!==null){var w=d.dehydrated;if(_d(t),f)if(t.flags&256)t.flags&=-257,t=kx(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(Dt||Ui(e,t,l,!1),f=(l&e.childLanes)!==0,Dt||f){if(o=it,o!==null&&(w=On(o,l),w!==0&&w!==d.retryLane))throw d.retryLane=w,Zl(e,w),yn(o,e,w),Gd;Tc(),t=kx(e,t,l)}else e=d.treeContext,rt=qn(w.nextSibling),qt=t,qe=!0,ol=null,$n=!1,e!==null&&h1(t,e),t=yc(t,o),t.flags|=4096;return t}return e=Ra(e.child,{mode:o.mode,children:o.children}),e.ref=t.ref,t.child=e,e.return=t,e}function xc(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(s(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Zd(e,t,l,o,f){return Fl(t),l=Nd(e,t,l,o,void 0,f),o=kd(),e!==null&&!Dt?(Td(e,t,f),Va(e,t,f)):(qe&&o&&sd(t),t.flags|=1,Gt(e,t,l,f),t.child)}function Tx(e,t,l,o,f,d){return Fl(t),t.updateQueue=null,l=z1(t,o,l,f),M1(e),o=kd(),e!==null&&!Dt?(Td(e,t,d),Va(e,t,d)):(qe&&o&&sd(t),t.flags|=1,Gt(e,t,l,d),t.child)}function Cx(e,t,l,o,f){if(Fl(t),t.stateNode===null){var d=ji,w=l.contextType;typeof w=="object"&&w!==null&&(d=Xt(w)),d=new l(o,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=qd,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=o,d.state=t.memoizedState,d.refs={},xd(t),w=l.contextType,d.context=typeof w=="object"&&w!==null?Xt(w):ji,d.state=t.memoizedState,w=l.getDerivedStateFromProps,typeof w=="function"&&(Yd(t,l,w,o),d.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(w=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),w!==d.state&&qd.enqueueReplaceState(d,d.state,null),hs(t,o,d,f),ds(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){d=t.stateNode;var M=t.memoizedProps,V=ni(l,M);d.props=V;var ee=d.context,oe=l.contextType;w=ji,typeof oe=="object"&&oe!==null&&(w=Xt(oe));var ce=l.getDerivedStateFromProps;oe=typeof ce=="function"||typeof d.getSnapshotBeforeUpdate=="function",M=t.pendingProps!==M,oe||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(M||ee!==w)&&gx(t,d,o,w),cl=!1;var te=t.memoizedState;d.state=te,hs(t,o,d,f),ds(),ee=t.memoizedState,M||te!==ee||cl?(typeof ce=="function"&&(Yd(t,l,ce,o),ee=t.memoizedState),(V=cl||px(t,l,V,o,te,ee,w))?(oe||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=ee),d.props=o,d.state=ee,d.context=w,o=V):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{d=t.stateNode,vd(e,t),w=t.memoizedProps,oe=ni(l,w),d.props=oe,ce=t.pendingProps,te=d.context,ee=l.contextType,V=ji,typeof ee=="object"&&ee!==null&&(V=Xt(ee)),M=l.getDerivedStateFromProps,(ee=typeof M=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(w!==ce||te!==V)&&gx(t,d,o,V),cl=!1,te=t.memoizedState,d.state=te,hs(t,o,d,f),ds();var ne=t.memoizedState;w!==ce||te!==ne||cl||e!==null&&e.dependencies!==null&&Wr(e.dependencies)?(typeof M=="function"&&(Yd(t,l,M,o),ne=t.memoizedState),(oe=cl||px(t,l,oe,o,te,ne,V)||e!==null&&e.dependencies!==null&&Wr(e.dependencies))?(ee||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(o,ne,V),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(o,ne,V)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||w===e.memoizedProps&&te===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||w===e.memoizedProps&&te===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=ne),d.props=o,d.state=ne,d.context=V,o=oe):(typeof d.componentDidUpdate!="function"||w===e.memoizedProps&&te===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||w===e.memoizedProps&&te===e.memoizedState||(t.flags|=1024),o=!1)}return d=o,xc(e,t),o=(t.flags&128)!==0,d||o?(d=t.stateNode,l=o&&typeof l.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&o?(t.child=ei(t,e.child,null,f),t.child=ei(t,null,l,f)):Gt(e,t,l,f),t.memoizedState=d.state,e=t.child):e=Va(e,t,f),e}function Mx(e,t,l,o){return Ql(),t.flags|=256,Gt(e,t,l,o),t.child}var Id={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qd(e){return{baseLanes:e,cachePool:v1()}}function Kd(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Cn),e}function zx(e,t,l){var o=t.pendingProps,f=!1,d=(t.flags&128)!==0,w;if((w=d)||(w=e!==null&&e.memoizedState===null?!1:(Nt.current&2)!==0),w&&(f=!0,t.flags&=-129),w=(t.flags&32)!==0,t.flags&=-33,e===null){if(qe){if(f?dl(t):hl(),(e=rt)?(e=Uv(e,$n),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:il!==null?{id:ya,overflow:xa}:null,retryLane:536870912,hydrationErrors:null},l=u1(e),l.return=t,t.child=l,qt=t,rt=null)):e=null,e===null)throw sl(t);return zh(e)?t.lanes=32:t.lanes=536870912,null}var M=o.children;return o=o.fallback,f?(hl(),f=t.mode,M=vc({mode:"hidden",children:M},f),o=Il(o,f,l,null),M.return=t,o.return=t,M.sibling=o,t.child=M,o=t.child,o.memoizedState=Qd(l),o.childLanes=Kd(e,w,l),t.memoizedState=Id,xs(null,o)):(dl(t),Fd(t,M))}var V=e.memoizedState;if(V!==null&&(M=V.dehydrated,M!==null)){if(d)t.flags&256?(dl(t),t.flags&=-257,t=Jd(e,t,l)):t.memoizedState!==null?(hl(),t.child=e.child,t.flags|=128,t=null):(hl(),M=o.fallback,f=t.mode,o=vc({mode:"visible",children:o.children},f),M=Il(M,f,l,null),M.flags|=2,o.return=t,M.return=t,o.sibling=M,t.child=o,ei(t,e.child,null,l),o=t.child,o.memoizedState=Qd(l),o.childLanes=Kd(e,w,l),t.memoizedState=Id,t=xs(null,o));else if(dl(t),zh(M)){if(w=M.nextSibling&&M.nextSibling.dataset,w)var ee=w.dgst;w=ee,o=Error(s(419)),o.stack="",o.digest=w,os({value:o,source:null,stack:null}),t=Jd(e,t,l)}else if(Dt||Ui(e,t,l,!1),w=(l&e.childLanes)!==0,Dt||w){if(w=it,w!==null&&(o=On(w,l),o!==0&&o!==V.retryLane))throw V.retryLane=o,Zl(e,o),yn(w,e,o),Gd;Mh(M)||Tc(),t=Jd(e,t,l)}else Mh(M)?(t.flags|=192,t.child=e.child,t=null):(e=V.treeContext,rt=qn(M.nextSibling),qt=t,qe=!0,ol=null,$n=!1,e!==null&&h1(t,e),t=Fd(t,o.children),t.flags|=4096);return t}return f?(hl(),M=o.fallback,f=t.mode,V=e.child,ee=V.sibling,o=Ra(V,{mode:"hidden",children:o.children}),o.subtreeFlags=V.subtreeFlags&65011712,ee!==null?M=Ra(ee,M):(M=Il(M,f,l,null),M.flags|=2),M.return=t,o.return=t,o.sibling=M,t.child=o,xs(null,o),o=t.child,M=e.child.memoizedState,M===null?M=Qd(l):(f=M.cachePool,f!==null?(V=Mt._currentValue,f=f.parent!==V?{parent:V,pool:V}:f):f=v1(),M={baseLanes:M.baseLanes|l,cachePool:f}),o.memoizedState=M,o.childLanes=Kd(e,w,l),t.memoizedState=Id,xs(e.child,o)):(dl(t),l=e.child,e=l.sibling,l=Ra(l,{mode:"visible",children:o.children}),l.return=t,l.sibling=null,e!==null&&(w=t.deletions,w===null?(t.deletions=[e],t.flags|=16):w.push(e)),t.child=l,t.memoizedState=null,l)}function Fd(e,t){return t=vc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function vc(e,t){return e=An(22,e,null,t),e.lanes=0,e}function Jd(e,t,l){return ei(t,e.child,null,l),e=Fd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Dx(e,t,l){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),dd(e.return,t,l)}function Pd(e,t,l,o,f,d){var w=e.memoizedState;w===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:l,tailMode:f,treeForkCount:d}:(w.isBackwards=t,w.rendering=null,w.renderingStartTime=0,w.last=o,w.tail=l,w.tailMode=f,w.treeForkCount=d)}function Ox(e,t,l){var o=t.pendingProps,f=o.revealOrder,d=o.tail;o=o.children;var w=Nt.current,M=(w&2)!==0;if(M?(w=w&1|2,t.flags|=128):w&=1,G(Nt,w),Gt(e,t,o,l),o=qe?is:0,!M&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Dx(e,l,t);else if(e.tag===19)Dx(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(f){case"forwards":for(l=t.child,f=null;l!==null;)e=l.alternate,e!==null&&sc(e)===null&&(f=l),l=l.sibling;l=f,l===null?(f=t.child,t.child=null):(f=l.sibling,l.sibling=null),Pd(t,!1,f,l,d,o);break;case"backwards":case"unstable_legacy-backwards":for(l=null,f=t.child,t.child=null;f!==null;){if(e=f.alternate,e!==null&&sc(e)===null){t.child=f;break}e=f.sibling,f.sibling=l,l=f,f=e}Pd(t,!0,l,null,d,o);break;case"together":Pd(t,!1,null,null,void 0,o);break;default:t.memoizedState=null}return t.child}function Va(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),ml|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Ui(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,l=Ra(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Ra(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Wd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Wr(e)))}function t4(e,t,l){switch(t.tag){case 3:ue(t,t.stateNode.containerInfo),rl(t,Mt,e.memoizedState.cache),Ql();break;case 27:case 5:Ne(t);break;case 4:ue(t,t.stateNode.containerInfo);break;case 10:rl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,_d(t),null;break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(dl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?zx(e,t,l):(dl(t),e=Va(e,t,l),e!==null?e.sibling:null);dl(t);break;case 19:var f=(e.flags&128)!==0;if(o=(l&t.childLanes)!==0,o||(Ui(e,t,l,!1),o=(l&t.childLanes)!==0),f){if(o)return Ox(e,t,l);t.flags|=128}if(f=t.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),G(Nt,Nt.current),o)break;return null;case 22:return t.lanes=0,Ax(e,t,l,t.pendingProps);case 24:rl(t,Mt,e.memoizedState.cache)}return Va(e,t,l)}function Rx(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Dt=!0;else{if(!Wd(e,l)&&(t.flags&128)===0)return Dt=!1,t4(e,t,l);Dt=(e.flags&131072)!==0}else Dt=!1,qe&&(t.flags&1048576)!==0&&d1(t,is,t.index);switch(t.lanes=0,t.tag){case 16:e:{var o=t.pendingProps;if(e=Pl(t.elementType),t.type=e,typeof e=="function")ld(e)?(o=ni(e,o),t.tag=1,t=Cx(null,t,e,o,l)):(t.tag=0,t=Zd(null,t,e,o,l));else{if(e!=null){var f=e.$$typeof;if(f===C){t.tag=11,t=wx(null,t,e,o,l);break e}else if(f===j){t.tag=14,t=Ex(null,t,e,o,l);break e}}throw t=H(e)||e,Error(s(306,t,""))}}return t;case 0:return Zd(e,t,t.type,t.pendingProps,l);case 1:return o=t.type,f=ni(o,t.pendingProps),Cx(e,t,o,f,l);case 3:e:{if(ue(t,t.stateNode.containerInfo),e===null)throw Error(s(387));o=t.pendingProps;var d=t.memoizedState;f=d.element,vd(e,t),hs(t,o,null,l);var w=t.memoizedState;if(o=w.cache,rl(t,Mt,o),o!==d.cache&&hd(t,[Mt],l,!0),ds(),o=w.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:w.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=Mx(e,t,o,l);break e}else if(o!==f){f=Bn(Error(s(424)),t),os(f),t=Mx(e,t,o,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(rt=qn(e.firstChild),qt=t,qe=!0,ol=null,$n=!0,l=A1(t,null,o,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Ql(),o===f){t=Va(e,t,l);break e}Gt(e,t,o,l)}t=t.child}return t;case 26:return xc(e,t),e===null?(l=Gv(t.type,null,t.pendingProps,null))?t.memoizedState=l:qe||(l=t.type,e=t.pendingProps,o=jc(ge.current).createElement(l),o[bt]=t,o[ot]=e,Zt(o,l,e),De(o),t.stateNode=o):t.memoizedState=Gv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ne(t),e===null&&qe&&(o=t.stateNode=Yv(t.type,t.pendingProps,ge.current),qt=t,$n=!0,f=rt,Sl(t.type)?(Dh=f,rt=qn(o.firstChild)):rt=f),Gt(e,t,t.pendingProps.children,l),xc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&qe&&((f=o=rt)&&(o=z4(o,t.type,t.pendingProps,$n),o!==null?(t.stateNode=o,qt=t,rt=qn(o.firstChild),$n=!1,f=!0):f=!1),f||sl(t)),Ne(t),f=t.type,d=t.pendingProps,w=e!==null?e.memoizedProps:null,o=d.children,kh(f,d)?o=null:w!==null&&kh(f,w)&&(t.flags|=32),t.memoizedState!==null&&(f=Nd(e,t,ZC,null,null,l),Os._currentValue=f),xc(e,t),Gt(e,t,o,l),t.child;case 6:return e===null&&qe&&((e=l=rt)&&(l=D4(l,t.pendingProps,$n),l!==null?(t.stateNode=l,qt=t,rt=null,e=!0):e=!1),e||sl(t)),null;case 13:return zx(e,t,l);case 4:return ue(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=ei(t,null,o,l):Gt(e,t,o,l),t.child;case 11:return wx(e,t,t.type,t.pendingProps,l);case 7:return Gt(e,t,t.pendingProps,l),t.child;case 8:return Gt(e,t,t.pendingProps.children,l),t.child;case 12:return Gt(e,t,t.pendingProps.children,l),t.child;case 10:return o=t.pendingProps,rl(t,t.type,o.value),Gt(e,t,o.children,l),t.child;case 9:return f=t.type._context,o=t.pendingProps.children,Fl(t),f=Xt(f),o=o(f),t.flags|=1,Gt(e,t,o,l),t.child;case 14:return Ex(e,t,t.type,t.pendingProps,l);case 15:return _x(e,t,t.type,t.pendingProps,l);case 19:return Ox(e,t,l);case 31:return e4(e,t,l);case 22:return Ax(e,t,l,t.pendingProps);case 24:return Fl(t),o=Xt(Mt),e===null?(f=md(),f===null&&(f=it,d=pd(),f.pooledCache=d,d.refCount++,d!==null&&(f.pooledCacheLanes|=l),f=d),t.memoizedState={parent:o,cache:f},xd(t),rl(t,Mt,f)):((e.lanes&l)!==0&&(vd(e,t),hs(t,null,null,l),ds()),f=e.memoizedState,d=t.memoizedState,f.parent!==o?(f={parent:o,cache:o},t.memoizedState=f,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=f),rl(t,Mt,o)):(o=d.cache,rl(t,Mt,o),o!==f.cache&&hd(t,[Mt],l,!0))),Gt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function $a(e){e.flags|=4}function eh(e,t,l,o,f){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(sv())e.flags|=8192;else throw Wl=ac,yd}else e.flags&=-16777217}function jx(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Fv(t))if(sv())e.flags|=8192;else throw Wl=ac,yd}function bc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ft():536870912,e.lanes|=t,Ji|=t)}function vs(e,t){if(!qe)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var o=null;l!==null;)l.alternate!==null&&(o=l),l=l.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function ct(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,o=0;if(t)for(var f=e.child;f!==null;)l|=f.lanes|f.childLanes,o|=f.subtreeFlags&65011712,o|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)l|=f.lanes|f.childLanes,o|=f.subtreeFlags,o|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=o,e.childLanes=l,t}function n4(e,t,l){var o=t.pendingProps;switch(rd(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(t),null;case 1:return ct(t),null;case 3:return l=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),Ha(Mt),me(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Bi(t)?$a(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ud())),ct(t),null;case 26:var f=t.type,d=t.memoizedState;return e===null?($a(t),d!==null?(ct(t),jx(t,d)):(ct(t),eh(t,f,null,o,l))):d?d!==e.memoizedState?($a(t),ct(t),jx(t,d)):(ct(t),t.flags&=-16777217):(e=e.memoizedProps,e!==o&&$a(t),ct(t),eh(t,f,e,o,l)),null;case 27:if(ke(t),l=ge.current,f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&$a(t);else{if(!o){if(t.stateNode===null)throw Error(s(166));return ct(t),null}e=P.current,Bi(t)?p1(t):(e=Yv(f,o,l),t.stateNode=e,$a(t))}return ct(t),null;case 5:if(ke(t),f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&$a(t);else{if(!o){if(t.stateNode===null)throw Error(s(166));return ct(t),null}if(d=P.current,Bi(t))p1(t);else{var w=jc(ge.current);switch(d){case 1:d=w.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:d=w.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":d=w.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":d=w.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":d=w.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof o.is=="string"?w.createElement("select",{is:o.is}):w.createElement("select"),o.multiple?d.multiple=!0:o.size&&(d.size=o.size);break;default:d=typeof o.is=="string"?w.createElement(f,{is:o.is}):w.createElement(f)}}d[bt]=t,d[ot]=o;e:for(w=t.child;w!==null;){if(w.tag===5||w.tag===6)d.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===t)break e;for(;w.sibling===null;){if(w.return===null||w.return===t)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}t.stateNode=d;e:switch(Zt(d,f,o),f){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&$a(t)}}return ct(t),eh(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&$a(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(s(166));if(e=ge.current,Bi(t)){if(e=t.stateNode,l=t.memoizedProps,o=null,f=qt,f!==null)switch(f.tag){case 27:case 5:o=f.memoizedProps}e[bt]=t,e=!!(e.nodeValue===l||o!==null&&o.suppressHydrationWarning===!0||zv(e.nodeValue,l)),e||sl(t,!0)}else e=jc(e).createTextNode(o),e[bt]=t,t.stateNode=e}return ct(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(o=Bi(t),l!==null){if(e===null){if(!o)throw Error(s(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[bt]=t}else Ql(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ct(t),e=!1}else l=ud(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(kn(t),t):(kn(t),null);if((t.flags&128)!==0)throw Error(s(558))}return ct(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Bi(t),o!==null&&o.dehydrated!==null){if(e===null){if(!f)throw Error(s(318));if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(s(317));f[bt]=t}else Ql(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ct(t),f=!1}else f=ud(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return t.flags&256?(kn(t),t):(kn(t),null)}return kn(t),(t.flags&128)!==0?(t.lanes=l,t):(l=o!==null,e=e!==null&&e.memoizedState!==null,l&&(o=t.child,f=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(f=o.alternate.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==f&&(o.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),bc(t,t.updateQueue),ct(t),null);case 4:return me(),e===null&&wh(t.stateNode.containerInfo),ct(t),null;case 10:return Ha(t.type),ct(t),null;case 19:if(O(Nt),o=t.memoizedState,o===null)return ct(t),null;if(f=(t.flags&128)!==0,d=o.rendering,d===null)if(f)vs(o,!1);else{if(wt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=sc(e),d!==null){for(t.flags|=128,vs(o,!1),e=d.updateQueue,t.updateQueue=e,bc(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)c1(l,e),l=l.sibling;return G(Nt,Nt.current&1|2),qe&&ja(t,o.treeForkCount),t.child}e=e.sibling}o.tail!==null&>()>Ac&&(t.flags|=128,f=!0,vs(o,!1),t.lanes=4194304)}else{if(!f)if(e=sc(d),e!==null){if(t.flags|=128,f=!0,e=e.updateQueue,t.updateQueue=e,bc(t,e),vs(o,!0),o.tail===null&&o.tailMode==="hidden"&&!d.alternate&&!qe)return ct(t),null}else 2*gt()-o.renderingStartTime>Ac&&l!==536870912&&(t.flags|=128,f=!0,vs(o,!1),t.lanes=4194304);o.isBackwards?(d.sibling=t.child,t.child=d):(e=o.last,e!==null?e.sibling=d:t.child=d,o.last=d)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=gt(),e.sibling=null,l=Nt.current,G(Nt,f?l&1|2:l&1),qe&&ja(t,o.treeForkCount),e):(ct(t),null);case 22:case 23:return kn(t),Ed(),o=t.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?(l&536870912)!==0&&(t.flags&128)===0&&(ct(t),t.subtreeFlags&6&&(t.flags|=8192)):ct(t),l=t.updateQueue,l!==null&&bc(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),o=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),o!==l&&(t.flags|=2048),e!==null&&O(Jl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Ha(Mt),ct(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function a4(e,t){switch(rd(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ha(Mt),me(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ke(t),null;case 31:if(t.memoizedState!==null){if(kn(t),t.alternate===null)throw Error(s(340));Ql()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(kn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Ql()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return O(Nt),null;case 4:return me(),null;case 10:return Ha(t.type),null;case 22:case 23:return kn(t),Ed(),e!==null&&O(Jl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ha(Mt),null;case 25:return null;default:return null}}function Lx(e,t){switch(rd(t),t.tag){case 3:Ha(Mt),me();break;case 26:case 27:case 5:ke(t);break;case 4:me();break;case 31:t.memoizedState!==null&&kn(t);break;case 13:kn(t);break;case 19:O(Nt);break;case 10:Ha(t.type);break;case 22:case 23:kn(t),Ed(),e!==null&&O(Jl);break;case 24:Ha(Mt)}}function bs(e,t){try{var l=t.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var f=o.next;l=f;do{if((l.tag&e)===e){o=void 0;var d=l.create,w=l.inst;o=d(),w.destroy=o}l=l.next}while(l!==f)}}catch(M){We(t,t.return,M)}}function pl(e,t,l){try{var o=t.updateQueue,f=o!==null?o.lastEffect:null;if(f!==null){var d=f.next;o=d;do{if((o.tag&e)===e){var w=o.inst,M=w.destroy;if(M!==void 0){w.destroy=void 0,f=t;var V=l,ee=M;try{ee()}catch(oe){We(f,V,oe)}}}o=o.next}while(o!==d)}}catch(oe){We(t,t.return,oe)}}function Hx(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{k1(t,l)}catch(o){We(e,e.return,o)}}}function Bx(e,t,l){l.props=ni(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(o){We(e,t,o)}}function Ss(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof l=="function"?e.refCleanup=l(o):l.current=o}}catch(f){We(e,t,f)}}function va(e,t){var l=e.ref,o=e.refCleanup;if(l!==null)if(typeof o=="function")try{o()}catch(f){We(e,t,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(f){We(e,t,f)}else l.current=null}function Ux(e){var t=e.type,l=e.memoizedProps,o=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&o.focus();break e;case"img":l.src?o.src=l.src:l.srcSet&&(o.srcset=l.srcSet)}}catch(f){We(e,e.return,f)}}function th(e,t,l){try{var o=e.stateNode;A4(o,e.type,l,t),o[ot]=t}catch(f){We(e,e.return,f)}}function Vx(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Sl(e.type)||e.tag===4}function nh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vx(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&&Sl(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 ah(e,t,l){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Da));else if(o!==4&&(o===27&&Sl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(ah(e,t,l),e=e.sibling;e!==null;)ah(e,t,l),e=e.sibling}function Sc(e,t,l){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(o!==4&&(o===27&&Sl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Sc(e,t,l),e=e.sibling;e!==null;)Sc(e,t,l),e=e.sibling}function $x(e){var t=e.stateNode,l=e.memoizedProps;try{for(var o=e.type,f=t.attributes;f.length;)t.removeAttributeNode(f[0]);Zt(t,o,l),t[bt]=e,t[ot]=l}catch(d){We(e,e.return,d)}}var Ya=!1,Ot=!1,lh=!1,Yx=typeof WeakSet=="function"?WeakSet:Set,Ut=null;function l4(e,t){if(e=e.containerInfo,Ah=Yc,e=e1(e),Jf(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var o=l.getSelection&&l.getSelection();if(o&&o.rangeCount!==0){l=o.anchorNode;var f=o.anchorOffset,d=o.focusNode;o=o.focusOffset;try{l.nodeType,d.nodeType}catch{l=null;break e}var w=0,M=-1,V=-1,ee=0,oe=0,ce=e,te=null;t:for(;;){for(var ne;ce!==l||f!==0&&ce.nodeType!==3||(M=w+f),ce!==d||o!==0&&ce.nodeType!==3||(V=w+o),ce.nodeType===3&&(w+=ce.nodeValue.length),(ne=ce.firstChild)!==null;)te=ce,ce=ne;for(;;){if(ce===e)break t;if(te===l&&++ee===f&&(M=w),te===d&&++oe===o&&(V=w),(ne=ce.nextSibling)!==null)break;ce=te,te=ce.parentNode}ce=ne}l=M===-1||V===-1?null:{start:M,end:V}}else l=null}l=l||{start:0,end:0}}else l=null;for(Nh={focusedElem:e,selectionRange:l},Yc=!1,Ut=t;Ut!==null;)if(t=Ut,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ut=e;else for(;Ut!==null;){switch(t=Ut,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)f=e[l],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,l=t,f=d.memoizedProps,d=d.memoizedState,o=l.stateNode;try{var xe=ni(l.type,f);e=o.getSnapshotBeforeUpdate(xe,d),o.__reactInternalSnapshotBeforeUpdate=e}catch(Te){We(l,l.return,Te)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Ch(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Ch(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(s(163))}if(e=t.sibling,e!==null){e.return=t.return,Ut=e;break}Ut=t.return}}function qx(e,t,l){var o=l.flags;switch(l.tag){case 0:case 11:case 15:Xa(e,l),o&4&&bs(5,l);break;case 1:if(Xa(e,l),o&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(w){We(l,l.return,w)}else{var f=ni(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(f,t,e.__reactInternalSnapshotBeforeUpdate)}catch(w){We(l,l.return,w)}}o&64&&Hx(l),o&512&&Ss(l,l.return);break;case 3:if(Xa(e,l),o&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{k1(e,t)}catch(w){We(l,l.return,w)}}break;case 27:t===null&&o&4&&$x(l);case 26:case 5:Xa(e,l),t===null&&o&4&&Ux(l),o&512&&Ss(l,l.return);break;case 12:Xa(e,l);break;case 31:Xa(e,l),o&4&&Zx(e,l);break;case 13:Xa(e,l),o&4&&Ix(e,l),o&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=h4.bind(null,l),O4(e,l))));break;case 22:if(o=l.memoizedState!==null||Ya,!o){t=t!==null&&t.memoizedState!==null||Ot,f=Ya;var d=Ot;Ya=o,(Ot=t)&&!d?Ga(e,l,(l.subtreeFlags&8772)!==0):Xa(e,l),Ya=f,Ot=d}break;case 30:break;default:Xa(e,l)}}function Xx(e){var t=e.alternate;t!==null&&(e.alternate=null,Xx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&q(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var pt=null,hn=!1;function qa(e,t,l){for(l=l.child;l!==null;)Gx(e,t,l),l=l.sibling}function Gx(e,t,l){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(rn,l)}catch{}switch(l.tag){case 26:Ot||va(l,t),qa(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ot||va(l,t);var o=pt,f=hn;Sl(l.type)&&(pt=l.stateNode,hn=!1),qa(e,t,l),Ms(l.stateNode),pt=o,hn=f;break;case 5:Ot||va(l,t);case 6:if(o=pt,f=hn,pt=null,qa(e,t,l),pt=o,hn=f,pt!==null)if(hn)try{(pt.nodeType===9?pt.body:pt.nodeName==="HTML"?pt.ownerDocument.body:pt).removeChild(l.stateNode)}catch(d){We(l,t,d)}else try{pt.removeChild(l.stateNode)}catch(d){We(l,t,d)}break;case 18:pt!==null&&(hn?(e=pt,Hv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),io(e)):Hv(pt,l.stateNode));break;case 4:o=pt,f=hn,pt=l.stateNode.containerInfo,hn=!0,qa(e,t,l),pt=o,hn=f;break;case 0:case 11:case 14:case 15:pl(2,l,t),Ot||pl(4,l,t),qa(e,t,l);break;case 1:Ot||(va(l,t),o=l.stateNode,typeof o.componentWillUnmount=="function"&&Bx(l,t,o)),qa(e,t,l);break;case 21:qa(e,t,l);break;case 22:Ot=(o=Ot)||l.memoizedState!==null,qa(e,t,l),Ot=o;break;default:qa(e,t,l)}}function Zx(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{io(e)}catch(l){We(t,t.return,l)}}}function Ix(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{io(e)}catch(l){We(t,t.return,l)}}function i4(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Yx),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Yx),t;default:throw Error(s(435,e.tag))}}function wc(e,t){var l=i4(e);t.forEach(function(o){if(!l.has(o)){l.add(o);var f=p4.bind(null,e,o);o.then(f,f)}})}function pn(e,t){var l=t.deletions;if(l!==null)for(var o=0;o<l.length;o++){var f=l[o],d=e,w=t,M=w;e:for(;M!==null;){switch(M.tag){case 27:if(Sl(M.type)){pt=M.stateNode,hn=!1;break e}break;case 5:pt=M.stateNode,hn=!1;break e;case 3:case 4:pt=M.stateNode.containerInfo,hn=!0;break e}M=M.return}if(pt===null)throw Error(s(160));Gx(d,w,f),pt=null,hn=!1,d=f.alternate,d!==null&&(d.return=null),f.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Qx(t,e),t=t.sibling}var ia=null;function Qx(e,t){var l=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pn(t,e),gn(e),o&4&&(pl(3,e,e.return),bs(3,e),pl(5,e,e.return));break;case 1:pn(t,e),gn(e),o&512&&(Ot||l===null||va(l,l.return)),o&64&&Ya&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?o:l.concat(o))));break;case 26:var f=ia;if(pn(t,e),gn(e),o&512&&(Ot||l===null||va(l,l.return)),o&4){var d=l!==null?l.memoizedState:null;if(o=e.memoizedState,l===null)if(o===null)if(e.stateNode===null){e:{o=e.type,l=e.memoizedProps,f=f.ownerDocument||f;t:switch(o){case"title":d=f.getElementsByTagName("title")[0],(!d||d[ve]||d[bt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=f.createElement(o),f.head.insertBefore(d,f.querySelector("head > title"))),Zt(d,o,l),d[bt]=e,De(d),o=d;break e;case"link":var w=Qv("link","href",f).get(o+(l.href||""));if(w){for(var M=0;M<w.length;M++)if(d=w[M],d.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&d.getAttribute("rel")===(l.rel==null?null:l.rel)&&d.getAttribute("title")===(l.title==null?null:l.title)&&d.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){w.splice(M,1);break t}}d=f.createElement(o),Zt(d,o,l),f.head.appendChild(d);break;case"meta":if(w=Qv("meta","content",f).get(o+(l.content||""))){for(M=0;M<w.length;M++)if(d=w[M],d.getAttribute("content")===(l.content==null?null:""+l.content)&&d.getAttribute("name")===(l.name==null?null:l.name)&&d.getAttribute("property")===(l.property==null?null:l.property)&&d.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&d.getAttribute("charset")===(l.charSet==null?null:l.charSet)){w.splice(M,1);break t}}d=f.createElement(o),Zt(d,o,l),f.head.appendChild(d);break;default:throw Error(s(468,o))}d[bt]=e,De(d),o=d}e.stateNode=o}else Kv(f,e.type,e.stateNode);else e.stateNode=Iv(f,o,e.memoizedProps);else d!==o?(d===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):d.count--,o===null?Kv(f,e.type,e.stateNode):Iv(f,o,e.memoizedProps)):o===null&&e.stateNode!==null&&th(e,e.memoizedProps,l.memoizedProps)}break;case 27:pn(t,e),gn(e),o&512&&(Ot||l===null||va(l,l.return)),l!==null&&o&4&&th(e,e.memoizedProps,l.memoizedProps);break;case 5:if(pn(t,e),gn(e),o&512&&(Ot||l===null||va(l,l.return)),e.flags&32){f=e.stateNode;try{Ti(f,"")}catch(xe){We(e,e.return,xe)}}o&4&&e.stateNode!=null&&(f=e.memoizedProps,th(e,f,l!==null?l.memoizedProps:f)),o&1024&&(lh=!0);break;case 6:if(pn(t,e),gn(e),o&4){if(e.stateNode===null)throw Error(s(162));o=e.memoizedProps,l=e.stateNode;try{l.nodeValue=o}catch(xe){We(e,e.return,xe)}}break;case 3:if(Bc=null,f=ia,ia=Lc(t.containerInfo),pn(t,e),ia=f,gn(e),o&4&&l!==null&&l.memoizedState.isDehydrated)try{io(t.containerInfo)}catch(xe){We(e,e.return,xe)}lh&&(lh=!1,Kx(e));break;case 4:o=ia,ia=Lc(e.stateNode.containerInfo),pn(t,e),gn(e),ia=o;break;case 12:pn(t,e),gn(e);break;case 31:pn(t,e),gn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,wc(e,o)));break;case 13:pn(t,e),gn(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(_c=gt()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,wc(e,o)));break;case 22:f=e.memoizedState!==null;var V=l!==null&&l.memoizedState!==null,ee=Ya,oe=Ot;if(Ya=ee||f,Ot=oe||V,pn(t,e),Ot=oe,Ya=ee,gn(e),o&8192)e:for(t=e.stateNode,t._visibility=f?t._visibility&-2:t._visibility|1,f&&(l===null||V||Ya||Ot||ai(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){V=l=t;try{if(d=V.stateNode,f)w=d.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{M=V.stateNode;var ce=V.memoizedProps.style,te=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;M.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(xe){We(V,V.return,xe)}}}else if(t.tag===6){if(l===null){V=t;try{V.stateNode.nodeValue=f?"":V.memoizedProps}catch(xe){We(V,V.return,xe)}}}else if(t.tag===18){if(l===null){V=t;try{var ne=V.stateNode;f?Bv(ne,!0):Bv(V.stateNode,!1)}catch(xe){We(V,V.return,xe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}o&4&&(o=e.updateQueue,o!==null&&(l=o.retryQueue,l!==null&&(o.retryQueue=null,wc(e,l))));break;case 19:pn(t,e),gn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,wc(e,o)));break;case 30:break;case 21:break;default:pn(t,e),gn(e)}}function gn(e){var t=e.flags;if(t&2){try{for(var l,o=e.return;o!==null;){if(Vx(o)){l=o;break}o=o.return}if(l==null)throw Error(s(160));switch(l.tag){case 27:var f=l.stateNode,d=nh(e);Sc(e,d,f);break;case 5:var w=l.stateNode;l.flags&32&&(Ti(w,""),l.flags&=-33);var M=nh(e);Sc(e,M,w);break;case 3:case 4:var V=l.stateNode.containerInfo,ee=nh(e);ah(e,ee,V);break;default:throw Error(s(161))}}catch(oe){We(e,e.return,oe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Kx(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Kx(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Xa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)qx(e,t.alternate,t),t=t.sibling}function ai(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:pl(4,t,t.return),ai(t);break;case 1:va(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Bx(t,t.return,l),ai(t);break;case 27:Ms(t.stateNode);case 26:case 5:va(t,t.return),ai(t);break;case 22:t.memoizedState===null&&ai(t);break;case 30:ai(t);break;default:ai(t)}e=e.sibling}}function Ga(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,f=e,d=t,w=d.flags;switch(d.tag){case 0:case 11:case 15:Ga(f,d,l),bs(4,d);break;case 1:if(Ga(f,d,l),o=d,f=o.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(ee){We(o,o.return,ee)}if(o=d,f=o.updateQueue,f!==null){var M=o.stateNode;try{var V=f.shared.hiddenCallbacks;if(V!==null)for(f.shared.hiddenCallbacks=null,f=0;f<V.length;f++)N1(V[f],M)}catch(ee){We(o,o.return,ee)}}l&&w&64&&Hx(d),Ss(d,d.return);break;case 27:$x(d);case 26:case 5:Ga(f,d,l),l&&o===null&&w&4&&Ux(d),Ss(d,d.return);break;case 12:Ga(f,d,l);break;case 31:Ga(f,d,l),l&&w&4&&Zx(f,d);break;case 13:Ga(f,d,l),l&&w&4&&Ix(f,d);break;case 22:d.memoizedState===null&&Ga(f,d,l),Ss(d,d.return);break;case 30:break;default:Ga(f,d,l)}t=t.sibling}}function ih(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&ss(l))}function oh(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ss(e))}function oa(e,t,l,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Fx(e,t,l,o),t=t.sibling}function Fx(e,t,l,o){var f=t.flags;switch(t.tag){case 0:case 11:case 15:oa(e,t,l,o),f&2048&&bs(9,t);break;case 1:oa(e,t,l,o);break;case 3:oa(e,t,l,o),f&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ss(e)));break;case 12:if(f&2048){oa(e,t,l,o),e=t.stateNode;try{var d=t.memoizedProps,w=d.id,M=d.onPostCommit;typeof M=="function"&&M(w,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(V){We(t,t.return,V)}}else oa(e,t,l,o);break;case 31:oa(e,t,l,o);break;case 13:oa(e,t,l,o);break;case 23:break;case 22:d=t.stateNode,w=t.alternate,t.memoizedState!==null?d._visibility&2?oa(e,t,l,o):ws(e,t):d._visibility&2?oa(e,t,l,o):(d._visibility|=2,Qi(e,t,l,o,(t.subtreeFlags&10256)!==0||!1)),f&2048&&ih(w,t);break;case 24:oa(e,t,l,o),f&2048&&oh(t.alternate,t);break;default:oa(e,t,l,o)}}function Qi(e,t,l,o,f){for(f=f&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,w=t,M=l,V=o,ee=w.flags;switch(w.tag){case 0:case 11:case 15:Qi(d,w,M,V,f),bs(8,w);break;case 23:break;case 22:var oe=w.stateNode;w.memoizedState!==null?oe._visibility&2?Qi(d,w,M,V,f):ws(d,w):(oe._visibility|=2,Qi(d,w,M,V,f)),f&&ee&2048&&ih(w.alternate,w);break;case 24:Qi(d,w,M,V,f),f&&ee&2048&&oh(w.alternate,w);break;default:Qi(d,w,M,V,f)}t=t.sibling}}function ws(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,o=t,f=o.flags;switch(o.tag){case 22:ws(l,o),f&2048&&ih(o.alternate,o);break;case 24:ws(l,o),f&2048&&oh(o.alternate,o);break;default:ws(l,o)}t=t.sibling}}var Es=8192;function Ki(e,t,l){if(e.subtreeFlags&Es)for(e=e.child;e!==null;)Jx(e,t,l),e=e.sibling}function Jx(e,t,l){switch(e.tag){case 26:Ki(e,t,l),e.flags&Es&&e.memoizedState!==null&&G4(l,ia,e.memoizedState,e.memoizedProps);break;case 5:Ki(e,t,l);break;case 3:case 4:var o=ia;ia=Lc(e.stateNode.containerInfo),Ki(e,t,l),ia=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=Es,Es=16777216,Ki(e,t,l),Es=o):Ki(e,t,l));break;default:Ki(e,t,l)}}function Px(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function _s(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var o=t[l];Ut=o,ev(o,e)}Px(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Wx(e),e=e.sibling}function Wx(e){switch(e.tag){case 0:case 11:case 15:_s(e),e.flags&2048&&pl(9,e,e.return);break;case 3:_s(e);break;case 12:_s(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ec(e)):_s(e);break;default:_s(e)}}function Ec(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var o=t[l];Ut=o,ev(o,e)}Px(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:pl(8,t,t.return),Ec(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Ec(t));break;default:Ec(t)}e=e.sibling}}function ev(e,t){for(;Ut!==null;){var l=Ut;switch(l.tag){case 0:case 11:case 15:pl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var o=l.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:ss(l.memoizedState.cache)}if(o=l.child,o!==null)o.return=l,Ut=o;else e:for(l=e;Ut!==null;){o=Ut;var f=o.sibling,d=o.return;if(Xx(o),o===l){Ut=null;break e}if(f!==null){f.return=d,Ut=f;break e}Ut=d}}}var o4={getCacheForType:function(e){var t=Xt(Mt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Xt(Mt).controller.signal}},s4=typeof WeakMap=="function"?WeakMap:Map,Ke=0,it=null,He=null,Ue=0,Pe=0,Tn=null,gl=!1,Fi=!1,sh=!1,Za=0,wt=0,ml=0,li=0,rh=0,Cn=0,Ji=0,As=null,mn=null,ch=!1,_c=0,tv=0,Ac=1/0,Nc=null,yl=null,Ht=0,xl=null,Pi=null,Ia=0,uh=0,fh=null,nv=null,Ns=0,dh=null;function Mn(){return(Ke&2)!==0&&Ue!==0?Ue&-Ue:k.T!==null?xh():Rn()}function av(){if(Cn===0)if((Ue&536870912)===0||qe){var e=yt;yt<<=1,(yt&3932160)===0&&(yt=262144),Cn=e}else Cn=536870912;return e=Nn.current,e!==null&&(e.flags|=32),Cn}function yn(e,t,l){(e===it&&(Pe===2||Pe===9)||e.cancelPendingCommit!==null)&&(Wi(e,0),vl(e,Ue,Cn,!1)),Dn(e,l),((Ke&2)===0||e!==it)&&(e===it&&((Ke&2)===0&&(li|=l),wt===4&&vl(e,Ue,Cn,!1)),ba(e))}function lv(e,t,l){if((Ke&6)!==0)throw Error(s(327));var o=!l&&(t&127)===0&&(t&e.expiredLanes)===0||na(e,t),f=o?u4(e,t):ph(e,t,!0),d=o;do{if(f===0){Fi&&!o&&vl(e,t,0,!1);break}else{if(l=e.current.alternate,d&&!r4(l)){f=ph(e,t,!1),d=!1;continue}if(f===2){if(d=t,e.errorRecoveryDisabledLanes&d)var w=0;else w=e.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){t=w;e:{var M=e;f=As;var V=M.current.memoizedState.isDehydrated;if(V&&(Wi(M,w).flags|=256),w=ph(M,w,!1),w!==2){if(sh&&!V){M.errorRecoveryDisabledLanes|=d,li|=d,f=4;break e}d=mn,mn=f,d!==null&&(mn===null?mn=d:mn.push.apply(mn,d))}f=w}if(d=!1,f!==2)continue}}if(f===1){Wi(e,0),vl(e,t,0,!0);break}e:{switch(o=e,d=f,d){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:vl(o,t,Cn,!gl);break e;case 2:mn=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(f=_c+300-gt(),10<f)){if(vl(o,t,Cn,!gl),En(o,0,!0)!==0)break e;Ia=t,o.timeoutHandle=jv(iv.bind(null,o,l,mn,Nc,ch,t,Cn,li,Ji,gl,d,"Throttled",-0,0),f);break e}iv(o,l,mn,Nc,ch,t,Cn,li,Ji,gl,d,null,-0,0)}}break}while(!0);ba(e)}function iv(e,t,l,o,f,d,w,M,V,ee,oe,ce,te,ne){if(e.timeoutHandle=-1,ce=t.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Da},Jx(t,d,ce);var xe=(d&62914560)===d?_c-gt():(d&4194048)===d?tv-gt():0;if(xe=Z4(ce,xe),xe!==null){Ia=d,e.cancelPendingCommit=xe(hv.bind(null,e,t,d,l,o,f,w,M,V,oe,ce,null,te,ne)),vl(e,d,w,!ee);return}}hv(e,t,d,l,o,f,w,M,V)}function r4(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var o=0;o<l.length;o++){var f=l[o],d=f.getSnapshot;f=f.value;try{if(!_n(d(),f))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function vl(e,t,l,o){t&=~rh,t&=~li,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var f=t;0<f;){var d=31-dt(f),w=1<<d;o[d]=-1,f&=~w}l!==0&&Ca(e,l,t)}function kc(){return(Ke&6)===0?(ks(0),!1):!0}function hh(){if(He!==null){if(Pe===0)var e=He.return;else e=He,La=Kl=null,Cd(e),qi=null,cs=0,e=He;for(;e!==null;)Lx(e.alternate,e),e=e.return;He=null}}function Wi(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,T4(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Ia=0,hh(),it=e,He=l=Ra(e.current,null),Ue=t,Pe=0,Tn=null,gl=!1,Fi=na(e,t),sh=!1,Ji=Cn=rh=li=ml=wt=0,mn=As=null,ch=!1,(t&8)!==0&&(t|=t&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=t;0<o;){var f=31-dt(o),d=1<<f;t|=e[f],o&=~d}return Za=t,Qr(),l}function ov(e,t){ze=null,k.H=ys,t===Yi||t===nc?(t=w1(),Pe=3):t===yd?(t=w1(),Pe=4):Pe=t===Gd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Tn=t,He===null&&(wt=1,mc(e,Bn(t,e.current)))}function sv(){var e=Nn.current;return e===null?!0:(Ue&4194048)===Ue?Yn===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?e===Yn:!1}function rv(){var e=k.H;return k.H=ys,e===null?ys:e}function cv(){var e=k.A;return k.A=o4,e}function Tc(){wt=4,gl||(Ue&4194048)!==Ue&&Nn.current!==null||(Fi=!0),(ml&134217727)===0&&(li&134217727)===0||it===null||vl(it,Ue,Cn,!1)}function ph(e,t,l){var o=Ke;Ke|=2;var f=rv(),d=cv();(it!==e||Ue!==t)&&(Nc=null,Wi(e,t)),t=!1;var w=wt;e:do try{if(Pe!==0&&He!==null){var M=He,V=Tn;switch(Pe){case 8:hh(),w=6;break e;case 3:case 2:case 9:case 6:Nn.current===null&&(t=!0);var ee=Pe;if(Pe=0,Tn=null,eo(e,M,V,ee),l&&Fi){w=0;break e}break;default:ee=Pe,Pe=0,Tn=null,eo(e,M,V,ee)}}c4(),w=wt;break}catch(oe){ov(e,oe)}while(!0);return t&&e.shellSuspendCounter++,La=Kl=null,Ke=o,k.H=f,k.A=d,He===null&&(it=null,Ue=0,Qr()),w}function c4(){for(;He!==null;)uv(He)}function u4(e,t){var l=Ke;Ke|=2;var o=rv(),f=cv();it!==e||Ue!==t?(Nc=null,Ac=gt()+500,Wi(e,t)):Fi=na(e,t);e:do try{if(Pe!==0&&He!==null){t=He;var d=Tn;t:switch(Pe){case 1:Pe=0,Tn=null,eo(e,t,d,1);break;case 2:case 9:if(b1(d)){Pe=0,Tn=null,fv(t);break}t=function(){Pe!==2&&Pe!==9||it!==e||(Pe=7),ba(e)},d.then(t,t);break e;case 3:Pe=7;break e;case 4:Pe=5;break e;case 7:b1(d)?(Pe=0,Tn=null,fv(t)):(Pe=0,Tn=null,eo(e,t,d,7));break;case 5:var w=null;switch(He.tag){case 26:w=He.memoizedState;case 5:case 27:var M=He;if(w?Fv(w):M.stateNode.complete){Pe=0,Tn=null;var V=M.sibling;if(V!==null)He=V;else{var ee=M.return;ee!==null?(He=ee,Cc(ee)):He=null}break t}}Pe=0,Tn=null,eo(e,t,d,5);break;case 6:Pe=0,Tn=null,eo(e,t,d,6);break;case 8:hh(),wt=6;break e;default:throw Error(s(462))}}f4();break}catch(oe){ov(e,oe)}while(!0);return La=Kl=null,k.H=o,k.A=f,Ke=l,He!==null?0:(it=null,Ue=0,Qr(),wt)}function f4(){for(;He!==null&&!wn();)uv(He)}function uv(e){var t=Rx(e.alternate,e,Za);e.memoizedProps=e.pendingProps,t===null?Cc(e):He=t}function fv(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Tx(l,t,t.pendingProps,t.type,void 0,Ue);break;case 11:t=Tx(l,t,t.pendingProps,t.type.render,t.ref,Ue);break;case 5:Cd(t);default:Lx(l,t),t=He=c1(t,Za),t=Rx(l,t,Za)}e.memoizedProps=e.pendingProps,t===null?Cc(e):He=t}function eo(e,t,l,o){La=Kl=null,Cd(t),qi=null,cs=0;var f=t.return;try{if(WC(e,f,t,l,Ue)){wt=1,mc(e,Bn(l,e.current)),He=null;return}}catch(d){if(f!==null)throw He=f,d;wt=1,mc(e,Bn(l,e.current)),He=null;return}t.flags&32768?(qe||o===1?e=!0:Fi||(Ue&536870912)!==0?e=!1:(gl=e=!0,(o===2||o===9||o===3||o===6)&&(o=Nn.current,o!==null&&o.tag===13&&(o.flags|=16384))),dv(t,e)):Cc(t)}function Cc(e){var t=e;do{if((t.flags&32768)!==0){dv(t,gl);return}e=t.return;var l=n4(t.alternate,t,Za);if(l!==null){He=l;return}if(t=t.sibling,t!==null){He=t;return}He=t=e}while(t!==null);wt===0&&(wt=5)}function dv(e,t){do{var l=a4(e.alternate,e);if(l!==null){l.flags&=32767,He=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){He=e;return}He=e=l}while(e!==null);wt=6,He=null}function hv(e,t,l,o,f,d,w,M,V){e.cancelPendingCommit=null;do Mc();while(Ht!==0);if((Ke&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(d=t.lanes|t.childLanes,d|=nd,ma(e,l,d,w,M,V),e===it&&(He=it=null,Ue=0),Pi=t,xl=e,Ia=l,uh=d,fh=f,nv=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,g4(Rt,function(){return xv(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=k.T,k.T=null,f=L.p,L.p=2,w=Ke,Ke|=4;try{l4(e,t,l)}finally{Ke=w,L.p=f,k.T=o}}Ht=1,pv(),gv(),mv()}}function pv(){if(Ht===1){Ht=0;var e=xl,t=Pi,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=k.T,k.T=null;var o=L.p;L.p=2;var f=Ke;Ke|=4;try{Qx(t,e);var d=Nh,w=e1(e.containerInfo),M=d.focusedElem,V=d.selectionRange;if(w!==M&&M&&M.ownerDocument&&Wy(M.ownerDocument.documentElement,M)){if(V!==null&&Jf(M)){var ee=V.start,oe=V.end;if(oe===void 0&&(oe=ee),"selectionStart"in M)M.selectionStart=ee,M.selectionEnd=Math.min(oe,M.value.length);else{var ce=M.ownerDocument||document,te=ce&&ce.defaultView||window;if(te.getSelection){var ne=te.getSelection(),xe=M.textContent.length,Te=Math.min(V.start,xe),lt=V.end===void 0?Te:Math.min(V.end,xe);!ne.extend&&Te>lt&&(w=lt,lt=Te,Te=w);var Q=Py(M,Te),X=Py(M,lt);if(Q&&X&&(ne.rangeCount!==1||ne.anchorNode!==Q.node||ne.anchorOffset!==Q.offset||ne.focusNode!==X.node||ne.focusOffset!==X.offset)){var W=ce.createRange();W.setStart(Q.node,Q.offset),ne.removeAllRanges(),Te>lt?(ne.addRange(W),ne.extend(X.node,X.offset)):(W.setEnd(X.node,X.offset),ne.addRange(W))}}}}for(ce=[],ne=M;ne=ne.parentNode;)ne.nodeType===1&&ce.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<ce.length;M++){var re=ce[M];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}Yc=!!Ah,Nh=Ah=null}finally{Ke=f,L.p=o,k.T=l}}e.current=t,Ht=2}}function gv(){if(Ht===2){Ht=0;var e=xl,t=Pi,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=k.T,k.T=null;var o=L.p;L.p=2;var f=Ke;Ke|=4;try{qx(e,t.alternate,t)}finally{Ke=f,L.p=o,k.T=l}}Ht=3}}function mv(){if(Ht===4||Ht===3){Ht=0,_t();var e=xl,t=Pi,l=Ia,o=nv;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ht=5:(Ht=0,Pi=xl=null,yv(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(yl=null),Yt(l),t=t.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(rn,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=k.T,f=L.p,L.p=2,k.T=null;try{for(var d=e.onRecoverableError,w=0;w<o.length;w++){var M=o[w];d(M.value,{componentStack:M.stack})}}finally{k.T=t,L.p=f}}(Ia&3)!==0&&Mc(),ba(e),f=e.pendingLanes,(l&261930)!==0&&(f&42)!==0?e===dh?Ns++:(Ns=0,dh=e):Ns=0,ks(0)}}function yv(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ss(t)))}function Mc(){return pv(),gv(),mv(),xv()}function xv(){if(Ht!==5)return!1;var e=xl,t=uh;uh=0;var l=Yt(Ia),o=k.T,f=L.p;try{L.p=32>l?32:l,k.T=null,l=fh,fh=null;var d=xl,w=Ia;if(Ht=0,Pi=xl=null,Ia=0,(Ke&6)!==0)throw Error(s(331));var M=Ke;if(Ke|=4,Wx(d.current),Fx(d,d.current,w,l),Ke=M,ks(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(rn,d)}catch{}return!0}finally{L.p=f,k.T=o,yv(e,t)}}function vv(e,t,l){t=Bn(l,t),t=Xd(e.stateNode,t,2),e=fl(e,t,2),e!==null&&(Dn(e,2),ba(e))}function We(e,t,l){if(e.tag===3)vv(e,e,l);else for(;t!==null;){if(t.tag===3){vv(t,e,l);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(yl===null||!yl.has(o))){e=Bn(l,e),l=bx(2),o=fl(t,l,2),o!==null&&(Sx(l,o,t,e),Dn(o,2),ba(o));break}}t=t.return}}function gh(e,t,l){var o=e.pingCache;if(o===null){o=e.pingCache=new s4;var f=new Set;o.set(t,f)}else f=o.get(t),f===void 0&&(f=new Set,o.set(t,f));f.has(l)||(sh=!0,f.add(l),e=d4.bind(null,e,t,l),t.then(e,e))}function d4(e,t,l){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,it===e&&(Ue&l)===l&&(wt===4||wt===3&&(Ue&62914560)===Ue&&300>gt()-_c?(Ke&2)===0&&Wi(e,0):rh|=l,Ji===Ue&&(Ji=0)),ba(e)}function bv(e,t){t===0&&(t=Ft()),e=Zl(e,t),e!==null&&(Dn(e,t),ba(e))}function h4(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),bv(e,l)}function p4(e,t){var l=0;switch(e.tag){case 31:case 13:var o=e.stateNode,f=e.memoizedState;f!==null&&(l=f.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(s(314))}o!==null&&o.delete(t),bv(e,l)}function g4(e,t){return et(e,t)}var zc=null,to=null,mh=!1,Dc=!1,yh=!1,bl=0;function ba(e){e!==to&&e.next===null&&(to===null?zc=to=e:to=to.next=e),Dc=!0,mh||(mh=!0,y4())}function ks(e,t){if(!yh&&Dc){yh=!0;do for(var l=!1,o=zc;o!==null;){if(e!==0){var f=o.pendingLanes;if(f===0)var d=0;else{var w=o.suspendedLanes,M=o.pingedLanes;d=(1<<31-dt(42|e)+1)-1,d&=f&~(w&~M),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(l=!0,_v(o,d))}else d=Ue,d=En(o,o===it?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(d&3)===0||na(o,d)||(l=!0,_v(o,d));o=o.next}while(l);yh=!1}}function m4(){Sv()}function Sv(){Dc=mh=!1;var e=0;bl!==0&&k4()&&(e=bl);for(var t=gt(),l=null,o=zc;o!==null;){var f=o.next,d=wv(o,t);d===0?(o.next=null,l===null?zc=f:l.next=f,f===null&&(to=l)):(l=o,(e!==0||(d&3)!==0)&&(Dc=!0)),o=f}Ht!==0&&Ht!==5||ks(e),bl!==0&&(bl=0)}function wv(e,t){for(var l=e.suspendedLanes,o=e.pingedLanes,f=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var w=31-dt(d),M=1<<w,V=f[w];V===-1?((M&l)===0||(M&o)!==0)&&(f[w]=ht(M,t)):V<=t&&(e.expiredLanes|=M),d&=~M}if(t=it,l=Ue,l=En(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,l===0||e===t&&(Pe===2||Pe===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&on(o),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||na(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(o!==null&&on(o),Yt(l)){case 2:case 8:l=$t;break;case 32:l=Rt;break;case 268435456:l=ea;break;default:l=Rt}return o=Ev.bind(null,e),l=et(l,o),e.callbackPriority=t,e.callbackNode=l,t}return o!==null&&o!==null&&on(o),e.callbackPriority=2,e.callbackNode=null,2}function Ev(e,t){if(Ht!==0&&Ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Mc()&&e.callbackNode!==l)return null;var o=Ue;return o=En(e,e===it?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(lv(e,o,t),wv(e,gt()),e.callbackNode!=null&&e.callbackNode===l?Ev.bind(null,e):null)}function _v(e,t){if(Mc())return null;lv(e,t,!0)}function y4(){C4(function(){(Ke&6)!==0?et(Bt,m4):Sv()})}function xh(){if(bl===0){var e=Vi;e===0&&(e=tt,tt<<=1,(tt&261888)===0&&(tt=256)),bl=e}return bl}function Av(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Vr(""+e)}function Nv(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function x4(e,t,l,o,f){if(t==="submit"&&l&&l.stateNode===f){var d=Av((f[ot]||null).action),w=o.submitter;w&&(t=(t=w[ot]||null)?Av(t.formAction):w.getAttribute("formAction"),t!==null&&(d=t,w=null));var M=new Xr("action","action",null,o,f);e.push({event:M,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(bl!==0){var V=w?Nv(f,w):new FormData(f);Bd(l,{pending:!0,data:V,method:f.method,action:d},null,V)}}else typeof d=="function"&&(M.preventDefault(),V=w?Nv(f,w):new FormData(f),Bd(l,{pending:!0,data:V,method:f.method,action:d},d,V))},currentTarget:f}]})}}for(var vh=0;vh<td.length;vh++){var bh=td[vh],v4=bh.toLowerCase(),b4=bh[0].toUpperCase()+bh.slice(1);la(v4,"on"+b4)}la(a1,"onAnimationEnd"),la(l1,"onAnimationIteration"),la(i1,"onAnimationStart"),la("dblclick","onDoubleClick"),la("focusin","onFocus"),la("focusout","onBlur"),la(LC,"onTransitionRun"),la(HC,"onTransitionStart"),la(BC,"onTransitionCancel"),la(o1,"onTransitionEnd"),Ln("onMouseEnter",["mouseout","mouseover"]),Ln("onMouseLeave",["mouseout","mouseover"]),Ln("onPointerEnter",["pointerout","pointerover"]),Ln("onPointerLeave",["pointerout","pointerover"]),Jt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Jt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Jt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Jt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Jt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Jt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ts="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(" "),S4=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ts));function kv(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var o=e[l],f=o.event;o=o.listeners;e:{var d=void 0;if(t)for(var w=o.length-1;0<=w;w--){var M=o[w],V=M.instance,ee=M.currentTarget;if(M=M.listener,V!==d&&f.isPropagationStopped())break e;d=M,f.currentTarget=ee;try{d(f)}catch(oe){Ir(oe)}f.currentTarget=null,d=V}else for(w=0;w<o.length;w++){if(M=o[w],V=M.instance,ee=M.currentTarget,M=M.listener,V!==d&&f.isPropagationStopped())break e;d=M,f.currentTarget=ee;try{d(f)}catch(oe){Ir(oe)}f.currentTarget=null,d=V}}}}function Be(e,t){var l=t[za];l===void 0&&(l=t[za]=new Set);var o=e+"__bubble";l.has(o)||(Tv(t,e,2,!1),l.add(o))}function Sh(e,t,l){var o=0;t&&(o|=4),Tv(l,e,o,t)}var Oc="_reactListening"+Math.random().toString(36).slice(2);function wh(e){if(!e[Oc]){e[Oc]=!0,Lt.forEach(function(l){l!=="selectionchange"&&(S4.has(l)||Sh(l,!1,e),Sh(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Oc]||(t[Oc]=!0,Sh("selectionchange",!1,t))}}function Tv(e,t,l,o){switch(ab(t)){case 2:var f=K4;break;case 8:f=F4;break;default:f=Hh}l=f.bind(null,t,l,e),f=void 0,!Yf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(f=!0),o?f!==void 0?e.addEventListener(t,l,{capture:!0,passive:f}):e.addEventListener(t,l,!0):f!==void 0?e.addEventListener(t,l,{passive:f}):e.addEventListener(t,l,!1)}function Eh(e,t,l,o,f){var d=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var w=o.tag;if(w===3||w===4){var M=o.stateNode.containerInfo;if(M===f)break;if(w===4)for(w=o.return;w!==null;){var V=w.tag;if((V===3||V===4)&&w.stateNode.containerInfo===f)return;w=w.return}for(;M!==null;){if(w=pe(M),w===null)return;if(V=w.tag,V===5||V===6||V===26||V===27){o=d=w;continue e}M=M.parentNode}}o=o.return}Oy(function(){var ee=d,oe=Vf(l),ce=[];e:{var te=s1.get(e);if(te!==void 0){var ne=Xr,xe=e;switch(e){case"keypress":if(Yr(l)===0)break e;case"keydown":case"keyup":ne=pC;break;case"focusin":xe="focus",ne=Zf;break;case"focusout":xe="blur",ne=Zf;break;case"beforeblur":case"afterblur":ne=Zf;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=Ly;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=nC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=yC;break;case a1:case l1:case i1:ne=iC;break;case o1:ne=vC;break;case"scroll":case"scrollend":ne=eC;break;case"wheel":ne=SC;break;case"copy":case"cut":case"paste":ne=sC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=By;break;case"toggle":case"beforetoggle":ne=EC}var Te=(t&4)!==0,lt=!Te&&(e==="scroll"||e==="scrollend"),Q=Te?te!==null?te+"Capture":null:te;Te=[];for(var X=ee,W;X!==null;){var re=X;if(W=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||W===null||Q===null||(re=Fo(X,Q),re!=null&&Te.push(Cs(X,re,W))),lt)break;X=X.return}0<Te.length&&(te=new ne(te,xe,null,l,oe),ce.push({event:te,listeners:Te}))}}if((t&7)===0){e:{if(te=e==="mouseover"||e==="pointerover",ne=e==="mouseout"||e==="pointerout",te&&l!==Uf&&(xe=l.relatedTarget||l.fromElement)&&(pe(xe)||xe[jn]))break e;if((ne||te)&&(te=oe.window===oe?oe:(te=oe.ownerDocument)?te.defaultView||te.parentWindow:window,ne?(xe=l.relatedTarget||l.toElement,ne=ee,xe=xe?pe(xe):null,xe!==null&&(lt=c(xe),Te=xe.tag,xe!==lt||Te!==5&&Te!==27&&Te!==6)&&(xe=null)):(ne=null,xe=ee),ne!==xe)){if(Te=Ly,re="onMouseLeave",Q="onMouseEnter",X="mouse",(e==="pointerout"||e==="pointerover")&&(Te=By,re="onPointerLeave",Q="onPointerEnter",X="pointer"),lt=ne==null?te:Xe(ne),W=xe==null?te:Xe(xe),te=new Te(re,X+"leave",ne,l,oe),te.target=lt,te.relatedTarget=W,re=null,pe(oe)===ee&&(Te=new Te(Q,X+"enter",xe,l,oe),Te.target=W,Te.relatedTarget=lt,re=Te),lt=re,ne&&xe)t:{for(Te=w4,Q=ne,X=xe,W=0,re=Q;re;re=Te(re))W++;re=0;for(var Ae=X;Ae;Ae=Te(Ae))re++;for(;0<W-re;)Q=Te(Q),W--;for(;0<re-W;)X=Te(X),re--;for(;W--;){if(Q===X||X!==null&&Q===X.alternate){Te=Q;break t}Q=Te(Q),X=Te(X)}Te=null}else Te=null;ne!==null&&Cv(ce,te,ne,Te,!1),xe!==null&<!==null&&Cv(ce,lt,xe,Te,!0)}}e:{if(te=ee?Xe(ee):window,ne=te.nodeName&&te.nodeName.toLowerCase(),ne==="select"||ne==="input"&&te.type==="file")var Ie=Zy;else if(Xy(te))if(Iy)Ie=OC;else{Ie=zC;var Ee=MC}else ne=te.nodeName,!ne||ne.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?ee&&Bf(ee.elementType)&&(Ie=Zy):Ie=DC;if(Ie&&(Ie=Ie(e,ee))){Gy(ce,Ie,l,oe);break e}Ee&&Ee(e,te,ee),e==="focusout"&&ee&&te.type==="number"&&ee.memoizedProps.value!=null&&Ni(te,"number",te.value)}switch(Ee=ee?Xe(ee):window,e){case"focusin":(Xy(Ee)||Ee.contentEditable==="true")&&(Di=Ee,Pf=ee,ls=null);break;case"focusout":ls=Pf=Di=null;break;case"mousedown":Wf=!0;break;case"contextmenu":case"mouseup":case"dragend":Wf=!1,t1(ce,l,oe);break;case"selectionchange":if(jC)break;case"keydown":case"keyup":t1(ce,l,oe)}var Oe;if(Qf)e:{switch(e){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else zi?Yy(e,l)&&(Ve="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Ve="onCompositionStart");Ve&&(Uy&&l.locale!=="ko"&&(zi||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&zi&&(Oe=Ry()):(ll=oe,qf="value"in ll?ll.value:ll.textContent,zi=!0)),Ee=Rc(ee,Ve),0<Ee.length&&(Ve=new Hy(Ve,e,null,l,oe),ce.push({event:Ve,listeners:Ee}),Oe?Ve.data=Oe:(Oe=qy(l),Oe!==null&&(Ve.data=Oe)))),(Oe=AC?NC(e,l):kC(e,l))&&(Ve=Rc(ee,"onBeforeInput"),0<Ve.length&&(Ee=new Hy("onBeforeInput","beforeinput",null,l,oe),ce.push({event:Ee,listeners:Ve}),Ee.data=Oe)),x4(ce,e,ee,l,oe)}kv(ce,t)})}function Cs(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Rc(e,t){for(var l=t+"Capture",o=[];e!==null;){var f=e,d=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||d===null||(f=Fo(e,l),f!=null&&o.unshift(Cs(e,f,d)),f=Fo(e,t),f!=null&&o.push(Cs(e,f,d))),e.tag===3)return o;e=e.return}return[]}function w4(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Cv(e,t,l,o,f){for(var d=t._reactName,w=[];l!==null&&l!==o;){var M=l,V=M.alternate,ee=M.stateNode;if(M=M.tag,V!==null&&V===o)break;M!==5&&M!==26&&M!==27||ee===null||(V=ee,f?(ee=Fo(l,d),ee!=null&&w.unshift(Cs(l,ee,V))):f||(ee=Fo(l,d),ee!=null&&w.push(Cs(l,ee,V)))),l=l.return}w.length!==0&&e.push({event:t,listeners:w})}var E4=/\r\n?/g,_4=/\u0000|\uFFFD/g;function Mv(e){return(typeof e=="string"?e:""+e).replace(E4,`
|
|
41
|
-
`).replace(_4,"")}function zv(e,t){return t=Mv(t),Mv(e)===t}function at(e,t,l,o,f,d){switch(l){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||Ti(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&Ti(e,""+o);break;case"className":Ei(e,"class",o);break;case"tabIndex":Ei(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Ei(e,l,o);break;case"style":zy(e,o,d);break;case"data":if(t!=="object"){Ei(e,"data",o);break}case"src":case"href":if(o===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(l);break}o=Vr(""+o),e.setAttribute(l,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(l==="formAction"?(t!=="input"&&at(e,t,"name",f.name,f,null),at(e,t,"formEncType",f.formEncType,f,null),at(e,t,"formMethod",f.formMethod,f,null),at(e,t,"formTarget",f.formTarget,f,null)):(at(e,t,"encType",f.encType,f,null),at(e,t,"method",f.method,f,null),at(e,t,"target",f.target,f,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(l);break}o=Vr(""+o),e.setAttribute(l,o);break;case"onClick":o!=null&&(e.onclick=Da);break;case"onScroll":o!=null&&Be("scroll",e);break;case"onScrollEnd":o!=null&&Be("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(s(61));if(l=o.__html,l!=null){if(f.children!=null)throw Error(s(60));e.innerHTML=l}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}l=Vr(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(l,""+o):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":o===!0?e.setAttribute(l,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(l,o):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(l,o):e.removeAttribute(l);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(l):e.setAttribute(l,o);break;case"popover":Be("beforetoggle",e),Be("toggle",e),wi(e,"popover",o);break;case"xlinkActuate":aa(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":aa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":aa(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":aa(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":aa(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":aa(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":aa(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":aa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":aa(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":wi(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=PT.get(l)||l,wi(e,l,o))}}function _h(e,t,l,o,f,d){switch(l){case"style":zy(e,o,d);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(s(61));if(l=o.__html,l!=null){if(f.children!=null)throw Error(s(60));e.innerHTML=l}}break;case"children":typeof o=="string"?Ti(e,o):(typeof o=="number"||typeof o=="bigint")&&Ti(e,""+o);break;case"onScroll":o!=null&&Be("scroll",e);break;case"onScrollEnd":o!=null&&Be("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Da);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!un.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(f=l.endsWith("Capture"),t=l.slice(2,f?l.length-7:void 0),d=e[ot]||null,d=d!=null?d[l]:null,typeof d=="function"&&e.removeEventListener(t,d,f),typeof o=="function")){typeof d!="function"&&d!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,o,f);break e}l in e?e[l]=o:o===!0?e.setAttribute(l,""):wi(e,l,o)}}}function Zt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Be("error",e),Be("load",e);var o=!1,f=!1,d;for(d in l)if(l.hasOwnProperty(d)){var w=l[d];if(w!=null)switch(d){case"src":o=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:at(e,t,d,w,l,null)}}f&&at(e,t,"srcSet",l.srcSet,l,null),o&&at(e,t,"src",l.src,l,null);return;case"input":Be("invalid",e);var M=d=w=f=null,V=null,ee=null;for(o in l)if(l.hasOwnProperty(o)){var oe=l[o];if(oe!=null)switch(o){case"name":f=oe;break;case"type":w=oe;break;case"checked":V=oe;break;case"defaultChecked":ee=oe;break;case"value":d=oe;break;case"defaultValue":M=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(s(137,t));break;default:at(e,t,o,oe,l,null)}}Ur(e,d,M,V,ee,w,f,!1);return;case"select":Be("invalid",e),o=w=d=null;for(f in l)if(l.hasOwnProperty(f)&&(M=l[f],M!=null))switch(f){case"value":d=M;break;case"defaultValue":w=M;break;case"multiple":o=M;default:at(e,t,f,M,l,null)}t=d,l=w,e.multiple=!!o,t!=null?ki(e,!!o,t,!1):l!=null&&ki(e,!!o,l,!0);return;case"textarea":Be("invalid",e),d=f=o=null;for(w in l)if(l.hasOwnProperty(w)&&(M=l[w],M!=null))switch(w){case"value":o=M;break;case"defaultValue":f=M;break;case"children":d=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(s(91));break;default:at(e,t,w,M,l,null)}Cy(e,o,f,d);return;case"option":for(V in l)if(l.hasOwnProperty(V)&&(o=l[V],o!=null))switch(V){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:at(e,t,V,o,l,null)}return;case"dialog":Be("beforetoggle",e),Be("toggle",e),Be("cancel",e),Be("close",e);break;case"iframe":case"object":Be("load",e);break;case"video":case"audio":for(o=0;o<Ts.length;o++)Be(Ts[o],e);break;case"image":Be("error",e),Be("load",e);break;case"details":Be("toggle",e);break;case"embed":case"source":case"link":Be("error",e),Be("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(ee in l)if(l.hasOwnProperty(ee)&&(o=l[ee],o!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:at(e,t,ee,o,l,null)}return;default:if(Bf(t)){for(oe in l)l.hasOwnProperty(oe)&&(o=l[oe],o!==void 0&&_h(e,t,oe,o,l,void 0));return}}for(M in l)l.hasOwnProperty(M)&&(o=l[M],o!=null&&at(e,t,M,o,l,null))}function A4(e,t,l,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,d=null,w=null,M=null,V=null,ee=null,oe=null;for(ne in l){var ce=l[ne];if(l.hasOwnProperty(ne)&&ce!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":V=ce;default:o.hasOwnProperty(ne)||at(e,t,ne,null,o,ce)}}for(var te in o){var ne=o[te];if(ce=l[te],o.hasOwnProperty(te)&&(ne!=null||ce!=null))switch(te){case"type":d=ne;break;case"name":f=ne;break;case"checked":ee=ne;break;case"defaultChecked":oe=ne;break;case"value":w=ne;break;case"defaultValue":M=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(s(137,t));break;default:ne!==ce&&at(e,t,te,ne,o,ce)}}Ko(e,w,M,V,ee,oe,d,f);return;case"select":ne=w=M=te=null;for(d in l)if(V=l[d],l.hasOwnProperty(d)&&V!=null)switch(d){case"value":break;case"multiple":ne=V;default:o.hasOwnProperty(d)||at(e,t,d,null,o,V)}for(f in o)if(d=o[f],V=l[f],o.hasOwnProperty(f)&&(d!=null||V!=null))switch(f){case"value":te=d;break;case"defaultValue":M=d;break;case"multiple":w=d;default:d!==V&&at(e,t,f,d,o,V)}t=M,l=w,o=ne,te!=null?ki(e,!!l,te,!1):!!o!=!!l&&(t!=null?ki(e,!!l,t,!0):ki(e,!!l,l?[]:"",!1));return;case"textarea":ne=te=null;for(M in l)if(f=l[M],l.hasOwnProperty(M)&&f!=null&&!o.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:at(e,t,M,null,o,f)}for(w in o)if(f=o[w],d=l[w],o.hasOwnProperty(w)&&(f!=null||d!=null))switch(w){case"value":te=f;break;case"defaultValue":ne=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(s(91));break;default:f!==d&&at(e,t,w,f,o,d)}Ty(e,te,ne);return;case"option":for(var xe in l)if(te=l[xe],l.hasOwnProperty(xe)&&te!=null&&!o.hasOwnProperty(xe))switch(xe){case"selected":e.selected=!1;break;default:at(e,t,xe,null,o,te)}for(V in o)if(te=o[V],ne=l[V],o.hasOwnProperty(V)&&te!==ne&&(te!=null||ne!=null))switch(V){case"selected":e.selected=te&&typeof te!="function"&&typeof te!="symbol";break;default:at(e,t,V,te,o,ne)}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 Te in l)te=l[Te],l.hasOwnProperty(Te)&&te!=null&&!o.hasOwnProperty(Te)&&at(e,t,Te,null,o,te);for(ee in o)if(te=o[ee],ne=l[ee],o.hasOwnProperty(ee)&&te!==ne&&(te!=null||ne!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(s(137,t));break;default:at(e,t,ee,te,o,ne)}return;default:if(Bf(t)){for(var lt in l)te=l[lt],l.hasOwnProperty(lt)&&te!==void 0&&!o.hasOwnProperty(lt)&&_h(e,t,lt,void 0,o,te);for(oe in o)te=o[oe],ne=l[oe],!o.hasOwnProperty(oe)||te===ne||te===void 0&&ne===void 0||_h(e,t,oe,te,o,ne);return}}for(var Q in l)te=l[Q],l.hasOwnProperty(Q)&&te!=null&&!o.hasOwnProperty(Q)&&at(e,t,Q,null,o,te);for(ce in o)te=o[ce],ne=l[ce],!o.hasOwnProperty(ce)||te===ne||te==null&&ne==null||at(e,t,ce,te,o,ne)}function Dv(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function N4(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),o=0;o<l.length;o++){var f=l[o],d=f.transferSize,w=f.initiatorType,M=f.duration;if(d&&M&&Dv(w)){for(w=0,M=f.responseEnd,o+=1;o<l.length;o++){var V=l[o],ee=V.startTime;if(ee>M)break;var oe=V.transferSize,ce=V.initiatorType;oe&&Dv(ce)&&(V=V.responseEnd,w+=oe*(V<M?1:(M-ee)/(V-ee)))}if(--o,t+=8*(d+w)/(f.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Ah=null,Nh=null;function jc(e){return e.nodeType===9?e:e.ownerDocument}function Ov(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 Rv(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function kh(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Th=null;function k4(){var e=window.event;return e&&e.type==="popstate"?e===Th?!1:(Th=e,!0):(Th=null,!1)}var jv=typeof setTimeout=="function"?setTimeout:void 0,T4=typeof clearTimeout=="function"?clearTimeout:void 0,Lv=typeof Promise=="function"?Promise:void 0,C4=typeof queueMicrotask=="function"?queueMicrotask:typeof Lv<"u"?function(e){return Lv.resolve(null).then(e).catch(M4)}:jv;function M4(e){setTimeout(function(){throw e})}function Sl(e){return e==="head"}function Hv(e,t){var l=t,o=0;do{var f=l.nextSibling;if(e.removeChild(l),f&&f.nodeType===8)if(l=f.data,l==="/$"||l==="/&"){if(o===0){e.removeChild(f),io(t);return}o--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")o++;else if(l==="html")Ms(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Ms(l);for(var d=l.firstChild;d;){var w=d.nextSibling,M=d.nodeName;d[ve]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&d.rel.toLowerCase()==="stylesheet"||l.removeChild(d),d=w}}else l==="body"&&Ms(e.ownerDocument.body);l=f}while(l);io(t)}function Bv(e,t){var l=e;e=0;do{var o=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),o&&o.nodeType===8)if(l=o.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=o}while(l)}function Ch(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Ch(l),q(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function z4(e,t,l,o){for(;e.nodeType===1;){var f=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[ve])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=qn(e.nextSibling),e===null)break}return null}function D4(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=qn(e.nextSibling),e===null))return null;return e}function Uv(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=qn(e.nextSibling),e===null))return null;return e}function Mh(e){return e.data==="$?"||e.data==="$~"}function zh(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function O4(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var o=function(){t(),l.removeEventListener("DOMContentLoaded",o)};l.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function qn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Dh=null;function Vv(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return qn(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function $v(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function Yv(e,t,l){switch(t=jc(l),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function Ms(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);q(e)}var Xn=new Map,qv=new Set;function Lc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Qa=L.d;L.d={f:R4,r:j4,D:L4,C:H4,L:B4,m:U4,X:$4,S:V4,M:Y4};function R4(){var e=Qa.f(),t=kc();return e||t}function j4(e){var t=ye(e);t!==null&&t.tag===5&&t.type==="form"?ox(t):Qa.r(e)}var no=typeof document>"u"?null:document;function Xv(e,t,l){var o=no;if(o&&typeof t=="string"&&t){var f=Pt(t);f='link[rel="'+e+'"][href="'+f+'"]',typeof l=="string"&&(f+='[crossorigin="'+l+'"]'),qv.has(f)||(qv.add(f),e={rel:e,crossOrigin:l,href:t},o.querySelector(f)===null&&(t=o.createElement("link"),Zt(t,"link",e),De(t),o.head.appendChild(t)))}}function L4(e){Qa.D(e),Xv("dns-prefetch",e,null)}function H4(e,t){Qa.C(e,t),Xv("preconnect",e,t)}function B4(e,t,l){Qa.L(e,t,l);var o=no;if(o&&e&&t){var f='link[rel="preload"][as="'+Pt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(f+='[imagesrcset="'+Pt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(f+='[imagesizes="'+Pt(l.imageSizes)+'"]')):f+='[href="'+Pt(e)+'"]';var d=f;switch(t){case"style":d=ao(e);break;case"script":d=lo(e)}Xn.has(d)||(e=y({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Xn.set(d,e),o.querySelector(f)!==null||t==="style"&&o.querySelector(zs(d))||t==="script"&&o.querySelector(Ds(d))||(t=o.createElement("link"),Zt(t,"link",e),De(t),o.head.appendChild(t)))}}function U4(e,t){Qa.m(e,t);var l=no;if(l&&e){var o=t&&typeof t.as=="string"?t.as:"script",f='link[rel="modulepreload"][as="'+Pt(o)+'"][href="'+Pt(e)+'"]',d=f;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=lo(e)}if(!Xn.has(d)&&(e=y({rel:"modulepreload",href:e},t),Xn.set(d,e),l.querySelector(f)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ds(d)))return}o=l.createElement("link"),Zt(o,"link",e),De(o),l.head.appendChild(o)}}}function V4(e,t,l){Qa.S(e,t,l);var o=no;if(o&&e){var f=st(o).hoistableStyles,d=ao(e);t=t||"default";var w=f.get(d);if(!w){var M={loading:0,preload:null};if(w=o.querySelector(zs(d)))M.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Xn.get(d))&&Oh(e,l);var V=w=o.createElement("link");De(V),Zt(V,"link",e),V._p=new Promise(function(ee,oe){V.onload=ee,V.onerror=oe}),V.addEventListener("load",function(){M.loading|=1}),V.addEventListener("error",function(){M.loading|=2}),M.loading|=4,Hc(w,t,o)}w={type:"stylesheet",instance:w,count:1,state:M},f.set(d,w)}}}function $4(e,t){Qa.X(e,t);var l=no;if(l&&e){var o=st(l).hoistableScripts,f=lo(e),d=o.get(f);d||(d=l.querySelector(Ds(f)),d||(e=y({src:e,async:!0},t),(t=Xn.get(f))&&Rh(e,t),d=l.createElement("script"),De(d),Zt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(f,d))}}function Y4(e,t){Qa.M(e,t);var l=no;if(l&&e){var o=st(l).hoistableScripts,f=lo(e),d=o.get(f);d||(d=l.querySelector(Ds(f)),d||(e=y({src:e,async:!0,type:"module"},t),(t=Xn.get(f))&&Rh(e,t),d=l.createElement("script"),De(d),Zt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(f,d))}}function Gv(e,t,l,o){var f=(f=ge.current)?Lc(f):null;if(!f)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=ao(l.href),l=st(f).hoistableStyles,o=l.get(t),o||(o={type:"style",instance:null,count:0,state:null},l.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=ao(l.href);var d=st(f).hoistableStyles,w=d.get(e);if(w||(f=f.ownerDocument||f,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,w),(d=f.querySelector(zs(e)))&&!d._p&&(w.instance=d,w.state.loading=5),Xn.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Xn.set(e,l),d||q4(f,e,l,w.state))),t&&o===null)throw Error(s(528,""));return w}if(t&&o!==null)throw Error(s(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=lo(l),l=st(f).hoistableScripts,o=l.get(t),o||(o={type:"script",instance:null,count:0,state:null},l.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function ao(e){return'href="'+Pt(e)+'"'}function zs(e){return'link[rel="stylesheet"]['+e+"]"}function Zv(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function q4(e,t,l,o){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?o.loading=1:(t=e.createElement("link"),o.preload=t,t.addEventListener("load",function(){return o.loading|=1}),t.addEventListener("error",function(){return o.loading|=2}),Zt(t,"link",l),De(t),e.head.appendChild(t))}function lo(e){return'[src="'+Pt(e)+'"]'}function Ds(e){return"script[async]"+e}function Iv(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+Pt(l.href)+'"]');if(o)return t.instance=o,De(o),o;var f=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),De(o),Zt(o,"style",f),Hc(o,l.precedence,e),t.instance=o;case"stylesheet":f=ao(l.href);var d=e.querySelector(zs(f));if(d)return t.state.loading|=4,t.instance=d,De(d),d;o=Zv(l),(f=Xn.get(f))&&Oh(o,f),d=(e.ownerDocument||e).createElement("link"),De(d);var w=d;return w._p=new Promise(function(M,V){w.onload=M,w.onerror=V}),Zt(d,"link",o),t.state.loading|=4,Hc(d,l.precedence,e),t.instance=d;case"script":return d=lo(l.src),(f=e.querySelector(Ds(d)))?(t.instance=f,De(f),f):(o=l,(f=Xn.get(d))&&(o=y({},l),Rh(o,f)),e=e.ownerDocument||e,f=e.createElement("script"),De(f),Zt(f,"link",o),e.head.appendChild(f),t.instance=f);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,Hc(o,l.precedence,e));return t.instance}function Hc(e,t,l){for(var o=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=o.length?o[o.length-1]:null,d=f,w=0;w<o.length;w++){var M=o[w];if(M.dataset.precedence===t)d=M;else if(d!==f)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Oh(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Rh(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Bc=null;function Qv(e,t,l){if(Bc===null){var o=new Map,f=Bc=new Map;f.set(l,o)}else f=Bc,o=f.get(l),o||(o=new Map,f.set(l,o));if(o.has(e))return o;for(o.set(e,null),l=l.getElementsByTagName(e),f=0;f<l.length;f++){var d=l[f];if(!(d[ve]||d[bt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var w=d.getAttribute(t)||"";w=e+w;var M=o.get(w);M?M.push(d):o.set(w,[d])}}return o}function Kv(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function X4(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Fv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function G4(e,t,l,o){if(l.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var f=ao(o.href),d=t.querySelector(zs(f));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Uc.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=d,De(d);return}d=t.ownerDocument||t,o=Zv(o),(f=Xn.get(f))&&Oh(o,f),d=d.createElement("link"),De(d);var w=d;w._p=new Promise(function(M,V){w.onload=M,w.onerror=V}),Zt(d,"link",o),l.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Uc.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var jh=0;function Z4(e,t){return e.stylesheets&&e.count===0&&$c(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var o=setTimeout(function(){if(e.stylesheets&&$c(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&jh===0&&(jh=62500*N4());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$c(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>jh?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(f)}}:null}function Uc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$c(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Vc=null;function $c(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Vc=new Map,t.forEach(I4,e),Vc=null,Uc.call(e))}function I4(e,t){if(!(t.state.loading&4)){var l=Vc.get(e);if(l)var o=l.get(null);else{l=new Map,Vc.set(e,l);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<f.length;d++){var w=f[d];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(l.set(w.dataset.precedence,w),o=w)}o&&l.set(null,o)}f=t.instance,w=f.getAttribute("data-precedence"),d=l.get(w)||o,d===o&&l.set(null,f),l.set(w,f),this.count++,o=Uc.bind(this),f.addEventListener("load",o),f.addEventListener("error",o),d?d.parentNode.insertBefore(f,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),t.state.loading|=4}}var Os={$$typeof:N,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function Q4(e,t,l,o,f,d,w,M,V){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=Ta(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ta(0),this.hiddenUpdates=Ta(null),this.identifierPrefix=o,this.onUncaughtError=f,this.onCaughtError=d,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=V,this.incompleteTransitions=new Map}function Jv(e,t,l,o,f,d,w,M,V,ee,oe,ce){return e=new Q4(e,t,l,w,V,ee,oe,ce,M),t=1,d===!0&&(t|=24),d=An(3,null,null,t),e.current=d,d.stateNode=e,t=pd(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:o,isDehydrated:l,cache:t},xd(d),e}function Pv(e){return e?(e=ji,e):ji}function Wv(e,t,l,o,f,d){f=Pv(f),o.context===null?o.context=f:o.pendingContext=f,o=ul(t),o.payload={element:l},d=d===void 0?null:d,d!==null&&(o.callback=d),l=fl(e,o,t),l!==null&&(yn(l,e,t),fs(l,e,t))}function eb(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Lh(e,t){eb(e,t),(e=e.alternate)&&eb(e,t)}function tb(e){if(e.tag===13||e.tag===31){var t=Zl(e,67108864);t!==null&&yn(t,e,67108864),Lh(e,67108864)}}function nb(e){if(e.tag===13||e.tag===31){var t=Mn();t=Ct(t);var l=Zl(e,t);l!==null&&yn(l,e,t),Lh(e,t)}}var Yc=!0;function K4(e,t,l,o){var f=k.T;k.T=null;var d=L.p;try{L.p=2,Hh(e,t,l,o)}finally{L.p=d,k.T=f}}function F4(e,t,l,o){var f=k.T;k.T=null;var d=L.p;try{L.p=8,Hh(e,t,l,o)}finally{L.p=d,k.T=f}}function Hh(e,t,l,o){if(Yc){var f=Bh(o);if(f===null)Eh(e,t,o,qc,l),lb(e,o);else if(P4(f,e,t,l,o))o.stopPropagation();else if(lb(e,o),t&4&&-1<J4.indexOf(e)){for(;f!==null;){var d=ye(f);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var w=Ye(d.pendingLanes);if(w!==0){var M=d;for(M.pendingLanes|=2,M.entangledLanes|=2;w;){var V=1<<31-dt(w);M.entanglements[1]|=V,w&=~V}ba(d),(Ke&6)===0&&(Ac=gt()+500,ks(0))}}break;case 31:case 13:M=Zl(d,2),M!==null&&yn(M,d,2),kc(),Lh(d,2)}if(d=Bh(o),d===null&&Eh(e,t,o,qc,l),d===f)break;f=d}f!==null&&o.stopPropagation()}else Eh(e,t,o,null,l)}}function Bh(e){return e=Vf(e),Uh(e)}var qc=null;function Uh(e){if(qc=null,e=pe(e),e!==null){var t=c(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=u(t),e!==null)return e;e=null}else if(l===31){if(e=h(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return qc=e,null}function ab(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(sn()){case Bt:return 2;case $t:return 8;case Rt:case Na:return 32;case ea:return 268435456;default:return 32}default:return 32}}var Vh=!1,wl=null,El=null,_l=null,Rs=new Map,js=new Map,Al=[],J4="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 lb(e,t){switch(e){case"focusin":case"focusout":wl=null;break;case"dragenter":case"dragleave":El=null;break;case"mouseover":case"mouseout":_l=null;break;case"pointerover":case"pointerout":Rs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":js.delete(t.pointerId)}}function Ls(e,t,l,o,f,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:l,eventSystemFlags:o,nativeEvent:d,targetContainers:[f]},t!==null&&(t=ye(t),t!==null&&tb(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,f!==null&&t.indexOf(f)===-1&&t.push(f),e)}function P4(e,t,l,o,f){switch(t){case"focusin":return wl=Ls(wl,e,t,l,o,f),!0;case"dragenter":return El=Ls(El,e,t,l,o,f),!0;case"mouseover":return _l=Ls(_l,e,t,l,o,f),!0;case"pointerover":var d=f.pointerId;return Rs.set(d,Ls(Rs.get(d)||null,e,t,l,o,f)),!0;case"gotpointercapture":return d=f.pointerId,js.set(d,Ls(js.get(d)||null,e,t,l,o,f)),!0}return!1}function ib(e){var t=pe(e.target);if(t!==null){var l=c(t);if(l!==null){if(t=l.tag,t===13){if(t=u(l),t!==null){e.blockedOn=t,Vl(e.priority,function(){nb(l)});return}}else if(t===31){if(t=h(l),t!==null){e.blockedOn=t,Vl(e.priority,function(){nb(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Xc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Bh(e.nativeEvent);if(l===null){l=e.nativeEvent;var o=new l.constructor(l.type,l);Uf=o,l.target.dispatchEvent(o),Uf=null}else return t=ye(l),t!==null&&tb(t),e.blockedOn=l,!1;t.shift()}return!0}function ob(e,t,l){Xc(e)&&l.delete(t)}function W4(){Vh=!1,wl!==null&&Xc(wl)&&(wl=null),El!==null&&Xc(El)&&(El=null),_l!==null&&Xc(_l)&&(_l=null),Rs.forEach(ob),js.forEach(ob)}function Gc(e,t){e.blockedOn===t&&(e.blockedOn=null,Vh||(Vh=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,W4)))}var Zc=null;function sb(e){Zc!==e&&(Zc=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Zc===e&&(Zc=null);for(var t=0;t<e.length;t+=3){var l=e[t],o=e[t+1],f=e[t+2];if(typeof o!="function"){if(Uh(o||l)===null)continue;break}var d=ye(l);d!==null&&(e.splice(t,3),t-=3,Bd(d,{pending:!0,data:f,method:l.method,action:o},o,f))}}))}function io(e){function t(V){return Gc(V,e)}wl!==null&&Gc(wl,e),El!==null&&Gc(El,e),_l!==null&&Gc(_l,e),Rs.forEach(t),js.forEach(t);for(var l=0;l<Al.length;l++){var o=Al[l];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Al.length&&(l=Al[0],l.blockedOn===null);)ib(l),l.blockedOn===null&&Al.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(o=0;o<l.length;o+=3){var f=l[o],d=l[o+1],w=f[ot]||null;if(typeof d=="function")w||sb(l);else if(w){var M=null;if(d&&d.hasAttribute("formAction")){if(f=d,w=d[ot]||null)M=w.formAction;else if(Uh(f)!==null)continue}else M=w.action;typeof M=="function"?l[o+1]=M:(l.splice(o,3),o-=3),sb(l)}}}function rb(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(w){return f=w})},focusReset:"manual",scroll:"manual"})}function t(){f!==null&&(f(),f=null),o||setTimeout(l,20)}function l(){if(!o&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),f!==null&&(f(),f=null)}}}function $h(e){this._internalRoot=e}Ic.prototype.render=$h.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var l=t.current,o=Mn();Wv(l,o,e,t,null,null)},Ic.prototype.unmount=$h.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Wv(e.current,2,null,e,null,null),kc(),t[jn]=null}};function Ic(e){this._internalRoot=e}Ic.prototype.unstable_scheduleHydration=function(e){if(e){var t=Rn();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Al.length&&t!==0&&t<Al[l].priority;l++);Al.splice(l,0,e),l===0&&ib(e)}};var cb=a.version;if(cb!=="19.2.0")throw Error(s(527,cb,"19.2.0"));L.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=p(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var eM={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qc.isDisabled&&Qc.supportsFiber)try{rn=Qc.inject(eM),vt=Qc}catch{}}return so.createRoot=function(e,t){if(!r(e))throw Error(s(299));var l=!1,o="",f=mx,d=yx,w=xx;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(f=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(w=t.onRecoverableError)),t=Jv(e,1,!1,null,null,l,o,null,f,d,w,rb),e[jn]=t.current,wh(e),new $h(t)},so.hydrateRoot=function(e,t,l){if(!r(e))throw Error(s(299));var o=!1,f="",d=mx,w=yx,M=xx,V=null;return l!=null&&(l.unstable_strictMode===!0&&(o=!0),l.identifierPrefix!==void 0&&(f=l.identifierPrefix),l.onUncaughtError!==void 0&&(d=l.onUncaughtError),l.onCaughtError!==void 0&&(w=l.onCaughtError),l.onRecoverableError!==void 0&&(M=l.onRecoverableError),l.formState!==void 0&&(V=l.formState)),t=Jv(e,1,!0,t,l??null,o,f,V,d,w,M,rb),t.context=Pv(null),l=t.current,o=Mn(),o=Ct(o),f=ul(o),f.callback=null,fl(l,f,o),l=o,t.current.lanes=l,Dn(t,l),ba(t),e[jn]=t.current,wh(e),new Ic(t)},so.version="19.2.0",so}var Ph;function gb(){if(Ph)return Fc.exports;Ph=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),Fc.exports=pb(),Fc.exports}var mb=gb(),yb=Object.defineProperty,xb=(n,a,i)=>a in n?yb(n,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[a]=i,Hs=(n,a,i)=>xb(n,typeof a!="symbol"?a+"":a,i);const vb={stringify:n=>n?"true":"false",parse:n=>/^[ty1-9]/i.test(n)},bb={stringify:n=>n.name,parse:(n,a,i)=>{const s=(()=>{if(typeof window<"u"&&n in window)return window[n];if(typeof global<"u"&&n in global)return global[n]})();return typeof s=="function"?s.bind(i):void 0}},Sb={stringify:n=>JSON.stringify(n),parse:n=>JSON.parse(n)};function wb(n){return n.replace(/([a-z0-9])([A-Z])/g,(a,i,s)=>`${i}-${s.toLowerCase()}`)}function Wh(n){return n.replace(/[-:]([a-z])/g,(a,i)=>`${i.toUpperCase()}`)}const Eb={stringify:n=>n.name,parse:(n,a,i)=>{const s=(()=>{const r=Wh(a);if(typeof i<"u"&&r in i.container)return i.container[r]})();return typeof s=="function"?s.bind(i):void 0}},_b={stringify:n=>`${n}`,parse:n=>parseFloat(n)},Ab={stringify:n=>n,parse:n=>n},eu={string:Ab,number:_b,boolean:vb,function:bb,method:Eb,json:Sb},ro=Symbol.for("r2wc.render"),Bs=Symbol.for("r2wc.connected"),kl=Symbol.for("r2wc.context"),xn=Symbol.for("r2wc.props");function Nb(n,a,i){var s,r,c;a.props||(a.props=n.propTypes?Object.keys(n.propTypes):[]),a.events||(a.events=[]);const u=Array.isArray(a.props)?a.props.slice():Object.keys(a.props),h=Array.isArray(a.events)?a.events.slice():Object.keys(a.events),g={},p={},x={},y={};for(const S of u){g[S]=Array.isArray(a.props)?"string":a.props[S];const b=wb(S);x[S]=b,y[b]=S}for(const S of h)p[S]=Array.isArray(a.events)?{}:a.events[S];class v extends HTMLElement{constructor(){super(),Hs(this,c,!0),Hs(this,r),Hs(this,s,{}),Hs(this,"container"),a.shadow?this.container=this.attachShadow({mode:a.shadow}):this.container=this,this[xn].container=this.container;for(const b of u){const E=x[b],_=this.getAttribute(E),T=g[b],z=T?eu[T]:null;if(T==="method"){const N=Wh(E);Object.defineProperty(this[xn].container,N,{enumerable:!0,configurable:!0,get(){return this[xn][N]},set(C){this[xn][N]=C,this[ro]()}}),this[xn][b]=z.parse(_,E,this)}z!=null&&z.parse&&_&&(this[xn][b]=z.parse(_,E,this))}for(const b of h)this[xn][b]=E=>{const _=b.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(_,{detail:E,...p[b]}))}}static get observedAttributes(){return Object.keys(y)}connectedCallback(){this[Bs]=!0,this[ro]()}disconnectedCallback(){this[Bs]=!1,this[kl]&&i.unmount(this[kl]),delete this[kl]}attributeChangedCallback(b,E,_){const T=y[b],z=g[T],N=z?eu[z]:null;T in g&&N!=null&&N.parse&&_&&(this[xn][T]=N.parse(_,b,this),this[ro]())}[(c=Bs,r=kl,s=xn,ro)](){this[Bs]&&(this[kl]?i.update(this[kl],this[xn]):this[kl]=i.mount(this.container,n,this[xn]))}}for(const S of u){const b=x[S],E=g[S];Object.defineProperty(v.prototype,S,{enumerable:!0,configurable:!0,get(){return this[xn][S]},set(_){this[xn][S]=_;const T=E?eu[E]:null;if(T!=null&&T.stringify){const z=T.stringify(_,b,this);this.getAttribute(b)!==z&&this.setAttribute(b,z)}else this[ro]()}})}return v}function kb(n,a,i){const s=mb.createRoot(n),r=Ka.createElement(a,i);return s.render(r),{root:s,ReactComponent:a}}function Tb({root:n,ReactComponent:a},i){const s=Ka.createElement(a,i);n.render(s)}function Cb({root:n}){n.unmount()}function ep(n,a={}){return Nb(n,a,{mount:kb,update:Tb,unmount:Cb})}var tu={exports:{}},co={};/**
|
|
40
|
+
`+o.stack}}var Je=Object.prototype.hasOwnProperty,et=n.unstable_scheduleCallback,on=n.unstable_cancelCallback,wn=n.unstable_shouldYield,_t=n.unstable_requestPaint,gt=n.unstable_now,sn=n.unstable_getCurrentPriorityLevel,Bt=n.unstable_ImmediatePriority,$t=n.unstable_UserBlockingPriority,Rt=n.unstable_NormalPriority,Na=n.unstable_LowPriority,ea=n.unstable_IdlePriority,ta=n.log,pa=n.unstable_setDisableYieldValue,rn=null,vt=null;function mt(e){if(typeof ta=="function"&&pa(e),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(rn,e)}catch{}}var dt=Math.clz32?Math.clz32:je,ka=Math.log,ga=Math.LN2;function je(e){return e>>>=0,e===0?32:31-(ka(e)/ga|0)|0}var tt=256,yt=262144,jt=4194304;function Ye(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function En(e,t,l){var o=e.pendingLanes;if(o===0)return 0;var f=0,d=e.suspendedLanes,w=e.pingedLanes;e=e.warmLanes;var M=o&134217727;return M!==0?(o=M&~d,o!==0?f=Ye(o):(w&=M,w!==0?f=Ye(w):l||(l=M&~e,l!==0&&(f=Ye(l))))):(M=o&~d,M!==0?f=Ye(M):w!==0?f=Ye(w):l||(l=o&~e,l!==0&&(f=Ye(l)))),f===0?0:t!==0&&t!==f&&(t&d)===0&&(d=f&-f,l=t&-t,d>=l||d===32&&(l&4194048)!==0)?t:f}function na(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ht(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ft(){var e=jt;return jt<<=1,(jt&62914560)===0&&(jt=4194304),e}function Ta(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Dn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ma(e,t,l,o,f,d){var w=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var M=e.entanglements,V=e.expirationTimes,ee=e.hiddenUpdates;for(l=w&~l;0<l;){var oe=31-dt(l),ce=1<<oe;M[oe]=0,V[oe]=-1;var te=ee[oe];if(te!==null)for(ee[oe]=null,oe=0;oe<te.length;oe++){var ne=te[oe];ne!==null&&(ne.lane&=-536870913)}l&=~ce}o!==0&&Ca(e,o,0),d!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=d&~(w&~t))}function Ca(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-dt(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|l&261930}function Ma(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var o=31-dt(l),f=1<<o;f&t|e[o]&t&&(e[o]|=t),l&=~f}}function On(e,t){var l=t&-t;return l=(l&42)!==0?1:Ct(l),(l&(e.suspendedLanes|t))!==0?0:l}function Ct(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 Yt(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Rn(){var e=L.p;return e!==0?e:(e=window.event,e===void 0?32:lb(e.type))}function Vl(e,t){var l=L.p;try{return L.p=e,t()}finally{L.p=l}}var cn=Math.random().toString(36).slice(2),bt="__reactFiber$"+cn,ot="__reactProps$"+cn,jn="__reactContainer$"+cn,za="__reactEvents$"+cn,$l="__reactListeners$"+cn,bi="__reactHandles$"+cn,Si="__reactResources$"+cn,ve="__reactMarker$"+cn;function q(e){delete e[bt],delete e[ot],delete e[za],delete e[$l],delete e[bi]}function pe(e){var t=e[bt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[jn]||l[bt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Yv(e);e!==null;){if(l=e[bt])return l;e=Yv(e)}return t}e=l,l=e.parentNode}return null}function ye(e){if(e=e[bt]||e[jn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Xe(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function st(e){var t=e[Si];return t||(t=e[Si]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function De(e){e[ve]=!0}var Lt=new Set,un={};function Jt(e,t){Ln(e,t),Ln(e+"Capture",t)}function Ln(e,t){for(un[e]=t,e=0;e<t.length;e++)Lt.add(t[e])}var At=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]*$"),al={},Yl={};function jf(e){return Je.call(Yl,e)?!0:Je.call(al,e)?!1:At.test(e)?Yl[e]=!0:(al[e]=!0,!1)}function wi(e,t,l){if(jf(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var o=t.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function Ei(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function aa(e,t,l,o){if(o===null)e.removeAttribute(l);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+o)}}function fn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Hr(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Lf(e,t,l){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var f=o.get,d=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return f.call(this)},set:function(w){l=""+w,d.call(this,w)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(w){l=""+w},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _i(e){if(!e._valueTracker){var t=Hr(e)?"checked":"value";e._valueTracker=Lf(e,t,""+e[t])}}function Br(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),o="";return e&&(o=Hr(e)?e.checked?"true":"false":e.value),e=o,e!==l?(t.setValue(e),!0):!1}function Ai(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 Hf=/[\n"\\]/g;function Pt(e){return e.replace(Hf,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ko(e,t,l,o,f,d,w,M){e.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.type=w:e.removeAttribute("type"),t!=null?w==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+fn(t)):e.value!==""+fn(t)&&(e.value=""+fn(t)):w!=="submit"&&w!=="reset"||e.removeAttribute("value"),t!=null?Ni(e,w,fn(t)):l!=null?Ni(e,w,fn(l)):o!=null&&e.removeAttribute("value"),f==null&&d!=null&&(e.defaultChecked=!!d),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?e.name=""+fn(M):e.removeAttribute("name")}function Ur(e,t,l,o,f,d,w,M){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||l!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){_i(e);return}l=l!=null?""+fn(l):"",t=t!=null?""+fn(t):l,M||t===e.value||(e.value=t),e.defaultValue=t}o=o??f,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=M?e.checked:!!o,e.defaultChecked=!!o,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(e.name=w),_i(e)}function Ni(e,t,l){t==="number"&&Ai(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function ki(e,t,l,o){if(e=e.options,t){t={};for(var f=0;f<l.length;f++)t["$"+l[f]]=!0;for(l=0;l<e.length;l++)f=t.hasOwnProperty("$"+e[l].value),e[l].selected!==f&&(e[l].selected=f),f&&o&&(e[l].defaultSelected=!0)}else{for(l=""+fn(l),t=null,f=0;f<e.length;f++){if(e[f].value===l){e[f].selected=!0,o&&(e[f].defaultSelected=!0);return}t!==null||e[f].disabled||(t=e[f])}t!==null&&(t.selected=!0)}}function Cy(e,t,l){if(t!=null&&(t=""+fn(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+fn(l):""}function My(e,t,l,o){if(t==null){if(o!=null){if(l!=null)throw Error(s(92));if(I(o)){if(1<o.length)throw Error(s(93));o=o[0]}l=o}l==null&&(l=""),t=l}l=fn(t),e.defaultValue=l,o=e.textContent,o===l&&o!==""&&o!==null&&(e.value=o),_i(e)}function Ti(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var PT=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 zy(e,t,l){var o=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,l):typeof l!="number"||l===0||PT.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Dy(e,t,l){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,l!=null){for(var o in l)!l.hasOwnProperty(o)||t!=null&&t.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var f in t)o=t[f],t.hasOwnProperty(f)&&l[f]!==o&&zy(e,f,o)}else for(var d in t)t.hasOwnProperty(d)&&zy(e,d,t[d])}function Bf(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 WT=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"]]),eC=/^[\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 Vr(e){return eC.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Da(){}var Uf=null;function Vf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ci=null,Mi=null;function Oy(e){var t=ye(e);if(t&&(e=t.stateNode)){var l=e[ot]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ko(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Pt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var o=l[t];if(o!==e&&o.form===e.form){var f=o[ot]||null;if(!f)throw Error(s(90));Ko(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(t=0;t<l.length;t++)o=l[t],o.form===e.form&&Br(o)}break e;case"textarea":Cy(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&ki(e,!!l.multiple,t,!1)}}}var $f=!1;function Ry(e,t,l){if($f)return e(t,l);$f=!0;try{var o=e(t);return o}finally{if($f=!1,(Ci!==null||Mi!==null)&&(kc(),Ci&&(t=Ci,e=Mi,Mi=Ci=null,Oy(t),e)))for(t=0;t<e.length;t++)Oy(e[t])}}function Fo(e,t){var l=e.stateNode;if(l===null)return null;var o=l[ot]||null;if(o===null)return null;l=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(s(231,t,typeof l));return l}var Oa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yf=!1;if(Oa)try{var Jo={};Object.defineProperty(Jo,"passive",{get:function(){Yf=!0}}),window.addEventListener("test",Jo,Jo),window.removeEventListener("test",Jo,Jo)}catch{Yf=!1}var ll=null,qf=null,$r=null;function jy(){if($r)return $r;var e,t=qf,l=t.length,o,f="value"in ll?ll.value:ll.textContent,d=f.length;for(e=0;e<l&&t[e]===f[e];e++);var w=l-e;for(o=1;o<=w&&t[l-o]===f[d-o];o++);return $r=f.slice(e,1<o?1-o:void 0)}function Yr(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function qr(){return!0}function Ly(){return!1}function dn(e){function t(l,o,f,d,w){this._reactName=l,this._targetInst=f,this.type=o,this.nativeEvent=d,this.target=w,this.currentTarget=null;for(var M in e)e.hasOwnProperty(M)&&(l=e[M],this[M]=l?l(d):d[M]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?qr:Ly,this.isPropagationStopped=Ly,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=qr)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=qr)},persist:function(){},isPersistent:qr}),t}var ql={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xr=dn(ql),Po=y({},ql,{view:0,detail:0}),tC=dn(Po),Xf,Gf,Wo,Gr=y({},Po,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:If,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!==Wo&&(Wo&&e.type==="mousemove"?(Xf=e.screenX-Wo.screenX,Gf=e.screenY-Wo.screenY):Gf=Xf=0,Wo=e),Xf)},movementY:function(e){return"movementY"in e?e.movementY:Gf}}),Hy=dn(Gr),nC=y({},Gr,{dataTransfer:0}),aC=dn(nC),lC=y({},Po,{relatedTarget:0}),Zf=dn(lC),iC=y({},ql,{animationName:0,elapsedTime:0,pseudoElement:0}),oC=dn(iC),sC=y({},ql,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),rC=dn(sC),cC=y({},ql,{data:0}),By=dn(cC),uC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fC={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"},dC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hC(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=dC[e])?!!t[e]:!1}function If(){return hC}var pC=y({},Po,{key:function(e){if(e.key){var t=uC[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Yr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?fC[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:If,charCode:function(e){return e.type==="keypress"?Yr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Yr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),gC=dn(pC),mC=y({},Gr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Uy=dn(mC),yC=y({},Po,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:If}),xC=dn(yC),vC=y({},ql,{propertyName:0,elapsedTime:0,pseudoElement:0}),bC=dn(vC),SC=y({},Gr,{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}),wC=dn(SC),EC=y({},ql,{newState:0,oldState:0}),_C=dn(EC),AC=[9,13,27,32],Qf=Oa&&"CompositionEvent"in window,es=null;Oa&&"documentMode"in document&&(es=document.documentMode);var NC=Oa&&"TextEvent"in window&&!es,Vy=Oa&&(!Qf||es&&8<es&&11>=es),$y=" ",Yy=!1;function qy(e,t){switch(e){case"keyup":return AC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xy(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zi=!1;function kC(e,t){switch(e){case"compositionend":return Xy(t);case"keypress":return t.which!==32?null:(Yy=!0,$y);case"textInput":return e=t.data,e===$y&&Yy?null:e;default:return null}}function TC(e,t){if(zi)return e==="compositionend"||!Qf&&qy(e,t)?(e=jy(),$r=qf=ll=null,zi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Vy&&t.locale!=="ko"?null:t.data;default:return null}}var CC={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 Gy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!CC[e.type]:t==="textarea"}function Zy(e,t,l,o){Ci?Mi?Mi.push(o):Mi=[o]:Ci=o,t=Rc(t,"onChange"),0<t.length&&(l=new Xr("onChange","change",null,l,o),e.push({event:l,listeners:t}))}var ts=null,ns=null;function MC(e){Tv(e,0)}function Zr(e){var t=Xe(e);if(Br(t))return e}function Iy(e,t){if(e==="change")return t}var Qy=!1;if(Oa){var Kf;if(Oa){var Ff="oninput"in document;if(!Ff){var Ky=document.createElement("div");Ky.setAttribute("oninput","return;"),Ff=typeof Ky.oninput=="function"}Kf=Ff}else Kf=!1;Qy=Kf&&(!document.documentMode||9<document.documentMode)}function Fy(){ts&&(ts.detachEvent("onpropertychange",Jy),ns=ts=null)}function Jy(e){if(e.propertyName==="value"&&Zr(ns)){var t=[];Zy(t,ns,e,Vf(e)),Ry(MC,t)}}function zC(e,t,l){e==="focusin"?(Fy(),ts=t,ns=l,ts.attachEvent("onpropertychange",Jy)):e==="focusout"&&Fy()}function DC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Zr(ns)}function OC(e,t){if(e==="click")return Zr(t)}function RC(e,t){if(e==="input"||e==="change")return Zr(t)}function jC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _n=typeof Object.is=="function"?Object.is:jC;function as(e,t){if(_n(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),o=Object.keys(t);if(l.length!==o.length)return!1;for(o=0;o<l.length;o++){var f=l[o];if(!Je.call(t,f)||!_n(e[f],t[f]))return!1}return!0}function Py(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wy(e,t){var l=Py(e);e=0;for(var o;l;){if(l.nodeType===3){if(o=e+l.textContent.length,e<=t&&o>=t)return{node:l,offset:t-e};e=o}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Py(l)}}function e1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?e1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function t1(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ai(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Ai(e.document)}return t}function Jf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var LC=Oa&&"documentMode"in document&&11>=document.documentMode,Di=null,Pf=null,ls=null,Wf=!1;function n1(e,t,l){var o=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Wf||Di==null||Di!==Ai(o)||(o=Di,"selectionStart"in o&&Jf(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),ls&&as(ls,o)||(ls=o,o=Rc(Pf,"onSelect"),0<o.length&&(t=new Xr("onSelect","select",null,t,l),e.push({event:t,listeners:o}),t.target=Di)))}function Xl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Oi={animationend:Xl("Animation","AnimationEnd"),animationiteration:Xl("Animation","AnimationIteration"),animationstart:Xl("Animation","AnimationStart"),transitionrun:Xl("Transition","TransitionRun"),transitionstart:Xl("Transition","TransitionStart"),transitioncancel:Xl("Transition","TransitionCancel"),transitionend:Xl("Transition","TransitionEnd")},ed={},a1={};Oa&&(a1=document.createElement("div").style,"AnimationEvent"in window||(delete Oi.animationend.animation,delete Oi.animationiteration.animation,delete Oi.animationstart.animation),"TransitionEvent"in window||delete Oi.transitionend.transition);function Gl(e){if(ed[e])return ed[e];if(!Oi[e])return e;var t=Oi[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in a1)return ed[e]=t[l];return e}var l1=Gl("animationend"),i1=Gl("animationiteration"),o1=Gl("animationstart"),HC=Gl("transitionrun"),BC=Gl("transitionstart"),UC=Gl("transitioncancel"),s1=Gl("transitionend"),r1=new Map,td="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(" ");td.push("scrollEnd");function la(e,t){r1.set(e,t),Jt(t,[e])}var Ir=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Hn=[],Ri=0,nd=0;function Qr(){for(var e=Ri,t=nd=Ri=0;t<e;){var l=Hn[t];Hn[t++]=null;var o=Hn[t];Hn[t++]=null;var f=Hn[t];Hn[t++]=null;var d=Hn[t];if(Hn[t++]=null,o!==null&&f!==null){var w=o.pending;w===null?f.next=f:(f.next=w.next,w.next=f),o.pending=f}d!==0&&c1(l,f,d)}}function Kr(e,t,l,o){Hn[Ri++]=e,Hn[Ri++]=t,Hn[Ri++]=l,Hn[Ri++]=o,nd|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function ad(e,t,l,o){return Kr(e,t,l,o),Fr(e)}function Zl(e,t){return Kr(e,null,null,t),Fr(e)}function c1(e,t,l){e.lanes|=l;var o=e.alternate;o!==null&&(o.lanes|=l);for(var f=!1,d=e.return;d!==null;)d.childLanes|=l,o=d.alternate,o!==null&&(o.childLanes|=l),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(f=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,f&&t!==null&&(f=31-dt(l),e=d.hiddenUpdates,o=e[f],o===null?e[f]=[t]:o.push(t),t.lane=l|536870912),d):null}function Fr(e){if(50<Ns)throw Ns=0,dh=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ji={};function VC(e,t,l,o){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function An(e,t,l,o){return new VC(e,t,l,o)}function ld(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ra(e,t){var l=e.alternate;return l===null?(l=An(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function u1(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Jr(e,t,l,o,f,d){var w=0;if(o=e,typeof e=="function")ld(e)&&(w=1);else if(typeof e=="string")w=G4(e,l,P.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case J:return e=An(31,l,t,f),e.elementType=J,e.lanes=d,e;case E:return Il(l.children,f,d,t);case _:w=8,f|=24;break;case T:return e=An(12,l,t,f|2),e.elementType=T,e.lanes=d,e;case D:return e=An(13,l,t,f),e.elementType=D,e.lanes=d,e;case R:return e=An(19,l,t,f),e.elementType=R,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case N:w=10;break e;case z:w=9;break e;case C:w=11;break e;case j:w=14;break e;case K:w=16,o=null;break e}w=29,l=Error(s(130,e===null?"null":typeof e,"")),o=null}return t=An(w,l,t,f),t.elementType=e,t.type=o,t.lanes=d,t}function Il(e,t,l,o){return e=An(7,e,o,t),e.lanes=l,e}function id(e,t,l){return e=An(6,e,null,t),e.lanes=l,e}function f1(e){var t=An(18,null,null,0);return t.stateNode=e,t}function od(e,t,l){return t=An(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var d1=new WeakMap;function Bn(e,t){if(typeof e=="object"&&e!==null){var l=d1.get(e);return l!==void 0?l:(t={value:e,source:t,stack:de(t)},d1.set(e,t),t)}return{value:e,source:t,stack:de(t)}}var Li=[],Hi=0,Pr=null,is=0,Un=[],Vn=0,il=null,ya=1,xa="";function ja(e,t){Li[Hi++]=is,Li[Hi++]=Pr,Pr=e,is=t}function h1(e,t,l){Un[Vn++]=ya,Un[Vn++]=xa,Un[Vn++]=il,il=e;var o=ya;e=xa;var f=32-dt(o)-1;o&=~(1<<f),l+=1;var d=32-dt(t)+f;if(30<d){var w=f-f%5;d=(o&(1<<w)-1).toString(32),o>>=w,f-=w,ya=1<<32-dt(t)+f|l<<f|o,xa=d+e}else ya=1<<d|l<<f|o,xa=e}function sd(e){e.return!==null&&(ja(e,1),h1(e,1,0))}function rd(e){for(;e===Pr;)Pr=Li[--Hi],Li[Hi]=null,is=Li[--Hi],Li[Hi]=null;for(;e===il;)il=Un[--Vn],Un[Vn]=null,xa=Un[--Vn],Un[Vn]=null,ya=Un[--Vn],Un[Vn]=null}function p1(e,t){Un[Vn++]=ya,Un[Vn++]=xa,Un[Vn++]=il,ya=t.id,xa=t.overflow,il=e}var qt=null,rt=null,qe=!1,ol=null,$n=!1,cd=Error(s(519));function sl(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw os(Bn(t,e)),cd}function g1(e){var t=e.stateNode,l=e.type,o=e.memoizedProps;switch(t[bt]=e,t[ot]=o,l){case"dialog":Be("cancel",t),Be("close",t);break;case"iframe":case"object":case"embed":Be("load",t);break;case"video":case"audio":for(l=0;l<Ts.length;l++)Be(Ts[l],t);break;case"source":Be("error",t);break;case"img":case"image":case"link":Be("error",t),Be("load",t);break;case"details":Be("toggle",t);break;case"input":Be("invalid",t),Ur(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Be("invalid",t);break;case"textarea":Be("invalid",t),My(t,o.value,o.defaultValue,o.children)}l=o.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||o.suppressHydrationWarning===!0||Dv(t.textContent,l)?(o.popover!=null&&(Be("beforetoggle",t),Be("toggle",t)),o.onScroll!=null&&Be("scroll",t),o.onScrollEnd!=null&&Be("scrollend",t),o.onClick!=null&&(t.onclick=Da),t=!0):t=!1,t||sl(e,!0)}function m1(e){for(qt=e.return;qt;)switch(qt.tag){case 5:case 31:case 13:$n=!1;return;case 27:case 3:$n=!0;return;default:qt=qt.return}}function Bi(e){if(e!==qt)return!1;if(!qe)return m1(e),qe=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||kh(e.type,e.memoizedProps)),l=!l),l&&rt&&sl(e),m1(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));rt=$v(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));rt=$v(e)}else t===27?(t=rt,Sl(e.type)?(e=Dh,Dh=null,rt=e):rt=t):rt=qt?qn(e.stateNode.nextSibling):null;return!0}function Ql(){rt=qt=null,qe=!1}function ud(){var e=ol;return e!==null&&(mn===null?mn=e:mn.push.apply(mn,e),ol=null),e}function os(e){ol===null?ol=[e]:ol.push(e)}var fd=A(null),Kl=null,La=null;function rl(e,t,l){G(fd,t._currentValue),t._currentValue=l}function Ha(e){e._currentValue=fd.current,O(fd)}function dd(e,t,l){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===l)break;e=e.return}}function hd(e,t,l,o){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var d=f.dependencies;if(d!==null){var w=f.child;d=d.firstContext;e:for(;d!==null;){var M=d;d=f;for(var V=0;V<t.length;V++)if(M.context===t[V]){d.lanes|=l,M=d.alternate,M!==null&&(M.lanes|=l),dd(d.return,l,e),o||(w=null);break e}d=M.next}}else if(f.tag===18){if(w=f.return,w===null)throw Error(s(341));w.lanes|=l,d=w.alternate,d!==null&&(d.lanes|=l),dd(w,l,e),w=null}else w=f.child;if(w!==null)w.return=f;else for(w=f;w!==null;){if(w===e){w=null;break}if(f=w.sibling,f!==null){f.return=w.return,w=f;break}w=w.return}f=w}}function Ui(e,t,l,o){e=null;for(var f=t,d=!1;f!==null;){if(!d){if((f.flags&524288)!==0)d=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var w=f.alternate;if(w===null)throw Error(s(387));if(w=w.memoizedProps,w!==null){var M=f.type;_n(f.pendingProps.value,w.value)||(e!==null?e.push(M):e=[M])}}else if(f===he.current){if(w=f.alternate,w===null)throw Error(s(387));w.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Os):e=[Os])}f=f.return}e!==null&&hd(t,e,l,o),t.flags|=262144}function Wr(e){for(e=e.firstContext;e!==null;){if(!_n(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Fl(e){Kl=e,La=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Xt(e){return y1(Kl,e)}function ec(e,t){return Kl===null&&Fl(e),y1(e,t)}function y1(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},La===null){if(e===null)throw Error(s(308));La=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else La=La.next=t;return l}var $C=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,o){e.push(o)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},YC=n.unstable_scheduleCallback,qC=n.unstable_NormalPriority,Mt={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function pd(){return{controller:new $C,data:new Map,refCount:0}}function ss(e){e.refCount--,e.refCount===0&&YC(qC,function(){e.controller.abort()})}var rs=null,gd=0,Vi=0,$i=null;function XC(e,t){if(rs===null){var l=rs=[];gd=0,Vi=xh(),$i={status:"pending",value:void 0,then:function(o){l.push(o)}}}return gd++,t.then(x1,x1),t}function x1(){if(--gd===0&&rs!==null){$i!==null&&($i.status="fulfilled");var e=rs;rs=null,Vi=0,$i=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function GC(e,t){var l=[],o={status:"pending",value:null,reason:null,then:function(f){l.push(f)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var f=0;f<l.length;f++)(0,l[f])(t)},function(f){for(o.status="rejected",o.reason=f,f=0;f<l.length;f++)(0,l[f])(void 0)}),o}var v1=k.S;k.S=function(e,t){nv=gt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&XC(e,t),v1!==null&&v1(e,t)};var Jl=A(null);function md(){var e=Jl.current;return e!==null?e:it.pooledCache}function tc(e,t){t===null?G(Jl,Jl.current):G(Jl,t.pool)}function b1(){var e=md();return e===null?null:{parent:Mt._currentValue,pool:e}}var Yi=Error(s(460)),yd=Error(s(474)),nc=Error(s(542)),ac={then:function(){}};function S1(e){return e=e.status,e==="fulfilled"||e==="rejected"}function w1(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Da,Da),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,_1(e),e;default:if(typeof t.status=="string")t.then(Da,Da);else{if(e=it,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var f=t;f.status="fulfilled",f.value=o}},function(o){if(t.status==="pending"){var f=t;f.status="rejected",f.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,_1(e),e}throw Wl=t,Yi}}function Pl(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Wl=l,Yi):l}}var Wl=null;function E1(){if(Wl===null)throw Error(s(459));var e=Wl;return Wl=null,e}function _1(e){if(e===Yi||e===nc)throw Error(s(483))}var qi=null,cs=0;function lc(e){var t=cs;return cs+=1,qi===null&&(qi=[]),w1(qi,e,t)}function us(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ic(e,t){throw t.$$typeof===v?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function A1(e){function t(Q,X){if(e){var W=Q.deletions;W===null?(Q.deletions=[X],Q.flags|=16):W.push(X)}}function l(Q,X){if(!e)return null;for(;X!==null;)t(Q,X),X=X.sibling;return null}function o(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 f(Q,X){return Q=Ra(Q,X),Q.index=0,Q.sibling=null,Q}function d(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 w(Q){return e&&Q.alternate===null&&(Q.flags|=67108866),Q}function M(Q,X,W,re){return X===null||X.tag!==6?(X=id(W,Q.mode,re),X.return=Q,X):(X=f(X,W),X.return=Q,X)}function V(Q,X,W,re){var Ae=W.type;return Ae===E?oe(Q,X,W.props.children,re,W.key):X!==null&&(X.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===K&&Pl(Ae)===X.type)?(X=f(X,W.props),us(X,W),X.return=Q,X):(X=Jr(W.type,W.key,W.props,null,Q.mode,re),us(X,W),X.return=Q,X)}function ee(Q,X,W,re){return X===null||X.tag!==4||X.stateNode.containerInfo!==W.containerInfo||X.stateNode.implementation!==W.implementation?(X=od(W,Q.mode,re),X.return=Q,X):(X=f(X,W.children||[]),X.return=Q,X)}function oe(Q,X,W,re,Ae){return X===null||X.tag!==7?(X=Il(W,Q.mode,re,Ae),X.return=Q,X):(X=f(X,W),X.return=Q,X)}function ce(Q,X,W){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=id(""+X,Q.mode,W),X.return=Q,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case S:return W=Jr(X.type,X.key,X.props,null,Q.mode,W),us(W,X),W.return=Q,W;case b:return X=od(X,Q.mode,W),X.return=Q,X;case K:return X=Pl(X),ce(Q,X,W)}if(I(X)||F(X))return X=Il(X,Q.mode,W,null),X.return=Q,X;if(typeof X.then=="function")return ce(Q,lc(X),W);if(X.$$typeof===N)return ce(Q,ec(Q,X),W);ic(Q,X)}return null}function te(Q,X,W,re){var Ae=X!==null?X.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Ae!==null?null:M(Q,X,""+W,re);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case S:return W.key===Ae?V(Q,X,W,re):null;case b:return W.key===Ae?ee(Q,X,W,re):null;case K:return W=Pl(W),te(Q,X,W,re)}if(I(W)||F(W))return Ae!==null?null:oe(Q,X,W,re,null);if(typeof W.then=="function")return te(Q,X,lc(W),re);if(W.$$typeof===N)return te(Q,X,ec(Q,W),re);ic(Q,W)}return null}function ne(Q,X,W,re,Ae){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return Q=Q.get(W)||null,M(X,Q,""+re,Ae);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case S:return Q=Q.get(re.key===null?W:re.key)||null,V(X,Q,re,Ae);case b:return Q=Q.get(re.key===null?W:re.key)||null,ee(X,Q,re,Ae);case K:return re=Pl(re),ne(Q,X,W,re,Ae)}if(I(re)||F(re))return Q=Q.get(W)||null,oe(X,Q,re,Ae,null);if(typeof re.then=="function")return ne(Q,X,W,lc(re),Ae);if(re.$$typeof===N)return ne(Q,X,W,ec(X,re),Ae);ic(X,re)}return null}function xe(Q,X,W,re){for(var Ae=null,Ie=null,Ee=X,Oe=X=0,Ve=null;Ee!==null&&Oe<W.length;Oe++){Ee.index>Oe?(Ve=Ee,Ee=null):Ve=Ee.sibling;var Qe=te(Q,Ee,W[Oe],re);if(Qe===null){Ee===null&&(Ee=Ve);break}e&&Ee&&Qe.alternate===null&&t(Q,Ee),X=d(Qe,X,Oe),Ie===null?Ae=Qe:Ie.sibling=Qe,Ie=Qe,Ee=Ve}if(Oe===W.length)return l(Q,Ee),qe&&ja(Q,Oe),Ae;if(Ee===null){for(;Oe<W.length;Oe++)Ee=ce(Q,W[Oe],re),Ee!==null&&(X=d(Ee,X,Oe),Ie===null?Ae=Ee:Ie.sibling=Ee,Ie=Ee);return qe&&ja(Q,Oe),Ae}for(Ee=o(Ee);Oe<W.length;Oe++)Ve=ne(Ee,Q,Oe,W[Oe],re),Ve!==null&&(e&&Ve.alternate!==null&&Ee.delete(Ve.key===null?Oe:Ve.key),X=d(Ve,X,Oe),Ie===null?Ae=Ve:Ie.sibling=Ve,Ie=Ve);return e&&Ee.forEach(function(Nl){return t(Q,Nl)}),qe&&ja(Q,Oe),Ae}function Te(Q,X,W,re){if(W==null)throw Error(s(151));for(var Ae=null,Ie=null,Ee=X,Oe=X=0,Ve=null,Qe=W.next();Ee!==null&&!Qe.done;Oe++,Qe=W.next()){Ee.index>Oe?(Ve=Ee,Ee=null):Ve=Ee.sibling;var Nl=te(Q,Ee,Qe.value,re);if(Nl===null){Ee===null&&(Ee=Ve);break}e&&Ee&&Nl.alternate===null&&t(Q,Ee),X=d(Nl,X,Oe),Ie===null?Ae=Nl:Ie.sibling=Nl,Ie=Nl,Ee=Ve}if(Qe.done)return l(Q,Ee),qe&&ja(Q,Oe),Ae;if(Ee===null){for(;!Qe.done;Oe++,Qe=W.next())Qe=ce(Q,Qe.value,re),Qe!==null&&(X=d(Qe,X,Oe),Ie===null?Ae=Qe:Ie.sibling=Qe,Ie=Qe);return qe&&ja(Q,Oe),Ae}for(Ee=o(Ee);!Qe.done;Oe++,Qe=W.next())Qe=ne(Ee,Q,Oe,Qe.value,re),Qe!==null&&(e&&Qe.alternate!==null&&Ee.delete(Qe.key===null?Oe:Qe.key),X=d(Qe,X,Oe),Ie===null?Ae=Qe:Ie.sibling=Qe,Ie=Qe);return e&&Ee.forEach(function(nM){return t(Q,nM)}),qe&&ja(Q,Oe),Ae}function lt(Q,X,W,re){if(typeof W=="object"&&W!==null&&W.type===E&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case S:e:{for(var Ae=W.key;X!==null;){if(X.key===Ae){if(Ae=W.type,Ae===E){if(X.tag===7){l(Q,X.sibling),re=f(X,W.props.children),re.return=Q,Q=re;break e}}else if(X.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===K&&Pl(Ae)===X.type){l(Q,X.sibling),re=f(X,W.props),us(re,W),re.return=Q,Q=re;break e}l(Q,X);break}else t(Q,X);X=X.sibling}W.type===E?(re=Il(W.props.children,Q.mode,re,W.key),re.return=Q,Q=re):(re=Jr(W.type,W.key,W.props,null,Q.mode,re),us(re,W),re.return=Q,Q=re)}return w(Q);case b:e:{for(Ae=W.key;X!==null;){if(X.key===Ae)if(X.tag===4&&X.stateNode.containerInfo===W.containerInfo&&X.stateNode.implementation===W.implementation){l(Q,X.sibling),re=f(X,W.children||[]),re.return=Q,Q=re;break e}else{l(Q,X);break}else t(Q,X);X=X.sibling}re=od(W,Q.mode,re),re.return=Q,Q=re}return w(Q);case K:return W=Pl(W),lt(Q,X,W,re)}if(I(W))return xe(Q,X,W,re);if(F(W)){if(Ae=F(W),typeof Ae!="function")throw Error(s(150));return W=Ae.call(W),Te(Q,X,W,re)}if(typeof W.then=="function")return lt(Q,X,lc(W),re);if(W.$$typeof===N)return lt(Q,X,ec(Q,W),re);ic(Q,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,X!==null&&X.tag===6?(l(Q,X.sibling),re=f(X,W),re.return=Q,Q=re):(l(Q,X),re=id(W,Q.mode,re),re.return=Q,Q=re),w(Q)):l(Q,X)}return function(Q,X,W,re){try{cs=0;var Ae=lt(Q,X,W,re);return qi=null,Ae}catch(Ee){if(Ee===Yi||Ee===nc)throw Ee;var Ie=An(29,Ee,null,Q.mode);return Ie.lanes=re,Ie.return=Q,Ie}finally{}}}var ei=A1(!0),N1=A1(!1),cl=!1;function xd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vd(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ul(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function fl(e,t,l){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ke&2)!==0){var f=o.pending;return f===null?t.next=t:(t.next=f.next,f.next=t),o.pending=t,t=Fr(e),c1(e,null,l),t}return Kr(e,o,t,l),Fr(e)}function fs(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var o=t.lanes;o&=e.pendingLanes,l|=o,t.lanes=l,Ma(e,l)}}function bd(e,t){var l=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,l===o)){var f=null,d=null;if(l=l.firstBaseUpdate,l!==null){do{var w={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};d===null?f=d=w:d=d.next=w,l=l.next}while(l!==null);d===null?f=d=t:d=d.next=t}else f=d=t;l={baseState:o.baseState,firstBaseUpdate:f,lastBaseUpdate:d,shared:o.shared,callbacks:o.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Sd=!1;function ds(){if(Sd){var e=$i;if(e!==null)throw e}}function hs(e,t,l,o){Sd=!1;var f=e.updateQueue;cl=!1;var d=f.firstBaseUpdate,w=f.lastBaseUpdate,M=f.shared.pending;if(M!==null){f.shared.pending=null;var V=M,ee=V.next;V.next=null,w===null?d=ee:w.next=ee,w=V;var oe=e.alternate;oe!==null&&(oe=oe.updateQueue,M=oe.lastBaseUpdate,M!==w&&(M===null?oe.firstBaseUpdate=ee:M.next=ee,oe.lastBaseUpdate=V))}if(d!==null){var ce=f.baseState;w=0,oe=ee=V=null,M=d;do{var te=M.lane&-536870913,ne=te!==M.lane;if(ne?(Ue&te)===te:(o&te)===te){te!==0&&te===Vi&&(Sd=!0),oe!==null&&(oe=oe.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var xe=e,Te=M;te=t;var lt=l;switch(Te.tag){case 1:if(xe=Te.payload,typeof xe=="function"){ce=xe.call(lt,ce,te);break e}ce=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=Te.payload,te=typeof xe=="function"?xe.call(lt,ce,te):xe,te==null)break e;ce=y({},ce,te);break e;case 2:cl=!0}}te=M.callback,te!==null&&(e.flags|=64,ne&&(e.flags|=8192),ne=f.callbacks,ne===null?f.callbacks=[te]:ne.push(te))}else ne={lane:te,tag:M.tag,payload:M.payload,callback:M.callback,next:null},oe===null?(ee=oe=ne,V=ce):oe=oe.next=ne,w|=te;if(M=M.next,M===null){if(M=f.shared.pending,M===null)break;ne=M,M=ne.next,ne.next=null,f.lastBaseUpdate=ne,f.shared.pending=null}}while(!0);oe===null&&(V=ce),f.baseState=V,f.firstBaseUpdate=ee,f.lastBaseUpdate=oe,d===null&&(f.shared.lanes=0),ml|=w,e.lanes=w,e.memoizedState=ce}}function k1(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function T1(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)k1(l[e],t)}var Xi=A(null),oc=A(0);function C1(e,t){e=Za,G(oc,e),G(Xi,t),Za=e|t.baseLanes}function wd(){G(oc,Za),G(Xi,Xi.current)}function Ed(){Za=oc.current,O(Xi),O(oc)}var Nn=A(null),Yn=null;function dl(e){var t=e.alternate;G(Nt,Nt.current&1),G(Nn,e),Yn===null&&(t===null||Xi.current!==null||t.memoizedState!==null)&&(Yn=e)}function _d(e){G(Nt,Nt.current),G(Nn,e),Yn===null&&(Yn=e)}function M1(e){e.tag===22?(G(Nt,Nt.current),G(Nn,e),Yn===null&&(Yn=e)):hl()}function hl(){G(Nt,Nt.current),G(Nn,Nn.current)}function kn(e){O(Nn),Yn===e&&(Yn=null),O(Nt)}var Nt=A(0);function sc(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Mh(l)||zh(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ba=0,ze=null,nt=null,zt=null,rc=!1,Gi=!1,ti=!1,cc=0,ps=0,Zi=null,ZC=0;function St(){throw Error(s(321))}function Ad(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!_n(e[l],t[l]))return!1;return!0}function Nd(e,t,l,o,f,d){return Ba=d,ze=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?hx:$d,ti=!1,d=l(o,f),ti=!1,Gi&&(d=D1(t,l,o,f)),z1(e),d}function z1(e){k.H=ys;var t=nt!==null&&nt.next!==null;if(Ba=0,zt=nt=ze=null,rc=!1,ps=0,Zi=null,t)throw Error(s(300));e===null||Dt||(e=e.dependencies,e!==null&&Wr(e)&&(Dt=!0))}function D1(e,t,l,o){ze=e;var f=0;do{if(Gi&&(Zi=null),ps=0,Gi=!1,25<=f)throw Error(s(301));if(f+=1,zt=nt=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}k.H=px,d=t(l,o)}while(Gi);return d}function IC(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?gs(t):t,e=e.useState()[0],(nt!==null?nt.memoizedState:null)!==e&&(ze.flags|=1024),t}function kd(){var e=cc!==0;return cc=0,e}function Td(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Cd(e){if(rc){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}rc=!1}Ba=0,zt=nt=ze=null,Gi=!1,ps=cc=0,Zi=null}function an(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zt===null?ze.memoizedState=zt=e:zt=zt.next=e,zt}function kt(){if(nt===null){var e=ze.alternate;e=e!==null?e.memoizedState:null}else e=nt.next;var t=zt===null?ze.memoizedState:zt.next;if(t!==null)zt=t,nt=e;else{if(e===null)throw ze.alternate===null?Error(s(467)):Error(s(310));nt=e,e={memoizedState:nt.memoizedState,baseState:nt.baseState,baseQueue:nt.baseQueue,queue:nt.queue,next:null},zt===null?ze.memoizedState=zt=e:zt=zt.next=e}return zt}function uc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function gs(e){var t=ps;return ps+=1,Zi===null&&(Zi=[]),e=w1(Zi,e,t),t=ze,(zt===null?t.memoizedState:zt.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?hx:$d),e}function fc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return gs(e);if(e.$$typeof===N)return Xt(e)}throw Error(s(438,String(e)))}function Md(e){var t=null,l=ze.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var o=ze.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(f){return f.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=uc(),ze.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),o=0;o<e;o++)l[o]=fe;return t.index++,l}function Ua(e,t){return typeof t=="function"?t(e):t}function dc(e){var t=kt();return zd(t,nt,e)}function zd(e,t,l){var o=e.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=l;var f=e.baseQueue,d=o.pending;if(d!==null){if(f!==null){var w=f.next;f.next=d.next,d.next=w}t.baseQueue=f=d,o.pending=null}if(d=e.baseState,f===null)e.memoizedState=d;else{t=f.next;var M=w=null,V=null,ee=t,oe=!1;do{var ce=ee.lane&-536870913;if(ce!==ee.lane?(Ue&ce)===ce:(Ba&ce)===ce){var te=ee.revertLane;if(te===0)V!==null&&(V=V.next={lane:0,revertLane:0,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),ce===Vi&&(oe=!0);else if((Ba&te)===te){ee=ee.next,te===Vi&&(oe=!0);continue}else ce={lane:0,revertLane:ee.revertLane,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},V===null?(M=V=ce,w=d):V=V.next=ce,ze.lanes|=te,ml|=te;ce=ee.action,ti&&l(d,ce),d=ee.hasEagerState?ee.eagerState:l(d,ce)}else te={lane:ce,revertLane:ee.revertLane,gesture:ee.gesture,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},V===null?(M=V=te,w=d):V=V.next=te,ze.lanes|=ce,ml|=ce;ee=ee.next}while(ee!==null&&ee!==t);if(V===null?w=d:V.next=M,!_n(d,e.memoizedState)&&(Dt=!0,oe&&(l=$i,l!==null)))throw l;e.memoizedState=d,e.baseState=w,e.baseQueue=V,o.lastRenderedState=d}return f===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Dd(e){var t=kt(),l=t.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=e;var o=l.dispatch,f=l.pending,d=t.memoizedState;if(f!==null){l.pending=null;var w=f=f.next;do d=e(d,w.action),w=w.next;while(w!==f);_n(d,t.memoizedState)||(Dt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),l.lastRenderedState=d}return[d,o]}function O1(e,t,l){var o=ze,f=kt(),d=qe;if(d){if(l===void 0)throw Error(s(407));l=l()}else l=t();var w=!_n((nt||f).memoizedState,l);if(w&&(f.memoizedState=l,Dt=!0),f=f.queue,jd(L1.bind(null,o,f,e),[e]),f.getSnapshot!==t||w||zt!==null&&zt.memoizedState.tag&1){if(o.flags|=2048,Ii(9,{destroy:void 0},j1.bind(null,o,f,l,t),null),it===null)throw Error(s(349));d||(Ba&127)!==0||R1(o,t,l)}return l}function R1(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=ze.updateQueue,t===null?(t=uc(),ze.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function j1(e,t,l,o){t.value=l,t.getSnapshot=o,H1(t)&&B1(e)}function L1(e,t,l){return l(function(){H1(t)&&B1(e)})}function H1(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!_n(e,l)}catch{return!0}}function B1(e){var t=Zl(e,2);t!==null&&yn(t,e,2)}function Od(e){var t=an();if(typeof e=="function"){var l=e;if(e=l(),ti){mt(!0);try{l()}finally{mt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ua,lastRenderedState:e},t}function U1(e,t,l,o){return e.baseState=l,zd(e,nt,typeof o=="function"?o:Ua)}function QC(e,t,l,o,f){if(gc(e))throw Error(s(485));if(e=t.action,e!==null){var d={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){d.listeners.push(w)}};k.T!==null?l(!0):d.isTransition=!1,o(d),l=t.pending,l===null?(d.next=t.pending=d,V1(t,d)):(d.next=l.next,t.pending=l.next=d)}}function V1(e,t){var l=t.action,o=t.payload,f=e.state;if(t.isTransition){var d=k.T,w={};k.T=w;try{var M=l(f,o),V=k.S;V!==null&&V(w,M),$1(e,t,M)}catch(ee){Rd(e,t,ee)}finally{d!==null&&w.types!==null&&(d.types=w.types),k.T=d}}else try{d=l(f,o),$1(e,t,d)}catch(ee){Rd(e,t,ee)}}function $1(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(o){Y1(e,t,o)},function(o){return Rd(e,t,o)}):Y1(e,t,l)}function Y1(e,t,l){t.status="fulfilled",t.value=l,q1(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,V1(e,l)))}function Rd(e,t,l){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=l,q1(t),t=t.next;while(t!==o)}e.action=null}function q1(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function X1(e,t){return t}function G1(e,t){if(qe){var l=it.formState;if(l!==null){e:{var o=ze;if(qe){if(rt){t:{for(var f=rt,d=$n;f.nodeType!==8;){if(!d){f=null;break t}if(f=qn(f.nextSibling),f===null){f=null;break t}}d=f.data,f=d==="F!"||d==="F"?f:null}if(f){rt=qn(f.nextSibling),o=f.data==="F!";break e}}sl(o)}o=!1}o&&(t=l[0])}}return l=an(),l.memoizedState=l.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:X1,lastRenderedState:t},l.queue=o,l=ux.bind(null,ze,o),o.dispatch=l,o=Od(!1),d=Vd.bind(null,ze,!1,o.queue),o=an(),f={state:t,dispatch:null,action:e,pending:null},o.queue=f,l=QC.bind(null,ze,f,d,l),f.dispatch=l,o.memoizedState=e,[t,l,!1]}function Z1(e){var t=kt();return I1(t,nt,e)}function I1(e,t,l){if(t=zd(e,t,X1)[0],e=dc(Ua)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=gs(t)}catch(w){throw w===Yi?nc:w}else o=t;t=kt();var f=t.queue,d=f.dispatch;return l!==t.memoizedState&&(ze.flags|=2048,Ii(9,{destroy:void 0},KC.bind(null,f,l),null)),[o,d,e]}function KC(e,t){e.action=t}function Q1(e){var t=kt(),l=nt;if(l!==null)return I1(t,l,e);kt(),t=t.memoizedState,l=kt();var o=l.queue.dispatch;return l.memoizedState=e,[t,o,!1]}function Ii(e,t,l,o){return e={tag:e,create:l,deps:o,inst:t,next:null},t=ze.updateQueue,t===null&&(t=uc(),ze.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(o=l.next,l.next=e,e.next=o,t.lastEffect=e),e}function K1(){return kt().memoizedState}function hc(e,t,l,o){var f=an();ze.flags|=e,f.memoizedState=Ii(1|t,{destroy:void 0},l,o===void 0?null:o)}function pc(e,t,l,o){var f=kt();o=o===void 0?null:o;var d=f.memoizedState.inst;nt!==null&&o!==null&&Ad(o,nt.memoizedState.deps)?f.memoizedState=Ii(t,d,l,o):(ze.flags|=e,f.memoizedState=Ii(1|t,d,l,o))}function F1(e,t){hc(8390656,8,e,t)}function jd(e,t){pc(2048,8,e,t)}function FC(e){ze.flags|=4;var t=ze.updateQueue;if(t===null)t=uc(),ze.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function J1(e){var t=kt().memoizedState;return FC({ref:t,nextImpl:e}),function(){if((Ke&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function P1(e,t){return pc(4,2,e,t)}function W1(e,t){return pc(4,4,e,t)}function ex(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function tx(e,t,l){l=l!=null?l.concat([e]):null,pc(4,4,ex.bind(null,t,e),l)}function Ld(){}function nx(e,t){var l=kt();t=t===void 0?null:t;var o=l.memoizedState;return t!==null&&Ad(t,o[1])?o[0]:(l.memoizedState=[e,t],e)}function ax(e,t){var l=kt();t=t===void 0?null:t;var o=l.memoizedState;if(t!==null&&Ad(t,o[1]))return o[0];if(o=e(),ti){mt(!0);try{e()}finally{mt(!1)}}return l.memoizedState=[o,t],o}function Hd(e,t,l){return l===void 0||(Ba&1073741824)!==0&&(Ue&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=lv(),ze.lanes|=e,ml|=e,l)}function lx(e,t,l,o){return _n(l,t)?l:Xi.current!==null?(e=Hd(e,l,o),_n(e,t)||(Dt=!0),e):(Ba&42)===0||(Ba&1073741824)!==0&&(Ue&261930)===0?(Dt=!0,e.memoizedState=l):(e=lv(),ze.lanes|=e,ml|=e,t)}function ix(e,t,l,o,f){var d=L.p;L.p=d!==0&&8>d?d:8;var w=k.T,M={};k.T=M,Vd(e,!1,t,l);try{var V=f(),ee=k.S;if(ee!==null&&ee(M,V),V!==null&&typeof V=="object"&&typeof V.then=="function"){var oe=GC(V,o);ms(e,t,oe,Mn(e))}else ms(e,t,o,Mn(e))}catch(ce){ms(e,t,{then:function(){},status:"rejected",reason:ce},Mn())}finally{L.p=d,w!==null&&M.types!==null&&(w.types=M.types),k.T=w}}function JC(){}function Bd(e,t,l,o){if(e.tag!==5)throw Error(s(476));var f=ox(e).queue;ix(e,f,t,$,l===null?JC:function(){return sx(e),l(o)})}function ox(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ua,lastRenderedState:$},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ua,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function sx(e){var t=ox(e);t.next===null&&(t=e.alternate.memoizedState),ms(e,t.next.queue,{},Mn())}function Ud(){return Xt(Os)}function rx(){return kt().memoizedState}function cx(){return kt().memoizedState}function PC(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Mn();e=ul(l);var o=fl(t,e,l);o!==null&&(yn(o,t,l),fs(o,t,l)),t={cache:pd()},e.payload=t;return}t=t.return}}function WC(e,t,l){var o=Mn();l={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},gc(e)?fx(t,l):(l=ad(e,t,l,o),l!==null&&(yn(l,e,o),dx(l,t,o)))}function ux(e,t,l){var o=Mn();ms(e,t,l,o)}function ms(e,t,l,o){var f={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(gc(e))fx(t,f);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var w=t.lastRenderedState,M=d(w,l);if(f.hasEagerState=!0,f.eagerState=M,_n(M,w))return Kr(e,t,f,0),it===null&&Qr(),!1}catch{}finally{}if(l=ad(e,t,f,o),l!==null)return yn(l,e,o),dx(l,t,o),!0}return!1}function Vd(e,t,l,o){if(o={lane:2,revertLane:xh(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},gc(e)){if(t)throw Error(s(479))}else t=ad(e,l,o,2),t!==null&&yn(t,e,2)}function gc(e){var t=e.alternate;return e===ze||t!==null&&t===ze}function fx(e,t){Gi=rc=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function dx(e,t,l){if((l&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,l|=o,t.lanes=l,Ma(e,l)}}var ys={readContext:Xt,use:fc,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useLayoutEffect:St,useInsertionEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useSyncExternalStore:St,useId:St,useHostTransitionStatus:St,useFormState:St,useActionState:St,useOptimistic:St,useMemoCache:St,useCacheRefresh:St};ys.useEffectEvent=St;var hx={readContext:Xt,use:fc,useCallback:function(e,t){return an().memoizedState=[e,t===void 0?null:t],e},useContext:Xt,useEffect:F1,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,hc(4194308,4,ex.bind(null,t,e),l)},useLayoutEffect:function(e,t){return hc(4194308,4,e,t)},useInsertionEffect:function(e,t){hc(4,2,e,t)},useMemo:function(e,t){var l=an();t=t===void 0?null:t;var o=e();if(ti){mt(!0);try{e()}finally{mt(!1)}}return l.memoizedState=[o,t],o},useReducer:function(e,t,l){var o=an();if(l!==void 0){var f=l(t);if(ti){mt(!0);try{l(t)}finally{mt(!1)}}}else f=t;return o.memoizedState=o.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},o.queue=e,e=e.dispatch=WC.bind(null,ze,e),[o.memoizedState,e]},useRef:function(e){var t=an();return e={current:e},t.memoizedState=e},useState:function(e){e=Od(e);var t=e.queue,l=ux.bind(null,ze,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Ld,useDeferredValue:function(e,t){var l=an();return Hd(l,e,t)},useTransition:function(){var e=Od(!1);return e=ix.bind(null,ze,e.queue,!0,!1),an().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var o=ze,f=an();if(qe){if(l===void 0)throw Error(s(407));l=l()}else{if(l=t(),it===null)throw Error(s(349));(Ue&127)!==0||R1(o,t,l)}f.memoizedState=l;var d={value:l,getSnapshot:t};return f.queue=d,F1(L1.bind(null,o,d,e),[e]),o.flags|=2048,Ii(9,{destroy:void 0},j1.bind(null,o,d,l,t),null),l},useId:function(){var e=an(),t=it.identifierPrefix;if(qe){var l=xa,o=ya;l=(o&~(1<<32-dt(o)-1)).toString(32)+l,t="_"+t+"R_"+l,l=cc++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=ZC++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ud,useFormState:G1,useActionState:G1,useOptimistic:function(e){var t=an();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Vd.bind(null,ze,!0,l),l.dispatch=t,[e,t]},useMemoCache:Md,useCacheRefresh:function(){return an().memoizedState=PC.bind(null,ze)},useEffectEvent:function(e){var t=an(),l={impl:e};return t.memoizedState=l,function(){if((Ke&2)!==0)throw Error(s(440));return l.impl.apply(void 0,arguments)}}},$d={readContext:Xt,use:fc,useCallback:nx,useContext:Xt,useEffect:jd,useImperativeHandle:tx,useInsertionEffect:P1,useLayoutEffect:W1,useMemo:ax,useReducer:dc,useRef:K1,useState:function(){return dc(Ua)},useDebugValue:Ld,useDeferredValue:function(e,t){var l=kt();return lx(l,nt.memoizedState,e,t)},useTransition:function(){var e=dc(Ua)[0],t=kt().memoizedState;return[typeof e=="boolean"?e:gs(e),t]},useSyncExternalStore:O1,useId:rx,useHostTransitionStatus:Ud,useFormState:Z1,useActionState:Z1,useOptimistic:function(e,t){var l=kt();return U1(l,nt,e,t)},useMemoCache:Md,useCacheRefresh:cx};$d.useEffectEvent=J1;var px={readContext:Xt,use:fc,useCallback:nx,useContext:Xt,useEffect:jd,useImperativeHandle:tx,useInsertionEffect:P1,useLayoutEffect:W1,useMemo:ax,useReducer:Dd,useRef:K1,useState:function(){return Dd(Ua)},useDebugValue:Ld,useDeferredValue:function(e,t){var l=kt();return nt===null?Hd(l,e,t):lx(l,nt.memoizedState,e,t)},useTransition:function(){var e=Dd(Ua)[0],t=kt().memoizedState;return[typeof e=="boolean"?e:gs(e),t]},useSyncExternalStore:O1,useId:rx,useHostTransitionStatus:Ud,useFormState:Q1,useActionState:Q1,useOptimistic:function(e,t){var l=kt();return nt!==null?U1(l,nt,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Md,useCacheRefresh:cx};px.useEffectEvent=J1;function Yd(e,t,l,o){t=e.memoizedState,l=l(o,t),l=l==null?t:y({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var qd={enqueueSetState:function(e,t,l){e=e._reactInternals;var o=Mn(),f=ul(o);f.payload=t,l!=null&&(f.callback=l),t=fl(e,f,o),t!==null&&(yn(t,e,o),fs(t,e,o))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var o=Mn(),f=ul(o);f.tag=1,f.payload=t,l!=null&&(f.callback=l),t=fl(e,f,o),t!==null&&(yn(t,e,o),fs(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Mn(),o=ul(l);o.tag=2,t!=null&&(o.callback=t),t=fl(e,o,l),t!==null&&(yn(t,e,l),fs(t,e,l))}};function gx(e,t,l,o,f,d,w){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,d,w):t.prototype&&t.prototype.isPureReactComponent?!as(l,o)||!as(f,d):!0}function mx(e,t,l,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,o),t.state!==e&&qd.enqueueReplaceState(t,t.state,null)}function ni(e,t){var l=t;if("ref"in t){l={};for(var o in t)o!=="ref"&&(l[o]=t[o])}if(e=e.defaultProps){l===t&&(l=y({},l));for(var f in e)l[f]===void 0&&(l[f]=e[f])}return l}function yx(e){Ir(e)}function xx(e){console.error(e)}function vx(e){Ir(e)}function mc(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function bx(e,t,l){try{var o=e.onCaughtError;o(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Xd(e,t,l){return l=ul(l),l.tag=3,l.payload={element:null},l.callback=function(){mc(e,t)},l}function Sx(e){return e=ul(e),e.tag=3,e}function wx(e,t,l,o){var f=l.type.getDerivedStateFromError;if(typeof f=="function"){var d=o.value;e.payload=function(){return f(d)},e.callback=function(){bx(t,l,o)}}var w=l.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(e.callback=function(){bx(t,l,o),typeof f!="function"&&(yl===null?yl=new Set([this]):yl.add(this));var M=o.stack;this.componentDidCatch(o.value,{componentStack:M!==null?M:""})})}function e4(e,t,l,o,f){if(l.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=l.alternate,t!==null&&Ui(t,l,f,!0),l=Nn.current,l!==null){switch(l.tag){case 31:case 13:return Yn===null?Tc():l.alternate===null&&wt===0&&(wt=3),l.flags&=-257,l.flags|=65536,l.lanes=f,o===ac?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([o]):t.add(o),gh(e,o,f)),!1;case 22:return l.flags|=65536,o===ac?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([o]):l.add(o)),gh(e,o,f)),!1}throw Error(s(435,l.tag))}return gh(e,o,f),Tc(),!1}if(qe)return t=Nn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=f,o!==cd&&(e=Error(s(422),{cause:o}),os(Bn(e,l)))):(o!==cd&&(t=Error(s(423),{cause:o}),os(Bn(t,l))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,o=Bn(o,l),f=Xd(e.stateNode,o,f),bd(e,f),wt!==4&&(wt=2)),!1;var d=Error(s(520),{cause:o});if(d=Bn(d,l),As===null?As=[d]:As.push(d),wt!==4&&(wt=2),t===null)return!0;o=Bn(o,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=f&-f,l.lanes|=e,e=Xd(l.stateNode,o,e),bd(l,e),!1;case 1:if(t=l.type,d=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(yl===null||!yl.has(d))))return l.flags|=65536,f&=-f,l.lanes|=f,f=Sx(f),wx(f,e,l,o),bd(l,f),!1}l=l.return}while(l!==null);return!1}var Gd=Error(s(461)),Dt=!1;function Gt(e,t,l,o){t.child=e===null?N1(t,null,l,o):ei(t,e.child,l,o)}function Ex(e,t,l,o,f){l=l.render;var d=t.ref;if("ref"in o){var w={};for(var M in o)M!=="ref"&&(w[M]=o[M])}else w=o;return Fl(t),o=Nd(e,t,l,w,d,f),M=kd(),e!==null&&!Dt?(Td(e,t,f),Va(e,t,f)):(qe&&M&&sd(t),t.flags|=1,Gt(e,t,o,f),t.child)}function _x(e,t,l,o,f){if(e===null){var d=l.type;return typeof d=="function"&&!ld(d)&&d.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=d,Ax(e,t,d,o,f)):(e=Jr(l.type,null,o,t,t.mode,f),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!Wd(e,f)){var w=d.memoizedProps;if(l=l.compare,l=l!==null?l:as,l(w,o)&&e.ref===t.ref)return Va(e,t,f)}return t.flags|=1,e=Ra(d,o),e.ref=t.ref,e.return=t,t.child=e}function Ax(e,t,l,o,f){if(e!==null){var d=e.memoizedProps;if(as(d,o)&&e.ref===t.ref)if(Dt=!1,t.pendingProps=o=d,Wd(e,f))(e.flags&131072)!==0&&(Dt=!0);else return t.lanes=e.lanes,Va(e,t,f)}return Zd(e,t,l,o,f)}function Nx(e,t,l,o){var f=o.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|l:l,e!==null){for(o=t.child=e.child,f=0;o!==null;)f=f|o.lanes|o.childLanes,o=o.sibling;o=f&~d}else o=0,t.child=null;return kx(e,t,d,l,o)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&tc(t,d!==null?d.cachePool:null),d!==null?C1(t,d):wd(),M1(t);else return o=t.lanes=536870912,kx(e,t,d!==null?d.baseLanes|l:l,l,o)}else d!==null?(tc(t,d.cachePool),C1(t,d),hl(),t.memoizedState=null):(e!==null&&tc(t,null),wd(),hl());return Gt(e,t,f,l),t.child}function xs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function kx(e,t,l,o,f){var d=md();return d=d===null?null:{parent:Mt._currentValue,pool:d},t.memoizedState={baseLanes:l,cachePool:d},e!==null&&tc(t,null),wd(),M1(t),e!==null&&Ui(e,t,o,!0),t.childLanes=f,null}function yc(e,t){return t=vc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Tx(e,t,l){return ei(t,e.child,null,l),e=yc(t,t.pendingProps),e.flags|=2,kn(t),t.memoizedState=null,e}function t4(e,t,l){var o=t.pendingProps,f=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(qe){if(o.mode==="hidden")return e=yc(t,o),t.lanes=536870912,xs(null,e);if(_d(t),(e=rt)?(e=Vv(e,$n),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:il!==null?{id:ya,overflow:xa}:null,retryLane:536870912,hydrationErrors:null},l=f1(e),l.return=t,t.child=l,qt=t,rt=null)):e=null,e===null)throw sl(t);return t.lanes=536870912,null}return yc(t,o)}var d=e.memoizedState;if(d!==null){var w=d.dehydrated;if(_d(t),f)if(t.flags&256)t.flags&=-257,t=Tx(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(Dt||Ui(e,t,l,!1),f=(l&e.childLanes)!==0,Dt||f){if(o=it,o!==null&&(w=On(o,l),w!==0&&w!==d.retryLane))throw d.retryLane=w,Zl(e,w),yn(o,e,w),Gd;Tc(),t=Tx(e,t,l)}else e=d.treeContext,rt=qn(w.nextSibling),qt=t,qe=!0,ol=null,$n=!1,e!==null&&p1(t,e),t=yc(t,o),t.flags|=4096;return t}return e=Ra(e.child,{mode:o.mode,children:o.children}),e.ref=t.ref,t.child=e,e.return=t,e}function xc(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(s(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Zd(e,t,l,o,f){return Fl(t),l=Nd(e,t,l,o,void 0,f),o=kd(),e!==null&&!Dt?(Td(e,t,f),Va(e,t,f)):(qe&&o&&sd(t),t.flags|=1,Gt(e,t,l,f),t.child)}function Cx(e,t,l,o,f,d){return Fl(t),t.updateQueue=null,l=D1(t,o,l,f),z1(e),o=kd(),e!==null&&!Dt?(Td(e,t,d),Va(e,t,d)):(qe&&o&&sd(t),t.flags|=1,Gt(e,t,l,d),t.child)}function Mx(e,t,l,o,f){if(Fl(t),t.stateNode===null){var d=ji,w=l.contextType;typeof w=="object"&&w!==null&&(d=Xt(w)),d=new l(o,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=qd,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=o,d.state=t.memoizedState,d.refs={},xd(t),w=l.contextType,d.context=typeof w=="object"&&w!==null?Xt(w):ji,d.state=t.memoizedState,w=l.getDerivedStateFromProps,typeof w=="function"&&(Yd(t,l,w,o),d.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(w=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),w!==d.state&&qd.enqueueReplaceState(d,d.state,null),hs(t,o,d,f),ds(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){d=t.stateNode;var M=t.memoizedProps,V=ni(l,M);d.props=V;var ee=d.context,oe=l.contextType;w=ji,typeof oe=="object"&&oe!==null&&(w=Xt(oe));var ce=l.getDerivedStateFromProps;oe=typeof ce=="function"||typeof d.getSnapshotBeforeUpdate=="function",M=t.pendingProps!==M,oe||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(M||ee!==w)&&mx(t,d,o,w),cl=!1;var te=t.memoizedState;d.state=te,hs(t,o,d,f),ds(),ee=t.memoizedState,M||te!==ee||cl?(typeof ce=="function"&&(Yd(t,l,ce,o),ee=t.memoizedState),(V=cl||gx(t,l,V,o,te,ee,w))?(oe||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=ee),d.props=o,d.state=ee,d.context=w,o=V):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{d=t.stateNode,vd(e,t),w=t.memoizedProps,oe=ni(l,w),d.props=oe,ce=t.pendingProps,te=d.context,ee=l.contextType,V=ji,typeof ee=="object"&&ee!==null&&(V=Xt(ee)),M=l.getDerivedStateFromProps,(ee=typeof M=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(w!==ce||te!==V)&&mx(t,d,o,V),cl=!1,te=t.memoizedState,d.state=te,hs(t,o,d,f),ds();var ne=t.memoizedState;w!==ce||te!==ne||cl||e!==null&&e.dependencies!==null&&Wr(e.dependencies)?(typeof M=="function"&&(Yd(t,l,M,o),ne=t.memoizedState),(oe=cl||gx(t,l,oe,o,te,ne,V)||e!==null&&e.dependencies!==null&&Wr(e.dependencies))?(ee||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(o,ne,V),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(o,ne,V)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||w===e.memoizedProps&&te===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||w===e.memoizedProps&&te===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=ne),d.props=o,d.state=ne,d.context=V,o=oe):(typeof d.componentDidUpdate!="function"||w===e.memoizedProps&&te===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||w===e.memoizedProps&&te===e.memoizedState||(t.flags|=1024),o=!1)}return d=o,xc(e,t),o=(t.flags&128)!==0,d||o?(d=t.stateNode,l=o&&typeof l.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&o?(t.child=ei(t,e.child,null,f),t.child=ei(t,null,l,f)):Gt(e,t,l,f),t.memoizedState=d.state,e=t.child):e=Va(e,t,f),e}function zx(e,t,l,o){return Ql(),t.flags|=256,Gt(e,t,l,o),t.child}var Id={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qd(e){return{baseLanes:e,cachePool:b1()}}function Kd(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Cn),e}function Dx(e,t,l){var o=t.pendingProps,f=!1,d=(t.flags&128)!==0,w;if((w=d)||(w=e!==null&&e.memoizedState===null?!1:(Nt.current&2)!==0),w&&(f=!0,t.flags&=-129),w=(t.flags&32)!==0,t.flags&=-33,e===null){if(qe){if(f?dl(t):hl(),(e=rt)?(e=Vv(e,$n),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:il!==null?{id:ya,overflow:xa}:null,retryLane:536870912,hydrationErrors:null},l=f1(e),l.return=t,t.child=l,qt=t,rt=null)):e=null,e===null)throw sl(t);return zh(e)?t.lanes=32:t.lanes=536870912,null}var M=o.children;return o=o.fallback,f?(hl(),f=t.mode,M=vc({mode:"hidden",children:M},f),o=Il(o,f,l,null),M.return=t,o.return=t,M.sibling=o,t.child=M,o=t.child,o.memoizedState=Qd(l),o.childLanes=Kd(e,w,l),t.memoizedState=Id,xs(null,o)):(dl(t),Fd(t,M))}var V=e.memoizedState;if(V!==null&&(M=V.dehydrated,M!==null)){if(d)t.flags&256?(dl(t),t.flags&=-257,t=Jd(e,t,l)):t.memoizedState!==null?(hl(),t.child=e.child,t.flags|=128,t=null):(hl(),M=o.fallback,f=t.mode,o=vc({mode:"visible",children:o.children},f),M=Il(M,f,l,null),M.flags|=2,o.return=t,M.return=t,o.sibling=M,t.child=o,ei(t,e.child,null,l),o=t.child,o.memoizedState=Qd(l),o.childLanes=Kd(e,w,l),t.memoizedState=Id,t=xs(null,o));else if(dl(t),zh(M)){if(w=M.nextSibling&&M.nextSibling.dataset,w)var ee=w.dgst;w=ee,o=Error(s(419)),o.stack="",o.digest=w,os({value:o,source:null,stack:null}),t=Jd(e,t,l)}else if(Dt||Ui(e,t,l,!1),w=(l&e.childLanes)!==0,Dt||w){if(w=it,w!==null&&(o=On(w,l),o!==0&&o!==V.retryLane))throw V.retryLane=o,Zl(e,o),yn(w,e,o),Gd;Mh(M)||Tc(),t=Jd(e,t,l)}else Mh(M)?(t.flags|=192,t.child=e.child,t=null):(e=V.treeContext,rt=qn(M.nextSibling),qt=t,qe=!0,ol=null,$n=!1,e!==null&&p1(t,e),t=Fd(t,o.children),t.flags|=4096);return t}return f?(hl(),M=o.fallback,f=t.mode,V=e.child,ee=V.sibling,o=Ra(V,{mode:"hidden",children:o.children}),o.subtreeFlags=V.subtreeFlags&65011712,ee!==null?M=Ra(ee,M):(M=Il(M,f,l,null),M.flags|=2),M.return=t,o.return=t,o.sibling=M,t.child=o,xs(null,o),o=t.child,M=e.child.memoizedState,M===null?M=Qd(l):(f=M.cachePool,f!==null?(V=Mt._currentValue,f=f.parent!==V?{parent:V,pool:V}:f):f=b1(),M={baseLanes:M.baseLanes|l,cachePool:f}),o.memoizedState=M,o.childLanes=Kd(e,w,l),t.memoizedState=Id,xs(e.child,o)):(dl(t),l=e.child,e=l.sibling,l=Ra(l,{mode:"visible",children:o.children}),l.return=t,l.sibling=null,e!==null&&(w=t.deletions,w===null?(t.deletions=[e],t.flags|=16):w.push(e)),t.child=l,t.memoizedState=null,l)}function Fd(e,t){return t=vc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function vc(e,t){return e=An(22,e,null,t),e.lanes=0,e}function Jd(e,t,l){return ei(t,e.child,null,l),e=Fd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ox(e,t,l){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),dd(e.return,t,l)}function Pd(e,t,l,o,f,d){var w=e.memoizedState;w===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:l,tailMode:f,treeForkCount:d}:(w.isBackwards=t,w.rendering=null,w.renderingStartTime=0,w.last=o,w.tail=l,w.tailMode=f,w.treeForkCount=d)}function Rx(e,t,l){var o=t.pendingProps,f=o.revealOrder,d=o.tail;o=o.children;var w=Nt.current,M=(w&2)!==0;if(M?(w=w&1|2,t.flags|=128):w&=1,G(Nt,w),Gt(e,t,o,l),o=qe?is:0,!M&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ox(e,l,t);else if(e.tag===19)Ox(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(f){case"forwards":for(l=t.child,f=null;l!==null;)e=l.alternate,e!==null&&sc(e)===null&&(f=l),l=l.sibling;l=f,l===null?(f=t.child,t.child=null):(f=l.sibling,l.sibling=null),Pd(t,!1,f,l,d,o);break;case"backwards":case"unstable_legacy-backwards":for(l=null,f=t.child,t.child=null;f!==null;){if(e=f.alternate,e!==null&&sc(e)===null){t.child=f;break}e=f.sibling,f.sibling=l,l=f,f=e}Pd(t,!0,l,null,d,o);break;case"together":Pd(t,!1,null,null,void 0,o);break;default:t.memoizedState=null}return t.child}function Va(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),ml|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Ui(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,l=Ra(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Ra(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Wd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Wr(e)))}function n4(e,t,l){switch(t.tag){case 3:ue(t,t.stateNode.containerInfo),rl(t,Mt,e.memoizedState.cache),Ql();break;case 27:case 5:Ne(t);break;case 4:ue(t,t.stateNode.containerInfo);break;case 10:rl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,_d(t),null;break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(dl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?Dx(e,t,l):(dl(t),e=Va(e,t,l),e!==null?e.sibling:null);dl(t);break;case 19:var f=(e.flags&128)!==0;if(o=(l&t.childLanes)!==0,o||(Ui(e,t,l,!1),o=(l&t.childLanes)!==0),f){if(o)return Rx(e,t,l);t.flags|=128}if(f=t.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),G(Nt,Nt.current),o)break;return null;case 22:return t.lanes=0,Nx(e,t,l,t.pendingProps);case 24:rl(t,Mt,e.memoizedState.cache)}return Va(e,t,l)}function jx(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Dt=!0;else{if(!Wd(e,l)&&(t.flags&128)===0)return Dt=!1,n4(e,t,l);Dt=(e.flags&131072)!==0}else Dt=!1,qe&&(t.flags&1048576)!==0&&h1(t,is,t.index);switch(t.lanes=0,t.tag){case 16:e:{var o=t.pendingProps;if(e=Pl(t.elementType),t.type=e,typeof e=="function")ld(e)?(o=ni(e,o),t.tag=1,t=Mx(null,t,e,o,l)):(t.tag=0,t=Zd(null,t,e,o,l));else{if(e!=null){var f=e.$$typeof;if(f===C){t.tag=11,t=Ex(null,t,e,o,l);break e}else if(f===j){t.tag=14,t=_x(null,t,e,o,l);break e}}throw t=H(e)||e,Error(s(306,t,""))}}return t;case 0:return Zd(e,t,t.type,t.pendingProps,l);case 1:return o=t.type,f=ni(o,t.pendingProps),Mx(e,t,o,f,l);case 3:e:{if(ue(t,t.stateNode.containerInfo),e===null)throw Error(s(387));o=t.pendingProps;var d=t.memoizedState;f=d.element,vd(e,t),hs(t,o,null,l);var w=t.memoizedState;if(o=w.cache,rl(t,Mt,o),o!==d.cache&&hd(t,[Mt],l,!0),ds(),o=w.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:w.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=zx(e,t,o,l);break e}else if(o!==f){f=Bn(Error(s(424)),t),os(f),t=zx(e,t,o,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(rt=qn(e.firstChild),qt=t,qe=!0,ol=null,$n=!0,l=N1(t,null,o,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Ql(),o===f){t=Va(e,t,l);break e}Gt(e,t,o,l)}t=t.child}return t;case 26:return xc(e,t),e===null?(l=Zv(t.type,null,t.pendingProps,null))?t.memoizedState=l:qe||(l=t.type,e=t.pendingProps,o=jc(ge.current).createElement(l),o[bt]=t,o[ot]=e,Zt(o,l,e),De(o),t.stateNode=o):t.memoizedState=Zv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ne(t),e===null&&qe&&(o=t.stateNode=qv(t.type,t.pendingProps,ge.current),qt=t,$n=!0,f=rt,Sl(t.type)?(Dh=f,rt=qn(o.firstChild)):rt=f),Gt(e,t,t.pendingProps.children,l),xc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&qe&&((f=o=rt)&&(o=D4(o,t.type,t.pendingProps,$n),o!==null?(t.stateNode=o,qt=t,rt=qn(o.firstChild),$n=!1,f=!0):f=!1),f||sl(t)),Ne(t),f=t.type,d=t.pendingProps,w=e!==null?e.memoizedProps:null,o=d.children,kh(f,d)?o=null:w!==null&&kh(f,w)&&(t.flags|=32),t.memoizedState!==null&&(f=Nd(e,t,IC,null,null,l),Os._currentValue=f),xc(e,t),Gt(e,t,o,l),t.child;case 6:return e===null&&qe&&((e=l=rt)&&(l=O4(l,t.pendingProps,$n),l!==null?(t.stateNode=l,qt=t,rt=null,e=!0):e=!1),e||sl(t)),null;case 13:return Dx(e,t,l);case 4:return ue(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=ei(t,null,o,l):Gt(e,t,o,l),t.child;case 11:return Ex(e,t,t.type,t.pendingProps,l);case 7:return Gt(e,t,t.pendingProps,l),t.child;case 8:return Gt(e,t,t.pendingProps.children,l),t.child;case 12:return Gt(e,t,t.pendingProps.children,l),t.child;case 10:return o=t.pendingProps,rl(t,t.type,o.value),Gt(e,t,o.children,l),t.child;case 9:return f=t.type._context,o=t.pendingProps.children,Fl(t),f=Xt(f),o=o(f),t.flags|=1,Gt(e,t,o,l),t.child;case 14:return _x(e,t,t.type,t.pendingProps,l);case 15:return Ax(e,t,t.type,t.pendingProps,l);case 19:return Rx(e,t,l);case 31:return t4(e,t,l);case 22:return Nx(e,t,l,t.pendingProps);case 24:return Fl(t),o=Xt(Mt),e===null?(f=md(),f===null&&(f=it,d=pd(),f.pooledCache=d,d.refCount++,d!==null&&(f.pooledCacheLanes|=l),f=d),t.memoizedState={parent:o,cache:f},xd(t),rl(t,Mt,f)):((e.lanes&l)!==0&&(vd(e,t),hs(t,null,null,l),ds()),f=e.memoizedState,d=t.memoizedState,f.parent!==o?(f={parent:o,cache:o},t.memoizedState=f,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=f),rl(t,Mt,o)):(o=d.cache,rl(t,Mt,o),o!==f.cache&&hd(t,[Mt],l,!0))),Gt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function $a(e){e.flags|=4}function eh(e,t,l,o,f){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(rv())e.flags|=8192;else throw Wl=ac,yd}else e.flags&=-16777217}function Lx(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Jv(t))if(rv())e.flags|=8192;else throw Wl=ac,yd}function bc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ft():536870912,e.lanes|=t,Ji|=t)}function vs(e,t){if(!qe)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var o=null;l!==null;)l.alternate!==null&&(o=l),l=l.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function ct(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,o=0;if(t)for(var f=e.child;f!==null;)l|=f.lanes|f.childLanes,o|=f.subtreeFlags&65011712,o|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)l|=f.lanes|f.childLanes,o|=f.subtreeFlags,o|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=o,e.childLanes=l,t}function a4(e,t,l){var o=t.pendingProps;switch(rd(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(t),null;case 1:return ct(t),null;case 3:return l=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),Ha(Mt),me(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Bi(t)?$a(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ud())),ct(t),null;case 26:var f=t.type,d=t.memoizedState;return e===null?($a(t),d!==null?(ct(t),Lx(t,d)):(ct(t),eh(t,f,null,o,l))):d?d!==e.memoizedState?($a(t),ct(t),Lx(t,d)):(ct(t),t.flags&=-16777217):(e=e.memoizedProps,e!==o&&$a(t),ct(t),eh(t,f,e,o,l)),null;case 27:if(ke(t),l=ge.current,f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&$a(t);else{if(!o){if(t.stateNode===null)throw Error(s(166));return ct(t),null}e=P.current,Bi(t)?g1(t):(e=qv(f,o,l),t.stateNode=e,$a(t))}return ct(t),null;case 5:if(ke(t),f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&$a(t);else{if(!o){if(t.stateNode===null)throw Error(s(166));return ct(t),null}if(d=P.current,Bi(t))g1(t);else{var w=jc(ge.current);switch(d){case 1:d=w.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:d=w.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":d=w.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":d=w.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":d=w.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof o.is=="string"?w.createElement("select",{is:o.is}):w.createElement("select"),o.multiple?d.multiple=!0:o.size&&(d.size=o.size);break;default:d=typeof o.is=="string"?w.createElement(f,{is:o.is}):w.createElement(f)}}d[bt]=t,d[ot]=o;e:for(w=t.child;w!==null;){if(w.tag===5||w.tag===6)d.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===t)break e;for(;w.sibling===null;){if(w.return===null||w.return===t)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}t.stateNode=d;e:switch(Zt(d,f,o),f){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&$a(t)}}return ct(t),eh(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&$a(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(s(166));if(e=ge.current,Bi(t)){if(e=t.stateNode,l=t.memoizedProps,o=null,f=qt,f!==null)switch(f.tag){case 27:case 5:o=f.memoizedProps}e[bt]=t,e=!!(e.nodeValue===l||o!==null&&o.suppressHydrationWarning===!0||Dv(e.nodeValue,l)),e||sl(t,!0)}else e=jc(e).createTextNode(o),e[bt]=t,t.stateNode=e}return ct(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(o=Bi(t),l!==null){if(e===null){if(!o)throw Error(s(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[bt]=t}else Ql(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ct(t),e=!1}else l=ud(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(kn(t),t):(kn(t),null);if((t.flags&128)!==0)throw Error(s(558))}return ct(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Bi(t),o!==null&&o.dehydrated!==null){if(e===null){if(!f)throw Error(s(318));if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(s(317));f[bt]=t}else Ql(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ct(t),f=!1}else f=ud(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return t.flags&256?(kn(t),t):(kn(t),null)}return kn(t),(t.flags&128)!==0?(t.lanes=l,t):(l=o!==null,e=e!==null&&e.memoizedState!==null,l&&(o=t.child,f=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(f=o.alternate.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==f&&(o.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),bc(t,t.updateQueue),ct(t),null);case 4:return me(),e===null&&wh(t.stateNode.containerInfo),ct(t),null;case 10:return Ha(t.type),ct(t),null;case 19:if(O(Nt),o=t.memoizedState,o===null)return ct(t),null;if(f=(t.flags&128)!==0,d=o.rendering,d===null)if(f)vs(o,!1);else{if(wt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=sc(e),d!==null){for(t.flags|=128,vs(o,!1),e=d.updateQueue,t.updateQueue=e,bc(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)u1(l,e),l=l.sibling;return G(Nt,Nt.current&1|2),qe&&ja(t,o.treeForkCount),t.child}e=e.sibling}o.tail!==null&>()>Ac&&(t.flags|=128,f=!0,vs(o,!1),t.lanes=4194304)}else{if(!f)if(e=sc(d),e!==null){if(t.flags|=128,f=!0,e=e.updateQueue,t.updateQueue=e,bc(t,e),vs(o,!0),o.tail===null&&o.tailMode==="hidden"&&!d.alternate&&!qe)return ct(t),null}else 2*gt()-o.renderingStartTime>Ac&&l!==536870912&&(t.flags|=128,f=!0,vs(o,!1),t.lanes=4194304);o.isBackwards?(d.sibling=t.child,t.child=d):(e=o.last,e!==null?e.sibling=d:t.child=d,o.last=d)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=gt(),e.sibling=null,l=Nt.current,G(Nt,f?l&1|2:l&1),qe&&ja(t,o.treeForkCount),e):(ct(t),null);case 22:case 23:return kn(t),Ed(),o=t.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?(l&536870912)!==0&&(t.flags&128)===0&&(ct(t),t.subtreeFlags&6&&(t.flags|=8192)):ct(t),l=t.updateQueue,l!==null&&bc(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),o=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),o!==l&&(t.flags|=2048),e!==null&&O(Jl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Ha(Mt),ct(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function l4(e,t){switch(rd(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ha(Mt),me(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ke(t),null;case 31:if(t.memoizedState!==null){if(kn(t),t.alternate===null)throw Error(s(340));Ql()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(kn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Ql()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return O(Nt),null;case 4:return me(),null;case 10:return Ha(t.type),null;case 22:case 23:return kn(t),Ed(),e!==null&&O(Jl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ha(Mt),null;case 25:return null;default:return null}}function Hx(e,t){switch(rd(t),t.tag){case 3:Ha(Mt),me();break;case 26:case 27:case 5:ke(t);break;case 4:me();break;case 31:t.memoizedState!==null&&kn(t);break;case 13:kn(t);break;case 19:O(Nt);break;case 10:Ha(t.type);break;case 22:case 23:kn(t),Ed(),e!==null&&O(Jl);break;case 24:Ha(Mt)}}function bs(e,t){try{var l=t.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var f=o.next;l=f;do{if((l.tag&e)===e){o=void 0;var d=l.create,w=l.inst;o=d(),w.destroy=o}l=l.next}while(l!==f)}}catch(M){We(t,t.return,M)}}function pl(e,t,l){try{var o=t.updateQueue,f=o!==null?o.lastEffect:null;if(f!==null){var d=f.next;o=d;do{if((o.tag&e)===e){var w=o.inst,M=w.destroy;if(M!==void 0){w.destroy=void 0,f=t;var V=l,ee=M;try{ee()}catch(oe){We(f,V,oe)}}}o=o.next}while(o!==d)}}catch(oe){We(t,t.return,oe)}}function Bx(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{T1(t,l)}catch(o){We(e,e.return,o)}}}function Ux(e,t,l){l.props=ni(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(o){We(e,t,o)}}function Ss(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof l=="function"?e.refCleanup=l(o):l.current=o}}catch(f){We(e,t,f)}}function va(e,t){var l=e.ref,o=e.refCleanup;if(l!==null)if(typeof o=="function")try{o()}catch(f){We(e,t,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(f){We(e,t,f)}else l.current=null}function Vx(e){var t=e.type,l=e.memoizedProps,o=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&o.focus();break e;case"img":l.src?o.src=l.src:l.srcSet&&(o.srcset=l.srcSet)}}catch(f){We(e,e.return,f)}}function th(e,t,l){try{var o=e.stateNode;N4(o,e.type,l,t),o[ot]=t}catch(f){We(e,e.return,f)}}function $x(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Sl(e.type)||e.tag===4}function nh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$x(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&&Sl(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 ah(e,t,l){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Da));else if(o!==4&&(o===27&&Sl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(ah(e,t,l),e=e.sibling;e!==null;)ah(e,t,l),e=e.sibling}function Sc(e,t,l){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(o!==4&&(o===27&&Sl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Sc(e,t,l),e=e.sibling;e!==null;)Sc(e,t,l),e=e.sibling}function Yx(e){var t=e.stateNode,l=e.memoizedProps;try{for(var o=e.type,f=t.attributes;f.length;)t.removeAttributeNode(f[0]);Zt(t,o,l),t[bt]=e,t[ot]=l}catch(d){We(e,e.return,d)}}var Ya=!1,Ot=!1,lh=!1,qx=typeof WeakSet=="function"?WeakSet:Set,Ut=null;function i4(e,t){if(e=e.containerInfo,Ah=Yc,e=t1(e),Jf(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var o=l.getSelection&&l.getSelection();if(o&&o.rangeCount!==0){l=o.anchorNode;var f=o.anchorOffset,d=o.focusNode;o=o.focusOffset;try{l.nodeType,d.nodeType}catch{l=null;break e}var w=0,M=-1,V=-1,ee=0,oe=0,ce=e,te=null;t:for(;;){for(var ne;ce!==l||f!==0&&ce.nodeType!==3||(M=w+f),ce!==d||o!==0&&ce.nodeType!==3||(V=w+o),ce.nodeType===3&&(w+=ce.nodeValue.length),(ne=ce.firstChild)!==null;)te=ce,ce=ne;for(;;){if(ce===e)break t;if(te===l&&++ee===f&&(M=w),te===d&&++oe===o&&(V=w),(ne=ce.nextSibling)!==null)break;ce=te,te=ce.parentNode}ce=ne}l=M===-1||V===-1?null:{start:M,end:V}}else l=null}l=l||{start:0,end:0}}else l=null;for(Nh={focusedElem:e,selectionRange:l},Yc=!1,Ut=t;Ut!==null;)if(t=Ut,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ut=e;else for(;Ut!==null;){switch(t=Ut,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)f=e[l],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,l=t,f=d.memoizedProps,d=d.memoizedState,o=l.stateNode;try{var xe=ni(l.type,f);e=o.getSnapshotBeforeUpdate(xe,d),o.__reactInternalSnapshotBeforeUpdate=e}catch(Te){We(l,l.return,Te)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Ch(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Ch(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(s(163))}if(e=t.sibling,e!==null){e.return=t.return,Ut=e;break}Ut=t.return}}function Xx(e,t,l){var o=l.flags;switch(l.tag){case 0:case 11:case 15:Xa(e,l),o&4&&bs(5,l);break;case 1:if(Xa(e,l),o&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(w){We(l,l.return,w)}else{var f=ni(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(f,t,e.__reactInternalSnapshotBeforeUpdate)}catch(w){We(l,l.return,w)}}o&64&&Bx(l),o&512&&Ss(l,l.return);break;case 3:if(Xa(e,l),o&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{T1(e,t)}catch(w){We(l,l.return,w)}}break;case 27:t===null&&o&4&&Yx(l);case 26:case 5:Xa(e,l),t===null&&o&4&&Vx(l),o&512&&Ss(l,l.return);break;case 12:Xa(e,l);break;case 31:Xa(e,l),o&4&&Ix(e,l);break;case 13:Xa(e,l),o&4&&Qx(e,l),o&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=p4.bind(null,l),R4(e,l))));break;case 22:if(o=l.memoizedState!==null||Ya,!o){t=t!==null&&t.memoizedState!==null||Ot,f=Ya;var d=Ot;Ya=o,(Ot=t)&&!d?Ga(e,l,(l.subtreeFlags&8772)!==0):Xa(e,l),Ya=f,Ot=d}break;case 30:break;default:Xa(e,l)}}function Gx(e){var t=e.alternate;t!==null&&(e.alternate=null,Gx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&q(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var pt=null,hn=!1;function qa(e,t,l){for(l=l.child;l!==null;)Zx(e,t,l),l=l.sibling}function Zx(e,t,l){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(rn,l)}catch{}switch(l.tag){case 26:Ot||va(l,t),qa(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ot||va(l,t);var o=pt,f=hn;Sl(l.type)&&(pt=l.stateNode,hn=!1),qa(e,t,l),Ms(l.stateNode),pt=o,hn=f;break;case 5:Ot||va(l,t);case 6:if(o=pt,f=hn,pt=null,qa(e,t,l),pt=o,hn=f,pt!==null)if(hn)try{(pt.nodeType===9?pt.body:pt.nodeName==="HTML"?pt.ownerDocument.body:pt).removeChild(l.stateNode)}catch(d){We(l,t,d)}else try{pt.removeChild(l.stateNode)}catch(d){We(l,t,d)}break;case 18:pt!==null&&(hn?(e=pt,Bv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),io(e)):Bv(pt,l.stateNode));break;case 4:o=pt,f=hn,pt=l.stateNode.containerInfo,hn=!0,qa(e,t,l),pt=o,hn=f;break;case 0:case 11:case 14:case 15:pl(2,l,t),Ot||pl(4,l,t),qa(e,t,l);break;case 1:Ot||(va(l,t),o=l.stateNode,typeof o.componentWillUnmount=="function"&&Ux(l,t,o)),qa(e,t,l);break;case 21:qa(e,t,l);break;case 22:Ot=(o=Ot)||l.memoizedState!==null,qa(e,t,l),Ot=o;break;default:qa(e,t,l)}}function Ix(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{io(e)}catch(l){We(t,t.return,l)}}}function Qx(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{io(e)}catch(l){We(t,t.return,l)}}function o4(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new qx),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new qx),t;default:throw Error(s(435,e.tag))}}function wc(e,t){var l=o4(e);t.forEach(function(o){if(!l.has(o)){l.add(o);var f=g4.bind(null,e,o);o.then(f,f)}})}function pn(e,t){var l=t.deletions;if(l!==null)for(var o=0;o<l.length;o++){var f=l[o],d=e,w=t,M=w;e:for(;M!==null;){switch(M.tag){case 27:if(Sl(M.type)){pt=M.stateNode,hn=!1;break e}break;case 5:pt=M.stateNode,hn=!1;break e;case 3:case 4:pt=M.stateNode.containerInfo,hn=!0;break e}M=M.return}if(pt===null)throw Error(s(160));Zx(d,w,f),pt=null,hn=!1,d=f.alternate,d!==null&&(d.return=null),f.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Kx(t,e),t=t.sibling}var ia=null;function Kx(e,t){var l=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pn(t,e),gn(e),o&4&&(pl(3,e,e.return),bs(3,e),pl(5,e,e.return));break;case 1:pn(t,e),gn(e),o&512&&(Ot||l===null||va(l,l.return)),o&64&&Ya&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?o:l.concat(o))));break;case 26:var f=ia;if(pn(t,e),gn(e),o&512&&(Ot||l===null||va(l,l.return)),o&4){var d=l!==null?l.memoizedState:null;if(o=e.memoizedState,l===null)if(o===null)if(e.stateNode===null){e:{o=e.type,l=e.memoizedProps,f=f.ownerDocument||f;t:switch(o){case"title":d=f.getElementsByTagName("title")[0],(!d||d[ve]||d[bt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=f.createElement(o),f.head.insertBefore(d,f.querySelector("head > title"))),Zt(d,o,l),d[bt]=e,De(d),o=d;break e;case"link":var w=Kv("link","href",f).get(o+(l.href||""));if(w){for(var M=0;M<w.length;M++)if(d=w[M],d.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&d.getAttribute("rel")===(l.rel==null?null:l.rel)&&d.getAttribute("title")===(l.title==null?null:l.title)&&d.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){w.splice(M,1);break t}}d=f.createElement(o),Zt(d,o,l),f.head.appendChild(d);break;case"meta":if(w=Kv("meta","content",f).get(o+(l.content||""))){for(M=0;M<w.length;M++)if(d=w[M],d.getAttribute("content")===(l.content==null?null:""+l.content)&&d.getAttribute("name")===(l.name==null?null:l.name)&&d.getAttribute("property")===(l.property==null?null:l.property)&&d.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&d.getAttribute("charset")===(l.charSet==null?null:l.charSet)){w.splice(M,1);break t}}d=f.createElement(o),Zt(d,o,l),f.head.appendChild(d);break;default:throw Error(s(468,o))}d[bt]=e,De(d),o=d}e.stateNode=o}else Fv(f,e.type,e.stateNode);else e.stateNode=Qv(f,o,e.memoizedProps);else d!==o?(d===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):d.count--,o===null?Fv(f,e.type,e.stateNode):Qv(f,o,e.memoizedProps)):o===null&&e.stateNode!==null&&th(e,e.memoizedProps,l.memoizedProps)}break;case 27:pn(t,e),gn(e),o&512&&(Ot||l===null||va(l,l.return)),l!==null&&o&4&&th(e,e.memoizedProps,l.memoizedProps);break;case 5:if(pn(t,e),gn(e),o&512&&(Ot||l===null||va(l,l.return)),e.flags&32){f=e.stateNode;try{Ti(f,"")}catch(xe){We(e,e.return,xe)}}o&4&&e.stateNode!=null&&(f=e.memoizedProps,th(e,f,l!==null?l.memoizedProps:f)),o&1024&&(lh=!0);break;case 6:if(pn(t,e),gn(e),o&4){if(e.stateNode===null)throw Error(s(162));o=e.memoizedProps,l=e.stateNode;try{l.nodeValue=o}catch(xe){We(e,e.return,xe)}}break;case 3:if(Bc=null,f=ia,ia=Lc(t.containerInfo),pn(t,e),ia=f,gn(e),o&4&&l!==null&&l.memoizedState.isDehydrated)try{io(t.containerInfo)}catch(xe){We(e,e.return,xe)}lh&&(lh=!1,Fx(e));break;case 4:o=ia,ia=Lc(e.stateNode.containerInfo),pn(t,e),gn(e),ia=o;break;case 12:pn(t,e),gn(e);break;case 31:pn(t,e),gn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,wc(e,o)));break;case 13:pn(t,e),gn(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(_c=gt()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,wc(e,o)));break;case 22:f=e.memoizedState!==null;var V=l!==null&&l.memoizedState!==null,ee=Ya,oe=Ot;if(Ya=ee||f,Ot=oe||V,pn(t,e),Ot=oe,Ya=ee,gn(e),o&8192)e:for(t=e.stateNode,t._visibility=f?t._visibility&-2:t._visibility|1,f&&(l===null||V||Ya||Ot||ai(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){V=l=t;try{if(d=V.stateNode,f)w=d.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{M=V.stateNode;var ce=V.memoizedProps.style,te=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;M.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(xe){We(V,V.return,xe)}}}else if(t.tag===6){if(l===null){V=t;try{V.stateNode.nodeValue=f?"":V.memoizedProps}catch(xe){We(V,V.return,xe)}}}else if(t.tag===18){if(l===null){V=t;try{var ne=V.stateNode;f?Uv(ne,!0):Uv(V.stateNode,!1)}catch(xe){We(V,V.return,xe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}o&4&&(o=e.updateQueue,o!==null&&(l=o.retryQueue,l!==null&&(o.retryQueue=null,wc(e,l))));break;case 19:pn(t,e),gn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,wc(e,o)));break;case 30:break;case 21:break;default:pn(t,e),gn(e)}}function gn(e){var t=e.flags;if(t&2){try{for(var l,o=e.return;o!==null;){if($x(o)){l=o;break}o=o.return}if(l==null)throw Error(s(160));switch(l.tag){case 27:var f=l.stateNode,d=nh(e);Sc(e,d,f);break;case 5:var w=l.stateNode;l.flags&32&&(Ti(w,""),l.flags&=-33);var M=nh(e);Sc(e,M,w);break;case 3:case 4:var V=l.stateNode.containerInfo,ee=nh(e);ah(e,ee,V);break;default:throw Error(s(161))}}catch(oe){We(e,e.return,oe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Fx(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Fx(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Xa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Xx(e,t.alternate,t),t=t.sibling}function ai(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:pl(4,t,t.return),ai(t);break;case 1:va(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Ux(t,t.return,l),ai(t);break;case 27:Ms(t.stateNode);case 26:case 5:va(t,t.return),ai(t);break;case 22:t.memoizedState===null&&ai(t);break;case 30:ai(t);break;default:ai(t)}e=e.sibling}}function Ga(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,f=e,d=t,w=d.flags;switch(d.tag){case 0:case 11:case 15:Ga(f,d,l),bs(4,d);break;case 1:if(Ga(f,d,l),o=d,f=o.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(ee){We(o,o.return,ee)}if(o=d,f=o.updateQueue,f!==null){var M=o.stateNode;try{var V=f.shared.hiddenCallbacks;if(V!==null)for(f.shared.hiddenCallbacks=null,f=0;f<V.length;f++)k1(V[f],M)}catch(ee){We(o,o.return,ee)}}l&&w&64&&Bx(d),Ss(d,d.return);break;case 27:Yx(d);case 26:case 5:Ga(f,d,l),l&&o===null&&w&4&&Vx(d),Ss(d,d.return);break;case 12:Ga(f,d,l);break;case 31:Ga(f,d,l),l&&w&4&&Ix(f,d);break;case 13:Ga(f,d,l),l&&w&4&&Qx(f,d);break;case 22:d.memoizedState===null&&Ga(f,d,l),Ss(d,d.return);break;case 30:break;default:Ga(f,d,l)}t=t.sibling}}function ih(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&ss(l))}function oh(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ss(e))}function oa(e,t,l,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Jx(e,t,l,o),t=t.sibling}function Jx(e,t,l,o){var f=t.flags;switch(t.tag){case 0:case 11:case 15:oa(e,t,l,o),f&2048&&bs(9,t);break;case 1:oa(e,t,l,o);break;case 3:oa(e,t,l,o),f&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ss(e)));break;case 12:if(f&2048){oa(e,t,l,o),e=t.stateNode;try{var d=t.memoizedProps,w=d.id,M=d.onPostCommit;typeof M=="function"&&M(w,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(V){We(t,t.return,V)}}else oa(e,t,l,o);break;case 31:oa(e,t,l,o);break;case 13:oa(e,t,l,o);break;case 23:break;case 22:d=t.stateNode,w=t.alternate,t.memoizedState!==null?d._visibility&2?oa(e,t,l,o):ws(e,t):d._visibility&2?oa(e,t,l,o):(d._visibility|=2,Qi(e,t,l,o,(t.subtreeFlags&10256)!==0||!1)),f&2048&&ih(w,t);break;case 24:oa(e,t,l,o),f&2048&&oh(t.alternate,t);break;default:oa(e,t,l,o)}}function Qi(e,t,l,o,f){for(f=f&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,w=t,M=l,V=o,ee=w.flags;switch(w.tag){case 0:case 11:case 15:Qi(d,w,M,V,f),bs(8,w);break;case 23:break;case 22:var oe=w.stateNode;w.memoizedState!==null?oe._visibility&2?Qi(d,w,M,V,f):ws(d,w):(oe._visibility|=2,Qi(d,w,M,V,f)),f&&ee&2048&&ih(w.alternate,w);break;case 24:Qi(d,w,M,V,f),f&&ee&2048&&oh(w.alternate,w);break;default:Qi(d,w,M,V,f)}t=t.sibling}}function ws(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,o=t,f=o.flags;switch(o.tag){case 22:ws(l,o),f&2048&&ih(o.alternate,o);break;case 24:ws(l,o),f&2048&&oh(o.alternate,o);break;default:ws(l,o)}t=t.sibling}}var Es=8192;function Ki(e,t,l){if(e.subtreeFlags&Es)for(e=e.child;e!==null;)Px(e,t,l),e=e.sibling}function Px(e,t,l){switch(e.tag){case 26:Ki(e,t,l),e.flags&Es&&e.memoizedState!==null&&Z4(l,ia,e.memoizedState,e.memoizedProps);break;case 5:Ki(e,t,l);break;case 3:case 4:var o=ia;ia=Lc(e.stateNode.containerInfo),Ki(e,t,l),ia=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=Es,Es=16777216,Ki(e,t,l),Es=o):Ki(e,t,l));break;default:Ki(e,t,l)}}function Wx(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function _s(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var o=t[l];Ut=o,tv(o,e)}Wx(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ev(e),e=e.sibling}function ev(e){switch(e.tag){case 0:case 11:case 15:_s(e),e.flags&2048&&pl(9,e,e.return);break;case 3:_s(e);break;case 12:_s(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ec(e)):_s(e);break;default:_s(e)}}function Ec(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var o=t[l];Ut=o,tv(o,e)}Wx(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:pl(8,t,t.return),Ec(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Ec(t));break;default:Ec(t)}e=e.sibling}}function tv(e,t){for(;Ut!==null;){var l=Ut;switch(l.tag){case 0:case 11:case 15:pl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var o=l.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:ss(l.memoizedState.cache)}if(o=l.child,o!==null)o.return=l,Ut=o;else e:for(l=e;Ut!==null;){o=Ut;var f=o.sibling,d=o.return;if(Gx(o),o===l){Ut=null;break e}if(f!==null){f.return=d,Ut=f;break e}Ut=d}}}var s4={getCacheForType:function(e){var t=Xt(Mt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Xt(Mt).controller.signal}},r4=typeof WeakMap=="function"?WeakMap:Map,Ke=0,it=null,He=null,Ue=0,Pe=0,Tn=null,gl=!1,Fi=!1,sh=!1,Za=0,wt=0,ml=0,li=0,rh=0,Cn=0,Ji=0,As=null,mn=null,ch=!1,_c=0,nv=0,Ac=1/0,Nc=null,yl=null,Ht=0,xl=null,Pi=null,Ia=0,uh=0,fh=null,av=null,Ns=0,dh=null;function Mn(){return(Ke&2)!==0&&Ue!==0?Ue&-Ue:k.T!==null?xh():Rn()}function lv(){if(Cn===0)if((Ue&536870912)===0||qe){var e=yt;yt<<=1,(yt&3932160)===0&&(yt=262144),Cn=e}else Cn=536870912;return e=Nn.current,e!==null&&(e.flags|=32),Cn}function yn(e,t,l){(e===it&&(Pe===2||Pe===9)||e.cancelPendingCommit!==null)&&(Wi(e,0),vl(e,Ue,Cn,!1)),Dn(e,l),((Ke&2)===0||e!==it)&&(e===it&&((Ke&2)===0&&(li|=l),wt===4&&vl(e,Ue,Cn,!1)),ba(e))}function iv(e,t,l){if((Ke&6)!==0)throw Error(s(327));var o=!l&&(t&127)===0&&(t&e.expiredLanes)===0||na(e,t),f=o?f4(e,t):ph(e,t,!0),d=o;do{if(f===0){Fi&&!o&&vl(e,t,0,!1);break}else{if(l=e.current.alternate,d&&!c4(l)){f=ph(e,t,!1),d=!1;continue}if(f===2){if(d=t,e.errorRecoveryDisabledLanes&d)var w=0;else w=e.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){t=w;e:{var M=e;f=As;var V=M.current.memoizedState.isDehydrated;if(V&&(Wi(M,w).flags|=256),w=ph(M,w,!1),w!==2){if(sh&&!V){M.errorRecoveryDisabledLanes|=d,li|=d,f=4;break e}d=mn,mn=f,d!==null&&(mn===null?mn=d:mn.push.apply(mn,d))}f=w}if(d=!1,f!==2)continue}}if(f===1){Wi(e,0),vl(e,t,0,!0);break}e:{switch(o=e,d=f,d){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:vl(o,t,Cn,!gl);break e;case 2:mn=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(f=_c+300-gt(),10<f)){if(vl(o,t,Cn,!gl),En(o,0,!0)!==0)break e;Ia=t,o.timeoutHandle=Lv(ov.bind(null,o,l,mn,Nc,ch,t,Cn,li,Ji,gl,d,"Throttled",-0,0),f);break e}ov(o,l,mn,Nc,ch,t,Cn,li,Ji,gl,d,null,-0,0)}}break}while(!0);ba(e)}function ov(e,t,l,o,f,d,w,M,V,ee,oe,ce,te,ne){if(e.timeoutHandle=-1,ce=t.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Da},Px(t,d,ce);var xe=(d&62914560)===d?_c-gt():(d&4194048)===d?nv-gt():0;if(xe=I4(ce,xe),xe!==null){Ia=d,e.cancelPendingCommit=xe(pv.bind(null,e,t,d,l,o,f,w,M,V,oe,ce,null,te,ne)),vl(e,d,w,!ee);return}}pv(e,t,d,l,o,f,w,M,V)}function c4(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var o=0;o<l.length;o++){var f=l[o],d=f.getSnapshot;f=f.value;try{if(!_n(d(),f))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function vl(e,t,l,o){t&=~rh,t&=~li,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var f=t;0<f;){var d=31-dt(f),w=1<<d;o[d]=-1,f&=~w}l!==0&&Ca(e,l,t)}function kc(){return(Ke&6)===0?(ks(0),!1):!0}function hh(){if(He!==null){if(Pe===0)var e=He.return;else e=He,La=Kl=null,Cd(e),qi=null,cs=0,e=He;for(;e!==null;)Hx(e.alternate,e),e=e.return;He=null}}function Wi(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,C4(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Ia=0,hh(),it=e,He=l=Ra(e.current,null),Ue=t,Pe=0,Tn=null,gl=!1,Fi=na(e,t),sh=!1,Ji=Cn=rh=li=ml=wt=0,mn=As=null,ch=!1,(t&8)!==0&&(t|=t&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=t;0<o;){var f=31-dt(o),d=1<<f;t|=e[f],o&=~d}return Za=t,Qr(),l}function sv(e,t){ze=null,k.H=ys,t===Yi||t===nc?(t=E1(),Pe=3):t===yd?(t=E1(),Pe=4):Pe=t===Gd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Tn=t,He===null&&(wt=1,mc(e,Bn(t,e.current)))}function rv(){var e=Nn.current;return e===null?!0:(Ue&4194048)===Ue?Yn===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?e===Yn:!1}function cv(){var e=k.H;return k.H=ys,e===null?ys:e}function uv(){var e=k.A;return k.A=s4,e}function Tc(){wt=4,gl||(Ue&4194048)!==Ue&&Nn.current!==null||(Fi=!0),(ml&134217727)===0&&(li&134217727)===0||it===null||vl(it,Ue,Cn,!1)}function ph(e,t,l){var o=Ke;Ke|=2;var f=cv(),d=uv();(it!==e||Ue!==t)&&(Nc=null,Wi(e,t)),t=!1;var w=wt;e:do try{if(Pe!==0&&He!==null){var M=He,V=Tn;switch(Pe){case 8:hh(),w=6;break e;case 3:case 2:case 9:case 6:Nn.current===null&&(t=!0);var ee=Pe;if(Pe=0,Tn=null,eo(e,M,V,ee),l&&Fi){w=0;break e}break;default:ee=Pe,Pe=0,Tn=null,eo(e,M,V,ee)}}u4(),w=wt;break}catch(oe){sv(e,oe)}while(!0);return t&&e.shellSuspendCounter++,La=Kl=null,Ke=o,k.H=f,k.A=d,He===null&&(it=null,Ue=0,Qr()),w}function u4(){for(;He!==null;)fv(He)}function f4(e,t){var l=Ke;Ke|=2;var o=cv(),f=uv();it!==e||Ue!==t?(Nc=null,Ac=gt()+500,Wi(e,t)):Fi=na(e,t);e:do try{if(Pe!==0&&He!==null){t=He;var d=Tn;t:switch(Pe){case 1:Pe=0,Tn=null,eo(e,t,d,1);break;case 2:case 9:if(S1(d)){Pe=0,Tn=null,dv(t);break}t=function(){Pe!==2&&Pe!==9||it!==e||(Pe=7),ba(e)},d.then(t,t);break e;case 3:Pe=7;break e;case 4:Pe=5;break e;case 7:S1(d)?(Pe=0,Tn=null,dv(t)):(Pe=0,Tn=null,eo(e,t,d,7));break;case 5:var w=null;switch(He.tag){case 26:w=He.memoizedState;case 5:case 27:var M=He;if(w?Jv(w):M.stateNode.complete){Pe=0,Tn=null;var V=M.sibling;if(V!==null)He=V;else{var ee=M.return;ee!==null?(He=ee,Cc(ee)):He=null}break t}}Pe=0,Tn=null,eo(e,t,d,5);break;case 6:Pe=0,Tn=null,eo(e,t,d,6);break;case 8:hh(),wt=6;break e;default:throw Error(s(462))}}d4();break}catch(oe){sv(e,oe)}while(!0);return La=Kl=null,k.H=o,k.A=f,Ke=l,He!==null?0:(it=null,Ue=0,Qr(),wt)}function d4(){for(;He!==null&&!wn();)fv(He)}function fv(e){var t=jx(e.alternate,e,Za);e.memoizedProps=e.pendingProps,t===null?Cc(e):He=t}function dv(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Cx(l,t,t.pendingProps,t.type,void 0,Ue);break;case 11:t=Cx(l,t,t.pendingProps,t.type.render,t.ref,Ue);break;case 5:Cd(t);default:Hx(l,t),t=He=u1(t,Za),t=jx(l,t,Za)}e.memoizedProps=e.pendingProps,t===null?Cc(e):He=t}function eo(e,t,l,o){La=Kl=null,Cd(t),qi=null,cs=0;var f=t.return;try{if(e4(e,f,t,l,Ue)){wt=1,mc(e,Bn(l,e.current)),He=null;return}}catch(d){if(f!==null)throw He=f,d;wt=1,mc(e,Bn(l,e.current)),He=null;return}t.flags&32768?(qe||o===1?e=!0:Fi||(Ue&536870912)!==0?e=!1:(gl=e=!0,(o===2||o===9||o===3||o===6)&&(o=Nn.current,o!==null&&o.tag===13&&(o.flags|=16384))),hv(t,e)):Cc(t)}function Cc(e){var t=e;do{if((t.flags&32768)!==0){hv(t,gl);return}e=t.return;var l=a4(t.alternate,t,Za);if(l!==null){He=l;return}if(t=t.sibling,t!==null){He=t;return}He=t=e}while(t!==null);wt===0&&(wt=5)}function hv(e,t){do{var l=l4(e.alternate,e);if(l!==null){l.flags&=32767,He=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){He=e;return}He=e=l}while(e!==null);wt=6,He=null}function pv(e,t,l,o,f,d,w,M,V){e.cancelPendingCommit=null;do Mc();while(Ht!==0);if((Ke&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(d=t.lanes|t.childLanes,d|=nd,ma(e,l,d,w,M,V),e===it&&(He=it=null,Ue=0),Pi=t,xl=e,Ia=l,uh=d,fh=f,av=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,m4(Rt,function(){return vv(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=k.T,k.T=null,f=L.p,L.p=2,w=Ke,Ke|=4;try{i4(e,t,l)}finally{Ke=w,L.p=f,k.T=o}}Ht=1,gv(),mv(),yv()}}function gv(){if(Ht===1){Ht=0;var e=xl,t=Pi,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=k.T,k.T=null;var o=L.p;L.p=2;var f=Ke;Ke|=4;try{Kx(t,e);var d=Nh,w=t1(e.containerInfo),M=d.focusedElem,V=d.selectionRange;if(w!==M&&M&&M.ownerDocument&&e1(M.ownerDocument.documentElement,M)){if(V!==null&&Jf(M)){var ee=V.start,oe=V.end;if(oe===void 0&&(oe=ee),"selectionStart"in M)M.selectionStart=ee,M.selectionEnd=Math.min(oe,M.value.length);else{var ce=M.ownerDocument||document,te=ce&&ce.defaultView||window;if(te.getSelection){var ne=te.getSelection(),xe=M.textContent.length,Te=Math.min(V.start,xe),lt=V.end===void 0?Te:Math.min(V.end,xe);!ne.extend&&Te>lt&&(w=lt,lt=Te,Te=w);var Q=Wy(M,Te),X=Wy(M,lt);if(Q&&X&&(ne.rangeCount!==1||ne.anchorNode!==Q.node||ne.anchorOffset!==Q.offset||ne.focusNode!==X.node||ne.focusOffset!==X.offset)){var W=ce.createRange();W.setStart(Q.node,Q.offset),ne.removeAllRanges(),Te>lt?(ne.addRange(W),ne.extend(X.node,X.offset)):(W.setEnd(X.node,X.offset),ne.addRange(W))}}}}for(ce=[],ne=M;ne=ne.parentNode;)ne.nodeType===1&&ce.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<ce.length;M++){var re=ce[M];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}Yc=!!Ah,Nh=Ah=null}finally{Ke=f,L.p=o,k.T=l}}e.current=t,Ht=2}}function mv(){if(Ht===2){Ht=0;var e=xl,t=Pi,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=k.T,k.T=null;var o=L.p;L.p=2;var f=Ke;Ke|=4;try{Xx(e,t.alternate,t)}finally{Ke=f,L.p=o,k.T=l}}Ht=3}}function yv(){if(Ht===4||Ht===3){Ht=0,_t();var e=xl,t=Pi,l=Ia,o=av;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ht=5:(Ht=0,Pi=xl=null,xv(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(yl=null),Yt(l),t=t.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(rn,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=k.T,f=L.p,L.p=2,k.T=null;try{for(var d=e.onRecoverableError,w=0;w<o.length;w++){var M=o[w];d(M.value,{componentStack:M.stack})}}finally{k.T=t,L.p=f}}(Ia&3)!==0&&Mc(),ba(e),f=e.pendingLanes,(l&261930)!==0&&(f&42)!==0?e===dh?Ns++:(Ns=0,dh=e):Ns=0,ks(0)}}function xv(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ss(t)))}function Mc(){return gv(),mv(),yv(),vv()}function vv(){if(Ht!==5)return!1;var e=xl,t=uh;uh=0;var l=Yt(Ia),o=k.T,f=L.p;try{L.p=32>l?32:l,k.T=null,l=fh,fh=null;var d=xl,w=Ia;if(Ht=0,Pi=xl=null,Ia=0,(Ke&6)!==0)throw Error(s(331));var M=Ke;if(Ke|=4,ev(d.current),Jx(d,d.current,w,l),Ke=M,ks(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(rn,d)}catch{}return!0}finally{L.p=f,k.T=o,xv(e,t)}}function bv(e,t,l){t=Bn(l,t),t=Xd(e.stateNode,t,2),e=fl(e,t,2),e!==null&&(Dn(e,2),ba(e))}function We(e,t,l){if(e.tag===3)bv(e,e,l);else for(;t!==null;){if(t.tag===3){bv(t,e,l);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(yl===null||!yl.has(o))){e=Bn(l,e),l=Sx(2),o=fl(t,l,2),o!==null&&(wx(l,o,t,e),Dn(o,2),ba(o));break}}t=t.return}}function gh(e,t,l){var o=e.pingCache;if(o===null){o=e.pingCache=new r4;var f=new Set;o.set(t,f)}else f=o.get(t),f===void 0&&(f=new Set,o.set(t,f));f.has(l)||(sh=!0,f.add(l),e=h4.bind(null,e,t,l),t.then(e,e))}function h4(e,t,l){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,it===e&&(Ue&l)===l&&(wt===4||wt===3&&(Ue&62914560)===Ue&&300>gt()-_c?(Ke&2)===0&&Wi(e,0):rh|=l,Ji===Ue&&(Ji=0)),ba(e)}function Sv(e,t){t===0&&(t=Ft()),e=Zl(e,t),e!==null&&(Dn(e,t),ba(e))}function p4(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Sv(e,l)}function g4(e,t){var l=0;switch(e.tag){case 31:case 13:var o=e.stateNode,f=e.memoizedState;f!==null&&(l=f.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(s(314))}o!==null&&o.delete(t),Sv(e,l)}function m4(e,t){return et(e,t)}var zc=null,to=null,mh=!1,Dc=!1,yh=!1,bl=0;function ba(e){e!==to&&e.next===null&&(to===null?zc=to=e:to=to.next=e),Dc=!0,mh||(mh=!0,x4())}function ks(e,t){if(!yh&&Dc){yh=!0;do for(var l=!1,o=zc;o!==null;){if(e!==0){var f=o.pendingLanes;if(f===0)var d=0;else{var w=o.suspendedLanes,M=o.pingedLanes;d=(1<<31-dt(42|e)+1)-1,d&=f&~(w&~M),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(l=!0,Av(o,d))}else d=Ue,d=En(o,o===it?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(d&3)===0||na(o,d)||(l=!0,Av(o,d));o=o.next}while(l);yh=!1}}function y4(){wv()}function wv(){Dc=mh=!1;var e=0;bl!==0&&T4()&&(e=bl);for(var t=gt(),l=null,o=zc;o!==null;){var f=o.next,d=Ev(o,t);d===0?(o.next=null,l===null?zc=f:l.next=f,f===null&&(to=l)):(l=o,(e!==0||(d&3)!==0)&&(Dc=!0)),o=f}Ht!==0&&Ht!==5||ks(e),bl!==0&&(bl=0)}function Ev(e,t){for(var l=e.suspendedLanes,o=e.pingedLanes,f=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var w=31-dt(d),M=1<<w,V=f[w];V===-1?((M&l)===0||(M&o)!==0)&&(f[w]=ht(M,t)):V<=t&&(e.expiredLanes|=M),d&=~M}if(t=it,l=Ue,l=En(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,l===0||e===t&&(Pe===2||Pe===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&on(o),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||na(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(o!==null&&on(o),Yt(l)){case 2:case 8:l=$t;break;case 32:l=Rt;break;case 268435456:l=ea;break;default:l=Rt}return o=_v.bind(null,e),l=et(l,o),e.callbackPriority=t,e.callbackNode=l,t}return o!==null&&o!==null&&on(o),e.callbackPriority=2,e.callbackNode=null,2}function _v(e,t){if(Ht!==0&&Ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Mc()&&e.callbackNode!==l)return null;var o=Ue;return o=En(e,e===it?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(iv(e,o,t),Ev(e,gt()),e.callbackNode!=null&&e.callbackNode===l?_v.bind(null,e):null)}function Av(e,t){if(Mc())return null;iv(e,t,!0)}function x4(){M4(function(){(Ke&6)!==0?et(Bt,y4):wv()})}function xh(){if(bl===0){var e=Vi;e===0&&(e=tt,tt<<=1,(tt&261888)===0&&(tt=256)),bl=e}return bl}function Nv(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Vr(""+e)}function kv(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function v4(e,t,l,o,f){if(t==="submit"&&l&&l.stateNode===f){var d=Nv((f[ot]||null).action),w=o.submitter;w&&(t=(t=w[ot]||null)?Nv(t.formAction):w.getAttribute("formAction"),t!==null&&(d=t,w=null));var M=new Xr("action","action",null,o,f);e.push({event:M,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(bl!==0){var V=w?kv(f,w):new FormData(f);Bd(l,{pending:!0,data:V,method:f.method,action:d},null,V)}}else typeof d=="function"&&(M.preventDefault(),V=w?kv(f,w):new FormData(f),Bd(l,{pending:!0,data:V,method:f.method,action:d},d,V))},currentTarget:f}]})}}for(var vh=0;vh<td.length;vh++){var bh=td[vh],b4=bh.toLowerCase(),S4=bh[0].toUpperCase()+bh.slice(1);la(b4,"on"+S4)}la(l1,"onAnimationEnd"),la(i1,"onAnimationIteration"),la(o1,"onAnimationStart"),la("dblclick","onDoubleClick"),la("focusin","onFocus"),la("focusout","onBlur"),la(HC,"onTransitionRun"),la(BC,"onTransitionStart"),la(UC,"onTransitionCancel"),la(s1,"onTransitionEnd"),Ln("onMouseEnter",["mouseout","mouseover"]),Ln("onMouseLeave",["mouseout","mouseover"]),Ln("onPointerEnter",["pointerout","pointerover"]),Ln("onPointerLeave",["pointerout","pointerover"]),Jt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Jt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Jt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Jt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Jt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Jt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ts="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(" "),w4=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ts));function Tv(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var o=e[l],f=o.event;o=o.listeners;e:{var d=void 0;if(t)for(var w=o.length-1;0<=w;w--){var M=o[w],V=M.instance,ee=M.currentTarget;if(M=M.listener,V!==d&&f.isPropagationStopped())break e;d=M,f.currentTarget=ee;try{d(f)}catch(oe){Ir(oe)}f.currentTarget=null,d=V}else for(w=0;w<o.length;w++){if(M=o[w],V=M.instance,ee=M.currentTarget,M=M.listener,V!==d&&f.isPropagationStopped())break e;d=M,f.currentTarget=ee;try{d(f)}catch(oe){Ir(oe)}f.currentTarget=null,d=V}}}}function Be(e,t){var l=t[za];l===void 0&&(l=t[za]=new Set);var o=e+"__bubble";l.has(o)||(Cv(t,e,2,!1),l.add(o))}function Sh(e,t,l){var o=0;t&&(o|=4),Cv(l,e,o,t)}var Oc="_reactListening"+Math.random().toString(36).slice(2);function wh(e){if(!e[Oc]){e[Oc]=!0,Lt.forEach(function(l){l!=="selectionchange"&&(w4.has(l)||Sh(l,!1,e),Sh(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Oc]||(t[Oc]=!0,Sh("selectionchange",!1,t))}}function Cv(e,t,l,o){switch(lb(t)){case 2:var f=F4;break;case 8:f=J4;break;default:f=Hh}l=f.bind(null,t,l,e),f=void 0,!Yf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(f=!0),o?f!==void 0?e.addEventListener(t,l,{capture:!0,passive:f}):e.addEventListener(t,l,!0):f!==void 0?e.addEventListener(t,l,{passive:f}):e.addEventListener(t,l,!1)}function Eh(e,t,l,o,f){var d=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var w=o.tag;if(w===3||w===4){var M=o.stateNode.containerInfo;if(M===f)break;if(w===4)for(w=o.return;w!==null;){var V=w.tag;if((V===3||V===4)&&w.stateNode.containerInfo===f)return;w=w.return}for(;M!==null;){if(w=pe(M),w===null)return;if(V=w.tag,V===5||V===6||V===26||V===27){o=d=w;continue e}M=M.parentNode}}o=o.return}Ry(function(){var ee=d,oe=Vf(l),ce=[];e:{var te=r1.get(e);if(te!==void 0){var ne=Xr,xe=e;switch(e){case"keypress":if(Yr(l)===0)break e;case"keydown":case"keyup":ne=gC;break;case"focusin":xe="focus",ne=Zf;break;case"focusout":xe="blur",ne=Zf;break;case"beforeblur":case"afterblur":ne=Zf;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=Hy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=aC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=xC;break;case l1:case i1:case o1:ne=oC;break;case s1:ne=bC;break;case"scroll":case"scrollend":ne=tC;break;case"wheel":ne=wC;break;case"copy":case"cut":case"paste":ne=rC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=Uy;break;case"toggle":case"beforetoggle":ne=_C}var Te=(t&4)!==0,lt=!Te&&(e==="scroll"||e==="scrollend"),Q=Te?te!==null?te+"Capture":null:te;Te=[];for(var X=ee,W;X!==null;){var re=X;if(W=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||W===null||Q===null||(re=Fo(X,Q),re!=null&&Te.push(Cs(X,re,W))),lt)break;X=X.return}0<Te.length&&(te=new ne(te,xe,null,l,oe),ce.push({event:te,listeners:Te}))}}if((t&7)===0){e:{if(te=e==="mouseover"||e==="pointerover",ne=e==="mouseout"||e==="pointerout",te&&l!==Uf&&(xe=l.relatedTarget||l.fromElement)&&(pe(xe)||xe[jn]))break e;if((ne||te)&&(te=oe.window===oe?oe:(te=oe.ownerDocument)?te.defaultView||te.parentWindow:window,ne?(xe=l.relatedTarget||l.toElement,ne=ee,xe=xe?pe(xe):null,xe!==null&&(lt=c(xe),Te=xe.tag,xe!==lt||Te!==5&&Te!==27&&Te!==6)&&(xe=null)):(ne=null,xe=ee),ne!==xe)){if(Te=Hy,re="onMouseLeave",Q="onMouseEnter",X="mouse",(e==="pointerout"||e==="pointerover")&&(Te=Uy,re="onPointerLeave",Q="onPointerEnter",X="pointer"),lt=ne==null?te:Xe(ne),W=xe==null?te:Xe(xe),te=new Te(re,X+"leave",ne,l,oe),te.target=lt,te.relatedTarget=W,re=null,pe(oe)===ee&&(Te=new Te(Q,X+"enter",xe,l,oe),Te.target=W,Te.relatedTarget=lt,re=Te),lt=re,ne&&xe)t:{for(Te=E4,Q=ne,X=xe,W=0,re=Q;re;re=Te(re))W++;re=0;for(var Ae=X;Ae;Ae=Te(Ae))re++;for(;0<W-re;)Q=Te(Q),W--;for(;0<re-W;)X=Te(X),re--;for(;W--;){if(Q===X||X!==null&&Q===X.alternate){Te=Q;break t}Q=Te(Q),X=Te(X)}Te=null}else Te=null;ne!==null&&Mv(ce,te,ne,Te,!1),xe!==null&<!==null&&Mv(ce,lt,xe,Te,!0)}}e:{if(te=ee?Xe(ee):window,ne=te.nodeName&&te.nodeName.toLowerCase(),ne==="select"||ne==="input"&&te.type==="file")var Ie=Iy;else if(Gy(te))if(Qy)Ie=RC;else{Ie=DC;var Ee=zC}else ne=te.nodeName,!ne||ne.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?ee&&Bf(ee.elementType)&&(Ie=Iy):Ie=OC;if(Ie&&(Ie=Ie(e,ee))){Zy(ce,Ie,l,oe);break e}Ee&&Ee(e,te,ee),e==="focusout"&&ee&&te.type==="number"&&ee.memoizedProps.value!=null&&Ni(te,"number",te.value)}switch(Ee=ee?Xe(ee):window,e){case"focusin":(Gy(Ee)||Ee.contentEditable==="true")&&(Di=Ee,Pf=ee,ls=null);break;case"focusout":ls=Pf=Di=null;break;case"mousedown":Wf=!0;break;case"contextmenu":case"mouseup":case"dragend":Wf=!1,n1(ce,l,oe);break;case"selectionchange":if(LC)break;case"keydown":case"keyup":n1(ce,l,oe)}var Oe;if(Qf)e:{switch(e){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else zi?qy(e,l)&&(Ve="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Ve="onCompositionStart");Ve&&(Vy&&l.locale!=="ko"&&(zi||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&zi&&(Oe=jy()):(ll=oe,qf="value"in ll?ll.value:ll.textContent,zi=!0)),Ee=Rc(ee,Ve),0<Ee.length&&(Ve=new By(Ve,e,null,l,oe),ce.push({event:Ve,listeners:Ee}),Oe?Ve.data=Oe:(Oe=Xy(l),Oe!==null&&(Ve.data=Oe)))),(Oe=NC?kC(e,l):TC(e,l))&&(Ve=Rc(ee,"onBeforeInput"),0<Ve.length&&(Ee=new By("onBeforeInput","beforeinput",null,l,oe),ce.push({event:Ee,listeners:Ve}),Ee.data=Oe)),v4(ce,e,ee,l,oe)}Tv(ce,t)})}function Cs(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Rc(e,t){for(var l=t+"Capture",o=[];e!==null;){var f=e,d=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||d===null||(f=Fo(e,l),f!=null&&o.unshift(Cs(e,f,d)),f=Fo(e,t),f!=null&&o.push(Cs(e,f,d))),e.tag===3)return o;e=e.return}return[]}function E4(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Mv(e,t,l,o,f){for(var d=t._reactName,w=[];l!==null&&l!==o;){var M=l,V=M.alternate,ee=M.stateNode;if(M=M.tag,V!==null&&V===o)break;M!==5&&M!==26&&M!==27||ee===null||(V=ee,f?(ee=Fo(l,d),ee!=null&&w.unshift(Cs(l,ee,V))):f||(ee=Fo(l,d),ee!=null&&w.push(Cs(l,ee,V)))),l=l.return}w.length!==0&&e.push({event:t,listeners:w})}var _4=/\r\n?/g,A4=/\u0000|\uFFFD/g;function zv(e){return(typeof e=="string"?e:""+e).replace(_4,`
|
|
41
|
+
`).replace(A4,"")}function Dv(e,t){return t=zv(t),zv(e)===t}function at(e,t,l,o,f,d){switch(l){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||Ti(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&Ti(e,""+o);break;case"className":Ei(e,"class",o);break;case"tabIndex":Ei(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Ei(e,l,o);break;case"style":Dy(e,o,d);break;case"data":if(t!=="object"){Ei(e,"data",o);break}case"src":case"href":if(o===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(l);break}o=Vr(""+o),e.setAttribute(l,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(l==="formAction"?(t!=="input"&&at(e,t,"name",f.name,f,null),at(e,t,"formEncType",f.formEncType,f,null),at(e,t,"formMethod",f.formMethod,f,null),at(e,t,"formTarget",f.formTarget,f,null)):(at(e,t,"encType",f.encType,f,null),at(e,t,"method",f.method,f,null),at(e,t,"target",f.target,f,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(l);break}o=Vr(""+o),e.setAttribute(l,o);break;case"onClick":o!=null&&(e.onclick=Da);break;case"onScroll":o!=null&&Be("scroll",e);break;case"onScrollEnd":o!=null&&Be("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(s(61));if(l=o.__html,l!=null){if(f.children!=null)throw Error(s(60));e.innerHTML=l}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}l=Vr(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(l,""+o):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":o===!0?e.setAttribute(l,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(l,o):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(l,o):e.removeAttribute(l);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(l):e.setAttribute(l,o);break;case"popover":Be("beforetoggle",e),Be("toggle",e),wi(e,"popover",o);break;case"xlinkActuate":aa(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":aa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":aa(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":aa(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":aa(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":aa(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":aa(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":aa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":aa(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":wi(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=WT.get(l)||l,wi(e,l,o))}}function _h(e,t,l,o,f,d){switch(l){case"style":Dy(e,o,d);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(s(61));if(l=o.__html,l!=null){if(f.children!=null)throw Error(s(60));e.innerHTML=l}}break;case"children":typeof o=="string"?Ti(e,o):(typeof o=="number"||typeof o=="bigint")&&Ti(e,""+o);break;case"onScroll":o!=null&&Be("scroll",e);break;case"onScrollEnd":o!=null&&Be("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Da);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!un.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(f=l.endsWith("Capture"),t=l.slice(2,f?l.length-7:void 0),d=e[ot]||null,d=d!=null?d[l]:null,typeof d=="function"&&e.removeEventListener(t,d,f),typeof o=="function")){typeof d!="function"&&d!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,o,f);break e}l in e?e[l]=o:o===!0?e.setAttribute(l,""):wi(e,l,o)}}}function Zt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Be("error",e),Be("load",e);var o=!1,f=!1,d;for(d in l)if(l.hasOwnProperty(d)){var w=l[d];if(w!=null)switch(d){case"src":o=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:at(e,t,d,w,l,null)}}f&&at(e,t,"srcSet",l.srcSet,l,null),o&&at(e,t,"src",l.src,l,null);return;case"input":Be("invalid",e);var M=d=w=f=null,V=null,ee=null;for(o in l)if(l.hasOwnProperty(o)){var oe=l[o];if(oe!=null)switch(o){case"name":f=oe;break;case"type":w=oe;break;case"checked":V=oe;break;case"defaultChecked":ee=oe;break;case"value":d=oe;break;case"defaultValue":M=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(s(137,t));break;default:at(e,t,o,oe,l,null)}}Ur(e,d,M,V,ee,w,f,!1);return;case"select":Be("invalid",e),o=w=d=null;for(f in l)if(l.hasOwnProperty(f)&&(M=l[f],M!=null))switch(f){case"value":d=M;break;case"defaultValue":w=M;break;case"multiple":o=M;default:at(e,t,f,M,l,null)}t=d,l=w,e.multiple=!!o,t!=null?ki(e,!!o,t,!1):l!=null&&ki(e,!!o,l,!0);return;case"textarea":Be("invalid",e),d=f=o=null;for(w in l)if(l.hasOwnProperty(w)&&(M=l[w],M!=null))switch(w){case"value":o=M;break;case"defaultValue":f=M;break;case"children":d=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(s(91));break;default:at(e,t,w,M,l,null)}My(e,o,f,d);return;case"option":for(V in l)if(l.hasOwnProperty(V)&&(o=l[V],o!=null))switch(V){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:at(e,t,V,o,l,null)}return;case"dialog":Be("beforetoggle",e),Be("toggle",e),Be("cancel",e),Be("close",e);break;case"iframe":case"object":Be("load",e);break;case"video":case"audio":for(o=0;o<Ts.length;o++)Be(Ts[o],e);break;case"image":Be("error",e),Be("load",e);break;case"details":Be("toggle",e);break;case"embed":case"source":case"link":Be("error",e),Be("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(ee in l)if(l.hasOwnProperty(ee)&&(o=l[ee],o!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:at(e,t,ee,o,l,null)}return;default:if(Bf(t)){for(oe in l)l.hasOwnProperty(oe)&&(o=l[oe],o!==void 0&&_h(e,t,oe,o,l,void 0));return}}for(M in l)l.hasOwnProperty(M)&&(o=l[M],o!=null&&at(e,t,M,o,l,null))}function N4(e,t,l,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,d=null,w=null,M=null,V=null,ee=null,oe=null;for(ne in l){var ce=l[ne];if(l.hasOwnProperty(ne)&&ce!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":V=ce;default:o.hasOwnProperty(ne)||at(e,t,ne,null,o,ce)}}for(var te in o){var ne=o[te];if(ce=l[te],o.hasOwnProperty(te)&&(ne!=null||ce!=null))switch(te){case"type":d=ne;break;case"name":f=ne;break;case"checked":ee=ne;break;case"defaultChecked":oe=ne;break;case"value":w=ne;break;case"defaultValue":M=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(s(137,t));break;default:ne!==ce&&at(e,t,te,ne,o,ce)}}Ko(e,w,M,V,ee,oe,d,f);return;case"select":ne=w=M=te=null;for(d in l)if(V=l[d],l.hasOwnProperty(d)&&V!=null)switch(d){case"value":break;case"multiple":ne=V;default:o.hasOwnProperty(d)||at(e,t,d,null,o,V)}for(f in o)if(d=o[f],V=l[f],o.hasOwnProperty(f)&&(d!=null||V!=null))switch(f){case"value":te=d;break;case"defaultValue":M=d;break;case"multiple":w=d;default:d!==V&&at(e,t,f,d,o,V)}t=M,l=w,o=ne,te!=null?ki(e,!!l,te,!1):!!o!=!!l&&(t!=null?ki(e,!!l,t,!0):ki(e,!!l,l?[]:"",!1));return;case"textarea":ne=te=null;for(M in l)if(f=l[M],l.hasOwnProperty(M)&&f!=null&&!o.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:at(e,t,M,null,o,f)}for(w in o)if(f=o[w],d=l[w],o.hasOwnProperty(w)&&(f!=null||d!=null))switch(w){case"value":te=f;break;case"defaultValue":ne=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(s(91));break;default:f!==d&&at(e,t,w,f,o,d)}Cy(e,te,ne);return;case"option":for(var xe in l)if(te=l[xe],l.hasOwnProperty(xe)&&te!=null&&!o.hasOwnProperty(xe))switch(xe){case"selected":e.selected=!1;break;default:at(e,t,xe,null,o,te)}for(V in o)if(te=o[V],ne=l[V],o.hasOwnProperty(V)&&te!==ne&&(te!=null||ne!=null))switch(V){case"selected":e.selected=te&&typeof te!="function"&&typeof te!="symbol";break;default:at(e,t,V,te,o,ne)}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 Te in l)te=l[Te],l.hasOwnProperty(Te)&&te!=null&&!o.hasOwnProperty(Te)&&at(e,t,Te,null,o,te);for(ee in o)if(te=o[ee],ne=l[ee],o.hasOwnProperty(ee)&&te!==ne&&(te!=null||ne!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(s(137,t));break;default:at(e,t,ee,te,o,ne)}return;default:if(Bf(t)){for(var lt in l)te=l[lt],l.hasOwnProperty(lt)&&te!==void 0&&!o.hasOwnProperty(lt)&&_h(e,t,lt,void 0,o,te);for(oe in o)te=o[oe],ne=l[oe],!o.hasOwnProperty(oe)||te===ne||te===void 0&&ne===void 0||_h(e,t,oe,te,o,ne);return}}for(var Q in l)te=l[Q],l.hasOwnProperty(Q)&&te!=null&&!o.hasOwnProperty(Q)&&at(e,t,Q,null,o,te);for(ce in o)te=o[ce],ne=l[ce],!o.hasOwnProperty(ce)||te===ne||te==null&&ne==null||at(e,t,ce,te,o,ne)}function Ov(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function k4(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),o=0;o<l.length;o++){var f=l[o],d=f.transferSize,w=f.initiatorType,M=f.duration;if(d&&M&&Ov(w)){for(w=0,M=f.responseEnd,o+=1;o<l.length;o++){var V=l[o],ee=V.startTime;if(ee>M)break;var oe=V.transferSize,ce=V.initiatorType;oe&&Ov(ce)&&(V=V.responseEnd,w+=oe*(V<M?1:(M-ee)/(V-ee)))}if(--o,t+=8*(d+w)/(f.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Ah=null,Nh=null;function jc(e){return e.nodeType===9?e:e.ownerDocument}function Rv(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 jv(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function kh(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Th=null;function T4(){var e=window.event;return e&&e.type==="popstate"?e===Th?!1:(Th=e,!0):(Th=null,!1)}var Lv=typeof setTimeout=="function"?setTimeout:void 0,C4=typeof clearTimeout=="function"?clearTimeout:void 0,Hv=typeof Promise=="function"?Promise:void 0,M4=typeof queueMicrotask=="function"?queueMicrotask:typeof Hv<"u"?function(e){return Hv.resolve(null).then(e).catch(z4)}:Lv;function z4(e){setTimeout(function(){throw e})}function Sl(e){return e==="head"}function Bv(e,t){var l=t,o=0;do{var f=l.nextSibling;if(e.removeChild(l),f&&f.nodeType===8)if(l=f.data,l==="/$"||l==="/&"){if(o===0){e.removeChild(f),io(t);return}o--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")o++;else if(l==="html")Ms(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Ms(l);for(var d=l.firstChild;d;){var w=d.nextSibling,M=d.nodeName;d[ve]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&d.rel.toLowerCase()==="stylesheet"||l.removeChild(d),d=w}}else l==="body"&&Ms(e.ownerDocument.body);l=f}while(l);io(t)}function Uv(e,t){var l=e;e=0;do{var o=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),o&&o.nodeType===8)if(l=o.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=o}while(l)}function Ch(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Ch(l),q(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function D4(e,t,l,o){for(;e.nodeType===1;){var f=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[ve])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=qn(e.nextSibling),e===null)break}return null}function O4(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=qn(e.nextSibling),e===null))return null;return e}function Vv(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=qn(e.nextSibling),e===null))return null;return e}function Mh(e){return e.data==="$?"||e.data==="$~"}function zh(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function R4(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var o=function(){t(),l.removeEventListener("DOMContentLoaded",o)};l.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function qn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Dh=null;function $v(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return qn(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Yv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function qv(e,t,l){switch(t=jc(l),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function Ms(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);q(e)}var Xn=new Map,Xv=new Set;function Lc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Qa=L.d;L.d={f:j4,r:L4,D:H4,C:B4,L:U4,m:V4,X:Y4,S:$4,M:q4};function j4(){var e=Qa.f(),t=kc();return e||t}function L4(e){var t=ye(e);t!==null&&t.tag===5&&t.type==="form"?sx(t):Qa.r(e)}var no=typeof document>"u"?null:document;function Gv(e,t,l){var o=no;if(o&&typeof t=="string"&&t){var f=Pt(t);f='link[rel="'+e+'"][href="'+f+'"]',typeof l=="string"&&(f+='[crossorigin="'+l+'"]'),Xv.has(f)||(Xv.add(f),e={rel:e,crossOrigin:l,href:t},o.querySelector(f)===null&&(t=o.createElement("link"),Zt(t,"link",e),De(t),o.head.appendChild(t)))}}function H4(e){Qa.D(e),Gv("dns-prefetch",e,null)}function B4(e,t){Qa.C(e,t),Gv("preconnect",e,t)}function U4(e,t,l){Qa.L(e,t,l);var o=no;if(o&&e&&t){var f='link[rel="preload"][as="'+Pt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(f+='[imagesrcset="'+Pt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(f+='[imagesizes="'+Pt(l.imageSizes)+'"]')):f+='[href="'+Pt(e)+'"]';var d=f;switch(t){case"style":d=ao(e);break;case"script":d=lo(e)}Xn.has(d)||(e=y({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Xn.set(d,e),o.querySelector(f)!==null||t==="style"&&o.querySelector(zs(d))||t==="script"&&o.querySelector(Ds(d))||(t=o.createElement("link"),Zt(t,"link",e),De(t),o.head.appendChild(t)))}}function V4(e,t){Qa.m(e,t);var l=no;if(l&&e){var o=t&&typeof t.as=="string"?t.as:"script",f='link[rel="modulepreload"][as="'+Pt(o)+'"][href="'+Pt(e)+'"]',d=f;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=lo(e)}if(!Xn.has(d)&&(e=y({rel:"modulepreload",href:e},t),Xn.set(d,e),l.querySelector(f)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ds(d)))return}o=l.createElement("link"),Zt(o,"link",e),De(o),l.head.appendChild(o)}}}function $4(e,t,l){Qa.S(e,t,l);var o=no;if(o&&e){var f=st(o).hoistableStyles,d=ao(e);t=t||"default";var w=f.get(d);if(!w){var M={loading:0,preload:null};if(w=o.querySelector(zs(d)))M.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Xn.get(d))&&Oh(e,l);var V=w=o.createElement("link");De(V),Zt(V,"link",e),V._p=new Promise(function(ee,oe){V.onload=ee,V.onerror=oe}),V.addEventListener("load",function(){M.loading|=1}),V.addEventListener("error",function(){M.loading|=2}),M.loading|=4,Hc(w,t,o)}w={type:"stylesheet",instance:w,count:1,state:M},f.set(d,w)}}}function Y4(e,t){Qa.X(e,t);var l=no;if(l&&e){var o=st(l).hoistableScripts,f=lo(e),d=o.get(f);d||(d=l.querySelector(Ds(f)),d||(e=y({src:e,async:!0},t),(t=Xn.get(f))&&Rh(e,t),d=l.createElement("script"),De(d),Zt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(f,d))}}function q4(e,t){Qa.M(e,t);var l=no;if(l&&e){var o=st(l).hoistableScripts,f=lo(e),d=o.get(f);d||(d=l.querySelector(Ds(f)),d||(e=y({src:e,async:!0,type:"module"},t),(t=Xn.get(f))&&Rh(e,t),d=l.createElement("script"),De(d),Zt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(f,d))}}function Zv(e,t,l,o){var f=(f=ge.current)?Lc(f):null;if(!f)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=ao(l.href),l=st(f).hoistableStyles,o=l.get(t),o||(o={type:"style",instance:null,count:0,state:null},l.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=ao(l.href);var d=st(f).hoistableStyles,w=d.get(e);if(w||(f=f.ownerDocument||f,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,w),(d=f.querySelector(zs(e)))&&!d._p&&(w.instance=d,w.state.loading=5),Xn.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Xn.set(e,l),d||X4(f,e,l,w.state))),t&&o===null)throw Error(s(528,""));return w}if(t&&o!==null)throw Error(s(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=lo(l),l=st(f).hoistableScripts,o=l.get(t),o||(o={type:"script",instance:null,count:0,state:null},l.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function ao(e){return'href="'+Pt(e)+'"'}function zs(e){return'link[rel="stylesheet"]['+e+"]"}function Iv(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function X4(e,t,l,o){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?o.loading=1:(t=e.createElement("link"),o.preload=t,t.addEventListener("load",function(){return o.loading|=1}),t.addEventListener("error",function(){return o.loading|=2}),Zt(t,"link",l),De(t),e.head.appendChild(t))}function lo(e){return'[src="'+Pt(e)+'"]'}function Ds(e){return"script[async]"+e}function Qv(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+Pt(l.href)+'"]');if(o)return t.instance=o,De(o),o;var f=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),De(o),Zt(o,"style",f),Hc(o,l.precedence,e),t.instance=o;case"stylesheet":f=ao(l.href);var d=e.querySelector(zs(f));if(d)return t.state.loading|=4,t.instance=d,De(d),d;o=Iv(l),(f=Xn.get(f))&&Oh(o,f),d=(e.ownerDocument||e).createElement("link"),De(d);var w=d;return w._p=new Promise(function(M,V){w.onload=M,w.onerror=V}),Zt(d,"link",o),t.state.loading|=4,Hc(d,l.precedence,e),t.instance=d;case"script":return d=lo(l.src),(f=e.querySelector(Ds(d)))?(t.instance=f,De(f),f):(o=l,(f=Xn.get(d))&&(o=y({},l),Rh(o,f)),e=e.ownerDocument||e,f=e.createElement("script"),De(f),Zt(f,"link",o),e.head.appendChild(f),t.instance=f);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,Hc(o,l.precedence,e));return t.instance}function Hc(e,t,l){for(var o=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=o.length?o[o.length-1]:null,d=f,w=0;w<o.length;w++){var M=o[w];if(M.dataset.precedence===t)d=M;else if(d!==f)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Oh(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Rh(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Bc=null;function Kv(e,t,l){if(Bc===null){var o=new Map,f=Bc=new Map;f.set(l,o)}else f=Bc,o=f.get(l),o||(o=new Map,f.set(l,o));if(o.has(e))return o;for(o.set(e,null),l=l.getElementsByTagName(e),f=0;f<l.length;f++){var d=l[f];if(!(d[ve]||d[bt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var w=d.getAttribute(t)||"";w=e+w;var M=o.get(w);M?M.push(d):o.set(w,[d])}}return o}function Fv(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function G4(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Jv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Z4(e,t,l,o){if(l.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var f=ao(o.href),d=t.querySelector(zs(f));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Uc.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=d,De(d);return}d=t.ownerDocument||t,o=Iv(o),(f=Xn.get(f))&&Oh(o,f),d=d.createElement("link"),De(d);var w=d;w._p=new Promise(function(M,V){w.onload=M,w.onerror=V}),Zt(d,"link",o),l.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Uc.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var jh=0;function I4(e,t){return e.stylesheets&&e.count===0&&$c(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var o=setTimeout(function(){if(e.stylesheets&&$c(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&jh===0&&(jh=62500*k4());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$c(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>jh?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(f)}}:null}function Uc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$c(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Vc=null;function $c(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Vc=new Map,t.forEach(Q4,e),Vc=null,Uc.call(e))}function Q4(e,t){if(!(t.state.loading&4)){var l=Vc.get(e);if(l)var o=l.get(null);else{l=new Map,Vc.set(e,l);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<f.length;d++){var w=f[d];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(l.set(w.dataset.precedence,w),o=w)}o&&l.set(null,o)}f=t.instance,w=f.getAttribute("data-precedence"),d=l.get(w)||o,d===o&&l.set(null,f),l.set(w,f),this.count++,o=Uc.bind(this),f.addEventListener("load",o),f.addEventListener("error",o),d?d.parentNode.insertBefore(f,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),t.state.loading|=4}}var Os={$$typeof:N,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function K4(e,t,l,o,f,d,w,M,V){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=Ta(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ta(0),this.hiddenUpdates=Ta(null),this.identifierPrefix=o,this.onUncaughtError=f,this.onCaughtError=d,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=V,this.incompleteTransitions=new Map}function Pv(e,t,l,o,f,d,w,M,V,ee,oe,ce){return e=new K4(e,t,l,w,V,ee,oe,ce,M),t=1,d===!0&&(t|=24),d=An(3,null,null,t),e.current=d,d.stateNode=e,t=pd(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:o,isDehydrated:l,cache:t},xd(d),e}function Wv(e){return e?(e=ji,e):ji}function eb(e,t,l,o,f,d){f=Wv(f),o.context===null?o.context=f:o.pendingContext=f,o=ul(t),o.payload={element:l},d=d===void 0?null:d,d!==null&&(o.callback=d),l=fl(e,o,t),l!==null&&(yn(l,e,t),fs(l,e,t))}function tb(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Lh(e,t){tb(e,t),(e=e.alternate)&&tb(e,t)}function nb(e){if(e.tag===13||e.tag===31){var t=Zl(e,67108864);t!==null&&yn(t,e,67108864),Lh(e,67108864)}}function ab(e){if(e.tag===13||e.tag===31){var t=Mn();t=Ct(t);var l=Zl(e,t);l!==null&&yn(l,e,t),Lh(e,t)}}var Yc=!0;function F4(e,t,l,o){var f=k.T;k.T=null;var d=L.p;try{L.p=2,Hh(e,t,l,o)}finally{L.p=d,k.T=f}}function J4(e,t,l,o){var f=k.T;k.T=null;var d=L.p;try{L.p=8,Hh(e,t,l,o)}finally{L.p=d,k.T=f}}function Hh(e,t,l,o){if(Yc){var f=Bh(o);if(f===null)Eh(e,t,o,qc,l),ib(e,o);else if(W4(f,e,t,l,o))o.stopPropagation();else if(ib(e,o),t&4&&-1<P4.indexOf(e)){for(;f!==null;){var d=ye(f);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var w=Ye(d.pendingLanes);if(w!==0){var M=d;for(M.pendingLanes|=2,M.entangledLanes|=2;w;){var V=1<<31-dt(w);M.entanglements[1]|=V,w&=~V}ba(d),(Ke&6)===0&&(Ac=gt()+500,ks(0))}}break;case 31:case 13:M=Zl(d,2),M!==null&&yn(M,d,2),kc(),Lh(d,2)}if(d=Bh(o),d===null&&Eh(e,t,o,qc,l),d===f)break;f=d}f!==null&&o.stopPropagation()}else Eh(e,t,o,null,l)}}function Bh(e){return e=Vf(e),Uh(e)}var qc=null;function Uh(e){if(qc=null,e=pe(e),e!==null){var t=c(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=u(t),e!==null)return e;e=null}else if(l===31){if(e=h(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return qc=e,null}function lb(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(sn()){case Bt:return 2;case $t:return 8;case Rt:case Na:return 32;case ea:return 268435456;default:return 32}default:return 32}}var Vh=!1,wl=null,El=null,_l=null,Rs=new Map,js=new Map,Al=[],P4="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ib(e,t){switch(e){case"focusin":case"focusout":wl=null;break;case"dragenter":case"dragleave":El=null;break;case"mouseover":case"mouseout":_l=null;break;case"pointerover":case"pointerout":Rs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":js.delete(t.pointerId)}}function Ls(e,t,l,o,f,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:l,eventSystemFlags:o,nativeEvent:d,targetContainers:[f]},t!==null&&(t=ye(t),t!==null&&nb(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,f!==null&&t.indexOf(f)===-1&&t.push(f),e)}function W4(e,t,l,o,f){switch(t){case"focusin":return wl=Ls(wl,e,t,l,o,f),!0;case"dragenter":return El=Ls(El,e,t,l,o,f),!0;case"mouseover":return _l=Ls(_l,e,t,l,o,f),!0;case"pointerover":var d=f.pointerId;return Rs.set(d,Ls(Rs.get(d)||null,e,t,l,o,f)),!0;case"gotpointercapture":return d=f.pointerId,js.set(d,Ls(js.get(d)||null,e,t,l,o,f)),!0}return!1}function ob(e){var t=pe(e.target);if(t!==null){var l=c(t);if(l!==null){if(t=l.tag,t===13){if(t=u(l),t!==null){e.blockedOn=t,Vl(e.priority,function(){ab(l)});return}}else if(t===31){if(t=h(l),t!==null){e.blockedOn=t,Vl(e.priority,function(){ab(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Xc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Bh(e.nativeEvent);if(l===null){l=e.nativeEvent;var o=new l.constructor(l.type,l);Uf=o,l.target.dispatchEvent(o),Uf=null}else return t=ye(l),t!==null&&nb(t),e.blockedOn=l,!1;t.shift()}return!0}function sb(e,t,l){Xc(e)&&l.delete(t)}function eM(){Vh=!1,wl!==null&&Xc(wl)&&(wl=null),El!==null&&Xc(El)&&(El=null),_l!==null&&Xc(_l)&&(_l=null),Rs.forEach(sb),js.forEach(sb)}function Gc(e,t){e.blockedOn===t&&(e.blockedOn=null,Vh||(Vh=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,eM)))}var Zc=null;function rb(e){Zc!==e&&(Zc=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Zc===e&&(Zc=null);for(var t=0;t<e.length;t+=3){var l=e[t],o=e[t+1],f=e[t+2];if(typeof o!="function"){if(Uh(o||l)===null)continue;break}var d=ye(l);d!==null&&(e.splice(t,3),t-=3,Bd(d,{pending:!0,data:f,method:l.method,action:o},o,f))}}))}function io(e){function t(V){return Gc(V,e)}wl!==null&&Gc(wl,e),El!==null&&Gc(El,e),_l!==null&&Gc(_l,e),Rs.forEach(t),js.forEach(t);for(var l=0;l<Al.length;l++){var o=Al[l];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Al.length&&(l=Al[0],l.blockedOn===null);)ob(l),l.blockedOn===null&&Al.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(o=0;o<l.length;o+=3){var f=l[o],d=l[o+1],w=f[ot]||null;if(typeof d=="function")w||rb(l);else if(w){var M=null;if(d&&d.hasAttribute("formAction")){if(f=d,w=d[ot]||null)M=w.formAction;else if(Uh(f)!==null)continue}else M=w.action;typeof M=="function"?l[o+1]=M:(l.splice(o,3),o-=3),rb(l)}}}function cb(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(w){return f=w})},focusReset:"manual",scroll:"manual"})}function t(){f!==null&&(f(),f=null),o||setTimeout(l,20)}function l(){if(!o&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),f!==null&&(f(),f=null)}}}function $h(e){this._internalRoot=e}Ic.prototype.render=$h.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var l=t.current,o=Mn();eb(l,o,e,t,null,null)},Ic.prototype.unmount=$h.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;eb(e.current,2,null,e,null,null),kc(),t[jn]=null}};function Ic(e){this._internalRoot=e}Ic.prototype.unstable_scheduleHydration=function(e){if(e){var t=Rn();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Al.length&&t!==0&&t<Al[l].priority;l++);Al.splice(l,0,e),l===0&&ob(e)}};var ub=a.version;if(ub!=="19.2.0")throw Error(s(527,ub,"19.2.0"));L.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=p(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var tM={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qc.isDisabled&&Qc.supportsFiber)try{rn=Qc.inject(tM),vt=Qc}catch{}}return so.createRoot=function(e,t){if(!r(e))throw Error(s(299));var l=!1,o="",f=yx,d=xx,w=vx;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(f=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(w=t.onRecoverableError)),t=Pv(e,1,!1,null,null,l,o,null,f,d,w,cb),e[jn]=t.current,wh(e),new $h(t)},so.hydrateRoot=function(e,t,l){if(!r(e))throw Error(s(299));var o=!1,f="",d=yx,w=xx,M=vx,V=null;return l!=null&&(l.unstable_strictMode===!0&&(o=!0),l.identifierPrefix!==void 0&&(f=l.identifierPrefix),l.onUncaughtError!==void 0&&(d=l.onUncaughtError),l.onCaughtError!==void 0&&(w=l.onCaughtError),l.onRecoverableError!==void 0&&(M=l.onRecoverableError),l.formState!==void 0&&(V=l.formState)),t=Pv(e,1,!0,t,l??null,o,f,V,d,w,M,cb),t.context=Wv(null),l=t.current,o=Mn(),o=Ct(o),f=ul(o),f.callback=null,fl(l,f,o),l=o,t.current.lanes=l,Dn(t,l),ba(t),e[jn]=t.current,wh(e),new Ic(t)},so.version="19.2.0",so}var Ph;function mb(){if(Ph)return Fc.exports;Ph=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),Fc.exports=gb(),Fc.exports}var yb=mb(),xb=Object.defineProperty,vb=(n,a,i)=>a in n?xb(n,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[a]=i,Hs=(n,a,i)=>vb(n,typeof a!="symbol"?a+"":a,i);const bb={stringify:n=>n?"true":"false",parse:n=>/^[ty1-9]/i.test(n)},Sb={stringify:n=>n.name,parse:(n,a,i)=>{const s=(()=>{if(typeof window<"u"&&n in window)return window[n];if(typeof global<"u"&&n in global)return global[n]})();return typeof s=="function"?s.bind(i):void 0}},wb={stringify:n=>JSON.stringify(n),parse:n=>JSON.parse(n)};function Eb(n){return n.replace(/([a-z0-9])([A-Z])/g,(a,i,s)=>`${i}-${s.toLowerCase()}`)}function Wh(n){return n.replace(/[-:]([a-z])/g,(a,i)=>`${i.toUpperCase()}`)}const _b={stringify:n=>n.name,parse:(n,a,i)=>{const s=(()=>{const r=Wh(a);if(typeof i<"u"&&r in i.container)return i.container[r]})();return typeof s=="function"?s.bind(i):void 0}},Ab={stringify:n=>`${n}`,parse:n=>parseFloat(n)},Nb={stringify:n=>n,parse:n=>n},eu={string:Nb,number:Ab,boolean:bb,function:Sb,method:_b,json:wb},ro=Symbol.for("r2wc.render"),Bs=Symbol.for("r2wc.connected"),kl=Symbol.for("r2wc.context"),xn=Symbol.for("r2wc.props");function kb(n,a,i){var s,r,c;a.props||(a.props=n.propTypes?Object.keys(n.propTypes):[]),a.events||(a.events=[]);const u=Array.isArray(a.props)?a.props.slice():Object.keys(a.props),h=Array.isArray(a.events)?a.events.slice():Object.keys(a.events),g={},p={},x={},y={};for(const S of u){g[S]=Array.isArray(a.props)?"string":a.props[S];const b=Eb(S);x[S]=b,y[b]=S}for(const S of h)p[S]=Array.isArray(a.events)?{}:a.events[S];class v extends HTMLElement{constructor(){super(),Hs(this,c,!0),Hs(this,r),Hs(this,s,{}),Hs(this,"container"),a.shadow?this.container=this.attachShadow({mode:a.shadow}):this.container=this,this[xn].container=this.container;for(const b of u){const E=x[b],_=this.getAttribute(E),T=g[b],z=T?eu[T]:null;if(T==="method"){const N=Wh(E);Object.defineProperty(this[xn].container,N,{enumerable:!0,configurable:!0,get(){return this[xn][N]},set(C){this[xn][N]=C,this[ro]()}}),this[xn][b]=z.parse(_,E,this)}z!=null&&z.parse&&_&&(this[xn][b]=z.parse(_,E,this))}for(const b of h)this[xn][b]=E=>{const _=b.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(_,{detail:E,...p[b]}))}}static get observedAttributes(){return Object.keys(y)}connectedCallback(){this[Bs]=!0,this[ro]()}disconnectedCallback(){this[Bs]=!1,this[kl]&&i.unmount(this[kl]),delete this[kl]}attributeChangedCallback(b,E,_){const T=y[b],z=g[T],N=z?eu[z]:null;T in g&&N!=null&&N.parse&&_&&(this[xn][T]=N.parse(_,b,this),this[ro]())}[(c=Bs,r=kl,s=xn,ro)](){this[Bs]&&(this[kl]?i.update(this[kl],this[xn]):this[kl]=i.mount(this.container,n,this[xn]))}}for(const S of u){const b=x[S],E=g[S];Object.defineProperty(v.prototype,S,{enumerable:!0,configurable:!0,get(){return this[xn][S]},set(_){this[xn][S]=_;const T=E?eu[E]:null;if(T!=null&&T.stringify){const z=T.stringify(_,b,this);this.getAttribute(b)!==z&&this.setAttribute(b,z)}else this[ro]()}})}return v}function Tb(n,a,i){const s=yb.createRoot(n),r=Ka.createElement(a,i);return s.render(r),{root:s,ReactComponent:a}}function Cb({root:n,ReactComponent:a},i){const s=Ka.createElement(a,i);n.render(s)}function Mb({root:n}){n.unmount()}function ep(n,a={}){return kb(n,a,{mount:Tb,update:Cb,unmount:Mb})}var tu={exports:{}},co={};/**
|
|
42
42
|
* @license React
|
|
43
43
|
* react-jsx-runtime.production.js
|
|
44
44
|
*
|
|
@@ -46,7 +46,7 @@ Error generating stack: `+o.message+`
|
|
|
46
46
|
*
|
|
47
47
|
* This source code is licensed under the MIT license found in the
|
|
48
48
|
* LICENSE file in the root directory of this source tree.
|
|
49
|
-
*/var tp;function Mb(){if(tp)return co;tp=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(s,r,c){var u=null;if(c!==void 0&&(u=""+c),r.key!==void 0&&(u=""+r.key),"key"in r){c={};for(var h in r)h!=="key"&&(c[h]=r[h])}else c=r;return r=c.ref,{$$typeof:n,type:s,key:u,ref:r!==void 0?r:null,props:c}}return co.Fragment=a,co.jsx=i,co.jsxs=i,co}var np;function zb(){return np||(np=1,tu.exports=Mb()),tu.exports}var m=zb();function Tt(n){if(typeof n=="string"||typeof n=="number")return""+n;let a="";if(Array.isArray(n))for(let i=0,s;i<n.length;i++)(s=Tt(n[i]))!==""&&(a+=(a&&" ")+s);else for(let i in n)n[i]&&(a+=(a&&" ")+i);return a}var Db={value:()=>{}};function Us(){for(var n=0,a=arguments.length,i={},s;n<a;++n){if(!(s=arguments[n]+"")||s in i||/[\s.]/.test(s))throw new Error("illegal type: "+s);i[s]=[]}return new Vs(i)}function Vs(n){this._=n}function Ob(n,a){return n.trim().split(/^|\s+/).map(function(i){var s="",r=i.indexOf(".");if(r>=0&&(s=i.slice(r+1),i=i.slice(0,r)),i&&!a.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:s}})}Vs.prototype=Us.prototype={constructor:Vs,on:function(n,a){var i=this._,s=Ob(n+"",i),r,c=-1,u=s.length;if(arguments.length<2){for(;++c<u;)if((r=(n=s[c]).type)&&(r=Rb(i[r],n.name)))return r;return}if(a!=null&&typeof a!="function")throw new Error("invalid callback: "+a);for(;++c<u;)if(r=(n=s[c]).type)i[r]=ap(i[r],n.name,a);else if(a==null)for(r in i)i[r]=ap(i[r],n.name,null);return this},copy:function(){var n={},a=this._;for(var i in a)n[i]=a[i].slice();return new Vs(n)},call:function(n,a){if((r=arguments.length-2)>0)for(var i=new Array(r),s=0,r,c;s<r;++s)i[s]=arguments[s+2];if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(c=this._[n],s=0,r=c.length;s<r;++s)c[s].value.apply(a,i)},apply:function(n,a,i){if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(var s=this._[n],r=0,c=s.length;r<c;++r)s[r].value.apply(a,i)}};function Rb(n,a){for(var i=0,s=n.length,r;i<s;++i)if((r=n[i]).name===a)return r.value}function ap(n,a,i){for(var s=0,r=n.length;s<r;++s)if(n[s].name===a){n[s]=Db,n=n.slice(0,s).concat(n.slice(s+1));break}return i!=null&&n.push({name:a,value:i}),n}var nu="http://www.w3.org/1999/xhtml";const lp={svg:"http://www.w3.org/2000/svg",xhtml:nu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function $s(n){var a=n+="",i=a.indexOf(":");return i>=0&&(a=n.slice(0,i))!=="xmlns"&&(n=n.slice(i+1)),lp.hasOwnProperty(a)?{space:lp[a],local:n}:n}function jb(n){return function(){var a=this.ownerDocument,i=this.namespaceURI;return i===nu&&a.documentElement.namespaceURI===nu?a.createElement(n):a.createElementNS(i,n)}}function Lb(n){return function(){return this.ownerDocument.createElementNS(n.space,n.local)}}function ip(n){var a=$s(n);return(a.local?Lb:jb)(a)}function Hb(){}function au(n){return n==null?Hb:function(){return this.querySelector(n)}}function Bb(n){typeof n!="function"&&(n=au(n));for(var a=this._groups,i=a.length,s=new Array(i),r=0;r<i;++r)for(var c=a[r],u=c.length,h=s[r]=new Array(u),g,p,x=0;x<u;++x)(g=c[x])&&(p=n.call(g,g.__data__,x,c))&&("__data__"in g&&(p.__data__=g.__data__),h[x]=p);return new vn(s,this._parents)}function Ub(n){return n==null?[]:Array.isArray(n)?n:Array.from(n)}function Vb(){return[]}function op(n){return n==null?Vb:function(){return this.querySelectorAll(n)}}function $b(n){return function(){return Ub(n.apply(this,arguments))}}function Yb(n){typeof n=="function"?n=$b(n):n=op(n);for(var a=this._groups,i=a.length,s=[],r=[],c=0;c<i;++c)for(var u=a[c],h=u.length,g,p=0;p<h;++p)(g=u[p])&&(s.push(n.call(g,g.__data__,p,u)),r.push(g));return new vn(s,r)}function sp(n){return function(){return this.matches(n)}}function rp(n){return function(a){return a.matches(n)}}var qb=Array.prototype.find;function Xb(n){return function(){return qb.call(this.children,n)}}function Gb(){return this.firstElementChild}function Zb(n){return this.select(n==null?Gb:Xb(typeof n=="function"?n:rp(n)))}var Ib=Array.prototype.filter;function Qb(){return Array.from(this.children)}function Kb(n){return function(){return Ib.call(this.children,n)}}function Fb(n){return this.selectAll(n==null?Qb:Kb(typeof n=="function"?n:rp(n)))}function Jb(n){typeof n!="function"&&(n=sp(n));for(var a=this._groups,i=a.length,s=new Array(i),r=0;r<i;++r)for(var c=a[r],u=c.length,h=s[r]=[],g,p=0;p<u;++p)(g=c[p])&&n.call(g,g.__data__,p,c)&&h.push(g);return new vn(s,this._parents)}function cp(n){return new Array(n.length)}function Pb(){return new vn(this._enter||this._groups.map(cp),this._parents)}function Ys(n,a){this.ownerDocument=n.ownerDocument,this.namespaceURI=n.namespaceURI,this._next=null,this._parent=n,this.__data__=a}Ys.prototype={constructor:Ys,appendChild:function(n){return this._parent.insertBefore(n,this._next)},insertBefore:function(n,a){return this._parent.insertBefore(n,a)},querySelector:function(n){return this._parent.querySelector(n)},querySelectorAll:function(n){return this._parent.querySelectorAll(n)}};function Wb(n){return function(){return n}}function e2(n,a,i,s,r,c){for(var u=0,h,g=a.length,p=c.length;u<p;++u)(h=a[u])?(h.__data__=c[u],s[u]=h):i[u]=new Ys(n,c[u]);for(;u<g;++u)(h=a[u])&&(r[u]=h)}function t2(n,a,i,s,r,c,u){var h,g,p=new Map,x=a.length,y=c.length,v=new Array(x),S;for(h=0;h<x;++h)(g=a[h])&&(v[h]=S=u.call(g,g.__data__,h,a)+"",p.has(S)?r[h]=g:p.set(S,g));for(h=0;h<y;++h)S=u.call(n,c[h],h,c)+"",(g=p.get(S))?(s[h]=g,g.__data__=c[h],p.delete(S)):i[h]=new Ys(n,c[h]);for(h=0;h<x;++h)(g=a[h])&&p.get(v[h])===g&&(r[h]=g)}function n2(n){return n.__data__}function a2(n,a){if(!arguments.length)return Array.from(this,n2);var i=a?t2:e2,s=this._parents,r=this._groups;typeof n!="function"&&(n=Wb(n));for(var c=r.length,u=new Array(c),h=new Array(c),g=new Array(c),p=0;p<c;++p){var x=s[p],y=r[p],v=y.length,S=l2(n.call(x,x&&x.__data__,p,s)),b=S.length,E=h[p]=new Array(b),_=u[p]=new Array(b),T=g[p]=new Array(v);i(x,y,E,_,T,S,a);for(var z=0,N=0,C,D;z<b;++z)if(C=E[z]){for(z>=N&&(N=z+1);!(D=_[N])&&++N<b;);C._next=D||null}}return u=new vn(u,s),u._enter=h,u._exit=g,u}function l2(n){return typeof n=="object"&&"length"in n?n:Array.from(n)}function i2(){return new vn(this._exit||this._groups.map(cp),this._parents)}function o2(n,a,i){var s=this.enter(),r=this,c=this.exit();return typeof n=="function"?(s=n(s),s&&(s=s.selection())):s=s.append(n+""),a!=null&&(r=a(r),r&&(r=r.selection())),i==null?c.remove():i(c),s&&r?s.merge(r).order():r}function s2(n){for(var a=n.selection?n.selection():n,i=this._groups,s=a._groups,r=i.length,c=s.length,u=Math.min(r,c),h=new Array(r),g=0;g<u;++g)for(var p=i[g],x=s[g],y=p.length,v=h[g]=new Array(y),S,b=0;b<y;++b)(S=p[b]||x[b])&&(v[b]=S);for(;g<r;++g)h[g]=i[g];return new vn(h,this._parents)}function r2(){for(var n=this._groups,a=-1,i=n.length;++a<i;)for(var s=n[a],r=s.length-1,c=s[r],u;--r>=0;)(u=s[r])&&(c&&u.compareDocumentPosition(c)^4&&c.parentNode.insertBefore(u,c),c=u);return this}function c2(n){n||(n=u2);function a(y,v){return y&&v?n(y.__data__,v.__data__):!y-!v}for(var i=this._groups,s=i.length,r=new Array(s),c=0;c<s;++c){for(var u=i[c],h=u.length,g=r[c]=new Array(h),p,x=0;x<h;++x)(p=u[x])&&(g[x]=p);g.sort(a)}return new vn(r,this._parents).order()}function u2(n,a){return n<a?-1:n>a?1:n>=a?0:NaN}function f2(){var n=arguments[0];return arguments[0]=this,n.apply(null,arguments),this}function d2(){return Array.from(this)}function h2(){for(var n=this._groups,a=0,i=n.length;a<i;++a)for(var s=n[a],r=0,c=s.length;r<c;++r){var u=s[r];if(u)return u}return null}function p2(){let n=0;for(const a of this)++n;return n}function g2(){return!this.node()}function m2(n){for(var a=this._groups,i=0,s=a.length;i<s;++i)for(var r=a[i],c=0,u=r.length,h;c<u;++c)(h=r[c])&&n.call(h,h.__data__,c,r);return this}function y2(n){return function(){this.removeAttribute(n)}}function x2(n){return function(){this.removeAttributeNS(n.space,n.local)}}function v2(n,a){return function(){this.setAttribute(n,a)}}function b2(n,a){return function(){this.setAttributeNS(n.space,n.local,a)}}function S2(n,a){return function(){var i=a.apply(this,arguments);i==null?this.removeAttribute(n):this.setAttribute(n,i)}}function w2(n,a){return function(){var i=a.apply(this,arguments);i==null?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,i)}}function E2(n,a){var i=$s(n);if(arguments.length<2){var s=this.node();return i.local?s.getAttributeNS(i.space,i.local):s.getAttribute(i)}return this.each((a==null?i.local?x2:y2:typeof a=="function"?i.local?w2:S2:i.local?b2:v2)(i,a))}function up(n){return n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView}function _2(n){return function(){this.style.removeProperty(n)}}function A2(n,a,i){return function(){this.style.setProperty(n,a,i)}}function N2(n,a,i){return function(){var s=a.apply(this,arguments);s==null?this.style.removeProperty(n):this.style.setProperty(n,s,i)}}function k2(n,a,i){return arguments.length>1?this.each((a==null?_2:typeof a=="function"?N2:A2)(n,a,i??"")):oi(this.node(),n)}function oi(n,a){return n.style.getPropertyValue(a)||up(n).getComputedStyle(n,null).getPropertyValue(a)}function T2(n){return function(){delete this[n]}}function C2(n,a){return function(){this[n]=a}}function M2(n,a){return function(){var i=a.apply(this,arguments);i==null?delete this[n]:this[n]=i}}function z2(n,a){return arguments.length>1?this.each((a==null?T2:typeof a=="function"?M2:C2)(n,a)):this.node()[n]}function fp(n){return n.trim().split(/^|\s+/)}function lu(n){return n.classList||new dp(n)}function dp(n){this._node=n,this._names=fp(n.getAttribute("class")||"")}dp.prototype={add:function(n){var a=this._names.indexOf(n);a<0&&(this._names.push(n),this._node.setAttribute("class",this._names.join(" ")))},remove:function(n){var a=this._names.indexOf(n);a>=0&&(this._names.splice(a,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(n){return this._names.indexOf(n)>=0}};function hp(n,a){for(var i=lu(n),s=-1,r=a.length;++s<r;)i.add(a[s])}function pp(n,a){for(var i=lu(n),s=-1,r=a.length;++s<r;)i.remove(a[s])}function D2(n){return function(){hp(this,n)}}function O2(n){return function(){pp(this,n)}}function R2(n,a){return function(){(a.apply(this,arguments)?hp:pp)(this,n)}}function j2(n,a){var i=fp(n+"");if(arguments.length<2){for(var s=lu(this.node()),r=-1,c=i.length;++r<c;)if(!s.contains(i[r]))return!1;return!0}return this.each((typeof a=="function"?R2:a?D2:O2)(i,a))}function L2(){this.textContent=""}function H2(n){return function(){this.textContent=n}}function B2(n){return function(){var a=n.apply(this,arguments);this.textContent=a??""}}function U2(n){return arguments.length?this.each(n==null?L2:(typeof n=="function"?B2:H2)(n)):this.node().textContent}function V2(){this.innerHTML=""}function $2(n){return function(){this.innerHTML=n}}function Y2(n){return function(){var a=n.apply(this,arguments);this.innerHTML=a??""}}function q2(n){return arguments.length?this.each(n==null?V2:(typeof n=="function"?Y2:$2)(n)):this.node().innerHTML}function X2(){this.nextSibling&&this.parentNode.appendChild(this)}function G2(){return this.each(X2)}function Z2(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function I2(){return this.each(Z2)}function Q2(n){var a=typeof n=="function"?n:ip(n);return this.select(function(){return this.appendChild(a.apply(this,arguments))})}function K2(){return null}function F2(n,a){var i=typeof n=="function"?n:ip(n),s=a==null?K2:typeof a=="function"?a:au(a);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})}function J2(){var n=this.parentNode;n&&n.removeChild(this)}function P2(){return this.each(J2)}function W2(){var n=this.cloneNode(!1),a=this.parentNode;return a?a.insertBefore(n,this.nextSibling):n}function eS(){var n=this.cloneNode(!0),a=this.parentNode;return a?a.insertBefore(n,this.nextSibling):n}function tS(n){return this.select(n?eS:W2)}function nS(n){return arguments.length?this.property("__data__",n):this.node().__data__}function aS(n){return function(a){n.call(this,a,this.__data__)}}function lS(n){return n.trim().split(/^|\s+/).map(function(a){var i="",s=a.indexOf(".");return s>=0&&(i=a.slice(s+1),a=a.slice(0,s)),{type:a,name:i}})}function iS(n){return function(){var a=this.__on;if(a){for(var i=0,s=-1,r=a.length,c;i<r;++i)c=a[i],(!n.type||c.type===n.type)&&c.name===n.name?this.removeEventListener(c.type,c.listener,c.options):a[++s]=c;++s?a.length=s:delete this.__on}}}function oS(n,a,i){return function(){var s=this.__on,r,c=aS(a);if(s){for(var u=0,h=s.length;u<h;++u)if((r=s[u]).type===n.type&&r.name===n.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=c,r.options=i),r.value=a;return}}this.addEventListener(n.type,c,i),r={type:n.type,name:n.name,value:a,listener:c,options:i},s?s.push(r):this.__on=[r]}}function sS(n,a,i){var s=lS(n+""),r,c=s.length,u;if(arguments.length<2){var h=this.node().__on;if(h){for(var g=0,p=h.length,x;g<p;++g)for(r=0,x=h[g];r<c;++r)if((u=s[r]).type===x.type&&u.name===x.name)return x.value}return}for(h=a?oS:iS,r=0;r<c;++r)this.each(h(s[r],a,i));return this}function gp(n,a,i){var s=up(n),r=s.CustomEvent;typeof r=="function"?r=new r(a,i):(r=s.document.createEvent("Event"),i?(r.initEvent(a,i.bubbles,i.cancelable),r.detail=i.detail):r.initEvent(a,!1,!1)),n.dispatchEvent(r)}function rS(n,a){return function(){return gp(this,n,a)}}function cS(n,a){return function(){return gp(this,n,a.apply(this,arguments))}}function uS(n,a){return this.each((typeof a=="function"?cS:rS)(n,a))}function*fS(){for(var n=this._groups,a=0,i=n.length;a<i;++a)for(var s=n[a],r=0,c=s.length,u;r<c;++r)(u=s[r])&&(yield u)}var mp=[null];function vn(n,a){this._groups=n,this._parents=a}function uo(){return new vn([[document.documentElement]],mp)}function dS(){return this}vn.prototype=uo.prototype={constructor:vn,select:Bb,selectAll:Yb,selectChild:Zb,selectChildren:Fb,filter:Jb,data:a2,enter:Pb,exit:i2,join:o2,merge:s2,selection:dS,order:r2,sort:c2,call:f2,nodes:d2,node:h2,size:p2,empty:g2,each:m2,attr:E2,style:k2,property:z2,classed:j2,text:U2,html:q2,raise:G2,lower:I2,append:Q2,insert:F2,remove:P2,clone:tS,datum:nS,on:sS,dispatch:uS,[Symbol.iterator]:fS};function bn(n){return typeof n=="string"?new vn([[document.querySelector(n)]],[document.documentElement]):new vn([[n]],mp)}function hS(n){let a;for(;a=n.sourceEvent;)n=a;return n}function Gn(n,a){if(n=hS(n),a===void 0&&(a=n.currentTarget),a){var i=a.ownerSVGElement||a;if(i.createSVGPoint){var s=i.createSVGPoint();return s.x=n.clientX,s.y=n.clientY,s=s.matrixTransform(a.getScreenCTM().inverse()),[s.x,s.y]}if(a.getBoundingClientRect){var r=a.getBoundingClientRect();return[n.clientX-r.left-a.clientLeft,n.clientY-r.top-a.clientTop]}}return[n.pageX,n.pageY]}const pS={passive:!1},fo={capture:!0,passive:!1};function iu(n){n.stopImmediatePropagation()}function si(n){n.preventDefault(),n.stopImmediatePropagation()}function yp(n){var a=n.document.documentElement,i=bn(n).on("dragstart.drag",si,fo);"onselectstart"in a?i.on("selectstart.drag",si,fo):(a.__noselect=a.style.MozUserSelect,a.style.MozUserSelect="none")}function xp(n,a){var i=n.document.documentElement,s=bn(n).on("dragstart.drag",null);a&&(s.on("click.drag",si,fo),setTimeout(function(){s.on("click.drag",null)},0)),"onselectstart"in i?s.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}const qs=n=>()=>n;function ou(n,{sourceEvent:a,subject:i,target:s,identifier:r,active:c,x:u,y:h,dx:g,dy:p,dispatch:x}){Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:a,enumerable:!0,configurable:!0},subject:{value:i,enumerable:!0,configurable:!0},target:{value:s,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:c,enumerable:!0,configurable:!0},x:{value:u,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:g,enumerable:!0,configurable:!0},dy:{value:p,enumerable:!0,configurable:!0},_:{value:x}})}ou.prototype.on=function(){var n=this._.on.apply(this._,arguments);return n===this._?this:n};function gS(n){return!n.ctrlKey&&!n.button}function mS(){return this.parentNode}function yS(n,a){return a??{x:n.x,y:n.y}}function xS(){return navigator.maxTouchPoints||"ontouchstart"in this}function vp(){var n=gS,a=mS,i=yS,s=xS,r={},c=Us("start","drag","end"),u=0,h,g,p,x,y=0;function v(C){C.on("mousedown.drag",S).filter(s).on("touchstart.drag",_).on("touchmove.drag",T,pS).on("touchend.drag touchcancel.drag",z).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function S(C,D){if(!(x||!n.call(this,C,D))){var R=N(this,a.call(this,C,D),C,D,"mouse");R&&(bn(C.view).on("mousemove.drag",b,fo).on("mouseup.drag",E,fo),yp(C.view),iu(C),p=!1,h=C.clientX,g=C.clientY,R("start",C))}}function b(C){if(si(C),!p){var D=C.clientX-h,R=C.clientY-g;p=D*D+R*R>y}r.mouse("drag",C)}function E(C){bn(C.view).on("mousemove.drag mouseup.drag",null),xp(C.view,p),si(C),r.mouse("end",C)}function _(C,D){if(n.call(this,C,D)){var R=C.changedTouches,j=a.call(this,C,D),K=R.length,J,fe;for(J=0;J<K;++J)(fe=N(this,j,C,D,R[J].identifier,R[J]))&&(iu(C),fe("start",C,R[J]))}}function T(C){var D=C.changedTouches,R=D.length,j,K;for(j=0;j<R;++j)(K=r[D[j].identifier])&&(si(C),K("drag",C,D[j]))}function z(C){var D=C.changedTouches,R=D.length,j,K;for(x&&clearTimeout(x),x=setTimeout(function(){x=null},500),j=0;j<R;++j)(K=r[D[j].identifier])&&(iu(C),K("end",C,D[j]))}function N(C,D,R,j,K,J){var fe=c.copy(),U=Gn(J||R,D),F,ae,H;if((H=i.call(C,new ou("beforestart",{sourceEvent:R,target:v,identifier:K,active:u,x:U[0],y:U[1],dx:0,dy:0,dispatch:fe}),j))!=null)return F=H.x-U[0]||0,ae=H.y-U[1]||0,function I(k,L,$){var Z=U,Y;switch(k){case"start":r[K]=I,Y=u++;break;case"end":delete r[K],--u;case"drag":U=Gn($||L,D),Y=u;break}fe.call(k,C,new ou(k,{sourceEvent:L,subject:H,target:v,identifier:K,active:Y,x:U[0]+F,y:U[1]+ae,dx:U[0]-Z[0],dy:U[1]-Z[1],dispatch:fe}),j)}}return v.filter=function(C){return arguments.length?(n=typeof C=="function"?C:qs(!!C),v):n},v.container=function(C){return arguments.length?(a=typeof C=="function"?C:qs(C),v):a},v.subject=function(C){return arguments.length?(i=typeof C=="function"?C:qs(C),v):i},v.touchable=function(C){return arguments.length?(s=typeof C=="function"?C:qs(!!C),v):s},v.on=function(){var C=c.on.apply(c,arguments);return C===c?v:C},v.clickDistance=function(C){return arguments.length?(y=(C=+C)*C,v):Math.sqrt(y)},v}function su(n,a,i){n.prototype=a.prototype=i,i.constructor=n}function bp(n,a){var i=Object.create(n.prototype);for(var s in a)i[s]=a[s];return i}function ho(){}var po=.7,Xs=1/po,ri="\\s*([+-]?\\d+)\\s*",go="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",sa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",vS=/^#([0-9a-f]{3,8})$/,bS=new RegExp(`^rgb\\(${ri},${ri},${ri}\\)$`),SS=new RegExp(`^rgb\\(${sa},${sa},${sa}\\)$`),wS=new RegExp(`^rgba\\(${ri},${ri},${ri},${go}\\)$`),ES=new RegExp(`^rgba\\(${sa},${sa},${sa},${go}\\)$`),_S=new RegExp(`^hsl\\(${go},${sa},${sa}\\)$`),AS=new RegExp(`^hsla\\(${go},${sa},${sa},${go}\\)$`),Sp={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};su(ho,Tl,{copy(n){return Object.assign(new this.constructor,this,n)},displayable(){return this.rgb().displayable()},hex:wp,formatHex:wp,formatHex8:NS,formatHsl:kS,formatRgb:Ep,toString:Ep});function wp(){return this.rgb().formatHex()}function NS(){return this.rgb().formatHex8()}function kS(){return Tp(this).formatHsl()}function Ep(){return this.rgb().formatRgb()}function Tl(n){var a,i;return n=(n+"").trim().toLowerCase(),(a=vS.exec(n))?(i=a[1].length,a=parseInt(a[1],16),i===6?_p(a):i===3?new ln(a>>8&15|a>>4&240,a>>4&15|a&240,(a&15)<<4|a&15,1):i===8?Gs(a>>24&255,a>>16&255,a>>8&255,(a&255)/255):i===4?Gs(a>>12&15|a>>8&240,a>>8&15|a>>4&240,a>>4&15|a&240,((a&15)<<4|a&15)/255):null):(a=bS.exec(n))?new ln(a[1],a[2],a[3],1):(a=SS.exec(n))?new ln(a[1]*255/100,a[2]*255/100,a[3]*255/100,1):(a=wS.exec(n))?Gs(a[1],a[2],a[3],a[4]):(a=ES.exec(n))?Gs(a[1]*255/100,a[2]*255/100,a[3]*255/100,a[4]):(a=_S.exec(n))?kp(a[1],a[2]/100,a[3]/100,1):(a=AS.exec(n))?kp(a[1],a[2]/100,a[3]/100,a[4]):Sp.hasOwnProperty(n)?_p(Sp[n]):n==="transparent"?new ln(NaN,NaN,NaN,0):null}function _p(n){return new ln(n>>16&255,n>>8&255,n&255,1)}function Gs(n,a,i,s){return s<=0&&(n=a=i=NaN),new ln(n,a,i,s)}function TS(n){return n instanceof ho||(n=Tl(n)),n?(n=n.rgb(),new ln(n.r,n.g,n.b,n.opacity)):new ln}function ru(n,a,i,s){return arguments.length===1?TS(n):new ln(n,a,i,s??1)}function ln(n,a,i,s){this.r=+n,this.g=+a,this.b=+i,this.opacity=+s}su(ln,ru,bp(ho,{brighter(n){return n=n==null?Xs:Math.pow(Xs,n),new ln(this.r*n,this.g*n,this.b*n,this.opacity)},darker(n){return n=n==null?po:Math.pow(po,n),new ln(this.r*n,this.g*n,this.b*n,this.opacity)},rgb(){return this},clamp(){return new ln(Cl(this.r),Cl(this.g),Cl(this.b),Zs(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:Ap,formatHex:Ap,formatHex8:CS,formatRgb:Np,toString:Np}));function Ap(){return`#${Ml(this.r)}${Ml(this.g)}${Ml(this.b)}`}function CS(){return`#${Ml(this.r)}${Ml(this.g)}${Ml(this.b)}${Ml((isNaN(this.opacity)?1:this.opacity)*255)}`}function Np(){const n=Zs(this.opacity);return`${n===1?"rgb(":"rgba("}${Cl(this.r)}, ${Cl(this.g)}, ${Cl(this.b)}${n===1?")":`, ${n})`}`}function Zs(n){return isNaN(n)?1:Math.max(0,Math.min(1,n))}function Cl(n){return Math.max(0,Math.min(255,Math.round(n)||0))}function Ml(n){return n=Cl(n),(n<16?"0":"")+n.toString(16)}function kp(n,a,i,s){return s<=0?n=a=i=NaN:i<=0||i>=1?n=a=NaN:a<=0&&(n=NaN),new Zn(n,a,i,s)}function Tp(n){if(n instanceof Zn)return new Zn(n.h,n.s,n.l,n.opacity);if(n instanceof ho||(n=Tl(n)),!n)return new Zn;if(n instanceof Zn)return n;n=n.rgb();var a=n.r/255,i=n.g/255,s=n.b/255,r=Math.min(a,i,s),c=Math.max(a,i,s),u=NaN,h=c-r,g=(c+r)/2;return h?(a===c?u=(i-s)/h+(i<s)*6:i===c?u=(s-a)/h+2:u=(a-i)/h+4,h/=g<.5?c+r:2-c-r,u*=60):h=g>0&&g<1?0:u,new Zn(u,h,g,n.opacity)}function MS(n,a,i,s){return arguments.length===1?Tp(n):new Zn(n,a,i,s??1)}function Zn(n,a,i,s){this.h=+n,this.s=+a,this.l=+i,this.opacity=+s}su(Zn,MS,bp(ho,{brighter(n){return n=n==null?Xs:Math.pow(Xs,n),new Zn(this.h,this.s,this.l*n,this.opacity)},darker(n){return n=n==null?po:Math.pow(po,n),new Zn(this.h,this.s,this.l*n,this.opacity)},rgb(){var n=this.h%360+(this.h<0)*360,a=isNaN(n)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*a,r=2*i-s;return new ln(cu(n>=240?n-240:n+120,r,s),cu(n,r,s),cu(n<120?n+240:n-120,r,s),this.opacity)},clamp(){return new Zn(Cp(this.h),Is(this.s),Is(this.l),Zs(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 n=Zs(this.opacity);return`${n===1?"hsl(":"hsla("}${Cp(this.h)}, ${Is(this.s)*100}%, ${Is(this.l)*100}%${n===1?")":`, ${n})`}`}}));function Cp(n){return n=(n||0)%360,n<0?n+360:n}function Is(n){return Math.max(0,Math.min(1,n||0))}function cu(n,a,i){return(n<60?a+(i-a)*n/60:n<180?i:n<240?a+(i-a)*(240-n)/60:a)*255}const uu=n=>()=>n;function zS(n,a){return function(i){return n+i*a}}function DS(n,a,i){return n=Math.pow(n,i),a=Math.pow(a,i)-n,i=1/i,function(s){return Math.pow(n+s*a,i)}}function OS(n){return(n=+n)==1?Mp:function(a,i){return i-a?DS(a,i,n):uu(isNaN(a)?i:a)}}function Mp(n,a){var i=a-n;return i?zS(n,i):uu(isNaN(n)?a:n)}const Qs=(function n(a){var i=OS(a);function s(r,c){var u=i((r=ru(r)).r,(c=ru(c)).r),h=i(r.g,c.g),g=i(r.b,c.b),p=Mp(r.opacity,c.opacity);return function(x){return r.r=u(x),r.g=h(x),r.b=g(x),r.opacity=p(x),r+""}}return s.gamma=n,s})(1);function RS(n,a){a||(a=[]);var i=n?Math.min(a.length,n.length):0,s=a.slice(),r;return function(c){for(r=0;r<i;++r)s[r]=n[r]*(1-c)+a[r]*c;return s}}function jS(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function LS(n,a){var i=a?a.length:0,s=n?Math.min(i,n.length):0,r=new Array(s),c=new Array(i),u;for(u=0;u<s;++u)r[u]=mo(n[u],a[u]);for(;u<i;++u)c[u]=a[u];return function(h){for(u=0;u<s;++u)c[u]=r[u](h);return c}}function HS(n,a){var i=new Date;return n=+n,a=+a,function(s){return i.setTime(n*(1-s)+a*s),i}}function ra(n,a){return n=+n,a=+a,function(i){return n*(1-i)+a*i}}function BS(n,a){var i={},s={},r;(n===null||typeof n!="object")&&(n={}),(a===null||typeof a!="object")&&(a={});for(r in a)r in n?i[r]=mo(n[r],a[r]):s[r]=a[r];return function(c){for(r in i)s[r]=i[r](c);return s}}var fu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,du=new RegExp(fu.source,"g");function US(n){return function(){return n}}function VS(n){return function(a){return n(a)+""}}function zp(n,a){var i=fu.lastIndex=du.lastIndex=0,s,r,c,u=-1,h=[],g=[];for(n=n+"",a=a+"";(s=fu.exec(n))&&(r=du.exec(a));)(c=r.index)>i&&(c=a.slice(i,c),h[u]?h[u]+=c:h[++u]=c),(s=s[0])===(r=r[0])?h[u]?h[u]+=r:h[++u]=r:(h[++u]=null,g.push({i:u,x:ra(s,r)})),i=du.lastIndex;return i<a.length&&(c=a.slice(i),h[u]?h[u]+=c:h[++u]=c),h.length<2?g[0]?VS(g[0].x):US(a):(a=g.length,function(p){for(var x=0,y;x<a;++x)h[(y=g[x]).i]=y.x(p);return h.join("")})}function mo(n,a){var i=typeof a,s;return a==null||i==="boolean"?uu(a):(i==="number"?ra:i==="string"?(s=Tl(a))?(a=s,Qs):zp:a instanceof Tl?Qs:a instanceof Date?HS:jS(a)?RS:Array.isArray(a)?LS:typeof a.valueOf!="function"&&typeof a.toString!="function"||isNaN(a)?BS:ra)(n,a)}var Dp=180/Math.PI,hu={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Op(n,a,i,s,r,c){var u,h,g;return(u=Math.sqrt(n*n+a*a))&&(n/=u,a/=u),(g=n*i+a*s)&&(i-=n*g,s-=a*g),(h=Math.sqrt(i*i+s*s))&&(i/=h,s/=h,g/=h),n*s<a*i&&(n=-n,a=-a,g=-g,u=-u),{translateX:r,translateY:c,rotate:Math.atan2(a,n)*Dp,skewX:Math.atan(g)*Dp,scaleX:u,scaleY:h}}var Ks;function $S(n){const a=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(n+"");return a.isIdentity?hu:Op(a.a,a.b,a.c,a.d,a.e,a.f)}function YS(n){return n==null||(Ks||(Ks=document.createElementNS("http://www.w3.org/2000/svg","g")),Ks.setAttribute("transform",n),!(n=Ks.transform.baseVal.consolidate()))?hu:(n=n.matrix,Op(n.a,n.b,n.c,n.d,n.e,n.f))}function Rp(n,a,i,s){function r(p){return p.length?p.pop()+" ":""}function c(p,x,y,v,S,b){if(p!==y||x!==v){var E=S.push("translate(",null,a,null,i);b.push({i:E-4,x:ra(p,y)},{i:E-2,x:ra(x,v)})}else(y||v)&&S.push("translate("+y+a+v+i)}function u(p,x,y,v){p!==x?(p-x>180?x+=360:x-p>180&&(p+=360),v.push({i:y.push(r(y)+"rotate(",null,s)-2,x:ra(p,x)})):x&&y.push(r(y)+"rotate("+x+s)}function h(p,x,y,v){p!==x?v.push({i:y.push(r(y)+"skewX(",null,s)-2,x:ra(p,x)}):x&&y.push(r(y)+"skewX("+x+s)}function g(p,x,y,v,S,b){if(p!==y||x!==v){var E=S.push(r(S)+"scale(",null,",",null,")");b.push({i:E-4,x:ra(p,y)},{i:E-2,x:ra(x,v)})}else(y!==1||v!==1)&&S.push(r(S)+"scale("+y+","+v+")")}return function(p,x){var y=[],v=[];return p=n(p),x=n(x),c(p.translateX,p.translateY,x.translateX,x.translateY,y,v),u(p.rotate,x.rotate,y,v),h(p.skewX,x.skewX,y,v),g(p.scaleX,p.scaleY,x.scaleX,x.scaleY,y,v),p=x=null,function(S){for(var b=-1,E=v.length,_;++b<E;)y[(_=v[b]).i]=_.x(S);return y.join("")}}}var qS=Rp($S,"px, ","px)","deg)"),XS=Rp(YS,", ",")",")"),GS=1e-12;function jp(n){return((n=Math.exp(n))+1/n)/2}function ZS(n){return((n=Math.exp(n))-1/n)/2}function IS(n){return((n=Math.exp(2*n))-1)/(n+1)}const Fs=(function n(a,i,s){function r(c,u){var h=c[0],g=c[1],p=c[2],x=u[0],y=u[1],v=u[2],S=x-h,b=y-g,E=S*S+b*b,_,T;if(E<GS)T=Math.log(v/p)/a,_=function(j){return[h+j*S,g+j*b,p*Math.exp(a*j*T)]};else{var z=Math.sqrt(E),N=(v*v-p*p+s*E)/(2*p*i*z),C=(v*v-p*p-s*E)/(2*v*i*z),D=Math.log(Math.sqrt(N*N+1)-N),R=Math.log(Math.sqrt(C*C+1)-C);T=(R-D)/a,_=function(j){var K=j*T,J=jp(D),fe=p/(i*z)*(J*IS(a*K+D)-ZS(D));return[h+fe*S,g+fe*b,p*J/jp(a*K+D)]}}return _.duration=T*1e3*a/Math.SQRT2,_}return r.rho=function(c){var u=Math.max(.001,+c),h=u*u,g=h*h;return n(u,h,g)},r})(Math.SQRT2,2,4);var ci=0,yo=0,xo=0,Lp=1e3,Js,vo,Ps=0,zl=0,Ws=0,bo=typeof performance=="object"&&performance.now?performance:Date,Hp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(n){setTimeout(n,17)};function pu(){return zl||(Hp(QS),zl=bo.now()+Ws)}function QS(){zl=0}function er(){this._call=this._time=this._next=null}er.prototype=Bp.prototype={constructor:er,restart:function(n,a,i){if(typeof n!="function")throw new TypeError("callback is not a function");i=(i==null?pu():+i)+(a==null?0:+a),!this._next&&vo!==this&&(vo?vo._next=this:Js=this,vo=this),this._call=n,this._time=i,gu()},stop:function(){this._call&&(this._call=null,this._time=1/0,gu())}};function Bp(n,a,i){var s=new er;return s.restart(n,a,i),s}function KS(){pu(),++ci;for(var n=Js,a;n;)(a=zl-n._time)>=0&&n._call.call(void 0,a),n=n._next;--ci}function Up(){zl=(Ps=bo.now())+Ws,ci=yo=0;try{KS()}finally{ci=0,JS(),zl=0}}function FS(){var n=bo.now(),a=n-Ps;a>Lp&&(Ws-=a,Ps=n)}function JS(){for(var n,a=Js,i,s=1/0;a;)a._call?(s>a._time&&(s=a._time),n=a,a=a._next):(i=a._next,a._next=null,a=n?n._next=i:Js=i);vo=n,gu(s)}function gu(n){if(!ci){yo&&(yo=clearTimeout(yo));var a=n-zl;a>24?(n<1/0&&(yo=setTimeout(Up,n-bo.now()-Ws)),xo&&(xo=clearInterval(xo))):(xo||(Ps=bo.now(),xo=setInterval(FS,Lp)),ci=1,Hp(Up))}}function Vp(n,a,i){var s=new er;return a=a==null?0:+a,s.restart(r=>{s.stop(),n(r+a)},a,i),s}var PS=Us("start","end","cancel","interrupt"),WS=[],$p=0,Yp=1,mu=2,tr=3,qp=4,yu=5,nr=6;function ar(n,a,i,s,r,c){var u=n.__transition;if(!u)n.__transition={};else if(i in u)return;ew(n,i,{name:a,index:s,group:r,on:PS,tween:WS,time:c.time,delay:c.delay,duration:c.duration,ease:c.ease,timer:null,state:$p})}function xu(n,a){var i=In(n,a);if(i.state>$p)throw new Error("too late; already scheduled");return i}function ca(n,a){var i=In(n,a);if(i.state>tr)throw new Error("too late; already running");return i}function In(n,a){var i=n.__transition;if(!i||!(i=i[a]))throw new Error("transition not found");return i}function ew(n,a,i){var s=n.__transition,r;s[a]=i,i.timer=Bp(c,0,i.time);function c(p){i.state=Yp,i.timer.restart(u,i.delay,i.time),i.delay<=p&&u(p-i.delay)}function u(p){var x,y,v,S;if(i.state!==Yp)return g();for(x in s)if(S=s[x],S.name===i.name){if(S.state===tr)return Vp(u);S.state===qp?(S.state=nr,S.timer.stop(),S.on.call("interrupt",n,n.__data__,S.index,S.group),delete s[x]):+x<a&&(S.state=nr,S.timer.stop(),S.on.call("cancel",n,n.__data__,S.index,S.group),delete s[x])}if(Vp(function(){i.state===tr&&(i.state=qp,i.timer.restart(h,i.delay,i.time),h(p))}),i.state=mu,i.on.call("start",n,n.__data__,i.index,i.group),i.state===mu){for(i.state=tr,r=new Array(v=i.tween.length),x=0,y=-1;x<v;++x)(S=i.tween[x].value.call(n,n.__data__,i.index,i.group))&&(r[++y]=S);r.length=y+1}}function h(p){for(var x=p<i.duration?i.ease.call(null,p/i.duration):(i.timer.restart(g),i.state=yu,1),y=-1,v=r.length;++y<v;)r[y].call(n,x);i.state===yu&&(i.on.call("end",n,n.__data__,i.index,i.group),g())}function g(){i.state=nr,i.timer.stop(),delete s[a];for(var p in s)return;delete n.__transition}}function lr(n,a){var i=n.__transition,s,r,c=!0,u;if(i){a=a==null?null:a+"";for(u in i){if((s=i[u]).name!==a){c=!1;continue}r=s.state>mu&&s.state<yu,s.state=nr,s.timer.stop(),s.on.call(r?"interrupt":"cancel",n,n.__data__,s.index,s.group),delete i[u]}c&&delete n.__transition}}function tw(n){return this.each(function(){lr(this,n)})}function nw(n,a){var i,s;return function(){var r=ca(this,n),c=r.tween;if(c!==i){s=i=c;for(var u=0,h=s.length;u<h;++u)if(s[u].name===a){s=s.slice(),s.splice(u,1);break}}r.tween=s}}function aw(n,a,i){var s,r;if(typeof i!="function")throw new Error;return function(){var c=ca(this,n),u=c.tween;if(u!==s){r=(s=u).slice();for(var h={name:a,value:i},g=0,p=r.length;g<p;++g)if(r[g].name===a){r[g]=h;break}g===p&&r.push(h)}c.tween=r}}function lw(n,a){var i=this._id;if(n+="",arguments.length<2){for(var s=In(this.node(),i).tween,r=0,c=s.length,u;r<c;++r)if((u=s[r]).name===n)return u.value;return null}return this.each((a==null?nw:aw)(i,n,a))}function vu(n,a,i){var s=n._id;return n.each(function(){var r=ca(this,s);(r.value||(r.value={}))[a]=i.apply(this,arguments)}),function(r){return In(r,s).value[a]}}function Xp(n,a){var i;return(typeof a=="number"?ra:a instanceof Tl?Qs:(i=Tl(a))?(a=i,Qs):zp)(n,a)}function iw(n){return function(){this.removeAttribute(n)}}function ow(n){return function(){this.removeAttributeNS(n.space,n.local)}}function sw(n,a,i){var s,r=i+"",c;return function(){var u=this.getAttribute(n);return u===r?null:u===s?c:c=a(s=u,i)}}function rw(n,a,i){var s,r=i+"",c;return function(){var u=this.getAttributeNS(n.space,n.local);return u===r?null:u===s?c:c=a(s=u,i)}}function cw(n,a,i){var s,r,c;return function(){var u,h=i(this),g;return h==null?void this.removeAttribute(n):(u=this.getAttribute(n),g=h+"",u===g?null:u===s&&g===r?c:(r=g,c=a(s=u,h)))}}function uw(n,a,i){var s,r,c;return function(){var u,h=i(this),g;return h==null?void this.removeAttributeNS(n.space,n.local):(u=this.getAttributeNS(n.space,n.local),g=h+"",u===g?null:u===s&&g===r?c:(r=g,c=a(s=u,h)))}}function fw(n,a){var i=$s(n),s=i==="transform"?XS:Xp;return this.attrTween(n,typeof a=="function"?(i.local?uw:cw)(i,s,vu(this,"attr."+n,a)):a==null?(i.local?ow:iw)(i):(i.local?rw:sw)(i,s,a))}function dw(n,a){return function(i){this.setAttribute(n,a.call(this,i))}}function hw(n,a){return function(i){this.setAttributeNS(n.space,n.local,a.call(this,i))}}function pw(n,a){var i,s;function r(){var c=a.apply(this,arguments);return c!==s&&(i=(s=c)&&hw(n,c)),i}return r._value=a,r}function gw(n,a){var i,s;function r(){var c=a.apply(this,arguments);return c!==s&&(i=(s=c)&&dw(n,c)),i}return r._value=a,r}function mw(n,a){var i="attr."+n;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(a==null)return this.tween(i,null);if(typeof a!="function")throw new Error;var s=$s(n);return this.tween(i,(s.local?pw:gw)(s,a))}function yw(n,a){return function(){xu(this,n).delay=+a.apply(this,arguments)}}function xw(n,a){return a=+a,function(){xu(this,n).delay=a}}function vw(n){var a=this._id;return arguments.length?this.each((typeof n=="function"?yw:xw)(a,n)):In(this.node(),a).delay}function bw(n,a){return function(){ca(this,n).duration=+a.apply(this,arguments)}}function Sw(n,a){return a=+a,function(){ca(this,n).duration=a}}function ww(n){var a=this._id;return arguments.length?this.each((typeof n=="function"?bw:Sw)(a,n)):In(this.node(),a).duration}function Ew(n,a){if(typeof a!="function")throw new Error;return function(){ca(this,n).ease=a}}function _w(n){var a=this._id;return arguments.length?this.each(Ew(a,n)):In(this.node(),a).ease}function Aw(n,a){return function(){var i=a.apply(this,arguments);if(typeof i!="function")throw new Error;ca(this,n).ease=i}}function Nw(n){if(typeof n!="function")throw new Error;return this.each(Aw(this._id,n))}function kw(n){typeof n!="function"&&(n=sp(n));for(var a=this._groups,i=a.length,s=new Array(i),r=0;r<i;++r)for(var c=a[r],u=c.length,h=s[r]=[],g,p=0;p<u;++p)(g=c[p])&&n.call(g,g.__data__,p,c)&&h.push(g);return new Sa(s,this._parents,this._name,this._id)}function Tw(n){if(n._id!==this._id)throw new Error;for(var a=this._groups,i=n._groups,s=a.length,r=i.length,c=Math.min(s,r),u=new Array(s),h=0;h<c;++h)for(var g=a[h],p=i[h],x=g.length,y=u[h]=new Array(x),v,S=0;S<x;++S)(v=g[S]||p[S])&&(y[S]=v);for(;h<s;++h)u[h]=a[h];return new Sa(u,this._parents,this._name,this._id)}function Cw(n){return(n+"").trim().split(/^|\s+/).every(function(a){var i=a.indexOf(".");return i>=0&&(a=a.slice(0,i)),!a||a==="start"})}function Mw(n,a,i){var s,r,c=Cw(a)?xu:ca;return function(){var u=c(this,n),h=u.on;h!==s&&(r=(s=h).copy()).on(a,i),u.on=r}}function zw(n,a){var i=this._id;return arguments.length<2?In(this.node(),i).on.on(n):this.each(Mw(i,n,a))}function Dw(n){return function(){var a=this.parentNode;for(var i in this.__transition)if(+i!==n)return;a&&a.removeChild(this)}}function Ow(){return this.on("end.remove",Dw(this._id))}function Rw(n){var a=this._name,i=this._id;typeof n!="function"&&(n=au(n));for(var s=this._groups,r=s.length,c=new Array(r),u=0;u<r;++u)for(var h=s[u],g=h.length,p=c[u]=new Array(g),x,y,v=0;v<g;++v)(x=h[v])&&(y=n.call(x,x.__data__,v,h))&&("__data__"in x&&(y.__data__=x.__data__),p[v]=y,ar(p[v],a,i,v,p,In(x,i)));return new Sa(c,this._parents,a,i)}function jw(n){var a=this._name,i=this._id;typeof n!="function"&&(n=op(n));for(var s=this._groups,r=s.length,c=[],u=[],h=0;h<r;++h)for(var g=s[h],p=g.length,x,y=0;y<p;++y)if(x=g[y]){for(var v=n.call(x,x.__data__,y,g),S,b=In(x,i),E=0,_=v.length;E<_;++E)(S=v[E])&&ar(S,a,i,E,v,b);c.push(v),u.push(x)}return new Sa(c,u,a,i)}var Lw=uo.prototype.constructor;function Hw(){return new Lw(this._groups,this._parents)}function Bw(n,a){var i,s,r;return function(){var c=oi(this,n),u=(this.style.removeProperty(n),oi(this,n));return c===u?null:c===i&&u===s?r:r=a(i=c,s=u)}}function Gp(n){return function(){this.style.removeProperty(n)}}function Uw(n,a,i){var s,r=i+"",c;return function(){var u=oi(this,n);return u===r?null:u===s?c:c=a(s=u,i)}}function Vw(n,a,i){var s,r,c;return function(){var u=oi(this,n),h=i(this),g=h+"";return h==null&&(g=h=(this.style.removeProperty(n),oi(this,n))),u===g?null:u===s&&g===r?c:(r=g,c=a(s=u,h))}}function $w(n,a){var i,s,r,c="style."+a,u="end."+c,h;return function(){var g=ca(this,n),p=g.on,x=g.value[c]==null?h||(h=Gp(a)):void 0;(p!==i||r!==x)&&(s=(i=p).copy()).on(u,r=x),g.on=s}}function Yw(n,a,i){var s=(n+="")=="transform"?qS:Xp;return a==null?this.styleTween(n,Bw(n,s)).on("end.style."+n,Gp(n)):typeof a=="function"?this.styleTween(n,Vw(n,s,vu(this,"style."+n,a))).each($w(this._id,n)):this.styleTween(n,Uw(n,s,a),i).on("end.style."+n,null)}function qw(n,a,i){return function(s){this.style.setProperty(n,a.call(this,s),i)}}function Xw(n,a,i){var s,r;function c(){var u=a.apply(this,arguments);return u!==r&&(s=(r=u)&&qw(n,u,i)),s}return c._value=a,c}function Gw(n,a,i){var s="style."+(n+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(a==null)return this.tween(s,null);if(typeof a!="function")throw new Error;return this.tween(s,Xw(n,a,i??""))}function Zw(n){return function(){this.textContent=n}}function Iw(n){return function(){var a=n(this);this.textContent=a??""}}function Qw(n){return this.tween("text",typeof n=="function"?Iw(vu(this,"text",n)):Zw(n==null?"":n+""))}function Kw(n){return function(a){this.textContent=n.call(this,a)}}function Fw(n){var a,i;function s(){var r=n.apply(this,arguments);return r!==i&&(a=(i=r)&&Kw(r)),a}return s._value=n,s}function Jw(n){var a="text";if(arguments.length<1)return(a=this.tween(a))&&a._value;if(n==null)return this.tween(a,null);if(typeof n!="function")throw new Error;return this.tween(a,Fw(n))}function Pw(){for(var n=this._name,a=this._id,i=Zp(),s=this._groups,r=s.length,c=0;c<r;++c)for(var u=s[c],h=u.length,g,p=0;p<h;++p)if(g=u[p]){var x=In(g,a);ar(g,n,i,p,u,{time:x.time+x.delay+x.duration,delay:0,duration:x.duration,ease:x.ease})}return new Sa(s,this._parents,n,i)}function Ww(){var n,a,i=this,s=i._id,r=i.size();return new Promise(function(c,u){var h={value:u},g={value:function(){--r===0&&c()}};i.each(function(){var p=ca(this,s),x=p.on;x!==n&&(a=(n=x).copy(),a._.cancel.push(h),a._.interrupt.push(h),a._.end.push(g)),p.on=a}),r===0&&c()})}var eE=0;function Sa(n,a,i,s){this._groups=n,this._parents=a,this._name=i,this._id=s}function Zp(){return++eE}var wa=uo.prototype;Sa.prototype={constructor:Sa,select:Rw,selectAll:jw,selectChild:wa.selectChild,selectChildren:wa.selectChildren,filter:kw,merge:Tw,selection:Hw,transition:Pw,call:wa.call,nodes:wa.nodes,node:wa.node,size:wa.size,empty:wa.empty,each:wa.each,on:zw,attr:fw,attrTween:mw,style:Yw,styleTween:Gw,text:Qw,textTween:Jw,remove:Ow,tween:lw,delay:vw,duration:ww,ease:_w,easeVarying:Nw,end:Ww,[Symbol.iterator]:wa[Symbol.iterator]};function tE(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var nE={time:null,delay:0,duration:250,ease:tE};function aE(n,a){for(var i;!(i=n.__transition)||!(i=i[a]);)if(!(n=n.parentNode))throw new Error(`transition ${a} not found`);return i}function lE(n){var a,i;n instanceof Sa?(a=n._id,n=n._name):(a=Zp(),(i=nE).time=pu(),n=n==null?null:n+"");for(var s=this._groups,r=s.length,c=0;c<r;++c)for(var u=s[c],h=u.length,g,p=0;p<h;++p)(g=u[p])&&ar(g,n,a,p,u,i||aE(g,a));return new Sa(s,this._parents,n,a)}uo.prototype.interrupt=tw,uo.prototype.transition=lE;const ir=n=>()=>n;function iE(n,{sourceEvent:a,target:i,transform:s,dispatch:r}){Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:a,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:s,enumerable:!0,configurable:!0},_:{value:r}})}function Ea(n,a,i){this.k=n,this.x=a,this.y=i}Ea.prototype={constructor:Ea,scale:function(n){return n===1?this:new Ea(this.k*n,this.x,this.y)},translate:function(n,a){return n===0&a===0?this:new Ea(this.k,this.x+this.k*n,this.y+this.k*a)},apply:function(n){return[n[0]*this.k+this.x,n[1]*this.k+this.y]},applyX:function(n){return n*this.k+this.x},applyY:function(n){return n*this.k+this.y},invert:function(n){return[(n[0]-this.x)/this.k,(n[1]-this.y)/this.k]},invertX:function(n){return(n-this.x)/this.k},invertY:function(n){return(n-this.y)/this.k},rescaleX:function(n){return n.copy().domain(n.range().map(this.invertX,this).map(n.invert,n))},rescaleY:function(n){return n.copy().domain(n.range().map(this.invertY,this).map(n.invert,n))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var or=new Ea(1,0,0);Ip.prototype=Ea.prototype;function Ip(n){for(;!n.__zoom;)if(!(n=n.parentNode))return or;return n.__zoom}function bu(n){n.stopImmediatePropagation()}function So(n){n.preventDefault(),n.stopImmediatePropagation()}function oE(n){return(!n.ctrlKey||n.type==="wheel")&&!n.button}function sE(){var n=this;return n instanceof SVGElement?(n=n.ownerSVGElement||n,n.hasAttribute("viewBox")?(n=n.viewBox.baseVal,[[n.x,n.y],[n.x+n.width,n.y+n.height]]):[[0,0],[n.width.baseVal.value,n.height.baseVal.value]]):[[0,0],[n.clientWidth,n.clientHeight]]}function Qp(){return this.__zoom||or}function rE(n){return-n.deltaY*(n.deltaMode===1?.05:n.deltaMode?1:.002)*(n.ctrlKey?10:1)}function cE(){return navigator.maxTouchPoints||"ontouchstart"in this}function uE(n,a,i){var s=n.invertX(a[0][0])-i[0][0],r=n.invertX(a[1][0])-i[1][0],c=n.invertY(a[0][1])-i[0][1],u=n.invertY(a[1][1])-i[1][1];return n.translate(r>s?(s+r)/2:Math.min(0,s)||Math.max(0,r),u>c?(c+u)/2:Math.min(0,c)||Math.max(0,u))}function Kp(){var n=oE,a=sE,i=uE,s=rE,r=cE,c=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],h=250,g=Fs,p=Us("start","zoom","end"),x,y,v,S=500,b=150,E=0,_=10;function T(H){H.property("__zoom",Qp).on("wheel.zoom",K,{passive:!1}).on("mousedown.zoom",J).on("dblclick.zoom",fe).filter(r).on("touchstart.zoom",U).on("touchmove.zoom",F).on("touchend.zoom touchcancel.zoom",ae).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}T.transform=function(H,I,k,L){var $=H.selection?H.selection():H;$.property("__zoom",Qp),H!==$?D(H,I,k,L):$.interrupt().each(function(){R(this,arguments).event(L).start().zoom(null,typeof I=="function"?I.apply(this,arguments):I).end()})},T.scaleBy=function(H,I,k,L){T.scaleTo(H,function(){var $=this.__zoom.k,Z=typeof I=="function"?I.apply(this,arguments):I;return $*Z},k,L)},T.scaleTo=function(H,I,k,L){T.transform(H,function(){var $=a.apply(this,arguments),Z=this.__zoom,Y=k==null?C($):typeof k=="function"?k.apply(this,arguments):k,A=Z.invert(Y),O=typeof I=="function"?I.apply(this,arguments):I;return i(N(z(Z,O),Y,A),$,u)},k,L)},T.translateBy=function(H,I,k,L){T.transform(H,function(){return i(this.__zoom.translate(typeof I=="function"?I.apply(this,arguments):I,typeof k=="function"?k.apply(this,arguments):k),a.apply(this,arguments),u)},null,L)},T.translateTo=function(H,I,k,L,$){T.transform(H,function(){var Z=a.apply(this,arguments),Y=this.__zoom,A=L==null?C(Z):typeof L=="function"?L.apply(this,arguments):L;return i(or.translate(A[0],A[1]).scale(Y.k).translate(typeof I=="function"?-I.apply(this,arguments):-I,typeof k=="function"?-k.apply(this,arguments):-k),Z,u)},L,$)};function z(H,I){return I=Math.max(c[0],Math.min(c[1],I)),I===H.k?H:new Ea(I,H.x,H.y)}function N(H,I,k){var L=I[0]-k[0]*H.k,$=I[1]-k[1]*H.k;return L===H.x&&$===H.y?H:new Ea(H.k,L,$)}function C(H){return[(+H[0][0]+ +H[1][0])/2,(+H[0][1]+ +H[1][1])/2]}function D(H,I,k,L){H.on("start.zoom",function(){R(this,arguments).event(L).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(L).end()}).tween("zoom",function(){var $=this,Z=arguments,Y=R($,Z).event(L),A=a.apply($,Z),O=k==null?C(A):typeof k=="function"?k.apply($,Z):k,G=Math.max(A[1][0]-A[0][0],A[1][1]-A[0][1]),P=$.__zoom,se=typeof I=="function"?I.apply($,Z):I,ge=g(P.invert(O).concat(G/P.k),se.invert(O).concat(G/se.k));return function(he){if(he===1)he=se;else{var ue=ge(he),me=G/ue[2];he=new Ea(me,O[0]-ue[0]*me,O[1]-ue[1]*me)}Y.zoom(null,he)}})}function R(H,I,k){return!k&&H.__zooming||new j(H,I)}function j(H,I){this.that=H,this.args=I,this.active=0,this.sourceEvent=null,this.extent=a.apply(H,I),this.taps=0}j.prototype={event:function(H){return H&&(this.sourceEvent=H),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(H,I){return this.mouse&&H!=="mouse"&&(this.mouse[1]=I.invert(this.mouse[0])),this.touch0&&H!=="touch"&&(this.touch0[1]=I.invert(this.touch0[0])),this.touch1&&H!=="touch"&&(this.touch1[1]=I.invert(this.touch1[0])),this.that.__zoom=I,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(H){var I=bn(this.that).datum();p.call(H,this.that,new iE(H,{sourceEvent:this.sourceEvent,target:T,transform:this.that.__zoom,dispatch:p}),I)}};function K(H,...I){if(!n.apply(this,arguments))return;var k=R(this,I).event(H),L=this.__zoom,$=Math.max(c[0],Math.min(c[1],L.k*Math.pow(2,s.apply(this,arguments)))),Z=Gn(H);if(k.wheel)(k.mouse[0][0]!==Z[0]||k.mouse[0][1]!==Z[1])&&(k.mouse[1]=L.invert(k.mouse[0]=Z)),clearTimeout(k.wheel);else{if(L.k===$)return;k.mouse=[Z,L.invert(Z)],lr(this),k.start()}So(H),k.wheel=setTimeout(Y,b),k.zoom("mouse",i(N(z(L,$),k.mouse[0],k.mouse[1]),k.extent,u));function Y(){k.wheel=null,k.end()}}function J(H,...I){if(v||!n.apply(this,arguments))return;var k=H.currentTarget,L=R(this,I,!0).event(H),$=bn(H.view).on("mousemove.zoom",O,!0).on("mouseup.zoom",G,!0),Z=Gn(H,k),Y=H.clientX,A=H.clientY;yp(H.view),bu(H),L.mouse=[Z,this.__zoom.invert(Z)],lr(this),L.start();function O(P){if(So(P),!L.moved){var se=P.clientX-Y,ge=P.clientY-A;L.moved=se*se+ge*ge>E}L.event(P).zoom("mouse",i(N(L.that.__zoom,L.mouse[0]=Gn(P,k),L.mouse[1]),L.extent,u))}function G(P){$.on("mousemove.zoom mouseup.zoom",null),xp(P.view,L.moved),So(P),L.event(P).end()}}function fe(H,...I){if(n.apply(this,arguments)){var k=this.__zoom,L=Gn(H.changedTouches?H.changedTouches[0]:H,this),$=k.invert(L),Z=k.k*(H.shiftKey?.5:2),Y=i(N(z(k,Z),L,$),a.apply(this,I),u);So(H),h>0?bn(this).transition().duration(h).call(D,Y,L,H):bn(this).call(T.transform,Y,L,H)}}function U(H,...I){if(n.apply(this,arguments)){var k=H.touches,L=k.length,$=R(this,I,H.changedTouches.length===L).event(H),Z,Y,A,O;for(bu(H),Y=0;Y<L;++Y)A=k[Y],O=Gn(A,this),O=[O,this.__zoom.invert(O),A.identifier],$.touch0?!$.touch1&&$.touch0[2]!==O[2]&&($.touch1=O,$.taps=0):($.touch0=O,Z=!0,$.taps=1+!!x);x&&(x=clearTimeout(x)),Z&&($.taps<2&&(y=O[0],x=setTimeout(function(){x=null},S)),lr(this),$.start())}}function F(H,...I){if(this.__zooming){var k=R(this,I).event(H),L=H.changedTouches,$=L.length,Z,Y,A,O;for(So(H),Z=0;Z<$;++Z)Y=L[Z],A=Gn(Y,this),k.touch0&&k.touch0[2]===Y.identifier?k.touch0[0]=A:k.touch1&&k.touch1[2]===Y.identifier&&(k.touch1[0]=A);if(Y=k.that.__zoom,k.touch1){var G=k.touch0[0],P=k.touch0[1],se=k.touch1[0],ge=k.touch1[1],he=(he=se[0]-G[0])*he+(he=se[1]-G[1])*he,ue=(ue=ge[0]-P[0])*ue+(ue=ge[1]-P[1])*ue;Y=z(Y,Math.sqrt(he/ue)),A=[(G[0]+se[0])/2,(G[1]+se[1])/2],O=[(P[0]+ge[0])/2,(P[1]+ge[1])/2]}else if(k.touch0)A=k.touch0[0],O=k.touch0[1];else return;k.zoom("touch",i(N(Y,A,O),k.extent,u))}}function ae(H,...I){if(this.__zooming){var k=R(this,I).event(H),L=H.changedTouches,$=L.length,Z,Y;for(bu(H),v&&clearTimeout(v),v=setTimeout(function(){v=null},S),Z=0;Z<$;++Z)Y=L[Z],k.touch0&&k.touch0[2]===Y.identifier?delete k.touch0:k.touch1&&k.touch1[2]===Y.identifier&&delete k.touch1;if(k.touch1&&!k.touch0&&(k.touch0=k.touch1,delete k.touch1),k.touch0)k.touch0[1]=this.__zoom.invert(k.touch0[0]);else if(k.end(),k.taps===2&&(Y=Gn(Y,this),Math.hypot(y[0]-Y[0],y[1]-Y[1])<_)){var A=bn(this).on("dblclick.zoom");A&&A.apply(this,arguments)}}}return T.wheelDelta=function(H){return arguments.length?(s=typeof H=="function"?H:ir(+H),T):s},T.filter=function(H){return arguments.length?(n=typeof H=="function"?H:ir(!!H),T):n},T.touchable=function(H){return arguments.length?(r=typeof H=="function"?H:ir(!!H),T):r},T.extent=function(H){return arguments.length?(a=typeof H=="function"?H:ir([[+H[0][0],+H[0][1]],[+H[1][0],+H[1][1]]]),T):a},T.scaleExtent=function(H){return arguments.length?(c[0]=+H[0],c[1]=+H[1],T):[c[0],c[1]]},T.translateExtent=function(H){return arguments.length?(u[0][0]=+H[0][0],u[1][0]=+H[1][0],u[0][1]=+H[0][1],u[1][1]=+H[1][1],T):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},T.constrain=function(H){return arguments.length?(i=H,T):i},T.duration=function(H){return arguments.length?(h=+H,T):h},T.interpolate=function(H){return arguments.length?(g=H,T):g},T.on=function(){var H=p.on.apply(p,arguments);return H===p?T:H},T.clickDistance=function(H){return arguments.length?(E=(H=+H)*H,T):Math.sqrt(E)},T.tapDistance=function(H){return arguments.length?(_=+H,T):_},T}const ua={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:n=>`Node type "${n}" 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:n=>`The old edge with id=${n} does not exist.`,error009:n=>`Marker type "${n}" doesn't exist.`,error008:(n,{id:a,sourceHandle:i,targetHandle:s})=>`Couldn't create edge for ${n} handle id: "${n==="source"?i:s}", edge id: ${a}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:n=>`Edge type "${n}" not found. Using fallback type "default".`,error012:n=>`Node with id "${n}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(n="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${n}/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."},wo=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Fp=["Enter"," ","Escape"],Jp={"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:n,x:a,y:i})=>`Moved selected node ${n}. New position, x: ${a}, 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 ui;(function(n){n.Strict="strict",n.Loose="loose"})(ui||(ui={}));var Dl;(function(n){n.Free="free",n.Vertical="vertical",n.Horizontal="horizontal"})(Dl||(Dl={}));var Eo;(function(n){n.Partial="partial",n.Full="full"})(Eo||(Eo={}));const Pp={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null};var Fa;(function(n){n.Bezier="default",n.Straight="straight",n.Step="step",n.SmoothStep="smoothstep",n.SimpleBezier="simplebezier"})(Fa||(Fa={}));var sr;(function(n){n.Arrow="arrow",n.ArrowClosed="arrowclosed"})(sr||(sr={}));var be;(function(n){n.Left="left",n.Top="top",n.Right="right",n.Bottom="bottom"})(be||(be={}));const Wp={[be.Left]:be.Right,[be.Right]:be.Left,[be.Top]:be.Bottom,[be.Bottom]:be.Top};function eg(n){return n===null?null:n?"valid":"invalid"}const tg=n=>"id"in n&&"source"in n&&"target"in n,fE=n=>"id"in n&&"position"in n&&!("source"in n)&&!("target"in n),Su=n=>"id"in n&&"internals"in n&&!("source"in n)&&!("target"in n),_o=(n,a=[0,0])=>{const{width:i,height:s}=_a(n),r=n.origin??a,c=i*r[0],u=s*r[1];return{x:n.position.x-c,y:n.position.y-u}},dE=(n,a={nodeOrigin:[0,0]})=>{if(n.length===0)return{x:0,y:0,width:0,height:0};const i=n.reduce((s,r)=>{const c=typeof r=="string";let u=!a.nodeLookup&&!c?r:void 0;a.nodeLookup&&(u=c?a.nodeLookup.get(r):Su(r)?r:a.nodeLookup.get(r.id));const h=u?ur(u,a.nodeOrigin):{x:0,y:0,x2:0,y2:0};return rr(s,h)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return cr(i)},Ao=(n,a={})=>{let i={x:1/0,y:1/0,x2:-1/0,y2:-1/0},s=!1;return n.forEach(r=>{(a.filter===void 0||a.filter(r))&&(i=rr(i,ur(r)),s=!0)}),s?cr(i):{x:0,y:0,width:0,height:0}},wu=(n,a,[i,s,r]=[0,0,1],c=!1,u=!1)=>{const h={...To(a,[i,s,r]),width:a.width/r,height:a.height/r},g=[];for(const p of n.values()){const{measured:x,selectable:y=!0,hidden:v=!1}=p;if(u&&!y||v)continue;const S=x.width??p.width??p.initialWidth??null,b=x.height??p.height??p.initialHeight??null,E=No(h,di(p)),_=(S??0)*(b??0),T=c&&E>0;(!p.internals.handleBounds||T||E>=_||p.dragging)&&g.push(p)}return g},hE=(n,a)=>{const i=new Set;return n.forEach(s=>{i.add(s.id)}),a.filter(s=>i.has(s.source)||i.has(s.target))};function pE(n,a){const i=new Map,s=a?.nodes?new Set(a.nodes.map(r=>r.id)):null;return n.forEach(r=>{r.measured.width&&r.measured.height&&(a?.includeHiddenNodes||!r.hidden)&&(!s||s.has(r.id))&&i.set(r.id,r)}),i}async function gE({nodes:n,width:a,height:i,panZoom:s,minZoom:r,maxZoom:c},u){if(n.size===0)return Promise.resolve(!0);const h=pE(n,u),g=Ao(h),p=_u(g,a,i,u?.minZoom??r,u?.maxZoom??c,u?.padding??.1);return await s.setViewport(p,{duration:u?.duration,ease:u?.ease,interpolate:u?.interpolate}),Promise.resolve(!0)}function ng({nodeId:n,nextPosition:a,nodeLookup:i,nodeOrigin:s=[0,0],nodeExtent:r,onError:c}){const u=i.get(n),h=u.parentId?i.get(u.parentId):void 0,{x:g,y:p}=h?h.internals.positionAbsolute:{x:0,y:0},x=u.origin??s;let y=u.extent||r;if(u.extent==="parent"&&!u.expandParent)if(!h)c?.("005",ua.error005());else{const S=h.measured.width,b=h.measured.height;S&&b&&(y=[[g,p],[g+S,p+b]])}else h&&pi(u.extent)&&(y=[[u.extent[0][0]+g,u.extent[0][1]+p],[u.extent[1][0]+g,u.extent[1][1]+p]]);const v=pi(y)?Ol(a,y,u.measured):a;return(u.measured.width===void 0||u.measured.height===void 0)&&c?.("015",ua.error015()),{position:{x:v.x-g+(u.measured.width??0)*x[0],y:v.y-p+(u.measured.height??0)*x[1]},positionAbsolute:v}}async function mE({nodesToRemove:n=[],edgesToRemove:a=[],nodes:i,edges:s,onBeforeDelete:r}){const c=new Set(n.map(v=>v.id)),u=[];for(const v of i){if(v.deletable===!1)continue;const S=c.has(v.id),b=!S&&v.parentId&&u.find(E=>E.id===v.parentId);(S||b)&&u.push(v)}const h=new Set(a.map(v=>v.id)),g=s.filter(v=>v.deletable!==!1),x=hE(u,g);for(const v of g)h.has(v.id)&&!x.find(b=>b.id===v.id)&&x.push(v);if(!r)return{edges:x,nodes:u};const y=await r({nodes:u,edges:x});return typeof y=="boolean"?y?{edges:x,nodes:u}:{edges:[],nodes:[]}:y}const fi=(n,a=0,i=1)=>Math.min(Math.max(n,a),i),Ol=(n={x:0,y:0},a,i)=>({x:fi(n.x,a[0][0],a[1][0]-(i?.width??0)),y:fi(n.y,a[0][1],a[1][1]-(i?.height??0))});function ag(n,a,i){const{width:s,height:r}=_a(i),{x:c,y:u}=i.internals.positionAbsolute;return Ol(n,[[c,u],[c+s,u+r]],a)}const lg=(n,a,i)=>n<a?fi(Math.abs(n-a),1,a)/a:n>i?-fi(Math.abs(n-i),1,a)/a:0,ig=(n,a,i=15,s=40)=>{const r=lg(n.x,s,a.width-s)*i,c=lg(n.y,s,a.height-s)*i;return[r,c]},rr=(n,a)=>({x:Math.min(n.x,a.x),y:Math.min(n.y,a.y),x2:Math.max(n.x2,a.x2),y2:Math.max(n.y2,a.y2)}),Eu=({x:n,y:a,width:i,height:s})=>({x:n,y:a,x2:n+i,y2:a+s}),cr=({x:n,y:a,x2:i,y2:s})=>({x:n,y:a,width:i-n,height:s-a}),di=(n,a=[0,0])=>{const{x:i,y:s}=Su(n)?n.internals.positionAbsolute:_o(n,a);return{x:i,y:s,width:n.measured?.width??n.width??n.initialWidth??0,height:n.measured?.height??n.height??n.initialHeight??0}},ur=(n,a=[0,0])=>{const{x:i,y:s}=Su(n)?n.internals.positionAbsolute:_o(n,a);return{x:i,y:s,x2:i+(n.measured?.width??n.width??n.initialWidth??0),y2:s+(n.measured?.height??n.height??n.initialHeight??0)}},og=(n,a)=>cr(rr(Eu(n),Eu(a))),No=(n,a)=>{const i=Math.max(0,Math.min(n.x+n.width,a.x+a.width)-Math.max(n.x,a.x)),s=Math.max(0,Math.min(n.y+n.height,a.y+a.height)-Math.max(n.y,a.y));return Math.ceil(i*s)},sg=n=>Qn(n.width)&&Qn(n.height)&&Qn(n.x)&&Qn(n.y),Qn=n=>!isNaN(n)&&isFinite(n),yE=(n,a)=>{},ko=(n,a=[1,1])=>({x:a[0]*Math.round(n.x/a[0]),y:a[1]*Math.round(n.y/a[1])}),To=({x:n,y:a},[i,s,r],c=!1,u=[1,1])=>{const h={x:(n-i)/r,y:(a-s)/r};return c?ko(h,u):h},fr=({x:n,y:a},[i,s,r])=>({x:n*r+i,y:a*r+s});function hi(n,a){if(typeof n=="number")return Math.floor((a-a/(1+n))*.5);if(typeof n=="string"&&n.endsWith("px")){const i=parseFloat(n);if(!Number.isNaN(i))return Math.floor(i)}if(typeof n=="string"&&n.endsWith("%")){const i=parseFloat(n);if(!Number.isNaN(i))return Math.floor(a*i*.01)}return console.error(`[React Flow] The padding value "${n}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function xE(n,a,i){if(typeof n=="string"||typeof n=="number"){const s=hi(n,i),r=hi(n,a);return{top:s,right:r,bottom:s,left:r,x:r*2,y:s*2}}if(typeof n=="object"){const s=hi(n.top??n.y??0,i),r=hi(n.bottom??n.y??0,i),c=hi(n.left??n.x??0,a),u=hi(n.right??n.x??0,a);return{top:s,right:u,bottom:r,left:c,x:c+u,y:s+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function vE(n,a,i,s,r,c){const{x:u,y:h}=fr(n,[a,i,s]),{x:g,y:p}=fr({x:n.x+n.width,y:n.y+n.height},[a,i,s]),x=r-g,y=c-p;return{left:Math.floor(u),top:Math.floor(h),right:Math.floor(x),bottom:Math.floor(y)}}const _u=(n,a,i,s,r,c)=>{const u=xE(c,a,i),h=(a-u.x)/n.width,g=(i-u.y)/n.height,p=Math.min(h,g),x=fi(p,s,r),y=n.x+n.width/2,v=n.y+n.height/2,S=a/2-y*x,b=i/2-v*x,E=vE(n,S,b,x,a,i),_={left:Math.min(E.left-u.left,0),top:Math.min(E.top-u.top,0),right:Math.min(E.right-u.right,0),bottom:Math.min(E.bottom-u.bottom,0)};return{x:S-_.left+_.right,y:b-_.top+_.bottom,zoom:x}},Co=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function pi(n){return n!=null&&n!=="parent"}function _a(n){return{width:n.measured?.width??n.width??n.initialWidth??0,height:n.measured?.height??n.height??n.initialHeight??0}}function rg(n){return(n.measured?.width??n.width??n.initialWidth)!==void 0&&(n.measured?.height??n.height??n.initialHeight)!==void 0}function cg(n,a={width:0,height:0},i,s,r){const c={...n},u=s.get(i);if(u){const h=u.origin||r;c.x+=u.internals.positionAbsolute.x-(a.width??0)*h[0],c.y+=u.internals.positionAbsolute.y-(a.height??0)*h[1]}return c}function ug(n,a){if(n.size!==a.size)return!1;for(const i of n)if(!a.has(i))return!1;return!0}function bE(){let n,a;return{promise:new Promise((s,r)=>{n=s,a=r}),resolve:n,reject:a}}function SE(n){return{...Jp,...n||{}}}function Mo(n,{snapGrid:a=[0,0],snapToGrid:i=!1,transform:s,containerBounds:r}){const{x:c,y:u}=Kn(n),h=To({x:c-(r?.left??0),y:u-(r?.top??0)},s),{x:g,y:p}=i?ko(h,a):h;return{xSnapped:g,ySnapped:p,...h}}const Au=n=>({width:n.offsetWidth,height:n.offsetHeight}),fg=n=>n?.getRootNode?.()||window?.document,wE=["INPUT","SELECT","TEXTAREA"];function dg(n){const a=n.composedPath?.()?.[0]||n.target;return a?.nodeType!==1?!1:wE.includes(a.nodeName)||a.hasAttribute("contenteditable")||!!a.closest(".nokey")}const hg=n=>"clientX"in n,Kn=(n,a)=>{const i=hg(n),s=i?n.clientX:n.touches?.[0].clientX,r=i?n.clientY:n.touches?.[0].clientY;return{x:s-(a?.left??0),y:r-(a?.top??0)}},pg=(n,a,i,s,r)=>{const c=a.querySelectorAll(`.${n}`);return!c||!c.length?null:Array.from(c).map(u=>{const h=u.getBoundingClientRect();return{id:u.getAttribute("data-handleid"),type:n,nodeId:r,position:u.getAttribute("data-handlepos"),x:(h.left-i.left)/s,y:(h.top-i.top)/s,...Au(u)}})};function gg({sourceX:n,sourceY:a,targetX:i,targetY:s,sourceControlX:r,sourceControlY:c,targetControlX:u,targetControlY:h}){const g=n*.125+r*.375+u*.375+i*.125,p=a*.125+c*.375+h*.375+s*.125,x=Math.abs(g-n),y=Math.abs(p-a);return[g,p,x,y]}function dr(n,a){return n>=0?.5*n:a*25*Math.sqrt(-n)}function mg({pos:n,x1:a,y1:i,x2:s,y2:r,c}){switch(n){case be.Left:return[a-dr(a-s,c),i];case be.Right:return[a+dr(s-a,c),i];case be.Top:return[a,i-dr(i-r,c)];case be.Bottom:return[a,i+dr(r-i,c)]}}function Nu({sourceX:n,sourceY:a,sourcePosition:i=be.Bottom,targetX:s,targetY:r,targetPosition:c=be.Top,curvature:u=.25}){const[h,g]=mg({pos:i,x1:n,y1:a,x2:s,y2:r,c:u}),[p,x]=mg({pos:c,x1:s,y1:r,x2:n,y2:a,c:u}),[y,v,S,b]=gg({sourceX:n,sourceY:a,targetX:s,targetY:r,sourceControlX:h,sourceControlY:g,targetControlX:p,targetControlY:x});return[`M${n},${a} C${h},${g} ${p},${x} ${s},${r}`,y,v,S,b]}function yg({sourceX:n,sourceY:a,targetX:i,targetY:s}){const r=Math.abs(i-n)/2,c=i<n?i+r:i-r,u=Math.abs(s-a)/2,h=s<a?s+u:s-u;return[c,h,r,u]}function EE({sourceNode:n,targetNode:a,selected:i=!1,zIndex:s,elevateOnSelect:r=!1}){if(s!==void 0)return s;const c=r&&i?1e3:0,u=Math.max(n.parentId||r&&n.selected?n.internals.z:0,a.parentId||r&&a.selected?a.internals.z:0);return c+u}function _E({sourceNode:n,targetNode:a,width:i,height:s,transform:r}){const c=rr(ur(n),ur(a));c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const u={x:-r[0]/r[2],y:-r[1]/r[2],width:i/r[2],height:s/r[2]};return No(u,cr(c))>0}const AE=({source:n,sourceHandle:a,target:i,targetHandle:s})=>`xy-edge__${n}${a||""}-${i}${s||""}`,NE=(n,a)=>a.some(i=>i.source===n.source&&i.target===n.target&&(i.sourceHandle===n.sourceHandle||!i.sourceHandle&&!n.sourceHandle)&&(i.targetHandle===n.targetHandle||!i.targetHandle&&!n.targetHandle)),xg=(n,a)=>{if(!n.source||!n.target)return a;let i;return tg(n)?i={...n}:i={...n,id:AE(n)},NE(i,a)?a:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,a.concat(i))};function vg({sourceX:n,sourceY:a,targetX:i,targetY:s}){const[r,c,u,h]=yg({sourceX:n,sourceY:a,targetX:i,targetY:s});return[`M ${n},${a}L ${i},${s}`,r,c,u,h]}const bg={[be.Left]:{x:-1,y:0},[be.Right]:{x:1,y:0},[be.Top]:{x:0,y:-1},[be.Bottom]:{x:0,y:1}},kE=({source:n,sourcePosition:a=be.Bottom,target:i})=>a===be.Left||a===be.Right?n.x<i.x?{x:1,y:0}:{x:-1,y:0}:n.y<i.y?{x:0,y:1}:{x:0,y:-1},Sg=(n,a)=>Math.sqrt(Math.pow(a.x-n.x,2)+Math.pow(a.y-n.y,2));function TE({source:n,sourcePosition:a=be.Bottom,target:i,targetPosition:s=be.Top,center:r,offset:c,stepPosition:u}){const h=bg[a],g=bg[s],p={x:n.x+h.x*c,y:n.y+h.y*c},x={x:i.x+g.x*c,y:i.y+g.y*c},y=kE({source:p,sourcePosition:a,target:x}),v=y.x!==0?"x":"y",S=y[v];let b=[],E,_;const T={x:0,y:0},z={x:0,y:0},[,,N,C]=yg({sourceX:n.x,sourceY:n.y,targetX:i.x,targetY:i.y});if(h[v]*g[v]===-1){v==="x"?(E=r.x??p.x+(x.x-p.x)*u,_=r.y??(p.y+x.y)/2):(E=r.x??(p.x+x.x)/2,_=r.y??p.y+(x.y-p.y)*u);const R=[{x:E,y:p.y},{x:E,y:x.y}],j=[{x:p.x,y:_},{x:x.x,y:_}];h[v]===S?b=v==="x"?R:j:b=v==="x"?j:R}else{const R=[{x:p.x,y:x.y}],j=[{x:x.x,y:p.y}];if(v==="x"?b=h.x===S?j:R:b=h.y===S?R:j,a===s){const F=Math.abs(n[v]-i[v]);if(F<=c){const ae=Math.min(c-1,c-F);h[v]===S?T[v]=(p[v]>n[v]?-1:1)*ae:z[v]=(x[v]>i[v]?-1:1)*ae}}if(a!==s){const F=v==="x"?"y":"x",ae=h[v]===g[F],H=p[F]>x[F],I=p[F]<x[F];(h[v]===1&&(!ae&&H||ae&&I)||h[v]!==1&&(!ae&&I||ae&&H))&&(b=v==="x"?R:j)}const K={x:p.x+T.x,y:p.y+T.y},J={x:x.x+z.x,y:x.y+z.y},fe=Math.max(Math.abs(K.x-b[0].x),Math.abs(J.x-b[0].x)),U=Math.max(Math.abs(K.y-b[0].y),Math.abs(J.y-b[0].y));fe>=U?(E=(K.x+J.x)/2,_=b[0].y):(E=b[0].x,_=(K.y+J.y)/2)}return[[n,{x:p.x+T.x,y:p.y+T.y},...b,{x:x.x+z.x,y:x.y+z.y},i],E,_,N,C]}function CE(n,a,i,s){const r=Math.min(Sg(n,a)/2,Sg(a,i)/2,s),{x:c,y:u}=a;if(n.x===c&&c===i.x||n.y===u&&u===i.y)return`L${c} ${u}`;if(n.y===u){const p=n.x<i.x?-1:1,x=n.y<i.y?1:-1;return`L ${c+r*p},${u}Q ${c},${u} ${c},${u+r*x}`}const h=n.x<i.x?1:-1,g=n.y<i.y?-1:1;return`L ${c},${u+r*g}Q ${c},${u} ${c+r*h},${u}`}function ku({sourceX:n,sourceY:a,sourcePosition:i=be.Bottom,targetX:s,targetY:r,targetPosition:c=be.Top,borderRadius:u=5,centerX:h,centerY:g,offset:p=20,stepPosition:x=.5}){const[y,v,S,b,E]=TE({source:{x:n,y:a},sourcePosition:i,target:{x:s,y:r},targetPosition:c,center:{x:h,y:g},offset:p,stepPosition:x});return[y.reduce((T,z,N)=>{let C="";return N>0&&N<y.length-1?C=CE(y[N-1],z,y[N+1],u):C=`${N===0?"M":"L"}${z.x} ${z.y}`,T+=C,T},""),v,S,b,E]}function wg(n){return n&&!!(n.internals.handleBounds||n.handles?.length)&&!!(n.measured.width||n.width||n.initialWidth)}function ME(n){const{sourceNode:a,targetNode:i}=n;if(!wg(a)||!wg(i))return null;const s=a.internals.handleBounds||Eg(a.handles),r=i.internals.handleBounds||Eg(i.handles),c=_g(s?.source??[],n.sourceHandle),u=_g(n.connectionMode===ui.Strict?r?.target??[]:(r?.target??[]).concat(r?.source??[]),n.targetHandle);if(!c||!u)return n.onError?.("008",ua.error008(c?"target":"source",{id:n.id,sourceHandle:n.sourceHandle,targetHandle:n.targetHandle})),null;const h=c?.position||be.Bottom,g=u?.position||be.Top,p=zo(a,c,h),x=zo(i,u,g);return{sourceX:p.x,sourceY:p.y,targetX:x.x,targetY:x.y,sourcePosition:h,targetPosition:g}}function Eg(n){if(!n)return null;const a=[],i=[];for(const s of n)s.width=s.width??1,s.height=s.height??1,s.type==="source"?a.push(s):s.type==="target"&&i.push(s);return{source:a,target:i}}function zo(n,a,i=be.Left,s=!1){const r=(a?.x??0)+n.internals.positionAbsolute.x,c=(a?.y??0)+n.internals.positionAbsolute.y,{width:u,height:h}=a??_a(n);if(s)return{x:r+u/2,y:c+h/2};switch(a?.position??i){case be.Top:return{x:r+u/2,y:c};case be.Right:return{x:r+u,y:c+h/2};case be.Bottom:return{x:r+u/2,y:c+h};case be.Left:return{x:r,y:c+h/2}}}function _g(n,a){return n&&(a?n.find(i=>i.id===a):n[0])||null}function Tu(n,a){return n?typeof n=="string"?n:`${a?`${a}__`:""}${Object.keys(n).sort().map(s=>`${s}=${n[s]}`).join("&")}`:""}function zE(n,{id:a,defaultColor:i,defaultMarkerStart:s,defaultMarkerEnd:r}){const c=new Set;return n.reduce((u,h)=>([h.markerStart||s,h.markerEnd||r].forEach(g=>{if(g&&typeof g=="object"){const p=Tu(g,a);c.has(p)||(u.push({id:p,color:g.color||i,...g}),c.add(p))}}),u),[]).sort((u,h)=>u.id.localeCompare(h.id))}const Ag=1e3,DE=10,Cu={nodeOrigin:[0,0],nodeExtent:wo,elevateNodesOnSelect:!0,defaults:{}},OE={...Cu,checkEquality:!0};function Mu(n,a){const i={...n};for(const s in a)a[s]!==void 0&&(i[s]=a[s]);return i}function RE(n,a,i){const s=Mu(Cu,i);for(const r of n.values())if(r.parentId)Du(r,n,a,s);else{const c=_o(r,s.nodeOrigin),u=pi(r.extent)?r.extent:s.nodeExtent,h=Ol(c,u,_a(r));r.internals.positionAbsolute=h}}function jE(n,a){if(!n.handles)return n.measured?a?.internals.handleBounds:void 0;const i=[],s=[];for(const r of n.handles){const c={id:r.id,width:r.width??1,height:r.height??1,nodeId:n.id,x:r.x,y:r.y,position:r.position,type:r.type};r.type==="source"?i.push(c):r.type==="target"&&s.push(c)}return{source:i,target:s}}function zu(n,a,i,s){const r=Mu(OE,s);let c={i:-1},u=n.length>0;const h=new Map(a),g=r?.elevateNodesOnSelect?Ag:0;a.clear(),i.clear();for(const p of n){let x=h.get(p.id);if(r.checkEquality&&p===x?.internals.userNode)a.set(p.id,x);else{const y=_o(p,r.nodeOrigin),v=pi(p.extent)?p.extent:r.nodeExtent,S=Ol(y,v,_a(p));x={...r.defaults,...p,measured:{width:p.measured?.width,height:p.measured?.height},internals:{positionAbsolute:S,handleBounds:jE(p,x),z:Ng(p,g),userNode:p}},a.set(p.id,x)}(x.measured===void 0||x.measured.width===void 0||x.measured.height===void 0)&&!x.hidden&&(u=!1),p.parentId&&Du(x,a,i,s,c)}return u}function LE(n,a){if(!n.parentId)return;const i=a.get(n.parentId);i?i.set(n.id,n):a.set(n.parentId,new Map([[n.id,n]]))}function Du(n,a,i,s,r){const{elevateNodesOnSelect:c,nodeOrigin:u,nodeExtent:h}=Mu(Cu,s),g=n.parentId,p=a.get(g);if(!p){console.warn(`Parent node ${g} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}LE(n,i),r&&!p.parentId&&p.internals.rootParentIndex===void 0&&(p.internals.rootParentIndex=++r.i,p.internals.z=p.internals.z+r.i*DE),r&&p.internals.rootParentIndex!==void 0&&(r.i=p.internals.rootParentIndex);const x=c?Ag:0,{x:y,y:v,z:S}=HE(n,p,u,h,x),{positionAbsolute:b}=n.internals,E=y!==b.x||v!==b.y;(E||S!==n.internals.z)&&a.set(n.id,{...n,internals:{...n.internals,positionAbsolute:E?{x:y,y:v}:b,z:S}})}function Ng(n,a){return(Qn(n.zIndex)?n.zIndex:0)+(n.selected?a:0)}function HE(n,a,i,s,r){const{x:c,y:u}=a.internals.positionAbsolute,h=_a(n),g=_o(n,i),p=pi(n.extent)?Ol(g,n.extent,h):g;let x=Ol({x:c+p.x,y:u+p.y},s,h);n.extent==="parent"&&(x=ag(x,h,a));const y=Ng(n,r),v=a.internals.z??0;return{x:x.x,y:x.y,z:v>=y?v+1:y}}function Ou(n,a,i,s=[0,0]){const r=[],c=new Map;for(const u of n){const h=a.get(u.parentId);if(!h)continue;const g=c.get(u.parentId)?.expandedRect??di(h),p=og(g,u.rect);c.set(u.parentId,{expandedRect:p,parent:h})}return c.size>0&&c.forEach(({expandedRect:u,parent:h},g)=>{const p=h.internals.positionAbsolute,x=_a(h),y=h.origin??s,v=u.x<p.x?Math.round(Math.abs(p.x-u.x)):0,S=u.y<p.y?Math.round(Math.abs(p.y-u.y)):0,b=Math.max(x.width,Math.round(u.width)),E=Math.max(x.height,Math.round(u.height)),_=(b-x.width)*y[0],T=(E-x.height)*y[1];(v>0||S>0||_||T)&&(r.push({id:g,type:"position",position:{x:h.position.x-v+_,y:h.position.y-S+T}}),i.get(g)?.forEach(z=>{n.some(N=>N.id===z.id)||r.push({id:z.id,type:"position",position:{x:z.position.x+v,y:z.position.y+S}})})),(x.width<u.width||x.height<u.height||v||S)&&r.push({id:g,type:"dimensions",setAttributes:!0,dimensions:{width:b+(v?y[0]*v-_:0),height:E+(S?y[1]*S-T:0)}})}),r}function BE(n,a,i,s,r,c){const u=s?.querySelector(".xyflow__viewport");let h=!1;if(!u)return{changes:[],updatedInternals:h};const g=[],p=window.getComputedStyle(u),{m22:x}=new window.DOMMatrixReadOnly(p.transform),y=[];for(const v of n.values()){const S=a.get(v.id);if(!S)continue;if(S.hidden){a.set(S.id,{...S,internals:{...S.internals,handleBounds:void 0}}),h=!0;continue}const b=Au(v.nodeElement),E=S.measured.width!==b.width||S.measured.height!==b.height;if(!!(b.width&&b.height&&(E||!S.internals.handleBounds||v.force))){const T=v.nodeElement.getBoundingClientRect(),z=pi(S.extent)?S.extent:c;let{positionAbsolute:N}=S.internals;S.parentId&&S.extent==="parent"?N=ag(N,b,a.get(S.parentId)):z&&(N=Ol(N,z,b));const C={...S,measured:b,internals:{...S.internals,positionAbsolute:N,handleBounds:{source:pg("source",v.nodeElement,T,x,S.id),target:pg("target",v.nodeElement,T,x,S.id)}}};a.set(S.id,C),S.parentId&&Du(C,a,i,{nodeOrigin:r}),h=!0,E&&(g.push({id:S.id,type:"dimensions",dimensions:b}),S.expandParent&&S.parentId&&y.push({id:S.id,parentId:S.parentId,rect:di(C,r)}))}}if(y.length>0){const v=Ou(y,a,i,r);g.push(...v)}return{changes:g,updatedInternals:h}}async function UE({delta:n,panZoom:a,transform:i,translateExtent:s,width:r,height:c}){if(!a||!n.x&&!n.y)return Promise.resolve(!1);const u=await a.setViewportConstrained({x:i[0]+n.x,y:i[1]+n.y,zoom:i[2]},[[0,0],[r,c]],s),h=!!u&&(u.x!==i[0]||u.y!==i[1]||u.k!==i[2]);return Promise.resolve(h)}function kg(n,a,i,s,r,c){let u=r;const h=s.get(u)||new Map;s.set(u,h.set(i,a)),u=`${r}-${n}`;const g=s.get(u)||new Map;if(s.set(u,g.set(i,a)),c){u=`${r}-${n}-${c}`;const p=s.get(u)||new Map;s.set(u,p.set(i,a))}}function Tg(n,a,i){n.clear(),a.clear();for(const s of i){const{source:r,target:c,sourceHandle:u=null,targetHandle:h=null}=s,g={edgeId:s.id,source:r,target:c,sourceHandle:u,targetHandle:h},p=`${r}-${u}--${c}-${h}`,x=`${c}-${h}--${r}-${u}`;kg("source",g,x,n,r,u),kg("target",g,p,n,c,h),a.set(s.id,s)}}function Cg(n,a){if(!n.parentId)return!1;const i=a.get(n.parentId);return i?i.selected?!0:Cg(i,a):!1}function Mg(n,a,i){let s=n;do{if(s?.matches?.(a))return!0;if(s===i)return!1;s=s?.parentElement}while(s);return!1}function VE(n,a,i,s){const r=new Map;for(const[c,u]of n)if((u.selected||u.id===s)&&(!u.parentId||!Cg(u,n))&&(u.draggable||a&&typeof u.draggable>"u")){const h=n.get(c);h&&r.set(c,{id:c,position:h.position||{x:0,y:0},distance:{x:i.x-h.internals.positionAbsolute.x,y:i.y-h.internals.positionAbsolute.y},extent:h.extent,parentId:h.parentId,origin:h.origin,expandParent:h.expandParent,internals:{positionAbsolute:h.internals.positionAbsolute||{x:0,y:0}},measured:{width:h.measured.width??0,height:h.measured.height??0}})}return r}function Ru({nodeId:n,dragItems:a,nodeLookup:i,dragging:s=!0}){const r=[];for(const[u,h]of a){const g=i.get(u)?.internals.userNode;g&&r.push({...g,position:h.position,dragging:s})}if(!n)return[r[0],r];const c=i.get(n)?.internals.userNode;return[c?{...c,position:a.get(n)?.position||c.position,dragging:s}:r[0],r]}function $E({dragItems:n,snapGrid:a,x:i,y:s}){const r=n.values().next().value;if(!r)return null;const c={x:i-r.distance.x,y:s-r.distance.y},u=ko(c,a);return{x:u.x-c.x,y:u.y-c.y}}function YE({onNodeMouseDown:n,getStoreItems:a,onDragStart:i,onDrag:s,onDragStop:r}){let c={x:null,y:null},u=0,h=new Map,g=!1,p={x:0,y:0},x=null,y=!1,v=null,S=!1,b=!1,E=null;function _({noDragClassName:z,handleSelector:N,domNode:C,isSelectable:D,nodeId:R,nodeClickDistance:j=0}){v=bn(C);function K({x:F,y:ae}){const{nodeLookup:H,nodeExtent:I,snapGrid:k,snapToGrid:L,nodeOrigin:$,onNodeDrag:Z,onSelectionDrag:Y,onError:A,updateNodePositions:O}=a();c={x:F,y:ae};let G=!1;const P=h.size>1,se=P&&I?Eu(Ao(h)):null,ge=P&&L?$E({dragItems:h,snapGrid:k,x:F,y:ae}):null;for(const[he,ue]of h){if(!H.has(he))continue;let me={x:F-ue.distance.x,y:ae-ue.distance.y};L&&(me=ge?{x:Math.round(me.x+ge.x),y:Math.round(me.y+ge.y)}:ko(me,k));let Ne=null;if(P&&I&&!ue.extent&&se){const{positionAbsolute:_e}=ue.internals,we=_e.x-se.x+I[0][0],Me=_e.x+ue.measured.width-se.x2+I[1][0],Re=_e.y-se.y+I[0][1],le=_e.y+ue.measured.height-se.y2+I[1][1];Ne=[[we,Re],[Me,le]]}const{position:ke,positionAbsolute:Se}=ng({nodeId:he,nextPosition:me,nodeLookup:H,nodeExtent:Ne||I,nodeOrigin:$,onError:A});G=G||ue.position.x!==ke.x||ue.position.y!==ke.y,ue.position=ke,ue.internals.positionAbsolute=Se}if(b=b||G,!!G&&(O(h,!0),E&&(s||Z||!R&&Y))){const[he,ue]=Ru({nodeId:R,dragItems:h,nodeLookup:H});s?.(E,h,he,ue),Z?.(E,he,ue),R||Y?.(E,ue)}}async function J(){if(!x)return;const{transform:F,panBy:ae,autoPanSpeed:H,autoPanOnNodeDrag:I}=a();if(!I){g=!1,cancelAnimationFrame(u);return}const[k,L]=ig(p,x,H);(k!==0||L!==0)&&(c.x=(c.x??0)-k/F[2],c.y=(c.y??0)-L/F[2],await ae({x:k,y:L})&&K(c)),u=requestAnimationFrame(J)}function fe(F){const{nodeLookup:ae,multiSelectionActive:H,nodesDraggable:I,transform:k,snapGrid:L,snapToGrid:$,selectNodesOnDrag:Z,onNodeDragStart:Y,onSelectionDragStart:A,unselectNodesAndEdges:O}=a();y=!0,(!Z||!D)&&!H&&R&&(ae.get(R)?.selected||O()),D&&Z&&R&&n?.(R);const G=Mo(F.sourceEvent,{transform:k,snapGrid:L,snapToGrid:$,containerBounds:x});if(c=G,h=VE(ae,I,G,R),h.size>0&&(i||Y||!R&&A)){const[P,se]=Ru({nodeId:R,dragItems:h,nodeLookup:ae});i?.(F.sourceEvent,h,P,se),Y?.(F.sourceEvent,P,se),R||A?.(F.sourceEvent,se)}}const U=vp().clickDistance(j).on("start",F=>{const{domNode:ae,nodeDragThreshold:H,transform:I,snapGrid:k,snapToGrid:L}=a();x=ae?.getBoundingClientRect()||null,S=!1,b=!1,E=F.sourceEvent,H===0&&fe(F),c=Mo(F.sourceEvent,{transform:I,snapGrid:k,snapToGrid:L,containerBounds:x}),p=Kn(F.sourceEvent,x)}).on("drag",F=>{const{autoPanOnNodeDrag:ae,transform:H,snapGrid:I,snapToGrid:k,nodeDragThreshold:L,nodeLookup:$}=a(),Z=Mo(F.sourceEvent,{transform:H,snapGrid:I,snapToGrid:k,containerBounds:x});if(E=F.sourceEvent,(F.sourceEvent.type==="touchmove"&&F.sourceEvent.touches.length>1||R&&!$.has(R))&&(S=!0),!S){if(!g&&ae&&y&&(g=!0,J()),!y){const Y=Kn(F.sourceEvent,x),A=Y.x-p.x,O=Y.y-p.y;Math.sqrt(A*A+O*O)>L&&fe(F)}(c.x!==Z.xSnapped||c.y!==Z.ySnapped)&&h&&y&&(p=Kn(F.sourceEvent,x),K(Z))}}).on("end",F=>{if(!(!y||S)&&(g=!1,y=!1,cancelAnimationFrame(u),h.size>0)){const{nodeLookup:ae,updateNodePositions:H,onNodeDragStop:I,onSelectionDragStop:k}=a();if(b&&(H(h,!1),b=!1),r||I||!R&&k){const[L,$]=Ru({nodeId:R,dragItems:h,nodeLookup:ae,dragging:!1});r?.(F.sourceEvent,h,L,$),I?.(F.sourceEvent,L,$),R||k?.(F.sourceEvent,$)}}}).filter(F=>{const ae=F.target;return!F.button&&(!z||!Mg(ae,`.${z}`,C))&&(!N||Mg(ae,N,C))});v.call(U)}function T(){v?.on(".drag",null)}return{update:_,destroy:T}}function qE(n,a,i){const s=[],r={x:n.x-i,y:n.y-i,width:i*2,height:i*2};for(const c of a.values())No(r,di(c))>0&&s.push(c);return s}const XE=250;function GE(n,a,i,s){let r=[],c=1/0;const u=qE(n,i,a+XE);for(const h of u){const g=[...h.internals.handleBounds?.source??[],...h.internals.handleBounds?.target??[]];for(const p of g){if(s.nodeId===p.nodeId&&s.type===p.type&&s.id===p.id)continue;const{x,y}=zo(h,p,p.position,!0),v=Math.sqrt(Math.pow(x-n.x,2)+Math.pow(y-n.y,2));v>a||(v<c?(r=[{...p,x,y}],c=v):v===c&&r.push({...p,x,y}))}}if(!r.length)return null;if(r.length>1){const h=s.type==="source"?"target":"source";return r.find(g=>g.type===h)??r[0]}return r[0]}function zg(n,a,i,s,r,c=!1){const u=s.get(n);if(!u)return null;const h=r==="strict"?u.internals.handleBounds?.[a]:[...u.internals.handleBounds?.source??[],...u.internals.handleBounds?.target??[]],g=(i?h?.find(p=>p.id===i):h?.[0])??null;return g&&c?{...g,...zo(u,g,g.position,!0)}:g}function Dg(n,a){return n||(a?.classList.contains("target")?"target":a?.classList.contains("source")?"source":null)}function ZE(n,a){let i=null;return a?i=!0:n&&!a&&(i=!1),i}const Og=()=>!0;function IE(n,{connectionMode:a,connectionRadius:i,handleId:s,nodeId:r,edgeUpdaterType:c,isTarget:u,domNode:h,nodeLookup:g,lib:p,autoPanOnConnect:x,flowId:y,panBy:v,cancelConnection:S,onConnectStart:b,onConnect:E,onConnectEnd:_,isValidConnection:T=Og,onReconnectEnd:z,updateConnection:N,getTransform:C,getFromHandle:D,autoPanSpeed:R,dragThreshold:j=1,handleDomNode:K}){const J=fg(n.target);let fe=0,U;const{x:F,y:ae}=Kn(n),H=Dg(c,K),I=h?.getBoundingClientRect();let k=!1;if(!I||!H)return;const L=zg(r,H,s,g,a);if(!L)return;let $=Kn(n,I),Z=!1,Y=null,A=!1,O=null;function G(){if(!x||!I)return;const[ke,Se]=ig($,I,R);v({x:ke,y:Se}),fe=requestAnimationFrame(G)}const P={...L,nodeId:r,type:H,position:L.position},se=g.get(r);let he={inProgress:!0,isValid:null,from:zo(se,P,be.Left,!0),fromHandle:P,fromPosition:P.position,fromNode:se,to:$,toHandle:null,toPosition:Wp[P.position],toNode:null};function ue(){k=!0,N(he),b?.(n,{nodeId:r,handleId:s,handleType:H})}j===0&&ue();function me(ke){if(!k){const{x:Me,y:Re}=Kn(ke),le=Me-F,de=Re-ae;if(!(le*le+de*de>j*j))return;ue()}if(!D()||!P){Ne(ke);return}const Se=C();$=Kn(ke,I),U=GE(To($,Se,!1,[1,1]),i,g,P),Z||(G(),Z=!0);const _e=Rg(ke,{handle:U,connectionMode:a,fromNodeId:r,fromHandleId:s,fromType:u?"target":"source",isValidConnection:T,doc:J,lib:p,flowId:y,nodeLookup:g});O=_e.handleDomNode,Y=_e.connection,A=ZE(!!U,_e.isValid);const we={...he,isValid:A,to:_e.toHandle&&A?fr({x:_e.toHandle.x,y:_e.toHandle.y},Se):$,toHandle:_e.toHandle,toPosition:A&&_e.toHandle?_e.toHandle.position:Wp[P.position],toNode:_e.toHandle?g.get(_e.toHandle.nodeId):null};A&&U&&he.toHandle&&we.toHandle&&he.toHandle.type===we.toHandle.type&&he.toHandle.nodeId===we.toHandle.nodeId&&he.toHandle.id===we.toHandle.id&&he.to.x===we.to.x&&he.to.y===we.to.y||(N(we),he=we)}function Ne(ke){if(!("touches"in ke&&ke.touches.length>0)){if(k){(U||O)&&Y&&A&&E?.(Y);const{inProgress:Se,..._e}=he,we={..._e,toPosition:he.toHandle?he.toPosition:null};_?.(ke,we),c&&z?.(ke,we)}S(),cancelAnimationFrame(fe),Z=!1,A=!1,Y=null,O=null,J.removeEventListener("mousemove",me),J.removeEventListener("mouseup",Ne),J.removeEventListener("touchmove",me),J.removeEventListener("touchend",Ne)}}J.addEventListener("mousemove",me),J.addEventListener("mouseup",Ne),J.addEventListener("touchmove",me),J.addEventListener("touchend",Ne)}function Rg(n,{handle:a,connectionMode:i,fromNodeId:s,fromHandleId:r,fromType:c,doc:u,lib:h,flowId:g,isValidConnection:p=Og,nodeLookup:x}){const y=c==="target",v=a?u.querySelector(`.${h}-flow__handle[data-id="${g}-${a?.nodeId}-${a?.id}-${a?.type}"]`):null,{x:S,y:b}=Kn(n),E=u.elementFromPoint(S,b),_=E?.classList.contains(`${h}-flow__handle`)?E:v,T={handleDomNode:_,isValid:!1,connection:null,toHandle:null};if(_){const z=Dg(void 0,_),N=_.getAttribute("data-nodeid"),C=_.getAttribute("data-handleid"),D=_.classList.contains("connectable"),R=_.classList.contains("connectableend");if(!N||!z)return T;const j={source:y?N:s,sourceHandle:y?C:r,target:y?s:N,targetHandle:y?r:C};T.connection=j;const J=D&&R&&(i===ui.Strict?y&&z==="source"||!y&&z==="target":N!==s||C!==r);T.isValid=J&&p(j),T.toHandle=zg(N,z,C,x,i,!0)}return T}const ju={onPointerDown:IE,isValid:Rg};function QE({domNode:n,panZoom:a,getTransform:i,getViewScale:s}){const r=bn(n);function c({translateExtent:h,width:g,height:p,zoomStep:x=1,pannable:y=!0,zoomable:v=!0,inversePan:S=!1}){const b=N=>{if(N.sourceEvent.type!=="wheel"||!a)return;const C=i(),D=N.sourceEvent.ctrlKey&&Co()?10:1,R=-N.sourceEvent.deltaY*(N.sourceEvent.deltaMode===1?.05:N.sourceEvent.deltaMode?1:.002)*x,j=C[2]*Math.pow(2,R*D);a.scaleTo(j)};let E=[0,0];const _=N=>{(N.sourceEvent.type==="mousedown"||N.sourceEvent.type==="touchstart")&&(E=[N.sourceEvent.clientX??N.sourceEvent.touches[0].clientX,N.sourceEvent.clientY??N.sourceEvent.touches[0].clientY])},T=N=>{const C=i();if(N.sourceEvent.type!=="mousemove"&&N.sourceEvent.type!=="touchmove"||!a)return;const D=[N.sourceEvent.clientX??N.sourceEvent.touches[0].clientX,N.sourceEvent.clientY??N.sourceEvent.touches[0].clientY],R=[D[0]-E[0],D[1]-E[1]];E=D;const j=s()*Math.max(C[2],Math.log(C[2]))*(S?-1:1),K={x:C[0]-R[0]*j,y:C[1]-R[1]*j},J=[[0,0],[g,p]];a.setViewportConstrained({x:K.x,y:K.y,zoom:C[2]},J,h)},z=Kp().on("start",_).on("zoom",y?T:null).on("zoom.wheel",v?b:null);r.call(z,{})}function u(){r.on("zoom",null)}return{update:c,destroy:u,pointer:Gn}}const hr=n=>({x:n.x,y:n.y,zoom:n.k}),Lu=({x:n,y:a,zoom:i})=>or.translate(n,a).scale(i),gi=(n,a)=>n.target.closest(`.${a}`),jg=(n,a)=>a===2&&Array.isArray(n)&&n.includes(2),KE=n=>((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2,Hu=(n,a=0,i=KE,s=()=>{})=>{const r=typeof a=="number"&&a>0;return r||s(),r?n.transition().duration(a).ease(i).on("end",s):n},Lg=n=>{const a=n.ctrlKey&&Co()?10:1;return-n.deltaY*(n.deltaMode===1?.05:n.deltaMode?1:.002)*a};function FE({zoomPanValues:n,noWheelClassName:a,d3Selection:i,d3Zoom:s,panOnScrollMode:r,panOnScrollSpeed:c,zoomOnPinch:u,onPanZoomStart:h,onPanZoom:g,onPanZoomEnd:p}){return x=>{if(gi(x,a))return x.ctrlKey&&x.preventDefault(),!1;x.preventDefault(),x.stopImmediatePropagation();const y=i.property("__zoom").k||1;if(x.ctrlKey&&u){const _=Gn(x),T=Lg(x),z=y*Math.pow(2,T);s.scaleTo(i,z,_,x);return}const v=x.deltaMode===1?20:1;let S=r===Dl.Vertical?0:x.deltaX*v,b=r===Dl.Horizontal?0:x.deltaY*v;!Co()&&x.shiftKey&&r!==Dl.Vertical&&(S=x.deltaY*v,b=0),s.translateBy(i,-(S/y)*c,-(b/y)*c,{internal:!0});const E=hr(i.property("__zoom"));clearTimeout(n.panScrollTimeout),n.isPanScrolling?(g?.(x,E),n.panScrollTimeout=setTimeout(()=>{p?.(x,E),n.isPanScrolling=!1},150)):(n.isPanScrolling=!0,h?.(x,E))}}function JE({noWheelClassName:n,preventScrolling:a,d3ZoomHandler:i}){return function(s,r){const c=s.type==="wheel",u=!a&&c&&!s.ctrlKey,h=gi(s,n);if(s.ctrlKey&&c&&h&&s.preventDefault(),u||h)return null;s.preventDefault(),i.call(this,s,r)}}function PE({zoomPanValues:n,onDraggingChange:a,onPanZoomStart:i}){return s=>{if(s.sourceEvent?.internal)return;const r=hr(s.transform);n.mouseButton=s.sourceEvent?.button||0,n.isZoomingOrPanning=!0,n.prevViewport=r,s.sourceEvent?.type==="mousedown"&&a(!0),i&&i?.(s.sourceEvent,r)}}function WE({zoomPanValues:n,panOnDrag:a,onPaneContextMenu:i,onTransformChange:s,onPanZoom:r}){return c=>{n.usedRightMouseButton=!!(i&&jg(a,n.mouseButton??0)),c.sourceEvent?.sync||s([c.transform.x,c.transform.y,c.transform.k]),r&&!c.sourceEvent?.internal&&r?.(c.sourceEvent,hr(c.transform))}}function e_({zoomPanValues:n,panOnDrag:a,panOnScroll:i,onDraggingChange:s,onPanZoomEnd:r,onPaneContextMenu:c}){return u=>{if(!u.sourceEvent?.internal&&(n.isZoomingOrPanning=!1,c&&jg(a,n.mouseButton??0)&&!n.usedRightMouseButton&&u.sourceEvent&&c(u.sourceEvent),n.usedRightMouseButton=!1,s(!1),r)){const h=hr(u.transform);n.prevViewport=h,clearTimeout(n.timerId),n.timerId=setTimeout(()=>{r?.(u.sourceEvent,h)},i?150:0)}}}function t_({zoomActivationKeyPressed:n,zoomOnScroll:a,zoomOnPinch:i,panOnDrag:s,panOnScroll:r,zoomOnDoubleClick:c,userSelectionActive:u,noWheelClassName:h,noPanClassName:g,lib:p,connectionInProgress:x}){return y=>{const v=n||a,S=i&&y.ctrlKey,b=y.type==="wheel";if(y.button===1&&y.type==="mousedown"&&(gi(y,`${p}-flow__node`)||gi(y,`${p}-flow__edge`)))return!0;if(!s&&!v&&!r&&!c&&!i||u||x&&!b||gi(y,h)&&b||gi(y,g)&&(!b||r&&b&&!n)||!i&&y.ctrlKey&&b)return!1;if(!i&&y.type==="touchstart"&&y.touches?.length>1)return y.preventDefault(),!1;if(!v&&!r&&!S&&b||!s&&(y.type==="mousedown"||y.type==="touchstart")||Array.isArray(s)&&!s.includes(y.button)&&y.type==="mousedown")return!1;const E=Array.isArray(s)&&s.includes(y.button)||!y.button||y.button<=1;return(!y.ctrlKey||b)&&E}}function n_({domNode:n,minZoom:a,maxZoom:i,translateExtent:s,viewport:r,onPanZoom:c,onPanZoomStart:u,onPanZoomEnd:h,onDraggingChange:g}){const p={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},x=n.getBoundingClientRect(),y=Kp().scaleExtent([a,i]).translateExtent(s),v=bn(n).call(y);z({x:r.x,y:r.y,zoom:fi(r.zoom,a,i)},[[0,0],[x.width,x.height]],s);const S=v.on("wheel.zoom"),b=v.on("dblclick.zoom");y.wheelDelta(Lg);function E(U,F){return v?new Promise(ae=>{y?.interpolate(F?.interpolate==="linear"?mo:Fs).transform(Hu(v,F?.duration,F?.ease,()=>ae(!0)),U)}):Promise.resolve(!1)}function _({noWheelClassName:U,noPanClassName:F,onPaneContextMenu:ae,userSelectionActive:H,panOnScroll:I,panOnDrag:k,panOnScrollMode:L,panOnScrollSpeed:$,preventScrolling:Z,zoomOnPinch:Y,zoomOnScroll:A,zoomOnDoubleClick:O,zoomActivationKeyPressed:G,lib:P,onTransformChange:se,connectionInProgress:ge,paneClickDistance:he,selectionOnDrag:ue}){H&&!p.isZoomingOrPanning&&T();const me=I&&!G&&!H;y.clickDistance(ue?1/0:!Qn(he)||he<0?0:he);const Ne=me?FE({zoomPanValues:p,noWheelClassName:U,d3Selection:v,d3Zoom:y,panOnScrollMode:L,panOnScrollSpeed:$,zoomOnPinch:Y,onPanZoomStart:u,onPanZoom:c,onPanZoomEnd:h}):JE({noWheelClassName:U,preventScrolling:Z,d3ZoomHandler:S});if(v.on("wheel.zoom",Ne,{passive:!1}),!H){const Se=PE({zoomPanValues:p,onDraggingChange:g,onPanZoomStart:u});y.on("start",Se);const _e=WE({zoomPanValues:p,panOnDrag:k,onPaneContextMenu:!!ae,onPanZoom:c,onTransformChange:se});y.on("zoom",_e);const we=e_({zoomPanValues:p,panOnDrag:k,panOnScroll:I,onPaneContextMenu:ae,onPanZoomEnd:h,onDraggingChange:g});y.on("end",we)}const ke=t_({zoomActivationKeyPressed:G,panOnDrag:k,zoomOnScroll:A,panOnScroll:I,zoomOnDoubleClick:O,zoomOnPinch:Y,userSelectionActive:H,noPanClassName:F,noWheelClassName:U,lib:P,connectionInProgress:ge});y.filter(ke),O?v.on("dblclick.zoom",b):v.on("dblclick.zoom",null)}function T(){y.on("zoom",null)}async function z(U,F,ae){const H=Lu(U),I=y?.constrain()(H,F,ae);return I&&await E(I),new Promise(k=>k(I))}async function N(U,F){const ae=Lu(U);return await E(ae,F),new Promise(H=>H(ae))}function C(U){if(v){const F=Lu(U),ae=v.property("__zoom");(ae.k!==U.zoom||ae.x!==U.x||ae.y!==U.y)&&y?.transform(v,F,null,{sync:!0})}}function D(){const U=v?Ip(v.node()):{x:0,y:0,k:1};return{x:U.x,y:U.y,zoom:U.k}}function R(U,F){return v?new Promise(ae=>{y?.interpolate(F?.interpolate==="linear"?mo:Fs).scaleTo(Hu(v,F?.duration,F?.ease,()=>ae(!0)),U)}):Promise.resolve(!1)}function j(U,F){return v?new Promise(ae=>{y?.interpolate(F?.interpolate==="linear"?mo:Fs).scaleBy(Hu(v,F?.duration,F?.ease,()=>ae(!0)),U)}):Promise.resolve(!1)}function K(U){y?.scaleExtent(U)}function J(U){y?.translateExtent(U)}function fe(U){const F=!Qn(U)||U<0?0:U;y?.clickDistance(F)}return{update:_,destroy:T,setViewport:N,setViewportConstrained:z,getViewport:D,scaleTo:R,scaleBy:j,setScaleExtent:K,setTranslateExtent:J,syncViewport:C,setClickDistance:fe}}var Rl;(function(n){n.Line="line",n.Handle="handle"})(Rl||(Rl={}));const a_=["top-left","top-right","bottom-left","bottom-right"],l_=["top","right","bottom","left"];function i_({width:n,prevWidth:a,height:i,prevHeight:s,affectsX:r,affectsY:c}){const u=n-a,h=i-s,g=[u>0?1:u<0?-1:0,h>0?1:h<0?-1:0];return u&&r&&(g[0]=g[0]*-1),h&&c&&(g[1]=g[1]*-1),g}function Hg(n){const a=n.includes("right")||n.includes("left"),i=n.includes("bottom")||n.includes("top"),s=n.includes("left"),r=n.includes("top");return{isHorizontal:a,isVertical:i,affectsX:s,affectsY:r}}function Ja(n,a){return Math.max(0,a-n)}function Pa(n,a){return Math.max(0,n-a)}function pr(n,a,i){return Math.max(0,a-n,n-i)}function Bg(n,a){return n?!a:a}function o_(n,a,i,s,r,c,u,h){let{affectsX:g,affectsY:p}=a;const{isHorizontal:x,isVertical:y}=a,v=x&&y,{xSnapped:S,ySnapped:b}=i,{minWidth:E,maxWidth:_,minHeight:T,maxHeight:z}=s,{x:N,y:C,width:D,height:R,aspectRatio:j}=n;let K=Math.floor(x?S-n.pointerX:0),J=Math.floor(y?b-n.pointerY:0);const fe=D+(g?-K:K),U=R+(p?-J:J),F=-c[0]*D,ae=-c[1]*R;let H=pr(fe,E,_),I=pr(U,T,z);if(u){let $=0,Z=0;g&&K<0?$=Ja(N+K+F,u[0][0]):!g&&K>0&&($=Pa(N+fe+F,u[1][0])),p&&J<0?Z=Ja(C+J+ae,u[0][1]):!p&&J>0&&(Z=Pa(C+U+ae,u[1][1])),H=Math.max(H,$),I=Math.max(I,Z)}if(h){let $=0,Z=0;g&&K>0?$=Pa(N+K,h[0][0]):!g&&K<0&&($=Ja(N+fe,h[1][0])),p&&J>0?Z=Pa(C+J,h[0][1]):!p&&J<0&&(Z=Ja(C+U,h[1][1])),H=Math.max(H,$),I=Math.max(I,Z)}if(r){if(x){const $=pr(fe/j,T,z)*j;if(H=Math.max(H,$),u){let Z=0;!g&&!p||g&&!p&&v?Z=Pa(C+ae+fe/j,u[1][1])*j:Z=Ja(C+ae+(g?K:-K)/j,u[0][1])*j,H=Math.max(H,Z)}if(h){let Z=0;!g&&!p||g&&!p&&v?Z=Ja(C+fe/j,h[1][1])*j:Z=Pa(C+(g?K:-K)/j,h[0][1])*j,H=Math.max(H,Z)}}if(y){const $=pr(U*j,E,_)/j;if(I=Math.max(I,$),u){let Z=0;!g&&!p||p&&!g&&v?Z=Pa(N+U*j+F,u[1][0])/j:Z=Ja(N+(p?J:-J)*j+F,u[0][0])/j,I=Math.max(I,Z)}if(h){let Z=0;!g&&!p||p&&!g&&v?Z=Ja(N+U*j,h[1][0])/j:Z=Pa(N+(p?J:-J)*j,h[0][0])/j,I=Math.max(I,Z)}}}J=J+(J<0?I:-I),K=K+(K<0?H:-H),r&&(v?fe>U*j?J=(Bg(g,p)?-K:K)/j:K=(Bg(g,p)?-J:J)*j:x?(J=K/j,p=g):(K=J*j,g=p));const k=g?N+K:N,L=p?C+J:C;return{width:D+(g?-K:K),height:R+(p?-J:J),x:c[0]*K*(g?-1:1)+k,y:c[1]*J*(p?-1:1)+L}}const Ug={width:0,height:0,x:0,y:0},s_={...Ug,pointerX:0,pointerY:0,aspectRatio:1};function r_(n){return[[0,0],[n.measured.width,n.measured.height]]}function c_(n,a,i){const s=a.position.x+n.position.x,r=a.position.y+n.position.y,c=n.measured.width??0,u=n.measured.height??0,h=i[0]*c,g=i[1]*u;return[[s-h,r-g],[s+c-h,r+u-g]]}function u_({domNode:n,nodeId:a,getStoreItems:i,onChange:s,onEnd:r}){const c=bn(n);let u={controlDirection:Hg("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function h({controlPosition:p,boundaries:x,keepAspectRatio:y,resizeDirection:v,onResizeStart:S,onResize:b,onResizeEnd:E,shouldResize:_}){let T={...Ug},z={...s_};u={boundaries:x,resizeDirection:v,keepAspectRatio:y,controlDirection:Hg(p)};let N,C=null,D=[],R,j,K,J=!1;const fe=vp().on("start",U=>{const{nodeLookup:F,transform:ae,snapGrid:H,snapToGrid:I,nodeOrigin:k,paneDomNode:L}=i();if(N=F.get(a),!N)return;C=L?.getBoundingClientRect()??null;const{xSnapped:$,ySnapped:Z}=Mo(U.sourceEvent,{transform:ae,snapGrid:H,snapToGrid:I,containerBounds:C});T={width:N.measured.width??0,height:N.measured.height??0,x:N.position.x??0,y:N.position.y??0},z={...T,pointerX:$,pointerY:Z,aspectRatio:T.width/T.height},R=void 0,N.parentId&&(N.extent==="parent"||N.expandParent)&&(R=F.get(N.parentId),j=R&&N.extent==="parent"?r_(R):void 0),D=[],K=void 0;for(const[Y,A]of F)if(A.parentId===a&&(D.push({id:Y,position:{...A.position},extent:A.extent}),A.extent==="parent"||A.expandParent)){const O=c_(A,N,A.origin??k);K?K=[[Math.min(O[0][0],K[0][0]),Math.min(O[0][1],K[0][1])],[Math.max(O[1][0],K[1][0]),Math.max(O[1][1],K[1][1])]]:K=O}S?.(U,{...T})}).on("drag",U=>{const{transform:F,snapGrid:ae,snapToGrid:H,nodeOrigin:I}=i(),k=Mo(U.sourceEvent,{transform:F,snapGrid:ae,snapToGrid:H,containerBounds:C}),L=[];if(!N)return;const{x:$,y:Z,width:Y,height:A}=T,O={},G=N.origin??I,{width:P,height:se,x:ge,y:he}=o_(z,u.controlDirection,k,u.boundaries,u.keepAspectRatio,G,j,K),ue=P!==Y,me=se!==A,Ne=ge!==$&&ue,ke=he!==Z&&me;if(!Ne&&!ke&&!ue&&!me)return;if((Ne||ke||G[0]===1||G[1]===1)&&(O.x=Ne?ge:T.x,O.y=ke?he:T.y,T.x=O.x,T.y=O.y,D.length>0)){const Me=ge-$,Re=he-Z;for(const le of D)le.position={x:le.position.x-Me+G[0]*(P-Y),y:le.position.y-Re+G[1]*(se-A)},L.push(le)}if((ue||me)&&(O.width=ue&&(!u.resizeDirection||u.resizeDirection==="horizontal")?P:T.width,O.height=me&&(!u.resizeDirection||u.resizeDirection==="vertical")?se:T.height,T.width=O.width,T.height=O.height),R&&N.expandParent){const Me=G[0]*(O.width??0);O.x&&O.x<Me&&(T.x=Me,z.x=z.x-(O.x-Me));const Re=G[1]*(O.height??0);O.y&&O.y<Re&&(T.y=Re,z.y=z.y-(O.y-Re))}const Se=i_({width:T.width,prevWidth:Y,height:T.height,prevHeight:A,affectsX:u.controlDirection.affectsX,affectsY:u.controlDirection.affectsY}),_e={...T,direction:Se};_?.(U,_e)!==!1&&(J=!0,b?.(U,_e),s(O,L))}).on("end",U=>{J&&(E?.(U,{...T}),r?.({...T}),J=!1)});c.call(fe)}function g(){c.on(".drag",null)}return{update:h,destroy:g}}var Bu={exports:{}},Uu={},Vu={exports:{}},$u={};/**
|
|
49
|
+
*/var tp;function zb(){if(tp)return co;tp=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(s,r,c){var u=null;if(c!==void 0&&(u=""+c),r.key!==void 0&&(u=""+r.key),"key"in r){c={};for(var h in r)h!=="key"&&(c[h]=r[h])}else c=r;return r=c.ref,{$$typeof:n,type:s,key:u,ref:r!==void 0?r:null,props:c}}return co.Fragment=a,co.jsx=i,co.jsxs=i,co}var np;function Db(){return np||(np=1,tu.exports=zb()),tu.exports}var m=Db();function Tt(n){if(typeof n=="string"||typeof n=="number")return""+n;let a="";if(Array.isArray(n))for(let i=0,s;i<n.length;i++)(s=Tt(n[i]))!==""&&(a+=(a&&" ")+s);else for(let i in n)n[i]&&(a+=(a&&" ")+i);return a}var Ob={value:()=>{}};function Us(){for(var n=0,a=arguments.length,i={},s;n<a;++n){if(!(s=arguments[n]+"")||s in i||/[\s.]/.test(s))throw new Error("illegal type: "+s);i[s]=[]}return new Vs(i)}function Vs(n){this._=n}function Rb(n,a){return n.trim().split(/^|\s+/).map(function(i){var s="",r=i.indexOf(".");if(r>=0&&(s=i.slice(r+1),i=i.slice(0,r)),i&&!a.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:s}})}Vs.prototype=Us.prototype={constructor:Vs,on:function(n,a){var i=this._,s=Rb(n+"",i),r,c=-1,u=s.length;if(arguments.length<2){for(;++c<u;)if((r=(n=s[c]).type)&&(r=jb(i[r],n.name)))return r;return}if(a!=null&&typeof a!="function")throw new Error("invalid callback: "+a);for(;++c<u;)if(r=(n=s[c]).type)i[r]=ap(i[r],n.name,a);else if(a==null)for(r in i)i[r]=ap(i[r],n.name,null);return this},copy:function(){var n={},a=this._;for(var i in a)n[i]=a[i].slice();return new Vs(n)},call:function(n,a){if((r=arguments.length-2)>0)for(var i=new Array(r),s=0,r,c;s<r;++s)i[s]=arguments[s+2];if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(c=this._[n],s=0,r=c.length;s<r;++s)c[s].value.apply(a,i)},apply:function(n,a,i){if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(var s=this._[n],r=0,c=s.length;r<c;++r)s[r].value.apply(a,i)}};function jb(n,a){for(var i=0,s=n.length,r;i<s;++i)if((r=n[i]).name===a)return r.value}function ap(n,a,i){for(var s=0,r=n.length;s<r;++s)if(n[s].name===a){n[s]=Ob,n=n.slice(0,s).concat(n.slice(s+1));break}return i!=null&&n.push({name:a,value:i}),n}var nu="http://www.w3.org/1999/xhtml";const lp={svg:"http://www.w3.org/2000/svg",xhtml:nu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function $s(n){var a=n+="",i=a.indexOf(":");return i>=0&&(a=n.slice(0,i))!=="xmlns"&&(n=n.slice(i+1)),lp.hasOwnProperty(a)?{space:lp[a],local:n}:n}function Lb(n){return function(){var a=this.ownerDocument,i=this.namespaceURI;return i===nu&&a.documentElement.namespaceURI===nu?a.createElement(n):a.createElementNS(i,n)}}function Hb(n){return function(){return this.ownerDocument.createElementNS(n.space,n.local)}}function ip(n){var a=$s(n);return(a.local?Hb:Lb)(a)}function Bb(){}function au(n){return n==null?Bb:function(){return this.querySelector(n)}}function Ub(n){typeof n!="function"&&(n=au(n));for(var a=this._groups,i=a.length,s=new Array(i),r=0;r<i;++r)for(var c=a[r],u=c.length,h=s[r]=new Array(u),g,p,x=0;x<u;++x)(g=c[x])&&(p=n.call(g,g.__data__,x,c))&&("__data__"in g&&(p.__data__=g.__data__),h[x]=p);return new vn(s,this._parents)}function Vb(n){return n==null?[]:Array.isArray(n)?n:Array.from(n)}function $b(){return[]}function op(n){return n==null?$b:function(){return this.querySelectorAll(n)}}function Yb(n){return function(){return Vb(n.apply(this,arguments))}}function qb(n){typeof n=="function"?n=Yb(n):n=op(n);for(var a=this._groups,i=a.length,s=[],r=[],c=0;c<i;++c)for(var u=a[c],h=u.length,g,p=0;p<h;++p)(g=u[p])&&(s.push(n.call(g,g.__data__,p,u)),r.push(g));return new vn(s,r)}function sp(n){return function(){return this.matches(n)}}function rp(n){return function(a){return a.matches(n)}}var Xb=Array.prototype.find;function Gb(n){return function(){return Xb.call(this.children,n)}}function Zb(){return this.firstElementChild}function Ib(n){return this.select(n==null?Zb:Gb(typeof n=="function"?n:rp(n)))}var Qb=Array.prototype.filter;function Kb(){return Array.from(this.children)}function Fb(n){return function(){return Qb.call(this.children,n)}}function Jb(n){return this.selectAll(n==null?Kb:Fb(typeof n=="function"?n:rp(n)))}function Pb(n){typeof n!="function"&&(n=sp(n));for(var a=this._groups,i=a.length,s=new Array(i),r=0;r<i;++r)for(var c=a[r],u=c.length,h=s[r]=[],g,p=0;p<u;++p)(g=c[p])&&n.call(g,g.__data__,p,c)&&h.push(g);return new vn(s,this._parents)}function cp(n){return new Array(n.length)}function Wb(){return new vn(this._enter||this._groups.map(cp),this._parents)}function Ys(n,a){this.ownerDocument=n.ownerDocument,this.namespaceURI=n.namespaceURI,this._next=null,this._parent=n,this.__data__=a}Ys.prototype={constructor:Ys,appendChild:function(n){return this._parent.insertBefore(n,this._next)},insertBefore:function(n,a){return this._parent.insertBefore(n,a)},querySelector:function(n){return this._parent.querySelector(n)},querySelectorAll:function(n){return this._parent.querySelectorAll(n)}};function e2(n){return function(){return n}}function t2(n,a,i,s,r,c){for(var u=0,h,g=a.length,p=c.length;u<p;++u)(h=a[u])?(h.__data__=c[u],s[u]=h):i[u]=new Ys(n,c[u]);for(;u<g;++u)(h=a[u])&&(r[u]=h)}function n2(n,a,i,s,r,c,u){var h,g,p=new Map,x=a.length,y=c.length,v=new Array(x),S;for(h=0;h<x;++h)(g=a[h])&&(v[h]=S=u.call(g,g.__data__,h,a)+"",p.has(S)?r[h]=g:p.set(S,g));for(h=0;h<y;++h)S=u.call(n,c[h],h,c)+"",(g=p.get(S))?(s[h]=g,g.__data__=c[h],p.delete(S)):i[h]=new Ys(n,c[h]);for(h=0;h<x;++h)(g=a[h])&&p.get(v[h])===g&&(r[h]=g)}function a2(n){return n.__data__}function l2(n,a){if(!arguments.length)return Array.from(this,a2);var i=a?n2:t2,s=this._parents,r=this._groups;typeof n!="function"&&(n=e2(n));for(var c=r.length,u=new Array(c),h=new Array(c),g=new Array(c),p=0;p<c;++p){var x=s[p],y=r[p],v=y.length,S=i2(n.call(x,x&&x.__data__,p,s)),b=S.length,E=h[p]=new Array(b),_=u[p]=new Array(b),T=g[p]=new Array(v);i(x,y,E,_,T,S,a);for(var z=0,N=0,C,D;z<b;++z)if(C=E[z]){for(z>=N&&(N=z+1);!(D=_[N])&&++N<b;);C._next=D||null}}return u=new vn(u,s),u._enter=h,u._exit=g,u}function i2(n){return typeof n=="object"&&"length"in n?n:Array.from(n)}function o2(){return new vn(this._exit||this._groups.map(cp),this._parents)}function s2(n,a,i){var s=this.enter(),r=this,c=this.exit();return typeof n=="function"?(s=n(s),s&&(s=s.selection())):s=s.append(n+""),a!=null&&(r=a(r),r&&(r=r.selection())),i==null?c.remove():i(c),s&&r?s.merge(r).order():r}function r2(n){for(var a=n.selection?n.selection():n,i=this._groups,s=a._groups,r=i.length,c=s.length,u=Math.min(r,c),h=new Array(r),g=0;g<u;++g)for(var p=i[g],x=s[g],y=p.length,v=h[g]=new Array(y),S,b=0;b<y;++b)(S=p[b]||x[b])&&(v[b]=S);for(;g<r;++g)h[g]=i[g];return new vn(h,this._parents)}function c2(){for(var n=this._groups,a=-1,i=n.length;++a<i;)for(var s=n[a],r=s.length-1,c=s[r],u;--r>=0;)(u=s[r])&&(c&&u.compareDocumentPosition(c)^4&&c.parentNode.insertBefore(u,c),c=u);return this}function u2(n){n||(n=f2);function a(y,v){return y&&v?n(y.__data__,v.__data__):!y-!v}for(var i=this._groups,s=i.length,r=new Array(s),c=0;c<s;++c){for(var u=i[c],h=u.length,g=r[c]=new Array(h),p,x=0;x<h;++x)(p=u[x])&&(g[x]=p);g.sort(a)}return new vn(r,this._parents).order()}function f2(n,a){return n<a?-1:n>a?1:n>=a?0:NaN}function d2(){var n=arguments[0];return arguments[0]=this,n.apply(null,arguments),this}function h2(){return Array.from(this)}function p2(){for(var n=this._groups,a=0,i=n.length;a<i;++a)for(var s=n[a],r=0,c=s.length;r<c;++r){var u=s[r];if(u)return u}return null}function g2(){let n=0;for(const a of this)++n;return n}function m2(){return!this.node()}function y2(n){for(var a=this._groups,i=0,s=a.length;i<s;++i)for(var r=a[i],c=0,u=r.length,h;c<u;++c)(h=r[c])&&n.call(h,h.__data__,c,r);return this}function x2(n){return function(){this.removeAttribute(n)}}function v2(n){return function(){this.removeAttributeNS(n.space,n.local)}}function b2(n,a){return function(){this.setAttribute(n,a)}}function S2(n,a){return function(){this.setAttributeNS(n.space,n.local,a)}}function w2(n,a){return function(){var i=a.apply(this,arguments);i==null?this.removeAttribute(n):this.setAttribute(n,i)}}function E2(n,a){return function(){var i=a.apply(this,arguments);i==null?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,i)}}function _2(n,a){var i=$s(n);if(arguments.length<2){var s=this.node();return i.local?s.getAttributeNS(i.space,i.local):s.getAttribute(i)}return this.each((a==null?i.local?v2:x2:typeof a=="function"?i.local?E2:w2:i.local?S2:b2)(i,a))}function up(n){return n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView}function A2(n){return function(){this.style.removeProperty(n)}}function N2(n,a,i){return function(){this.style.setProperty(n,a,i)}}function k2(n,a,i){return function(){var s=a.apply(this,arguments);s==null?this.style.removeProperty(n):this.style.setProperty(n,s,i)}}function T2(n,a,i){return arguments.length>1?this.each((a==null?A2:typeof a=="function"?k2:N2)(n,a,i??"")):oi(this.node(),n)}function oi(n,a){return n.style.getPropertyValue(a)||up(n).getComputedStyle(n,null).getPropertyValue(a)}function C2(n){return function(){delete this[n]}}function M2(n,a){return function(){this[n]=a}}function z2(n,a){return function(){var i=a.apply(this,arguments);i==null?delete this[n]:this[n]=i}}function D2(n,a){return arguments.length>1?this.each((a==null?C2:typeof a=="function"?z2:M2)(n,a)):this.node()[n]}function fp(n){return n.trim().split(/^|\s+/)}function lu(n){return n.classList||new dp(n)}function dp(n){this._node=n,this._names=fp(n.getAttribute("class")||"")}dp.prototype={add:function(n){var a=this._names.indexOf(n);a<0&&(this._names.push(n),this._node.setAttribute("class",this._names.join(" ")))},remove:function(n){var a=this._names.indexOf(n);a>=0&&(this._names.splice(a,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(n){return this._names.indexOf(n)>=0}};function hp(n,a){for(var i=lu(n),s=-1,r=a.length;++s<r;)i.add(a[s])}function pp(n,a){for(var i=lu(n),s=-1,r=a.length;++s<r;)i.remove(a[s])}function O2(n){return function(){hp(this,n)}}function R2(n){return function(){pp(this,n)}}function j2(n,a){return function(){(a.apply(this,arguments)?hp:pp)(this,n)}}function L2(n,a){var i=fp(n+"");if(arguments.length<2){for(var s=lu(this.node()),r=-1,c=i.length;++r<c;)if(!s.contains(i[r]))return!1;return!0}return this.each((typeof a=="function"?j2:a?O2:R2)(i,a))}function H2(){this.textContent=""}function B2(n){return function(){this.textContent=n}}function U2(n){return function(){var a=n.apply(this,arguments);this.textContent=a??""}}function V2(n){return arguments.length?this.each(n==null?H2:(typeof n=="function"?U2:B2)(n)):this.node().textContent}function $2(){this.innerHTML=""}function Y2(n){return function(){this.innerHTML=n}}function q2(n){return function(){var a=n.apply(this,arguments);this.innerHTML=a??""}}function X2(n){return arguments.length?this.each(n==null?$2:(typeof n=="function"?q2:Y2)(n)):this.node().innerHTML}function G2(){this.nextSibling&&this.parentNode.appendChild(this)}function Z2(){return this.each(G2)}function I2(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Q2(){return this.each(I2)}function K2(n){var a=typeof n=="function"?n:ip(n);return this.select(function(){return this.appendChild(a.apply(this,arguments))})}function F2(){return null}function J2(n,a){var i=typeof n=="function"?n:ip(n),s=a==null?F2:typeof a=="function"?a:au(a);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})}function P2(){var n=this.parentNode;n&&n.removeChild(this)}function W2(){return this.each(P2)}function eS(){var n=this.cloneNode(!1),a=this.parentNode;return a?a.insertBefore(n,this.nextSibling):n}function tS(){var n=this.cloneNode(!0),a=this.parentNode;return a?a.insertBefore(n,this.nextSibling):n}function nS(n){return this.select(n?tS:eS)}function aS(n){return arguments.length?this.property("__data__",n):this.node().__data__}function lS(n){return function(a){n.call(this,a,this.__data__)}}function iS(n){return n.trim().split(/^|\s+/).map(function(a){var i="",s=a.indexOf(".");return s>=0&&(i=a.slice(s+1),a=a.slice(0,s)),{type:a,name:i}})}function oS(n){return function(){var a=this.__on;if(a){for(var i=0,s=-1,r=a.length,c;i<r;++i)c=a[i],(!n.type||c.type===n.type)&&c.name===n.name?this.removeEventListener(c.type,c.listener,c.options):a[++s]=c;++s?a.length=s:delete this.__on}}}function sS(n,a,i){return function(){var s=this.__on,r,c=lS(a);if(s){for(var u=0,h=s.length;u<h;++u)if((r=s[u]).type===n.type&&r.name===n.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=c,r.options=i),r.value=a;return}}this.addEventListener(n.type,c,i),r={type:n.type,name:n.name,value:a,listener:c,options:i},s?s.push(r):this.__on=[r]}}function rS(n,a,i){var s=iS(n+""),r,c=s.length,u;if(arguments.length<2){var h=this.node().__on;if(h){for(var g=0,p=h.length,x;g<p;++g)for(r=0,x=h[g];r<c;++r)if((u=s[r]).type===x.type&&u.name===x.name)return x.value}return}for(h=a?sS:oS,r=0;r<c;++r)this.each(h(s[r],a,i));return this}function gp(n,a,i){var s=up(n),r=s.CustomEvent;typeof r=="function"?r=new r(a,i):(r=s.document.createEvent("Event"),i?(r.initEvent(a,i.bubbles,i.cancelable),r.detail=i.detail):r.initEvent(a,!1,!1)),n.dispatchEvent(r)}function cS(n,a){return function(){return gp(this,n,a)}}function uS(n,a){return function(){return gp(this,n,a.apply(this,arguments))}}function fS(n,a){return this.each((typeof a=="function"?uS:cS)(n,a))}function*dS(){for(var n=this._groups,a=0,i=n.length;a<i;++a)for(var s=n[a],r=0,c=s.length,u;r<c;++r)(u=s[r])&&(yield u)}var mp=[null];function vn(n,a){this._groups=n,this._parents=a}function uo(){return new vn([[document.documentElement]],mp)}function hS(){return this}vn.prototype=uo.prototype={constructor:vn,select:Ub,selectAll:qb,selectChild:Ib,selectChildren:Jb,filter:Pb,data:l2,enter:Wb,exit:o2,join:s2,merge:r2,selection:hS,order:c2,sort:u2,call:d2,nodes:h2,node:p2,size:g2,empty:m2,each:y2,attr:_2,style:T2,property:D2,classed:L2,text:V2,html:X2,raise:Z2,lower:Q2,append:K2,insert:J2,remove:W2,clone:nS,datum:aS,on:rS,dispatch:fS,[Symbol.iterator]:dS};function bn(n){return typeof n=="string"?new vn([[document.querySelector(n)]],[document.documentElement]):new vn([[n]],mp)}function pS(n){let a;for(;a=n.sourceEvent;)n=a;return n}function Gn(n,a){if(n=pS(n),a===void 0&&(a=n.currentTarget),a){var i=a.ownerSVGElement||a;if(i.createSVGPoint){var s=i.createSVGPoint();return s.x=n.clientX,s.y=n.clientY,s=s.matrixTransform(a.getScreenCTM().inverse()),[s.x,s.y]}if(a.getBoundingClientRect){var r=a.getBoundingClientRect();return[n.clientX-r.left-a.clientLeft,n.clientY-r.top-a.clientTop]}}return[n.pageX,n.pageY]}const gS={passive:!1},fo={capture:!0,passive:!1};function iu(n){n.stopImmediatePropagation()}function si(n){n.preventDefault(),n.stopImmediatePropagation()}function yp(n){var a=n.document.documentElement,i=bn(n).on("dragstart.drag",si,fo);"onselectstart"in a?i.on("selectstart.drag",si,fo):(a.__noselect=a.style.MozUserSelect,a.style.MozUserSelect="none")}function xp(n,a){var i=n.document.documentElement,s=bn(n).on("dragstart.drag",null);a&&(s.on("click.drag",si,fo),setTimeout(function(){s.on("click.drag",null)},0)),"onselectstart"in i?s.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}const qs=n=>()=>n;function ou(n,{sourceEvent:a,subject:i,target:s,identifier:r,active:c,x:u,y:h,dx:g,dy:p,dispatch:x}){Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:a,enumerable:!0,configurable:!0},subject:{value:i,enumerable:!0,configurable:!0},target:{value:s,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:c,enumerable:!0,configurable:!0},x:{value:u,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:g,enumerable:!0,configurable:!0},dy:{value:p,enumerable:!0,configurable:!0},_:{value:x}})}ou.prototype.on=function(){var n=this._.on.apply(this._,arguments);return n===this._?this:n};function mS(n){return!n.ctrlKey&&!n.button}function yS(){return this.parentNode}function xS(n,a){return a??{x:n.x,y:n.y}}function vS(){return navigator.maxTouchPoints||"ontouchstart"in this}function vp(){var n=mS,a=yS,i=xS,s=vS,r={},c=Us("start","drag","end"),u=0,h,g,p,x,y=0;function v(C){C.on("mousedown.drag",S).filter(s).on("touchstart.drag",_).on("touchmove.drag",T,gS).on("touchend.drag touchcancel.drag",z).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function S(C,D){if(!(x||!n.call(this,C,D))){var R=N(this,a.call(this,C,D),C,D,"mouse");R&&(bn(C.view).on("mousemove.drag",b,fo).on("mouseup.drag",E,fo),yp(C.view),iu(C),p=!1,h=C.clientX,g=C.clientY,R("start",C))}}function b(C){if(si(C),!p){var D=C.clientX-h,R=C.clientY-g;p=D*D+R*R>y}r.mouse("drag",C)}function E(C){bn(C.view).on("mousemove.drag mouseup.drag",null),xp(C.view,p),si(C),r.mouse("end",C)}function _(C,D){if(n.call(this,C,D)){var R=C.changedTouches,j=a.call(this,C,D),K=R.length,J,fe;for(J=0;J<K;++J)(fe=N(this,j,C,D,R[J].identifier,R[J]))&&(iu(C),fe("start",C,R[J]))}}function T(C){var D=C.changedTouches,R=D.length,j,K;for(j=0;j<R;++j)(K=r[D[j].identifier])&&(si(C),K("drag",C,D[j]))}function z(C){var D=C.changedTouches,R=D.length,j,K;for(x&&clearTimeout(x),x=setTimeout(function(){x=null},500),j=0;j<R;++j)(K=r[D[j].identifier])&&(iu(C),K("end",C,D[j]))}function N(C,D,R,j,K,J){var fe=c.copy(),U=Gn(J||R,D),F,ae,H;if((H=i.call(C,new ou("beforestart",{sourceEvent:R,target:v,identifier:K,active:u,x:U[0],y:U[1],dx:0,dy:0,dispatch:fe}),j))!=null)return F=H.x-U[0]||0,ae=H.y-U[1]||0,function I(k,L,$){var Z=U,Y;switch(k){case"start":r[K]=I,Y=u++;break;case"end":delete r[K],--u;case"drag":U=Gn($||L,D),Y=u;break}fe.call(k,C,new ou(k,{sourceEvent:L,subject:H,target:v,identifier:K,active:Y,x:U[0]+F,y:U[1]+ae,dx:U[0]-Z[0],dy:U[1]-Z[1],dispatch:fe}),j)}}return v.filter=function(C){return arguments.length?(n=typeof C=="function"?C:qs(!!C),v):n},v.container=function(C){return arguments.length?(a=typeof C=="function"?C:qs(C),v):a},v.subject=function(C){return arguments.length?(i=typeof C=="function"?C:qs(C),v):i},v.touchable=function(C){return arguments.length?(s=typeof C=="function"?C:qs(!!C),v):s},v.on=function(){var C=c.on.apply(c,arguments);return C===c?v:C},v.clickDistance=function(C){return arguments.length?(y=(C=+C)*C,v):Math.sqrt(y)},v}function su(n,a,i){n.prototype=a.prototype=i,i.constructor=n}function bp(n,a){var i=Object.create(n.prototype);for(var s in a)i[s]=a[s];return i}function ho(){}var po=.7,Xs=1/po,ri="\\s*([+-]?\\d+)\\s*",go="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",sa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",bS=/^#([0-9a-f]{3,8})$/,SS=new RegExp(`^rgb\\(${ri},${ri},${ri}\\)$`),wS=new RegExp(`^rgb\\(${sa},${sa},${sa}\\)$`),ES=new RegExp(`^rgba\\(${ri},${ri},${ri},${go}\\)$`),_S=new RegExp(`^rgba\\(${sa},${sa},${sa},${go}\\)$`),AS=new RegExp(`^hsl\\(${go},${sa},${sa}\\)$`),NS=new RegExp(`^hsla\\(${go},${sa},${sa},${go}\\)$`),Sp={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};su(ho,Tl,{copy(n){return Object.assign(new this.constructor,this,n)},displayable(){return this.rgb().displayable()},hex:wp,formatHex:wp,formatHex8:kS,formatHsl:TS,formatRgb:Ep,toString:Ep});function wp(){return this.rgb().formatHex()}function kS(){return this.rgb().formatHex8()}function TS(){return Tp(this).formatHsl()}function Ep(){return this.rgb().formatRgb()}function Tl(n){var a,i;return n=(n+"").trim().toLowerCase(),(a=bS.exec(n))?(i=a[1].length,a=parseInt(a[1],16),i===6?_p(a):i===3?new ln(a>>8&15|a>>4&240,a>>4&15|a&240,(a&15)<<4|a&15,1):i===8?Gs(a>>24&255,a>>16&255,a>>8&255,(a&255)/255):i===4?Gs(a>>12&15|a>>8&240,a>>8&15|a>>4&240,a>>4&15|a&240,((a&15)<<4|a&15)/255):null):(a=SS.exec(n))?new ln(a[1],a[2],a[3],1):(a=wS.exec(n))?new ln(a[1]*255/100,a[2]*255/100,a[3]*255/100,1):(a=ES.exec(n))?Gs(a[1],a[2],a[3],a[4]):(a=_S.exec(n))?Gs(a[1]*255/100,a[2]*255/100,a[3]*255/100,a[4]):(a=AS.exec(n))?kp(a[1],a[2]/100,a[3]/100,1):(a=NS.exec(n))?kp(a[1],a[2]/100,a[3]/100,a[4]):Sp.hasOwnProperty(n)?_p(Sp[n]):n==="transparent"?new ln(NaN,NaN,NaN,0):null}function _p(n){return new ln(n>>16&255,n>>8&255,n&255,1)}function Gs(n,a,i,s){return s<=0&&(n=a=i=NaN),new ln(n,a,i,s)}function CS(n){return n instanceof ho||(n=Tl(n)),n?(n=n.rgb(),new ln(n.r,n.g,n.b,n.opacity)):new ln}function ru(n,a,i,s){return arguments.length===1?CS(n):new ln(n,a,i,s??1)}function ln(n,a,i,s){this.r=+n,this.g=+a,this.b=+i,this.opacity=+s}su(ln,ru,bp(ho,{brighter(n){return n=n==null?Xs:Math.pow(Xs,n),new ln(this.r*n,this.g*n,this.b*n,this.opacity)},darker(n){return n=n==null?po:Math.pow(po,n),new ln(this.r*n,this.g*n,this.b*n,this.opacity)},rgb(){return this},clamp(){return new ln(Cl(this.r),Cl(this.g),Cl(this.b),Zs(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:Ap,formatHex:Ap,formatHex8:MS,formatRgb:Np,toString:Np}));function Ap(){return`#${Ml(this.r)}${Ml(this.g)}${Ml(this.b)}`}function MS(){return`#${Ml(this.r)}${Ml(this.g)}${Ml(this.b)}${Ml((isNaN(this.opacity)?1:this.opacity)*255)}`}function Np(){const n=Zs(this.opacity);return`${n===1?"rgb(":"rgba("}${Cl(this.r)}, ${Cl(this.g)}, ${Cl(this.b)}${n===1?")":`, ${n})`}`}function Zs(n){return isNaN(n)?1:Math.max(0,Math.min(1,n))}function Cl(n){return Math.max(0,Math.min(255,Math.round(n)||0))}function Ml(n){return n=Cl(n),(n<16?"0":"")+n.toString(16)}function kp(n,a,i,s){return s<=0?n=a=i=NaN:i<=0||i>=1?n=a=NaN:a<=0&&(n=NaN),new Zn(n,a,i,s)}function Tp(n){if(n instanceof Zn)return new Zn(n.h,n.s,n.l,n.opacity);if(n instanceof ho||(n=Tl(n)),!n)return new Zn;if(n instanceof Zn)return n;n=n.rgb();var a=n.r/255,i=n.g/255,s=n.b/255,r=Math.min(a,i,s),c=Math.max(a,i,s),u=NaN,h=c-r,g=(c+r)/2;return h?(a===c?u=(i-s)/h+(i<s)*6:i===c?u=(s-a)/h+2:u=(a-i)/h+4,h/=g<.5?c+r:2-c-r,u*=60):h=g>0&&g<1?0:u,new Zn(u,h,g,n.opacity)}function zS(n,a,i,s){return arguments.length===1?Tp(n):new Zn(n,a,i,s??1)}function Zn(n,a,i,s){this.h=+n,this.s=+a,this.l=+i,this.opacity=+s}su(Zn,zS,bp(ho,{brighter(n){return n=n==null?Xs:Math.pow(Xs,n),new Zn(this.h,this.s,this.l*n,this.opacity)},darker(n){return n=n==null?po:Math.pow(po,n),new Zn(this.h,this.s,this.l*n,this.opacity)},rgb(){var n=this.h%360+(this.h<0)*360,a=isNaN(n)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*a,r=2*i-s;return new ln(cu(n>=240?n-240:n+120,r,s),cu(n,r,s),cu(n<120?n+240:n-120,r,s),this.opacity)},clamp(){return new Zn(Cp(this.h),Is(this.s),Is(this.l),Zs(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 n=Zs(this.opacity);return`${n===1?"hsl(":"hsla("}${Cp(this.h)}, ${Is(this.s)*100}%, ${Is(this.l)*100}%${n===1?")":`, ${n})`}`}}));function Cp(n){return n=(n||0)%360,n<0?n+360:n}function Is(n){return Math.max(0,Math.min(1,n||0))}function cu(n,a,i){return(n<60?a+(i-a)*n/60:n<180?i:n<240?a+(i-a)*(240-n)/60:a)*255}const uu=n=>()=>n;function DS(n,a){return function(i){return n+i*a}}function OS(n,a,i){return n=Math.pow(n,i),a=Math.pow(a,i)-n,i=1/i,function(s){return Math.pow(n+s*a,i)}}function RS(n){return(n=+n)==1?Mp:function(a,i){return i-a?OS(a,i,n):uu(isNaN(a)?i:a)}}function Mp(n,a){var i=a-n;return i?DS(n,i):uu(isNaN(n)?a:n)}const Qs=(function n(a){var i=RS(a);function s(r,c){var u=i((r=ru(r)).r,(c=ru(c)).r),h=i(r.g,c.g),g=i(r.b,c.b),p=Mp(r.opacity,c.opacity);return function(x){return r.r=u(x),r.g=h(x),r.b=g(x),r.opacity=p(x),r+""}}return s.gamma=n,s})(1);function jS(n,a){a||(a=[]);var i=n?Math.min(a.length,n.length):0,s=a.slice(),r;return function(c){for(r=0;r<i;++r)s[r]=n[r]*(1-c)+a[r]*c;return s}}function LS(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function HS(n,a){var i=a?a.length:0,s=n?Math.min(i,n.length):0,r=new Array(s),c=new Array(i),u;for(u=0;u<s;++u)r[u]=mo(n[u],a[u]);for(;u<i;++u)c[u]=a[u];return function(h){for(u=0;u<s;++u)c[u]=r[u](h);return c}}function BS(n,a){var i=new Date;return n=+n,a=+a,function(s){return i.setTime(n*(1-s)+a*s),i}}function ra(n,a){return n=+n,a=+a,function(i){return n*(1-i)+a*i}}function US(n,a){var i={},s={},r;(n===null||typeof n!="object")&&(n={}),(a===null||typeof a!="object")&&(a={});for(r in a)r in n?i[r]=mo(n[r],a[r]):s[r]=a[r];return function(c){for(r in i)s[r]=i[r](c);return s}}var fu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,du=new RegExp(fu.source,"g");function VS(n){return function(){return n}}function $S(n){return function(a){return n(a)+""}}function zp(n,a){var i=fu.lastIndex=du.lastIndex=0,s,r,c,u=-1,h=[],g=[];for(n=n+"",a=a+"";(s=fu.exec(n))&&(r=du.exec(a));)(c=r.index)>i&&(c=a.slice(i,c),h[u]?h[u]+=c:h[++u]=c),(s=s[0])===(r=r[0])?h[u]?h[u]+=r:h[++u]=r:(h[++u]=null,g.push({i:u,x:ra(s,r)})),i=du.lastIndex;return i<a.length&&(c=a.slice(i),h[u]?h[u]+=c:h[++u]=c),h.length<2?g[0]?$S(g[0].x):VS(a):(a=g.length,function(p){for(var x=0,y;x<a;++x)h[(y=g[x]).i]=y.x(p);return h.join("")})}function mo(n,a){var i=typeof a,s;return a==null||i==="boolean"?uu(a):(i==="number"?ra:i==="string"?(s=Tl(a))?(a=s,Qs):zp:a instanceof Tl?Qs:a instanceof Date?BS:LS(a)?jS:Array.isArray(a)?HS:typeof a.valueOf!="function"&&typeof a.toString!="function"||isNaN(a)?US:ra)(n,a)}var Dp=180/Math.PI,hu={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Op(n,a,i,s,r,c){var u,h,g;return(u=Math.sqrt(n*n+a*a))&&(n/=u,a/=u),(g=n*i+a*s)&&(i-=n*g,s-=a*g),(h=Math.sqrt(i*i+s*s))&&(i/=h,s/=h,g/=h),n*s<a*i&&(n=-n,a=-a,g=-g,u=-u),{translateX:r,translateY:c,rotate:Math.atan2(a,n)*Dp,skewX:Math.atan(g)*Dp,scaleX:u,scaleY:h}}var Ks;function YS(n){const a=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(n+"");return a.isIdentity?hu:Op(a.a,a.b,a.c,a.d,a.e,a.f)}function qS(n){return n==null||(Ks||(Ks=document.createElementNS("http://www.w3.org/2000/svg","g")),Ks.setAttribute("transform",n),!(n=Ks.transform.baseVal.consolidate()))?hu:(n=n.matrix,Op(n.a,n.b,n.c,n.d,n.e,n.f))}function Rp(n,a,i,s){function r(p){return p.length?p.pop()+" ":""}function c(p,x,y,v,S,b){if(p!==y||x!==v){var E=S.push("translate(",null,a,null,i);b.push({i:E-4,x:ra(p,y)},{i:E-2,x:ra(x,v)})}else(y||v)&&S.push("translate("+y+a+v+i)}function u(p,x,y,v){p!==x?(p-x>180?x+=360:x-p>180&&(p+=360),v.push({i:y.push(r(y)+"rotate(",null,s)-2,x:ra(p,x)})):x&&y.push(r(y)+"rotate("+x+s)}function h(p,x,y,v){p!==x?v.push({i:y.push(r(y)+"skewX(",null,s)-2,x:ra(p,x)}):x&&y.push(r(y)+"skewX("+x+s)}function g(p,x,y,v,S,b){if(p!==y||x!==v){var E=S.push(r(S)+"scale(",null,",",null,")");b.push({i:E-4,x:ra(p,y)},{i:E-2,x:ra(x,v)})}else(y!==1||v!==1)&&S.push(r(S)+"scale("+y+","+v+")")}return function(p,x){var y=[],v=[];return p=n(p),x=n(x),c(p.translateX,p.translateY,x.translateX,x.translateY,y,v),u(p.rotate,x.rotate,y,v),h(p.skewX,x.skewX,y,v),g(p.scaleX,p.scaleY,x.scaleX,x.scaleY,y,v),p=x=null,function(S){for(var b=-1,E=v.length,_;++b<E;)y[(_=v[b]).i]=_.x(S);return y.join("")}}}var XS=Rp(YS,"px, ","px)","deg)"),GS=Rp(qS,", ",")",")"),ZS=1e-12;function jp(n){return((n=Math.exp(n))+1/n)/2}function IS(n){return((n=Math.exp(n))-1/n)/2}function QS(n){return((n=Math.exp(2*n))-1)/(n+1)}const Fs=(function n(a,i,s){function r(c,u){var h=c[0],g=c[1],p=c[2],x=u[0],y=u[1],v=u[2],S=x-h,b=y-g,E=S*S+b*b,_,T;if(E<ZS)T=Math.log(v/p)/a,_=function(j){return[h+j*S,g+j*b,p*Math.exp(a*j*T)]};else{var z=Math.sqrt(E),N=(v*v-p*p+s*E)/(2*p*i*z),C=(v*v-p*p-s*E)/(2*v*i*z),D=Math.log(Math.sqrt(N*N+1)-N),R=Math.log(Math.sqrt(C*C+1)-C);T=(R-D)/a,_=function(j){var K=j*T,J=jp(D),fe=p/(i*z)*(J*QS(a*K+D)-IS(D));return[h+fe*S,g+fe*b,p*J/jp(a*K+D)]}}return _.duration=T*1e3*a/Math.SQRT2,_}return r.rho=function(c){var u=Math.max(.001,+c),h=u*u,g=h*h;return n(u,h,g)},r})(Math.SQRT2,2,4);var ci=0,yo=0,xo=0,Lp=1e3,Js,vo,Ps=0,zl=0,Ws=0,bo=typeof performance=="object"&&performance.now?performance:Date,Hp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(n){setTimeout(n,17)};function pu(){return zl||(Hp(KS),zl=bo.now()+Ws)}function KS(){zl=0}function er(){this._call=this._time=this._next=null}er.prototype=Bp.prototype={constructor:er,restart:function(n,a,i){if(typeof n!="function")throw new TypeError("callback is not a function");i=(i==null?pu():+i)+(a==null?0:+a),!this._next&&vo!==this&&(vo?vo._next=this:Js=this,vo=this),this._call=n,this._time=i,gu()},stop:function(){this._call&&(this._call=null,this._time=1/0,gu())}};function Bp(n,a,i){var s=new er;return s.restart(n,a,i),s}function FS(){pu(),++ci;for(var n=Js,a;n;)(a=zl-n._time)>=0&&n._call.call(void 0,a),n=n._next;--ci}function Up(){zl=(Ps=bo.now())+Ws,ci=yo=0;try{FS()}finally{ci=0,PS(),zl=0}}function JS(){var n=bo.now(),a=n-Ps;a>Lp&&(Ws-=a,Ps=n)}function PS(){for(var n,a=Js,i,s=1/0;a;)a._call?(s>a._time&&(s=a._time),n=a,a=a._next):(i=a._next,a._next=null,a=n?n._next=i:Js=i);vo=n,gu(s)}function gu(n){if(!ci){yo&&(yo=clearTimeout(yo));var a=n-zl;a>24?(n<1/0&&(yo=setTimeout(Up,n-bo.now()-Ws)),xo&&(xo=clearInterval(xo))):(xo||(Ps=bo.now(),xo=setInterval(JS,Lp)),ci=1,Hp(Up))}}function Vp(n,a,i){var s=new er;return a=a==null?0:+a,s.restart(r=>{s.stop(),n(r+a)},a,i),s}var WS=Us("start","end","cancel","interrupt"),ew=[],$p=0,Yp=1,mu=2,tr=3,qp=4,yu=5,nr=6;function ar(n,a,i,s,r,c){var u=n.__transition;if(!u)n.__transition={};else if(i in u)return;tw(n,i,{name:a,index:s,group:r,on:WS,tween:ew,time:c.time,delay:c.delay,duration:c.duration,ease:c.ease,timer:null,state:$p})}function xu(n,a){var i=In(n,a);if(i.state>$p)throw new Error("too late; already scheduled");return i}function ca(n,a){var i=In(n,a);if(i.state>tr)throw new Error("too late; already running");return i}function In(n,a){var i=n.__transition;if(!i||!(i=i[a]))throw new Error("transition not found");return i}function tw(n,a,i){var s=n.__transition,r;s[a]=i,i.timer=Bp(c,0,i.time);function c(p){i.state=Yp,i.timer.restart(u,i.delay,i.time),i.delay<=p&&u(p-i.delay)}function u(p){var x,y,v,S;if(i.state!==Yp)return g();for(x in s)if(S=s[x],S.name===i.name){if(S.state===tr)return Vp(u);S.state===qp?(S.state=nr,S.timer.stop(),S.on.call("interrupt",n,n.__data__,S.index,S.group),delete s[x]):+x<a&&(S.state=nr,S.timer.stop(),S.on.call("cancel",n,n.__data__,S.index,S.group),delete s[x])}if(Vp(function(){i.state===tr&&(i.state=qp,i.timer.restart(h,i.delay,i.time),h(p))}),i.state=mu,i.on.call("start",n,n.__data__,i.index,i.group),i.state===mu){for(i.state=tr,r=new Array(v=i.tween.length),x=0,y=-1;x<v;++x)(S=i.tween[x].value.call(n,n.__data__,i.index,i.group))&&(r[++y]=S);r.length=y+1}}function h(p){for(var x=p<i.duration?i.ease.call(null,p/i.duration):(i.timer.restart(g),i.state=yu,1),y=-1,v=r.length;++y<v;)r[y].call(n,x);i.state===yu&&(i.on.call("end",n,n.__data__,i.index,i.group),g())}function g(){i.state=nr,i.timer.stop(),delete s[a];for(var p in s)return;delete n.__transition}}function lr(n,a){var i=n.__transition,s,r,c=!0,u;if(i){a=a==null?null:a+"";for(u in i){if((s=i[u]).name!==a){c=!1;continue}r=s.state>mu&&s.state<yu,s.state=nr,s.timer.stop(),s.on.call(r?"interrupt":"cancel",n,n.__data__,s.index,s.group),delete i[u]}c&&delete n.__transition}}function nw(n){return this.each(function(){lr(this,n)})}function aw(n,a){var i,s;return function(){var r=ca(this,n),c=r.tween;if(c!==i){s=i=c;for(var u=0,h=s.length;u<h;++u)if(s[u].name===a){s=s.slice(),s.splice(u,1);break}}r.tween=s}}function lw(n,a,i){var s,r;if(typeof i!="function")throw new Error;return function(){var c=ca(this,n),u=c.tween;if(u!==s){r=(s=u).slice();for(var h={name:a,value:i},g=0,p=r.length;g<p;++g)if(r[g].name===a){r[g]=h;break}g===p&&r.push(h)}c.tween=r}}function iw(n,a){var i=this._id;if(n+="",arguments.length<2){for(var s=In(this.node(),i).tween,r=0,c=s.length,u;r<c;++r)if((u=s[r]).name===n)return u.value;return null}return this.each((a==null?aw:lw)(i,n,a))}function vu(n,a,i){var s=n._id;return n.each(function(){var r=ca(this,s);(r.value||(r.value={}))[a]=i.apply(this,arguments)}),function(r){return In(r,s).value[a]}}function Xp(n,a){var i;return(typeof a=="number"?ra:a instanceof Tl?Qs:(i=Tl(a))?(a=i,Qs):zp)(n,a)}function ow(n){return function(){this.removeAttribute(n)}}function sw(n){return function(){this.removeAttributeNS(n.space,n.local)}}function rw(n,a,i){var s,r=i+"",c;return function(){var u=this.getAttribute(n);return u===r?null:u===s?c:c=a(s=u,i)}}function cw(n,a,i){var s,r=i+"",c;return function(){var u=this.getAttributeNS(n.space,n.local);return u===r?null:u===s?c:c=a(s=u,i)}}function uw(n,a,i){var s,r,c;return function(){var u,h=i(this),g;return h==null?void this.removeAttribute(n):(u=this.getAttribute(n),g=h+"",u===g?null:u===s&&g===r?c:(r=g,c=a(s=u,h)))}}function fw(n,a,i){var s,r,c;return function(){var u,h=i(this),g;return h==null?void this.removeAttributeNS(n.space,n.local):(u=this.getAttributeNS(n.space,n.local),g=h+"",u===g?null:u===s&&g===r?c:(r=g,c=a(s=u,h)))}}function dw(n,a){var i=$s(n),s=i==="transform"?GS:Xp;return this.attrTween(n,typeof a=="function"?(i.local?fw:uw)(i,s,vu(this,"attr."+n,a)):a==null?(i.local?sw:ow)(i):(i.local?cw:rw)(i,s,a))}function hw(n,a){return function(i){this.setAttribute(n,a.call(this,i))}}function pw(n,a){return function(i){this.setAttributeNS(n.space,n.local,a.call(this,i))}}function gw(n,a){var i,s;function r(){var c=a.apply(this,arguments);return c!==s&&(i=(s=c)&&pw(n,c)),i}return r._value=a,r}function mw(n,a){var i,s;function r(){var c=a.apply(this,arguments);return c!==s&&(i=(s=c)&&hw(n,c)),i}return r._value=a,r}function yw(n,a){var i="attr."+n;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(a==null)return this.tween(i,null);if(typeof a!="function")throw new Error;var s=$s(n);return this.tween(i,(s.local?gw:mw)(s,a))}function xw(n,a){return function(){xu(this,n).delay=+a.apply(this,arguments)}}function vw(n,a){return a=+a,function(){xu(this,n).delay=a}}function bw(n){var a=this._id;return arguments.length?this.each((typeof n=="function"?xw:vw)(a,n)):In(this.node(),a).delay}function Sw(n,a){return function(){ca(this,n).duration=+a.apply(this,arguments)}}function ww(n,a){return a=+a,function(){ca(this,n).duration=a}}function Ew(n){var a=this._id;return arguments.length?this.each((typeof n=="function"?Sw:ww)(a,n)):In(this.node(),a).duration}function _w(n,a){if(typeof a!="function")throw new Error;return function(){ca(this,n).ease=a}}function Aw(n){var a=this._id;return arguments.length?this.each(_w(a,n)):In(this.node(),a).ease}function Nw(n,a){return function(){var i=a.apply(this,arguments);if(typeof i!="function")throw new Error;ca(this,n).ease=i}}function kw(n){if(typeof n!="function")throw new Error;return this.each(Nw(this._id,n))}function Tw(n){typeof n!="function"&&(n=sp(n));for(var a=this._groups,i=a.length,s=new Array(i),r=0;r<i;++r)for(var c=a[r],u=c.length,h=s[r]=[],g,p=0;p<u;++p)(g=c[p])&&n.call(g,g.__data__,p,c)&&h.push(g);return new Sa(s,this._parents,this._name,this._id)}function Cw(n){if(n._id!==this._id)throw new Error;for(var a=this._groups,i=n._groups,s=a.length,r=i.length,c=Math.min(s,r),u=new Array(s),h=0;h<c;++h)for(var g=a[h],p=i[h],x=g.length,y=u[h]=new Array(x),v,S=0;S<x;++S)(v=g[S]||p[S])&&(y[S]=v);for(;h<s;++h)u[h]=a[h];return new Sa(u,this._parents,this._name,this._id)}function Mw(n){return(n+"").trim().split(/^|\s+/).every(function(a){var i=a.indexOf(".");return i>=0&&(a=a.slice(0,i)),!a||a==="start"})}function zw(n,a,i){var s,r,c=Mw(a)?xu:ca;return function(){var u=c(this,n),h=u.on;h!==s&&(r=(s=h).copy()).on(a,i),u.on=r}}function Dw(n,a){var i=this._id;return arguments.length<2?In(this.node(),i).on.on(n):this.each(zw(i,n,a))}function Ow(n){return function(){var a=this.parentNode;for(var i in this.__transition)if(+i!==n)return;a&&a.removeChild(this)}}function Rw(){return this.on("end.remove",Ow(this._id))}function jw(n){var a=this._name,i=this._id;typeof n!="function"&&(n=au(n));for(var s=this._groups,r=s.length,c=new Array(r),u=0;u<r;++u)for(var h=s[u],g=h.length,p=c[u]=new Array(g),x,y,v=0;v<g;++v)(x=h[v])&&(y=n.call(x,x.__data__,v,h))&&("__data__"in x&&(y.__data__=x.__data__),p[v]=y,ar(p[v],a,i,v,p,In(x,i)));return new Sa(c,this._parents,a,i)}function Lw(n){var a=this._name,i=this._id;typeof n!="function"&&(n=op(n));for(var s=this._groups,r=s.length,c=[],u=[],h=0;h<r;++h)for(var g=s[h],p=g.length,x,y=0;y<p;++y)if(x=g[y]){for(var v=n.call(x,x.__data__,y,g),S,b=In(x,i),E=0,_=v.length;E<_;++E)(S=v[E])&&ar(S,a,i,E,v,b);c.push(v),u.push(x)}return new Sa(c,u,a,i)}var Hw=uo.prototype.constructor;function Bw(){return new Hw(this._groups,this._parents)}function Uw(n,a){var i,s,r;return function(){var c=oi(this,n),u=(this.style.removeProperty(n),oi(this,n));return c===u?null:c===i&&u===s?r:r=a(i=c,s=u)}}function Gp(n){return function(){this.style.removeProperty(n)}}function Vw(n,a,i){var s,r=i+"",c;return function(){var u=oi(this,n);return u===r?null:u===s?c:c=a(s=u,i)}}function $w(n,a,i){var s,r,c;return function(){var u=oi(this,n),h=i(this),g=h+"";return h==null&&(g=h=(this.style.removeProperty(n),oi(this,n))),u===g?null:u===s&&g===r?c:(r=g,c=a(s=u,h))}}function Yw(n,a){var i,s,r,c="style."+a,u="end."+c,h;return function(){var g=ca(this,n),p=g.on,x=g.value[c]==null?h||(h=Gp(a)):void 0;(p!==i||r!==x)&&(s=(i=p).copy()).on(u,r=x),g.on=s}}function qw(n,a,i){var s=(n+="")=="transform"?XS:Xp;return a==null?this.styleTween(n,Uw(n,s)).on("end.style."+n,Gp(n)):typeof a=="function"?this.styleTween(n,$w(n,s,vu(this,"style."+n,a))).each(Yw(this._id,n)):this.styleTween(n,Vw(n,s,a),i).on("end.style."+n,null)}function Xw(n,a,i){return function(s){this.style.setProperty(n,a.call(this,s),i)}}function Gw(n,a,i){var s,r;function c(){var u=a.apply(this,arguments);return u!==r&&(s=(r=u)&&Xw(n,u,i)),s}return c._value=a,c}function Zw(n,a,i){var s="style."+(n+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(a==null)return this.tween(s,null);if(typeof a!="function")throw new Error;return this.tween(s,Gw(n,a,i??""))}function Iw(n){return function(){this.textContent=n}}function Qw(n){return function(){var a=n(this);this.textContent=a??""}}function Kw(n){return this.tween("text",typeof n=="function"?Qw(vu(this,"text",n)):Iw(n==null?"":n+""))}function Fw(n){return function(a){this.textContent=n.call(this,a)}}function Jw(n){var a,i;function s(){var r=n.apply(this,arguments);return r!==i&&(a=(i=r)&&Fw(r)),a}return s._value=n,s}function Pw(n){var a="text";if(arguments.length<1)return(a=this.tween(a))&&a._value;if(n==null)return this.tween(a,null);if(typeof n!="function")throw new Error;return this.tween(a,Jw(n))}function Ww(){for(var n=this._name,a=this._id,i=Zp(),s=this._groups,r=s.length,c=0;c<r;++c)for(var u=s[c],h=u.length,g,p=0;p<h;++p)if(g=u[p]){var x=In(g,a);ar(g,n,i,p,u,{time:x.time+x.delay+x.duration,delay:0,duration:x.duration,ease:x.ease})}return new Sa(s,this._parents,n,i)}function eE(){var n,a,i=this,s=i._id,r=i.size();return new Promise(function(c,u){var h={value:u},g={value:function(){--r===0&&c()}};i.each(function(){var p=ca(this,s),x=p.on;x!==n&&(a=(n=x).copy(),a._.cancel.push(h),a._.interrupt.push(h),a._.end.push(g)),p.on=a}),r===0&&c()})}var tE=0;function Sa(n,a,i,s){this._groups=n,this._parents=a,this._name=i,this._id=s}function Zp(){return++tE}var wa=uo.prototype;Sa.prototype={constructor:Sa,select:jw,selectAll:Lw,selectChild:wa.selectChild,selectChildren:wa.selectChildren,filter:Tw,merge:Cw,selection:Bw,transition:Ww,call:wa.call,nodes:wa.nodes,node:wa.node,size:wa.size,empty:wa.empty,each:wa.each,on:Dw,attr:dw,attrTween:yw,style:qw,styleTween:Zw,text:Kw,textTween:Pw,remove:Rw,tween:iw,delay:bw,duration:Ew,ease:Aw,easeVarying:kw,end:eE,[Symbol.iterator]:wa[Symbol.iterator]};function nE(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var aE={time:null,delay:0,duration:250,ease:nE};function lE(n,a){for(var i;!(i=n.__transition)||!(i=i[a]);)if(!(n=n.parentNode))throw new Error(`transition ${a} not found`);return i}function iE(n){var a,i;n instanceof Sa?(a=n._id,n=n._name):(a=Zp(),(i=aE).time=pu(),n=n==null?null:n+"");for(var s=this._groups,r=s.length,c=0;c<r;++c)for(var u=s[c],h=u.length,g,p=0;p<h;++p)(g=u[p])&&ar(g,n,a,p,u,i||lE(g,a));return new Sa(s,this._parents,n,a)}uo.prototype.interrupt=nw,uo.prototype.transition=iE;const ir=n=>()=>n;function oE(n,{sourceEvent:a,target:i,transform:s,dispatch:r}){Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:a,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:s,enumerable:!0,configurable:!0},_:{value:r}})}function Ea(n,a,i){this.k=n,this.x=a,this.y=i}Ea.prototype={constructor:Ea,scale:function(n){return n===1?this:new Ea(this.k*n,this.x,this.y)},translate:function(n,a){return n===0&a===0?this:new Ea(this.k,this.x+this.k*n,this.y+this.k*a)},apply:function(n){return[n[0]*this.k+this.x,n[1]*this.k+this.y]},applyX:function(n){return n*this.k+this.x},applyY:function(n){return n*this.k+this.y},invert:function(n){return[(n[0]-this.x)/this.k,(n[1]-this.y)/this.k]},invertX:function(n){return(n-this.x)/this.k},invertY:function(n){return(n-this.y)/this.k},rescaleX:function(n){return n.copy().domain(n.range().map(this.invertX,this).map(n.invert,n))},rescaleY:function(n){return n.copy().domain(n.range().map(this.invertY,this).map(n.invert,n))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var or=new Ea(1,0,0);Ip.prototype=Ea.prototype;function Ip(n){for(;!n.__zoom;)if(!(n=n.parentNode))return or;return n.__zoom}function bu(n){n.stopImmediatePropagation()}function So(n){n.preventDefault(),n.stopImmediatePropagation()}function sE(n){return(!n.ctrlKey||n.type==="wheel")&&!n.button}function rE(){var n=this;return n instanceof SVGElement?(n=n.ownerSVGElement||n,n.hasAttribute("viewBox")?(n=n.viewBox.baseVal,[[n.x,n.y],[n.x+n.width,n.y+n.height]]):[[0,0],[n.width.baseVal.value,n.height.baseVal.value]]):[[0,0],[n.clientWidth,n.clientHeight]]}function Qp(){return this.__zoom||or}function cE(n){return-n.deltaY*(n.deltaMode===1?.05:n.deltaMode?1:.002)*(n.ctrlKey?10:1)}function uE(){return navigator.maxTouchPoints||"ontouchstart"in this}function fE(n,a,i){var s=n.invertX(a[0][0])-i[0][0],r=n.invertX(a[1][0])-i[1][0],c=n.invertY(a[0][1])-i[0][1],u=n.invertY(a[1][1])-i[1][1];return n.translate(r>s?(s+r)/2:Math.min(0,s)||Math.max(0,r),u>c?(c+u)/2:Math.min(0,c)||Math.max(0,u))}function Kp(){var n=sE,a=rE,i=fE,s=cE,r=uE,c=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],h=250,g=Fs,p=Us("start","zoom","end"),x,y,v,S=500,b=150,E=0,_=10;function T(H){H.property("__zoom",Qp).on("wheel.zoom",K,{passive:!1}).on("mousedown.zoom",J).on("dblclick.zoom",fe).filter(r).on("touchstart.zoom",U).on("touchmove.zoom",F).on("touchend.zoom touchcancel.zoom",ae).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}T.transform=function(H,I,k,L){var $=H.selection?H.selection():H;$.property("__zoom",Qp),H!==$?D(H,I,k,L):$.interrupt().each(function(){R(this,arguments).event(L).start().zoom(null,typeof I=="function"?I.apply(this,arguments):I).end()})},T.scaleBy=function(H,I,k,L){T.scaleTo(H,function(){var $=this.__zoom.k,Z=typeof I=="function"?I.apply(this,arguments):I;return $*Z},k,L)},T.scaleTo=function(H,I,k,L){T.transform(H,function(){var $=a.apply(this,arguments),Z=this.__zoom,Y=k==null?C($):typeof k=="function"?k.apply(this,arguments):k,A=Z.invert(Y),O=typeof I=="function"?I.apply(this,arguments):I;return i(N(z(Z,O),Y,A),$,u)},k,L)},T.translateBy=function(H,I,k,L){T.transform(H,function(){return i(this.__zoom.translate(typeof I=="function"?I.apply(this,arguments):I,typeof k=="function"?k.apply(this,arguments):k),a.apply(this,arguments),u)},null,L)},T.translateTo=function(H,I,k,L,$){T.transform(H,function(){var Z=a.apply(this,arguments),Y=this.__zoom,A=L==null?C(Z):typeof L=="function"?L.apply(this,arguments):L;return i(or.translate(A[0],A[1]).scale(Y.k).translate(typeof I=="function"?-I.apply(this,arguments):-I,typeof k=="function"?-k.apply(this,arguments):-k),Z,u)},L,$)};function z(H,I){return I=Math.max(c[0],Math.min(c[1],I)),I===H.k?H:new Ea(I,H.x,H.y)}function N(H,I,k){var L=I[0]-k[0]*H.k,$=I[1]-k[1]*H.k;return L===H.x&&$===H.y?H:new Ea(H.k,L,$)}function C(H){return[(+H[0][0]+ +H[1][0])/2,(+H[0][1]+ +H[1][1])/2]}function D(H,I,k,L){H.on("start.zoom",function(){R(this,arguments).event(L).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(L).end()}).tween("zoom",function(){var $=this,Z=arguments,Y=R($,Z).event(L),A=a.apply($,Z),O=k==null?C(A):typeof k=="function"?k.apply($,Z):k,G=Math.max(A[1][0]-A[0][0],A[1][1]-A[0][1]),P=$.__zoom,se=typeof I=="function"?I.apply($,Z):I,ge=g(P.invert(O).concat(G/P.k),se.invert(O).concat(G/se.k));return function(he){if(he===1)he=se;else{var ue=ge(he),me=G/ue[2];he=new Ea(me,O[0]-ue[0]*me,O[1]-ue[1]*me)}Y.zoom(null,he)}})}function R(H,I,k){return!k&&H.__zooming||new j(H,I)}function j(H,I){this.that=H,this.args=I,this.active=0,this.sourceEvent=null,this.extent=a.apply(H,I),this.taps=0}j.prototype={event:function(H){return H&&(this.sourceEvent=H),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(H,I){return this.mouse&&H!=="mouse"&&(this.mouse[1]=I.invert(this.mouse[0])),this.touch0&&H!=="touch"&&(this.touch0[1]=I.invert(this.touch0[0])),this.touch1&&H!=="touch"&&(this.touch1[1]=I.invert(this.touch1[0])),this.that.__zoom=I,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(H){var I=bn(this.that).datum();p.call(H,this.that,new oE(H,{sourceEvent:this.sourceEvent,target:T,transform:this.that.__zoom,dispatch:p}),I)}};function K(H,...I){if(!n.apply(this,arguments))return;var k=R(this,I).event(H),L=this.__zoom,$=Math.max(c[0],Math.min(c[1],L.k*Math.pow(2,s.apply(this,arguments)))),Z=Gn(H);if(k.wheel)(k.mouse[0][0]!==Z[0]||k.mouse[0][1]!==Z[1])&&(k.mouse[1]=L.invert(k.mouse[0]=Z)),clearTimeout(k.wheel);else{if(L.k===$)return;k.mouse=[Z,L.invert(Z)],lr(this),k.start()}So(H),k.wheel=setTimeout(Y,b),k.zoom("mouse",i(N(z(L,$),k.mouse[0],k.mouse[1]),k.extent,u));function Y(){k.wheel=null,k.end()}}function J(H,...I){if(v||!n.apply(this,arguments))return;var k=H.currentTarget,L=R(this,I,!0).event(H),$=bn(H.view).on("mousemove.zoom",O,!0).on("mouseup.zoom",G,!0),Z=Gn(H,k),Y=H.clientX,A=H.clientY;yp(H.view),bu(H),L.mouse=[Z,this.__zoom.invert(Z)],lr(this),L.start();function O(P){if(So(P),!L.moved){var se=P.clientX-Y,ge=P.clientY-A;L.moved=se*se+ge*ge>E}L.event(P).zoom("mouse",i(N(L.that.__zoom,L.mouse[0]=Gn(P,k),L.mouse[1]),L.extent,u))}function G(P){$.on("mousemove.zoom mouseup.zoom",null),xp(P.view,L.moved),So(P),L.event(P).end()}}function fe(H,...I){if(n.apply(this,arguments)){var k=this.__zoom,L=Gn(H.changedTouches?H.changedTouches[0]:H,this),$=k.invert(L),Z=k.k*(H.shiftKey?.5:2),Y=i(N(z(k,Z),L,$),a.apply(this,I),u);So(H),h>0?bn(this).transition().duration(h).call(D,Y,L,H):bn(this).call(T.transform,Y,L,H)}}function U(H,...I){if(n.apply(this,arguments)){var k=H.touches,L=k.length,$=R(this,I,H.changedTouches.length===L).event(H),Z,Y,A,O;for(bu(H),Y=0;Y<L;++Y)A=k[Y],O=Gn(A,this),O=[O,this.__zoom.invert(O),A.identifier],$.touch0?!$.touch1&&$.touch0[2]!==O[2]&&($.touch1=O,$.taps=0):($.touch0=O,Z=!0,$.taps=1+!!x);x&&(x=clearTimeout(x)),Z&&($.taps<2&&(y=O[0],x=setTimeout(function(){x=null},S)),lr(this),$.start())}}function F(H,...I){if(this.__zooming){var k=R(this,I).event(H),L=H.changedTouches,$=L.length,Z,Y,A,O;for(So(H),Z=0;Z<$;++Z)Y=L[Z],A=Gn(Y,this),k.touch0&&k.touch0[2]===Y.identifier?k.touch0[0]=A:k.touch1&&k.touch1[2]===Y.identifier&&(k.touch1[0]=A);if(Y=k.that.__zoom,k.touch1){var G=k.touch0[0],P=k.touch0[1],se=k.touch1[0],ge=k.touch1[1],he=(he=se[0]-G[0])*he+(he=se[1]-G[1])*he,ue=(ue=ge[0]-P[0])*ue+(ue=ge[1]-P[1])*ue;Y=z(Y,Math.sqrt(he/ue)),A=[(G[0]+se[0])/2,(G[1]+se[1])/2],O=[(P[0]+ge[0])/2,(P[1]+ge[1])/2]}else if(k.touch0)A=k.touch0[0],O=k.touch0[1];else return;k.zoom("touch",i(N(Y,A,O),k.extent,u))}}function ae(H,...I){if(this.__zooming){var k=R(this,I).event(H),L=H.changedTouches,$=L.length,Z,Y;for(bu(H),v&&clearTimeout(v),v=setTimeout(function(){v=null},S),Z=0;Z<$;++Z)Y=L[Z],k.touch0&&k.touch0[2]===Y.identifier?delete k.touch0:k.touch1&&k.touch1[2]===Y.identifier&&delete k.touch1;if(k.touch1&&!k.touch0&&(k.touch0=k.touch1,delete k.touch1),k.touch0)k.touch0[1]=this.__zoom.invert(k.touch0[0]);else if(k.end(),k.taps===2&&(Y=Gn(Y,this),Math.hypot(y[0]-Y[0],y[1]-Y[1])<_)){var A=bn(this).on("dblclick.zoom");A&&A.apply(this,arguments)}}}return T.wheelDelta=function(H){return arguments.length?(s=typeof H=="function"?H:ir(+H),T):s},T.filter=function(H){return arguments.length?(n=typeof H=="function"?H:ir(!!H),T):n},T.touchable=function(H){return arguments.length?(r=typeof H=="function"?H:ir(!!H),T):r},T.extent=function(H){return arguments.length?(a=typeof H=="function"?H:ir([[+H[0][0],+H[0][1]],[+H[1][0],+H[1][1]]]),T):a},T.scaleExtent=function(H){return arguments.length?(c[0]=+H[0],c[1]=+H[1],T):[c[0],c[1]]},T.translateExtent=function(H){return arguments.length?(u[0][0]=+H[0][0],u[1][0]=+H[1][0],u[0][1]=+H[0][1],u[1][1]=+H[1][1],T):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},T.constrain=function(H){return arguments.length?(i=H,T):i},T.duration=function(H){return arguments.length?(h=+H,T):h},T.interpolate=function(H){return arguments.length?(g=H,T):g},T.on=function(){var H=p.on.apply(p,arguments);return H===p?T:H},T.clickDistance=function(H){return arguments.length?(E=(H=+H)*H,T):Math.sqrt(E)},T.tapDistance=function(H){return arguments.length?(_=+H,T):_},T}const ua={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:n=>`Node type "${n}" 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:n=>`The old edge with id=${n} does not exist.`,error009:n=>`Marker type "${n}" doesn't exist.`,error008:(n,{id:a,sourceHandle:i,targetHandle:s})=>`Couldn't create edge for ${n} handle id: "${n==="source"?i:s}", edge id: ${a}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:n=>`Edge type "${n}" not found. Using fallback type "default".`,error012:n=>`Node with id "${n}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(n="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${n}/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."},wo=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Fp=["Enter"," ","Escape"],Jp={"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:n,x:a,y:i})=>`Moved selected node ${n}. New position, x: ${a}, 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 ui;(function(n){n.Strict="strict",n.Loose="loose"})(ui||(ui={}));var Dl;(function(n){n.Free="free",n.Vertical="vertical",n.Horizontal="horizontal"})(Dl||(Dl={}));var Eo;(function(n){n.Partial="partial",n.Full="full"})(Eo||(Eo={}));const Pp={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null};var Fa;(function(n){n.Bezier="default",n.Straight="straight",n.Step="step",n.SmoothStep="smoothstep",n.SimpleBezier="simplebezier"})(Fa||(Fa={}));var sr;(function(n){n.Arrow="arrow",n.ArrowClosed="arrowclosed"})(sr||(sr={}));var be;(function(n){n.Left="left",n.Top="top",n.Right="right",n.Bottom="bottom"})(be||(be={}));const Wp={[be.Left]:be.Right,[be.Right]:be.Left,[be.Top]:be.Bottom,[be.Bottom]:be.Top};function eg(n){return n===null?null:n?"valid":"invalid"}const tg=n=>"id"in n&&"source"in n&&"target"in n,dE=n=>"id"in n&&"position"in n&&!("source"in n)&&!("target"in n),Su=n=>"id"in n&&"internals"in n&&!("source"in n)&&!("target"in n),_o=(n,a=[0,0])=>{const{width:i,height:s}=_a(n),r=n.origin??a,c=i*r[0],u=s*r[1];return{x:n.position.x-c,y:n.position.y-u}},hE=(n,a={nodeOrigin:[0,0]})=>{if(n.length===0)return{x:0,y:0,width:0,height:0};const i=n.reduce((s,r)=>{const c=typeof r=="string";let u=!a.nodeLookup&&!c?r:void 0;a.nodeLookup&&(u=c?a.nodeLookup.get(r):Su(r)?r:a.nodeLookup.get(r.id));const h=u?ur(u,a.nodeOrigin):{x:0,y:0,x2:0,y2:0};return rr(s,h)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return cr(i)},Ao=(n,a={})=>{let i={x:1/0,y:1/0,x2:-1/0,y2:-1/0},s=!1;return n.forEach(r=>{(a.filter===void 0||a.filter(r))&&(i=rr(i,ur(r)),s=!0)}),s?cr(i):{x:0,y:0,width:0,height:0}},wu=(n,a,[i,s,r]=[0,0,1],c=!1,u=!1)=>{const h={...To(a,[i,s,r]),width:a.width/r,height:a.height/r},g=[];for(const p of n.values()){const{measured:x,selectable:y=!0,hidden:v=!1}=p;if(u&&!y||v)continue;const S=x.width??p.width??p.initialWidth??null,b=x.height??p.height??p.initialHeight??null,E=No(h,di(p)),_=(S??0)*(b??0),T=c&&E>0;(!p.internals.handleBounds||T||E>=_||p.dragging)&&g.push(p)}return g},pE=(n,a)=>{const i=new Set;return n.forEach(s=>{i.add(s.id)}),a.filter(s=>i.has(s.source)||i.has(s.target))};function gE(n,a){const i=new Map,s=a?.nodes?new Set(a.nodes.map(r=>r.id)):null;return n.forEach(r=>{r.measured.width&&r.measured.height&&(a?.includeHiddenNodes||!r.hidden)&&(!s||s.has(r.id))&&i.set(r.id,r)}),i}async function mE({nodes:n,width:a,height:i,panZoom:s,minZoom:r,maxZoom:c},u){if(n.size===0)return Promise.resolve(!0);const h=gE(n,u),g=Ao(h),p=_u(g,a,i,u?.minZoom??r,u?.maxZoom??c,u?.padding??.1);return await s.setViewport(p,{duration:u?.duration,ease:u?.ease,interpolate:u?.interpolate}),Promise.resolve(!0)}function ng({nodeId:n,nextPosition:a,nodeLookup:i,nodeOrigin:s=[0,0],nodeExtent:r,onError:c}){const u=i.get(n),h=u.parentId?i.get(u.parentId):void 0,{x:g,y:p}=h?h.internals.positionAbsolute:{x:0,y:0},x=u.origin??s;let y=u.extent||r;if(u.extent==="parent"&&!u.expandParent)if(!h)c?.("005",ua.error005());else{const S=h.measured.width,b=h.measured.height;S&&b&&(y=[[g,p],[g+S,p+b]])}else h&&pi(u.extent)&&(y=[[u.extent[0][0]+g,u.extent[0][1]+p],[u.extent[1][0]+g,u.extent[1][1]+p]]);const v=pi(y)?Ol(a,y,u.measured):a;return(u.measured.width===void 0||u.measured.height===void 0)&&c?.("015",ua.error015()),{position:{x:v.x-g+(u.measured.width??0)*x[0],y:v.y-p+(u.measured.height??0)*x[1]},positionAbsolute:v}}async function yE({nodesToRemove:n=[],edgesToRemove:a=[],nodes:i,edges:s,onBeforeDelete:r}){const c=new Set(n.map(v=>v.id)),u=[];for(const v of i){if(v.deletable===!1)continue;const S=c.has(v.id),b=!S&&v.parentId&&u.find(E=>E.id===v.parentId);(S||b)&&u.push(v)}const h=new Set(a.map(v=>v.id)),g=s.filter(v=>v.deletable!==!1),x=pE(u,g);for(const v of g)h.has(v.id)&&!x.find(b=>b.id===v.id)&&x.push(v);if(!r)return{edges:x,nodes:u};const y=await r({nodes:u,edges:x});return typeof y=="boolean"?y?{edges:x,nodes:u}:{edges:[],nodes:[]}:y}const fi=(n,a=0,i=1)=>Math.min(Math.max(n,a),i),Ol=(n={x:0,y:0},a,i)=>({x:fi(n.x,a[0][0],a[1][0]-(i?.width??0)),y:fi(n.y,a[0][1],a[1][1]-(i?.height??0))});function ag(n,a,i){const{width:s,height:r}=_a(i),{x:c,y:u}=i.internals.positionAbsolute;return Ol(n,[[c,u],[c+s,u+r]],a)}const lg=(n,a,i)=>n<a?fi(Math.abs(n-a),1,a)/a:n>i?-fi(Math.abs(n-i),1,a)/a:0,ig=(n,a,i=15,s=40)=>{const r=lg(n.x,s,a.width-s)*i,c=lg(n.y,s,a.height-s)*i;return[r,c]},rr=(n,a)=>({x:Math.min(n.x,a.x),y:Math.min(n.y,a.y),x2:Math.max(n.x2,a.x2),y2:Math.max(n.y2,a.y2)}),Eu=({x:n,y:a,width:i,height:s})=>({x:n,y:a,x2:n+i,y2:a+s}),cr=({x:n,y:a,x2:i,y2:s})=>({x:n,y:a,width:i-n,height:s-a}),di=(n,a=[0,0])=>{const{x:i,y:s}=Su(n)?n.internals.positionAbsolute:_o(n,a);return{x:i,y:s,width:n.measured?.width??n.width??n.initialWidth??0,height:n.measured?.height??n.height??n.initialHeight??0}},ur=(n,a=[0,0])=>{const{x:i,y:s}=Su(n)?n.internals.positionAbsolute:_o(n,a);return{x:i,y:s,x2:i+(n.measured?.width??n.width??n.initialWidth??0),y2:s+(n.measured?.height??n.height??n.initialHeight??0)}},og=(n,a)=>cr(rr(Eu(n),Eu(a))),No=(n,a)=>{const i=Math.max(0,Math.min(n.x+n.width,a.x+a.width)-Math.max(n.x,a.x)),s=Math.max(0,Math.min(n.y+n.height,a.y+a.height)-Math.max(n.y,a.y));return Math.ceil(i*s)},sg=n=>Qn(n.width)&&Qn(n.height)&&Qn(n.x)&&Qn(n.y),Qn=n=>!isNaN(n)&&isFinite(n),xE=(n,a)=>{},ko=(n,a=[1,1])=>({x:a[0]*Math.round(n.x/a[0]),y:a[1]*Math.round(n.y/a[1])}),To=({x:n,y:a},[i,s,r],c=!1,u=[1,1])=>{const h={x:(n-i)/r,y:(a-s)/r};return c?ko(h,u):h},fr=({x:n,y:a},[i,s,r])=>({x:n*r+i,y:a*r+s});function hi(n,a){if(typeof n=="number")return Math.floor((a-a/(1+n))*.5);if(typeof n=="string"&&n.endsWith("px")){const i=parseFloat(n);if(!Number.isNaN(i))return Math.floor(i)}if(typeof n=="string"&&n.endsWith("%")){const i=parseFloat(n);if(!Number.isNaN(i))return Math.floor(a*i*.01)}return console.error(`[React Flow] The padding value "${n}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function vE(n,a,i){if(typeof n=="string"||typeof n=="number"){const s=hi(n,i),r=hi(n,a);return{top:s,right:r,bottom:s,left:r,x:r*2,y:s*2}}if(typeof n=="object"){const s=hi(n.top??n.y??0,i),r=hi(n.bottom??n.y??0,i),c=hi(n.left??n.x??0,a),u=hi(n.right??n.x??0,a);return{top:s,right:u,bottom:r,left:c,x:c+u,y:s+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function bE(n,a,i,s,r,c){const{x:u,y:h}=fr(n,[a,i,s]),{x:g,y:p}=fr({x:n.x+n.width,y:n.y+n.height},[a,i,s]),x=r-g,y=c-p;return{left:Math.floor(u),top:Math.floor(h),right:Math.floor(x),bottom:Math.floor(y)}}const _u=(n,a,i,s,r,c)=>{const u=vE(c,a,i),h=(a-u.x)/n.width,g=(i-u.y)/n.height,p=Math.min(h,g),x=fi(p,s,r),y=n.x+n.width/2,v=n.y+n.height/2,S=a/2-y*x,b=i/2-v*x,E=bE(n,S,b,x,a,i),_={left:Math.min(E.left-u.left,0),top:Math.min(E.top-u.top,0),right:Math.min(E.right-u.right,0),bottom:Math.min(E.bottom-u.bottom,0)};return{x:S-_.left+_.right,y:b-_.top+_.bottom,zoom:x}},Co=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function pi(n){return n!=null&&n!=="parent"}function _a(n){return{width:n.measured?.width??n.width??n.initialWidth??0,height:n.measured?.height??n.height??n.initialHeight??0}}function rg(n){return(n.measured?.width??n.width??n.initialWidth)!==void 0&&(n.measured?.height??n.height??n.initialHeight)!==void 0}function cg(n,a={width:0,height:0},i,s,r){const c={...n},u=s.get(i);if(u){const h=u.origin||r;c.x+=u.internals.positionAbsolute.x-(a.width??0)*h[0],c.y+=u.internals.positionAbsolute.y-(a.height??0)*h[1]}return c}function ug(n,a){if(n.size!==a.size)return!1;for(const i of n)if(!a.has(i))return!1;return!0}function SE(){let n,a;return{promise:new Promise((s,r)=>{n=s,a=r}),resolve:n,reject:a}}function wE(n){return{...Jp,...n||{}}}function Mo(n,{snapGrid:a=[0,0],snapToGrid:i=!1,transform:s,containerBounds:r}){const{x:c,y:u}=Kn(n),h=To({x:c-(r?.left??0),y:u-(r?.top??0)},s),{x:g,y:p}=i?ko(h,a):h;return{xSnapped:g,ySnapped:p,...h}}const Au=n=>({width:n.offsetWidth,height:n.offsetHeight}),fg=n=>n?.getRootNode?.()||window?.document,EE=["INPUT","SELECT","TEXTAREA"];function dg(n){const a=n.composedPath?.()?.[0]||n.target;return a?.nodeType!==1?!1:EE.includes(a.nodeName)||a.hasAttribute("contenteditable")||!!a.closest(".nokey")}const hg=n=>"clientX"in n,Kn=(n,a)=>{const i=hg(n),s=i?n.clientX:n.touches?.[0].clientX,r=i?n.clientY:n.touches?.[0].clientY;return{x:s-(a?.left??0),y:r-(a?.top??0)}},pg=(n,a,i,s,r)=>{const c=a.querySelectorAll(`.${n}`);return!c||!c.length?null:Array.from(c).map(u=>{const h=u.getBoundingClientRect();return{id:u.getAttribute("data-handleid"),type:n,nodeId:r,position:u.getAttribute("data-handlepos"),x:(h.left-i.left)/s,y:(h.top-i.top)/s,...Au(u)}})};function gg({sourceX:n,sourceY:a,targetX:i,targetY:s,sourceControlX:r,sourceControlY:c,targetControlX:u,targetControlY:h}){const g=n*.125+r*.375+u*.375+i*.125,p=a*.125+c*.375+h*.375+s*.125,x=Math.abs(g-n),y=Math.abs(p-a);return[g,p,x,y]}function dr(n,a){return n>=0?.5*n:a*25*Math.sqrt(-n)}function mg({pos:n,x1:a,y1:i,x2:s,y2:r,c}){switch(n){case be.Left:return[a-dr(a-s,c),i];case be.Right:return[a+dr(s-a,c),i];case be.Top:return[a,i-dr(i-r,c)];case be.Bottom:return[a,i+dr(r-i,c)]}}function Nu({sourceX:n,sourceY:a,sourcePosition:i=be.Bottom,targetX:s,targetY:r,targetPosition:c=be.Top,curvature:u=.25}){const[h,g]=mg({pos:i,x1:n,y1:a,x2:s,y2:r,c:u}),[p,x]=mg({pos:c,x1:s,y1:r,x2:n,y2:a,c:u}),[y,v,S,b]=gg({sourceX:n,sourceY:a,targetX:s,targetY:r,sourceControlX:h,sourceControlY:g,targetControlX:p,targetControlY:x});return[`M${n},${a} C${h},${g} ${p},${x} ${s},${r}`,y,v,S,b]}function yg({sourceX:n,sourceY:a,targetX:i,targetY:s}){const r=Math.abs(i-n)/2,c=i<n?i+r:i-r,u=Math.abs(s-a)/2,h=s<a?s+u:s-u;return[c,h,r,u]}function _E({sourceNode:n,targetNode:a,selected:i=!1,zIndex:s,elevateOnSelect:r=!1}){if(s!==void 0)return s;const c=r&&i?1e3:0,u=Math.max(n.parentId||r&&n.selected?n.internals.z:0,a.parentId||r&&a.selected?a.internals.z:0);return c+u}function AE({sourceNode:n,targetNode:a,width:i,height:s,transform:r}){const c=rr(ur(n),ur(a));c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const u={x:-r[0]/r[2],y:-r[1]/r[2],width:i/r[2],height:s/r[2]};return No(u,cr(c))>0}const NE=({source:n,sourceHandle:a,target:i,targetHandle:s})=>`xy-edge__${n}${a||""}-${i}${s||""}`,kE=(n,a)=>a.some(i=>i.source===n.source&&i.target===n.target&&(i.sourceHandle===n.sourceHandle||!i.sourceHandle&&!n.sourceHandle)&&(i.targetHandle===n.targetHandle||!i.targetHandle&&!n.targetHandle)),xg=(n,a)=>{if(!n.source||!n.target)return a;let i;return tg(n)?i={...n}:i={...n,id:NE(n)},kE(i,a)?a:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,a.concat(i))};function vg({sourceX:n,sourceY:a,targetX:i,targetY:s}){const[r,c,u,h]=yg({sourceX:n,sourceY:a,targetX:i,targetY:s});return[`M ${n},${a}L ${i},${s}`,r,c,u,h]}const bg={[be.Left]:{x:-1,y:0},[be.Right]:{x:1,y:0},[be.Top]:{x:0,y:-1},[be.Bottom]:{x:0,y:1}},TE=({source:n,sourcePosition:a=be.Bottom,target:i})=>a===be.Left||a===be.Right?n.x<i.x?{x:1,y:0}:{x:-1,y:0}:n.y<i.y?{x:0,y:1}:{x:0,y:-1},Sg=(n,a)=>Math.sqrt(Math.pow(a.x-n.x,2)+Math.pow(a.y-n.y,2));function CE({source:n,sourcePosition:a=be.Bottom,target:i,targetPosition:s=be.Top,center:r,offset:c,stepPosition:u}){const h=bg[a],g=bg[s],p={x:n.x+h.x*c,y:n.y+h.y*c},x={x:i.x+g.x*c,y:i.y+g.y*c},y=TE({source:p,sourcePosition:a,target:x}),v=y.x!==0?"x":"y",S=y[v];let b=[],E,_;const T={x:0,y:0},z={x:0,y:0},[,,N,C]=yg({sourceX:n.x,sourceY:n.y,targetX:i.x,targetY:i.y});if(h[v]*g[v]===-1){v==="x"?(E=r.x??p.x+(x.x-p.x)*u,_=r.y??(p.y+x.y)/2):(E=r.x??(p.x+x.x)/2,_=r.y??p.y+(x.y-p.y)*u);const R=[{x:E,y:p.y},{x:E,y:x.y}],j=[{x:p.x,y:_},{x:x.x,y:_}];h[v]===S?b=v==="x"?R:j:b=v==="x"?j:R}else{const R=[{x:p.x,y:x.y}],j=[{x:x.x,y:p.y}];if(v==="x"?b=h.x===S?j:R:b=h.y===S?R:j,a===s){const F=Math.abs(n[v]-i[v]);if(F<=c){const ae=Math.min(c-1,c-F);h[v]===S?T[v]=(p[v]>n[v]?-1:1)*ae:z[v]=(x[v]>i[v]?-1:1)*ae}}if(a!==s){const F=v==="x"?"y":"x",ae=h[v]===g[F],H=p[F]>x[F],I=p[F]<x[F];(h[v]===1&&(!ae&&H||ae&&I)||h[v]!==1&&(!ae&&I||ae&&H))&&(b=v==="x"?R:j)}const K={x:p.x+T.x,y:p.y+T.y},J={x:x.x+z.x,y:x.y+z.y},fe=Math.max(Math.abs(K.x-b[0].x),Math.abs(J.x-b[0].x)),U=Math.max(Math.abs(K.y-b[0].y),Math.abs(J.y-b[0].y));fe>=U?(E=(K.x+J.x)/2,_=b[0].y):(E=b[0].x,_=(K.y+J.y)/2)}return[[n,{x:p.x+T.x,y:p.y+T.y},...b,{x:x.x+z.x,y:x.y+z.y},i],E,_,N,C]}function ME(n,a,i,s){const r=Math.min(Sg(n,a)/2,Sg(a,i)/2,s),{x:c,y:u}=a;if(n.x===c&&c===i.x||n.y===u&&u===i.y)return`L${c} ${u}`;if(n.y===u){const p=n.x<i.x?-1:1,x=n.y<i.y?1:-1;return`L ${c+r*p},${u}Q ${c},${u} ${c},${u+r*x}`}const h=n.x<i.x?1:-1,g=n.y<i.y?-1:1;return`L ${c},${u+r*g}Q ${c},${u} ${c+r*h},${u}`}function ku({sourceX:n,sourceY:a,sourcePosition:i=be.Bottom,targetX:s,targetY:r,targetPosition:c=be.Top,borderRadius:u=5,centerX:h,centerY:g,offset:p=20,stepPosition:x=.5}){const[y,v,S,b,E]=CE({source:{x:n,y:a},sourcePosition:i,target:{x:s,y:r},targetPosition:c,center:{x:h,y:g},offset:p,stepPosition:x});return[y.reduce((T,z,N)=>{let C="";return N>0&&N<y.length-1?C=ME(y[N-1],z,y[N+1],u):C=`${N===0?"M":"L"}${z.x} ${z.y}`,T+=C,T},""),v,S,b,E]}function wg(n){return n&&!!(n.internals.handleBounds||n.handles?.length)&&!!(n.measured.width||n.width||n.initialWidth)}function zE(n){const{sourceNode:a,targetNode:i}=n;if(!wg(a)||!wg(i))return null;const s=a.internals.handleBounds||Eg(a.handles),r=i.internals.handleBounds||Eg(i.handles),c=_g(s?.source??[],n.sourceHandle),u=_g(n.connectionMode===ui.Strict?r?.target??[]:(r?.target??[]).concat(r?.source??[]),n.targetHandle);if(!c||!u)return n.onError?.("008",ua.error008(c?"target":"source",{id:n.id,sourceHandle:n.sourceHandle,targetHandle:n.targetHandle})),null;const h=c?.position||be.Bottom,g=u?.position||be.Top,p=zo(a,c,h),x=zo(i,u,g);return{sourceX:p.x,sourceY:p.y,targetX:x.x,targetY:x.y,sourcePosition:h,targetPosition:g}}function Eg(n){if(!n)return null;const a=[],i=[];for(const s of n)s.width=s.width??1,s.height=s.height??1,s.type==="source"?a.push(s):s.type==="target"&&i.push(s);return{source:a,target:i}}function zo(n,a,i=be.Left,s=!1){const r=(a?.x??0)+n.internals.positionAbsolute.x,c=(a?.y??0)+n.internals.positionAbsolute.y,{width:u,height:h}=a??_a(n);if(s)return{x:r+u/2,y:c+h/2};switch(a?.position??i){case be.Top:return{x:r+u/2,y:c};case be.Right:return{x:r+u,y:c+h/2};case be.Bottom:return{x:r+u/2,y:c+h};case be.Left:return{x:r,y:c+h/2}}}function _g(n,a){return n&&(a?n.find(i=>i.id===a):n[0])||null}function Tu(n,a){return n?typeof n=="string"?n:`${a?`${a}__`:""}${Object.keys(n).sort().map(s=>`${s}=${n[s]}`).join("&")}`:""}function DE(n,{id:a,defaultColor:i,defaultMarkerStart:s,defaultMarkerEnd:r}){const c=new Set;return n.reduce((u,h)=>([h.markerStart||s,h.markerEnd||r].forEach(g=>{if(g&&typeof g=="object"){const p=Tu(g,a);c.has(p)||(u.push({id:p,color:g.color||i,...g}),c.add(p))}}),u),[]).sort((u,h)=>u.id.localeCompare(h.id))}const Ag=1e3,OE=10,Cu={nodeOrigin:[0,0],nodeExtent:wo,elevateNodesOnSelect:!0,defaults:{}},RE={...Cu,checkEquality:!0};function Mu(n,a){const i={...n};for(const s in a)a[s]!==void 0&&(i[s]=a[s]);return i}function jE(n,a,i){const s=Mu(Cu,i);for(const r of n.values())if(r.parentId)Du(r,n,a,s);else{const c=_o(r,s.nodeOrigin),u=pi(r.extent)?r.extent:s.nodeExtent,h=Ol(c,u,_a(r));r.internals.positionAbsolute=h}}function LE(n,a){if(!n.handles)return n.measured?a?.internals.handleBounds:void 0;const i=[],s=[];for(const r of n.handles){const c={id:r.id,width:r.width??1,height:r.height??1,nodeId:n.id,x:r.x,y:r.y,position:r.position,type:r.type};r.type==="source"?i.push(c):r.type==="target"&&s.push(c)}return{source:i,target:s}}function zu(n,a,i,s){const r=Mu(RE,s);let c={i:-1},u=n.length>0;const h=new Map(a),g=r?.elevateNodesOnSelect?Ag:0;a.clear(),i.clear();for(const p of n){let x=h.get(p.id);if(r.checkEquality&&p===x?.internals.userNode)a.set(p.id,x);else{const y=_o(p,r.nodeOrigin),v=pi(p.extent)?p.extent:r.nodeExtent,S=Ol(y,v,_a(p));x={...r.defaults,...p,measured:{width:p.measured?.width,height:p.measured?.height},internals:{positionAbsolute:S,handleBounds:LE(p,x),z:Ng(p,g),userNode:p}},a.set(p.id,x)}(x.measured===void 0||x.measured.width===void 0||x.measured.height===void 0)&&!x.hidden&&(u=!1),p.parentId&&Du(x,a,i,s,c)}return u}function HE(n,a){if(!n.parentId)return;const i=a.get(n.parentId);i?i.set(n.id,n):a.set(n.parentId,new Map([[n.id,n]]))}function Du(n,a,i,s,r){const{elevateNodesOnSelect:c,nodeOrigin:u,nodeExtent:h}=Mu(Cu,s),g=n.parentId,p=a.get(g);if(!p){console.warn(`Parent node ${g} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}HE(n,i),r&&!p.parentId&&p.internals.rootParentIndex===void 0&&(p.internals.rootParentIndex=++r.i,p.internals.z=p.internals.z+r.i*OE),r&&p.internals.rootParentIndex!==void 0&&(r.i=p.internals.rootParentIndex);const x=c?Ag:0,{x:y,y:v,z:S}=BE(n,p,u,h,x),{positionAbsolute:b}=n.internals,E=y!==b.x||v!==b.y;(E||S!==n.internals.z)&&a.set(n.id,{...n,internals:{...n.internals,positionAbsolute:E?{x:y,y:v}:b,z:S}})}function Ng(n,a){return(Qn(n.zIndex)?n.zIndex:0)+(n.selected?a:0)}function BE(n,a,i,s,r){const{x:c,y:u}=a.internals.positionAbsolute,h=_a(n),g=_o(n,i),p=pi(n.extent)?Ol(g,n.extent,h):g;let x=Ol({x:c+p.x,y:u+p.y},s,h);n.extent==="parent"&&(x=ag(x,h,a));const y=Ng(n,r),v=a.internals.z??0;return{x:x.x,y:x.y,z:v>=y?v+1:y}}function Ou(n,a,i,s=[0,0]){const r=[],c=new Map;for(const u of n){const h=a.get(u.parentId);if(!h)continue;const g=c.get(u.parentId)?.expandedRect??di(h),p=og(g,u.rect);c.set(u.parentId,{expandedRect:p,parent:h})}return c.size>0&&c.forEach(({expandedRect:u,parent:h},g)=>{const p=h.internals.positionAbsolute,x=_a(h),y=h.origin??s,v=u.x<p.x?Math.round(Math.abs(p.x-u.x)):0,S=u.y<p.y?Math.round(Math.abs(p.y-u.y)):0,b=Math.max(x.width,Math.round(u.width)),E=Math.max(x.height,Math.round(u.height)),_=(b-x.width)*y[0],T=(E-x.height)*y[1];(v>0||S>0||_||T)&&(r.push({id:g,type:"position",position:{x:h.position.x-v+_,y:h.position.y-S+T}}),i.get(g)?.forEach(z=>{n.some(N=>N.id===z.id)||r.push({id:z.id,type:"position",position:{x:z.position.x+v,y:z.position.y+S}})})),(x.width<u.width||x.height<u.height||v||S)&&r.push({id:g,type:"dimensions",setAttributes:!0,dimensions:{width:b+(v?y[0]*v-_:0),height:E+(S?y[1]*S-T:0)}})}),r}function UE(n,a,i,s,r,c){const u=s?.querySelector(".xyflow__viewport");let h=!1;if(!u)return{changes:[],updatedInternals:h};const g=[],p=window.getComputedStyle(u),{m22:x}=new window.DOMMatrixReadOnly(p.transform),y=[];for(const v of n.values()){const S=a.get(v.id);if(!S)continue;if(S.hidden){a.set(S.id,{...S,internals:{...S.internals,handleBounds:void 0}}),h=!0;continue}const b=Au(v.nodeElement),E=S.measured.width!==b.width||S.measured.height!==b.height;if(!!(b.width&&b.height&&(E||!S.internals.handleBounds||v.force))){const T=v.nodeElement.getBoundingClientRect(),z=pi(S.extent)?S.extent:c;let{positionAbsolute:N}=S.internals;S.parentId&&S.extent==="parent"?N=ag(N,b,a.get(S.parentId)):z&&(N=Ol(N,z,b));const C={...S,measured:b,internals:{...S.internals,positionAbsolute:N,handleBounds:{source:pg("source",v.nodeElement,T,x,S.id),target:pg("target",v.nodeElement,T,x,S.id)}}};a.set(S.id,C),S.parentId&&Du(C,a,i,{nodeOrigin:r}),h=!0,E&&(g.push({id:S.id,type:"dimensions",dimensions:b}),S.expandParent&&S.parentId&&y.push({id:S.id,parentId:S.parentId,rect:di(C,r)}))}}if(y.length>0){const v=Ou(y,a,i,r);g.push(...v)}return{changes:g,updatedInternals:h}}async function VE({delta:n,panZoom:a,transform:i,translateExtent:s,width:r,height:c}){if(!a||!n.x&&!n.y)return Promise.resolve(!1);const u=await a.setViewportConstrained({x:i[0]+n.x,y:i[1]+n.y,zoom:i[2]},[[0,0],[r,c]],s),h=!!u&&(u.x!==i[0]||u.y!==i[1]||u.k!==i[2]);return Promise.resolve(h)}function kg(n,a,i,s,r,c){let u=r;const h=s.get(u)||new Map;s.set(u,h.set(i,a)),u=`${r}-${n}`;const g=s.get(u)||new Map;if(s.set(u,g.set(i,a)),c){u=`${r}-${n}-${c}`;const p=s.get(u)||new Map;s.set(u,p.set(i,a))}}function Tg(n,a,i){n.clear(),a.clear();for(const s of i){const{source:r,target:c,sourceHandle:u=null,targetHandle:h=null}=s,g={edgeId:s.id,source:r,target:c,sourceHandle:u,targetHandle:h},p=`${r}-${u}--${c}-${h}`,x=`${c}-${h}--${r}-${u}`;kg("source",g,x,n,r,u),kg("target",g,p,n,c,h),a.set(s.id,s)}}function Cg(n,a){if(!n.parentId)return!1;const i=a.get(n.parentId);return i?i.selected?!0:Cg(i,a):!1}function Mg(n,a,i){let s=n;do{if(s?.matches?.(a))return!0;if(s===i)return!1;s=s?.parentElement}while(s);return!1}function $E(n,a,i,s){const r=new Map;for(const[c,u]of n)if((u.selected||u.id===s)&&(!u.parentId||!Cg(u,n))&&(u.draggable||a&&typeof u.draggable>"u")){const h=n.get(c);h&&r.set(c,{id:c,position:h.position||{x:0,y:0},distance:{x:i.x-h.internals.positionAbsolute.x,y:i.y-h.internals.positionAbsolute.y},extent:h.extent,parentId:h.parentId,origin:h.origin,expandParent:h.expandParent,internals:{positionAbsolute:h.internals.positionAbsolute||{x:0,y:0}},measured:{width:h.measured.width??0,height:h.measured.height??0}})}return r}function Ru({nodeId:n,dragItems:a,nodeLookup:i,dragging:s=!0}){const r=[];for(const[u,h]of a){const g=i.get(u)?.internals.userNode;g&&r.push({...g,position:h.position,dragging:s})}if(!n)return[r[0],r];const c=i.get(n)?.internals.userNode;return[c?{...c,position:a.get(n)?.position||c.position,dragging:s}:r[0],r]}function YE({dragItems:n,snapGrid:a,x:i,y:s}){const r=n.values().next().value;if(!r)return null;const c={x:i-r.distance.x,y:s-r.distance.y},u=ko(c,a);return{x:u.x-c.x,y:u.y-c.y}}function qE({onNodeMouseDown:n,getStoreItems:a,onDragStart:i,onDrag:s,onDragStop:r}){let c={x:null,y:null},u=0,h=new Map,g=!1,p={x:0,y:0},x=null,y=!1,v=null,S=!1,b=!1,E=null;function _({noDragClassName:z,handleSelector:N,domNode:C,isSelectable:D,nodeId:R,nodeClickDistance:j=0}){v=bn(C);function K({x:F,y:ae}){const{nodeLookup:H,nodeExtent:I,snapGrid:k,snapToGrid:L,nodeOrigin:$,onNodeDrag:Z,onSelectionDrag:Y,onError:A,updateNodePositions:O}=a();c={x:F,y:ae};let G=!1;const P=h.size>1,se=P&&I?Eu(Ao(h)):null,ge=P&&L?YE({dragItems:h,snapGrid:k,x:F,y:ae}):null;for(const[he,ue]of h){if(!H.has(he))continue;let me={x:F-ue.distance.x,y:ae-ue.distance.y};L&&(me=ge?{x:Math.round(me.x+ge.x),y:Math.round(me.y+ge.y)}:ko(me,k));let Ne=null;if(P&&I&&!ue.extent&&se){const{positionAbsolute:_e}=ue.internals,we=_e.x-se.x+I[0][0],Me=_e.x+ue.measured.width-se.x2+I[1][0],Re=_e.y-se.y+I[0][1],le=_e.y+ue.measured.height-se.y2+I[1][1];Ne=[[we,Re],[Me,le]]}const{position:ke,positionAbsolute:Se}=ng({nodeId:he,nextPosition:me,nodeLookup:H,nodeExtent:Ne||I,nodeOrigin:$,onError:A});G=G||ue.position.x!==ke.x||ue.position.y!==ke.y,ue.position=ke,ue.internals.positionAbsolute=Se}if(b=b||G,!!G&&(O(h,!0),E&&(s||Z||!R&&Y))){const[he,ue]=Ru({nodeId:R,dragItems:h,nodeLookup:H});s?.(E,h,he,ue),Z?.(E,he,ue),R||Y?.(E,ue)}}async function J(){if(!x)return;const{transform:F,panBy:ae,autoPanSpeed:H,autoPanOnNodeDrag:I}=a();if(!I){g=!1,cancelAnimationFrame(u);return}const[k,L]=ig(p,x,H);(k!==0||L!==0)&&(c.x=(c.x??0)-k/F[2],c.y=(c.y??0)-L/F[2],await ae({x:k,y:L})&&K(c)),u=requestAnimationFrame(J)}function fe(F){const{nodeLookup:ae,multiSelectionActive:H,nodesDraggable:I,transform:k,snapGrid:L,snapToGrid:$,selectNodesOnDrag:Z,onNodeDragStart:Y,onSelectionDragStart:A,unselectNodesAndEdges:O}=a();y=!0,(!Z||!D)&&!H&&R&&(ae.get(R)?.selected||O()),D&&Z&&R&&n?.(R);const G=Mo(F.sourceEvent,{transform:k,snapGrid:L,snapToGrid:$,containerBounds:x});if(c=G,h=$E(ae,I,G,R),h.size>0&&(i||Y||!R&&A)){const[P,se]=Ru({nodeId:R,dragItems:h,nodeLookup:ae});i?.(F.sourceEvent,h,P,se),Y?.(F.sourceEvent,P,se),R||A?.(F.sourceEvent,se)}}const U=vp().clickDistance(j).on("start",F=>{const{domNode:ae,nodeDragThreshold:H,transform:I,snapGrid:k,snapToGrid:L}=a();x=ae?.getBoundingClientRect()||null,S=!1,b=!1,E=F.sourceEvent,H===0&&fe(F),c=Mo(F.sourceEvent,{transform:I,snapGrid:k,snapToGrid:L,containerBounds:x}),p=Kn(F.sourceEvent,x)}).on("drag",F=>{const{autoPanOnNodeDrag:ae,transform:H,snapGrid:I,snapToGrid:k,nodeDragThreshold:L,nodeLookup:$}=a(),Z=Mo(F.sourceEvent,{transform:H,snapGrid:I,snapToGrid:k,containerBounds:x});if(E=F.sourceEvent,(F.sourceEvent.type==="touchmove"&&F.sourceEvent.touches.length>1||R&&!$.has(R))&&(S=!0),!S){if(!g&&ae&&y&&(g=!0,J()),!y){const Y=Kn(F.sourceEvent,x),A=Y.x-p.x,O=Y.y-p.y;Math.sqrt(A*A+O*O)>L&&fe(F)}(c.x!==Z.xSnapped||c.y!==Z.ySnapped)&&h&&y&&(p=Kn(F.sourceEvent,x),K(Z))}}).on("end",F=>{if(!(!y||S)&&(g=!1,y=!1,cancelAnimationFrame(u),h.size>0)){const{nodeLookup:ae,updateNodePositions:H,onNodeDragStop:I,onSelectionDragStop:k}=a();if(b&&(H(h,!1),b=!1),r||I||!R&&k){const[L,$]=Ru({nodeId:R,dragItems:h,nodeLookup:ae,dragging:!1});r?.(F.sourceEvent,h,L,$),I?.(F.sourceEvent,L,$),R||k?.(F.sourceEvent,$)}}}).filter(F=>{const ae=F.target;return!F.button&&(!z||!Mg(ae,`.${z}`,C))&&(!N||Mg(ae,N,C))});v.call(U)}function T(){v?.on(".drag",null)}return{update:_,destroy:T}}function XE(n,a,i){const s=[],r={x:n.x-i,y:n.y-i,width:i*2,height:i*2};for(const c of a.values())No(r,di(c))>0&&s.push(c);return s}const GE=250;function ZE(n,a,i,s){let r=[],c=1/0;const u=XE(n,i,a+GE);for(const h of u){const g=[...h.internals.handleBounds?.source??[],...h.internals.handleBounds?.target??[]];for(const p of g){if(s.nodeId===p.nodeId&&s.type===p.type&&s.id===p.id)continue;const{x,y}=zo(h,p,p.position,!0),v=Math.sqrt(Math.pow(x-n.x,2)+Math.pow(y-n.y,2));v>a||(v<c?(r=[{...p,x,y}],c=v):v===c&&r.push({...p,x,y}))}}if(!r.length)return null;if(r.length>1){const h=s.type==="source"?"target":"source";return r.find(g=>g.type===h)??r[0]}return r[0]}function zg(n,a,i,s,r,c=!1){const u=s.get(n);if(!u)return null;const h=r==="strict"?u.internals.handleBounds?.[a]:[...u.internals.handleBounds?.source??[],...u.internals.handleBounds?.target??[]],g=(i?h?.find(p=>p.id===i):h?.[0])??null;return g&&c?{...g,...zo(u,g,g.position,!0)}:g}function Dg(n,a){return n||(a?.classList.contains("target")?"target":a?.classList.contains("source")?"source":null)}function IE(n,a){let i=null;return a?i=!0:n&&!a&&(i=!1),i}const Og=()=>!0;function QE(n,{connectionMode:a,connectionRadius:i,handleId:s,nodeId:r,edgeUpdaterType:c,isTarget:u,domNode:h,nodeLookup:g,lib:p,autoPanOnConnect:x,flowId:y,panBy:v,cancelConnection:S,onConnectStart:b,onConnect:E,onConnectEnd:_,isValidConnection:T=Og,onReconnectEnd:z,updateConnection:N,getTransform:C,getFromHandle:D,autoPanSpeed:R,dragThreshold:j=1,handleDomNode:K}){const J=fg(n.target);let fe=0,U;const{x:F,y:ae}=Kn(n),H=Dg(c,K),I=h?.getBoundingClientRect();let k=!1;if(!I||!H)return;const L=zg(r,H,s,g,a);if(!L)return;let $=Kn(n,I),Z=!1,Y=null,A=!1,O=null;function G(){if(!x||!I)return;const[ke,Se]=ig($,I,R);v({x:ke,y:Se}),fe=requestAnimationFrame(G)}const P={...L,nodeId:r,type:H,position:L.position},se=g.get(r);let he={inProgress:!0,isValid:null,from:zo(se,P,be.Left,!0),fromHandle:P,fromPosition:P.position,fromNode:se,to:$,toHandle:null,toPosition:Wp[P.position],toNode:null};function ue(){k=!0,N(he),b?.(n,{nodeId:r,handleId:s,handleType:H})}j===0&&ue();function me(ke){if(!k){const{x:Me,y:Re}=Kn(ke),le=Me-F,de=Re-ae;if(!(le*le+de*de>j*j))return;ue()}if(!D()||!P){Ne(ke);return}const Se=C();$=Kn(ke,I),U=ZE(To($,Se,!1,[1,1]),i,g,P),Z||(G(),Z=!0);const _e=Rg(ke,{handle:U,connectionMode:a,fromNodeId:r,fromHandleId:s,fromType:u?"target":"source",isValidConnection:T,doc:J,lib:p,flowId:y,nodeLookup:g});O=_e.handleDomNode,Y=_e.connection,A=IE(!!U,_e.isValid);const we={...he,isValid:A,to:_e.toHandle&&A?fr({x:_e.toHandle.x,y:_e.toHandle.y},Se):$,toHandle:_e.toHandle,toPosition:A&&_e.toHandle?_e.toHandle.position:Wp[P.position],toNode:_e.toHandle?g.get(_e.toHandle.nodeId):null};A&&U&&he.toHandle&&we.toHandle&&he.toHandle.type===we.toHandle.type&&he.toHandle.nodeId===we.toHandle.nodeId&&he.toHandle.id===we.toHandle.id&&he.to.x===we.to.x&&he.to.y===we.to.y||(N(we),he=we)}function Ne(ke){if(!("touches"in ke&&ke.touches.length>0)){if(k){(U||O)&&Y&&A&&E?.(Y);const{inProgress:Se,..._e}=he,we={..._e,toPosition:he.toHandle?he.toPosition:null};_?.(ke,we),c&&z?.(ke,we)}S(),cancelAnimationFrame(fe),Z=!1,A=!1,Y=null,O=null,J.removeEventListener("mousemove",me),J.removeEventListener("mouseup",Ne),J.removeEventListener("touchmove",me),J.removeEventListener("touchend",Ne)}}J.addEventListener("mousemove",me),J.addEventListener("mouseup",Ne),J.addEventListener("touchmove",me),J.addEventListener("touchend",Ne)}function Rg(n,{handle:a,connectionMode:i,fromNodeId:s,fromHandleId:r,fromType:c,doc:u,lib:h,flowId:g,isValidConnection:p=Og,nodeLookup:x}){const y=c==="target",v=a?u.querySelector(`.${h}-flow__handle[data-id="${g}-${a?.nodeId}-${a?.id}-${a?.type}"]`):null,{x:S,y:b}=Kn(n),E=u.elementFromPoint(S,b),_=E?.classList.contains(`${h}-flow__handle`)?E:v,T={handleDomNode:_,isValid:!1,connection:null,toHandle:null};if(_){const z=Dg(void 0,_),N=_.getAttribute("data-nodeid"),C=_.getAttribute("data-handleid"),D=_.classList.contains("connectable"),R=_.classList.contains("connectableend");if(!N||!z)return T;const j={source:y?N:s,sourceHandle:y?C:r,target:y?s:N,targetHandle:y?r:C};T.connection=j;const J=D&&R&&(i===ui.Strict?y&&z==="source"||!y&&z==="target":N!==s||C!==r);T.isValid=J&&p(j),T.toHandle=zg(N,z,C,x,i,!0)}return T}const ju={onPointerDown:QE,isValid:Rg};function KE({domNode:n,panZoom:a,getTransform:i,getViewScale:s}){const r=bn(n);function c({translateExtent:h,width:g,height:p,zoomStep:x=1,pannable:y=!0,zoomable:v=!0,inversePan:S=!1}){const b=N=>{if(N.sourceEvent.type!=="wheel"||!a)return;const C=i(),D=N.sourceEvent.ctrlKey&&Co()?10:1,R=-N.sourceEvent.deltaY*(N.sourceEvent.deltaMode===1?.05:N.sourceEvent.deltaMode?1:.002)*x,j=C[2]*Math.pow(2,R*D);a.scaleTo(j)};let E=[0,0];const _=N=>{(N.sourceEvent.type==="mousedown"||N.sourceEvent.type==="touchstart")&&(E=[N.sourceEvent.clientX??N.sourceEvent.touches[0].clientX,N.sourceEvent.clientY??N.sourceEvent.touches[0].clientY])},T=N=>{const C=i();if(N.sourceEvent.type!=="mousemove"&&N.sourceEvent.type!=="touchmove"||!a)return;const D=[N.sourceEvent.clientX??N.sourceEvent.touches[0].clientX,N.sourceEvent.clientY??N.sourceEvent.touches[0].clientY],R=[D[0]-E[0],D[1]-E[1]];E=D;const j=s()*Math.max(C[2],Math.log(C[2]))*(S?-1:1),K={x:C[0]-R[0]*j,y:C[1]-R[1]*j},J=[[0,0],[g,p]];a.setViewportConstrained({x:K.x,y:K.y,zoom:C[2]},J,h)},z=Kp().on("start",_).on("zoom",y?T:null).on("zoom.wheel",v?b:null);r.call(z,{})}function u(){r.on("zoom",null)}return{update:c,destroy:u,pointer:Gn}}const hr=n=>({x:n.x,y:n.y,zoom:n.k}),Lu=({x:n,y:a,zoom:i})=>or.translate(n,a).scale(i),gi=(n,a)=>n.target.closest(`.${a}`),jg=(n,a)=>a===2&&Array.isArray(n)&&n.includes(2),FE=n=>((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2,Hu=(n,a=0,i=FE,s=()=>{})=>{const r=typeof a=="number"&&a>0;return r||s(),r?n.transition().duration(a).ease(i).on("end",s):n},Lg=n=>{const a=n.ctrlKey&&Co()?10:1;return-n.deltaY*(n.deltaMode===1?.05:n.deltaMode?1:.002)*a};function JE({zoomPanValues:n,noWheelClassName:a,d3Selection:i,d3Zoom:s,panOnScrollMode:r,panOnScrollSpeed:c,zoomOnPinch:u,onPanZoomStart:h,onPanZoom:g,onPanZoomEnd:p}){return x=>{if(gi(x,a))return x.ctrlKey&&x.preventDefault(),!1;x.preventDefault(),x.stopImmediatePropagation();const y=i.property("__zoom").k||1;if(x.ctrlKey&&u){const _=Gn(x),T=Lg(x),z=y*Math.pow(2,T);s.scaleTo(i,z,_,x);return}const v=x.deltaMode===1?20:1;let S=r===Dl.Vertical?0:x.deltaX*v,b=r===Dl.Horizontal?0:x.deltaY*v;!Co()&&x.shiftKey&&r!==Dl.Vertical&&(S=x.deltaY*v,b=0),s.translateBy(i,-(S/y)*c,-(b/y)*c,{internal:!0});const E=hr(i.property("__zoom"));clearTimeout(n.panScrollTimeout),n.isPanScrolling?(g?.(x,E),n.panScrollTimeout=setTimeout(()=>{p?.(x,E),n.isPanScrolling=!1},150)):(n.isPanScrolling=!0,h?.(x,E))}}function PE({noWheelClassName:n,preventScrolling:a,d3ZoomHandler:i}){return function(s,r){const c=s.type==="wheel",u=!a&&c&&!s.ctrlKey,h=gi(s,n);if(s.ctrlKey&&c&&h&&s.preventDefault(),u||h)return null;s.preventDefault(),i.call(this,s,r)}}function WE({zoomPanValues:n,onDraggingChange:a,onPanZoomStart:i}){return s=>{if(s.sourceEvent?.internal)return;const r=hr(s.transform);n.mouseButton=s.sourceEvent?.button||0,n.isZoomingOrPanning=!0,n.prevViewport=r,s.sourceEvent?.type==="mousedown"&&a(!0),i&&i?.(s.sourceEvent,r)}}function e_({zoomPanValues:n,panOnDrag:a,onPaneContextMenu:i,onTransformChange:s,onPanZoom:r}){return c=>{n.usedRightMouseButton=!!(i&&jg(a,n.mouseButton??0)),c.sourceEvent?.sync||s([c.transform.x,c.transform.y,c.transform.k]),r&&!c.sourceEvent?.internal&&r?.(c.sourceEvent,hr(c.transform))}}function t_({zoomPanValues:n,panOnDrag:a,panOnScroll:i,onDraggingChange:s,onPanZoomEnd:r,onPaneContextMenu:c}){return u=>{if(!u.sourceEvent?.internal&&(n.isZoomingOrPanning=!1,c&&jg(a,n.mouseButton??0)&&!n.usedRightMouseButton&&u.sourceEvent&&c(u.sourceEvent),n.usedRightMouseButton=!1,s(!1),r)){const h=hr(u.transform);n.prevViewport=h,clearTimeout(n.timerId),n.timerId=setTimeout(()=>{r?.(u.sourceEvent,h)},i?150:0)}}}function n_({zoomActivationKeyPressed:n,zoomOnScroll:a,zoomOnPinch:i,panOnDrag:s,panOnScroll:r,zoomOnDoubleClick:c,userSelectionActive:u,noWheelClassName:h,noPanClassName:g,lib:p,connectionInProgress:x}){return y=>{const v=n||a,S=i&&y.ctrlKey,b=y.type==="wheel";if(y.button===1&&y.type==="mousedown"&&(gi(y,`${p}-flow__node`)||gi(y,`${p}-flow__edge`)))return!0;if(!s&&!v&&!r&&!c&&!i||u||x&&!b||gi(y,h)&&b||gi(y,g)&&(!b||r&&b&&!n)||!i&&y.ctrlKey&&b)return!1;if(!i&&y.type==="touchstart"&&y.touches?.length>1)return y.preventDefault(),!1;if(!v&&!r&&!S&&b||!s&&(y.type==="mousedown"||y.type==="touchstart")||Array.isArray(s)&&!s.includes(y.button)&&y.type==="mousedown")return!1;const E=Array.isArray(s)&&s.includes(y.button)||!y.button||y.button<=1;return(!y.ctrlKey||b)&&E}}function a_({domNode:n,minZoom:a,maxZoom:i,translateExtent:s,viewport:r,onPanZoom:c,onPanZoomStart:u,onPanZoomEnd:h,onDraggingChange:g}){const p={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},x=n.getBoundingClientRect(),y=Kp().scaleExtent([a,i]).translateExtent(s),v=bn(n).call(y);z({x:r.x,y:r.y,zoom:fi(r.zoom,a,i)},[[0,0],[x.width,x.height]],s);const S=v.on("wheel.zoom"),b=v.on("dblclick.zoom");y.wheelDelta(Lg);function E(U,F){return v?new Promise(ae=>{y?.interpolate(F?.interpolate==="linear"?mo:Fs).transform(Hu(v,F?.duration,F?.ease,()=>ae(!0)),U)}):Promise.resolve(!1)}function _({noWheelClassName:U,noPanClassName:F,onPaneContextMenu:ae,userSelectionActive:H,panOnScroll:I,panOnDrag:k,panOnScrollMode:L,panOnScrollSpeed:$,preventScrolling:Z,zoomOnPinch:Y,zoomOnScroll:A,zoomOnDoubleClick:O,zoomActivationKeyPressed:G,lib:P,onTransformChange:se,connectionInProgress:ge,paneClickDistance:he,selectionOnDrag:ue}){H&&!p.isZoomingOrPanning&&T();const me=I&&!G&&!H;y.clickDistance(ue?1/0:!Qn(he)||he<0?0:he);const Ne=me?JE({zoomPanValues:p,noWheelClassName:U,d3Selection:v,d3Zoom:y,panOnScrollMode:L,panOnScrollSpeed:$,zoomOnPinch:Y,onPanZoomStart:u,onPanZoom:c,onPanZoomEnd:h}):PE({noWheelClassName:U,preventScrolling:Z,d3ZoomHandler:S});if(v.on("wheel.zoom",Ne,{passive:!1}),!H){const Se=WE({zoomPanValues:p,onDraggingChange:g,onPanZoomStart:u});y.on("start",Se);const _e=e_({zoomPanValues:p,panOnDrag:k,onPaneContextMenu:!!ae,onPanZoom:c,onTransformChange:se});y.on("zoom",_e);const we=t_({zoomPanValues:p,panOnDrag:k,panOnScroll:I,onPaneContextMenu:ae,onPanZoomEnd:h,onDraggingChange:g});y.on("end",we)}const ke=n_({zoomActivationKeyPressed:G,panOnDrag:k,zoomOnScroll:A,panOnScroll:I,zoomOnDoubleClick:O,zoomOnPinch:Y,userSelectionActive:H,noPanClassName:F,noWheelClassName:U,lib:P,connectionInProgress:ge});y.filter(ke),O?v.on("dblclick.zoom",b):v.on("dblclick.zoom",null)}function T(){y.on("zoom",null)}async function z(U,F,ae){const H=Lu(U),I=y?.constrain()(H,F,ae);return I&&await E(I),new Promise(k=>k(I))}async function N(U,F){const ae=Lu(U);return await E(ae,F),new Promise(H=>H(ae))}function C(U){if(v){const F=Lu(U),ae=v.property("__zoom");(ae.k!==U.zoom||ae.x!==U.x||ae.y!==U.y)&&y?.transform(v,F,null,{sync:!0})}}function D(){const U=v?Ip(v.node()):{x:0,y:0,k:1};return{x:U.x,y:U.y,zoom:U.k}}function R(U,F){return v?new Promise(ae=>{y?.interpolate(F?.interpolate==="linear"?mo:Fs).scaleTo(Hu(v,F?.duration,F?.ease,()=>ae(!0)),U)}):Promise.resolve(!1)}function j(U,F){return v?new Promise(ae=>{y?.interpolate(F?.interpolate==="linear"?mo:Fs).scaleBy(Hu(v,F?.duration,F?.ease,()=>ae(!0)),U)}):Promise.resolve(!1)}function K(U){y?.scaleExtent(U)}function J(U){y?.translateExtent(U)}function fe(U){const F=!Qn(U)||U<0?0:U;y?.clickDistance(F)}return{update:_,destroy:T,setViewport:N,setViewportConstrained:z,getViewport:D,scaleTo:R,scaleBy:j,setScaleExtent:K,setTranslateExtent:J,syncViewport:C,setClickDistance:fe}}var Rl;(function(n){n.Line="line",n.Handle="handle"})(Rl||(Rl={}));const l_=["top-left","top-right","bottom-left","bottom-right"],i_=["top","right","bottom","left"];function o_({width:n,prevWidth:a,height:i,prevHeight:s,affectsX:r,affectsY:c}){const u=n-a,h=i-s,g=[u>0?1:u<0?-1:0,h>0?1:h<0?-1:0];return u&&r&&(g[0]=g[0]*-1),h&&c&&(g[1]=g[1]*-1),g}function Hg(n){const a=n.includes("right")||n.includes("left"),i=n.includes("bottom")||n.includes("top"),s=n.includes("left"),r=n.includes("top");return{isHorizontal:a,isVertical:i,affectsX:s,affectsY:r}}function Ja(n,a){return Math.max(0,a-n)}function Pa(n,a){return Math.max(0,n-a)}function pr(n,a,i){return Math.max(0,a-n,n-i)}function Bg(n,a){return n?!a:a}function s_(n,a,i,s,r,c,u,h){let{affectsX:g,affectsY:p}=a;const{isHorizontal:x,isVertical:y}=a,v=x&&y,{xSnapped:S,ySnapped:b}=i,{minWidth:E,maxWidth:_,minHeight:T,maxHeight:z}=s,{x:N,y:C,width:D,height:R,aspectRatio:j}=n;let K=Math.floor(x?S-n.pointerX:0),J=Math.floor(y?b-n.pointerY:0);const fe=D+(g?-K:K),U=R+(p?-J:J),F=-c[0]*D,ae=-c[1]*R;let H=pr(fe,E,_),I=pr(U,T,z);if(u){let $=0,Z=0;g&&K<0?$=Ja(N+K+F,u[0][0]):!g&&K>0&&($=Pa(N+fe+F,u[1][0])),p&&J<0?Z=Ja(C+J+ae,u[0][1]):!p&&J>0&&(Z=Pa(C+U+ae,u[1][1])),H=Math.max(H,$),I=Math.max(I,Z)}if(h){let $=0,Z=0;g&&K>0?$=Pa(N+K,h[0][0]):!g&&K<0&&($=Ja(N+fe,h[1][0])),p&&J>0?Z=Pa(C+J,h[0][1]):!p&&J<0&&(Z=Ja(C+U,h[1][1])),H=Math.max(H,$),I=Math.max(I,Z)}if(r){if(x){const $=pr(fe/j,T,z)*j;if(H=Math.max(H,$),u){let Z=0;!g&&!p||g&&!p&&v?Z=Pa(C+ae+fe/j,u[1][1])*j:Z=Ja(C+ae+(g?K:-K)/j,u[0][1])*j,H=Math.max(H,Z)}if(h){let Z=0;!g&&!p||g&&!p&&v?Z=Ja(C+fe/j,h[1][1])*j:Z=Pa(C+(g?K:-K)/j,h[0][1])*j,H=Math.max(H,Z)}}if(y){const $=pr(U*j,E,_)/j;if(I=Math.max(I,$),u){let Z=0;!g&&!p||p&&!g&&v?Z=Pa(N+U*j+F,u[1][0])/j:Z=Ja(N+(p?J:-J)*j+F,u[0][0])/j,I=Math.max(I,Z)}if(h){let Z=0;!g&&!p||p&&!g&&v?Z=Ja(N+U*j,h[1][0])/j:Z=Pa(N+(p?J:-J)*j,h[0][0])/j,I=Math.max(I,Z)}}}J=J+(J<0?I:-I),K=K+(K<0?H:-H),r&&(v?fe>U*j?J=(Bg(g,p)?-K:K)/j:K=(Bg(g,p)?-J:J)*j:x?(J=K/j,p=g):(K=J*j,g=p));const k=g?N+K:N,L=p?C+J:C;return{width:D+(g?-K:K),height:R+(p?-J:J),x:c[0]*K*(g?-1:1)+k,y:c[1]*J*(p?-1:1)+L}}const Ug={width:0,height:0,x:0,y:0},r_={...Ug,pointerX:0,pointerY:0,aspectRatio:1};function c_(n){return[[0,0],[n.measured.width,n.measured.height]]}function u_(n,a,i){const s=a.position.x+n.position.x,r=a.position.y+n.position.y,c=n.measured.width??0,u=n.measured.height??0,h=i[0]*c,g=i[1]*u;return[[s-h,r-g],[s+c-h,r+u-g]]}function f_({domNode:n,nodeId:a,getStoreItems:i,onChange:s,onEnd:r}){const c=bn(n);let u={controlDirection:Hg("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function h({controlPosition:p,boundaries:x,keepAspectRatio:y,resizeDirection:v,onResizeStart:S,onResize:b,onResizeEnd:E,shouldResize:_}){let T={...Ug},z={...r_};u={boundaries:x,resizeDirection:v,keepAspectRatio:y,controlDirection:Hg(p)};let N,C=null,D=[],R,j,K,J=!1;const fe=vp().on("start",U=>{const{nodeLookup:F,transform:ae,snapGrid:H,snapToGrid:I,nodeOrigin:k,paneDomNode:L}=i();if(N=F.get(a),!N)return;C=L?.getBoundingClientRect()??null;const{xSnapped:$,ySnapped:Z}=Mo(U.sourceEvent,{transform:ae,snapGrid:H,snapToGrid:I,containerBounds:C});T={width:N.measured.width??0,height:N.measured.height??0,x:N.position.x??0,y:N.position.y??0},z={...T,pointerX:$,pointerY:Z,aspectRatio:T.width/T.height},R=void 0,N.parentId&&(N.extent==="parent"||N.expandParent)&&(R=F.get(N.parentId),j=R&&N.extent==="parent"?c_(R):void 0),D=[],K=void 0;for(const[Y,A]of F)if(A.parentId===a&&(D.push({id:Y,position:{...A.position},extent:A.extent}),A.extent==="parent"||A.expandParent)){const O=u_(A,N,A.origin??k);K?K=[[Math.min(O[0][0],K[0][0]),Math.min(O[0][1],K[0][1])],[Math.max(O[1][0],K[1][0]),Math.max(O[1][1],K[1][1])]]:K=O}S?.(U,{...T})}).on("drag",U=>{const{transform:F,snapGrid:ae,snapToGrid:H,nodeOrigin:I}=i(),k=Mo(U.sourceEvent,{transform:F,snapGrid:ae,snapToGrid:H,containerBounds:C}),L=[];if(!N)return;const{x:$,y:Z,width:Y,height:A}=T,O={},G=N.origin??I,{width:P,height:se,x:ge,y:he}=s_(z,u.controlDirection,k,u.boundaries,u.keepAspectRatio,G,j,K),ue=P!==Y,me=se!==A,Ne=ge!==$&&ue,ke=he!==Z&&me;if(!Ne&&!ke&&!ue&&!me)return;if((Ne||ke||G[0]===1||G[1]===1)&&(O.x=Ne?ge:T.x,O.y=ke?he:T.y,T.x=O.x,T.y=O.y,D.length>0)){const Me=ge-$,Re=he-Z;for(const le of D)le.position={x:le.position.x-Me+G[0]*(P-Y),y:le.position.y-Re+G[1]*(se-A)},L.push(le)}if((ue||me)&&(O.width=ue&&(!u.resizeDirection||u.resizeDirection==="horizontal")?P:T.width,O.height=me&&(!u.resizeDirection||u.resizeDirection==="vertical")?se:T.height,T.width=O.width,T.height=O.height),R&&N.expandParent){const Me=G[0]*(O.width??0);O.x&&O.x<Me&&(T.x=Me,z.x=z.x-(O.x-Me));const Re=G[1]*(O.height??0);O.y&&O.y<Re&&(T.y=Re,z.y=z.y-(O.y-Re))}const Se=o_({width:T.width,prevWidth:Y,height:T.height,prevHeight:A,affectsX:u.controlDirection.affectsX,affectsY:u.controlDirection.affectsY}),_e={...T,direction:Se};_?.(U,_e)!==!1&&(J=!0,b?.(U,_e),s(O,L))}).on("end",U=>{J&&(E?.(U,{...T}),r?.({...T}),J=!1)});c.call(fe)}function g(){c.on(".drag",null)}return{update:h,destroy:g}}var Bu={exports:{}},Uu={},Vu={exports:{}},$u={};/**
|
|
50
50
|
* @license React
|
|
51
51
|
* use-sync-external-store-shim.production.js
|
|
52
52
|
*
|
|
@@ -54,7 +54,7 @@ Error generating stack: `+o.message+`
|
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the MIT license found in the
|
|
56
56
|
* LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/var Vg;function
|
|
57
|
+
*/var Vg;function d_(){if(Vg)return $u;Vg=1;var n=oo();function a(y,v){return y===v&&(y!==0||1/y===1/v)||y!==y&&v!==v}var i=typeof Object.is=="function"?Object.is:a,s=n.useState,r=n.useEffect,c=n.useLayoutEffect,u=n.useDebugValue;function h(y,v){var S=v(),b=s({inst:{value:S,getSnapshot:v}}),E=b[0].inst,_=b[1];return c(function(){E.value=S,E.getSnapshot=v,g(E)&&_({inst:E})},[y,S,v]),r(function(){return g(E)&&_({inst:E}),y(function(){g(E)&&_({inst:E})})},[y]),u(S),S}function g(y){var v=y.getSnapshot;y=y.value;try{var S=v();return!i(y,S)}catch{return!0}}function p(y,v){return v()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:h;return $u.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:x,$u}var $g;function h_(){return $g||($g=1,Vu.exports=d_()),Vu.exports}/**
|
|
58
58
|
* @license React
|
|
59
59
|
* use-sync-external-store-shim/with-selector.production.js
|
|
60
60
|
*
|
|
@@ -62,78 +62,78 @@ Error generating stack: `+o.message+`
|
|
|
62
62
|
*
|
|
63
63
|
* This source code is licensed under the MIT license found in the
|
|
64
64
|
* LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/var Yg;function
|
|
65
|
+
*/var Yg;function p_(){if(Yg)return Uu;Yg=1;var n=oo(),a=h_();function i(p,x){return p===x&&(p!==0||1/p===1/x)||p!==p&&x!==x}var s=typeof Object.is=="function"?Object.is:i,r=a.useSyncExternalStore,c=n.useRef,u=n.useEffect,h=n.useMemo,g=n.useDebugValue;return Uu.useSyncExternalStoreWithSelector=function(p,x,y,v,S){var b=c(null);if(b.current===null){var E={hasValue:!1,value:null};b.current=E}else E=b.current;b=h(function(){function T(R){if(!z){if(z=!0,N=R,R=v(R),S!==void 0&&E.hasValue){var j=E.value;if(S(j,R))return C=j}return C=R}if(j=C,s(N,R))return j;var K=v(R);return S!==void 0&&S(j,K)?(N=R,j):(N=R,C=K)}var z=!1,N,C,D=y===void 0?null:y;return[function(){return T(x())},D===null?void 0:function(){return T(D())}]},[x,y,v,S]);var _=r(p,b[0],b[1]);return u(function(){E.hasValue=!0,E.value=_},[_]),g(_),_},Uu}var qg;function g_(){return qg||(qg=1,Bu.exports=p_()),Bu.exports}var m_=g_();const Xg=ii(m_),y_={},Gg=n=>{let a;const i=new Set,s=(x,y)=>{const v=typeof x=="function"?x(a):x;if(!Object.is(v,a)){const S=a;a=y??(typeof v!="object"||v===null)?v:Object.assign({},a,v),i.forEach(b=>b(a,S))}},r=()=>a,g={setState:s,getState:r,getInitialState:()=>p,subscribe:x=>(i.add(x),()=>i.delete(x)),destroy:()=>{(y_?"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()}},p=a=n(s,r,g);return g},x_=n=>n?Gg(n):Gg,{useDebugValue:v_}=Ka,{useSyncExternalStoreWithSelector:b_}=Xg,S_=n=>n;function Zg(n,a=S_,i){const s=b_(n.subscribe,n.getState,n.getServerState||n.getInitialState,a,i);return v_(s),s}const Ig=(n,a)=>{const i=x_(n),s=(r,c=a)=>Zg(i,r,c);return Object.assign(s,i),s},w_=(n,a)=>n?Ig(n,a):Ig;function ut(n,a){if(Object.is(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;if(n instanceof Map&&a instanceof Map){if(n.size!==a.size)return!1;for(const[s,r]of n)if(!Object.is(r,a.get(s)))return!1;return!0}if(n instanceof Set&&a instanceof Set){if(n.size!==a.size)return!1;for(const s of n)if(!a.has(s))return!1;return!0}const i=Object.keys(n);if(i.length!==Object.keys(a).length)return!1;for(const s of i)if(!Object.prototype.hasOwnProperty.call(a,s)||!Object.is(n[s],a[s]))return!1;return!0}var Do=Fh();const gr=B.createContext(null),E_=gr.Provider,Qg=ua.error001();function $e(n,a){const i=B.useContext(gr);if(i===null)throw new Error(Qg);return Zg(i,n,a)}function ft(){const n=B.useContext(gr);if(n===null)throw new Error(Qg);return B.useMemo(()=>({getState:n.getState,setState:n.setState,subscribe:n.subscribe}),[n])}const Kg={display:"none"},__={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Fg="react-flow__node-desc",Jg="react-flow__edge-desc",A_="react-flow__aria-live",N_=n=>n.ariaLiveMessage,k_=n=>n.ariaLabelConfig;function T_({rfId:n}){const a=$e(N_);return m.jsx("div",{id:`${A_}-${n}`,"aria-live":"assertive","aria-atomic":"true",style:__,children:a})}function C_({rfId:n,disableKeyboardA11y:a}){const i=$e(k_);return m.jsxs(m.Fragment,{children:[m.jsx("div",{id:`${Fg}-${n}`,style:Kg,children:a?i["node.a11yDescription.default"]:i["node.a11yDescription.keyboardDisabled"]}),m.jsx("div",{id:`${Jg}-${n}`,style:Kg,children:i["edge.a11yDescription.default"]}),!a&&m.jsx(T_,{rfId:n})]})}const fa=B.forwardRef(({position:n="top-left",children:a,className:i,style:s,...r},c)=>{const u=`${n}`.split("-");return m.jsx("div",{className:Tt(["react-flow__panel",i,...u]),style:s,ref:c,...r,children:a})});fa.displayName="Panel";function M_({proOptions:n,position:a="bottom-right"}){return n?.hideAttribution?null:m.jsx(fa,{position:a,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:m.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const z_=n=>{const a=[],i=[];for(const[,s]of n.nodeLookup)s.selected&&a.push(s.internals.userNode);for(const[,s]of n.edgeLookup)s.selected&&i.push(s);return{selectedNodes:a,selectedEdges:i}},mr=n=>n.id;function D_(n,a){return ut(n.selectedNodes.map(mr),a.selectedNodes.map(mr))&&ut(n.selectedEdges.map(mr),a.selectedEdges.map(mr))}function O_({onSelectionChange:n}){const a=ft(),{selectedNodes:i,selectedEdges:s}=$e(z_,D_);return B.useEffect(()=>{const r={nodes:i,edges:s};n?.(r),a.getState().onSelectionChangeHandlers.forEach(c=>c(r))},[i,s,n]),null}const R_=n=>!!n.onSelectionChangeHandlers;function j_({onSelectionChange:n}){const a=$e(R_);return n||a?m.jsx(O_,{onSelectionChange:n}):null}const Pg=[0,0],L_={x:0,y:0,zoom:1},Wg=[...["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"],"rfId"],H_=n=>({setNodes:n.setNodes,setEdges:n.setEdges,setMinZoom:n.setMinZoom,setMaxZoom:n.setMaxZoom,setTranslateExtent:n.setTranslateExtent,setNodeExtent:n.setNodeExtent,reset:n.reset,setDefaultNodesAndEdges:n.setDefaultNodesAndEdges}),em={translateExtent:wo,nodeOrigin:Pg,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function B_(n){const{setNodes:a,setEdges:i,setMinZoom:s,setMaxZoom:r,setTranslateExtent:c,setNodeExtent:u,reset:h,setDefaultNodesAndEdges:g}=$e(H_,ut),p=ft();B.useEffect(()=>(g(n.defaultNodes,n.defaultEdges),()=>{x.current=em,h()}),[]);const x=B.useRef(em);return B.useEffect(()=>{for(const y of Wg){const v=n[y],S=x.current[y];v!==S&&(typeof n[y]>"u"||(y==="nodes"?a(v):y==="edges"?i(v):y==="minZoom"?s(v):y==="maxZoom"?r(v):y==="translateExtent"?c(v):y==="nodeExtent"?u(v):y==="ariaLabelConfig"?p.setState({ariaLabelConfig:wE(v)}):y==="fitView"?p.setState({fitViewQueued:v}):y==="fitViewOptions"?p.setState({fitViewOptions:v}):p.setState({[y]:v})))}x.current=n},Wg.map(y=>n[y])),null}function tm(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function U_(n){const[a,i]=B.useState(n==="system"?null:n);return B.useEffect(()=>{if(n!=="system"){i(n);return}const s=tm(),r=()=>i(s?.matches?"dark":"light");return r(),s?.addEventListener("change",r),()=>{s?.removeEventListener("change",r)}},[n]),a!==null?a:tm()?.matches?"dark":"light"}const nm=typeof document<"u"?document:null;function Oo(n=null,a={target:nm,actInsideInputWithModifier:!0}){const[i,s]=B.useState(!1),r=B.useRef(!1),c=B.useRef(new Set([])),[u,h]=B.useMemo(()=>{if(n!==null){const p=(Array.isArray(n)?n:[n]).filter(y=>typeof y=="string").map(y=>y.replace("+",`
|
|
66
66
|
`).replace(`
|
|
67
67
|
|
|
68
68
|
`,`
|
|
69
69
|
+`).split(`
|
|
70
|
-
`)),x=p.reduce((y,v)=>y.concat(...v),[]);return[p,x]}return[[],[]]},[n]);return B.useEffect(()=>{const g=a?.target??nm,p=a?.actInsideInputWithModifier??!0;if(n!==null){const x=S=>{if(r.current=S.ctrlKey||S.metaKey||S.shiftKey||S.altKey,(!r.current||r.current&&!p)&&dg(S))return!1;const E=lm(S.code,h);if(c.current.add(S[E]),am(u,c.current,!1)){const _=S.composedPath?.()?.[0]||S.target,T=_?.nodeName==="BUTTON"||_?.nodeName==="A";a.preventDefault!==!1&&(r.current||!T)&&S.preventDefault(),s(!0)}},y=S=>{const b=lm(S.code,h);am(u,c.current,!0)?(s(!1),c.current.clear()):c.current.delete(S[b]),S.key==="Meta"&&c.current.clear(),r.current=!1},v=()=>{c.current.clear(),s(!1)};return g?.addEventListener("keydown",x),g?.addEventListener("keyup",y),window.addEventListener("blur",v),window.addEventListener("contextmenu",v),()=>{g?.removeEventListener("keydown",x),g?.removeEventListener("keyup",y),window.removeEventListener("blur",v),window.removeEventListener("contextmenu",v)}}},[n,s]),i}function am(n,a,i){return n.filter(s=>i||s.length===a.size).some(s=>s.every(r=>a.has(r)))}function lm(n,a){return a.includes(n)?"code":"key"}const U_=()=>{const n=ft();return B.useMemo(()=>({zoomIn:a=>{const{panZoom:i}=n.getState();return i?i.scaleBy(1.2,{duration:a?.duration}):Promise.resolve(!1)},zoomOut:a=>{const{panZoom:i}=n.getState();return i?i.scaleBy(1/1.2,{duration:a?.duration}):Promise.resolve(!1)},zoomTo:(a,i)=>{const{panZoom:s}=n.getState();return s?s.scaleTo(a,{duration:i?.duration}):Promise.resolve(!1)},getZoom:()=>n.getState().transform[2],setViewport:async(a,i)=>{const{transform:[s,r,c],panZoom:u}=n.getState();return u?(await u.setViewport({x:a.x??s,y:a.y??r,zoom:a.zoom??c},i),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[a,i,s]=n.getState().transform;return{x:a,y:i,zoom:s}},setCenter:async(a,i,s)=>n.getState().setCenter(a,i,s),fitBounds:async(a,i)=>{const{width:s,height:r,minZoom:c,maxZoom:u,panZoom:h}=n.getState(),g=_u(a,s,r,c,u,i?.padding??.1);return h?(await h.setViewport(g,{duration:i?.duration,ease:i?.ease,interpolate:i?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(a,i={})=>{const{transform:s,snapGrid:r,snapToGrid:c,domNode:u}=n.getState();if(!u)return a;const{x:h,y:g}=u.getBoundingClientRect(),p={x:a.x-h,y:a.y-g},x=i.snapGrid??r,y=i.snapToGrid??c;return To(p,s,y,x)},flowToScreenPosition:a=>{const{transform:i,domNode:s}=n.getState();if(!s)return a;const{x:r,y:c}=s.getBoundingClientRect(),u=fr(a,i);return{x:u.x+r,y:u.y+c}}}),[])};function im(n,a){const i=[],s=new Map,r=[];for(const c of n)if(c.type==="add"){r.push(c);continue}else if(c.type==="remove"||c.type==="replace")s.set(c.id,[c]);else{const u=s.get(c.id);u?u.push(c):s.set(c.id,[c])}for(const c of a){const u=s.get(c.id);if(!u){i.push(c);continue}if(u[0].type==="remove")continue;if(u[0].type==="replace"){i.push({...u[0].item});continue}const h={...c};for(const g of u)V_(g,h);i.push(h)}return r.length&&r.forEach(c=>{c.index!==void 0?i.splice(c.index,0,{...c.item}):i.push({...c.item})}),i}function V_(n,a){switch(n.type){case"select":{a.selected=n.selected;break}case"position":{typeof n.position<"u"&&(a.position=n.position),typeof n.dragging<"u"&&(a.dragging=n.dragging);break}case"dimensions":{typeof n.dimensions<"u"&&(a.measured??={},a.measured.width=n.dimensions.width,a.measured.height=n.dimensions.height,n.setAttributes&&((n.setAttributes===!0||n.setAttributes==="width")&&(a.width=n.dimensions.width),(n.setAttributes===!0||n.setAttributes==="height")&&(a.height=n.dimensions.height))),typeof n.resizing=="boolean"&&(a.resizing=n.resizing);break}}}function Yu(n,a){return im(n,a)}function om(n,a){return im(n,a)}function jl(n,a){return{id:n,type:"select",selected:a}}function mi(n,a=new Set,i=!1){const s=[];for(const[r,c]of n){const u=a.has(r);!(c.selected===void 0&&!u)&&c.selected!==u&&(i&&(c.selected=u),s.push(jl(c.id,u)))}return s}function sm({items:n=[],lookup:a}){const i=[],s=new Map(n.map(r=>[r.id,r]));for(const[r,c]of n.entries()){const u=a.get(c.id),h=u?.internals?.userNode??u;h!==void 0&&h!==c&&i.push({id:c.id,item:c,type:"replace"}),h===void 0&&i.push({item:c,type:"add",index:r})}for(const[r]of a)s.get(r)===void 0&&i.push({id:r,type:"remove"});return i}function rm(n){return{id:n.id,type:"remove"}}const cm=n=>fE(n),$_=n=>tg(n);function um(n){return B.forwardRef(n)}const Y_=typeof window<"u"?B.useLayoutEffect:B.useEffect;function fm(n){const[a,i]=B.useState(BigInt(0)),[s]=B.useState(()=>q_(()=>i(r=>r+BigInt(1))));return Y_(()=>{const r=s.get();r.length&&(n(r),s.reset())},[a]),s}function q_(n){let a=[];return{get:()=>a,reset:()=>{a=[]},push:i=>{a.push(i),n()}}}const dm=B.createContext(null);function X_({children:n}){const a=ft(),i=B.useCallback(h=>{const{nodes:g=[],setNodes:p,hasDefaultNodes:x,onNodesChange:y,nodeLookup:v,fitViewQueued:S}=a.getState();let b=g;for(const _ of h)b=typeof _=="function"?_(b):_;const E=sm({items:b,lookup:v});x&&p(b),E.length>0?y?.(E):S&&window.requestAnimationFrame(()=>{const{fitViewQueued:_,nodes:T,setNodes:z}=a.getState();_&&z(T)})},[]),s=fm(i),r=B.useCallback(h=>{const{edges:g=[],setEdges:p,hasDefaultEdges:x,onEdgesChange:y,edgeLookup:v}=a.getState();let S=g;for(const b of h)S=typeof b=="function"?b(S):b;x?p(S):y&&y(sm({items:S,lookup:v}))},[]),c=fm(r),u=B.useMemo(()=>({nodeQueue:s,edgeQueue:c}),[]);return m.jsx(dm.Provider,{value:u,children:n})}function G_(){const n=B.useContext(dm);if(!n)throw new Error("useBatchContext must be used within a BatchProvider");return n}const Z_=n=>!!n.panZoom;function Wa(){const n=U_(),a=ft(),i=G_(),s=$e(Z_),r=B.useMemo(()=>{const c=y=>a.getState().nodeLookup.get(y),u=y=>{i.nodeQueue.push(y)},h=y=>{i.edgeQueue.push(y)},g=y=>{const{nodeLookup:v,nodeOrigin:S}=a.getState(),b=cm(y)?y:v.get(y.id),E=b.parentId?cg(b.position,b.measured,b.parentId,v,S):b.position,_={...b,position:E,width:b.measured?.width??b.width,height:b.measured?.height??b.height};return di(_)},p=(y,v,S={replace:!1})=>{u(b=>b.map(E=>{if(E.id===y){const _=typeof v=="function"?v(E):v;return S.replace&&cm(_)?_:{...E,..._}}return E}))},x=(y,v,S={replace:!1})=>{h(b=>b.map(E=>{if(E.id===y){const _=typeof v=="function"?v(E):v;return S.replace&&$_(_)?_:{...E,..._}}return E}))};return{getNodes:()=>a.getState().nodes.map(y=>({...y})),getNode:y=>c(y)?.internals.userNode,getInternalNode:c,getEdges:()=>{const{edges:y=[]}=a.getState();return y.map(v=>({...v}))},getEdge:y=>a.getState().edgeLookup.get(y),setNodes:u,setEdges:h,addNodes:y=>{const v=Array.isArray(y)?y:[y];i.nodeQueue.push(S=>[...S,...v])},addEdges:y=>{const v=Array.isArray(y)?y:[y];i.edgeQueue.push(S=>[...S,...v])},toObject:()=>{const{nodes:y=[],edges:v=[],transform:S}=a.getState(),[b,E,_]=S;return{nodes:y.map(T=>({...T})),edges:v.map(T=>({...T})),viewport:{x:b,y:E,zoom:_}}},deleteElements:async({nodes:y=[],edges:v=[]})=>{const{nodes:S,edges:b,onNodesDelete:E,onEdgesDelete:_,triggerNodeChanges:T,triggerEdgeChanges:z,onDelete:N,onBeforeDelete:C}=a.getState(),{nodes:D,edges:R}=await mE({nodesToRemove:y,edgesToRemove:v,nodes:S,edges:b,onBeforeDelete:C}),j=R.length>0,K=D.length>0;if(j){const J=R.map(rm);_?.(R),z(J)}if(K){const J=D.map(rm);E?.(D),T(J)}return(K||j)&&N?.({nodes:D,edges:R}),{deletedNodes:D,deletedEdges:R}},getIntersectingNodes:(y,v=!0,S)=>{const b=sg(y),E=b?y:g(y),_=S!==void 0;return E?(S||a.getState().nodes).filter(T=>{const z=a.getState().nodeLookup.get(T.id);if(z&&!b&&(T.id===y.id||!z.internals.positionAbsolute))return!1;const N=di(_?T:z),C=No(N,E);return v&&C>0||C>=N.width*N.height||C>=E.width*E.height}):[]},isNodeIntersecting:(y,v,S=!0)=>{const E=sg(y)?y:g(y);if(!E)return!1;const _=No(E,v);return S&&_>0||_>=v.width*v.height||_>=E.width*E.height},updateNode:p,updateNodeData:(y,v,S={replace:!1})=>{p(y,b=>{const E=typeof v=="function"?v(b):v;return S.replace?{...b,data:E}:{...b,data:{...b.data,...E}}},S)},updateEdge:x,updateEdgeData:(y,v,S={replace:!1})=>{x(y,b=>{const E=typeof v=="function"?v(b):v;return S.replace?{...b,data:E}:{...b,data:{...b.data,...E}}},S)},getNodesBounds:y=>{const{nodeLookup:v,nodeOrigin:S}=a.getState();return dE(y,{nodeLookup:v,nodeOrigin:S})},getHandleConnections:({type:y,id:v,nodeId:S})=>Array.from(a.getState().connectionLookup.get(`${S}-${y}${v?`-${v}`:""}`)?.values()??[]),getNodeConnections:({type:y,handleId:v,nodeId:S})=>Array.from(a.getState().connectionLookup.get(`${S}${y?v?`-${y}-${v}`:`-${y}`:""}`)?.values()??[]),fitView:async y=>{const v=a.getState().fitViewResolver??bE();return a.setState({fitViewQueued:!0,fitViewOptions:y,fitViewResolver:v}),i.nodeQueue.push(S=>[...S]),v.promise}}},[]);return B.useMemo(()=>({...r,...n,viewportInitialized:s}),[s])}const hm=n=>n.selected,I_=typeof window<"u"?window:void 0;function Q_({deleteKeyCode:n,multiSelectionKeyCode:a}){const i=ft(),{deleteElements:s}=Wa(),r=Oo(n,{actInsideInputWithModifier:!1}),c=Oo(a,{target:I_});B.useEffect(()=>{if(r){const{edges:u,nodes:h}=i.getState();s({nodes:h.filter(hm),edges:u.filter(hm)}),i.setState({nodesSelectionActive:!1})}},[r]),B.useEffect(()=>{i.setState({multiSelectionActive:c})},[c])}function K_(n){const a=ft();B.useEffect(()=>{const i=()=>{if(!n.current||!(n.current.checkVisibility?.()??!0))return!1;const s=Au(n.current);(s.height===0||s.width===0)&&a.getState().onError?.("004",ua.error004()),a.setState({width:s.width||500,height:s.height||500})};if(n.current){i(),window.addEventListener("resize",i);const s=new ResizeObserver(()=>i());return s.observe(n.current),()=>{window.removeEventListener("resize",i),s&&n.current&&s.unobserve(n.current)}}},[])}const yr={position:"absolute",width:"100%",height:"100%",top:0,left:0},F_=n=>({userSelectionActive:n.userSelectionActive,lib:n.lib,connectionInProgress:n.connection.inProgress});function J_({onPaneContextMenu:n,zoomOnScroll:a=!0,zoomOnPinch:i=!0,panOnScroll:s=!1,panOnScrollSpeed:r=.5,panOnScrollMode:c=Dl.Free,zoomOnDoubleClick:u=!0,panOnDrag:h=!0,defaultViewport:g,translateExtent:p,minZoom:x,maxZoom:y,zoomActivationKeyCode:v,preventScrolling:S=!0,children:b,noWheelClassName:E,noPanClassName:_,onViewportChange:T,isControlledViewport:z,paneClickDistance:N,selectionOnDrag:C}){const D=ft(),R=B.useRef(null),{userSelectionActive:j,lib:K,connectionInProgress:J}=$e(F_,ut),fe=Oo(v),U=B.useRef();K_(R);const F=B.useCallback(ae=>{T?.({x:ae[0],y:ae[1],zoom:ae[2]}),z||D.setState({transform:ae})},[T,z]);return B.useEffect(()=>{if(R.current){U.current=n_({domNode:R.current,minZoom:x,maxZoom:y,translateExtent:p,viewport:g,onDraggingChange:k=>D.setState({paneDragging:k}),onPanZoomStart:(k,L)=>{const{onViewportChangeStart:$,onMoveStart:Z}=D.getState();Z?.(k,L),$?.(L)},onPanZoom:(k,L)=>{const{onViewportChange:$,onMove:Z}=D.getState();Z?.(k,L),$?.(L)},onPanZoomEnd:(k,L)=>{const{onViewportChangeEnd:$,onMoveEnd:Z}=D.getState();Z?.(k,L),$?.(L)}});const{x:ae,y:H,zoom:I}=U.current.getViewport();return D.setState({panZoom:U.current,transform:[ae,H,I],domNode:R.current.closest(".react-flow")}),()=>{U.current?.destroy()}}},[]),B.useEffect(()=>{U.current?.update({onPaneContextMenu:n,zoomOnScroll:a,zoomOnPinch:i,panOnScroll:s,panOnScrollSpeed:r,panOnScrollMode:c,zoomOnDoubleClick:u,panOnDrag:h,zoomActivationKeyPressed:fe,preventScrolling:S,noPanClassName:_,userSelectionActive:j,noWheelClassName:E,lib:K,onTransformChange:F,connectionInProgress:J,selectionOnDrag:C,paneClickDistance:N})},[n,a,i,s,r,c,u,h,fe,S,_,j,E,K,F,J,C,N]),m.jsx("div",{className:"react-flow__renderer",ref:R,style:yr,children:b})}const P_=n=>({userSelectionActive:n.userSelectionActive,userSelectionRect:n.userSelectionRect});function W_(){const{userSelectionActive:n,userSelectionRect:a}=$e(P_,ut);return n&&a?m.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:a.width,height:a.height,transform:`translate(${a.x}px, ${a.y}px)`}}):null}const qu=(n,a)=>i=>{i.target===a.current&&n?.(i)},eA=n=>({userSelectionActive:n.userSelectionActive,elementsSelectable:n.elementsSelectable,connectionInProgress:n.connection.inProgress,dragging:n.paneDragging});function tA({isSelecting:n,selectionKeyPressed:a,selectionMode:i=Eo.Full,panOnDrag:s,paneClickDistance:r,selectionOnDrag:c,onSelectionStart:u,onSelectionEnd:h,onPaneClick:g,onPaneContextMenu:p,onPaneScroll:x,onPaneMouseEnter:y,onPaneMouseMove:v,onPaneMouseLeave:S,children:b}){const E=ft(),{userSelectionActive:_,elementsSelectable:T,dragging:z,connectionInProgress:N}=$e(eA,ut),C=T&&(n||_),D=B.useRef(null),R=B.useRef(),j=B.useRef(new Set),K=B.useRef(new Set),J=B.useRef(!1),fe=$=>{if(J.current||N){J.current=!1;return}g?.($),E.getState().resetSelectedElements(),E.setState({nodesSelectionActive:!1})},U=$=>{if(Array.isArray(s)&&s?.includes(2)){$.preventDefault();return}p?.($)},F=x?$=>x($):void 0,ae=$=>{J.current&&($.stopPropagation(),J.current=!1)},H=$=>{const{domNode:Z}=E.getState();if(R.current=Z?.getBoundingClientRect(),!R.current)return;const Y=$.target===D.current;if(!Y&&!!$.target.closest(".nokey")||!n||!(c&&Y||a)||$.button!==0||!$.isPrimary)return;$.target?.setPointerCapture?.($.pointerId),J.current=!1;const{x:G,y:P}=Kn($.nativeEvent,R.current);E.setState({userSelectionRect:{width:0,height:0,startX:G,startY:P,x:G,y:P}}),Y||($.stopPropagation(),$.preventDefault())},I=$=>{const{userSelectionRect:Z,transform:Y,nodeLookup:A,edgeLookup:O,connectionLookup:G,triggerNodeChanges:P,triggerEdgeChanges:se,defaultEdgeOptions:ge,resetSelectedElements:he}=E.getState();if(!R.current||!Z)return;const{x:ue,y:me}=Kn($.nativeEvent,R.current),{startX:Ne,startY:ke}=Z;if(!J.current){const Re=a?0:r;if(Math.hypot(ue-Ne,me-ke)<=Re)return;he(),u?.($)}J.current=!0;const Se={startX:Ne,startY:ke,x:ue<Ne?ue:Ne,y:me<ke?me:ke,width:Math.abs(ue-Ne),height:Math.abs(me-ke)},_e=j.current,we=K.current;j.current=new Set(wu(A,Se,Y,i===Eo.Partial,!0).map(Re=>Re.id)),K.current=new Set;const Me=ge?.selectable??!0;for(const Re of j.current){const le=G.get(Re);if(le)for(const{edgeId:de}of le.values()){const Je=O.get(de);Je&&(Je.selectable??Me)&&K.current.add(de)}}if(!ug(_e,j.current)){const Re=mi(A,j.current,!0);P(Re)}if(!ug(we,K.current)){const Re=mi(O,K.current);se(Re)}E.setState({userSelectionRect:Se,userSelectionActive:!0,nodesSelectionActive:!1})},k=$=>{$.button===0&&($.target?.releasePointerCapture?.($.pointerId),!_&&$.target===D.current&&E.getState().userSelectionRect&&fe?.($),E.setState({userSelectionActive:!1,userSelectionRect:null}),J.current&&(h?.($),E.setState({nodesSelectionActive:j.current.size>0})))},L=s===!0||Array.isArray(s)&&s.includes(0);return m.jsxs("div",{className:Tt(["react-flow__pane",{draggable:L,dragging:z,selection:n}]),onClick:C?void 0:qu(fe,D),onContextMenu:qu(U,D),onWheel:qu(F,D),onPointerEnter:C?void 0:y,onPointerMove:C?I:v,onPointerUp:C?k:void 0,onPointerDownCapture:C?H:void 0,onClickCapture:C?ae:void 0,onPointerLeave:S,ref:D,style:yr,children:[b,m.jsx(W_,{})]})}function Xu({id:n,store:a,unselect:i=!1,nodeRef:s}){const{addSelectedNodes:r,unselectNodesAndEdges:c,multiSelectionActive:u,nodeLookup:h,onError:g}=a.getState(),p=h.get(n);if(!p){g?.("012",ua.error012(n));return}a.setState({nodesSelectionActive:!1}),p.selected?(i||p.selected&&u)&&(c({nodes:[p],edges:[]}),requestAnimationFrame(()=>s?.current?.blur())):r([n])}function pm({nodeRef:n,disabled:a=!1,noDragClassName:i,handleSelector:s,nodeId:r,isSelectable:c,nodeClickDistance:u}){const h=ft(),[g,p]=B.useState(!1),x=B.useRef();return B.useEffect(()=>{x.current=YE({getStoreItems:()=>h.getState(),onNodeMouseDown:y=>{Xu({id:y,store:h,nodeRef:n})},onDragStart:()=>{p(!0)},onDragStop:()=>{p(!1)}})},[]),B.useEffect(()=>{if(a)x.current?.destroy();else if(n.current)return x.current?.update({noDragClassName:i,handleSelector:s,domNode:n.current,isSelectable:c,nodeId:r,nodeClickDistance:u}),()=>{x.current?.destroy()}},[i,s,a,c,n,r]),g}const nA=n=>a=>a.selected&&(a.draggable||n&&typeof a.draggable>"u");function gm(){const n=ft();return B.useCallback(i=>{const{nodeExtent:s,snapToGrid:r,snapGrid:c,nodesDraggable:u,onError:h,updateNodePositions:g,nodeLookup:p,nodeOrigin:x}=n.getState(),y=new Map,v=nA(u),S=r?c[0]:5,b=r?c[1]:5,E=i.direction.x*S*i.factor,_=i.direction.y*b*i.factor;for(const[,T]of p){if(!v(T))continue;let z={x:T.internals.positionAbsolute.x+E,y:T.internals.positionAbsolute.y+_};r&&(z=ko(z,c));const{position:N,positionAbsolute:C}=ng({nodeId:T.id,nextPosition:z,nodeLookup:p,nodeExtent:s,nodeOrigin:x,onError:h});T.position=N,T.internals.positionAbsolute=C,y.set(T.id,T)}g(y)},[])}const Gu=B.createContext(null),aA=Gu.Provider;Gu.Consumer;const mm=()=>B.useContext(Gu),lA=n=>({connectOnClick:n.connectOnClick,noPanClassName:n.noPanClassName,rfId:n.rfId}),iA=(n,a,i)=>s=>{const{connectionClickStartHandle:r,connectionMode:c,connection:u}=s,{fromHandle:h,toHandle:g,isValid:p}=u,x=g?.nodeId===n&&g?.id===a&&g?.type===i;return{connectingFrom:h?.nodeId===n&&h?.id===a&&h?.type===i,connectingTo:x,clickConnecting:r?.nodeId===n&&r?.id===a&&r?.type===i,isPossibleEndHandle:c===ui.Strict?h?.type!==i:n!==h?.nodeId||a!==h?.id,connectionInProcess:!!h,clickConnectionInProcess:!!r,valid:x&&p}};function oA({type:n="source",position:a=be.Top,isValidConnection:i,isConnectable:s=!0,isConnectableStart:r=!0,isConnectableEnd:c=!0,id:u,onConnect:h,children:g,className:p,onMouseDown:x,onTouchStart:y,...v},S){const b=u||null,E=n==="target",_=ft(),T=mm(),{connectOnClick:z,noPanClassName:N,rfId:C}=$e(lA,ut),{connectingFrom:D,connectingTo:R,clickConnecting:j,isPossibleEndHandle:K,connectionInProcess:J,clickConnectionInProcess:fe,valid:U}=$e(iA(T,b,n),ut);T||_.getState().onError?.("010",ua.error010());const F=I=>{const{defaultEdgeOptions:k,onConnect:L,hasDefaultEdges:$}=_.getState(),Z={...k,...I};if($){const{edges:Y,setEdges:A}=_.getState();A(xg(Z,Y))}L?.(Z),h?.(Z)},ae=I=>{if(!T)return;const k=hg(I.nativeEvent);if(r&&(k&&I.button===0||!k)){const L=_.getState();ju.onPointerDown(I.nativeEvent,{handleDomNode:I.currentTarget,autoPanOnConnect:L.autoPanOnConnect,connectionMode:L.connectionMode,connectionRadius:L.connectionRadius,domNode:L.domNode,nodeLookup:L.nodeLookup,lib:L.lib,isTarget:E,handleId:b,nodeId:T,flowId:L.rfId,panBy:L.panBy,cancelConnection:L.cancelConnection,onConnectStart:L.onConnectStart,onConnectEnd:L.onConnectEnd,updateConnection:L.updateConnection,onConnect:F,isValidConnection:i||L.isValidConnection,getTransform:()=>_.getState().transform,getFromHandle:()=>_.getState().connection.fromHandle,autoPanSpeed:L.autoPanSpeed,dragThreshold:L.connectionDragThreshold})}k?x?.(I):y?.(I)},H=I=>{const{onClickConnectStart:k,onClickConnectEnd:L,connectionClickStartHandle:$,connectionMode:Z,isValidConnection:Y,lib:A,rfId:O,nodeLookup:G,connection:P}=_.getState();if(!T||!$&&!r)return;if(!$){k?.(I.nativeEvent,{nodeId:T,handleId:b,handleType:n}),_.setState({connectionClickStartHandle:{nodeId:T,type:n,id:b}});return}const se=fg(I.target),ge=i||Y,{connection:he,isValid:ue}=ju.isValid(I.nativeEvent,{handle:{nodeId:T,id:b,type:n},connectionMode:Z,fromNodeId:$.nodeId,fromHandleId:$.id||null,fromType:$.type,isValidConnection:ge,flowId:O,doc:se,lib:A,nodeLookup:G});ue&&he&&F(he);const me=structuredClone(P);delete me.inProgress,me.toPosition=me.toHandle?me.toHandle.position:null,L?.(I,me),_.setState({connectionClickStartHandle:null})};return m.jsx("div",{"data-handleid":b,"data-nodeid":T,"data-handlepos":a,"data-id":`${C}-${T}-${b}-${n}`,className:Tt(["react-flow__handle",`react-flow__handle-${a}`,"nodrag",N,p,{source:!E,target:E,connectable:s,connectablestart:r,connectableend:c,clickconnecting:j,connectingfrom:D,connectingto:R,valid:U,connectionindicator:s&&(!J||K)&&(J||fe?c:r)}]),onMouseDown:ae,onTouchStart:ae,onClick:z?H:void 0,ref:S,...v,children:g})}const el=B.memo(um(oA));function sA({data:n,isConnectable:a,sourcePosition:i=be.Bottom}){return m.jsxs(m.Fragment,{children:[n?.label,m.jsx(el,{type:"source",position:i,isConnectable:a})]})}function rA({data:n,isConnectable:a,targetPosition:i=be.Top,sourcePosition:s=be.Bottom}){return m.jsxs(m.Fragment,{children:[m.jsx(el,{type:"target",position:i,isConnectable:a}),n?.label,m.jsx(el,{type:"source",position:s,isConnectable:a})]})}function cA(){return null}function uA({data:n,isConnectable:a,targetPosition:i=be.Top}){return m.jsxs(m.Fragment,{children:[m.jsx(el,{type:"target",position:i,isConnectable:a}),n?.label]})}const xr={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},ym={input:sA,default:rA,output:uA,group:cA};function fA(n){return n.internals.handleBounds===void 0?{width:n.width??n.initialWidth??n.style?.width,height:n.height??n.initialHeight??n.style?.height}:{width:n.width??n.style?.width,height:n.height??n.style?.height}}const dA=n=>{const{width:a,height:i,x:s,y:r}=Ao(n.nodeLookup,{filter:c=>!!c.selected});return{width:Qn(a)?a:null,height:Qn(i)?i:null,userSelectionActive:n.userSelectionActive,transformString:`translate(${n.transform[0]}px,${n.transform[1]}px) scale(${n.transform[2]}) translate(${s}px,${r}px)`}};function hA({onSelectionContextMenu:n,noPanClassName:a,disableKeyboardA11y:i}){const s=ft(),{width:r,height:c,transformString:u,userSelectionActive:h}=$e(dA,ut),g=gm(),p=B.useRef(null);if(B.useEffect(()=>{i||p.current?.focus({preventScroll:!0})},[i]),pm({nodeRef:p}),h||!r||!c)return null;const x=n?v=>{const S=s.getState().nodes.filter(b=>b.selected);n(v,S)}:void 0,y=v=>{Object.prototype.hasOwnProperty.call(xr,v.key)&&(v.preventDefault(),g({direction:xr[v.key],factor:v.shiftKey?4:1}))};return m.jsx("div",{className:Tt(["react-flow__nodesselection","react-flow__container",a]),style:{transform:u},children:m.jsx("div",{ref:p,className:"react-flow__nodesselection-rect",onContextMenu:x,tabIndex:i?void 0:-1,onKeyDown:i?void 0:y,style:{width:r,height:c}})})}const xm=typeof window<"u"?window:void 0,pA=n=>({nodesSelectionActive:n.nodesSelectionActive,userSelectionActive:n.userSelectionActive});function vm({children:n,onPaneClick:a,onPaneMouseEnter:i,onPaneMouseMove:s,onPaneMouseLeave:r,onPaneContextMenu:c,onPaneScroll:u,paneClickDistance:h,deleteKeyCode:g,selectionKeyCode:p,selectionOnDrag:x,selectionMode:y,onSelectionStart:v,onSelectionEnd:S,multiSelectionKeyCode:b,panActivationKeyCode:E,zoomActivationKeyCode:_,elementsSelectable:T,zoomOnScroll:z,zoomOnPinch:N,panOnScroll:C,panOnScrollSpeed:D,panOnScrollMode:R,zoomOnDoubleClick:j,panOnDrag:K,defaultViewport:J,translateExtent:fe,minZoom:U,maxZoom:F,preventScrolling:ae,onSelectionContextMenu:H,noWheelClassName:I,noPanClassName:k,disableKeyboardA11y:L,onViewportChange:$,isControlledViewport:Z}){const{nodesSelectionActive:Y,userSelectionActive:A}=$e(pA),O=Oo(p,{target:xm}),G=Oo(E,{target:xm}),P=G||K,se=G||C,ge=x&&P!==!0,he=O||A||ge;return Q_({deleteKeyCode:g,multiSelectionKeyCode:b}),m.jsx(J_,{onPaneContextMenu:c,elementsSelectable:T,zoomOnScroll:z,zoomOnPinch:N,panOnScroll:se,panOnScrollSpeed:D,panOnScrollMode:R,zoomOnDoubleClick:j,panOnDrag:!O&&P,defaultViewport:J,translateExtent:fe,minZoom:U,maxZoom:F,zoomActivationKeyCode:_,preventScrolling:ae,noWheelClassName:I,noPanClassName:k,onViewportChange:$,isControlledViewport:Z,paneClickDistance:h,selectionOnDrag:ge,children:m.jsxs(tA,{onSelectionStart:v,onSelectionEnd:S,onPaneClick:a,onPaneMouseEnter:i,onPaneMouseMove:s,onPaneMouseLeave:r,onPaneContextMenu:c,onPaneScroll:u,panOnDrag:P,isSelecting:!!he,selectionMode:y,selectionKeyPressed:O,paneClickDistance:h,selectionOnDrag:ge,children:[n,Y&&m.jsx(hA,{onSelectionContextMenu:H,noPanClassName:k,disableKeyboardA11y:L})]})})}vm.displayName="FlowRenderer";const gA=B.memo(vm),mA=n=>a=>n?wu(a.nodeLookup,{x:0,y:0,width:a.width,height:a.height},a.transform,!0).map(i=>i.id):Array.from(a.nodeLookup.keys());function yA(n){return $e(B.useCallback(mA(n),[n]),ut)}const xA=n=>n.updateNodeInternals;function vA(){const n=$e(xA),[a]=B.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(i=>{const s=new Map;i.forEach(r=>{const c=r.target.getAttribute("data-id");s.set(c,{id:c,nodeElement:r.target,force:!0})}),n(s)}));return B.useEffect(()=>()=>{a?.disconnect()},[a]),a}function bA({node:n,nodeType:a,hasDimensions:i,resizeObserver:s}){const r=ft(),c=B.useRef(null),u=B.useRef(null),h=B.useRef(n.sourcePosition),g=B.useRef(n.targetPosition),p=B.useRef(a),x=i&&!!n.internals.handleBounds;return B.useEffect(()=>{c.current&&!n.hidden&&(!x||u.current!==c.current)&&(u.current&&s?.unobserve(u.current),s?.observe(c.current),u.current=c.current)},[x,n.hidden]),B.useEffect(()=>()=>{u.current&&(s?.unobserve(u.current),u.current=null)},[]),B.useEffect(()=>{if(c.current){const y=p.current!==a,v=h.current!==n.sourcePosition,S=g.current!==n.targetPosition;(y||v||S)&&(p.current=a,h.current=n.sourcePosition,g.current=n.targetPosition,r.getState().updateNodeInternals(new Map([[n.id,{id:n.id,nodeElement:c.current,force:!0}]])))}},[n.id,a,n.sourcePosition,n.targetPosition]),c}function SA({id:n,onClick:a,onMouseEnter:i,onMouseMove:s,onMouseLeave:r,onContextMenu:c,onDoubleClick:u,nodesDraggable:h,elementsSelectable:g,nodesConnectable:p,nodesFocusable:x,resizeObserver:y,noDragClassName:v,noPanClassName:S,disableKeyboardA11y:b,rfId:E,nodeTypes:_,nodeClickDistance:T,onError:z}){const{node:N,internals:C,isParent:D}=$e(ue=>{const me=ue.nodeLookup.get(n),Ne=ue.parentLookup.has(n);return{node:me,internals:me.internals,isParent:Ne}},ut);let R=N.type||"default",j=_?.[R]||ym[R];j===void 0&&(z?.("003",ua.error003(R)),R="default",j=_?.default||ym.default);const K=!!(N.draggable||h&&typeof N.draggable>"u"),J=!!(N.selectable||g&&typeof N.selectable>"u"),fe=!!(N.connectable||p&&typeof N.connectable>"u"),U=!!(N.focusable||x&&typeof N.focusable>"u"),F=ft(),ae=rg(N),H=bA({node:N,nodeType:R,hasDimensions:ae,resizeObserver:y}),I=pm({nodeRef:H,disabled:N.hidden||!K,noDragClassName:v,handleSelector:N.dragHandle,nodeId:n,isSelectable:J,nodeClickDistance:T}),k=gm();if(N.hidden)return null;const L=_a(N),$=fA(N),Z=J||K||a||i||s||r,Y=i?ue=>i(ue,{...C.userNode}):void 0,A=s?ue=>s(ue,{...C.userNode}):void 0,O=r?ue=>r(ue,{...C.userNode}):void 0,G=c?ue=>c(ue,{...C.userNode}):void 0,P=u?ue=>u(ue,{...C.userNode}):void 0,se=ue=>{const{selectNodesOnDrag:me,nodeDragThreshold:Ne}=F.getState();J&&(!me||!K||Ne>0)&&Xu({id:n,store:F,nodeRef:H}),a&&a(ue,{...C.userNode})},ge=ue=>{if(!(dg(ue.nativeEvent)||b)){if(Fp.includes(ue.key)&&J){const me=ue.key==="Escape";Xu({id:n,store:F,unselect:me,nodeRef:H})}else if(K&&N.selected&&Object.prototype.hasOwnProperty.call(xr,ue.key)){ue.preventDefault();const{ariaLabelConfig:me}=F.getState();F.setState({ariaLiveMessage:me["node.a11yDescription.ariaLiveMessage"]({direction:ue.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),k({direction:xr[ue.key],factor:ue.shiftKey?4:1})}}},he=()=>{if(b||!H.current?.matches(":focus-visible"))return;const{transform:ue,width:me,height:Ne,autoPanOnNodeFocus:ke,setCenter:Se}=F.getState();if(!ke)return;wu(new Map([[n,N]]),{x:0,y:0,width:me,height:Ne},ue,!0).length>0||Se(N.position.x+L.width/2,N.position.y+L.height/2,{zoom:ue[2]})};return m.jsx("div",{className:Tt(["react-flow__node",`react-flow__node-${R}`,{[S]:K},N.className,{selected:N.selected,selectable:J,parent:D,draggable:K,dragging:I}]),ref:H,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:Z?"all":"none",visibility:ae?"visible":"hidden",...N.style,...$},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:Y,onMouseMove:A,onMouseLeave:O,onContextMenu:G,onClick:se,onDoubleClick:P,onKeyDown:U?ge:void 0,tabIndex:U?0:void 0,onFocus:U?he:void 0,role:N.ariaRole??(U?"group":void 0),"aria-roledescription":"node","aria-describedby":b?void 0:`${Fg}-${E}`,"aria-label":N.ariaLabel,...N.domAttributes,children:m.jsx(aA,{value:n,children:m.jsx(j,{id:n,data:N.data,type:R,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:N.selected??!1,selectable:J,draggable:K,deletable:N.deletable??!0,isConnectable:fe,sourcePosition:N.sourcePosition,targetPosition:N.targetPosition,dragging:I,dragHandle:N.dragHandle,zIndex:C.z,parentId:N.parentId,...L})})})}var wA=B.memo(SA);const EA=n=>({nodesDraggable:n.nodesDraggable,nodesConnectable:n.nodesConnectable,nodesFocusable:n.nodesFocusable,elementsSelectable:n.elementsSelectable,onError:n.onError});function bm(n){const{nodesDraggable:a,nodesConnectable:i,nodesFocusable:s,elementsSelectable:r,onError:c}=$e(EA,ut),u=yA(n.onlyRenderVisibleElements),h=vA();return m.jsx("div",{className:"react-flow__nodes",style:yr,children:u.map(g=>m.jsx(wA,{id:g,nodeTypes:n.nodeTypes,nodeExtent:n.nodeExtent,onClick:n.onNodeClick,onMouseEnter:n.onNodeMouseEnter,onMouseMove:n.onNodeMouseMove,onMouseLeave:n.onNodeMouseLeave,onContextMenu:n.onNodeContextMenu,onDoubleClick:n.onNodeDoubleClick,noDragClassName:n.noDragClassName,noPanClassName:n.noPanClassName,rfId:n.rfId,disableKeyboardA11y:n.disableKeyboardA11y,resizeObserver:h,nodesDraggable:a,nodesConnectable:i,nodesFocusable:s,elementsSelectable:r,nodeClickDistance:n.nodeClickDistance,onError:c},g))})}bm.displayName="NodeRenderer";const _A=B.memo(bm);function AA(n){return $e(B.useCallback(i=>{if(!n)return i.edges.map(r=>r.id);const s=[];if(i.width&&i.height)for(const r of i.edges){const c=i.nodeLookup.get(r.source),u=i.nodeLookup.get(r.target);c&&u&&_E({sourceNode:c,targetNode:u,width:i.width,height:i.height,transform:i.transform})&&s.push(r.id)}return s},[n]),ut)}const NA=({color:n="none",strokeWidth:a=1})=>{const i={strokeWidth:a,...n&&{stroke:n}};return m.jsx("polyline",{className:"arrow",style:i,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},kA=({color:n="none",strokeWidth:a=1})=>{const i={strokeWidth:a,...n&&{stroke:n,fill:n}};return m.jsx("polyline",{className:"arrowclosed",style:i,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Sm={[sr.Arrow]:NA,[sr.ArrowClosed]:kA};function TA(n){const a=ft();return B.useMemo(()=>Object.prototype.hasOwnProperty.call(Sm,n)?Sm[n]:(a.getState().onError?.("009",ua.error009(n)),null),[n])}const CA=({id:n,type:a,color:i,width:s=12.5,height:r=12.5,markerUnits:c="strokeWidth",strokeWidth:u,orient:h="auto-start-reverse"})=>{const g=TA(a);return g?m.jsx("marker",{className:"react-flow__arrowhead",id:n,markerWidth:`${s}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:c,orient:h,refX:"0",refY:"0",children:m.jsx(g,{color:i,strokeWidth:u})}):null},wm=({defaultColor:n,rfId:a})=>{const i=$e(c=>c.edges),s=$e(c=>c.defaultEdgeOptions),r=B.useMemo(()=>zE(i,{id:a,defaultColor:n,defaultMarkerStart:s?.markerStart,defaultMarkerEnd:s?.markerEnd}),[i,s,a,n]);return r.length?m.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:m.jsx("defs",{children:r.map(c=>m.jsx(CA,{id:c.id,type:c.type,color:c.color,width:c.width,height:c.height,markerUnits:c.markerUnits,strokeWidth:c.strokeWidth,orient:c.orient},c.id))})}):null};wm.displayName="MarkerDefinitions";var MA=B.memo(wm);function Em({x:n,y:a,label:i,labelStyle:s,labelShowBg:r=!0,labelBgStyle:c,labelBgPadding:u=[2,4],labelBgBorderRadius:h=2,children:g,className:p,...x}){const[y,v]=B.useState({x:1,y:0,width:0,height:0}),S=Tt(["react-flow__edge-textwrapper",p]),b=B.useRef(null);return B.useEffect(()=>{if(b.current){const E=b.current.getBBox();v({x:E.x,y:E.y,width:E.width,height:E.height})}},[i]),i?m.jsxs("g",{transform:`translate(${n-y.width/2} ${a-y.height/2})`,className:S,visibility:y.width?"visible":"hidden",...x,children:[r&&m.jsx("rect",{width:y.width+2*u[0],x:-u[0],y:-u[1],height:y.height+2*u[1],className:"react-flow__edge-textbg",style:c,rx:h,ry:h}),m.jsx("text",{className:"react-flow__edge-text",y:y.height/2,dy:"0.3em",ref:b,style:s,children:i}),g]}):null}Em.displayName="EdgeText";const zA=B.memo(Em);function vr({path:n,labelX:a,labelY:i,label:s,labelStyle:r,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:g,interactionWidth:p=20,...x}){return m.jsxs(m.Fragment,{children:[m.jsx("path",{...x,d:n,fill:"none",className:Tt(["react-flow__edge-path",x.className])}),p?m.jsx("path",{d:n,fill:"none",strokeOpacity:0,strokeWidth:p,className:"react-flow__edge-interaction"}):null,s&&Qn(a)&&Qn(i)?m.jsx(zA,{x:a,y:i,label:s,labelStyle:r,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:g}):null]})}function _m({pos:n,x1:a,y1:i,x2:s,y2:r}){return n===be.Left||n===be.Right?[.5*(a+s),i]:[a,.5*(i+r)]}function Am({sourceX:n,sourceY:a,sourcePosition:i=be.Bottom,targetX:s,targetY:r,targetPosition:c=be.Top}){const[u,h]=_m({pos:i,x1:n,y1:a,x2:s,y2:r}),[g,p]=_m({pos:c,x1:s,y1:r,x2:n,y2:a}),[x,y,v,S]=gg({sourceX:n,sourceY:a,targetX:s,targetY:r,sourceControlX:u,sourceControlY:h,targetControlX:g,targetControlY:p});return[`M${n},${a} C${u},${h} ${g},${p} ${s},${r}`,x,y,v,S]}function Nm(n){return B.memo(({id:a,sourceX:i,sourceY:s,targetX:r,targetY:c,sourcePosition:u,targetPosition:h,label:g,labelStyle:p,labelShowBg:x,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:S,style:b,markerEnd:E,markerStart:_,interactionWidth:T})=>{const[z,N,C]=Am({sourceX:i,sourceY:s,sourcePosition:u,targetX:r,targetY:c,targetPosition:h}),D=n.isInternal?void 0:a;return m.jsx(vr,{id:D,path:z,labelX:N,labelY:C,label:g,labelStyle:p,labelShowBg:x,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:S,style:b,markerEnd:E,markerStart:_,interactionWidth:T})})}const DA=Nm({isInternal:!1}),km=Nm({isInternal:!0});DA.displayName="SimpleBezierEdge",km.displayName="SimpleBezierEdgeInternal";function Tm(n){return B.memo(({id:a,sourceX:i,sourceY:s,targetX:r,targetY:c,label:u,labelStyle:h,labelShowBg:g,labelBgStyle:p,labelBgPadding:x,labelBgBorderRadius:y,style:v,sourcePosition:S=be.Bottom,targetPosition:b=be.Top,markerEnd:E,markerStart:_,pathOptions:T,interactionWidth:z})=>{const[N,C,D]=ku({sourceX:i,sourceY:s,sourcePosition:S,targetX:r,targetY:c,targetPosition:b,borderRadius:T?.borderRadius,offset:T?.offset,stepPosition:T?.stepPosition}),R=n.isInternal?void 0:a;return m.jsx(vr,{id:R,path:N,labelX:C,labelY:D,label:u,labelStyle:h,labelShowBg:g,labelBgStyle:p,labelBgPadding:x,labelBgBorderRadius:y,style:v,markerEnd:E,markerStart:_,interactionWidth:z})})}const Cm=Tm({isInternal:!1}),Mm=Tm({isInternal:!0});Cm.displayName="SmoothStepEdge",Mm.displayName="SmoothStepEdgeInternal";function zm(n){return B.memo(({id:a,...i})=>{const s=n.isInternal?void 0:a;return m.jsx(Cm,{...i,id:s,pathOptions:B.useMemo(()=>({borderRadius:0,offset:i.pathOptions?.offset}),[i.pathOptions?.offset])})})}const OA=zm({isInternal:!1}),Dm=zm({isInternal:!0});OA.displayName="StepEdge",Dm.displayName="StepEdgeInternal";function Om(n){return B.memo(({id:a,sourceX:i,sourceY:s,targetX:r,targetY:c,label:u,labelStyle:h,labelShowBg:g,labelBgStyle:p,labelBgPadding:x,labelBgBorderRadius:y,style:v,markerEnd:S,markerStart:b,interactionWidth:E})=>{const[_,T,z]=vg({sourceX:i,sourceY:s,targetX:r,targetY:c}),N=n.isInternal?void 0:a;return m.jsx(vr,{id:N,path:_,labelX:T,labelY:z,label:u,labelStyle:h,labelShowBg:g,labelBgStyle:p,labelBgPadding:x,labelBgBorderRadius:y,style:v,markerEnd:S,markerStart:b,interactionWidth:E})})}const RA=Om({isInternal:!1}),Rm=Om({isInternal:!0});RA.displayName="StraightEdge",Rm.displayName="StraightEdgeInternal";function jm(n){return B.memo(({id:a,sourceX:i,sourceY:s,targetX:r,targetY:c,sourcePosition:u=be.Bottom,targetPosition:h=be.Top,label:g,labelStyle:p,labelShowBg:x,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:S,style:b,markerEnd:E,markerStart:_,pathOptions:T,interactionWidth:z})=>{const[N,C,D]=Nu({sourceX:i,sourceY:s,sourcePosition:u,targetX:r,targetY:c,targetPosition:h,curvature:T?.curvature}),R=n.isInternal?void 0:a;return m.jsx(vr,{id:R,path:N,labelX:C,labelY:D,label:g,labelStyle:p,labelShowBg:x,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:S,style:b,markerEnd:E,markerStart:_,interactionWidth:z})})}const jA=jm({isInternal:!1}),Lm=jm({isInternal:!0});jA.displayName="BezierEdge",Lm.displayName="BezierEdgeInternal";const Hm={default:Lm,straight:Rm,step:Dm,smoothstep:Mm,simplebezier:km},Bm={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},LA=(n,a,i)=>i===be.Left?n-a:i===be.Right?n+a:n,HA=(n,a,i)=>i===be.Top?n-a:i===be.Bottom?n+a:n,Um="react-flow__edgeupdater";function Vm({position:n,centerX:a,centerY:i,radius:s=10,onMouseDown:r,onMouseEnter:c,onMouseOut:u,type:h}){return m.jsx("circle",{onMouseDown:r,onMouseEnter:c,onMouseOut:u,className:Tt([Um,`${Um}-${h}`]),cx:LA(a,s,n),cy:HA(i,s,n),r:s,stroke:"transparent",fill:"transparent"})}function BA({isReconnectable:n,reconnectRadius:a,edge:i,sourceX:s,sourceY:r,targetX:c,targetY:u,sourcePosition:h,targetPosition:g,onReconnect:p,onReconnectStart:x,onReconnectEnd:y,setReconnecting:v,setUpdateHover:S}){const b=ft(),E=(C,D)=>{if(C.button!==0)return;const{autoPanOnConnect:R,domNode:j,isValidConnection:K,connectionMode:J,connectionRadius:fe,lib:U,onConnectStart:F,onConnectEnd:ae,cancelConnection:H,nodeLookup:I,rfId:k,panBy:L,updateConnection:$}=b.getState(),Z=D.type==="target",Y=(G,P)=>{v(!1),y?.(G,i,D.type,P)},A=G=>p?.(i,G),O=(G,P)=>{v(!0),x?.(C,i,D.type),F?.(G,P)};ju.onPointerDown(C.nativeEvent,{autoPanOnConnect:R,connectionMode:J,connectionRadius:fe,domNode:j,handleId:D.id,nodeId:D.nodeId,nodeLookup:I,isTarget:Z,edgeUpdaterType:D.type,lib:U,flowId:k,cancelConnection:H,panBy:L,isValidConnection:K,onConnect:A,onConnectStart:O,onConnectEnd:ae,onReconnectEnd:Y,updateConnection:$,getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,dragThreshold:b.getState().connectionDragThreshold,handleDomNode:C.currentTarget})},_=C=>E(C,{nodeId:i.target,id:i.targetHandle??null,type:"target"}),T=C=>E(C,{nodeId:i.source,id:i.sourceHandle??null,type:"source"}),z=()=>S(!0),N=()=>S(!1);return m.jsxs(m.Fragment,{children:[(n===!0||n==="source")&&m.jsx(Vm,{position:h,centerX:s,centerY:r,radius:a,onMouseDown:_,onMouseEnter:z,onMouseOut:N,type:"source"}),(n===!0||n==="target")&&m.jsx(Vm,{position:g,centerX:c,centerY:u,radius:a,onMouseDown:T,onMouseEnter:z,onMouseOut:N,type:"target"})]})}function UA({id:n,edgesFocusable:a,edgesReconnectable:i,elementsSelectable:s,onClick:r,onDoubleClick:c,onContextMenu:u,onMouseEnter:h,onMouseMove:g,onMouseLeave:p,reconnectRadius:x,onReconnect:y,onReconnectStart:v,onReconnectEnd:S,rfId:b,edgeTypes:E,noPanClassName:_,onError:T,disableKeyboardA11y:z}){let N=$e(Se=>Se.edgeLookup.get(n));const C=$e(Se=>Se.defaultEdgeOptions);N=C?{...C,...N}:N;let D=N.type||"default",R=E?.[D]||Hm[D];R===void 0&&(T?.("011",ua.error011(D)),D="default",R=E?.default||Hm.default);const j=!!(N.focusable||a&&typeof N.focusable>"u"),K=typeof y<"u"&&(N.reconnectable||i&&typeof N.reconnectable>"u"),J=!!(N.selectable||s&&typeof N.selectable>"u"),fe=B.useRef(null),[U,F]=B.useState(!1),[ae,H]=B.useState(!1),I=ft(),{zIndex:k,sourceX:L,sourceY:$,targetX:Z,targetY:Y,sourcePosition:A,targetPosition:O}=$e(B.useCallback(Se=>{const _e=Se.nodeLookup.get(N.source),we=Se.nodeLookup.get(N.target);if(!_e||!we)return{zIndex:N.zIndex,...Bm};const Me=ME({id:n,sourceNode:_e,targetNode:we,sourceHandle:N.sourceHandle||null,targetHandle:N.targetHandle||null,connectionMode:Se.connectionMode,onError:T});return{zIndex:EE({selected:N.selected,zIndex:N.zIndex,sourceNode:_e,targetNode:we,elevateOnSelect:Se.elevateEdgesOnSelect}),...Me||Bm}},[N.source,N.target,N.sourceHandle,N.targetHandle,N.selected,N.zIndex]),ut),G=B.useMemo(()=>N.markerStart?`url('#${Tu(N.markerStart,b)}')`:void 0,[N.markerStart,b]),P=B.useMemo(()=>N.markerEnd?`url('#${Tu(N.markerEnd,b)}')`:void 0,[N.markerEnd,b]);if(N.hidden||L===null||$===null||Z===null||Y===null)return null;const se=Se=>{const{addSelectedEdges:_e,unselectNodesAndEdges:we,multiSelectionActive:Me}=I.getState();J&&(I.setState({nodesSelectionActive:!1}),N.selected&&Me?(we({nodes:[],edges:[N]}),fe.current?.blur()):_e([n])),r&&r(Se,N)},ge=c?Se=>{c(Se,{...N})}:void 0,he=u?Se=>{u(Se,{...N})}:void 0,ue=h?Se=>{h(Se,{...N})}:void 0,me=g?Se=>{g(Se,{...N})}:void 0,Ne=p?Se=>{p(Se,{...N})}:void 0,ke=Se=>{if(!z&&Fp.includes(Se.key)&&J){const{unselectNodesAndEdges:_e,addSelectedEdges:we}=I.getState();Se.key==="Escape"?(fe.current?.blur(),_e({edges:[N]})):we([n])}};return m.jsx("svg",{style:{zIndex:k},children:m.jsxs("g",{className:Tt(["react-flow__edge",`react-flow__edge-${D}`,N.className,_,{selected:N.selected,animated:N.animated,inactive:!J&&!r,updating:U,selectable:J}]),onClick:se,onDoubleClick:ge,onContextMenu:he,onMouseEnter:ue,onMouseMove:me,onMouseLeave:Ne,onKeyDown:j?ke:void 0,tabIndex:j?0:void 0,role:N.ariaRole??(j?"group":"img"),"aria-roledescription":"edge","data-id":n,"data-testid":`rf__edge-${n}`,"aria-label":N.ariaLabel===null?void 0:N.ariaLabel||`Edge from ${N.source} to ${N.target}`,"aria-describedby":j?`${Jg}-${b}`:void 0,ref:fe,...N.domAttributes,children:[!ae&&m.jsx(R,{id:n,source:N.source,target:N.target,type:N.type,selected:N.selected,animated:N.animated,selectable:J,deletable:N.deletable??!0,label:N.label,labelStyle:N.labelStyle,labelShowBg:N.labelShowBg,labelBgStyle:N.labelBgStyle,labelBgPadding:N.labelBgPadding,labelBgBorderRadius:N.labelBgBorderRadius,sourceX:L,sourceY:$,targetX:Z,targetY:Y,sourcePosition:A,targetPosition:O,data:N.data,style:N.style,sourceHandleId:N.sourceHandle,targetHandleId:N.targetHandle,markerStart:G,markerEnd:P,pathOptions:"pathOptions"in N?N.pathOptions:void 0,interactionWidth:N.interactionWidth}),K&&m.jsx(BA,{edge:N,isReconnectable:K,reconnectRadius:x,onReconnect:y,onReconnectStart:v,onReconnectEnd:S,sourceX:L,sourceY:$,targetX:Z,targetY:Y,sourcePosition:A,targetPosition:O,setUpdateHover:F,setReconnecting:H})]})})}var VA=B.memo(UA);const $A=n=>({edgesFocusable:n.edgesFocusable,edgesReconnectable:n.edgesReconnectable,elementsSelectable:n.elementsSelectable,connectionMode:n.connectionMode,onError:n.onError});function $m({defaultMarkerColor:n,onlyRenderVisibleElements:a,rfId:i,edgeTypes:s,noPanClassName:r,onReconnect:c,onEdgeContextMenu:u,onEdgeMouseEnter:h,onEdgeMouseMove:g,onEdgeMouseLeave:p,onEdgeClick:x,reconnectRadius:y,onEdgeDoubleClick:v,onReconnectStart:S,onReconnectEnd:b,disableKeyboardA11y:E}){const{edgesFocusable:_,edgesReconnectable:T,elementsSelectable:z,onError:N}=$e($A,ut),C=AA(a);return m.jsxs("div",{className:"react-flow__edges",children:[m.jsx(MA,{defaultColor:n,rfId:i}),C.map(D=>m.jsx(VA,{id:D,edgesFocusable:_,edgesReconnectable:T,elementsSelectable:z,noPanClassName:r,onReconnect:c,onContextMenu:u,onMouseEnter:h,onMouseMove:g,onMouseLeave:p,onClick:x,reconnectRadius:y,onDoubleClick:v,onReconnectStart:S,onReconnectEnd:b,rfId:i,onError:N,edgeTypes:s,disableKeyboardA11y:E},D))]})}$m.displayName="EdgeRenderer";const YA=B.memo($m),qA=n=>`translate(${n.transform[0]}px,${n.transform[1]}px) scale(${n.transform[2]})`;function XA({children:n}){const a=$e(qA);return m.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:a},children:n})}function GA(n){const a=Wa(),i=B.useRef(!1);B.useEffect(()=>{!i.current&&a.viewportInitialized&&n&&(setTimeout(()=>n(a),1),i.current=!0)},[n,a.viewportInitialized])}const ZA=n=>n.panZoom?.syncViewport;function IA(n){const a=$e(ZA),i=ft();return B.useEffect(()=>{n&&(a?.(n),i.setState({transform:[n.x,n.y,n.zoom]}))},[n,a]),null}function QA(n){return n.connection.inProgress?{...n.connection,to:To(n.connection.to,n.transform)}:{...n.connection}}function KA(n){return QA}function FA(n){const a=KA();return $e(a,ut)}const JA=n=>({nodesConnectable:n.nodesConnectable,isValid:n.connection.isValid,inProgress:n.connection.inProgress,width:n.width,height:n.height});function PA({containerStyle:n,style:a,type:i,component:s}){const{nodesConnectable:r,width:c,height:u,isValid:h,inProgress:g}=$e(JA,ut);return!(c&&r&&g)?null:m.jsx("svg",{style:n,width:c,height:u,className:"react-flow__connectionline react-flow__container",children:m.jsx("g",{className:Tt(["react-flow__connection",eg(h)]),children:m.jsx(Ym,{style:a,type:i,CustomComponent:s,isValid:h})})})}const Ym=({style:n,type:a=Fa.Bezier,CustomComponent:i,isValid:s})=>{const{inProgress:r,from:c,fromNode:u,fromHandle:h,fromPosition:g,to:p,toNode:x,toHandle:y,toPosition:v}=FA();if(!r)return;if(i)return m.jsx(i,{connectionLineType:a,connectionLineStyle:n,fromNode:u,fromHandle:h,fromX:c.x,fromY:c.y,toX:p.x,toY:p.y,fromPosition:g,toPosition:v,connectionStatus:eg(s),toNode:x,toHandle:y});let S="";const b={sourceX:c.x,sourceY:c.y,sourcePosition:g,targetX:p.x,targetY:p.y,targetPosition:v};switch(a){case Fa.Bezier:[S]=Nu(b);break;case Fa.SimpleBezier:[S]=Am(b);break;case Fa.Step:[S]=ku({...b,borderRadius:0});break;case Fa.SmoothStep:[S]=ku(b);break;default:[S]=vg(b)}return m.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:n})};Ym.displayName="ConnectionLine";const WA={};function qm(n=WA){B.useRef(n),ft(),B.useEffect(()=>{},[n])}function eN(){ft(),B.useRef(!1),B.useEffect(()=>{},[])}function Xm({nodeTypes:n,edgeTypes:a,onInit:i,onNodeClick:s,onEdgeClick:r,onNodeDoubleClick:c,onEdgeDoubleClick:u,onNodeMouseEnter:h,onNodeMouseMove:g,onNodeMouseLeave:p,onNodeContextMenu:x,onSelectionContextMenu:y,onSelectionStart:v,onSelectionEnd:S,connectionLineType:b,connectionLineStyle:E,connectionLineComponent:_,connectionLineContainerStyle:T,selectionKeyCode:z,selectionOnDrag:N,selectionMode:C,multiSelectionKeyCode:D,panActivationKeyCode:R,zoomActivationKeyCode:j,deleteKeyCode:K,onlyRenderVisibleElements:J,elementsSelectable:fe,defaultViewport:U,translateExtent:F,minZoom:ae,maxZoom:H,preventScrolling:I,defaultMarkerColor:k,zoomOnScroll:L,zoomOnPinch:$,panOnScroll:Z,panOnScrollSpeed:Y,panOnScrollMode:A,zoomOnDoubleClick:O,panOnDrag:G,onPaneClick:P,onPaneMouseEnter:se,onPaneMouseMove:ge,onPaneMouseLeave:he,onPaneScroll:ue,onPaneContextMenu:me,paneClickDistance:Ne,nodeClickDistance:ke,onEdgeContextMenu:Se,onEdgeMouseEnter:_e,onEdgeMouseMove:we,onEdgeMouseLeave:Me,reconnectRadius:Re,onReconnect:le,onReconnectStart:de,onReconnectEnd:Je,noDragClassName:et,noWheelClassName:on,noPanClassName:wn,disableKeyboardA11y:_t,nodeExtent:gt,rfId:sn,viewport:Bt,onViewportChange:$t}){return qm(n),qm(a),eN(),GA(i),IA(Bt),m.jsx(gA,{onPaneClick:P,onPaneMouseEnter:se,onPaneMouseMove:ge,onPaneMouseLeave:he,onPaneContextMenu:me,onPaneScroll:ue,paneClickDistance:Ne,deleteKeyCode:K,selectionKeyCode:z,selectionOnDrag:N,selectionMode:C,onSelectionStart:v,onSelectionEnd:S,multiSelectionKeyCode:D,panActivationKeyCode:R,zoomActivationKeyCode:j,elementsSelectable:fe,zoomOnScroll:L,zoomOnPinch:$,zoomOnDoubleClick:O,panOnScroll:Z,panOnScrollSpeed:Y,panOnScrollMode:A,panOnDrag:G,defaultViewport:U,translateExtent:F,minZoom:ae,maxZoom:H,onSelectionContextMenu:y,preventScrolling:I,noDragClassName:et,noWheelClassName:on,noPanClassName:wn,disableKeyboardA11y:_t,onViewportChange:$t,isControlledViewport:!!Bt,children:m.jsxs(XA,{children:[m.jsx(YA,{edgeTypes:a,onEdgeClick:r,onEdgeDoubleClick:u,onReconnect:le,onReconnectStart:de,onReconnectEnd:Je,onlyRenderVisibleElements:J,onEdgeContextMenu:Se,onEdgeMouseEnter:_e,onEdgeMouseMove:we,onEdgeMouseLeave:Me,reconnectRadius:Re,defaultMarkerColor:k,noPanClassName:wn,disableKeyboardA11y:_t,rfId:sn}),m.jsx(PA,{style:E,type:b,component:_,containerStyle:T}),m.jsx("div",{className:"react-flow__edgelabel-renderer"}),m.jsx(_A,{nodeTypes:n,onNodeClick:s,onNodeDoubleClick:c,onNodeMouseEnter:h,onNodeMouseMove:g,onNodeMouseLeave:p,onNodeContextMenu:x,nodeClickDistance:ke,onlyRenderVisibleElements:J,noPanClassName:wn,noDragClassName:et,disableKeyboardA11y:_t,nodeExtent:gt,rfId:sn}),m.jsx("div",{className:"react-flow__viewport-portal"})]})})}Xm.displayName="GraphView";const tN=B.memo(Xm),Gm=({nodes:n,edges:a,defaultNodes:i,defaultEdges:s,width:r,height:c,fitView:u,fitViewOptions:h,minZoom:g=.5,maxZoom:p=2,nodeOrigin:x,nodeExtent:y}={})=>{const v=new Map,S=new Map,b=new Map,E=new Map,_=s??a??[],T=i??n??[],z=x??[0,0],N=y??wo;Tg(b,E,_);const C=zu(T,v,S,{nodeOrigin:z,nodeExtent:N,elevateNodesOnSelect:!1});let D=[0,0,1];if(u&&r&&c){const R=Ao(v,{filter:fe=>!!((fe.width||fe.initialWidth)&&(fe.height||fe.initialHeight))}),{x:j,y:K,zoom:J}=_u(R,r,c,g,p,h?.padding??.1);D=[j,K,J]}return{rfId:"1",width:r??0,height:c??0,transform:D,nodes:T,nodesInitialized:C,nodeLookup:v,parentLookup:S,edges:_,edgeLookup:E,connectionLookup:b,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:i!==void 0,hasDefaultEdges:s!==void 0,panZoom:null,minZoom:g,maxZoom:p,translateExtent:wo,nodeExtent:N,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:ui.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:z,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!1,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:u??!1,fitViewOptions:h,fitViewResolver:null,connection:{...Pp},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:yE,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Jp}},nN=({nodes:n,edges:a,defaultNodes:i,defaultEdges:s,width:r,height:c,fitView:u,fitViewOptions:h,minZoom:g,maxZoom:p,nodeOrigin:x,nodeExtent:y})=>S_((v,S)=>{async function b(){const{nodeLookup:E,panZoom:_,fitViewOptions:T,fitViewResolver:z,width:N,height:C,minZoom:D,maxZoom:R}=S();_&&(await gE({nodes:E,width:N,height:C,panZoom:_,minZoom:D,maxZoom:R},T),z?.resolve(!0),v({fitViewResolver:null}))}return{...Gm({nodes:n,edges:a,width:r,height:c,fitView:u,fitViewOptions:h,minZoom:g,maxZoom:p,nodeOrigin:x,nodeExtent:y,defaultNodes:i,defaultEdges:s}),setNodes:E=>{const{nodeLookup:_,parentLookup:T,nodeOrigin:z,elevateNodesOnSelect:N,fitViewQueued:C}=S(),D=zu(E,_,T,{nodeOrigin:z,nodeExtent:y,elevateNodesOnSelect:N,checkEquality:!0});C&&D?(b(),v({nodes:E,nodesInitialized:D,fitViewQueued:!1,fitViewOptions:void 0})):v({nodes:E,nodesInitialized:D})},setEdges:E=>{const{connectionLookup:_,edgeLookup:T}=S();Tg(_,T,E),v({edges:E})},setDefaultNodesAndEdges:(E,_)=>{if(E){const{setNodes:T}=S();T(E),v({hasDefaultNodes:!0})}if(_){const{setEdges:T}=S();T(_),v({hasDefaultEdges:!0})}},updateNodeInternals:E=>{const{triggerNodeChanges:_,nodeLookup:T,parentLookup:z,domNode:N,nodeOrigin:C,nodeExtent:D,debug:R,fitViewQueued:j}=S(),{changes:K,updatedInternals:J}=BE(E,T,z,N,C,D);J&&(RE(T,z,{nodeOrigin:C,nodeExtent:D}),j?(b(),v({fitViewQueued:!1,fitViewOptions:void 0})):v({}),K?.length>0&&(R&&console.log("React Flow: trigger node changes",K),_?.(K)))},updateNodePositions:(E,_=!1)=>{const T=[],z=[],{nodeLookup:N,triggerNodeChanges:C}=S();for(const[D,R]of E){const j=N.get(D),K=!!(j?.expandParent&&j?.parentId&&R?.position),J={id:D,type:"position",position:K?{x:Math.max(0,R.position.x),y:Math.max(0,R.position.y)}:R.position,dragging:_};K&&j.parentId&&T.push({id:D,parentId:j.parentId,rect:{...R.internals.positionAbsolute,width:R.measured.width??0,height:R.measured.height??0}}),z.push(J)}if(T.length>0){const{parentLookup:D,nodeOrigin:R}=S(),j=Ou(T,N,D,R);z.push(...j)}C(z)},triggerNodeChanges:E=>{const{onNodesChange:_,setNodes:T,nodes:z,hasDefaultNodes:N,debug:C}=S();if(E?.length){if(N){const D=Yu(E,z);T(D)}C&&console.log("React Flow: trigger node changes",E),_?.(E)}},triggerEdgeChanges:E=>{const{onEdgesChange:_,setEdges:T,edges:z,hasDefaultEdges:N,debug:C}=S();if(E?.length){if(N){const D=om(E,z);T(D)}C&&console.log("React Flow: trigger edge changes",E),_?.(E)}},addSelectedNodes:E=>{const{multiSelectionActive:_,edgeLookup:T,nodeLookup:z,triggerNodeChanges:N,triggerEdgeChanges:C}=S();if(_){const D=E.map(R=>jl(R,!0));N(D);return}N(mi(z,new Set([...E]),!0)),C(mi(T))},addSelectedEdges:E=>{const{multiSelectionActive:_,edgeLookup:T,nodeLookup:z,triggerNodeChanges:N,triggerEdgeChanges:C}=S();if(_){const D=E.map(R=>jl(R,!0));C(D);return}C(mi(T,new Set([...E]))),N(mi(z,new Set,!0))},unselectNodesAndEdges:({nodes:E,edges:_}={})=>{const{edges:T,nodes:z,nodeLookup:N,triggerNodeChanges:C,triggerEdgeChanges:D}=S(),R=E||z,j=_||T,K=R.map(fe=>{const U=N.get(fe.id);return U&&(U.selected=!1),jl(fe.id,!1)}),J=j.map(fe=>jl(fe.id,!1));C(K),D(J)},setMinZoom:E=>{const{panZoom:_,maxZoom:T}=S();_?.setScaleExtent([E,T]),v({minZoom:E})},setMaxZoom:E=>{const{panZoom:_,minZoom:T}=S();_?.setScaleExtent([T,E]),v({maxZoom:E})},setTranslateExtent:E=>{S().panZoom?.setTranslateExtent(E),v({translateExtent:E})},resetSelectedElements:()=>{const{edges:E,nodes:_,triggerNodeChanges:T,triggerEdgeChanges:z,elementsSelectable:N}=S();if(!N)return;const C=_.reduce((R,j)=>j.selected?[...R,jl(j.id,!1)]:R,[]),D=E.reduce((R,j)=>j.selected?[...R,jl(j.id,!1)]:R,[]);T(C),z(D)},setNodeExtent:E=>{const{nodes:_,nodeLookup:T,parentLookup:z,nodeOrigin:N,elevateNodesOnSelect:C,nodeExtent:D}=S();E[0][0]===D[0][0]&&E[0][1]===D[0][1]&&E[1][0]===D[1][0]&&E[1][1]===D[1][1]||(zu(_,T,z,{nodeOrigin:N,nodeExtent:E,elevateNodesOnSelect:C,checkEquality:!1}),v({nodeExtent:E}))},panBy:E=>{const{transform:_,width:T,height:z,panZoom:N,translateExtent:C}=S();return UE({delta:E,panZoom:N,transform:_,translateExtent:C,width:T,height:z})},setCenter:async(E,_,T)=>{const{width:z,height:N,maxZoom:C,panZoom:D}=S();if(!D)return Promise.resolve(!1);const R=typeof T?.zoom<"u"?T.zoom:C;return await D.setViewport({x:z/2-E*R,y:N/2-_*R,zoom:R},{duration:T?.duration,ease:T?.ease,interpolate:T?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{v({connection:{...Pp}})},updateConnection:E=>{v({connection:E})},reset:()=>v({...Gm()})}},Object.is);function Zu({initialNodes:n,initialEdges:a,defaultNodes:i,defaultEdges:s,initialWidth:r,initialHeight:c,initialMinZoom:u,initialMaxZoom:h,initialFitViewOptions:g,fitView:p,nodeOrigin:x,nodeExtent:y,children:v}){const[S]=B.useState(()=>nN({nodes:n,edges:a,defaultNodes:i,defaultEdges:s,width:r,height:c,fitView:p,minZoom:u,maxZoom:h,fitViewOptions:g,nodeOrigin:x,nodeExtent:y}));return m.jsx(w_,{value:S,children:m.jsx(X_,{children:v})})}function aN({children:n,nodes:a,edges:i,defaultNodes:s,defaultEdges:r,width:c,height:u,fitView:h,fitViewOptions:g,minZoom:p,maxZoom:x,nodeOrigin:y,nodeExtent:v}){return B.useContext(gr)?m.jsx(m.Fragment,{children:n}):m.jsx(Zu,{initialNodes:a,initialEdges:i,defaultNodes:s,defaultEdges:r,initialWidth:c,initialHeight:u,fitView:h,initialFitViewOptions:g,initialMinZoom:p,initialMaxZoom:x,nodeOrigin:y,nodeExtent:v,children:n})}const lN={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function iN({nodes:n,edges:a,defaultNodes:i,defaultEdges:s,className:r,nodeTypes:c,edgeTypes:u,onNodeClick:h,onEdgeClick:g,onInit:p,onMove:x,onMoveStart:y,onMoveEnd:v,onConnect:S,onConnectStart:b,onConnectEnd:E,onClickConnectStart:_,onClickConnectEnd:T,onNodeMouseEnter:z,onNodeMouseMove:N,onNodeMouseLeave:C,onNodeContextMenu:D,onNodeDoubleClick:R,onNodeDragStart:j,onNodeDrag:K,onNodeDragStop:J,onNodesDelete:fe,onEdgesDelete:U,onDelete:F,onSelectionChange:ae,onSelectionDragStart:H,onSelectionDrag:I,onSelectionDragStop:k,onSelectionContextMenu:L,onSelectionStart:$,onSelectionEnd:Z,onBeforeDelete:Y,connectionMode:A,connectionLineType:O=Fa.Bezier,connectionLineStyle:G,connectionLineComponent:P,connectionLineContainerStyle:se,deleteKeyCode:ge="Backspace",selectionKeyCode:he="Shift",selectionOnDrag:ue=!1,selectionMode:me=Eo.Full,panActivationKeyCode:Ne="Space",multiSelectionKeyCode:ke=Co()?"Meta":"Control",zoomActivationKeyCode:Se=Co()?"Meta":"Control",snapToGrid:_e,snapGrid:we,onlyRenderVisibleElements:Me=!1,selectNodesOnDrag:Re,nodesDraggable:le,autoPanOnNodeFocus:de,nodesConnectable:Je,nodesFocusable:et,nodeOrigin:on=Pg,edgesFocusable:wn,edgesReconnectable:_t,elementsSelectable:gt=!0,defaultViewport:sn=j_,minZoom:Bt=.5,maxZoom:$t=2,translateExtent:Rt=wo,preventScrolling:Na=!0,nodeExtent:ea,defaultMarkerColor:ta="#b1b1b7",zoomOnScroll:pa=!0,zoomOnPinch:rn=!0,panOnScroll:vt=!1,panOnScrollSpeed:mt=.5,panOnScrollMode:dt=Dl.Free,zoomOnDoubleClick:ka=!0,panOnDrag:ga=!0,onPaneClick:je,onPaneMouseEnter:tt,onPaneMouseMove:yt,onPaneMouseLeave:jt,onPaneScroll:Ye,onPaneContextMenu:En,paneClickDistance:na=0,nodeClickDistance:ht=0,children:Ft,onReconnect:Ta,onReconnectStart:Dn,onReconnectEnd:ma,onEdgeContextMenu:Ca,onEdgeDoubleClick:Ma,onEdgeMouseEnter:On,onEdgeMouseMove:Ct,onEdgeMouseLeave:Yt,reconnectRadius:Rn=10,onNodesChange:Vl,onEdgesChange:cn,noDragClassName:bt="nodrag",noWheelClassName:ot="nowheel",noPanClassName:jn="nopan",fitView:za,fitViewOptions:$l,connectOnClick:bi,attributionPosition:Si,proOptions:ve,defaultEdgeOptions:q,elevateNodesOnSelect:pe,elevateEdgesOnSelect:ye,disableKeyboardA11y:Xe=!1,autoPanOnConnect:st,autoPanOnNodeDrag:De,autoPanSpeed:Lt,connectionRadius:un,isValidConnection:Jt,onError:Ln,style:At,id:al,nodeDragThreshold:Yl,connectionDragThreshold:jf,viewport:wi,onViewportChange:Ei,width:aa,height:fn,colorMode:Hr="light",debug:Lf,onScroll:_i,ariaLabelConfig:Br,...Ai},Hf){const Pt=al||"1",Ko=B_(Hr),Ur=B.useCallback(Ni=>{Ni.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),_i?.(Ni)},[_i]);return m.jsx("div",{"data-testid":"rf__wrapper",...Ai,onScroll:Ur,style:{...At,...lN},ref:Hf,className:Tt(["react-flow",r,Ko]),id:al,role:"application",children:m.jsxs(aN,{nodes:n,edges:a,width:aa,height:fn,fitView:za,fitViewOptions:$l,minZoom:Bt,maxZoom:$t,nodeOrigin:on,nodeExtent:ea,children:[m.jsx(tN,{onInit:p,onNodeClick:h,onEdgeClick:g,onNodeMouseEnter:z,onNodeMouseMove:N,onNodeMouseLeave:C,onNodeContextMenu:D,onNodeDoubleClick:R,nodeTypes:c,edgeTypes:u,connectionLineType:O,connectionLineStyle:G,connectionLineComponent:P,connectionLineContainerStyle:se,selectionKeyCode:he,selectionOnDrag:ue,selectionMode:me,deleteKeyCode:ge,multiSelectionKeyCode:ke,panActivationKeyCode:Ne,zoomActivationKeyCode:Se,onlyRenderVisibleElements:Me,defaultViewport:sn,translateExtent:Rt,minZoom:Bt,maxZoom:$t,preventScrolling:Na,zoomOnScroll:pa,zoomOnPinch:rn,zoomOnDoubleClick:ka,panOnScroll:vt,panOnScrollSpeed:mt,panOnScrollMode:dt,panOnDrag:ga,onPaneClick:je,onPaneMouseEnter:tt,onPaneMouseMove:yt,onPaneMouseLeave:jt,onPaneScroll:Ye,onPaneContextMenu:En,paneClickDistance:na,nodeClickDistance:ht,onSelectionContextMenu:L,onSelectionStart:$,onSelectionEnd:Z,onReconnect:Ta,onReconnectStart:Dn,onReconnectEnd:ma,onEdgeContextMenu:Ca,onEdgeDoubleClick:Ma,onEdgeMouseEnter:On,onEdgeMouseMove:Ct,onEdgeMouseLeave:Yt,reconnectRadius:Rn,defaultMarkerColor:ta,noDragClassName:bt,noWheelClassName:ot,noPanClassName:jn,rfId:Pt,disableKeyboardA11y:Xe,nodeExtent:ea,viewport:wi,onViewportChange:Ei}),m.jsx(H_,{nodes:n,edges:a,defaultNodes:i,defaultEdges:s,onConnect:S,onConnectStart:b,onConnectEnd:E,onClickConnectStart:_,onClickConnectEnd:T,nodesDraggable:le,autoPanOnNodeFocus:de,nodesConnectable:Je,nodesFocusable:et,edgesFocusable:wn,edgesReconnectable:_t,elementsSelectable:gt,elevateNodesOnSelect:pe,elevateEdgesOnSelect:ye,minZoom:Bt,maxZoom:$t,nodeExtent:ea,onNodesChange:Vl,onEdgesChange:cn,snapToGrid:_e,snapGrid:we,connectionMode:A,translateExtent:Rt,connectOnClick:bi,defaultEdgeOptions:q,fitView:za,fitViewOptions:$l,onNodesDelete:fe,onEdgesDelete:U,onDelete:F,onNodeDragStart:j,onNodeDrag:K,onNodeDragStop:J,onSelectionDrag:I,onSelectionDragStart:H,onSelectionDragStop:k,onMove:x,onMoveStart:y,onMoveEnd:v,noPanClassName:jn,nodeOrigin:on,rfId:Pt,autoPanOnConnect:st,autoPanOnNodeDrag:De,autoPanSpeed:Lt,onError:Ln,connectionRadius:un,isValidConnection:Jt,selectNodesOnDrag:Re,nodeDragThreshold:Yl,connectionDragThreshold:jf,onBeforeDelete:Y,debug:Lf,ariaLabelConfig:Br}),m.jsx(R_,{onSelectionChange:ae}),Ft,m.jsx(C_,{proOptions:ve,position:Si}),m.jsx(T_,{rfId:Pt,disableKeyboardA11y:Xe})]})})}var Zm=um(iN);function Im(n){return $e(B.useCallback(i=>i.nodeLookup.get(n),[n]),ut)}function oN({dimensions:n,lineWidth:a,variant:i,className:s}){return m.jsx("path",{strokeWidth:a,d:`M${n[0]/2} 0 V${n[1]} M0 ${n[1]/2} H${n[0]}`,className:Tt(["react-flow__background-pattern",i,s])})}function sN({radius:n,className:a}){return m.jsx("circle",{cx:n,cy:n,r:n,className:Tt(["react-flow__background-pattern","dots",a])})}var tl;(function(n){n.Lines="lines",n.Dots="dots",n.Cross="cross"})(tl||(tl={}));const rN={[tl.Dots]:1,[tl.Lines]:1,[tl.Cross]:6},cN=n=>({transform:n.transform,patternId:`pattern-${n.rfId}`});function Qm({id:n,variant:a=tl.Dots,gap:i=20,size:s,lineWidth:r=1,offset:c=0,color:u,bgColor:h,style:g,className:p,patternClassName:x}){const y=B.useRef(null),{transform:v,patternId:S}=$e(cN,ut),b=s||rN[a],E=a===tl.Dots,_=a===tl.Cross,T=Array.isArray(i)?i:[i,i],z=[T[0]*v[2]||1,T[1]*v[2]||1],N=b*v[2],C=Array.isArray(c)?c:[c,c],D=_?[N,N]:z,R=[C[0]*v[2]||1+D[0]/2,C[1]*v[2]||1+D[1]/2],j=`${S}${n||""}`;return m.jsxs("svg",{className:Tt(["react-flow__background",p]),style:{...g,...yr,"--xy-background-color-props":h,"--xy-background-pattern-color-props":u},ref:y,"data-testid":"rf__background",children:[m.jsx("pattern",{id:j,x:v[0]%z[0],y:v[1]%z[1],width:z[0],height:z[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${R[0]},-${R[1]})`,children:E?m.jsx(sN,{radius:N/2,className:x}):m.jsx(oN,{dimensions:D,lineWidth:r,variant:a,className:x})}),m.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${j})`})]})}Qm.displayName="Background";const uN=B.memo(Qm);function fN(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:m.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function dN(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:m.jsx("path",{d:"M0 0h32v4.2H0z"})})}function hN(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:m.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 pN(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:m.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 gN(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:m.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 Ll({children:n,className:a,...i}){return m.jsx("button",{type:"button",className:Tt(["react-flow__controls-button",a]),...i,children:n})}const mN=n=>({isInteractive:n.nodesDraggable||n.nodesConnectable||n.elementsSelectable,minZoomReached:n.transform[2]<=n.minZoom,maxZoomReached:n.transform[2]>=n.maxZoom,ariaLabelConfig:n.ariaLabelConfig});function Km({style:n,showZoom:a=!0,showFitView:i=!0,showInteractive:s=!0,fitViewOptions:r,onZoomIn:c,onZoomOut:u,onFitView:h,onInteractiveChange:g,className:p,children:x,position:y="bottom-left",orientation:v="vertical","aria-label":S}){const b=ft(),{isInteractive:E,minZoomReached:_,maxZoomReached:T,ariaLabelConfig:z}=$e(mN,ut),{zoomIn:N,zoomOut:C,fitView:D}=Wa(),R=()=>{N(),c?.()},j=()=>{C(),u?.()},K=()=>{D(r),h?.()},J=()=>{b.setState({nodesDraggable:!E,nodesConnectable:!E,elementsSelectable:!E}),g?.(!E)},fe=v==="horizontal"?"horizontal":"vertical";return m.jsxs(fa,{className:Tt(["react-flow__controls",fe,p]),position:y,style:n,"data-testid":"rf__controls","aria-label":S??z["controls.ariaLabel"],children:[a&&m.jsxs(m.Fragment,{children:[m.jsx(Ll,{onClick:R,className:"react-flow__controls-zoomin",title:z["controls.zoomIn.ariaLabel"],"aria-label":z["controls.zoomIn.ariaLabel"],disabled:T,children:m.jsx(fN,{})}),m.jsx(Ll,{onClick:j,className:"react-flow__controls-zoomout",title:z["controls.zoomOut.ariaLabel"],"aria-label":z["controls.zoomOut.ariaLabel"],disabled:_,children:m.jsx(dN,{})})]}),i&&m.jsx(Ll,{className:"react-flow__controls-fitview",onClick:K,title:z["controls.fitView.ariaLabel"],"aria-label":z["controls.fitView.ariaLabel"],children:m.jsx(hN,{})}),s&&m.jsx(Ll,{className:"react-flow__controls-interactive",onClick:J,title:z["controls.interactive.ariaLabel"],"aria-label":z["controls.interactive.ariaLabel"],children:E?m.jsx(gN,{}):m.jsx(pN,{})}),x]})}Km.displayName="Controls";const Fm=B.memo(Km);function yN({id:n,x:a,y:i,width:s,height:r,style:c,color:u,strokeColor:h,strokeWidth:g,className:p,borderRadius:x,shapeRendering:y,selected:v,onClick:S}){const{background:b,backgroundColor:E}=c||{},_=u||b||E;return m.jsx("rect",{className:Tt(["react-flow__minimap-node",{selected:v},p]),x:a,y:i,rx:x,ry:x,width:s,height:r,style:{fill:_,stroke:h,strokeWidth:g},shapeRendering:y,onClick:S?T=>S(T,n):void 0})}const xN=B.memo(yN),vN=n=>n.nodes.map(a=>a.id),Iu=n=>n instanceof Function?n:()=>n;function bN({nodeStrokeColor:n,nodeColor:a,nodeClassName:i="",nodeBorderRadius:s=5,nodeStrokeWidth:r,nodeComponent:c=xN,onClick:u}){const h=$e(vN,ut),g=Iu(a),p=Iu(n),x=Iu(i),y=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return m.jsx(m.Fragment,{children:h.map(v=>m.jsx(wN,{id:v,nodeColorFunc:g,nodeStrokeColorFunc:p,nodeClassNameFunc:x,nodeBorderRadius:s,nodeStrokeWidth:r,NodeComponent:c,onClick:u,shapeRendering:y},v))})}function SN({id:n,nodeColorFunc:a,nodeStrokeColorFunc:i,nodeClassNameFunc:s,nodeBorderRadius:r,nodeStrokeWidth:c,shapeRendering:u,NodeComponent:h,onClick:g}){const{node:p,x,y,width:v,height:S}=$e(b=>{const{internals:E}=b.nodeLookup.get(n),_=E.userNode,{x:T,y:z}=E.positionAbsolute,{width:N,height:C}=_a(_);return{node:_,x:T,y:z,width:N,height:C}},ut);return!p||p.hidden||!rg(p)?null:m.jsx(h,{x,y,width:v,height:S,style:p.style,selected:!!p.selected,className:s(p),color:a(p),borderRadius:r,strokeColor:i(p),strokeWidth:c,shapeRendering:u,onClick:g,id:p.id})}const wN=B.memo(SN);var EN=B.memo(bN);const _N=200,AN=150,NN=n=>!n.hidden,kN=n=>{const a={x:-n.transform[0]/n.transform[2],y:-n.transform[1]/n.transform[2],width:n.width/n.transform[2],height:n.height/n.transform[2]};return{viewBB:a,boundingRect:n.nodeLookup.size>0?og(Ao(n.nodeLookup,{filter:NN}),a):a,rfId:n.rfId,panZoom:n.panZoom,translateExtent:n.translateExtent,flowWidth:n.width,flowHeight:n.height,ariaLabelConfig:n.ariaLabelConfig}},TN="react-flow__minimap-desc";function Jm({style:n,className:a,nodeStrokeColor:i,nodeColor:s,nodeClassName:r="",nodeBorderRadius:c=5,nodeStrokeWidth:u,nodeComponent:h,bgColor:g,maskColor:p,maskStrokeColor:x,maskStrokeWidth:y,position:v="bottom-right",onClick:S,onNodeClick:b,pannable:E=!1,zoomable:_=!1,ariaLabel:T,inversePan:z,zoomStep:N=1,offsetScale:C=5}){const D=ft(),R=B.useRef(null),{boundingRect:j,viewBB:K,rfId:J,panZoom:fe,translateExtent:U,flowWidth:F,flowHeight:ae,ariaLabelConfig:H}=$e(kN,ut),I=n?.width??_N,k=n?.height??AN,L=j.width/I,$=j.height/k,Z=Math.max(L,$),Y=Z*I,A=Z*k,O=C*Z,G=j.x-(Y-j.width)/2-O,P=j.y-(A-j.height)/2-O,se=Y+O*2,ge=A+O*2,he=`${TN}-${J}`,ue=B.useRef(0),me=B.useRef();ue.current=Z,B.useEffect(()=>{if(R.current&&fe)return me.current=QE({domNode:R.current,panZoom:fe,getTransform:()=>D.getState().transform,getViewScale:()=>ue.current}),()=>{me.current?.destroy()}},[fe]),B.useEffect(()=>{me.current?.update({translateExtent:U,width:F,height:ae,inversePan:z,pannable:E,zoomStep:N,zoomable:_})},[E,_,z,N,U,F,ae]);const Ne=S?_e=>{const[we,Me]=me.current?.pointer(_e)||[0,0];S(_e,{x:we,y:Me})}:void 0,ke=b?B.useCallback((_e,we)=>{const Me=D.getState().nodeLookup.get(we).internals.userNode;b(_e,Me)},[]):void 0,Se=T??H["minimap.ariaLabel"];return m.jsx(fa,{position:v,style:{...n,"--xy-minimap-background-color-props":typeof g=="string"?g:void 0,"--xy-minimap-mask-background-color-props":typeof p=="string"?p:void 0,"--xy-minimap-mask-stroke-color-props":typeof x=="string"?x:void 0,"--xy-minimap-mask-stroke-width-props":typeof y=="number"?y*Z:void 0,"--xy-minimap-node-background-color-props":typeof s=="string"?s:void 0,"--xy-minimap-node-stroke-color-props":typeof i=="string"?i:void 0,"--xy-minimap-node-stroke-width-props":typeof u=="number"?u:void 0},className:Tt(["react-flow__minimap",a]),"data-testid":"rf__minimap",children:m.jsxs("svg",{width:I,height:k,viewBox:`${G} ${P} ${se} ${ge}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":he,ref:R,onClick:Ne,children:[Se&&m.jsx("title",{id:he,children:Se}),m.jsx(EN,{onClick:ke,nodeColor:s,nodeStrokeColor:i,nodeBorderRadius:c,nodeClassName:r,nodeStrokeWidth:u,nodeComponent:h}),m.jsx("path",{className:"react-flow__minimap-mask",d:`M${G-O},${P-O}h${se+O*2}v${ge+O*2}h${-se-O*2}z
|
|
71
|
-
M${K.x},${K.y}h${K.width}v${K.height}h${-K.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Jm.displayName="MiniMap",B.memo(Jm);const
|
|
70
|
+
`)),x=p.reduce((y,v)=>y.concat(...v),[]);return[p,x]}return[[],[]]},[n]);return B.useEffect(()=>{const g=a?.target??nm,p=a?.actInsideInputWithModifier??!0;if(n!==null){const x=S=>{if(r.current=S.ctrlKey||S.metaKey||S.shiftKey||S.altKey,(!r.current||r.current&&!p)&&dg(S))return!1;const E=lm(S.code,h);if(c.current.add(S[E]),am(u,c.current,!1)){const _=S.composedPath?.()?.[0]||S.target,T=_?.nodeName==="BUTTON"||_?.nodeName==="A";a.preventDefault!==!1&&(r.current||!T)&&S.preventDefault(),s(!0)}},y=S=>{const b=lm(S.code,h);am(u,c.current,!0)?(s(!1),c.current.clear()):c.current.delete(S[b]),S.key==="Meta"&&c.current.clear(),r.current=!1},v=()=>{c.current.clear(),s(!1)};return g?.addEventListener("keydown",x),g?.addEventListener("keyup",y),window.addEventListener("blur",v),window.addEventListener("contextmenu",v),()=>{g?.removeEventListener("keydown",x),g?.removeEventListener("keyup",y),window.removeEventListener("blur",v),window.removeEventListener("contextmenu",v)}}},[n,s]),i}function am(n,a,i){return n.filter(s=>i||s.length===a.size).some(s=>s.every(r=>a.has(r)))}function lm(n,a){return a.includes(n)?"code":"key"}const V_=()=>{const n=ft();return B.useMemo(()=>({zoomIn:a=>{const{panZoom:i}=n.getState();return i?i.scaleBy(1.2,{duration:a?.duration}):Promise.resolve(!1)},zoomOut:a=>{const{panZoom:i}=n.getState();return i?i.scaleBy(1/1.2,{duration:a?.duration}):Promise.resolve(!1)},zoomTo:(a,i)=>{const{panZoom:s}=n.getState();return s?s.scaleTo(a,{duration:i?.duration}):Promise.resolve(!1)},getZoom:()=>n.getState().transform[2],setViewport:async(a,i)=>{const{transform:[s,r,c],panZoom:u}=n.getState();return u?(await u.setViewport({x:a.x??s,y:a.y??r,zoom:a.zoom??c},i),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[a,i,s]=n.getState().transform;return{x:a,y:i,zoom:s}},setCenter:async(a,i,s)=>n.getState().setCenter(a,i,s),fitBounds:async(a,i)=>{const{width:s,height:r,minZoom:c,maxZoom:u,panZoom:h}=n.getState(),g=_u(a,s,r,c,u,i?.padding??.1);return h?(await h.setViewport(g,{duration:i?.duration,ease:i?.ease,interpolate:i?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(a,i={})=>{const{transform:s,snapGrid:r,snapToGrid:c,domNode:u}=n.getState();if(!u)return a;const{x:h,y:g}=u.getBoundingClientRect(),p={x:a.x-h,y:a.y-g},x=i.snapGrid??r,y=i.snapToGrid??c;return To(p,s,y,x)},flowToScreenPosition:a=>{const{transform:i,domNode:s}=n.getState();if(!s)return a;const{x:r,y:c}=s.getBoundingClientRect(),u=fr(a,i);return{x:u.x+r,y:u.y+c}}}),[])};function im(n,a){const i=[],s=new Map,r=[];for(const c of n)if(c.type==="add"){r.push(c);continue}else if(c.type==="remove"||c.type==="replace")s.set(c.id,[c]);else{const u=s.get(c.id);u?u.push(c):s.set(c.id,[c])}for(const c of a){const u=s.get(c.id);if(!u){i.push(c);continue}if(u[0].type==="remove")continue;if(u[0].type==="replace"){i.push({...u[0].item});continue}const h={...c};for(const g of u)$_(g,h);i.push(h)}return r.length&&r.forEach(c=>{c.index!==void 0?i.splice(c.index,0,{...c.item}):i.push({...c.item})}),i}function $_(n,a){switch(n.type){case"select":{a.selected=n.selected;break}case"position":{typeof n.position<"u"&&(a.position=n.position),typeof n.dragging<"u"&&(a.dragging=n.dragging);break}case"dimensions":{typeof n.dimensions<"u"&&(a.measured??={},a.measured.width=n.dimensions.width,a.measured.height=n.dimensions.height,n.setAttributes&&((n.setAttributes===!0||n.setAttributes==="width")&&(a.width=n.dimensions.width),(n.setAttributes===!0||n.setAttributes==="height")&&(a.height=n.dimensions.height))),typeof n.resizing=="boolean"&&(a.resizing=n.resizing);break}}}function Yu(n,a){return im(n,a)}function om(n,a){return im(n,a)}function jl(n,a){return{id:n,type:"select",selected:a}}function mi(n,a=new Set,i=!1){const s=[];for(const[r,c]of n){const u=a.has(r);!(c.selected===void 0&&!u)&&c.selected!==u&&(i&&(c.selected=u),s.push(jl(c.id,u)))}return s}function sm({items:n=[],lookup:a}){const i=[],s=new Map(n.map(r=>[r.id,r]));for(const[r,c]of n.entries()){const u=a.get(c.id),h=u?.internals?.userNode??u;h!==void 0&&h!==c&&i.push({id:c.id,item:c,type:"replace"}),h===void 0&&i.push({item:c,type:"add",index:r})}for(const[r]of a)s.get(r)===void 0&&i.push({id:r,type:"remove"});return i}function rm(n){return{id:n.id,type:"remove"}}const cm=n=>dE(n),Y_=n=>tg(n);function um(n){return B.forwardRef(n)}const q_=typeof window<"u"?B.useLayoutEffect:B.useEffect;function fm(n){const[a,i]=B.useState(BigInt(0)),[s]=B.useState(()=>X_(()=>i(r=>r+BigInt(1))));return q_(()=>{const r=s.get();r.length&&(n(r),s.reset())},[a]),s}function X_(n){let a=[];return{get:()=>a,reset:()=>{a=[]},push:i=>{a.push(i),n()}}}const dm=B.createContext(null);function G_({children:n}){const a=ft(),i=B.useCallback(h=>{const{nodes:g=[],setNodes:p,hasDefaultNodes:x,onNodesChange:y,nodeLookup:v,fitViewQueued:S}=a.getState();let b=g;for(const _ of h)b=typeof _=="function"?_(b):_;const E=sm({items:b,lookup:v});x&&p(b),E.length>0?y?.(E):S&&window.requestAnimationFrame(()=>{const{fitViewQueued:_,nodes:T,setNodes:z}=a.getState();_&&z(T)})},[]),s=fm(i),r=B.useCallback(h=>{const{edges:g=[],setEdges:p,hasDefaultEdges:x,onEdgesChange:y,edgeLookup:v}=a.getState();let S=g;for(const b of h)S=typeof b=="function"?b(S):b;x?p(S):y&&y(sm({items:S,lookup:v}))},[]),c=fm(r),u=B.useMemo(()=>({nodeQueue:s,edgeQueue:c}),[]);return m.jsx(dm.Provider,{value:u,children:n})}function Z_(){const n=B.useContext(dm);if(!n)throw new Error("useBatchContext must be used within a BatchProvider");return n}const I_=n=>!!n.panZoom;function Wa(){const n=V_(),a=ft(),i=Z_(),s=$e(I_),r=B.useMemo(()=>{const c=y=>a.getState().nodeLookup.get(y),u=y=>{i.nodeQueue.push(y)},h=y=>{i.edgeQueue.push(y)},g=y=>{const{nodeLookup:v,nodeOrigin:S}=a.getState(),b=cm(y)?y:v.get(y.id),E=b.parentId?cg(b.position,b.measured,b.parentId,v,S):b.position,_={...b,position:E,width:b.measured?.width??b.width,height:b.measured?.height??b.height};return di(_)},p=(y,v,S={replace:!1})=>{u(b=>b.map(E=>{if(E.id===y){const _=typeof v=="function"?v(E):v;return S.replace&&cm(_)?_:{...E,..._}}return E}))},x=(y,v,S={replace:!1})=>{h(b=>b.map(E=>{if(E.id===y){const _=typeof v=="function"?v(E):v;return S.replace&&Y_(_)?_:{...E,..._}}return E}))};return{getNodes:()=>a.getState().nodes.map(y=>({...y})),getNode:y=>c(y)?.internals.userNode,getInternalNode:c,getEdges:()=>{const{edges:y=[]}=a.getState();return y.map(v=>({...v}))},getEdge:y=>a.getState().edgeLookup.get(y),setNodes:u,setEdges:h,addNodes:y=>{const v=Array.isArray(y)?y:[y];i.nodeQueue.push(S=>[...S,...v])},addEdges:y=>{const v=Array.isArray(y)?y:[y];i.edgeQueue.push(S=>[...S,...v])},toObject:()=>{const{nodes:y=[],edges:v=[],transform:S}=a.getState(),[b,E,_]=S;return{nodes:y.map(T=>({...T})),edges:v.map(T=>({...T})),viewport:{x:b,y:E,zoom:_}}},deleteElements:async({nodes:y=[],edges:v=[]})=>{const{nodes:S,edges:b,onNodesDelete:E,onEdgesDelete:_,triggerNodeChanges:T,triggerEdgeChanges:z,onDelete:N,onBeforeDelete:C}=a.getState(),{nodes:D,edges:R}=await yE({nodesToRemove:y,edgesToRemove:v,nodes:S,edges:b,onBeforeDelete:C}),j=R.length>0,K=D.length>0;if(j){const J=R.map(rm);_?.(R),z(J)}if(K){const J=D.map(rm);E?.(D),T(J)}return(K||j)&&N?.({nodes:D,edges:R}),{deletedNodes:D,deletedEdges:R}},getIntersectingNodes:(y,v=!0,S)=>{const b=sg(y),E=b?y:g(y),_=S!==void 0;return E?(S||a.getState().nodes).filter(T=>{const z=a.getState().nodeLookup.get(T.id);if(z&&!b&&(T.id===y.id||!z.internals.positionAbsolute))return!1;const N=di(_?T:z),C=No(N,E);return v&&C>0||C>=N.width*N.height||C>=E.width*E.height}):[]},isNodeIntersecting:(y,v,S=!0)=>{const E=sg(y)?y:g(y);if(!E)return!1;const _=No(E,v);return S&&_>0||_>=v.width*v.height||_>=E.width*E.height},updateNode:p,updateNodeData:(y,v,S={replace:!1})=>{p(y,b=>{const E=typeof v=="function"?v(b):v;return S.replace?{...b,data:E}:{...b,data:{...b.data,...E}}},S)},updateEdge:x,updateEdgeData:(y,v,S={replace:!1})=>{x(y,b=>{const E=typeof v=="function"?v(b):v;return S.replace?{...b,data:E}:{...b,data:{...b.data,...E}}},S)},getNodesBounds:y=>{const{nodeLookup:v,nodeOrigin:S}=a.getState();return hE(y,{nodeLookup:v,nodeOrigin:S})},getHandleConnections:({type:y,id:v,nodeId:S})=>Array.from(a.getState().connectionLookup.get(`${S}-${y}${v?`-${v}`:""}`)?.values()??[]),getNodeConnections:({type:y,handleId:v,nodeId:S})=>Array.from(a.getState().connectionLookup.get(`${S}${y?v?`-${y}-${v}`:`-${y}`:""}`)?.values()??[]),fitView:async y=>{const v=a.getState().fitViewResolver??SE();return a.setState({fitViewQueued:!0,fitViewOptions:y,fitViewResolver:v}),i.nodeQueue.push(S=>[...S]),v.promise}}},[]);return B.useMemo(()=>({...r,...n,viewportInitialized:s}),[s])}const hm=n=>n.selected,Q_=typeof window<"u"?window:void 0;function K_({deleteKeyCode:n,multiSelectionKeyCode:a}){const i=ft(),{deleteElements:s}=Wa(),r=Oo(n,{actInsideInputWithModifier:!1}),c=Oo(a,{target:Q_});B.useEffect(()=>{if(r){const{edges:u,nodes:h}=i.getState();s({nodes:h.filter(hm),edges:u.filter(hm)}),i.setState({nodesSelectionActive:!1})}},[r]),B.useEffect(()=>{i.setState({multiSelectionActive:c})},[c])}function F_(n){const a=ft();B.useEffect(()=>{const i=()=>{if(!n.current||!(n.current.checkVisibility?.()??!0))return!1;const s=Au(n.current);(s.height===0||s.width===0)&&a.getState().onError?.("004",ua.error004()),a.setState({width:s.width||500,height:s.height||500})};if(n.current){i(),window.addEventListener("resize",i);const s=new ResizeObserver(()=>i());return s.observe(n.current),()=>{window.removeEventListener("resize",i),s&&n.current&&s.unobserve(n.current)}}},[])}const yr={position:"absolute",width:"100%",height:"100%",top:0,left:0},J_=n=>({userSelectionActive:n.userSelectionActive,lib:n.lib,connectionInProgress:n.connection.inProgress});function P_({onPaneContextMenu:n,zoomOnScroll:a=!0,zoomOnPinch:i=!0,panOnScroll:s=!1,panOnScrollSpeed:r=.5,panOnScrollMode:c=Dl.Free,zoomOnDoubleClick:u=!0,panOnDrag:h=!0,defaultViewport:g,translateExtent:p,minZoom:x,maxZoom:y,zoomActivationKeyCode:v,preventScrolling:S=!0,children:b,noWheelClassName:E,noPanClassName:_,onViewportChange:T,isControlledViewport:z,paneClickDistance:N,selectionOnDrag:C}){const D=ft(),R=B.useRef(null),{userSelectionActive:j,lib:K,connectionInProgress:J}=$e(J_,ut),fe=Oo(v),U=B.useRef();F_(R);const F=B.useCallback(ae=>{T?.({x:ae[0],y:ae[1],zoom:ae[2]}),z||D.setState({transform:ae})},[T,z]);return B.useEffect(()=>{if(R.current){U.current=a_({domNode:R.current,minZoom:x,maxZoom:y,translateExtent:p,viewport:g,onDraggingChange:k=>D.setState({paneDragging:k}),onPanZoomStart:(k,L)=>{const{onViewportChangeStart:$,onMoveStart:Z}=D.getState();Z?.(k,L),$?.(L)},onPanZoom:(k,L)=>{const{onViewportChange:$,onMove:Z}=D.getState();Z?.(k,L),$?.(L)},onPanZoomEnd:(k,L)=>{const{onViewportChangeEnd:$,onMoveEnd:Z}=D.getState();Z?.(k,L),$?.(L)}});const{x:ae,y:H,zoom:I}=U.current.getViewport();return D.setState({panZoom:U.current,transform:[ae,H,I],domNode:R.current.closest(".react-flow")}),()=>{U.current?.destroy()}}},[]),B.useEffect(()=>{U.current?.update({onPaneContextMenu:n,zoomOnScroll:a,zoomOnPinch:i,panOnScroll:s,panOnScrollSpeed:r,panOnScrollMode:c,zoomOnDoubleClick:u,panOnDrag:h,zoomActivationKeyPressed:fe,preventScrolling:S,noPanClassName:_,userSelectionActive:j,noWheelClassName:E,lib:K,onTransformChange:F,connectionInProgress:J,selectionOnDrag:C,paneClickDistance:N})},[n,a,i,s,r,c,u,h,fe,S,_,j,E,K,F,J,C,N]),m.jsx("div",{className:"react-flow__renderer",ref:R,style:yr,children:b})}const W_=n=>({userSelectionActive:n.userSelectionActive,userSelectionRect:n.userSelectionRect});function eA(){const{userSelectionActive:n,userSelectionRect:a}=$e(W_,ut);return n&&a?m.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:a.width,height:a.height,transform:`translate(${a.x}px, ${a.y}px)`}}):null}const qu=(n,a)=>i=>{i.target===a.current&&n?.(i)},tA=n=>({userSelectionActive:n.userSelectionActive,elementsSelectable:n.elementsSelectable,connectionInProgress:n.connection.inProgress,dragging:n.paneDragging});function nA({isSelecting:n,selectionKeyPressed:a,selectionMode:i=Eo.Full,panOnDrag:s,paneClickDistance:r,selectionOnDrag:c,onSelectionStart:u,onSelectionEnd:h,onPaneClick:g,onPaneContextMenu:p,onPaneScroll:x,onPaneMouseEnter:y,onPaneMouseMove:v,onPaneMouseLeave:S,children:b}){const E=ft(),{userSelectionActive:_,elementsSelectable:T,dragging:z,connectionInProgress:N}=$e(tA,ut),C=T&&(n||_),D=B.useRef(null),R=B.useRef(),j=B.useRef(new Set),K=B.useRef(new Set),J=B.useRef(!1),fe=$=>{if(J.current||N){J.current=!1;return}g?.($),E.getState().resetSelectedElements(),E.setState({nodesSelectionActive:!1})},U=$=>{if(Array.isArray(s)&&s?.includes(2)){$.preventDefault();return}p?.($)},F=x?$=>x($):void 0,ae=$=>{J.current&&($.stopPropagation(),J.current=!1)},H=$=>{const{domNode:Z}=E.getState();if(R.current=Z?.getBoundingClientRect(),!R.current)return;const Y=$.target===D.current;if(!Y&&!!$.target.closest(".nokey")||!n||!(c&&Y||a)||$.button!==0||!$.isPrimary)return;$.target?.setPointerCapture?.($.pointerId),J.current=!1;const{x:G,y:P}=Kn($.nativeEvent,R.current);E.setState({userSelectionRect:{width:0,height:0,startX:G,startY:P,x:G,y:P}}),Y||($.stopPropagation(),$.preventDefault())},I=$=>{const{userSelectionRect:Z,transform:Y,nodeLookup:A,edgeLookup:O,connectionLookup:G,triggerNodeChanges:P,triggerEdgeChanges:se,defaultEdgeOptions:ge,resetSelectedElements:he}=E.getState();if(!R.current||!Z)return;const{x:ue,y:me}=Kn($.nativeEvent,R.current),{startX:Ne,startY:ke}=Z;if(!J.current){const Re=a?0:r;if(Math.hypot(ue-Ne,me-ke)<=Re)return;he(),u?.($)}J.current=!0;const Se={startX:Ne,startY:ke,x:ue<Ne?ue:Ne,y:me<ke?me:ke,width:Math.abs(ue-Ne),height:Math.abs(me-ke)},_e=j.current,we=K.current;j.current=new Set(wu(A,Se,Y,i===Eo.Partial,!0).map(Re=>Re.id)),K.current=new Set;const Me=ge?.selectable??!0;for(const Re of j.current){const le=G.get(Re);if(le)for(const{edgeId:de}of le.values()){const Je=O.get(de);Je&&(Je.selectable??Me)&&K.current.add(de)}}if(!ug(_e,j.current)){const Re=mi(A,j.current,!0);P(Re)}if(!ug(we,K.current)){const Re=mi(O,K.current);se(Re)}E.setState({userSelectionRect:Se,userSelectionActive:!0,nodesSelectionActive:!1})},k=$=>{$.button===0&&($.target?.releasePointerCapture?.($.pointerId),!_&&$.target===D.current&&E.getState().userSelectionRect&&fe?.($),E.setState({userSelectionActive:!1,userSelectionRect:null}),J.current&&(h?.($),E.setState({nodesSelectionActive:j.current.size>0})))},L=s===!0||Array.isArray(s)&&s.includes(0);return m.jsxs("div",{className:Tt(["react-flow__pane",{draggable:L,dragging:z,selection:n}]),onClick:C?void 0:qu(fe,D),onContextMenu:qu(U,D),onWheel:qu(F,D),onPointerEnter:C?void 0:y,onPointerMove:C?I:v,onPointerUp:C?k:void 0,onPointerDownCapture:C?H:void 0,onClickCapture:C?ae:void 0,onPointerLeave:S,ref:D,style:yr,children:[b,m.jsx(eA,{})]})}function Xu({id:n,store:a,unselect:i=!1,nodeRef:s}){const{addSelectedNodes:r,unselectNodesAndEdges:c,multiSelectionActive:u,nodeLookup:h,onError:g}=a.getState(),p=h.get(n);if(!p){g?.("012",ua.error012(n));return}a.setState({nodesSelectionActive:!1}),p.selected?(i||p.selected&&u)&&(c({nodes:[p],edges:[]}),requestAnimationFrame(()=>s?.current?.blur())):r([n])}function pm({nodeRef:n,disabled:a=!1,noDragClassName:i,handleSelector:s,nodeId:r,isSelectable:c,nodeClickDistance:u}){const h=ft(),[g,p]=B.useState(!1),x=B.useRef();return B.useEffect(()=>{x.current=qE({getStoreItems:()=>h.getState(),onNodeMouseDown:y=>{Xu({id:y,store:h,nodeRef:n})},onDragStart:()=>{p(!0)},onDragStop:()=>{p(!1)}})},[]),B.useEffect(()=>{if(a)x.current?.destroy();else if(n.current)return x.current?.update({noDragClassName:i,handleSelector:s,domNode:n.current,isSelectable:c,nodeId:r,nodeClickDistance:u}),()=>{x.current?.destroy()}},[i,s,a,c,n,r]),g}const aA=n=>a=>a.selected&&(a.draggable||n&&typeof a.draggable>"u");function gm(){const n=ft();return B.useCallback(i=>{const{nodeExtent:s,snapToGrid:r,snapGrid:c,nodesDraggable:u,onError:h,updateNodePositions:g,nodeLookup:p,nodeOrigin:x}=n.getState(),y=new Map,v=aA(u),S=r?c[0]:5,b=r?c[1]:5,E=i.direction.x*S*i.factor,_=i.direction.y*b*i.factor;for(const[,T]of p){if(!v(T))continue;let z={x:T.internals.positionAbsolute.x+E,y:T.internals.positionAbsolute.y+_};r&&(z=ko(z,c));const{position:N,positionAbsolute:C}=ng({nodeId:T.id,nextPosition:z,nodeLookup:p,nodeExtent:s,nodeOrigin:x,onError:h});T.position=N,T.internals.positionAbsolute=C,y.set(T.id,T)}g(y)},[])}const Gu=B.createContext(null),lA=Gu.Provider;Gu.Consumer;const mm=()=>B.useContext(Gu),iA=n=>({connectOnClick:n.connectOnClick,noPanClassName:n.noPanClassName,rfId:n.rfId}),oA=(n,a,i)=>s=>{const{connectionClickStartHandle:r,connectionMode:c,connection:u}=s,{fromHandle:h,toHandle:g,isValid:p}=u,x=g?.nodeId===n&&g?.id===a&&g?.type===i;return{connectingFrom:h?.nodeId===n&&h?.id===a&&h?.type===i,connectingTo:x,clickConnecting:r?.nodeId===n&&r?.id===a&&r?.type===i,isPossibleEndHandle:c===ui.Strict?h?.type!==i:n!==h?.nodeId||a!==h?.id,connectionInProcess:!!h,clickConnectionInProcess:!!r,valid:x&&p}};function sA({type:n="source",position:a=be.Top,isValidConnection:i,isConnectable:s=!0,isConnectableStart:r=!0,isConnectableEnd:c=!0,id:u,onConnect:h,children:g,className:p,onMouseDown:x,onTouchStart:y,...v},S){const b=u||null,E=n==="target",_=ft(),T=mm(),{connectOnClick:z,noPanClassName:N,rfId:C}=$e(iA,ut),{connectingFrom:D,connectingTo:R,clickConnecting:j,isPossibleEndHandle:K,connectionInProcess:J,clickConnectionInProcess:fe,valid:U}=$e(oA(T,b,n),ut);T||_.getState().onError?.("010",ua.error010());const F=I=>{const{defaultEdgeOptions:k,onConnect:L,hasDefaultEdges:$}=_.getState(),Z={...k,...I};if($){const{edges:Y,setEdges:A}=_.getState();A(xg(Z,Y))}L?.(Z),h?.(Z)},ae=I=>{if(!T)return;const k=hg(I.nativeEvent);if(r&&(k&&I.button===0||!k)){const L=_.getState();ju.onPointerDown(I.nativeEvent,{handleDomNode:I.currentTarget,autoPanOnConnect:L.autoPanOnConnect,connectionMode:L.connectionMode,connectionRadius:L.connectionRadius,domNode:L.domNode,nodeLookup:L.nodeLookup,lib:L.lib,isTarget:E,handleId:b,nodeId:T,flowId:L.rfId,panBy:L.panBy,cancelConnection:L.cancelConnection,onConnectStart:L.onConnectStart,onConnectEnd:L.onConnectEnd,updateConnection:L.updateConnection,onConnect:F,isValidConnection:i||L.isValidConnection,getTransform:()=>_.getState().transform,getFromHandle:()=>_.getState().connection.fromHandle,autoPanSpeed:L.autoPanSpeed,dragThreshold:L.connectionDragThreshold})}k?x?.(I):y?.(I)},H=I=>{const{onClickConnectStart:k,onClickConnectEnd:L,connectionClickStartHandle:$,connectionMode:Z,isValidConnection:Y,lib:A,rfId:O,nodeLookup:G,connection:P}=_.getState();if(!T||!$&&!r)return;if(!$){k?.(I.nativeEvent,{nodeId:T,handleId:b,handleType:n}),_.setState({connectionClickStartHandle:{nodeId:T,type:n,id:b}});return}const se=fg(I.target),ge=i||Y,{connection:he,isValid:ue}=ju.isValid(I.nativeEvent,{handle:{nodeId:T,id:b,type:n},connectionMode:Z,fromNodeId:$.nodeId,fromHandleId:$.id||null,fromType:$.type,isValidConnection:ge,flowId:O,doc:se,lib:A,nodeLookup:G});ue&&he&&F(he);const me=structuredClone(P);delete me.inProgress,me.toPosition=me.toHandle?me.toHandle.position:null,L?.(I,me),_.setState({connectionClickStartHandle:null})};return m.jsx("div",{"data-handleid":b,"data-nodeid":T,"data-handlepos":a,"data-id":`${C}-${T}-${b}-${n}`,className:Tt(["react-flow__handle",`react-flow__handle-${a}`,"nodrag",N,p,{source:!E,target:E,connectable:s,connectablestart:r,connectableend:c,clickconnecting:j,connectingfrom:D,connectingto:R,valid:U,connectionindicator:s&&(!J||K)&&(J||fe?c:r)}]),onMouseDown:ae,onTouchStart:ae,onClick:z?H:void 0,ref:S,...v,children:g})}const el=B.memo(um(sA));function rA({data:n,isConnectable:a,sourcePosition:i=be.Bottom}){return m.jsxs(m.Fragment,{children:[n?.label,m.jsx(el,{type:"source",position:i,isConnectable:a})]})}function cA({data:n,isConnectable:a,targetPosition:i=be.Top,sourcePosition:s=be.Bottom}){return m.jsxs(m.Fragment,{children:[m.jsx(el,{type:"target",position:i,isConnectable:a}),n?.label,m.jsx(el,{type:"source",position:s,isConnectable:a})]})}function uA(){return null}function fA({data:n,isConnectable:a,targetPosition:i=be.Top}){return m.jsxs(m.Fragment,{children:[m.jsx(el,{type:"target",position:i,isConnectable:a}),n?.label]})}const xr={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},ym={input:rA,default:cA,output:fA,group:uA};function dA(n){return n.internals.handleBounds===void 0?{width:n.width??n.initialWidth??n.style?.width,height:n.height??n.initialHeight??n.style?.height}:{width:n.width??n.style?.width,height:n.height??n.style?.height}}const hA=n=>{const{width:a,height:i,x:s,y:r}=Ao(n.nodeLookup,{filter:c=>!!c.selected});return{width:Qn(a)?a:null,height:Qn(i)?i:null,userSelectionActive:n.userSelectionActive,transformString:`translate(${n.transform[0]}px,${n.transform[1]}px) scale(${n.transform[2]}) translate(${s}px,${r}px)`}};function pA({onSelectionContextMenu:n,noPanClassName:a,disableKeyboardA11y:i}){const s=ft(),{width:r,height:c,transformString:u,userSelectionActive:h}=$e(hA,ut),g=gm(),p=B.useRef(null);if(B.useEffect(()=>{i||p.current?.focus({preventScroll:!0})},[i]),pm({nodeRef:p}),h||!r||!c)return null;const x=n?v=>{const S=s.getState().nodes.filter(b=>b.selected);n(v,S)}:void 0,y=v=>{Object.prototype.hasOwnProperty.call(xr,v.key)&&(v.preventDefault(),g({direction:xr[v.key],factor:v.shiftKey?4:1}))};return m.jsx("div",{className:Tt(["react-flow__nodesselection","react-flow__container",a]),style:{transform:u},children:m.jsx("div",{ref:p,className:"react-flow__nodesselection-rect",onContextMenu:x,tabIndex:i?void 0:-1,onKeyDown:i?void 0:y,style:{width:r,height:c}})})}const xm=typeof window<"u"?window:void 0,gA=n=>({nodesSelectionActive:n.nodesSelectionActive,userSelectionActive:n.userSelectionActive});function vm({children:n,onPaneClick:a,onPaneMouseEnter:i,onPaneMouseMove:s,onPaneMouseLeave:r,onPaneContextMenu:c,onPaneScroll:u,paneClickDistance:h,deleteKeyCode:g,selectionKeyCode:p,selectionOnDrag:x,selectionMode:y,onSelectionStart:v,onSelectionEnd:S,multiSelectionKeyCode:b,panActivationKeyCode:E,zoomActivationKeyCode:_,elementsSelectable:T,zoomOnScroll:z,zoomOnPinch:N,panOnScroll:C,panOnScrollSpeed:D,panOnScrollMode:R,zoomOnDoubleClick:j,panOnDrag:K,defaultViewport:J,translateExtent:fe,minZoom:U,maxZoom:F,preventScrolling:ae,onSelectionContextMenu:H,noWheelClassName:I,noPanClassName:k,disableKeyboardA11y:L,onViewportChange:$,isControlledViewport:Z}){const{nodesSelectionActive:Y,userSelectionActive:A}=$e(gA),O=Oo(p,{target:xm}),G=Oo(E,{target:xm}),P=G||K,se=G||C,ge=x&&P!==!0,he=O||A||ge;return K_({deleteKeyCode:g,multiSelectionKeyCode:b}),m.jsx(P_,{onPaneContextMenu:c,elementsSelectable:T,zoomOnScroll:z,zoomOnPinch:N,panOnScroll:se,panOnScrollSpeed:D,panOnScrollMode:R,zoomOnDoubleClick:j,panOnDrag:!O&&P,defaultViewport:J,translateExtent:fe,minZoom:U,maxZoom:F,zoomActivationKeyCode:_,preventScrolling:ae,noWheelClassName:I,noPanClassName:k,onViewportChange:$,isControlledViewport:Z,paneClickDistance:h,selectionOnDrag:ge,children:m.jsxs(nA,{onSelectionStart:v,onSelectionEnd:S,onPaneClick:a,onPaneMouseEnter:i,onPaneMouseMove:s,onPaneMouseLeave:r,onPaneContextMenu:c,onPaneScroll:u,panOnDrag:P,isSelecting:!!he,selectionMode:y,selectionKeyPressed:O,paneClickDistance:h,selectionOnDrag:ge,children:[n,Y&&m.jsx(pA,{onSelectionContextMenu:H,noPanClassName:k,disableKeyboardA11y:L})]})})}vm.displayName="FlowRenderer";const mA=B.memo(vm),yA=n=>a=>n?wu(a.nodeLookup,{x:0,y:0,width:a.width,height:a.height},a.transform,!0).map(i=>i.id):Array.from(a.nodeLookup.keys());function xA(n){return $e(B.useCallback(yA(n),[n]),ut)}const vA=n=>n.updateNodeInternals;function bA(){const n=$e(vA),[a]=B.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(i=>{const s=new Map;i.forEach(r=>{const c=r.target.getAttribute("data-id");s.set(c,{id:c,nodeElement:r.target,force:!0})}),n(s)}));return B.useEffect(()=>()=>{a?.disconnect()},[a]),a}function SA({node:n,nodeType:a,hasDimensions:i,resizeObserver:s}){const r=ft(),c=B.useRef(null),u=B.useRef(null),h=B.useRef(n.sourcePosition),g=B.useRef(n.targetPosition),p=B.useRef(a),x=i&&!!n.internals.handleBounds;return B.useEffect(()=>{c.current&&!n.hidden&&(!x||u.current!==c.current)&&(u.current&&s?.unobserve(u.current),s?.observe(c.current),u.current=c.current)},[x,n.hidden]),B.useEffect(()=>()=>{u.current&&(s?.unobserve(u.current),u.current=null)},[]),B.useEffect(()=>{if(c.current){const y=p.current!==a,v=h.current!==n.sourcePosition,S=g.current!==n.targetPosition;(y||v||S)&&(p.current=a,h.current=n.sourcePosition,g.current=n.targetPosition,r.getState().updateNodeInternals(new Map([[n.id,{id:n.id,nodeElement:c.current,force:!0}]])))}},[n.id,a,n.sourcePosition,n.targetPosition]),c}function wA({id:n,onClick:a,onMouseEnter:i,onMouseMove:s,onMouseLeave:r,onContextMenu:c,onDoubleClick:u,nodesDraggable:h,elementsSelectable:g,nodesConnectable:p,nodesFocusable:x,resizeObserver:y,noDragClassName:v,noPanClassName:S,disableKeyboardA11y:b,rfId:E,nodeTypes:_,nodeClickDistance:T,onError:z}){const{node:N,internals:C,isParent:D}=$e(ue=>{const me=ue.nodeLookup.get(n),Ne=ue.parentLookup.has(n);return{node:me,internals:me.internals,isParent:Ne}},ut);let R=N.type||"default",j=_?.[R]||ym[R];j===void 0&&(z?.("003",ua.error003(R)),R="default",j=_?.default||ym.default);const K=!!(N.draggable||h&&typeof N.draggable>"u"),J=!!(N.selectable||g&&typeof N.selectable>"u"),fe=!!(N.connectable||p&&typeof N.connectable>"u"),U=!!(N.focusable||x&&typeof N.focusable>"u"),F=ft(),ae=rg(N),H=SA({node:N,nodeType:R,hasDimensions:ae,resizeObserver:y}),I=pm({nodeRef:H,disabled:N.hidden||!K,noDragClassName:v,handleSelector:N.dragHandle,nodeId:n,isSelectable:J,nodeClickDistance:T}),k=gm();if(N.hidden)return null;const L=_a(N),$=dA(N),Z=J||K||a||i||s||r,Y=i?ue=>i(ue,{...C.userNode}):void 0,A=s?ue=>s(ue,{...C.userNode}):void 0,O=r?ue=>r(ue,{...C.userNode}):void 0,G=c?ue=>c(ue,{...C.userNode}):void 0,P=u?ue=>u(ue,{...C.userNode}):void 0,se=ue=>{const{selectNodesOnDrag:me,nodeDragThreshold:Ne}=F.getState();J&&(!me||!K||Ne>0)&&Xu({id:n,store:F,nodeRef:H}),a&&a(ue,{...C.userNode})},ge=ue=>{if(!(dg(ue.nativeEvent)||b)){if(Fp.includes(ue.key)&&J){const me=ue.key==="Escape";Xu({id:n,store:F,unselect:me,nodeRef:H})}else if(K&&N.selected&&Object.prototype.hasOwnProperty.call(xr,ue.key)){ue.preventDefault();const{ariaLabelConfig:me}=F.getState();F.setState({ariaLiveMessage:me["node.a11yDescription.ariaLiveMessage"]({direction:ue.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),k({direction:xr[ue.key],factor:ue.shiftKey?4:1})}}},he=()=>{if(b||!H.current?.matches(":focus-visible"))return;const{transform:ue,width:me,height:Ne,autoPanOnNodeFocus:ke,setCenter:Se}=F.getState();if(!ke)return;wu(new Map([[n,N]]),{x:0,y:0,width:me,height:Ne},ue,!0).length>0||Se(N.position.x+L.width/2,N.position.y+L.height/2,{zoom:ue[2]})};return m.jsx("div",{className:Tt(["react-flow__node",`react-flow__node-${R}`,{[S]:K},N.className,{selected:N.selected,selectable:J,parent:D,draggable:K,dragging:I}]),ref:H,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:Z?"all":"none",visibility:ae?"visible":"hidden",...N.style,...$},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:Y,onMouseMove:A,onMouseLeave:O,onContextMenu:G,onClick:se,onDoubleClick:P,onKeyDown:U?ge:void 0,tabIndex:U?0:void 0,onFocus:U?he:void 0,role:N.ariaRole??(U?"group":void 0),"aria-roledescription":"node","aria-describedby":b?void 0:`${Fg}-${E}`,"aria-label":N.ariaLabel,...N.domAttributes,children:m.jsx(lA,{value:n,children:m.jsx(j,{id:n,data:N.data,type:R,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:N.selected??!1,selectable:J,draggable:K,deletable:N.deletable??!0,isConnectable:fe,sourcePosition:N.sourcePosition,targetPosition:N.targetPosition,dragging:I,dragHandle:N.dragHandle,zIndex:C.z,parentId:N.parentId,...L})})})}var EA=B.memo(wA);const _A=n=>({nodesDraggable:n.nodesDraggable,nodesConnectable:n.nodesConnectable,nodesFocusable:n.nodesFocusable,elementsSelectable:n.elementsSelectable,onError:n.onError});function bm(n){const{nodesDraggable:a,nodesConnectable:i,nodesFocusable:s,elementsSelectable:r,onError:c}=$e(_A,ut),u=xA(n.onlyRenderVisibleElements),h=bA();return m.jsx("div",{className:"react-flow__nodes",style:yr,children:u.map(g=>m.jsx(EA,{id:g,nodeTypes:n.nodeTypes,nodeExtent:n.nodeExtent,onClick:n.onNodeClick,onMouseEnter:n.onNodeMouseEnter,onMouseMove:n.onNodeMouseMove,onMouseLeave:n.onNodeMouseLeave,onContextMenu:n.onNodeContextMenu,onDoubleClick:n.onNodeDoubleClick,noDragClassName:n.noDragClassName,noPanClassName:n.noPanClassName,rfId:n.rfId,disableKeyboardA11y:n.disableKeyboardA11y,resizeObserver:h,nodesDraggable:a,nodesConnectable:i,nodesFocusable:s,elementsSelectable:r,nodeClickDistance:n.nodeClickDistance,onError:c},g))})}bm.displayName="NodeRenderer";const AA=B.memo(bm);function NA(n){return $e(B.useCallback(i=>{if(!n)return i.edges.map(r=>r.id);const s=[];if(i.width&&i.height)for(const r of i.edges){const c=i.nodeLookup.get(r.source),u=i.nodeLookup.get(r.target);c&&u&&AE({sourceNode:c,targetNode:u,width:i.width,height:i.height,transform:i.transform})&&s.push(r.id)}return s},[n]),ut)}const kA=({color:n="none",strokeWidth:a=1})=>{const i={strokeWidth:a,...n&&{stroke:n}};return m.jsx("polyline",{className:"arrow",style:i,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},TA=({color:n="none",strokeWidth:a=1})=>{const i={strokeWidth:a,...n&&{stroke:n,fill:n}};return m.jsx("polyline",{className:"arrowclosed",style:i,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Sm={[sr.Arrow]:kA,[sr.ArrowClosed]:TA};function CA(n){const a=ft();return B.useMemo(()=>Object.prototype.hasOwnProperty.call(Sm,n)?Sm[n]:(a.getState().onError?.("009",ua.error009(n)),null),[n])}const MA=({id:n,type:a,color:i,width:s=12.5,height:r=12.5,markerUnits:c="strokeWidth",strokeWidth:u,orient:h="auto-start-reverse"})=>{const g=CA(a);return g?m.jsx("marker",{className:"react-flow__arrowhead",id:n,markerWidth:`${s}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:c,orient:h,refX:"0",refY:"0",children:m.jsx(g,{color:i,strokeWidth:u})}):null},wm=({defaultColor:n,rfId:a})=>{const i=$e(c=>c.edges),s=$e(c=>c.defaultEdgeOptions),r=B.useMemo(()=>DE(i,{id:a,defaultColor:n,defaultMarkerStart:s?.markerStart,defaultMarkerEnd:s?.markerEnd}),[i,s,a,n]);return r.length?m.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:m.jsx("defs",{children:r.map(c=>m.jsx(MA,{id:c.id,type:c.type,color:c.color,width:c.width,height:c.height,markerUnits:c.markerUnits,strokeWidth:c.strokeWidth,orient:c.orient},c.id))})}):null};wm.displayName="MarkerDefinitions";var zA=B.memo(wm);function Em({x:n,y:a,label:i,labelStyle:s,labelShowBg:r=!0,labelBgStyle:c,labelBgPadding:u=[2,4],labelBgBorderRadius:h=2,children:g,className:p,...x}){const[y,v]=B.useState({x:1,y:0,width:0,height:0}),S=Tt(["react-flow__edge-textwrapper",p]),b=B.useRef(null);return B.useEffect(()=>{if(b.current){const E=b.current.getBBox();v({x:E.x,y:E.y,width:E.width,height:E.height})}},[i]),i?m.jsxs("g",{transform:`translate(${n-y.width/2} ${a-y.height/2})`,className:S,visibility:y.width?"visible":"hidden",...x,children:[r&&m.jsx("rect",{width:y.width+2*u[0],x:-u[0],y:-u[1],height:y.height+2*u[1],className:"react-flow__edge-textbg",style:c,rx:h,ry:h}),m.jsx("text",{className:"react-flow__edge-text",y:y.height/2,dy:"0.3em",ref:b,style:s,children:i}),g]}):null}Em.displayName="EdgeText";const DA=B.memo(Em);function vr({path:n,labelX:a,labelY:i,label:s,labelStyle:r,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:g,interactionWidth:p=20,...x}){return m.jsxs(m.Fragment,{children:[m.jsx("path",{...x,d:n,fill:"none",className:Tt(["react-flow__edge-path",x.className])}),p?m.jsx("path",{d:n,fill:"none",strokeOpacity:0,strokeWidth:p,className:"react-flow__edge-interaction"}):null,s&&Qn(a)&&Qn(i)?m.jsx(DA,{x:a,y:i,label:s,labelStyle:r,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:g}):null]})}function _m({pos:n,x1:a,y1:i,x2:s,y2:r}){return n===be.Left||n===be.Right?[.5*(a+s),i]:[a,.5*(i+r)]}function Am({sourceX:n,sourceY:a,sourcePosition:i=be.Bottom,targetX:s,targetY:r,targetPosition:c=be.Top}){const[u,h]=_m({pos:i,x1:n,y1:a,x2:s,y2:r}),[g,p]=_m({pos:c,x1:s,y1:r,x2:n,y2:a}),[x,y,v,S]=gg({sourceX:n,sourceY:a,targetX:s,targetY:r,sourceControlX:u,sourceControlY:h,targetControlX:g,targetControlY:p});return[`M${n},${a} C${u},${h} ${g},${p} ${s},${r}`,x,y,v,S]}function Nm(n){return B.memo(({id:a,sourceX:i,sourceY:s,targetX:r,targetY:c,sourcePosition:u,targetPosition:h,label:g,labelStyle:p,labelShowBg:x,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:S,style:b,markerEnd:E,markerStart:_,interactionWidth:T})=>{const[z,N,C]=Am({sourceX:i,sourceY:s,sourcePosition:u,targetX:r,targetY:c,targetPosition:h}),D=n.isInternal?void 0:a;return m.jsx(vr,{id:D,path:z,labelX:N,labelY:C,label:g,labelStyle:p,labelShowBg:x,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:S,style:b,markerEnd:E,markerStart:_,interactionWidth:T})})}const OA=Nm({isInternal:!1}),km=Nm({isInternal:!0});OA.displayName="SimpleBezierEdge",km.displayName="SimpleBezierEdgeInternal";function Tm(n){return B.memo(({id:a,sourceX:i,sourceY:s,targetX:r,targetY:c,label:u,labelStyle:h,labelShowBg:g,labelBgStyle:p,labelBgPadding:x,labelBgBorderRadius:y,style:v,sourcePosition:S=be.Bottom,targetPosition:b=be.Top,markerEnd:E,markerStart:_,pathOptions:T,interactionWidth:z})=>{const[N,C,D]=ku({sourceX:i,sourceY:s,sourcePosition:S,targetX:r,targetY:c,targetPosition:b,borderRadius:T?.borderRadius,offset:T?.offset,stepPosition:T?.stepPosition}),R=n.isInternal?void 0:a;return m.jsx(vr,{id:R,path:N,labelX:C,labelY:D,label:u,labelStyle:h,labelShowBg:g,labelBgStyle:p,labelBgPadding:x,labelBgBorderRadius:y,style:v,markerEnd:E,markerStart:_,interactionWidth:z})})}const Cm=Tm({isInternal:!1}),Mm=Tm({isInternal:!0});Cm.displayName="SmoothStepEdge",Mm.displayName="SmoothStepEdgeInternal";function zm(n){return B.memo(({id:a,...i})=>{const s=n.isInternal?void 0:a;return m.jsx(Cm,{...i,id:s,pathOptions:B.useMemo(()=>({borderRadius:0,offset:i.pathOptions?.offset}),[i.pathOptions?.offset])})})}const RA=zm({isInternal:!1}),Dm=zm({isInternal:!0});RA.displayName="StepEdge",Dm.displayName="StepEdgeInternal";function Om(n){return B.memo(({id:a,sourceX:i,sourceY:s,targetX:r,targetY:c,label:u,labelStyle:h,labelShowBg:g,labelBgStyle:p,labelBgPadding:x,labelBgBorderRadius:y,style:v,markerEnd:S,markerStart:b,interactionWidth:E})=>{const[_,T,z]=vg({sourceX:i,sourceY:s,targetX:r,targetY:c}),N=n.isInternal?void 0:a;return m.jsx(vr,{id:N,path:_,labelX:T,labelY:z,label:u,labelStyle:h,labelShowBg:g,labelBgStyle:p,labelBgPadding:x,labelBgBorderRadius:y,style:v,markerEnd:S,markerStart:b,interactionWidth:E})})}const jA=Om({isInternal:!1}),Rm=Om({isInternal:!0});jA.displayName="StraightEdge",Rm.displayName="StraightEdgeInternal";function jm(n){return B.memo(({id:a,sourceX:i,sourceY:s,targetX:r,targetY:c,sourcePosition:u=be.Bottom,targetPosition:h=be.Top,label:g,labelStyle:p,labelShowBg:x,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:S,style:b,markerEnd:E,markerStart:_,pathOptions:T,interactionWidth:z})=>{const[N,C,D]=Nu({sourceX:i,sourceY:s,sourcePosition:u,targetX:r,targetY:c,targetPosition:h,curvature:T?.curvature}),R=n.isInternal?void 0:a;return m.jsx(vr,{id:R,path:N,labelX:C,labelY:D,label:g,labelStyle:p,labelShowBg:x,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:S,style:b,markerEnd:E,markerStart:_,interactionWidth:z})})}const LA=jm({isInternal:!1}),Lm=jm({isInternal:!0});LA.displayName="BezierEdge",Lm.displayName="BezierEdgeInternal";const Hm={default:Lm,straight:Rm,step:Dm,smoothstep:Mm,simplebezier:km},Bm={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},HA=(n,a,i)=>i===be.Left?n-a:i===be.Right?n+a:n,BA=(n,a,i)=>i===be.Top?n-a:i===be.Bottom?n+a:n,Um="react-flow__edgeupdater";function Vm({position:n,centerX:a,centerY:i,radius:s=10,onMouseDown:r,onMouseEnter:c,onMouseOut:u,type:h}){return m.jsx("circle",{onMouseDown:r,onMouseEnter:c,onMouseOut:u,className:Tt([Um,`${Um}-${h}`]),cx:HA(a,s,n),cy:BA(i,s,n),r:s,stroke:"transparent",fill:"transparent"})}function UA({isReconnectable:n,reconnectRadius:a,edge:i,sourceX:s,sourceY:r,targetX:c,targetY:u,sourcePosition:h,targetPosition:g,onReconnect:p,onReconnectStart:x,onReconnectEnd:y,setReconnecting:v,setUpdateHover:S}){const b=ft(),E=(C,D)=>{if(C.button!==0)return;const{autoPanOnConnect:R,domNode:j,isValidConnection:K,connectionMode:J,connectionRadius:fe,lib:U,onConnectStart:F,onConnectEnd:ae,cancelConnection:H,nodeLookup:I,rfId:k,panBy:L,updateConnection:$}=b.getState(),Z=D.type==="target",Y=(G,P)=>{v(!1),y?.(G,i,D.type,P)},A=G=>p?.(i,G),O=(G,P)=>{v(!0),x?.(C,i,D.type),F?.(G,P)};ju.onPointerDown(C.nativeEvent,{autoPanOnConnect:R,connectionMode:J,connectionRadius:fe,domNode:j,handleId:D.id,nodeId:D.nodeId,nodeLookup:I,isTarget:Z,edgeUpdaterType:D.type,lib:U,flowId:k,cancelConnection:H,panBy:L,isValidConnection:K,onConnect:A,onConnectStart:O,onConnectEnd:ae,onReconnectEnd:Y,updateConnection:$,getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,dragThreshold:b.getState().connectionDragThreshold,handleDomNode:C.currentTarget})},_=C=>E(C,{nodeId:i.target,id:i.targetHandle??null,type:"target"}),T=C=>E(C,{nodeId:i.source,id:i.sourceHandle??null,type:"source"}),z=()=>S(!0),N=()=>S(!1);return m.jsxs(m.Fragment,{children:[(n===!0||n==="source")&&m.jsx(Vm,{position:h,centerX:s,centerY:r,radius:a,onMouseDown:_,onMouseEnter:z,onMouseOut:N,type:"source"}),(n===!0||n==="target")&&m.jsx(Vm,{position:g,centerX:c,centerY:u,radius:a,onMouseDown:T,onMouseEnter:z,onMouseOut:N,type:"target"})]})}function VA({id:n,edgesFocusable:a,edgesReconnectable:i,elementsSelectable:s,onClick:r,onDoubleClick:c,onContextMenu:u,onMouseEnter:h,onMouseMove:g,onMouseLeave:p,reconnectRadius:x,onReconnect:y,onReconnectStart:v,onReconnectEnd:S,rfId:b,edgeTypes:E,noPanClassName:_,onError:T,disableKeyboardA11y:z}){let N=$e(Se=>Se.edgeLookup.get(n));const C=$e(Se=>Se.defaultEdgeOptions);N=C?{...C,...N}:N;let D=N.type||"default",R=E?.[D]||Hm[D];R===void 0&&(T?.("011",ua.error011(D)),D="default",R=E?.default||Hm.default);const j=!!(N.focusable||a&&typeof N.focusable>"u"),K=typeof y<"u"&&(N.reconnectable||i&&typeof N.reconnectable>"u"),J=!!(N.selectable||s&&typeof N.selectable>"u"),fe=B.useRef(null),[U,F]=B.useState(!1),[ae,H]=B.useState(!1),I=ft(),{zIndex:k,sourceX:L,sourceY:$,targetX:Z,targetY:Y,sourcePosition:A,targetPosition:O}=$e(B.useCallback(Se=>{const _e=Se.nodeLookup.get(N.source),we=Se.nodeLookup.get(N.target);if(!_e||!we)return{zIndex:N.zIndex,...Bm};const Me=zE({id:n,sourceNode:_e,targetNode:we,sourceHandle:N.sourceHandle||null,targetHandle:N.targetHandle||null,connectionMode:Se.connectionMode,onError:T});return{zIndex:_E({selected:N.selected,zIndex:N.zIndex,sourceNode:_e,targetNode:we,elevateOnSelect:Se.elevateEdgesOnSelect}),...Me||Bm}},[N.source,N.target,N.sourceHandle,N.targetHandle,N.selected,N.zIndex]),ut),G=B.useMemo(()=>N.markerStart?`url('#${Tu(N.markerStart,b)}')`:void 0,[N.markerStart,b]),P=B.useMemo(()=>N.markerEnd?`url('#${Tu(N.markerEnd,b)}')`:void 0,[N.markerEnd,b]);if(N.hidden||L===null||$===null||Z===null||Y===null)return null;const se=Se=>{const{addSelectedEdges:_e,unselectNodesAndEdges:we,multiSelectionActive:Me}=I.getState();J&&(I.setState({nodesSelectionActive:!1}),N.selected&&Me?(we({nodes:[],edges:[N]}),fe.current?.blur()):_e([n])),r&&r(Se,N)},ge=c?Se=>{c(Se,{...N})}:void 0,he=u?Se=>{u(Se,{...N})}:void 0,ue=h?Se=>{h(Se,{...N})}:void 0,me=g?Se=>{g(Se,{...N})}:void 0,Ne=p?Se=>{p(Se,{...N})}:void 0,ke=Se=>{if(!z&&Fp.includes(Se.key)&&J){const{unselectNodesAndEdges:_e,addSelectedEdges:we}=I.getState();Se.key==="Escape"?(fe.current?.blur(),_e({edges:[N]})):we([n])}};return m.jsx("svg",{style:{zIndex:k},children:m.jsxs("g",{className:Tt(["react-flow__edge",`react-flow__edge-${D}`,N.className,_,{selected:N.selected,animated:N.animated,inactive:!J&&!r,updating:U,selectable:J}]),onClick:se,onDoubleClick:ge,onContextMenu:he,onMouseEnter:ue,onMouseMove:me,onMouseLeave:Ne,onKeyDown:j?ke:void 0,tabIndex:j?0:void 0,role:N.ariaRole??(j?"group":"img"),"aria-roledescription":"edge","data-id":n,"data-testid":`rf__edge-${n}`,"aria-label":N.ariaLabel===null?void 0:N.ariaLabel||`Edge from ${N.source} to ${N.target}`,"aria-describedby":j?`${Jg}-${b}`:void 0,ref:fe,...N.domAttributes,children:[!ae&&m.jsx(R,{id:n,source:N.source,target:N.target,type:N.type,selected:N.selected,animated:N.animated,selectable:J,deletable:N.deletable??!0,label:N.label,labelStyle:N.labelStyle,labelShowBg:N.labelShowBg,labelBgStyle:N.labelBgStyle,labelBgPadding:N.labelBgPadding,labelBgBorderRadius:N.labelBgBorderRadius,sourceX:L,sourceY:$,targetX:Z,targetY:Y,sourcePosition:A,targetPosition:O,data:N.data,style:N.style,sourceHandleId:N.sourceHandle,targetHandleId:N.targetHandle,markerStart:G,markerEnd:P,pathOptions:"pathOptions"in N?N.pathOptions:void 0,interactionWidth:N.interactionWidth}),K&&m.jsx(UA,{edge:N,isReconnectable:K,reconnectRadius:x,onReconnect:y,onReconnectStart:v,onReconnectEnd:S,sourceX:L,sourceY:$,targetX:Z,targetY:Y,sourcePosition:A,targetPosition:O,setUpdateHover:F,setReconnecting:H})]})})}var $A=B.memo(VA);const YA=n=>({edgesFocusable:n.edgesFocusable,edgesReconnectable:n.edgesReconnectable,elementsSelectable:n.elementsSelectable,connectionMode:n.connectionMode,onError:n.onError});function $m({defaultMarkerColor:n,onlyRenderVisibleElements:a,rfId:i,edgeTypes:s,noPanClassName:r,onReconnect:c,onEdgeContextMenu:u,onEdgeMouseEnter:h,onEdgeMouseMove:g,onEdgeMouseLeave:p,onEdgeClick:x,reconnectRadius:y,onEdgeDoubleClick:v,onReconnectStart:S,onReconnectEnd:b,disableKeyboardA11y:E}){const{edgesFocusable:_,edgesReconnectable:T,elementsSelectable:z,onError:N}=$e(YA,ut),C=NA(a);return m.jsxs("div",{className:"react-flow__edges",children:[m.jsx(zA,{defaultColor:n,rfId:i}),C.map(D=>m.jsx($A,{id:D,edgesFocusable:_,edgesReconnectable:T,elementsSelectable:z,noPanClassName:r,onReconnect:c,onContextMenu:u,onMouseEnter:h,onMouseMove:g,onMouseLeave:p,onClick:x,reconnectRadius:y,onDoubleClick:v,onReconnectStart:S,onReconnectEnd:b,rfId:i,onError:N,edgeTypes:s,disableKeyboardA11y:E},D))]})}$m.displayName="EdgeRenderer";const qA=B.memo($m),XA=n=>`translate(${n.transform[0]}px,${n.transform[1]}px) scale(${n.transform[2]})`;function GA({children:n}){const a=$e(XA);return m.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:a},children:n})}function ZA(n){const a=Wa(),i=B.useRef(!1);B.useEffect(()=>{!i.current&&a.viewportInitialized&&n&&(setTimeout(()=>n(a),1),i.current=!0)},[n,a.viewportInitialized])}const IA=n=>n.panZoom?.syncViewport;function QA(n){const a=$e(IA),i=ft();return B.useEffect(()=>{n&&(a?.(n),i.setState({transform:[n.x,n.y,n.zoom]}))},[n,a]),null}function KA(n){return n.connection.inProgress?{...n.connection,to:To(n.connection.to,n.transform)}:{...n.connection}}function FA(n){return KA}function JA(n){const a=FA();return $e(a,ut)}const PA=n=>({nodesConnectable:n.nodesConnectable,isValid:n.connection.isValid,inProgress:n.connection.inProgress,width:n.width,height:n.height});function WA({containerStyle:n,style:a,type:i,component:s}){const{nodesConnectable:r,width:c,height:u,isValid:h,inProgress:g}=$e(PA,ut);return!(c&&r&&g)?null:m.jsx("svg",{style:n,width:c,height:u,className:"react-flow__connectionline react-flow__container",children:m.jsx("g",{className:Tt(["react-flow__connection",eg(h)]),children:m.jsx(Ym,{style:a,type:i,CustomComponent:s,isValid:h})})})}const Ym=({style:n,type:a=Fa.Bezier,CustomComponent:i,isValid:s})=>{const{inProgress:r,from:c,fromNode:u,fromHandle:h,fromPosition:g,to:p,toNode:x,toHandle:y,toPosition:v}=JA();if(!r)return;if(i)return m.jsx(i,{connectionLineType:a,connectionLineStyle:n,fromNode:u,fromHandle:h,fromX:c.x,fromY:c.y,toX:p.x,toY:p.y,fromPosition:g,toPosition:v,connectionStatus:eg(s),toNode:x,toHandle:y});let S="";const b={sourceX:c.x,sourceY:c.y,sourcePosition:g,targetX:p.x,targetY:p.y,targetPosition:v};switch(a){case Fa.Bezier:[S]=Nu(b);break;case Fa.SimpleBezier:[S]=Am(b);break;case Fa.Step:[S]=ku({...b,borderRadius:0});break;case Fa.SmoothStep:[S]=ku(b);break;default:[S]=vg(b)}return m.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:n})};Ym.displayName="ConnectionLine";const eN={};function qm(n=eN){B.useRef(n),ft(),B.useEffect(()=>{},[n])}function tN(){ft(),B.useRef(!1),B.useEffect(()=>{},[])}function Xm({nodeTypes:n,edgeTypes:a,onInit:i,onNodeClick:s,onEdgeClick:r,onNodeDoubleClick:c,onEdgeDoubleClick:u,onNodeMouseEnter:h,onNodeMouseMove:g,onNodeMouseLeave:p,onNodeContextMenu:x,onSelectionContextMenu:y,onSelectionStart:v,onSelectionEnd:S,connectionLineType:b,connectionLineStyle:E,connectionLineComponent:_,connectionLineContainerStyle:T,selectionKeyCode:z,selectionOnDrag:N,selectionMode:C,multiSelectionKeyCode:D,panActivationKeyCode:R,zoomActivationKeyCode:j,deleteKeyCode:K,onlyRenderVisibleElements:J,elementsSelectable:fe,defaultViewport:U,translateExtent:F,minZoom:ae,maxZoom:H,preventScrolling:I,defaultMarkerColor:k,zoomOnScroll:L,zoomOnPinch:$,panOnScroll:Z,panOnScrollSpeed:Y,panOnScrollMode:A,zoomOnDoubleClick:O,panOnDrag:G,onPaneClick:P,onPaneMouseEnter:se,onPaneMouseMove:ge,onPaneMouseLeave:he,onPaneScroll:ue,onPaneContextMenu:me,paneClickDistance:Ne,nodeClickDistance:ke,onEdgeContextMenu:Se,onEdgeMouseEnter:_e,onEdgeMouseMove:we,onEdgeMouseLeave:Me,reconnectRadius:Re,onReconnect:le,onReconnectStart:de,onReconnectEnd:Je,noDragClassName:et,noWheelClassName:on,noPanClassName:wn,disableKeyboardA11y:_t,nodeExtent:gt,rfId:sn,viewport:Bt,onViewportChange:$t}){return qm(n),qm(a),tN(),ZA(i),QA(Bt),m.jsx(mA,{onPaneClick:P,onPaneMouseEnter:se,onPaneMouseMove:ge,onPaneMouseLeave:he,onPaneContextMenu:me,onPaneScroll:ue,paneClickDistance:Ne,deleteKeyCode:K,selectionKeyCode:z,selectionOnDrag:N,selectionMode:C,onSelectionStart:v,onSelectionEnd:S,multiSelectionKeyCode:D,panActivationKeyCode:R,zoomActivationKeyCode:j,elementsSelectable:fe,zoomOnScroll:L,zoomOnPinch:$,zoomOnDoubleClick:O,panOnScroll:Z,panOnScrollSpeed:Y,panOnScrollMode:A,panOnDrag:G,defaultViewport:U,translateExtent:F,minZoom:ae,maxZoom:H,onSelectionContextMenu:y,preventScrolling:I,noDragClassName:et,noWheelClassName:on,noPanClassName:wn,disableKeyboardA11y:_t,onViewportChange:$t,isControlledViewport:!!Bt,children:m.jsxs(GA,{children:[m.jsx(qA,{edgeTypes:a,onEdgeClick:r,onEdgeDoubleClick:u,onReconnect:le,onReconnectStart:de,onReconnectEnd:Je,onlyRenderVisibleElements:J,onEdgeContextMenu:Se,onEdgeMouseEnter:_e,onEdgeMouseMove:we,onEdgeMouseLeave:Me,reconnectRadius:Re,defaultMarkerColor:k,noPanClassName:wn,disableKeyboardA11y:_t,rfId:sn}),m.jsx(WA,{style:E,type:b,component:_,containerStyle:T}),m.jsx("div",{className:"react-flow__edgelabel-renderer"}),m.jsx(AA,{nodeTypes:n,onNodeClick:s,onNodeDoubleClick:c,onNodeMouseEnter:h,onNodeMouseMove:g,onNodeMouseLeave:p,onNodeContextMenu:x,nodeClickDistance:ke,onlyRenderVisibleElements:J,noPanClassName:wn,noDragClassName:et,disableKeyboardA11y:_t,nodeExtent:gt,rfId:sn}),m.jsx("div",{className:"react-flow__viewport-portal"})]})})}Xm.displayName="GraphView";const nN=B.memo(Xm),Gm=({nodes:n,edges:a,defaultNodes:i,defaultEdges:s,width:r,height:c,fitView:u,fitViewOptions:h,minZoom:g=.5,maxZoom:p=2,nodeOrigin:x,nodeExtent:y}={})=>{const v=new Map,S=new Map,b=new Map,E=new Map,_=s??a??[],T=i??n??[],z=x??[0,0],N=y??wo;Tg(b,E,_);const C=zu(T,v,S,{nodeOrigin:z,nodeExtent:N,elevateNodesOnSelect:!1});let D=[0,0,1];if(u&&r&&c){const R=Ao(v,{filter:fe=>!!((fe.width||fe.initialWidth)&&(fe.height||fe.initialHeight))}),{x:j,y:K,zoom:J}=_u(R,r,c,g,p,h?.padding??.1);D=[j,K,J]}return{rfId:"1",width:r??0,height:c??0,transform:D,nodes:T,nodesInitialized:C,nodeLookup:v,parentLookup:S,edges:_,edgeLookup:E,connectionLookup:b,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:i!==void 0,hasDefaultEdges:s!==void 0,panZoom:null,minZoom:g,maxZoom:p,translateExtent:wo,nodeExtent:N,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:ui.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:z,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!1,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:u??!1,fitViewOptions:h,fitViewResolver:null,connection:{...Pp},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:xE,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Jp}},aN=({nodes:n,edges:a,defaultNodes:i,defaultEdges:s,width:r,height:c,fitView:u,fitViewOptions:h,minZoom:g,maxZoom:p,nodeOrigin:x,nodeExtent:y})=>w_((v,S)=>{async function b(){const{nodeLookup:E,panZoom:_,fitViewOptions:T,fitViewResolver:z,width:N,height:C,minZoom:D,maxZoom:R}=S();_&&(await mE({nodes:E,width:N,height:C,panZoom:_,minZoom:D,maxZoom:R},T),z?.resolve(!0),v({fitViewResolver:null}))}return{...Gm({nodes:n,edges:a,width:r,height:c,fitView:u,fitViewOptions:h,minZoom:g,maxZoom:p,nodeOrigin:x,nodeExtent:y,defaultNodes:i,defaultEdges:s}),setNodes:E=>{const{nodeLookup:_,parentLookup:T,nodeOrigin:z,elevateNodesOnSelect:N,fitViewQueued:C}=S(),D=zu(E,_,T,{nodeOrigin:z,nodeExtent:y,elevateNodesOnSelect:N,checkEquality:!0});C&&D?(b(),v({nodes:E,nodesInitialized:D,fitViewQueued:!1,fitViewOptions:void 0})):v({nodes:E,nodesInitialized:D})},setEdges:E=>{const{connectionLookup:_,edgeLookup:T}=S();Tg(_,T,E),v({edges:E})},setDefaultNodesAndEdges:(E,_)=>{if(E){const{setNodes:T}=S();T(E),v({hasDefaultNodes:!0})}if(_){const{setEdges:T}=S();T(_),v({hasDefaultEdges:!0})}},updateNodeInternals:E=>{const{triggerNodeChanges:_,nodeLookup:T,parentLookup:z,domNode:N,nodeOrigin:C,nodeExtent:D,debug:R,fitViewQueued:j}=S(),{changes:K,updatedInternals:J}=UE(E,T,z,N,C,D);J&&(jE(T,z,{nodeOrigin:C,nodeExtent:D}),j?(b(),v({fitViewQueued:!1,fitViewOptions:void 0})):v({}),K?.length>0&&(R&&console.log("React Flow: trigger node changes",K),_?.(K)))},updateNodePositions:(E,_=!1)=>{const T=[],z=[],{nodeLookup:N,triggerNodeChanges:C}=S();for(const[D,R]of E){const j=N.get(D),K=!!(j?.expandParent&&j?.parentId&&R?.position),J={id:D,type:"position",position:K?{x:Math.max(0,R.position.x),y:Math.max(0,R.position.y)}:R.position,dragging:_};K&&j.parentId&&T.push({id:D,parentId:j.parentId,rect:{...R.internals.positionAbsolute,width:R.measured.width??0,height:R.measured.height??0}}),z.push(J)}if(T.length>0){const{parentLookup:D,nodeOrigin:R}=S(),j=Ou(T,N,D,R);z.push(...j)}C(z)},triggerNodeChanges:E=>{const{onNodesChange:_,setNodes:T,nodes:z,hasDefaultNodes:N,debug:C}=S();if(E?.length){if(N){const D=Yu(E,z);T(D)}C&&console.log("React Flow: trigger node changes",E),_?.(E)}},triggerEdgeChanges:E=>{const{onEdgesChange:_,setEdges:T,edges:z,hasDefaultEdges:N,debug:C}=S();if(E?.length){if(N){const D=om(E,z);T(D)}C&&console.log("React Flow: trigger edge changes",E),_?.(E)}},addSelectedNodes:E=>{const{multiSelectionActive:_,edgeLookup:T,nodeLookup:z,triggerNodeChanges:N,triggerEdgeChanges:C}=S();if(_){const D=E.map(R=>jl(R,!0));N(D);return}N(mi(z,new Set([...E]),!0)),C(mi(T))},addSelectedEdges:E=>{const{multiSelectionActive:_,edgeLookup:T,nodeLookup:z,triggerNodeChanges:N,triggerEdgeChanges:C}=S();if(_){const D=E.map(R=>jl(R,!0));C(D);return}C(mi(T,new Set([...E]))),N(mi(z,new Set,!0))},unselectNodesAndEdges:({nodes:E,edges:_}={})=>{const{edges:T,nodes:z,nodeLookup:N,triggerNodeChanges:C,triggerEdgeChanges:D}=S(),R=E||z,j=_||T,K=R.map(fe=>{const U=N.get(fe.id);return U&&(U.selected=!1),jl(fe.id,!1)}),J=j.map(fe=>jl(fe.id,!1));C(K),D(J)},setMinZoom:E=>{const{panZoom:_,maxZoom:T}=S();_?.setScaleExtent([E,T]),v({minZoom:E})},setMaxZoom:E=>{const{panZoom:_,minZoom:T}=S();_?.setScaleExtent([T,E]),v({maxZoom:E})},setTranslateExtent:E=>{S().panZoom?.setTranslateExtent(E),v({translateExtent:E})},resetSelectedElements:()=>{const{edges:E,nodes:_,triggerNodeChanges:T,triggerEdgeChanges:z,elementsSelectable:N}=S();if(!N)return;const C=_.reduce((R,j)=>j.selected?[...R,jl(j.id,!1)]:R,[]),D=E.reduce((R,j)=>j.selected?[...R,jl(j.id,!1)]:R,[]);T(C),z(D)},setNodeExtent:E=>{const{nodes:_,nodeLookup:T,parentLookup:z,nodeOrigin:N,elevateNodesOnSelect:C,nodeExtent:D}=S();E[0][0]===D[0][0]&&E[0][1]===D[0][1]&&E[1][0]===D[1][0]&&E[1][1]===D[1][1]||(zu(_,T,z,{nodeOrigin:N,nodeExtent:E,elevateNodesOnSelect:C,checkEquality:!1}),v({nodeExtent:E}))},panBy:E=>{const{transform:_,width:T,height:z,panZoom:N,translateExtent:C}=S();return VE({delta:E,panZoom:N,transform:_,translateExtent:C,width:T,height:z})},setCenter:async(E,_,T)=>{const{width:z,height:N,maxZoom:C,panZoom:D}=S();if(!D)return Promise.resolve(!1);const R=typeof T?.zoom<"u"?T.zoom:C;return await D.setViewport({x:z/2-E*R,y:N/2-_*R,zoom:R},{duration:T?.duration,ease:T?.ease,interpolate:T?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{v({connection:{...Pp}})},updateConnection:E=>{v({connection:E})},reset:()=>v({...Gm()})}},Object.is);function Zu({initialNodes:n,initialEdges:a,defaultNodes:i,defaultEdges:s,initialWidth:r,initialHeight:c,initialMinZoom:u,initialMaxZoom:h,initialFitViewOptions:g,fitView:p,nodeOrigin:x,nodeExtent:y,children:v}){const[S]=B.useState(()=>aN({nodes:n,edges:a,defaultNodes:i,defaultEdges:s,width:r,height:c,fitView:p,minZoom:u,maxZoom:h,fitViewOptions:g,nodeOrigin:x,nodeExtent:y}));return m.jsx(E_,{value:S,children:m.jsx(G_,{children:v})})}function lN({children:n,nodes:a,edges:i,defaultNodes:s,defaultEdges:r,width:c,height:u,fitView:h,fitViewOptions:g,minZoom:p,maxZoom:x,nodeOrigin:y,nodeExtent:v}){return B.useContext(gr)?m.jsx(m.Fragment,{children:n}):m.jsx(Zu,{initialNodes:a,initialEdges:i,defaultNodes:s,defaultEdges:r,initialWidth:c,initialHeight:u,fitView:h,initialFitViewOptions:g,initialMinZoom:p,initialMaxZoom:x,nodeOrigin:y,nodeExtent:v,children:n})}const iN={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function oN({nodes:n,edges:a,defaultNodes:i,defaultEdges:s,className:r,nodeTypes:c,edgeTypes:u,onNodeClick:h,onEdgeClick:g,onInit:p,onMove:x,onMoveStart:y,onMoveEnd:v,onConnect:S,onConnectStart:b,onConnectEnd:E,onClickConnectStart:_,onClickConnectEnd:T,onNodeMouseEnter:z,onNodeMouseMove:N,onNodeMouseLeave:C,onNodeContextMenu:D,onNodeDoubleClick:R,onNodeDragStart:j,onNodeDrag:K,onNodeDragStop:J,onNodesDelete:fe,onEdgesDelete:U,onDelete:F,onSelectionChange:ae,onSelectionDragStart:H,onSelectionDrag:I,onSelectionDragStop:k,onSelectionContextMenu:L,onSelectionStart:$,onSelectionEnd:Z,onBeforeDelete:Y,connectionMode:A,connectionLineType:O=Fa.Bezier,connectionLineStyle:G,connectionLineComponent:P,connectionLineContainerStyle:se,deleteKeyCode:ge="Backspace",selectionKeyCode:he="Shift",selectionOnDrag:ue=!1,selectionMode:me=Eo.Full,panActivationKeyCode:Ne="Space",multiSelectionKeyCode:ke=Co()?"Meta":"Control",zoomActivationKeyCode:Se=Co()?"Meta":"Control",snapToGrid:_e,snapGrid:we,onlyRenderVisibleElements:Me=!1,selectNodesOnDrag:Re,nodesDraggable:le,autoPanOnNodeFocus:de,nodesConnectable:Je,nodesFocusable:et,nodeOrigin:on=Pg,edgesFocusable:wn,edgesReconnectable:_t,elementsSelectable:gt=!0,defaultViewport:sn=L_,minZoom:Bt=.5,maxZoom:$t=2,translateExtent:Rt=wo,preventScrolling:Na=!0,nodeExtent:ea,defaultMarkerColor:ta="#b1b1b7",zoomOnScroll:pa=!0,zoomOnPinch:rn=!0,panOnScroll:vt=!1,panOnScrollSpeed:mt=.5,panOnScrollMode:dt=Dl.Free,zoomOnDoubleClick:ka=!0,panOnDrag:ga=!0,onPaneClick:je,onPaneMouseEnter:tt,onPaneMouseMove:yt,onPaneMouseLeave:jt,onPaneScroll:Ye,onPaneContextMenu:En,paneClickDistance:na=0,nodeClickDistance:ht=0,children:Ft,onReconnect:Ta,onReconnectStart:Dn,onReconnectEnd:ma,onEdgeContextMenu:Ca,onEdgeDoubleClick:Ma,onEdgeMouseEnter:On,onEdgeMouseMove:Ct,onEdgeMouseLeave:Yt,reconnectRadius:Rn=10,onNodesChange:Vl,onEdgesChange:cn,noDragClassName:bt="nodrag",noWheelClassName:ot="nowheel",noPanClassName:jn="nopan",fitView:za,fitViewOptions:$l,connectOnClick:bi,attributionPosition:Si,proOptions:ve,defaultEdgeOptions:q,elevateNodesOnSelect:pe,elevateEdgesOnSelect:ye,disableKeyboardA11y:Xe=!1,autoPanOnConnect:st,autoPanOnNodeDrag:De,autoPanSpeed:Lt,connectionRadius:un,isValidConnection:Jt,onError:Ln,style:At,id:al,nodeDragThreshold:Yl,connectionDragThreshold:jf,viewport:wi,onViewportChange:Ei,width:aa,height:fn,colorMode:Hr="light",debug:Lf,onScroll:_i,ariaLabelConfig:Br,...Ai},Hf){const Pt=al||"1",Ko=U_(Hr),Ur=B.useCallback(Ni=>{Ni.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),_i?.(Ni)},[_i]);return m.jsx("div",{"data-testid":"rf__wrapper",...Ai,onScroll:Ur,style:{...At,...iN},ref:Hf,className:Tt(["react-flow",r,Ko]),id:al,role:"application",children:m.jsxs(lN,{nodes:n,edges:a,width:aa,height:fn,fitView:za,fitViewOptions:$l,minZoom:Bt,maxZoom:$t,nodeOrigin:on,nodeExtent:ea,children:[m.jsx(nN,{onInit:p,onNodeClick:h,onEdgeClick:g,onNodeMouseEnter:z,onNodeMouseMove:N,onNodeMouseLeave:C,onNodeContextMenu:D,onNodeDoubleClick:R,nodeTypes:c,edgeTypes:u,connectionLineType:O,connectionLineStyle:G,connectionLineComponent:P,connectionLineContainerStyle:se,selectionKeyCode:he,selectionOnDrag:ue,selectionMode:me,deleteKeyCode:ge,multiSelectionKeyCode:ke,panActivationKeyCode:Ne,zoomActivationKeyCode:Se,onlyRenderVisibleElements:Me,defaultViewport:sn,translateExtent:Rt,minZoom:Bt,maxZoom:$t,preventScrolling:Na,zoomOnScroll:pa,zoomOnPinch:rn,zoomOnDoubleClick:ka,panOnScroll:vt,panOnScrollSpeed:mt,panOnScrollMode:dt,panOnDrag:ga,onPaneClick:je,onPaneMouseEnter:tt,onPaneMouseMove:yt,onPaneMouseLeave:jt,onPaneScroll:Ye,onPaneContextMenu:En,paneClickDistance:na,nodeClickDistance:ht,onSelectionContextMenu:L,onSelectionStart:$,onSelectionEnd:Z,onReconnect:Ta,onReconnectStart:Dn,onReconnectEnd:ma,onEdgeContextMenu:Ca,onEdgeDoubleClick:Ma,onEdgeMouseEnter:On,onEdgeMouseMove:Ct,onEdgeMouseLeave:Yt,reconnectRadius:Rn,defaultMarkerColor:ta,noDragClassName:bt,noWheelClassName:ot,noPanClassName:jn,rfId:Pt,disableKeyboardA11y:Xe,nodeExtent:ea,viewport:wi,onViewportChange:Ei}),m.jsx(B_,{nodes:n,edges:a,defaultNodes:i,defaultEdges:s,onConnect:S,onConnectStart:b,onConnectEnd:E,onClickConnectStart:_,onClickConnectEnd:T,nodesDraggable:le,autoPanOnNodeFocus:de,nodesConnectable:Je,nodesFocusable:et,edgesFocusable:wn,edgesReconnectable:_t,elementsSelectable:gt,elevateNodesOnSelect:pe,elevateEdgesOnSelect:ye,minZoom:Bt,maxZoom:$t,nodeExtent:ea,onNodesChange:Vl,onEdgesChange:cn,snapToGrid:_e,snapGrid:we,connectionMode:A,translateExtent:Rt,connectOnClick:bi,defaultEdgeOptions:q,fitView:za,fitViewOptions:$l,onNodesDelete:fe,onEdgesDelete:U,onDelete:F,onNodeDragStart:j,onNodeDrag:K,onNodeDragStop:J,onSelectionDrag:I,onSelectionDragStart:H,onSelectionDragStop:k,onMove:x,onMoveStart:y,onMoveEnd:v,noPanClassName:jn,nodeOrigin:on,rfId:Pt,autoPanOnConnect:st,autoPanOnNodeDrag:De,autoPanSpeed:Lt,onError:Ln,connectionRadius:un,isValidConnection:Jt,selectNodesOnDrag:Re,nodeDragThreshold:Yl,connectionDragThreshold:jf,onBeforeDelete:Y,debug:Lf,ariaLabelConfig:Br}),m.jsx(j_,{onSelectionChange:ae}),Ft,m.jsx(M_,{proOptions:ve,position:Si}),m.jsx(C_,{rfId:Pt,disableKeyboardA11y:Xe})]})})}var Zm=um(oN);function Im(n){return $e(B.useCallback(i=>i.nodeLookup.get(n),[n]),ut)}function sN({dimensions:n,lineWidth:a,variant:i,className:s}){return m.jsx("path",{strokeWidth:a,d:`M${n[0]/2} 0 V${n[1]} M0 ${n[1]/2} H${n[0]}`,className:Tt(["react-flow__background-pattern",i,s])})}function rN({radius:n,className:a}){return m.jsx("circle",{cx:n,cy:n,r:n,className:Tt(["react-flow__background-pattern","dots",a])})}var tl;(function(n){n.Lines="lines",n.Dots="dots",n.Cross="cross"})(tl||(tl={}));const cN={[tl.Dots]:1,[tl.Lines]:1,[tl.Cross]:6},uN=n=>({transform:n.transform,patternId:`pattern-${n.rfId}`});function Qm({id:n,variant:a=tl.Dots,gap:i=20,size:s,lineWidth:r=1,offset:c=0,color:u,bgColor:h,style:g,className:p,patternClassName:x}){const y=B.useRef(null),{transform:v,patternId:S}=$e(uN,ut),b=s||cN[a],E=a===tl.Dots,_=a===tl.Cross,T=Array.isArray(i)?i:[i,i],z=[T[0]*v[2]||1,T[1]*v[2]||1],N=b*v[2],C=Array.isArray(c)?c:[c,c],D=_?[N,N]:z,R=[C[0]*v[2]||1+D[0]/2,C[1]*v[2]||1+D[1]/2],j=`${S}${n||""}`;return m.jsxs("svg",{className:Tt(["react-flow__background",p]),style:{...g,...yr,"--xy-background-color-props":h,"--xy-background-pattern-color-props":u},ref:y,"data-testid":"rf__background",children:[m.jsx("pattern",{id:j,x:v[0]%z[0],y:v[1]%z[1],width:z[0],height:z[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${R[0]},-${R[1]})`,children:E?m.jsx(rN,{radius:N/2,className:x}):m.jsx(sN,{dimensions:D,lineWidth:r,variant:a,className:x})}),m.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${j})`})]})}Qm.displayName="Background";const fN=B.memo(Qm);function dN(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:m.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function hN(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:m.jsx("path",{d:"M0 0h32v4.2H0z"})})}function pN(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:m.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 gN(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:m.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 mN(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:m.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 Ll({children:n,className:a,...i}){return m.jsx("button",{type:"button",className:Tt(["react-flow__controls-button",a]),...i,children:n})}const yN=n=>({isInteractive:n.nodesDraggable||n.nodesConnectable||n.elementsSelectable,minZoomReached:n.transform[2]<=n.minZoom,maxZoomReached:n.transform[2]>=n.maxZoom,ariaLabelConfig:n.ariaLabelConfig});function Km({style:n,showZoom:a=!0,showFitView:i=!0,showInteractive:s=!0,fitViewOptions:r,onZoomIn:c,onZoomOut:u,onFitView:h,onInteractiveChange:g,className:p,children:x,position:y="bottom-left",orientation:v="vertical","aria-label":S}){const b=ft(),{isInteractive:E,minZoomReached:_,maxZoomReached:T,ariaLabelConfig:z}=$e(yN,ut),{zoomIn:N,zoomOut:C,fitView:D}=Wa(),R=()=>{N(),c?.()},j=()=>{C(),u?.()},K=()=>{D(r),h?.()},J=()=>{b.setState({nodesDraggable:!E,nodesConnectable:!E,elementsSelectable:!E}),g?.(!E)},fe=v==="horizontal"?"horizontal":"vertical";return m.jsxs(fa,{className:Tt(["react-flow__controls",fe,p]),position:y,style:n,"data-testid":"rf__controls","aria-label":S??z["controls.ariaLabel"],children:[a&&m.jsxs(m.Fragment,{children:[m.jsx(Ll,{onClick:R,className:"react-flow__controls-zoomin",title:z["controls.zoomIn.ariaLabel"],"aria-label":z["controls.zoomIn.ariaLabel"],disabled:T,children:m.jsx(dN,{})}),m.jsx(Ll,{onClick:j,className:"react-flow__controls-zoomout",title:z["controls.zoomOut.ariaLabel"],"aria-label":z["controls.zoomOut.ariaLabel"],disabled:_,children:m.jsx(hN,{})})]}),i&&m.jsx(Ll,{className:"react-flow__controls-fitview",onClick:K,title:z["controls.fitView.ariaLabel"],"aria-label":z["controls.fitView.ariaLabel"],children:m.jsx(pN,{})}),s&&m.jsx(Ll,{className:"react-flow__controls-interactive",onClick:J,title:z["controls.interactive.ariaLabel"],"aria-label":z["controls.interactive.ariaLabel"],children:E?m.jsx(mN,{}):m.jsx(gN,{})}),x]})}Km.displayName="Controls";const Fm=B.memo(Km);function xN({id:n,x:a,y:i,width:s,height:r,style:c,color:u,strokeColor:h,strokeWidth:g,className:p,borderRadius:x,shapeRendering:y,selected:v,onClick:S}){const{background:b,backgroundColor:E}=c||{},_=u||b||E;return m.jsx("rect",{className:Tt(["react-flow__minimap-node",{selected:v},p]),x:a,y:i,rx:x,ry:x,width:s,height:r,style:{fill:_,stroke:h,strokeWidth:g},shapeRendering:y,onClick:S?T=>S(T,n):void 0})}const vN=B.memo(xN),bN=n=>n.nodes.map(a=>a.id),Iu=n=>n instanceof Function?n:()=>n;function SN({nodeStrokeColor:n,nodeColor:a,nodeClassName:i="",nodeBorderRadius:s=5,nodeStrokeWidth:r,nodeComponent:c=vN,onClick:u}){const h=$e(bN,ut),g=Iu(a),p=Iu(n),x=Iu(i),y=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return m.jsx(m.Fragment,{children:h.map(v=>m.jsx(EN,{id:v,nodeColorFunc:g,nodeStrokeColorFunc:p,nodeClassNameFunc:x,nodeBorderRadius:s,nodeStrokeWidth:r,NodeComponent:c,onClick:u,shapeRendering:y},v))})}function wN({id:n,nodeColorFunc:a,nodeStrokeColorFunc:i,nodeClassNameFunc:s,nodeBorderRadius:r,nodeStrokeWidth:c,shapeRendering:u,NodeComponent:h,onClick:g}){const{node:p,x,y,width:v,height:S}=$e(b=>{const{internals:E}=b.nodeLookup.get(n),_=E.userNode,{x:T,y:z}=E.positionAbsolute,{width:N,height:C}=_a(_);return{node:_,x:T,y:z,width:N,height:C}},ut);return!p||p.hidden||!rg(p)?null:m.jsx(h,{x,y,width:v,height:S,style:p.style,selected:!!p.selected,className:s(p),color:a(p),borderRadius:r,strokeColor:i(p),strokeWidth:c,shapeRendering:u,onClick:g,id:p.id})}const EN=B.memo(wN);var _N=B.memo(SN);const AN=200,NN=150,kN=n=>!n.hidden,TN=n=>{const a={x:-n.transform[0]/n.transform[2],y:-n.transform[1]/n.transform[2],width:n.width/n.transform[2],height:n.height/n.transform[2]};return{viewBB:a,boundingRect:n.nodeLookup.size>0?og(Ao(n.nodeLookup,{filter:kN}),a):a,rfId:n.rfId,panZoom:n.panZoom,translateExtent:n.translateExtent,flowWidth:n.width,flowHeight:n.height,ariaLabelConfig:n.ariaLabelConfig}},CN="react-flow__minimap-desc";function Jm({style:n,className:a,nodeStrokeColor:i,nodeColor:s,nodeClassName:r="",nodeBorderRadius:c=5,nodeStrokeWidth:u,nodeComponent:h,bgColor:g,maskColor:p,maskStrokeColor:x,maskStrokeWidth:y,position:v="bottom-right",onClick:S,onNodeClick:b,pannable:E=!1,zoomable:_=!1,ariaLabel:T,inversePan:z,zoomStep:N=1,offsetScale:C=5}){const D=ft(),R=B.useRef(null),{boundingRect:j,viewBB:K,rfId:J,panZoom:fe,translateExtent:U,flowWidth:F,flowHeight:ae,ariaLabelConfig:H}=$e(TN,ut),I=n?.width??AN,k=n?.height??NN,L=j.width/I,$=j.height/k,Z=Math.max(L,$),Y=Z*I,A=Z*k,O=C*Z,G=j.x-(Y-j.width)/2-O,P=j.y-(A-j.height)/2-O,se=Y+O*2,ge=A+O*2,he=`${CN}-${J}`,ue=B.useRef(0),me=B.useRef();ue.current=Z,B.useEffect(()=>{if(R.current&&fe)return me.current=KE({domNode:R.current,panZoom:fe,getTransform:()=>D.getState().transform,getViewScale:()=>ue.current}),()=>{me.current?.destroy()}},[fe]),B.useEffect(()=>{me.current?.update({translateExtent:U,width:F,height:ae,inversePan:z,pannable:E,zoomStep:N,zoomable:_})},[E,_,z,N,U,F,ae]);const Ne=S?_e=>{const[we,Me]=me.current?.pointer(_e)||[0,0];S(_e,{x:we,y:Me})}:void 0,ke=b?B.useCallback((_e,we)=>{const Me=D.getState().nodeLookup.get(we).internals.userNode;b(_e,Me)},[]):void 0,Se=T??H["minimap.ariaLabel"];return m.jsx(fa,{position:v,style:{...n,"--xy-minimap-background-color-props":typeof g=="string"?g:void 0,"--xy-minimap-mask-background-color-props":typeof p=="string"?p:void 0,"--xy-minimap-mask-stroke-color-props":typeof x=="string"?x:void 0,"--xy-minimap-mask-stroke-width-props":typeof y=="number"?y*Z:void 0,"--xy-minimap-node-background-color-props":typeof s=="string"?s:void 0,"--xy-minimap-node-stroke-color-props":typeof i=="string"?i:void 0,"--xy-minimap-node-stroke-width-props":typeof u=="number"?u:void 0},className:Tt(["react-flow__minimap",a]),"data-testid":"rf__minimap",children:m.jsxs("svg",{width:I,height:k,viewBox:`${G} ${P} ${se} ${ge}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":he,ref:R,onClick:Ne,children:[Se&&m.jsx("title",{id:he,children:Se}),m.jsx(_N,{onClick:ke,nodeColor:s,nodeStrokeColor:i,nodeBorderRadius:c,nodeClassName:r,nodeStrokeWidth:u,nodeComponent:h}),m.jsx("path",{className:"react-flow__minimap-mask",d:`M${G-O},${P-O}h${se+O*2}v${ge+O*2}h${-se-O*2}z
|
|
71
|
+
M${K.x},${K.y}h${K.width}v${K.height}h${-K.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Jm.displayName="MiniMap",B.memo(Jm);const MN=n=>a=>n?`${Math.max(1/a.transform[2],1)}`:void 0,zN={[Rl.Line]:"right",[Rl.Handle]:"bottom-right"};function DN({nodeId:n,position:a,variant:i=Rl.Handle,className:s,style:r=void 0,children:c,color:u,minWidth:h=10,minHeight:g=10,maxWidth:p=Number.MAX_VALUE,maxHeight:x=Number.MAX_VALUE,keepAspectRatio:y=!1,resizeDirection:v,autoScale:S=!0,shouldResize:b,onResizeStart:E,onResize:_,onResizeEnd:T}){const z=mm(),N=typeof n=="string"?n:z,C=ft(),D=B.useRef(null),R=i===Rl.Handle,j=$e(B.useCallback(MN(R&&S),[R,S]),ut),K=B.useRef(null),J=a??zN[i];B.useEffect(()=>{if(!(!D.current||!N))return K.current||(K.current=f_({domNode:D.current,nodeId:N,getStoreItems:()=>{const{nodeLookup:U,transform:F,snapGrid:ae,snapToGrid:H,nodeOrigin:I,domNode:k}=C.getState();return{nodeLookup:U,transform:F,snapGrid:ae,snapToGrid:H,nodeOrigin:I,paneDomNode:k}},onChange:(U,F)=>{const{triggerNodeChanges:ae,nodeLookup:H,parentLookup:I,nodeOrigin:k}=C.getState(),L=[],$={x:U.x,y:U.y},Z=H.get(N);if(Z&&Z.expandParent&&Z.parentId){const Y=Z.origin??k,A=U.width??Z.measured.width??0,O=U.height??Z.measured.height??0,G={id:Z.id,parentId:Z.parentId,rect:{width:A,height:O,...cg({x:U.x??Z.position.x,y:U.y??Z.position.y},{width:A,height:O},Z.parentId,H,Y)}},P=Ou([G],H,I,k);L.push(...P),$.x=U.x?Math.max(Y[0]*A,U.x):void 0,$.y=U.y?Math.max(Y[1]*O,U.y):void 0}if($.x!==void 0&&$.y!==void 0){const Y={id:N,type:"position",position:{...$}};L.push(Y)}if(U.width!==void 0&&U.height!==void 0){const A={id:N,type:"dimensions",resizing:!0,setAttributes:v?v==="horizontal"?"width":"height":!0,dimensions:{width:U.width,height:U.height}};L.push(A)}for(const Y of F){const A={...Y,type:"position"};L.push(A)}ae(L)},onEnd:({width:U,height:F})=>{const ae={id:N,type:"dimensions",resizing:!1,dimensions:{width:U,height:F}};C.getState().triggerNodeChanges([ae])}})),K.current.update({controlPosition:J,boundaries:{minWidth:h,minHeight:g,maxWidth:p,maxHeight:x},keepAspectRatio:y,resizeDirection:v,onResizeStart:E,onResize:_,onResizeEnd:T,shouldResize:b}),()=>{K.current?.destroy()}},[J,h,g,p,x,y,E,_,T,b]);const fe=J.split("-");return m.jsx("div",{className:Tt(["react-flow__resize-control","nodrag",...fe,i,s]),ref:D,style:{...r,scale:j,...u&&{[R?"backgroundColor":"borderColor"]:u}},children:c})}const Pm=B.memo(DN);function Qu({nodeId:n,isVisible:a=!0,handleClassName:i,handleStyle:s,lineClassName:r,lineStyle:c,color:u,minWidth:h=10,minHeight:g=10,maxWidth:p=Number.MAX_VALUE,maxHeight:x=Number.MAX_VALUE,keepAspectRatio:y=!1,autoScale:v=!0,shouldResize:S,onResizeStart:b,onResize:E,onResizeEnd:_}){return a?m.jsxs(m.Fragment,{children:[i_.map(T=>m.jsx(Pm,{className:r,style:c,nodeId:n,position:T,variant:Rl.Line,color:u,minWidth:h,minHeight:g,maxWidth:p,maxHeight:x,onResizeStart:b,keepAspectRatio:y,autoScale:v,shouldResize:S,onResize:E,onResizeEnd:_},T)),l_.map(T=>m.jsx(Pm,{className:i,style:s,nodeId:n,position:T,color:u,minWidth:h,minHeight:g,maxWidth:p,maxHeight:x,onResizeStart:b,keepAspectRatio:y,autoScale:v,shouldResize:S,onResize:E,onResizeEnd:_},T))]}):null}/**
|
|
72
72
|
* @license lucide-react v0.545.0 - ISC
|
|
73
73
|
*
|
|
74
74
|
* This source code is licensed under the ISC license.
|
|
75
75
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const
|
|
76
|
+
*/const ON=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),RN=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,i,s)=>s?s.toUpperCase():i.toLowerCase()),Wm=n=>{const a=RN(n);return a.charAt(0).toUpperCase()+a.slice(1)},e0=(...n)=>n.filter((a,i,s)=>!!a&&a.trim()!==""&&s.indexOf(a)===i).join(" ").trim(),jN=n=>{for(const a in n)if(a.startsWith("aria-")||a==="role"||a==="title")return!0};/**
|
|
77
77
|
* @license lucide-react v0.545.0 - ISC
|
|
78
78
|
*
|
|
79
79
|
* This source code is licensed under the ISC license.
|
|
80
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/var
|
|
81
|
+
*/var LN={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
82
82
|
* @license lucide-react v0.545.0 - ISC
|
|
83
83
|
*
|
|
84
84
|
* This source code is licensed under the ISC license.
|
|
85
85
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const
|
|
86
|
+
*/const HN=B.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:s,className:r="",children:c,iconNode:u,...h},g)=>B.createElement("svg",{ref:g,...LN,width:a,height:a,stroke:n,strokeWidth:s?Number(i)*24/Number(a):i,className:e0("lucide",r),...!c&&!jN(h)&&{"aria-hidden":"true"},...h},[...u.map(([p,x])=>B.createElement(p,x)),...Array.isArray(c)?c:[c]]));/**
|
|
87
87
|
* @license lucide-react v0.545.0 - ISC
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const Ge=(n,a)=>{const i=B.forwardRef(({className:s,...r},c)=>B.createElement(
|
|
91
|
+
*/const Ge=(n,a)=>{const i=B.forwardRef(({className:s,...r},c)=>B.createElement(HN,{ref:c,iconNode:a,className:e0(`lucide-${ON(Wm(n))}`,`lucide-${n}`,s),...r}));return i.displayName=Wm(n),i};/**
|
|
92
92
|
* @license lucide-react v0.545.0 - ISC
|
|
93
93
|
*
|
|
94
94
|
* This source code is licensed under the ISC license.
|
|
95
95
|
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const
|
|
96
|
+
*/const BN=Ge("align-center-horizontal",[["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"M10 16v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-4",key:"11f1s0"}],["path",{d:"M10 8V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v4",key:"t14dx9"}],["path",{d:"M20 16v1a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-1",key:"1w07xs"}],["path",{d:"M14 8V7c0-1.1.9-2 2-2h2a2 2 0 0 1 2 2v1",key:"1apec2"}]]);/**
|
|
97
97
|
* @license lucide-react v0.545.0 - ISC
|
|
98
98
|
*
|
|
99
99
|
* This source code is licensed under the ISC license.
|
|
100
100
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const
|
|
101
|
+
*/const UN=Ge("align-center-vertical",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"M8 10H4a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h4",key:"14d6g8"}],["path",{d:"M16 10h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4",key:"1e2lrw"}],["path",{d:"M8 20H7a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2h1",key:"1fkdwx"}],["path",{d:"M16 14h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1",key:"1euafb"}]]);/**
|
|
102
102
|
* @license lucide-react v0.545.0 - ISC
|
|
103
103
|
*
|
|
104
104
|
* This source code is licensed under the ISC license.
|
|
105
105
|
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const
|
|
106
|
+
*/const VN=Ge("align-end-horizontal",[["rect",{width:"6",height:"16",x:"4",y:"2",rx:"2",key:"z5wdxg"}],["rect",{width:"6",height:"9",x:"14",y:"9",rx:"2",key:"um7a8w"}],["path",{d:"M22 22H2",key:"19qnx5"}]]);/**
|
|
107
107
|
* @license lucide-react v0.545.0 - ISC
|
|
108
108
|
*
|
|
109
109
|
* This source code is licensed under the ISC license.
|
|
110
110
|
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const
|
|
111
|
+
*/const $N=Ge("align-horizontal-distribute-center",[["rect",{width:"6",height:"14",x:"4",y:"5",rx:"2",key:"1wwnby"}],["rect",{width:"6",height:"10",x:"14",y:"7",rx:"2",key:"1fe6j6"}],["path",{d:"M17 22v-5",key:"4b6g73"}],["path",{d:"M17 7V2",key:"hnrr36"}],["path",{d:"M7 22v-3",key:"1r4jpn"}],["path",{d:"M7 5V2",key:"liy1u9"}]]);/**
|
|
112
112
|
* @license lucide-react v0.545.0 - ISC
|
|
113
113
|
*
|
|
114
114
|
* This source code is licensed under the ISC license.
|
|
115
115
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const
|
|
116
|
+
*/const YN=Ge("align-end-vertical",[["rect",{width:"16",height:"6",x:"2",y:"4",rx:"2",key:"10wcwx"}],["rect",{width:"9",height:"6",x:"9",y:"14",rx:"2",key:"4p5bwg"}],["path",{d:"M22 22V2",key:"12ipfv"}]]);/**
|
|
117
117
|
* @license lucide-react v0.545.0 - ISC
|
|
118
118
|
*
|
|
119
119
|
* This source code is licensed under the ISC license.
|
|
120
120
|
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const
|
|
121
|
+
*/const qN=Ge("align-start-horizontal",[["rect",{width:"6",height:"16",x:"4",y:"6",rx:"2",key:"1n4dg1"}],["rect",{width:"6",height:"9",x:"14",y:"6",rx:"2",key:"17khns"}],["path",{d:"M22 2H2",key:"fhrpnj"}]]);/**
|
|
122
122
|
* @license lucide-react v0.545.0 - ISC
|
|
123
123
|
*
|
|
124
124
|
* This source code is licensed under the ISC license.
|
|
125
125
|
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const
|
|
126
|
+
*/const XN=Ge("align-start-vertical",[["rect",{width:"9",height:"6",x:"6",y:"14",rx:"2",key:"lpm2y7"}],["rect",{width:"16",height:"6",x:"6",y:"4",rx:"2",key:"rdj6ps"}],["path",{d:"M2 2v20",key:"1ivd8o"}]]);/**
|
|
127
127
|
* @license lucide-react v0.545.0 - ISC
|
|
128
128
|
*
|
|
129
129
|
* This source code is licensed under the ISC license.
|
|
130
130
|
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const
|
|
131
|
+
*/const GN=Ge("align-vertical-distribute-center",[["path",{d:"M22 17h-3",key:"1lwga1"}],["path",{d:"M22 7h-5",key:"o2endc"}],["path",{d:"M5 17H2",key:"1gx9xc"}],["path",{d:"M7 7H2",key:"6bq26l"}],["rect",{x:"5",y:"14",width:"14",height:"6",rx:"2",key:"1qrzuf"}],["rect",{x:"7",y:"4",width:"10",height:"6",rx:"2",key:"we8e9z"}]]);/**
|
|
132
132
|
* @license lucide-react v0.545.0 - ISC
|
|
133
133
|
*
|
|
134
134
|
* This source code is licensed under the ISC license.
|
|
135
135
|
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const
|
|
136
|
+
*/const ZN=Ge("bug",[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]);/**
|
|
137
137
|
* @license lucide-react v0.545.0 - ISC
|
|
138
138
|
*
|
|
139
139
|
* This source code is licensed under the ISC license.
|
|
@@ -143,7 +143,7 @@ Error generating stack: `+o.message+`
|
|
|
143
143
|
*
|
|
144
144
|
* This source code is licensed under the ISC license.
|
|
145
145
|
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const
|
|
146
|
+
*/const IN=Ge("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
147
147
|
* @license lucide-react v0.545.0 - ISC
|
|
148
148
|
*
|
|
149
149
|
* This source code is licensed under the ISC license.
|
|
@@ -153,7 +153,7 @@ Error generating stack: `+o.message+`
|
|
|
153
153
|
*
|
|
154
154
|
* This source code is licensed under the ISC license.
|
|
155
155
|
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const
|
|
156
|
+
*/const QN=Ge("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
157
157
|
* @license lucide-react v0.545.0 - ISC
|
|
158
158
|
*
|
|
159
159
|
* This source code is licensed under the ISC license.
|
|
@@ -168,7 +168,7 @@ Error generating stack: `+o.message+`
|
|
|
168
168
|
*
|
|
169
169
|
* This source code is licensed under the ISC license.
|
|
170
170
|
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const
|
|
171
|
+
*/const KN=Ge("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
172
172
|
* @license lucide-react v0.545.0 - ISC
|
|
173
173
|
*
|
|
174
174
|
* This source code is licensed under the ISC license.
|
|
@@ -193,7 +193,7 @@ Error generating stack: `+o.message+`
|
|
|
193
193
|
*
|
|
194
194
|
* This source code is licensed under the ISC license.
|
|
195
195
|
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
-
*/const
|
|
196
|
+
*/const FN=Ge("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);/**
|
|
197
197
|
* @license lucide-react v0.545.0 - ISC
|
|
198
198
|
*
|
|
199
199
|
* This source code is licensed under the ISC license.
|
|
@@ -203,17 +203,17 @@ Error generating stack: `+o.message+`
|
|
|
203
203
|
*
|
|
204
204
|
* This source code is licensed under the ISC license.
|
|
205
205
|
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/const
|
|
206
|
+
*/const JN=Ge("redo",[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]]);/**
|
|
207
207
|
* @license lucide-react v0.545.0 - ISC
|
|
208
208
|
*
|
|
209
209
|
* This source code is licensed under the ISC license.
|
|
210
210
|
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
-
*/const
|
|
211
|
+
*/const PN=Ge("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
212
212
|
* @license lucide-react v0.545.0 - ISC
|
|
213
213
|
*
|
|
214
214
|
* This source code is licensed under the ISC license.
|
|
215
215
|
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
-
*/const
|
|
216
|
+
*/const WN=Ge("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
217
217
|
* @license lucide-react v0.545.0 - ISC
|
|
218
218
|
*
|
|
219
219
|
* This source code is licensed under the ISC license.
|
|
@@ -223,12 +223,12 @@ Error generating stack: `+o.message+`
|
|
|
223
223
|
*
|
|
224
224
|
* This source code is licensed under the ISC license.
|
|
225
225
|
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
-
*/const
|
|
226
|
+
*/const e3=Ge("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
227
227
|
* @license lucide-react v0.545.0 - ISC
|
|
228
228
|
*
|
|
229
229
|
* This source code is licensed under the ISC license.
|
|
230
230
|
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
-
*/const
|
|
231
|
+
*/const t3=Ge("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/**
|
|
232
232
|
* @license lucide-react v0.545.0 - ISC
|
|
233
233
|
*
|
|
234
234
|
* This source code is licensed under the ISC license.
|
|
@@ -238,21 +238,21 @@ Error generating stack: `+o.message+`
|
|
|
238
238
|
*
|
|
239
239
|
* This source code is licensed under the ISC license.
|
|
240
240
|
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
-
*/const
|
|
241
|
+
*/const n3=Ge("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
242
242
|
* @license lucide-react v0.545.0 - ISC
|
|
243
243
|
*
|
|
244
244
|
* This source code is licensed under the ISC license.
|
|
245
245
|
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
-
*/const
|
|
246
|
+
*/const a3=Ge("undo",[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]]);/**
|
|
247
247
|
* @license lucide-react v0.545.0 - ISC
|
|
248
248
|
*
|
|
249
249
|
* This source code is licensed under the ISC license.
|
|
250
250
|
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
-
*/const da=Ge("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Ju(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Hl=Ju();function r0(n){Hl=n}var Ro={exec:()=>null};function Ze(n,a=""){let i=typeof n=="string"?n:n.source,s={replace:(r,c)=>{let u=typeof c=="string"?c:c.source;return u=u.replace(Wt.caret,"$1"),i=i.replace(r,u),s},getRegex:()=>new RegExp(i,a)};return s}var Wt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},
|
|
252
|
-
]`).replace("lheading",u0).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},
|
|
251
|
+
*/const da=Ge("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Ju(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Hl=Ju();function r0(n){Hl=n}var Ro={exec:()=>null};function Ze(n,a=""){let i=typeof n=="string"?n:n.source,s={replace:(r,c)=>{let u=typeof c=="string"?c:c.source;return u=u.replace(Wt.caret,"$1"),i=i.replace(r,u),s},getRegex:()=>new RegExp(i,a)};return s}var Wt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},l3=/^(?:[ \t]*(?:\n|$))+/,i3=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,o3=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,jo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,s3=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Pu=/(?:[*+-]|\d{1,9}[.)])/,c0=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,u0=Ze(c0).replace(/bull/g,Pu).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),r3=Ze(c0).replace(/bull/g,Pu).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Wu=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,c3=/^[^\n]+/,ef=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,u3=Ze(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ef).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),f3=Ze(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Pu).getRegex(),br="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",tf=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,d3=Ze("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",tf).replace("tag",br).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),f0=Ze(Wu).replace("hr",jo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",br).getRegex(),h3=Ze(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",f0).getRegex(),nf={blockquote:h3,code:i3,def:u3,fences:o3,heading:s3,hr:jo,html:d3,lheading:u0,list:f3,newline:l3,paragraph:f0,table:Ro,text:c3},d0=Ze("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",jo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",br).getRegex(),p3={...nf,lheading:r3,table:d0,paragraph:Ze(Wu).replace("hr",jo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",d0).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",br).getRegex()},g3={...nf,html:Ze(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",tf).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ro,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ze(Wu).replace("hr",jo).replace("heading",` *#{1,6} *[^
|
|
252
|
+
]`).replace("lheading",u0).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},m3=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,y3=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,h0=/^( {2,}|\\)\n(?!\s*$)/,x3=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Sr=/[\p{P}\p{S}]/u,af=/[\s\p{P}\p{S}]/u,p0=/[^\s\p{P}\p{S}]/u,v3=Ze(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,af).getRegex(),g0=/(?!~)[\p{P}\p{S}]/u,b3=/(?!~)[\s\p{P}\p{S}]/u,S3=/(?:[^\s\p{P}\p{S}]|~)/u,w3=Ze(/link|code|html/,"g").replace("link",new RegExp("\\[(?:[^\\[\\]`]|(?<!`)(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)")).replace("code",new RegExp("(?<!`)(?<b>`+)[^`]+\\k<b>(?!`)")).replace("html",/<(?! )[^<>]*?>/).getRegex(),m0=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,E3=Ze(m0,"u").replace(/punct/g,Sr).getRegex(),_3=Ze(m0,"u").replace(/punct/g,g0).getRegex(),y0="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",A3=Ze(y0,"gu").replace(/notPunctSpace/g,p0).replace(/punctSpace/g,af).replace(/punct/g,Sr).getRegex(),N3=Ze(y0,"gu").replace(/notPunctSpace/g,S3).replace(/punctSpace/g,b3).replace(/punct/g,g0).getRegex(),k3=Ze("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,p0).replace(/punctSpace/g,af).replace(/punct/g,Sr).getRegex(),T3=Ze(/\\(punct)/,"gu").replace(/punct/g,Sr).getRegex(),C3=Ze(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),M3=Ze(tf).replace("(?:-->|$)","-->").getRegex(),z3=Ze("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",M3).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),wr=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,D3=Ze(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",wr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),x0=Ze(/^!?\[(label)\]\[(ref)\]/).replace("label",wr).replace("ref",ef).getRegex(),v0=Ze(/^!?\[(ref)\](?:\[\])?/).replace("ref",ef).getRegex(),O3=Ze("reflink|nolink(?!\\()","g").replace("reflink",x0).replace("nolink",v0).getRegex(),b0=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,lf={_backpedal:Ro,anyPunctuation:T3,autolink:C3,blockSkip:w3,br:h0,code:y3,del:Ro,emStrongLDelim:E3,emStrongRDelimAst:A3,emStrongRDelimUnd:k3,escape:m3,link:D3,nolink:v0,punctuation:v3,reflink:x0,reflinkSearch:O3,tag:z3,text:x3,url:Ro},R3={...lf,link:Ze(/^!?\[(label)\]\((.*?)\)/).replace("label",wr).getRegex(),reflink:Ze(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",wr).getRegex()},of={...lf,emStrongRDelimAst:N3,emStrongLDelim:_3,url:Ze(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",b0).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Ze(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",b0).getRegex()},j3={...of,br:Ze(h0).replace("{2,}","*").getRegex(),text:Ze(of.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Er={normal:nf,gfm:p3,pedantic:g3},Lo={normal:lf,gfm:of,breaks:j3,pedantic:R3},L3={"&":"&","<":"<",">":">",'"':""","'":"'"},S0=n=>L3[n];function ha(n,a){if(a){if(Wt.escapeTest.test(n))return n.replace(Wt.escapeReplace,S0)}else if(Wt.escapeTestNoEncode.test(n))return n.replace(Wt.escapeReplaceNoEncode,S0);return n}function w0(n){try{n=encodeURI(n).replace(Wt.percentDecode,"%")}catch{return null}return n}function E0(n,a){let i=n.replace(Wt.findPipe,(c,u,h)=>{let g=!1,p=u;for(;--p>=0&&h[p]==="\\";)g=!g;return g?"|":" |"}),s=i.split(Wt.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),a)if(s.length>a)s.splice(a);else for(;s.length<a;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(Wt.slashPipe,"|");return s}function Ho(n,a,i){let s=n.length;if(s===0)return"";let r=0;for(;r<s&&n.charAt(s-r-1)===a;)r++;return n.slice(0,s-r)}function H3(n,a){if(n.indexOf(a[1])===-1)return-1;let i=0;for(let s=0;s<n.length;s++)if(n[s]==="\\")s++;else if(n[s]===a[0])i++;else if(n[s]===a[1]&&(i--,i<0))return s;return i>0?-2:-1}function _0(n,a,i,s,r){let c=a.href,u=a.title||null,h=n[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let g={type:n[0].charAt(0)==="!"?"image":"link",raw:i,href:c,title:u,text:h,tokens:s.inlineTokens(h)};return s.state.inLink=!1,g}function B3(n,a,i){let s=n.match(i.other.indentCodeCompensation);if(s===null)return a;let r=s[1];return a.split(`
|
|
253
253
|
`).map(c=>{let u=c.match(i.other.beginningSpace);if(u===null)return c;let[h]=u;return h.length>=r.length?c.slice(r.length):c}).join(`
|
|
254
254
|
`)}var _r=class{options;rules;lexer;constructor(n){this.options=n||Hl}space(n){let a=this.rules.block.newline.exec(n);if(a&&a[0].length>0)return{type:"space",raw:a[0]}}code(n){let a=this.rules.block.code.exec(n);if(a){let i=a[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:a[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Ho(i,`
|
|
255
|
-
`)}}}fences(n){let a=this.rules.block.fences.exec(n);if(a){let i=a[0],s=
|
|
255
|
+
`)}}}fences(n){let a=this.rules.block.fences.exec(n);if(a){let i=a[0],s=B3(i,a[3]||"",this.rules);return{type:"code",raw:i,lang:a[2]?a[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):a[2],text:s}}}heading(n){let a=this.rules.block.heading.exec(n);if(a){let i=a[2].trim();if(this.rules.other.endingHash.test(i)){let s=Ho(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:a[0],depth:a[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(n){let a=this.rules.block.hr.exec(n);if(a)return{type:"hr",raw:Ho(a[0],`
|
|
256
256
|
`)}}blockquote(n){let a=this.rules.block.blockquote.exec(n);if(a){let i=Ho(a[0],`
|
|
257
257
|
`).split(`
|
|
258
258
|
`),s="",r="",c=[];for(;i.length>0;){let u=!1,h=[],g;for(g=0;g<i.length;g++)if(this.rules.other.blockquoteStart.test(i[g]))h.push(i[g]),u=!0;else if(!u)h.push(i[g]);else break;i=i.slice(g);let p=h.join(`
|
|
@@ -273,7 +273,7 @@ ${x}`:x;let y=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
|
|
|
273
273
|
`+v}!S&&!v.trim()&&(S=!0),p+=R+`
|
|
274
274
|
`,n=n.substring(R.length+1),y=j.slice(b)}}r.loose||(u?r.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(u=!0));let E=null,_;this.options.gfm&&(E=this.rules.other.listIsTask.exec(x),E&&(_=E[0]!=="[ ] ",x=x.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:p,task:!!E,checked:_,loose:!1,text:x,tokens:[]}),r.raw+=p}let h=r.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let g=0;g<r.items.length;g++)if(this.lexer.state.top=!1,r.items[g].tokens=this.lexer.blockTokens(r.items[g].text,[]),!r.loose){let p=r.items[g].tokens.filter(y=>y.type==="space"),x=p.length>0&&p.some(y=>this.rules.other.anyLine.test(y.raw));r.loose=x}if(r.loose)for(let g=0;g<r.items.length;g++)r.items[g].loose=!0;return r}}html(n){let a=this.rules.block.html.exec(n);if(a)return{type:"html",block:!0,raw:a[0],pre:a[1]==="pre"||a[1]==="script"||a[1]==="style",text:a[0]}}def(n){let a=this.rules.block.def.exec(n);if(a){let i=a[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=a[2]?a[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=a[3]?a[3].substring(1,a[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):a[3];return{type:"def",tag:i,raw:a[0],href:s,title:r}}}table(n){let a=this.rules.block.table.exec(n);if(!a||!this.rules.other.tableDelimiter.test(a[2]))return;let i=E0(a[1]),s=a[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=a[3]?.trim()?a[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
275
275
|
`):[],c={type:"table",raw:a[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let u of s)this.rules.other.tableAlignRight.test(u)?c.align.push("right"):this.rules.other.tableAlignCenter.test(u)?c.align.push("center"):this.rules.other.tableAlignLeft.test(u)?c.align.push("left"):c.align.push(null);for(let u=0;u<i.length;u++)c.header.push({text:i[u],tokens:this.lexer.inline(i[u]),header:!0,align:c.align[u]});for(let u of r)c.rows.push(E0(u,c.header.length).map((h,g)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:c.align[g]})));return c}}lheading(n){let a=this.rules.block.lheading.exec(n);if(a)return{type:"heading",raw:a[0],depth:a[2].charAt(0)==="="?1:2,text:a[1],tokens:this.lexer.inline(a[1])}}paragraph(n){let a=this.rules.block.paragraph.exec(n);if(a){let i=a[1].charAt(a[1].length-1)===`
|
|
276
|
-
`?a[1].slice(0,-1):a[1];return{type:"paragraph",raw:a[0],text:i,tokens:this.lexer.inline(i)}}}text(n){let a=this.rules.block.text.exec(n);if(a)return{type:"text",raw:a[0],text:a[0],tokens:this.lexer.inline(a[0])}}escape(n){let a=this.rules.inline.escape.exec(n);if(a)return{type:"escape",raw:a[0],text:a[1]}}tag(n){let a=this.rules.inline.tag.exec(n);if(a)return!this.lexer.state.inLink&&this.rules.other.startATag.test(a[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(a[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(a[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(a[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:a[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:a[0]}}link(n){let a=this.rules.inline.link.exec(n);if(a){let i=a[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let c=Ho(i.slice(0,-1),"\\");if((i.length-c.length)%2===0)return}else{let c=
|
|
276
|
+
`?a[1].slice(0,-1):a[1];return{type:"paragraph",raw:a[0],text:i,tokens:this.lexer.inline(i)}}}text(n){let a=this.rules.block.text.exec(n);if(a)return{type:"text",raw:a[0],text:a[0],tokens:this.lexer.inline(a[0])}}escape(n){let a=this.rules.inline.escape.exec(n);if(a)return{type:"escape",raw:a[0],text:a[1]}}tag(n){let a=this.rules.inline.tag.exec(n);if(a)return!this.lexer.state.inLink&&this.rules.other.startATag.test(a[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(a[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(a[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(a[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:a[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:a[0]}}link(n){let a=this.rules.inline.link.exec(n);if(a){let i=a[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let c=Ho(i.slice(0,-1),"\\");if((i.length-c.length)%2===0)return}else{let c=H3(a[2],"()");if(c===-2)return;if(c>-1){let u=(a[0].indexOf("!")===0?5:4)+a[1].length+c;a[2]=a[2].substring(0,c),a[0]=a[0].substring(0,u).trim(),a[3]=""}}let s=a[2],r="";if(this.options.pedantic){let c=this.rules.other.pedanticHrefTitle.exec(s);c&&(s=c[1],r=c[3])}else r=a[3]?a[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),_0(a,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},a[0],this.lexer,this.rules)}}reflink(n,a){let i;if((i=this.rules.inline.reflink.exec(n))||(i=this.rules.inline.nolink.exec(n))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=a[s.toLowerCase()];if(!r){let c=i[0].charAt(0);return{type:"text",raw:c,text:c}}return _0(i,r,i[0],this.lexer,this.rules)}}emStrong(n,a,i=""){let s=this.rules.inline.emStrongLDelim.exec(n);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let r=[...s[0]].length-1,c,u,h=r,g=0,p=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,a=a.slice(-1*n.length+r);(s=p.exec(a))!=null;){if(c=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!c)continue;if(u=[...c].length,s[3]||s[4]){h+=u;continue}else if((s[5]||s[6])&&r%3&&!((r+u)%3)){g+=u;continue}if(h-=u,h>0)continue;u=Math.min(u,u+h+g);let x=[...s[0]][0].length,y=n.slice(0,r+s.index+x+u);if(Math.min(r,u)%2){let S=y.slice(1,-1);return{type:"em",raw:y,text:S,tokens:this.lexer.inlineTokens(S)}}let v=y.slice(2,-2);return{type:"strong",raw:y,text:v,tokens:this.lexer.inlineTokens(v)}}}}codespan(n){let a=this.rules.inline.code.exec(n);if(a){let i=a[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),r=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&r&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:a[0],text:i}}}br(n){let a=this.rules.inline.br.exec(n);if(a)return{type:"br",raw:a[0]}}del(n){let a=this.rules.inline.del.exec(n);if(a)return{type:"del",raw:a[0],text:a[2],tokens:this.lexer.inlineTokens(a[2])}}autolink(n){let a=this.rules.inline.autolink.exec(n);if(a){let i,s;return a[2]==="@"?(i=a[1],s="mailto:"+i):(i=a[1],s=i),{type:"link",raw:a[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(n){let a;if(a=this.rules.inline.url.exec(n)){let i,s;if(a[2]==="@")i=a[0],s="mailto:"+i;else{let r;do r=a[0],a[0]=this.rules.inline._backpedal.exec(a[0])?.[0]??"";while(r!==a[0]);i=a[0],a[1]==="www."?s="http://"+a[0]:s=a[0]}return{type:"link",raw:a[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(n){let a=this.rules.inline.text.exec(n);if(a){let i=this.lexer.state.inRawBlock;return{type:"text",raw:a[0],text:a[0],escaped:i}}}},Fn=class Yh{tokens;options;state;tokenizer;inlineQueue;constructor(a){this.tokens=[],this.tokens.links=Object.create(null),this.options=a||Hl,this.options.tokenizer=this.options.tokenizer||new _r,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let i={other:Wt,block:Er.normal,inline:Lo.normal};this.options.pedantic?(i.block=Er.pedantic,i.inline=Lo.pedantic):this.options.gfm&&(i.block=Er.gfm,this.options.breaks?i.inline=Lo.breaks:i.inline=Lo.gfm),this.tokenizer.rules=i}static get rules(){return{block:Er,inline:Lo}}static lex(a,i){return new Yh(i).lex(a)}static lexInline(a,i){return new Yh(i).inlineTokens(a)}lex(a){a=a.replace(Wt.carriageReturn,`
|
|
277
277
|
`),this.blockTokens(a,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let s=this.inlineQueue[i];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(a,i=[],s=!1){for(this.options.pedantic&&(a=a.replace(Wt.tabCharGlobal," ").replace(Wt.spaceLine,""));a;){let r;if(this.options.extensions?.block?.some(u=>(r=u.call({lexer:this},a,i))?(a=a.substring(r.raw.length),i.push(r),!0):!1))continue;if(r=this.tokenizer.space(a)){a=a.substring(r.raw.length);let u=i.at(-1);r.raw.length===1&&u!==void 0?u.raw+=`
|
|
278
278
|
`:i.push(r);continue}if(r=this.tokenizer.code(a)){a=a.substring(r.raw.length);let u=i.at(-1);u?.type==="paragraph"||u?.type==="text"?(u.raw+=(u.raw.endsWith(`
|
|
279
279
|
`)?"":`
|
|
@@ -306,6 +306,6 @@ ${this.parser.parse(n)}</blockquote>
|
|
|
306
306
|
${n}</tr>
|
|
307
307
|
`}tablecell(n){let a=this.parser.parseInline(n.tokens),i=n.header?"th":"td";return(n.align?`<${i} align="${n.align}">`:`<${i}>`)+a+`</${i}>
|
|
308
308
|
`}strong({tokens:n}){return`<strong>${this.parser.parseInline(n)}</strong>`}em({tokens:n}){return`<em>${this.parser.parseInline(n)}</em>`}codespan({text:n}){return`<code>${ha(n,!0)}</code>`}br(n){return"<br>"}del({tokens:n}){return`<del>${this.parser.parseInline(n)}</del>`}link({href:n,title:a,tokens:i}){let s=this.parser.parseInline(i),r=w0(n);if(r===null)return s;n=r;let c='<a href="'+n+'"';return a&&(c+=' title="'+ha(a)+'"'),c+=">"+s+"</a>",c}image({href:n,title:a,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let r=w0(n);if(r===null)return ha(i);n=r;let c=`<img src="${n}" alt="${i}"`;return a&&(c+=` title="${ha(a)}"`),c+=">",c}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:ha(n.text)}},sf=class{strong({text:n}){return n}em({text:n}){return n}codespan({text:n}){return n}del({text:n}){return n}html({text:n}){return n}text({text:n}){return n}link({text:n}){return""+n}image({text:n}){return""+n}br(){return""}},Jn=class qh{options;renderer;textRenderer;constructor(a){this.options=a||Hl,this.options.renderer=this.options.renderer||new Ar,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new sf}static parse(a,i){return new qh(i).parse(a)}static parseInline(a,i){return new qh(i).parseInline(a)}parse(a,i=!0){let s="";for(let r=0;r<a.length;r++){let c=a[r];if(this.options.extensions?.renderers?.[c.type]){let h=c,g=this.options.extensions.renderers[h.type].call({parser:this},h);if(g!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){s+=g||"";continue}}let u=c;switch(u.type){case"space":{s+=this.renderer.space(u);continue}case"hr":{s+=this.renderer.hr(u);continue}case"heading":{s+=this.renderer.heading(u);continue}case"code":{s+=this.renderer.code(u);continue}case"table":{s+=this.renderer.table(u);continue}case"blockquote":{s+=this.renderer.blockquote(u);continue}case"list":{s+=this.renderer.list(u);continue}case"html":{s+=this.renderer.html(u);continue}case"def":{s+=this.renderer.def(u);continue}case"paragraph":{s+=this.renderer.paragraph(u);continue}case"text":{let h=u,g=this.renderer.text(h);for(;r+1<a.length&&a[r+1].type==="text";)h=a[++r],g+=`
|
|
309
|
-
`+this.renderer.text(h);i?s+=this.renderer.paragraph({type:"paragraph",raw:g,text:g,tokens:[{type:"text",raw:g,text:g,escaped:!0}]}):s+=g;continue}default:{let h='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return s}parseInline(a,i=this.renderer){let s="";for(let r=0;r<a.length;r++){let c=a[r];if(this.options.extensions?.renderers?.[c.type]){let h=this.options.extensions.renderers[c.type].call({parser:this},c);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){s+=h||"";continue}}let u=c;switch(u.type){case"escape":{s+=i.text(u);break}case"html":{s+=i.html(u);break}case"link":{s+=i.link(u);break}case"image":{s+=i.image(u);break}case"strong":{s+=i.strong(u);break}case"em":{s+=i.em(u);break}case"codespan":{s+=i.codespan(u);break}case"br":{s+=i.br(u);break}case"del":{s+=i.del(u);break}case"text":{s+=i.text(u);break}default:{let h='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return s}},Bo=class{options;block;constructor(n){this.options=n||Hl}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(n){return n}postprocess(n){return n}processAllTokens(n){return n}emStrongMask(n){return n}provideLexer(){return this.block?Fn.lex:Fn.lexInline}provideParser(){return this.block?Jn.parse:Jn.parseInline}},
|
|
310
|
-
Please report this to https://github.com/markedjs/marked.`,n){let s="<p>An error occurred:</p><pre>"+ha(i.message+"",!0)+"</pre>";return a?Promise.resolve(s):s}if(a)return Promise.reject(i);throw i}}},Bl=new B3;function Fe(n,a){return Bl.parse(n,a)}Fe.options=Fe.setOptions=function(n){return Bl.setOptions(n),Fe.defaults=Bl.defaults,r0(Fe.defaults),Fe},Fe.getDefaults=Ju,Fe.defaults=Hl,Fe.use=function(...n){return Bl.use(...n),Fe.defaults=Bl.defaults,r0(Fe.defaults),Fe},Fe.walkTokens=function(n,a){return Bl.walkTokens(n,a)},Fe.parseInline=Bl.parseInline,Fe.Parser=Jn,Fe.parser=Jn.parse,Fe.Renderer=Ar,Fe.TextRenderer=sf,Fe.Lexer=Fn,Fe.lexer=Fn.lex,Fe.Tokenizer=_r,Fe.Hooks=Bo,Fe.parse=Fe,Fe.options,Fe.setOptions,Fe.use,Fe.walkTokens,Fe.parseInline,Jn.parse,Fn.lex;/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */const{entries:A0,setPrototypeOf:N0,isFrozen:U3,getPrototypeOf:V3,getOwnPropertyDescriptor:$3}=Object;let{freeze:en,seal:zn,create:rf}=Object,{apply:cf,construct:uf}=typeof Reflect<"u"&&Reflect;en||(en=function(a){return a}),zn||(zn=function(a){return a}),cf||(cf=function(a,i){for(var s=arguments.length,r=new Array(s>2?s-2:0),c=2;c<s;c++)r[c-2]=arguments[c];return a.apply(i,r)}),uf||(uf=function(a){for(var i=arguments.length,s=new Array(i>1?i-1:0),r=1;r<i;r++)s[r-1]=arguments[r];return new a(...s)});const Nr=nn(Array.prototype.forEach),Y3=nn(Array.prototype.lastIndexOf),k0=nn(Array.prototype.pop),Uo=nn(Array.prototype.push),q3=nn(Array.prototype.splice),kr=nn(String.prototype.toLowerCase),ff=nn(String.prototype.toString),df=nn(String.prototype.match),Vo=nn(String.prototype.replace),X3=nn(String.prototype.indexOf),G3=nn(String.prototype.trim),Pn=nn(Object.prototype.hasOwnProperty),tn=nn(RegExp.prototype.test),$o=Z3(TypeError);function nn(n){return function(a){a instanceof RegExp&&(a.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),r=1;r<i;r++)s[r-1]=arguments[r];return cf(n,a,s)}}function Z3(n){return function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return uf(n,i)}}function Le(n,a){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:kr;N0&&N0(n,null);let s=a.length;for(;s--;){let r=a[s];if(typeof r=="string"){const c=i(r);c!==r&&(U3(a)||(a[s]=c),r=c)}n[r]=!0}return n}function I3(n){for(let a=0;a<n.length;a++)Pn(n,a)||(n[a]=null);return n}function Aa(n){const a=rf(null);for(const[i,s]of A0(n))Pn(n,i)&&(Array.isArray(s)?a[i]=I3(s):s&&typeof s=="object"&&s.constructor===Object?a[i]=Aa(s):a[i]=s);return a}function Yo(n,a){for(;n!==null;){const s=$3(n,a);if(s){if(s.get)return nn(s.get);if(typeof s.value=="function")return nn(s.value)}n=V3(n)}function i(){return null}return i}const T0=en(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),hf=en(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),pf=en(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Q3=en(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),gf=en(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),K3=en(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),C0=en(["#text"]),M0=en(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),mf=en(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),z0=en(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Tr=en(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),F3=zn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),J3=zn(/<%[\w\W]*|[\w\W]*%>/gm),P3=zn(/\$\{[\w\W]*/gm),W3=zn(/^data-[\-\w.\u00B7-\uFFFF]+$/),ek=zn(/^aria-[\-\w]+$/),D0=zn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tk=zn(/^(?:\w+script|data):/i),nk=zn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),O0=zn(/^html$/i),ak=zn(/^[a-z][.\w]*(-[.\w]+)+$/i);var R0=Object.freeze({__proto__:null,ARIA_ATTR:ek,ATTR_WHITESPACE:nk,CUSTOM_ELEMENT:ak,DATA_ATTR:W3,DOCTYPE_NAME:O0,ERB_EXPR:J3,IS_ALLOWED_URI:D0,IS_SCRIPT_OR_DATA:tk,MUSTACHE_EXPR:F3,TMPLIT_EXPR:P3});const qo={element:1,text:3,progressingInstruction:7,comment:8,document:9},lk=function(){return typeof window>"u"?null:window},ik=function(a,i){if(typeof a!="object"||typeof a.createPolicy!="function")return null;let s=null;const r="data-tt-policy-suffix";i&&i.hasAttribute(r)&&(s=i.getAttribute(r));const c="dompurify"+(s?"#"+s:"");try{return a.createPolicy(c,{createHTML(u){return u},createScriptURL(u){return u}})}catch{return console.warn("TrustedTypes policy "+c+" could not be created."),null}},j0=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function L0(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lk();const a=ve=>L0(ve);if(a.version="3.3.0",a.removed=[],!n||!n.document||n.document.nodeType!==qo.document||!n.Element)return a.isSupported=!1,a;let{document:i}=n;const s=i,r=s.currentScript,{DocumentFragment:c,HTMLTemplateElement:u,Node:h,Element:g,NodeFilter:p,NamedNodeMap:x=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:y,DOMParser:v,trustedTypes:S}=n,b=g.prototype,E=Yo(b,"cloneNode"),_=Yo(b,"remove"),T=Yo(b,"nextSibling"),z=Yo(b,"childNodes"),N=Yo(b,"parentNode");if(typeof u=="function"){const ve=i.createElement("template");ve.content&&ve.content.ownerDocument&&(i=ve.content.ownerDocument)}let C,D="";const{implementation:R,createNodeIterator:j,createDocumentFragment:K,getElementsByTagName:J}=i,{importNode:fe}=s;let U=j0();a.isSupported=typeof A0=="function"&&typeof N=="function"&&R&&R.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:F,ERB_EXPR:ae,TMPLIT_EXPR:H,DATA_ATTR:I,ARIA_ATTR:k,IS_SCRIPT_OR_DATA:L,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:Z}=R0;let{IS_ALLOWED_URI:Y}=R0,A=null;const O=Le({},[...T0,...hf,...pf,...gf,...C0]);let G=null;const P=Le({},[...M0,...mf,...z0,...Tr]);let se=Object.seal(rf(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ge=null,he=null;const ue=Object.seal(rf(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let me=!0,Ne=!0,ke=!1,Se=!0,_e=!1,we=!0,Me=!1,Re=!1,le=!1,de=!1,Je=!1,et=!1,on=!0,wn=!1;const _t="user-content-";let gt=!0,sn=!1,Bt={},$t=null;const Rt=Le({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Na=null;const ea=Le({},["audio","video","img","source","image","track"]);let ta=null;const pa=Le({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),rn="http://www.w3.org/1998/Math/MathML",vt="http://www.w3.org/2000/svg",mt="http://www.w3.org/1999/xhtml";let dt=mt,ka=!1,ga=null;const je=Le({},[rn,vt,mt],ff);let tt=Le({},["mi","mo","mn","ms","mtext"]),yt=Le({},["annotation-xml"]);const jt=Le({},["title","style","font","a","script"]);let Ye=null;const En=["application/xhtml+xml","text/html"],na="text/html";let ht=null,Ft=null;const Ta=i.createElement("form"),Dn=function(q){return q instanceof RegExp||q instanceof Function},ma=function(){let q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ft&&Ft===q)){if((!q||typeof q!="object")&&(q={}),q=Aa(q),Ye=En.indexOf(q.PARSER_MEDIA_TYPE)===-1?na:q.PARSER_MEDIA_TYPE,ht=Ye==="application/xhtml+xml"?ff:kr,A=Pn(q,"ALLOWED_TAGS")?Le({},q.ALLOWED_TAGS,ht):O,G=Pn(q,"ALLOWED_ATTR")?Le({},q.ALLOWED_ATTR,ht):P,ga=Pn(q,"ALLOWED_NAMESPACES")?Le({},q.ALLOWED_NAMESPACES,ff):je,ta=Pn(q,"ADD_URI_SAFE_ATTR")?Le(Aa(pa),q.ADD_URI_SAFE_ATTR,ht):pa,Na=Pn(q,"ADD_DATA_URI_TAGS")?Le(Aa(ea),q.ADD_DATA_URI_TAGS,ht):ea,$t=Pn(q,"FORBID_CONTENTS")?Le({},q.FORBID_CONTENTS,ht):Rt,ge=Pn(q,"FORBID_TAGS")?Le({},q.FORBID_TAGS,ht):Aa({}),he=Pn(q,"FORBID_ATTR")?Le({},q.FORBID_ATTR,ht):Aa({}),Bt=Pn(q,"USE_PROFILES")?q.USE_PROFILES:!1,me=q.ALLOW_ARIA_ATTR!==!1,Ne=q.ALLOW_DATA_ATTR!==!1,ke=q.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=q.ALLOW_SELF_CLOSE_IN_ATTR!==!1,_e=q.SAFE_FOR_TEMPLATES||!1,we=q.SAFE_FOR_XML!==!1,Me=q.WHOLE_DOCUMENT||!1,de=q.RETURN_DOM||!1,Je=q.RETURN_DOM_FRAGMENT||!1,et=q.RETURN_TRUSTED_TYPE||!1,le=q.FORCE_BODY||!1,on=q.SANITIZE_DOM!==!1,wn=q.SANITIZE_NAMED_PROPS||!1,gt=q.KEEP_CONTENT!==!1,sn=q.IN_PLACE||!1,Y=q.ALLOWED_URI_REGEXP||D0,dt=q.NAMESPACE||mt,tt=q.MATHML_TEXT_INTEGRATION_POINTS||tt,yt=q.HTML_INTEGRATION_POINTS||yt,se=q.CUSTOM_ELEMENT_HANDLING||{},q.CUSTOM_ELEMENT_HANDLING&&Dn(q.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(se.tagNameCheck=q.CUSTOM_ELEMENT_HANDLING.tagNameCheck),q.CUSTOM_ELEMENT_HANDLING&&Dn(q.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(se.attributeNameCheck=q.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),q.CUSTOM_ELEMENT_HANDLING&&typeof q.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(se.allowCustomizedBuiltInElements=q.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),_e&&(Ne=!1),Je&&(de=!0),Bt&&(A=Le({},C0),G=[],Bt.html===!0&&(Le(A,T0),Le(G,M0)),Bt.svg===!0&&(Le(A,hf),Le(G,mf),Le(G,Tr)),Bt.svgFilters===!0&&(Le(A,pf),Le(G,mf),Le(G,Tr)),Bt.mathMl===!0&&(Le(A,gf),Le(G,z0),Le(G,Tr))),q.ADD_TAGS&&(typeof q.ADD_TAGS=="function"?ue.tagCheck=q.ADD_TAGS:(A===O&&(A=Aa(A)),Le(A,q.ADD_TAGS,ht))),q.ADD_ATTR&&(typeof q.ADD_ATTR=="function"?ue.attributeCheck=q.ADD_ATTR:(G===P&&(G=Aa(G)),Le(G,q.ADD_ATTR,ht))),q.ADD_URI_SAFE_ATTR&&Le(ta,q.ADD_URI_SAFE_ATTR,ht),q.FORBID_CONTENTS&&($t===Rt&&($t=Aa($t)),Le($t,q.FORBID_CONTENTS,ht)),gt&&(A["#text"]=!0),Me&&Le(A,["html","head","body"]),A.table&&(Le(A,["tbody"]),delete ge.tbody),q.TRUSTED_TYPES_POLICY){if(typeof q.TRUSTED_TYPES_POLICY.createHTML!="function")throw $o('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof q.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $o('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=q.TRUSTED_TYPES_POLICY,D=C.createHTML("")}else C===void 0&&(C=ik(S,r)),C!==null&&typeof D=="string"&&(D=C.createHTML(""));en&&en(q),Ft=q}},Ca=Le({},[...hf,...pf,...Q3]),Ma=Le({},[...gf,...K3]),On=function(q){let pe=N(q);(!pe||!pe.tagName)&&(pe={namespaceURI:dt,tagName:"template"});const ye=kr(q.tagName),Xe=kr(pe.tagName);return ga[q.namespaceURI]?q.namespaceURI===vt?pe.namespaceURI===mt?ye==="svg":pe.namespaceURI===rn?ye==="svg"&&(Xe==="annotation-xml"||tt[Xe]):!!Ca[ye]:q.namespaceURI===rn?pe.namespaceURI===mt?ye==="math":pe.namespaceURI===vt?ye==="math"&&yt[Xe]:!!Ma[ye]:q.namespaceURI===mt?pe.namespaceURI===vt&&!yt[Xe]||pe.namespaceURI===rn&&!tt[Xe]?!1:!Ma[ye]&&(jt[ye]||!Ca[ye]):!!(Ye==="application/xhtml+xml"&&ga[q.namespaceURI]):!1},Ct=function(q){Uo(a.removed,{element:q});try{N(q).removeChild(q)}catch{_(q)}},Yt=function(q,pe){try{Uo(a.removed,{attribute:pe.getAttributeNode(q),from:pe})}catch{Uo(a.removed,{attribute:null,from:pe})}if(pe.removeAttribute(q),q==="is")if(de||Je)try{Ct(pe)}catch{}else try{pe.setAttribute(q,"")}catch{}},Rn=function(q){let pe=null,ye=null;if(le)q="<remove></remove>"+q;else{const De=df(q,/^[\r\n\t ]+/);ye=De&&De[0]}Ye==="application/xhtml+xml"&&dt===mt&&(q='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+q+"</body></html>");const Xe=C?C.createHTML(q):q;if(dt===mt)try{pe=new v().parseFromString(Xe,Ye)}catch{}if(!pe||!pe.documentElement){pe=R.createDocument(dt,"template",null);try{pe.documentElement.innerHTML=ka?D:Xe}catch{}}const st=pe.body||pe.documentElement;return q&&ye&&st.insertBefore(i.createTextNode(ye),st.childNodes[0]||null),dt===mt?J.call(pe,Me?"html":"body")[0]:Me?pe.documentElement:st},Vl=function(q){return j.call(q.ownerDocument||q,q,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},cn=function(q){return q instanceof y&&(typeof q.nodeName!="string"||typeof q.textContent!="string"||typeof q.removeChild!="function"||!(q.attributes instanceof x)||typeof q.removeAttribute!="function"||typeof q.setAttribute!="function"||typeof q.namespaceURI!="string"||typeof q.insertBefore!="function"||typeof q.hasChildNodes!="function")},bt=function(q){return typeof h=="function"&&q instanceof h};function ot(ve,q,pe){Nr(ve,ye=>{ye.call(a,q,pe,Ft)})}const jn=function(q){let pe=null;if(ot(U.beforeSanitizeElements,q,null),cn(q))return Ct(q),!0;const ye=ht(q.nodeName);if(ot(U.uponSanitizeElement,q,{tagName:ye,allowedTags:A}),we&&q.hasChildNodes()&&!bt(q.firstElementChild)&&tn(/<[/\w!]/g,q.innerHTML)&&tn(/<[/\w!]/g,q.textContent)||q.nodeType===qo.progressingInstruction||we&&q.nodeType===qo.comment&&tn(/<[/\w]/g,q.data))return Ct(q),!0;if(!(ue.tagCheck instanceof Function&&ue.tagCheck(ye))&&(!A[ye]||ge[ye])){if(!ge[ye]&&$l(ye)&&(se.tagNameCheck instanceof RegExp&&tn(se.tagNameCheck,ye)||se.tagNameCheck instanceof Function&&se.tagNameCheck(ye)))return!1;if(gt&&!$t[ye]){const Xe=N(q)||q.parentNode,st=z(q)||q.childNodes;if(st&&Xe){const De=st.length;for(let Lt=De-1;Lt>=0;--Lt){const un=E(st[Lt],!0);un.__removalCount=(q.__removalCount||0)+1,Xe.insertBefore(un,T(q))}}}return Ct(q),!0}return q instanceof g&&!On(q)||(ye==="noscript"||ye==="noembed"||ye==="noframes")&&tn(/<\/no(script|embed|frames)/i,q.innerHTML)?(Ct(q),!0):(_e&&q.nodeType===qo.text&&(pe=q.textContent,Nr([F,ae,H],Xe=>{pe=Vo(pe,Xe," ")}),q.textContent!==pe&&(Uo(a.removed,{element:q.cloneNode()}),q.textContent=pe)),ot(U.afterSanitizeElements,q,null),!1)},za=function(q,pe,ye){if(on&&(pe==="id"||pe==="name")&&(ye in i||ye in Ta))return!1;if(!(Ne&&!he[pe]&&tn(I,pe))){if(!(me&&tn(k,pe))){if(!(ue.attributeCheck instanceof Function&&ue.attributeCheck(pe,q))){if(!G[pe]||he[pe]){if(!($l(q)&&(se.tagNameCheck instanceof RegExp&&tn(se.tagNameCheck,q)||se.tagNameCheck instanceof Function&&se.tagNameCheck(q))&&(se.attributeNameCheck instanceof RegExp&&tn(se.attributeNameCheck,pe)||se.attributeNameCheck instanceof Function&&se.attributeNameCheck(pe,q))||pe==="is"&&se.allowCustomizedBuiltInElements&&(se.tagNameCheck instanceof RegExp&&tn(se.tagNameCheck,ye)||se.tagNameCheck instanceof Function&&se.tagNameCheck(ye))))return!1}else if(!ta[pe]){if(!tn(Y,Vo(ye,$,""))){if(!((pe==="src"||pe==="xlink:href"||pe==="href")&&q!=="script"&&X3(ye,"data:")===0&&Na[q])){if(!(ke&&!tn(L,Vo(ye,$,"")))){if(ye)return!1}}}}}}}return!0},$l=function(q){return q!=="annotation-xml"&&df(q,Z)},bi=function(q){ot(U.beforeSanitizeAttributes,q,null);const{attributes:pe}=q;if(!pe||cn(q))return;const ye={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:G,forceKeepAttr:void 0};let Xe=pe.length;for(;Xe--;){const st=pe[Xe],{name:De,namespaceURI:Lt,value:un}=st,Jt=ht(De),Ln=un;let At=De==="value"?Ln:G3(Ln);if(ye.attrName=Jt,ye.attrValue=At,ye.keepAttr=!0,ye.forceKeepAttr=void 0,ot(U.uponSanitizeAttribute,q,ye),At=ye.attrValue,wn&&(Jt==="id"||Jt==="name")&&(Yt(De,q),At=_t+At),we&&tn(/((--!?|])>)|<\/(style|title|textarea)/i,At)){Yt(De,q);continue}if(Jt==="attributename"&&df(At,"href")){Yt(De,q);continue}if(ye.forceKeepAttr)continue;if(!ye.keepAttr){Yt(De,q);continue}if(!Se&&tn(/\/>/i,At)){Yt(De,q);continue}_e&&Nr([F,ae,H],Yl=>{At=Vo(At,Yl," ")});const al=ht(q.nodeName);if(!za(al,Jt,At)){Yt(De,q);continue}if(C&&typeof S=="object"&&typeof S.getAttributeType=="function"&&!Lt)switch(S.getAttributeType(al,Jt)){case"TrustedHTML":{At=C.createHTML(At);break}case"TrustedScriptURL":{At=C.createScriptURL(At);break}}if(At!==Ln)try{Lt?q.setAttributeNS(Lt,De,At):q.setAttribute(De,At),cn(q)?Ct(q):k0(a.removed)}catch{Yt(De,q)}}ot(U.afterSanitizeAttributes,q,null)},Si=function ve(q){let pe=null;const ye=Vl(q);for(ot(U.beforeSanitizeShadowDOM,q,null);pe=ye.nextNode();)ot(U.uponSanitizeShadowNode,pe,null),jn(pe),bi(pe),pe.content instanceof c&&ve(pe.content);ot(U.afterSanitizeShadowDOM,q,null)};return a.sanitize=function(ve){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},pe=null,ye=null,Xe=null,st=null;if(ka=!ve,ka&&(ve="<!-->"),typeof ve!="string"&&!bt(ve))if(typeof ve.toString=="function"){if(ve=ve.toString(),typeof ve!="string")throw $o("dirty is not a string, aborting")}else throw $o("toString is not a function");if(!a.isSupported)return ve;if(Re||ma(q),a.removed=[],typeof ve=="string"&&(sn=!1),sn){if(ve.nodeName){const un=ht(ve.nodeName);if(!A[un]||ge[un])throw $o("root node is forbidden and cannot be sanitized in-place")}}else if(ve instanceof h)pe=Rn("<!---->"),ye=pe.ownerDocument.importNode(ve,!0),ye.nodeType===qo.element&&ye.nodeName==="BODY"||ye.nodeName==="HTML"?pe=ye:pe.appendChild(ye);else{if(!de&&!_e&&!Me&&ve.indexOf("<")===-1)return C&&et?C.createHTML(ve):ve;if(pe=Rn(ve),!pe)return de?null:et?D:""}pe&&le&&Ct(pe.firstChild);const De=Vl(sn?ve:pe);for(;Xe=De.nextNode();)jn(Xe),bi(Xe),Xe.content instanceof c&&Si(Xe.content);if(sn)return ve;if(de){if(Je)for(st=K.call(pe.ownerDocument);pe.firstChild;)st.appendChild(pe.firstChild);else st=pe;return(G.shadowroot||G.shadowrootmode)&&(st=fe.call(s,st,!0)),st}let Lt=Me?pe.outerHTML:pe.innerHTML;return Me&&A["!doctype"]&&pe.ownerDocument&&pe.ownerDocument.doctype&&pe.ownerDocument.doctype.name&&tn(O0,pe.ownerDocument.doctype.name)&&(Lt="<!DOCTYPE "+pe.ownerDocument.doctype.name+`>
|
|
311
|
-
`+Lt),_e&&Nr([F,ae,H],un=>{Lt=Vo(Lt,un," ")}),C&&et?C.createHTML(Lt):Lt},a.setConfig=function(){let ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ma(ve),Re=!0},a.clearConfig=function(){Ft=null,Re=!1},a.isValidAttribute=function(ve,q,pe){Ft||ma({});const ye=ht(ve),Xe=ht(q);return za(ye,Xe,pe)},a.addHook=function(ve,q){typeof q=="function"&&Uo(U[ve],q)},a.removeHook=function(ve,q){if(q!==void 0){const pe=Y3(U[ve],q);return pe===-1?void 0:q3(U[ve],pe,1)[0]}return k0(U[ve])},a.removeHooks=function(ve){U[ve]=[]},a.removeAllHooks=function(){U=j0()},a}var ok=L0();const H0=n=>{let a;const i=new Set,s=(p,x)=>{const y=typeof p=="function"?p(a):p;if(!Object.is(y,a)){const v=a;a=x??(typeof y!="object"||y===null)?y:Object.assign({},a,y),i.forEach(S=>S(a,v))}},r=()=>a,h={setState:s,getState:r,getInitialState:()=>g,subscribe:p=>(i.add(p),()=>i.delete(p))},g=a=n(s,r,h);return h},B0=(n=>n?H0(n):H0),sk=n=>n;function rk(n,a=sk){const i=Ka.useSyncExternalStore(n.subscribe,Ka.useCallback(()=>a(n.getState()),[n,a]),Ka.useCallback(()=>a(n.getInitialState()),[n,a]));return Ka.useDebugValue(i),i}const ck=n=>{const a=B0(n),i=s=>rk(a,s);return Object.assign(i,a),i},U0=(n=>ck),yf=n=>!!n&&n[0]==="o",xf=Do.unstable_batchedUpdates,Xo=(n,a)=>n===!0||!!(n&&n[a]),Sn=(n,a)=>typeof n=="function"?n(a):n,V0="_szhsinMenu",uk=n=>n[V0],fk=(n,a)=>Object.defineProperty(a,V0,{value:n}),Go=(n,a)=>(a&&Object.keys(a).forEach(i=>{const s=n[i],r=a[i];typeof r=="function"&&s?n[i]=(...c)=>{r(...c),s(...c)}:n[i]=r}),n),dk=n=>{if(typeof n!="string")return{top:0,right:0,bottom:0,left:0};const a=n.trim().split(/\s+/,4).map(parseFloat),i=isNaN(a[0])?0:a[0],s=isNaN(a[1])?i:a[1];return{top:i,right:s,bottom:isNaN(a[2])?i:a[2],left:isNaN(a[3])?s:a[3]}},vf=n=>{for(;n;){if(n=n.parentNode,!n||n===document.body||!n.parentNode)return;const{overflow:a,overflowX:i,overflowY:s}=getComputedStyle(n);if(/auto|scroll|overlay|hidden/.test(a+s+i))return n}};function bf(n,a){return{"aria-disabled":n||void 0,tabIndex:a?0:-1}}function $0(n,a){for(let i=0;i<n.length;i++)if(n[i]===a)return i;return-1}const nl=({block:n,element:a,modifiers:i,className:s})=>B.useMemo(()=>{const r=a?`${n}__${a}`:n;let c=r;i&&Object.keys(i).forEach(h=>{const g=i[h];g&&(c+=` ${r}--${g===!0?h:`${h}-${g}`}`)});let u=typeof s=="function"?s(i):s;return typeof u=="string"&&(u=u.trim(),u&&(c+=` ${u}`)),c},[n,a,i,s]),hk="szh-menu-container",Ul="szh-menu",pk="szh-menu-button",gk="arrow",Y0="item",mk="divider",yk="submenu",q0=B.createContext(),Sf=B.createContext({}),wf=B.createContext({}),X0=B.createContext({}),xk=B.createContext({}),Cr=B.createContext({}),Qt=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),Et=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),Zo=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),vi=Object.freeze({FIRST:"first",LAST:"last"}),vk=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),G0="absolute",Z0="none",I0="menuitem",Ef={preventScroll:!0},Q0=fk("MenuButton",B.forwardRef(function({className:a,isOpen:i,disabled:s,children:r,...c},u){const h=B.useMemo(()=>({open:i}),[i]);return m.jsx("button",{"aria-haspopup":!0,"aria-expanded":i,"aria-disabled":s||void 0,type:"button",disabled:s,...c,ref:u,className:nl({block:pk,modifiers:h,className:a}),children:r})})),bk=({className:n,containerRef:a,containerProps:i,children:s,isOpen:r,theming:c,transition:u,onClose:h})=>{const g=Xo(u,"item"),p=({key:y})=>{switch(y){case Qt.ESC:Sn(h,{key:y,reason:Zo.CANCEL});break}},x=y=>{r&&!y.currentTarget.contains(y.relatedTarget)&&Sn(h,{reason:Zo.BLUR})};return m.jsx("div",{...Go({onKeyDown:p,onBlur:x},i),className:nl({block:hk,modifiers:B.useMemo(()=>({theme:c,itemTransition:g}),[c,g]),className:n}),style:{position:"absolute",...i?.style},ref:a,children:s})},Sk=()=>{let n,a=0;return{toggle:i=>{i?a++:a--,a=Math.max(a,0)},on:(i,s,r)=>{a?n||(n=setTimeout(()=>{n=0,s()},i)):r?.()},off:()=>{n&&(clearTimeout(n),n=0)}}},wk=n=>{const[a,i]=B.useState(),r=B.useRef({items:[],hoverIndex:-1,sorted:!1}).current,c=B.useCallback((h,g)=>{const{items:p}=r;if(!h)r.items=[];else if(g)p.push(h);else{const x=p.indexOf(h);x>-1&&(p.splice(x,1),h.contains(document.activeElement)&&(n.current.focus(Ef),i()))}r.hoverIndex=-1,r.sorted=!1},[r,n]),u=B.useCallback((h,g,p)=>{const{items:x,hoverIndex:y}=r,v=()=>{if(r.sorted)return;const E=n.current.querySelectorAll(".szh-menu__item");x.sort((_,T)=>$0(E,_)-$0(E,T)),r.sorted=!0};let S=-1,b;switch(h){case Et.RESET:break;case Et.SET:b=g;break;case Et.UNSET:b=E=>E===g?void 0:E;break;case Et.FIRST:v(),S=0,b=x[S];break;case Et.LAST:v(),S=x.length-1,b=x[S];break;case Et.SET_INDEX:v(),S=p,b=x[S];break;case Et.INCREASE:v(),S=y,S<0&&(S=x.indexOf(g)),S++,S>=x.length&&(S=0),b=x[S];break;case Et.DECREASE:v(),S=y,S<0&&(S=x.indexOf(g)),S--,S<0&&(S=x.length-1),b=x[S];break}b||(S=-1),i(b),r.hoverIndex=S},[n,r]);return{hoverItem:a,dispatch:u,updateItems:c}},K0=(n,a)=>Math.round(n)===a?n:a,Ek=n=>{const a=n.getBoundingClientRect();return a.width=K0(a.width,n.offsetWidth),a.height=K0(a.height,n.offsetHeight),a},_k=(n,a,i,s)=>{const r=Ek(a),c=n.getBoundingClientRect(),u=i===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:i.getBoundingClientRect(),h=dk(s),g=b=>b+c.left-u.left-h.left,p=b=>b+c.left+r.width-u.right+h.right,x=b=>b+c.top-u.top-h.top,y=b=>b+c.top+r.height-u.bottom+h.bottom;return{menuRect:r,containerRect:c,getLeftOverflow:g,getRightOverflow:p,getTopOverflow:x,getBottomOverflow:y,confineHorizontally:b=>{let E=g(b);if(E<0)b-=E;else{const _=p(b);_>0&&(b-=_,E=g(b),E<0&&(b-=E))}return b},confineVertically:b=>{let E=x(b);if(E<0)b-=E;else{const _=y(b);_>0&&(b-=_,E=x(b),E<0&&(b-=E))}return b}}},Ak=({arrowRef:n,menuY:a,anchorRect:i,containerRect:s,menuRect:r})=>{let c=i.top-s.top-a+i.height/2;const u=n.current.offsetHeight*1.25;return c=Math.max(u,c),c=Math.min(c,r.height-u),c},Nk=({anchorRect:n,containerRect:a,menuRect:i,placeLeftorRightY:s,placeLeftX:r,placeRightX:c,getLeftOverflow:u,getRightOverflow:h,confineHorizontally:g,confineVertically:p,arrowRef:x,arrow:y,direction:v,position:S})=>{let b=v,E=s;S!=="initial"&&(E=p(E),S==="anchor"&&(E=Math.min(E,n.bottom-a.top),E=Math.max(E,n.top-a.top-i.height)));let _,T,z;return b==="left"?(_=r,S!=="initial"&&(T=u(_),T<0&&(z=h(c),(z<=0||-T>z)&&(_=c,b="right")))):(_=c,S!=="initial"&&(z=h(_),z>0&&(T=u(r),(T>=0||-T<z)&&(_=r,b="left")))),S==="auto"&&(_=g(_)),{arrowY:y?Ak({menuY:E,arrowRef:x,anchorRect:n,containerRect:a,menuRect:i}):void 0,x:_,y:E,computedDirection:b}},kk=({arrowRef:n,menuX:a,anchorRect:i,containerRect:s,menuRect:r})=>{let c=i.left-s.left-a+i.width/2;const u=n.current.offsetWidth*1.25;return c=Math.max(u,c),c=Math.min(c,r.width-u),c},Tk=({anchorRect:n,containerRect:a,menuRect:i,placeToporBottomX:s,placeTopY:r,placeBottomY:c,getTopOverflow:u,getBottomOverflow:h,confineHorizontally:g,confineVertically:p,arrowRef:x,arrow:y,direction:v,position:S})=>{let b=v==="top"?"top":"bottom",E=s;S!=="initial"&&(E=g(E),S==="anchor"&&(E=Math.min(E,n.right-a.left),E=Math.max(E,n.left-a.left-i.width)));let _,T,z;return b==="top"?(_=r,S!=="initial"&&(T=u(_),T<0&&(z=h(c),(z<=0||-T>z)&&(_=c,b="bottom")))):(_=c,S!=="initial"&&(z=h(_),z>0&&(T=u(r),(T>=0||-T<z)&&(_=r,b="top")))),S==="auto"&&(_=p(_)),{arrowX:y?kk({menuX:E,arrowRef:x,anchorRect:n,containerRect:a,menuRect:i}):void 0,x:E,y:_,computedDirection:b}},Ck=({arrow:n,align:a,direction:i,gap:s,shift:r,position:c,anchorRect:u,arrowRef:h,positionHelpers:g})=>{const{menuRect:p,containerRect:x}=g,y=i==="left"||i==="right";let v=y?s:r,S=y?r:s;if(n){const D=h.current;y?v+=D.offsetWidth:S+=D.offsetHeight}const b=u.left-x.left-p.width-v,E=u.right-x.left+v,_=u.top-x.top-p.height-S,T=u.bottom-x.top+S;let z,N;a==="end"?(z=u.right-x.left-p.width,N=u.bottom-x.top-p.height):a==="center"?(z=u.left-x.left-(p.width-u.width)/2,N=u.top-x.top-(p.height-u.height)/2):(z=u.left-x.left,N=u.top-x.top),z+=v,N+=S;const C={...g,anchorRect:u,placeLeftX:b,placeRightX:E,placeLeftorRightY:N,placeTopY:_,placeBottomY:T,placeToporBottomX:z,arrowRef:h,arrow:n,direction:i,position:c};switch(i){case"left":case"right":return Nk(C);case"top":case"bottom":default:return Tk(C)}},Mr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?B.useLayoutEffect:B.useEffect;function F0(n,a){typeof n=="function"?n(a):n.current=a}const zr=(n,a)=>B.useMemo(()=>n?a?i=>{F0(n,i),F0(a,i)}:n:a,[n,a]),J0=-9999,P0=({ariaLabel:n,menuClassName:a,menuStyle:i,arrow:s,arrowProps:r={},anchorPoint:c,anchorRef:u,containerRef:h,containerProps:g,externalRef:p,parentScrollingRef:x,align:y="start",direction:v="bottom",position:S="auto",overflow:b="visible",setDownOverflow:E,repositionFlag:_,captureFocus:T=!0,state:z,endTransition:N,isDisabled:C,menuItemFocus:D,gap:R=0,shift:j=0,children:K,onClose:J,focusProps:fe,...U})=>{const[F,ae]=B.useState({x:J0,y:J0}),[H,I]=B.useState({}),[k,L]=B.useState(),[$,Z]=B.useState(v),[Y]=B.useState(Sk),[A,O]=B.useReducer(je=>je+1,1),{transition:G,boundingBoxRef:P,boundingBoxPadding:se,rootMenuRef:ge,rootAnchorRef:he,scrollNodesRef:ue,reposition:me,viewScroll:Ne,submenuCloseDelay:ke}=B.useContext(Cr),{submenuCtx:Se,reposSubmenu:_e=_}=B.useContext(wf),we=B.useRef(),Me=B.useRef(),Re=B.useRef(!1),{hoverItem:le,dispatch:de,updateItems:Je}=wk(we),et=yf(z),on=Xo(G,"open"),wn=Xo(G,"close"),_t=ue.current,gt=je=>{switch(je.key){case Qt.HOME:de(Et.FIRST);break;case Qt.END:de(Et.LAST);break;case Qt.UP:de(Et.DECREASE,le);break;case Qt.DOWN:de(Et.INCREASE,le);break;case Qt.SPACE:je.target&&je.target.className.indexOf(Ul)!==-1&&je.preventDefault();return;default:return}je.preventDefault(),je.stopPropagation()},sn=()=>{z==="closing"&&L(),Sn(N)},Bt=je=>{je.stopPropagation(),Y.on(ke,()=>{de(Et.RESET),we.current.focus(Ef)})},$t=je=>{je.target===je.currentTarget&&Y.off()},Rt=B.useCallback(je=>{const tt=we.current,yt=h.current;if(!tt||!yt)return;const jt=u?u.current?.getBoundingClientRect():c?{left:c.x,right:c.x,top:c.y,bottom:c.y,width:0,height:0}:null;if(!jt)return;_t.menu||(_t.menu=(P?P.current:vf(ge.current))||window);const Ye=_k(yt,tt,_t.menu,se);let{arrowX:En,arrowY:na,x:ht,y:Ft,computedDirection:Ta}=Ck({arrow:s,align:y,direction:v,gap:R,shift:j,position:S,anchorRect:jt,arrowRef:Me,positionHelpers:Ye});const{menuRect:Dn}=Ye,ma=Dn.height;if(!je&&b!=="visible"){const{getTopOverflow:Ca,getBottomOverflow:Ma}=Ye;let On,Ct;const Yt=Ma(Ft);if(Yt>0)On=ma-Yt,Ct=Yt;else{const Rn=Ca(Ft);Rn<0&&(On=ma+Rn,Ct=0-Rn,On>=0&&(Ft-=Rn))}On>=0&&L({height:On,overflowAmt:Ct})}s&&I({x:En,y:na}),ae({x:ht,y:Ft}),Z(Ta)},[s,y,se,v,R,j,S,b,c,u,h,P,ge,_t]);Mr(()=>{et&&(Rt(),Re.current&&O()),Re.current=et},[et,Rt,_e]),Mr(()=>{k&&!E&&(we.current.scrollTop=0)},[k,E]),Mr(()=>Je,[Je]),B.useEffect(()=>{let{menu:je}=_t;if(!et||!je)return;if(je=je.addEventListener?je:window,!_t.anchors){_t.anchors=[];let Ye=vf(he&&he.current);for(;Ye&&Ye!==je;)_t.anchors.push(Ye),Ye=vf(Ye)}let tt=Ne;if(_t.anchors.length&&tt==="initial"&&(tt="auto"),tt==="initial")return;const yt=()=>{tt==="auto"?xf(()=>Rt(!0)):Sn(J,{reason:Zo.SCROLL})},jt=_t.anchors.concat(Ne!=="initial"?je:[]);return jt.forEach(Ye=>Ye.addEventListener("scroll",yt)),()=>jt.forEach(Ye=>Ye.removeEventListener("scroll",yt))},[he,_t,et,J,Ne,Rt]);const Na=!!k&&k.overflowAmt>0;B.useEffect(()=>{if(Na||!et||!x)return;const je=()=>xf(Rt),tt=x.current;return tt.addEventListener("scroll",je),()=>tt.removeEventListener("scroll",je)},[et,Na,x,Rt]),B.useEffect(()=>{if(!et||typeof ResizeObserver!="function"||me==="initial")return;const je=[],tt=new ResizeObserver(Ye=>Ye.forEach(({target:En})=>{je.indexOf(En)<0?je.push(En):Do.flushSync(()=>{Rt(),O()})})),yt={box:"border-box"};tt.observe(we.current,yt);const jt=u?.current;return jt&&tt.observe(jt,yt),()=>tt.disconnect()},[et,me,u,Rt]),B.useEffect(()=>{if(!et){de(Et.RESET),wn||L();return}const{position:je,alwaysUpdate:tt}=D||{},yt=()=>{je===vi.FIRST?de(Et.FIRST):je===vi.LAST?de(Et.LAST):je>=-1&&de(Et.SET_INDEX,void 0,je)};if(tt)yt();else if(T){const jt=setTimeout(()=>{const Ye=we.current;Ye&&!Ye.contains(document.activeElement)&&(Ye.focus(Ef),yt())},on?170:100);return()=>clearTimeout(jt)}},[et,on,wn,T,D,de]);const ea=B.useMemo(()=>({isParentOpen:et,submenuCtx:Y,dispatch:de,updateItems:Je}),[et,Y,de,Je]);let ta,pa;k&&(E?pa=k.overflowAmt:ta=k.height);const rn=B.useMemo(()=>({reposSubmenu:A,submenuCtx:Y,overflow:b,overflowAmt:pa,parentMenuRef:we,parentDir:$}),[A,Y,b,pa,$]),vt=ta>=0?{maxHeight:ta,overflow:b}:void 0,mt=B.useMemo(()=>({state:z,align:y,dir:$}),[z,y,$]),dt=B.useMemo(()=>({dir:$}),[$]),ka=nl({block:Ul,element:gk,modifiers:dt,className:r.className}),ga=m.jsxs("ul",{role:"menu","aria-label":n,...bf(C),...Go({onPointerEnter:Se?.off,onPointerMove:Bt,onPointerLeave:$t,onKeyDown:gt,onAnimationEnd:sn},U),ref:zr(p,we),className:nl({block:Ul,modifiers:mt,className:a}),style:{...i,...vt,margin:0,display:z==="closed"?"none":void 0,position:G0,left:F.x,top:F.y},children:[s&&m.jsx("li",{"aria-hidden":!0,...r,className:ka,style:{display:"block",position:G0,left:H.x,top:H.y,...r.style},ref:Me}),m.jsx(wf.Provider,{value:rn,children:m.jsx(Sf.Provider,{value:ea,children:m.jsx(q0.Provider,{value:le,children:Sn(K,mt)})})})]});return g?m.jsx(bk,{...g,isOpen:et,children:ga}):ga},Mk=B.forwardRef(function({"aria-label":a,className:i,containerProps:s,initialMounted:r,unmountOnClose:c,transition:u,transitionTimeout:h,boundingBoxRef:g,boundingBoxPadding:p,reposition:x="auto",submenuOpenDelay:y=300,submenuCloseDelay:v=150,viewScroll:S="initial",portal:b,theming:E,onItemClick:_,...T},z){const N=B.useRef(null),C=B.useRef({}),{anchorRef:D,state:R,onClose:j}=T,K=B.useMemo(()=>({initialMounted:r,unmountOnClose:c,transition:u,transitionTimeout:h,boundingBoxRef:g,boundingBoxPadding:p,rootMenuRef:N,rootAnchorRef:D,scrollNodesRef:C,reposition:x,viewScroll:S,submenuOpenDelay:y,submenuCloseDelay:v}),[r,c,u,h,D,g,p,x,S,y,v]),J=B.useMemo(()=>({handleClick(U,F){U.stopPropagation||Sn(_,U);let ae=U.keepOpen;ae===void 0&&(ae=F&&U.key===Qt.SPACE),ae||Sn(j,{value:U.value,key:U.key,reason:Zo.CLICK})},handleClose(U){Sn(j,{key:U,reason:Zo.CLICK})}}),[_,j]);if(!R)return null;const fe=m.jsx(Cr.Provider,{value:K,children:m.jsx(X0.Provider,{value:J,children:m.jsx(P0,{...T,ariaLabel:a||"Menu",externalRef:z,containerRef:N,containerProps:{className:i,containerRef:N,containerProps:s,theming:E,transition:u,onClose:j}})})});return b===!0&&typeof document<"u"?Do.createPortal(fe,document.body):b?b.target?Do.createPortal(fe,b.target):b.stablePosition?null:fe:fe}),_f=0,Af=1,Dr=2,Or=3,Rr=4,zk=5,W0=6,Dk=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],ey=n=>({_s:n,status:Dk[n],isEnter:n<Or,isMounted:n!==W0,isResolved:n===Dr||n>Rr}),Nf=n=>n?W0:zk,Ok=(n,a)=>{switch(n){case Af:case _f:return Dr;case Rr:case Or:return Nf(a)}},Rk=n=>typeof n=="object"?[n.enter,n.exit]:[n,n],jk=(n,a)=>setTimeout(()=>{isNaN(document.body.offsetTop)||n(a+1)},0),ty=(n,a,i,s,r)=>{clearTimeout(s.current);const c=ey(n);a(c),i.current=c,r&&r({current:c})},Lk=({enter:n=!0,exit:a=!0,preEnter:i,preExit:s,timeout:r,initialEntered:c,mountOnEnter:u,unmountOnExit:h,onStateChange:g}={})=>{const[p,x]=B.useState(()=>ey(c?Dr:Nf(u))),y=B.useRef(p),v=B.useRef(),[S,b]=Rk(r),E=B.useCallback(()=>{const T=Ok(y.current._s,h);T&&ty(T,x,y,v,g)},[g,h]),_=B.useCallback(T=>{const z=C=>{switch(ty(C,x,y,v,g),C){case Af:S>=0&&(v.current=setTimeout(E,S));break;case Rr:b>=0&&(v.current=setTimeout(E,b));break;case _f:case Or:v.current=jk(z,C);break}},N=y.current.isEnter;typeof T!="boolean"&&(T=!N),T?!N&&z(n?i?_f:Af:Dr):N&&z(a?s?Or:Rr:Nf(h))},[E,g,n,a,i,s,S,b,h]);return[p,_,E]},Hk=({initialOpen:n,initialMounted:a,unmountOnClose:i,transition:s,transitionTimeout:r=500,onMenuChange:c}={})=>{const u=Xo(s,"open"),h=Xo(s,"close"),[{status:g},p,x]=Lk({initialEntered:n,mountOnEnter:!a,unmountOnExit:i,timeout:r,enter:u,exit:h,onStateChange:B.useCallback(({current:{isEnter:y,isResolved:v}})=>{!c||y&&u&&v||!y&&h&&v||c({open:y})},[c,u,h])});return[{state:vk[g],endTransition:x},p]},ny=n=>{const[a,i]=Hk(n),[s,r]=B.useState(),c=(u,h)=>{r({position:u,alwaysUpdate:h}),i(!0)};return[{menuItemFocus:s,...a},i,c]},Bk=(n,a)=>{const[i]=B.useState({});return{onMouseDown:()=>{i.v=n&&n!=="closed"},onClick:s=>i.v?i.v=!1:a(!0,s)}},Uk=parseInt(B.version)<19,ay=B.forwardRef(function({"aria-label":a,captureFocus:i,initialOpen:s,menuButton:r,instanceRef:c,onMenuChange:u,...h},g){const[p,x,y]=ny({...h,onMenuChange:u}),{state:v}=p,S=yf(v),b=B.useRef(null),E=Bk(v,(D,R)=>y(R.detail?void 0:vi.FIRST)),_=B.useCallback(D=>{x(!1),D.key&&b.current.focus()},[x]),T=D=>{switch(D.key){case Qt.UP:y(vi.LAST);break;case Qt.DOWN:y(vi.FIRST);break;default:return}D.preventDefault()},z=Sn(r,{open:S});if(!z||!z.type)throw new Error("Menu requires a menuButton prop.");const N={...Go({onKeyDown:T,...E},z.props),ref:zr(Uk?z.ref:z.props.ref,b)};uk(z.type)==="MenuButton"&&(N.isOpen=S);const C=B.cloneElement(z,N);return B.useImperativeHandle(c,()=>({openMenu:y,closeMenu:()=>x(!1)})),m.jsxs(B.Fragment,{children:[C,m.jsx(Mk,{...h,...p,"aria-label":a||(typeof z.props.children=="string"?z.props.children:"Menu"),anchorRef:b,ref:g,onClose:_})]})}),ly=(n,a)=>{const i=B.memo(a),s=B.forwardRef((r,c)=>{const u=B.useRef(null);return m.jsx(i,{...r,itemRef:u,externalRef:c,isHovering:B.useContext(q0)===u.current})});return s.displayName=`WithHovering(${n})`,s},iy=n=>{const[a,i]=B.useState(!1);return B.useEffect(()=>{!n&&i(!1)},[n]),[a,()=>!a&&i(!0),()=>i(!1)]},oy=(n,a,i)=>{Mr(()=>{if(n)return;const s=a.current;return i(s,!0),()=>{i(s)}},[n,a,i])},Vk=ly("SubMenu",function({"aria-label":a,className:i,disabled:s,direction:r,label:c,openTrigger:u,onMenuChange:h,isHovering:g,instanceRef:p,itemRef:x,captureFocus:y,repositionFlag:v,itemProps:S={},portal:b=!1,...E}){const _=B.useContext(Cr),{rootMenuRef:T,submenuOpenDelay:z,submenuCloseDelay:N}=_,{parentMenuRef:C,parentDir:D,overflow:R}=B.useContext(wf),{isParentOpen:j,submenuCtx:K,dispatch:J,updateItems:fe}=B.useContext(Sf),U=b||R!=="visible",[F,ae,H]=ny({..._,onMenuChange:h}),[I,k,L]=iy(g),{state:$}=F,Z=!!s,Y=yf($),A=B.useRef(null),[O]=B.useState({v:0}),G=()=>{K.off(),O.v&&(clearTimeout(O.v),O.v=0)},P=(...le)=>{G(),se(),!Z&&H(...le)},se=()=>!g&&!Z&&J(Et.SET,x.current),ge=le=>{se(),u||(O.v=setTimeout(()=>xf(P),Math.max(le,0)))},he=le=>{Z||(le.stopPropagation(),k(),!(O.v||Y)&&K.on(N,()=>ge(z-N),()=>ge(z)))},ue=()=>{L(),G(),Y||J(Et.UNSET,x.current)},me=le=>{if(g)switch(le.key){case Qt.ENTER:le.preventDefault();case Qt.SPACE:case Qt.RIGHT:u!=="none"&&P(vi.FIRST)}},Ne=le=>{let de=!1;switch(le.key){case Qt.LEFT:Y&&(x.current.focus(),ae(!1),de=!0);break;case Qt.RIGHT:Y||(de=!0);break}de&&(le.preventDefault(),le.stopPropagation())};oy(Z,x,fe),B.useEffect(()=>K.toggle(Y),[K,Y]),B.useEffect(()=>()=>{clearTimeout(O.v),K.toggle(!1)},[O,K]),B.useEffect(()=>{g&&j?x.current.focus():ae(!1)},[g,j,ae,x]),B.useImperativeHandle(p,()=>({openMenu:(...le)=>{j&&P(...le)},closeMenu:()=>{Y&&(x.current.focus(),ae(!1))}}));const ke=B.useMemo(()=>({open:Y,hover:I||g,disabled:Z,submenu:!0}),[Y,g,Z,I]),{ref:Se,className:_e,...we}=S,Me=Go({onPointerEnter:K.off,onPointerMove:he,onPointerLeave:ue,onKeyDown:me,onClick:()=>u!=="none"&&P()},we),Re=()=>{const le=m.jsx(P0,{...E,...F,ariaLabel:a||(typeof c=="string"?c:"Submenu"),anchorRef:x,containerRef:U?T:A,direction:r||(D==="right"||D==="left"?D:"right"),parentScrollingRef:U&&C,isDisabled:Z}),de=T.current;return U&&de?Do.createPortal(le,de):le};return m.jsxs("li",{className:nl({block:Ul,element:yk,className:i}),style:{position:"relative"},role:Z0,ref:A,onKeyDown:Ne,children:[m.jsx("div",{role:I0,"aria-haspopup":!0,"aria-expanded":Y,...bf(Z,g),...Me,ref:zr(Se,x),className:nl({block:Ul,element:Y0,modifiers:ke,className:_e}),children:B.useMemo(()=>Sn(c,ke),[c,ke])}),$&&Re()]})}),$k=(n,a,i,s)=>{const[r,c,u]=iy(i),{submenuCloseDelay:h}=B.useContext(Cr),{isParentOpen:g,submenuCtx:p,dispatch:x,updateItems:y}=B.useContext(Sf),v=()=>{!i&&!s&&x(Et.SET,n.current)},S=()=>{!s&&x(Et.UNSET,n.current)},b=T=>{i&&!T.currentTarget.contains(T.relatedTarget)&&S()},E=T=>{s||(T.stopPropagation(),c(),p.on(h,v,v))},_=(T,z)=>{u(),p.off(),!z&&S()};return oy(s,n,y),B.useEffect(()=>{i&&g&&a.current&&a.current.focus()},[a,i,g]),{mouseOver:r,setHover:v,onBlur:b,onPointerMove:E,onPointerLeave:_}},Kt=ly("MenuItem",function({className:a,value:i,href:s,type:r,checked:c,disabled:u,children:h,onClick:g,isHovering:p,itemRef:x,externalRef:y,...v}){const S=!!u,{mouseOver:b,setHover:E,..._}=$k(x,x,p,S),T=B.useContext(X0),z=B.useContext(xk),N=r==="radio",C=r==="checkbox",D=!!s&&!S&&!N&&!C,R=N?z.value===i:C?!!c:!1,j=F=>{if(S){F.stopPropagation(),F.preventDefault();return}const ae={value:i,syntheticEvent:F};F.key!==void 0&&(ae.key=F.key),C&&(ae.checked=!R),N&&(ae.name=z.name),Sn(g,ae),N&&Sn(z.onRadioChange,ae),T.handleClick(ae,C||N)},K=F=>{if(p)switch(F.key){case Qt.ENTER:F.preventDefault();case Qt.SPACE:D?x.current.click():j(F)}},J=B.useMemo(()=>({type:r,disabled:S,hover:b||p,checked:R,anchor:D}),[r,S,b,p,R,D]),fe=Go({..._,onPointerDown:E,onKeyDown:K,onClick:j},v),U={role:N?"menuitemradio":C?"menuitemcheckbox":I0,"aria-checked":N||C?R:void 0,...bf(S,p),...fe,ref:zr(y,x),className:nl({block:Ul,element:Y0,modifiers:J,className:a}),children:B.useMemo(()=>Sn(h,J),[h,J])};return D?m.jsx("li",{role:Z0,children:m.jsx("a",{href:s,...U})}):m.jsx("li",{...U})}),kf=B.memo(B.forwardRef(function({className:a,...i},s){return m.jsx("li",{role:"separator",...i,ref:s,className:nl({block:Ul,element:mk,className:a})})}));function Yk(n,a){let i;try{i=n()}catch{return}return{getItem:r=>{var c;const u=g=>g===null?null:JSON.parse(g,void 0),h=(c=i.getItem(r))!=null?c:null;return h instanceof Promise?h.then(u):u(h)},setItem:(r,c)=>i.setItem(r,JSON.stringify(c,void 0)),removeItem:r=>i.removeItem(r)}}const Tf=n=>a=>{try{const i=n(a);return i instanceof Promise?i:{then(s){return Tf(s)(i)},catch(s){return this}}}catch(i){return{then(s){return this},catch(s){return Tf(s)(i)}}}},qk=(n,a)=>(i,s,r)=>{let c={storage:Yk(()=>localStorage),partialize:E=>E,version:0,merge:(E,_)=>({..._,...E}),...a},u=!1;const h=new Set,g=new Set;let p=c.storage;if(!p)return n((...E)=>{console.warn(`[zustand persist middleware] Unable to update item '${c.name}', the given storage is currently unavailable.`),i(...E)},s,r);const x=()=>{const E=c.partialize({...s()});return p.setItem(c.name,{state:E,version:c.version})},y=r.setState;r.setState=(E,_)=>(y(E,_),x());const v=n((...E)=>(i(...E),x()),s,r);r.getInitialState=()=>v;let S;const b=()=>{var E,_;if(!p)return;u=!1,h.forEach(z=>{var N;return z((N=s())!=null?N:v)});const T=((_=c.onRehydrateStorage)==null?void 0:_.call(c,(E=s())!=null?E:v))||void 0;return Tf(p.getItem.bind(p))(c.name).then(z=>{if(z)if(typeof z.version=="number"&&z.version!==c.version){if(c.migrate){const N=c.migrate(z.state,z.version);return N instanceof Promise?N.then(C=>[!0,C]):[!0,N]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,z.state];return[!1,void 0]}).then(z=>{var N;const[C,D]=z;if(S=c.merge(D,(N=s())!=null?N:v),i(S,!0),C)return x()}).then(()=>{T?.(S,void 0),S=s(),u=!0,g.forEach(z=>z(S))}).catch(z=>{T?.(void 0,z)})};return r.persist={setOptions:E=>{c={...c,...E},E.storage&&(p=E.storage)},clearStorage:()=>{p?.removeItem(c.name)},getOptions:()=>c,rehydrate:()=>b(),hasHydrated:()=>u,onHydrate:E=>(h.add(E),()=>{h.delete(E)}),onFinishHydration:E=>(g.add(E),()=>{g.delete(E)})},c.skipHydration||b(),S||v};var sy=(n,a,i)=>(r,c)=>({pastStates:i?.pastStates||[],futureStates:i?.futureStates||[],undo:(u=1)=>{if(c().pastStates.length){const h=i?.partialize?.(a())||a(),g=c().pastStates.splice(-u,u),p=g.shift();n(p),r({pastStates:c().pastStates,futureStates:c().futureStates.concat(i?.diff?.(h,p)||h,g.reverse())})}},redo:(u=1)=>{if(c().futureStates.length){const h=i?.partialize?.(a())||a(),g=c().futureStates.splice(-u,u),p=g.shift();n(p),r({pastStates:c().pastStates.concat(i?.diff?.(h,p)||h,g.reverse()),futureStates:c().futureStates})}},clear:()=>r({pastStates:[],futureStates:[]}),isTracking:!0,pause:()=>r({isTracking:!1}),resume:()=>r({isTracking:!0}),setOnSave:u=>r({_onSave:u}),_onSave:i?.onSave,_handleSet:(u,h,g,p)=>{i?.limit&&c().pastStates.length>=i?.limit&&c().pastStates.shift(),c()._onSave?.(u,g),r({pastStates:c().pastStates.concat(p||u),futureStates:[]})}}),Xk=(n,a)=>(s,r,c)=>{c.temporal=B0(a?.wrapTemporal?.(sy(s,r,a))||sy(s,r,a));const u=a?.handleSet?.(c.temporal.getState()._handleSet)||c.temporal.getState()._handleSet,h=p=>{if(!c.temporal.getState().isTracking)return;const x=a?.partialize?.(r())||r(),y=a?.diff?.(p,x);y===null||a?.equality?.(p,x)||u(p,void 0,x,y)},g=c.setState;return c.setState=(...p)=>{const x=a?.partialize?.(r())||r();g(...p),h(x)},n((...p)=>{const x=a?.partialize?.(r())||r();s(...p),h(x)},r,c)};const{useSyncExternalStoreWithSelector:Gk}=Xg,Zk=n=>n;function Ik(n,a=Zk,i){const s=Gk(n.subscribe,n.getState,n.getInitialState,a,i);return Ka.useDebugValue(s),s}var Cf,ry;function Qk(){return ry||(ry=1,Cf=function n(a,i){if(a===i)return!0;if(a&&i&&typeof a=="object"&&typeof i=="object"){if(a.constructor!==i.constructor)return!1;var s,r,c;if(Array.isArray(a)){if(s=a.length,s!=i.length)return!1;for(r=s;r--!==0;)if(!n(a[r],i[r]))return!1;return!0}if(a.constructor===RegExp)return a.source===i.source&&a.flags===i.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===i.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===i.toString();if(c=Object.keys(a),s=c.length,s!==Object.keys(i).length)return!1;for(r=s;r--!==0;)if(!Object.prototype.hasOwnProperty.call(i,c[r]))return!1;for(r=s;r--!==0;){var u=c[r];if(!n(a[u],i[u]))return!1}return!0}return a!==a&&i!==i}),Cf}var Kk=Qk();const Fk=ii(Kk);function Jk(n,a,i){var s=i||{},r=s.noTrailing,c=r===void 0?!1:r,u=s.noLeading,h=u===void 0?!1:u,g=s.debounceMode,p=g===void 0?void 0:g,x,y=!1,v=0;function S(){x&&clearTimeout(x)}function b(_){var T=_||{},z=T.upcomingOnly,N=z===void 0?!1:z;S(),y=!N}function E(){for(var _=arguments.length,T=new Array(_),z=0;z<_;z++)T[z]=arguments[z];var N=this,C=Date.now()-v;if(y)return;function D(){v=Date.now(),a.apply(N,T)}function R(){x=void 0}!h&&p&&!x&&D(),S(),p===void 0&&C>n?h?(v=Date.now(),c||(x=setTimeout(p?R:D,n))):D():c!==!0&&(x=setTimeout(p?R:D,p===void 0?n-C:n))}return E.cancel=b,E}function cy(n){n=n.trim(),n.match(/^[a-z]+:\/\//i)||(n="https://"+n);try{const a=new URL(n);return["http:","https:","mailto:"].includes(a.protocol)?a.href:null}catch{return null}}function Pk(n){const a=[],i=/\[([^\]]+)\]\(([^)]+)\)|(https?:\/\/[^\s<>"{}|\\^`\[\]]+)/g,s=Array.from(n.matchAll(i));let r=0;return s.forEach((c,u)=>{if(c.index!==void 0&&c.index>r&&a.push(n.substring(r,c.index)),c[1]&&c[2]){const h=c[1],g=c[2],p=cy(g);p?a.push(m.jsx("a",{href:p,target:"_blank",rel:"noopener noreferrer",style:{color:"#3b82f6",textDecoration:"underline"},children:h},u)):a.push(`[${h}](${g})`)}else if(c[3]){const h=c[3],g=cy(h);g?a.push(m.jsx("a",{href:g,target:"_blank",rel:"noopener noreferrer",style:{color:"#3b82f6",textDecoration:"underline"},children:h},u)):a.push(h)}c.index!==void 0&&(r=c.index+c[0].length)}),r<n.length&&a.push(n.substring(r)),a.length>0?a:[n]}var uy=({data:n,selected:a})=>m.jsx(m.Fragment,{children:n.data?m.jsxs(m.Fragment,{children:[m.jsx(Qu,{isVisible:a,keepAspectRatio:!0}),m.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",overflow:"hidden",gap:"4px"},children:[m.jsx("img",{src:n.data,style:{maxWidth:"100%",maxHeight:n.caption?"calc(100% - 24px)":"100%",objectFit:"contain"}}),n.caption&&m.jsx("div",{style:{fontSize:"11px",color:"#6b7280",textAlign:"center",padding:"0 4px",lineHeight:"1.3"},children:Pk(n.caption)})]})]}):m.jsx("span",{children:"No Image"})}),Io={S:10,M:14,L:18,XL:24},fy="M",Wk=10,eT=14,tT=18;function dy(n){return n<=Wk?"S":n<=eT?"M":n<=tT?"L":"XL"}function hy(n){return typeof n=="number"?Io[dy(n)]:n&&n in Io?Io[n]:Io[fy]}function nT(n){return n?dy(n):fy}var py=({data:n,selected:a,isConnectable:i,...s})=>m.jsxs(m.Fragment,{children:[i&&m.jsx(Qu,{isVisible:a}),m.jsx(ZN,{className:"icon"}),m.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",textAlign:"center"},children:[m.jsx("div",{style:{fontWeight:600,fontSize:`${hy(n.fontSize)}px`},children:n.label||"Untitled"}),n.summary&&m.jsx("div",{style:{fontSize:"12px",color:"#4b5563",marginTop:"4px"},children:n.summary})]}),["Bottom","Top","Left","Right"].map(r=>m.jsx(el,{type:"source",position:be[r],style:{visibility:i?"visible":"hidden"},id:r.toLowerCase(),isConnectable:!0},`${r}-source`)),["Bottom","Top","Left","Right"].map(r=>m.jsx(el,{type:"target",position:be[r],style:{visibility:i?"visible":"hidden"},id:r.toLowerCase(),isConnectable:!0},`${r}-target`))]}),gy=({data:n})=>m.jsx(m.Fragment,{children:m.jsx("div",{style:{fontSize:n.fontSize||32,color:n.color||"#e5e7eb",fontWeight:"bold",transform:`rotate(${n.rotation||0}deg)`},children:n.text||"No Text"})}),aT=n=>m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",className:n.className,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",children:[m.jsx("circle",{cx:"12",cy:"12",r:"10"}),m.jsx("path",{d:"M11.051 7.616a1 1 0 0 1 1.909.024l.737 1.452a1 1 0 0 0 .737.535l1.634.256a1 1 0 0 1 .588 1.806l-1.172 1.168a1 1 0 0 0-.282.866l.259 1.613a1 1 0 0 1-1.541 1.134l-1.465-.75a1 1 0 0 0-.912 0l-1.465.75a1 1 0 0 1-1.539-1.133l.258-1.613a1 1 0 0 0-.282-.867l-1.156-1.152a1 1 0 0 1 .572-1.822l1.633-.256a1 1 0 0 0 .737-.535z"})]}),Mf=aT,my=({data:n,selected:a,isConnectable:i})=>m.jsxs(m.Fragment,{children:[i&&m.jsx(Qu,{isVisible:a}),n.state==="mastered"&&m.jsx(Mf,{className:"icon"}),m.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",textAlign:"center"},children:[m.jsx("div",{style:{fontWeight:600,fontSize:`${hy(n.fontSize)}px`},children:n.label||"Untitled"}),n.summary&&m.jsx("div",{style:{fontSize:"12px",color:"#4b5563",marginTop:"4px"},children:n.summary})]}),["Bottom","Top","Left","Right"].map(s=>m.jsx(el,{type:"source",style:{visibility:i?"visible":"hidden"},position:be[s],id:s.toLowerCase(),isConnectable:!0},`${s}-source`)),["Bottom","Top","Left","Right"].map(s=>m.jsx(el,{type:"target",style:{visibility:i?"visible":"hidden"},position:be[s],id:s.toLowerCase(),isConnectable:!0},`${s}-target`))]});function yy(n,a){const{width:i,height:s}=n.measured,r=n.internals.positionAbsolute,c=a.internals.positionAbsolute,u=i/2,h=s/2,g=r.x+u,p=r.y+h,x=c.x+a.measured.width/2,y=c.y+a.measured.height/2,v=(x-g)/(2*u)-(y-p)/(2*h),S=(x-g)/(2*u)+(y-p)/(2*h),b=1/(Math.abs(v)+Math.abs(S)),E=b*v,_=b*S,T=u*(E+_)+g,z=h*(-E+_)+p;return{x:T,y:z}}function xy(n,a){const i={...n.internals.positionAbsolute,...n},s=Math.round(i.x),r=Math.round(i.y),c=Math.round(a.x),u=Math.round(a.y);return c<=s+1?be.Left:c>=s+i.measured.width-1?be.Right:u<=r+1?be.Top:u>=i.y+i.measured.height-1?be.Bottom:be.Top}function lT(n,a){const i=yy(n,a),s=yy(a,n),r=xy(n,i),c=xy(a,s);return{sx:i.x,sy:i.y,tx:s.x,ty:s.y,sourcePos:r,targetPos:c}}var Qo={settings:{title:"New Roadmap",viewport:{x:0,y:0,zoom:1}},version:1,nodes:[],edges:[]},iT=n=>{let a={};if(typeof n!="string")a=n;else try{a=JSON.parse(n)}catch{}return{...Qo,...a,settings:{...Qo.settings,...a.settings,viewport:{...Qo.settings.viewport,...a.settings?.viewport||{}}},nodes:a.nodes||Qo.nodes,edges:a.edges||Qo.edges}},oT=()=>{const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";return[9,11,1].map(i=>{let s="";for(let r=0;r<i;r++)s+=n.charAt(Math.floor(Math.random()*n.length));return s}).join("-")};function sT(n){return typeof n=="string"&&(n.includes("youtube.com/watch?v=")||n.includes("youtu.be/"))}function rT(n){return n.includes("youtube.com/watch?v=")?`https://www.youtube-nocookie.com/embed/${n.split("v=")[1].split("&")[0]}`:n.includes("youtu.be/")?`https://www.youtube-nocookie.com/embed/${n.split("youtu.be/")[1].split("?")[0]}`:n}function cT(n){return n.endsWith(".webm")?"video/webm":(n.endsWith(".mp4"),"video/mp4")}var uT=({url:n,title:a})=>{if(sT(n)){const i=rT(n);return m.jsx("div",{className:"video-container",style:{position:"relative",paddingBottom:"56.25%",height:0,overflow:"hidden",marginBottom:16},children:m.jsx("iframe",{src:i,title:a||"YouTube video",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"}})})}else{const i=cT(n);return m.jsxs("video",{controls:!0,style:{width:"100%",maxHeight:"400px",marginBottom:16},children:[m.jsx("source",{src:n,type:i}),"Your browser does not support the video tag."]})}},fT={nodes:"Nodes",addTask:"Add Task",addTopic:"Add Topic",addImage:"Add Image",addText:"Add Text",settings:"Settings",debug:"Debug",enableDebugMode:"Enable Debug Mode",showCompletionNeedsEdges:"Show Completion Needs Edges",showCompletionOptionalEdges:"Show Completion Optional Edges",showUnlockAfterEdges:"Show Unlock After Edges",preview:"Preview",save:"Save",download:"Download",open:"Open",exportAsSVG:"Export as SVG",undo:"Undo",redo:"Redo",reset:"Reset",help:"Help",unsavedChanges:"Unsaved Changes (Click to save or press Ctrl+S)",keyboardShortcuts:"Keyboard Shortcuts",action:"Action",shortcut:"Shortcut",close:"Close",shortcuts:{save:"Save",undo:"Undo",redo:"Redo",addTaskNode:"Add Task Node",addTopicNode:"Add Topic Node",addImageNode:"Add Image Node",addTextNode:"Add Text Node",deleteNodeEdge:"Delete Node/Edge",togglePreviewMode:"Toggle Preview Mode",toggleDebugMode:"Toggle Debug Mode",selectMultipleNodes:"Select Multiple Nodes",selectAllNodes:"Select All Nodes",showHelp:"Show Help",zoomIn:"Zoom In",zoomOut:"Zoom Out",resetZoom:"Reset Zoom",fitView:"Fit View",zoomToSelection:"Zoom to Selection",toggleGrid:"Toggle Grid",resetMap:"Reset Map",cut:"Cut",copy:"Copy",paste:"Paste"},editTask:"Edit Task",editTopic:"Edit Topic",editImage:"Edit Image",editText:"Edit Text",backgroundSettings:"Background Settings",editEdge:"Edit Edge",nodeColor:"Node Color",label:"Label",labelRequired:"Label *",summary:"Summary",description:"Description",duration:"Duration",videoURL:"Video URL",resources:"Resources",addResource:"Add Resource",unlockPassword:"Unlock Password",unlockDate:"Unlock Date",unlockAfter:"Unlock After",completionNeeds:"Completion Needs",completionOptional:"Completion Optional",backgroundColor:"Background Color",text:"Text",fontSize:"Font Size",color:"Color",image:"Image",width:"Width",height:"Height",rotation:"Rotation",opacity:"Opacity",edgeColor:"Color",edgeWidth:"Width",edgeType:"Type",animated:"Animated",placeholderNodeLabel:"Node label",placeholderTitleLabel:"Lerningmap label",placeholderShortSummary:"Short summary",placeholderDetailedDescription:"Detailed description",placeholderVideoURL:"YouTube or video URL",placeholderLabel:"Label",placeholderURL:"URL",placeholderOptionalPassword:"Optional password",placeholderBackgroundText:"Background Text",selectNode:"Select node...",deleteNode:"Delete Node",saveChanges:"Save Changes",deleteEdge:"Delete Edge",copyNode:"Copy",openFileWarning:"Opening a file will replace your current map. Continue?",resetMapWarning:"Are you sure you want to reset the map? This action cannot be undone.",failedToLoadFile:"Failed to load the file. Please make sure it is a valid roadmap JSON file.",failedToExportSVG:"Failed to export SVG: ",loadExternalWarning:"Loading an external learningmap will replace your existing content. You can back up your current learningmap first by using one of the options below.",loadExternalBackupPrompt:"Would you like to back up your current learningmap before loading the external one?",emptyMapCannotBeShared:"An empty learningmap cannot be shared.",uploadFailed:"Upload failed. Please try again!",uploadFileTooLarge:"Sharing bigger files is not allowed. You can still download your learningmap and share it via other means.",loadFailed:"Failed to load. Please check the URL.",share:"Share",shareLink:"Share Link",copyLink:"Copy Link",linkCopied:"Link copied to clipboard!",downloadCurrentMap:"Download Current Map",replaceWithExternal:"Replace with External Map",blue:"Blue",yellow:"Yellow",lila:"Lila",pink:"Pink",teal:"Teal",red:"Red",black:"Black",white:"White",newTask:"New task",newTopic:"New topic",backgroundTextDefault:"Background Text",noText:"No Text",untitled:"Untitled",alignLeftHorizontal:"Align Left Horizontal",alignCenterHorizontal:"Align Center Horizontal",alignRightHorizontal:"Align Right Horizontal",alignTopVertical:"Align Top Vertical",alignCenterVertical:"Align Center Vertical",alignBottomVertical:"Align Bottom Vertical",distributeHorizontally:"Distribute Horizontally",distributeVertically:"Distribute Vertically",default:"Default",straight:"Straight",step:"Step",smoothstep:"Smooth Step",floating:"Floating",resourcesLabel:"Resources:",unlockConditionsMessage:"Complete the following nodes first to unlock this one:",completionNeedsMessage:"The following nodes need to be completed or mastered before this one is completed:",locked:"Locked",markAsStarted:"Mark as Started",markAsCompleted:"Mark as Completed",completedLabel:"Completed",mastered:"Mastered",completedTitle:"Completed",masteredTitle:"Mastered",finishNeedsToComplete:"Finish needs to complete",finishOptionalToMaster:"Finish optional to master",languageLabel:"Language",languageEnglish:"English",languageGerman:"German",initialViewport:"Initial Viewport",viewportX:"X Position",viewportY:"Y Position",viewportZoom:"Zoom",useCurrentViewport:"Use Current Viewport",storageId:"ID",generateRandomId:"Generate Random ID",storageIdHint:"Learning maps with the same ID will share the same state when a student is working on it.",welcomeTitle:"Learningmap",welcomeSubtitle:"All data is stored locally in your browser",welcomeOpenFile:"Open File",welcomeAddTopic:"Add Topic",welcomeHelp:"Help",fontSizeSmall:"Small",fontSizeMedium:"Medium",fontSizeLarge:"Large",fontSizeXLarge:"Extra Large",caption:"Caption",placeholderImageCaption:"Add caption (supports [markdown links](url))"},dT={nodes:"Knoten",addTask:"Aufgabe hinzufügen",addTopic:"Thema hinzufügen",addImage:"Bild hinzufügen",addText:"Text hinzufügen",settings:"Einstellungen",debug:"Debug",enableDebugMode:"Debug-Modus aktivieren",showCompletionNeedsEdges:"Abschluss-Benötigte Kanten anzeigen",showCompletionOptionalEdges:"Abschluss-Optionale Kanten anzeigen",showUnlockAfterEdges:"Entsperr-Nach Kanten anzeigen",preview:"Vorschau",save:"Speichern",download:"Herunterladen",open:"Öffnen",exportAsSVG:"Als SVG exportieren",undo:"Rückgängig",redo:"Wiederholen",reset:"Zurücksetzen",help:"Hilfe",unsavedChanges:"Ungespeicherte Änderungen (Klicken zum Speichern oder Strg+S drücken)",keyboardShortcuts:"Tastaturkürzel",action:"Aktion",shortcut:"Tastenkombination",close:"Schließen",shortcuts:{save:"Speichern",undo:"Rückgängig",redo:"Wiederholen",addTaskNode:"Aufgaben-Knoten hinzufügen",addTopicNode:"Themen-Knoten hinzufügen",addImageNode:"Bild-Knoten hinzufügen",addTextNode:"Text-Knoten hinzufügen",deleteNodeEdge:"Knoten/Kante löschen",togglePreviewMode:"Vorschau-Modus umschalten",toggleDebugMode:"Debug-Modus umschalten",selectMultipleNodes:"Mehrere Knoten auswählen",selectAllNodes:"Alle Knoten auswählen",showHelp:"Hilfe anzeigen",zoomIn:"Vergrößern",zoomOut:"Verkleinern",resetZoom:"Zoom zurücksetzen",fitView:"Alles anzeigen",zoomToSelection:"Auswahl anzeigen",toggleGrid:"Raster umschalten",resetMap:"Karte zurücksetzen",cut:"Ausschneiden",copy:"Kopieren",paste:"Einfügen"},editTask:"Aufgabe bearbeiten",editTopic:"Thema bearbeiten",editImage:"Bild bearbeiten",editText:"Text bearbeiten",backgroundSettings:"Hintergrund-Einstellungen",editEdge:"Kante bearbeiten",nodeColor:"Knotenfarbe",label:"Bezeichnung",labelRequired:"Bezeichnung *",summary:"Zusammenfassung",description:"Beschreibung",duration:"Dauer",videoURL:"Video-URL",resources:"Ressourcen",addResource:"Ressource hinzufügen",unlockPassword:"Entsperr-Passwort",unlockDate:"Entsperr-Datum",unlockAfter:"Entsperren nach",completionNeeds:"Abschluss benötigt",completionOptional:"Abschluss optional",backgroundColor:"Hintergrundfarbe",text:"Text",fontSize:"Schriftgröße",color:"Farbe",image:"Bild",width:"Breite",height:"Höhe",rotation:"Drehung",opacity:"Deckkraft",edgeColor:"Farbe",edgeWidth:"Breite",edgeType:"Typ",animated:"Animiert",placeholderNodeLabel:"Knotenbezeichnung",placeholderTitleLabel:"Lernkartenbezeichnung",placeholderShortSummary:"Kurze Zusammenfassung",placeholderDetailedDescription:"Detaillierte Beschreibung",placeholderVideoURL:"YouTube oder Video-URL",placeholderLabel:"Bezeichnung",placeholderURL:"URL",placeholderOptionalPassword:"Optionales Passwort",placeholderBackgroundText:"Hintergrundtext",selectNode:"Knoten auswählen...",deleteNode:"Knoten löschen",saveChanges:"Änderungen speichern",deleteEdge:"Kante löschen",copyNode:"Kopieren",openFileWarning:"Das Öffnen einer Datei ersetzt Ihre aktuelle Karte. Fortfahren?",resetMapWarning:"Sind Sie sicher, dass Sie die Karte zurücksetzen möchten? Diese Aktion kann nicht rückgängig gemacht werden.",failedToLoadFile:"Datei konnte nicht geladen werden. Bitte stellen Sie sicher, dass es sich um eine gültige Roadmap-JSON-Datei handelt.",failedToExportSVG:"SVG-Export fehlgeschlagen: ",loadExternalWarning:"Das Laden einer externen Learningmap ersetzt Ihren aktuellen Inhalt. Sie können Ihre aktuelle Learningmap zuerst sichern, indem Sie eine der folgenden Optionen verwenden.",loadExternalBackupPrompt:"Möchten Sie Ihre aktuelle Learningmap sichern, bevor Sie die externe laden?",emptyMapCannotBeShared:"Eine leere Learningmap kann nicht geteilt werden.",uploadFailed:"Beim Upload ist was schief gelaufen. Bitte versuche es erneut!",uploadFileTooLarge:"Das Teilen größerer Dateien ist nicht erlaubt. Du kannst deine Learningmap weiterhin herunterladen und über andere Wege teilen.",loadFailed:"Beim Laden ist etwas schief gegangen. Bitte überprüfe die URL.",share:"Teilen",shareLink:"Link teilen",copyLink:"Link kopieren",linkCopied:"Link in die Zwischenablage kopiert!",downloadCurrentMap:"Aktuelle Karte herunterladen",replaceWithExternal:"Mit externer Karte ersetzen",blue:"Blau",yellow:"Gelb",lila:"Lila",pink:"Rosa",teal:"Türkis",red:"Rot",black:"Schwarz",white:"Weiß",newTask:"Neue Aufgabe",newTopic:"Neues Thema",backgroundTextDefault:"Hintergrundtext",noText:"Kein Text",untitled:"Ohne Titel",alignLeftHorizontal:"Horizontal links ausrichten",alignCenterHorizontal:"Horizontal zentrieren",alignRightHorizontal:"Horizontal rechts ausrichten",alignTopVertical:"Vertikal oben ausrichten",alignCenterVertical:"Vertikal zentrieren",alignBottomVertical:"Vertikal unten ausrichten",distributeHorizontally:"Horizontal verteilen",distributeVertically:"Vertikal verteilen",default:"Standard",straight:"Gerade",step:"Stufe",smoothstep:"Weiche Stufe",floating:"Schwebend",resourcesLabel:"Ressourcen:",unlockConditionsMessage:"Vervollständige zuerst die folgenden Knoten, um diesen freizuschalten:",completionNeedsMessage:"Die folgenden Knoten müssen abgeschlossen oder gemeistert werden, bevor dieser abgeschlossen ist:",locked:"Gesperrt",markAsStarted:"Als begonnen markieren",markAsCompleted:"Als abgeschlossen markieren",completedLabel:"Abgeschlossen",mastered:"Gemeistert",completedTitle:"Abgeschlossen",masteredTitle:"Gemeistert",finishNeedsToComplete:"Benötigtes abschließen",finishOptionalToMaster:"Optionale zum Meistern abschließen",languageLabel:"Sprache",languageEnglish:"Englisch",languageGerman:"Deutsch",initialViewport:"Initialer Ansichtsbereich",viewportX:"X-Position",viewportY:"Y-Position",viewportZoom:"Zoom",useCurrentViewport:"Aktuellen Ansichtsbereich verwenden",storageId:"ID",generateRandomId:"Zufällige ID generieren",storageIdHint:"Lernkarten mit der gleichen ID teilen sich den gleichen Zustand, wenn ein Schüler daran arbeitet.",welcomeTitle:"Learningmap",welcomeSubtitle:"Alle Daten werden lokal in Ihrem Browser gespeichert",welcomeOpenFile:"Datei öffnen",welcomeAddTopic:"Thema hinzufügen",welcomeHelp:"Hilfe",fontSizeSmall:"Klein",fontSizeMedium:"Mittel",fontSizeLarge:"Groß",fontSizeXLarge:"Extra Groß",caption:"Bildunterschrift",placeholderImageCaption:"Bildunterschrift hinzufügen (unterstützt [Markdown-Links](url))"},vy={en:fT,de:dT};function Vt(n="en"){return vy[n]||vy.en}function hT(n,a){const i=[];return n.data?.unlock?.after&&n.data.unlock.after.forEach(s=>{const r=a.find(c=>c.id===s);r&&r.data?.state!=="completed"&&r.data?.state!=="mastered"&&i.push(r)}),i}function pT(n,a){const i=[];return n.data?.completion?.needs&&n.data.completion.needs.forEach(s=>{const r=a.find(c=>c.id===s);r&&r.data?.state!=="completed"&&r.data?.state!=="mastered"&&i.push(r)}),i}function gT(n,a){const i=[];return n.data?.completion?.optional&&n.data.completion.optional.forEach(s=>{const r=a.find(c=>c.id===s);r&&r.data?.state!=="completed"&&r.data?.state!=="mastered"&&i.push(r)}),i}function mT({open:n,onClose:a,onUpdate:i,node:s,nodes:r,onNodeClick:c,language:u="en"}){const h=Vt(u),g=B.useMemo(()=>{if(!s||!s.data?.description)return"";const z=Fe.parse(s.data.description,{async:!1});return ok.sanitize(z)},[s,s?.data?.description]);if(!n||!s)return null;const p=s.data?.state==="locked"||!1,x=s.data?.state==="unlocked"||!1,y=s.data?.state==="completed"||!1,v=s.data?.state==="started"||!1,S=s.data?.state==="mastered"||!1,b=hT(s,r),E=pT(s,r),_=gT(s,r),T=z=>()=>{s.type==="topic"||p||i({...s,data:{...s.data,state:z}})};return m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"drawer-overlay",onClick:a}),m.jsxs("aside",{className:"drawer",children:[m.jsxs("header",{className:"drawer-header",children:[m.jsxs("div",{children:[m.jsx("h2",{className:"drawer-title",children:s.data?.label}),s.data?.duration&&m.jsx("div",{style:{fontSize:16,color:"#6b7280",marginTop:4},children:s.data.duration})]}),m.jsx("button",{className:"close-button",onClick:a,"aria-label":"Close",children:m.jsx(da,{size:20})})]}),m.jsxs("div",{className:"drawer-content",children:[b.length>0?m.jsxs("div",{className:"drawer-unlock-conditions",style:{marginBottom:16},children:[m.jsx("div",{style:{fontWeight:600,marginBottom:8},children:h.unlockConditionsMessage}),m.jsx("ul",{children:b.map(z=>m.jsx("li",{children:m.jsxs("button",{className:"link-button",onClick:()=>{c(null,z,!0)},children:[z.data?.label||z.id," - ",z.data?.state==="locked"?"🔒":"🔓"]})},z.id))})]}):m.jsxs(m.Fragment,{children:[s.data?.description&&m.jsx("div",{className:"drawer-description",style:{marginBottom:16},dangerouslySetInnerHTML:{__html:g}}),s.data?.video&&m.jsx("div",{className:"drawer-video",style:{marginBottom:16},children:m.jsx(uT,{url:s.data?.video})}),s.data?.resources&&s.data?.resources.length>0&&m.jsxs("div",{className:"drawer-resources",style:{marginBottom:16},children:[m.jsx("div",{style:{fontWeight:600,marginBottom:8},children:h.resourcesLabel}),m.jsx("ul",{children:s.data?.resources.map((z,N)=>{if(z.type==="book"){const C=[];z.bookName&&C.push(z.bookName),z.bookLocation&&C.push(z.bookLocation);const D=C.length>0?` (${C.join(", ")})`:"";return m.jsxs("li",{children:["📚 ",m.jsx("strong",{children:z.label}),D]},N)}return m.jsxs("li",{children:["🌐 ",z.url?m.jsx("a",{href:z.url,target:"_blank",rel:"noopener noreferrer",children:z.label}):m.jsx("span",{children:z.label})]},N)})})]})]}),!p&&E.length>0&&m.jsxs("div",{className:"drawer-completion-needs",style:{marginBottom:16},children:[m.jsx("div",{style:{fontWeight:600,marginBottom:8},children:h.completionNeedsMessage}),m.jsx("ul",{children:E.map(z=>m.jsx("li",{children:m.jsxs("button",{className:"link-button",onClick:()=>{c(null,z,!0)},children:[z.data?.label||z.id," - ",z.data?.state]})},z.id))})]})]}),m.jsx("div",{className:"drawer-footer",children:s.type==="topic"?m.jsxs(m.Fragment,{children:[!p&&E.length>0&&m.jsx("button",{className:"drawer-button needs",disabled:!0,children:h.finishNeedsToComplete}),!p&&E.length===0&&_.length>0&&m.jsx("button",{className:"drawer-button optional",disabled:!0,children:h.finishOptionalToMaster}),!p&&E.length===0&&_.length===0&&m.jsxs("button",{className:"drawer-button completed",disabled:!0,children:[m.jsx(Ku,{})," ",h.mastered]}),p&&m.jsxs("button",{className:"drawer-button locked",children:[m.jsx(o0,{})," ",h.locked]})]}):m.jsxs(m.Fragment,{children:[p&&m.jsxs("button",{className:"drawer-button locked",children:[m.jsx(o0,{})," ",h.locked]}),x&&m.jsx("button",{className:"drawer-button unlocked",onClick:T("started"),children:h.markAsStarted}),v&&m.jsx("button",{className:"drawer-button started",onClick:T("completed"),children:h.markAsCompleted}),y&&m.jsxs("button",{className:"drawer-button completed",disabled:!0,children:[m.jsx(Ku,{})," ",h.completedLabel]}),S&&m.jsxs("button",{className:"drawer-button mastered",disabled:!0,children:[m.jsx(Mf,{})," ",h.mastered]})]})})]})]})}var yT=({completed:n,mastered:a,total:i,language:s="en"})=>{const r=Vt(s),c=i>0?n/i*100:0;return m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:"completed-counter",title:r.completedTitle,style:{display:"flex",alignItems:"center",gap:"4px"},children:[m.jsx(Ku,{}),n," / ",i]}),m.jsxs("div",{className:"progress-bar-container",children:[m.jsxs("span",{className:"progress-value",children:[c.toFixed(0),"%"]}),m.jsx("div",{className:"progress-bar-fill",style:{width:`${c}%`}})]}),m.jsxs("span",{className:"mastered-counter",title:r.masteredTitle,style:{display:"flex",alignItems:"center",gap:"4px"},children:[m.jsx(Mf,{}),a]})]})},xT=n=>{const a={};return n.forEach(i=>{i.data?.state&&(a[i.id]=i.data.state)}),a},zf=n=>n==="completed"||n==="mastered",by=n=>n.type==="task"||n.type==="topic",Df=n=>{const a=[...n];for(let i=0;i<2;i++){const s=xT(a);for(const r of a){if(r.data.state=r.data?.state||"locked",r.data?.unlock?.after&&(r.data.unlock.after.every(u=>zf(s[u]))?r.data.state==="locked"&&(r.data.state="unlocked"):r.data.state="locked"),r.data?.unlock?.date){const c=new Date(r.data.unlock.date);new Date>=c?r.data.state==="locked"&&(r.data.state="unlocked"):r.data.state="locked"}if(!r.data?.unlock?.after&&!r.data?.unlock?.date&&r.data.state==="locked"&&(r.data.state="unlocked"),r.type==="topic"){if(r.data?.completion?.needs){const c=r.data.completion.needs.every(u=>zf(s[u]));r.data.state==="unlocked"&&c&&(r.data.state="completed")}else!r.data?.completion?.needs&&r.data.state==="unlocked"&&(r.data.state="completed");if(r.data?.completion?.optional){const c=r.data.completion.optional.every(u=>zf(s[u]));r.data.state==="completed"&&c&&(r.data.state="mastered")}else!r.data?.completion?.optional&&r.data.state==="completed"&&(r.data.state="mastered")}}}return a},Wn=U0()((n,a)=>({nodes:[],edges:[],settings:{},selectedNode:null,drawerOpen:!1,onNodesChange:i=>{n({nodes:Yu(i,a().nodes)})},setNodes:i=>{n({nodes:i})},setEdges:i=>{n({edges:i})},setSettings:i=>{n({settings:i})},updateNodeState:(i,s)=>{const r=a().nodes.map(u=>u.id===i?{...u,data:{...u.data,state:s}}:u),c=Df(r);n({nodes:c})},setSelectedNode:i=>{n({selectedNode:i})},setDrawerOpen:i=>{n({drawerOpen:i})},loadRoadmapData:(i,s)=>{const r=Array.isArray(i?.nodes)?i.nodes:[],c=Array.isArray(i?.edges)?i.edges:[];let u=r.map(h=>({...h,draggable:!1,connectable:!1,selectable:by(h),focusable:by(h),data:{...h.data,state:s?.nodes?.[h.id]?.state||h.data?.state}}));u=Df(u),n({nodes:u,edges:c,settings:i?.settings||{}})},getRoadmapState:i=>{const s={nodes:{},x:i.x,y:i.y,zoom:i.zoom};return a().nodes.forEach(r=>{r.data.state&&r.type==="task"&&(s.nodes[r.id]={state:r.data.state})}),s},updateNodesStates:()=>{const i=Df(a().nodes);n({nodes:i})}})),vT={topic:my,task:py,image:uy,text:gy},bT=n=>n.type==="task"||n.type==="topic",ST=n=>{let a=0,i=0,s=0;return n.forEach(r=>{(r.type==="task"||r.type==="topic")&&(s++,r.data?.state==="completed"?a++:r.data?.state==="mastered"&&(a++,i++))}),{completed:a,mastered:i,total:s}};function Sy({roadmapData:n,onChange:a,language:i="en",initialState:s}){const r=Wn(U=>U.nodes),c=Wn(U=>U.edges),u=Wn(U=>U.settings),h=Wn(U=>U.selectedNode),g=Wn(U=>U.drawerOpen),p=Wn(U=>U.onNodesChange),x=Wn(U=>U.setSelectedNode),y=Wn(U=>U.setDrawerOpen),v=Wn(U=>U.loadRoadmapData),S=Wn(U=>U.getRoadmapState),b=Wn(U=>U.updateNodeState),{fitView:E,getViewport:_}=Wa(),T=u?.language||i,{completed:z,mastered:N,total:C}=ST(r),D=iT(n);B.useEffect(()=>{v(D,s),s||setTimeout(()=>{E({duration:0,padding:.2})},0)},[n,s,v,E]);const R=B.useCallback((U,F,ae=!1)=>{bT(F)&&(x(F),y(!0),ae&&E({nodes:[F],duration:150}))},[E,x,y]),j=B.useCallback(()=>{y(!1),x(null)},[y,x]),K=B.useCallback(U=>{U.data.state&&b(U.id,U.data.state),x(U)},[b,x]);B.useEffect(()=>{const U=_(),F=S(U);if(a)a(F);else{const ae=document.querySelector("hyperbook-learningmap");ae&&ae.dispatchEvent(new CustomEvent("change",{detail:F}))}},[r,_,S]);const J={animated:!1,style:{stroke:"#94a3b8",strokeWidth:2},type:"default"},fe={x:s?.x||u?.viewport?.x||0,y:s?.y||u?.viewport?.y||0,zoom:s?.zoom||u?.viewport?.zoom||1};return m.jsxs("div",{className:"editor-canvas",style:{backgroundColor:u?.background?.color||"#ffffff"},children:[m.jsxs(Zm,{nodes:r.map(U=>{const F=[];return U.data?.color&&F.push(U.data.color),F.push(U.data?.state),{...U,selected:h?.id===U.id,className:F.join(" ")}}),edges:c,onNodeClick:R,onNodesChange:p,minZoom:.2,nodeTypes:vT,defaultViewport:fe,proOptions:{hideAttribution:!0},defaultEdgeOptions:J,nodesDraggable:!1,nodesConnectable:!1,children:[u?.title&&m.jsx(fa,{position:"bottom-right",children:m.jsx("div",{className:"map-title",children:u.title})}),m.jsx(fa,{position:"top-center",className:"progress-panel",children:m.jsx(yT,{completed:z,total:C,mastered:N,language:T})}),m.jsx(Fm,{showInteractive:!1})]}),m.jsx(mT,{node:h,open:g,onClose:j,onUpdate:K,nodes:r,onNodeClick:R,language:T})]})}var wT=n=>m.jsx("div",{className:"hyperbook-learningmap-container",children:m.jsx(Zu,{children:m.jsx(Sy,{...n})})});function Of(n){switch(n){case"image":return 10;case"text":return 20;case"topic":case"task":return 30;default:return 30}}var jr=!0;function ET(n){jr=n}var wy={nodes:[],edges:[],settings:{background:{color:"#ffffff"}},previewMode:!1,debugMode:!1,showGrid:!1,helpOpen:!1,drawerOpen:!1,settingsDrawerOpen:!1,edgeDrawerOpen:!1,shareDialogOpen:!1,loadExternalDialogOpen:!1,selectedNodeId:null,selectedNodeIds:[],selectedEdge:null,nextNodeId:1,clipboard:null,lastMousePosition:null,shareLink:"",pendingExternalId:null,showCompletionNeeds:!0,showCompletionOptional:!0,showUnlockAfter:!0},_T={equality:(n,a)=>Fk(n,a),handleSet:n=>Jk(500,a=>{n(a)},{noLeading:!1,noTrailing:!0}),partialize:n=>{const{nodes:a,edges:i,settings:s}=n;return{nodes:a,edges:i,settings:s}}},AT={name:"learningmap-data",version:1,partialize:n=>{const{nodes:a,edges:i,settings:s}=n;return{nodes:a,edges:i,settings:s}},storage:{getItem:n=>{if(!jr)return null;const a=localStorage.getItem(n);return a?JSON.parse(a):null},setItem:(n,a)=>{jr&&localStorage.setItem(n,JSON.stringify(a))},removeItem:n=>{jr&&localStorage.removeItem(n)}}},ie=U0()(qk(Xk((n,a)=>({...wy,onNodesChange:i=>{n({nodes:Yu(i,a().nodes)})},onEdgesChange:i=>{n({edges:om(i,a().edges)})},onConnect:i=>{n({edges:xg(i,a().edges)})},setNodes:i=>{n({nodes:i})},setEdges:i=>{n({edges:i})},setSettings:i=>{n({settings:i})},updateDebugEdges:()=>{const i=a().debugMode,s=a().nodes,r=a().showCompletionNeeds,c=a().showCompletionOptional,u=a().showUnlockAfter,g=[...a().edges.filter(p=>!p.id.startsWith("debug-"))];i&&(s.forEach(p=>{r&&p.type==="topic"&&p.data?.completion?.needs&&p.data.completion.needs.forEach(x=>{const y=`debug-edge-${x}-to-${p.id}`;g.push({id:y,target:x,source:p.id,animated:!0,style:{stroke:"#f97316",strokeWidth:2,strokeDasharray:"5,5"},type:"floating"})}),c&&p.data?.completion?.optional&&p.data.completion.optional.forEach(x=>{const y=`debug-edge-optional-${x}-to-${p.id}`;g.push({id:y,target:x,source:p.id,animated:!0,style:{stroke:"#eab308",strokeWidth:2,strokeDasharray:"5,5"},type:"floating"})})}),s.forEach(p=>{u&&p.data.unlock?.after&&p.data.unlock.after.forEach(x=>{const y=`debug-edge-${x}-to-${p.id}`;g.push({id:y,target:x,source:p.id,animated:!0,style:{stroke:"#10b981",strokeWidth:2,strokeDasharray:"5,5"},type:"floating"})})})),n({edges:g})},updateNode:(i,s)=>{n({nodes:a().nodes.map(r=>r.id===i?{...r,...s}:r)}),a().updateDebugEdges()},updateNodeData:(i,s)=>{n({nodes:a().nodes.map(r=>r.id===i?{...r,data:{...r.data,...s}}:r)}),a().updateDebugEdges()},updateNodes:i=>{n({nodes:a().nodes.map(s=>{const r=i.find(c=>c.id===s.id);return r||s})}),a().updateDebugEdges()},updateEdge:(i,s)=>{n({edges:a().edges.map(c=>c.id===i?{...c,...s}:c)});const r=a().selectedEdge;r&&r.id===i&&n({selectedEdge:{...r,...s}})},deleteNode:i=>{n({nodes:a().nodes.filter(s=>s.id!==i),edges:a().edges.filter(s=>s.source!==i&&s.target!==i)})},deleteEdge:i=>{n({edges:a().edges.filter(s=>s.id!==i)})},addNode:i=>{n({nodes:[...a().nodes,i]})},setJsonStore:i=>{n({jsonStore:i})},setDefaultLanguage:i=>{n({defaultLanguage:i})},setPreviewMode:i=>n({previewMode:i}),setDebugMode:i=>{n({debugMode:i}),a().updateDebugEdges()},setShowGrid:i=>n({showGrid:i}),setHelpOpen:i=>n({helpOpen:i}),setDrawerOpen:i=>n({drawerOpen:i}),setSettingsDrawerOpen:i=>n({settingsDrawerOpen:i}),setEdgeDrawerOpen:i=>n({edgeDrawerOpen:i}),setShareDialogOpen:i=>n({shareDialogOpen:i}),setLoadExternalDialogOpen:i=>n({loadExternalDialogOpen:i}),setSelectedNodeId:i=>n({selectedNodeId:i}),setSelectedNodeIds:i=>n({selectedNodeIds:i}),setSelectedEdge:i=>n({selectedEdge:i}),setNextNodeId:i=>n({nextNodeId:i}),setClipboard:i=>n({clipboard:i}),setLastMousePosition:i=>n({lastMousePosition:i}),setShareLink:i=>n({shareLink:i}),setPendingExternalId:i=>n({pendingExternalId:i}),setShowCompletionNeeds:i=>{n({showCompletionNeeds:i}),a().updateDebugEdges()},setShowCompletionOptional:i=>{n({showCompletionOptional:i}),a().updateDebugEdges()},setShowUnlockAfter:i=>{n({showUnlockAfter:i}),a().updateDebugEdges()},updateRoadmapData:i=>{a().loadRoadmapData(i),a().updateDebugEdges()},loadRoadmapData:i=>{const s=Array.isArray(i?.nodes)?i.nodes:[],r=Array.isArray(i?.edges)?i.edges:[],c=s.map(h=>({...h,draggable:!0,className:h.data.color?h.data.color:h.className,zIndex:h.zIndex!==void 0?h.zIndex:Of(h.type),data:{...h.data}}));let u=1;s.length>0&&(u=Math.max(...s.map(g=>parseInt(g.id.replace(/\D/g,""),10)).filter(g=>!isNaN(g)))+1),n({nodes:c,edges:r,settings:i?.settings||{background:{color:"#ffffff"}},nextNodeId:u})},getRoadmapData:()=>{const i=a();return{nodes:i.nodes.map(s=>({id:s.id,type:s.type,position:s.position,width:s.width,height:s.height,zIndex:s.zIndex!==void 0?s.zIndex:Of(s.type),data:s.data})),edges:i.edges.filter(s=>!s.id.startsWith("debug-")).map(s=>({id:s.id,source:s.source,target:s.target,sourceHandle:s.sourceHandle,targetHandle:s.targetHandle,animated:s.animated,type:s.type,style:s.style})),settings:i.settings,version:1,type:"learningmap",source:"https://learningmap.app"}},closeAllDrawers:()=>{n({drawerOpen:!1,selectedNodeId:null,edgeDrawerOpen:!1,selectedEdge:null,settingsDrawerOpen:!1})},reset:()=>{n(wy)}}),_T),AT));function Ey(n,a){return Ik(ie.temporal,n,a)}var _y=()=>{const n=ie(v=>v.jsonStore),a=ie(v=>v.getRoadmapData),i=ie(v=>v.settings.language),s=ie(v=>v.defaultLanguage),r=Vt(i||s),c=ie(v=>v.setShareLink),u=ie(v=>v.setShareDialogOpen),h=ie(v=>v.setLoadExternalDialogOpen),g=ie(v=>v.setPendingExternalId),p=ie(v=>v.loadRoadmapData),x=B.useCallback(()=>{const v=a();if(!v.nodes||v.nodes.length===0){alert(r.emptyMapCannotBeShared);return}fetch(`${n}/api/v2/post`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify(v)}).then(S=>{if(S.status===413)throw alert(r.uploadFileTooLarge),new Error("Payload too large");if(!S.ok)throw new Error(`HTTP error! status: ${S.status}`);return S.json()}).then(S=>{const b=window.location.origin+"#json="+S.id;c(b),u(!0)}).catch(S=>{S.message!=="Payload too large"&&alert(r.uploadFailed)})},[a,n,r,c,u]);return[B.useCallback(v=>{fetch(`${n}/api/v2/${v}`,{method:"GET",mode:"cors"}).then(S=>S.text()).then(S=>{const b=JSON.parse(S);p(b),h(!1)}).catch(()=>{alert(r.loadFailed),h(!1),g(null),window.location.hash=""})},[n,r,p]),x]},Rf=()=>{const n=ie(u=>u.getRoadmapData),a=ie(u=>u.loadRoadmapData),i=ie(u=>u.settings),s=B.useCallback(()=>{if(i?.title&&i.title.trim())return`${i.title.trim().replace(/[<>:"/\\|?*\x00-\x1F]/g,"-").replace(/\s+/g,"-")}.learningmap`;const u=new Date,h=u.getFullYear(),g=String(u.getMonth()+1).padStart(2,"0"),p=String(u.getDate()).padStart(2,"0"),x=String(u.getHours()).padStart(2,"0"),y=String(u.getMinutes()).padStart(2,"0"),v=String(u.getSeconds()).padStart(2,"0");return`${h}-${g}-${p}-${x}${y}${v}.learningmap`},[i?.title]),r=B.useCallback(()=>{const u=n(),h="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(u,null,2)),g=document.createElement("a");g.setAttribute("href",h),g.setAttribute("download",s()),document.body.appendChild(g),g.click(),g.remove()},[n,s]),c=B.useCallback(()=>{const u=document.createElement("input");u.type="file",u.accept=".learningmap,.json,application/json",u.onchange=h=>{const g=h.target.files[0];if(g){const p=new FileReader;p.onload=x=>{try{const y=JSON.parse(x.target.result);a(y)}catch(y){console.error("Failed to parse file",y)}},p.readAsText(g)}},u.click()},[a]);return{downloadRoadmap:r,openRoadmap:c,getFilename:s}},NT=({defaultLanguage:n="en",disableSharing:a=!1,disableFileOperations:i=!1})=>{const{screenToFlowPosition:s}=Wa(),r=ie(Y=>Y.settings),c=ie(Y=>Y.debugMode),u=ie(Y=>Y.previewMode),h=ie(Y=>Y.showCompletionNeeds),g=ie(Y=>Y.showCompletionOptional),p=ie(Y=>Y.showUnlockAfter),x=ie(Y=>Y.setDebugMode),y=ie(Y=>Y.setPreviewMode),v=ie(Y=>Y.setShowCompletionNeeds),S=ie(Y=>Y.setShowCompletionOptional),b=ie(Y=>Y.setShowUnlockAfter),E=ie(Y=>Y.addNode),_=ie(Y=>Y.setSettingsDrawerOpen),T=ie(Y=>Y.setDrawerOpen),z=ie(Y=>Y.setEdgeDrawerOpen),N=ie(Y=>Y.setSelectedNodeId),C=ie(Y=>Y.setSelectedEdge),D=ie(Y=>Y.reset),[R,j]=_y(),{downloadRoadmap:K,openRoadmap:J}=Rf(),fe=r?.language||n,U=Vt(fe),F=()=>x(!c),ae=()=>y(!u),H=Y=>v(Y),I=Y=>S(Y),k=Y=>b(Y),L=Y=>{const A=s({x:window.innerWidth/2,y:window.innerHeight/2}),O={id:`node-${Date.now()}`,type:Y,position:A,zIndex:Of(Y),data:{label:Y==="task"?U.newTask:Y==="topic"?U.newTopic:Y,state:"unlocked"}};E(O)},$=()=>{_(!0),T(!1),z(!1),N(null),C(null)},Z=()=>{confirm(U.resetMapWarning)&&D()};return m.jsxs("div",{className:"editor-toolbar",children:[m.jsxs("div",{className:"toolbar-group",children:[m.jsxs(ay,{menuButton:m.jsxs(Q0,{disabled:u,className:"toolbar-button",children:[m.jsx(yi,{size:16})," ",m.jsx("span",{className:"toolbar-label",children:U.nodes})]}),children:[m.jsxs(Kt,{onClick:()=>L("task"),children:[m.jsx("span",{children:U.addTask}),m.jsx("span",{style:{marginLeft:"auto",paddingLeft:"16px",color:"#9ca3af",fontSize:"0.875rem"},children:"Ctrl+1"})]}),m.jsxs(Kt,{onClick:()=>L("topic"),children:[m.jsx("span",{children:U.addTopic}),m.jsx("span",{style:{marginLeft:"auto",paddingLeft:"16px",color:"#9ca3af",fontSize:"0.875rem"},children:"Ctrl+2"})]}),m.jsxs(Kt,{onClick:()=>L("image"),children:[m.jsx("span",{children:U.addImage}),m.jsx("span",{style:{marginLeft:"auto",paddingLeft:"16px",color:"#9ca3af",fontSize:"0.875rem"},children:"Ctrl+3"})]}),m.jsxs(Kt,{onClick:()=>L("text"),children:[m.jsx("span",{children:U.addText}),m.jsx("span",{style:{marginLeft:"auto",paddingLeft:"16px",color:"#9ca3af",fontSize:"0.875rem"},children:"Ctrl+4"})]})]}),m.jsxs("button",{disabled:u,onClick:$,className:"toolbar-button",children:[m.jsx(WN,{size:16})," ",m.jsx("span",{className:"toolbar-label",children:U.settings})]})]}),m.jsx("div",{className:"toolbar-group",children:m.jsxs(ay,{menuButton:m.jsx(Q0,{className:"toolbar-button",children:m.jsx(KN,{})}),children:[!i&&m.jsxs(Kt,{onClick:J,children:[m.jsx(a0,{size:16})," ",m.jsx("span",{children:U.open})]}),!i&&m.jsxs(Kt,{onClick:K,children:[m.jsx(n0,{size:16})," ",m.jsx("span",{children:U.download})]}),!a&&m.jsxs(Kt,{onClick:j,children:[m.jsx(e3,{size:16})," ",m.jsx("span",{children:U.share})]}),m.jsx(kf,{}),m.jsxs(Kt,{onClick:Z,children:[m.jsx(PN,{size:16})," ",m.jsx("span",{children:U.reset}),m.jsx("span",{style:{marginLeft:"auto",paddingLeft:"16px",color:"#9ca3af",fontSize:"0.875rem"},children:"Ctrl+Del"})]}),m.jsx(kf,{}),m.jsxs(Vk,{className:`${c?"active":""}`,label:m.jsxs(m.Fragment,{children:[m.jsx(GN,{size:16})," ",m.jsx("span",{children:U.debug})]}),children:[m.jsxs(Kt,{type:"checkbox",checked:c,onClick:F,children:[m.jsx("span",{children:U.enableDebugMode}),m.jsx("span",{style:{marginLeft:"auto",paddingLeft:"16px",color:"#9ca3af",fontSize:"0.875rem"},children:"Ctrl+D"})]}),m.jsx(Kt,{type:"checkbox",checked:h,onClick:Y=>H(Y.checked??!1),disabled:!c,children:U.showCompletionNeedsEdges}),m.jsx(Kt,{type:"checkbox",checked:g,onClick:Y=>I(Y.checked??!1),disabled:!c,children:U.showCompletionOptionalEdges}),m.jsx(Kt,{type:"checkbox",checked:p,onClick:Y=>k(Y.checked??!1),disabled:!c,children:U.showUnlockAfterEdges})]}),m.jsxs(Kt,{onClick:ae,className:`${u?"active":""}`,children:[m.jsx(QN,{size:16})," ",m.jsx("span",{children:U.preview}),m.jsx("span",{style:{marginLeft:"auto",paddingLeft:"16px",color:"#9ca3af",fontSize:"0.875rem"},children:"Ctrl+P"})]}),m.jsx(kf,{}),m.jsxs(Kt,{href:"https://openpatch.org",target:"_blank",rel:"noopener noreferrer",children:[m.jsx(Fu,{size:16})," ",m.jsx("span",{children:"OpenPatch"})]}),m.jsxs(Kt,{href:"https://github.com/openpatch/learningmap",target:"_blank",rel:"noopener noreferrer",children:[m.jsx(Fu,{size:16})," ",m.jsx("span",{children:"GitHub"})]}),m.jsxs(Kt,{href:"https://fosstodon.org/@openpatch",target:"_blank",rel:"noopener noreferrer",children:[m.jsx(Fu,{size:16})," ",m.jsx("span",{children:"Mastodon"})]})]})})]})},kT='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8" standalone="no"?>%0A<svg%0A version="1.0"%0A width="50"%0A height="50"%0A viewBox="0 0 37.500001 37.500001"%0A preserveAspectRatio="xMidYMid"%0A id="svg54"%0A sodipodi:docname="learningmap-plain-mixed.svg"%0A inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"%0A inkscape:export-filename="/home/mike/Downloads/learningmap.png"%0A inkscape:export-xdpi="491.51999"%0A inkscape:export-ydpi="491.51999"%0A xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"%0A xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"%0A xmlns="http://www.w3.org/2000/svg"%0A xmlns:svg="http://www.w3.org/2000/svg">%0A <defs%0A id="defs58" />%0A <sodipodi:namedview%0A id="namedview56"%0A pagecolor="%23ffffff"%0A bordercolor="%23666666"%0A borderopacity="1.0"%0A inkscape:pageshadow="2"%0A inkscape:pageopacity="0.0"%0A inkscape:pagecheckerboard="true"%0A inkscape:document-units="pt"%0A showgrid="false"%0A inkscape:zoom="7.7603997"%0A inkscape:cx="26.931603"%0A inkscape:cy="30.604094"%0A inkscape:window-width="1245"%0A inkscape:window-height="1150"%0A inkscape:window-x="0"%0A inkscape:window-y="0"%0A inkscape:window-maximized="1"%0A inkscape:current-layer="g52"%0A inkscape:showpageshadow="2"%0A inkscape:deskcolor="%23d1d1d1"%0A showguides="false" />%0A <g%0A transform="matrix(0.0013712,0,0,-0.0013712,-38.39034,81.01027)"%0A fill="%23000000"%0A stroke="none"%0A id="g52"%0A style="fill:none;stroke:%23ffffff">%0A <g%0A id="g16"%0A transform="translate(63.576458,-228.27348)"%0A style="stroke:%23004c45;stroke-opacity:1;stroke-width:729.28821288;stroke-dasharray:none;fill:none;stroke-linecap:round">%0A <path%0A style="fill:%23b5e3d9;fill-opacity:1;stroke:%23017460;stroke-width:0.219075;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;paint-order:markers stroke fill"%0A d="M 7.8503375,12.263719 C 5.987097,12.170355 4.4345451,14.117912 4.897315,15.915685 5.1668841,17.442336 6.7312924,18.536741 8.2606756,18.268177 10.187887,18.09635 11.40714,15.817375 10.649965,14.076224 10.233925,12.9249 9.0517431,12.226794 7.8503375,12.263719 Z"%0A id="path3"%0A transform="matrix(546.96616,0,0,-546.96616,27934.046,59308.109)" />%0A <path%0A style="fill:%23b5e3d9;fill-opacity:1;stroke:%23017460;stroke-width:0.219075;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;paint-order:markers stroke fill"%0A d="m 25.056299,3.0627741 c -1.974898,-0.015164 -3.467995,2.2292736 -2.727957,4.0486125 0.450169,1.2654015 1.767925,2.1859291 3.129391,1.9534515 1.34906,0.022204 2.496898,-1.1939386 2.731298,-2.4592071 0.255249,-1.5561519 -0.773325,-3.2597319 -2.388219,-3.4912972 -0.245289,-0.044603 -0.495438,-0.061389 -0.744513,-0.05156 z"%0A id="path4"%0A transform="matrix(546.96616,0,0,-546.96616,27934.046,59308.109)" />%0A <path%0A style="fill:%23b5e3d9;fill-opacity:1;stroke:%23017460;stroke-width:0.219075;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;paint-order:markers stroke fill"%0A d="m 42.066077,12.257728 c -2.070515,-0.09267 -3.611178,2.384816 -2.692657,4.220835 0.746299,1.945097 3.64545,2.452556 5.004713,0.868813 1.314217,-1.327061 0.967161,-3.771925 -0.658081,-4.691504 -0.493432,-0.300762 -1.083284,-0.401997 -1.653975,-0.398144 z"%0A id="path5"%0A transform="matrix(546.96616,0,0,-546.96616,27934.046,59308.109)" />%0A <path%0A style="fill:%23b5e3d9;fill-opacity:1;stroke:%23017460;stroke-width:0.219075;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;paint-order:markers stroke fill"%0A d="m 42.123627,32.194856 c -1.934022,-0.06402 -3.513785,2.071529 -2.876004,3.893933 0.398196,1.298064 1.673135,2.284371 3.058281,2.14069 1.963712,0.01584 3.419813,-2.200138 2.727101,-4.010531 -0.396895,-1.232189 -1.619636,-2.071043 -2.909378,-2.024092 z"%0A id="path6"%0A transform="matrix(546.96616,0,0,-546.96616,27934.046,59308.109)" />%0A <path%0A d="m 43605.56,35704.39 5863.142,3474.937 c -149.103,262.479 -227.509,559.171 -227.546,861.044 0.116,452.903 176.187,888.384 491.415,1213.581 315.226,325.197 744.877,514.593 1197.556,528.805 v 7431.048 c -452.865,14.218 -882.3,204.448 -1197.556,529.874 -315.257,325.426 -491.578,760.493 -491.415,1213.581 0.05,246.783 52.483,490.746 153.834,715.757 v 1.068 l -6117.048,3531.777 c -291.575,-601.244 -901.107,-982.981 -1569.322,-982.829 -704.464,0.132 -1339.645,424.149 -1609.918,1074.703 l -6278.36,-3624.719 c 101.718,-224.93 154.517,-468.896 154.903,-715.757 0.163,-453.088 -176.158,-888.155 -491.415,-1213.581 -315.257,-325.427 -744.691,-515.657 -1197.557,-529.874 v -8013.267 c 452.865,-14.218 882.3,-204.448 1197.557,-529.874 315.257,-325.427 491.577,-760.493 491.415,-1213.581 -0.01,-129.026 -14.343,-257.653 -42.732,-383.517 v -1.069 l 5755.41,-3213.941"%0A style="fill:none;stroke:%23017460;stroke-width:729.288;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"%0A id="path18"%0A sodipodi:nodetypes="cccsccsccccccccsccscccc" />%0A <g%0A id="g12"%0A transform="translate(20.985367)"%0A style="fill:none;fill-opacity:1;stroke:%23004c45;stroke-opacity:1;stroke-width:729.28821288;stroke-dasharray:none;stroke-linecap:round" />%0A <g%0A id="g12-4"%0A transform="matrix(1.0000018,0,0,1.0000018,2848.628,2322.2166)"%0A style="fill:none;fill-opacity:1;stroke:%23004c45;stroke-opacity:1;stroke-width:729.28690016;stroke-dasharray:none;stroke-linecap:round" />%0A <path%0A d="m 43595.73,35689.66 c 62.193,-490.969 -53.597,-909.978 -156.775,-1126.242 -193.529,-405.641 -309.849,-610.393 -672.936,-875.187 -363.091,-264.797 -805.968,-397.066 -1254.802,-374.784 -448.829,22.282 -876.497,197.766 -1211.694,497.155 -335.196,299.389 -557.677,704.601 -630.309,1148.074 -72.633,443.478 8.975,898.424 231.245,1288.998 222.268,390.571 571.757,693.153 990.166,857.263"%0A id="path1-2-0"%0A style="fill:none;stroke:%23017460;stroke-width:729.288;stroke-linecap:round;stroke-dasharray:none;stroke-opacity:1"%0A sodipodi:nodetypes="cssssssc" />%0A <path%0A d="m 40849.11,35368.518 683.354,-477.479 1591.603,2277.848"%0A id="path2-2"%0A style="stroke:%23017460;stroke-width:729.28821288;stroke-dasharray:none;stroke-opacity:1;fill:none;stroke-linecap:round;fill-opacity:0" />%0A <circle%0A cx="50984.348"%0A cy="-50953.406"%0A r="1743.692"%0A id="circle1-9-0-6"%0A transform="scale(1,-1)"%0A style="fill:none;fill-opacity:1;stroke:%23017460;stroke-width:729.28821288;stroke-dasharray:none;stroke-opacity:1;stroke-linecap:round" />%0A <circle%0A cx="50988.066"%0A cy="-40043.738"%0A r="1743.692"%0A id="circle1-9-0-6-0"%0A transform="scale(1,-1)"%0A style="fill:%23b5e3d9;fill-opacity:1;stroke:%23017460;stroke-width:729.28821288;stroke-dasharray:none;stroke-opacity:1;stroke-linecap:round" />%0A <circle%0A cx="41713.258"%0A cy="-55971.996"%0A r="1743.692"%0A id="circle1-9-0-6-1"%0A transform="scale(1,-1)"%0A style="fill:none;fill-opacity:1;stroke:%23017460;stroke-width:729.28821288;stroke-dasharray:none;stroke-opacity:1;stroke-linecap:round" />%0A <circle%0A cx="32237.596"%0A cy="-50954.227"%0A r="1743.6952"%0A id="circle1-9-0-6-1-5"%0A transform="scale(1,-1)"%0A style="fill:none;fill-opacity:1;stroke:%23017460;stroke-width:729.28821288;stroke-dasharray:none;stroke-opacity:1;stroke-linecap:round" />%0A <g%0A id="g6">%0A <path%0A style="fill:%23b5e3d9;fill-opacity:1;stroke:%23017460;stroke-width:0.219075;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;paint-order:markers stroke fill"%0A d="m 7.7589848,33.262848 c -1.9285094,-0.03754 -3.4162729,2.069333 -2.828509,3.882808 0.4477732,1.743016 2.5850355,2.717411 4.190883,1.898509 1.0920472,-0.463941 1.8542062,-1.605018 1.7136832,-2.809147 0.117257,-1.625749 -1.4957684,-3.052661 -3.0760572,-2.97217 z"%0A id="path2"%0A transform="matrix(546.96616,0,0,-546.96616,27934.046,59308.109)" />%0A <circle%0A cx="32230.184"%0A cy="-39458.945"%0A r="1743.6984"%0A id="circle1-9-0-6-1-5-7"%0A transform="scale(1,-1)"%0A style="fill:none;fill-opacity:1;stroke:%23017460;stroke-width:729.28821288;stroke-dasharray:none;stroke-opacity:1;stroke-linecap:round" />%0A </g>%0A </g>%0A <g%0A id="g15"%0A transform="matrix(1.1225034,0,0,1.1225034,-5720.3933,-6172.9528)"%0A style="fill:none;stroke:%23017460;stroke-width:974.54700097;stroke-dasharray:none;stroke-opacity:1">%0A <path%0A d="m 45485.685,47422.605 a 4375.7293,4375.7293 0 0 1 -8735.049,-380.688 c 0,-2565.272 2673.023,-5230.091 3840.796,-6272.608"%0A id="path1-4"%0A style="fill:none;stroke:%23017460;stroke-width:974.54700097;stroke-dasharray:none;stroke-opacity:1" />%0A <path%0A d="m 47349.746,43417.719 a 1161.8375,1161.8375 0 0 1 -1643.086,1643.086 l -2193.335,-2194.428 a 1093.9323,1093.9323 0 0 1 -276.764,-467.109 l -457.811,-1569.793 a 273.48308,273.48308 0 0 1 339.119,-339.119 l 1569.793,457.811 a 1093.9323,1093.9323 0 0 1 467.109,276.764 z"%0A id="path2-7"%0A style="fill:%23a9f7a1;fill-opacity:1;stroke:%23017460;stroke-width:974.54700097;stroke-dasharray:none;stroke-opacity:1" />%0A <circle%0A cx="41126.367"%0A cy="-47041.914"%0A r="1640.8984"%0A id="circle2"%0A transform="scale(1,-1)"%0A style="fill:%23b5e3d9;fill-opacity:1;stroke:%23017460;stroke-width:974.54700097;stroke-dasharray:none;stroke-opacity:1" />%0A </g>%0A </g>%0A</svg>%0A',TT=({defaultLanguage:n="en"})=>{const a=ie(p=>p.settings),i=ie(p=>p.addNode),s=ie(p=>p.setHelpOpen),{openRoadmap:r}=Rf(),c=a?.language||n,u=Vt(c),h=()=>{const p={x:window.innerWidth/2,y:window.innerHeight/2},x={id:`node-${Date.now()}`,type:"topic",position:p,data:{label:u.newTopic,state:"unlocked"}};i(x)},g=()=>s(!0);return m.jsx("div",{className:"welcome-message",children:m.jsxs("div",{className:"welcome-content",children:[m.jsxs("h1",{className:"welcome-title",children:[m.jsx("img",{src:kT,alt:"Logo",className:"welcome-logo"}),u.welcomeTitle]}),m.jsx("p",{className:"welcome-subtitle",children:u.welcomeSubtitle}),m.jsxs("div",{className:"welcome-actions",children:[m.jsxs("button",{onClick:r,className:"primary-button",children:[m.jsx(a0,{size:18}),u.welcomeOpenFile]}),m.jsxs("button",{onClick:h,className:"primary-button",children:[m.jsx(yi,{size:18}),u.welcomeAddTopic]}),m.jsxs("button",{onClick:g,className:"secondary-button",children:[m.jsx(l0,{size:18}),u.welcomeHelp]})]})]})})},CT=({id:n,source:a,target:i,markerEnd:s,style:r})=>{const c=Im(a),u=Im(i);if(!c||!u)return null;const{sx:h,sy:g,tx:p,ty:x,sourcePos:y,targetPos:v}=lT(c,u),[S]=Nu({sourceX:h,sourceY:g,sourcePosition:y,targetPosition:v,targetX:p,targetY:x});return m.jsx("path",{id:n,className:"react-flow__edge-path",d:S,markerEnd:s,style:r})},MT=CT,zT=()=>{const n=ie(b=>b.selectedNodeIds),a=ie(b=>b.nodes),i=ie(b=>b.updateNodes),s=a.filter(b=>n.includes(b.id));if(s.length<2)return null;const r=()=>{if(s.length<2)return;const b=Math.min(...s.map(_=>_.position.x)),E=s.map(_=>({..._,position:{..._.position,x:b}}));i(E)},c=()=>{if(s.length<2)return;const b=s.reduce((_,T)=>_+T.position.x+(T.width||T.measured.width)/2,0)/s.length,E=s.map(_=>({..._,position:{..._.position,x:b-(_.width||_.measured.width)/2}}));i(E)},u=()=>{if(s.length<2)return;const b=Math.max(...s.map(_=>_.position.x+(_.width||0))),E=s.map(_=>({..._,position:{..._.position,x:b-(_.width||_.measured.width)}}));i(E)},h=()=>{if(s.length<2)return;const b=Math.min(...s.map(_=>_.position.y)),E=s.map(_=>({..._,position:{..._.position,y:b}}));i(E)},g=()=>{if(s.length<2)return;const b=s.reduce((_,T)=>_+T.position.y+(T.height||T.measured.height)/2,0)/s.length,E=s.map(_=>({..._,position:{..._.position,y:b-(_.height||_.measured.height)/2}}));i(E)},p=()=>{if(s.length<2)return;const b=Math.max(...s.map(_=>_.position.y+(_.height||0))),E=s.map(_=>({..._,position:{..._.position,y:b-(_.height||_.measured.height)}}));i(E)},x=()=>{if(s.length<3)return;const b=[...s].sort((R,j)=>R.position.y-j.position.y),E=b[0].position.y,_=b.reduce((R,j)=>R+(j.height||j.measured.height),0),z=b[b.length-1].position.y-E+(b[b.length-1].height||b[b.length-1].measured.height)-_,N=b.length>1?z/(b.length-1):0;let C=E;const D=b.map((R,j)=>{const K={...R,position:{...R.position,y:C}};return C+=(R.height||R.measured.height)+N,K});i(D)},y=()=>{if(s.length<3)return;const b=[...s].sort((R,j)=>R.position.x-j.position.x),E=b[0].position.x,_=b.reduce((R,j)=>R+(j.width||j.measured.width),0),z=b[b.length-1].position.x-E+(b[b.length-1].width||b[b.length-1].measured.width)-_,N=b.length>1?z/(b.length-1):0;let C=E;const D=b.map((R,j)=>{const K={...R,position:{...R.position,x:C}};return C+=(R.width||R.measured.width)+N,K});i(D)},v=()=>{if(s.length<2)return;const b=Math.max(...s.map(_=>_.width||_.measured.width)),E=s.map(_=>({..._,width:b}));i(E)},S=()=>{if(s.length<2)return;const b=Math.max(...s.map(_=>_.height||_.measured.height)),E=s.map(_=>({..._,height:b}));i(E)};return m.jsxs(fa,{position:"bottom-center",className:"multi-node-panel",children:[m.jsx("button",{title:"Align Left Horizontal",onClick:h,children:m.jsx(YN,{})}),m.jsx("button",{title:"Align Center Horizontal",onClick:g,children:m.jsx(HN,{})}),m.jsx("button",{title:"Align Right Horizontal",onClick:p,children:m.jsx(UN,{})}),m.jsx("button",{title:"Align Top Vertical",onClick:r,children:m.jsx(qN,{})}),m.jsx("button",{title:"Align Center Vertical",onClick:c,children:m.jsx(BN,{})}),m.jsx("button",{title:"Align Bottom Vertical",onClick:u,children:m.jsx($N,{})}),s.length>2&&m.jsx("button",{title:"Distribute Vertical",onClick:x,children:m.jsx(XN,{})}),s.length>2&&m.jsx("button",{title:"Distribute Horizontal",onClick:y,children:m.jsx(VN,{})}),m.jsx("button",{title:"Same Width",onClick:v,children:m.jsx(s0,{})}),m.jsx("button",{title:"Same Height",onClick:S,children:m.jsx(s0,{style:{transform:"rotate(90deg)"}})})]})};function Ay({localNode:n,handleFieldChange:a,handleResourceChange:i,addResource:s,removeResource:r,handleUnlockAfterChange:c,addUnlockAfter:u,removeUnlockAfter:h,renderNodeSelect:g,handleCompletionNeedsChange:p,addCompletionNeed:x,removeCompletionNeed:y,handleCompletionOptionalChange:v,addCompletionOptional:S,removeCompletionOptional:b,language:E="en"}){const _=Vt(E),T=[{value:"blue",label:_.blue,className:"react-flow__node-topic blue"},{value:"yellow",label:_.yellow,className:"react-flow__node-topic yellow"},{value:"lila",label:_.lila,className:"react-flow__node-topic lila"},{value:"pink",label:_.pink,className:"react-flow__node-topic pink"},{value:"teal",label:_.teal,className:"react-flow__node-topic teal"},{value:"red",label:_.red,className:"react-flow__node-topic red"},{value:"black",label:_.black,className:"react-flow__node-topic black"},{value:"white",label:_.white,className:"react-flow__node-topic white"}];let z="blue";n.type==="topic"&&(z="yellow");const N=n.data?.color||z;return m.jsxs("div",{className:"panel-content",children:[m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.nodeColor}),m.jsx("div",{style:{display:"flex",gap:12,marginTop:8},children:T.map(C=>m.jsx("button",{type:"button","aria-label":C.label,onClick:()=>a("color",C.value),className:C.className,style:{width:28,height:28,borderRadius:6,cursor:"pointer",fontWeight:"bold",boxSizing:"border-box",display:"inline-block",padding:0},children:N===C.value?"X":""},C.value))})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.labelRequired}),m.jsx("input",{type:"text",value:n.data?.label||"",onChange:C=>a("label",C.target.value),placeholder:_.placeholderNodeLabel})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.fontSize}),m.jsx("div",{style:{display:"flex",gap:8,marginTop:8},children:["S","M","L","XL"].map(C=>{const D=nT(n.data.fontSize)===C;return m.jsx("button",{type:"button",onClick:()=>a("fontSize",Io[C]),style:{width:40,height:40,borderRadius:6,border:D?"2px solid #3b82f6":"1px solid #d1d5db",backgroundColor:D?"#eff6ff":"#ffffff",color:D?"#3b82f6":"#374151",cursor:"pointer",fontWeight:D?"bold":"normal",fontSize:"14px"},children:C},C)})})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.summary}),m.jsx("input",{type:"text",value:n.data.summary||"",onChange:C=>a("summary",C.target.value),placeholder:_.placeholderShortSummary})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.description}),m.jsx("textarea",{value:n.data.description||"",onChange:C=>a("description",C.target.value),placeholder:_.placeholderDetailedDescription,rows:4})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.duration}),m.jsx("input",{type:"text",value:n.data.duration||"",onChange:C=>a("duration",C.target.value),placeholder:"e.g., 30 min"})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.videoURL}),m.jsx("input",{type:"text",value:n.data.video||"",onChange:C=>a("video",C.target.value),placeholder:_.placeholderVideoURL})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.resources}),(n.data.resources||[]).map((C,D)=>{const R=C.type==="book";return m.jsxs("div",{style:{marginBottom:"16px",padding:"12px",border:"1px solid #e5e7eb",borderRadius:"6px"},children:[m.jsxs("div",{style:{display:"flex",gap:"8px",marginBottom:"8px"},children:[m.jsxs("select",{value:C.type||"url",onChange:j=>i(D,"type",j.target.value),style:{flex:.5},children:[m.jsx("option",{value:"url",children:"URL"}),m.jsx("option",{value:"book",children:"Book"})]}),m.jsx("input",{type:"text",value:C.label||"",onChange:j=>i(D,"label",j.target.value),placeholder:_.placeholderLabel,style:{flex:1}}),m.jsx("button",{onClick:()=>r(D),className:"icon-button",children:m.jsx(xi,{size:16})})]}),R?m.jsxs(m.Fragment,{children:[m.jsx("input",{type:"text",value:C.bookName||"",onChange:j=>i(D,"bookName",j.target.value),placeholder:"Book name (e.g., Lambacher Schweitzer GK)",style:{width:"100%",marginBottom:"8px"}}),m.jsx("input",{type:"text",value:C.bookLocation||"",onChange:j=>i(D,"bookLocation",j.target.value),placeholder:"Location (e.g., S. 223 Nr. 5)",style:{width:"100%"}})]}):m.jsx("input",{type:"text",value:C.url||"",onChange:j=>i(D,"url",j.target.value),placeholder:_.placeholderURL,style:{width:"100%"}})]},D)}),m.jsxs("button",{onClick:s,className:"secondary-button",children:[m.jsx(yi,{size:16})," ",_.addResource]})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.unlockPassword}),m.jsx("input",{type:"text",value:n.data.unlock?.password||"",onChange:C=>a("unlock",{...n.data.unlock||{},password:C.target.value}),placeholder:_.placeholderOptionalPassword})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.unlockDate}),m.jsx("input",{type:"date",value:n.data.unlock?.date||"",onChange:C=>a("unlock",{...n.data.unlock||{},date:C.target.value})})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.unlockAfter}),(n.data.unlock?.after||[]).map((C,D)=>m.jsxs("div",{style:{display:"flex",gap:"8px",marginBottom:"8px"},children:[g(C,R=>c(D,R)),m.jsx("button",{onClick:()=>h(D),className:"icon-button",children:m.jsx(xi,{size:16})})]},D)),m.jsxs("button",{onClick:u,className:"secondary-button",children:[m.jsx(yi,{size:16})," ",_.unlockAfter]})]}),n.type==="topic"&&m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.completionNeeds}),(n.data.completion?.needs||[]).map((C,D)=>m.jsxs("div",{style:{display:"flex",gap:"8px",marginBottom:"8px"},children:[g(C,R=>p(D,R)),m.jsx("button",{onClick:()=>y(D),className:"icon-button",children:m.jsx(xi,{size:16})})]},D)),m.jsxs("button",{onClick:x,className:"secondary-button",children:[m.jsx(yi,{size:16})," ",_.completionNeeds]})]}),n.type==="topic"&&m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.completionOptional}),(n.data.completion?.optional||[]).map((C,D)=>m.jsxs("div",{style:{display:"flex",gap:"8px",marginBottom:"8px"},children:[g(C,R=>v(D,R)),m.jsx("button",{onClick:()=>b(D),className:"icon-button",children:m.jsx(xi,{size:16})})]},D)),m.jsxs("button",{onClick:S,className:"secondary-button",children:[m.jsx(yi,{size:16})," ",_.completionOptional]})]})]})}function DT(n){return m.jsx(Ay,{...n})}async function OT(n,a=1920,i=1920,s=.85){return new Promise((r,c)=>{const u=new FileReader;u.onload=h=>{const g=new Image;g.onload=()=>{const p=document.createElement("canvas");let x=g.width,y=g.height;if(x>a||y>i){const b=x/y;x>y?(x=a,y=a/b):(y=i,x=i*b)}p.width=x,p.height=y;const v=p.getContext("2d");if(!v){c(new Error("Failed to get canvas context"));return}v.drawImage(g,0,0,x,y);const S=p.toDataURL("image/jpeg",s);r(S)},g.onerror=()=>{c(new Error("Failed to load image"))},g.src=h.target?.result},u.onerror=()=>{c(new Error("Failed to read file"))},u.readAsDataURL(n)})}function RT({localNode:n,handleFieldChange:a,language:i="en"}){const s=Vt(i),r=async c=>{const u=c.target.files?.[0];if(u)try{if(u.type==="image/svg+xml"){const h=new FileReader;h.onload=()=>{typeof h.result=="string"&&a("data",h.result)},h.readAsDataURL(u)}else{const h=await OT(u);a("data",h)}}catch(h){console.error("Failed to process image:",h);const g=new FileReader;g.onload=()=>{typeof g.result=="string"&&a("data",g.result)},g.readAsDataURL(u)}};return m.jsxs("div",{className:"panel-content",children:[m.jsxs("div",{className:"form-group",children:[m.jsxs("label",{children:[s.image," (JPG, PNG, WebP, SVG)"]}),m.jsx("input",{type:"file",accept:"image/png,image/jpeg,image/webp,image/svg+xml",onChange:r})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:s.caption}),m.jsx("input",{type:"text",value:n.data.caption||"",onChange:c=>a("caption",c.target.value),placeholder:s.placeholderImageCaption})]}),n.data.data&&m.jsxs("div",{style:{marginTop:16},children:[m.jsx("label",{children:"Preview:"}),m.jsx("div",{children:m.jsx("img",{src:n.data.data,alt:"Preview",style:{maxWidth:"100%",maxHeight:200}})})]})]})}var Lr=({value:n,onChange:a,label:i})=>m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[i&&m.jsx("label",{style:{marginRight:8},children:i}),m.jsx("input",{type:"color",value:n,onChange:s=>a(s.target.value),style:{width:32,height:32,border:"none",background:"none",padding:0}}),m.jsx("input",{type:"text",value:n,onChange:s=>a(s.target.value),placeholder:"#e5e7eb",style:{width:100}})]});function jT({value:n,onChange:a}){return m.jsxs("div",{className:"form-group",children:[m.jsxs("label",{children:["Rotation (degrees): ",n,"°"]}),m.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[m.jsx("input",{type:"range",min:0,max:360,value:n,onChange:i=>a(Number(i.target.value)),style:{flex:1}}),m.jsx("input",{type:"number",min:0,max:360,value:n,onChange:i=>{let s=Number(i.target.value);isNaN(s)&&(s=0),s<0&&(s=0),s>360&&(s=360),a(s)},style:{width:100}})]})]})}function LT({localNode:n,handleFieldChange:a,language:i="en"}){const s=Vt(i);return m.jsxs("div",{className:"panel-content",children:[m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:s.text}),m.jsx("input",{type:"text",value:n.data.text||"",onChange:r=>a("text",r.target.value),placeholder:s.placeholderBackgroundText})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:s.fontSize}),m.jsx("input",{type:"number",value:n.data.fontSize||32,onChange:r=>a("fontSize",Number(r.target.value))})]}),m.jsx("div",{className:"form-group",children:m.jsx(Lr,{label:s.color,value:n.data.color||"#e5e7eb",onChange:r=>a("color",r)})}),m.jsx(jT,{value:n.data.rotation||0,onChange:r=>a("rotation",r)})]})}var HT=({defaultLanguage:n="en"})=>{const a=ie(A=>A.selectedNodeId),i=ie(A=>A.nodes),s=ie(A=>A.drawerOpen),r=ie(A=>A.settings),c=ie(A=>A.nextNodeId),u=ie(A=>A.setDrawerOpen),h=ie(A=>A.setSelectedNodeId),g=ie(A=>A.updateNode),p=ie(A=>A.deleteNode),x=ie(A=>A.addNode),y=ie(A=>A.setNextNodeId),v=r?.language||n,S=Vt(v),b=i.find(A=>A.id===a)||null;B.useEffect(()=>{s&&!b&&(u(!1),h(null))},[b,s,u,h]);const E=()=>{u(!1),h(null)},_=()=>{b&&(p(b.id),E())},T=()=>{if(!b)return;const A=`node-${c}`,O={...b,id:A,position:{x:b.position.x+20,y:b.position.y+20},data:{...b.data,label:`${b.data.label} (copy)`},selected:!1};x(O),y(c+1),h(A)};if(!s||!b)return null;const z=i.filter(A=>A.id!==b.id&&(A.type==="task"||A.type==="topic")),N=ie.getState().edges,C=new Set;N.forEach(A=>{A.source===b.id&&C.add(A.target),A.target===b.id&&C.add(A.source)});const D=[...z].sort((A,O)=>{const G=C.has(A.id),P=C.has(O.id);if(G&&!P)return-1;if(!G&&P)return 1;const se=(A.data.label||A.id).toLowerCase(),ge=(O.data.label||O.id).toLowerCase();return se.localeCompare(ge)}),R=(A,O)=>m.jsxs("select",{value:A,onChange:G=>O(G.target.value),children:[m.jsx("option",{value:"",children:S.selectNode}),D.map(G=>m.jsx("option",{value:G.id,children:G.data.label||G.id},G.id))]}),j=(A,O)=>{if(!b)return;const G=[...b.data.completion?.needs||[]];G[A]=O,k("completion",{...b.data.completion||{},needs:G})},K=()=>{if(!b)return;const A=[...b.data.completion?.needs||[],""];k("completion",{...b.data.completion||{},needs:A})},J=A=>{if(!b)return;const O=(b.data.completion?.needs||[]).filter((G,P)=>P!==A);k("completion",{...b.data.completion||{},needs:O})},fe=(A,O)=>{if(!b)return;const G=[...b.data.completion?.optional||[]];G[A]=O,k("completion",{...b.data.completion||{},optional:G})},U=()=>{if(!b)return;const A=[...b.data.completion?.optional||[],""];k("completion",{...b.data.completion||{},optional:A})},F=A=>{if(!b)return;const O=(b.data.completion?.optional||[]).filter((G,P)=>P!==A);k("completion",{...b.data.completion||{},optional:O})},ae=(A,O)=>{if(!b)return;const G=[...b.data.unlock?.after||[]];G[A]=O,k("unlock",{...b.data.unlock||{},after:G})},H=()=>{if(!b)return;const A=[...b.data.unlock?.after||[],""];k("unlock",{...b.data.unlock||{},after:A})},I=A=>{if(!b)return;const O=(b.data.unlock?.after||[]).filter((G,P)=>P!==A);k("unlock",{...b.data.unlock||{},after:O})},k=(A,O)=>{if(!b)return;const G={...b,data:{...b.data,[A]:O},className:A==="color"?O:b.className};g(b.id,G)},L=(A,O,G)=>{if(!b)return;const P=[...b.data.resources||[]];P[A]={...P[A],[O]:G},k("resources",P)},$=()=>{if(!b)return;const A=[...b.data.resources||[],{label:"",type:"url",url:""}];k("resources",A)},Z=A=>{if(!b)return;const O=(b.data.resources||[]).filter((G,P)=>P!==A);k("resources",O)};let Y;return b.type==="task"?Y=m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"panel-header",children:[m.jsx("h2",{className:"panel-title",children:S.editTask}),m.jsx("button",{onClick:E,className:"close-button",children:m.jsx(da,{size:20})})]}),m.jsx(Ay,{localNode:b,handleFieldChange:k,handleResourceChange:L,addResource:$,removeResource:Z,handleUnlockAfterChange:ae,addUnlockAfter:H,removeUnlockAfter:I,renderNodeSelect:R,handleCompletionNeedsChange:j,addCompletionNeed:K,removeCompletionNeed:J,handleCompletionOptionalChange:fe,addCompletionOptional:U,removeCompletionOptional:F,language:v})]}):b.type==="topic"?Y=m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"panel-header",children:[m.jsx("h2",{className:"panel-title",children:S.editTopic}),m.jsx("button",{onClick:E,className:"close-button",children:m.jsx(da,{size:20})})]}),m.jsx(DT,{localNode:b,handleFieldChange:k,handleResourceChange:L,addResource:$,removeResource:Z,handleUnlockAfterChange:ae,addUnlockAfter:H,removeUnlockAfter:I,renderNodeSelect:R,handleCompletionNeedsChange:j,addCompletionNeed:K,removeCompletionNeed:J,handleCompletionOptionalChange:fe,addCompletionOptional:U,removeCompletionOptional:F,language:v})]}):b.type==="image"?Y=m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"panel-header",children:[m.jsx("h2",{className:"panel-title",children:S.editImage}),m.jsx("button",{onClick:E,className:"close-button",children:m.jsx(da,{size:20})})]}),m.jsx(RT,{localNode:b,handleFieldChange:k,language:v})]}):b.type==="text"&&(Y=m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"panel-header",children:[m.jsx("h2",{className:"panel-title",children:S.editText}),m.jsx("button",{onClick:E,className:"close-button",children:m.jsx(da,{size:20})})]}),m.jsx(LT,{localNode:b,handleFieldChange:k,language:v})]})),m.jsx(fa,{position:"center-right",className:"editor-panel",children:m.jsxs("div",{className:"panel-inner",children:[Y,m.jsxs("div",{className:"panel-footer",children:[m.jsxs("button",{onClick:T,className:"secondary-button",children:[m.jsx(IN,{size:16})," ",S.copyNode]}),m.jsxs("button",{onClick:_,className:"danger-button",children:[m.jsx(xi,{size:16})," ",S.deleteNode]})]})]})})};function BT({localEdge:n,handleFieldChange:a,language:i="en"}){const s=Vt(i);return m.jsxs("div",{className:"panel-content",children:[m.jsx("div",{className:"form-group",children:m.jsx(Lr,{label:s.edgeColor,value:n.style?.stroke||"#222222",onChange:r=>a("color",r)})}),m.jsx("div",{className:"form-group",children:m.jsxs("label",{children:[m.jsx("input",{type:"checkbox",checked:!!n.animated,onChange:r=>a("animated",r.target.checked)}),s.animated]})}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:s.edgeType}),m.jsxs("select",{value:n.type||"default",onChange:r=>a("type",r.target.value),children:[m.jsx("option",{value:"default",children:s.default}),m.jsx("option",{value:"straight",children:s.straight}),m.jsx("option",{value:"step",children:s.step}),m.jsx("option",{value:"smoothstep",children:s.smoothstep}),m.jsx("option",{value:"simplebezier",children:"Simple Bezier"})]})]})]})}var UT=({defaultLanguage:n="en"})=>{const a=ie(S=>S.selectedEdge),i=ie(S=>S.edgeDrawerOpen),s=ie(S=>S.settings);ie(S=>S.edges);const r=ie(S=>S.setEdgeDrawerOpen),c=ie(S=>S.setSelectedEdge),u=ie(S=>S.updateEdge),h=ie(S=>S.deleteEdge),g=s?.language||n,p=Vt(g);B.useEffect(()=>{i&&!a&&r(!1)},[a,i,r]);const x=()=>{r(!1),c(null)},y=S=>{u(S.id,S)},v=()=>{a&&(h(a.id),x())};return!a||!i?null:m.jsx(fa,{position:"center-right",className:"editor-panel",children:m.jsxs("div",{className:"panel-inner",children:[m.jsxs("div",{className:"panel-header",children:[m.jsx("h2",{className:"panel-title",children:p.editEdge}),m.jsx("button",{onClick:x,className:"close-button",children:m.jsx(da,{size:20})})]}),m.jsx(BT,{localEdge:a,handleFieldChange:(S,b)=>{let E={...a};S==="color"?E={...E,style:{...E.style,stroke:b}}:S==="animated"?E={...E,animated:b}:S==="type"&&(E={...E,type:b}),y(E)},language:g}),m.jsx("div",{className:"panel-footer panel-footer-centered",children:m.jsxs("button",{onClick:v,className:"danger-button",children:[m.jsx(xi,{size:16})," ",p.deleteEdge]})})]})})},VT=({defaultLanguage:n="en"})=>{const a=ie(b=>b.settingsDrawerOpen),i=ie(b=>b.settings),s=ie(b=>b.edges),r=ie(b=>b.setEdges),c=ie(b=>b.setSettingsDrawerOpen),u=ie(b=>b.setSettings),h=i?.language||n,g=Vt(h),{getViewport:p}=Wa(),x=()=>c(!1);if(!a)return null;const y=b=>{u({...i,...b})},v=()=>{const b=p();y({viewport:{x:Math.round(b.x),y:Math.round(b.y),zoom:parseFloat(b.zoom.toFixed(2))}})},S=()=>{const b=i?.defaultEdgeType||"default",E=i?.defaultEdgeColor||"#94a3b8",_=s.map(T=>({...T,type:b,style:{...T.style,stroke:E}}));r(_)};return m.jsx(fa,{position:"center-right",className:"editor-panel",children:m.jsxs("div",{className:"panel-inner",children:[m.jsxs("div",{className:"panel-header",children:[m.jsx("h2",{className:"panel-title",children:g.backgroundSettings}),m.jsx("button",{onClick:x,className:"close-button",children:m.jsx(da,{size:20})})]}),m.jsxs("div",{className:"panel-content",children:[m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:g.labelRequired}),m.jsx("input",{type:"text",value:i?.title||"",onChange:b=>y({title:b.target.value}),placeholder:g.placeholderTitleLabel})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:g.languageLabel}),m.jsxs("select",{value:i?.language||"en",onChange:b=>y({language:b.target.value}),children:[m.jsx("option",{value:"en",children:g.languageEnglish}),m.jsx("option",{value:"de",children:g.languageGerman})]})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:g.storageId}),m.jsxs("div",{style:{display:"flex",gap:"8px",marginBottom:"8px"},children:[m.jsx("input",{type:"text",value:i?.id||"",onChange:b=>y({id:b.target.value}),placeholder:"Optional",style:{flex:1}}),m.jsx("button",{onClick:()=>y({id:oT()}),className:"secondary-button",type:"button",style:{padding:"8px 12px",width:"auto",display:"flex",alignItems:"center",gap:"4px"},title:g.generateRandomId,children:m.jsx(JN,{size:16})})]}),m.jsxs("p",{style:{fontSize:"0.875rem",color:"#666",margin:0,fontStyle:"italic"},children:["ℹ️ ",g.storageIdHint]})]}),m.jsx("div",{className:"form-group",children:m.jsx(Lr,{label:g.backgroundColor,value:i?.background?.color||"#ffffff",onChange:b=>y({background:{...i.background,color:b}})})}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:g.initialViewport}),m.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center",marginTop:"8px"},children:[m.jsxs("div",{style:{flex:1},children:[m.jsx("label",{style:{fontSize:"0.875rem",color:"#666"},children:g.viewportX}),m.jsx("input",{type:"number",value:i?.viewport?.x??0,onChange:b=>y({viewport:{...i.viewport,x:parseFloat(b.target.value)||0,y:i.viewport?.y??0,zoom:i.viewport?.zoom??1}}),style:{width:"100%"}})]}),m.jsxs("div",{style:{flex:1},children:[m.jsx("label",{style:{fontSize:"0.875rem",color:"#666"},children:g.viewportY}),m.jsx("input",{type:"number",value:i?.viewport?.y??0,onChange:b=>y({viewport:{...i.viewport,y:parseFloat(b.target.value)||0,x:i.viewport?.x??0,zoom:i.viewport?.zoom??1}}),style:{width:"100%"}})]}),m.jsxs("div",{style:{flex:1},children:[m.jsx("label",{style:{fontSize:"0.875rem",color:"#666"},children:g.viewportZoom}),m.jsx("input",{type:"number",step:"0.1",min:"0.1",max:"10",value:i?.viewport?.zoom??1,onChange:b=>y({viewport:{...i.viewport,zoom:parseFloat(b.target.value)||1,x:i.viewport?.x??0,y:i.viewport?.y??0}}),style:{width:"100%"}})]})]}),m.jsx("button",{onClick:v,className:"secondary-button",style:{marginTop:"8px",width:"100%"},type:"button",children:g.useCurrentViewport})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:"Default Edge Type"}),m.jsxs("select",{value:i?.defaultEdgeType||"default",onChange:b=>y({defaultEdgeType:b.target.value}),children:[m.jsx("option",{value:"default",children:"Default"}),m.jsx("option",{value:"straight",children:"Straight"}),m.jsx("option",{value:"step",children:"Step"}),m.jsx("option",{value:"smoothstep",children:"Smooth Step"}),m.jsx("option",{value:"simplebezier",children:"Simple Bezier"})]})]}),m.jsx("div",{className:"form-group",children:m.jsx(Lr,{label:"Default Edge Color",value:i?.defaultEdgeColor||"#94a3b8",onChange:b=>y({defaultEdgeColor:b})})}),m.jsx("div",{className:"form-group",children:m.jsx("button",{onClick:S,className:"secondary-button",style:{width:"100%"},type:"button",children:"Update All Edges to Default Settings"})})]})]})})},$T={topic:my,task:py,image:uy,text:gy},YT={floating:MT},Ny=B.memo(({defaultLanguage:n="en"})=>{const a=ie(k=>k.settings),i=ie(k=>k.nodes),s=ie(k=>k.edges),r=ie(k=>k.showGrid),c=ie(k=>k.selectedNodeIds),u=ie(k=>k.onNodesChange),h=ie(k=>k.onEdgesChange),g=ie(k=>k.onConnect),p=ie(k=>k.setSelectedNodeIds),x=ie(k=>k.setSelectedNodeId),y=ie(k=>k.setSelectedEdge),v=ie(k=>k.setDrawerOpen),S=ie(k=>k.setEdgeDrawerOpen),b=ie(k=>k.setSettingsDrawerOpen),E=ie(k=>k.setHelpOpen),_=ie(k=>k.setLastMousePosition),{setViewport:T,screenToFlowPosition:z}=Wa(),N=B.useRef(null),C=a?.language||n,D=Vt(C);B.useEffect(()=>{a?.viewport&&T({x:a.viewport.x,y:a.viewport.y,zoom:a.viewport.zoom})},[a?.viewport,T]);const{undo:R,redo:j,canUndo:K,canRedo:J}=Ey(k=>({undo:k.undo,redo:k.redo,canUndo:k.pastStates.length>0,canRedo:k.futureStates.length>0})),fe=B.useCallback((k,L)=>{x(L.id),v(!0),y(null),S(!1),b(!1)},[x,v,y,S,b]),U=B.useCallback((k,L)=>{y(L),S(!0),x(null),v(!1),b(!1)},[y,S,x,v,b]),F=B.useCallback(({nodes:k})=>{p(k.map(L=>L.id)),k.length===0&&(v(!1),x(null))},[p,v,x]),ae=B.useCallback(k=>{const L=z({x:k.clientX,y:k.clientY});_(L)},[z,_]),H=B.useCallback(()=>{v(!1),x(null),S(!1),y(null),b(!1)},[v,x,S,y,b]),I={animated:!1,style:{stroke:a?.defaultEdgeColor||"#94a3b8",strokeWidth:2},type:a?.defaultEdgeType||"default"};return m.jsx("div",{ref:N,className:"editor-canvas",style:{backgroundColor:a?.background?.color||"#ffffff"},onMouseMove:ae,children:m.jsxs(Zm,{nodes:i,edges:s,onEdgesChange:h,onNodeClick:fe,onEdgeClick:U,onNodesChange:u,onConnect:g,onSelectionChange:F,onPaneClick:H,nodeTypes:$T,selectionOnDrag:!1,minZoom:.2,edgeTypes:YT,proOptions:{hideAttribution:!0},defaultEdgeOptions:I,nodesDraggable:!0,elevateNodesOnSelect:!1,nodesConnectable:!0,selectNodesOnDrag:!1,colorMode:"light",children:[r&&m.jsx(uN,{}),m.jsxs(Fm,{children:[m.jsx(Ll,{title:D.undo,disabled:!K,onClick:()=>R(),children:m.jsx(n3,{})}),m.jsx(Ll,{title:D.redo,disabled:!J,onClick:()=>j(),children:m.jsx(FN,{})}),m.jsx(Ll,{title:D.help,onClick:()=>E(!0),children:m.jsx(l0,{})})]}),c.length>1&&m.jsx(zT,{}),m.jsx(HT,{defaultLanguage:n}),m.jsx(UT,{defaultLanguage:n}),m.jsx(VT,{defaultLanguage:n})]})})});Ny.displayName="EditorCanvas";function qT(){const[n,a]=B.useState(!1),[i,s]=B.useState(!1),r=ie(E=>E.shareDialogOpen),c=ie(E=>E.shareLink),u=ie(E=>E.settings),h=ie(E=>E.setShareDialogOpen),g=u?.language||"en",p=Vt(g),x=()=>h(!1);if(!r)return null;const y=c.replace(/(#json=.+)/,"/create$1"),v=c.replace(/(#json=.+)/,"/learn$1"),S=async()=>{try{await navigator.clipboard.writeText(y),a(!0),setTimeout(()=>a(!1),2e3)}catch(E){console.error("Failed to copy link:",E)}},b=async()=>{try{await navigator.clipboard.writeText(v),s(!0),setTimeout(()=>s(!1),2e3)}catch(E){console.error("Failed to copy link:",E)}};return m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"drawer-overlay",onClick:x}),m.jsxs("div",{className:"share-dialog",children:[m.jsxs("header",{className:"drawer-header",children:[m.jsx("h2",{className:"drawer-title",children:p.share}),m.jsx("button",{className:"close-button",onClick:x,"aria-label":p.close,children:m.jsx(da,{size:20})})]}),m.jsxs("div",{className:"drawer-content",children:[m.jsxs("div",{style:{marginBottom:24},children:[m.jsx("h3",{style:{fontSize:14,fontWeight:600,marginBottom:8},children:"Edit Link"}),m.jsx("p",{style:{fontSize:13,color:"#666",marginBottom:12},children:"Share this link to allow others to edit the map"}),m.jsx("div",{style:{display:"flex",gap:8,marginBottom:8},children:m.jsx("input",{type:"text",value:y,readOnly:!0,style:{flex:1,padding:"8px 12px",border:"1px solid #d1d5db",borderRadius:4,fontSize:14,fontFamily:"monospace"},onClick:E=>E.currentTarget.select()})}),m.jsx("button",{onClick:S,className:"drawer-button",style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:8},children:n?m.jsxs(m.Fragment,{children:[m.jsx(t0,{size:16}),p.linkCopied]}):m.jsxs(m.Fragment,{children:[m.jsx(i0,{size:16}),"Copy Edit Link"]})})]}),m.jsxs("div",{children:[m.jsx("h3",{style:{fontSize:14,fontWeight:600,marginBottom:8},children:"Learn Link"}),m.jsx("p",{style:{fontSize:13,color:"#666",marginBottom:12},children:"Share this link for others to learn from the map"}),m.jsx("div",{style:{display:"flex",gap:8,marginBottom:8},children:m.jsx("input",{type:"text",value:v,readOnly:!0,style:{flex:1,padding:"8px 12px",border:"1px solid #d1d5db",borderRadius:4,fontSize:14,fontFamily:"monospace"},onClick:E=>E.currentTarget.select()})}),m.jsx("button",{onClick:b,className:"drawer-button",style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:8},children:i?m.jsxs(m.Fragment,{children:[m.jsx(t0,{size:16}),p.linkCopied]}):m.jsxs(m.Fragment,{children:[m.jsx(i0,{size:16}),"Copy Learn Link"]})})]})]})]})]})}function XT({onClose:n,onDownloadCurrent:a,onReplace:i}){const s=ie(g=>g.loadExternalDialogOpen),c=ie(g=>g.settings)?.language||"en",u=Vt(c);if(!s)return null;const h=()=>{a(),setTimeout(()=>i(),100)};return m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"drawer-overlay",onClick:n}),m.jsxs("div",{className:"share-dialog",children:[m.jsxs("header",{className:"drawer-header",children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[m.jsx(t3,{size:20,color:"#f59e0b"}),m.jsx("h2",{className:"drawer-title",style:{margin:0},children:"Warning"})]}),m.jsx("button",{className:"close-button",onClick:n,"aria-label":u.close,children:m.jsx(da,{size:20})})]}),m.jsxs("div",{className:"drawer-content",children:[m.jsx("p",{style:{marginBottom:16},children:u.loadExternalWarning}),m.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[m.jsxs("button",{onClick:h,className:"drawer-button",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:8},children:[m.jsx(n0,{size:16}),u.downloadCurrentMap]}),m.jsx("button",{onClick:i,className:"drawer-button",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:8,backgroundColor:"#dc2626"},children:u.replaceWithExternal})]})]})]})]})}var ky=B.memo(({defaultLanguage:n="en",jsonStore:a="https://json.openpatch.org"})=>{const i=ie(S=>S.settings),s=ie(S=>S.helpOpen),r=ie(S=>S.pendingExternalId),[c]=_y(),u=ie(S=>S.setHelpOpen);ie(S=>S.setShareDialogOpen);const h=ie(S=>S.setLoadExternalDialogOpen),g=ie(S=>S.setPendingExternalId),{downloadRoadmap:p}=Rf(),x=i?.language||n,y=Vt(x);B.useEffect(()=>{const S=window.location.hash;if(S.startsWith("#json=")){const b=S.replace("#json=","");b&&b!==r&&(g(b),h(!0))}},[]);const v=[{action:y.shortcuts.undo,shortcut:"Ctrl+Z"},{action:y.shortcuts.redo,shortcut:"Ctrl+Y or Ctrl+Shift+Z"},{action:y.shortcuts.addTaskNode,shortcut:"Ctrl+1"},{action:y.shortcuts.addTopicNode,shortcut:"Ctrl+2"},{action:y.shortcuts.addImageNode,shortcut:"Ctrl+3"},{action:y.shortcuts.addTextNode,shortcut:"Ctrl+4"},{action:y.shortcuts.deleteNodeEdge,shortcut:"Delete"},{action:y.shortcuts.togglePreviewMode,shortcut:"Ctrl+P"},{action:y.shortcuts.toggleDebugMode,shortcut:"Ctrl+D"},{action:y.shortcuts.selectMultipleNodes,shortcut:"Ctrl+Click or Shift+Drag"},{action:y.shortcuts.selectAllNodes,shortcut:"Ctrl+A"},{action:y.shortcuts.showHelp,shortcut:"Ctrl+? or Help Button"},{action:y.shortcuts.save,shortcut:"Ctrl+S"},{action:y.shortcuts.zoomIn,shortcut:"Ctrl++"},{action:y.shortcuts.zoomOut,shortcut:"Ctrl+-"},{action:y.shortcuts.resetZoom,shortcut:"Ctrl+0"},{action:y.shortcuts.resetMap,shortcut:"Ctrl+Delete"},{action:y.shortcuts.fitView,shortcut:"Shift+!"},{action:y.shortcuts.zoomToSelection,shortcut:"Shift+@"},{action:y.shortcuts.toggleGrid,shortcut:"Ctrl+'"},{action:y.shortcuts.cut,shortcut:"Ctrl+X"},{action:y.shortcuts.copy,shortcut:"Ctrl+C"},{action:y.shortcuts.paste,shortcut:"Ctrl+V"}];return m.jsxs(m.Fragment,{children:[m.jsxs("dialog",{className:"help",open:s,onClose:()=>u(!1),children:[m.jsxs("header",{className:"help-header",children:[m.jsx("h2",{children:y.keyboardShortcuts}),m.jsx("button",{className:"close-button",onClick:()=>u(!1),"aria-label":y.close,children:m.jsx(da,{size:20})})]}),m.jsx("div",{className:"help-content",children:m.jsxs("table",{children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsx("th",{children:y.action}),m.jsx("th",{children:y.shortcut})]})}),m.jsx("tbody",{children:v.map(S=>m.jsxs("tr",{children:[m.jsx("td",{children:S.action}),m.jsx("td",{children:S.shortcut})]},S.action))})]})}),m.jsx("div",{className:"help-footer",children:m.jsx("button",{className:"primary-button",onClick:()=>u(!1),children:y.close})})]}),m.jsx(qT,{}),m.jsx(XT,{onClose:()=>{h(!1),g(null)},onDownloadCurrent:p,onReplace:()=>{r&&c(r)}})]})});ky.displayName="EditorDialogs";var GT={addTaskNode:{key:"1",ctrl:!0},addTopicNode:{key:"2",ctrl:!0},addImageNode:{key:"3",ctrl:!0},addTextNode:{key:"4",ctrl:!0},save:{key:"s",ctrl:!0},undo:{key:"z",ctrl:!0},redo:{key:"y",ctrl:!0},help:{key:"?",ctrl:!0},togglePreview:{key:"p",ctrl:!0},toggleDebug:{key:"d",ctrl:!0},zoomIn:{key:"+",ctrl:!0},zoomOut:{key:"-",ctrl:!0},resetZoom:{key:"0",ctrl:!0},toggleGrid:{key:"'",ctrl:!0},resetMap:{key:"Delete",ctrl:!0},cut:{key:"x",ctrl:!0},copy:{key:"c",ctrl:!0},paste:{key:"v",ctrl:!0},selectAll:{key:"a",ctrl:!0},fitView:{key:"!",shift:!0},zoomToSelection:{key:"@",shift:!0},deleteSelected:{key:"Delete"}},xt=(n,a)=>{if(!a)return!1;const i=n.key.toLowerCase()===a.key.toLowerCase(),s=a.ctrl?n.ctrlKey||n.metaKey:!(n.ctrlKey||n.metaKey),r=a.shift?n.shiftKey:!n.shiftKey,c=a.alt?n.altKey:!n.altKey;return i&&s&&r&&c},ZT=({jsonStore:n="https://json.openpatch.org",keyBindings:a={}})=>{const i={...GT,...a},{zoomIn:s,zoomOut:r,setCenter:c,fitView:u,screenToFlowPosition:h}=Wa(),g=ie(le=>le.helpOpen),p=ie(le=>le.selectedNodeIds),x=ie(le=>le.selectedEdge),y=ie(le=>le.nodes),v=ie(le=>le.lastMousePosition),S=ie(le=>le.settings),b=ie(le=>le.setHelpOpen),E=ie(le=>le.addNode),_=ie(le=>le.getRoadmapData),T=ie(le=>le.setPreviewMode),z=ie(le=>le.setDebugMode),N=ie(le=>le.setClipboard),C=ie(le=>le.clipboard),D=ie(le=>le.setNodes),R=ie(le=>le.setEdges),j=ie(le=>le.setSelectedNodeIds),K=ie(le=>le.showGrid),J=ie(le=>le.setShowGrid),fe=ie(le=>le.deleteNode),U=ie(le=>le.deleteEdge),F=ie(le=>le.setSelectedEdge),ae=ie(le=>le.setEdgeDrawerOpen),H=ie(le=>le.drawerOpen),I=ie(le=>le.edgeDrawerOpen),k=ie(le=>le.settingsDrawerOpen),L=S?.language||"en",$=Vt(L),{undo:Z,redo:Y}=Ey(le=>({undo:le.undo,redo:le.redo})),A=le=>{const de=v||h({x:window.innerWidth/2,y:window.innerHeight/2}),Je={id:`node-${Date.now()}`,type:le,position:de,data:{label:le==="task"?$.newTask:le==="topic"?$.newTopic:le,state:"unlocked"}};E(Je)},O=()=>{if(x){U(x.id),F(null),ae(!1);return}p.length>0&&(p.forEach(le=>{fe(le)}),j([]))},G=()=>{const le=_(),de="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(le,null,2)),Je=document.createElement("a");Je.setAttribute("href",de),Je.setAttribute("download","learningmap.json"),document.body.appendChild(Je),Je.click(),Je.remove()},P=()=>{const le=ie.getState().previewMode;T(!le)},se=()=>{const le=ie.getState().debugMode;z(!le)},ge=()=>{confirm($.resetMapWarning)&&(D([]),R([]))},he=()=>{const le=y.filter(de=>p.includes(de.id));le.length>0&&(N({nodes:le,edges:[]}),p.forEach(de=>{fe(de)}),j([]))},ue=()=>{const le=y.filter(de=>p.includes(de.id));le.length>0&&N({nodes:le,edges:[]})},me=()=>{if(C&&C.nodes.length>0){const le=C.nodes.map(de=>({...de,id:`node-${Date.now()}-${Math.random()}`,position:{x:de.position.x+50,y:de.position.y+50}}));D([...y,...le]),j(le.map(de=>de.id))}},Ne=()=>{j(y.map(le=>le.id))},ke=()=>s(),Se=()=>r(),_e=()=>c(0,0,{zoom:1}),we=()=>u(),Me=()=>{if(p.length>0){const le=y.filter(de=>p.includes(de.id));le.length>0&&u({nodes:le,duration:300})}},Re=()=>J(!K);return B.useEffect(()=>{const le=de=>{H||I||k||(xt(de,i.addTaskNode)?(de.preventDefault(),A("task")):xt(de,i.addTopicNode)?(de.preventDefault(),A("topic")):xt(de,i.addImageNode)?(de.preventDefault(),A("image")):xt(de,i.addTextNode)?(de.preventDefault(),A("text")):xt(de,i.save)?(de.preventDefault(),G()):xt(de,i.undo)?(de.preventDefault(),Z()):xt(de,i.redo)?(de.preventDefault(),Y()):xt(de,i.help)?(de.preventDefault(),b(!g)):xt(de,i.togglePreview)?(de.preventDefault(),P()):xt(de,i.toggleDebug)?(de.preventDefault(),se()):xt(de,i.zoomIn)?(de.preventDefault(),ke()):xt(de,i.zoomOut)?(de.preventDefault(),Se()):xt(de,i.resetZoom)?(de.preventDefault(),_e()):xt(de,i.toggleGrid)?(de.preventDefault(),Re()):xt(de,i.resetMap)?(de.preventDefault(),ge()):xt(de,i.cut)?(de.preventDefault(),he()):xt(de,i.copy)?(de.preventDefault(),ue()):xt(de,i.paste)?(de.preventDefault(),me()):xt(de,i.selectAll)?(de.preventDefault(),Ne()):xt(de,i.fitView)?(de.preventDefault(),we()):xt(de,i.zoomToSelection)?(de.preventDefault(),Me()):xt(de,i.deleteSelected)&&(de.preventDefault(),O()))};return window.addEventListener("keydown",le),()=>{window.removeEventListener("keydown",le)}},[A,O,G,Z,Y,g,b,P,se,ke,Se,_e,we,Me,Re,ge,he,ue,me,Ne,H,I,k,i]),null};function IT({roadmapData:n,language:a="en",jsonStore:i="https://json.openpatch.org",disableSharing:s=!1,disableFileOperations:r=!1,disablePersist:c=!1,keyBindings:u}){const h=ie(_=>_.nodes),g=ie(_=>_.edges),p=ie(_=>_.settings),x=ie(_=>_.previewMode),y=ie(_=>_.getRoadmapData),v=ie(_=>_.setJsonStore),S=ie(_=>_.setDefaultLanguage),b=ie(_=>_.loadRoadmapData),E=p?.language||a;return B.useEffect(()=>{ET(!c)},[c]),B.useEffect(()=>{v(i),S(a)},[i,a,v,S]),B.useEffect(()=>{if(n)if(typeof n=="string")try{const _=JSON.parse(n);b(_)}catch(_){console.error("Failed to parse roadmapData JSON string",_)}else b(n)},[n,b]),m.jsxs(m.Fragment,{children:[m.jsx(ZT,{jsonStore:i,keyBindings:u}),m.jsx(NT,{defaultLanguage:a,disableSharing:s,disableFileOperations:r}),x&&m.jsx(Sy,{roadmapData:y(),language:E}),!x&&m.jsxs(m.Fragment,{children:[h.length===0&&g.length===0&&m.jsx(TT,{defaultLanguage:a}),m.jsx(Ny,{defaultLanguage:a}),m.jsx(ky,{defaultLanguage:a,jsonStore:i})]})]})}var QT=n=>m.jsx("div",{className:"hyperbook-learningmap-container",children:m.jsx(Zu,{children:m.jsx(IT,{...n})})});const KT=ep(wT,{props:{roadmapData:"string",language:"string",onChange:"function",initialState:"json"},events:{change:!0}});customElements.define("hyperbook-learningmap",KT);const FT=ep(QT,{props:{roadmapData:"string",language:"string",jsonStore:"string",disableSharing:"boolean",disableFileOperations:"boolean",keyBindings:"json",onChange:"function"},events:{change:!0}});customElements.define("hyperbook-learningmap-editor",FT)}));
|
|
309
|
+
`+this.renderer.text(h);i?s+=this.renderer.paragraph({type:"paragraph",raw:g,text:g,tokens:[{type:"text",raw:g,text:g,escaped:!0}]}):s+=g;continue}default:{let h='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return s}parseInline(a,i=this.renderer){let s="";for(let r=0;r<a.length;r++){let c=a[r];if(this.options.extensions?.renderers?.[c.type]){let h=this.options.extensions.renderers[c.type].call({parser:this},c);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){s+=h||"";continue}}let u=c;switch(u.type){case"escape":{s+=i.text(u);break}case"html":{s+=i.html(u);break}case"link":{s+=i.link(u);break}case"image":{s+=i.image(u);break}case"strong":{s+=i.strong(u);break}case"em":{s+=i.em(u);break}case"codespan":{s+=i.codespan(u);break}case"br":{s+=i.br(u);break}case"del":{s+=i.del(u);break}case"text":{s+=i.text(u);break}default:{let h='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return s}},Bo=class{options;block;constructor(n){this.options=n||Hl}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(n){return n}postprocess(n){return n}processAllTokens(n){return n}emStrongMask(n){return n}provideLexer(){return this.block?Fn.lex:Fn.lexInline}provideParser(){return this.block?Jn.parse:Jn.parseInline}},U3=class{defaults=Ju();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Jn;Renderer=Ar;TextRenderer=sf;Lexer=Fn;Tokenizer=_r;Hooks=Bo;constructor(...n){this.use(...n)}walkTokens(n,a){let i=[];for(let s of n)switch(i=i.concat(a.call(this,s)),s.type){case"table":{let r=s;for(let c of r.header)i=i.concat(this.walkTokens(c.tokens,a));for(let c of r.rows)for(let u of c)i=i.concat(this.walkTokens(u.tokens,a));break}case"list":{let r=s;i=i.concat(this.walkTokens(r.items,a));break}default:{let r=s;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(c=>{let u=r[c].flat(1/0);i=i.concat(this.walkTokens(u,a))}):r.tokens&&(i=i.concat(this.walkTokens(r.tokens,a)))}}return i}use(...n){let a=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let c=a.renderers[r.name];c?a.renderers[r.name]=function(...u){let h=r.renderer.apply(this,u);return h===!1&&(h=c.apply(this,u)),h}:a.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let c=a[r.level];c?c.unshift(r.tokenizer):a[r.level]=[r.tokenizer],r.start&&(r.level==="block"?a.startBlock?a.startBlock.push(r.start):a.startBlock=[r.start]:r.level==="inline"&&(a.startInline?a.startInline.push(r.start):a.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(a.childTokens[r.name]=r.childTokens)}),s.extensions=a),i.renderer){let r=this.defaults.renderer||new Ar(this.defaults);for(let c in i.renderer){if(!(c in r))throw new Error(`renderer '${c}' does not exist`);if(["options","parser"].includes(c))continue;let u=c,h=i.renderer[u],g=r[u];r[u]=(...p)=>{let x=h.apply(r,p);return x===!1&&(x=g.apply(r,p)),x||""}}s.renderer=r}if(i.tokenizer){let r=this.defaults.tokenizer||new _r(this.defaults);for(let c in i.tokenizer){if(!(c in r))throw new Error(`tokenizer '${c}' does not exist`);if(["options","rules","lexer"].includes(c))continue;let u=c,h=i.tokenizer[u],g=r[u];r[u]=(...p)=>{let x=h.apply(r,p);return x===!1&&(x=g.apply(r,p)),x}}s.tokenizer=r}if(i.hooks){let r=this.defaults.hooks||new Bo;for(let c in i.hooks){if(!(c in r))throw new Error(`hook '${c}' does not exist`);if(["options","block"].includes(c))continue;let u=c,h=i.hooks[u],g=r[u];Bo.passThroughHooks.has(c)?r[u]=p=>{if(this.defaults.async&&Bo.passThroughHooksRespectAsync.has(c))return(async()=>{let y=await h.call(r,p);return g.call(r,y)})();let x=h.call(r,p);return g.call(r,x)}:r[u]=(...p)=>{if(this.defaults.async)return(async()=>{let y=await h.apply(r,p);return y===!1&&(y=await g.apply(r,p)),y})();let x=h.apply(r,p);return x===!1&&(x=g.apply(r,p)),x}}s.hooks=r}if(i.walkTokens){let r=this.defaults.walkTokens,c=i.walkTokens;s.walkTokens=function(u){let h=[];return h.push(c.call(this,u)),r&&(h=h.concat(r.call(this,u))),h}}this.defaults={...this.defaults,...s}}),this}setOptions(n){return this.defaults={...this.defaults,...n},this}lexer(n,a){return Fn.lex(n,a??this.defaults)}parser(n,a){return Jn.parse(n,a??this.defaults)}parseMarkdown(n){return(a,i)=>{let s={...i},r={...this.defaults,...s},c=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&s.async===!1)return c(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof a>"u"||a===null)return c(new Error("marked(): input parameter is undefined or null"));if(typeof a!="string")return c(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(a)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=n),r.async)return(async()=>{let u=r.hooks?await r.hooks.preprocess(a):a,h=await(r.hooks?await r.hooks.provideLexer():n?Fn.lex:Fn.lexInline)(u,r),g=r.hooks?await r.hooks.processAllTokens(h):h;r.walkTokens&&await Promise.all(this.walkTokens(g,r.walkTokens));let p=await(r.hooks?await r.hooks.provideParser():n?Jn.parse:Jn.parseInline)(g,r);return r.hooks?await r.hooks.postprocess(p):p})().catch(c);try{r.hooks&&(a=r.hooks.preprocess(a));let u=(r.hooks?r.hooks.provideLexer():n?Fn.lex:Fn.lexInline)(a,r);r.hooks&&(u=r.hooks.processAllTokens(u)),r.walkTokens&&this.walkTokens(u,r.walkTokens);let h=(r.hooks?r.hooks.provideParser():n?Jn.parse:Jn.parseInline)(u,r);return r.hooks&&(h=r.hooks.postprocess(h)),h}catch(u){return c(u)}}}onError(n,a){return i=>{if(i.message+=`
|
|
310
|
+
Please report this to https://github.com/markedjs/marked.`,n){let s="<p>An error occurred:</p><pre>"+ha(i.message+"",!0)+"</pre>";return a?Promise.resolve(s):s}if(a)return Promise.reject(i);throw i}}},Bl=new U3;function Fe(n,a){return Bl.parse(n,a)}Fe.options=Fe.setOptions=function(n){return Bl.setOptions(n),Fe.defaults=Bl.defaults,r0(Fe.defaults),Fe},Fe.getDefaults=Ju,Fe.defaults=Hl,Fe.use=function(...n){return Bl.use(...n),Fe.defaults=Bl.defaults,r0(Fe.defaults),Fe},Fe.walkTokens=function(n,a){return Bl.walkTokens(n,a)},Fe.parseInline=Bl.parseInline,Fe.Parser=Jn,Fe.parser=Jn.parse,Fe.Renderer=Ar,Fe.TextRenderer=sf,Fe.Lexer=Fn,Fe.lexer=Fn.lex,Fe.Tokenizer=_r,Fe.Hooks=Bo,Fe.parse=Fe,Fe.options,Fe.setOptions,Fe.use,Fe.walkTokens,Fe.parseInline,Jn.parse,Fn.lex;/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */const{entries:A0,setPrototypeOf:N0,isFrozen:V3,getPrototypeOf:$3,getOwnPropertyDescriptor:Y3}=Object;let{freeze:en,seal:zn,create:rf}=Object,{apply:cf,construct:uf}=typeof Reflect<"u"&&Reflect;en||(en=function(a){return a}),zn||(zn=function(a){return a}),cf||(cf=function(a,i){for(var s=arguments.length,r=new Array(s>2?s-2:0),c=2;c<s;c++)r[c-2]=arguments[c];return a.apply(i,r)}),uf||(uf=function(a){for(var i=arguments.length,s=new Array(i>1?i-1:0),r=1;r<i;r++)s[r-1]=arguments[r];return new a(...s)});const Nr=nn(Array.prototype.forEach),q3=nn(Array.prototype.lastIndexOf),k0=nn(Array.prototype.pop),Uo=nn(Array.prototype.push),X3=nn(Array.prototype.splice),kr=nn(String.prototype.toLowerCase),ff=nn(String.prototype.toString),df=nn(String.prototype.match),Vo=nn(String.prototype.replace),G3=nn(String.prototype.indexOf),Z3=nn(String.prototype.trim),Pn=nn(Object.prototype.hasOwnProperty),tn=nn(RegExp.prototype.test),$o=I3(TypeError);function nn(n){return function(a){a instanceof RegExp&&(a.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),r=1;r<i;r++)s[r-1]=arguments[r];return cf(n,a,s)}}function I3(n){return function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return uf(n,i)}}function Le(n,a){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:kr;N0&&N0(n,null);let s=a.length;for(;s--;){let r=a[s];if(typeof r=="string"){const c=i(r);c!==r&&(V3(a)||(a[s]=c),r=c)}n[r]=!0}return n}function Q3(n){for(let a=0;a<n.length;a++)Pn(n,a)||(n[a]=null);return n}function Aa(n){const a=rf(null);for(const[i,s]of A0(n))Pn(n,i)&&(Array.isArray(s)?a[i]=Q3(s):s&&typeof s=="object"&&s.constructor===Object?a[i]=Aa(s):a[i]=s);return a}function Yo(n,a){for(;n!==null;){const s=Y3(n,a);if(s){if(s.get)return nn(s.get);if(typeof s.value=="function")return nn(s.value)}n=$3(n)}function i(){return null}return i}const T0=en(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),hf=en(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),pf=en(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),K3=en(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),gf=en(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),F3=en(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),C0=en(["#text"]),M0=en(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),mf=en(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),z0=en(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Tr=en(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),J3=zn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),P3=zn(/<%[\w\W]*|[\w\W]*%>/gm),W3=zn(/\$\{[\w\W]*/gm),ek=zn(/^data-[\-\w.\u00B7-\uFFFF]+$/),tk=zn(/^aria-[\-\w]+$/),D0=zn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),nk=zn(/^(?:\w+script|data):/i),ak=zn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),O0=zn(/^html$/i),lk=zn(/^[a-z][.\w]*(-[.\w]+)+$/i);var R0=Object.freeze({__proto__:null,ARIA_ATTR:tk,ATTR_WHITESPACE:ak,CUSTOM_ELEMENT:lk,DATA_ATTR:ek,DOCTYPE_NAME:O0,ERB_EXPR:P3,IS_ALLOWED_URI:D0,IS_SCRIPT_OR_DATA:nk,MUSTACHE_EXPR:J3,TMPLIT_EXPR:W3});const qo={element:1,text:3,progressingInstruction:7,comment:8,document:9},ik=function(){return typeof window>"u"?null:window},ok=function(a,i){if(typeof a!="object"||typeof a.createPolicy!="function")return null;let s=null;const r="data-tt-policy-suffix";i&&i.hasAttribute(r)&&(s=i.getAttribute(r));const c="dompurify"+(s?"#"+s:"");try{return a.createPolicy(c,{createHTML(u){return u},createScriptURL(u){return u}})}catch{return console.warn("TrustedTypes policy "+c+" could not be created."),null}},j0=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function L0(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ik();const a=ve=>L0(ve);if(a.version="3.3.0",a.removed=[],!n||!n.document||n.document.nodeType!==qo.document||!n.Element)return a.isSupported=!1,a;let{document:i}=n;const s=i,r=s.currentScript,{DocumentFragment:c,HTMLTemplateElement:u,Node:h,Element:g,NodeFilter:p,NamedNodeMap:x=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:y,DOMParser:v,trustedTypes:S}=n,b=g.prototype,E=Yo(b,"cloneNode"),_=Yo(b,"remove"),T=Yo(b,"nextSibling"),z=Yo(b,"childNodes"),N=Yo(b,"parentNode");if(typeof u=="function"){const ve=i.createElement("template");ve.content&&ve.content.ownerDocument&&(i=ve.content.ownerDocument)}let C,D="";const{implementation:R,createNodeIterator:j,createDocumentFragment:K,getElementsByTagName:J}=i,{importNode:fe}=s;let U=j0();a.isSupported=typeof A0=="function"&&typeof N=="function"&&R&&R.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:F,ERB_EXPR:ae,TMPLIT_EXPR:H,DATA_ATTR:I,ARIA_ATTR:k,IS_SCRIPT_OR_DATA:L,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:Z}=R0;let{IS_ALLOWED_URI:Y}=R0,A=null;const O=Le({},[...T0,...hf,...pf,...gf,...C0]);let G=null;const P=Le({},[...M0,...mf,...z0,...Tr]);let se=Object.seal(rf(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ge=null,he=null;const ue=Object.seal(rf(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let me=!0,Ne=!0,ke=!1,Se=!0,_e=!1,we=!0,Me=!1,Re=!1,le=!1,de=!1,Je=!1,et=!1,on=!0,wn=!1;const _t="user-content-";let gt=!0,sn=!1,Bt={},$t=null;const Rt=Le({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Na=null;const ea=Le({},["audio","video","img","source","image","track"]);let ta=null;const pa=Le({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),rn="http://www.w3.org/1998/Math/MathML",vt="http://www.w3.org/2000/svg",mt="http://www.w3.org/1999/xhtml";let dt=mt,ka=!1,ga=null;const je=Le({},[rn,vt,mt],ff);let tt=Le({},["mi","mo","mn","ms","mtext"]),yt=Le({},["annotation-xml"]);const jt=Le({},["title","style","font","a","script"]);let Ye=null;const En=["application/xhtml+xml","text/html"],na="text/html";let ht=null,Ft=null;const Ta=i.createElement("form"),Dn=function(q){return q instanceof RegExp||q instanceof Function},ma=function(){let q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ft&&Ft===q)){if((!q||typeof q!="object")&&(q={}),q=Aa(q),Ye=En.indexOf(q.PARSER_MEDIA_TYPE)===-1?na:q.PARSER_MEDIA_TYPE,ht=Ye==="application/xhtml+xml"?ff:kr,A=Pn(q,"ALLOWED_TAGS")?Le({},q.ALLOWED_TAGS,ht):O,G=Pn(q,"ALLOWED_ATTR")?Le({},q.ALLOWED_ATTR,ht):P,ga=Pn(q,"ALLOWED_NAMESPACES")?Le({},q.ALLOWED_NAMESPACES,ff):je,ta=Pn(q,"ADD_URI_SAFE_ATTR")?Le(Aa(pa),q.ADD_URI_SAFE_ATTR,ht):pa,Na=Pn(q,"ADD_DATA_URI_TAGS")?Le(Aa(ea),q.ADD_DATA_URI_TAGS,ht):ea,$t=Pn(q,"FORBID_CONTENTS")?Le({},q.FORBID_CONTENTS,ht):Rt,ge=Pn(q,"FORBID_TAGS")?Le({},q.FORBID_TAGS,ht):Aa({}),he=Pn(q,"FORBID_ATTR")?Le({},q.FORBID_ATTR,ht):Aa({}),Bt=Pn(q,"USE_PROFILES")?q.USE_PROFILES:!1,me=q.ALLOW_ARIA_ATTR!==!1,Ne=q.ALLOW_DATA_ATTR!==!1,ke=q.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=q.ALLOW_SELF_CLOSE_IN_ATTR!==!1,_e=q.SAFE_FOR_TEMPLATES||!1,we=q.SAFE_FOR_XML!==!1,Me=q.WHOLE_DOCUMENT||!1,de=q.RETURN_DOM||!1,Je=q.RETURN_DOM_FRAGMENT||!1,et=q.RETURN_TRUSTED_TYPE||!1,le=q.FORCE_BODY||!1,on=q.SANITIZE_DOM!==!1,wn=q.SANITIZE_NAMED_PROPS||!1,gt=q.KEEP_CONTENT!==!1,sn=q.IN_PLACE||!1,Y=q.ALLOWED_URI_REGEXP||D0,dt=q.NAMESPACE||mt,tt=q.MATHML_TEXT_INTEGRATION_POINTS||tt,yt=q.HTML_INTEGRATION_POINTS||yt,se=q.CUSTOM_ELEMENT_HANDLING||{},q.CUSTOM_ELEMENT_HANDLING&&Dn(q.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(se.tagNameCheck=q.CUSTOM_ELEMENT_HANDLING.tagNameCheck),q.CUSTOM_ELEMENT_HANDLING&&Dn(q.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(se.attributeNameCheck=q.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),q.CUSTOM_ELEMENT_HANDLING&&typeof q.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(se.allowCustomizedBuiltInElements=q.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),_e&&(Ne=!1),Je&&(de=!0),Bt&&(A=Le({},C0),G=[],Bt.html===!0&&(Le(A,T0),Le(G,M0)),Bt.svg===!0&&(Le(A,hf),Le(G,mf),Le(G,Tr)),Bt.svgFilters===!0&&(Le(A,pf),Le(G,mf),Le(G,Tr)),Bt.mathMl===!0&&(Le(A,gf),Le(G,z0),Le(G,Tr))),q.ADD_TAGS&&(typeof q.ADD_TAGS=="function"?ue.tagCheck=q.ADD_TAGS:(A===O&&(A=Aa(A)),Le(A,q.ADD_TAGS,ht))),q.ADD_ATTR&&(typeof q.ADD_ATTR=="function"?ue.attributeCheck=q.ADD_ATTR:(G===P&&(G=Aa(G)),Le(G,q.ADD_ATTR,ht))),q.ADD_URI_SAFE_ATTR&&Le(ta,q.ADD_URI_SAFE_ATTR,ht),q.FORBID_CONTENTS&&($t===Rt&&($t=Aa($t)),Le($t,q.FORBID_CONTENTS,ht)),gt&&(A["#text"]=!0),Me&&Le(A,["html","head","body"]),A.table&&(Le(A,["tbody"]),delete ge.tbody),q.TRUSTED_TYPES_POLICY){if(typeof q.TRUSTED_TYPES_POLICY.createHTML!="function")throw $o('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof q.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $o('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=q.TRUSTED_TYPES_POLICY,D=C.createHTML("")}else C===void 0&&(C=ok(S,r)),C!==null&&typeof D=="string"&&(D=C.createHTML(""));en&&en(q),Ft=q}},Ca=Le({},[...hf,...pf,...K3]),Ma=Le({},[...gf,...F3]),On=function(q){let pe=N(q);(!pe||!pe.tagName)&&(pe={namespaceURI:dt,tagName:"template"});const ye=kr(q.tagName),Xe=kr(pe.tagName);return ga[q.namespaceURI]?q.namespaceURI===vt?pe.namespaceURI===mt?ye==="svg":pe.namespaceURI===rn?ye==="svg"&&(Xe==="annotation-xml"||tt[Xe]):!!Ca[ye]:q.namespaceURI===rn?pe.namespaceURI===mt?ye==="math":pe.namespaceURI===vt?ye==="math"&&yt[Xe]:!!Ma[ye]:q.namespaceURI===mt?pe.namespaceURI===vt&&!yt[Xe]||pe.namespaceURI===rn&&!tt[Xe]?!1:!Ma[ye]&&(jt[ye]||!Ca[ye]):!!(Ye==="application/xhtml+xml"&&ga[q.namespaceURI]):!1},Ct=function(q){Uo(a.removed,{element:q});try{N(q).removeChild(q)}catch{_(q)}},Yt=function(q,pe){try{Uo(a.removed,{attribute:pe.getAttributeNode(q),from:pe})}catch{Uo(a.removed,{attribute:null,from:pe})}if(pe.removeAttribute(q),q==="is")if(de||Je)try{Ct(pe)}catch{}else try{pe.setAttribute(q,"")}catch{}},Rn=function(q){let pe=null,ye=null;if(le)q="<remove></remove>"+q;else{const De=df(q,/^[\r\n\t ]+/);ye=De&&De[0]}Ye==="application/xhtml+xml"&&dt===mt&&(q='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+q+"</body></html>");const Xe=C?C.createHTML(q):q;if(dt===mt)try{pe=new v().parseFromString(Xe,Ye)}catch{}if(!pe||!pe.documentElement){pe=R.createDocument(dt,"template",null);try{pe.documentElement.innerHTML=ka?D:Xe}catch{}}const st=pe.body||pe.documentElement;return q&&ye&&st.insertBefore(i.createTextNode(ye),st.childNodes[0]||null),dt===mt?J.call(pe,Me?"html":"body")[0]:Me?pe.documentElement:st},Vl=function(q){return j.call(q.ownerDocument||q,q,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},cn=function(q){return q instanceof y&&(typeof q.nodeName!="string"||typeof q.textContent!="string"||typeof q.removeChild!="function"||!(q.attributes instanceof x)||typeof q.removeAttribute!="function"||typeof q.setAttribute!="function"||typeof q.namespaceURI!="string"||typeof q.insertBefore!="function"||typeof q.hasChildNodes!="function")},bt=function(q){return typeof h=="function"&&q instanceof h};function ot(ve,q,pe){Nr(ve,ye=>{ye.call(a,q,pe,Ft)})}const jn=function(q){let pe=null;if(ot(U.beforeSanitizeElements,q,null),cn(q))return Ct(q),!0;const ye=ht(q.nodeName);if(ot(U.uponSanitizeElement,q,{tagName:ye,allowedTags:A}),we&&q.hasChildNodes()&&!bt(q.firstElementChild)&&tn(/<[/\w!]/g,q.innerHTML)&&tn(/<[/\w!]/g,q.textContent)||q.nodeType===qo.progressingInstruction||we&&q.nodeType===qo.comment&&tn(/<[/\w]/g,q.data))return Ct(q),!0;if(!(ue.tagCheck instanceof Function&&ue.tagCheck(ye))&&(!A[ye]||ge[ye])){if(!ge[ye]&&$l(ye)&&(se.tagNameCheck instanceof RegExp&&tn(se.tagNameCheck,ye)||se.tagNameCheck instanceof Function&&se.tagNameCheck(ye)))return!1;if(gt&&!$t[ye]){const Xe=N(q)||q.parentNode,st=z(q)||q.childNodes;if(st&&Xe){const De=st.length;for(let Lt=De-1;Lt>=0;--Lt){const un=E(st[Lt],!0);un.__removalCount=(q.__removalCount||0)+1,Xe.insertBefore(un,T(q))}}}return Ct(q),!0}return q instanceof g&&!On(q)||(ye==="noscript"||ye==="noembed"||ye==="noframes")&&tn(/<\/no(script|embed|frames)/i,q.innerHTML)?(Ct(q),!0):(_e&&q.nodeType===qo.text&&(pe=q.textContent,Nr([F,ae,H],Xe=>{pe=Vo(pe,Xe," ")}),q.textContent!==pe&&(Uo(a.removed,{element:q.cloneNode()}),q.textContent=pe)),ot(U.afterSanitizeElements,q,null),!1)},za=function(q,pe,ye){if(on&&(pe==="id"||pe==="name")&&(ye in i||ye in Ta))return!1;if(!(Ne&&!he[pe]&&tn(I,pe))){if(!(me&&tn(k,pe))){if(!(ue.attributeCheck instanceof Function&&ue.attributeCheck(pe,q))){if(!G[pe]||he[pe]){if(!($l(q)&&(se.tagNameCheck instanceof RegExp&&tn(se.tagNameCheck,q)||se.tagNameCheck instanceof Function&&se.tagNameCheck(q))&&(se.attributeNameCheck instanceof RegExp&&tn(se.attributeNameCheck,pe)||se.attributeNameCheck instanceof Function&&se.attributeNameCheck(pe,q))||pe==="is"&&se.allowCustomizedBuiltInElements&&(se.tagNameCheck instanceof RegExp&&tn(se.tagNameCheck,ye)||se.tagNameCheck instanceof Function&&se.tagNameCheck(ye))))return!1}else if(!ta[pe]){if(!tn(Y,Vo(ye,$,""))){if(!((pe==="src"||pe==="xlink:href"||pe==="href")&&q!=="script"&&G3(ye,"data:")===0&&Na[q])){if(!(ke&&!tn(L,Vo(ye,$,"")))){if(ye)return!1}}}}}}}return!0},$l=function(q){return q!=="annotation-xml"&&df(q,Z)},bi=function(q){ot(U.beforeSanitizeAttributes,q,null);const{attributes:pe}=q;if(!pe||cn(q))return;const ye={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:G,forceKeepAttr:void 0};let Xe=pe.length;for(;Xe--;){const st=pe[Xe],{name:De,namespaceURI:Lt,value:un}=st,Jt=ht(De),Ln=un;let At=De==="value"?Ln:Z3(Ln);if(ye.attrName=Jt,ye.attrValue=At,ye.keepAttr=!0,ye.forceKeepAttr=void 0,ot(U.uponSanitizeAttribute,q,ye),At=ye.attrValue,wn&&(Jt==="id"||Jt==="name")&&(Yt(De,q),At=_t+At),we&&tn(/((--!?|])>)|<\/(style|title|textarea)/i,At)){Yt(De,q);continue}if(Jt==="attributename"&&df(At,"href")){Yt(De,q);continue}if(ye.forceKeepAttr)continue;if(!ye.keepAttr){Yt(De,q);continue}if(!Se&&tn(/\/>/i,At)){Yt(De,q);continue}_e&&Nr([F,ae,H],Yl=>{At=Vo(At,Yl," ")});const al=ht(q.nodeName);if(!za(al,Jt,At)){Yt(De,q);continue}if(C&&typeof S=="object"&&typeof S.getAttributeType=="function"&&!Lt)switch(S.getAttributeType(al,Jt)){case"TrustedHTML":{At=C.createHTML(At);break}case"TrustedScriptURL":{At=C.createScriptURL(At);break}}if(At!==Ln)try{Lt?q.setAttributeNS(Lt,De,At):q.setAttribute(De,At),cn(q)?Ct(q):k0(a.removed)}catch{Yt(De,q)}}ot(U.afterSanitizeAttributes,q,null)},Si=function ve(q){let pe=null;const ye=Vl(q);for(ot(U.beforeSanitizeShadowDOM,q,null);pe=ye.nextNode();)ot(U.uponSanitizeShadowNode,pe,null),jn(pe),bi(pe),pe.content instanceof c&&ve(pe.content);ot(U.afterSanitizeShadowDOM,q,null)};return a.sanitize=function(ve){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},pe=null,ye=null,Xe=null,st=null;if(ka=!ve,ka&&(ve="<!-->"),typeof ve!="string"&&!bt(ve))if(typeof ve.toString=="function"){if(ve=ve.toString(),typeof ve!="string")throw $o("dirty is not a string, aborting")}else throw $o("toString is not a function");if(!a.isSupported)return ve;if(Re||ma(q),a.removed=[],typeof ve=="string"&&(sn=!1),sn){if(ve.nodeName){const un=ht(ve.nodeName);if(!A[un]||ge[un])throw $o("root node is forbidden and cannot be sanitized in-place")}}else if(ve instanceof h)pe=Rn("<!---->"),ye=pe.ownerDocument.importNode(ve,!0),ye.nodeType===qo.element&&ye.nodeName==="BODY"||ye.nodeName==="HTML"?pe=ye:pe.appendChild(ye);else{if(!de&&!_e&&!Me&&ve.indexOf("<")===-1)return C&&et?C.createHTML(ve):ve;if(pe=Rn(ve),!pe)return de?null:et?D:""}pe&&le&&Ct(pe.firstChild);const De=Vl(sn?ve:pe);for(;Xe=De.nextNode();)jn(Xe),bi(Xe),Xe.content instanceof c&&Si(Xe.content);if(sn)return ve;if(de){if(Je)for(st=K.call(pe.ownerDocument);pe.firstChild;)st.appendChild(pe.firstChild);else st=pe;return(G.shadowroot||G.shadowrootmode)&&(st=fe.call(s,st,!0)),st}let Lt=Me?pe.outerHTML:pe.innerHTML;return Me&&A["!doctype"]&&pe.ownerDocument&&pe.ownerDocument.doctype&&pe.ownerDocument.doctype.name&&tn(O0,pe.ownerDocument.doctype.name)&&(Lt="<!DOCTYPE "+pe.ownerDocument.doctype.name+`>
|
|
311
|
+
`+Lt),_e&&Nr([F,ae,H],un=>{Lt=Vo(Lt,un," ")}),C&&et?C.createHTML(Lt):Lt},a.setConfig=function(){let ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ma(ve),Re=!0},a.clearConfig=function(){Ft=null,Re=!1},a.isValidAttribute=function(ve,q,pe){Ft||ma({});const ye=ht(ve),Xe=ht(q);return za(ye,Xe,pe)},a.addHook=function(ve,q){typeof q=="function"&&Uo(U[ve],q)},a.removeHook=function(ve,q){if(q!==void 0){const pe=q3(U[ve],q);return pe===-1?void 0:X3(U[ve],pe,1)[0]}return k0(U[ve])},a.removeHooks=function(ve){U[ve]=[]},a.removeAllHooks=function(){U=j0()},a}var sk=L0();const H0=n=>{let a;const i=new Set,s=(p,x)=>{const y=typeof p=="function"?p(a):p;if(!Object.is(y,a)){const v=a;a=x??(typeof y!="object"||y===null)?y:Object.assign({},a,y),i.forEach(S=>S(a,v))}},r=()=>a,h={setState:s,getState:r,getInitialState:()=>g,subscribe:p=>(i.add(p),()=>i.delete(p))},g=a=n(s,r,h);return h},B0=(n=>n?H0(n):H0),rk=n=>n;function ck(n,a=rk){const i=Ka.useSyncExternalStore(n.subscribe,Ka.useCallback(()=>a(n.getState()),[n,a]),Ka.useCallback(()=>a(n.getInitialState()),[n,a]));return Ka.useDebugValue(i),i}const uk=n=>{const a=B0(n),i=s=>ck(a,s);return Object.assign(i,a),i},U0=(n=>uk),yf=n=>!!n&&n[0]==="o",xf=Do.unstable_batchedUpdates,Xo=(n,a)=>n===!0||!!(n&&n[a]),Sn=(n,a)=>typeof n=="function"?n(a):n,V0="_szhsinMenu",fk=n=>n[V0],dk=(n,a)=>Object.defineProperty(a,V0,{value:n}),Go=(n,a)=>(a&&Object.keys(a).forEach(i=>{const s=n[i],r=a[i];typeof r=="function"&&s?n[i]=(...c)=>{r(...c),s(...c)}:n[i]=r}),n),hk=n=>{if(typeof n!="string")return{top:0,right:0,bottom:0,left:0};const a=n.trim().split(/\s+/,4).map(parseFloat),i=isNaN(a[0])?0:a[0],s=isNaN(a[1])?i:a[1];return{top:i,right:s,bottom:isNaN(a[2])?i:a[2],left:isNaN(a[3])?s:a[3]}},vf=n=>{for(;n;){if(n=n.parentNode,!n||n===document.body||!n.parentNode)return;const{overflow:a,overflowX:i,overflowY:s}=getComputedStyle(n);if(/auto|scroll|overlay|hidden/.test(a+s+i))return n}};function bf(n,a){return{"aria-disabled":n||void 0,tabIndex:a?0:-1}}function $0(n,a){for(let i=0;i<n.length;i++)if(n[i]===a)return i;return-1}const nl=({block:n,element:a,modifiers:i,className:s})=>B.useMemo(()=>{const r=a?`${n}__${a}`:n;let c=r;i&&Object.keys(i).forEach(h=>{const g=i[h];g&&(c+=` ${r}--${g===!0?h:`${h}-${g}`}`)});let u=typeof s=="function"?s(i):s;return typeof u=="string"&&(u=u.trim(),u&&(c+=` ${u}`)),c},[n,a,i,s]),pk="szh-menu-container",Ul="szh-menu",gk="szh-menu-button",mk="arrow",Y0="item",yk="divider",xk="submenu",q0=B.createContext(),Sf=B.createContext({}),wf=B.createContext({}),X0=B.createContext({}),vk=B.createContext({}),Cr=B.createContext({}),Qt=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),Et=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),Zo=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),vi=Object.freeze({FIRST:"first",LAST:"last"}),bk=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),G0="absolute",Z0="none",I0="menuitem",Ef={preventScroll:!0},Q0=dk("MenuButton",B.forwardRef(function({className:a,isOpen:i,disabled:s,children:r,...c},u){const h=B.useMemo(()=>({open:i}),[i]);return m.jsx("button",{"aria-haspopup":!0,"aria-expanded":i,"aria-disabled":s||void 0,type:"button",disabled:s,...c,ref:u,className:nl({block:gk,modifiers:h,className:a}),children:r})})),Sk=({className:n,containerRef:a,containerProps:i,children:s,isOpen:r,theming:c,transition:u,onClose:h})=>{const g=Xo(u,"item"),p=({key:y})=>{switch(y){case Qt.ESC:Sn(h,{key:y,reason:Zo.CANCEL});break}},x=y=>{r&&!y.currentTarget.contains(y.relatedTarget)&&Sn(h,{reason:Zo.BLUR})};return m.jsx("div",{...Go({onKeyDown:p,onBlur:x},i),className:nl({block:pk,modifiers:B.useMemo(()=>({theme:c,itemTransition:g}),[c,g]),className:n}),style:{position:"absolute",...i?.style},ref:a,children:s})},wk=()=>{let n,a=0;return{toggle:i=>{i?a++:a--,a=Math.max(a,0)},on:(i,s,r)=>{a?n||(n=setTimeout(()=>{n=0,s()},i)):r?.()},off:()=>{n&&(clearTimeout(n),n=0)}}},Ek=n=>{const[a,i]=B.useState(),r=B.useRef({items:[],hoverIndex:-1,sorted:!1}).current,c=B.useCallback((h,g)=>{const{items:p}=r;if(!h)r.items=[];else if(g)p.push(h);else{const x=p.indexOf(h);x>-1&&(p.splice(x,1),h.contains(document.activeElement)&&(n.current.focus(Ef),i()))}r.hoverIndex=-1,r.sorted=!1},[r,n]),u=B.useCallback((h,g,p)=>{const{items:x,hoverIndex:y}=r,v=()=>{if(r.sorted)return;const E=n.current.querySelectorAll(".szh-menu__item");x.sort((_,T)=>$0(E,_)-$0(E,T)),r.sorted=!0};let S=-1,b;switch(h){case Et.RESET:break;case Et.SET:b=g;break;case Et.UNSET:b=E=>E===g?void 0:E;break;case Et.FIRST:v(),S=0,b=x[S];break;case Et.LAST:v(),S=x.length-1,b=x[S];break;case Et.SET_INDEX:v(),S=p,b=x[S];break;case Et.INCREASE:v(),S=y,S<0&&(S=x.indexOf(g)),S++,S>=x.length&&(S=0),b=x[S];break;case Et.DECREASE:v(),S=y,S<0&&(S=x.indexOf(g)),S--,S<0&&(S=x.length-1),b=x[S];break}b||(S=-1),i(b),r.hoverIndex=S},[n,r]);return{hoverItem:a,dispatch:u,updateItems:c}},K0=(n,a)=>Math.round(n)===a?n:a,_k=n=>{const a=n.getBoundingClientRect();return a.width=K0(a.width,n.offsetWidth),a.height=K0(a.height,n.offsetHeight),a},Ak=(n,a,i,s)=>{const r=_k(a),c=n.getBoundingClientRect(),u=i===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:i.getBoundingClientRect(),h=hk(s),g=b=>b+c.left-u.left-h.left,p=b=>b+c.left+r.width-u.right+h.right,x=b=>b+c.top-u.top-h.top,y=b=>b+c.top+r.height-u.bottom+h.bottom;return{menuRect:r,containerRect:c,getLeftOverflow:g,getRightOverflow:p,getTopOverflow:x,getBottomOverflow:y,confineHorizontally:b=>{let E=g(b);if(E<0)b-=E;else{const _=p(b);_>0&&(b-=_,E=g(b),E<0&&(b-=E))}return b},confineVertically:b=>{let E=x(b);if(E<0)b-=E;else{const _=y(b);_>0&&(b-=_,E=x(b),E<0&&(b-=E))}return b}}},Nk=({arrowRef:n,menuY:a,anchorRect:i,containerRect:s,menuRect:r})=>{let c=i.top-s.top-a+i.height/2;const u=n.current.offsetHeight*1.25;return c=Math.max(u,c),c=Math.min(c,r.height-u),c},kk=({anchorRect:n,containerRect:a,menuRect:i,placeLeftorRightY:s,placeLeftX:r,placeRightX:c,getLeftOverflow:u,getRightOverflow:h,confineHorizontally:g,confineVertically:p,arrowRef:x,arrow:y,direction:v,position:S})=>{let b=v,E=s;S!=="initial"&&(E=p(E),S==="anchor"&&(E=Math.min(E,n.bottom-a.top),E=Math.max(E,n.top-a.top-i.height)));let _,T,z;return b==="left"?(_=r,S!=="initial"&&(T=u(_),T<0&&(z=h(c),(z<=0||-T>z)&&(_=c,b="right")))):(_=c,S!=="initial"&&(z=h(_),z>0&&(T=u(r),(T>=0||-T<z)&&(_=r,b="left")))),S==="auto"&&(_=g(_)),{arrowY:y?Nk({menuY:E,arrowRef:x,anchorRect:n,containerRect:a,menuRect:i}):void 0,x:_,y:E,computedDirection:b}},Tk=({arrowRef:n,menuX:a,anchorRect:i,containerRect:s,menuRect:r})=>{let c=i.left-s.left-a+i.width/2;const u=n.current.offsetWidth*1.25;return c=Math.max(u,c),c=Math.min(c,r.width-u),c},Ck=({anchorRect:n,containerRect:a,menuRect:i,placeToporBottomX:s,placeTopY:r,placeBottomY:c,getTopOverflow:u,getBottomOverflow:h,confineHorizontally:g,confineVertically:p,arrowRef:x,arrow:y,direction:v,position:S})=>{let b=v==="top"?"top":"bottom",E=s;S!=="initial"&&(E=g(E),S==="anchor"&&(E=Math.min(E,n.right-a.left),E=Math.max(E,n.left-a.left-i.width)));let _,T,z;return b==="top"?(_=r,S!=="initial"&&(T=u(_),T<0&&(z=h(c),(z<=0||-T>z)&&(_=c,b="bottom")))):(_=c,S!=="initial"&&(z=h(_),z>0&&(T=u(r),(T>=0||-T<z)&&(_=r,b="top")))),S==="auto"&&(_=p(_)),{arrowX:y?Tk({menuX:E,arrowRef:x,anchorRect:n,containerRect:a,menuRect:i}):void 0,x:E,y:_,computedDirection:b}},Mk=({arrow:n,align:a,direction:i,gap:s,shift:r,position:c,anchorRect:u,arrowRef:h,positionHelpers:g})=>{const{menuRect:p,containerRect:x}=g,y=i==="left"||i==="right";let v=y?s:r,S=y?r:s;if(n){const D=h.current;y?v+=D.offsetWidth:S+=D.offsetHeight}const b=u.left-x.left-p.width-v,E=u.right-x.left+v,_=u.top-x.top-p.height-S,T=u.bottom-x.top+S;let z,N;a==="end"?(z=u.right-x.left-p.width,N=u.bottom-x.top-p.height):a==="center"?(z=u.left-x.left-(p.width-u.width)/2,N=u.top-x.top-(p.height-u.height)/2):(z=u.left-x.left,N=u.top-x.top),z+=v,N+=S;const C={...g,anchorRect:u,placeLeftX:b,placeRightX:E,placeLeftorRightY:N,placeTopY:_,placeBottomY:T,placeToporBottomX:z,arrowRef:h,arrow:n,direction:i,position:c};switch(i){case"left":case"right":return kk(C);case"top":case"bottom":default:return Ck(C)}},Mr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?B.useLayoutEffect:B.useEffect;function F0(n,a){typeof n=="function"?n(a):n.current=a}const zr=(n,a)=>B.useMemo(()=>n?a?i=>{F0(n,i),F0(a,i)}:n:a,[n,a]),J0=-9999,P0=({ariaLabel:n,menuClassName:a,menuStyle:i,arrow:s,arrowProps:r={},anchorPoint:c,anchorRef:u,containerRef:h,containerProps:g,externalRef:p,parentScrollingRef:x,align:y="start",direction:v="bottom",position:S="auto",overflow:b="visible",setDownOverflow:E,repositionFlag:_,captureFocus:T=!0,state:z,endTransition:N,isDisabled:C,menuItemFocus:D,gap:R=0,shift:j=0,children:K,onClose:J,focusProps:fe,...U})=>{const[F,ae]=B.useState({x:J0,y:J0}),[H,I]=B.useState({}),[k,L]=B.useState(),[$,Z]=B.useState(v),[Y]=B.useState(wk),[A,O]=B.useReducer(je=>je+1,1),{transition:G,boundingBoxRef:P,boundingBoxPadding:se,rootMenuRef:ge,rootAnchorRef:he,scrollNodesRef:ue,reposition:me,viewScroll:Ne,submenuCloseDelay:ke}=B.useContext(Cr),{submenuCtx:Se,reposSubmenu:_e=_}=B.useContext(wf),we=B.useRef(),Me=B.useRef(),Re=B.useRef(!1),{hoverItem:le,dispatch:de,updateItems:Je}=Ek(we),et=yf(z),on=Xo(G,"open"),wn=Xo(G,"close"),_t=ue.current,gt=je=>{switch(je.key){case Qt.HOME:de(Et.FIRST);break;case Qt.END:de(Et.LAST);break;case Qt.UP:de(Et.DECREASE,le);break;case Qt.DOWN:de(Et.INCREASE,le);break;case Qt.SPACE:je.target&&je.target.className.indexOf(Ul)!==-1&&je.preventDefault();return;default:return}je.preventDefault(),je.stopPropagation()},sn=()=>{z==="closing"&&L(),Sn(N)},Bt=je=>{je.stopPropagation(),Y.on(ke,()=>{de(Et.RESET),we.current.focus(Ef)})},$t=je=>{je.target===je.currentTarget&&Y.off()},Rt=B.useCallback(je=>{const tt=we.current,yt=h.current;if(!tt||!yt)return;const jt=u?u.current?.getBoundingClientRect():c?{left:c.x,right:c.x,top:c.y,bottom:c.y,width:0,height:0}:null;if(!jt)return;_t.menu||(_t.menu=(P?P.current:vf(ge.current))||window);const Ye=Ak(yt,tt,_t.menu,se);let{arrowX:En,arrowY:na,x:ht,y:Ft,computedDirection:Ta}=Mk({arrow:s,align:y,direction:v,gap:R,shift:j,position:S,anchorRect:jt,arrowRef:Me,positionHelpers:Ye});const{menuRect:Dn}=Ye,ma=Dn.height;if(!je&&b!=="visible"){const{getTopOverflow:Ca,getBottomOverflow:Ma}=Ye;let On,Ct;const Yt=Ma(Ft);if(Yt>0)On=ma-Yt,Ct=Yt;else{const Rn=Ca(Ft);Rn<0&&(On=ma+Rn,Ct=0-Rn,On>=0&&(Ft-=Rn))}On>=0&&L({height:On,overflowAmt:Ct})}s&&I({x:En,y:na}),ae({x:ht,y:Ft}),Z(Ta)},[s,y,se,v,R,j,S,b,c,u,h,P,ge,_t]);Mr(()=>{et&&(Rt(),Re.current&&O()),Re.current=et},[et,Rt,_e]),Mr(()=>{k&&!E&&(we.current.scrollTop=0)},[k,E]),Mr(()=>Je,[Je]),B.useEffect(()=>{let{menu:je}=_t;if(!et||!je)return;if(je=je.addEventListener?je:window,!_t.anchors){_t.anchors=[];let Ye=vf(he&&he.current);for(;Ye&&Ye!==je;)_t.anchors.push(Ye),Ye=vf(Ye)}let tt=Ne;if(_t.anchors.length&&tt==="initial"&&(tt="auto"),tt==="initial")return;const yt=()=>{tt==="auto"?xf(()=>Rt(!0)):Sn(J,{reason:Zo.SCROLL})},jt=_t.anchors.concat(Ne!=="initial"?je:[]);return jt.forEach(Ye=>Ye.addEventListener("scroll",yt)),()=>jt.forEach(Ye=>Ye.removeEventListener("scroll",yt))},[he,_t,et,J,Ne,Rt]);const Na=!!k&&k.overflowAmt>0;B.useEffect(()=>{if(Na||!et||!x)return;const je=()=>xf(Rt),tt=x.current;return tt.addEventListener("scroll",je),()=>tt.removeEventListener("scroll",je)},[et,Na,x,Rt]),B.useEffect(()=>{if(!et||typeof ResizeObserver!="function"||me==="initial")return;const je=[],tt=new ResizeObserver(Ye=>Ye.forEach(({target:En})=>{je.indexOf(En)<0?je.push(En):Do.flushSync(()=>{Rt(),O()})})),yt={box:"border-box"};tt.observe(we.current,yt);const jt=u?.current;return jt&&tt.observe(jt,yt),()=>tt.disconnect()},[et,me,u,Rt]),B.useEffect(()=>{if(!et){de(Et.RESET),wn||L();return}const{position:je,alwaysUpdate:tt}=D||{},yt=()=>{je===vi.FIRST?de(Et.FIRST):je===vi.LAST?de(Et.LAST):je>=-1&&de(Et.SET_INDEX,void 0,je)};if(tt)yt();else if(T){const jt=setTimeout(()=>{const Ye=we.current;Ye&&!Ye.contains(document.activeElement)&&(Ye.focus(Ef),yt())},on?170:100);return()=>clearTimeout(jt)}},[et,on,wn,T,D,de]);const ea=B.useMemo(()=>({isParentOpen:et,submenuCtx:Y,dispatch:de,updateItems:Je}),[et,Y,de,Je]);let ta,pa;k&&(E?pa=k.overflowAmt:ta=k.height);const rn=B.useMemo(()=>({reposSubmenu:A,submenuCtx:Y,overflow:b,overflowAmt:pa,parentMenuRef:we,parentDir:$}),[A,Y,b,pa,$]),vt=ta>=0?{maxHeight:ta,overflow:b}:void 0,mt=B.useMemo(()=>({state:z,align:y,dir:$}),[z,y,$]),dt=B.useMemo(()=>({dir:$}),[$]),ka=nl({block:Ul,element:mk,modifiers:dt,className:r.className}),ga=m.jsxs("ul",{role:"menu","aria-label":n,...bf(C),...Go({onPointerEnter:Se?.off,onPointerMove:Bt,onPointerLeave:$t,onKeyDown:gt,onAnimationEnd:sn},U),ref:zr(p,we),className:nl({block:Ul,modifiers:mt,className:a}),style:{...i,...vt,margin:0,display:z==="closed"?"none":void 0,position:G0,left:F.x,top:F.y},children:[s&&m.jsx("li",{"aria-hidden":!0,...r,className:ka,style:{display:"block",position:G0,left:H.x,top:H.y,...r.style},ref:Me}),m.jsx(wf.Provider,{value:rn,children:m.jsx(Sf.Provider,{value:ea,children:m.jsx(q0.Provider,{value:le,children:Sn(K,mt)})})})]});return g?m.jsx(Sk,{...g,isOpen:et,children:ga}):ga},zk=B.forwardRef(function({"aria-label":a,className:i,containerProps:s,initialMounted:r,unmountOnClose:c,transition:u,transitionTimeout:h,boundingBoxRef:g,boundingBoxPadding:p,reposition:x="auto",submenuOpenDelay:y=300,submenuCloseDelay:v=150,viewScroll:S="initial",portal:b,theming:E,onItemClick:_,...T},z){const N=B.useRef(null),C=B.useRef({}),{anchorRef:D,state:R,onClose:j}=T,K=B.useMemo(()=>({initialMounted:r,unmountOnClose:c,transition:u,transitionTimeout:h,boundingBoxRef:g,boundingBoxPadding:p,rootMenuRef:N,rootAnchorRef:D,scrollNodesRef:C,reposition:x,viewScroll:S,submenuOpenDelay:y,submenuCloseDelay:v}),[r,c,u,h,D,g,p,x,S,y,v]),J=B.useMemo(()=>({handleClick(U,F){U.stopPropagation||Sn(_,U);let ae=U.keepOpen;ae===void 0&&(ae=F&&U.key===Qt.SPACE),ae||Sn(j,{value:U.value,key:U.key,reason:Zo.CLICK})},handleClose(U){Sn(j,{key:U,reason:Zo.CLICK})}}),[_,j]);if(!R)return null;const fe=m.jsx(Cr.Provider,{value:K,children:m.jsx(X0.Provider,{value:J,children:m.jsx(P0,{...T,ariaLabel:a||"Menu",externalRef:z,containerRef:N,containerProps:{className:i,containerRef:N,containerProps:s,theming:E,transition:u,onClose:j}})})});return b===!0&&typeof document<"u"?Do.createPortal(fe,document.body):b?b.target?Do.createPortal(fe,b.target):b.stablePosition?null:fe:fe}),_f=0,Af=1,Dr=2,Or=3,Rr=4,Dk=5,W0=6,Ok=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],ey=n=>({_s:n,status:Ok[n],isEnter:n<Or,isMounted:n!==W0,isResolved:n===Dr||n>Rr}),Nf=n=>n?W0:Dk,Rk=(n,a)=>{switch(n){case Af:case _f:return Dr;case Rr:case Or:return Nf(a)}},jk=n=>typeof n=="object"?[n.enter,n.exit]:[n,n],Lk=(n,a)=>setTimeout(()=>{isNaN(document.body.offsetTop)||n(a+1)},0),ty=(n,a,i,s,r)=>{clearTimeout(s.current);const c=ey(n);a(c),i.current=c,r&&r({current:c})},Hk=({enter:n=!0,exit:a=!0,preEnter:i,preExit:s,timeout:r,initialEntered:c,mountOnEnter:u,unmountOnExit:h,onStateChange:g}={})=>{const[p,x]=B.useState(()=>ey(c?Dr:Nf(u))),y=B.useRef(p),v=B.useRef(),[S,b]=jk(r),E=B.useCallback(()=>{const T=Rk(y.current._s,h);T&&ty(T,x,y,v,g)},[g,h]),_=B.useCallback(T=>{const z=C=>{switch(ty(C,x,y,v,g),C){case Af:S>=0&&(v.current=setTimeout(E,S));break;case Rr:b>=0&&(v.current=setTimeout(E,b));break;case _f:case Or:v.current=Lk(z,C);break}},N=y.current.isEnter;typeof T!="boolean"&&(T=!N),T?!N&&z(n?i?_f:Af:Dr):N&&z(a?s?Or:Rr:Nf(h))},[E,g,n,a,i,s,S,b,h]);return[p,_,E]},Bk=({initialOpen:n,initialMounted:a,unmountOnClose:i,transition:s,transitionTimeout:r=500,onMenuChange:c}={})=>{const u=Xo(s,"open"),h=Xo(s,"close"),[{status:g},p,x]=Hk({initialEntered:n,mountOnEnter:!a,unmountOnExit:i,timeout:r,enter:u,exit:h,onStateChange:B.useCallback(({current:{isEnter:y,isResolved:v}})=>{!c||y&&u&&v||!y&&h&&v||c({open:y})},[c,u,h])});return[{state:bk[g],endTransition:x},p]},ny=n=>{const[a,i]=Bk(n),[s,r]=B.useState(),c=(u,h)=>{r({position:u,alwaysUpdate:h}),i(!0)};return[{menuItemFocus:s,...a},i,c]},Uk=(n,a)=>{const[i]=B.useState({});return{onMouseDown:()=>{i.v=n&&n!=="closed"},onClick:s=>i.v?i.v=!1:a(!0,s)}},Vk=parseInt(B.version)<19,ay=B.forwardRef(function({"aria-label":a,captureFocus:i,initialOpen:s,menuButton:r,instanceRef:c,onMenuChange:u,...h},g){const[p,x,y]=ny({...h,onMenuChange:u}),{state:v}=p,S=yf(v),b=B.useRef(null),E=Uk(v,(D,R)=>y(R.detail?void 0:vi.FIRST)),_=B.useCallback(D=>{x(!1),D.key&&b.current.focus()},[x]),T=D=>{switch(D.key){case Qt.UP:y(vi.LAST);break;case Qt.DOWN:y(vi.FIRST);break;default:return}D.preventDefault()},z=Sn(r,{open:S});if(!z||!z.type)throw new Error("Menu requires a menuButton prop.");const N={...Go({onKeyDown:T,...E},z.props),ref:zr(Vk?z.ref:z.props.ref,b)};fk(z.type)==="MenuButton"&&(N.isOpen=S);const C=B.cloneElement(z,N);return B.useImperativeHandle(c,()=>({openMenu:y,closeMenu:()=>x(!1)})),m.jsxs(B.Fragment,{children:[C,m.jsx(zk,{...h,...p,"aria-label":a||(typeof z.props.children=="string"?z.props.children:"Menu"),anchorRef:b,ref:g,onClose:_})]})}),ly=(n,a)=>{const i=B.memo(a),s=B.forwardRef((r,c)=>{const u=B.useRef(null);return m.jsx(i,{...r,itemRef:u,externalRef:c,isHovering:B.useContext(q0)===u.current})});return s.displayName=`WithHovering(${n})`,s},iy=n=>{const[a,i]=B.useState(!1);return B.useEffect(()=>{!n&&i(!1)},[n]),[a,()=>!a&&i(!0),()=>i(!1)]},oy=(n,a,i)=>{Mr(()=>{if(n)return;const s=a.current;return i(s,!0),()=>{i(s)}},[n,a,i])},$k=ly("SubMenu",function({"aria-label":a,className:i,disabled:s,direction:r,label:c,openTrigger:u,onMenuChange:h,isHovering:g,instanceRef:p,itemRef:x,captureFocus:y,repositionFlag:v,itemProps:S={},portal:b=!1,...E}){const _=B.useContext(Cr),{rootMenuRef:T,submenuOpenDelay:z,submenuCloseDelay:N}=_,{parentMenuRef:C,parentDir:D,overflow:R}=B.useContext(wf),{isParentOpen:j,submenuCtx:K,dispatch:J,updateItems:fe}=B.useContext(Sf),U=b||R!=="visible",[F,ae,H]=ny({..._,onMenuChange:h}),[I,k,L]=iy(g),{state:$}=F,Z=!!s,Y=yf($),A=B.useRef(null),[O]=B.useState({v:0}),G=()=>{K.off(),O.v&&(clearTimeout(O.v),O.v=0)},P=(...le)=>{G(),se(),!Z&&H(...le)},se=()=>!g&&!Z&&J(Et.SET,x.current),ge=le=>{se(),u||(O.v=setTimeout(()=>xf(P),Math.max(le,0)))},he=le=>{Z||(le.stopPropagation(),k(),!(O.v||Y)&&K.on(N,()=>ge(z-N),()=>ge(z)))},ue=()=>{L(),G(),Y||J(Et.UNSET,x.current)},me=le=>{if(g)switch(le.key){case Qt.ENTER:le.preventDefault();case Qt.SPACE:case Qt.RIGHT:u!=="none"&&P(vi.FIRST)}},Ne=le=>{let de=!1;switch(le.key){case Qt.LEFT:Y&&(x.current.focus(),ae(!1),de=!0);break;case Qt.RIGHT:Y||(de=!0);break}de&&(le.preventDefault(),le.stopPropagation())};oy(Z,x,fe),B.useEffect(()=>K.toggle(Y),[K,Y]),B.useEffect(()=>()=>{clearTimeout(O.v),K.toggle(!1)},[O,K]),B.useEffect(()=>{g&&j?x.current.focus():ae(!1)},[g,j,ae,x]),B.useImperativeHandle(p,()=>({openMenu:(...le)=>{j&&P(...le)},closeMenu:()=>{Y&&(x.current.focus(),ae(!1))}}));const ke=B.useMemo(()=>({open:Y,hover:I||g,disabled:Z,submenu:!0}),[Y,g,Z,I]),{ref:Se,className:_e,...we}=S,Me=Go({onPointerEnter:K.off,onPointerMove:he,onPointerLeave:ue,onKeyDown:me,onClick:()=>u!=="none"&&P()},we),Re=()=>{const le=m.jsx(P0,{...E,...F,ariaLabel:a||(typeof c=="string"?c:"Submenu"),anchorRef:x,containerRef:U?T:A,direction:r||(D==="right"||D==="left"?D:"right"),parentScrollingRef:U&&C,isDisabled:Z}),de=T.current;return U&&de?Do.createPortal(le,de):le};return m.jsxs("li",{className:nl({block:Ul,element:xk,className:i}),style:{position:"relative"},role:Z0,ref:A,onKeyDown:Ne,children:[m.jsx("div",{role:I0,"aria-haspopup":!0,"aria-expanded":Y,...bf(Z,g),...Me,ref:zr(Se,x),className:nl({block:Ul,element:Y0,modifiers:ke,className:_e}),children:B.useMemo(()=>Sn(c,ke),[c,ke])}),$&&Re()]})}),Yk=(n,a,i,s)=>{const[r,c,u]=iy(i),{submenuCloseDelay:h}=B.useContext(Cr),{isParentOpen:g,submenuCtx:p,dispatch:x,updateItems:y}=B.useContext(Sf),v=()=>{!i&&!s&&x(Et.SET,n.current)},S=()=>{!s&&x(Et.UNSET,n.current)},b=T=>{i&&!T.currentTarget.contains(T.relatedTarget)&&S()},E=T=>{s||(T.stopPropagation(),c(),p.on(h,v,v))},_=(T,z)=>{u(),p.off(),!z&&S()};return oy(s,n,y),B.useEffect(()=>{i&&g&&a.current&&a.current.focus()},[a,i,g]),{mouseOver:r,setHover:v,onBlur:b,onPointerMove:E,onPointerLeave:_}},Kt=ly("MenuItem",function({className:a,value:i,href:s,type:r,checked:c,disabled:u,children:h,onClick:g,isHovering:p,itemRef:x,externalRef:y,...v}){const S=!!u,{mouseOver:b,setHover:E,..._}=Yk(x,x,p,S),T=B.useContext(X0),z=B.useContext(vk),N=r==="radio",C=r==="checkbox",D=!!s&&!S&&!N&&!C,R=N?z.value===i:C?!!c:!1,j=F=>{if(S){F.stopPropagation(),F.preventDefault();return}const ae={value:i,syntheticEvent:F};F.key!==void 0&&(ae.key=F.key),C&&(ae.checked=!R),N&&(ae.name=z.name),Sn(g,ae),N&&Sn(z.onRadioChange,ae),T.handleClick(ae,C||N)},K=F=>{if(p)switch(F.key){case Qt.ENTER:F.preventDefault();case Qt.SPACE:D?x.current.click():j(F)}},J=B.useMemo(()=>({type:r,disabled:S,hover:b||p,checked:R,anchor:D}),[r,S,b,p,R,D]),fe=Go({..._,onPointerDown:E,onKeyDown:K,onClick:j},v),U={role:N?"menuitemradio":C?"menuitemcheckbox":I0,"aria-checked":N||C?R:void 0,...bf(S,p),...fe,ref:zr(y,x),className:nl({block:Ul,element:Y0,modifiers:J,className:a}),children:B.useMemo(()=>Sn(h,J),[h,J])};return D?m.jsx("li",{role:Z0,children:m.jsx("a",{href:s,...U})}):m.jsx("li",{...U})}),kf=B.memo(B.forwardRef(function({className:a,...i},s){return m.jsx("li",{role:"separator",...i,ref:s,className:nl({block:Ul,element:yk,className:a})})}));function qk(n,a){let i;try{i=n()}catch{return}return{getItem:r=>{var c;const u=g=>g===null?null:JSON.parse(g,void 0),h=(c=i.getItem(r))!=null?c:null;return h instanceof Promise?h.then(u):u(h)},setItem:(r,c)=>i.setItem(r,JSON.stringify(c,void 0)),removeItem:r=>i.removeItem(r)}}const Tf=n=>a=>{try{const i=n(a);return i instanceof Promise?i:{then(s){return Tf(s)(i)},catch(s){return this}}}catch(i){return{then(s){return this},catch(s){return Tf(s)(i)}}}},Xk=(n,a)=>(i,s,r)=>{let c={storage:qk(()=>localStorage),partialize:E=>E,version:0,merge:(E,_)=>({..._,...E}),...a},u=!1;const h=new Set,g=new Set;let p=c.storage;if(!p)return n((...E)=>{console.warn(`[zustand persist middleware] Unable to update item '${c.name}', the given storage is currently unavailable.`),i(...E)},s,r);const x=()=>{const E=c.partialize({...s()});return p.setItem(c.name,{state:E,version:c.version})},y=r.setState;r.setState=(E,_)=>(y(E,_),x());const v=n((...E)=>(i(...E),x()),s,r);r.getInitialState=()=>v;let S;const b=()=>{var E,_;if(!p)return;u=!1,h.forEach(z=>{var N;return z((N=s())!=null?N:v)});const T=((_=c.onRehydrateStorage)==null?void 0:_.call(c,(E=s())!=null?E:v))||void 0;return Tf(p.getItem.bind(p))(c.name).then(z=>{if(z)if(typeof z.version=="number"&&z.version!==c.version){if(c.migrate){const N=c.migrate(z.state,z.version);return N instanceof Promise?N.then(C=>[!0,C]):[!0,N]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,z.state];return[!1,void 0]}).then(z=>{var N;const[C,D]=z;if(S=c.merge(D,(N=s())!=null?N:v),i(S,!0),C)return x()}).then(()=>{T?.(S,void 0),S=s(),u=!0,g.forEach(z=>z(S))}).catch(z=>{T?.(void 0,z)})};return r.persist={setOptions:E=>{c={...c,...E},E.storage&&(p=E.storage)},clearStorage:()=>{p?.removeItem(c.name)},getOptions:()=>c,rehydrate:()=>b(),hasHydrated:()=>u,onHydrate:E=>(h.add(E),()=>{h.delete(E)}),onFinishHydration:E=>(g.add(E),()=>{g.delete(E)})},c.skipHydration||b(),S||v};var sy=(n,a,i)=>(r,c)=>({pastStates:i?.pastStates||[],futureStates:i?.futureStates||[],undo:(u=1)=>{if(c().pastStates.length){const h=i?.partialize?.(a())||a(),g=c().pastStates.splice(-u,u),p=g.shift();n(p),r({pastStates:c().pastStates,futureStates:c().futureStates.concat(i?.diff?.(h,p)||h,g.reverse())})}},redo:(u=1)=>{if(c().futureStates.length){const h=i?.partialize?.(a())||a(),g=c().futureStates.splice(-u,u),p=g.shift();n(p),r({pastStates:c().pastStates.concat(i?.diff?.(h,p)||h,g.reverse()),futureStates:c().futureStates})}},clear:()=>r({pastStates:[],futureStates:[]}),isTracking:!0,pause:()=>r({isTracking:!1}),resume:()=>r({isTracking:!0}),setOnSave:u=>r({_onSave:u}),_onSave:i?.onSave,_handleSet:(u,h,g,p)=>{i?.limit&&c().pastStates.length>=i?.limit&&c().pastStates.shift(),c()._onSave?.(u,g),r({pastStates:c().pastStates.concat(p||u),futureStates:[]})}}),Gk=(n,a)=>(s,r,c)=>{c.temporal=B0(a?.wrapTemporal?.(sy(s,r,a))||sy(s,r,a));const u=a?.handleSet?.(c.temporal.getState()._handleSet)||c.temporal.getState()._handleSet,h=p=>{if(!c.temporal.getState().isTracking)return;const x=a?.partialize?.(r())||r(),y=a?.diff?.(p,x);y===null||a?.equality?.(p,x)||u(p,void 0,x,y)},g=c.setState;return c.setState=(...p)=>{const x=a?.partialize?.(r())||r();g(...p),h(x)},n((...p)=>{const x=a?.partialize?.(r())||r();s(...p),h(x)},r,c)};const{useSyncExternalStoreWithSelector:Zk}=Xg,Ik=n=>n;function Qk(n,a=Ik,i){const s=Zk(n.subscribe,n.getState,n.getInitialState,a,i);return Ka.useDebugValue(s),s}var Cf,ry;function Kk(){return ry||(ry=1,Cf=function n(a,i){if(a===i)return!0;if(a&&i&&typeof a=="object"&&typeof i=="object"){if(a.constructor!==i.constructor)return!1;var s,r,c;if(Array.isArray(a)){if(s=a.length,s!=i.length)return!1;for(r=s;r--!==0;)if(!n(a[r],i[r]))return!1;return!0}if(a.constructor===RegExp)return a.source===i.source&&a.flags===i.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===i.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===i.toString();if(c=Object.keys(a),s=c.length,s!==Object.keys(i).length)return!1;for(r=s;r--!==0;)if(!Object.prototype.hasOwnProperty.call(i,c[r]))return!1;for(r=s;r--!==0;){var u=c[r];if(!n(a[u],i[u]))return!1}return!0}return a!==a&&i!==i}),Cf}var Fk=Kk();const Jk=ii(Fk);function Pk(n,a,i){var s=i||{},r=s.noTrailing,c=r===void 0?!1:r,u=s.noLeading,h=u===void 0?!1:u,g=s.debounceMode,p=g===void 0?void 0:g,x,y=!1,v=0;function S(){x&&clearTimeout(x)}function b(_){var T=_||{},z=T.upcomingOnly,N=z===void 0?!1:z;S(),y=!N}function E(){for(var _=arguments.length,T=new Array(_),z=0;z<_;z++)T[z]=arguments[z];var N=this,C=Date.now()-v;if(y)return;function D(){v=Date.now(),a.apply(N,T)}function R(){x=void 0}!h&&p&&!x&&D(),S(),p===void 0&&C>n?h?(v=Date.now(),c||(x=setTimeout(p?R:D,n))):D():c!==!0&&(x=setTimeout(p?R:D,p===void 0?n-C:n))}return E.cancel=b,E}function cy(n){n=n.trim(),n.match(/^[a-z]+:\/\//i)||(n="https://"+n);try{const a=new URL(n);return["http:","https:","mailto:"].includes(a.protocol)?a.href:null}catch{return null}}function Wk(n){const a=[],i=/\[([^\]]+)\]\(([^)]+)\)|(https?:\/\/[^\s<>"{}|\\^`\[\]]+)/g,s=Array.from(n.matchAll(i));let r=0;return s.forEach((c,u)=>{if(c.index!==void 0&&c.index>r&&a.push(n.substring(r,c.index)),c[1]&&c[2]){const h=c[1],g=c[2],p=cy(g);p?a.push(m.jsx("a",{href:p,target:"_blank",rel:"noopener noreferrer",style:{color:"#3b82f6",textDecoration:"underline"},children:h},u)):a.push(`[${h}](${g})`)}else if(c[3]){const h=c[3],g=cy(h);g?a.push(m.jsx("a",{href:g,target:"_blank",rel:"noopener noreferrer",style:{color:"#3b82f6",textDecoration:"underline"},children:h},u)):a.push(h)}c.index!==void 0&&(r=c.index+c[0].length)}),r<n.length&&a.push(n.substring(r)),a.length>0?a:[n]}var uy=({data:n,selected:a})=>m.jsx(m.Fragment,{children:n.data?m.jsxs(m.Fragment,{children:[m.jsx(Qu,{isVisible:a,keepAspectRatio:!0}),m.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",overflow:"hidden",gap:"4px"},children:[m.jsx("img",{src:n.data,style:{maxWidth:"100%",maxHeight:n.caption?"calc(100% - 24px)":"100%",objectFit:"contain"}}),n.caption&&m.jsx("div",{style:{fontSize:"11px",color:"#6b7280",textAlign:"center",padding:"0 4px",lineHeight:"1.3"},children:Wk(n.caption)})]})]}):m.jsx("span",{children:"No Image"})}),Io={S:10,M:14,L:18,XL:24},fy="M",eT=10,tT=14,nT=18;function dy(n){return n<=eT?"S":n<=tT?"M":n<=nT?"L":"XL"}function hy(n){return typeof n=="number"?Io[dy(n)]:n&&n in Io?Io[n]:Io[fy]}function aT(n){return n?dy(n):fy}var py=({data:n,selected:a,isConnectable:i,...s})=>m.jsxs(m.Fragment,{children:[i&&m.jsx(Qu,{isVisible:a}),m.jsx(IN,{className:"icon"}),m.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",textAlign:"center"},children:[m.jsx("div",{style:{fontWeight:600,fontSize:`${hy(n.fontSize)}px`},children:n.label||"Untitled"}),n.summary&&m.jsx("div",{style:{fontSize:"12px",color:"#4b5563",marginTop:"4px"},children:n.summary})]}),["Bottom","Top","Left","Right"].map(r=>m.jsx(el,{type:"source",position:be[r],style:{visibility:i?"visible":"hidden"},id:r.toLowerCase(),isConnectable:!0},`${r}-source`)),["Bottom","Top","Left","Right"].map(r=>m.jsx(el,{type:"target",position:be[r],style:{visibility:i?"visible":"hidden"},id:r.toLowerCase(),isConnectable:!0},`${r}-target`))]}),gy=({data:n})=>m.jsx(m.Fragment,{children:m.jsx("div",{style:{fontSize:n.fontSize||32,color:n.color||"#e5e7eb",fontWeight:"bold",transform:`rotate(${n.rotation||0}deg)`},children:n.text||"No Text"})}),lT=n=>m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",className:n.className,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",children:[m.jsx("circle",{cx:"12",cy:"12",r:"10"}),m.jsx("path",{d:"M11.051 7.616a1 1 0 0 1 1.909.024l.737 1.452a1 1 0 0 0 .737.535l1.634.256a1 1 0 0 1 .588 1.806l-1.172 1.168a1 1 0 0 0-.282.866l.259 1.613a1 1 0 0 1-1.541 1.134l-1.465-.75a1 1 0 0 0-.912 0l-1.465.75a1 1 0 0 1-1.539-1.133l.258-1.613a1 1 0 0 0-.282-.867l-1.156-1.152a1 1 0 0 1 .572-1.822l1.633-.256a1 1 0 0 0 .737-.535z"})]}),Mf=lT,my=({data:n,selected:a,isConnectable:i})=>m.jsxs(m.Fragment,{children:[i&&m.jsx(Qu,{isVisible:a}),n.state==="mastered"&&m.jsx(Mf,{className:"icon"}),m.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",textAlign:"center"},children:[m.jsx("div",{style:{fontWeight:600,fontSize:`${hy(n.fontSize)}px`},children:n.label||"Untitled"}),n.summary&&m.jsx("div",{style:{fontSize:"12px",color:"#4b5563",marginTop:"4px"},children:n.summary})]}),["Bottom","Top","Left","Right"].map(s=>m.jsx(el,{type:"source",style:{visibility:i?"visible":"hidden"},position:be[s],id:s.toLowerCase(),isConnectable:!0},`${s}-source`)),["Bottom","Top","Left","Right"].map(s=>m.jsx(el,{type:"target",style:{visibility:i?"visible":"hidden"},position:be[s],id:s.toLowerCase(),isConnectable:!0},`${s}-target`))]});function yy(n,a){const{width:i,height:s}=n.measured,r=n.internals.positionAbsolute,c=a.internals.positionAbsolute,u=i/2,h=s/2,g=r.x+u,p=r.y+h,x=c.x+a.measured.width/2,y=c.y+a.measured.height/2,v=(x-g)/(2*u)-(y-p)/(2*h),S=(x-g)/(2*u)+(y-p)/(2*h),b=1/(Math.abs(v)+Math.abs(S)),E=b*v,_=b*S,T=u*(E+_)+g,z=h*(-E+_)+p;return{x:T,y:z}}function xy(n,a){const i={...n.internals.positionAbsolute,...n},s=Math.round(i.x),r=Math.round(i.y),c=Math.round(a.x),u=Math.round(a.y);return c<=s+1?be.Left:c>=s+i.measured.width-1?be.Right:u<=r+1?be.Top:u>=i.y+i.measured.height-1?be.Bottom:be.Top}function iT(n,a){const i=yy(n,a),s=yy(a,n),r=xy(n,i),c=xy(a,s);return{sx:i.x,sy:i.y,tx:s.x,ty:s.y,sourcePos:r,targetPos:c}}var Qo={settings:{title:"New Roadmap",viewport:{x:0,y:0,zoom:1}},version:1,nodes:[],edges:[]},oT=n=>{let a={};if(typeof n!="string")a=n;else try{a=JSON.parse(n)}catch{}return{...Qo,...a,settings:{...Qo.settings,...a.settings,viewport:{...Qo.settings.viewport,...a.settings?.viewport||{}}},nodes:a.nodes||Qo.nodes,edges:a.edges||Qo.edges}},sT=()=>{const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";return[9,11,1].map(i=>{let s="";for(let r=0;r<i;r++)s+=n.charAt(Math.floor(Math.random()*n.length));return s}).join("-")};function rT(n){return typeof n=="string"&&(n.includes("youtube.com/watch?v=")||n.includes("youtu.be/"))}function cT(n){return n.includes("youtube.com/watch?v=")?`https://www.youtube-nocookie.com/embed/${n.split("v=")[1].split("&")[0]}`:n.includes("youtu.be/")?`https://www.youtube-nocookie.com/embed/${n.split("youtu.be/")[1].split("?")[0]}`:n}function uT(n){return n.endsWith(".webm")?"video/webm":(n.endsWith(".mp4"),"video/mp4")}var fT=({url:n,title:a})=>{if(rT(n)){const i=cT(n);return m.jsx("div",{className:"video-container",style:{position:"relative",paddingBottom:"56.25%",height:0,overflow:"hidden",marginBottom:16},children:m.jsx("iframe",{src:i,title:a||"YouTube video",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"}})})}else{const i=uT(n);return m.jsxs("video",{controls:!0,style:{width:"100%",maxHeight:"400px",marginBottom:16},children:[m.jsx("source",{src:n,type:i}),"Your browser does not support the video tag."]})}},dT={nodes:"Nodes",addTask:"Add Task",addTopic:"Add Topic",addImage:"Add Image",addText:"Add Text",settings:"Settings",debug:"Debug",enableDebugMode:"Enable Debug Mode",showCompletionNeedsEdges:"Show Completion Needs Edges",showCompletionOptionalEdges:"Show Completion Optional Edges",showUnlockAfterEdges:"Show Unlock After Edges",preview:"Preview",save:"Save",download:"Download",open:"Open",exportAsSVG:"Export as SVG",undo:"Undo",redo:"Redo",reset:"Reset",help:"Help",unsavedChanges:"Unsaved Changes (Click to save or press Ctrl+S)",keyboardShortcuts:"Keyboard Shortcuts",action:"Action",shortcut:"Shortcut",close:"Close",shortcuts:{save:"Save",undo:"Undo",redo:"Redo",addTaskNode:"Add Task Node",addTopicNode:"Add Topic Node",addImageNode:"Add Image Node",addTextNode:"Add Text Node",deleteNodeEdge:"Delete Node/Edge",togglePreviewMode:"Toggle Preview Mode",toggleDebugMode:"Toggle Debug Mode",selectMultipleNodes:"Select Multiple Nodes",selectAllNodes:"Select All Nodes",showHelp:"Show Help",zoomIn:"Zoom In",zoomOut:"Zoom Out",resetZoom:"Reset Zoom",fitView:"Fit View",zoomToSelection:"Zoom to Selection",toggleGrid:"Toggle Grid",resetMap:"Reset Map",cut:"Cut",copy:"Copy",paste:"Paste"},editTask:"Edit Task",editTopic:"Edit Topic",editImage:"Edit Image",editText:"Edit Text",backgroundSettings:"Background Settings",editEdge:"Edit Edge",nodeColor:"Node Color",label:"Label",labelRequired:"Label *",summary:"Summary",description:"Description",duration:"Duration",videoURL:"Video URL",resources:"Resources",addResource:"Add Resource",unlockPassword:"Unlock Password",unlockDate:"Unlock Date",unlockAfter:"Unlock After",completionNeeds:"Completion Needs",completionOptional:"Completion Optional",backgroundColor:"Background Color",text:"Text",fontSize:"Font Size",color:"Color",image:"Image",width:"Width",height:"Height",rotation:"Rotation",opacity:"Opacity",edgeColor:"Color",edgeWidth:"Width",edgeType:"Type",animated:"Animated",placeholderNodeLabel:"Node label",placeholderTitleLabel:"Lerningmap label",placeholderShortSummary:"Short summary",placeholderDetailedDescription:"Detailed description",placeholderVideoURL:"YouTube or video URL",placeholderLabel:"Label",placeholderURL:"URL",placeholderOptionalPassword:"Optional password",placeholderBackgroundText:"Background Text",selectNode:"Select node...",deleteNode:"Delete Node",saveChanges:"Save Changes",deleteEdge:"Delete Edge",copyNode:"Copy",openFileWarning:"Opening a file will replace your current map. Continue?",resetMapWarning:"Are you sure you want to reset the map? This action cannot be undone.",failedToLoadFile:"Failed to load the file. Please make sure it is a valid roadmap JSON file.",failedToExportSVG:"Failed to export SVG: ",loadExternalWarning:"Loading an external learningmap will replace your existing content. You can back up your current learningmap first by using one of the options below.",loadExternalBackupPrompt:"Would you like to back up your current learningmap before loading the external one?",emptyMapCannotBeShared:"An empty learningmap cannot be shared.",uploadFailed:"Upload failed. Please try again!",uploadFileTooLarge:"Sharing bigger files is not allowed. You can still download your learningmap and share it via other means.",loadFailed:"Failed to load. Please check the URL.",share:"Share",shareLink:"Share Link",copyLink:"Copy Link",linkCopied:"Link copied to clipboard!",downloadCurrentMap:"Download Current Map",replaceWithExternal:"Replace with External Map",blue:"Blue",yellow:"Yellow",lila:"Lila",pink:"Pink",teal:"Teal",red:"Red",black:"Black",white:"White",newTask:"New task",newTopic:"New topic",backgroundTextDefault:"Background Text",noText:"No Text",untitled:"Untitled",alignLeftHorizontal:"Align Left Horizontal",alignCenterHorizontal:"Align Center Horizontal",alignRightHorizontal:"Align Right Horizontal",alignTopVertical:"Align Top Vertical",alignCenterVertical:"Align Center Vertical",alignBottomVertical:"Align Bottom Vertical",distributeHorizontally:"Distribute Horizontally",distributeVertically:"Distribute Vertically",default:"Default",straight:"Straight",step:"Step",smoothstep:"Smooth Step",floating:"Floating",resourcesLabel:"Resources:",unlockConditionsMessage:"Complete the following nodes first to unlock this one:",completionNeedsMessage:"The following nodes need to be completed or mastered before this one is completed:",locked:"Locked",markAsStarted:"Mark as Started",markAsCompleted:"Mark as Completed",completedLabel:"Completed",mastered:"Mastered",completedTitle:"Completed",masteredTitle:"Mastered",finishNeedsToComplete:"Finish needs to complete",finishOptionalToMaster:"Finish optional to master",languageLabel:"Language",languageEnglish:"English",languageGerman:"German",initialViewport:"Initial Viewport",viewportX:"X Position",viewportY:"Y Position",viewportZoom:"Zoom",useCurrentViewport:"Use Current Viewport",storageId:"ID",generateRandomId:"Generate Random ID",storageIdHint:"Learning maps with the same ID will share the same state when a student is working on it.",welcomeTitle:"Learningmap",welcomeSubtitle:"All data is stored locally in your browser",welcomeOpenFile:"Open File",welcomeAddTopic:"Add Topic",welcomeHelp:"Help",fontSizeSmall:"Small",fontSizeMedium:"Medium",fontSizeLarge:"Large",fontSizeXLarge:"Extra Large",caption:"Caption",placeholderImageCaption:"Add caption (supports [markdown links](url))"},hT={nodes:"Knoten",addTask:"Aufgabe hinzufügen",addTopic:"Thema hinzufügen",addImage:"Bild hinzufügen",addText:"Text hinzufügen",settings:"Einstellungen",debug:"Debug",enableDebugMode:"Debug-Modus aktivieren",showCompletionNeedsEdges:"Abschluss-Benötigte Kanten anzeigen",showCompletionOptionalEdges:"Abschluss-Optionale Kanten anzeigen",showUnlockAfterEdges:"Entsperr-Nach Kanten anzeigen",preview:"Vorschau",save:"Speichern",download:"Herunterladen",open:"Öffnen",exportAsSVG:"Als SVG exportieren",undo:"Rückgängig",redo:"Wiederholen",reset:"Zurücksetzen",help:"Hilfe",unsavedChanges:"Ungespeicherte Änderungen (Klicken zum Speichern oder Strg+S drücken)",keyboardShortcuts:"Tastaturkürzel",action:"Aktion",shortcut:"Tastenkombination",close:"Schließen",shortcuts:{save:"Speichern",undo:"Rückgängig",redo:"Wiederholen",addTaskNode:"Aufgaben-Knoten hinzufügen",addTopicNode:"Themen-Knoten hinzufügen",addImageNode:"Bild-Knoten hinzufügen",addTextNode:"Text-Knoten hinzufügen",deleteNodeEdge:"Knoten/Kante löschen",togglePreviewMode:"Vorschau-Modus umschalten",toggleDebugMode:"Debug-Modus umschalten",selectMultipleNodes:"Mehrere Knoten auswählen",selectAllNodes:"Alle Knoten auswählen",showHelp:"Hilfe anzeigen",zoomIn:"Vergrößern",zoomOut:"Verkleinern",resetZoom:"Zoom zurücksetzen",fitView:"Alles anzeigen",zoomToSelection:"Auswahl anzeigen",toggleGrid:"Raster umschalten",resetMap:"Karte zurücksetzen",cut:"Ausschneiden",copy:"Kopieren",paste:"Einfügen"},editTask:"Aufgabe bearbeiten",editTopic:"Thema bearbeiten",editImage:"Bild bearbeiten",editText:"Text bearbeiten",backgroundSettings:"Hintergrund-Einstellungen",editEdge:"Kante bearbeiten",nodeColor:"Knotenfarbe",label:"Bezeichnung",labelRequired:"Bezeichnung *",summary:"Zusammenfassung",description:"Beschreibung",duration:"Dauer",videoURL:"Video-URL",resources:"Ressourcen",addResource:"Ressource hinzufügen",unlockPassword:"Entsperr-Passwort",unlockDate:"Entsperr-Datum",unlockAfter:"Entsperren nach",completionNeeds:"Abschluss benötigt",completionOptional:"Abschluss optional",backgroundColor:"Hintergrundfarbe",text:"Text",fontSize:"Schriftgröße",color:"Farbe",image:"Bild",width:"Breite",height:"Höhe",rotation:"Drehung",opacity:"Deckkraft",edgeColor:"Farbe",edgeWidth:"Breite",edgeType:"Typ",animated:"Animiert",placeholderNodeLabel:"Knotenbezeichnung",placeholderTitleLabel:"Lernkartenbezeichnung",placeholderShortSummary:"Kurze Zusammenfassung",placeholderDetailedDescription:"Detaillierte Beschreibung",placeholderVideoURL:"YouTube oder Video-URL",placeholderLabel:"Bezeichnung",placeholderURL:"URL",placeholderOptionalPassword:"Optionales Passwort",placeholderBackgroundText:"Hintergrundtext",selectNode:"Knoten auswählen...",deleteNode:"Knoten löschen",saveChanges:"Änderungen speichern",deleteEdge:"Kante löschen",copyNode:"Kopieren",openFileWarning:"Das Öffnen einer Datei ersetzt Ihre aktuelle Karte. Fortfahren?",resetMapWarning:"Sind Sie sicher, dass Sie die Karte zurücksetzen möchten? Diese Aktion kann nicht rückgängig gemacht werden.",failedToLoadFile:"Datei konnte nicht geladen werden. Bitte stellen Sie sicher, dass es sich um eine gültige Roadmap-JSON-Datei handelt.",failedToExportSVG:"SVG-Export fehlgeschlagen: ",loadExternalWarning:"Das Laden einer externen Learningmap ersetzt Ihren aktuellen Inhalt. Sie können Ihre aktuelle Learningmap zuerst sichern, indem Sie eine der folgenden Optionen verwenden.",loadExternalBackupPrompt:"Möchten Sie Ihre aktuelle Learningmap sichern, bevor Sie die externe laden?",emptyMapCannotBeShared:"Eine leere Learningmap kann nicht geteilt werden.",uploadFailed:"Beim Upload ist was schief gelaufen. Bitte versuche es erneut!",uploadFileTooLarge:"Das Teilen größerer Dateien ist nicht erlaubt. Du kannst deine Learningmap weiterhin herunterladen und über andere Wege teilen.",loadFailed:"Beim Laden ist etwas schief gegangen. Bitte überprüfe die URL.",share:"Teilen",shareLink:"Link teilen",copyLink:"Link kopieren",linkCopied:"Link in die Zwischenablage kopiert!",downloadCurrentMap:"Aktuelle Karte herunterladen",replaceWithExternal:"Mit externer Karte ersetzen",blue:"Blau",yellow:"Gelb",lila:"Lila",pink:"Rosa",teal:"Türkis",red:"Rot",black:"Schwarz",white:"Weiß",newTask:"Neue Aufgabe",newTopic:"Neues Thema",backgroundTextDefault:"Hintergrundtext",noText:"Kein Text",untitled:"Ohne Titel",alignLeftHorizontal:"Horizontal links ausrichten",alignCenterHorizontal:"Horizontal zentrieren",alignRightHorizontal:"Horizontal rechts ausrichten",alignTopVertical:"Vertikal oben ausrichten",alignCenterVertical:"Vertikal zentrieren",alignBottomVertical:"Vertikal unten ausrichten",distributeHorizontally:"Horizontal verteilen",distributeVertically:"Vertikal verteilen",default:"Standard",straight:"Gerade",step:"Stufe",smoothstep:"Weiche Stufe",floating:"Schwebend",resourcesLabel:"Ressourcen:",unlockConditionsMessage:"Vervollständige zuerst die folgenden Knoten, um diesen freizuschalten:",completionNeedsMessage:"Die folgenden Knoten müssen abgeschlossen oder gemeistert werden, bevor dieser abgeschlossen ist:",locked:"Gesperrt",markAsStarted:"Als begonnen markieren",markAsCompleted:"Als abgeschlossen markieren",completedLabel:"Abgeschlossen",mastered:"Gemeistert",completedTitle:"Abgeschlossen",masteredTitle:"Gemeistert",finishNeedsToComplete:"Benötigtes abschließen",finishOptionalToMaster:"Optionale zum Meistern abschließen",languageLabel:"Sprache",languageEnglish:"Englisch",languageGerman:"Deutsch",initialViewport:"Initialer Ansichtsbereich",viewportX:"X-Position",viewportY:"Y-Position",viewportZoom:"Zoom",useCurrentViewport:"Aktuellen Ansichtsbereich verwenden",storageId:"ID",generateRandomId:"Zufällige ID generieren",storageIdHint:"Lernkarten mit der gleichen ID teilen sich den gleichen Zustand, wenn ein Schüler daran arbeitet.",welcomeTitle:"Learningmap",welcomeSubtitle:"Alle Daten werden lokal in Ihrem Browser gespeichert",welcomeOpenFile:"Datei öffnen",welcomeAddTopic:"Thema hinzufügen",welcomeHelp:"Hilfe",fontSizeSmall:"Klein",fontSizeMedium:"Mittel",fontSizeLarge:"Groß",fontSizeXLarge:"Extra Groß",caption:"Bildunterschrift",placeholderImageCaption:"Bildunterschrift hinzufügen (unterstützt [Markdown-Links](url))"},vy={en:dT,de:hT};function Vt(n="en"){return vy[n]||vy.en}function pT(n,a){const i=[];return n.data?.unlock?.after&&n.data.unlock.after.forEach(s=>{const r=a.find(c=>c.id===s);r&&r.data?.state!=="completed"&&r.data?.state!=="mastered"&&i.push(r)}),i}function gT(n,a){const i=[];return n.data?.completion?.needs&&n.data.completion.needs.forEach(s=>{const r=a.find(c=>c.id===s);r&&r.data?.state!=="completed"&&r.data?.state!=="mastered"&&i.push(r)}),i}function by(n){switch(n){case"locked":return"🔒";case"unlocked":return"🔓";case"started":return"▶️";case"completed":return"✅";case"mastered":return"🌟";default:return""}}function mT(n,a){const i=[];return n.data?.completion?.optional&&n.data.completion.optional.forEach(s=>{const r=a.find(c=>c.id===s);r&&r.data?.state!=="completed"&&r.data?.state!=="mastered"&&i.push(r)}),i}function yT({open:n,onClose:a,onUpdate:i,node:s,nodes:r,onNodeClick:c,language:u="en"}){const h=Vt(u),g=B.useMemo(()=>{if(!s||!s.data?.description)return"";const z=Fe.parse(s.data.description,{async:!1});return sk.sanitize(z)},[s,s?.data?.description]);if(!n||!s)return null;const p=s.data?.state==="locked"||!1,x=s.data?.state==="unlocked"||!1,y=s.data?.state==="completed"||!1,v=s.data?.state==="started"||!1,S=s.data?.state==="mastered"||!1,b=pT(s,r),E=gT(s,r),_=mT(s,r),T=z=>()=>{s.type==="topic"||p||i({...s,data:{...s.data,state:z}})};return m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"drawer-overlay",onClick:a}),m.jsxs("aside",{className:"drawer",children:[m.jsxs("header",{className:"drawer-header",children:[m.jsxs("div",{children:[m.jsx("h2",{className:"drawer-title",children:s.data?.label}),s.data?.duration&&m.jsx("div",{style:{fontSize:16,color:"#6b7280",marginTop:4},children:s.data.duration})]}),m.jsx("button",{className:"close-button",onClick:a,"aria-label":"Close",children:m.jsx(da,{size:20})})]}),m.jsxs("div",{className:"drawer-content",children:[b.length>0?m.jsxs("div",{className:"drawer-unlock-conditions",style:{marginBottom:16},children:[m.jsx("div",{style:{fontWeight:600,marginBottom:8},children:h.unlockConditionsMessage}),m.jsx("ul",{children:b.map(z=>m.jsx("li",{children:m.jsxs("button",{className:"link-button",onClick:()=>{c(null,z,!0)},children:[z.data?.label||z.id," - ",by(z.data?.state)]})},z.id))})]}):m.jsxs(m.Fragment,{children:[s.data?.description&&m.jsx("div",{className:"drawer-description",style:{marginBottom:16},dangerouslySetInnerHTML:{__html:g}}),s.data?.video&&m.jsx("div",{className:"drawer-video",style:{marginBottom:16},children:m.jsx(fT,{url:s.data?.video})}),s.data?.resources&&s.data?.resources.length>0&&m.jsxs("div",{className:"drawer-resources",style:{marginBottom:16},children:[m.jsx("div",{style:{fontWeight:600,marginBottom:8},children:h.resourcesLabel}),m.jsx("ul",{children:s.data?.resources.map((z,N)=>{if(z.type==="book"){const C=[];z.bookName&&C.push(z.bookName),z.bookLocation&&C.push(z.bookLocation);const D=C.length>0?` (${C.join(", ")})`:"";return m.jsxs("li",{children:["📚 ",m.jsx("strong",{children:z.label}),D]},N)}return m.jsxs("li",{children:["🌐 ",z.url?m.jsx("a",{href:z.url,target:"_blank",rel:"noopener noreferrer",children:z.label}):m.jsx("span",{children:z.label})]},N)})})]})]}),!p&&E.length>0&&m.jsxs("div",{className:"drawer-completion-needs",style:{marginBottom:16},children:[m.jsx("div",{style:{fontWeight:600,marginBottom:8},children:h.completionNeedsMessage}),m.jsx("ul",{children:E.map(z=>m.jsx("li",{children:m.jsxs("button",{className:"link-button",onClick:()=>{c(null,z,!0)},children:[z.data?.label||z.id," - ",by(z.data?.state)]})},z.id))})]})]}),m.jsx("div",{className:"drawer-footer",children:s.type==="topic"?m.jsxs(m.Fragment,{children:[!p&&E.length>0&&m.jsx("button",{className:"drawer-button needs",disabled:!0,children:h.finishNeedsToComplete}),!p&&E.length===0&&_.length>0&&m.jsx("button",{className:"drawer-button optional",disabled:!0,children:h.finishOptionalToMaster}),!p&&E.length===0&&_.length===0&&m.jsxs("button",{className:"drawer-button completed",disabled:!0,children:[m.jsx(Ku,{})," ",h.mastered]}),p&&m.jsxs("button",{className:"drawer-button locked",children:[m.jsx(o0,{})," ",h.locked]})]}):m.jsxs(m.Fragment,{children:[p&&m.jsxs("button",{className:"drawer-button locked",children:[m.jsx(o0,{})," ",h.locked]}),x&&m.jsx("button",{className:"drawer-button unlocked",onClick:T("started"),children:h.markAsStarted}),v&&m.jsx("button",{className:"drawer-button started",onClick:T("completed"),children:h.markAsCompleted}),y&&m.jsxs("button",{className:"drawer-button completed",disabled:!0,children:[m.jsx(Ku,{})," ",h.completedLabel]}),S&&m.jsxs("button",{className:"drawer-button mastered",disabled:!0,children:[m.jsx(Mf,{})," ",h.mastered]})]})})]})]})}var xT=({completed:n,mastered:a,total:i,language:s="en"})=>{const r=Vt(s),c=i>0?n/i*100:0;return m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:"completed-counter",title:r.completedTitle,style:{display:"flex",alignItems:"center",gap:"4px"},children:[m.jsx(Ku,{}),n," / ",i]}),m.jsxs("div",{className:"progress-bar-container",children:[m.jsxs("span",{className:"progress-value",children:[c.toFixed(0),"%"]}),m.jsx("div",{className:"progress-bar-fill",style:{width:`${c}%`}})]}),m.jsxs("span",{className:"mastered-counter",title:r.masteredTitle,style:{display:"flex",alignItems:"center",gap:"4px"},children:[m.jsx(Mf,{}),a]})]})},vT=n=>{const a={};return n.forEach(i=>{i.data?.state&&(a[i.id]=i.data.state)}),a},zf=n=>n==="completed"||n==="mastered",Sy=n=>n.type==="task"||n.type==="topic",Df=n=>{const a=[...n];for(let i=0;i<2;i++){const s=vT(a);for(const r of a){if(r.data.state=r.data?.state||"locked",r.data?.unlock?.after&&(r.data.unlock.after.every(u=>zf(s[u]))?r.data.state==="locked"&&(r.data.state="unlocked"):r.data.state="locked"),r.data?.unlock?.date){const c=new Date(r.data.unlock.date);new Date>=c?r.data.state==="locked"&&(r.data.state="unlocked"):r.data.state="locked"}if(!r.data?.unlock?.after&&!r.data?.unlock?.date&&r.data.state==="locked"&&(r.data.state="unlocked"),r.type==="topic"){if(r.data?.completion?.needs){const c=r.data.completion.needs.every(u=>zf(s[u]));r.data.state==="unlocked"&&c&&(r.data.state="completed")}else!r.data?.completion?.needs&&r.data.state==="unlocked"&&(r.data.state="completed");if(r.data?.completion?.optional){const c=r.data.completion.optional.every(u=>zf(s[u]));r.data.state==="completed"&&c&&(r.data.state="mastered")}else!r.data?.completion?.optional&&r.data.state==="completed"&&(r.data.state="mastered")}}}return a},Wn=U0()((n,a)=>({nodes:[],edges:[],settings:{},selectedNode:null,drawerOpen:!1,onNodesChange:i=>{n({nodes:Yu(i,a().nodes)})},setNodes:i=>{n({nodes:i})},setEdges:i=>{n({edges:i})},setSettings:i=>{n({settings:i})},updateNodeState:(i,s)=>{const r=a().nodes.map(u=>u.id===i?{...u,data:{...u.data,state:s}}:u),c=Df(r);n({nodes:c})},setSelectedNode:i=>{n({selectedNode:i})},setDrawerOpen:i=>{n({drawerOpen:i})},loadRoadmapData:(i,s)=>{const r=Array.isArray(i?.nodes)?i.nodes:[],c=Array.isArray(i?.edges)?i.edges:[];let u=r.map(h=>({...h,draggable:!1,connectable:!1,selectable:Sy(h),focusable:Sy(h),data:{...h.data,state:s?.nodes?.[h.id]?.state||h.data?.state}}));u=Df(u),n({nodes:u,edges:c,settings:i?.settings||{}})},getRoadmapState:i=>{const s={nodes:{},x:i.x,y:i.y,zoom:i.zoom};return a().nodes.forEach(r=>{r.data.state&&r.type==="task"&&(s.nodes[r.id]={state:r.data.state})}),s},updateNodesStates:()=>{const i=Df(a().nodes);n({nodes:i})}})),bT={topic:my,task:py,image:uy,text:gy},ST=n=>n.type==="task"||n.type==="topic",wT=n=>{let a=0,i=0,s=0;return n.forEach(r=>{(r.type==="task"||r.type==="topic")&&(s++,r.data?.state==="completed"?a++:r.data?.state==="mastered"&&(a++,i++))}),{completed:a,mastered:i,total:s}};function wy({roadmapData:n,onChange:a,language:i="en",initialState:s}){const r=Wn(U=>U.nodes),c=Wn(U=>U.edges),u=Wn(U=>U.settings),h=Wn(U=>U.selectedNode),g=Wn(U=>U.drawerOpen),p=Wn(U=>U.onNodesChange),x=Wn(U=>U.setSelectedNode),y=Wn(U=>U.setDrawerOpen),v=Wn(U=>U.loadRoadmapData),S=Wn(U=>U.getRoadmapState),b=Wn(U=>U.updateNodeState),{fitView:E,getViewport:_}=Wa(),T=u?.language||i,{completed:z,mastered:N,total:C}=wT(r),D=oT(n);B.useEffect(()=>{v(D,s),s||setTimeout(()=>{E({duration:0,padding:.2})},0)},[n,s,v,E]);const R=B.useCallback((U,F,ae=!1)=>{ST(F)&&(x(F),y(!0),ae&&E({nodes:[F],duration:150}))},[E,x,y]),j=B.useCallback(()=>{y(!1),x(null)},[y,x]),K=B.useCallback(U=>{U.data.state&&b(U.id,U.data.state),x(U)},[b,x]);B.useEffect(()=>{const U=_(),F=S(U);if(a)a(F);else{const ae=document.querySelector("hyperbook-learningmap");ae&&ae.dispatchEvent(new CustomEvent("change",{detail:F}))}},[r,_,S]);const J={animated:!1,style:{stroke:"#94a3b8",strokeWidth:2},type:"default"},fe={x:s?.x||u?.viewport?.x||0,y:s?.y||u?.viewport?.y||0,zoom:s?.zoom||u?.viewport?.zoom||1};return m.jsxs("div",{className:"editor-canvas",style:{backgroundColor:u?.background?.color||"#ffffff"},children:[m.jsxs(Zm,{nodes:r.map(U=>{const F=[];return U.data?.color&&F.push(U.data.color),F.push(U.data?.state),{...U,selected:h?.id===U.id,className:F.join(" ")}}),edges:c,onNodeClick:R,onNodesChange:p,minZoom:.2,nodeTypes:bT,defaultViewport:fe,proOptions:{hideAttribution:!0},defaultEdgeOptions:J,nodesDraggable:!1,nodesConnectable:!1,children:[u?.title&&m.jsx(fa,{position:"bottom-right",children:m.jsx("div",{className:"map-title",children:u.title})}),m.jsx(fa,{position:"top-center",className:"progress-panel",children:m.jsx(xT,{completed:z,total:C,mastered:N,language:T})}),m.jsx(Fm,{showInteractive:!1})]}),m.jsx(yT,{node:h,open:g,onClose:j,onUpdate:K,nodes:r,onNodeClick:R,language:T})]})}var ET=n=>m.jsx("div",{className:"hyperbook-learningmap-container",children:m.jsx(Zu,{children:m.jsx(wy,{...n})})});function Of(n){switch(n){case"image":return 10;case"text":return 20;case"topic":case"task":return 30;default:return 30}}var jr=!0;function _T(n){jr=n}var Ey={nodes:[],edges:[],settings:{background:{color:"#ffffff"}},previewMode:!1,debugMode:!1,showGrid:!1,helpOpen:!1,drawerOpen:!1,settingsDrawerOpen:!1,edgeDrawerOpen:!1,shareDialogOpen:!1,loadExternalDialogOpen:!1,selectedNodeId:null,selectedNodeIds:[],selectedEdge:null,nextNodeId:1,clipboard:null,lastMousePosition:null,shareLink:"",pendingExternalId:null,showCompletionNeeds:!0,showCompletionOptional:!0,showUnlockAfter:!0},AT={equality:(n,a)=>Jk(n,a),handleSet:n=>Pk(500,a=>{n(a)},{noLeading:!1,noTrailing:!0}),partialize:n=>{const{nodes:a,edges:i,settings:s}=n;return{nodes:a,edges:i,settings:s}}},NT={name:"learningmap-data",version:1,partialize:n=>{const{nodes:a,edges:i,settings:s}=n;return{nodes:a,edges:i,settings:s}},storage:{getItem:n=>{if(!jr)return null;const a=localStorage.getItem(n);return a?JSON.parse(a):null},setItem:(n,a)=>{jr&&localStorage.setItem(n,JSON.stringify(a))},removeItem:n=>{jr&&localStorage.removeItem(n)}}},ie=U0()(Xk(Gk((n,a)=>({...Ey,onNodesChange:i=>{n({nodes:Yu(i,a().nodes)})},onEdgesChange:i=>{n({edges:om(i,a().edges)})},onConnect:i=>{n({edges:xg(i,a().edges)})},setNodes:i=>{n({nodes:i})},setEdges:i=>{n({edges:i})},setSettings:i=>{n({settings:i})},updateDebugEdges:()=>{const i=a().debugMode,s=a().nodes,r=a().showCompletionNeeds,c=a().showCompletionOptional,u=a().showUnlockAfter,g=[...a().edges.filter(p=>!p.id.startsWith("debug-"))];i&&(s.forEach(p=>{r&&p.type==="topic"&&p.data?.completion?.needs&&p.data.completion.needs.forEach(x=>{const y=`debug-edge-${x}-to-${p.id}`;g.push({id:y,target:x,source:p.id,animated:!0,style:{stroke:"#f97316",strokeWidth:2,strokeDasharray:"5,5"},type:"floating"})}),c&&p.data?.completion?.optional&&p.data.completion.optional.forEach(x=>{const y=`debug-edge-optional-${x}-to-${p.id}`;g.push({id:y,target:x,source:p.id,animated:!0,style:{stroke:"#eab308",strokeWidth:2,strokeDasharray:"5,5"},type:"floating"})})}),s.forEach(p=>{u&&p.data.unlock?.after&&p.data.unlock.after.forEach(x=>{const y=`debug-edge-${x}-to-${p.id}`;g.push({id:y,target:x,source:p.id,animated:!0,style:{stroke:"#10b981",strokeWidth:2,strokeDasharray:"5,5"},type:"floating"})})})),n({edges:g})},updateNode:(i,s)=>{n({nodes:a().nodes.map(r=>r.id===i?{...r,...s}:r)}),a().updateDebugEdges()},updateNodeData:(i,s)=>{n({nodes:a().nodes.map(r=>r.id===i?{...r,data:{...r.data,...s}}:r)}),a().updateDebugEdges()},updateNodes:i=>{n({nodes:a().nodes.map(s=>{const r=i.find(c=>c.id===s.id);return r||s})}),a().updateDebugEdges()},updateEdge:(i,s)=>{n({edges:a().edges.map(c=>c.id===i?{...c,...s}:c)});const r=a().selectedEdge;r&&r.id===i&&n({selectedEdge:{...r,...s}})},deleteNode:i=>{n({nodes:a().nodes.filter(s=>s.id!==i),edges:a().edges.filter(s=>s.source!==i&&s.target!==i)})},deleteEdge:i=>{n({edges:a().edges.filter(s=>s.id!==i)})},addNode:i=>{n({nodes:[...a().nodes,i]})},setJsonStore:i=>{n({jsonStore:i})},setDefaultLanguage:i=>{n({defaultLanguage:i})},setPreviewMode:i=>n({previewMode:i}),setDebugMode:i=>{n({debugMode:i}),a().updateDebugEdges()},setShowGrid:i=>n({showGrid:i}),setHelpOpen:i=>n({helpOpen:i}),setDrawerOpen:i=>n({drawerOpen:i}),setSettingsDrawerOpen:i=>n({settingsDrawerOpen:i}),setEdgeDrawerOpen:i=>n({edgeDrawerOpen:i}),setShareDialogOpen:i=>n({shareDialogOpen:i}),setLoadExternalDialogOpen:i=>n({loadExternalDialogOpen:i}),setSelectedNodeId:i=>n({selectedNodeId:i}),setSelectedNodeIds:i=>n({selectedNodeIds:i}),setSelectedEdge:i=>n({selectedEdge:i}),setNextNodeId:i=>n({nextNodeId:i}),setClipboard:i=>n({clipboard:i}),setLastMousePosition:i=>n({lastMousePosition:i}),setShareLink:i=>n({shareLink:i}),setPendingExternalId:i=>n({pendingExternalId:i}),setShowCompletionNeeds:i=>{n({showCompletionNeeds:i}),a().updateDebugEdges()},setShowCompletionOptional:i=>{n({showCompletionOptional:i}),a().updateDebugEdges()},setShowUnlockAfter:i=>{n({showUnlockAfter:i}),a().updateDebugEdges()},updateRoadmapData:i=>{a().loadRoadmapData(i),a().updateDebugEdges()},loadRoadmapData:i=>{const s=Array.isArray(i?.nodes)?i.nodes:[],r=Array.isArray(i?.edges)?i.edges:[],c=s.map(h=>({...h,draggable:!0,className:h.data.color?h.data.color:h.className,zIndex:h.zIndex!==void 0?h.zIndex:Of(h.type),data:{...h.data}}));let u=1;s.length>0&&(u=Math.max(...s.map(g=>parseInt(g.id.replace(/\D/g,""),10)).filter(g=>!isNaN(g)))+1),n({nodes:c,edges:r,settings:i?.settings||{background:{color:"#ffffff"}},nextNodeId:u})},getRoadmapData:()=>{const i=a();return{nodes:i.nodes.map(s=>({id:s.id,type:s.type,position:s.position,width:s.width,height:s.height,zIndex:s.zIndex!==void 0?s.zIndex:Of(s.type),data:s.data})),edges:i.edges.filter(s=>!s.id.startsWith("debug-")).map(s=>({id:s.id,source:s.source,target:s.target,sourceHandle:s.sourceHandle,targetHandle:s.targetHandle,animated:s.animated,type:s.type,style:s.style})),settings:i.settings,version:1,type:"learningmap",source:"https://learningmap.app"}},closeAllDrawers:()=>{n({drawerOpen:!1,selectedNodeId:null,edgeDrawerOpen:!1,selectedEdge:null,settingsDrawerOpen:!1})},reset:()=>{n(Ey)}}),AT),NT));function _y(n,a){return Qk(ie.temporal,n,a)}var Ay=()=>{const n=ie(v=>v.jsonStore),a=ie(v=>v.getRoadmapData),i=ie(v=>v.settings.language),s=ie(v=>v.defaultLanguage),r=Vt(i||s),c=ie(v=>v.setShareLink),u=ie(v=>v.setShareDialogOpen),h=ie(v=>v.setLoadExternalDialogOpen),g=ie(v=>v.setPendingExternalId),p=ie(v=>v.loadRoadmapData),x=B.useCallback(()=>{const v=a();if(!v.nodes||v.nodes.length===0){alert(r.emptyMapCannotBeShared);return}fetch(`${n}/api/v2/post`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify(v)}).then(S=>{if(S.status===413)throw alert(r.uploadFileTooLarge),new Error("Payload too large");if(!S.ok)throw new Error(`HTTP error! status: ${S.status}`);return S.json()}).then(S=>{const b=window.location.origin+"#json="+S.id;c(b),u(!0)}).catch(S=>{S.message!=="Payload too large"&&alert(r.uploadFailed)})},[a,n,r,c,u]);return[B.useCallback(v=>{fetch(`${n}/api/v2/${v}`,{method:"GET",mode:"cors"}).then(S=>S.text()).then(S=>{const b=JSON.parse(S);p(b),h(!1)}).catch(()=>{alert(r.loadFailed),h(!1),g(null),window.location.hash=""})},[n,r,p]),x]},Rf=()=>{const n=ie(u=>u.getRoadmapData),a=ie(u=>u.loadRoadmapData),i=ie(u=>u.settings),s=B.useCallback(()=>{if(i?.title&&i.title.trim())return`${i.title.trim().replace(/[<>:"/\\|?*\x00-\x1F]/g,"-").replace(/\s+/g,"-")}.learningmap`;const u=new Date,h=u.getFullYear(),g=String(u.getMonth()+1).padStart(2,"0"),p=String(u.getDate()).padStart(2,"0"),x=String(u.getHours()).padStart(2,"0"),y=String(u.getMinutes()).padStart(2,"0"),v=String(u.getSeconds()).padStart(2,"0");return`${h}-${g}-${p}-${x}${y}${v}.learningmap`},[i?.title]),r=B.useCallback(()=>{const u=n(),h="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(u,null,2)),g=document.createElement("a");g.setAttribute("href",h),g.setAttribute("download",s()),document.body.appendChild(g),g.click(),g.remove()},[n,s]),c=B.useCallback(()=>{const u=document.createElement("input");u.type="file",u.accept=".learningmap,.json,application/json",u.onchange=h=>{const g=h.target.files[0];if(g){const p=new FileReader;p.onload=x=>{try{const y=JSON.parse(x.target.result);a(y)}catch(y){console.error("Failed to parse file",y)}},p.readAsText(g)}},u.click()},[a]);return{downloadRoadmap:r,openRoadmap:c,getFilename:s}},kT=({defaultLanguage:n="en",disableSharing:a=!1,disableFileOperations:i=!1})=>{const{screenToFlowPosition:s}=Wa(),r=ie(Y=>Y.settings),c=ie(Y=>Y.debugMode),u=ie(Y=>Y.previewMode),h=ie(Y=>Y.showCompletionNeeds),g=ie(Y=>Y.showCompletionOptional),p=ie(Y=>Y.showUnlockAfter),x=ie(Y=>Y.setDebugMode),y=ie(Y=>Y.setPreviewMode),v=ie(Y=>Y.setShowCompletionNeeds),S=ie(Y=>Y.setShowCompletionOptional),b=ie(Y=>Y.setShowUnlockAfter),E=ie(Y=>Y.addNode),_=ie(Y=>Y.setSettingsDrawerOpen),T=ie(Y=>Y.setDrawerOpen),z=ie(Y=>Y.setEdgeDrawerOpen),N=ie(Y=>Y.setSelectedNodeId),C=ie(Y=>Y.setSelectedEdge),D=ie(Y=>Y.reset),[R,j]=Ay(),{downloadRoadmap:K,openRoadmap:J}=Rf(),fe=r?.language||n,U=Vt(fe),F=()=>x(!c),ae=()=>y(!u),H=Y=>v(Y),I=Y=>S(Y),k=Y=>b(Y),L=Y=>{const A=s({x:window.innerWidth/2,y:window.innerHeight/2}),O={id:`node-${Date.now()}`,type:Y,position:A,zIndex:Of(Y),data:{label:Y==="task"?U.newTask:Y==="topic"?U.newTopic:Y,state:"unlocked"}};E(O)},$=()=>{_(!0),T(!1),z(!1),N(null),C(null)},Z=()=>{confirm(U.resetMapWarning)&&D()};return m.jsxs("div",{className:"editor-toolbar",children:[m.jsxs("div",{className:"toolbar-group",children:[m.jsxs(ay,{menuButton:m.jsxs(Q0,{disabled:u,className:"toolbar-button",children:[m.jsx(yi,{size:16})," ",m.jsx("span",{className:"toolbar-label",children:U.nodes})]}),children:[m.jsxs(Kt,{onClick:()=>L("task"),children:[m.jsx("span",{children:U.addTask}),m.jsx("span",{style:{marginLeft:"auto",paddingLeft:"16px",color:"#9ca3af",fontSize:"0.875rem"},children:"Ctrl+1"})]}),m.jsxs(Kt,{onClick:()=>L("topic"),children:[m.jsx("span",{children:U.addTopic}),m.jsx("span",{style:{marginLeft:"auto",paddingLeft:"16px",color:"#9ca3af",fontSize:"0.875rem"},children:"Ctrl+2"})]}),m.jsxs(Kt,{onClick:()=>L("image"),children:[m.jsx("span",{children:U.addImage}),m.jsx("span",{style:{marginLeft:"auto",paddingLeft:"16px",color:"#9ca3af",fontSize:"0.875rem"},children:"Ctrl+3"})]}),m.jsxs(Kt,{onClick:()=>L("text"),children:[m.jsx("span",{children:U.addText}),m.jsx("span",{style:{marginLeft:"auto",paddingLeft:"16px",color:"#9ca3af",fontSize:"0.875rem"},children:"Ctrl+4"})]})]}),m.jsxs("button",{disabled:u,onClick:$,className:"toolbar-button",children:[m.jsx(e3,{size:16})," ",m.jsx("span",{className:"toolbar-label",children:U.settings})]})]}),m.jsx("div",{className:"toolbar-group",children:m.jsxs(ay,{menuButton:m.jsx(Q0,{className:"toolbar-button",children:m.jsx(FN,{})}),children:[!i&&m.jsxs(Kt,{onClick:J,children:[m.jsx(a0,{size:16})," ",m.jsx("span",{children:U.open})]}),!i&&m.jsxs(Kt,{onClick:K,children:[m.jsx(n0,{size:16})," ",m.jsx("span",{children:U.download})]}),!a&&m.jsxs(Kt,{onClick:j,children:[m.jsx(t3,{size:16})," ",m.jsx("span",{children:U.share})]}),m.jsx(kf,{}),m.jsxs(Kt,{onClick:Z,children:[m.jsx(WN,{size:16})," ",m.jsx("span",{children:U.reset}),m.jsx("span",{style:{marginLeft:"auto",paddingLeft:"16px",color:"#9ca3af",fontSize:"0.875rem"},children:"Ctrl+Del"})]}),m.jsx(kf,{}),m.jsxs($k,{className:`${c?"active":""}`,label:m.jsxs(m.Fragment,{children:[m.jsx(ZN,{size:16})," ",m.jsx("span",{children:U.debug})]}),children:[m.jsxs(Kt,{type:"checkbox",checked:c,onClick:F,children:[m.jsx("span",{children:U.enableDebugMode}),m.jsx("span",{style:{marginLeft:"auto",paddingLeft:"16px",color:"#9ca3af",fontSize:"0.875rem"},children:"Ctrl+D"})]}),m.jsx(Kt,{type:"checkbox",checked:h,onClick:Y=>H(Y.checked??!1),disabled:!c,children:U.showCompletionNeedsEdges}),m.jsx(Kt,{type:"checkbox",checked:g,onClick:Y=>I(Y.checked??!1),disabled:!c,children:U.showCompletionOptionalEdges}),m.jsx(Kt,{type:"checkbox",checked:p,onClick:Y=>k(Y.checked??!1),disabled:!c,children:U.showUnlockAfterEdges})]}),m.jsxs(Kt,{onClick:ae,className:`${u?"active":""}`,children:[m.jsx(KN,{size:16})," ",m.jsx("span",{children:U.preview}),m.jsx("span",{style:{marginLeft:"auto",paddingLeft:"16px",color:"#9ca3af",fontSize:"0.875rem"},children:"Ctrl+P"})]}),m.jsx(kf,{}),m.jsxs(Kt,{href:"https://openpatch.org",target:"_blank",rel:"noopener noreferrer",children:[m.jsx(Fu,{size:16})," ",m.jsx("span",{children:"OpenPatch"})]}),m.jsxs(Kt,{href:"https://github.com/openpatch/learningmap",target:"_blank",rel:"noopener noreferrer",children:[m.jsx(Fu,{size:16})," ",m.jsx("span",{children:"GitHub"})]}),m.jsxs(Kt,{href:"https://fosstodon.org/@openpatch",target:"_blank",rel:"noopener noreferrer",children:[m.jsx(Fu,{size:16})," ",m.jsx("span",{children:"Mastodon"})]})]})})]})},TT='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8" standalone="no"?>%0A<svg%0A version="1.0"%0A width="50"%0A height="50"%0A viewBox="0 0 37.500001 37.500001"%0A preserveAspectRatio="xMidYMid"%0A id="svg54"%0A sodipodi:docname="learningmap-plain-mixed.svg"%0A inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"%0A inkscape:export-filename="/home/mike/Downloads/learningmap.png"%0A inkscape:export-xdpi="491.51999"%0A inkscape:export-ydpi="491.51999"%0A xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"%0A xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"%0A xmlns="http://www.w3.org/2000/svg"%0A xmlns:svg="http://www.w3.org/2000/svg">%0A <defs%0A id="defs58" />%0A <sodipodi:namedview%0A id="namedview56"%0A pagecolor="%23ffffff"%0A bordercolor="%23666666"%0A borderopacity="1.0"%0A inkscape:pageshadow="2"%0A inkscape:pageopacity="0.0"%0A inkscape:pagecheckerboard="true"%0A inkscape:document-units="pt"%0A showgrid="false"%0A inkscape:zoom="7.7603997"%0A inkscape:cx="26.931603"%0A inkscape:cy="30.604094"%0A inkscape:window-width="1245"%0A inkscape:window-height="1150"%0A inkscape:window-x="0"%0A inkscape:window-y="0"%0A inkscape:window-maximized="1"%0A inkscape:current-layer="g52"%0A inkscape:showpageshadow="2"%0A inkscape:deskcolor="%23d1d1d1"%0A showguides="false" />%0A <g%0A transform="matrix(0.0013712,0,0,-0.0013712,-38.39034,81.01027)"%0A fill="%23000000"%0A stroke="none"%0A id="g52"%0A style="fill:none;stroke:%23ffffff">%0A <g%0A id="g16"%0A transform="translate(63.576458,-228.27348)"%0A style="stroke:%23004c45;stroke-opacity:1;stroke-width:729.28821288;stroke-dasharray:none;fill:none;stroke-linecap:round">%0A <path%0A style="fill:%23b5e3d9;fill-opacity:1;stroke:%23017460;stroke-width:0.219075;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;paint-order:markers stroke fill"%0A d="M 7.8503375,12.263719 C 5.987097,12.170355 4.4345451,14.117912 4.897315,15.915685 5.1668841,17.442336 6.7312924,18.536741 8.2606756,18.268177 10.187887,18.09635 11.40714,15.817375 10.649965,14.076224 10.233925,12.9249 9.0517431,12.226794 7.8503375,12.263719 Z"%0A id="path3"%0A transform="matrix(546.96616,0,0,-546.96616,27934.046,59308.109)" />%0A <path%0A style="fill:%23b5e3d9;fill-opacity:1;stroke:%23017460;stroke-width:0.219075;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;paint-order:markers stroke fill"%0A d="m 25.056299,3.0627741 c -1.974898,-0.015164 -3.467995,2.2292736 -2.727957,4.0486125 0.450169,1.2654015 1.767925,2.1859291 3.129391,1.9534515 1.34906,0.022204 2.496898,-1.1939386 2.731298,-2.4592071 0.255249,-1.5561519 -0.773325,-3.2597319 -2.388219,-3.4912972 -0.245289,-0.044603 -0.495438,-0.061389 -0.744513,-0.05156 z"%0A id="path4"%0A transform="matrix(546.96616,0,0,-546.96616,27934.046,59308.109)" />%0A <path%0A style="fill:%23b5e3d9;fill-opacity:1;stroke:%23017460;stroke-width:0.219075;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;paint-order:markers stroke fill"%0A d="m 42.066077,12.257728 c -2.070515,-0.09267 -3.611178,2.384816 -2.692657,4.220835 0.746299,1.945097 3.64545,2.452556 5.004713,0.868813 1.314217,-1.327061 0.967161,-3.771925 -0.658081,-4.691504 -0.493432,-0.300762 -1.083284,-0.401997 -1.653975,-0.398144 z"%0A id="path5"%0A transform="matrix(546.96616,0,0,-546.96616,27934.046,59308.109)" />%0A <path%0A style="fill:%23b5e3d9;fill-opacity:1;stroke:%23017460;stroke-width:0.219075;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;paint-order:markers stroke fill"%0A d="m 42.123627,32.194856 c -1.934022,-0.06402 -3.513785,2.071529 -2.876004,3.893933 0.398196,1.298064 1.673135,2.284371 3.058281,2.14069 1.963712,0.01584 3.419813,-2.200138 2.727101,-4.010531 -0.396895,-1.232189 -1.619636,-2.071043 -2.909378,-2.024092 z"%0A id="path6"%0A transform="matrix(546.96616,0,0,-546.96616,27934.046,59308.109)" />%0A <path%0A d="m 43605.56,35704.39 5863.142,3474.937 c -149.103,262.479 -227.509,559.171 -227.546,861.044 0.116,452.903 176.187,888.384 491.415,1213.581 315.226,325.197 744.877,514.593 1197.556,528.805 v 7431.048 c -452.865,14.218 -882.3,204.448 -1197.556,529.874 -315.257,325.426 -491.578,760.493 -491.415,1213.581 0.05,246.783 52.483,490.746 153.834,715.757 v 1.068 l -6117.048,3531.777 c -291.575,-601.244 -901.107,-982.981 -1569.322,-982.829 -704.464,0.132 -1339.645,424.149 -1609.918,1074.703 l -6278.36,-3624.719 c 101.718,-224.93 154.517,-468.896 154.903,-715.757 0.163,-453.088 -176.158,-888.155 -491.415,-1213.581 -315.257,-325.427 -744.691,-515.657 -1197.557,-529.874 v -8013.267 c 452.865,-14.218 882.3,-204.448 1197.557,-529.874 315.257,-325.427 491.577,-760.493 491.415,-1213.581 -0.01,-129.026 -14.343,-257.653 -42.732,-383.517 v -1.069 l 5755.41,-3213.941"%0A style="fill:none;stroke:%23017460;stroke-width:729.288;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"%0A id="path18"%0A sodipodi:nodetypes="cccsccsccccccccsccscccc" />%0A <g%0A id="g12"%0A transform="translate(20.985367)"%0A style="fill:none;fill-opacity:1;stroke:%23004c45;stroke-opacity:1;stroke-width:729.28821288;stroke-dasharray:none;stroke-linecap:round" />%0A <g%0A id="g12-4"%0A transform="matrix(1.0000018,0,0,1.0000018,2848.628,2322.2166)"%0A style="fill:none;fill-opacity:1;stroke:%23004c45;stroke-opacity:1;stroke-width:729.28690016;stroke-dasharray:none;stroke-linecap:round" />%0A <path%0A d="m 43595.73,35689.66 c 62.193,-490.969 -53.597,-909.978 -156.775,-1126.242 -193.529,-405.641 -309.849,-610.393 -672.936,-875.187 -363.091,-264.797 -805.968,-397.066 -1254.802,-374.784 -448.829,22.282 -876.497,197.766 -1211.694,497.155 -335.196,299.389 -557.677,704.601 -630.309,1148.074 -72.633,443.478 8.975,898.424 231.245,1288.998 222.268,390.571 571.757,693.153 990.166,857.263"%0A id="path1-2-0"%0A style="fill:none;stroke:%23017460;stroke-width:729.288;stroke-linecap:round;stroke-dasharray:none;stroke-opacity:1"%0A sodipodi:nodetypes="cssssssc" />%0A <path%0A d="m 40849.11,35368.518 683.354,-477.479 1591.603,2277.848"%0A id="path2-2"%0A style="stroke:%23017460;stroke-width:729.28821288;stroke-dasharray:none;stroke-opacity:1;fill:none;stroke-linecap:round;fill-opacity:0" />%0A <circle%0A cx="50984.348"%0A cy="-50953.406"%0A r="1743.692"%0A id="circle1-9-0-6"%0A transform="scale(1,-1)"%0A style="fill:none;fill-opacity:1;stroke:%23017460;stroke-width:729.28821288;stroke-dasharray:none;stroke-opacity:1;stroke-linecap:round" />%0A <circle%0A cx="50988.066"%0A cy="-40043.738"%0A r="1743.692"%0A id="circle1-9-0-6-0"%0A transform="scale(1,-1)"%0A style="fill:%23b5e3d9;fill-opacity:1;stroke:%23017460;stroke-width:729.28821288;stroke-dasharray:none;stroke-opacity:1;stroke-linecap:round" />%0A <circle%0A cx="41713.258"%0A cy="-55971.996"%0A r="1743.692"%0A id="circle1-9-0-6-1"%0A transform="scale(1,-1)"%0A style="fill:none;fill-opacity:1;stroke:%23017460;stroke-width:729.28821288;stroke-dasharray:none;stroke-opacity:1;stroke-linecap:round" />%0A <circle%0A cx="32237.596"%0A cy="-50954.227"%0A r="1743.6952"%0A id="circle1-9-0-6-1-5"%0A transform="scale(1,-1)"%0A style="fill:none;fill-opacity:1;stroke:%23017460;stroke-width:729.28821288;stroke-dasharray:none;stroke-opacity:1;stroke-linecap:round" />%0A <g%0A id="g6">%0A <path%0A style="fill:%23b5e3d9;fill-opacity:1;stroke:%23017460;stroke-width:0.219075;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;paint-order:markers stroke fill"%0A d="m 7.7589848,33.262848 c -1.9285094,-0.03754 -3.4162729,2.069333 -2.828509,3.882808 0.4477732,1.743016 2.5850355,2.717411 4.190883,1.898509 1.0920472,-0.463941 1.8542062,-1.605018 1.7136832,-2.809147 0.117257,-1.625749 -1.4957684,-3.052661 -3.0760572,-2.97217 z"%0A id="path2"%0A transform="matrix(546.96616,0,0,-546.96616,27934.046,59308.109)" />%0A <circle%0A cx="32230.184"%0A cy="-39458.945"%0A r="1743.6984"%0A id="circle1-9-0-6-1-5-7"%0A transform="scale(1,-1)"%0A style="fill:none;fill-opacity:1;stroke:%23017460;stroke-width:729.28821288;stroke-dasharray:none;stroke-opacity:1;stroke-linecap:round" />%0A </g>%0A </g>%0A <g%0A id="g15"%0A transform="matrix(1.1225034,0,0,1.1225034,-5720.3933,-6172.9528)"%0A style="fill:none;stroke:%23017460;stroke-width:974.54700097;stroke-dasharray:none;stroke-opacity:1">%0A <path%0A d="m 45485.685,47422.605 a 4375.7293,4375.7293 0 0 1 -8735.049,-380.688 c 0,-2565.272 2673.023,-5230.091 3840.796,-6272.608"%0A id="path1-4"%0A style="fill:none;stroke:%23017460;stroke-width:974.54700097;stroke-dasharray:none;stroke-opacity:1" />%0A <path%0A d="m 47349.746,43417.719 a 1161.8375,1161.8375 0 0 1 -1643.086,1643.086 l -2193.335,-2194.428 a 1093.9323,1093.9323 0 0 1 -276.764,-467.109 l -457.811,-1569.793 a 273.48308,273.48308 0 0 1 339.119,-339.119 l 1569.793,457.811 a 1093.9323,1093.9323 0 0 1 467.109,276.764 z"%0A id="path2-7"%0A style="fill:%23a9f7a1;fill-opacity:1;stroke:%23017460;stroke-width:974.54700097;stroke-dasharray:none;stroke-opacity:1" />%0A <circle%0A cx="41126.367"%0A cy="-47041.914"%0A r="1640.8984"%0A id="circle2"%0A transform="scale(1,-1)"%0A style="fill:%23b5e3d9;fill-opacity:1;stroke:%23017460;stroke-width:974.54700097;stroke-dasharray:none;stroke-opacity:1" />%0A </g>%0A </g>%0A</svg>%0A',CT=({defaultLanguage:n="en"})=>{const a=ie(p=>p.settings),i=ie(p=>p.addNode),s=ie(p=>p.setHelpOpen),{openRoadmap:r}=Rf(),c=a?.language||n,u=Vt(c),h=()=>{const p={x:window.innerWidth/2,y:window.innerHeight/2},x={id:`node-${Date.now()}`,type:"topic",position:p,data:{label:u.newTopic,state:"unlocked"}};i(x)},g=()=>s(!0);return m.jsx("div",{className:"welcome-message",children:m.jsxs("div",{className:"welcome-content",children:[m.jsxs("h1",{className:"welcome-title",children:[m.jsx("img",{src:TT,alt:"Logo",className:"welcome-logo"}),u.welcomeTitle]}),m.jsx("p",{className:"welcome-subtitle",children:u.welcomeSubtitle}),m.jsxs("div",{className:"welcome-actions",children:[m.jsxs("button",{onClick:r,className:"primary-button",children:[m.jsx(a0,{size:18}),u.welcomeOpenFile]}),m.jsxs("button",{onClick:h,className:"primary-button",children:[m.jsx(yi,{size:18}),u.welcomeAddTopic]}),m.jsxs("button",{onClick:g,className:"secondary-button",children:[m.jsx(l0,{size:18}),u.welcomeHelp]})]})]})})},MT=({id:n,source:a,target:i,markerEnd:s,style:r})=>{const c=Im(a),u=Im(i);if(!c||!u)return null;const{sx:h,sy:g,tx:p,ty:x,sourcePos:y,targetPos:v}=iT(c,u),[S]=Nu({sourceX:h,sourceY:g,sourcePosition:y,targetPosition:v,targetX:p,targetY:x});return m.jsx("path",{id:n,className:"react-flow__edge-path",d:S,markerEnd:s,style:r})},zT=MT,DT=()=>{const n=ie(b=>b.selectedNodeIds),a=ie(b=>b.nodes),i=ie(b=>b.updateNodes),s=a.filter(b=>n.includes(b.id));if(s.length<2)return null;const r=()=>{if(s.length<2)return;const b=Math.min(...s.map(_=>_.position.x)),E=s.map(_=>({..._,position:{..._.position,x:b}}));i(E)},c=()=>{if(s.length<2)return;const b=s.reduce((_,T)=>_+T.position.x+(T.width||T.measured.width)/2,0)/s.length,E=s.map(_=>({..._,position:{..._.position,x:b-(_.width||_.measured.width)/2}}));i(E)},u=()=>{if(s.length<2)return;const b=Math.max(...s.map(_=>_.position.x+(_.width||0))),E=s.map(_=>({..._,position:{..._.position,x:b-(_.width||_.measured.width)}}));i(E)},h=()=>{if(s.length<2)return;const b=Math.min(...s.map(_=>_.position.y)),E=s.map(_=>({..._,position:{..._.position,y:b}}));i(E)},g=()=>{if(s.length<2)return;const b=s.reduce((_,T)=>_+T.position.y+(T.height||T.measured.height)/2,0)/s.length,E=s.map(_=>({..._,position:{..._.position,y:b-(_.height||_.measured.height)/2}}));i(E)},p=()=>{if(s.length<2)return;const b=Math.max(...s.map(_=>_.position.y+(_.height||0))),E=s.map(_=>({..._,position:{..._.position,y:b-(_.height||_.measured.height)}}));i(E)},x=()=>{if(s.length<3)return;const b=[...s].sort((R,j)=>R.position.y-j.position.y),E=b[0].position.y,_=b.reduce((R,j)=>R+(j.height||j.measured.height),0),z=b[b.length-1].position.y-E+(b[b.length-1].height||b[b.length-1].measured.height)-_,N=b.length>1?z/(b.length-1):0;let C=E;const D=b.map((R,j)=>{const K={...R,position:{...R.position,y:C}};return C+=(R.height||R.measured.height)+N,K});i(D)},y=()=>{if(s.length<3)return;const b=[...s].sort((R,j)=>R.position.x-j.position.x),E=b[0].position.x,_=b.reduce((R,j)=>R+(j.width||j.measured.width),0),z=b[b.length-1].position.x-E+(b[b.length-1].width||b[b.length-1].measured.width)-_,N=b.length>1?z/(b.length-1):0;let C=E;const D=b.map((R,j)=>{const K={...R,position:{...R.position,x:C}};return C+=(R.width||R.measured.width)+N,K});i(D)},v=()=>{if(s.length<2)return;const b=Math.max(...s.map(_=>_.width||_.measured.width)),E=s.map(_=>({..._,width:b}));i(E)},S=()=>{if(s.length<2)return;const b=Math.max(...s.map(_=>_.height||_.measured.height)),E=s.map(_=>({..._,height:b}));i(E)};return m.jsxs(fa,{position:"bottom-center",className:"multi-node-panel",children:[m.jsx("button",{title:"Align Left Horizontal",onClick:h,children:m.jsx(qN,{})}),m.jsx("button",{title:"Align Center Horizontal",onClick:g,children:m.jsx(BN,{})}),m.jsx("button",{title:"Align Right Horizontal",onClick:p,children:m.jsx(VN,{})}),m.jsx("button",{title:"Align Top Vertical",onClick:r,children:m.jsx(XN,{})}),m.jsx("button",{title:"Align Center Vertical",onClick:c,children:m.jsx(UN,{})}),m.jsx("button",{title:"Align Bottom Vertical",onClick:u,children:m.jsx(YN,{})}),s.length>2&&m.jsx("button",{title:"Distribute Vertical",onClick:x,children:m.jsx(GN,{})}),s.length>2&&m.jsx("button",{title:"Distribute Horizontal",onClick:y,children:m.jsx($N,{})}),m.jsx("button",{title:"Same Width",onClick:v,children:m.jsx(s0,{})}),m.jsx("button",{title:"Same Height",onClick:S,children:m.jsx(s0,{style:{transform:"rotate(90deg)"}})})]})};function Ny({localNode:n,handleFieldChange:a,handleResourceChange:i,addResource:s,removeResource:r,handleUnlockAfterChange:c,addUnlockAfter:u,removeUnlockAfter:h,renderNodeSelect:g,handleCompletionNeedsChange:p,addCompletionNeed:x,removeCompletionNeed:y,handleCompletionOptionalChange:v,addCompletionOptional:S,removeCompletionOptional:b,language:E="en"}){const _=Vt(E),T=[{value:"blue",label:_.blue,className:"react-flow__node-topic blue"},{value:"yellow",label:_.yellow,className:"react-flow__node-topic yellow"},{value:"lila",label:_.lila,className:"react-flow__node-topic lila"},{value:"pink",label:_.pink,className:"react-flow__node-topic pink"},{value:"teal",label:_.teal,className:"react-flow__node-topic teal"},{value:"red",label:_.red,className:"react-flow__node-topic red"},{value:"black",label:_.black,className:"react-flow__node-topic black"},{value:"white",label:_.white,className:"react-flow__node-topic white"}];let z="blue";n.type==="topic"&&(z="yellow");const N=n.data?.color||z;return m.jsxs("div",{className:"panel-content",children:[m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.nodeColor}),m.jsx("div",{style:{display:"flex",gap:12,marginTop:8},children:T.map(C=>m.jsx("button",{type:"button","aria-label":C.label,onClick:()=>a("color",C.value),className:C.className,style:{width:28,height:28,borderRadius:6,cursor:"pointer",fontWeight:"bold",boxSizing:"border-box",display:"inline-block",padding:0},children:N===C.value?"X":""},C.value))})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.labelRequired}),m.jsx("input",{type:"text",value:n.data?.label||"",onChange:C=>a("label",C.target.value),placeholder:_.placeholderNodeLabel})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.fontSize}),m.jsx("div",{style:{display:"flex",gap:8,marginTop:8},children:["S","M","L","XL"].map(C=>{const D=aT(n.data.fontSize)===C;return m.jsx("button",{type:"button",onClick:()=>a("fontSize",Io[C]),style:{width:40,height:40,borderRadius:6,border:D?"2px solid #3b82f6":"1px solid #d1d5db",backgroundColor:D?"#eff6ff":"#ffffff",color:D?"#3b82f6":"#374151",cursor:"pointer",fontWeight:D?"bold":"normal",fontSize:"14px"},children:C},C)})})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.summary}),m.jsx("input",{type:"text",value:n.data.summary||"",onChange:C=>a("summary",C.target.value),placeholder:_.placeholderShortSummary})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.description}),m.jsx("textarea",{value:n.data.description||"",onChange:C=>a("description",C.target.value),placeholder:_.placeholderDetailedDescription,rows:4})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.duration}),m.jsx("input",{type:"text",value:n.data.duration||"",onChange:C=>a("duration",C.target.value),placeholder:"e.g., 30 min"})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.videoURL}),m.jsx("input",{type:"text",value:n.data.video||"",onChange:C=>a("video",C.target.value),placeholder:_.placeholderVideoURL})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.resources}),(n.data.resources||[]).map((C,D)=>{const R=C.type==="book";return m.jsxs("div",{style:{marginBottom:"16px",padding:"12px",border:"1px solid #e5e7eb",borderRadius:"6px"},children:[m.jsxs("div",{style:{display:"flex",gap:"8px",marginBottom:"8px"},children:[m.jsxs("select",{value:C.type||"url",onChange:j=>i(D,"type",j.target.value),style:{flex:.5},children:[m.jsx("option",{value:"url",children:"URL"}),m.jsx("option",{value:"book",children:"Book"})]}),m.jsx("input",{type:"text",value:C.label||"",onChange:j=>i(D,"label",j.target.value),placeholder:_.placeholderLabel,style:{flex:1}}),m.jsx("button",{onClick:()=>r(D),className:"icon-button",children:m.jsx(xi,{size:16})})]}),R?m.jsxs(m.Fragment,{children:[m.jsx("input",{type:"text",value:C.bookName||"",onChange:j=>i(D,"bookName",j.target.value),placeholder:"Book name (e.g., Lambacher Schweitzer GK)",style:{width:"100%",marginBottom:"8px"}}),m.jsx("input",{type:"text",value:C.bookLocation||"",onChange:j=>i(D,"bookLocation",j.target.value),placeholder:"Location (e.g., S. 223 Nr. 5)",style:{width:"100%"}})]}):m.jsx("input",{type:"text",value:C.url||"",onChange:j=>i(D,"url",j.target.value),placeholder:_.placeholderURL,style:{width:"100%"}})]},D)}),m.jsxs("button",{onClick:s,className:"secondary-button",children:[m.jsx(yi,{size:16})," ",_.addResource]})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.unlockPassword}),m.jsx("input",{type:"text",value:n.data.unlock?.password||"",onChange:C=>a("unlock",{...n.data.unlock||{},password:C.target.value}),placeholder:_.placeholderOptionalPassword})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.unlockDate}),m.jsx("input",{type:"date",value:n.data.unlock?.date||"",onChange:C=>a("unlock",{...n.data.unlock||{},date:C.target.value})})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.unlockAfter}),(n.data.unlock?.after||[]).map((C,D)=>m.jsxs("div",{style:{display:"flex",gap:"8px",marginBottom:"8px"},children:[g(C,R=>c(D,R)),m.jsx("button",{onClick:()=>h(D),className:"icon-button",children:m.jsx(xi,{size:16})})]},D)),m.jsxs("button",{onClick:u,className:"secondary-button",children:[m.jsx(yi,{size:16})," ",_.unlockAfter]})]}),n.type==="topic"&&m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.completionNeeds}),(n.data.completion?.needs||[]).map((C,D)=>m.jsxs("div",{style:{display:"flex",gap:"8px",marginBottom:"8px"},children:[g(C,R=>p(D,R)),m.jsx("button",{onClick:()=>y(D),className:"icon-button",children:m.jsx(xi,{size:16})})]},D)),m.jsxs("button",{onClick:x,className:"secondary-button",children:[m.jsx(yi,{size:16})," ",_.completionNeeds]})]}),n.type==="topic"&&m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:_.completionOptional}),(n.data.completion?.optional||[]).map((C,D)=>m.jsxs("div",{style:{display:"flex",gap:"8px",marginBottom:"8px"},children:[g(C,R=>v(D,R)),m.jsx("button",{onClick:()=>b(D),className:"icon-button",children:m.jsx(xi,{size:16})})]},D)),m.jsxs("button",{onClick:S,className:"secondary-button",children:[m.jsx(yi,{size:16})," ",_.completionOptional]})]})]})}function OT(n){return m.jsx(Ny,{...n})}async function RT(n,a=1920,i=1920,s=.85){return new Promise((r,c)=>{const u=new FileReader;u.onload=h=>{const g=new Image;g.onload=()=>{const p=document.createElement("canvas");let x=g.width,y=g.height;if(x>a||y>i){const b=x/y;x>y?(x=a,y=a/b):(y=i,x=i*b)}p.width=x,p.height=y;const v=p.getContext("2d");if(!v){c(new Error("Failed to get canvas context"));return}v.drawImage(g,0,0,x,y);const S=p.toDataURL("image/jpeg",s);r(S)},g.onerror=()=>{c(new Error("Failed to load image"))},g.src=h.target?.result},u.onerror=()=>{c(new Error("Failed to read file"))},u.readAsDataURL(n)})}function jT({localNode:n,handleFieldChange:a,language:i="en"}){const s=Vt(i),r=async c=>{const u=c.target.files?.[0];if(u)try{if(u.type==="image/svg+xml"){const h=new FileReader;h.onload=()=>{typeof h.result=="string"&&a("data",h.result)},h.readAsDataURL(u)}else{const h=await RT(u);a("data",h)}}catch(h){console.error("Failed to process image:",h);const g=new FileReader;g.onload=()=>{typeof g.result=="string"&&a("data",g.result)},g.readAsDataURL(u)}};return m.jsxs("div",{className:"panel-content",children:[m.jsxs("div",{className:"form-group",children:[m.jsxs("label",{children:[s.image," (JPG, PNG, WebP, SVG)"]}),m.jsx("input",{type:"file",accept:"image/png,image/jpeg,image/webp,image/svg+xml",onChange:r})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:s.caption}),m.jsx("input",{type:"text",value:n.data.caption||"",onChange:c=>a("caption",c.target.value),placeholder:s.placeholderImageCaption})]}),n.data.data&&m.jsxs("div",{style:{marginTop:16},children:[m.jsx("label",{children:"Preview:"}),m.jsx("div",{children:m.jsx("img",{src:n.data.data,alt:"Preview",style:{maxWidth:"100%",maxHeight:200}})})]})]})}var Lr=({value:n,onChange:a,label:i})=>m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[i&&m.jsx("label",{style:{marginRight:8},children:i}),m.jsx("input",{type:"color",value:n,onChange:s=>a(s.target.value),style:{width:32,height:32,border:"none",background:"none",padding:0}}),m.jsx("input",{type:"text",value:n,onChange:s=>a(s.target.value),placeholder:"#e5e7eb",style:{width:100}})]});function LT({value:n,onChange:a}){return m.jsxs("div",{className:"form-group",children:[m.jsxs("label",{children:["Rotation (degrees): ",n,"°"]}),m.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[m.jsx("input",{type:"range",min:0,max:360,value:n,onChange:i=>a(Number(i.target.value)),style:{flex:1}}),m.jsx("input",{type:"number",min:0,max:360,value:n,onChange:i=>{let s=Number(i.target.value);isNaN(s)&&(s=0),s<0&&(s=0),s>360&&(s=360),a(s)},style:{width:100}})]})]})}function HT({localNode:n,handleFieldChange:a,language:i="en"}){const s=Vt(i);return m.jsxs("div",{className:"panel-content",children:[m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:s.text}),m.jsx("input",{type:"text",value:n.data.text||"",onChange:r=>a("text",r.target.value),placeholder:s.placeholderBackgroundText})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:s.fontSize}),m.jsx("input",{type:"number",value:n.data.fontSize||32,onChange:r=>a("fontSize",Number(r.target.value))})]}),m.jsx("div",{className:"form-group",children:m.jsx(Lr,{label:s.color,value:n.data.color||"#e5e7eb",onChange:r=>a("color",r)})}),m.jsx(LT,{value:n.data.rotation||0,onChange:r=>a("rotation",r)})]})}var BT=({defaultLanguage:n="en"})=>{const a=ie(A=>A.selectedNodeId),i=ie(A=>A.nodes),s=ie(A=>A.drawerOpen),r=ie(A=>A.settings),c=ie(A=>A.nextNodeId),u=ie(A=>A.setDrawerOpen),h=ie(A=>A.setSelectedNodeId),g=ie(A=>A.updateNode),p=ie(A=>A.deleteNode),x=ie(A=>A.addNode),y=ie(A=>A.setNextNodeId),v=r?.language||n,S=Vt(v),b=i.find(A=>A.id===a)||null;B.useEffect(()=>{s&&!b&&(u(!1),h(null))},[b,s,u,h]);const E=()=>{u(!1),h(null)},_=()=>{b&&(p(b.id),E())},T=()=>{if(!b)return;const A=`node-${c}`,O={...b,id:A,position:{x:b.position.x+20,y:b.position.y+20},data:{...b.data,label:`${b.data.label} (copy)`},selected:!1};x(O),y(c+1),h(A)};if(!s||!b)return null;const z=i.filter(A=>A.id!==b.id&&(A.type==="task"||A.type==="topic")),N=ie.getState().edges,C=new Set;N.forEach(A=>{A.source===b.id&&C.add(A.target),A.target===b.id&&C.add(A.source)});const D=[...z].sort((A,O)=>{const G=C.has(A.id),P=C.has(O.id);if(G&&!P)return-1;if(!G&&P)return 1;const se=(A.data.label||A.id).toLowerCase(),ge=(O.data.label||O.id).toLowerCase();return se.localeCompare(ge)}),R=(A,O)=>m.jsxs("select",{value:A,onChange:G=>O(G.target.value),children:[m.jsx("option",{value:"",children:S.selectNode}),D.map(G=>m.jsx("option",{value:G.id,children:G.data.label||G.id},G.id))]}),j=(A,O)=>{if(!b)return;const G=[...b.data.completion?.needs||[]];G[A]=O,k("completion",{...b.data.completion||{},needs:G})},K=()=>{if(!b)return;const A=[...b.data.completion?.needs||[],""];k("completion",{...b.data.completion||{},needs:A})},J=A=>{if(!b)return;const O=(b.data.completion?.needs||[]).filter((G,P)=>P!==A);k("completion",{...b.data.completion||{},needs:O})},fe=(A,O)=>{if(!b)return;const G=[...b.data.completion?.optional||[]];G[A]=O,k("completion",{...b.data.completion||{},optional:G})},U=()=>{if(!b)return;const A=[...b.data.completion?.optional||[],""];k("completion",{...b.data.completion||{},optional:A})},F=A=>{if(!b)return;const O=(b.data.completion?.optional||[]).filter((G,P)=>P!==A);k("completion",{...b.data.completion||{},optional:O})},ae=(A,O)=>{if(!b)return;const G=[...b.data.unlock?.after||[]];G[A]=O,k("unlock",{...b.data.unlock||{},after:G})},H=()=>{if(!b)return;const A=[...b.data.unlock?.after||[],""];k("unlock",{...b.data.unlock||{},after:A})},I=A=>{if(!b)return;const O=(b.data.unlock?.after||[]).filter((G,P)=>P!==A);k("unlock",{...b.data.unlock||{},after:O})},k=(A,O)=>{if(!b)return;const G={...b,data:{...b.data,[A]:O},className:A==="color"?O:b.className};g(b.id,G)},L=(A,O,G)=>{if(!b)return;const P=[...b.data.resources||[]];P[A]={...P[A],[O]:G},k("resources",P)},$=()=>{if(!b)return;const A=[...b.data.resources||[],{label:"",type:"url",url:""}];k("resources",A)},Z=A=>{if(!b)return;const O=(b.data.resources||[]).filter((G,P)=>P!==A);k("resources",O)};let Y;return b.type==="task"?Y=m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"panel-header",children:[m.jsx("h2",{className:"panel-title",children:S.editTask}),m.jsx("button",{onClick:E,className:"close-button",children:m.jsx(da,{size:20})})]}),m.jsx(Ny,{localNode:b,handleFieldChange:k,handleResourceChange:L,addResource:$,removeResource:Z,handleUnlockAfterChange:ae,addUnlockAfter:H,removeUnlockAfter:I,renderNodeSelect:R,handleCompletionNeedsChange:j,addCompletionNeed:K,removeCompletionNeed:J,handleCompletionOptionalChange:fe,addCompletionOptional:U,removeCompletionOptional:F,language:v})]}):b.type==="topic"?Y=m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"panel-header",children:[m.jsx("h2",{className:"panel-title",children:S.editTopic}),m.jsx("button",{onClick:E,className:"close-button",children:m.jsx(da,{size:20})})]}),m.jsx(OT,{localNode:b,handleFieldChange:k,handleResourceChange:L,addResource:$,removeResource:Z,handleUnlockAfterChange:ae,addUnlockAfter:H,removeUnlockAfter:I,renderNodeSelect:R,handleCompletionNeedsChange:j,addCompletionNeed:K,removeCompletionNeed:J,handleCompletionOptionalChange:fe,addCompletionOptional:U,removeCompletionOptional:F,language:v})]}):b.type==="image"?Y=m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"panel-header",children:[m.jsx("h2",{className:"panel-title",children:S.editImage}),m.jsx("button",{onClick:E,className:"close-button",children:m.jsx(da,{size:20})})]}),m.jsx(jT,{localNode:b,handleFieldChange:k,language:v})]}):b.type==="text"&&(Y=m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"panel-header",children:[m.jsx("h2",{className:"panel-title",children:S.editText}),m.jsx("button",{onClick:E,className:"close-button",children:m.jsx(da,{size:20})})]}),m.jsx(HT,{localNode:b,handleFieldChange:k,language:v})]})),m.jsx(fa,{position:"center-right",className:"editor-panel",children:m.jsxs("div",{className:"panel-inner",children:[Y,m.jsxs("div",{className:"panel-footer",children:[m.jsxs("button",{onClick:T,className:"secondary-button",children:[m.jsx(QN,{size:16})," ",S.copyNode]}),m.jsxs("button",{onClick:_,className:"danger-button",children:[m.jsx(xi,{size:16})," ",S.deleteNode]})]})]})})};function UT({localEdge:n,handleFieldChange:a,language:i="en"}){const s=Vt(i);return m.jsxs("div",{className:"panel-content",children:[m.jsx("div",{className:"form-group",children:m.jsx(Lr,{label:s.edgeColor,value:n.style?.stroke||"#222222",onChange:r=>a("color",r)})}),m.jsx("div",{className:"form-group",children:m.jsxs("label",{children:[m.jsx("input",{type:"checkbox",checked:!!n.animated,onChange:r=>a("animated",r.target.checked)}),s.animated]})}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:s.edgeType}),m.jsxs("select",{value:n.type||"default",onChange:r=>a("type",r.target.value),children:[m.jsx("option",{value:"default",children:s.default}),m.jsx("option",{value:"straight",children:s.straight}),m.jsx("option",{value:"step",children:s.step}),m.jsx("option",{value:"smoothstep",children:s.smoothstep}),m.jsx("option",{value:"simplebezier",children:"Simple Bezier"})]})]})]})}var VT=({defaultLanguage:n="en"})=>{const a=ie(S=>S.selectedEdge),i=ie(S=>S.edgeDrawerOpen),s=ie(S=>S.settings);ie(S=>S.edges);const r=ie(S=>S.setEdgeDrawerOpen),c=ie(S=>S.setSelectedEdge),u=ie(S=>S.updateEdge),h=ie(S=>S.deleteEdge),g=s?.language||n,p=Vt(g);B.useEffect(()=>{i&&!a&&r(!1)},[a,i,r]);const x=()=>{r(!1),c(null)},y=S=>{u(S.id,S)},v=()=>{a&&(h(a.id),x())};return!a||!i?null:m.jsx(fa,{position:"center-right",className:"editor-panel",children:m.jsxs("div",{className:"panel-inner",children:[m.jsxs("div",{className:"panel-header",children:[m.jsx("h2",{className:"panel-title",children:p.editEdge}),m.jsx("button",{onClick:x,className:"close-button",children:m.jsx(da,{size:20})})]}),m.jsx(UT,{localEdge:a,handleFieldChange:(S,b)=>{let E={...a};S==="color"?E={...E,style:{...E.style,stroke:b}}:S==="animated"?E={...E,animated:b}:S==="type"&&(E={...E,type:b}),y(E)},language:g}),m.jsx("div",{className:"panel-footer panel-footer-centered",children:m.jsxs("button",{onClick:v,className:"danger-button",children:[m.jsx(xi,{size:16})," ",p.deleteEdge]})})]})})},$T=({defaultLanguage:n="en"})=>{const a=ie(b=>b.settingsDrawerOpen),i=ie(b=>b.settings),s=ie(b=>b.edges),r=ie(b=>b.setEdges),c=ie(b=>b.setSettingsDrawerOpen),u=ie(b=>b.setSettings),h=i?.language||n,g=Vt(h),{getViewport:p}=Wa(),x=()=>c(!1);if(!a)return null;const y=b=>{u({...i,...b})},v=()=>{const b=p();y({viewport:{x:Math.round(b.x),y:Math.round(b.y),zoom:parseFloat(b.zoom.toFixed(2))}})},S=()=>{const b=i?.defaultEdgeType||"default",E=i?.defaultEdgeColor||"#94a3b8",_=s.map(T=>({...T,type:b,style:{...T.style,stroke:E}}));r(_)};return m.jsx(fa,{position:"center-right",className:"editor-panel",children:m.jsxs("div",{className:"panel-inner",children:[m.jsxs("div",{className:"panel-header",children:[m.jsx("h2",{className:"panel-title",children:g.backgroundSettings}),m.jsx("button",{onClick:x,className:"close-button",children:m.jsx(da,{size:20})})]}),m.jsxs("div",{className:"panel-content",children:[m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:g.labelRequired}),m.jsx("input",{type:"text",value:i?.title||"",onChange:b=>y({title:b.target.value}),placeholder:g.placeholderTitleLabel})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:g.languageLabel}),m.jsxs("select",{value:i?.language||"en",onChange:b=>y({language:b.target.value}),children:[m.jsx("option",{value:"en",children:g.languageEnglish}),m.jsx("option",{value:"de",children:g.languageGerman})]})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:g.storageId}),m.jsxs("div",{style:{display:"flex",gap:"8px",marginBottom:"8px"},children:[m.jsx("input",{type:"text",value:i?.id||"",onChange:b=>y({id:b.target.value}),placeholder:"Optional",style:{flex:1}}),m.jsx("button",{onClick:()=>y({id:sT()}),className:"secondary-button",type:"button",style:{padding:"8px 12px",width:"auto",display:"flex",alignItems:"center",gap:"4px"},title:g.generateRandomId,children:m.jsx(PN,{size:16})})]}),m.jsxs("p",{style:{fontSize:"0.875rem",color:"#666",margin:0,fontStyle:"italic"},children:["ℹ️ ",g.storageIdHint]})]}),m.jsx("div",{className:"form-group",children:m.jsx(Lr,{label:g.backgroundColor,value:i?.background?.color||"#ffffff",onChange:b=>y({background:{...i.background,color:b}})})}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:g.initialViewport}),m.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center",marginTop:"8px"},children:[m.jsxs("div",{style:{flex:1},children:[m.jsx("label",{style:{fontSize:"0.875rem",color:"#666"},children:g.viewportX}),m.jsx("input",{type:"number",value:i?.viewport?.x??0,onChange:b=>y({viewport:{...i.viewport,x:parseFloat(b.target.value)||0,y:i.viewport?.y??0,zoom:i.viewport?.zoom??1}}),style:{width:"100%"}})]}),m.jsxs("div",{style:{flex:1},children:[m.jsx("label",{style:{fontSize:"0.875rem",color:"#666"},children:g.viewportY}),m.jsx("input",{type:"number",value:i?.viewport?.y??0,onChange:b=>y({viewport:{...i.viewport,y:parseFloat(b.target.value)||0,x:i.viewport?.x??0,zoom:i.viewport?.zoom??1}}),style:{width:"100%"}})]}),m.jsxs("div",{style:{flex:1},children:[m.jsx("label",{style:{fontSize:"0.875rem",color:"#666"},children:g.viewportZoom}),m.jsx("input",{type:"number",step:"0.1",min:"0.1",max:"10",value:i?.viewport?.zoom??1,onChange:b=>y({viewport:{...i.viewport,zoom:parseFloat(b.target.value)||1,x:i.viewport?.x??0,y:i.viewport?.y??0}}),style:{width:"100%"}})]})]}),m.jsx("button",{onClick:v,className:"secondary-button",style:{marginTop:"8px",width:"100%"},type:"button",children:g.useCurrentViewport})]}),m.jsxs("div",{className:"form-group",children:[m.jsx("label",{children:"Default Edge Type"}),m.jsxs("select",{value:i?.defaultEdgeType||"default",onChange:b=>y({defaultEdgeType:b.target.value}),children:[m.jsx("option",{value:"default",children:"Default"}),m.jsx("option",{value:"straight",children:"Straight"}),m.jsx("option",{value:"step",children:"Step"}),m.jsx("option",{value:"smoothstep",children:"Smooth Step"}),m.jsx("option",{value:"simplebezier",children:"Simple Bezier"})]})]}),m.jsx("div",{className:"form-group",children:m.jsx(Lr,{label:"Default Edge Color",value:i?.defaultEdgeColor||"#94a3b8",onChange:b=>y({defaultEdgeColor:b})})}),m.jsx("div",{className:"form-group",children:m.jsx("button",{onClick:S,className:"secondary-button",style:{width:"100%"},type:"button",children:"Update All Edges to Default Settings"})})]})]})})},YT={topic:my,task:py,image:uy,text:gy},qT={floating:zT},ky=B.memo(({defaultLanguage:n="en"})=>{const a=ie(k=>k.settings),i=ie(k=>k.nodes),s=ie(k=>k.edges),r=ie(k=>k.showGrid),c=ie(k=>k.selectedNodeIds),u=ie(k=>k.onNodesChange),h=ie(k=>k.onEdgesChange),g=ie(k=>k.onConnect),p=ie(k=>k.setSelectedNodeIds),x=ie(k=>k.setSelectedNodeId),y=ie(k=>k.setSelectedEdge),v=ie(k=>k.setDrawerOpen),S=ie(k=>k.setEdgeDrawerOpen),b=ie(k=>k.setSettingsDrawerOpen),E=ie(k=>k.setHelpOpen),_=ie(k=>k.setLastMousePosition),{setViewport:T,screenToFlowPosition:z}=Wa(),N=B.useRef(null),C=a?.language||n,D=Vt(C);B.useEffect(()=>{a?.viewport&&T({x:a.viewport.x,y:a.viewport.y,zoom:a.viewport.zoom})},[a?.viewport,T]);const{undo:R,redo:j,canUndo:K,canRedo:J}=_y(k=>({undo:k.undo,redo:k.redo,canUndo:k.pastStates.length>0,canRedo:k.futureStates.length>0})),fe=B.useCallback((k,L)=>{x(L.id),v(!0),y(null),S(!1),b(!1)},[x,v,y,S,b]),U=B.useCallback((k,L)=>{y(L),S(!0),x(null),v(!1),b(!1)},[y,S,x,v,b]),F=B.useCallback(({nodes:k})=>{p(k.map(L=>L.id)),k.length===0&&(v(!1),x(null))},[p,v,x]),ae=B.useCallback(k=>{const L=z({x:k.clientX,y:k.clientY});_(L)},[z,_]),H=B.useCallback(()=>{v(!1),x(null),S(!1),y(null),b(!1)},[v,x,S,y,b]),I={animated:!1,style:{stroke:a?.defaultEdgeColor||"#94a3b8",strokeWidth:2},type:a?.defaultEdgeType||"default"};return m.jsx("div",{ref:N,className:"editor-canvas",style:{backgroundColor:a?.background?.color||"#ffffff"},onMouseMove:ae,children:m.jsxs(Zm,{nodes:i,edges:s,onEdgesChange:h,onNodeClick:fe,onEdgeClick:U,onNodesChange:u,onConnect:g,onSelectionChange:F,onPaneClick:H,nodeTypes:YT,selectionOnDrag:!1,minZoom:.2,edgeTypes:qT,proOptions:{hideAttribution:!0},defaultEdgeOptions:I,nodesDraggable:!0,elevateNodesOnSelect:!1,nodesConnectable:!0,selectNodesOnDrag:!1,colorMode:"light",children:[r&&m.jsx(fN,{}),m.jsxs(Fm,{children:[m.jsx(Ll,{title:D.undo,disabled:!K,onClick:()=>R(),children:m.jsx(a3,{})}),m.jsx(Ll,{title:D.redo,disabled:!J,onClick:()=>j(),children:m.jsx(JN,{})}),m.jsx(Ll,{title:D.help,onClick:()=>E(!0),children:m.jsx(l0,{})})]}),c.length>1&&m.jsx(DT,{}),m.jsx(BT,{defaultLanguage:n}),m.jsx(VT,{defaultLanguage:n}),m.jsx($T,{defaultLanguage:n})]})})});ky.displayName="EditorCanvas";function XT(){const[n,a]=B.useState(!1),[i,s]=B.useState(!1),r=ie(E=>E.shareDialogOpen),c=ie(E=>E.shareLink),u=ie(E=>E.settings),h=ie(E=>E.setShareDialogOpen),g=u?.language||"en",p=Vt(g),x=()=>h(!1);if(!r)return null;const y=c.replace(/(#json=.+)/,"/create$1"),v=c.replace(/(#json=.+)/,"/learn$1"),S=async()=>{try{await navigator.clipboard.writeText(y),a(!0),setTimeout(()=>a(!1),2e3)}catch(E){console.error("Failed to copy link:",E)}},b=async()=>{try{await navigator.clipboard.writeText(v),s(!0),setTimeout(()=>s(!1),2e3)}catch(E){console.error("Failed to copy link:",E)}};return m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"drawer-overlay",onClick:x}),m.jsxs("div",{className:"share-dialog",children:[m.jsxs("header",{className:"drawer-header",children:[m.jsx("h2",{className:"drawer-title",children:p.share}),m.jsx("button",{className:"close-button",onClick:x,"aria-label":p.close,children:m.jsx(da,{size:20})})]}),m.jsxs("div",{className:"drawer-content",children:[m.jsxs("div",{style:{marginBottom:24},children:[m.jsx("h3",{style:{fontSize:14,fontWeight:600,marginBottom:8},children:"Edit Link"}),m.jsx("p",{style:{fontSize:13,color:"#666",marginBottom:12},children:"Share this link to allow others to edit the map"}),m.jsx("div",{style:{display:"flex",gap:8,marginBottom:8},children:m.jsx("input",{type:"text",value:y,readOnly:!0,style:{flex:1,padding:"8px 12px",border:"1px solid #d1d5db",borderRadius:4,fontSize:14,fontFamily:"monospace"},onClick:E=>E.currentTarget.select()})}),m.jsx("button",{onClick:S,className:"drawer-button",style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:8},children:n?m.jsxs(m.Fragment,{children:[m.jsx(t0,{size:16}),p.linkCopied]}):m.jsxs(m.Fragment,{children:[m.jsx(i0,{size:16}),"Copy Edit Link"]})})]}),m.jsxs("div",{children:[m.jsx("h3",{style:{fontSize:14,fontWeight:600,marginBottom:8},children:"Learn Link"}),m.jsx("p",{style:{fontSize:13,color:"#666",marginBottom:12},children:"Share this link for others to learn from the map"}),m.jsx("div",{style:{display:"flex",gap:8,marginBottom:8},children:m.jsx("input",{type:"text",value:v,readOnly:!0,style:{flex:1,padding:"8px 12px",border:"1px solid #d1d5db",borderRadius:4,fontSize:14,fontFamily:"monospace"},onClick:E=>E.currentTarget.select()})}),m.jsx("button",{onClick:b,className:"drawer-button",style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:8},children:i?m.jsxs(m.Fragment,{children:[m.jsx(t0,{size:16}),p.linkCopied]}):m.jsxs(m.Fragment,{children:[m.jsx(i0,{size:16}),"Copy Learn Link"]})})]})]})]})]})}function GT({onClose:n,onDownloadCurrent:a,onReplace:i}){const s=ie(g=>g.loadExternalDialogOpen),c=ie(g=>g.settings)?.language||"en",u=Vt(c);if(!s)return null;const h=()=>{a(),setTimeout(()=>i(),100)};return m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"drawer-overlay",onClick:n}),m.jsxs("div",{className:"share-dialog",children:[m.jsxs("header",{className:"drawer-header",children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[m.jsx(n3,{size:20,color:"#f59e0b"}),m.jsx("h2",{className:"drawer-title",style:{margin:0},children:"Warning"})]}),m.jsx("button",{className:"close-button",onClick:n,"aria-label":u.close,children:m.jsx(da,{size:20})})]}),m.jsxs("div",{className:"drawer-content",children:[m.jsx("p",{style:{marginBottom:16},children:u.loadExternalWarning}),m.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[m.jsxs("button",{onClick:h,className:"drawer-button",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:8},children:[m.jsx(n0,{size:16}),u.downloadCurrentMap]}),m.jsx("button",{onClick:i,className:"drawer-button",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:8,backgroundColor:"#dc2626"},children:u.replaceWithExternal})]})]})]})]})}var Ty=B.memo(({defaultLanguage:n="en",jsonStore:a="https://json.openpatch.org"})=>{const i=ie(S=>S.settings),s=ie(S=>S.helpOpen),r=ie(S=>S.pendingExternalId),[c]=Ay(),u=ie(S=>S.setHelpOpen);ie(S=>S.setShareDialogOpen);const h=ie(S=>S.setLoadExternalDialogOpen),g=ie(S=>S.setPendingExternalId),{downloadRoadmap:p}=Rf(),x=i?.language||n,y=Vt(x);B.useEffect(()=>{const S=window.location.hash;if(S.startsWith("#json=")){const b=S.replace("#json=","");b&&b!==r&&(g(b),h(!0))}},[]);const v=[{action:y.shortcuts.undo,shortcut:"Ctrl+Z"},{action:y.shortcuts.redo,shortcut:"Ctrl+Y or Ctrl+Shift+Z"},{action:y.shortcuts.addTaskNode,shortcut:"Ctrl+1"},{action:y.shortcuts.addTopicNode,shortcut:"Ctrl+2"},{action:y.shortcuts.addImageNode,shortcut:"Ctrl+3"},{action:y.shortcuts.addTextNode,shortcut:"Ctrl+4"},{action:y.shortcuts.deleteNodeEdge,shortcut:"Delete"},{action:y.shortcuts.togglePreviewMode,shortcut:"Ctrl+P"},{action:y.shortcuts.toggleDebugMode,shortcut:"Ctrl+D"},{action:y.shortcuts.selectMultipleNodes,shortcut:"Ctrl+Click or Shift+Drag"},{action:y.shortcuts.selectAllNodes,shortcut:"Ctrl+A"},{action:y.shortcuts.showHelp,shortcut:"Ctrl+? or Help Button"},{action:y.shortcuts.save,shortcut:"Ctrl+S"},{action:y.shortcuts.zoomIn,shortcut:"Ctrl++"},{action:y.shortcuts.zoomOut,shortcut:"Ctrl+-"},{action:y.shortcuts.resetZoom,shortcut:"Ctrl+0"},{action:y.shortcuts.resetMap,shortcut:"Ctrl+Delete"},{action:y.shortcuts.fitView,shortcut:"Shift+!"},{action:y.shortcuts.zoomToSelection,shortcut:"Shift+@"},{action:y.shortcuts.toggleGrid,shortcut:"Ctrl+'"},{action:y.shortcuts.cut,shortcut:"Ctrl+X"},{action:y.shortcuts.copy,shortcut:"Ctrl+C"},{action:y.shortcuts.paste,shortcut:"Ctrl+V"}];return m.jsxs(m.Fragment,{children:[m.jsxs("dialog",{className:"help",open:s,onClose:()=>u(!1),children:[m.jsxs("header",{className:"help-header",children:[m.jsx("h2",{children:y.keyboardShortcuts}),m.jsx("button",{className:"close-button",onClick:()=>u(!1),"aria-label":y.close,children:m.jsx(da,{size:20})})]}),m.jsx("div",{className:"help-content",children:m.jsxs("table",{children:[m.jsx("thead",{children:m.jsxs("tr",{children:[m.jsx("th",{children:y.action}),m.jsx("th",{children:y.shortcut})]})}),m.jsx("tbody",{children:v.map(S=>m.jsxs("tr",{children:[m.jsx("td",{children:S.action}),m.jsx("td",{children:S.shortcut})]},S.action))})]})}),m.jsx("div",{className:"help-footer",children:m.jsx("button",{className:"primary-button",onClick:()=>u(!1),children:y.close})})]}),m.jsx(XT,{}),m.jsx(GT,{onClose:()=>{h(!1),g(null)},onDownloadCurrent:p,onReplace:()=>{r&&c(r)}})]})});Ty.displayName="EditorDialogs";var ZT={addTaskNode:{key:"1",ctrl:!0},addTopicNode:{key:"2",ctrl:!0},addImageNode:{key:"3",ctrl:!0},addTextNode:{key:"4",ctrl:!0},save:{key:"s",ctrl:!0},undo:{key:"z",ctrl:!0},redo:{key:"y",ctrl:!0},help:{key:"?",ctrl:!0},togglePreview:{key:"p",ctrl:!0},toggleDebug:{key:"d",ctrl:!0},zoomIn:{key:"+",ctrl:!0},zoomOut:{key:"-",ctrl:!0},resetZoom:{key:"0",ctrl:!0},toggleGrid:{key:"'",ctrl:!0},resetMap:{key:"Delete",ctrl:!0},cut:{key:"x",ctrl:!0},copy:{key:"c",ctrl:!0},paste:{key:"v",ctrl:!0},selectAll:{key:"a",ctrl:!0},fitView:{key:"!",shift:!0},zoomToSelection:{key:"@",shift:!0},deleteSelected:{key:"Delete"}},xt=(n,a)=>{if(!a)return!1;const i=n.key.toLowerCase()===a.key.toLowerCase(),s=a.ctrl?n.ctrlKey||n.metaKey:!(n.ctrlKey||n.metaKey),r=a.shift?n.shiftKey:!n.shiftKey,c=a.alt?n.altKey:!n.altKey;return i&&s&&r&&c},IT=({jsonStore:n="https://json.openpatch.org",keyBindings:a={}})=>{const i={...ZT,...a},{zoomIn:s,zoomOut:r,setCenter:c,fitView:u,screenToFlowPosition:h}=Wa(),g=ie(le=>le.helpOpen),p=ie(le=>le.selectedNodeIds),x=ie(le=>le.selectedEdge),y=ie(le=>le.nodes),v=ie(le=>le.lastMousePosition),S=ie(le=>le.settings),b=ie(le=>le.setHelpOpen),E=ie(le=>le.addNode),_=ie(le=>le.getRoadmapData),T=ie(le=>le.setPreviewMode),z=ie(le=>le.setDebugMode),N=ie(le=>le.setClipboard),C=ie(le=>le.clipboard),D=ie(le=>le.setNodes),R=ie(le=>le.setEdges),j=ie(le=>le.setSelectedNodeIds),K=ie(le=>le.showGrid),J=ie(le=>le.setShowGrid),fe=ie(le=>le.deleteNode),U=ie(le=>le.deleteEdge),F=ie(le=>le.setSelectedEdge),ae=ie(le=>le.setEdgeDrawerOpen),H=ie(le=>le.drawerOpen),I=ie(le=>le.edgeDrawerOpen),k=ie(le=>le.settingsDrawerOpen),L=S?.language||"en",$=Vt(L),{undo:Z,redo:Y}=_y(le=>({undo:le.undo,redo:le.redo})),A=le=>{const de=v||h({x:window.innerWidth/2,y:window.innerHeight/2}),Je={id:`node-${Date.now()}`,type:le,position:de,data:{label:le==="task"?$.newTask:le==="topic"?$.newTopic:le,state:"unlocked"}};E(Je)},O=()=>{if(x){U(x.id),F(null),ae(!1);return}p.length>0&&(p.forEach(le=>{fe(le)}),j([]))},G=()=>{const le=_(),de="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(le,null,2)),Je=document.createElement("a");Je.setAttribute("href",de),Je.setAttribute("download","learningmap.json"),document.body.appendChild(Je),Je.click(),Je.remove()},P=()=>{const le=ie.getState().previewMode;T(!le)},se=()=>{const le=ie.getState().debugMode;z(!le)},ge=()=>{confirm($.resetMapWarning)&&(D([]),R([]))},he=()=>{const le=y.filter(de=>p.includes(de.id));le.length>0&&(N({nodes:le,edges:[]}),p.forEach(de=>{fe(de)}),j([]))},ue=()=>{const le=y.filter(de=>p.includes(de.id));le.length>0&&N({nodes:le,edges:[]})},me=()=>{if(C&&C.nodes.length>0){const le=C.nodes.map(de=>({...de,id:`node-${Date.now()}-${Math.random()}`,position:{x:de.position.x+50,y:de.position.y+50}}));D([...y,...le]),j(le.map(de=>de.id))}},Ne=()=>{j(y.map(le=>le.id))},ke=()=>s(),Se=()=>r(),_e=()=>c(0,0,{zoom:1}),we=()=>u(),Me=()=>{if(p.length>0){const le=y.filter(de=>p.includes(de.id));le.length>0&&u({nodes:le,duration:300})}},Re=()=>J(!K);return B.useEffect(()=>{const le=de=>{H||I||k||(xt(de,i.addTaskNode)?(de.preventDefault(),A("task")):xt(de,i.addTopicNode)?(de.preventDefault(),A("topic")):xt(de,i.addImageNode)?(de.preventDefault(),A("image")):xt(de,i.addTextNode)?(de.preventDefault(),A("text")):xt(de,i.save)?(de.preventDefault(),G()):xt(de,i.undo)?(de.preventDefault(),Z()):xt(de,i.redo)?(de.preventDefault(),Y()):xt(de,i.help)?(de.preventDefault(),b(!g)):xt(de,i.togglePreview)?(de.preventDefault(),P()):xt(de,i.toggleDebug)?(de.preventDefault(),se()):xt(de,i.zoomIn)?(de.preventDefault(),ke()):xt(de,i.zoomOut)?(de.preventDefault(),Se()):xt(de,i.resetZoom)?(de.preventDefault(),_e()):xt(de,i.toggleGrid)?(de.preventDefault(),Re()):xt(de,i.resetMap)?(de.preventDefault(),ge()):xt(de,i.cut)?(de.preventDefault(),he()):xt(de,i.copy)?(de.preventDefault(),ue()):xt(de,i.paste)?(de.preventDefault(),me()):xt(de,i.selectAll)?(de.preventDefault(),Ne()):xt(de,i.fitView)?(de.preventDefault(),we()):xt(de,i.zoomToSelection)?(de.preventDefault(),Me()):xt(de,i.deleteSelected)&&(de.preventDefault(),O()))};return window.addEventListener("keydown",le),()=>{window.removeEventListener("keydown",le)}},[A,O,G,Z,Y,g,b,P,se,ke,Se,_e,we,Me,Re,ge,he,ue,me,Ne,H,I,k,i]),null};function QT({roadmapData:n,language:a="en",jsonStore:i="https://json.openpatch.org",disableSharing:s=!1,disableFileOperations:r=!1,disablePersist:c=!1,keyBindings:u}){const h=ie(_=>_.nodes),g=ie(_=>_.edges),p=ie(_=>_.settings),x=ie(_=>_.previewMode),y=ie(_=>_.getRoadmapData),v=ie(_=>_.setJsonStore),S=ie(_=>_.setDefaultLanguage),b=ie(_=>_.loadRoadmapData),E=p?.language||a;return B.useEffect(()=>{_T(!c)},[c]),B.useEffect(()=>{v(i),S(a)},[i,a,v,S]),B.useEffect(()=>{if(n)if(typeof n=="string")try{const _=JSON.parse(n);b(_)}catch(_){console.error("Failed to parse roadmapData JSON string",_)}else b(n)},[n,b]),m.jsxs(m.Fragment,{children:[m.jsx(IT,{jsonStore:i,keyBindings:u}),m.jsx(kT,{defaultLanguage:a,disableSharing:s,disableFileOperations:r}),x&&m.jsx(wy,{roadmapData:y(),language:E}),!x&&m.jsxs(m.Fragment,{children:[h.length===0&&g.length===0&&m.jsx(CT,{defaultLanguage:a}),m.jsx(ky,{defaultLanguage:a}),m.jsx(Ty,{defaultLanguage:a,jsonStore:i})]})]})}var KT=n=>m.jsx("div",{className:"hyperbook-learningmap-container",children:m.jsx(Zu,{children:m.jsx(QT,{...n})})});const FT=ep(ET,{props:{roadmapData:"string",language:"string",onChange:"function",initialState:"json"},events:{change:!0}});customElements.define("hyperbook-learningmap",FT);const JT=ep(KT,{props:{roadmapData:"string",language:"string",jsonStore:"string",disableSharing:"boolean",disableFileOperations:"boolean",keyBindings:"json",onChange:"function"},events:{change:!0}});customElements.define("hyperbook-learningmap-editor",JT)}));
|