@goondan/cli 0.0.3-alpha13 → 0.0.3-alpha15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +4 -1
- package/dist/bin.js.map +1 -1
- package/dist/commands/package.d.ts +9 -0
- package/dist/commands/package.js +32 -0
- package/dist/commands/package.js.map +1 -1
- package/dist/parser.d.ts +4 -0
- package/dist/parser.js +6 -1
- package/dist/parser.js.map +1 -1
- package/dist/router.js +3 -1
- package/dist/router.js.map +1 -1
- package/dist/services/package.d.ts +2 -1
- package/dist/services/package.js +160 -0
- package/dist/services/package.js.map +1 -1
- package/dist/services/studio.js +1 -9
- package/dist/services/studio.js.map +1 -1
- package/dist/studio/assets.d.ts +1 -3
- package/dist/studio/assets.js +76 -1059
- package/dist/studio/assets.js.map +1 -1
- package/dist/types.d.ts +25 -0
- package/package.json +2 -2
package/dist/studio/assets.js
CHANGED
|
@@ -1,1070 +1,87 @@
|
|
|
1
|
+
// Auto-generated by @goondan/studio build — do not edit.
|
|
1
2
|
export const STUDIO_HTML = `<!doctype html>
|
|
2
3
|
<html lang="ko">
|
|
3
4
|
<head>
|
|
4
5
|
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
7
|
<title>Goondan Studio</title>
|
|
7
|
-
<link rel="
|
|
8
|
+
<script type="module">(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))u(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const d of s.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&u(d)}).observe(document,{childList:!0,subtree:!0});function r(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function u(o){if(o.ep)return;o.ep=!0;const s=r(o);fetch(o.href,s)}})();function py(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var lf={exports:{}},er={};/**
|
|
9
|
+
* @license React
|
|
10
|
+
* react-jsx-runtime.production.js
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the MIT license found in the
|
|
15
|
+
* LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/var qm;function xb(){if(qm)return er;qm=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(u,o,s){var d=null;if(s!==void 0&&(d=""+s),o.key!==void 0&&(d=""+o.key),"key"in o){s={};for(var m in o)m!=="key"&&(s[m]=o[m])}else s=o;return o=s.ref,{$$typeof:n,type:u,key:d,ref:o!==void 0?o:null,props:s}}return er.Fragment=i,er.jsx=r,er.jsxs=r,er}var Vm;function wb(){return Vm||(Vm=1,lf.exports=xb()),lf.exports}var P=wb(),rf={exports:{}},St={};/**
|
|
17
|
+
* @license React
|
|
18
|
+
* react.production.js
|
|
19
|
+
*
|
|
20
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
21
|
+
*
|
|
22
|
+
* This source code is licensed under the MIT license found in the
|
|
23
|
+
* LICENSE file in the root directory of this source tree.
|
|
24
|
+
*/var Xm;function Eb(){if(Xm)return St;Xm=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function x(M){return M===null||typeof M!="object"?null:(M=v&&M[v]||M["@@iterator"],typeof M=="function"?M:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,C={};function A(M,B,F){this.props=M,this.context=B,this.refs=C,this.updater=F||w}A.prototype.isReactComponent={},A.prototype.setState=function(M,B){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,B,"setState")},A.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function D(){}D.prototype=A.prototype;function E(M,B,F){this.props=M,this.context=B,this.refs=C,this.updater=F||w}var _=E.prototype=new D;_.constructor=E,N(_,A.prototype),_.isPureReactComponent=!0;var q=Array.isArray;function Y(){}var k={H:null,A:null,T:null,S:null},K=Object.prototype.hasOwnProperty;function et(M,B,F){var R=F.ref;return{$$typeof:n,type:M,key:B,ref:R!==void 0?R:null,props:F}}function Z(M,B){return et(M.type,B,M.props)}function L(M){return typeof M=="object"&&M!==null&&M.$$typeof===n}function V(M){var B={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(F){return B[F]})}var Q=/\\/+/g;function T(M,B){return typeof M=="object"&&M!==null&&M.key!=null?V(""+M.key):B.toString(36)}function G(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(Y,Y):(M.status="pending",M.then(function(B){M.status==="pending"&&(M.status="fulfilled",M.value=B)},function(B){M.status==="pending"&&(M.status="rejected",M.reason=B)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function S(M,B,F,R,z){var X=typeof M;(X==="undefined"||X==="boolean")&&(M=null);var $=!1;if(M===null)$=!0;else switch(X){case"bigint":case"string":case"number":$=!0;break;case"object":switch(M.$$typeof){case n:case i:$=!0;break;case p:return $=M._init,S($(M._payload),B,F,R,z)}}if($)return z=z(M),$=R===""?"."+T(M,0):R,q(z)?(F="",$!=null&&(F=$.replace(Q,"$&/")+"/"),S(z,B,F,"",function(dt){return dt})):z!=null&&(L(z)&&(z=Z(z,F+(z.key==null||M&&M.key===z.key?"":(""+z.key).replace(Q,"$&/")+"/")+$)),B.push(z)),1;$=0;var I=R===""?".":R+":";if(q(M))for(var at=0;at<M.length;at++)R=M[at],X=I+T(R,at),$+=S(R,B,F,X,z);else if(at=x(M),typeof at=="function")for(M=at.call(M),at=0;!(R=M.next()).done;)R=R.value,X=I+T(R,at++),$+=S(R,B,F,X,z);else if(X==="object"){if(typeof M.then=="function")return S(G(M),B,F,R,z);throw B=String(M),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return $}function H(M,B,F){if(M==null)return M;var R=[],z=0;return S(M,R,"","",function(X){return B.call(F,X,z++)}),R}function j(M){if(M._status===-1){var B=M._result;B=B(),B.then(function(F){(M._status===0||M._status===-1)&&(M._status=1,M._result=F)},function(F){(M._status===0||M._status===-1)&&(M._status=2,M._result=F)}),M._status===-1&&(M._status=0,M._result=B)}if(M._status===1)return M._result.default;throw M._result}var U=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},J={map:H,forEach:function(M,B,F){H(M,function(){B.apply(this,arguments)},F)},count:function(M){var B=0;return H(M,function(){B++}),B},toArray:function(M){return H(M,function(B){return B})||[]},only:function(M){if(!L(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return St.Activity=y,St.Children=J,St.Component=A,St.Fragment=r,St.Profiler=o,St.PureComponent=E,St.StrictMode=u,St.Suspense=h,St.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,St.__COMPILER_RUNTIME={__proto__:null,c:function(M){return k.H.useMemoCache(M)}},St.cache=function(M){return function(){return M.apply(null,arguments)}},St.cacheSignal=function(){return null},St.cloneElement=function(M,B,F){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var R=N({},M.props),z=M.key;if(B!=null)for(X in B.key!==void 0&&(z=""+B.key),B)!K.call(B,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&B.ref===void 0||(R[X]=B[X]);var X=arguments.length-2;if(X===1)R.children=F;else if(1<X){for(var $=Array(X),I=0;I<X;I++)$[I]=arguments[I+2];R.children=$}return et(M.type,z,R)},St.createContext=function(M){return M={$$typeof:d,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:s,_context:M},M},St.createElement=function(M,B,F){var R,z={},X=null;if(B!=null)for(R in B.key!==void 0&&(X=""+B.key),B)K.call(B,R)&&R!=="key"&&R!=="__self"&&R!=="__source"&&(z[R]=B[R]);var $=arguments.length-2;if($===1)z.children=F;else if(1<$){for(var I=Array($),at=0;at<$;at++)I[at]=arguments[at+2];z.children=I}if(M&&M.defaultProps)for(R in $=M.defaultProps,$)z[R]===void 0&&(z[R]=$[R]);return et(M,X,z)},St.createRef=function(){return{current:null}},St.forwardRef=function(M){return{$$typeof:m,render:M}},St.isValidElement=L,St.lazy=function(M){return{$$typeof:p,_payload:{_status:-1,_result:M},_init:j}},St.memo=function(M,B){return{$$typeof:g,type:M,compare:B===void 0?null:B}},St.startTransition=function(M){var B=k.T,F={};k.T=F;try{var R=M(),z=k.S;z!==null&&z(F,R),typeof R=="object"&&R!==null&&typeof R.then=="function"&&R.then(Y,U)}catch(X){U(X)}finally{B!==null&&F.types!==null&&(B.types=F.types),k.T=B}},St.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},St.use=function(M){return k.H.use(M)},St.useActionState=function(M,B,F){return k.H.useActionState(M,B,F)},St.useCallback=function(M,B){return k.H.useCallback(M,B)},St.useContext=function(M){return k.H.useContext(M)},St.useDebugValue=function(){},St.useDeferredValue=function(M,B){return k.H.useDeferredValue(M,B)},St.useEffect=function(M,B){return k.H.useEffect(M,B)},St.useEffectEvent=function(M){return k.H.useEffectEvent(M)},St.useId=function(){return k.H.useId()},St.useImperativeHandle=function(M,B,F){return k.H.useImperativeHandle(M,B,F)},St.useInsertionEffect=function(M,B){return k.H.useInsertionEffect(M,B)},St.useLayoutEffect=function(M,B){return k.H.useLayoutEffect(M,B)},St.useMemo=function(M,B){return k.H.useMemo(M,B)},St.useOptimistic=function(M,B){return k.H.useOptimistic(M,B)},St.useReducer=function(M,B,F){return k.H.useReducer(M,B,F)},St.useRef=function(M){return k.H.useRef(M)},St.useState=function(M){return k.H.useState(M)},St.useSyncExternalStore=function(M,B,F){return k.H.useSyncExternalStore(M,B,F)},St.useTransition=function(){return k.H.useTransition()},St.version="19.2.4",St}var Gm;function Sr(){return Gm||(Gm=1,rf.exports=Eb()),rf.exports}var ut=Sr();const Sb=py(ut);var uf={exports:{}},nr={},of={exports:{}},cf={};/**
|
|
25
|
+
* @license React
|
|
26
|
+
* scheduler.production.js
|
|
27
|
+
*
|
|
28
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
29
|
+
*
|
|
30
|
+
* This source code is licensed under the MIT license found in the
|
|
31
|
+
* LICENSE file in the root directory of this source tree.
|
|
32
|
+
*/var Qm;function _b(){return Qm||(Qm=1,(function(n){function i(S,H){var j=S.length;S.push(H);t:for(;0<j;){var U=j-1>>>1,J=S[U];if(0<o(J,H))S[U]=H,S[j]=J,j=U;else break t}}function r(S){return S.length===0?null:S[0]}function u(S){if(S.length===0)return null;var H=S[0],j=S.pop();if(j!==H){S[0]=j;t:for(var U=0,J=S.length,M=J>>>1;U<M;){var B=2*(U+1)-1,F=S[B],R=B+1,z=S[R];if(0>o(F,j))R<J&&0>o(z,F)?(S[U]=z,S[R]=j,U=R):(S[U]=F,S[B]=j,U=B);else if(R<J&&0>o(z,j))S[U]=z,S[R]=j,U=R;else break t}}return H}function o(S,H){var j=S.sortIndex-H.sortIndex;return j!==0?j:S.id-H.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var h=[],g=[],p=1,y=null,v=3,x=!1,w=!1,N=!1,C=!1,A=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function _(S){for(var H=r(g);H!==null;){if(H.callback===null)u(g);else if(H.startTime<=S)u(g),H.sortIndex=H.expirationTime,i(h,H);else break;H=r(g)}}function q(S){if(N=!1,_(S),!w)if(r(h)!==null)w=!0,Y||(Y=!0,V());else{var H=r(g);H!==null&&G(q,H.startTime-S)}}var Y=!1,k=-1,K=5,et=-1;function Z(){return C?!0:!(n.unstable_now()-et<K)}function L(){if(C=!1,Y){var S=n.unstable_now();et=S;var H=!0;try{t:{w=!1,N&&(N=!1,D(k),k=-1),x=!0;var j=v;try{e:{for(_(S),y=r(h);y!==null&&!(y.expirationTime>S&&Z());){var U=y.callback;if(typeof U=="function"){y.callback=null,v=y.priorityLevel;var J=U(y.expirationTime<=S);if(S=n.unstable_now(),typeof J=="function"){y.callback=J,_(S),H=!0;break e}y===r(h)&&u(h),_(S)}else u(h);y=r(h)}if(y!==null)H=!0;else{var M=r(g);M!==null&&G(q,M.startTime-S),H=!1}}break t}finally{y=null,v=j,x=!1}H=void 0}}finally{H?V():Y=!1}}}var V;if(typeof E=="function")V=function(){E(L)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,T=Q.port2;Q.port1.onmessage=L,V=function(){T.postMessage(null)}}else V=function(){A(L,0)};function G(S,H){k=A(function(){S(n.unstable_now())},H)}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(S){S.callback=null},n.unstable_forceFrameRate=function(S){0>S||125<S?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<S?Math.floor(1e3/S):5},n.unstable_getCurrentPriorityLevel=function(){return v},n.unstable_next=function(S){switch(v){case 1:case 2:case 3:var H=3;break;default:H=v}var j=v;v=H;try{return S()}finally{v=j}},n.unstable_requestPaint=function(){C=!0},n.unstable_runWithPriority=function(S,H){switch(S){case 1:case 2:case 3:case 4:case 5:break;default:S=3}var j=v;v=S;try{return H()}finally{v=j}},n.unstable_scheduleCallback=function(S,H,j){var U=n.unstable_now();switch(typeof j=="object"&&j!==null?(j=j.delay,j=typeof j=="number"&&0<j?U+j:U):j=U,S){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=j+J,S={id:p++,callback:H,priorityLevel:S,startTime:j,expirationTime:J,sortIndex:-1},j>U?(S.sortIndex=j,i(g,S),r(h)===null&&S===r(g)&&(N?(D(k),k=-1):N=!0,G(q,j-U))):(S.sortIndex=J,i(h,S),w||x||(w=!0,Y||(Y=!0,V()))),S},n.unstable_shouldYield=Z,n.unstable_wrapCallback=function(S){var H=v;return function(){var j=v;v=H;try{return S.apply(this,arguments)}finally{v=j}}}})(cf)),cf}var Zm;function Mb(){return Zm||(Zm=1,of.exports=_b()),of.exports}var sf={exports:{}},ye={};/**
|
|
33
|
+
* @license React
|
|
34
|
+
* react-dom.production.js
|
|
35
|
+
*
|
|
36
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
37
|
+
*
|
|
38
|
+
* This source code is licensed under the MIT license found in the
|
|
39
|
+
* LICENSE file in the root directory of this source tree.
|
|
40
|
+
*/var Km;function Nb(){if(Km)return ye;Km=1;var n=Sr();function i(h){var g="https://react.dev/errors/"+h;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)g+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+h+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var u={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(h,g,p){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:y==null?null:""+y,children:h,containerInfo:g,implementation:p}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(h,g){if(h==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return ye.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,ye.createPortal=function(h,g){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(i(299));return s(h,g,null,p)},ye.flushSync=function(h){var g=d.T,p=u.p;try{if(d.T=null,u.p=2,h)return h()}finally{d.T=g,u.p=p,u.d.f()}},ye.preconnect=function(h,g){typeof h=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,u.d.C(h,g))},ye.prefetchDNS=function(h){typeof h=="string"&&u.d.D(h)},ye.preinit=function(h,g){if(typeof h=="string"&&g&&typeof g.as=="string"){var p=g.as,y=m(p,g.crossOrigin),v=typeof g.integrity=="string"?g.integrity:void 0,x=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;p==="style"?u.d.S(h,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:x}):p==="script"&&u.d.X(h,{crossOrigin:y,integrity:v,fetchPriority:x,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},ye.preinitModule=function(h,g){if(typeof h=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var p=m(g.as,g.crossOrigin);u.d.M(h,{crossOrigin:p,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&u.d.M(h)},ye.preload=function(h,g){if(typeof h=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var p=g.as,y=m(p,g.crossOrigin);u.d.L(h,p,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},ye.preloadModule=function(h,g){if(typeof h=="string")if(g){var p=m(g.as,g.crossOrigin);u.d.m(h,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:p,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else u.d.m(h)},ye.requestFormReset=function(h){u.d.r(h)},ye.unstable_batchedUpdates=function(h,g){return h(g)},ye.useFormState=function(h,g,p){return d.H.useFormState(h,g,p)},ye.useFormStatus=function(){return d.H.useHostTransitionStatus()},ye.version="19.2.4",ye}var $m;function vy(){if($m)return sf.exports;$m=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(i){console.error(i)}}return n(),sf.exports=Nb(),sf.exports}/**
|
|
41
|
+
* @license React
|
|
42
|
+
* react-dom-client.production.js
|
|
43
|
+
*
|
|
44
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the MIT license found in the
|
|
47
|
+
* LICENSE file in the root directory of this source tree.
|
|
48
|
+
*/var Jm;function Tb(){if(Jm)return nr;Jm=1;var n=Mb(),i=Sr(),r=vy();function u(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)e+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function s(t){var e=t,a=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(a=e.return),t=e.return;while(t)}return e.tag===3?a:null}function d(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function m(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function h(t){if(s(t)!==t)throw Error(u(188))}function g(t){var e=t.alternate;if(!e){if(e=s(t),e===null)throw Error(u(188));return e!==t?null:t}for(var a=t,l=e;;){var c=a.return;if(c===null)break;var f=c.alternate;if(f===null){if(l=c.return,l!==null){a=l;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===a)return h(c),t;if(f===l)return h(c),e;f=f.sibling}throw Error(u(188))}if(a.return!==l.return)a=c,l=f;else{for(var b=!1,O=c.child;O;){if(O===a){b=!0,a=c,l=f;break}if(O===l){b=!0,l=c,a=f;break}O=O.sibling}if(!b){for(O=f.child;O;){if(O===a){b=!0,a=f,l=c;break}if(O===l){b=!0,l=f,a=c;break}O=O.sibling}if(!b)throw Error(u(189))}}if(a.alternate!==l)throw Error(u(190))}if(a.tag!==3)throw Error(u(188));return a.stateNode.current===a?t:e}function p(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=p(t),e!==null)return e;t=t.sibling}return null}var y=Object.assign,v=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),E=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),et=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function V(t){return t===null||typeof t!="object"?null:(t=L&&t[L]||t["@@iterator"],typeof t=="function"?t:null)}var Q=Symbol.for("react.client.reference");function T(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Q?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case N:return"Fragment";case A:return"Profiler";case C:return"StrictMode";case q:return"Suspense";case Y:return"SuspenseList";case et:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case w:return"Portal";case E:return t.displayName||"Context";case D:return(t._context.displayName||"Context")+".Consumer";case _:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case k:return e=t.displayName||null,e!==null?e:T(t.type)||"Memo";case K:e=t._payload,t=t._init;try{return T(t(e))}catch{}}return null}var G=Array.isArray,S=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j={pending:!1,data:null,method:null,action:null},U=[],J=-1;function M(t){return{current:t}}function B(t){0>J||(t.current=U[J],U[J]=null,J--)}function F(t,e){J++,U[J]=t.current,t.current=e}var R=M(null),z=M(null),X=M(null),$=M(null);function I(t,e){switch(F(X,e),F(z,t),F(R,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?sm(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=sm(e),t=fm(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}B(R),F(R,t)}function at(){B(R),B(z),B(X)}function dt(t){t.memoizedState!==null&&F($,t);var e=R.current,a=fm(e,t.type);e!==a&&(F(z,t),F(R,a))}function ht(t){z.current===t&&(B(R),B(z)),$.current===t&&(B($),Il._currentValue=j)}var gt,pt;function xt(t){if(gt===void 0)try{throw Error()}catch(a){var e=a.stack.trim().match(/\\n( *(at )?)/);gt=e&&e[1]||"",pt=-1<a.stack.indexOf(\`
|
|
49
|
+
at\`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return\`
|
|
50
|
+
\`+gt+t+pt}var Et=!1;function _t(t,e){if(!t||Et)return"";Et=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(e){var ft=function(){throw Error()};if(Object.defineProperty(ft.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ft,[])}catch(ot){var rt=ot}Reflect.construct(t,[],ft)}else{try{ft.call()}catch(ot){rt=ot}t.call(ft.prototype)}}else{try{throw Error()}catch(ot){rt=ot}(ft=t())&&typeof ft.catch=="function"&&ft.catch(function(){})}}catch(ot){if(ot&&rt&&typeof ot.stack=="string")return[ot.stack,rt.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=l.DetermineComponentFrameRoot(),b=f[0],O=f[1];if(b&&O){var W=b.split(\`
|
|
51
|
+
\`),lt=O.split(\`
|
|
52
|
+
\`);for(c=l=0;l<W.length&&!W[l].includes("DetermineComponentFrameRoot");)l++;for(;c<lt.length&&!lt[c].includes("DetermineComponentFrameRoot");)c++;if(l===W.length||c===lt.length)for(l=W.length-1,c=lt.length-1;1<=l&&0<=c&&W[l]!==lt[c];)c--;for(;1<=l&&0<=c;l--,c--)if(W[l]!==lt[c]){if(l!==1||c!==1)do if(l--,c--,0>c||W[l]!==lt[c]){var ct=\`
|
|
53
|
+
\`+W[l].replace(" at new "," at ");return t.displayName&&ct.includes("<anonymous>")&&(ct=ct.replace("<anonymous>",t.displayName)),ct}while(1<=l&&0<=c);break}}}finally{Et=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?xt(a):""}function It(t,e){switch(t.tag){case 26:case 27:case 5:return xt(t.type);case 16:return xt("Lazy");case 13:return t.child!==e&&e!==null?xt("Suspense Fallback"):xt("Suspense");case 19:return xt("SuspenseList");case 0:case 15:return _t(t.type,!1);case 11:return _t(t.type.render,!1);case 1:return _t(t.type,!0);case 31:return xt("Activity");default:return""}}function xe(t){try{var e="",a=null;do e+=It(t,a),a=t,t=t.return;while(t);return e}catch(l){return\`
|
|
54
|
+
Error generating stack: \`+l.message+\`
|
|
55
|
+
\`+l.stack}}var Ce=Object.prototype.hasOwnProperty,We=n.unstable_scheduleCallback,vn=n.unstable_cancelCallback,Ta=n.unstable_shouldYield,Aa=n.unstable_requestPaint,se=n.unstable_now,ui=n.unstable_getCurrentPriorityLevel,bn=n.unstable_ImmediatePriority,Kn=n.unstable_UserBlockingPriority,Oa=n.unstable_NormalPriority,qo=n.unstable_LowPriority,oi=n.unstable_IdlePriority,Vo=n.log,Xo=n.unstable_setDisableYieldValue,Ca=null,pe=null;function on(t){if(typeof Vo=="function"&&Xo(t),pe&&typeof pe.setStrictMode=="function")try{pe.setStrictMode(Ca,t)}catch{}}var ve=Math.clz32?Math.clz32:Zo,Go=Math.log,Qo=Math.LN2;function Zo(t){return t>>>=0,t===0?32:31-(Go(t)/Qo|0)|0}var ci=256,si=262144,fi=4194304;function xn(t){var e=t&42;if(e!==0)return e;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function di(t,e,a){var l=t.pendingLanes;if(l===0)return 0;var c=0,f=t.suspendedLanes,b=t.pingedLanes;t=t.warmLanes;var O=l&134217727;return O!==0?(l=O&~f,l!==0?c=xn(l):(b&=O,b!==0?c=xn(b):a||(a=O&~t,a!==0&&(c=xn(a))))):(O=l&~f,O!==0?c=xn(O):b!==0?c=xn(b):a||(a=l&~t,a!==0&&(c=xn(a)))),c===0?0:e!==0&&e!==c&&(e&f)===0&&(f=c&-c,a=e&-e,f>=a||f===32&&(a&4194048)!==0)?e:c}function za(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Ko(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 Cr(){var t=fi;return fi<<=1,(fi&62914560)===0&&(fi=4194304),t}function ol(t){for(var e=[],a=0;31>a;a++)e.push(t);return e}function Da(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function $o(t,e,a,l,c,f){var b=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var O=t.entanglements,W=t.expirationTimes,lt=t.hiddenUpdates;for(a=b&~a;0<a;){var ct=31-ve(a),ft=1<<ct;O[ct]=0,W[ct]=-1;var rt=lt[ct];if(rt!==null)for(lt[ct]=null,ct=0;ct<rt.length;ct++){var ot=rt[ct];ot!==null&&(ot.lane&=-536870913)}a&=~ft}l!==0&&zr(t,l,0),f!==0&&c===0&&t.tag!==0&&(t.suspendedLanes|=f&~(b&~e))}function zr(t,e,a){t.pendingLanes|=e,t.suspendedLanes&=~e;var l=31-ve(e);t.entangledLanes|=e,t.entanglements[l]=t.entanglements[l]|1073741824|a&261930}function Dr(t,e){var a=t.entangledLanes|=e;for(t=t.entanglements;a;){var l=31-ve(a),c=1<<l;c&e|t[l]&e&&(t[l]|=e),a&=~c}}function Hr(t,e){var a=e&-e;return a=(a&42)!==0?1:cl(a),(a&(t.suspendedLanes|e))!==0?0:a}function cl(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function sl(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Rr(){var t=H.p;return t!==0?t:(t=window.event,t===void 0?32:Rm(t.type))}function jr(t,e){var a=H.p;try{return H.p=t,e()}finally{H.p=a}}var cn=Math.random().toString(36).slice(2),ue="__reactFiber$"+cn,me="__reactProps$"+cn,wn="__reactContainer$"+cn,hi="__reactEvents$"+cn,Yr="__reactListeners$"+cn,Jo="__reactHandles$"+cn,Br="__reactResources$"+cn,Ha="__reactMarker$"+cn;function fl(t){delete t[ue],delete t[me],delete t[hi],delete t[Yr],delete t[Jo]}function $n(t){var e=t[ue];if(e)return e;for(var a=t.parentNode;a;){if(e=a[wn]||a[ue]){if(a=e.alternate,e.child!==null||a!==null&&a.child!==null)for(t=vm(t);t!==null;){if(a=t[ue])return a;t=vm(t)}return e}t=a,a=t.parentNode}return null}function Jn(t){if(t=t[ue]||t[wn]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function Wn(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(u(33))}function In(t){var e=t[Br];return e||(e=t[Br]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function te(t){t[Ha]=!0}var Ur=new Set,Lr={};function En(t,e){Fn(t,e),Fn(t+"Capture",e)}function Fn(t,e){for(Lr[t]=e,t=0;t<e.length;t++)Ur.add(e[t])}var Wo=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]*$"),dl={},kr={};function Io(t){return Ce.call(kr,t)?!0:Ce.call(dl,t)?!1:Wo.test(t)?kr[t]=!0:(dl[t]=!0,!1)}function gi(t,e,a){if(Io(e))if(a===null)t.removeAttribute(e);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var l=e.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+a)}}function mi(t,e,a){if(a===null)t.removeAttribute(e);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+a)}}function Ie(t,e,a,l){if(l===null)t.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(e,a,""+l)}}function we(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function qr(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Fo(t,e,a){var l=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var c=l.get,f=l.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return c.call(this)},set:function(b){a=""+b,f.call(this,b)}}),Object.defineProperty(t,e,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(b){a=""+b},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Pn(t){if(!t._valueTracker){var e=qr(t)?"checked":"value";t._valueTracker=Fo(t,e,""+t[e])}}function Vr(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var a=e.getValue(),l="";return t&&(l=qr(t)?t.checked?"true":"false":t.value),t=l,t!==a?(e.setValue(t),!0):!1}function Ra(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Po=/[\\n"\\\\]/g;function Ee(t){return t.replace(Po,function(e){return"\\\\"+e.charCodeAt(0).toString(16)+" "})}function ja(t,e,a,l,c,f,b,O){t.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?t.type=b:t.removeAttribute("type"),e!=null?b==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+we(e)):t.value!==""+we(e)&&(t.value=""+we(e)):b!=="submit"&&b!=="reset"||t.removeAttribute("value"),e!=null?hl(t,b,we(e)):a!=null?hl(t,b,we(a)):l!=null&&t.removeAttribute("value"),c==null&&f!=null&&(t.defaultChecked=!!f),c!=null&&(t.checked=c&&typeof c!="function"&&typeof c!="symbol"),O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"?t.name=""+we(O):t.removeAttribute("name")}function Xr(t,e,a,l,c,f,b,O){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(t.type=f),e!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||e!=null)){Pn(t);return}a=a!=null?""+we(a):"",e=e!=null?""+we(e):a,O||e===t.value||(t.value=e),t.defaultValue=e}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=O?t.checked:!!l,t.defaultChecked=!!l,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(t.name=b),Pn(t)}function hl(t,e,a){e==="number"&&Ra(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function Sn(t,e,a,l){if(t=t.options,e){e={};for(var c=0;c<a.length;c++)e["$"+a[c]]=!0;for(a=0;a<t.length;a++)c=e.hasOwnProperty("$"+t[a].value),t[a].selected!==c&&(t[a].selected=c),c&&l&&(t[a].defaultSelected=!0)}else{for(a=""+we(a),e=null,c=0;c<t.length;c++){if(t[c].value===a){t[c].selected=!0,l&&(t[c].defaultSelected=!0);return}e!==null||t[c].disabled||(e=t[c])}e!==null&&(e.selected=!0)}}function ld(t,e,a){if(e!=null&&(e=""+we(e),e!==t.value&&(t.value=e),a==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=a!=null?""+we(a):""}function rd(t,e,a,l){if(e==null){if(l!=null){if(a!=null)throw Error(u(92));if(G(l)){if(1<l.length)throw Error(u(93));l=l[0]}a=l}a==null&&(a=""),e=a}a=we(e),t.defaultValue=a,l=t.textContent,l===a&&l!==""&&l!==null&&(t.value=l),Pn(t)}function yi(t,e){if(e){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=e;return}}t.textContent=e}var mv=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 ud(t,e,a){var l=e.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":l?t.setProperty(e,a):typeof a!="number"||a===0||mv.has(e)?e==="float"?t.cssFloat=a:t[e]=(""+a).trim():t[e]=a+"px"}function od(t,e,a){if(e!=null&&typeof e!="object")throw Error(u(62));if(t=t.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||e!=null&&e.hasOwnProperty(l)||(l.indexOf("--")===0?t.setProperty(l,""):l==="float"?t.cssFloat="":t[l]="");for(var c in e)l=e[c],e.hasOwnProperty(c)&&a[c]!==l&&ud(t,c,l)}else for(var f in e)e.hasOwnProperty(f)&&ud(t,f,e[f])}function tc(t){if(t.indexOf("-")===-1)return!1;switch(t){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 yv=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"]]),pv=/^[\\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 Gr(t){return pv.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function _n(){}var ec=null;function nc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var pi=null,vi=null;function cd(t){var e=Jn(t);if(e&&(t=e.stateNode)){var a=t[me]||null;t:switch(t=e.stateNode,e.type){case"input":if(ja(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),e=a.name,a.type==="radio"&&e!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Ee(""+e)+'"][type="radio"]'),e=0;e<a.length;e++){var l=a[e];if(l!==t&&l.form===t.form){var c=l[me]||null;if(!c)throw Error(u(90));ja(l,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(e=0;e<a.length;e++)l=a[e],l.form===t.form&&Vr(l)}break t;case"textarea":ld(t,a.value,a.defaultValue);break t;case"select":e=a.value,e!=null&&Sn(t,!!a.multiple,e,!1)}}}var ac=!1;function sd(t,e,a){if(ac)return t(e,a);ac=!0;try{var l=t(e);return l}finally{if(ac=!1,(pi!==null||vi!==null)&&(zu(),pi&&(e=pi,t=vi,vi=pi=null,cd(e),t)))for(e=0;e<t.length;e++)cd(t[e])}}function gl(t,e){var a=t.stateNode;if(a===null)return null;var l=a[me]||null;if(l===null)return null;a=l[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break t;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(u(231,e,typeof a));return a}var Mn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ic=!1;if(Mn)try{var ml={};Object.defineProperty(ml,"passive",{get:function(){ic=!0}}),window.addEventListener("test",ml,ml),window.removeEventListener("test",ml,ml)}catch{ic=!1}var ta=null,lc=null,Qr=null;function fd(){if(Qr)return Qr;var t,e=lc,a=e.length,l,c="value"in ta?ta.value:ta.textContent,f=c.length;for(t=0;t<a&&e[t]===c[t];t++);var b=a-t;for(l=1;l<=b&&e[a-l]===c[f-l];l++);return Qr=c.slice(t,1<l?1-l:void 0)}function Zr(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Kr(){return!0}function dd(){return!1}function Se(t){function e(a,l,c,f,b){this._reactName=a,this._targetInst=c,this.type=l,this.nativeEvent=f,this.target=b,this.currentTarget=null;for(var O in t)t.hasOwnProperty(O)&&(a=t[O],this[O]=a?a(f):f[O]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Kr:dd,this.isPropagationStopped=dd,this}return y(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Kr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Kr)},persist:function(){},isPersistent:Kr}),e}var Ya={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$r=Se(Ya),yl=y({},Ya,{view:0,detail:0}),vv=Se(yl),rc,uc,pl,Jr=y({},yl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cc,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==pl&&(pl&&t.type==="mousemove"?(rc=t.screenX-pl.screenX,uc=t.screenY-pl.screenY):uc=rc=0,pl=t),rc)},movementY:function(t){return"movementY"in t?t.movementY:uc}}),hd=Se(Jr),bv=y({},Jr,{dataTransfer:0}),xv=Se(bv),wv=y({},yl,{relatedTarget:0}),oc=Se(wv),Ev=y({},Ya,{animationName:0,elapsedTime:0,pseudoElement:0}),Sv=Se(Ev),_v=y({},Ya,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Mv=Se(_v),Nv=y({},Ya,{data:0}),gd=Se(Nv),Tv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Av={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"},Ov={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cv(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Ov[t])?!!e[t]:!1}function cc(){return Cv}var zv=y({},yl,{key:function(t){if(t.key){var e=Tv[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Zr(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Av[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cc,charCode:function(t){return t.type==="keypress"?Zr(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Zr(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Dv=Se(zv),Hv=y({},Jr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),md=Se(Hv),Rv=y({},yl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cc}),jv=Se(Rv),Yv=y({},Ya,{propertyName:0,elapsedTime:0,pseudoElement:0}),Bv=Se(Yv),Uv=y({},Jr,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Lv=Se(Uv),kv=y({},Ya,{newState:0,oldState:0}),qv=Se(kv),Vv=[9,13,27,32],sc=Mn&&"CompositionEvent"in window,vl=null;Mn&&"documentMode"in document&&(vl=document.documentMode);var Xv=Mn&&"TextEvent"in window&&!vl,yd=Mn&&(!sc||vl&&8<vl&&11>=vl),pd=" ",vd=!1;function bd(t,e){switch(t){case"keyup":return Vv.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xd(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var bi=!1;function Gv(t,e){switch(t){case"compositionend":return xd(e);case"keypress":return e.which!==32?null:(vd=!0,pd);case"textInput":return t=e.data,t===pd&&vd?null:t;default:return null}}function Qv(t,e){if(bi)return t==="compositionend"||!sc&&bd(t,e)?(t=fd(),Qr=lc=ta=null,bi=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return yd&&e.locale!=="ko"?null:e.data;default:return null}}var Zv={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 wd(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Zv[t.type]:e==="textarea"}function Ed(t,e,a,l){pi?vi?vi.push(l):vi=[l]:pi=l,e=Uu(e,"onChange"),0<e.length&&(a=new $r("onChange","change",null,a,l),t.push({event:a,listeners:e}))}var bl=null,xl=null;function Kv(t){im(t,0)}function Wr(t){var e=Wn(t);if(Vr(e))return t}function Sd(t,e){if(t==="change")return e}var _d=!1;if(Mn){var fc;if(Mn){var dc="oninput"in document;if(!dc){var Md=document.createElement("div");Md.setAttribute("oninput","return;"),dc=typeof Md.oninput=="function"}fc=dc}else fc=!1;_d=fc&&(!document.documentMode||9<document.documentMode)}function Nd(){bl&&(bl.detachEvent("onpropertychange",Td),xl=bl=null)}function Td(t){if(t.propertyName==="value"&&Wr(xl)){var e=[];Ed(e,xl,t,nc(t)),sd(Kv,e)}}function $v(t,e,a){t==="focusin"?(Nd(),bl=e,xl=a,bl.attachEvent("onpropertychange",Td)):t==="focusout"&&Nd()}function Jv(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Wr(xl)}function Wv(t,e){if(t==="click")return Wr(e)}function Iv(t,e){if(t==="input"||t==="change")return Wr(e)}function Fv(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ze=typeof Object.is=="function"?Object.is:Fv;function wl(t,e){if(ze(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var a=Object.keys(t),l=Object.keys(e);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var c=a[l];if(!Ce.call(e,c)||!ze(t[c],e[c]))return!1}return!0}function Ad(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Od(t,e){var a=Ad(t);t=0;for(var l;a;){if(a.nodeType===3){if(l=t+a.textContent.length,t<=e&&l>=e)return{node:a,offset:e-t};t=l}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=Ad(a)}}function Cd(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Cd(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function zd(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Ra(t.document);e instanceof t.HTMLIFrameElement;){try{var a=typeof e.contentWindow.location.href=="string"}catch{a=!1}if(a)t=e.contentWindow;else break;e=Ra(t.document)}return e}function hc(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var Pv=Mn&&"documentMode"in document&&11>=document.documentMode,xi=null,gc=null,El=null,mc=!1;function Dd(t,e,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;mc||xi==null||xi!==Ra(l)||(l=xi,"selectionStart"in l&&hc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),El&&wl(El,l)||(El=l,l=Uu(gc,"onSelect"),0<l.length&&(e=new $r("onSelect","select",null,e,a),t.push({event:e,listeners:l}),e.target=xi)))}function Ba(t,e){var a={};return a[t.toLowerCase()]=e.toLowerCase(),a["Webkit"+t]="webkit"+e,a["Moz"+t]="moz"+e,a}var wi={animationend:Ba("Animation","AnimationEnd"),animationiteration:Ba("Animation","AnimationIteration"),animationstart:Ba("Animation","AnimationStart"),transitionrun:Ba("Transition","TransitionRun"),transitionstart:Ba("Transition","TransitionStart"),transitioncancel:Ba("Transition","TransitionCancel"),transitionend:Ba("Transition","TransitionEnd")},yc={},Hd={};Mn&&(Hd=document.createElement("div").style,"AnimationEvent"in window||(delete wi.animationend.animation,delete wi.animationiteration.animation,delete wi.animationstart.animation),"TransitionEvent"in window||delete wi.transitionend.transition);function Ua(t){if(yc[t])return yc[t];if(!wi[t])return t;var e=wi[t],a;for(a in e)if(e.hasOwnProperty(a)&&a in Hd)return yc[t]=e[a];return t}var Rd=Ua("animationend"),jd=Ua("animationiteration"),Yd=Ua("animationstart"),t1=Ua("transitionrun"),e1=Ua("transitionstart"),n1=Ua("transitioncancel"),Bd=Ua("transitionend"),Ud=new Map,pc="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(" ");pc.push("scrollEnd");function Fe(t,e){Ud.set(t,e),En(e,[t])}var Ir=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},qe=[],Ei=0,vc=0;function Fr(){for(var t=Ei,e=vc=Ei=0;e<t;){var a=qe[e];qe[e++]=null;var l=qe[e];qe[e++]=null;var c=qe[e];qe[e++]=null;var f=qe[e];if(qe[e++]=null,l!==null&&c!==null){var b=l.pending;b===null?c.next=c:(c.next=b.next,b.next=c),l.pending=c}f!==0&&Ld(a,c,f)}}function Pr(t,e,a,l){qe[Ei++]=t,qe[Ei++]=e,qe[Ei++]=a,qe[Ei++]=l,vc|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function bc(t,e,a,l){return Pr(t,e,a,l),tu(t)}function La(t,e){return Pr(t,null,null,e),tu(t)}function Ld(t,e,a){t.lanes|=a;var l=t.alternate;l!==null&&(l.lanes|=a);for(var c=!1,f=t.return;f!==null;)f.childLanes|=a,l=f.alternate,l!==null&&(l.childLanes|=a),f.tag===22&&(t=f.stateNode,t===null||t._visibility&1||(c=!0)),t=f,f=f.return;return t.tag===3?(f=t.stateNode,c&&e!==null&&(c=31-ve(a),t=f.hiddenUpdates,l=t[c],l===null?t[c]=[e]:l.push(e),e.lane=a|536870912),f):null}function tu(t){if(50<Gl)throw Gl=0,As=null,Error(u(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var Si={};function a1(t,e,a,l){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function De(t,e,a,l){return new a1(t,e,a,l)}function xc(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Nn(t,e){var a=t.alternate;return a===null?(a=De(t.tag,e,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=e,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,e=t.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function kd(t,e){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,e=a.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function eu(t,e,a,l,c,f){var b=0;if(l=t,typeof t=="function")xc(t)&&(b=1);else if(typeof t=="string")b=ob(t,a,R.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case et:return t=De(31,a,e,c),t.elementType=et,t.lanes=f,t;case N:return ka(a.children,c,f,e);case C:b=8,c|=24;break;case A:return t=De(12,a,e,c|2),t.elementType=A,t.lanes=f,t;case q:return t=De(13,a,e,c),t.elementType=q,t.lanes=f,t;case Y:return t=De(19,a,e,c),t.elementType=Y,t.lanes=f,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case E:b=10;break t;case D:b=9;break t;case _:b=11;break t;case k:b=14;break t;case K:b=16,l=null;break t}b=29,a=Error(u(130,t===null?"null":typeof t,"")),l=null}return e=De(b,a,e,c),e.elementType=t,e.type=l,e.lanes=f,e}function ka(t,e,a,l){return t=De(7,t,l,e),t.lanes=a,t}function wc(t,e,a){return t=De(6,t,null,e),t.lanes=a,t}function qd(t){var e=De(18,null,null,0);return e.stateNode=t,e}function Ec(t,e,a){return e=De(4,t.children!==null?t.children:[],t.key,e),e.lanes=a,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var Vd=new WeakMap;function Ve(t,e){if(typeof t=="object"&&t!==null){var a=Vd.get(t);return a!==void 0?a:(e={value:t,source:e,stack:xe(e)},Vd.set(t,e),e)}return{value:t,source:e,stack:xe(e)}}var _i=[],Mi=0,nu=null,Sl=0,Xe=[],Ge=0,ea=null,sn=1,fn="";function Tn(t,e){_i[Mi++]=Sl,_i[Mi++]=nu,nu=t,Sl=e}function Xd(t,e,a){Xe[Ge++]=sn,Xe[Ge++]=fn,Xe[Ge++]=ea,ea=t;var l=sn;t=fn;var c=32-ve(l)-1;l&=~(1<<c),a+=1;var f=32-ve(e)+c;if(30<f){var b=c-c%5;f=(l&(1<<b)-1).toString(32),l>>=b,c-=b,sn=1<<32-ve(e)+c|a<<c|l,fn=f+t}else sn=1<<f|a<<c|l,fn=t}function Sc(t){t.return!==null&&(Tn(t,1),Xd(t,1,0))}function _c(t){for(;t===nu;)nu=_i[--Mi],_i[Mi]=null,Sl=_i[--Mi],_i[Mi]=null;for(;t===ea;)ea=Xe[--Ge],Xe[Ge]=null,fn=Xe[--Ge],Xe[Ge]=null,sn=Xe[--Ge],Xe[Ge]=null}function Gd(t,e){Xe[Ge++]=sn,Xe[Ge++]=fn,Xe[Ge++]=ea,sn=e.id,fn=e.overflow,ea=t}var fe=null,Gt=null,zt=!1,na=null,Qe=!1,Mc=Error(u(519));function aa(t){var e=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw _l(Ve(e,t)),Mc}function Qd(t){var e=t.stateNode,a=t.type,l=t.memoizedProps;switch(e[ue]=t,e[me]=l,a){case"dialog":At("cancel",e),At("close",e);break;case"iframe":case"object":case"embed":At("load",e);break;case"video":case"audio":for(a=0;a<Zl.length;a++)At(Zl[a],e);break;case"source":At("error",e);break;case"img":case"image":case"link":At("error",e),At("load",e);break;case"details":At("toggle",e);break;case"input":At("invalid",e),Xr(e,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":At("invalid",e);break;case"textarea":At("invalid",e),rd(e,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||e.textContent===""+a||l.suppressHydrationWarning===!0||om(e.textContent,a)?(l.popover!=null&&(At("beforetoggle",e),At("toggle",e)),l.onScroll!=null&&At("scroll",e),l.onScrollEnd!=null&&At("scrollend",e),l.onClick!=null&&(e.onclick=_n),e=!0):e=!1,e||aa(t,!0)}function Zd(t){for(fe=t.return;fe;)switch(fe.tag){case 5:case 31:case 13:Qe=!1;return;case 27:case 3:Qe=!0;return;default:fe=fe.return}}function Ni(t){if(t!==fe)return!1;if(!zt)return Zd(t),zt=!0,!1;var e=t.tag,a;if((a=e!==3&&e!==27)&&((a=e===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||Xs(t.type,t.memoizedProps)),a=!a),a&&Gt&&aa(t),Zd(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(u(317));Gt=pm(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(u(317));Gt=pm(t)}else e===27?(e=Gt,pa(t.type)?(t=$s,$s=null,Gt=t):Gt=e):Gt=fe?Ke(t.stateNode.nextSibling):null;return!0}function qa(){Gt=fe=null,zt=!1}function Nc(){var t=na;return t!==null&&(Te===null?Te=t:Te.push.apply(Te,t),na=null),t}function _l(t){na===null?na=[t]:na.push(t)}var Tc=M(null),Va=null,An=null;function ia(t,e,a){F(Tc,e._currentValue),e._currentValue=a}function On(t){t._currentValue=Tc.current,B(Tc)}function Ac(t,e,a){for(;t!==null;){var l=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,l!==null&&(l.childLanes|=e)):l!==null&&(l.childLanes&e)!==e&&(l.childLanes|=e),t===a)break;t=t.return}}function Oc(t,e,a,l){var c=t.child;for(c!==null&&(c.return=t);c!==null;){var f=c.dependencies;if(f!==null){var b=c.child;f=f.firstContext;t:for(;f!==null;){var O=f;f=c;for(var W=0;W<e.length;W++)if(O.context===e[W]){f.lanes|=a,O=f.alternate,O!==null&&(O.lanes|=a),Ac(f.return,a,t),l||(b=null);break t}f=O.next}}else if(c.tag===18){if(b=c.return,b===null)throw Error(u(341));b.lanes|=a,f=b.alternate,f!==null&&(f.lanes|=a),Ac(b,a,t),b=null}else b=c.child;if(b!==null)b.return=c;else for(b=c;b!==null;){if(b===t){b=null;break}if(c=b.sibling,c!==null){c.return=b.return,b=c;break}b=b.return}c=b}}function Ti(t,e,a,l){t=null;for(var c=e,f=!1;c!==null;){if(!f){if((c.flags&524288)!==0)f=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var b=c.alternate;if(b===null)throw Error(u(387));if(b=b.memoizedProps,b!==null){var O=c.type;ze(c.pendingProps.value,b.value)||(t!==null?t.push(O):t=[O])}}else if(c===$.current){if(b=c.alternate,b===null)throw Error(u(387));b.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(t!==null?t.push(Il):t=[Il])}c=c.return}t!==null&&Oc(e,t,a,l),e.flags|=262144}function au(t){for(t=t.firstContext;t!==null;){if(!ze(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Xa(t){Va=t,An=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function de(t){return Kd(Va,t)}function iu(t,e){return Va===null&&Xa(t),Kd(t,e)}function Kd(t,e){var a=e._currentValue;if(e={context:e,memoizedValue:a,next:null},An===null){if(t===null)throw Error(u(308));An=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else An=An.next=e;return a}var i1=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(a,l){t.push(l)}};this.abort=function(){e.aborted=!0,t.forEach(function(a){return a()})}},l1=n.unstable_scheduleCallback,r1=n.unstable_NormalPriority,ee={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cc(){return{controller:new i1,data:new Map,refCount:0}}function Ml(t){t.refCount--,t.refCount===0&&l1(r1,function(){t.controller.abort()})}var Nl=null,zc=0,Ai=0,Oi=null;function u1(t,e){if(Nl===null){var a=Nl=[];zc=0,Ai=Rs(),Oi={status:"pending",value:void 0,then:function(l){a.push(l)}}}return zc++,e.then($d,$d),e}function $d(){if(--zc===0&&Nl!==null){Oi!==null&&(Oi.status="fulfilled");var t=Nl;Nl=null,Ai=0,Oi=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function o1(t,e){var a=[],l={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return t.then(function(){l.status="fulfilled",l.value=e;for(var c=0;c<a.length;c++)(0,a[c])(e)},function(c){for(l.status="rejected",l.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),l}var Jd=S.S;S.S=function(t,e){Dg=se(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&u1(t,e),Jd!==null&&Jd(t,e)};var Ga=M(null);function Dc(){var t=Ga.current;return t!==null?t:Xt.pooledCache}function lu(t,e){e===null?F(Ga,Ga.current):F(Ga,e.pool)}function Wd(){var t=Dc();return t===null?null:{parent:ee._currentValue,pool:t}}var Ci=Error(u(460)),Hc=Error(u(474)),ru=Error(u(542)),uu={then:function(){}};function Id(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Fd(t,e,a){switch(a=t[a],a===void 0?t.push(e):a!==e&&(e.then(_n,_n),e=a),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,th(t),t;default:if(typeof e.status=="string")e.then(_n,_n);else{if(t=Xt,t!==null&&100<t.shellSuspendCounter)throw Error(u(482));t=e,t.status="pending",t.then(function(l){if(e.status==="pending"){var c=e;c.status="fulfilled",c.value=l}},function(l){if(e.status==="pending"){var c=e;c.status="rejected",c.reason=l}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,th(t),t}throw Za=e,Ci}}function Qa(t){try{var e=t._init;return e(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Za=a,Ci):a}}var Za=null;function Pd(){if(Za===null)throw Error(u(459));var t=Za;return Za=null,t}function th(t){if(t===Ci||t===ru)throw Error(u(483))}var zi=null,Tl=0;function ou(t){var e=Tl;return Tl+=1,zi===null&&(zi=[]),Fd(zi,t,e)}function Al(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function cu(t,e){throw e.$$typeof===v?Error(u(525)):(t=Object.prototype.toString.call(e),Error(u(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function eh(t){function e(nt,tt){if(t){var it=nt.deletions;it===null?(nt.deletions=[tt],nt.flags|=16):it.push(tt)}}function a(nt,tt){if(!t)return null;for(;tt!==null;)e(nt,tt),tt=tt.sibling;return null}function l(nt){for(var tt=new Map;nt!==null;)nt.key!==null?tt.set(nt.key,nt):tt.set(nt.index,nt),nt=nt.sibling;return tt}function c(nt,tt){return nt=Nn(nt,tt),nt.index=0,nt.sibling=null,nt}function f(nt,tt,it){return nt.index=it,t?(it=nt.alternate,it!==null?(it=it.index,it<tt?(nt.flags|=67108866,tt):it):(nt.flags|=67108866,tt)):(nt.flags|=1048576,tt)}function b(nt){return t&&nt.alternate===null&&(nt.flags|=67108866),nt}function O(nt,tt,it,st){return tt===null||tt.tag!==6?(tt=wc(it,nt.mode,st),tt.return=nt,tt):(tt=c(tt,it),tt.return=nt,tt)}function W(nt,tt,it,st){var bt=it.type;return bt===N?ct(nt,tt,it.props.children,st,it.key):tt!==null&&(tt.elementType===bt||typeof bt=="object"&&bt!==null&&bt.$$typeof===K&&Qa(bt)===tt.type)?(tt=c(tt,it.props),Al(tt,it),tt.return=nt,tt):(tt=eu(it.type,it.key,it.props,null,nt.mode,st),Al(tt,it),tt.return=nt,tt)}function lt(nt,tt,it,st){return tt===null||tt.tag!==4||tt.stateNode.containerInfo!==it.containerInfo||tt.stateNode.implementation!==it.implementation?(tt=Ec(it,nt.mode,st),tt.return=nt,tt):(tt=c(tt,it.children||[]),tt.return=nt,tt)}function ct(nt,tt,it,st,bt){return tt===null||tt.tag!==7?(tt=ka(it,nt.mode,st,bt),tt.return=nt,tt):(tt=c(tt,it),tt.return=nt,tt)}function ft(nt,tt,it){if(typeof tt=="string"&&tt!==""||typeof tt=="number"||typeof tt=="bigint")return tt=wc(""+tt,nt.mode,it),tt.return=nt,tt;if(typeof tt=="object"&&tt!==null){switch(tt.$$typeof){case x:return it=eu(tt.type,tt.key,tt.props,null,nt.mode,it),Al(it,tt),it.return=nt,it;case w:return tt=Ec(tt,nt.mode,it),tt.return=nt,tt;case K:return tt=Qa(tt),ft(nt,tt,it)}if(G(tt)||V(tt))return tt=ka(tt,nt.mode,it,null),tt.return=nt,tt;if(typeof tt.then=="function")return ft(nt,ou(tt),it);if(tt.$$typeof===E)return ft(nt,iu(nt,tt),it);cu(nt,tt)}return null}function rt(nt,tt,it,st){var bt=tt!==null?tt.key:null;if(typeof it=="string"&&it!==""||typeof it=="number"||typeof it=="bigint")return bt!==null?null:O(nt,tt,""+it,st);if(typeof it=="object"&&it!==null){switch(it.$$typeof){case x:return it.key===bt?W(nt,tt,it,st):null;case w:return it.key===bt?lt(nt,tt,it,st):null;case K:return it=Qa(it),rt(nt,tt,it,st)}if(G(it)||V(it))return bt!==null?null:ct(nt,tt,it,st,null);if(typeof it.then=="function")return rt(nt,tt,ou(it),st);if(it.$$typeof===E)return rt(nt,tt,iu(nt,it),st);cu(nt,it)}return null}function ot(nt,tt,it,st,bt){if(typeof st=="string"&&st!==""||typeof st=="number"||typeof st=="bigint")return nt=nt.get(it)||null,O(tt,nt,""+st,bt);if(typeof st=="object"&&st!==null){switch(st.$$typeof){case x:return nt=nt.get(st.key===null?it:st.key)||null,W(tt,nt,st,bt);case w:return nt=nt.get(st.key===null?it:st.key)||null,lt(tt,nt,st,bt);case K:return st=Qa(st),ot(nt,tt,it,st,bt)}if(G(st)||V(st))return nt=nt.get(it)||null,ct(tt,nt,st,bt,null);if(typeof st.then=="function")return ot(nt,tt,it,ou(st),bt);if(st.$$typeof===E)return ot(nt,tt,it,iu(tt,st),bt);cu(tt,st)}return null}function mt(nt,tt,it,st){for(var bt=null,Ht=null,yt=tt,Nt=tt=0,Ct=null;yt!==null&&Nt<it.length;Nt++){yt.index>Nt?(Ct=yt,yt=null):Ct=yt.sibling;var Rt=rt(nt,yt,it[Nt],st);if(Rt===null){yt===null&&(yt=Ct);break}t&&yt&&Rt.alternate===null&&e(nt,yt),tt=f(Rt,tt,Nt),Ht===null?bt=Rt:Ht.sibling=Rt,Ht=Rt,yt=Ct}if(Nt===it.length)return a(nt,yt),zt&&Tn(nt,Nt),bt;if(yt===null){for(;Nt<it.length;Nt++)yt=ft(nt,it[Nt],st),yt!==null&&(tt=f(yt,tt,Nt),Ht===null?bt=yt:Ht.sibling=yt,Ht=yt);return zt&&Tn(nt,Nt),bt}for(yt=l(yt);Nt<it.length;Nt++)Ct=ot(yt,nt,Nt,it[Nt],st),Ct!==null&&(t&&Ct.alternate!==null&&yt.delete(Ct.key===null?Nt:Ct.key),tt=f(Ct,tt,Nt),Ht===null?bt=Ct:Ht.sibling=Ct,Ht=Ct);return t&&yt.forEach(function(Ea){return e(nt,Ea)}),zt&&Tn(nt,Nt),bt}function wt(nt,tt,it,st){if(it==null)throw Error(u(151));for(var bt=null,Ht=null,yt=tt,Nt=tt=0,Ct=null,Rt=it.next();yt!==null&&!Rt.done;Nt++,Rt=it.next()){yt.index>Nt?(Ct=yt,yt=null):Ct=yt.sibling;var Ea=rt(nt,yt,Rt.value,st);if(Ea===null){yt===null&&(yt=Ct);break}t&&yt&&Ea.alternate===null&&e(nt,yt),tt=f(Ea,tt,Nt),Ht===null?bt=Ea:Ht.sibling=Ea,Ht=Ea,yt=Ct}if(Rt.done)return a(nt,yt),zt&&Tn(nt,Nt),bt;if(yt===null){for(;!Rt.done;Nt++,Rt=it.next())Rt=ft(nt,Rt.value,st),Rt!==null&&(tt=f(Rt,tt,Nt),Ht===null?bt=Rt:Ht.sibling=Rt,Ht=Rt);return zt&&Tn(nt,Nt),bt}for(yt=l(yt);!Rt.done;Nt++,Rt=it.next())Rt=ot(yt,nt,Nt,Rt.value,st),Rt!==null&&(t&&Rt.alternate!==null&&yt.delete(Rt.key===null?Nt:Rt.key),tt=f(Rt,tt,Nt),Ht===null?bt=Rt:Ht.sibling=Rt,Ht=Rt);return t&&yt.forEach(function(bb){return e(nt,bb)}),zt&&Tn(nt,Nt),bt}function Vt(nt,tt,it,st){if(typeof it=="object"&&it!==null&&it.type===N&&it.key===null&&(it=it.props.children),typeof it=="object"&&it!==null){switch(it.$$typeof){case x:t:{for(var bt=it.key;tt!==null;){if(tt.key===bt){if(bt=it.type,bt===N){if(tt.tag===7){a(nt,tt.sibling),st=c(tt,it.props.children),st.return=nt,nt=st;break t}}else if(tt.elementType===bt||typeof bt=="object"&&bt!==null&&bt.$$typeof===K&&Qa(bt)===tt.type){a(nt,tt.sibling),st=c(tt,it.props),Al(st,it),st.return=nt,nt=st;break t}a(nt,tt);break}else e(nt,tt);tt=tt.sibling}it.type===N?(st=ka(it.props.children,nt.mode,st,it.key),st.return=nt,nt=st):(st=eu(it.type,it.key,it.props,null,nt.mode,st),Al(st,it),st.return=nt,nt=st)}return b(nt);case w:t:{for(bt=it.key;tt!==null;){if(tt.key===bt)if(tt.tag===4&&tt.stateNode.containerInfo===it.containerInfo&&tt.stateNode.implementation===it.implementation){a(nt,tt.sibling),st=c(tt,it.children||[]),st.return=nt,nt=st;break t}else{a(nt,tt);break}else e(nt,tt);tt=tt.sibling}st=Ec(it,nt.mode,st),st.return=nt,nt=st}return b(nt);case K:return it=Qa(it),Vt(nt,tt,it,st)}if(G(it))return mt(nt,tt,it,st);if(V(it)){if(bt=V(it),typeof bt!="function")throw Error(u(150));return it=bt.call(it),wt(nt,tt,it,st)}if(typeof it.then=="function")return Vt(nt,tt,ou(it),st);if(it.$$typeof===E)return Vt(nt,tt,iu(nt,it),st);cu(nt,it)}return typeof it=="string"&&it!==""||typeof it=="number"||typeof it=="bigint"?(it=""+it,tt!==null&&tt.tag===6?(a(nt,tt.sibling),st=c(tt,it),st.return=nt,nt=st):(a(nt,tt),st=wc(it,nt.mode,st),st.return=nt,nt=st),b(nt)):a(nt,tt)}return function(nt,tt,it,st){try{Tl=0;var bt=Vt(nt,tt,it,st);return zi=null,bt}catch(yt){if(yt===Ci||yt===ru)throw yt;var Ht=De(29,yt,null,nt.mode);return Ht.lanes=st,Ht.return=nt,Ht}finally{}}}var Ka=eh(!0),nh=eh(!1),la=!1;function Rc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function jc(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ra(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ua(t,e,a){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(jt&2)!==0){var c=l.pending;return c===null?e.next=e:(e.next=c.next,c.next=e),l.pending=e,e=tu(t),Ld(t,null,a),e}return Pr(t,l,e,a),tu(t)}function Ol(t,e,a){if(e=e.updateQueue,e!==null&&(e=e.shared,(a&4194048)!==0)){var l=e.lanes;l&=t.pendingLanes,a|=l,e.lanes=a,Dr(t,a)}}function Yc(t,e){var a=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var c=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var b={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?c=f=b:f=f.next=b,a=a.next}while(a!==null);f===null?c=f=e:f=f.next=e}else c=f=e;a={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:l.shared,callbacks:l.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=e:t.next=e,a.lastBaseUpdate=e}var Bc=!1;function Cl(){if(Bc){var t=Oi;if(t!==null)throw t}}function zl(t,e,a,l){Bc=!1;var c=t.updateQueue;la=!1;var f=c.firstBaseUpdate,b=c.lastBaseUpdate,O=c.shared.pending;if(O!==null){c.shared.pending=null;var W=O,lt=W.next;W.next=null,b===null?f=lt:b.next=lt,b=W;var ct=t.alternate;ct!==null&&(ct=ct.updateQueue,O=ct.lastBaseUpdate,O!==b&&(O===null?ct.firstBaseUpdate=lt:O.next=lt,ct.lastBaseUpdate=W))}if(f!==null){var ft=c.baseState;b=0,ct=lt=W=null,O=f;do{var rt=O.lane&-536870913,ot=rt!==O.lane;if(ot?(Ot&rt)===rt:(l&rt)===rt){rt!==0&&rt===Ai&&(Bc=!0),ct!==null&&(ct=ct.next={lane:0,tag:O.tag,payload:O.payload,callback:null,next:null});t:{var mt=t,wt=O;rt=e;var Vt=a;switch(wt.tag){case 1:if(mt=wt.payload,typeof mt=="function"){ft=mt.call(Vt,ft,rt);break t}ft=mt;break t;case 3:mt.flags=mt.flags&-65537|128;case 0:if(mt=wt.payload,rt=typeof mt=="function"?mt.call(Vt,ft,rt):mt,rt==null)break t;ft=y({},ft,rt);break t;case 2:la=!0}}rt=O.callback,rt!==null&&(t.flags|=64,ot&&(t.flags|=8192),ot=c.callbacks,ot===null?c.callbacks=[rt]:ot.push(rt))}else ot={lane:rt,tag:O.tag,payload:O.payload,callback:O.callback,next:null},ct===null?(lt=ct=ot,W=ft):ct=ct.next=ot,b|=rt;if(O=O.next,O===null){if(O=c.shared.pending,O===null)break;ot=O,O=ot.next,ot.next=null,c.lastBaseUpdate=ot,c.shared.pending=null}}while(!0);ct===null&&(W=ft),c.baseState=W,c.firstBaseUpdate=lt,c.lastBaseUpdate=ct,f===null&&(c.shared.lanes=0),da|=b,t.lanes=b,t.memoizedState=ft}}function ah(t,e){if(typeof t!="function")throw Error(u(191,t));t.call(e)}function ih(t,e){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)ah(a[t],e)}var Di=M(null),su=M(0);function lh(t,e){t=Un,F(su,t),F(Di,e),Un=t|e.baseLanes}function Uc(){F(su,Un),F(Di,Di.current)}function Lc(){Un=su.current,B(Di),B(su)}var He=M(null),Ze=null;function oa(t){var e=t.alternate;F(Ft,Ft.current&1),F(He,t),Ze===null&&(e===null||Di.current!==null||e.memoizedState!==null)&&(Ze=t)}function kc(t){F(Ft,Ft.current),F(He,t),Ze===null&&(Ze=t)}function rh(t){t.tag===22?(F(Ft,Ft.current),F(He,t),Ze===null&&(Ze=t)):ca()}function ca(){F(Ft,Ft.current),F(He,He.current)}function Re(t){B(He),Ze===t&&(Ze=null),B(Ft)}var Ft=M(0);function fu(t){for(var e=t;e!==null;){if(e.tag===13){var a=e.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Zs(a)||Ks(a)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Cn=0,Mt=null,kt=null,ne=null,du=!1,Hi=!1,$a=!1,hu=0,Dl=0,Ri=null,c1=0;function Jt(){throw Error(u(321))}function qc(t,e){if(e===null)return!1;for(var a=0;a<e.length&&a<t.length;a++)if(!ze(t[a],e[a]))return!1;return!0}function Vc(t,e,a,l,c,f){return Cn=f,Mt=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,S.H=t===null||t.memoizedState===null?Xh:as,$a=!1,f=a(l,c),$a=!1,Hi&&(f=oh(e,a,l,c)),uh(t),f}function uh(t){S.H=jl;var e=kt!==null&&kt.next!==null;if(Cn=0,ne=kt=Mt=null,du=!1,Dl=0,Ri=null,e)throw Error(u(300));t===null||ae||(t=t.dependencies,t!==null&&au(t)&&(ae=!0))}function oh(t,e,a,l){Mt=t;var c=0;do{if(Hi&&(Ri=null),Dl=0,Hi=!1,25<=c)throw Error(u(301));if(c+=1,ne=kt=null,t.updateQueue!=null){var f=t.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}S.H=Gh,f=e(a,l)}while(Hi);return f}function s1(){var t=S.H,e=t.useState()[0];return e=typeof e.then=="function"?Hl(e):e,t=t.useState()[0],(kt!==null?kt.memoizedState:null)!==t&&(Mt.flags|=1024),e}function Xc(){var t=hu!==0;return hu=0,t}function Gc(t,e,a){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~a}function Qc(t){if(du){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}du=!1}Cn=0,ne=kt=Mt=null,Hi=!1,Dl=hu=0,Ri=null}function be(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ne===null?Mt.memoizedState=ne=t:ne=ne.next=t,ne}function Pt(){if(kt===null){var t=Mt.alternate;t=t!==null?t.memoizedState:null}else t=kt.next;var e=ne===null?Mt.memoizedState:ne.next;if(e!==null)ne=e,kt=t;else{if(t===null)throw Mt.alternate===null?Error(u(467)):Error(u(310));kt=t,t={memoizedState:kt.memoizedState,baseState:kt.baseState,baseQueue:kt.baseQueue,queue:kt.queue,next:null},ne===null?Mt.memoizedState=ne=t:ne=ne.next=t}return ne}function gu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Hl(t){var e=Dl;return Dl+=1,Ri===null&&(Ri=[]),t=Fd(Ri,t,e),e=Mt,(ne===null?e.memoizedState:ne.next)===null&&(e=e.alternate,S.H=e===null||e.memoizedState===null?Xh:as),t}function mu(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Hl(t);if(t.$$typeof===E)return de(t)}throw Error(u(438,String(t)))}function Zc(t){var e=null,a=Mt.updateQueue;if(a!==null&&(e=a.memoCache),e==null){var l=Mt.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(e={data:l.data.map(function(c){return c.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),a===null&&(a=gu(),Mt.updateQueue=a),a.memoCache=e,a=e.data[e.index],a===void 0)for(a=e.data[e.index]=Array(t),l=0;l<t;l++)a[l]=Z;return e.index++,a}function zn(t,e){return typeof e=="function"?e(t):e}function yu(t){var e=Pt();return Kc(e,kt,t)}function Kc(t,e,a){var l=t.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=a;var c=t.baseQueue,f=l.pending;if(f!==null){if(c!==null){var b=c.next;c.next=f.next,f.next=b}e.baseQueue=c=f,l.pending=null}if(f=t.baseState,c===null)t.memoizedState=f;else{e=c.next;var O=b=null,W=null,lt=e,ct=!1;do{var ft=lt.lane&-536870913;if(ft!==lt.lane?(Ot&ft)===ft:(Cn&ft)===ft){var rt=lt.revertLane;if(rt===0)W!==null&&(W=W.next={lane:0,revertLane:0,gesture:null,action:lt.action,hasEagerState:lt.hasEagerState,eagerState:lt.eagerState,next:null}),ft===Ai&&(ct=!0);else if((Cn&rt)===rt){lt=lt.next,rt===Ai&&(ct=!0);continue}else ft={lane:0,revertLane:lt.revertLane,gesture:null,action:lt.action,hasEagerState:lt.hasEagerState,eagerState:lt.eagerState,next:null},W===null?(O=W=ft,b=f):W=W.next=ft,Mt.lanes|=rt,da|=rt;ft=lt.action,$a&&a(f,ft),f=lt.hasEagerState?lt.eagerState:a(f,ft)}else rt={lane:ft,revertLane:lt.revertLane,gesture:lt.gesture,action:lt.action,hasEagerState:lt.hasEagerState,eagerState:lt.eagerState,next:null},W===null?(O=W=rt,b=f):W=W.next=rt,Mt.lanes|=ft,da|=ft;lt=lt.next}while(lt!==null&<!==e);if(W===null?b=f:W.next=O,!ze(f,t.memoizedState)&&(ae=!0,ct&&(a=Oi,a!==null)))throw a;t.memoizedState=f,t.baseState=b,t.baseQueue=W,l.lastRenderedState=f}return c===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function $c(t){var e=Pt(),a=e.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=t;var l=a.dispatch,c=a.pending,f=e.memoizedState;if(c!==null){a.pending=null;var b=c=c.next;do f=t(f,b.action),b=b.next;while(b!==c);ze(f,e.memoizedState)||(ae=!0),e.memoizedState=f,e.baseQueue===null&&(e.baseState=f),a.lastRenderedState=f}return[f,l]}function ch(t,e,a){var l=Mt,c=Pt(),f=zt;if(f){if(a===void 0)throw Error(u(407));a=a()}else a=e();var b=!ze((kt||c).memoizedState,a);if(b&&(c.memoizedState=a,ae=!0),c=c.queue,Ic(dh.bind(null,l,c,t),[t]),c.getSnapshot!==e||b||ne!==null&&ne.memoizedState.tag&1){if(l.flags|=2048,ji(9,{destroy:void 0},fh.bind(null,l,c,a,e),null),Xt===null)throw Error(u(349));f||(Cn&127)!==0||sh(l,e,a)}return a}function sh(t,e,a){t.flags|=16384,t={getSnapshot:e,value:a},e=Mt.updateQueue,e===null?(e=gu(),Mt.updateQueue=e,e.stores=[t]):(a=e.stores,a===null?e.stores=[t]:a.push(t))}function fh(t,e,a,l){e.value=a,e.getSnapshot=l,hh(e)&&gh(t)}function dh(t,e,a){return a(function(){hh(e)&&gh(t)})}function hh(t){var e=t.getSnapshot;t=t.value;try{var a=e();return!ze(t,a)}catch{return!0}}function gh(t){var e=La(t,2);e!==null&&Ae(e,t,2)}function Jc(t){var e=be();if(typeof t=="function"){var a=t;if(t=a(),$a){on(!0);try{a()}finally{on(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zn,lastRenderedState:t},e}function mh(t,e,a,l){return t.baseState=a,Kc(t,kt,typeof l=="function"?l:zn)}function f1(t,e,a,l,c){if(bu(t))throw Error(u(485));if(t=e.action,t!==null){var f={payload:c,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){f.listeners.push(b)}};S.T!==null?a(!0):f.isTransition=!1,l(f),a=e.pending,a===null?(f.next=e.pending=f,yh(e,f)):(f.next=a.next,e.pending=a.next=f)}}function yh(t,e){var a=e.action,l=e.payload,c=t.state;if(e.isTransition){var f=S.T,b={};S.T=b;try{var O=a(c,l),W=S.S;W!==null&&W(b,O),ph(t,e,O)}catch(lt){Wc(t,e,lt)}finally{f!==null&&b.types!==null&&(f.types=b.types),S.T=f}}else try{f=a(c,l),ph(t,e,f)}catch(lt){Wc(t,e,lt)}}function ph(t,e,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){vh(t,e,l)},function(l){return Wc(t,e,l)}):vh(t,e,a)}function vh(t,e,a){e.status="fulfilled",e.value=a,bh(e),t.state=a,e=t.pending,e!==null&&(a=e.next,a===e?t.pending=null:(a=a.next,e.next=a,yh(t,a)))}function Wc(t,e,a){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do e.status="rejected",e.reason=a,bh(e),e=e.next;while(e!==l)}t.action=null}function bh(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function xh(t,e){return e}function wh(t,e){if(zt){var a=Xt.formState;if(a!==null){t:{var l=Mt;if(zt){if(Gt){e:{for(var c=Gt,f=Qe;c.nodeType!==8;){if(!f){c=null;break e}if(c=Ke(c.nextSibling),c===null){c=null;break e}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){Gt=Ke(c.nextSibling),l=c.data==="F!";break t}}aa(l)}l=!1}l&&(e=a[0])}}return a=be(),a.memoizedState=a.baseState=e,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xh,lastRenderedState:e},a.queue=l,a=kh.bind(null,Mt,l),l.dispatch=a,l=Jc(!1),f=ns.bind(null,Mt,!1,l.queue),l=be(),c={state:e,dispatch:null,action:t,pending:null},l.queue=c,a=f1.bind(null,Mt,c,f,a),c.dispatch=a,l.memoizedState=t,[e,a,!1]}function Eh(t){var e=Pt();return Sh(e,kt,t)}function Sh(t,e,a){if(e=Kc(t,e,xh)[0],t=yu(zn)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var l=Hl(e)}catch(b){throw b===Ci?ru:b}else l=e;e=Pt();var c=e.queue,f=c.dispatch;return a!==e.memoizedState&&(Mt.flags|=2048,ji(9,{destroy:void 0},d1.bind(null,c,a),null)),[l,f,t]}function d1(t,e){t.action=e}function _h(t){var e=Pt(),a=kt;if(a!==null)return Sh(e,a,t);Pt(),e=e.memoizedState,a=Pt();var l=a.queue.dispatch;return a.memoizedState=t,[e,l,!1]}function ji(t,e,a,l){return t={tag:t,create:a,deps:l,inst:e,next:null},e=Mt.updateQueue,e===null&&(e=gu(),Mt.updateQueue=e),a=e.lastEffect,a===null?e.lastEffect=t.next=t:(l=a.next,a.next=t,t.next=l,e.lastEffect=t),t}function Mh(){return Pt().memoizedState}function pu(t,e,a,l){var c=be();Mt.flags|=t,c.memoizedState=ji(1|e,{destroy:void 0},a,l===void 0?null:l)}function vu(t,e,a,l){var c=Pt();l=l===void 0?null:l;var f=c.memoizedState.inst;kt!==null&&l!==null&&qc(l,kt.memoizedState.deps)?c.memoizedState=ji(e,f,a,l):(Mt.flags|=t,c.memoizedState=ji(1|e,f,a,l))}function Nh(t,e){pu(8390656,8,t,e)}function Ic(t,e){vu(2048,8,t,e)}function h1(t){Mt.flags|=4;var e=Mt.updateQueue;if(e===null)e=gu(),Mt.updateQueue=e,e.events=[t];else{var a=e.events;a===null?e.events=[t]:a.push(t)}}function Th(t){var e=Pt().memoizedState;return h1({ref:e,nextImpl:t}),function(){if((jt&2)!==0)throw Error(u(440));return e.impl.apply(void 0,arguments)}}function Ah(t,e){return vu(4,2,t,e)}function Oh(t,e){return vu(4,4,t,e)}function Ch(t,e){if(typeof e=="function"){t=t();var a=e(t);return function(){typeof a=="function"?a():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function zh(t,e,a){a=a!=null?a.concat([t]):null,vu(4,4,Ch.bind(null,e,t),a)}function Fc(){}function Dh(t,e){var a=Pt();e=e===void 0?null:e;var l=a.memoizedState;return e!==null&&qc(e,l[1])?l[0]:(a.memoizedState=[t,e],t)}function Hh(t,e){var a=Pt();e=e===void 0?null:e;var l=a.memoizedState;if(e!==null&&qc(e,l[1]))return l[0];if(l=t(),$a){on(!0);try{t()}finally{on(!1)}}return a.memoizedState=[l,e],l}function Pc(t,e,a){return a===void 0||(Cn&1073741824)!==0&&(Ot&261930)===0?t.memoizedState=e:(t.memoizedState=a,t=Rg(),Mt.lanes|=t,da|=t,a)}function Rh(t,e,a,l){return ze(a,e)?a:Di.current!==null?(t=Pc(t,a,l),ze(t,e)||(ae=!0),t):(Cn&42)===0||(Cn&1073741824)!==0&&(Ot&261930)===0?(ae=!0,t.memoizedState=a):(t=Rg(),Mt.lanes|=t,da|=t,e)}function jh(t,e,a,l,c){var f=H.p;H.p=f!==0&&8>f?f:8;var b=S.T,O={};S.T=O,ns(t,!1,e,a);try{var W=c(),lt=S.S;if(lt!==null&<(O,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var ct=o1(W,l);Rl(t,e,ct,Be(t))}else Rl(t,e,l,Be(t))}catch(ft){Rl(t,e,{then:function(){},status:"rejected",reason:ft},Be())}finally{H.p=f,b!==null&&O.types!==null&&(b.types=O.types),S.T=b}}function g1(){}function ts(t,e,a,l){if(t.tag!==5)throw Error(u(476));var c=Yh(t).queue;jh(t,c,e,j,a===null?g1:function(){return Bh(t),a(l)})}function Yh(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:j,baseState:j,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zn,lastRenderedState:j},next:null};var a={};return e.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zn,lastRenderedState:a},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Bh(t){var e=Yh(t);e.next===null&&(e=t.alternate.memoizedState),Rl(t,e.next.queue,{},Be())}function es(){return de(Il)}function Uh(){return Pt().memoizedState}function Lh(){return Pt().memoizedState}function m1(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var a=Be();t=ra(a);var l=ua(e,t,a);l!==null&&(Ae(l,e,a),Ol(l,e,a)),e={cache:Cc()},t.payload=e;return}e=e.return}}function y1(t,e,a){var l=Be();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},bu(t)?qh(e,a):(a=bc(t,e,a,l),a!==null&&(Ae(a,t,l),Vh(a,e,l)))}function kh(t,e,a){var l=Be();Rl(t,e,a,l)}function Rl(t,e,a,l){var c={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(bu(t))qh(e,c);else{var f=t.alternate;if(t.lanes===0&&(f===null||f.lanes===0)&&(f=e.lastRenderedReducer,f!==null))try{var b=e.lastRenderedState,O=f(b,a);if(c.hasEagerState=!0,c.eagerState=O,ze(O,b))return Pr(t,e,c,0),Xt===null&&Fr(),!1}catch{}finally{}if(a=bc(t,e,c,l),a!==null)return Ae(a,t,l),Vh(a,e,l),!0}return!1}function ns(t,e,a,l){if(l={lane:2,revertLane:Rs(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},bu(t)){if(e)throw Error(u(479))}else e=bc(t,a,l,2),e!==null&&Ae(e,t,2)}function bu(t){var e=t.alternate;return t===Mt||e!==null&&e===Mt}function qh(t,e){Hi=du=!0;var a=t.pending;a===null?e.next=e:(e.next=a.next,a.next=e),t.pending=e}function Vh(t,e,a){if((a&4194048)!==0){var l=e.lanes;l&=t.pendingLanes,a|=l,e.lanes=a,Dr(t,a)}}var jl={readContext:de,use:mu,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useLayoutEffect:Jt,useInsertionEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useSyncExternalStore:Jt,useId:Jt,useHostTransitionStatus:Jt,useFormState:Jt,useActionState:Jt,useOptimistic:Jt,useMemoCache:Jt,useCacheRefresh:Jt};jl.useEffectEvent=Jt;var Xh={readContext:de,use:mu,useCallback:function(t,e){return be().memoizedState=[t,e===void 0?null:e],t},useContext:de,useEffect:Nh,useImperativeHandle:function(t,e,a){a=a!=null?a.concat([t]):null,pu(4194308,4,Ch.bind(null,e,t),a)},useLayoutEffect:function(t,e){return pu(4194308,4,t,e)},useInsertionEffect:function(t,e){pu(4,2,t,e)},useMemo:function(t,e){var a=be();e=e===void 0?null:e;var l=t();if($a){on(!0);try{t()}finally{on(!1)}}return a.memoizedState=[l,e],l},useReducer:function(t,e,a){var l=be();if(a!==void 0){var c=a(e);if($a){on(!0);try{a(e)}finally{on(!1)}}}else c=e;return l.memoizedState=l.baseState=c,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:c},l.queue=t,t=t.dispatch=y1.bind(null,Mt,t),[l.memoizedState,t]},useRef:function(t){var e=be();return t={current:t},e.memoizedState=t},useState:function(t){t=Jc(t);var e=t.queue,a=kh.bind(null,Mt,e);return e.dispatch=a,[t.memoizedState,a]},useDebugValue:Fc,useDeferredValue:function(t,e){var a=be();return Pc(a,t,e)},useTransition:function(){var t=Jc(!1);return t=jh.bind(null,Mt,t.queue,!0,!1),be().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,a){var l=Mt,c=be();if(zt){if(a===void 0)throw Error(u(407));a=a()}else{if(a=e(),Xt===null)throw Error(u(349));(Ot&127)!==0||sh(l,e,a)}c.memoizedState=a;var f={value:a,getSnapshot:e};return c.queue=f,Nh(dh.bind(null,l,f,t),[t]),l.flags|=2048,ji(9,{destroy:void 0},fh.bind(null,l,f,a,e),null),a},useId:function(){var t=be(),e=Xt.identifierPrefix;if(zt){var a=fn,l=sn;a=(l&~(1<<32-ve(l)-1)).toString(32)+a,e="_"+e+"R_"+a,a=hu++,0<a&&(e+="H"+a.toString(32)),e+="_"}else a=c1++,e="_"+e+"r_"+a.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:es,useFormState:wh,useActionState:wh,useOptimistic:function(t){var e=be();e.memoizedState=e.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=a,e=ns.bind(null,Mt,!0,a),a.dispatch=e,[t,e]},useMemoCache:Zc,useCacheRefresh:function(){return be().memoizedState=m1.bind(null,Mt)},useEffectEvent:function(t){var e=be(),a={impl:t};return e.memoizedState=a,function(){if((jt&2)!==0)throw Error(u(440));return a.impl.apply(void 0,arguments)}}},as={readContext:de,use:mu,useCallback:Dh,useContext:de,useEffect:Ic,useImperativeHandle:zh,useInsertionEffect:Ah,useLayoutEffect:Oh,useMemo:Hh,useReducer:yu,useRef:Mh,useState:function(){return yu(zn)},useDebugValue:Fc,useDeferredValue:function(t,e){var a=Pt();return Rh(a,kt.memoizedState,t,e)},useTransition:function(){var t=yu(zn)[0],e=Pt().memoizedState;return[typeof t=="boolean"?t:Hl(t),e]},useSyncExternalStore:ch,useId:Uh,useHostTransitionStatus:es,useFormState:Eh,useActionState:Eh,useOptimistic:function(t,e){var a=Pt();return mh(a,kt,t,e)},useMemoCache:Zc,useCacheRefresh:Lh};as.useEffectEvent=Th;var Gh={readContext:de,use:mu,useCallback:Dh,useContext:de,useEffect:Ic,useImperativeHandle:zh,useInsertionEffect:Ah,useLayoutEffect:Oh,useMemo:Hh,useReducer:$c,useRef:Mh,useState:function(){return $c(zn)},useDebugValue:Fc,useDeferredValue:function(t,e){var a=Pt();return kt===null?Pc(a,t,e):Rh(a,kt.memoizedState,t,e)},useTransition:function(){var t=$c(zn)[0],e=Pt().memoizedState;return[typeof t=="boolean"?t:Hl(t),e]},useSyncExternalStore:ch,useId:Uh,useHostTransitionStatus:es,useFormState:_h,useActionState:_h,useOptimistic:function(t,e){var a=Pt();return kt!==null?mh(a,kt,t,e):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:Zc,useCacheRefresh:Lh};Gh.useEffectEvent=Th;function is(t,e,a,l){e=t.memoizedState,a=a(l,e),a=a==null?e:y({},e,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var ls={enqueueSetState:function(t,e,a){t=t._reactInternals;var l=Be(),c=ra(l);c.payload=e,a!=null&&(c.callback=a),e=ua(t,c,l),e!==null&&(Ae(e,t,l),Ol(e,t,l))},enqueueReplaceState:function(t,e,a){t=t._reactInternals;var l=Be(),c=ra(l);c.tag=1,c.payload=e,a!=null&&(c.callback=a),e=ua(t,c,l),e!==null&&(Ae(e,t,l),Ol(e,t,l))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var a=Be(),l=ra(a);l.tag=2,e!=null&&(l.callback=e),e=ua(t,l,a),e!==null&&(Ae(e,t,a),Ol(e,t,a))}};function Qh(t,e,a,l,c,f,b){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,f,b):e.prototype&&e.prototype.isPureReactComponent?!wl(a,l)||!wl(c,f):!0}function Zh(t,e,a,l){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(a,l),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(a,l),e.state!==t&&ls.enqueueReplaceState(e,e.state,null)}function Ja(t,e){var a=e;if("ref"in e){a={};for(var l in e)l!=="ref"&&(a[l]=e[l])}if(t=t.defaultProps){a===e&&(a=y({},a));for(var c in t)a[c]===void 0&&(a[c]=t[c])}return a}function Kh(t){Ir(t)}function $h(t){console.error(t)}function Jh(t){Ir(t)}function xu(t,e){try{var a=t.onUncaughtError;a(e.value,{componentStack:e.stack})}catch(l){setTimeout(function(){throw l})}}function Wh(t,e,a){try{var l=t.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function rs(t,e,a){return a=ra(a),a.tag=3,a.payload={element:null},a.callback=function(){xu(t,e)},a}function Ih(t){return t=ra(t),t.tag=3,t}function Fh(t,e,a,l){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var f=l.value;t.payload=function(){return c(f)},t.callback=function(){Wh(e,a,l)}}var b=a.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(t.callback=function(){Wh(e,a,l),typeof c!="function"&&(ha===null?ha=new Set([this]):ha.add(this));var O=l.stack;this.componentDidCatch(l.value,{componentStack:O!==null?O:""})})}function p1(t,e,a,l,c){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(e=a.alternate,e!==null&&Ti(e,a,c,!0),a=He.current,a!==null){switch(a.tag){case 31:case 13:return Ze===null?Du():a.alternate===null&&Wt===0&&(Wt=3),a.flags&=-257,a.flags|=65536,a.lanes=c,l===uu?a.flags|=16384:(e=a.updateQueue,e===null?a.updateQueue=new Set([l]):e.add(l),zs(t,l,c)),!1;case 22:return a.flags|=65536,l===uu?a.flags|=16384:(e=a.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=e):(a=e.retryQueue,a===null?e.retryQueue=new Set([l]):a.add(l)),zs(t,l,c)),!1}throw Error(u(435,a.tag))}return zs(t,l,c),Du(),!1}if(zt)return e=He.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=c,l!==Mc&&(t=Error(u(422),{cause:l}),_l(Ve(t,a)))):(l!==Mc&&(e=Error(u(423),{cause:l}),_l(Ve(e,a))),t=t.current.alternate,t.flags|=65536,c&=-c,t.lanes|=c,l=Ve(l,a),c=rs(t.stateNode,l,c),Yc(t,c),Wt!==4&&(Wt=2)),!1;var f=Error(u(520),{cause:l});if(f=Ve(f,a),Xl===null?Xl=[f]:Xl.push(f),Wt!==4&&(Wt=2),e===null)return!0;l=Ve(l,a),a=e;do{switch(a.tag){case 3:return a.flags|=65536,t=c&-c,a.lanes|=t,t=rs(a.stateNode,l,t),Yc(a,t),!1;case 1:if(e=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(ha===null||!ha.has(f))))return a.flags|=65536,c&=-c,a.lanes|=c,c=Ih(c),Fh(c,t,a,l),Yc(a,c),!1}a=a.return}while(a!==null);return!1}var us=Error(u(461)),ae=!1;function he(t,e,a,l){e.child=t===null?nh(e,null,a,l):Ka(e,t.child,a,l)}function Ph(t,e,a,l,c){a=a.render;var f=e.ref;if("ref"in l){var b={};for(var O in l)O!=="ref"&&(b[O]=l[O])}else b=l;return Xa(e),l=Vc(t,e,a,b,f,c),O=Xc(),t!==null&&!ae?(Gc(t,e,c),Dn(t,e,c)):(zt&&O&&Sc(e),e.flags|=1,he(t,e,l,c),e.child)}function tg(t,e,a,l,c){if(t===null){var f=a.type;return typeof f=="function"&&!xc(f)&&f.defaultProps===void 0&&a.compare===null?(e.tag=15,e.type=f,eg(t,e,f,l,c)):(t=eu(a.type,null,l,e,e.mode,c),t.ref=e.ref,t.return=e,e.child=t)}if(f=t.child,!ms(t,c)){var b=f.memoizedProps;if(a=a.compare,a=a!==null?a:wl,a(b,l)&&t.ref===e.ref)return Dn(t,e,c)}return e.flags|=1,t=Nn(f,l),t.ref=e.ref,t.return=e,e.child=t}function eg(t,e,a,l,c){if(t!==null){var f=t.memoizedProps;if(wl(f,l)&&t.ref===e.ref)if(ae=!1,e.pendingProps=l=f,ms(t,c))(t.flags&131072)!==0&&(ae=!0);else return e.lanes=t.lanes,Dn(t,e,c)}return os(t,e,a,l,c)}function ng(t,e,a,l){var c=l.children,f=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((e.flags&128)!==0){if(f=f!==null?f.baseLanes|a:a,t!==null){for(l=e.child=t.child,c=0;l!==null;)c=c|l.lanes|l.childLanes,l=l.sibling;l=c&~f}else l=0,e.child=null;return ag(t,e,f,a,l)}if((a&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&lu(e,f!==null?f.cachePool:null),f!==null?lh(e,f):Uc(),rh(e);else return l=e.lanes=536870912,ag(t,e,f!==null?f.baseLanes|a:a,a,l)}else f!==null?(lu(e,f.cachePool),lh(e,f),ca(),e.memoizedState=null):(t!==null&&lu(e,null),Uc(),ca());return he(t,e,c,a),e.child}function Yl(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function ag(t,e,a,l,c){var f=Dc();return f=f===null?null:{parent:ee._currentValue,pool:f},e.memoizedState={baseLanes:a,cachePool:f},t!==null&&lu(e,null),Uc(),rh(e),t!==null&&Ti(t,e,l,!0),e.childLanes=c,null}function wu(t,e){return e=Su({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function ig(t,e,a){return Ka(e,t.child,null,a),t=wu(e,e.pendingProps),t.flags|=2,Re(e),e.memoizedState=null,t}function v1(t,e,a){var l=e.pendingProps,c=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(zt){if(l.mode==="hidden")return t=wu(e,l),e.lanes=536870912,Yl(null,t);if(kc(e),(t=Gt)?(t=ym(t,Qe),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:ea!==null?{id:sn,overflow:fn}:null,retryLane:536870912,hydrationErrors:null},a=qd(t),a.return=e,e.child=a,fe=e,Gt=null)):t=null,t===null)throw aa(e);return e.lanes=536870912,null}return wu(e,l)}var f=t.memoizedState;if(f!==null){var b=f.dehydrated;if(kc(e),c)if(e.flags&256)e.flags&=-257,e=ig(t,e,a);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(u(558));else if(ae||Ti(t,e,a,!1),c=(a&t.childLanes)!==0,ae||c){if(l=Xt,l!==null&&(b=Hr(l,a),b!==0&&b!==f.retryLane))throw f.retryLane=b,La(t,b),Ae(l,t,b),us;Du(),e=ig(t,e,a)}else t=f.treeContext,Gt=Ke(b.nextSibling),fe=e,zt=!0,na=null,Qe=!1,t!==null&&Gd(e,t),e=wu(e,l),e.flags|=4096;return e}return t=Nn(t.child,{mode:l.mode,children:l.children}),t.ref=e.ref,e.child=t,t.return=e,t}function Eu(t,e){var a=e.ref;if(a===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(u(284));(t===null||t.ref!==a)&&(e.flags|=4194816)}}function os(t,e,a,l,c){return Xa(e),a=Vc(t,e,a,l,void 0,c),l=Xc(),t!==null&&!ae?(Gc(t,e,c),Dn(t,e,c)):(zt&&l&&Sc(e),e.flags|=1,he(t,e,a,c),e.child)}function lg(t,e,a,l,c,f){return Xa(e),e.updateQueue=null,a=oh(e,l,a,c),uh(t),l=Xc(),t!==null&&!ae?(Gc(t,e,f),Dn(t,e,f)):(zt&&l&&Sc(e),e.flags|=1,he(t,e,a,f),e.child)}function rg(t,e,a,l,c){if(Xa(e),e.stateNode===null){var f=Si,b=a.contextType;typeof b=="object"&&b!==null&&(f=de(b)),f=new a(l,f),e.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=ls,e.stateNode=f,f._reactInternals=e,f=e.stateNode,f.props=l,f.state=e.memoizedState,f.refs={},Rc(e),b=a.contextType,f.context=typeof b=="object"&&b!==null?de(b):Si,f.state=e.memoizedState,b=a.getDerivedStateFromProps,typeof b=="function"&&(is(e,a,b,l),f.state=e.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(b=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),b!==f.state&&ls.enqueueReplaceState(f,f.state,null),zl(e,l,f,c),Cl(),f.state=e.memoizedState),typeof f.componentDidMount=="function"&&(e.flags|=4194308),l=!0}else if(t===null){f=e.stateNode;var O=e.memoizedProps,W=Ja(a,O);f.props=W;var lt=f.context,ct=a.contextType;b=Si,typeof ct=="object"&&ct!==null&&(b=de(ct));var ft=a.getDerivedStateFromProps;ct=typeof ft=="function"||typeof f.getSnapshotBeforeUpdate=="function",O=e.pendingProps!==O,ct||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(O||lt!==b)&&Zh(e,f,l,b),la=!1;var rt=e.memoizedState;f.state=rt,zl(e,l,f,c),Cl(),lt=e.memoizedState,O||rt!==lt||la?(typeof ft=="function"&&(is(e,a,ft,l),lt=e.memoizedState),(W=la||Qh(e,a,W,l,rt,lt,b))?(ct||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(e.flags|=4194308)):(typeof f.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=l,e.memoizedState=lt),f.props=l,f.state=lt,f.context=b,l=W):(typeof f.componentDidMount=="function"&&(e.flags|=4194308),l=!1)}else{f=e.stateNode,jc(t,e),b=e.memoizedProps,ct=Ja(a,b),f.props=ct,ft=e.pendingProps,rt=f.context,lt=a.contextType,W=Si,typeof lt=="object"&<!==null&&(W=de(lt)),O=a.getDerivedStateFromProps,(lt=typeof O=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(b!==ft||rt!==W)&&Zh(e,f,l,W),la=!1,rt=e.memoizedState,f.state=rt,zl(e,l,f,c),Cl();var ot=e.memoizedState;b!==ft||rt!==ot||la||t!==null&&t.dependencies!==null&&au(t.dependencies)?(typeof O=="function"&&(is(e,a,O,l),ot=e.memoizedState),(ct=la||Qh(e,a,ct,l,rt,ot,W)||t!==null&&t.dependencies!==null&&au(t.dependencies))?(lt||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,ot,W),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,ot,W)),typeof f.componentDidUpdate=="function"&&(e.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof f.componentDidUpdate!="function"||b===t.memoizedProps&&rt===t.memoizedState||(e.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===t.memoizedProps&&rt===t.memoizedState||(e.flags|=1024),e.memoizedProps=l,e.memoizedState=ot),f.props=l,f.state=ot,f.context=W,l=ct):(typeof f.componentDidUpdate!="function"||b===t.memoizedProps&&rt===t.memoizedState||(e.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===t.memoizedProps&&rt===t.memoizedState||(e.flags|=1024),l=!1)}return f=l,Eu(t,e),l=(e.flags&128)!==0,f||l?(f=e.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:f.render(),e.flags|=1,t!==null&&l?(e.child=Ka(e,t.child,null,c),e.child=Ka(e,null,a,c)):he(t,e,a,c),e.memoizedState=f.state,t=e.child):t=Dn(t,e,c),t}function ug(t,e,a,l){return qa(),e.flags|=256,he(t,e,a,l),e.child}var cs={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ss(t){return{baseLanes:t,cachePool:Wd()}}function fs(t,e,a){return t=t!==null?t.childLanes&~a:0,e&&(t|=Ye),t}function og(t,e,a){var l=e.pendingProps,c=!1,f=(e.flags&128)!==0,b;if((b=f)||(b=t!==null&&t.memoizedState===null?!1:(Ft.current&2)!==0),b&&(c=!0,e.flags&=-129),b=(e.flags&32)!==0,e.flags&=-33,t===null){if(zt){if(c?oa(e):ca(),(t=Gt)?(t=ym(t,Qe),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:ea!==null?{id:sn,overflow:fn}:null,retryLane:536870912,hydrationErrors:null},a=qd(t),a.return=e,e.child=a,fe=e,Gt=null)):t=null,t===null)throw aa(e);return Ks(t)?e.lanes=32:e.lanes=536870912,null}var O=l.children;return l=l.fallback,c?(ca(),c=e.mode,O=Su({mode:"hidden",children:O},c),l=ka(l,c,a,null),O.return=e,l.return=e,O.sibling=l,e.child=O,l=e.child,l.memoizedState=ss(a),l.childLanes=fs(t,b,a),e.memoizedState=cs,Yl(null,l)):(oa(e),ds(e,O))}var W=t.memoizedState;if(W!==null&&(O=W.dehydrated,O!==null)){if(f)e.flags&256?(oa(e),e.flags&=-257,e=hs(t,e,a)):e.memoizedState!==null?(ca(),e.child=t.child,e.flags|=128,e=null):(ca(),O=l.fallback,c=e.mode,l=Su({mode:"visible",children:l.children},c),O=ka(O,c,a,null),O.flags|=2,l.return=e,O.return=e,l.sibling=O,e.child=l,Ka(e,t.child,null,a),l=e.child,l.memoizedState=ss(a),l.childLanes=fs(t,b,a),e.memoizedState=cs,e=Yl(null,l));else if(oa(e),Ks(O)){if(b=O.nextSibling&&O.nextSibling.dataset,b)var lt=b.dgst;b=lt,l=Error(u(419)),l.stack="",l.digest=b,_l({value:l,source:null,stack:null}),e=hs(t,e,a)}else if(ae||Ti(t,e,a,!1),b=(a&t.childLanes)!==0,ae||b){if(b=Xt,b!==null&&(l=Hr(b,a),l!==0&&l!==W.retryLane))throw W.retryLane=l,La(t,l),Ae(b,t,l),us;Zs(O)||Du(),e=hs(t,e,a)}else Zs(O)?(e.flags|=192,e.child=t.child,e=null):(t=W.treeContext,Gt=Ke(O.nextSibling),fe=e,zt=!0,na=null,Qe=!1,t!==null&&Gd(e,t),e=ds(e,l.children),e.flags|=4096);return e}return c?(ca(),O=l.fallback,c=e.mode,W=t.child,lt=W.sibling,l=Nn(W,{mode:"hidden",children:l.children}),l.subtreeFlags=W.subtreeFlags&65011712,lt!==null?O=Nn(lt,O):(O=ka(O,c,a,null),O.flags|=2),O.return=e,l.return=e,l.sibling=O,e.child=l,Yl(null,l),l=e.child,O=t.child.memoizedState,O===null?O=ss(a):(c=O.cachePool,c!==null?(W=ee._currentValue,c=c.parent!==W?{parent:W,pool:W}:c):c=Wd(),O={baseLanes:O.baseLanes|a,cachePool:c}),l.memoizedState=O,l.childLanes=fs(t,b,a),e.memoizedState=cs,Yl(t.child,l)):(oa(e),a=t.child,t=a.sibling,a=Nn(a,{mode:"visible",children:l.children}),a.return=e,a.sibling=null,t!==null&&(b=e.deletions,b===null?(e.deletions=[t],e.flags|=16):b.push(t)),e.child=a,e.memoizedState=null,a)}function ds(t,e){return e=Su({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function Su(t,e){return t=De(22,t,null,e),t.lanes=0,t}function hs(t,e,a){return Ka(e,t.child,null,a),t=ds(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function cg(t,e,a){t.lanes|=e;var l=t.alternate;l!==null&&(l.lanes|=e),Ac(t.return,e,a)}function gs(t,e,a,l,c,f){var b=t.memoizedState;b===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:c,treeForkCount:f}:(b.isBackwards=e,b.rendering=null,b.renderingStartTime=0,b.last=l,b.tail=a,b.tailMode=c,b.treeForkCount=f)}function sg(t,e,a){var l=e.pendingProps,c=l.revealOrder,f=l.tail;l=l.children;var b=Ft.current,O=(b&2)!==0;if(O?(b=b&1|2,e.flags|=128):b&=1,F(Ft,b),he(t,e,l,a),l=zt?Sl:0,!O&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&cg(t,a,e);else if(t.tag===19)cg(t,a,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(c){case"forwards":for(a=e.child,c=null;a!==null;)t=a.alternate,t!==null&&fu(t)===null&&(c=a),a=a.sibling;a=c,a===null?(c=e.child,e.child=null):(c=a.sibling,a.sibling=null),gs(e,!1,c,a,f,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=e.child,e.child=null;c!==null;){if(t=c.alternate,t!==null&&fu(t)===null){e.child=c;break}t=c.sibling,c.sibling=a,a=c,c=t}gs(e,!0,a,null,f,l);break;case"together":gs(e,!1,null,null,void 0,l);break;default:e.memoizedState=null}return e.child}function Dn(t,e,a){if(t!==null&&(e.dependencies=t.dependencies),da|=e.lanes,(a&e.childLanes)===0)if(t!==null){if(Ti(t,e,a,!1),(a&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(u(153));if(e.child!==null){for(t=e.child,a=Nn(t,t.pendingProps),e.child=a,a.return=e;t.sibling!==null;)t=t.sibling,a=a.sibling=Nn(t,t.pendingProps),a.return=e;a.sibling=null}return e.child}function ms(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&au(t)))}function b1(t,e,a){switch(e.tag){case 3:I(e,e.stateNode.containerInfo),ia(e,ee,t.memoizedState.cache),qa();break;case 27:case 5:dt(e);break;case 4:I(e,e.stateNode.containerInfo);break;case 10:ia(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,kc(e),null;break;case 13:var l=e.memoizedState;if(l!==null)return l.dehydrated!==null?(oa(e),e.flags|=128,null):(a&e.child.childLanes)!==0?og(t,e,a):(oa(e),t=Dn(t,e,a),t!==null?t.sibling:null);oa(e);break;case 19:var c=(t.flags&128)!==0;if(l=(a&e.childLanes)!==0,l||(Ti(t,e,a,!1),l=(a&e.childLanes)!==0),c){if(l)return sg(t,e,a);e.flags|=128}if(c=e.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),F(Ft,Ft.current),l)break;return null;case 22:return e.lanes=0,ng(t,e,a,e.pendingProps);case 24:ia(e,ee,t.memoizedState.cache)}return Dn(t,e,a)}function fg(t,e,a){if(t!==null)if(t.memoizedProps!==e.pendingProps)ae=!0;else{if(!ms(t,a)&&(e.flags&128)===0)return ae=!1,b1(t,e,a);ae=(t.flags&131072)!==0}else ae=!1,zt&&(e.flags&1048576)!==0&&Xd(e,Sl,e.index);switch(e.lanes=0,e.tag){case 16:t:{var l=e.pendingProps;if(t=Qa(e.elementType),e.type=t,typeof t=="function")xc(t)?(l=Ja(t,l),e.tag=1,e=rg(null,e,t,l,a)):(e.tag=0,e=os(null,e,t,l,a));else{if(t!=null){var c=t.$$typeof;if(c===_){e.tag=11,e=Ph(null,e,t,l,a);break t}else if(c===k){e.tag=14,e=tg(null,e,t,l,a);break t}}throw e=T(t)||t,Error(u(306,e,""))}}return e;case 0:return os(t,e,e.type,e.pendingProps,a);case 1:return l=e.type,c=Ja(l,e.pendingProps),rg(t,e,l,c,a);case 3:t:{if(I(e,e.stateNode.containerInfo),t===null)throw Error(u(387));l=e.pendingProps;var f=e.memoizedState;c=f.element,jc(t,e),zl(e,l,null,a);var b=e.memoizedState;if(l=b.cache,ia(e,ee,l),l!==f.cache&&Oc(e,[ee],a,!0),Cl(),l=b.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:b.cache},e.updateQueue.baseState=f,e.memoizedState=f,e.flags&256){e=ug(t,e,l,a);break t}else if(l!==c){c=Ve(Error(u(424)),e),_l(c),e=ug(t,e,l,a);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(Gt=Ke(t.firstChild),fe=e,zt=!0,na=null,Qe=!0,a=nh(e,null,l,a),e.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(qa(),l===c){e=Dn(t,e,a);break t}he(t,e,l,a)}e=e.child}return e;case 26:return Eu(t,e),t===null?(a=Em(e.type,null,e.pendingProps,null))?e.memoizedState=a:zt||(a=e.type,t=e.pendingProps,l=Lu(X.current).createElement(a),l[ue]=e,l[me]=t,ge(l,a,t),te(l),e.stateNode=l):e.memoizedState=Em(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return dt(e),t===null&&zt&&(l=e.stateNode=bm(e.type,e.pendingProps,X.current),fe=e,Qe=!0,c=Gt,pa(e.type)?($s=c,Gt=Ke(l.firstChild)):Gt=c),he(t,e,e.pendingProps.children,a),Eu(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&zt&&((c=l=Gt)&&(l=J1(l,e.type,e.pendingProps,Qe),l!==null?(e.stateNode=l,fe=e,Gt=Ke(l.firstChild),Qe=!1,c=!0):c=!1),c||aa(e)),dt(e),c=e.type,f=e.pendingProps,b=t!==null?t.memoizedProps:null,l=f.children,Xs(c,f)?l=null:b!==null&&Xs(c,b)&&(e.flags|=32),e.memoizedState!==null&&(c=Vc(t,e,s1,null,null,a),Il._currentValue=c),Eu(t,e),he(t,e,l,a),e.child;case 6:return t===null&&zt&&((t=a=Gt)&&(a=W1(a,e.pendingProps,Qe),a!==null?(e.stateNode=a,fe=e,Gt=null,t=!0):t=!1),t||aa(e)),null;case 13:return og(t,e,a);case 4:return I(e,e.stateNode.containerInfo),l=e.pendingProps,t===null?e.child=Ka(e,null,l,a):he(t,e,l,a),e.child;case 11:return Ph(t,e,e.type,e.pendingProps,a);case 7:return he(t,e,e.pendingProps,a),e.child;case 8:return he(t,e,e.pendingProps.children,a),e.child;case 12:return he(t,e,e.pendingProps.children,a),e.child;case 10:return l=e.pendingProps,ia(e,e.type,l.value),he(t,e,l.children,a),e.child;case 9:return c=e.type._context,l=e.pendingProps.children,Xa(e),c=de(c),l=l(c),e.flags|=1,he(t,e,l,a),e.child;case 14:return tg(t,e,e.type,e.pendingProps,a);case 15:return eg(t,e,e.type,e.pendingProps,a);case 19:return sg(t,e,a);case 31:return v1(t,e,a);case 22:return ng(t,e,a,e.pendingProps);case 24:return Xa(e),l=de(ee),t===null?(c=Dc(),c===null&&(c=Xt,f=Cc(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=a),c=f),e.memoizedState={parent:l,cache:c},Rc(e),ia(e,ee,c)):((t.lanes&a)!==0&&(jc(t,e),zl(e,null,null,a),Cl()),c=t.memoizedState,f=e.memoizedState,c.parent!==l?(c={parent:l,cache:l},e.memoizedState=c,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=c),ia(e,ee,l)):(l=f.cache,ia(e,ee,l),l!==c.cache&&Oc(e,[ee],a,!0))),he(t,e,e.pendingProps.children,a),e.child;case 29:throw e.pendingProps}throw Error(u(156,e.tag))}function Hn(t){t.flags|=4}function ys(t,e,a,l,c){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(c&335544128)===c)if(t.stateNode.complete)t.flags|=8192;else if(Ug())t.flags|=8192;else throw Za=uu,Hc}else t.flags&=-16777217}function dg(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Tm(e))if(Ug())t.flags|=8192;else throw Za=uu,Hc}function _u(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?Cr():536870912,t.lanes|=e,Li|=e)}function Bl(t,e){if(!zt)switch(t.tailMode){case"hidden":e=t.tail;for(var a=null;e!==null;)e.alternate!==null&&(a=e),e=e.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function Qt(t){var e=t.alternate!==null&&t.alternate.child===t.child,a=0,l=0;if(e)for(var c=t.child;c!==null;)a|=c.lanes|c.childLanes,l|=c.subtreeFlags&65011712,l|=c.flags&65011712,c.return=t,c=c.sibling;else for(c=t.child;c!==null;)a|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=t,c=c.sibling;return t.subtreeFlags|=l,t.childLanes=a,e}function x1(t,e,a){var l=e.pendingProps;switch(_c(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qt(e),null;case 1:return Qt(e),null;case 3:return a=e.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),On(ee),at(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(Ni(e)?Hn(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,Nc())),Qt(e),null;case 26:var c=e.type,f=e.memoizedState;return t===null?(Hn(e),f!==null?(Qt(e),dg(e,f)):(Qt(e),ys(e,c,null,l,a))):f?f!==t.memoizedState?(Hn(e),Qt(e),dg(e,f)):(Qt(e),e.flags&=-16777217):(t=t.memoizedProps,t!==l&&Hn(e),Qt(e),ys(e,c,t,l,a)),null;case 27:if(ht(e),a=X.current,c=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==l&&Hn(e);else{if(!l){if(e.stateNode===null)throw Error(u(166));return Qt(e),null}t=R.current,Ni(e)?Qd(e):(t=bm(c,l,a),e.stateNode=t,Hn(e))}return Qt(e),null;case 5:if(ht(e),c=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==l&&Hn(e);else{if(!l){if(e.stateNode===null)throw Error(u(166));return Qt(e),null}if(f=R.current,Ni(e))Qd(e);else{var b=Lu(X.current);switch(f){case 1:f=b.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:f=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":f=b.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":f=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":f=b.createElement("div"),f.innerHTML="<script><\\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof l.is=="string"?b.createElement("select",{is:l.is}):b.createElement("select"),l.multiple?f.multiple=!0:l.size&&(f.size=l.size);break;default:f=typeof l.is=="string"?b.createElement(c,{is:l.is}):b.createElement(c)}}f[ue]=e,f[me]=l;t:for(b=e.child;b!==null;){if(b.tag===5||b.tag===6)f.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===e)break t;for(;b.sibling===null;){if(b.return===null||b.return===e)break t;b=b.return}b.sibling.return=b.return,b=b.sibling}e.stateNode=f;t:switch(ge(f,c,l),c){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break t;case"img":l=!0;break t;default:l=!1}l&&Hn(e)}}return Qt(e),ys(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,a),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==l&&Hn(e);else{if(typeof l!="string"&&e.stateNode===null)throw Error(u(166));if(t=X.current,Ni(e)){if(t=e.stateNode,a=e.memoizedProps,l=null,c=fe,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}t[ue]=e,t=!!(t.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||om(t.nodeValue,a)),t||aa(e,!0)}else t=Lu(t).createTextNode(l),t[ue]=e,e.stateNode=t}return Qt(e),null;case 31:if(a=e.memoizedState,t===null||t.memoizedState!==null){if(l=Ni(e),a!==null){if(t===null){if(!l)throw Error(u(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(u(557));t[ue]=e}else qa(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Qt(e),t=!1}else a=Nc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return e.flags&256?(Re(e),e):(Re(e),null);if((e.flags&128)!==0)throw Error(u(558))}return Qt(e),null;case 13:if(l=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(c=Ni(e),l!==null&&l.dehydrated!==null){if(t===null){if(!c)throw Error(u(318));if(c=e.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(u(317));c[ue]=e}else qa(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Qt(e),c=!1}else c=Nc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=c),c=!0;if(!c)return e.flags&256?(Re(e),e):(Re(e),null)}return Re(e),(e.flags&128)!==0?(e.lanes=a,e):(a=l!==null,t=t!==null&&t.memoizedState!==null,a&&(l=e.child,c=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(c=l.alternate.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==c&&(l.flags|=2048)),a!==t&&a&&(e.child.flags|=8192),_u(e,e.updateQueue),Qt(e),null);case 4:return at(),t===null&&Us(e.stateNode.containerInfo),Qt(e),null;case 10:return On(e.type),Qt(e),null;case 19:if(B(Ft),l=e.memoizedState,l===null)return Qt(e),null;if(c=(e.flags&128)!==0,f=l.rendering,f===null)if(c)Bl(l,!1);else{if(Wt!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(f=fu(t),f!==null){for(e.flags|=128,Bl(l,!1),t=f.updateQueue,e.updateQueue=t,_u(e,t),e.subtreeFlags=0,t=a,a=e.child;a!==null;)kd(a,t),a=a.sibling;return F(Ft,Ft.current&1|2),zt&&Tn(e,l.treeForkCount),e.child}t=t.sibling}l.tail!==null&&se()>Ou&&(e.flags|=128,c=!0,Bl(l,!1),e.lanes=4194304)}else{if(!c)if(t=fu(f),t!==null){if(e.flags|=128,c=!0,t=t.updateQueue,e.updateQueue=t,_u(e,t),Bl(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!zt)return Qt(e),null}else 2*se()-l.renderingStartTime>Ou&&a!==536870912&&(e.flags|=128,c=!0,Bl(l,!1),e.lanes=4194304);l.isBackwards?(f.sibling=e.child,e.child=f):(t=l.last,t!==null?t.sibling=f:e.child=f,l.last=f)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=se(),t.sibling=null,a=Ft.current,F(Ft,c?a&1|2:a&1),zt&&Tn(e,l.treeForkCount),t):(Qt(e),null);case 22:case 23:return Re(e),Lc(),l=e.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(e.flags|=8192):l&&(e.flags|=8192),l?(a&536870912)!==0&&(e.flags&128)===0&&(Qt(e),e.subtreeFlags&6&&(e.flags|=8192)):Qt(e),a=e.updateQueue,a!==null&&_u(e,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),l=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),l!==a&&(e.flags|=2048),t!==null&&B(Ga),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),e.memoizedState.cache!==a&&(e.flags|=2048),On(ee),Qt(e),null;case 25:return null;case 30:return null}throw Error(u(156,e.tag))}function w1(t,e){switch(_c(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return On(ee),at(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return ht(e),null;case 31:if(e.memoizedState!==null){if(Re(e),e.alternate===null)throw Error(u(340));qa()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(Re(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(u(340));qa()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return B(Ft),null;case 4:return at(),null;case 10:return On(e.type),null;case 22:case 23:return Re(e),Lc(),t!==null&&B(Ga),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return On(ee),null;case 25:return null;default:return null}}function hg(t,e){switch(_c(e),e.tag){case 3:On(ee),at();break;case 26:case 27:case 5:ht(e);break;case 4:at();break;case 31:e.memoizedState!==null&&Re(e);break;case 13:Re(e);break;case 19:B(Ft);break;case 10:On(e.type);break;case 22:case 23:Re(e),Lc(),t!==null&&B(Ga);break;case 24:On(ee)}}function Ul(t,e){try{var a=e.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var c=l.next;a=c;do{if((a.tag&t)===t){l=void 0;var f=a.create,b=a.inst;l=f(),b.destroy=l}a=a.next}while(a!==c)}}catch(O){Bt(e,e.return,O)}}function sa(t,e,a){try{var l=e.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var f=c.next;l=f;do{if((l.tag&t)===t){var b=l.inst,O=b.destroy;if(O!==void 0){b.destroy=void 0,c=e;var W=a,lt=O;try{lt()}catch(ct){Bt(c,W,ct)}}}l=l.next}while(l!==f)}}catch(ct){Bt(e,e.return,ct)}}function gg(t){var e=t.updateQueue;if(e!==null){var a=t.stateNode;try{ih(e,a)}catch(l){Bt(t,t.return,l)}}}function mg(t,e,a){a.props=Ja(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(l){Bt(t,e,l)}}function Ll(t,e){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var l=t.stateNode;break;case 30:l=t.stateNode;break;default:l=t.stateNode}typeof a=="function"?t.refCleanup=a(l):a.current=l}}catch(c){Bt(t,e,c)}}function dn(t,e){var a=t.ref,l=t.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(c){Bt(t,e,c)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){Bt(t,e,c)}else a.current=null}function yg(t){var e=t.type,a=t.memoizedProps,l=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break t;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(c){Bt(t,t.return,c)}}function ps(t,e,a){try{var l=t.stateNode;X1(l,t.type,a,e),l[me]=e}catch(c){Bt(t,t.return,c)}}function pg(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&pa(t.type)||t.tag===4}function vs(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||pg(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&pa(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function bs(t,e,a){var l=t.tag;if(l===5||l===6)t=t.stateNode,e?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,e):(e=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,e.appendChild(t),a=a._reactRootContainer,a!=null||e.onclick!==null||(e.onclick=_n));else if(l!==4&&(l===27&&pa(t.type)&&(a=t.stateNode,e=null),t=t.child,t!==null))for(bs(t,e,a),t=t.sibling;t!==null;)bs(t,e,a),t=t.sibling}function Mu(t,e,a){var l=t.tag;if(l===5||l===6)t=t.stateNode,e?a.insertBefore(t,e):a.appendChild(t);else if(l!==4&&(l===27&&pa(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(Mu(t,e,a),t=t.sibling;t!==null;)Mu(t,e,a),t=t.sibling}function vg(t){var e=t.stateNode,a=t.memoizedProps;try{for(var l=t.type,c=e.attributes;c.length;)e.removeAttributeNode(c[0]);ge(e,l,a),e[ue]=t,e[me]=a}catch(f){Bt(t,t.return,f)}}var Rn=!1,ie=!1,xs=!1,bg=typeof WeakSet=="function"?WeakSet:Set,ce=null;function E1(t,e){if(t=t.containerInfo,qs=Zu,t=zd(t),hc(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else t:{a=(a=t.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break t}var b=0,O=-1,W=-1,lt=0,ct=0,ft=t,rt=null;e:for(;;){for(var ot;ft!==a||c!==0&&ft.nodeType!==3||(O=b+c),ft!==f||l!==0&&ft.nodeType!==3||(W=b+l),ft.nodeType===3&&(b+=ft.nodeValue.length),(ot=ft.firstChild)!==null;)rt=ft,ft=ot;for(;;){if(ft===t)break e;if(rt===a&&++lt===c&&(O=b),rt===f&&++ct===l&&(W=b),(ot=ft.nextSibling)!==null)break;ft=rt,rt=ft.parentNode}ft=ot}a=O===-1||W===-1?null:{start:O,end:W}}else a=null}a=a||{start:0,end:0}}else a=null;for(Vs={focusedElem:t,selectionRange:a},Zu=!1,ce=e;ce!==null;)if(e=ce,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ce=t;else for(;ce!==null;){switch(e=ce,f=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(a=0;a<t.length;a++)c=t[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&f!==null){t=void 0,a=e,c=f.memoizedProps,f=f.memoizedState,l=a.stateNode;try{var mt=Ja(a.type,c);t=l.getSnapshotBeforeUpdate(mt,f),l.__reactInternalSnapshotBeforeUpdate=t}catch(wt){Bt(a,a.return,wt)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,a=t.nodeType,a===9)Qs(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Qs(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(u(163))}if(t=e.sibling,t!==null){t.return=e.return,ce=t;break}ce=e.return}}function xg(t,e,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Yn(t,a),l&4&&Ul(5,a);break;case 1:if(Yn(t,a),l&4)if(t=a.stateNode,e===null)try{t.componentDidMount()}catch(b){Bt(a,a.return,b)}else{var c=Ja(a.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(c,e,t.__reactInternalSnapshotBeforeUpdate)}catch(b){Bt(a,a.return,b)}}l&64&&gg(a),l&512&&Ll(a,a.return);break;case 3:if(Yn(t,a),l&64&&(t=a.updateQueue,t!==null)){if(e=null,a.child!==null)switch(a.child.tag){case 27:case 5:e=a.child.stateNode;break;case 1:e=a.child.stateNode}try{ih(t,e)}catch(b){Bt(a,a.return,b)}}break;case 27:e===null&&l&4&&vg(a);case 26:case 5:Yn(t,a),e===null&&l&4&&yg(a),l&512&&Ll(a,a.return);break;case 12:Yn(t,a);break;case 31:Yn(t,a),l&4&&Sg(t,a);break;case 13:Yn(t,a),l&4&&_g(t,a),l&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=z1.bind(null,a),I1(t,a))));break;case 22:if(l=a.memoizedState!==null||Rn,!l){e=e!==null&&e.memoizedState!==null||ie,c=Rn;var f=ie;Rn=l,(ie=e)&&!f?Bn(t,a,(a.subtreeFlags&8772)!==0):Yn(t,a),Rn=c,ie=f}break;case 30:break;default:Yn(t,a)}}function wg(t){var e=t.alternate;e!==null&&(t.alternate=null,wg(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&fl(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var Zt=null,_e=!1;function jn(t,e,a){for(a=a.child;a!==null;)Eg(t,e,a),a=a.sibling}function Eg(t,e,a){if(pe&&typeof pe.onCommitFiberUnmount=="function")try{pe.onCommitFiberUnmount(Ca,a)}catch{}switch(a.tag){case 26:ie||dn(a,e),jn(t,e,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:ie||dn(a,e);var l=Zt,c=_e;pa(a.type)&&(Zt=a.stateNode,_e=!1),jn(t,e,a),$l(a.stateNode),Zt=l,_e=c;break;case 5:ie||dn(a,e);case 6:if(l=Zt,c=_e,Zt=null,jn(t,e,a),Zt=l,_e=c,Zt!==null)if(_e)try{(Zt.nodeType===9?Zt.body:Zt.nodeName==="HTML"?Zt.ownerDocument.body:Zt).removeChild(a.stateNode)}catch(f){Bt(a,e,f)}else try{Zt.removeChild(a.stateNode)}catch(f){Bt(a,e,f)}break;case 18:Zt!==null&&(_e?(t=Zt,gm(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),Ki(t)):gm(Zt,a.stateNode));break;case 4:l=Zt,c=_e,Zt=a.stateNode.containerInfo,_e=!0,jn(t,e,a),Zt=l,_e=c;break;case 0:case 11:case 14:case 15:sa(2,a,e),ie||sa(4,a,e),jn(t,e,a);break;case 1:ie||(dn(a,e),l=a.stateNode,typeof l.componentWillUnmount=="function"&&mg(a,e,l)),jn(t,e,a);break;case 21:jn(t,e,a);break;case 22:ie=(l=ie)||a.memoizedState!==null,jn(t,e,a),ie=l;break;default:jn(t,e,a)}}function Sg(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Ki(t)}catch(a){Bt(e,e.return,a)}}}function _g(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Ki(t)}catch(a){Bt(e,e.return,a)}}function S1(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new bg),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new bg),e;default:throw Error(u(435,t.tag))}}function Nu(t,e){var a=S1(t);e.forEach(function(l){if(!a.has(l)){a.add(l);var c=D1.bind(null,t,l);l.then(c,c)}})}function Me(t,e){var a=e.deletions;if(a!==null)for(var l=0;l<a.length;l++){var c=a[l],f=t,b=e,O=b;t:for(;O!==null;){switch(O.tag){case 27:if(pa(O.type)){Zt=O.stateNode,_e=!1;break t}break;case 5:Zt=O.stateNode,_e=!1;break t;case 3:case 4:Zt=O.stateNode.containerInfo,_e=!0;break t}O=O.return}if(Zt===null)throw Error(u(160));Eg(f,b,c),Zt=null,_e=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)Mg(e,t),e=e.sibling}var Pe=null;function Mg(t,e){var a=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Me(e,t),Ne(t),l&4&&(sa(3,t,t.return),Ul(3,t),sa(5,t,t.return));break;case 1:Me(e,t),Ne(t),l&512&&(ie||a===null||dn(a,a.return)),l&64&&Rn&&(t=t.updateQueue,t!==null&&(l=t.callbacks,l!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var c=Pe;if(Me(e,t),Ne(t),l&512&&(ie||a===null||dn(a,a.return)),l&4){var f=a!==null?a.memoizedState:null;if(l=t.memoizedState,a===null)if(l===null)if(t.stateNode===null){t:{l=t.type,a=t.memoizedProps,c=c.ownerDocument||c;e:switch(l){case"title":f=c.getElementsByTagName("title")[0],(!f||f[Ha]||f[ue]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(l),c.head.insertBefore(f,c.querySelector("head > title"))),ge(f,l,a),f[ue]=t,te(f),l=f;break t;case"link":var b=Mm("link","href",c).get(l+(a.href||""));if(b){for(var O=0;O<b.length;O++)if(f=b[O],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){b.splice(O,1);break e}}f=c.createElement(l),ge(f,l,a),c.head.appendChild(f);break;case"meta":if(b=Mm("meta","content",c).get(l+(a.content||""))){for(O=0;O<b.length;O++)if(f=b[O],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){b.splice(O,1);break e}}f=c.createElement(l),ge(f,l,a),c.head.appendChild(f);break;default:throw Error(u(468,l))}f[ue]=t,te(f),l=f}t.stateNode=l}else Nm(c,t.type,t.stateNode);else t.stateNode=_m(c,l,t.memoizedProps);else f!==l?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,l===null?Nm(c,t.type,t.stateNode):_m(c,l,t.memoizedProps)):l===null&&t.stateNode!==null&&ps(t,t.memoizedProps,a.memoizedProps)}break;case 27:Me(e,t),Ne(t),l&512&&(ie||a===null||dn(a,a.return)),a!==null&&l&4&&ps(t,t.memoizedProps,a.memoizedProps);break;case 5:if(Me(e,t),Ne(t),l&512&&(ie||a===null||dn(a,a.return)),t.flags&32){c=t.stateNode;try{yi(c,"")}catch(mt){Bt(t,t.return,mt)}}l&4&&t.stateNode!=null&&(c=t.memoizedProps,ps(t,c,a!==null?a.memoizedProps:c)),l&1024&&(xs=!0);break;case 6:if(Me(e,t),Ne(t),l&4){if(t.stateNode===null)throw Error(u(162));l=t.memoizedProps,a=t.stateNode;try{a.nodeValue=l}catch(mt){Bt(t,t.return,mt)}}break;case 3:if(Vu=null,c=Pe,Pe=ku(e.containerInfo),Me(e,t),Pe=c,Ne(t),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Ki(e.containerInfo)}catch(mt){Bt(t,t.return,mt)}xs&&(xs=!1,Ng(t));break;case 4:l=Pe,Pe=ku(t.stateNode.containerInfo),Me(e,t),Ne(t),Pe=l;break;case 12:Me(e,t),Ne(t);break;case 31:Me(e,t),Ne(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Nu(t,l)));break;case 13:Me(e,t),Ne(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Au=se()),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Nu(t,l)));break;case 22:c=t.memoizedState!==null;var W=a!==null&&a.memoizedState!==null,lt=Rn,ct=ie;if(Rn=lt||c,ie=ct||W,Me(e,t),ie=ct,Rn=lt,Ne(t),l&8192)t:for(e=t.stateNode,e._visibility=c?e._visibility&-2:e._visibility|1,c&&(a===null||W||Rn||ie||Wa(t)),a=null,e=t;;){if(e.tag===5||e.tag===26){if(a===null){W=a=e;try{if(f=W.stateNode,c)b=f.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{O=W.stateNode;var ft=W.memoizedProps.style,rt=ft!=null&&ft.hasOwnProperty("display")?ft.display:null;O.style.display=rt==null||typeof rt=="boolean"?"":(""+rt).trim()}}catch(mt){Bt(W,W.return,mt)}}}else if(e.tag===6){if(a===null){W=e;try{W.stateNode.nodeValue=c?"":W.memoizedProps}catch(mt){Bt(W,W.return,mt)}}}else if(e.tag===18){if(a===null){W=e;try{var ot=W.stateNode;c?mm(ot,!0):mm(W.stateNode,!1)}catch(mt){Bt(W,W.return,mt)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;a===e&&(a=null),e=e.return}a===e&&(a=null),e.sibling.return=e.return,e=e.sibling}l&4&&(l=t.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,Nu(t,a))));break;case 19:Me(e,t),Ne(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Nu(t,l)));break;case 30:break;case 21:break;default:Me(e,t),Ne(t)}}function Ne(t){var e=t.flags;if(e&2){try{for(var a,l=t.return;l!==null;){if(pg(l)){a=l;break}l=l.return}if(a==null)throw Error(u(160));switch(a.tag){case 27:var c=a.stateNode,f=vs(t);Mu(t,f,c);break;case 5:var b=a.stateNode;a.flags&32&&(yi(b,""),a.flags&=-33);var O=vs(t);Mu(t,O,b);break;case 3:case 4:var W=a.stateNode.containerInfo,lt=vs(t);bs(t,lt,W);break;default:throw Error(u(161))}}catch(ct){Bt(t,t.return,ct)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function Ng(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;Ng(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function Yn(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)xg(t,e.alternate,e),e=e.sibling}function Wa(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:sa(4,e,e.return),Wa(e);break;case 1:dn(e,e.return);var a=e.stateNode;typeof a.componentWillUnmount=="function"&&mg(e,e.return,a),Wa(e);break;case 27:$l(e.stateNode);case 26:case 5:dn(e,e.return),Wa(e);break;case 22:e.memoizedState===null&&Wa(e);break;case 30:Wa(e);break;default:Wa(e)}t=t.sibling}}function Bn(t,e,a){for(a=a&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var l=e.alternate,c=t,f=e,b=f.flags;switch(f.tag){case 0:case 11:case 15:Bn(c,f,a),Ul(4,f);break;case 1:if(Bn(c,f,a),l=f,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(lt){Bt(l,l.return,lt)}if(l=f,c=l.updateQueue,c!==null){var O=l.stateNode;try{var W=c.shared.hiddenCallbacks;if(W!==null)for(c.shared.hiddenCallbacks=null,c=0;c<W.length;c++)ah(W[c],O)}catch(lt){Bt(l,l.return,lt)}}a&&b&64&&gg(f),Ll(f,f.return);break;case 27:vg(f);case 26:case 5:Bn(c,f,a),a&&l===null&&b&4&&yg(f),Ll(f,f.return);break;case 12:Bn(c,f,a);break;case 31:Bn(c,f,a),a&&b&4&&Sg(c,f);break;case 13:Bn(c,f,a),a&&b&4&&_g(c,f);break;case 22:f.memoizedState===null&&Bn(c,f,a),Ll(f,f.return);break;case 30:break;default:Bn(c,f,a)}e=e.sibling}}function ws(t,e){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&Ml(a))}function Es(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Ml(t))}function tn(t,e,a,l){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Tg(t,e,a,l),e=e.sibling}function Tg(t,e,a,l){var c=e.flags;switch(e.tag){case 0:case 11:case 15:tn(t,e,a,l),c&2048&&Ul(9,e);break;case 1:tn(t,e,a,l);break;case 3:tn(t,e,a,l),c&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Ml(t)));break;case 12:if(c&2048){tn(t,e,a,l),t=e.stateNode;try{var f=e.memoizedProps,b=f.id,O=f.onPostCommit;typeof O=="function"&&O(b,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(W){Bt(e,e.return,W)}}else tn(t,e,a,l);break;case 31:tn(t,e,a,l);break;case 13:tn(t,e,a,l);break;case 23:break;case 22:f=e.stateNode,b=e.alternate,e.memoizedState!==null?f._visibility&2?tn(t,e,a,l):kl(t,e):f._visibility&2?tn(t,e,a,l):(f._visibility|=2,Yi(t,e,a,l,(e.subtreeFlags&10256)!==0||!1)),c&2048&&ws(b,e);break;case 24:tn(t,e,a,l),c&2048&&Es(e.alternate,e);break;default:tn(t,e,a,l)}}function Yi(t,e,a,l,c){for(c=c&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var f=t,b=e,O=a,W=l,lt=b.flags;switch(b.tag){case 0:case 11:case 15:Yi(f,b,O,W,c),Ul(8,b);break;case 23:break;case 22:var ct=b.stateNode;b.memoizedState!==null?ct._visibility&2?Yi(f,b,O,W,c):kl(f,b):(ct._visibility|=2,Yi(f,b,O,W,c)),c&<&2048&&ws(b.alternate,b);break;case 24:Yi(f,b,O,W,c),c&<&2048&&Es(b.alternate,b);break;default:Yi(f,b,O,W,c)}e=e.sibling}}function kl(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var a=t,l=e,c=l.flags;switch(l.tag){case 22:kl(a,l),c&2048&&ws(l.alternate,l);break;case 24:kl(a,l),c&2048&&Es(l.alternate,l);break;default:kl(a,l)}e=e.sibling}}var ql=8192;function Bi(t,e,a){if(t.subtreeFlags&ql)for(t=t.child;t!==null;)Ag(t,e,a),t=t.sibling}function Ag(t,e,a){switch(t.tag){case 26:Bi(t,e,a),t.flags&ql&&t.memoizedState!==null&&cb(a,Pe,t.memoizedState,t.memoizedProps);break;case 5:Bi(t,e,a);break;case 3:case 4:var l=Pe;Pe=ku(t.stateNode.containerInfo),Bi(t,e,a),Pe=l;break;case 22:t.memoizedState===null&&(l=t.alternate,l!==null&&l.memoizedState!==null?(l=ql,ql=16777216,Bi(t,e,a),ql=l):Bi(t,e,a));break;default:Bi(t,e,a)}}function Og(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function Vl(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var a=0;a<e.length;a++){var l=e[a];ce=l,zg(l,t)}Og(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Cg(t),t=t.sibling}function Cg(t){switch(t.tag){case 0:case 11:case 15:Vl(t),t.flags&2048&&sa(9,t,t.return);break;case 3:Vl(t);break;case 12:Vl(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,Tu(t)):Vl(t);break;default:Vl(t)}}function Tu(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var a=0;a<e.length;a++){var l=e[a];ce=l,zg(l,t)}Og(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:sa(8,e,e.return),Tu(e);break;case 22:a=e.stateNode,a._visibility&2&&(a._visibility&=-3,Tu(e));break;default:Tu(e)}t=t.sibling}}function zg(t,e){for(;ce!==null;){var a=ce;switch(a.tag){case 0:case 11:case 15:sa(8,a,e);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Ml(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,ce=l;else t:for(a=t;ce!==null;){l=ce;var c=l.sibling,f=l.return;if(wg(l),l===a){ce=null;break t}if(c!==null){c.return=f,ce=c;break t}ce=f}}}var _1={getCacheForType:function(t){var e=de(ee),a=e.data.get(t);return a===void 0&&(a=t(),e.data.set(t,a)),a},cacheSignal:function(){return de(ee).controller.signal}},M1=typeof WeakMap=="function"?WeakMap:Map,jt=0,Xt=null,Tt=null,Ot=0,Yt=0,je=null,fa=!1,Ui=!1,Ss=!1,Un=0,Wt=0,da=0,Ia=0,_s=0,Ye=0,Li=0,Xl=null,Te=null,Ms=!1,Au=0,Dg=0,Ou=1/0,Cu=null,ha=null,oe=0,ga=null,ki=null,Ln=0,Ns=0,Ts=null,Hg=null,Gl=0,As=null;function Be(){return(jt&2)!==0&&Ot!==0?Ot&-Ot:S.T!==null?Rs():Rr()}function Rg(){if(Ye===0)if((Ot&536870912)===0||zt){var t=si;si<<=1,(si&3932160)===0&&(si=262144),Ye=t}else Ye=536870912;return t=He.current,t!==null&&(t.flags|=32),Ye}function Ae(t,e,a){(t===Xt&&(Yt===2||Yt===9)||t.cancelPendingCommit!==null)&&(qi(t,0),ma(t,Ot,Ye,!1)),Da(t,a),((jt&2)===0||t!==Xt)&&(t===Xt&&((jt&2)===0&&(Ia|=a),Wt===4&&ma(t,Ot,Ye,!1)),hn(t))}function jg(t,e,a){if((jt&6)!==0)throw Error(u(327));var l=!a&&(e&127)===0&&(e&t.expiredLanes)===0||za(t,e),c=l?A1(t,e):Cs(t,e,!0),f=l;do{if(c===0){Ui&&!l&&ma(t,e,0,!1);break}else{if(a=t.current.alternate,f&&!N1(a)){c=Cs(t,e,!1),f=!1;continue}if(c===2){if(f=e,t.errorRecoveryDisabledLanes&f)var b=0;else b=t.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){e=b;t:{var O=t;c=Xl;var W=O.current.memoizedState.isDehydrated;if(W&&(qi(O,b).flags|=256),b=Cs(O,b,!1),b!==2){if(Ss&&!W){O.errorRecoveryDisabledLanes|=f,Ia|=f,c=4;break t}f=Te,Te=c,f!==null&&(Te===null?Te=f:Te.push.apply(Te,f))}c=b}if(f=!1,c!==2)continue}}if(c===1){qi(t,0),ma(t,e,0,!0);break}t:{switch(l=t,f=c,f){case 0:case 1:throw Error(u(345));case 4:if((e&4194048)!==e)break;case 6:ma(l,e,Ye,!fa);break t;case 2:Te=null;break;case 3:case 5:break;default:throw Error(u(329))}if((e&62914560)===e&&(c=Au+300-se(),10<c)){if(ma(l,e,Ye,!fa),di(l,0,!0)!==0)break t;Ln=e,l.timeoutHandle=dm(Yg.bind(null,l,a,Te,Cu,Ms,e,Ye,Ia,Li,fa,f,"Throttled",-0,0),c);break t}Yg(l,a,Te,Cu,Ms,e,Ye,Ia,Li,fa,f,null,-0,0)}}break}while(!0);hn(t)}function Yg(t,e,a,l,c,f,b,O,W,lt,ct,ft,rt,ot){if(t.timeoutHandle=-1,ft=e.subtreeFlags,ft&8192||(ft&16785408)===16785408){ft={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_n},Ag(e,f,ft);var mt=(f&62914560)===f?Au-se():(f&4194048)===f?Dg-se():0;if(mt=sb(ft,mt),mt!==null){Ln=f,t.cancelPendingCommit=mt(Gg.bind(null,t,e,f,a,l,c,b,O,W,ct,ft,null,rt,ot)),ma(t,f,b,!lt);return}}Gg(t,e,f,a,l,c,b,O,W)}function N1(t){for(var e=t;;){var a=e.tag;if((a===0||a===11||a===15)&&e.flags&16384&&(a=e.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var c=a[l],f=c.getSnapshot;c=c.value;try{if(!ze(f(),c))return!1}catch{return!1}}if(a=e.child,e.subtreeFlags&16384&&a!==null)a.return=e,e=a;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function ma(t,e,a,l){e&=~_s,e&=~Ia,t.suspendedLanes|=e,t.pingedLanes&=~e,l&&(t.warmLanes|=e),l=t.expirationTimes;for(var c=e;0<c;){var f=31-ve(c),b=1<<f;l[f]=-1,c&=~b}a!==0&&zr(t,a,e)}function zu(){return(jt&6)===0?(Ql(0),!1):!0}function Os(){if(Tt!==null){if(Yt===0)var t=Tt.return;else t=Tt,An=Va=null,Qc(t),zi=null,Tl=0,t=Tt;for(;t!==null;)hg(t.alternate,t),t=t.return;Tt=null}}function qi(t,e){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,Z1(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),Ln=0,Os(),Xt=t,Tt=a=Nn(t.current,null),Ot=e,Yt=0,je=null,fa=!1,Ui=za(t,e),Ss=!1,Li=Ye=_s=Ia=da=Wt=0,Te=Xl=null,Ms=!1,(e&8)!==0&&(e|=e&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=e;0<l;){var c=31-ve(l),f=1<<c;e|=t[c],l&=~f}return Un=e,Fr(),a}function Bg(t,e){Mt=null,S.H=jl,e===Ci||e===ru?(e=Pd(),Yt=3):e===Hc?(e=Pd(),Yt=4):Yt=e===us?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,je=e,Tt===null&&(Wt=1,xu(t,Ve(e,t.current)))}function Ug(){var t=He.current;return t===null?!0:(Ot&4194048)===Ot?Ze===null:(Ot&62914560)===Ot||(Ot&536870912)!==0?t===Ze:!1}function Lg(){var t=S.H;return S.H=jl,t===null?jl:t}function kg(){var t=S.A;return S.A=_1,t}function Du(){Wt=4,fa||(Ot&4194048)!==Ot&&He.current!==null||(Ui=!0),(da&134217727)===0&&(Ia&134217727)===0||Xt===null||ma(Xt,Ot,Ye,!1)}function Cs(t,e,a){var l=jt;jt|=2;var c=Lg(),f=kg();(Xt!==t||Ot!==e)&&(Cu=null,qi(t,e)),e=!1;var b=Wt;t:do try{if(Yt!==0&&Tt!==null){var O=Tt,W=je;switch(Yt){case 8:Os(),b=6;break t;case 3:case 2:case 9:case 6:He.current===null&&(e=!0);var lt=Yt;if(Yt=0,je=null,Vi(t,O,W,lt),a&&Ui){b=0;break t}break;default:lt=Yt,Yt=0,je=null,Vi(t,O,W,lt)}}T1(),b=Wt;break}catch(ct){Bg(t,ct)}while(!0);return e&&t.shellSuspendCounter++,An=Va=null,jt=l,S.H=c,S.A=f,Tt===null&&(Xt=null,Ot=0,Fr()),b}function T1(){for(;Tt!==null;)qg(Tt)}function A1(t,e){var a=jt;jt|=2;var l=Lg(),c=kg();Xt!==t||Ot!==e?(Cu=null,Ou=se()+500,qi(t,e)):Ui=za(t,e);t:do try{if(Yt!==0&&Tt!==null){e=Tt;var f=je;e:switch(Yt){case 1:Yt=0,je=null,Vi(t,e,f,1);break;case 2:case 9:if(Id(f)){Yt=0,je=null,Vg(e);break}e=function(){Yt!==2&&Yt!==9||Xt!==t||(Yt=7),hn(t)},f.then(e,e);break t;case 3:Yt=7;break t;case 4:Yt=5;break t;case 7:Id(f)?(Yt=0,je=null,Vg(e)):(Yt=0,je=null,Vi(t,e,f,7));break;case 5:var b=null;switch(Tt.tag){case 26:b=Tt.memoizedState;case 5:case 27:var O=Tt;if(b?Tm(b):O.stateNode.complete){Yt=0,je=null;var W=O.sibling;if(W!==null)Tt=W;else{var lt=O.return;lt!==null?(Tt=lt,Hu(lt)):Tt=null}break e}}Yt=0,je=null,Vi(t,e,f,5);break;case 6:Yt=0,je=null,Vi(t,e,f,6);break;case 8:Os(),Wt=6;break t;default:throw Error(u(462))}}O1();break}catch(ct){Bg(t,ct)}while(!0);return An=Va=null,S.H=l,S.A=c,jt=a,Tt!==null?0:(Xt=null,Ot=0,Fr(),Wt)}function O1(){for(;Tt!==null&&!Ta();)qg(Tt)}function qg(t){var e=fg(t.alternate,t,Un);t.memoizedProps=t.pendingProps,e===null?Hu(t):Tt=e}function Vg(t){var e=t,a=e.alternate;switch(e.tag){case 15:case 0:e=lg(a,e,e.pendingProps,e.type,void 0,Ot);break;case 11:e=lg(a,e,e.pendingProps,e.type.render,e.ref,Ot);break;case 5:Qc(e);default:hg(a,e),e=Tt=kd(e,Un),e=fg(a,e,Un)}t.memoizedProps=t.pendingProps,e===null?Hu(t):Tt=e}function Vi(t,e,a,l){An=Va=null,Qc(e),zi=null,Tl=0;var c=e.return;try{if(p1(t,c,e,a,Ot)){Wt=1,xu(t,Ve(a,t.current)),Tt=null;return}}catch(f){if(c!==null)throw Tt=c,f;Wt=1,xu(t,Ve(a,t.current)),Tt=null;return}e.flags&32768?(zt||l===1?t=!0:Ui||(Ot&536870912)!==0?t=!1:(fa=t=!0,(l===2||l===9||l===3||l===6)&&(l=He.current,l!==null&&l.tag===13&&(l.flags|=16384))),Xg(e,t)):Hu(e)}function Hu(t){var e=t;do{if((e.flags&32768)!==0){Xg(e,fa);return}t=e.return;var a=x1(e.alternate,e,Un);if(a!==null){Tt=a;return}if(e=e.sibling,e!==null){Tt=e;return}Tt=e=t}while(e!==null);Wt===0&&(Wt=5)}function Xg(t,e){do{var a=w1(t.alternate,t);if(a!==null){a.flags&=32767,Tt=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!e&&(t=t.sibling,t!==null)){Tt=t;return}Tt=t=a}while(t!==null);Wt=6,Tt=null}function Gg(t,e,a,l,c,f,b,O,W){t.cancelPendingCommit=null;do Ru();while(oe!==0);if((jt&6)!==0)throw Error(u(327));if(e!==null){if(e===t.current)throw Error(u(177));if(f=e.lanes|e.childLanes,f|=vc,$o(t,a,f,b,O,W),t===Xt&&(Tt=Xt=null,Ot=0),ki=e,ga=t,Ln=a,Ns=f,Ts=c,Hg=l,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,H1(Oa,function(){return Jg(),null})):(t.callbackNode=null,t.callbackPriority=0),l=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||l){l=S.T,S.T=null,c=H.p,H.p=2,b=jt,jt|=4;try{E1(t,e,a)}finally{jt=b,H.p=c,S.T=l}}oe=1,Qg(),Zg(),Kg()}}function Qg(){if(oe===1){oe=0;var t=ga,e=ki,a=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||a){a=S.T,S.T=null;var l=H.p;H.p=2;var c=jt;jt|=4;try{Mg(e,t);var f=Vs,b=zd(t.containerInfo),O=f.focusedElem,W=f.selectionRange;if(b!==O&&O&&O.ownerDocument&&Cd(O.ownerDocument.documentElement,O)){if(W!==null&&hc(O)){var lt=W.start,ct=W.end;if(ct===void 0&&(ct=lt),"selectionStart"in O)O.selectionStart=lt,O.selectionEnd=Math.min(ct,O.value.length);else{var ft=O.ownerDocument||document,rt=ft&&ft.defaultView||window;if(rt.getSelection){var ot=rt.getSelection(),mt=O.textContent.length,wt=Math.min(W.start,mt),Vt=W.end===void 0?wt:Math.min(W.end,mt);!ot.extend&&wt>Vt&&(b=Vt,Vt=wt,wt=b);var nt=Od(O,wt),tt=Od(O,Vt);if(nt&&tt&&(ot.rangeCount!==1||ot.anchorNode!==nt.node||ot.anchorOffset!==nt.offset||ot.focusNode!==tt.node||ot.focusOffset!==tt.offset)){var it=ft.createRange();it.setStart(nt.node,nt.offset),ot.removeAllRanges(),wt>Vt?(ot.addRange(it),ot.extend(tt.node,tt.offset)):(it.setEnd(tt.node,tt.offset),ot.addRange(it))}}}}for(ft=[],ot=O;ot=ot.parentNode;)ot.nodeType===1&&ft.push({element:ot,left:ot.scrollLeft,top:ot.scrollTop});for(typeof O.focus=="function"&&O.focus(),O=0;O<ft.length;O++){var st=ft[O];st.element.scrollLeft=st.left,st.element.scrollTop=st.top}}Zu=!!qs,Vs=qs=null}finally{jt=c,H.p=l,S.T=a}}t.current=e,oe=2}}function Zg(){if(oe===2){oe=0;var t=ga,e=ki,a=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||a){a=S.T,S.T=null;var l=H.p;H.p=2;var c=jt;jt|=4;try{xg(t,e.alternate,e)}finally{jt=c,H.p=l,S.T=a}}oe=3}}function Kg(){if(oe===4||oe===3){oe=0,Aa();var t=ga,e=ki,a=Ln,l=Hg;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?oe=5:(oe=0,ki=ga=null,$g(t,t.pendingLanes));var c=t.pendingLanes;if(c===0&&(ha=null),sl(a),e=e.stateNode,pe&&typeof pe.onCommitFiberRoot=="function")try{pe.onCommitFiberRoot(Ca,e,void 0,(e.current.flags&128)===128)}catch{}if(l!==null){e=S.T,c=H.p,H.p=2,S.T=null;try{for(var f=t.onRecoverableError,b=0;b<l.length;b++){var O=l[b];f(O.value,{componentStack:O.stack})}}finally{S.T=e,H.p=c}}(Ln&3)!==0&&Ru(),hn(t),c=t.pendingLanes,(a&261930)!==0&&(c&42)!==0?t===As?Gl++:(Gl=0,As=t):Gl=0,Ql(0)}}function $g(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,Ml(e)))}function Ru(){return Qg(),Zg(),Kg(),Jg()}function Jg(){if(oe!==5)return!1;var t=ga,e=Ns;Ns=0;var a=sl(Ln),l=S.T,c=H.p;try{H.p=32>a?32:a,S.T=null,a=Ts,Ts=null;var f=ga,b=Ln;if(oe=0,ki=ga=null,Ln=0,(jt&6)!==0)throw Error(u(331));var O=jt;if(jt|=4,Cg(f.current),Tg(f,f.current,b,a),jt=O,Ql(0,!1),pe&&typeof pe.onPostCommitFiberRoot=="function")try{pe.onPostCommitFiberRoot(Ca,f)}catch{}return!0}finally{H.p=c,S.T=l,$g(t,e)}}function Wg(t,e,a){e=Ve(a,e),e=rs(t.stateNode,e,2),t=ua(t,e,2),t!==null&&(Da(t,2),hn(t))}function Bt(t,e,a){if(t.tag===3)Wg(t,t,a);else for(;e!==null;){if(e.tag===3){Wg(e,t,a);break}else if(e.tag===1){var l=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ha===null||!ha.has(l))){t=Ve(a,t),a=Ih(2),l=ua(e,a,2),l!==null&&(Fh(a,l,e,t),Da(l,2),hn(l));break}}e=e.return}}function zs(t,e,a){var l=t.pingCache;if(l===null){l=t.pingCache=new M1;var c=new Set;l.set(e,c)}else c=l.get(e),c===void 0&&(c=new Set,l.set(e,c));c.has(a)||(Ss=!0,c.add(a),t=C1.bind(null,t,e,a),e.then(t,t))}function C1(t,e,a){var l=t.pingCache;l!==null&&l.delete(e),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,Xt===t&&(Ot&a)===a&&(Wt===4||Wt===3&&(Ot&62914560)===Ot&&300>se()-Au?(jt&2)===0&&qi(t,0):_s|=a,Li===Ot&&(Li=0)),hn(t)}function Ig(t,e){e===0&&(e=Cr()),t=La(t,e),t!==null&&(Da(t,e),hn(t))}function z1(t){var e=t.memoizedState,a=0;e!==null&&(a=e.retryLane),Ig(t,a)}function D1(t,e){var a=0;switch(t.tag){case 31:case 13:var l=t.stateNode,c=t.memoizedState;c!==null&&(a=c.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(u(314))}l!==null&&l.delete(e),Ig(t,a)}function H1(t,e){return We(t,e)}var ju=null,Xi=null,Ds=!1,Yu=!1,Hs=!1,ya=0;function hn(t){t!==Xi&&t.next===null&&(Xi===null?ju=Xi=t:Xi=Xi.next=t),Yu=!0,Ds||(Ds=!0,j1())}function Ql(t,e){if(!Hs&&Yu){Hs=!0;do for(var a=!1,l=ju;l!==null;){if(t!==0){var c=l.pendingLanes;if(c===0)var f=0;else{var b=l.suspendedLanes,O=l.pingedLanes;f=(1<<31-ve(42|t)+1)-1,f&=c&~(b&~O),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,em(l,f))}else f=Ot,f=di(l,l===Xt?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||za(l,f)||(a=!0,em(l,f));l=l.next}while(a);Hs=!1}}function R1(){Fg()}function Fg(){Yu=Ds=!1;var t=0;ya!==0&&Q1()&&(t=ya);for(var e=se(),a=null,l=ju;l!==null;){var c=l.next,f=Pg(l,e);f===0?(l.next=null,a===null?ju=c:a.next=c,c===null&&(Xi=a)):(a=l,(t!==0||(f&3)!==0)&&(Yu=!0)),l=c}oe!==0&&oe!==5||Ql(t),ya!==0&&(ya=0)}function Pg(t,e){for(var a=t.suspendedLanes,l=t.pingedLanes,c=t.expirationTimes,f=t.pendingLanes&-62914561;0<f;){var b=31-ve(f),O=1<<b,W=c[b];W===-1?((O&a)===0||(O&l)!==0)&&(c[b]=Ko(O,e)):W<=e&&(t.expiredLanes|=O),f&=~O}if(e=Xt,a=Ot,a=di(t,t===e?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l=t.callbackNode,a===0||t===e&&(Yt===2||Yt===9)||t.cancelPendingCommit!==null)return l!==null&&l!==null&&vn(l),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||za(t,a)){if(e=a&-a,e===t.callbackPriority)return e;switch(l!==null&&vn(l),sl(a)){case 2:case 8:a=Kn;break;case 32:a=Oa;break;case 268435456:a=oi;break;default:a=Oa}return l=tm.bind(null,t),a=We(a,l),t.callbackPriority=e,t.callbackNode=a,e}return l!==null&&l!==null&&vn(l),t.callbackPriority=2,t.callbackNode=null,2}function tm(t,e){if(oe!==0&&oe!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(Ru()&&t.callbackNode!==a)return null;var l=Ot;return l=di(t,t===Xt?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l===0?null:(jg(t,l,e),Pg(t,se()),t.callbackNode!=null&&t.callbackNode===a?tm.bind(null,t):null)}function em(t,e){if(Ru())return null;jg(t,e,!0)}function j1(){K1(function(){(jt&6)!==0?We(bn,R1):Fg()})}function Rs(){if(ya===0){var t=Ai;t===0&&(t=ci,ci<<=1,(ci&261888)===0&&(ci=256)),ya=t}return ya}function nm(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Gr(""+t)}function am(t,e){var a=e.ownerDocument.createElement("input");return a.name=e.name,a.value=e.value,t.id&&a.setAttribute("form",t.id),e.parentNode.insertBefore(a,e),t=new FormData(t),a.parentNode.removeChild(a),t}function Y1(t,e,a,l,c){if(e==="submit"&&a&&a.stateNode===c){var f=nm((c[me]||null).action),b=l.submitter;b&&(e=(e=b[me]||null)?nm(e.formAction):b.getAttribute("formAction"),e!==null&&(f=e,b=null));var O=new $r("action","action",null,l,c);t.push({event:O,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(ya!==0){var W=b?am(c,b):new FormData(c);ts(a,{pending:!0,data:W,method:c.method,action:f},null,W)}}else typeof f=="function"&&(O.preventDefault(),W=b?am(c,b):new FormData(c),ts(a,{pending:!0,data:W,method:c.method,action:f},f,W))},currentTarget:c}]})}}for(var js=0;js<pc.length;js++){var Ys=pc[js],B1=Ys.toLowerCase(),U1=Ys[0].toUpperCase()+Ys.slice(1);Fe(B1,"on"+U1)}Fe(Rd,"onAnimationEnd"),Fe(jd,"onAnimationIteration"),Fe(Yd,"onAnimationStart"),Fe("dblclick","onDoubleClick"),Fe("focusin","onFocus"),Fe("focusout","onBlur"),Fe(t1,"onTransitionRun"),Fe(e1,"onTransitionStart"),Fe(n1,"onTransitionCancel"),Fe(Bd,"onTransitionEnd"),Fn("onMouseEnter",["mouseout","mouseover"]),Fn("onMouseLeave",["mouseout","mouseover"]),Fn("onPointerEnter",["pointerout","pointerover"]),Fn("onPointerLeave",["pointerout","pointerover"]),En("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),En("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),En("onBeforeInput",["compositionend","keypress","textInput","paste"]),En("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),En("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),En("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zl="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(" "),L1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Zl));function im(t,e){e=(e&4)!==0;for(var a=0;a<t.length;a++){var l=t[a],c=l.event;l=l.listeners;t:{var f=void 0;if(e)for(var b=l.length-1;0<=b;b--){var O=l[b],W=O.instance,lt=O.currentTarget;if(O=O.listener,W!==f&&c.isPropagationStopped())break t;f=O,c.currentTarget=lt;try{f(c)}catch(ct){Ir(ct)}c.currentTarget=null,f=W}else for(b=0;b<l.length;b++){if(O=l[b],W=O.instance,lt=O.currentTarget,O=O.listener,W!==f&&c.isPropagationStopped())break t;f=O,c.currentTarget=lt;try{f(c)}catch(ct){Ir(ct)}c.currentTarget=null,f=W}}}}function At(t,e){var a=e[hi];a===void 0&&(a=e[hi]=new Set);var l=t+"__bubble";a.has(l)||(lm(e,t,2,!1),a.add(l))}function Bs(t,e,a){var l=0;e&&(l|=4),lm(a,t,l,e)}var Bu="_reactListening"+Math.random().toString(36).slice(2);function Us(t){if(!t[Bu]){t[Bu]=!0,Ur.forEach(function(a){a!=="selectionchange"&&(L1.has(a)||Bs(a,!1,t),Bs(a,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Bu]||(e[Bu]=!0,Bs("selectionchange",!1,e))}}function lm(t,e,a,l){switch(Rm(e)){case 2:var c=hb;break;case 8:c=gb;break;default:c=Ps}a=c.bind(null,e,a,t),c=void 0,!ic||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(c=!0),l?c!==void 0?t.addEventListener(e,a,{capture:!0,passive:c}):t.addEventListener(e,a,!0):c!==void 0?t.addEventListener(e,a,{passive:c}):t.addEventListener(e,a,!1)}function Ls(t,e,a,l,c){var f=l;if((e&1)===0&&(e&2)===0&&l!==null)t:for(;;){if(l===null)return;var b=l.tag;if(b===3||b===4){var O=l.stateNode.containerInfo;if(O===c)break;if(b===4)for(b=l.return;b!==null;){var W=b.tag;if((W===3||W===4)&&b.stateNode.containerInfo===c)return;b=b.return}for(;O!==null;){if(b=$n(O),b===null)return;if(W=b.tag,W===5||W===6||W===26||W===27){l=f=b;continue t}O=O.parentNode}}l=l.return}sd(function(){var lt=f,ct=nc(a),ft=[];t:{var rt=Ud.get(t);if(rt!==void 0){var ot=$r,mt=t;switch(t){case"keypress":if(Zr(a)===0)break t;case"keydown":case"keyup":ot=Dv;break;case"focusin":mt="focus",ot=oc;break;case"focusout":mt="blur",ot=oc;break;case"beforeblur":case"afterblur":ot=oc;break;case"click":if(a.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ot=hd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ot=xv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ot=jv;break;case Rd:case jd:case Yd:ot=Sv;break;case Bd:ot=Bv;break;case"scroll":case"scrollend":ot=vv;break;case"wheel":ot=Lv;break;case"copy":case"cut":case"paste":ot=Mv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ot=md;break;case"toggle":case"beforetoggle":ot=qv}var wt=(e&4)!==0,Vt=!wt&&(t==="scroll"||t==="scrollend"),nt=wt?rt!==null?rt+"Capture":null:rt;wt=[];for(var tt=lt,it;tt!==null;){var st=tt;if(it=st.stateNode,st=st.tag,st!==5&&st!==26&&st!==27||it===null||nt===null||(st=gl(tt,nt),st!=null&&wt.push(Kl(tt,st,it))),Vt)break;tt=tt.return}0<wt.length&&(rt=new ot(rt,mt,null,a,ct),ft.push({event:rt,listeners:wt}))}}if((e&7)===0){t:{if(rt=t==="mouseover"||t==="pointerover",ot=t==="mouseout"||t==="pointerout",rt&&a!==ec&&(mt=a.relatedTarget||a.fromElement)&&($n(mt)||mt[wn]))break t;if((ot||rt)&&(rt=ct.window===ct?ct:(rt=ct.ownerDocument)?rt.defaultView||rt.parentWindow:window,ot?(mt=a.relatedTarget||a.toElement,ot=lt,mt=mt?$n(mt):null,mt!==null&&(Vt=s(mt),wt=mt.tag,mt!==Vt||wt!==5&&wt!==27&&wt!==6)&&(mt=null)):(ot=null,mt=lt),ot!==mt)){if(wt=hd,st="onMouseLeave",nt="onMouseEnter",tt="mouse",(t==="pointerout"||t==="pointerover")&&(wt=md,st="onPointerLeave",nt="onPointerEnter",tt="pointer"),Vt=ot==null?rt:Wn(ot),it=mt==null?rt:Wn(mt),rt=new wt(st,tt+"leave",ot,a,ct),rt.target=Vt,rt.relatedTarget=it,st=null,$n(ct)===lt&&(wt=new wt(nt,tt+"enter",mt,a,ct),wt.target=it,wt.relatedTarget=Vt,st=wt),Vt=st,ot&&mt)e:{for(wt=k1,nt=ot,tt=mt,it=0,st=nt;st;st=wt(st))it++;st=0;for(var bt=tt;bt;bt=wt(bt))st++;for(;0<it-st;)nt=wt(nt),it--;for(;0<st-it;)tt=wt(tt),st--;for(;it--;){if(nt===tt||tt!==null&&nt===tt.alternate){wt=nt;break e}nt=wt(nt),tt=wt(tt)}wt=null}else wt=null;ot!==null&&rm(ft,rt,ot,wt,!1),mt!==null&&Vt!==null&&rm(ft,Vt,mt,wt,!0)}}t:{if(rt=lt?Wn(lt):window,ot=rt.nodeName&&rt.nodeName.toLowerCase(),ot==="select"||ot==="input"&&rt.type==="file")var Ht=Sd;else if(wd(rt))if(_d)Ht=Iv;else{Ht=Jv;var yt=$v}else ot=rt.nodeName,!ot||ot.toLowerCase()!=="input"||rt.type!=="checkbox"&&rt.type!=="radio"?lt&&tc(lt.elementType)&&(Ht=Sd):Ht=Wv;if(Ht&&(Ht=Ht(t,lt))){Ed(ft,Ht,a,ct);break t}yt&&yt(t,rt,lt),t==="focusout"&<&&rt.type==="number"&<.memoizedProps.value!=null&&hl(rt,"number",rt.value)}switch(yt=lt?Wn(lt):window,t){case"focusin":(wd(yt)||yt.contentEditable==="true")&&(xi=yt,gc=lt,El=null);break;case"focusout":El=gc=xi=null;break;case"mousedown":mc=!0;break;case"contextmenu":case"mouseup":case"dragend":mc=!1,Dd(ft,a,ct);break;case"selectionchange":if(Pv)break;case"keydown":case"keyup":Dd(ft,a,ct)}var Nt;if(sc)t:{switch(t){case"compositionstart":var Ct="onCompositionStart";break t;case"compositionend":Ct="onCompositionEnd";break t;case"compositionupdate":Ct="onCompositionUpdate";break t}Ct=void 0}else bi?bd(t,a)&&(Ct="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(Ct="onCompositionStart");Ct&&(yd&&a.locale!=="ko"&&(bi||Ct!=="onCompositionStart"?Ct==="onCompositionEnd"&&bi&&(Nt=fd()):(ta=ct,lc="value"in ta?ta.value:ta.textContent,bi=!0)),yt=Uu(lt,Ct),0<yt.length&&(Ct=new gd(Ct,t,null,a,ct),ft.push({event:Ct,listeners:yt}),Nt?Ct.data=Nt:(Nt=xd(a),Nt!==null&&(Ct.data=Nt)))),(Nt=Xv?Gv(t,a):Qv(t,a))&&(Ct=Uu(lt,"onBeforeInput"),0<Ct.length&&(yt=new gd("onBeforeInput","beforeinput",null,a,ct),ft.push({event:yt,listeners:Ct}),yt.data=Nt)),Y1(ft,t,lt,a,ct)}im(ft,e)})}function Kl(t,e,a){return{instance:t,listener:e,currentTarget:a}}function Uu(t,e){for(var a=e+"Capture",l=[];t!==null;){var c=t,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=gl(t,a),c!=null&&l.unshift(Kl(t,c,f)),c=gl(t,e),c!=null&&l.push(Kl(t,c,f))),t.tag===3)return l;t=t.return}return[]}function k1(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function rm(t,e,a,l,c){for(var f=e._reactName,b=[];a!==null&&a!==l;){var O=a,W=O.alternate,lt=O.stateNode;if(O=O.tag,W!==null&&W===l)break;O!==5&&O!==26&&O!==27||lt===null||(W=lt,c?(lt=gl(a,f),lt!=null&&b.unshift(Kl(a,lt,W))):c||(lt=gl(a,f),lt!=null&&b.push(Kl(a,lt,W)))),a=a.return}b.length!==0&&t.push({event:e,listeners:b})}var q1=/\\r\\n?/g,V1=/\\u0000|\\uFFFD/g;function um(t){return(typeof t=="string"?t:""+t).replace(q1,\`
|
|
56
|
+
\`).replace(V1,"")}function om(t,e){return e=um(e),um(t)===e}function qt(t,e,a,l,c,f){switch(a){case"children":typeof l=="string"?e==="body"||e==="textarea"&&l===""||yi(t,l):(typeof l=="number"||typeof l=="bigint")&&e!=="body"&&yi(t,""+l);break;case"className":mi(t,"class",l);break;case"tabIndex":mi(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":mi(t,a,l);break;case"style":od(t,l,f);break;case"data":if(e!=="object"){mi(t,"data",l);break}case"src":case"href":if(l===""&&(e!=="a"||a!=="href")){t.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(a);break}l=Gr(""+l),t.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){t.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(a==="formAction"?(e!=="input"&&qt(t,e,"name",c.name,c,null),qt(t,e,"formEncType",c.formEncType,c,null),qt(t,e,"formMethod",c.formMethod,c,null),qt(t,e,"formTarget",c.formTarget,c,null)):(qt(t,e,"encType",c.encType,c,null),qt(t,e,"method",c.method,c,null),qt(t,e,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(a);break}l=Gr(""+l),t.setAttribute(a,l);break;case"onClick":l!=null&&(t.onclick=_n);break;case"onScroll":l!=null&&At("scroll",t);break;case"onScrollEnd":l!=null&&At("scrollend",t);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(a=l.__html,a!=null){if(c.children!=null)throw Error(u(60));t.innerHTML=a}}break;case"multiple":t.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":t.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){t.removeAttribute("xlink:href");break}a=Gr(""+l),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(a,""+l):t.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":l===!0?t.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(a,l):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?t.setAttribute(a,l):t.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?t.removeAttribute(a):t.setAttribute(a,l);break;case"popover":At("beforetoggle",t),At("toggle",t),gi(t,"popover",l);break;case"xlinkActuate":Ie(t,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Ie(t,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Ie(t,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Ie(t,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Ie(t,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Ie(t,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Ie(t,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Ie(t,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Ie(t,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":gi(t,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=yv.get(a)||a,gi(t,a,l))}}function ks(t,e,a,l,c,f){switch(a){case"style":od(t,l,f);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(a=l.__html,a!=null){if(c.children!=null)throw Error(u(60));t.innerHTML=a}}break;case"children":typeof l=="string"?yi(t,l):(typeof l=="number"||typeof l=="bigint")&&yi(t,""+l);break;case"onScroll":l!=null&&At("scroll",t);break;case"onScrollEnd":l!=null&&At("scrollend",t);break;case"onClick":l!=null&&(t.onclick=_n);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Lr.hasOwnProperty(a))t:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),e=a.slice(2,c?a.length-7:void 0),f=t[me]||null,f=f!=null?f[a]:null,typeof f=="function"&&t.removeEventListener(e,f,c),typeof l=="function")){typeof f!="function"&&f!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(e,l,c);break t}a in t?t[a]=l:l===!0?t.setAttribute(a,""):gi(t,a,l)}}}function ge(t,e,a){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":At("error",t),At("load",t);var l=!1,c=!1,f;for(f in a)if(a.hasOwnProperty(f)){var b=a[f];if(b!=null)switch(f){case"src":l=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,e));default:qt(t,e,f,b,a,null)}}c&&qt(t,e,"srcSet",a.srcSet,a,null),l&&qt(t,e,"src",a.src,a,null);return;case"input":At("invalid",t);var O=f=b=c=null,W=null,lt=null;for(l in a)if(a.hasOwnProperty(l)){var ct=a[l];if(ct!=null)switch(l){case"name":c=ct;break;case"type":b=ct;break;case"checked":W=ct;break;case"defaultChecked":lt=ct;break;case"value":f=ct;break;case"defaultValue":O=ct;break;case"children":case"dangerouslySetInnerHTML":if(ct!=null)throw Error(u(137,e));break;default:qt(t,e,l,ct,a,null)}}Xr(t,f,O,W,lt,b,c,!1);return;case"select":At("invalid",t),l=b=f=null;for(c in a)if(a.hasOwnProperty(c)&&(O=a[c],O!=null))switch(c){case"value":f=O;break;case"defaultValue":b=O;break;case"multiple":l=O;default:qt(t,e,c,O,a,null)}e=f,a=b,t.multiple=!!l,e!=null?Sn(t,!!l,e,!1):a!=null&&Sn(t,!!l,a,!0);return;case"textarea":At("invalid",t),f=c=l=null;for(b in a)if(a.hasOwnProperty(b)&&(O=a[b],O!=null))switch(b){case"value":l=O;break;case"defaultValue":c=O;break;case"children":f=O;break;case"dangerouslySetInnerHTML":if(O!=null)throw Error(u(91));break;default:qt(t,e,b,O,a,null)}rd(t,l,c,f);return;case"option":for(W in a)if(a.hasOwnProperty(W)&&(l=a[W],l!=null))switch(W){case"selected":t.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:qt(t,e,W,l,a,null)}return;case"dialog":At("beforetoggle",t),At("toggle",t),At("cancel",t),At("close",t);break;case"iframe":case"object":At("load",t);break;case"video":case"audio":for(l=0;l<Zl.length;l++)At(Zl[l],t);break;case"image":At("error",t),At("load",t);break;case"details":At("toggle",t);break;case"embed":case"source":case"link":At("error",t),At("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(lt in a)if(a.hasOwnProperty(lt)&&(l=a[lt],l!=null))switch(lt){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,e));default:qt(t,e,lt,l,a,null)}return;default:if(tc(e)){for(ct in a)a.hasOwnProperty(ct)&&(l=a[ct],l!==void 0&&ks(t,e,ct,l,a,void 0));return}}for(O in a)a.hasOwnProperty(O)&&(l=a[O],l!=null&&qt(t,e,O,l,a,null))}function X1(t,e,a,l){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,f=null,b=null,O=null,W=null,lt=null,ct=null;for(ot in a){var ft=a[ot];if(a.hasOwnProperty(ot)&&ft!=null)switch(ot){case"checked":break;case"value":break;case"defaultValue":W=ft;default:l.hasOwnProperty(ot)||qt(t,e,ot,null,l,ft)}}for(var rt in l){var ot=l[rt];if(ft=a[rt],l.hasOwnProperty(rt)&&(ot!=null||ft!=null))switch(rt){case"type":f=ot;break;case"name":c=ot;break;case"checked":lt=ot;break;case"defaultChecked":ct=ot;break;case"value":b=ot;break;case"defaultValue":O=ot;break;case"children":case"dangerouslySetInnerHTML":if(ot!=null)throw Error(u(137,e));break;default:ot!==ft&&qt(t,e,rt,ot,l,ft)}}ja(t,b,O,W,lt,ct,f,c);return;case"select":ot=b=O=rt=null;for(f in a)if(W=a[f],a.hasOwnProperty(f)&&W!=null)switch(f){case"value":break;case"multiple":ot=W;default:l.hasOwnProperty(f)||qt(t,e,f,null,l,W)}for(c in l)if(f=l[c],W=a[c],l.hasOwnProperty(c)&&(f!=null||W!=null))switch(c){case"value":rt=f;break;case"defaultValue":O=f;break;case"multiple":b=f;default:f!==W&&qt(t,e,c,f,l,W)}e=O,a=b,l=ot,rt!=null?Sn(t,!!a,rt,!1):!!l!=!!a&&(e!=null?Sn(t,!!a,e,!0):Sn(t,!!a,a?[]:"",!1));return;case"textarea":ot=rt=null;for(O in a)if(c=a[O],a.hasOwnProperty(O)&&c!=null&&!l.hasOwnProperty(O))switch(O){case"value":break;case"children":break;default:qt(t,e,O,null,l,c)}for(b in l)if(c=l[b],f=a[b],l.hasOwnProperty(b)&&(c!=null||f!=null))switch(b){case"value":rt=c;break;case"defaultValue":ot=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(u(91));break;default:c!==f&&qt(t,e,b,c,l,f)}ld(t,rt,ot);return;case"option":for(var mt in a)if(rt=a[mt],a.hasOwnProperty(mt)&&rt!=null&&!l.hasOwnProperty(mt))switch(mt){case"selected":t.selected=!1;break;default:qt(t,e,mt,null,l,rt)}for(W in l)if(rt=l[W],ot=a[W],l.hasOwnProperty(W)&&rt!==ot&&(rt!=null||ot!=null))switch(W){case"selected":t.selected=rt&&typeof rt!="function"&&typeof rt!="symbol";break;default:qt(t,e,W,rt,l,ot)}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 wt in a)rt=a[wt],a.hasOwnProperty(wt)&&rt!=null&&!l.hasOwnProperty(wt)&&qt(t,e,wt,null,l,rt);for(lt in l)if(rt=l[lt],ot=a[lt],l.hasOwnProperty(lt)&&rt!==ot&&(rt!=null||ot!=null))switch(lt){case"children":case"dangerouslySetInnerHTML":if(rt!=null)throw Error(u(137,e));break;default:qt(t,e,lt,rt,l,ot)}return;default:if(tc(e)){for(var Vt in a)rt=a[Vt],a.hasOwnProperty(Vt)&&rt!==void 0&&!l.hasOwnProperty(Vt)&&ks(t,e,Vt,void 0,l,rt);for(ct in l)rt=l[ct],ot=a[ct],!l.hasOwnProperty(ct)||rt===ot||rt===void 0&&ot===void 0||ks(t,e,ct,rt,l,ot);return}}for(var nt in a)rt=a[nt],a.hasOwnProperty(nt)&&rt!=null&&!l.hasOwnProperty(nt)&&qt(t,e,nt,null,l,rt);for(ft in l)rt=l[ft],ot=a[ft],!l.hasOwnProperty(ft)||rt===ot||rt==null&&ot==null||qt(t,e,ft,rt,l,ot)}function cm(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function G1(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var c=a[l],f=c.transferSize,b=c.initiatorType,O=c.duration;if(f&&O&&cm(b)){for(b=0,O=c.responseEnd,l+=1;l<a.length;l++){var W=a[l],lt=W.startTime;if(lt>O)break;var ct=W.transferSize,ft=W.initiatorType;ct&&cm(ft)&&(W=W.responseEnd,b+=ct*(W<O?1:(O-lt)/(W-lt)))}if(--l,e+=8*(f+b)/(c.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var qs=null,Vs=null;function Lu(t){return t.nodeType===9?t:t.ownerDocument}function sm(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function fm(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function Xs(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Gs=null;function Q1(){var t=window.event;return t&&t.type==="popstate"?t===Gs?!1:(Gs=t,!0):(Gs=null,!1)}var dm=typeof setTimeout=="function"?setTimeout:void 0,Z1=typeof clearTimeout=="function"?clearTimeout:void 0,hm=typeof Promise=="function"?Promise:void 0,K1=typeof queueMicrotask=="function"?queueMicrotask:typeof hm<"u"?function(t){return hm.resolve(null).then(t).catch($1)}:dm;function $1(t){setTimeout(function(){throw t})}function pa(t){return t==="head"}function gm(t,e){var a=e,l=0;do{var c=a.nextSibling;if(t.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(l===0){t.removeChild(c),Ki(e);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")$l(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,$l(a);for(var f=a.firstChild;f;){var b=f.nextSibling,O=f.nodeName;f[Ha]||O==="SCRIPT"||O==="STYLE"||O==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=b}}else a==="body"&&$l(t.ownerDocument.body);a=c}while(a);Ki(e)}function mm(t,e){var a=t;t=0;do{var l=a.nextSibling;if(a.nodeType===1?e?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(e?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=l}while(a)}function Qs(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var a=e;switch(e=e.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Qs(a),fl(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function J1(t,e,a,l){for(;t.nodeType===1;){var c=a;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(l){if(!t[Ha])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(f=t.getAttribute("rel"),f==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(f!==c.rel||t.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||t.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||t.getAttribute("title")!==(c.title==null?null:c.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(f=t.getAttribute("src"),(f!==(c.src==null?null:c.src)||t.getAttribute("type")!==(c.type==null?null:c.type)||t.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&f&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var f=c.name==null?null:""+c.name;if(c.type==="hidden"&&t.getAttribute("name")===f)return t}else return t;if(t=Ke(t.nextSibling),t===null)break}return null}function W1(t,e,a){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=Ke(t.nextSibling),t===null))return null;return t}function ym(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=Ke(t.nextSibling),t===null))return null;return t}function Zs(t){return t.data==="$?"||t.data==="$~"}function Ks(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function I1(t,e){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||a.readyState!=="loading")e();else{var l=function(){e(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),t._reactRetry=l}}function Ke(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var $s=null;function pm(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(e===0)return Ke(t.nextSibling);e--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||e++}t=t.nextSibling}return null}function vm(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(e===0)return t;e--}else a!=="/$"&&a!=="/&"||e++}t=t.previousSibling}return null}function bm(t,e,a){switch(e=Lu(a),t){case"html":if(t=e.documentElement,!t)throw Error(u(452));return t;case"head":if(t=e.head,!t)throw Error(u(453));return t;case"body":if(t=e.body,!t)throw Error(u(454));return t;default:throw Error(u(451))}}function $l(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);fl(t)}var $e=new Map,xm=new Set;function ku(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var kn=H.d;H.d={f:F1,r:P1,D:tb,C:eb,L:nb,m:ab,X:lb,S:ib,M:rb};function F1(){var t=kn.f(),e=zu();return t||e}function P1(t){var e=Jn(t);e!==null&&e.tag===5&&e.type==="form"?Bh(e):kn.r(t)}var Gi=typeof document>"u"?null:document;function wm(t,e,a){var l=Gi;if(l&&typeof e=="string"&&e){var c=Ee(e);c='link[rel="'+t+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),xm.has(c)||(xm.add(c),t={rel:t,crossOrigin:a,href:e},l.querySelector(c)===null&&(e=l.createElement("link"),ge(e,"link",t),te(e),l.head.appendChild(e)))}}function tb(t){kn.D(t),wm("dns-prefetch",t,null)}function eb(t,e){kn.C(t,e),wm("preconnect",t,e)}function nb(t,e,a){kn.L(t,e,a);var l=Gi;if(l&&t&&e){var c='link[rel="preload"][as="'+Ee(e)+'"]';e==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+Ee(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+Ee(a.imageSizes)+'"]')):c+='[href="'+Ee(t)+'"]';var f=c;switch(e){case"style":f=Qi(t);break;case"script":f=Zi(t)}$e.has(f)||(t=y({rel:"preload",href:e==="image"&&a&&a.imageSrcSet?void 0:t,as:e},a),$e.set(f,t),l.querySelector(c)!==null||e==="style"&&l.querySelector(Jl(f))||e==="script"&&l.querySelector(Wl(f))||(e=l.createElement("link"),ge(e,"link",t),te(e),l.head.appendChild(e)))}}function ab(t,e){kn.m(t,e);var a=Gi;if(a&&t){var l=e&&typeof e.as=="string"?e.as:"script",c='link[rel="modulepreload"][as="'+Ee(l)+'"][href="'+Ee(t)+'"]',f=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Zi(t)}if(!$e.has(f)&&(t=y({rel:"modulepreload",href:t},e),$e.set(f,t),a.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Wl(f)))return}l=a.createElement("link"),ge(l,"link",t),te(l),a.head.appendChild(l)}}}function ib(t,e,a){kn.S(t,e,a);var l=Gi;if(l&&t){var c=In(l).hoistableStyles,f=Qi(t);e=e||"default";var b=c.get(f);if(!b){var O={loading:0,preload:null};if(b=l.querySelector(Jl(f)))O.loading=5;else{t=y({rel:"stylesheet",href:t,"data-precedence":e},a),(a=$e.get(f))&&Js(t,a);var W=b=l.createElement("link");te(W),ge(W,"link",t),W._p=new Promise(function(lt,ct){W.onload=lt,W.onerror=ct}),W.addEventListener("load",function(){O.loading|=1}),W.addEventListener("error",function(){O.loading|=2}),O.loading|=4,qu(b,e,l)}b={type:"stylesheet",instance:b,count:1,state:O},c.set(f,b)}}}function lb(t,e){kn.X(t,e);var a=Gi;if(a&&t){var l=In(a).hoistableScripts,c=Zi(t),f=l.get(c);f||(f=a.querySelector(Wl(c)),f||(t=y({src:t,async:!0},e),(e=$e.get(c))&&Ws(t,e),f=a.createElement("script"),te(f),ge(f,"link",t),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function rb(t,e){kn.M(t,e);var a=Gi;if(a&&t){var l=In(a).hoistableScripts,c=Zi(t),f=l.get(c);f||(f=a.querySelector(Wl(c)),f||(t=y({src:t,async:!0,type:"module"},e),(e=$e.get(c))&&Ws(t,e),f=a.createElement("script"),te(f),ge(f,"link",t),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function Em(t,e,a,l){var c=(c=X.current)?ku(c):null;if(!c)throw Error(u(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(e=Qi(a.href),a=In(c).hoistableStyles,l=a.get(e),l||(l={type:"style",instance:null,count:0,state:null},a.set(e,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=Qi(a.href);var f=In(c).hoistableStyles,b=f.get(t);if(b||(c=c.ownerDocument||c,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(t,b),(f=c.querySelector(Jl(t)))&&!f._p&&(b.instance=f,b.state.loading=5),$e.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},$e.set(t,a),f||ub(c,t,a,b.state))),e&&l===null)throw Error(u(528,""));return b}if(e&&l!==null)throw Error(u(529,""));return null;case"script":return e=a.async,a=a.src,typeof a=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=Zi(a),a=In(c).hoistableScripts,l=a.get(e),l||(l={type:"script",instance:null,count:0,state:null},a.set(e,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,t))}}function Qi(t){return'href="'+Ee(t)+'"'}function Jl(t){return'link[rel="stylesheet"]['+t+"]"}function Sm(t){return y({},t,{"data-precedence":t.precedence,precedence:null})}function ub(t,e,a,l){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?l.loading=1:(e=t.createElement("link"),l.preload=e,e.addEventListener("load",function(){return l.loading|=1}),e.addEventListener("error",function(){return l.loading|=2}),ge(e,"link",a),te(e),t.head.appendChild(e))}function Zi(t){return'[src="'+Ee(t)+'"]'}function Wl(t){return"script[async]"+t}function _m(t,e,a){if(e.count++,e.instance===null)switch(e.type){case"style":var l=t.querySelector('style[data-href~="'+Ee(a.href)+'"]');if(l)return e.instance=l,te(l),l;var c=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),te(l),ge(l,"style",c),qu(l,a.precedence,t),e.instance=l;case"stylesheet":c=Qi(a.href);var f=t.querySelector(Jl(c));if(f)return e.state.loading|=4,e.instance=f,te(f),f;l=Sm(a),(c=$e.get(c))&&Js(l,c),f=(t.ownerDocument||t).createElement("link"),te(f);var b=f;return b._p=new Promise(function(O,W){b.onload=O,b.onerror=W}),ge(f,"link",l),e.state.loading|=4,qu(f,a.precedence,t),e.instance=f;case"script":return f=Zi(a.src),(c=t.querySelector(Wl(f)))?(e.instance=c,te(c),c):(l=a,(c=$e.get(f))&&(l=y({},a),Ws(l,c)),t=t.ownerDocument||t,c=t.createElement("script"),te(c),ge(c,"link",l),t.head.appendChild(c),e.instance=c);case"void":return null;default:throw Error(u(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(l=e.instance,e.state.loading|=4,qu(l,a.precedence,t));return e.instance}function qu(t,e,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=l.length?l[l.length-1]:null,f=c,b=0;b<l.length;b++){var O=l[b];if(O.dataset.precedence===e)f=O;else if(f!==c)break}f?f.parentNode.insertBefore(t,f.nextSibling):(e=a.nodeType===9?a.head:a,e.insertBefore(t,e.firstChild))}function Js(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function Ws(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var Vu=null;function Mm(t,e,a){if(Vu===null){var l=new Map,c=Vu=new Map;c.set(a,l)}else c=Vu,l=c.get(a),l||(l=new Map,c.set(a,l));if(l.has(t))return l;for(l.set(t,null),a=a.getElementsByTagName(t),c=0;c<a.length;c++){var f=a[c];if(!(f[Ha]||f[ue]||t==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var b=f.getAttribute(e)||"";b=t+b;var O=l.get(b);O?O.push(f):l.set(b,[f])}}return l}function Nm(t,e,a){t=t.ownerDocument||t,t.head.insertBefore(a,e==="title"?t.querySelector("head > title"):null)}function ob(t,e,a){if(a===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Tm(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function cb(t,e,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=Qi(l.href),f=e.querySelector(Jl(c));if(f){e=f._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Xu.bind(t),e.then(t,t)),a.state.loading|=4,a.instance=f,te(f);return}f=e.ownerDocument||e,l=Sm(l),(c=$e.get(c))&&Js(l,c),f=f.createElement("link"),te(f);var b=f;b._p=new Promise(function(O,W){b.onload=O,b.onerror=W}),ge(f,"link",l),a.instance=f}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,e),(e=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=Xu.bind(t),e.addEventListener("load",a),e.addEventListener("error",a))}}var Is=0;function sb(t,e){return t.stylesheets&&t.count===0&&Qu(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var l=setTimeout(function(){if(t.stylesheets&&Qu(t,t.stylesheets),t.unsuspend){var f=t.unsuspend;t.unsuspend=null,f()}},6e4+e);0<t.imgBytes&&Is===0&&(Is=62500*G1());var c=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Qu(t,t.stylesheets),t.unsuspend)){var f=t.unsuspend;t.unsuspend=null,f()}},(t.imgBytes>Is?50:800)+e);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function Xu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qu(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Gu=null;function Qu(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Gu=new Map,e.forEach(fb,t),Gu=null,Xu.call(t))}function fb(t,e){if(!(e.state.loading&4)){var a=Gu.get(t);if(a)var l=a.get(null);else{a=new Map,Gu.set(t,a);for(var c=t.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<c.length;f++){var b=c[f];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(a.set(b.dataset.precedence,b),l=b)}l&&a.set(null,l)}c=e.instance,b=c.getAttribute("data-precedence"),f=a.get(b)||l,f===l&&a.set(null,c),a.set(b,c),this.count++,l=Xu.bind(this),c.addEventListener("load",l),c.addEventListener("error",l),f?f.parentNode.insertBefore(c,f.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(c,t.firstChild)),e.state.loading|=4}}var Il={$$typeof:E,Provider:null,Consumer:null,_currentValue:j,_currentValue2:j,_threadCount:0};function db(t,e,a,l,c,f,b,O,W){this.tag=1,this.containerInfo=t,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=ol(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ol(0),this.hiddenUpdates=ol(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=W,this.incompleteTransitions=new Map}function Am(t,e,a,l,c,f,b,O,W,lt,ct,ft){return t=new db(t,e,a,b,W,lt,ct,ft,O),e=1,f===!0&&(e|=24),f=De(3,null,null,e),t.current=f,f.stateNode=t,e=Cc(),e.refCount++,t.pooledCache=e,e.refCount++,f.memoizedState={element:l,isDehydrated:a,cache:e},Rc(f),t}function Om(t){return t?(t=Si,t):Si}function Cm(t,e,a,l,c,f){c=Om(c),l.context===null?l.context=c:l.pendingContext=c,l=ra(e),l.payload={element:a},f=f===void 0?null:f,f!==null&&(l.callback=f),a=ua(t,l,e),a!==null&&(Ae(a,t,e),Ol(a,t,e))}function zm(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<e?a:e}}function Fs(t,e){zm(t,e),(t=t.alternate)&&zm(t,e)}function Dm(t){if(t.tag===13||t.tag===31){var e=La(t,67108864);e!==null&&Ae(e,t,67108864),Fs(t,67108864)}}function Hm(t){if(t.tag===13||t.tag===31){var e=Be();e=cl(e);var a=La(t,e);a!==null&&Ae(a,t,e),Fs(t,e)}}var Zu=!0;function hb(t,e,a,l){var c=S.T;S.T=null;var f=H.p;try{H.p=2,Ps(t,e,a,l)}finally{H.p=f,S.T=c}}function gb(t,e,a,l){var c=S.T;S.T=null;var f=H.p;try{H.p=8,Ps(t,e,a,l)}finally{H.p=f,S.T=c}}function Ps(t,e,a,l){if(Zu){var c=tf(l);if(c===null)Ls(t,e,l,Ku,a),jm(t,l);else if(yb(c,t,e,a,l))l.stopPropagation();else if(jm(t,l),e&4&&-1<mb.indexOf(t)){for(;c!==null;){var f=Jn(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var b=xn(f.pendingLanes);if(b!==0){var O=f;for(O.pendingLanes|=2,O.entangledLanes|=2;b;){var W=1<<31-ve(b);O.entanglements[1]|=W,b&=~W}hn(f),(jt&6)===0&&(Ou=se()+500,Ql(0))}}break;case 31:case 13:O=La(f,2),O!==null&&Ae(O,f,2),zu(),Fs(f,2)}if(f=tf(l),f===null&&Ls(t,e,l,Ku,a),f===c)break;c=f}c!==null&&l.stopPropagation()}else Ls(t,e,l,null,a)}}function tf(t){return t=nc(t),ef(t)}var Ku=null;function ef(t){if(Ku=null,t=$n(t),t!==null){var e=s(t);if(e===null)t=null;else{var a=e.tag;if(a===13){if(t=d(e),t!==null)return t;t=null}else if(a===31){if(t=m(e),t!==null)return t;t=null}else if(a===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return Ku=t,null}function Rm(t){switch(t){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(ui()){case bn:return 2;case Kn:return 8;case Oa:case qo:return 32;case oi:return 268435456;default:return 32}default:return 32}}var nf=!1,va=null,ba=null,xa=null,Fl=new Map,Pl=new Map,wa=[],mb="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 jm(t,e){switch(t){case"focusin":case"focusout":va=null;break;case"dragenter":case"dragleave":ba=null;break;case"mouseover":case"mouseout":xa=null;break;case"pointerover":case"pointerout":Fl.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pl.delete(e.pointerId)}}function tr(t,e,a,l,c,f){return t===null||t.nativeEvent!==f?(t={blockedOn:e,domEventName:a,eventSystemFlags:l,nativeEvent:f,targetContainers:[c]},e!==null&&(e=Jn(e),e!==null&&Dm(e)),t):(t.eventSystemFlags|=l,e=t.targetContainers,c!==null&&e.indexOf(c)===-1&&e.push(c),t)}function yb(t,e,a,l,c){switch(e){case"focusin":return va=tr(va,t,e,a,l,c),!0;case"dragenter":return ba=tr(ba,t,e,a,l,c),!0;case"mouseover":return xa=tr(xa,t,e,a,l,c),!0;case"pointerover":var f=c.pointerId;return Fl.set(f,tr(Fl.get(f)||null,t,e,a,l,c)),!0;case"gotpointercapture":return f=c.pointerId,Pl.set(f,tr(Pl.get(f)||null,t,e,a,l,c)),!0}return!1}function Ym(t){var e=$n(t.target);if(e!==null){var a=s(e);if(a!==null){if(e=a.tag,e===13){if(e=d(a),e!==null){t.blockedOn=e,jr(t.priority,function(){Hm(a)});return}}else if(e===31){if(e=m(a),e!==null){t.blockedOn=e,jr(t.priority,function(){Hm(a)});return}}else if(e===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function $u(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var a=tf(t.nativeEvent);if(a===null){a=t.nativeEvent;var l=new a.constructor(a.type,a);ec=l,a.target.dispatchEvent(l),ec=null}else return e=Jn(a),e!==null&&Dm(e),t.blockedOn=a,!1;e.shift()}return!0}function Bm(t,e,a){$u(t)&&a.delete(e)}function pb(){nf=!1,va!==null&&$u(va)&&(va=null),ba!==null&&$u(ba)&&(ba=null),xa!==null&&$u(xa)&&(xa=null),Fl.forEach(Bm),Pl.forEach(Bm)}function Ju(t,e){t.blockedOn===e&&(t.blockedOn=null,nf||(nf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,pb)))}var Wu=null;function Um(t){Wu!==t&&(Wu=t,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Wu===t&&(Wu=null);for(var e=0;e<t.length;e+=3){var a=t[e],l=t[e+1],c=t[e+2];if(typeof l!="function"){if(ef(l||a)===null)continue;break}var f=Jn(a);f!==null&&(t.splice(e,3),e-=3,ts(f,{pending:!0,data:c,method:a.method,action:l},l,c))}}))}function Ki(t){function e(W){return Ju(W,t)}va!==null&&Ju(va,t),ba!==null&&Ju(ba,t),xa!==null&&Ju(xa,t),Fl.forEach(e),Pl.forEach(e);for(var a=0;a<wa.length;a++){var l=wa[a];l.blockedOn===t&&(l.blockedOn=null)}for(;0<wa.length&&(a=wa[0],a.blockedOn===null);)Ym(a),a.blockedOn===null&&wa.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var c=a[l],f=a[l+1],b=c[me]||null;if(typeof f=="function")b||Um(a);else if(b){var O=null;if(f&&f.hasAttribute("formAction")){if(c=f,b=f[me]||null)O=b.formAction;else if(ef(c)!==null)continue}else O=b.action;typeof O=="function"?a[l+1]=O:(a.splice(l,3),l-=3),Um(a)}}}function Lm(){function t(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(b){return c=b})},focusReset:"manual",scroll:"manual"})}function e(){c!==null&&(c(),c=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,c=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),c!==null&&(c(),c=null)}}}function af(t){this._internalRoot=t}Iu.prototype.render=af.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(u(409));var a=e.current,l=Be();Cm(a,l,t,e,null,null)},Iu.prototype.unmount=af.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Cm(t.current,2,null,t,null,null),zu(),e[wn]=null}};function Iu(t){this._internalRoot=t}Iu.prototype.unstable_scheduleHydration=function(t){if(t){var e=Rr();t={blockedOn:null,target:t,priority:e};for(var a=0;a<wa.length&&e!==0&&e<wa[a].priority;a++);wa.splice(a,0,t),a===0&&Ym(t)}};var km=i.version;if(km!=="19.2.4")throw Error(u(527,km,"19.2.4"));H.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(u(188)):(t=Object.keys(t).join(","),Error(u(268,t)));return t=g(e),t=t!==null?p(t):null,t=t===null?null:t.stateNode,t};var vb={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:S,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fu.isDisabled&&Fu.supportsFiber)try{Ca=Fu.inject(vb),pe=Fu}catch{}}return nr.createRoot=function(t,e){if(!o(t))throw Error(u(299));var a=!1,l="",c=Kh,f=$h,b=Jh;return e!=null&&(e.unstable_strictMode===!0&&(a=!0),e.identifierPrefix!==void 0&&(l=e.identifierPrefix),e.onUncaughtError!==void 0&&(c=e.onUncaughtError),e.onCaughtError!==void 0&&(f=e.onCaughtError),e.onRecoverableError!==void 0&&(b=e.onRecoverableError)),e=Am(t,1,!1,null,null,a,l,null,c,f,b,Lm),t[wn]=e.current,Us(t),new af(e)},nr.hydrateRoot=function(t,e,a){if(!o(t))throw Error(u(299));var l=!1,c="",f=Kh,b=$h,O=Jh,W=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(O=a.onRecoverableError),a.formState!==void 0&&(W=a.formState)),e=Am(t,1,!0,e,a??null,l,c,W,f,b,O,Lm),e.context=Om(null),a=e.current,l=Be(),l=cl(l),c=ra(l),c.callback=null,ua(a,c,l),a=l,e.current.lanes=a,Da(e,a),hn(e),t[wn]=e.current,Us(t),new Iu(e)},nr.version="19.2.4",nr}var Wm;function Ab(){if(Wm)return uf.exports;Wm=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(i){console.error(i)}}return n(),uf.exports=Tb(),uf.exports}var Ob=Ab();function re(n){if(typeof n=="string"||typeof n=="number")return""+n;let i="";if(Array.isArray(n))for(let r=0,u;r<n.length;r++)(u=re(n[r]))!==""&&(i+=(i&&" ")+u);else for(let r in n)n[r]&&(i+=(i&&" ")+r);return i}var Cb={value:()=>{}};function Ao(){for(var n=0,i=arguments.length,r={},u;n<i;++n){if(!(u=arguments[n]+"")||u in r||/[\\s.]/.test(u))throw new Error("illegal type: "+u);r[u]=[]}return new co(r)}function co(n){this._=n}function zb(n,i){return n.trim().split(/^|\\s+/).map(function(r){var u="",o=r.indexOf(".");if(o>=0&&(u=r.slice(o+1),r=r.slice(0,o)),r&&!i.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:u}})}co.prototype=Ao.prototype={constructor:co,on:function(n,i){var r=this._,u=zb(n+"",r),o,s=-1,d=u.length;if(arguments.length<2){for(;++s<d;)if((o=(n=u[s]).type)&&(o=Db(r[o],n.name)))return o;return}if(i!=null&&typeof i!="function")throw new Error("invalid callback: "+i);for(;++s<d;)if(o=(n=u[s]).type)r[o]=Im(r[o],n.name,i);else if(i==null)for(o in r)r[o]=Im(r[o],n.name,null);return this},copy:function(){var n={},i=this._;for(var r in i)n[r]=i[r].slice();return new co(n)},call:function(n,i){if((o=arguments.length-2)>0)for(var r=new Array(o),u=0,o,s;u<o;++u)r[u]=arguments[u+2];if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(s=this._[n],u=0,o=s.length;u<o;++u)s[u].value.apply(i,r)},apply:function(n,i,r){if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(var u=this._[n],o=0,s=u.length;o<s;++o)u[o].value.apply(i,r)}};function Db(n,i){for(var r=0,u=n.length,o;r<u;++r)if((o=n[r]).name===i)return o.value}function Im(n,i,r){for(var u=0,o=n.length;u<o;++u)if(n[u].name===i){n[u]=Cb,n=n.slice(0,u).concat(n.slice(u+1));break}return r!=null&&n.push({name:i,value:r}),n}var Tf="http://www.w3.org/1999/xhtml";const Fm={svg:"http://www.w3.org/2000/svg",xhtml:Tf,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Oo(n){var i=n+="",r=i.indexOf(":");return r>=0&&(i=n.slice(0,r))!=="xmlns"&&(n=n.slice(r+1)),Fm.hasOwnProperty(i)?{space:Fm[i],local:n}:n}function Hb(n){return function(){var i=this.ownerDocument,r=this.namespaceURI;return r===Tf&&i.documentElement.namespaceURI===Tf?i.createElement(n):i.createElementNS(r,n)}}function Rb(n){return function(){return this.ownerDocument.createElementNS(n.space,n.local)}}function by(n){var i=Oo(n);return(i.local?Rb:Hb)(i)}function jb(){}function qf(n){return n==null?jb:function(){return this.querySelector(n)}}function Yb(n){typeof n!="function"&&(n=qf(n));for(var i=this._groups,r=i.length,u=new Array(r),o=0;o<r;++o)for(var s=i[o],d=s.length,m=u[o]=new Array(d),h,g,p=0;p<d;++p)(h=s[p])&&(g=n.call(h,h.__data__,p,s))&&("__data__"in h&&(g.__data__=h.__data__),m[p]=g);return new Le(u,this._parents)}function Bb(n){return n==null?[]:Array.isArray(n)?n:Array.from(n)}function Ub(){return[]}function xy(n){return n==null?Ub:function(){return this.querySelectorAll(n)}}function Lb(n){return function(){return Bb(n.apply(this,arguments))}}function kb(n){typeof n=="function"?n=Lb(n):n=xy(n);for(var i=this._groups,r=i.length,u=[],o=[],s=0;s<r;++s)for(var d=i[s],m=d.length,h,g=0;g<m;++g)(h=d[g])&&(u.push(n.call(h,h.__data__,g,d)),o.push(h));return new Le(u,o)}function wy(n){return function(){return this.matches(n)}}function Ey(n){return function(i){return i.matches(n)}}var qb=Array.prototype.find;function Vb(n){return function(){return qb.call(this.children,n)}}function Xb(){return this.firstElementChild}function Gb(n){return this.select(n==null?Xb:Vb(typeof n=="function"?n:Ey(n)))}var Qb=Array.prototype.filter;function Zb(){return Array.from(this.children)}function Kb(n){return function(){return Qb.call(this.children,n)}}function $b(n){return this.selectAll(n==null?Zb:Kb(typeof n=="function"?n:Ey(n)))}function Jb(n){typeof n!="function"&&(n=wy(n));for(var i=this._groups,r=i.length,u=new Array(r),o=0;o<r;++o)for(var s=i[o],d=s.length,m=u[o]=[],h,g=0;g<d;++g)(h=s[g])&&n.call(h,h.__data__,g,s)&&m.push(h);return new Le(u,this._parents)}function Sy(n){return new Array(n.length)}function Wb(){return new Le(this._enter||this._groups.map(Sy),this._parents)}function mo(n,i){this.ownerDocument=n.ownerDocument,this.namespaceURI=n.namespaceURI,this._next=null,this._parent=n,this.__data__=i}mo.prototype={constructor:mo,appendChild:function(n){return this._parent.insertBefore(n,this._next)},insertBefore:function(n,i){return this._parent.insertBefore(n,i)},querySelector:function(n){return this._parent.querySelector(n)},querySelectorAll:function(n){return this._parent.querySelectorAll(n)}};function Ib(n){return function(){return n}}function Fb(n,i,r,u,o,s){for(var d=0,m,h=i.length,g=s.length;d<g;++d)(m=i[d])?(m.__data__=s[d],u[d]=m):r[d]=new mo(n,s[d]);for(;d<h;++d)(m=i[d])&&(o[d]=m)}function Pb(n,i,r,u,o,s,d){var m,h,g=new Map,p=i.length,y=s.length,v=new Array(p),x;for(m=0;m<p;++m)(h=i[m])&&(v[m]=x=d.call(h,h.__data__,m,i)+"",g.has(x)?o[m]=h:g.set(x,h));for(m=0;m<y;++m)x=d.call(n,s[m],m,s)+"",(h=g.get(x))?(u[m]=h,h.__data__=s[m],g.delete(x)):r[m]=new mo(n,s[m]);for(m=0;m<p;++m)(h=i[m])&&g.get(v[m])===h&&(o[m]=h)}function tx(n){return n.__data__}function ex(n,i){if(!arguments.length)return Array.from(this,tx);var r=i?Pb:Fb,u=this._parents,o=this._groups;typeof n!="function"&&(n=Ib(n));for(var s=o.length,d=new Array(s),m=new Array(s),h=new Array(s),g=0;g<s;++g){var p=u[g],y=o[g],v=y.length,x=nx(n.call(p,p&&p.__data__,g,u)),w=x.length,N=m[g]=new Array(w),C=d[g]=new Array(w),A=h[g]=new Array(v);r(p,y,N,C,A,x,i);for(var D=0,E=0,_,q;D<w;++D)if(_=N[D]){for(D>=E&&(E=D+1);!(q=C[E])&&++E<w;);_._next=q||null}}return d=new Le(d,u),d._enter=m,d._exit=h,d}function nx(n){return typeof n=="object"&&"length"in n?n:Array.from(n)}function ax(){return new Le(this._exit||this._groups.map(Sy),this._parents)}function ix(n,i,r){var u=this.enter(),o=this,s=this.exit();return typeof n=="function"?(u=n(u),u&&(u=u.selection())):u=u.append(n+""),i!=null&&(o=i(o),o&&(o=o.selection())),r==null?s.remove():r(s),u&&o?u.merge(o).order():o}function lx(n){for(var i=n.selection?n.selection():n,r=this._groups,u=i._groups,o=r.length,s=u.length,d=Math.min(o,s),m=new Array(o),h=0;h<d;++h)for(var g=r[h],p=u[h],y=g.length,v=m[h]=new Array(y),x,w=0;w<y;++w)(x=g[w]||p[w])&&(v[w]=x);for(;h<o;++h)m[h]=r[h];return new Le(m,this._parents)}function rx(){for(var n=this._groups,i=-1,r=n.length;++i<r;)for(var u=n[i],o=u.length-1,s=u[o],d;--o>=0;)(d=u[o])&&(s&&d.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(d,s),s=d);return this}function ux(n){n||(n=ox);function i(y,v){return y&&v?n(y.__data__,v.__data__):!y-!v}for(var r=this._groups,u=r.length,o=new Array(u),s=0;s<u;++s){for(var d=r[s],m=d.length,h=o[s]=new Array(m),g,p=0;p<m;++p)(g=d[p])&&(h[p]=g);h.sort(i)}return new Le(o,this._parents).order()}function ox(n,i){return n<i?-1:n>i?1:n>=i?0:NaN}function cx(){var n=arguments[0];return arguments[0]=this,n.apply(null,arguments),this}function sx(){return Array.from(this)}function fx(){for(var n=this._groups,i=0,r=n.length;i<r;++i)for(var u=n[i],o=0,s=u.length;o<s;++o){var d=u[o];if(d)return d}return null}function dx(){let n=0;for(const i of this)++n;return n}function hx(){return!this.node()}function gx(n){for(var i=this._groups,r=0,u=i.length;r<u;++r)for(var o=i[r],s=0,d=o.length,m;s<d;++s)(m=o[s])&&n.call(m,m.__data__,s,o);return this}function mx(n){return function(){this.removeAttribute(n)}}function yx(n){return function(){this.removeAttributeNS(n.space,n.local)}}function px(n,i){return function(){this.setAttribute(n,i)}}function vx(n,i){return function(){this.setAttributeNS(n.space,n.local,i)}}function bx(n,i){return function(){var r=i.apply(this,arguments);r==null?this.removeAttribute(n):this.setAttribute(n,r)}}function xx(n,i){return function(){var r=i.apply(this,arguments);r==null?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,r)}}function wx(n,i){var r=Oo(n);if(arguments.length<2){var u=this.node();return r.local?u.getAttributeNS(r.space,r.local):u.getAttribute(r)}return this.each((i==null?r.local?yx:mx:typeof i=="function"?r.local?xx:bx:r.local?vx:px)(r,i))}function _y(n){return n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView}function Ex(n){return function(){this.style.removeProperty(n)}}function Sx(n,i,r){return function(){this.style.setProperty(n,i,r)}}function _x(n,i,r){return function(){var u=i.apply(this,arguments);u==null?this.style.removeProperty(n):this.style.setProperty(n,u,r)}}function Mx(n,i,r){return arguments.length>1?this.each((i==null?Ex:typeof i=="function"?_x:Sx)(n,i,r??"")):tl(this.node(),n)}function tl(n,i){return n.style.getPropertyValue(i)||_y(n).getComputedStyle(n,null).getPropertyValue(i)}function Nx(n){return function(){delete this[n]}}function Tx(n,i){return function(){this[n]=i}}function Ax(n,i){return function(){var r=i.apply(this,arguments);r==null?delete this[n]:this[n]=r}}function Ox(n,i){return arguments.length>1?this.each((i==null?Nx:typeof i=="function"?Ax:Tx)(n,i)):this.node()[n]}function My(n){return n.trim().split(/^|\\s+/)}function Vf(n){return n.classList||new Ny(n)}function Ny(n){this._node=n,this._names=My(n.getAttribute("class")||"")}Ny.prototype={add:function(n){var i=this._names.indexOf(n);i<0&&(this._names.push(n),this._node.setAttribute("class",this._names.join(" ")))},remove:function(n){var i=this._names.indexOf(n);i>=0&&(this._names.splice(i,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(n){return this._names.indexOf(n)>=0}};function Ty(n,i){for(var r=Vf(n),u=-1,o=i.length;++u<o;)r.add(i[u])}function Ay(n,i){for(var r=Vf(n),u=-1,o=i.length;++u<o;)r.remove(i[u])}function Cx(n){return function(){Ty(this,n)}}function zx(n){return function(){Ay(this,n)}}function Dx(n,i){return function(){(i.apply(this,arguments)?Ty:Ay)(this,n)}}function Hx(n,i){var r=My(n+"");if(arguments.length<2){for(var u=Vf(this.node()),o=-1,s=r.length;++o<s;)if(!u.contains(r[o]))return!1;return!0}return this.each((typeof i=="function"?Dx:i?Cx:zx)(r,i))}function Rx(){this.textContent=""}function jx(n){return function(){this.textContent=n}}function Yx(n){return function(){var i=n.apply(this,arguments);this.textContent=i??""}}function Bx(n){return arguments.length?this.each(n==null?Rx:(typeof n=="function"?Yx:jx)(n)):this.node().textContent}function Ux(){this.innerHTML=""}function Lx(n){return function(){this.innerHTML=n}}function kx(n){return function(){var i=n.apply(this,arguments);this.innerHTML=i??""}}function qx(n){return arguments.length?this.each(n==null?Ux:(typeof n=="function"?kx:Lx)(n)):this.node().innerHTML}function Vx(){this.nextSibling&&this.parentNode.appendChild(this)}function Xx(){return this.each(Vx)}function Gx(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Qx(){return this.each(Gx)}function Zx(n){var i=typeof n=="function"?n:by(n);return this.select(function(){return this.appendChild(i.apply(this,arguments))})}function Kx(){return null}function $x(n,i){var r=typeof n=="function"?n:by(n),u=i==null?Kx:typeof i=="function"?i:qf(i);return this.select(function(){return this.insertBefore(r.apply(this,arguments),u.apply(this,arguments)||null)})}function Jx(){var n=this.parentNode;n&&n.removeChild(this)}function Wx(){return this.each(Jx)}function Ix(){var n=this.cloneNode(!1),i=this.parentNode;return i?i.insertBefore(n,this.nextSibling):n}function Fx(){var n=this.cloneNode(!0),i=this.parentNode;return i?i.insertBefore(n,this.nextSibling):n}function Px(n){return this.select(n?Fx:Ix)}function tw(n){return arguments.length?this.property("__data__",n):this.node().__data__}function ew(n){return function(i){n.call(this,i,this.__data__)}}function nw(n){return n.trim().split(/^|\\s+/).map(function(i){var r="",u=i.indexOf(".");return u>=0&&(r=i.slice(u+1),i=i.slice(0,u)),{type:i,name:r}})}function aw(n){return function(){var i=this.__on;if(i){for(var r=0,u=-1,o=i.length,s;r<o;++r)s=i[r],(!n.type||s.type===n.type)&&s.name===n.name?this.removeEventListener(s.type,s.listener,s.options):i[++u]=s;++u?i.length=u:delete this.__on}}}function iw(n,i,r){return function(){var u=this.__on,o,s=ew(i);if(u){for(var d=0,m=u.length;d<m;++d)if((o=u[d]).type===n.type&&o.name===n.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=s,o.options=r),o.value=i;return}}this.addEventListener(n.type,s,r),o={type:n.type,name:n.name,value:i,listener:s,options:r},u?u.push(o):this.__on=[o]}}function lw(n,i,r){var u=nw(n+""),o,s=u.length,d;if(arguments.length<2){var m=this.node().__on;if(m){for(var h=0,g=m.length,p;h<g;++h)for(o=0,p=m[h];o<s;++o)if((d=u[o]).type===p.type&&d.name===p.name)return p.value}return}for(m=i?iw:aw,o=0;o<s;++o)this.each(m(u[o],i,r));return this}function Oy(n,i,r){var u=_y(n),o=u.CustomEvent;typeof o=="function"?o=new o(i,r):(o=u.document.createEvent("Event"),r?(o.initEvent(i,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(i,!1,!1)),n.dispatchEvent(o)}function rw(n,i){return function(){return Oy(this,n,i)}}function uw(n,i){return function(){return Oy(this,n,i.apply(this,arguments))}}function ow(n,i){return this.each((typeof i=="function"?uw:rw)(n,i))}function*cw(){for(var n=this._groups,i=0,r=n.length;i<r;++i)for(var u=n[i],o=0,s=u.length,d;o<s;++o)(d=u[o])&&(yield d)}var Cy=[null];function Le(n,i){this._groups=n,this._parents=i}function _r(){return new Le([[document.documentElement]],Cy)}function sw(){return this}Le.prototype=_r.prototype={constructor:Le,select:Yb,selectAll:kb,selectChild:Gb,selectChildren:$b,filter:Jb,data:ex,enter:Wb,exit:ax,join:ix,merge:lx,selection:sw,order:rx,sort:ux,call:cx,nodes:sx,node:fx,size:dx,empty:hx,each:gx,attr:wx,style:Mx,property:Ox,classed:Hx,text:Bx,html:qx,raise:Xx,lower:Qx,append:Zx,insert:$x,remove:Wx,clone:Px,datum:tw,on:lw,dispatch:ow,[Symbol.iterator]:cw};function Ue(n){return typeof n=="string"?new Le([[document.querySelector(n)]],[document.documentElement]):new Le([[n]],Cy)}function fw(n){let i;for(;i=n.sourceEvent;)n=i;return n}function en(n,i){if(n=fw(n),i===void 0&&(i=n.currentTarget),i){var r=i.ownerSVGElement||i;if(r.createSVGPoint){var u=r.createSVGPoint();return u.x=n.clientX,u.y=n.clientY,u=u.matrixTransform(i.getScreenCTM().inverse()),[u.x,u.y]}if(i.getBoundingClientRect){var o=i.getBoundingClientRect();return[n.clientX-o.left-i.clientLeft,n.clientY-o.top-i.clientTop]}}return[n.pageX,n.pageY]}const dw={passive:!1},dr={capture:!0,passive:!1};function ff(n){n.stopImmediatePropagation()}function Fi(n){n.preventDefault(),n.stopImmediatePropagation()}function zy(n){var i=n.document.documentElement,r=Ue(n).on("dragstart.drag",Fi,dr);"onselectstart"in i?r.on("selectstart.drag",Fi,dr):(i.__noselect=i.style.MozUserSelect,i.style.MozUserSelect="none")}function Dy(n,i){var r=n.document.documentElement,u=Ue(n).on("dragstart.drag",null);i&&(u.on("click.drag",Fi,dr),setTimeout(function(){u.on("click.drag",null)},0)),"onselectstart"in r?u.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const Pu=n=>()=>n;function Af(n,{sourceEvent:i,subject:r,target:u,identifier:o,active:s,x:d,y:m,dx:h,dy:g,dispatch:p}){Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:i,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:u,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:d,enumerable:!0,configurable:!0},y:{value:m,enumerable:!0,configurable:!0},dx:{value:h,enumerable:!0,configurable:!0},dy:{value:g,enumerable:!0,configurable:!0},_:{value:p}})}Af.prototype.on=function(){var n=this._.on.apply(this._,arguments);return n===this._?this:n};function hw(n){return!n.ctrlKey&&!n.button}function gw(){return this.parentNode}function mw(n,i){return i??{x:n.x,y:n.y}}function yw(){return navigator.maxTouchPoints||"ontouchstart"in this}function Hy(){var n=hw,i=gw,r=mw,u=yw,o={},s=Ao("start","drag","end"),d=0,m,h,g,p,y=0;function v(_){_.on("mousedown.drag",x).filter(u).on("touchstart.drag",C).on("touchmove.drag",A,dw).on("touchend.drag touchcancel.drag",D).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function x(_,q){if(!(p||!n.call(this,_,q))){var Y=E(this,i.call(this,_,q),_,q,"mouse");Y&&(Ue(_.view).on("mousemove.drag",w,dr).on("mouseup.drag",N,dr),zy(_.view),ff(_),g=!1,m=_.clientX,h=_.clientY,Y("start",_))}}function w(_){if(Fi(_),!g){var q=_.clientX-m,Y=_.clientY-h;g=q*q+Y*Y>y}o.mouse("drag",_)}function N(_){Ue(_.view).on("mousemove.drag mouseup.drag",null),Dy(_.view,g),Fi(_),o.mouse("end",_)}function C(_,q){if(n.call(this,_,q)){var Y=_.changedTouches,k=i.call(this,_,q),K=Y.length,et,Z;for(et=0;et<K;++et)(Z=E(this,k,_,q,Y[et].identifier,Y[et]))&&(ff(_),Z("start",_,Y[et]))}}function A(_){var q=_.changedTouches,Y=q.length,k,K;for(k=0;k<Y;++k)(K=o[q[k].identifier])&&(Fi(_),K("drag",_,q[k]))}function D(_){var q=_.changedTouches,Y=q.length,k,K;for(p&&clearTimeout(p),p=setTimeout(function(){p=null},500),k=0;k<Y;++k)(K=o[q[k].identifier])&&(ff(_),K("end",_,q[k]))}function E(_,q,Y,k,K,et){var Z=s.copy(),L=en(et||Y,q),V,Q,T;if((T=r.call(_,new Af("beforestart",{sourceEvent:Y,target:v,identifier:K,active:d,x:L[0],y:L[1],dx:0,dy:0,dispatch:Z}),k))!=null)return V=T.x-L[0]||0,Q=T.y-L[1]||0,function G(S,H,j){var U=L,J;switch(S){case"start":o[K]=G,J=d++;break;case"end":delete o[K],--d;case"drag":L=en(j||H,q),J=d;break}Z.call(S,_,new Af(S,{sourceEvent:H,subject:T,target:v,identifier:K,active:J,x:L[0]+V,y:L[1]+Q,dx:L[0]-U[0],dy:L[1]-U[1],dispatch:Z}),k)}}return v.filter=function(_){return arguments.length?(n=typeof _=="function"?_:Pu(!!_),v):n},v.container=function(_){return arguments.length?(i=typeof _=="function"?_:Pu(_),v):i},v.subject=function(_){return arguments.length?(r=typeof _=="function"?_:Pu(_),v):r},v.touchable=function(_){return arguments.length?(u=typeof _=="function"?_:Pu(!!_),v):u},v.on=function(){var _=s.on.apply(s,arguments);return _===s?v:_},v.clickDistance=function(_){return arguments.length?(y=(_=+_)*_,v):Math.sqrt(y)},v}function Xf(n,i,r){n.prototype=i.prototype=r,r.constructor=n}function Ry(n,i){var r=Object.create(n.prototype);for(var u in i)r[u]=i[u];return r}function Mr(){}var hr=.7,yo=1/hr,Pi="\\\\s*([+-]?\\\\d+)\\\\s*",gr="\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*",mn="\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*",pw=/^#([0-9a-f]{3,8})$/,vw=new RegExp(\`^rgb\\\\(\${Pi},\${Pi},\${Pi}\\\\)$\`),bw=new RegExp(\`^rgb\\\\(\${mn},\${mn},\${mn}\\\\)$\`),xw=new RegExp(\`^rgba\\\\(\${Pi},\${Pi},\${Pi},\${gr}\\\\)$\`),ww=new RegExp(\`^rgba\\\\(\${mn},\${mn},\${mn},\${gr}\\\\)$\`),Ew=new RegExp(\`^hsl\\\\(\${gr},\${mn},\${mn}\\\\)$\`),Sw=new RegExp(\`^hsla\\\\(\${gr},\${mn},\${mn},\${gr}\\\\)$\`),Pm={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};Xf(Mr,ai,{copy(n){return Object.assign(new this.constructor,this,n)},displayable(){return this.rgb().displayable()},hex:t0,formatHex:t0,formatHex8:_w,formatHsl:Mw,formatRgb:e0,toString:e0});function t0(){return this.rgb().formatHex()}function _w(){return this.rgb().formatHex8()}function Mw(){return jy(this).formatHsl()}function e0(){return this.rgb().formatRgb()}function ai(n){var i,r;return n=(n+"").trim().toLowerCase(),(i=pw.exec(n))?(r=i[1].length,i=parseInt(i[1],16),r===6?n0(i):r===3?new Oe(i>>8&15|i>>4&240,i>>4&15|i&240,(i&15)<<4|i&15,1):r===8?to(i>>24&255,i>>16&255,i>>8&255,(i&255)/255):r===4?to(i>>12&15|i>>8&240,i>>8&15|i>>4&240,i>>4&15|i&240,((i&15)<<4|i&15)/255):null):(i=vw.exec(n))?new Oe(i[1],i[2],i[3],1):(i=bw.exec(n))?new Oe(i[1]*255/100,i[2]*255/100,i[3]*255/100,1):(i=xw.exec(n))?to(i[1],i[2],i[3],i[4]):(i=ww.exec(n))?to(i[1]*255/100,i[2]*255/100,i[3]*255/100,i[4]):(i=Ew.exec(n))?l0(i[1],i[2]/100,i[3]/100,1):(i=Sw.exec(n))?l0(i[1],i[2]/100,i[3]/100,i[4]):Pm.hasOwnProperty(n)?n0(Pm[n]):n==="transparent"?new Oe(NaN,NaN,NaN,0):null}function n0(n){return new Oe(n>>16&255,n>>8&255,n&255,1)}function to(n,i,r,u){return u<=0&&(n=i=r=NaN),new Oe(n,i,r,u)}function Nw(n){return n instanceof Mr||(n=ai(n)),n?(n=n.rgb(),new Oe(n.r,n.g,n.b,n.opacity)):new Oe}function Of(n,i,r,u){return arguments.length===1?Nw(n):new Oe(n,i,r,u??1)}function Oe(n,i,r,u){this.r=+n,this.g=+i,this.b=+r,this.opacity=+u}Xf(Oe,Of,Ry(Mr,{brighter(n){return n=n==null?yo:Math.pow(yo,n),new Oe(this.r*n,this.g*n,this.b*n,this.opacity)},darker(n){return n=n==null?hr:Math.pow(hr,n),new Oe(this.r*n,this.g*n,this.b*n,this.opacity)},rgb(){return this},clamp(){return new Oe(ei(this.r),ei(this.g),ei(this.b),po(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:a0,formatHex:a0,formatHex8:Tw,formatRgb:i0,toString:i0}));function a0(){return\`#\${ti(this.r)}\${ti(this.g)}\${ti(this.b)}\`}function Tw(){return\`#\${ti(this.r)}\${ti(this.g)}\${ti(this.b)}\${ti((isNaN(this.opacity)?1:this.opacity)*255)}\`}function i0(){const n=po(this.opacity);return\`\${n===1?"rgb(":"rgba("}\${ei(this.r)}, \${ei(this.g)}, \${ei(this.b)}\${n===1?")":\`, \${n})\`}\`}function po(n){return isNaN(n)?1:Math.max(0,Math.min(1,n))}function ei(n){return Math.max(0,Math.min(255,Math.round(n)||0))}function ti(n){return n=ei(n),(n<16?"0":"")+n.toString(16)}function l0(n,i,r,u){return u<=0?n=i=r=NaN:r<=0||r>=1?n=i=NaN:i<=0&&(n=NaN),new nn(n,i,r,u)}function jy(n){if(n instanceof nn)return new nn(n.h,n.s,n.l,n.opacity);if(n instanceof Mr||(n=ai(n)),!n)return new nn;if(n instanceof nn)return n;n=n.rgb();var i=n.r/255,r=n.g/255,u=n.b/255,o=Math.min(i,r,u),s=Math.max(i,r,u),d=NaN,m=s-o,h=(s+o)/2;return m?(i===s?d=(r-u)/m+(r<u)*6:r===s?d=(u-i)/m+2:d=(i-r)/m+4,m/=h<.5?s+o:2-s-o,d*=60):m=h>0&&h<1?0:d,new nn(d,m,h,n.opacity)}function Aw(n,i,r,u){return arguments.length===1?jy(n):new nn(n,i,r,u??1)}function nn(n,i,r,u){this.h=+n,this.s=+i,this.l=+r,this.opacity=+u}Xf(nn,Aw,Ry(Mr,{brighter(n){return n=n==null?yo:Math.pow(yo,n),new nn(this.h,this.s,this.l*n,this.opacity)},darker(n){return n=n==null?hr:Math.pow(hr,n),new nn(this.h,this.s,this.l*n,this.opacity)},rgb(){var n=this.h%360+(this.h<0)*360,i=isNaN(n)||isNaN(this.s)?0:this.s,r=this.l,u=r+(r<.5?r:1-r)*i,o=2*r-u;return new Oe(df(n>=240?n-240:n+120,o,u),df(n,o,u),df(n<120?n+240:n-120,o,u),this.opacity)},clamp(){return new nn(r0(this.h),eo(this.s),eo(this.l),po(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=po(this.opacity);return\`\${n===1?"hsl(":"hsla("}\${r0(this.h)}, \${eo(this.s)*100}%, \${eo(this.l)*100}%\${n===1?")":\`, \${n})\`}\`}}));function r0(n){return n=(n||0)%360,n<0?n+360:n}function eo(n){return Math.max(0,Math.min(1,n||0))}function df(n,i,r){return(n<60?i+(r-i)*n/60:n<180?r:n<240?i+(r-i)*(240-n)/60:i)*255}const Gf=n=>()=>n;function Ow(n,i){return function(r){return n+r*i}}function Cw(n,i,r){return n=Math.pow(n,r),i=Math.pow(i,r)-n,r=1/r,function(u){return Math.pow(n+u*i,r)}}function zw(n){return(n=+n)==1?Yy:function(i,r){return r-i?Cw(i,r,n):Gf(isNaN(i)?r:i)}}function Yy(n,i){var r=i-n;return r?Ow(n,r):Gf(isNaN(n)?i:n)}const vo=(function n(i){var r=zw(i);function u(o,s){var d=r((o=Of(o)).r,(s=Of(s)).r),m=r(o.g,s.g),h=r(o.b,s.b),g=Yy(o.opacity,s.opacity);return function(p){return o.r=d(p),o.g=m(p),o.b=h(p),o.opacity=g(p),o+""}}return u.gamma=n,u})(1);function Dw(n,i){i||(i=[]);var r=n?Math.min(i.length,n.length):0,u=i.slice(),o;return function(s){for(o=0;o<r;++o)u[o]=n[o]*(1-s)+i[o]*s;return u}}function Hw(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function Rw(n,i){var r=i?i.length:0,u=n?Math.min(r,n.length):0,o=new Array(u),s=new Array(r),d;for(d=0;d<u;++d)o[d]=sr(n[d],i[d]);for(;d<r;++d)s[d]=i[d];return function(m){for(d=0;d<u;++d)s[d]=o[d](m);return s}}function jw(n,i){var r=new Date;return n=+n,i=+i,function(u){return r.setTime(n*(1-u)+i*u),r}}function gn(n,i){return n=+n,i=+i,function(r){return n*(1-r)+i*r}}function Yw(n,i){var r={},u={},o;(n===null||typeof n!="object")&&(n={}),(i===null||typeof i!="object")&&(i={});for(o in i)o in n?r[o]=sr(n[o],i[o]):u[o]=i[o];return function(s){for(o in r)u[o]=r[o](s);return u}}var Cf=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,hf=new RegExp(Cf.source,"g");function Bw(n){return function(){return n}}function Uw(n){return function(i){return n(i)+""}}function By(n,i){var r=Cf.lastIndex=hf.lastIndex=0,u,o,s,d=-1,m=[],h=[];for(n=n+"",i=i+"";(u=Cf.exec(n))&&(o=hf.exec(i));)(s=o.index)>r&&(s=i.slice(r,s),m[d]?m[d]+=s:m[++d]=s),(u=u[0])===(o=o[0])?m[d]?m[d]+=o:m[++d]=o:(m[++d]=null,h.push({i:d,x:gn(u,o)})),r=hf.lastIndex;return r<i.length&&(s=i.slice(r),m[d]?m[d]+=s:m[++d]=s),m.length<2?h[0]?Uw(h[0].x):Bw(i):(i=h.length,function(g){for(var p=0,y;p<i;++p)m[(y=h[p]).i]=y.x(g);return m.join("")})}function sr(n,i){var r=typeof i,u;return i==null||r==="boolean"?Gf(i):(r==="number"?gn:r==="string"?(u=ai(i))?(i=u,vo):By:i instanceof ai?vo:i instanceof Date?jw:Hw(i)?Dw:Array.isArray(i)?Rw:typeof i.valueOf!="function"&&typeof i.toString!="function"||isNaN(i)?Yw:gn)(n,i)}var u0=180/Math.PI,zf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Uy(n,i,r,u,o,s){var d,m,h;return(d=Math.sqrt(n*n+i*i))&&(n/=d,i/=d),(h=n*r+i*u)&&(r-=n*h,u-=i*h),(m=Math.sqrt(r*r+u*u))&&(r/=m,u/=m,h/=m),n*u<i*r&&(n=-n,i=-i,h=-h,d=-d),{translateX:o,translateY:s,rotate:Math.atan2(i,n)*u0,skewX:Math.atan(h)*u0,scaleX:d,scaleY:m}}var no;function Lw(n){const i=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(n+"");return i.isIdentity?zf:Uy(i.a,i.b,i.c,i.d,i.e,i.f)}function kw(n){return n==null||(no||(no=document.createElementNS("http://www.w3.org/2000/svg","g")),no.setAttribute("transform",n),!(n=no.transform.baseVal.consolidate()))?zf:(n=n.matrix,Uy(n.a,n.b,n.c,n.d,n.e,n.f))}function Ly(n,i,r,u){function o(g){return g.length?g.pop()+" ":""}function s(g,p,y,v,x,w){if(g!==y||p!==v){var N=x.push("translate(",null,i,null,r);w.push({i:N-4,x:gn(g,y)},{i:N-2,x:gn(p,v)})}else(y||v)&&x.push("translate("+y+i+v+r)}function d(g,p,y,v){g!==p?(g-p>180?p+=360:p-g>180&&(g+=360),v.push({i:y.push(o(y)+"rotate(",null,u)-2,x:gn(g,p)})):p&&y.push(o(y)+"rotate("+p+u)}function m(g,p,y,v){g!==p?v.push({i:y.push(o(y)+"skewX(",null,u)-2,x:gn(g,p)}):p&&y.push(o(y)+"skewX("+p+u)}function h(g,p,y,v,x,w){if(g!==y||p!==v){var N=x.push(o(x)+"scale(",null,",",null,")");w.push({i:N-4,x:gn(g,y)},{i:N-2,x:gn(p,v)})}else(y!==1||v!==1)&&x.push(o(x)+"scale("+y+","+v+")")}return function(g,p){var y=[],v=[];return g=n(g),p=n(p),s(g.translateX,g.translateY,p.translateX,p.translateY,y,v),d(g.rotate,p.rotate,y,v),m(g.skewX,p.skewX,y,v),h(g.scaleX,g.scaleY,p.scaleX,p.scaleY,y,v),g=p=null,function(x){for(var w=-1,N=v.length,C;++w<N;)y[(C=v[w]).i]=C.x(x);return y.join("")}}}var qw=Ly(Lw,"px, ","px)","deg)"),Vw=Ly(kw,", ",")",")"),Xw=1e-12;function o0(n){return((n=Math.exp(n))+1/n)/2}function Gw(n){return((n=Math.exp(n))-1/n)/2}function Qw(n){return((n=Math.exp(2*n))-1)/(n+1)}const so=(function n(i,r,u){function o(s,d){var m=s[0],h=s[1],g=s[2],p=d[0],y=d[1],v=d[2],x=p-m,w=y-h,N=x*x+w*w,C,A;if(N<Xw)A=Math.log(v/g)/i,C=function(k){return[m+k*x,h+k*w,g*Math.exp(i*k*A)]};else{var D=Math.sqrt(N),E=(v*v-g*g+u*N)/(2*g*r*D),_=(v*v-g*g-u*N)/(2*v*r*D),q=Math.log(Math.sqrt(E*E+1)-E),Y=Math.log(Math.sqrt(_*_+1)-_);A=(Y-q)/i,C=function(k){var K=k*A,et=o0(q),Z=g/(r*D)*(et*Qw(i*K+q)-Gw(q));return[m+Z*x,h+Z*w,g*et/o0(i*K+q)]}}return C.duration=A*1e3*i/Math.SQRT2,C}return o.rho=function(s){var d=Math.max(.001,+s),m=d*d,h=m*m;return n(d,m,h)},o})(Math.SQRT2,2,4);var el=0,or=0,ar=0,ky=1e3,bo,cr,xo=0,ii=0,Co=0,mr=typeof performance=="object"&&performance.now?performance:Date,qy=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(n){setTimeout(n,17)};function Qf(){return ii||(qy(Zw),ii=mr.now()+Co)}function Zw(){ii=0}function wo(){this._call=this._time=this._next=null}wo.prototype=Vy.prototype={constructor:wo,restart:function(n,i,r){if(typeof n!="function")throw new TypeError("callback is not a function");r=(r==null?Qf():+r)+(i==null?0:+i),!this._next&&cr!==this&&(cr?cr._next=this:bo=this,cr=this),this._call=n,this._time=r,Df()},stop:function(){this._call&&(this._call=null,this._time=1/0,Df())}};function Vy(n,i,r){var u=new wo;return u.restart(n,i,r),u}function Kw(){Qf(),++el;for(var n=bo,i;n;)(i=ii-n._time)>=0&&n._call.call(void 0,i),n=n._next;--el}function c0(){ii=(xo=mr.now())+Co,el=or=0;try{Kw()}finally{el=0,Jw(),ii=0}}function $w(){var n=mr.now(),i=n-xo;i>ky&&(Co-=i,xo=n)}function Jw(){for(var n,i=bo,r,u=1/0;i;)i._call?(u>i._time&&(u=i._time),n=i,i=i._next):(r=i._next,i._next=null,i=n?n._next=r:bo=r);cr=n,Df(u)}function Df(n){if(!el){or&&(or=clearTimeout(or));var i=n-ii;i>24?(n<1/0&&(or=setTimeout(c0,n-mr.now()-Co)),ar&&(ar=clearInterval(ar))):(ar||(xo=mr.now(),ar=setInterval($w,ky)),el=1,qy(c0))}}function s0(n,i,r){var u=new wo;return i=i==null?0:+i,u.restart(o=>{u.stop(),n(o+i)},i,r),u}var Ww=Ao("start","end","cancel","interrupt"),Iw=[],Xy=0,f0=1,Hf=2,fo=3,d0=4,Rf=5,ho=6;function zo(n,i,r,u,o,s){var d=n.__transition;if(!d)n.__transition={};else if(r in d)return;Fw(n,r,{name:i,index:u,group:o,on:Ww,tween:Iw,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Xy})}function Zf(n,i){var r=un(n,i);if(r.state>Xy)throw new Error("too late; already scheduled");return r}function pn(n,i){var r=un(n,i);if(r.state>fo)throw new Error("too late; already running");return r}function un(n,i){var r=n.__transition;if(!r||!(r=r[i]))throw new Error("transition not found");return r}function Fw(n,i,r){var u=n.__transition,o;u[i]=r,r.timer=Vy(s,0,r.time);function s(g){r.state=f0,r.timer.restart(d,r.delay,r.time),r.delay<=g&&d(g-r.delay)}function d(g){var p,y,v,x;if(r.state!==f0)return h();for(p in u)if(x=u[p],x.name===r.name){if(x.state===fo)return s0(d);x.state===d0?(x.state=ho,x.timer.stop(),x.on.call("interrupt",n,n.__data__,x.index,x.group),delete u[p]):+p<i&&(x.state=ho,x.timer.stop(),x.on.call("cancel",n,n.__data__,x.index,x.group),delete u[p])}if(s0(function(){r.state===fo&&(r.state=d0,r.timer.restart(m,r.delay,r.time),m(g))}),r.state=Hf,r.on.call("start",n,n.__data__,r.index,r.group),r.state===Hf){for(r.state=fo,o=new Array(v=r.tween.length),p=0,y=-1;p<v;++p)(x=r.tween[p].value.call(n,n.__data__,r.index,r.group))&&(o[++y]=x);o.length=y+1}}function m(g){for(var p=g<r.duration?r.ease.call(null,g/r.duration):(r.timer.restart(h),r.state=Rf,1),y=-1,v=o.length;++y<v;)o[y].call(n,p);r.state===Rf&&(r.on.call("end",n,n.__data__,r.index,r.group),h())}function h(){r.state=ho,r.timer.stop(),delete u[i];for(var g in u)return;delete n.__transition}}function go(n,i){var r=n.__transition,u,o,s=!0,d;if(r){i=i==null?null:i+"";for(d in r){if((u=r[d]).name!==i){s=!1;continue}o=u.state>Hf&&u.state<Rf,u.state=ho,u.timer.stop(),u.on.call(o?"interrupt":"cancel",n,n.__data__,u.index,u.group),delete r[d]}s&&delete n.__transition}}function Pw(n){return this.each(function(){go(this,n)})}function tE(n,i){var r,u;return function(){var o=pn(this,n),s=o.tween;if(s!==r){u=r=s;for(var d=0,m=u.length;d<m;++d)if(u[d].name===i){u=u.slice(),u.splice(d,1);break}}o.tween=u}}function eE(n,i,r){var u,o;if(typeof r!="function")throw new Error;return function(){var s=pn(this,n),d=s.tween;if(d!==u){o=(u=d).slice();for(var m={name:i,value:r},h=0,g=o.length;h<g;++h)if(o[h].name===i){o[h]=m;break}h===g&&o.push(m)}s.tween=o}}function nE(n,i){var r=this._id;if(n+="",arguments.length<2){for(var u=un(this.node(),r).tween,o=0,s=u.length,d;o<s;++o)if((d=u[o]).name===n)return d.value;return null}return this.each((i==null?tE:eE)(r,n,i))}function Kf(n,i,r){var u=n._id;return n.each(function(){var o=pn(this,u);(o.value||(o.value={}))[i]=r.apply(this,arguments)}),function(o){return un(o,u).value[i]}}function Gy(n,i){var r;return(typeof i=="number"?gn:i instanceof ai?vo:(r=ai(i))?(i=r,vo):By)(n,i)}function aE(n){return function(){this.removeAttribute(n)}}function iE(n){return function(){this.removeAttributeNS(n.space,n.local)}}function lE(n,i,r){var u,o=r+"",s;return function(){var d=this.getAttribute(n);return d===o?null:d===u?s:s=i(u=d,r)}}function rE(n,i,r){var u,o=r+"",s;return function(){var d=this.getAttributeNS(n.space,n.local);return d===o?null:d===u?s:s=i(u=d,r)}}function uE(n,i,r){var u,o,s;return function(){var d,m=r(this),h;return m==null?void this.removeAttribute(n):(d=this.getAttribute(n),h=m+"",d===h?null:d===u&&h===o?s:(o=h,s=i(u=d,m)))}}function oE(n,i,r){var u,o,s;return function(){var d,m=r(this),h;return m==null?void this.removeAttributeNS(n.space,n.local):(d=this.getAttributeNS(n.space,n.local),h=m+"",d===h?null:d===u&&h===o?s:(o=h,s=i(u=d,m)))}}function cE(n,i){var r=Oo(n),u=r==="transform"?Vw:Gy;return this.attrTween(n,typeof i=="function"?(r.local?oE:uE)(r,u,Kf(this,"attr."+n,i)):i==null?(r.local?iE:aE)(r):(r.local?rE:lE)(r,u,i))}function sE(n,i){return function(r){this.setAttribute(n,i.call(this,r))}}function fE(n,i){return function(r){this.setAttributeNS(n.space,n.local,i.call(this,r))}}function dE(n,i){var r,u;function o(){var s=i.apply(this,arguments);return s!==u&&(r=(u=s)&&fE(n,s)),r}return o._value=i,o}function hE(n,i){var r,u;function o(){var s=i.apply(this,arguments);return s!==u&&(r=(u=s)&&sE(n,s)),r}return o._value=i,o}function gE(n,i){var r="attr."+n;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(i==null)return this.tween(r,null);if(typeof i!="function")throw new Error;var u=Oo(n);return this.tween(r,(u.local?dE:hE)(u,i))}function mE(n,i){return function(){Zf(this,n).delay=+i.apply(this,arguments)}}function yE(n,i){return i=+i,function(){Zf(this,n).delay=i}}function pE(n){var i=this._id;return arguments.length?this.each((typeof n=="function"?mE:yE)(i,n)):un(this.node(),i).delay}function vE(n,i){return function(){pn(this,n).duration=+i.apply(this,arguments)}}function bE(n,i){return i=+i,function(){pn(this,n).duration=i}}function xE(n){var i=this._id;return arguments.length?this.each((typeof n=="function"?vE:bE)(i,n)):un(this.node(),i).duration}function wE(n,i){if(typeof i!="function")throw new Error;return function(){pn(this,n).ease=i}}function EE(n){var i=this._id;return arguments.length?this.each(wE(i,n)):un(this.node(),i).ease}function SE(n,i){return function(){var r=i.apply(this,arguments);if(typeof r!="function")throw new Error;pn(this,n).ease=r}}function _E(n){if(typeof n!="function")throw new Error;return this.each(SE(this._id,n))}function ME(n){typeof n!="function"&&(n=wy(n));for(var i=this._groups,r=i.length,u=new Array(r),o=0;o<r;++o)for(var s=i[o],d=s.length,m=u[o]=[],h,g=0;g<d;++g)(h=s[g])&&n.call(h,h.__data__,g,s)&&m.push(h);return new Gn(u,this._parents,this._name,this._id)}function NE(n){if(n._id!==this._id)throw new Error;for(var i=this._groups,r=n._groups,u=i.length,o=r.length,s=Math.min(u,o),d=new Array(u),m=0;m<s;++m)for(var h=i[m],g=r[m],p=h.length,y=d[m]=new Array(p),v,x=0;x<p;++x)(v=h[x]||g[x])&&(y[x]=v);for(;m<u;++m)d[m]=i[m];return new Gn(d,this._parents,this._name,this._id)}function TE(n){return(n+"").trim().split(/^|\\s+/).every(function(i){var r=i.indexOf(".");return r>=0&&(i=i.slice(0,r)),!i||i==="start"})}function AE(n,i,r){var u,o,s=TE(i)?Zf:pn;return function(){var d=s(this,n),m=d.on;m!==u&&(o=(u=m).copy()).on(i,r),d.on=o}}function OE(n,i){var r=this._id;return arguments.length<2?un(this.node(),r).on.on(n):this.each(AE(r,n,i))}function CE(n){return function(){var i=this.parentNode;for(var r in this.__transition)if(+r!==n)return;i&&i.removeChild(this)}}function zE(){return this.on("end.remove",CE(this._id))}function DE(n){var i=this._name,r=this._id;typeof n!="function"&&(n=qf(n));for(var u=this._groups,o=u.length,s=new Array(o),d=0;d<o;++d)for(var m=u[d],h=m.length,g=s[d]=new Array(h),p,y,v=0;v<h;++v)(p=m[v])&&(y=n.call(p,p.__data__,v,m))&&("__data__"in p&&(y.__data__=p.__data__),g[v]=y,zo(g[v],i,r,v,g,un(p,r)));return new Gn(s,this._parents,i,r)}function HE(n){var i=this._name,r=this._id;typeof n!="function"&&(n=xy(n));for(var u=this._groups,o=u.length,s=[],d=[],m=0;m<o;++m)for(var h=u[m],g=h.length,p,y=0;y<g;++y)if(p=h[y]){for(var v=n.call(p,p.__data__,y,h),x,w=un(p,r),N=0,C=v.length;N<C;++N)(x=v[N])&&zo(x,i,r,N,v,w);s.push(v),d.push(p)}return new Gn(s,d,i,r)}var RE=_r.prototype.constructor;function jE(){return new RE(this._groups,this._parents)}function YE(n,i){var r,u,o;return function(){var s=tl(this,n),d=(this.style.removeProperty(n),tl(this,n));return s===d?null:s===r&&d===u?o:o=i(r=s,u=d)}}function Qy(n){return function(){this.style.removeProperty(n)}}function BE(n,i,r){var u,o=r+"",s;return function(){var d=tl(this,n);return d===o?null:d===u?s:s=i(u=d,r)}}function UE(n,i,r){var u,o,s;return function(){var d=tl(this,n),m=r(this),h=m+"";return m==null&&(h=m=(this.style.removeProperty(n),tl(this,n))),d===h?null:d===u&&h===o?s:(o=h,s=i(u=d,m))}}function LE(n,i){var r,u,o,s="style."+i,d="end."+s,m;return function(){var h=pn(this,n),g=h.on,p=h.value[s]==null?m||(m=Qy(i)):void 0;(g!==r||o!==p)&&(u=(r=g).copy()).on(d,o=p),h.on=u}}function kE(n,i,r){var u=(n+="")=="transform"?qw:Gy;return i==null?this.styleTween(n,YE(n,u)).on("end.style."+n,Qy(n)):typeof i=="function"?this.styleTween(n,UE(n,u,Kf(this,"style."+n,i))).each(LE(this._id,n)):this.styleTween(n,BE(n,u,i),r).on("end.style."+n,null)}function qE(n,i,r){return function(u){this.style.setProperty(n,i.call(this,u),r)}}function VE(n,i,r){var u,o;function s(){var d=i.apply(this,arguments);return d!==o&&(u=(o=d)&&qE(n,d,r)),u}return s._value=i,s}function XE(n,i,r){var u="style."+(n+="");if(arguments.length<2)return(u=this.tween(u))&&u._value;if(i==null)return this.tween(u,null);if(typeof i!="function")throw new Error;return this.tween(u,VE(n,i,r??""))}function GE(n){return function(){this.textContent=n}}function QE(n){return function(){var i=n(this);this.textContent=i??""}}function ZE(n){return this.tween("text",typeof n=="function"?QE(Kf(this,"text",n)):GE(n==null?"":n+""))}function KE(n){return function(i){this.textContent=n.call(this,i)}}function $E(n){var i,r;function u(){var o=n.apply(this,arguments);return o!==r&&(i=(r=o)&&KE(o)),i}return u._value=n,u}function JE(n){var i="text";if(arguments.length<1)return(i=this.tween(i))&&i._value;if(n==null)return this.tween(i,null);if(typeof n!="function")throw new Error;return this.tween(i,$E(n))}function WE(){for(var n=this._name,i=this._id,r=Zy(),u=this._groups,o=u.length,s=0;s<o;++s)for(var d=u[s],m=d.length,h,g=0;g<m;++g)if(h=d[g]){var p=un(h,i);zo(h,n,r,g,d,{time:p.time+p.delay+p.duration,delay:0,duration:p.duration,ease:p.ease})}return new Gn(u,this._parents,n,r)}function IE(){var n,i,r=this,u=r._id,o=r.size();return new Promise(function(s,d){var m={value:d},h={value:function(){--o===0&&s()}};r.each(function(){var g=pn(this,u),p=g.on;p!==n&&(i=(n=p).copy(),i._.cancel.push(m),i._.interrupt.push(m),i._.end.push(h)),g.on=i}),o===0&&s()})}var FE=0;function Gn(n,i,r,u){this._groups=n,this._parents=i,this._name=r,this._id=u}function Zy(){return++FE}var qn=_r.prototype;Gn.prototype={constructor:Gn,select:DE,selectAll:HE,selectChild:qn.selectChild,selectChildren:qn.selectChildren,filter:ME,merge:NE,selection:jE,transition:WE,call:qn.call,nodes:qn.nodes,node:qn.node,size:qn.size,empty:qn.empty,each:qn.each,on:OE,attr:cE,attrTween:gE,style:kE,styleTween:XE,text:ZE,textTween:JE,remove:zE,tween:nE,delay:pE,duration:xE,ease:EE,easeVarying:_E,end:IE,[Symbol.iterator]:qn[Symbol.iterator]};function PE(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var tS={time:null,delay:0,duration:250,ease:PE};function eS(n,i){for(var r;!(r=n.__transition)||!(r=r[i]);)if(!(n=n.parentNode))throw new Error(\`transition \${i} not found\`);return r}function nS(n){var i,r;n instanceof Gn?(i=n._id,n=n._name):(i=Zy(),(r=tS).time=Qf(),n=n==null?null:n+"");for(var u=this._groups,o=u.length,s=0;s<o;++s)for(var d=u[s],m=d.length,h,g=0;g<m;++g)(h=d[g])&&zo(h,n,i,g,d,r||eS(h,i));return new Gn(u,this._parents,n,i)}_r.prototype.interrupt=Pw;_r.prototype.transition=nS;const ao=n=>()=>n;function aS(n,{sourceEvent:i,target:r,transform:u,dispatch:o}){Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:i,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:u,enumerable:!0,configurable:!0},_:{value:o}})}function Vn(n,i,r){this.k=n,this.x=i,this.y=r}Vn.prototype={constructor:Vn,scale:function(n){return n===1?this:new Vn(this.k*n,this.x,this.y)},translate:function(n,i){return n===0&i===0?this:new Vn(this.k,this.x+this.k*n,this.y+this.k*i)},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 Do=new Vn(1,0,0);Ky.prototype=Vn.prototype;function Ky(n){for(;!n.__zoom;)if(!(n=n.parentNode))return Do;return n.__zoom}function gf(n){n.stopImmediatePropagation()}function ir(n){n.preventDefault(),n.stopImmediatePropagation()}function iS(n){return(!n.ctrlKey||n.type==="wheel")&&!n.button}function lS(){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 h0(){return this.__zoom||Do}function rS(n){return-n.deltaY*(n.deltaMode===1?.05:n.deltaMode?1:.002)*(n.ctrlKey?10:1)}function uS(){return navigator.maxTouchPoints||"ontouchstart"in this}function oS(n,i,r){var u=n.invertX(i[0][0])-r[0][0],o=n.invertX(i[1][0])-r[1][0],s=n.invertY(i[0][1])-r[0][1],d=n.invertY(i[1][1])-r[1][1];return n.translate(o>u?(u+o)/2:Math.min(0,u)||Math.max(0,o),d>s?(s+d)/2:Math.min(0,s)||Math.max(0,d))}function $y(){var n=iS,i=lS,r=oS,u=rS,o=uS,s=[0,1/0],d=[[-1/0,-1/0],[1/0,1/0]],m=250,h=so,g=Ao("start","zoom","end"),p,y,v,x=500,w=150,N=0,C=10;function A(T){T.property("__zoom",h0).on("wheel.zoom",K,{passive:!1}).on("mousedown.zoom",et).on("dblclick.zoom",Z).filter(o).on("touchstart.zoom",L).on("touchmove.zoom",V).on("touchend.zoom touchcancel.zoom",Q).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}A.transform=function(T,G,S,H){var j=T.selection?T.selection():T;j.property("__zoom",h0),T!==j?q(T,G,S,H):j.interrupt().each(function(){Y(this,arguments).event(H).start().zoom(null,typeof G=="function"?G.apply(this,arguments):G).end()})},A.scaleBy=function(T,G,S,H){A.scaleTo(T,function(){var j=this.__zoom.k,U=typeof G=="function"?G.apply(this,arguments):G;return j*U},S,H)},A.scaleTo=function(T,G,S,H){A.transform(T,function(){var j=i.apply(this,arguments),U=this.__zoom,J=S==null?_(j):typeof S=="function"?S.apply(this,arguments):S,M=U.invert(J),B=typeof G=="function"?G.apply(this,arguments):G;return r(E(D(U,B),J,M),j,d)},S,H)},A.translateBy=function(T,G,S,H){A.transform(T,function(){return r(this.__zoom.translate(typeof G=="function"?G.apply(this,arguments):G,typeof S=="function"?S.apply(this,arguments):S),i.apply(this,arguments),d)},null,H)},A.translateTo=function(T,G,S,H,j){A.transform(T,function(){var U=i.apply(this,arguments),J=this.__zoom,M=H==null?_(U):typeof H=="function"?H.apply(this,arguments):H;return r(Do.translate(M[0],M[1]).scale(J.k).translate(typeof G=="function"?-G.apply(this,arguments):-G,typeof S=="function"?-S.apply(this,arguments):-S),U,d)},H,j)};function D(T,G){return G=Math.max(s[0],Math.min(s[1],G)),G===T.k?T:new Vn(G,T.x,T.y)}function E(T,G,S){var H=G[0]-S[0]*T.k,j=G[1]-S[1]*T.k;return H===T.x&&j===T.y?T:new Vn(T.k,H,j)}function _(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function q(T,G,S,H){T.on("start.zoom",function(){Y(this,arguments).event(H).start()}).on("interrupt.zoom end.zoom",function(){Y(this,arguments).event(H).end()}).tween("zoom",function(){var j=this,U=arguments,J=Y(j,U).event(H),M=i.apply(j,U),B=S==null?_(M):typeof S=="function"?S.apply(j,U):S,F=Math.max(M[1][0]-M[0][0],M[1][1]-M[0][1]),R=j.__zoom,z=typeof G=="function"?G.apply(j,U):G,X=h(R.invert(B).concat(F/R.k),z.invert(B).concat(F/z.k));return function($){if($===1)$=z;else{var I=X($),at=F/I[2];$=new Vn(at,B[0]-I[0]*at,B[1]-I[1]*at)}J.zoom(null,$)}})}function Y(T,G,S){return!S&&T.__zooming||new k(T,G)}function k(T,G){this.that=T,this.args=G,this.active=0,this.sourceEvent=null,this.extent=i.apply(T,G),this.taps=0}k.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,G){return this.mouse&&T!=="mouse"&&(this.mouse[1]=G.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=G.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=G.invert(this.touch1[0])),this.that.__zoom=G,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var G=Ue(this.that).datum();g.call(T,this.that,new aS(T,{sourceEvent:this.sourceEvent,target:A,transform:this.that.__zoom,dispatch:g}),G)}};function K(T,...G){if(!n.apply(this,arguments))return;var S=Y(this,G).event(T),H=this.__zoom,j=Math.max(s[0],Math.min(s[1],H.k*Math.pow(2,u.apply(this,arguments)))),U=en(T);if(S.wheel)(S.mouse[0][0]!==U[0]||S.mouse[0][1]!==U[1])&&(S.mouse[1]=H.invert(S.mouse[0]=U)),clearTimeout(S.wheel);else{if(H.k===j)return;S.mouse=[U,H.invert(U)],go(this),S.start()}ir(T),S.wheel=setTimeout(J,w),S.zoom("mouse",r(E(D(H,j),S.mouse[0],S.mouse[1]),S.extent,d));function J(){S.wheel=null,S.end()}}function et(T,...G){if(v||!n.apply(this,arguments))return;var S=T.currentTarget,H=Y(this,G,!0).event(T),j=Ue(T.view).on("mousemove.zoom",B,!0).on("mouseup.zoom",F,!0),U=en(T,S),J=T.clientX,M=T.clientY;zy(T.view),gf(T),H.mouse=[U,this.__zoom.invert(U)],go(this),H.start();function B(R){if(ir(R),!H.moved){var z=R.clientX-J,X=R.clientY-M;H.moved=z*z+X*X>N}H.event(R).zoom("mouse",r(E(H.that.__zoom,H.mouse[0]=en(R,S),H.mouse[1]),H.extent,d))}function F(R){j.on("mousemove.zoom mouseup.zoom",null),Dy(R.view,H.moved),ir(R),H.event(R).end()}}function Z(T,...G){if(n.apply(this,arguments)){var S=this.__zoom,H=en(T.changedTouches?T.changedTouches[0]:T,this),j=S.invert(H),U=S.k*(T.shiftKey?.5:2),J=r(E(D(S,U),H,j),i.apply(this,G),d);ir(T),m>0?Ue(this).transition().duration(m).call(q,J,H,T):Ue(this).call(A.transform,J,H,T)}}function L(T,...G){if(n.apply(this,arguments)){var S=T.touches,H=S.length,j=Y(this,G,T.changedTouches.length===H).event(T),U,J,M,B;for(gf(T),J=0;J<H;++J)M=S[J],B=en(M,this),B=[B,this.__zoom.invert(B),M.identifier],j.touch0?!j.touch1&&j.touch0[2]!==B[2]&&(j.touch1=B,j.taps=0):(j.touch0=B,U=!0,j.taps=1+!!p);p&&(p=clearTimeout(p)),U&&(j.taps<2&&(y=B[0],p=setTimeout(function(){p=null},x)),go(this),j.start())}}function V(T,...G){if(this.__zooming){var S=Y(this,G).event(T),H=T.changedTouches,j=H.length,U,J,M,B;for(ir(T),U=0;U<j;++U)J=H[U],M=en(J,this),S.touch0&&S.touch0[2]===J.identifier?S.touch0[0]=M:S.touch1&&S.touch1[2]===J.identifier&&(S.touch1[0]=M);if(J=S.that.__zoom,S.touch1){var F=S.touch0[0],R=S.touch0[1],z=S.touch1[0],X=S.touch1[1],$=($=z[0]-F[0])*$+($=z[1]-F[1])*$,I=(I=X[0]-R[0])*I+(I=X[1]-R[1])*I;J=D(J,Math.sqrt($/I)),M=[(F[0]+z[0])/2,(F[1]+z[1])/2],B=[(R[0]+X[0])/2,(R[1]+X[1])/2]}else if(S.touch0)M=S.touch0[0],B=S.touch0[1];else return;S.zoom("touch",r(E(J,M,B),S.extent,d))}}function Q(T,...G){if(this.__zooming){var S=Y(this,G).event(T),H=T.changedTouches,j=H.length,U,J;for(gf(T),v&&clearTimeout(v),v=setTimeout(function(){v=null},x),U=0;U<j;++U)J=H[U],S.touch0&&S.touch0[2]===J.identifier?delete S.touch0:S.touch1&&S.touch1[2]===J.identifier&&delete S.touch1;if(S.touch1&&!S.touch0&&(S.touch0=S.touch1,delete S.touch1),S.touch0)S.touch0[1]=this.__zoom.invert(S.touch0[0]);else if(S.end(),S.taps===2&&(J=en(J,this),Math.hypot(y[0]-J[0],y[1]-J[1])<C)){var M=Ue(this).on("dblclick.zoom");M&&M.apply(this,arguments)}}}return A.wheelDelta=function(T){return arguments.length?(u=typeof T=="function"?T:ao(+T),A):u},A.filter=function(T){return arguments.length?(n=typeof T=="function"?T:ao(!!T),A):n},A.touchable=function(T){return arguments.length?(o=typeof T=="function"?T:ao(!!T),A):o},A.extent=function(T){return arguments.length?(i=typeof T=="function"?T:ao([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),A):i},A.scaleExtent=function(T){return arguments.length?(s[0]=+T[0],s[1]=+T[1],A):[s[0],s[1]]},A.translateExtent=function(T){return arguments.length?(d[0][0]=+T[0][0],d[1][0]=+T[1][0],d[0][1]=+T[0][1],d[1][1]=+T[1][1],A):[[d[0][0],d[0][1]],[d[1][0],d[1][1]]]},A.constrain=function(T){return arguments.length?(r=T,A):r},A.duration=function(T){return arguments.length?(m=+T,A):m},A.interpolate=function(T){return arguments.length?(h=T,A):h},A.on=function(){var T=g.on.apply(g,arguments);return T===g?A:T},A.clickDistance=function(T){return arguments.length?(N=(T=+T)*T,A):Math.sqrt(N)},A.tapDistance=function(T){return arguments.length?(C=+T,A):C},A}const yn={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:i,sourceHandle:r,targetHandle:u})=>\`Couldn't create edge for \${n} handle id: "\${n==="source"?r:u}", edge id: \${i}.\`,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."},yr=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Jy=["Enter"," ","Escape"],Wy={"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:i,y:r})=>\`Moved selected node \${n}. New position, x: \${i}, y: \${r}\`,"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 nl;(function(n){n.Strict="strict",n.Loose="loose"})(nl||(nl={}));var ni;(function(n){n.Free="free",n.Vertical="vertical",n.Horizontal="horizontal"})(ni||(ni={}));var pr;(function(n){n.Partial="partial",n.Full="full"})(pr||(pr={}));const Iy={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Na;(function(n){n.Bezier="default",n.Straight="straight",n.Step="step",n.SmoothStep="smoothstep",n.SimpleBezier="simplebezier"})(Na||(Na={}));var Eo;(function(n){n.Arrow="arrow",n.ArrowClosed="arrowclosed"})(Eo||(Eo={}));var vt;(function(n){n.Left="left",n.Top="top",n.Right="right",n.Bottom="bottom"})(vt||(vt={}));const g0={[vt.Left]:vt.Right,[vt.Right]:vt.Left,[vt.Top]:vt.Bottom,[vt.Bottom]:vt.Top};function Fy(n){return n===null?null:n?"valid":"invalid"}const Py=n=>"id"in n&&"source"in n&&"target"in n,cS=n=>"id"in n&&"position"in n&&!("source"in n)&&!("target"in n),$f=n=>"id"in n&&"internals"in n&&!("source"in n)&&!("target"in n),Nr=(n,i=[0,0])=>{const{width:r,height:u}=Zn(n),o=n.origin??i,s=r*o[0],d=u*o[1];return{x:n.position.x-s,y:n.position.y-d}},sS=(n,i={nodeOrigin:[0,0]})=>{if(n.length===0)return{x:0,y:0,width:0,height:0};const r=n.reduce((u,o)=>{const s=typeof o=="string";let d=!i.nodeLookup&&!s?o:void 0;i.nodeLookup&&(d=s?i.nodeLookup.get(o):$f(o)?o:i.nodeLookup.get(o.id));const m=d?So(d,i.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Ho(u,m)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Ro(r)},Tr=(n,i={})=>{let r={x:1/0,y:1/0,x2:-1/0,y2:-1/0},u=!1;return n.forEach(o=>{(i.filter===void 0||i.filter(o))&&(r=Ho(r,So(o)),u=!0)}),u?Ro(r):{x:0,y:0,width:0,height:0}},Jf=(n,i,[r,u,o]=[0,0,1],s=!1,d=!1)=>{const m={...Or(i,[r,u,o]),width:i.width/o,height:i.height/o},h=[];for(const g of n.values()){const{measured:p,selectable:y=!0,hidden:v=!1}=g;if(d&&!y||v)continue;const x=p.width??g.width??g.initialWidth??null,w=p.height??g.height??g.initialHeight??null,N=vr(m,il(g)),C=(x??0)*(w??0),A=s&&N>0;(!g.internals.handleBounds||A||N>=C||g.dragging)&&h.push(g)}return h},fS=(n,i)=>{const r=new Set;return n.forEach(u=>{r.add(u.id)}),i.filter(u=>r.has(u.source)||r.has(u.target))};function dS(n,i){const r=new Map,u=i!=null&&i.nodes?new Set(i.nodes.map(o=>o.id)):null;return n.forEach(o=>{o.measured.width&&o.measured.height&&((i==null?void 0:i.includeHiddenNodes)||!o.hidden)&&(!u||u.has(o.id))&&r.set(o.id,o)}),r}async function hS({nodes:n,width:i,height:r,panZoom:u,minZoom:o,maxZoom:s},d){if(n.size===0)return Promise.resolve(!0);const m=dS(n,d),h=Tr(m),g=Wf(h,i,r,(d==null?void 0:d.minZoom)??o,(d==null?void 0:d.maxZoom)??s,(d==null?void 0:d.padding)??.1);return await u.setViewport(g,{duration:d==null?void 0:d.duration,ease:d==null?void 0:d.ease,interpolate:d==null?void 0:d.interpolate}),Promise.resolve(!0)}function tp({nodeId:n,nextPosition:i,nodeLookup:r,nodeOrigin:u=[0,0],nodeExtent:o,onError:s}){const d=r.get(n),m=d.parentId?r.get(d.parentId):void 0,{x:h,y:g}=m?m.internals.positionAbsolute:{x:0,y:0},p=d.origin??u;let y=d.extent||o;if(d.extent==="parent"&&!d.expandParent)if(!m)s==null||s("005",yn.error005());else{const x=m.measured.width,w=m.measured.height;x&&w&&(y=[[h,g],[h+x,g+w]])}else m&&ll(d.extent)&&(y=[[d.extent[0][0]+h,d.extent[0][1]+g],[d.extent[1][0]+h,d.extent[1][1]+g]]);const v=ll(y)?li(i,y,d.measured):i;return(d.measured.width===void 0||d.measured.height===void 0)&&(s==null||s("015",yn.error015())),{position:{x:v.x-h+(d.measured.width??0)*p[0],y:v.y-g+(d.measured.height??0)*p[1]},positionAbsolute:v}}async function gS({nodesToRemove:n=[],edgesToRemove:i=[],nodes:r,edges:u,onBeforeDelete:o}){const s=new Set(n.map(v=>v.id)),d=[];for(const v of r){if(v.deletable===!1)continue;const x=s.has(v.id),w=!x&&v.parentId&&d.find(N=>N.id===v.parentId);(x||w)&&d.push(v)}const m=new Set(i.map(v=>v.id)),h=u.filter(v=>v.deletable!==!1),p=fS(d,h);for(const v of h)m.has(v.id)&&!p.find(w=>w.id===v.id)&&p.push(v);if(!o)return{edges:p,nodes:d};const y=await o({nodes:d,edges:p});return typeof y=="boolean"?y?{edges:p,nodes:d}:{edges:[],nodes:[]}:y}const al=(n,i=0,r=1)=>Math.min(Math.max(n,i),r),li=(n={x:0,y:0},i,r)=>({x:al(n.x,i[0][0],i[1][0]-((r==null?void 0:r.width)??0)),y:al(n.y,i[0][1],i[1][1]-((r==null?void 0:r.height)??0))});function ep(n,i,r){const{width:u,height:o}=Zn(r),{x:s,y:d}=r.internals.positionAbsolute;return li(n,[[s,d],[s+u,d+o]],i)}const m0=(n,i,r)=>n<i?al(Math.abs(n-i),1,i)/i:n>r?-al(Math.abs(n-r),1,i)/i:0,np=(n,i,r=15,u=40)=>{const o=m0(n.x,u,i.width-u)*r,s=m0(n.y,u,i.height-u)*r;return[o,s]},Ho=(n,i)=>({x:Math.min(n.x,i.x),y:Math.min(n.y,i.y),x2:Math.max(n.x2,i.x2),y2:Math.max(n.y2,i.y2)}),jf=({x:n,y:i,width:r,height:u})=>({x:n,y:i,x2:n+r,y2:i+u}),Ro=({x:n,y:i,x2:r,y2:u})=>({x:n,y:i,width:r-n,height:u-i}),il=(n,i=[0,0])=>{var o,s;const{x:r,y:u}=$f(n)?n.internals.positionAbsolute:Nr(n,i);return{x:r,y:u,width:((o=n.measured)==null?void 0:o.width)??n.width??n.initialWidth??0,height:((s=n.measured)==null?void 0:s.height)??n.height??n.initialHeight??0}},So=(n,i=[0,0])=>{var o,s;const{x:r,y:u}=$f(n)?n.internals.positionAbsolute:Nr(n,i);return{x:r,y:u,x2:r+(((o=n.measured)==null?void 0:o.width)??n.width??n.initialWidth??0),y2:u+(((s=n.measured)==null?void 0:s.height)??n.height??n.initialHeight??0)}},ap=(n,i)=>Ro(Ho(jf(n),jf(i))),vr=(n,i)=>{const r=Math.max(0,Math.min(n.x+n.width,i.x+i.width)-Math.max(n.x,i.x)),u=Math.max(0,Math.min(n.y+n.height,i.y+i.height)-Math.max(n.y,i.y));return Math.ceil(r*u)},y0=n=>an(n.width)&&an(n.height)&&an(n.x)&&an(n.y),an=n=>!isNaN(n)&&isFinite(n),mS=(n,i)=>{},Ar=(n,i=[1,1])=>({x:i[0]*Math.round(n.x/i[0]),y:i[1]*Math.round(n.y/i[1])}),Or=({x:n,y:i},[r,u,o],s=!1,d=[1,1])=>{const m={x:(n-r)/o,y:(i-u)/o};return s?Ar(m,d):m},_o=({x:n,y:i},[r,u,o])=>({x:n*o+r,y:i*o+u});function $i(n,i){if(typeof n=="number")return Math.floor((i-i/(1+n))*.5);if(typeof n=="string"&&n.endsWith("px")){const r=parseFloat(n);if(!Number.isNaN(r))return Math.floor(r)}if(typeof n=="string"&&n.endsWith("%")){const r=parseFloat(n);if(!Number.isNaN(r))return Math.floor(i*r*.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 yS(n,i,r){if(typeof n=="string"||typeof n=="number"){const u=$i(n,r),o=$i(n,i);return{top:u,right:o,bottom:u,left:o,x:o*2,y:u*2}}if(typeof n=="object"){const u=$i(n.top??n.y??0,r),o=$i(n.bottom??n.y??0,r),s=$i(n.left??n.x??0,i),d=$i(n.right??n.x??0,i);return{top:u,right:d,bottom:o,left:s,x:s+d,y:u+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function pS(n,i,r,u,o,s){const{x:d,y:m}=_o(n,[i,r,u]),{x:h,y:g}=_o({x:n.x+n.width,y:n.y+n.height},[i,r,u]),p=o-h,y=s-g;return{left:Math.floor(d),top:Math.floor(m),right:Math.floor(p),bottom:Math.floor(y)}}const Wf=(n,i,r,u,o,s)=>{const d=yS(s,i,r),m=(i-d.x)/n.width,h=(r-d.y)/n.height,g=Math.min(m,h),p=al(g,u,o),y=n.x+n.width/2,v=n.y+n.height/2,x=i/2-y*p,w=r/2-v*p,N=pS(n,x,w,p,i,r),C={left:Math.min(N.left-d.left,0),top:Math.min(N.top-d.top,0),right:Math.min(N.right-d.right,0),bottom:Math.min(N.bottom-d.bottom,0)};return{x:x-C.left+C.right,y:w-C.top+C.bottom,zoom:p}},br=()=>{var n;return typeof navigator<"u"&&((n=navigator==null?void 0:navigator.userAgent)==null?void 0:n.indexOf("Mac"))>=0};function ll(n){return n!=null&&n!=="parent"}function Zn(n){var i,r;return{width:((i=n.measured)==null?void 0:i.width)??n.width??n.initialWidth??0,height:((r=n.measured)==null?void 0:r.height)??n.height??n.initialHeight??0}}function ip(n){var i,r;return(((i=n.measured)==null?void 0:i.width)??n.width??n.initialWidth)!==void 0&&(((r=n.measured)==null?void 0:r.height)??n.height??n.initialHeight)!==void 0}function lp(n,i={width:0,height:0},r,u,o){const s={...n},d=u.get(r);if(d){const m=d.origin||o;s.x+=d.internals.positionAbsolute.x-(i.width??0)*m[0],s.y+=d.internals.positionAbsolute.y-(i.height??0)*m[1]}return s}function p0(n,i){if(n.size!==i.size)return!1;for(const r of n)if(!i.has(r))return!1;return!0}function vS(){let n,i;return{promise:new Promise((u,o)=>{n=u,i=o}),resolve:n,reject:i}}function bS(n){return{...Wy,...n||{}}}function fr(n,{snapGrid:i=[0,0],snapToGrid:r=!1,transform:u,containerBounds:o}){const{x:s,y:d}=ln(n),m=Or({x:s-((o==null?void 0:o.left)??0),y:d-((o==null?void 0:o.top)??0)},u),{x:h,y:g}=r?Ar(m,i):m;return{xSnapped:h,ySnapped:g,...m}}const If=n=>({width:n.offsetWidth,height:n.offsetHeight}),rp=n=>{var i;return((i=n==null?void 0:n.getRootNode)==null?void 0:i.call(n))||(window==null?void 0:window.document)},xS=["INPUT","SELECT","TEXTAREA"];function up(n){var u,o;const i=((o=(u=n.composedPath)==null?void 0:u.call(n))==null?void 0:o[0])||n.target;return(i==null?void 0:i.nodeType)!==1?!1:xS.includes(i.nodeName)||i.hasAttribute("contenteditable")||!!i.closest(".nokey")}const op=n=>"clientX"in n,ln=(n,i)=>{var s,d;const r=op(n),u=r?n.clientX:(s=n.touches)==null?void 0:s[0].clientX,o=r?n.clientY:(d=n.touches)==null?void 0:d[0].clientY;return{x:u-((i==null?void 0:i.left)??0),y:o-((i==null?void 0:i.top)??0)}},v0=(n,i,r,u,o)=>{const s=i.querySelectorAll(\`.\${n}\`);return!s||!s.length?null:Array.from(s).map(d=>{const m=d.getBoundingClientRect();return{id:d.getAttribute("data-handleid"),type:n,nodeId:o,position:d.getAttribute("data-handlepos"),x:(m.left-r.left)/u,y:(m.top-r.top)/u,...If(d)}})};function cp({sourceX:n,sourceY:i,targetX:r,targetY:u,sourceControlX:o,sourceControlY:s,targetControlX:d,targetControlY:m}){const h=n*.125+o*.375+d*.375+r*.125,g=i*.125+s*.375+m*.375+u*.125,p=Math.abs(h-n),y=Math.abs(g-i);return[h,g,p,y]}function io(n,i){return n>=0?.5*n:i*25*Math.sqrt(-n)}function b0({pos:n,x1:i,y1:r,x2:u,y2:o,c:s}){switch(n){case vt.Left:return[i-io(i-u,s),r];case vt.Right:return[i+io(u-i,s),r];case vt.Top:return[i,r-io(r-o,s)];case vt.Bottom:return[i,r+io(o-r,s)]}}function sp({sourceX:n,sourceY:i,sourcePosition:r=vt.Bottom,targetX:u,targetY:o,targetPosition:s=vt.Top,curvature:d=.25}){const[m,h]=b0({pos:r,x1:n,y1:i,x2:u,y2:o,c:d}),[g,p]=b0({pos:s,x1:u,y1:o,x2:n,y2:i,c:d}),[y,v,x,w]=cp({sourceX:n,sourceY:i,targetX:u,targetY:o,sourceControlX:m,sourceControlY:h,targetControlX:g,targetControlY:p});return[\`M\${n},\${i} C\${m},\${h} \${g},\${p} \${u},\${o}\`,y,v,x,w]}function fp({sourceX:n,sourceY:i,targetX:r,targetY:u}){const o=Math.abs(r-n)/2,s=r<n?r+o:r-o,d=Math.abs(u-i)/2,m=u<i?u+d:u-d;return[s,m,o,d]}function wS({sourceNode:n,targetNode:i,selected:r=!1,zIndex:u=0,elevateOnSelect:o=!1,zIndexMode:s="basic"}){if(s==="manual")return u;const d=o&&r?u+1e3:u,m=Math.max(n.parentId||o&&n.selected?n.internals.z:0,i.parentId||o&&i.selected?i.internals.z:0);return d+m}function ES({sourceNode:n,targetNode:i,width:r,height:u,transform:o}){const s=Ho(So(n),So(i));s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);const d={x:-o[0]/o[2],y:-o[1]/o[2],width:r/o[2],height:u/o[2]};return vr(d,Ro(s))>0}const SS=({source:n,sourceHandle:i,target:r,targetHandle:u})=>\`xy-edge__\${n}\${i||""}-\${r}\${u||""}\`,_S=(n,i)=>i.some(r=>r.source===n.source&&r.target===n.target&&(r.sourceHandle===n.sourceHandle||!r.sourceHandle&&!n.sourceHandle)&&(r.targetHandle===n.targetHandle||!r.targetHandle&&!n.targetHandle)),MS=(n,i,r={})=>{if(!n.source||!n.target)return i;const u=r.getEdgeId||SS;let o;return Py(n)?o={...n}:o={...n,id:u(n)},_S(o,i)?i:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,i.concat(o))};function dp({sourceX:n,sourceY:i,targetX:r,targetY:u}){const[o,s,d,m]=fp({sourceX:n,sourceY:i,targetX:r,targetY:u});return[\`M \${n},\${i}L \${r},\${u}\`,o,s,d,m]}const x0={[vt.Left]:{x:-1,y:0},[vt.Right]:{x:1,y:0},[vt.Top]:{x:0,y:-1},[vt.Bottom]:{x:0,y:1}},NS=({source:n,sourcePosition:i=vt.Bottom,target:r})=>i===vt.Left||i===vt.Right?n.x<r.x?{x:1,y:0}:{x:-1,y:0}:n.y<r.y?{x:0,y:1}:{x:0,y:-1},w0=(n,i)=>Math.sqrt(Math.pow(i.x-n.x,2)+Math.pow(i.y-n.y,2));function TS({source:n,sourcePosition:i=vt.Bottom,target:r,targetPosition:u=vt.Top,center:o,offset:s,stepPosition:d}){const m=x0[i],h=x0[u],g={x:n.x+m.x*s,y:n.y+m.y*s},p={x:r.x+h.x*s,y:r.y+h.y*s},y=NS({source:g,sourcePosition:i,target:p}),v=y.x!==0?"x":"y",x=y[v];let w=[],N,C;const A={x:0,y:0},D={x:0,y:0},[,,E,_]=fp({sourceX:n.x,sourceY:n.y,targetX:r.x,targetY:r.y});if(m[v]*h[v]===-1){v==="x"?(N=o.x??g.x+(p.x-g.x)*d,C=o.y??(g.y+p.y)/2):(N=o.x??(g.x+p.x)/2,C=o.y??g.y+(p.y-g.y)*d);const Y=[{x:N,y:g.y},{x:N,y:p.y}],k=[{x:g.x,y:C},{x:p.x,y:C}];m[v]===x?w=v==="x"?Y:k:w=v==="x"?k:Y}else{const Y=[{x:g.x,y:p.y}],k=[{x:p.x,y:g.y}];if(v==="x"?w=m.x===x?k:Y:w=m.y===x?Y:k,i===u){const V=Math.abs(n[v]-r[v]);if(V<=s){const Q=Math.min(s-1,s-V);m[v]===x?A[v]=(g[v]>n[v]?-1:1)*Q:D[v]=(p[v]>r[v]?-1:1)*Q}}if(i!==u){const V=v==="x"?"y":"x",Q=m[v]===h[V],T=g[V]>p[V],G=g[V]<p[V];(m[v]===1&&(!Q&&T||Q&&G)||m[v]!==1&&(!Q&&G||Q&&T))&&(w=v==="x"?Y:k)}const K={x:g.x+A.x,y:g.y+A.y},et={x:p.x+D.x,y:p.y+D.y},Z=Math.max(Math.abs(K.x-w[0].x),Math.abs(et.x-w[0].x)),L=Math.max(Math.abs(K.y-w[0].y),Math.abs(et.y-w[0].y));Z>=L?(N=(K.x+et.x)/2,C=w[0].y):(N=w[0].x,C=(K.y+et.y)/2)}return[[n,{x:g.x+A.x,y:g.y+A.y},...w,{x:p.x+D.x,y:p.y+D.y},r],N,C,E,_]}function AS(n,i,r,u){const o=Math.min(w0(n,i)/2,w0(i,r)/2,u),{x:s,y:d}=i;if(n.x===s&&s===r.x||n.y===d&&d===r.y)return\`L\${s} \${d}\`;if(n.y===d){const g=n.x<r.x?-1:1,p=n.y<r.y?1:-1;return\`L \${s+o*g},\${d}Q \${s},\${d} \${s},\${d+o*p}\`}const m=n.x<r.x?1:-1,h=n.y<r.y?-1:1;return\`L \${s},\${d+o*h}Q \${s},\${d} \${s+o*m},\${d}\`}function Yf({sourceX:n,sourceY:i,sourcePosition:r=vt.Bottom,targetX:u,targetY:o,targetPosition:s=vt.Top,borderRadius:d=5,centerX:m,centerY:h,offset:g=20,stepPosition:p=.5}){const[y,v,x,w,N]=TS({source:{x:n,y:i},sourcePosition:r,target:{x:u,y:o},targetPosition:s,center:{x:m,y:h},offset:g,stepPosition:p});return[y.reduce((A,D,E)=>{let _="";return E>0&&E<y.length-1?_=AS(y[E-1],D,y[E+1],d):_=\`\${E===0?"M":"L"}\${D.x} \${D.y}\`,A+=_,A},""),v,x,w,N]}function E0(n){var i;return n&&!!(n.internals.handleBounds||(i=n.handles)!=null&&i.length)&&!!(n.measured.width||n.width||n.initialWidth)}function OS(n){var y;const{sourceNode:i,targetNode:r}=n;if(!E0(i)||!E0(r))return null;const u=i.internals.handleBounds||S0(i.handles),o=r.internals.handleBounds||S0(r.handles),s=_0((u==null?void 0:u.source)??[],n.sourceHandle),d=_0(n.connectionMode===nl.Strict?(o==null?void 0:o.target)??[]:((o==null?void 0:o.target)??[]).concat((o==null?void 0:o.source)??[]),n.targetHandle);if(!s||!d)return(y=n.onError)==null||y.call(n,"008",yn.error008(s?"target":"source",{id:n.id,sourceHandle:n.sourceHandle,targetHandle:n.targetHandle})),null;const m=(s==null?void 0:s.position)||vt.Bottom,h=(d==null?void 0:d.position)||vt.Top,g=ri(i,s,m),p=ri(r,d,h);return{sourceX:g.x,sourceY:g.y,targetX:p.x,targetY:p.y,sourcePosition:m,targetPosition:h}}function S0(n){if(!n)return null;const i=[],r=[];for(const u of n)u.width=u.width??1,u.height=u.height??1,u.type==="source"?i.push(u):u.type==="target"&&r.push(u);return{source:i,target:r}}function ri(n,i,r=vt.Left,u=!1){const o=((i==null?void 0:i.x)??0)+n.internals.positionAbsolute.x,s=((i==null?void 0:i.y)??0)+n.internals.positionAbsolute.y,{width:d,height:m}=i??Zn(n);if(u)return{x:o+d/2,y:s+m/2};switch((i==null?void 0:i.position)??r){case vt.Top:return{x:o+d/2,y:s};case vt.Right:return{x:o+d,y:s+m/2};case vt.Bottom:return{x:o+d/2,y:s+m};case vt.Left:return{x:o,y:s+m/2}}}function _0(n,i){return n&&(i?n.find(r=>r.id===i):n[0])||null}function Bf(n,i){return n?typeof n=="string"?n:\`\${i?\`\${i}__\`:""}\${Object.keys(n).sort().map(u=>\`\${u}=\${n[u]}\`).join("&")}\`:""}function CS(n,{id:i,defaultColor:r,defaultMarkerStart:u,defaultMarkerEnd:o}){const s=new Set;return n.reduce((d,m)=>([m.markerStart||u,m.markerEnd||o].forEach(h=>{if(h&&typeof h=="object"){const g=Bf(h,i);s.has(g)||(d.push({id:g,color:h.color||r,...h}),s.add(g))}}),d),[]).sort((d,m)=>d.id.localeCompare(m.id))}const hp=1e3,zS=10,Ff={nodeOrigin:[0,0],nodeExtent:yr,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},DS={...Ff,checkEquality:!0};function Pf(n,i){const r={...n};for(const u in i)i[u]!==void 0&&(r[u]=i[u]);return r}function HS(n,i,r){const u=Pf(Ff,r);for(const o of n.values())if(o.parentId)ed(o,n,i,u);else{const s=Nr(o,u.nodeOrigin),d=ll(o.extent)?o.extent:u.nodeExtent,m=li(s,d,Zn(o));o.internals.positionAbsolute=m}}function RS(n,i){if(!n.handles)return n.measured?i==null?void 0:i.internals.handleBounds:void 0;const r=[],u=[];for(const o of n.handles){const s={id:o.id,width:o.width??1,height:o.height??1,nodeId:n.id,x:o.x,y:o.y,position:o.position,type:o.type};o.type==="source"?r.push(s):o.type==="target"&&u.push(s)}return{source:r,target:u}}function td(n){return n==="manual"}function Uf(n,i,r,u={}){var g,p;const o=Pf(DS,u),s={i:0},d=new Map(i),m=o!=null&&o.elevateNodesOnSelect&&!td(o.zIndexMode)?hp:0;let h=n.length>0;i.clear(),r.clear();for(const y of n){let v=d.get(y.id);if(o.checkEquality&&y===(v==null?void 0:v.internals.userNode))i.set(y.id,v);else{const x=Nr(y,o.nodeOrigin),w=ll(y.extent)?y.extent:o.nodeExtent,N=li(x,w,Zn(y));v={...o.defaults,...y,measured:{width:(g=y.measured)==null?void 0:g.width,height:(p=y.measured)==null?void 0:p.height},internals:{positionAbsolute:N,handleBounds:RS(y,v),z:gp(y,m,o.zIndexMode),userNode:y}},i.set(y.id,v)}(v.measured===void 0||v.measured.width===void 0||v.measured.height===void 0)&&!v.hidden&&(h=!1),y.parentId&&ed(v,i,r,u,s)}return h}function jS(n,i){if(!n.parentId)return;const r=i.get(n.parentId);r?r.set(n.id,n):i.set(n.parentId,new Map([[n.id,n]]))}function ed(n,i,r,u,o){const{elevateNodesOnSelect:s,nodeOrigin:d,nodeExtent:m,zIndexMode:h}=Pf(Ff,u),g=n.parentId,p=i.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}jS(n,r),o&&!p.parentId&&p.internals.rootParentIndex===void 0&&h==="auto"&&(p.internals.rootParentIndex=++o.i,p.internals.z=p.internals.z+o.i*zS),o&&p.internals.rootParentIndex!==void 0&&(o.i=p.internals.rootParentIndex);const y=s&&!td(h)?hp:0,{x:v,y:x,z:w}=YS(n,p,d,m,y,h),{positionAbsolute:N}=n.internals,C=v!==N.x||x!==N.y;(C||w!==n.internals.z)&&i.set(n.id,{...n,internals:{...n.internals,positionAbsolute:C?{x:v,y:x}:N,z:w}})}function gp(n,i,r){const u=an(n.zIndex)?n.zIndex:0;return td(r)?u:u+(n.selected?i:0)}function YS(n,i,r,u,o,s){const{x:d,y:m}=i.internals.positionAbsolute,h=Zn(n),g=Nr(n,r),p=ll(n.extent)?li(g,n.extent,h):g;let y=li({x:d+p.x,y:m+p.y},u,h);n.extent==="parent"&&(y=ep(y,h,i));const v=gp(n,o,s),x=i.internals.z??0;return{x:y.x,y:y.y,z:x>=v?x+1:v}}function nd(n,i,r,u=[0,0]){var d;const o=[],s=new Map;for(const m of n){const h=i.get(m.parentId);if(!h)continue;const g=((d=s.get(m.parentId))==null?void 0:d.expandedRect)??il(h),p=ap(g,m.rect);s.set(m.parentId,{expandedRect:p,parent:h})}return s.size>0&&s.forEach(({expandedRect:m,parent:h},g)=>{var E;const p=h.internals.positionAbsolute,y=Zn(h),v=h.origin??u,x=m.x<p.x?Math.round(Math.abs(p.x-m.x)):0,w=m.y<p.y?Math.round(Math.abs(p.y-m.y)):0,N=Math.max(y.width,Math.round(m.width)),C=Math.max(y.height,Math.round(m.height)),A=(N-y.width)*v[0],D=(C-y.height)*v[1];(x>0||w>0||A||D)&&(o.push({id:g,type:"position",position:{x:h.position.x-x+A,y:h.position.y-w+D}}),(E=r.get(g))==null||E.forEach(_=>{n.some(q=>q.id===_.id)||o.push({id:_.id,type:"position",position:{x:_.position.x+x,y:_.position.y+w}})})),(y.width<m.width||y.height<m.height||x||w)&&o.push({id:g,type:"dimensions",setAttributes:!0,dimensions:{width:N+(x?v[0]*x-A:0),height:C+(w?v[1]*w-D:0)}})}),o}function BS(n,i,r,u,o,s,d){const m=u==null?void 0:u.querySelector(".xyflow__viewport");let h=!1;if(!m)return{changes:[],updatedInternals:h};const g=[],p=window.getComputedStyle(m),{m22:y}=new window.DOMMatrixReadOnly(p.transform),v=[];for(const x of n.values()){const w=i.get(x.id);if(!w)continue;if(w.hidden){i.set(w.id,{...w,internals:{...w.internals,handleBounds:void 0}}),h=!0;continue}const N=If(x.nodeElement),C=w.measured.width!==N.width||w.measured.height!==N.height;if(!!(N.width&&N.height&&(C||!w.internals.handleBounds||x.force))){const D=x.nodeElement.getBoundingClientRect(),E=ll(w.extent)?w.extent:s;let{positionAbsolute:_}=w.internals;w.parentId&&w.extent==="parent"?_=ep(_,N,i.get(w.parentId)):E&&(_=li(_,E,N));const q={...w,measured:N,internals:{...w.internals,positionAbsolute:_,handleBounds:{source:v0("source",x.nodeElement,D,y,w.id),target:v0("target",x.nodeElement,D,y,w.id)}}};i.set(w.id,q),w.parentId&&ed(q,i,r,{nodeOrigin:o,zIndexMode:d}),h=!0,C&&(g.push({id:w.id,type:"dimensions",dimensions:N}),w.expandParent&&w.parentId&&v.push({id:w.id,parentId:w.parentId,rect:il(q,o)}))}}if(v.length>0){const x=nd(v,i,r,o);g.push(...x)}return{changes:g,updatedInternals:h}}async function US({delta:n,panZoom:i,transform:r,translateExtent:u,width:o,height:s}){if(!i||!n.x&&!n.y)return Promise.resolve(!1);const d=await i.setViewportConstrained({x:r[0]+n.x,y:r[1]+n.y,zoom:r[2]},[[0,0],[o,s]],u),m=!!d&&(d.x!==r[0]||d.y!==r[1]||d.k!==r[2]);return Promise.resolve(m)}function M0(n,i,r,u,o,s){let d=o;const m=u.get(d)||new Map;u.set(d,m.set(r,i)),d=\`\${o}-\${n}\`;const h=u.get(d)||new Map;if(u.set(d,h.set(r,i)),s){d=\`\${o}-\${n}-\${s}\`;const g=u.get(d)||new Map;u.set(d,g.set(r,i))}}function mp(n,i,r){n.clear(),i.clear();for(const u of r){const{source:o,target:s,sourceHandle:d=null,targetHandle:m=null}=u,h={edgeId:u.id,source:o,target:s,sourceHandle:d,targetHandle:m},g=\`\${o}-\${d}--\${s}-\${m}\`,p=\`\${s}-\${m}--\${o}-\${d}\`;M0("source",h,p,n,o,d),M0("target",h,g,n,s,m),i.set(u.id,u)}}function yp(n,i){if(!n.parentId)return!1;const r=i.get(n.parentId);return r?r.selected?!0:yp(r,i):!1}function N0(n,i,r){var o;let u=n;do{if((o=u==null?void 0:u.matches)!=null&&o.call(u,i))return!0;if(u===r)return!1;u=u==null?void 0:u.parentElement}while(u);return!1}function LS(n,i,r,u){const o=new Map;for(const[s,d]of n)if((d.selected||d.id===u)&&(!d.parentId||!yp(d,n))&&(d.draggable||i&&typeof d.draggable>"u")){const m=n.get(s);m&&o.set(s,{id:s,position:m.position||{x:0,y:0},distance:{x:r.x-m.internals.positionAbsolute.x,y:r.y-m.internals.positionAbsolute.y},extent:m.extent,parentId:m.parentId,origin:m.origin,expandParent:m.expandParent,internals:{positionAbsolute:m.internals.positionAbsolute||{x:0,y:0}},measured:{width:m.measured.width??0,height:m.measured.height??0}})}return o}function mf({nodeId:n,dragItems:i,nodeLookup:r,dragging:u=!0}){var d,m,h;const o=[];for(const[g,p]of i){const y=(d=r.get(g))==null?void 0:d.internals.userNode;y&&o.push({...y,position:p.position,dragging:u})}if(!n)return[o[0],o];const s=(m=r.get(n))==null?void 0:m.internals.userNode;return[s?{...s,position:((h=i.get(n))==null?void 0:h.position)||s.position,dragging:u}:o[0],o]}function kS({dragItems:n,snapGrid:i,x:r,y:u}){const o=n.values().next().value;if(!o)return null;const s={x:r-o.distance.x,y:u-o.distance.y},d=Ar(s,i);return{x:d.x-s.x,y:d.y-s.y}}function qS({onNodeMouseDown:n,getStoreItems:i,onDragStart:r,onDrag:u,onDragStop:o}){let s={x:null,y:null},d=0,m=new Map,h=!1,g={x:0,y:0},p=null,y=!1,v=null,x=!1,w=!1,N=null;function C({noDragClassName:D,handleSelector:E,domNode:_,isSelectable:q,nodeId:Y,nodeClickDistance:k=0}){v=Ue(_);function K({x:V,y:Q}){const{nodeLookup:T,nodeExtent:G,snapGrid:S,snapToGrid:H,nodeOrigin:j,onNodeDrag:U,onSelectionDrag:J,onError:M,updateNodePositions:B}=i();s={x:V,y:Q};let F=!1;const R=m.size>1,z=R&&G?jf(Tr(m)):null,X=R&&H?kS({dragItems:m,snapGrid:S,x:V,y:Q}):null;for(const[$,I]of m){if(!T.has($))continue;let at={x:V-I.distance.x,y:Q-I.distance.y};H&&(at=X?{x:Math.round(at.x+X.x),y:Math.round(at.y+X.y)}:Ar(at,S));let dt=null;if(R&&G&&!I.extent&&z){const{positionAbsolute:pt}=I.internals,xt=pt.x-z.x+G[0][0],Et=pt.x+I.measured.width-z.x2+G[1][0],_t=pt.y-z.y+G[0][1],It=pt.y+I.measured.height-z.y2+G[1][1];dt=[[xt,_t],[Et,It]]}const{position:ht,positionAbsolute:gt}=tp({nodeId:$,nextPosition:at,nodeLookup:T,nodeExtent:dt||G,nodeOrigin:j,onError:M});F=F||I.position.x!==ht.x||I.position.y!==ht.y,I.position=ht,I.internals.positionAbsolute=gt}if(w=w||F,!!F&&(B(m,!0),N&&(u||U||!Y&&J))){const[$,I]=mf({nodeId:Y,dragItems:m,nodeLookup:T});u==null||u(N,m,$,I),U==null||U(N,$,I),Y||J==null||J(N,I)}}async function et(){if(!p)return;const{transform:V,panBy:Q,autoPanSpeed:T,autoPanOnNodeDrag:G}=i();if(!G){h=!1,cancelAnimationFrame(d);return}const[S,H]=np(g,p,T);(S!==0||H!==0)&&(s.x=(s.x??0)-S/V[2],s.y=(s.y??0)-H/V[2],await Q({x:S,y:H})&&K(s)),d=requestAnimationFrame(et)}function Z(V){var R;const{nodeLookup:Q,multiSelectionActive:T,nodesDraggable:G,transform:S,snapGrid:H,snapToGrid:j,selectNodesOnDrag:U,onNodeDragStart:J,onSelectionDragStart:M,unselectNodesAndEdges:B}=i();y=!0,(!U||!q)&&!T&&Y&&((R=Q.get(Y))!=null&&R.selected||B()),q&&U&&Y&&(n==null||n(Y));const F=fr(V.sourceEvent,{transform:S,snapGrid:H,snapToGrid:j,containerBounds:p});if(s=F,m=LS(Q,G,F,Y),m.size>0&&(r||J||!Y&&M)){const[z,X]=mf({nodeId:Y,dragItems:m,nodeLookup:Q});r==null||r(V.sourceEvent,m,z,X),J==null||J(V.sourceEvent,z,X),Y||M==null||M(V.sourceEvent,X)}}const L=Hy().clickDistance(k).on("start",V=>{const{domNode:Q,nodeDragThreshold:T,transform:G,snapGrid:S,snapToGrid:H}=i();p=(Q==null?void 0:Q.getBoundingClientRect())||null,x=!1,w=!1,N=V.sourceEvent,T===0&&Z(V),s=fr(V.sourceEvent,{transform:G,snapGrid:S,snapToGrid:H,containerBounds:p}),g=ln(V.sourceEvent,p)}).on("drag",V=>{const{autoPanOnNodeDrag:Q,transform:T,snapGrid:G,snapToGrid:S,nodeDragThreshold:H,nodeLookup:j}=i(),U=fr(V.sourceEvent,{transform:T,snapGrid:G,snapToGrid:S,containerBounds:p});if(N=V.sourceEvent,(V.sourceEvent.type==="touchmove"&&V.sourceEvent.touches.length>1||Y&&!j.has(Y))&&(x=!0),!x){if(!h&&Q&&y&&(h=!0,et()),!y){const J=ln(V.sourceEvent,p),M=J.x-g.x,B=J.y-g.y;Math.sqrt(M*M+B*B)>H&&Z(V)}(s.x!==U.xSnapped||s.y!==U.ySnapped)&&m&&y&&(g=ln(V.sourceEvent,p),K(U))}}).on("end",V=>{if(!(!y||x)&&(h=!1,y=!1,cancelAnimationFrame(d),m.size>0)){const{nodeLookup:Q,updateNodePositions:T,onNodeDragStop:G,onSelectionDragStop:S}=i();if(w&&(T(m,!1),w=!1),o||G||!Y&&S){const[H,j]=mf({nodeId:Y,dragItems:m,nodeLookup:Q,dragging:!1});o==null||o(V.sourceEvent,m,H,j),G==null||G(V.sourceEvent,H,j),Y||S==null||S(V.sourceEvent,j)}}}).filter(V=>{const Q=V.target;return!V.button&&(!D||!N0(Q,\`.\${D}\`,_))&&(!E||N0(Q,E,_))});v.call(L)}function A(){v==null||v.on(".drag",null)}return{update:C,destroy:A}}function VS(n,i,r){const u=[],o={x:n.x-r,y:n.y-r,width:r*2,height:r*2};for(const s of i.values())vr(o,il(s))>0&&u.push(s);return u}const XS=250;function GS(n,i,r,u){var m,h;let o=[],s=1/0;const d=VS(n,r,i+XS);for(const g of d){const p=[...((m=g.internals.handleBounds)==null?void 0:m.source)??[],...((h=g.internals.handleBounds)==null?void 0:h.target)??[]];for(const y of p){if(u.nodeId===y.nodeId&&u.type===y.type&&u.id===y.id)continue;const{x:v,y:x}=ri(g,y,y.position,!0),w=Math.sqrt(Math.pow(v-n.x,2)+Math.pow(x-n.y,2));w>i||(w<s?(o=[{...y,x:v,y:x}],s=w):w===s&&o.push({...y,x:v,y:x}))}}if(!o.length)return null;if(o.length>1){const g=u.type==="source"?"target":"source";return o.find(p=>p.type===g)??o[0]}return o[0]}function pp(n,i,r,u,o,s=!1){var g,p,y;const d=u.get(n);if(!d)return null;const m=o==="strict"?(g=d.internals.handleBounds)==null?void 0:g[i]:[...((p=d.internals.handleBounds)==null?void 0:p.source)??[],...((y=d.internals.handleBounds)==null?void 0:y.target)??[]],h=(r?m==null?void 0:m.find(v=>v.id===r):m==null?void 0:m[0])??null;return h&&s?{...h,...ri(d,h,h.position,!0)}:h}function vp(n,i){return n||(i!=null&&i.classList.contains("target")?"target":i!=null&&i.classList.contains("source")?"source":null)}function QS(n,i){let r=null;return i?r=!0:n&&!i&&(r=!1),r}const bp=()=>!0;function ZS(n,{connectionMode:i,connectionRadius:r,handleId:u,nodeId:o,edgeUpdaterType:s,isTarget:d,domNode:m,nodeLookup:h,lib:g,autoPanOnConnect:p,flowId:y,panBy:v,cancelConnection:x,onConnectStart:w,onConnect:N,onConnectEnd:C,isValidConnection:A=bp,onReconnectEnd:D,updateConnection:E,getTransform:_,getFromHandle:q,autoPanSpeed:Y,dragThreshold:k=1,handleDomNode:K}){const et=rp(n.target);let Z=0,L;const{x:V,y:Q}=ln(n),T=vp(s,K),G=m==null?void 0:m.getBoundingClientRect();let S=!1;if(!G||!T)return;const H=pp(o,T,u,h,i);if(!H)return;let j=ln(n,G),U=!1,J=null,M=!1,B=null;function F(){if(!p||!G)return;const[ht,gt]=np(j,G,Y);v({x:ht,y:gt}),Z=requestAnimationFrame(F)}const R={...H,nodeId:o,type:T,position:H.position},z=h.get(o);let $={inProgress:!0,isValid:null,from:ri(z,R,vt.Left,!0),fromHandle:R,fromPosition:R.position,fromNode:z,to:j,toHandle:null,toPosition:g0[R.position],toNode:null,pointer:j};function I(){S=!0,E($),w==null||w(n,{nodeId:o,handleId:u,handleType:T})}k===0&&I();function at(ht){if(!S){const{x:It,y:xe}=ln(ht),Ce=It-V,We=xe-Q;if(!(Ce*Ce+We*We>k*k))return;I()}if(!q()||!R){dt(ht);return}const gt=_();j=ln(ht,G),L=GS(Or(j,gt,!1,[1,1]),r,h,R),U||(F(),U=!0);const pt=xp(ht,{handle:L,connectionMode:i,fromNodeId:o,fromHandleId:u,fromType:d?"target":"source",isValidConnection:A,doc:et,lib:g,flowId:y,nodeLookup:h});B=pt.handleDomNode,J=pt.connection,M=QS(!!L,pt.isValid);const xt=h.get(o),Et=xt?ri(xt,R,vt.Left,!0):$.from,_t={...$,from:Et,isValid:M,to:pt.toHandle&&M?_o({x:pt.toHandle.x,y:pt.toHandle.y},gt):j,toHandle:pt.toHandle,toPosition:M&&pt.toHandle?pt.toHandle.position:g0[R.position],toNode:pt.toHandle?h.get(pt.toHandle.nodeId):null,pointer:j};E(_t),$=_t}function dt(ht){if(!("touches"in ht&&ht.touches.length>0)){if(S){(L||B)&&J&&M&&(N==null||N(J));const{inProgress:gt,...pt}=$,xt={...pt,toPosition:$.toHandle?$.toPosition:null};C==null||C(ht,xt),s&&(D==null||D(ht,xt))}x(),cancelAnimationFrame(Z),U=!1,M=!1,J=null,B=null,et.removeEventListener("mousemove",at),et.removeEventListener("mouseup",dt),et.removeEventListener("touchmove",at),et.removeEventListener("touchend",dt)}}et.addEventListener("mousemove",at),et.addEventListener("mouseup",dt),et.addEventListener("touchmove",at),et.addEventListener("touchend",dt)}function xp(n,{handle:i,connectionMode:r,fromNodeId:u,fromHandleId:o,fromType:s,doc:d,lib:m,flowId:h,isValidConnection:g=bp,nodeLookup:p}){const y=s==="target",v=i?d.querySelector(\`.\${m}-flow__handle[data-id="\${h}-\${i==null?void 0:i.nodeId}-\${i==null?void 0:i.id}-\${i==null?void 0:i.type}"]\`):null,{x,y:w}=ln(n),N=d.elementFromPoint(x,w),C=N!=null&&N.classList.contains(\`\${m}-flow__handle\`)?N:v,A={handleDomNode:C,isValid:!1,connection:null,toHandle:null};if(C){const D=vp(void 0,C),E=C.getAttribute("data-nodeid"),_=C.getAttribute("data-handleid"),q=C.classList.contains("connectable"),Y=C.classList.contains("connectableend");if(!E||!D)return A;const k={source:y?E:u,sourceHandle:y?_:o,target:y?u:E,targetHandle:y?o:_};A.connection=k;const et=q&&Y&&(r===nl.Strict?y&&D==="source"||!y&&D==="target":E!==u||_!==o);A.isValid=et&&g(k),A.toHandle=pp(E,D,_,p,r,!0)}return A}const Lf={onPointerDown:ZS,isValid:xp};function KS({domNode:n,panZoom:i,getTransform:r,getViewScale:u}){const o=Ue(n);function s({translateExtent:m,width:h,height:g,zoomStep:p=1,pannable:y=!0,zoomable:v=!0,inversePan:x=!1}){const w=E=>{if(E.sourceEvent.type!=="wheel"||!i)return;const _=r(),q=E.sourceEvent.ctrlKey&&br()?10:1,Y=-E.sourceEvent.deltaY*(E.sourceEvent.deltaMode===1?.05:E.sourceEvent.deltaMode?1:.002)*p,k=_[2]*Math.pow(2,Y*q);i.scaleTo(k)};let N=[0,0];const C=E=>{(E.sourceEvent.type==="mousedown"||E.sourceEvent.type==="touchstart")&&(N=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY])},A=E=>{const _=r();if(E.sourceEvent.type!=="mousemove"&&E.sourceEvent.type!=="touchmove"||!i)return;const q=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY],Y=[q[0]-N[0],q[1]-N[1]];N=q;const k=u()*Math.max(_[2],Math.log(_[2]))*(x?-1:1),K={x:_[0]-Y[0]*k,y:_[1]-Y[1]*k},et=[[0,0],[h,g]];i.setViewportConstrained({x:K.x,y:K.y,zoom:_[2]},et,m)},D=$y().on("start",C).on("zoom",y?A:null).on("zoom.wheel",v?w:null);o.call(D,{})}function d(){o.on("zoom",null)}return{update:s,destroy:d,pointer:en}}const jo=n=>({x:n.x,y:n.y,zoom:n.k}),yf=({x:n,y:i,zoom:r})=>Do.translate(n,i).scale(r),Wi=(n,i)=>n.target.closest(\`.\${i}\`),wp=(n,i)=>i===2&&Array.isArray(n)&&n.includes(2),$S=n=>((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2,pf=(n,i=0,r=$S,u=()=>{})=>{const o=typeof i=="number"&&i>0;return o||u(),o?n.transition().duration(i).ease(r).on("end",u):n},Ep=n=>{const i=n.ctrlKey&&br()?10:1;return-n.deltaY*(n.deltaMode===1?.05:n.deltaMode?1:.002)*i};function JS({zoomPanValues:n,noWheelClassName:i,d3Selection:r,d3Zoom:u,panOnScrollMode:o,panOnScrollSpeed:s,zoomOnPinch:d,onPanZoomStart:m,onPanZoom:h,onPanZoomEnd:g}){return p=>{if(Wi(p,i))return p.ctrlKey&&p.preventDefault(),!1;p.preventDefault(),p.stopImmediatePropagation();const y=r.property("__zoom").k||1;if(p.ctrlKey&&d){const C=en(p),A=Ep(p),D=y*Math.pow(2,A);u.scaleTo(r,D,C,p);return}const v=p.deltaMode===1?20:1;let x=o===ni.Vertical?0:p.deltaX*v,w=o===ni.Horizontal?0:p.deltaY*v;!br()&&p.shiftKey&&o!==ni.Vertical&&(x=p.deltaY*v,w=0),u.translateBy(r,-(x/y)*s,-(w/y)*s,{internal:!0});const N=jo(r.property("__zoom"));clearTimeout(n.panScrollTimeout),n.isPanScrolling?(h==null||h(p,N),n.panScrollTimeout=setTimeout(()=>{g==null||g(p,N),n.isPanScrolling=!1},150)):(n.isPanScrolling=!0,m==null||m(p,N))}}function WS({noWheelClassName:n,preventScrolling:i,d3ZoomHandler:r}){return function(u,o){const s=u.type==="wheel",d=!i&&s&&!u.ctrlKey,m=Wi(u,n);if(u.ctrlKey&&s&&m&&u.preventDefault(),d||m)return null;u.preventDefault(),r.call(this,u,o)}}function IS({zoomPanValues:n,onDraggingChange:i,onPanZoomStart:r}){return u=>{var s,d,m;if((s=u.sourceEvent)!=null&&s.internal)return;const o=jo(u.transform);n.mouseButton=((d=u.sourceEvent)==null?void 0:d.button)||0,n.isZoomingOrPanning=!0,n.prevViewport=o,((m=u.sourceEvent)==null?void 0:m.type)==="mousedown"&&i(!0),r&&(r==null||r(u.sourceEvent,o))}}function FS({zoomPanValues:n,panOnDrag:i,onPaneContextMenu:r,onTransformChange:u,onPanZoom:o}){return s=>{var d,m;n.usedRightMouseButton=!!(r&&wp(i,n.mouseButton??0)),(d=s.sourceEvent)!=null&&d.sync||u([s.transform.x,s.transform.y,s.transform.k]),o&&!((m=s.sourceEvent)!=null&&m.internal)&&(o==null||o(s.sourceEvent,jo(s.transform)))}}function PS({zoomPanValues:n,panOnDrag:i,panOnScroll:r,onDraggingChange:u,onPanZoomEnd:o,onPaneContextMenu:s}){return d=>{var m;if(!((m=d.sourceEvent)!=null&&m.internal)&&(n.isZoomingOrPanning=!1,s&&wp(i,n.mouseButton??0)&&!n.usedRightMouseButton&&d.sourceEvent&&s(d.sourceEvent),n.usedRightMouseButton=!1,u(!1),o)){const h=jo(d.transform);n.prevViewport=h,clearTimeout(n.timerId),n.timerId=setTimeout(()=>{o==null||o(d.sourceEvent,h)},r?150:0)}}}function t_({zoomActivationKeyPressed:n,zoomOnScroll:i,zoomOnPinch:r,panOnDrag:u,panOnScroll:o,zoomOnDoubleClick:s,userSelectionActive:d,noWheelClassName:m,noPanClassName:h,lib:g,connectionInProgress:p}){return y=>{var C;const v=n||i,x=r&&y.ctrlKey,w=y.type==="wheel";if(y.button===1&&y.type==="mousedown"&&(Wi(y,\`\${g}-flow__node\`)||Wi(y,\`\${g}-flow__edge\`)))return!0;if(!u&&!v&&!o&&!s&&!r||d||p&&!w||Wi(y,m)&&w||Wi(y,h)&&(!w||o&&w&&!n)||!r&&y.ctrlKey&&w)return!1;if(!r&&y.type==="touchstart"&&((C=y.touches)==null?void 0:C.length)>1)return y.preventDefault(),!1;if(!v&&!o&&!x&&w||!u&&(y.type==="mousedown"||y.type==="touchstart")||Array.isArray(u)&&!u.includes(y.button)&&y.type==="mousedown")return!1;const N=Array.isArray(u)&&u.includes(y.button)||!y.button||y.button<=1;return(!y.ctrlKey||w)&&N}}function e_({domNode:n,minZoom:i,maxZoom:r,translateExtent:u,viewport:o,onPanZoom:s,onPanZoomStart:d,onPanZoomEnd:m,onDraggingChange:h}){const g={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},p=n.getBoundingClientRect(),y=$y().scaleExtent([i,r]).translateExtent(u),v=Ue(n).call(y);D({x:o.x,y:o.y,zoom:al(o.zoom,i,r)},[[0,0],[p.width,p.height]],u);const x=v.on("wheel.zoom"),w=v.on("dblclick.zoom");y.wheelDelta(Ep);function N(L,V){return v?new Promise(Q=>{y==null||y.interpolate((V==null?void 0:V.interpolate)==="linear"?sr:so).transform(pf(v,V==null?void 0:V.duration,V==null?void 0:V.ease,()=>Q(!0)),L)}):Promise.resolve(!1)}function C({noWheelClassName:L,noPanClassName:V,onPaneContextMenu:Q,userSelectionActive:T,panOnScroll:G,panOnDrag:S,panOnScrollMode:H,panOnScrollSpeed:j,preventScrolling:U,zoomOnPinch:J,zoomOnScroll:M,zoomOnDoubleClick:B,zoomActivationKeyPressed:F,lib:R,onTransformChange:z,connectionInProgress:X,paneClickDistance:$,selectionOnDrag:I}){T&&!g.isZoomingOrPanning&&A();const at=G&&!F&&!T;y.clickDistance(I?1/0:!an($)||$<0?0:$);const dt=at?JS({zoomPanValues:g,noWheelClassName:L,d3Selection:v,d3Zoom:y,panOnScrollMode:H,panOnScrollSpeed:j,zoomOnPinch:J,onPanZoomStart:d,onPanZoom:s,onPanZoomEnd:m}):WS({noWheelClassName:L,preventScrolling:U,d3ZoomHandler:x});if(v.on("wheel.zoom",dt,{passive:!1}),!T){const gt=IS({zoomPanValues:g,onDraggingChange:h,onPanZoomStart:d});y.on("start",gt);const pt=FS({zoomPanValues:g,panOnDrag:S,onPaneContextMenu:!!Q,onPanZoom:s,onTransformChange:z});y.on("zoom",pt);const xt=PS({zoomPanValues:g,panOnDrag:S,panOnScroll:G,onPaneContextMenu:Q,onPanZoomEnd:m,onDraggingChange:h});y.on("end",xt)}const ht=t_({zoomActivationKeyPressed:F,panOnDrag:S,zoomOnScroll:M,panOnScroll:G,zoomOnDoubleClick:B,zoomOnPinch:J,userSelectionActive:T,noPanClassName:V,noWheelClassName:L,lib:R,connectionInProgress:X});y.filter(ht),B?v.on("dblclick.zoom",w):v.on("dblclick.zoom",null)}function A(){y.on("zoom",null)}async function D(L,V,Q){const T=yf(L),G=y==null?void 0:y.constrain()(T,V,Q);return G&&await N(G),new Promise(S=>S(G))}async function E(L,V){const Q=yf(L);return await N(Q,V),new Promise(T=>T(Q))}function _(L){if(v){const V=yf(L),Q=v.property("__zoom");(Q.k!==L.zoom||Q.x!==L.x||Q.y!==L.y)&&(y==null||y.transform(v,V,null,{sync:!0}))}}function q(){const L=v?Ky(v.node()):{x:0,y:0,k:1};return{x:L.x,y:L.y,zoom:L.k}}function Y(L,V){return v?new Promise(Q=>{y==null||y.interpolate((V==null?void 0:V.interpolate)==="linear"?sr:so).scaleTo(pf(v,V==null?void 0:V.duration,V==null?void 0:V.ease,()=>Q(!0)),L)}):Promise.resolve(!1)}function k(L,V){return v?new Promise(Q=>{y==null||y.interpolate((V==null?void 0:V.interpolate)==="linear"?sr:so).scaleBy(pf(v,V==null?void 0:V.duration,V==null?void 0:V.ease,()=>Q(!0)),L)}):Promise.resolve(!1)}function K(L){y==null||y.scaleExtent(L)}function et(L){y==null||y.translateExtent(L)}function Z(L){const V=!an(L)||L<0?0:L;y==null||y.clickDistance(V)}return{update:C,destroy:A,setViewport:E,setViewportConstrained:D,getViewport:q,scaleTo:Y,scaleBy:k,setScaleExtent:K,setTranslateExtent:et,syncViewport:_,setClickDistance:Z}}var rl;(function(n){n.Line="line",n.Handle="handle"})(rl||(rl={}));function n_({width:n,prevWidth:i,height:r,prevHeight:u,affectsX:o,affectsY:s}){const d=n-i,m=r-u,h=[d>0?1:d<0?-1:0,m>0?1:m<0?-1:0];return d&&o&&(h[0]=h[0]*-1),m&&s&&(h[1]=h[1]*-1),h}function T0(n){const i=n.includes("right")||n.includes("left"),r=n.includes("bottom")||n.includes("top"),u=n.includes("left"),o=n.includes("top");return{isHorizontal:i,isVertical:r,affectsX:u,affectsY:o}}function Sa(n,i){return Math.max(0,i-n)}function _a(n,i){return Math.max(0,n-i)}function lo(n,i,r){return Math.max(0,i-n,n-r)}function A0(n,i){return n?!i:i}function a_(n,i,r,u,o,s,d,m){let{affectsX:h,affectsY:g}=i;const{isHorizontal:p,isVertical:y}=i,v=p&&y,{xSnapped:x,ySnapped:w}=r,{minWidth:N,maxWidth:C,minHeight:A,maxHeight:D}=u,{x:E,y:_,width:q,height:Y,aspectRatio:k}=n;let K=Math.floor(p?x-n.pointerX:0),et=Math.floor(y?w-n.pointerY:0);const Z=q+(h?-K:K),L=Y+(g?-et:et),V=-s[0]*q,Q=-s[1]*Y;let T=lo(Z,N,C),G=lo(L,A,D);if(d){let j=0,U=0;h&&K<0?j=Sa(E+K+V,d[0][0]):!h&&K>0&&(j=_a(E+Z+V,d[1][0])),g&&et<0?U=Sa(_+et+Q,d[0][1]):!g&&et>0&&(U=_a(_+L+Q,d[1][1])),T=Math.max(T,j),G=Math.max(G,U)}if(m){let j=0,U=0;h&&K>0?j=_a(E+K,m[0][0]):!h&&K<0&&(j=Sa(E+Z,m[1][0])),g&&et>0?U=_a(_+et,m[0][1]):!g&&et<0&&(U=Sa(_+L,m[1][1])),T=Math.max(T,j),G=Math.max(G,U)}if(o){if(p){const j=lo(Z/k,A,D)*k;if(T=Math.max(T,j),d){let U=0;!h&&!g||h&&!g&&v?U=_a(_+Q+Z/k,d[1][1])*k:U=Sa(_+Q+(h?K:-K)/k,d[0][1])*k,T=Math.max(T,U)}if(m){let U=0;!h&&!g||h&&!g&&v?U=Sa(_+Z/k,m[1][1])*k:U=_a(_+(h?K:-K)/k,m[0][1])*k,T=Math.max(T,U)}}if(y){const j=lo(L*k,N,C)/k;if(G=Math.max(G,j),d){let U=0;!h&&!g||g&&!h&&v?U=_a(E+L*k+V,d[1][0])/k:U=Sa(E+(g?et:-et)*k+V,d[0][0])/k,G=Math.max(G,U)}if(m){let U=0;!h&&!g||g&&!h&&v?U=Sa(E+L*k,m[1][0])/k:U=_a(E+(g?et:-et)*k,m[0][0])/k,G=Math.max(G,U)}}}et=et+(et<0?G:-G),K=K+(K<0?T:-T),o&&(v?Z>L*k?et=(A0(h,g)?-K:K)/k:K=(A0(h,g)?-et:et)*k:p?(et=K/k,g=h):(K=et*k,h=g));const S=h?E+K:E,H=g?_+et:_;return{width:q+(h?-K:K),height:Y+(g?-et:et),x:s[0]*K*(h?-1:1)+S,y:s[1]*et*(g?-1:1)+H}}const Sp={width:0,height:0,x:0,y:0},i_={...Sp,pointerX:0,pointerY:0,aspectRatio:1};function l_(n){return[[0,0],[n.measured.width,n.measured.height]]}function r_(n,i,r){const u=i.position.x+n.position.x,o=i.position.y+n.position.y,s=n.measured.width??0,d=n.measured.height??0,m=r[0]*s,h=r[1]*d;return[[u-m,o-h],[u+s-m,o+d-h]]}function u_({domNode:n,nodeId:i,getStoreItems:r,onChange:u,onEnd:o}){const s=Ue(n);let d={controlDirection:T0("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function m({controlPosition:g,boundaries:p,keepAspectRatio:y,resizeDirection:v,onResizeStart:x,onResize:w,onResizeEnd:N,shouldResize:C}){let A={...Sp},D={...i_};d={boundaries:p,resizeDirection:v,keepAspectRatio:y,controlDirection:T0(g)};let E,_=null,q=[],Y,k,K,et=!1;const Z=Hy().on("start",L=>{const{nodeLookup:V,transform:Q,snapGrid:T,snapToGrid:G,nodeOrigin:S,paneDomNode:H}=r();if(E=V.get(i),!E)return;_=(H==null?void 0:H.getBoundingClientRect())??null;const{xSnapped:j,ySnapped:U}=fr(L.sourceEvent,{transform:Q,snapGrid:T,snapToGrid:G,containerBounds:_});A={width:E.measured.width??0,height:E.measured.height??0,x:E.position.x??0,y:E.position.y??0},D={...A,pointerX:j,pointerY:U,aspectRatio:A.width/A.height},Y=void 0,E.parentId&&(E.extent==="parent"||E.expandParent)&&(Y=V.get(E.parentId),k=Y&&E.extent==="parent"?l_(Y):void 0),q=[],K=void 0;for(const[J,M]of V)if(M.parentId===i&&(q.push({id:J,position:{...M.position},extent:M.extent}),M.extent==="parent"||M.expandParent)){const B=r_(M,E,M.origin??S);K?K=[[Math.min(B[0][0],K[0][0]),Math.min(B[0][1],K[0][1])],[Math.max(B[1][0],K[1][0]),Math.max(B[1][1],K[1][1])]]:K=B}x==null||x(L,{...A})}).on("drag",L=>{const{transform:V,snapGrid:Q,snapToGrid:T,nodeOrigin:G}=r(),S=fr(L.sourceEvent,{transform:V,snapGrid:Q,snapToGrid:T,containerBounds:_}),H=[];if(!E)return;const{x:j,y:U,width:J,height:M}=A,B={},F=E.origin??G,{width:R,height:z,x:X,y:$}=a_(D,d.controlDirection,S,d.boundaries,d.keepAspectRatio,F,k,K),I=R!==J,at=z!==M,dt=X!==j&&I,ht=$!==U&&at;if(!dt&&!ht&&!I&&!at)return;if((dt||ht||F[0]===1||F[1]===1)&&(B.x=dt?X:A.x,B.y=ht?$:A.y,A.x=B.x,A.y=B.y,q.length>0)){const Et=X-j,_t=$-U;for(const It of q)It.position={x:It.position.x-Et+F[0]*(R-J),y:It.position.y-_t+F[1]*(z-M)},H.push(It)}if((I||at)&&(B.width=I&&(!d.resizeDirection||d.resizeDirection==="horizontal")?R:A.width,B.height=at&&(!d.resizeDirection||d.resizeDirection==="vertical")?z:A.height,A.width=B.width,A.height=B.height),Y&&E.expandParent){const Et=F[0]*(B.width??0);B.x&&B.x<Et&&(A.x=Et,D.x=D.x-(B.x-Et));const _t=F[1]*(B.height??0);B.y&&B.y<_t&&(A.y=_t,D.y=D.y-(B.y-_t))}const gt=n_({width:A.width,prevWidth:J,height:A.height,prevHeight:M,affectsX:d.controlDirection.affectsX,affectsY:d.controlDirection.affectsY}),pt={...A,direction:gt};(C==null?void 0:C(L,pt))!==!1&&(et=!0,w==null||w(L,pt),u(B,H))}).on("end",L=>{et&&(N==null||N(L,{...A}),o==null||o({...A}),et=!1)});s.call(Z)}function h(){s.on(".drag",null)}return{update:m,destroy:h}}var vf={exports:{}},bf={},xf={exports:{}},wf={};/**
|
|
57
|
+
* @license React
|
|
58
|
+
* use-sync-external-store-shim.production.js
|
|
59
|
+
*
|
|
60
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the MIT license found in the
|
|
63
|
+
* LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/var O0;function o_(){if(O0)return wf;O0=1;var n=Sr();function i(y,v){return y===v&&(y!==0||1/y===1/v)||y!==y&&v!==v}var r=typeof Object.is=="function"?Object.is:i,u=n.useState,o=n.useEffect,s=n.useLayoutEffect,d=n.useDebugValue;function m(y,v){var x=v(),w=u({inst:{value:x,getSnapshot:v}}),N=w[0].inst,C=w[1];return s(function(){N.value=x,N.getSnapshot=v,h(N)&&C({inst:N})},[y,x,v]),o(function(){return h(N)&&C({inst:N}),y(function(){h(N)&&C({inst:N})})},[y]),d(x),x}function h(y){var v=y.getSnapshot;y=y.value;try{var x=v();return!r(y,x)}catch{return!0}}function g(y,v){return v()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:m;return wf.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:p,wf}var C0;function c_(){return C0||(C0=1,xf.exports=o_()),xf.exports}/**
|
|
65
|
+
* @license React
|
|
66
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
67
|
+
*
|
|
68
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
69
|
+
*
|
|
70
|
+
* This source code is licensed under the MIT license found in the
|
|
71
|
+
* LICENSE file in the root directory of this source tree.
|
|
72
|
+
*/var z0;function s_(){if(z0)return bf;z0=1;var n=Sr(),i=c_();function r(g,p){return g===p&&(g!==0||1/g===1/p)||g!==g&&p!==p}var u=typeof Object.is=="function"?Object.is:r,o=i.useSyncExternalStore,s=n.useRef,d=n.useEffect,m=n.useMemo,h=n.useDebugValue;return bf.useSyncExternalStoreWithSelector=function(g,p,y,v,x){var w=s(null);if(w.current===null){var N={hasValue:!1,value:null};w.current=N}else N=w.current;w=m(function(){function A(Y){if(!D){if(D=!0,E=Y,Y=v(Y),x!==void 0&&N.hasValue){var k=N.value;if(x(k,Y))return _=k}return _=Y}if(k=_,u(E,Y))return k;var K=v(Y);return x!==void 0&&x(k,K)?(E=Y,k):(E=Y,_=K)}var D=!1,E,_,q=y===void 0?null:y;return[function(){return A(p())},q===null?void 0:function(){return A(q())}]},[p,y,v,x]);var C=o(g,w[0],w[1]);return d(function(){N.hasValue=!0,N.value=C},[C]),h(C),C},bf}var D0;function f_(){return D0||(D0=1,vf.exports=s_()),vf.exports}var d_=f_();const h_=py(d_),g_={},H0=n=>{let i;const r=new Set,u=(p,y)=>{const v=typeof p=="function"?p(i):p;if(!Object.is(v,i)){const x=i;i=y??(typeof v!="object"||v===null)?v:Object.assign({},i,v),r.forEach(w=>w(i,x))}},o=()=>i,h={setState:u,getState:o,getInitialState:()=>g,subscribe:p=>(r.add(p),()=>r.delete(p)),destroy:()=>{(g_?"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."),r.clear()}},g=i=n(u,o,h);return h},m_=n=>n?H0(n):H0,{useDebugValue:y_}=Sb,{useSyncExternalStoreWithSelector:p_}=h_,v_=n=>n;function _p(n,i=v_,r){const u=p_(n.subscribe,n.getState,n.getServerState||n.getInitialState,i,r);return y_(u),u}const R0=(n,i)=>{const r=m_(n),u=(o,s=i)=>_p(r,o,s);return Object.assign(u,r),u},b_=(n,i)=>n?R0(n,i):R0;function Kt(n,i){if(Object.is(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;if(n instanceof Map&&i instanceof Map){if(n.size!==i.size)return!1;for(const[u,o]of n)if(!Object.is(o,i.get(u)))return!1;return!0}if(n instanceof Set&&i instanceof Set){if(n.size!==i.size)return!1;for(const u of n)if(!i.has(u))return!1;return!0}const r=Object.keys(n);if(r.length!==Object.keys(i).length)return!1;for(const u of r)if(!Object.prototype.hasOwnProperty.call(i,u)||!Object.is(n[u],i[u]))return!1;return!0}vy();const Yo=ut.createContext(null),x_=Yo.Provider,Mp=yn.error001();function Dt(n,i){const r=ut.useContext(Yo);if(r===null)throw new Error(Mp);return _p(r,n,i)}function $t(){const n=ut.useContext(Yo);if(n===null)throw new Error(Mp);return ut.useMemo(()=>({getState:n.getState,setState:n.setState,subscribe:n.subscribe}),[n])}const j0={display:"none"},w_={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Np="react-flow__node-desc",Tp="react-flow__edge-desc",E_="react-flow__aria-live",S_=n=>n.ariaLiveMessage,__=n=>n.ariaLabelConfig;function M_({rfId:n}){const i=Dt(S_);return P.jsx("div",{id:\`\${E_}-\${n}\`,"aria-live":"assertive","aria-atomic":"true",style:w_,children:i})}function N_({rfId:n,disableKeyboardA11y:i}){const r=Dt(__);return P.jsxs(P.Fragment,{children:[P.jsx("div",{id:\`\${Np}-\${n}\`,style:j0,children:i?r["node.a11yDescription.default"]:r["node.a11yDescription.keyboardDisabled"]}),P.jsx("div",{id:\`\${Tp}-\${n}\`,style:j0,children:r["edge.a11yDescription.default"]}),!i&&P.jsx(M_,{rfId:n})]})}const Bo=ut.forwardRef(({position:n="top-left",children:i,className:r,style:u,...o},s)=>{const d=\`\${n}\`.split("-");return P.jsx("div",{className:re(["react-flow__panel",r,...d]),style:u,ref:s,...o,children:i})});Bo.displayName="Panel";function T_({proOptions:n,position:i="bottom-right"}){return n!=null&&n.hideAttribution?null:P.jsx(Bo,{position:i,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:P.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const A_=n=>{const i=[],r=[];for(const[,u]of n.nodeLookup)u.selected&&i.push(u.internals.userNode);for(const[,u]of n.edgeLookup)u.selected&&r.push(u);return{selectedNodes:i,selectedEdges:r}},ro=n=>n.id;function O_(n,i){return Kt(n.selectedNodes.map(ro),i.selectedNodes.map(ro))&&Kt(n.selectedEdges.map(ro),i.selectedEdges.map(ro))}function C_({onSelectionChange:n}){const i=$t(),{selectedNodes:r,selectedEdges:u}=Dt(A_,O_);return ut.useEffect(()=>{const o={nodes:r,edges:u};n==null||n(o),i.getState().onSelectionChangeHandlers.forEach(s=>s(o))},[r,u,n]),null}const z_=n=>!!n.onSelectionChangeHandlers;function D_({onSelectionChange:n}){const i=Dt(z_);return n||i?P.jsx(C_,{onSelectionChange:n}):null}const Ap=[0,0],H_={x:0,y:0,zoom:1},R_=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],Y0=[...R_,"rfId"],j_=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}),B0={translateExtent:yr,nodeOrigin:Ap,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function Y_(n){const{setNodes:i,setEdges:r,setMinZoom:u,setMaxZoom:o,setTranslateExtent:s,setNodeExtent:d,reset:m,setDefaultNodesAndEdges:h}=Dt(j_,Kt),g=$t();ut.useEffect(()=>(h(n.defaultNodes,n.defaultEdges),()=>{p.current=B0,m()}),[]);const p=ut.useRef(B0);return ut.useEffect(()=>{for(const y of Y0){const v=n[y],x=p.current[y];v!==x&&(typeof n[y]>"u"||(y==="nodes"?i(v):y==="edges"?r(v):y==="minZoom"?u(v):y==="maxZoom"?o(v):y==="translateExtent"?s(v):y==="nodeExtent"?d(v):y==="ariaLabelConfig"?g.setState({ariaLabelConfig:bS(v)}):y==="fitView"?g.setState({fitViewQueued:v}):y==="fitViewOptions"?g.setState({fitViewOptions:v}):g.setState({[y]:v})))}p.current=n},Y0.map(y=>n[y])),null}function U0(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function B_(n){var u;const[i,r]=ut.useState(n==="system"?null:n);return ut.useEffect(()=>{if(n!=="system"){r(n);return}const o=U0(),s=()=>r(o!=null&&o.matches?"dark":"light");return s(),o==null||o.addEventListener("change",s),()=>{o==null||o.removeEventListener("change",s)}},[n]),i!==null?i:(u=U0())!=null&&u.matches?"dark":"light"}const L0=typeof document<"u"?document:null;function xr(n=null,i={target:L0,actInsideInputWithModifier:!0}){const[r,u]=ut.useState(!1),o=ut.useRef(!1),s=ut.useRef(new Set([])),[d,m]=ut.useMemo(()=>{if(n!==null){const g=(Array.isArray(n)?n:[n]).filter(y=>typeof y=="string").map(y=>y.replace("+",\`
|
|
73
|
+
\`).replace(\`
|
|
74
|
+
\`,\`
|
|
75
|
+
+\`).split(\`
|
|
76
|
+
\`)),p=g.reduce((y,v)=>y.concat(...v),[]);return[g,p]}return[[],[]]},[n]);return ut.useEffect(()=>{const h=(i==null?void 0:i.target)??L0,g=(i==null?void 0:i.actInsideInputWithModifier)??!0;if(n!==null){const p=x=>{var C,A;if(o.current=x.ctrlKey||x.metaKey||x.shiftKey||x.altKey,(!o.current||o.current&&!g)&&up(x))return!1;const N=q0(x.code,m);if(s.current.add(x[N]),k0(d,s.current,!1)){const D=((A=(C=x.composedPath)==null?void 0:C.call(x))==null?void 0:A[0])||x.target,E=(D==null?void 0:D.nodeName)==="BUTTON"||(D==null?void 0:D.nodeName)==="A";i.preventDefault!==!1&&(o.current||!E)&&x.preventDefault(),u(!0)}},y=x=>{const w=q0(x.code,m);k0(d,s.current,!0)?(u(!1),s.current.clear()):s.current.delete(x[w]),x.key==="Meta"&&s.current.clear(),o.current=!1},v=()=>{s.current.clear(),u(!1)};return h==null||h.addEventListener("keydown",p),h==null||h.addEventListener("keyup",y),window.addEventListener("blur",v),window.addEventListener("contextmenu",v),()=>{h==null||h.removeEventListener("keydown",p),h==null||h.removeEventListener("keyup",y),window.removeEventListener("blur",v),window.removeEventListener("contextmenu",v)}}},[n,u]),r}function k0(n,i,r){return n.filter(u=>r||u.length===i.size).some(u=>u.every(o=>i.has(o)))}function q0(n,i){return i.includes(n)?"code":"key"}const U_=()=>{const n=$t();return ut.useMemo(()=>({zoomIn:i=>{const{panZoom:r}=n.getState();return r?r.scaleBy(1.2,{duration:i==null?void 0:i.duration}):Promise.resolve(!1)},zoomOut:i=>{const{panZoom:r}=n.getState();return r?r.scaleBy(1/1.2,{duration:i==null?void 0:i.duration}):Promise.resolve(!1)},zoomTo:(i,r)=>{const{panZoom:u}=n.getState();return u?u.scaleTo(i,{duration:r==null?void 0:r.duration}):Promise.resolve(!1)},getZoom:()=>n.getState().transform[2],setViewport:async(i,r)=>{const{transform:[u,o,s],panZoom:d}=n.getState();return d?(await d.setViewport({x:i.x??u,y:i.y??o,zoom:i.zoom??s},r),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[i,r,u]=n.getState().transform;return{x:i,y:r,zoom:u}},setCenter:async(i,r,u)=>n.getState().setCenter(i,r,u),fitBounds:async(i,r)=>{const{width:u,height:o,minZoom:s,maxZoom:d,panZoom:m}=n.getState(),h=Wf(i,u,o,s,d,(r==null?void 0:r.padding)??.1);return m?(await m.setViewport(h,{duration:r==null?void 0:r.duration,ease:r==null?void 0:r.ease,interpolate:r==null?void 0:r.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(i,r={})=>{const{transform:u,snapGrid:o,snapToGrid:s,domNode:d}=n.getState();if(!d)return i;const{x:m,y:h}=d.getBoundingClientRect(),g={x:i.x-m,y:i.y-h},p=r.snapGrid??o,y=r.snapToGrid??s;return Or(g,u,y,p)},flowToScreenPosition:i=>{const{transform:r,domNode:u}=n.getState();if(!u)return i;const{x:o,y:s}=u.getBoundingClientRect(),d=_o(i,r);return{x:d.x+o,y:d.y+s}}}),[])};function Op(n,i){const r=[],u=new Map,o=[];for(const s of n)if(s.type==="add"){o.push(s);continue}else if(s.type==="remove"||s.type==="replace")u.set(s.id,[s]);else{const d=u.get(s.id);d?d.push(s):u.set(s.id,[s])}for(const s of i){const d=u.get(s.id);if(!d){r.push(s);continue}if(d[0].type==="remove")continue;if(d[0].type==="replace"){r.push({...d[0].item});continue}const m={...s};for(const h of d)L_(h,m);r.push(m)}return o.length&&o.forEach(s=>{s.index!==void 0?r.splice(s.index,0,{...s.item}):r.push({...s.item})}),r}function L_(n,i){switch(n.type){case"select":{i.selected=n.selected;break}case"position":{typeof n.position<"u"&&(i.position=n.position),typeof n.dragging<"u"&&(i.dragging=n.dragging);break}case"dimensions":{typeof n.dimensions<"u"&&(i.measured={...n.dimensions},n.setAttributes&&((n.setAttributes===!0||n.setAttributes==="width")&&(i.width=n.dimensions.width),(n.setAttributes===!0||n.setAttributes==="height")&&(i.height=n.dimensions.height))),typeof n.resizing=="boolean"&&(i.resizing=n.resizing);break}}}function k_(n,i){return Op(n,i)}function q_(n,i){return Op(n,i)}function Fa(n,i){return{id:n,type:"select",selected:i}}function Ii(n,i=new Set,r=!1){const u=[];for(const[o,s]of n){const d=i.has(o);!(s.selected===void 0&&!d)&&s.selected!==d&&(r&&(s.selected=d),u.push(Fa(s.id,d)))}return u}function V0({items:n=[],lookup:i}){var o;const r=[],u=new Map(n.map(s=>[s.id,s]));for(const[s,d]of n.entries()){const m=i.get(d.id),h=((o=m==null?void 0:m.internals)==null?void 0:o.userNode)??m;h!==void 0&&h!==d&&r.push({id:d.id,item:d,type:"replace"}),h===void 0&&r.push({item:d,type:"add",index:s})}for(const[s]of i)u.get(s)===void 0&&r.push({id:s,type:"remove"});return r}function X0(n){return{id:n.id,type:"remove"}}const G0=n=>cS(n),V_=n=>Py(n);function Cp(n){return ut.forwardRef(n)}const X_=typeof window<"u"?ut.useLayoutEffect:ut.useEffect;function Q0(n){const[i,r]=ut.useState(BigInt(0)),[u]=ut.useState(()=>G_(()=>r(o=>o+BigInt(1))));return X_(()=>{const o=u.get();o.length&&(n(o),u.reset())},[i]),u}function G_(n){let i=[];return{get:()=>i,reset:()=>{i=[]},push:r=>{i.push(r),n()}}}const zp=ut.createContext(null);function Q_({children:n}){const i=$t(),r=ut.useCallback(m=>{const{nodes:h=[],setNodes:g,hasDefaultNodes:p,onNodesChange:y,nodeLookup:v,fitViewQueued:x,onNodesChangeMiddlewareMap:w}=i.getState();let N=h;for(const A of m)N=typeof A=="function"?A(N):A;let C=V0({items:N,lookup:v});for(const A of w.values())C=A(C);p&&g(N),C.length>0?y==null||y(C):x&&window.requestAnimationFrame(()=>{const{fitViewQueued:A,nodes:D,setNodes:E}=i.getState();A&&E(D)})},[]),u=Q0(r),o=ut.useCallback(m=>{const{edges:h=[],setEdges:g,hasDefaultEdges:p,onEdgesChange:y,edgeLookup:v}=i.getState();let x=h;for(const w of m)x=typeof w=="function"?w(x):w;p?g(x):y&&y(V0({items:x,lookup:v}))},[]),s=Q0(o),d=ut.useMemo(()=>({nodeQueue:u,edgeQueue:s}),[]);return P.jsx(zp.Provider,{value:d,children:n})}function Z_(){const n=ut.useContext(zp);if(!n)throw new Error("useBatchContext must be used within a BatchProvider");return n}const K_=n=>!!n.panZoom;function ad(){const n=U_(),i=$t(),r=Z_(),u=Dt(K_),o=ut.useMemo(()=>{const s=y=>i.getState().nodeLookup.get(y),d=y=>{r.nodeQueue.push(y)},m=y=>{r.edgeQueue.push(y)},h=y=>{var A,D;const{nodeLookup:v,nodeOrigin:x}=i.getState(),w=G0(y)?y:v.get(y.id),N=w.parentId?lp(w.position,w.measured,w.parentId,v,x):w.position,C={...w,position:N,width:((A=w.measured)==null?void 0:A.width)??w.width,height:((D=w.measured)==null?void 0:D.height)??w.height};return il(C)},g=(y,v,x={replace:!1})=>{d(w=>w.map(N=>{if(N.id===y){const C=typeof v=="function"?v(N):v;return x.replace&&G0(C)?C:{...N,...C}}return N}))},p=(y,v,x={replace:!1})=>{m(w=>w.map(N=>{if(N.id===y){const C=typeof v=="function"?v(N):v;return x.replace&&V_(C)?C:{...N,...C}}return N}))};return{getNodes:()=>i.getState().nodes.map(y=>({...y})),getNode:y=>{var v;return(v=s(y))==null?void 0:v.internals.userNode},getInternalNode:s,getEdges:()=>{const{edges:y=[]}=i.getState();return y.map(v=>({...v}))},getEdge:y=>i.getState().edgeLookup.get(y),setNodes:d,setEdges:m,addNodes:y=>{const v=Array.isArray(y)?y:[y];r.nodeQueue.push(x=>[...x,...v])},addEdges:y=>{const v=Array.isArray(y)?y:[y];r.edgeQueue.push(x=>[...x,...v])},toObject:()=>{const{nodes:y=[],edges:v=[],transform:x}=i.getState(),[w,N,C]=x;return{nodes:y.map(A=>({...A})),edges:v.map(A=>({...A})),viewport:{x:w,y:N,zoom:C}}},deleteElements:async({nodes:y=[],edges:v=[]})=>{const{nodes:x,edges:w,onNodesDelete:N,onEdgesDelete:C,triggerNodeChanges:A,triggerEdgeChanges:D,onDelete:E,onBeforeDelete:_}=i.getState(),{nodes:q,edges:Y}=await gS({nodesToRemove:y,edgesToRemove:v,nodes:x,edges:w,onBeforeDelete:_}),k=Y.length>0,K=q.length>0;if(k){const et=Y.map(X0);C==null||C(Y),D(et)}if(K){const et=q.map(X0);N==null||N(q),A(et)}return(K||k)&&(E==null||E({nodes:q,edges:Y})),{deletedNodes:q,deletedEdges:Y}},getIntersectingNodes:(y,v=!0,x)=>{const w=y0(y),N=w?y:h(y),C=x!==void 0;return N?(x||i.getState().nodes).filter(A=>{const D=i.getState().nodeLookup.get(A.id);if(D&&!w&&(A.id===y.id||!D.internals.positionAbsolute))return!1;const E=il(C?A:D),_=vr(E,N);return v&&_>0||_>=E.width*E.height||_>=N.width*N.height}):[]},isNodeIntersecting:(y,v,x=!0)=>{const N=y0(y)?y:h(y);if(!N)return!1;const C=vr(N,v);return x&&C>0||C>=v.width*v.height||C>=N.width*N.height},updateNode:g,updateNodeData:(y,v,x={replace:!1})=>{g(y,w=>{const N=typeof v=="function"?v(w):v;return x.replace?{...w,data:N}:{...w,data:{...w.data,...N}}},x)},updateEdge:p,updateEdgeData:(y,v,x={replace:!1})=>{p(y,w=>{const N=typeof v=="function"?v(w):v;return x.replace?{...w,data:N}:{...w,data:{...w.data,...N}}},x)},getNodesBounds:y=>{const{nodeLookup:v,nodeOrigin:x}=i.getState();return sS(y,{nodeLookup:v,nodeOrigin:x})},getHandleConnections:({type:y,id:v,nodeId:x})=>{var w;return Array.from(((w=i.getState().connectionLookup.get(\`\${x}-\${y}\${v?\`-\${v}\`:""}\`))==null?void 0:w.values())??[])},getNodeConnections:({type:y,handleId:v,nodeId:x})=>{var w;return Array.from(((w=i.getState().connectionLookup.get(\`\${x}\${y?v?\`-\${y}-\${v}\`:\`-\${y}\`:""}\`))==null?void 0:w.values())??[])},fitView:async y=>{const v=i.getState().fitViewResolver??vS();return i.setState({fitViewQueued:!0,fitViewOptions:y,fitViewResolver:v}),r.nodeQueue.push(x=>[...x]),v.promise}}},[]);return ut.useMemo(()=>({...o,...n,viewportInitialized:u}),[u])}const Z0=n=>n.selected,$_=typeof window<"u"?window:void 0;function J_({deleteKeyCode:n,multiSelectionKeyCode:i}){const r=$t(),{deleteElements:u}=ad(),o=xr(n,{actInsideInputWithModifier:!1}),s=xr(i,{target:$_});ut.useEffect(()=>{if(o){const{edges:d,nodes:m}=r.getState();u({nodes:m.filter(Z0),edges:d.filter(Z0)}),r.setState({nodesSelectionActive:!1})}},[o]),ut.useEffect(()=>{r.setState({multiSelectionActive:s})},[s])}function W_(n){const i=$t();ut.useEffect(()=>{const r=()=>{var o,s,d,m;if(!n.current||!(((s=(o=n.current).checkVisibility)==null?void 0:s.call(o))??!0))return!1;const u=If(n.current);(u.height===0||u.width===0)&&((m=(d=i.getState()).onError)==null||m.call(d,"004",yn.error004())),i.setState({width:u.width||500,height:u.height||500})};if(n.current){r(),window.addEventListener("resize",r);const u=new ResizeObserver(()=>r());return u.observe(n.current),()=>{window.removeEventListener("resize",r),u&&n.current&&u.unobserve(n.current)}}},[])}const Uo={position:"absolute",width:"100%",height:"100%",top:0,left:0},I_=n=>({userSelectionActive:n.userSelectionActive,lib:n.lib,connectionInProgress:n.connection.inProgress});function F_({onPaneContextMenu:n,zoomOnScroll:i=!0,zoomOnPinch:r=!0,panOnScroll:u=!1,panOnScrollSpeed:o=.5,panOnScrollMode:s=ni.Free,zoomOnDoubleClick:d=!0,panOnDrag:m=!0,defaultViewport:h,translateExtent:g,minZoom:p,maxZoom:y,zoomActivationKeyCode:v,preventScrolling:x=!0,children:w,noWheelClassName:N,noPanClassName:C,onViewportChange:A,isControlledViewport:D,paneClickDistance:E,selectionOnDrag:_}){const q=$t(),Y=ut.useRef(null),{userSelectionActive:k,lib:K,connectionInProgress:et}=Dt(I_,Kt),Z=xr(v),L=ut.useRef();W_(Y);const V=ut.useCallback(Q=>{A==null||A({x:Q[0],y:Q[1],zoom:Q[2]}),D||q.setState({transform:Q})},[A,D]);return ut.useEffect(()=>{if(Y.current){L.current=e_({domNode:Y.current,minZoom:p,maxZoom:y,translateExtent:g,viewport:h,onDraggingChange:S=>q.setState({paneDragging:S}),onPanZoomStart:(S,H)=>{const{onViewportChangeStart:j,onMoveStart:U}=q.getState();U==null||U(S,H),j==null||j(H)},onPanZoom:(S,H)=>{const{onViewportChange:j,onMove:U}=q.getState();U==null||U(S,H),j==null||j(H)},onPanZoomEnd:(S,H)=>{const{onViewportChangeEnd:j,onMoveEnd:U}=q.getState();U==null||U(S,H),j==null||j(H)}});const{x:Q,y:T,zoom:G}=L.current.getViewport();return q.setState({panZoom:L.current,transform:[Q,T,G],domNode:Y.current.closest(".react-flow")}),()=>{var S;(S=L.current)==null||S.destroy()}}},[]),ut.useEffect(()=>{var Q;(Q=L.current)==null||Q.update({onPaneContextMenu:n,zoomOnScroll:i,zoomOnPinch:r,panOnScroll:u,panOnScrollSpeed:o,panOnScrollMode:s,zoomOnDoubleClick:d,panOnDrag:m,zoomActivationKeyPressed:Z,preventScrolling:x,noPanClassName:C,userSelectionActive:k,noWheelClassName:N,lib:K,onTransformChange:V,connectionInProgress:et,selectionOnDrag:_,paneClickDistance:E})},[n,i,r,u,o,s,d,m,Z,x,C,k,N,K,V,et,_,E]),P.jsx("div",{className:"react-flow__renderer",ref:Y,style:Uo,children:w})}const P_=n=>({userSelectionActive:n.userSelectionActive,userSelectionRect:n.userSelectionRect});function t2(){const{userSelectionActive:n,userSelectionRect:i}=Dt(P_,Kt);return n&&i?P.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:i.width,height:i.height,transform:\`translate(\${i.x}px, \${i.y}px)\`}}):null}const Ef=(n,i)=>r=>{r.target===i.current&&(n==null||n(r))},e2=n=>({userSelectionActive:n.userSelectionActive,elementsSelectable:n.elementsSelectable,connectionInProgress:n.connection.inProgress,dragging:n.paneDragging});function n2({isSelecting:n,selectionKeyPressed:i,selectionMode:r=pr.Full,panOnDrag:u,paneClickDistance:o,selectionOnDrag:s,onSelectionStart:d,onSelectionEnd:m,onPaneClick:h,onPaneContextMenu:g,onPaneScroll:p,onPaneMouseEnter:y,onPaneMouseMove:v,onPaneMouseLeave:x,children:w}){const N=$t(),{userSelectionActive:C,elementsSelectable:A,dragging:D,connectionInProgress:E}=Dt(e2,Kt),_=A&&(n||C),q=ut.useRef(null),Y=ut.useRef(),k=ut.useRef(new Set),K=ut.useRef(new Set),et=ut.useRef(!1),Z=j=>{if(et.current||E){et.current=!1;return}h==null||h(j),N.getState().resetSelectedElements(),N.setState({nodesSelectionActive:!1})},L=j=>{if(Array.isArray(u)&&(u!=null&&u.includes(2))){j.preventDefault();return}g==null||g(j)},V=p?j=>p(j):void 0,Q=j=>{et.current&&(j.stopPropagation(),et.current=!1)},T=j=>{var z,X;const{domNode:U}=N.getState();if(Y.current=U==null?void 0:U.getBoundingClientRect(),!Y.current)return;const J=j.target===q.current;if(!J&&!!j.target.closest(".nokey")||!n||!(s&&J||i)||j.button!==0||!j.isPrimary)return;(X=(z=j.target)==null?void 0:z.setPointerCapture)==null||X.call(z,j.pointerId),et.current=!1;const{x:F,y:R}=ln(j.nativeEvent,Y.current);N.setState({userSelectionRect:{width:0,height:0,startX:F,startY:R,x:F,y:R}}),J||(j.stopPropagation(),j.preventDefault())},G=j=>{const{userSelectionRect:U,transform:J,nodeLookup:M,edgeLookup:B,connectionLookup:F,triggerNodeChanges:R,triggerEdgeChanges:z,defaultEdgeOptions:X,resetSelectedElements:$}=N.getState();if(!Y.current||!U)return;const{x:I,y:at}=ln(j.nativeEvent,Y.current),{startX:dt,startY:ht}=U;if(!et.current){const _t=i?0:o;if(Math.hypot(I-dt,at-ht)<=_t)return;$(),d==null||d(j)}et.current=!0;const gt={startX:dt,startY:ht,x:I<dt?I:dt,y:at<ht?at:ht,width:Math.abs(I-dt),height:Math.abs(at-ht)},pt=k.current,xt=K.current;k.current=new Set(Jf(M,gt,J,r===pr.Partial,!0).map(_t=>_t.id)),K.current=new Set;const Et=(X==null?void 0:X.selectable)??!0;for(const _t of k.current){const It=F.get(_t);if(It)for(const{edgeId:xe}of It.values()){const Ce=B.get(xe);Ce&&(Ce.selectable??Et)&&K.current.add(xe)}}if(!p0(pt,k.current)){const _t=Ii(M,k.current,!0);R(_t)}if(!p0(xt,K.current)){const _t=Ii(B,K.current);z(_t)}N.setState({userSelectionRect:gt,userSelectionActive:!0,nodesSelectionActive:!1})},S=j=>{var U,J;j.button===0&&((J=(U=j.target)==null?void 0:U.releasePointerCapture)==null||J.call(U,j.pointerId),!C&&j.target===q.current&&N.getState().userSelectionRect&&(Z==null||Z(j)),N.setState({userSelectionActive:!1,userSelectionRect:null}),et.current&&(m==null||m(j),N.setState({nodesSelectionActive:k.current.size>0})))},H=u===!0||Array.isArray(u)&&u.includes(0);return P.jsxs("div",{className:re(["react-flow__pane",{draggable:H,dragging:D,selection:n}]),onClick:_?void 0:Ef(Z,q),onContextMenu:Ef(L,q),onWheel:Ef(V,q),onPointerEnter:_?void 0:y,onPointerMove:_?G:v,onPointerUp:_?S:void 0,onPointerDownCapture:_?T:void 0,onClickCapture:_?Q:void 0,onPointerLeave:x,ref:q,style:Uo,children:[w,P.jsx(t2,{})]})}function kf({id:n,store:i,unselect:r=!1,nodeRef:u}){const{addSelectedNodes:o,unselectNodesAndEdges:s,multiSelectionActive:d,nodeLookup:m,onError:h}=i.getState(),g=m.get(n);if(!g){h==null||h("012",yn.error012(n));return}i.setState({nodesSelectionActive:!1}),g.selected?(r||g.selected&&d)&&(s({nodes:[g],edges:[]}),requestAnimationFrame(()=>{var p;return(p=u==null?void 0:u.current)==null?void 0:p.blur()})):o([n])}function Dp({nodeRef:n,disabled:i=!1,noDragClassName:r,handleSelector:u,nodeId:o,isSelectable:s,nodeClickDistance:d}){const m=$t(),[h,g]=ut.useState(!1),p=ut.useRef();return ut.useEffect(()=>{p.current=qS({getStoreItems:()=>m.getState(),onNodeMouseDown:y=>{kf({id:y,store:m,nodeRef:n})},onDragStart:()=>{g(!0)},onDragStop:()=>{g(!1)}})},[]),ut.useEffect(()=>{var y,v;if(i)(y=p.current)==null||y.destroy();else if(n.current)return(v=p.current)==null||v.update({noDragClassName:r,handleSelector:u,domNode:n.current,isSelectable:s,nodeId:o,nodeClickDistance:d}),()=>{var x;(x=p.current)==null||x.destroy()}},[r,u,i,s,n,o]),h}const a2=n=>i=>i.selected&&(i.draggable||n&&typeof i.draggable>"u");function Hp(){const n=$t();return ut.useCallback(r=>{const{nodeExtent:u,snapToGrid:o,snapGrid:s,nodesDraggable:d,onError:m,updateNodePositions:h,nodeLookup:g,nodeOrigin:p}=n.getState(),y=new Map,v=a2(d),x=o?s[0]:5,w=o?s[1]:5,N=r.direction.x*x*r.factor,C=r.direction.y*w*r.factor;for(const[,A]of g){if(!v(A))continue;let D={x:A.internals.positionAbsolute.x+N,y:A.internals.positionAbsolute.y+C};o&&(D=Ar(D,s));const{position:E,positionAbsolute:_}=tp({nodeId:A.id,nextPosition:D,nodeLookup:g,nodeExtent:u,nodeOrigin:p,onError:m});A.position=E,A.internals.positionAbsolute=_,y.set(A.id,A)}h(y)},[])}const id=ut.createContext(null),i2=id.Provider;id.Consumer;const Rp=()=>ut.useContext(id),l2=n=>({connectOnClick:n.connectOnClick,noPanClassName:n.noPanClassName,rfId:n.rfId}),r2=(n,i,r)=>u=>{const{connectionClickStartHandle:o,connectionMode:s,connection:d}=u,{fromHandle:m,toHandle:h,isValid:g}=d,p=(h==null?void 0:h.nodeId)===n&&(h==null?void 0:h.id)===i&&(h==null?void 0:h.type)===r;return{connectingFrom:(m==null?void 0:m.nodeId)===n&&(m==null?void 0:m.id)===i&&(m==null?void 0:m.type)===r,connectingTo:p,clickConnecting:(o==null?void 0:o.nodeId)===n&&(o==null?void 0:o.id)===i&&(o==null?void 0:o.type)===r,isPossibleEndHandle:s===nl.Strict?(m==null?void 0:m.type)!==r:n!==(m==null?void 0:m.nodeId)||i!==(m==null?void 0:m.id),connectionInProcess:!!m,clickConnectionInProcess:!!o,valid:p&&g}};function u2({type:n="source",position:i=vt.Top,isValidConnection:r,isConnectable:u=!0,isConnectableStart:o=!0,isConnectableEnd:s=!0,id:d,onConnect:m,children:h,className:g,onMouseDown:p,onTouchStart:y,...v},x){var G,S;const w=d||null,N=n==="target",C=$t(),A=Rp(),{connectOnClick:D,noPanClassName:E,rfId:_}=Dt(l2,Kt),{connectingFrom:q,connectingTo:Y,clickConnecting:k,isPossibleEndHandle:K,connectionInProcess:et,clickConnectionInProcess:Z,valid:L}=Dt(r2(A,w,n),Kt);A||(S=(G=C.getState()).onError)==null||S.call(G,"010",yn.error010());const V=H=>{const{defaultEdgeOptions:j,onConnect:U,hasDefaultEdges:J}=C.getState(),M={...j,...H};if(J){const{edges:B,setEdges:F}=C.getState();F(MS(M,B))}U==null||U(M),m==null||m(M)},Q=H=>{if(!A)return;const j=op(H.nativeEvent);if(o&&(j&&H.button===0||!j)){const U=C.getState();Lf.onPointerDown(H.nativeEvent,{handleDomNode:H.currentTarget,autoPanOnConnect:U.autoPanOnConnect,connectionMode:U.connectionMode,connectionRadius:U.connectionRadius,domNode:U.domNode,nodeLookup:U.nodeLookup,lib:U.lib,isTarget:N,handleId:w,nodeId:A,flowId:U.rfId,panBy:U.panBy,cancelConnection:U.cancelConnection,onConnectStart:U.onConnectStart,onConnectEnd:U.onConnectEnd,updateConnection:U.updateConnection,onConnect:V,isValidConnection:r||U.isValidConnection,getTransform:()=>C.getState().transform,getFromHandle:()=>C.getState().connection.fromHandle,autoPanSpeed:U.autoPanSpeed,dragThreshold:U.connectionDragThreshold})}j?p==null||p(H):y==null||y(H)},T=H=>{const{onClickConnectStart:j,onClickConnectEnd:U,connectionClickStartHandle:J,connectionMode:M,isValidConnection:B,lib:F,rfId:R,nodeLookup:z,connection:X}=C.getState();if(!A||!J&&!o)return;if(!J){j==null||j(H.nativeEvent,{nodeId:A,handleId:w,handleType:n}),C.setState({connectionClickStartHandle:{nodeId:A,type:n,id:w}});return}const $=rp(H.target),I=r||B,{connection:at,isValid:dt}=Lf.isValid(H.nativeEvent,{handle:{nodeId:A,id:w,type:n},connectionMode:M,fromNodeId:J.nodeId,fromHandleId:J.id||null,fromType:J.type,isValidConnection:I,flowId:R,doc:$,lib:F,nodeLookup:z});dt&&at&&V(at);const ht=structuredClone(X);delete ht.inProgress,ht.toPosition=ht.toHandle?ht.toHandle.position:null,U==null||U(H,ht),C.setState({connectionClickStartHandle:null})};return P.jsx("div",{"data-handleid":w,"data-nodeid":A,"data-handlepos":i,"data-id":\`\${_}-\${A}-\${w}-\${n}\`,className:re(["react-flow__handle",\`react-flow__handle-\${i}\`,"nodrag",E,g,{source:!N,target:N,connectable:u,connectablestart:o,connectableend:s,clickconnecting:k,connectingfrom:q,connectingto:Y,valid:L,connectionindicator:u&&(!et||K)&&(et||Z?s:o)}]),onMouseDown:Q,onTouchStart:Q,onClick:D?T:void 0,ref:x,...v,children:h})}const ul=ut.memo(Cp(u2));function o2({data:n,isConnectable:i,sourcePosition:r=vt.Bottom}){return P.jsxs(P.Fragment,{children:[n==null?void 0:n.label,P.jsx(ul,{type:"source",position:r,isConnectable:i})]})}function c2({data:n,isConnectable:i,targetPosition:r=vt.Top,sourcePosition:u=vt.Bottom}){return P.jsxs(P.Fragment,{children:[P.jsx(ul,{type:"target",position:r,isConnectable:i}),n==null?void 0:n.label,P.jsx(ul,{type:"source",position:u,isConnectable:i})]})}function s2(){return null}function f2({data:n,isConnectable:i,targetPosition:r=vt.Top}){return P.jsxs(P.Fragment,{children:[P.jsx(ul,{type:"target",position:r,isConnectable:i}),n==null?void 0:n.label]})}const Mo={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},K0={input:o2,default:c2,output:f2,group:s2};function d2(n){var i,r,u,o;return n.internals.handleBounds===void 0?{width:n.width??n.initialWidth??((i=n.style)==null?void 0:i.width),height:n.height??n.initialHeight??((r=n.style)==null?void 0:r.height)}:{width:n.width??((u=n.style)==null?void 0:u.width),height:n.height??((o=n.style)==null?void 0:o.height)}}const h2=n=>{const{width:i,height:r,x:u,y:o}=Tr(n.nodeLookup,{filter:s=>!!s.selected});return{width:an(i)?i:null,height:an(r)?r:null,userSelectionActive:n.userSelectionActive,transformString:\`translate(\${n.transform[0]}px,\${n.transform[1]}px) scale(\${n.transform[2]}) translate(\${u}px,\${o}px)\`}};function g2({onSelectionContextMenu:n,noPanClassName:i,disableKeyboardA11y:r}){const u=$t(),{width:o,height:s,transformString:d,userSelectionActive:m}=Dt(h2,Kt),h=Hp(),g=ut.useRef(null);if(ut.useEffect(()=>{var v;r||(v=g.current)==null||v.focus({preventScroll:!0})},[r]),Dp({nodeRef:g}),m||!o||!s)return null;const p=n?v=>{const x=u.getState().nodes.filter(w=>w.selected);n(v,x)}:void 0,y=v=>{Object.prototype.hasOwnProperty.call(Mo,v.key)&&(v.preventDefault(),h({direction:Mo[v.key],factor:v.shiftKey?4:1}))};return P.jsx("div",{className:re(["react-flow__nodesselection","react-flow__container",i]),style:{transform:d},children:P.jsx("div",{ref:g,className:"react-flow__nodesselection-rect",onContextMenu:p,tabIndex:r?void 0:-1,onKeyDown:r?void 0:y,style:{width:o,height:s}})})}const $0=typeof window<"u"?window:void 0,m2=n=>({nodesSelectionActive:n.nodesSelectionActive,userSelectionActive:n.userSelectionActive});function jp({children:n,onPaneClick:i,onPaneMouseEnter:r,onPaneMouseMove:u,onPaneMouseLeave:o,onPaneContextMenu:s,onPaneScroll:d,paneClickDistance:m,deleteKeyCode:h,selectionKeyCode:g,selectionOnDrag:p,selectionMode:y,onSelectionStart:v,onSelectionEnd:x,multiSelectionKeyCode:w,panActivationKeyCode:N,zoomActivationKeyCode:C,elementsSelectable:A,zoomOnScroll:D,zoomOnPinch:E,panOnScroll:_,panOnScrollSpeed:q,panOnScrollMode:Y,zoomOnDoubleClick:k,panOnDrag:K,defaultViewport:et,translateExtent:Z,minZoom:L,maxZoom:V,preventScrolling:Q,onSelectionContextMenu:T,noWheelClassName:G,noPanClassName:S,disableKeyboardA11y:H,onViewportChange:j,isControlledViewport:U}){const{nodesSelectionActive:J,userSelectionActive:M}=Dt(m2,Kt),B=xr(g,{target:$0}),F=xr(N,{target:$0}),R=F||K,z=F||_,X=p&&R!==!0,$=B||M||X;return J_({deleteKeyCode:h,multiSelectionKeyCode:w}),P.jsx(F_,{onPaneContextMenu:s,elementsSelectable:A,zoomOnScroll:D,zoomOnPinch:E,panOnScroll:z,panOnScrollSpeed:q,panOnScrollMode:Y,zoomOnDoubleClick:k,panOnDrag:!B&&R,defaultViewport:et,translateExtent:Z,minZoom:L,maxZoom:V,zoomActivationKeyCode:C,preventScrolling:Q,noWheelClassName:G,noPanClassName:S,onViewportChange:j,isControlledViewport:U,paneClickDistance:m,selectionOnDrag:X,children:P.jsxs(n2,{onSelectionStart:v,onSelectionEnd:x,onPaneClick:i,onPaneMouseEnter:r,onPaneMouseMove:u,onPaneMouseLeave:o,onPaneContextMenu:s,onPaneScroll:d,panOnDrag:R,isSelecting:!!$,selectionMode:y,selectionKeyPressed:B,paneClickDistance:m,selectionOnDrag:X,children:[n,J&&P.jsx(g2,{onSelectionContextMenu:T,noPanClassName:S,disableKeyboardA11y:H})]})})}jp.displayName="FlowRenderer";const y2=ut.memo(jp),p2=n=>i=>n?Jf(i.nodeLookup,{x:0,y:0,width:i.width,height:i.height},i.transform,!0).map(r=>r.id):Array.from(i.nodeLookup.keys());function v2(n){return Dt(ut.useCallback(p2(n),[n]),Kt)}const b2=n=>n.updateNodeInternals;function x2(){const n=Dt(b2),[i]=ut.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(r=>{const u=new Map;r.forEach(o=>{const s=o.target.getAttribute("data-id");u.set(s,{id:s,nodeElement:o.target,force:!0})}),n(u)}));return ut.useEffect(()=>()=>{i==null||i.disconnect()},[i]),i}function w2({node:n,nodeType:i,hasDimensions:r,resizeObserver:u}){const o=$t(),s=ut.useRef(null),d=ut.useRef(null),m=ut.useRef(n.sourcePosition),h=ut.useRef(n.targetPosition),g=ut.useRef(i),p=r&&!!n.internals.handleBounds;return ut.useEffect(()=>{s.current&&!n.hidden&&(!p||d.current!==s.current)&&(d.current&&(u==null||u.unobserve(d.current)),u==null||u.observe(s.current),d.current=s.current)},[p,n.hidden]),ut.useEffect(()=>()=>{d.current&&(u==null||u.unobserve(d.current),d.current=null)},[]),ut.useEffect(()=>{if(s.current){const y=g.current!==i,v=m.current!==n.sourcePosition,x=h.current!==n.targetPosition;(y||v||x)&&(g.current=i,m.current=n.sourcePosition,h.current=n.targetPosition,o.getState().updateNodeInternals(new Map([[n.id,{id:n.id,nodeElement:s.current,force:!0}]])))}},[n.id,i,n.sourcePosition,n.targetPosition]),s}function E2({id:n,onClick:i,onMouseEnter:r,onMouseMove:u,onMouseLeave:o,onContextMenu:s,onDoubleClick:d,nodesDraggable:m,elementsSelectable:h,nodesConnectable:g,nodesFocusable:p,resizeObserver:y,noDragClassName:v,noPanClassName:x,disableKeyboardA11y:w,rfId:N,nodeTypes:C,nodeClickDistance:A,onError:D}){const{node:E,internals:_,isParent:q}=Dt(I=>{const at=I.nodeLookup.get(n),dt=I.parentLookup.has(n);return{node:at,internals:at.internals,isParent:dt}},Kt);let Y=E.type||"default",k=(C==null?void 0:C[Y])||K0[Y];k===void 0&&(D==null||D("003",yn.error003(Y)),Y="default",k=(C==null?void 0:C.default)||K0.default);const K=!!(E.draggable||m&&typeof E.draggable>"u"),et=!!(E.selectable||h&&typeof E.selectable>"u"),Z=!!(E.connectable||g&&typeof E.connectable>"u"),L=!!(E.focusable||p&&typeof E.focusable>"u"),V=$t(),Q=ip(E),T=w2({node:E,nodeType:Y,hasDimensions:Q,resizeObserver:y}),G=Dp({nodeRef:T,disabled:E.hidden||!K,noDragClassName:v,handleSelector:E.dragHandle,nodeId:n,isSelectable:et,nodeClickDistance:A}),S=Hp();if(E.hidden)return null;const H=Zn(E),j=d2(E),U=et||K||i||r||u||o,J=r?I=>r(I,{..._.userNode}):void 0,M=u?I=>u(I,{..._.userNode}):void 0,B=o?I=>o(I,{..._.userNode}):void 0,F=s?I=>s(I,{..._.userNode}):void 0,R=d?I=>d(I,{..._.userNode}):void 0,z=I=>{const{selectNodesOnDrag:at,nodeDragThreshold:dt}=V.getState();et&&(!at||!K||dt>0)&&kf({id:n,store:V,nodeRef:T}),i&&i(I,{..._.userNode})},X=I=>{if(!(up(I.nativeEvent)||w)){if(Jy.includes(I.key)&&et){const at=I.key==="Escape";kf({id:n,store:V,unselect:at,nodeRef:T})}else if(K&&E.selected&&Object.prototype.hasOwnProperty.call(Mo,I.key)){I.preventDefault();const{ariaLabelConfig:at}=V.getState();V.setState({ariaLiveMessage:at["node.a11yDescription.ariaLiveMessage"]({direction:I.key.replace("Arrow","").toLowerCase(),x:~~_.positionAbsolute.x,y:~~_.positionAbsolute.y})}),S({direction:Mo[I.key],factor:I.shiftKey?4:1})}}},$=()=>{var xt;if(w||!((xt=T.current)!=null&&xt.matches(":focus-visible")))return;const{transform:I,width:at,height:dt,autoPanOnNodeFocus:ht,setCenter:gt}=V.getState();if(!ht)return;Jf(new Map([[n,E]]),{x:0,y:0,width:at,height:dt},I,!0).length>0||gt(E.position.x+H.width/2,E.position.y+H.height/2,{zoom:I[2]})};return P.jsx("div",{className:re(["react-flow__node",\`react-flow__node-\${Y}\`,{[x]:K},E.className,{selected:E.selected,selectable:et,parent:q,draggable:K,dragging:G}]),ref:T,style:{zIndex:_.z,transform:\`translate(\${_.positionAbsolute.x}px,\${_.positionAbsolute.y}px)\`,pointerEvents:U?"all":"none",visibility:Q?"visible":"hidden",...E.style,...j},"data-id":n,"data-testid":\`rf__node-\${n}\`,onMouseEnter:J,onMouseMove:M,onMouseLeave:B,onContextMenu:F,onClick:z,onDoubleClick:R,onKeyDown:L?X:void 0,tabIndex:L?0:void 0,onFocus:L?$:void 0,role:E.ariaRole??(L?"group":void 0),"aria-roledescription":"node","aria-describedby":w?void 0:\`\${Np}-\${N}\`,"aria-label":E.ariaLabel,...E.domAttributes,children:P.jsx(i2,{value:n,children:P.jsx(k,{id:n,data:E.data,type:Y,positionAbsoluteX:_.positionAbsolute.x,positionAbsoluteY:_.positionAbsolute.y,selected:E.selected??!1,selectable:et,draggable:K,deletable:E.deletable??!0,isConnectable:Z,sourcePosition:E.sourcePosition,targetPosition:E.targetPosition,dragging:G,dragHandle:E.dragHandle,zIndex:_.z,parentId:E.parentId,...H})})})}var S2=ut.memo(E2);const _2=n=>({nodesDraggable:n.nodesDraggable,nodesConnectable:n.nodesConnectable,nodesFocusable:n.nodesFocusable,elementsSelectable:n.elementsSelectable,onError:n.onError});function Yp(n){const{nodesDraggable:i,nodesConnectable:r,nodesFocusable:u,elementsSelectable:o,onError:s}=Dt(_2,Kt),d=v2(n.onlyRenderVisibleElements),m=x2();return P.jsx("div",{className:"react-flow__nodes",style:Uo,children:d.map(h=>P.jsx(S2,{id:h,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:m,nodesDraggable:i,nodesConnectable:r,nodesFocusable:u,elementsSelectable:o,nodeClickDistance:n.nodeClickDistance,onError:s},h))})}Yp.displayName="NodeRenderer";const M2=ut.memo(Yp);function N2(n){return Dt(ut.useCallback(r=>{if(!n)return r.edges.map(o=>o.id);const u=[];if(r.width&&r.height)for(const o of r.edges){const s=r.nodeLookup.get(o.source),d=r.nodeLookup.get(o.target);s&&d&&ES({sourceNode:s,targetNode:d,width:r.width,height:r.height,transform:r.transform})&&u.push(o.id)}return u},[n]),Kt)}const T2=({color:n="none",strokeWidth:i=1})=>{const r={strokeWidth:i,...n&&{stroke:n}};return P.jsx("polyline",{className:"arrow",style:r,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},A2=({color:n="none",strokeWidth:i=1})=>{const r={strokeWidth:i,...n&&{stroke:n,fill:n}};return P.jsx("polyline",{className:"arrowclosed",style:r,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},J0={[Eo.Arrow]:T2,[Eo.ArrowClosed]:A2};function O2(n){const i=$t();return ut.useMemo(()=>{var o,s;return Object.prototype.hasOwnProperty.call(J0,n)?J0[n]:((s=(o=i.getState()).onError)==null||s.call(o,"009",yn.error009(n)),null)},[n])}const C2=({id:n,type:i,color:r,width:u=12.5,height:o=12.5,markerUnits:s="strokeWidth",strokeWidth:d,orient:m="auto-start-reverse"})=>{const h=O2(i);return h?P.jsx("marker",{className:"react-flow__arrowhead",id:n,markerWidth:\`\${u}\`,markerHeight:\`\${o}\`,viewBox:"-10 -10 20 20",markerUnits:s,orient:m,refX:"0",refY:"0",children:P.jsx(h,{color:r,strokeWidth:d})}):null},Bp=({defaultColor:n,rfId:i})=>{const r=Dt(s=>s.edges),u=Dt(s=>s.defaultEdgeOptions),o=ut.useMemo(()=>CS(r,{id:i,defaultColor:n,defaultMarkerStart:u==null?void 0:u.markerStart,defaultMarkerEnd:u==null?void 0:u.markerEnd}),[r,u,i,n]);return o.length?P.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:P.jsx("defs",{children:o.map(s=>P.jsx(C2,{id:s.id,type:s.type,color:s.color,width:s.width,height:s.height,markerUnits:s.markerUnits,strokeWidth:s.strokeWidth,orient:s.orient},s.id))})}):null};Bp.displayName="MarkerDefinitions";var z2=ut.memo(Bp);function Up({x:n,y:i,label:r,labelStyle:u,labelShowBg:o=!0,labelBgStyle:s,labelBgPadding:d=[2,4],labelBgBorderRadius:m=2,children:h,className:g,...p}){const[y,v]=ut.useState({x:1,y:0,width:0,height:0}),x=re(["react-flow__edge-textwrapper",g]),w=ut.useRef(null);return ut.useEffect(()=>{if(w.current){const N=w.current.getBBox();v({x:N.x,y:N.y,width:N.width,height:N.height})}},[r]),r?P.jsxs("g",{transform:\`translate(\${n-y.width/2} \${i-y.height/2})\`,className:x,visibility:y.width?"visible":"hidden",...p,children:[o&&P.jsx("rect",{width:y.width+2*d[0],x:-d[0],y:-d[1],height:y.height+2*d[1],className:"react-flow__edge-textbg",style:s,rx:m,ry:m}),P.jsx("text",{className:"react-flow__edge-text",y:y.height/2,dy:"0.3em",ref:w,style:u,children:r}),h]}):null}Up.displayName="EdgeText";const D2=ut.memo(Up);function Lo({path:n,labelX:i,labelY:r,label:u,labelStyle:o,labelShowBg:s,labelBgStyle:d,labelBgPadding:m,labelBgBorderRadius:h,interactionWidth:g=20,...p}){return P.jsxs(P.Fragment,{children:[P.jsx("path",{...p,d:n,fill:"none",className:re(["react-flow__edge-path",p.className])}),g?P.jsx("path",{d:n,fill:"none",strokeOpacity:0,strokeWidth:g,className:"react-flow__edge-interaction"}):null,u&&an(i)&&an(r)?P.jsx(D2,{x:i,y:r,label:u,labelStyle:o,labelShowBg:s,labelBgStyle:d,labelBgPadding:m,labelBgBorderRadius:h}):null]})}function W0({pos:n,x1:i,y1:r,x2:u,y2:o}){return n===vt.Left||n===vt.Right?[.5*(i+u),r]:[i,.5*(r+o)]}function Lp({sourceX:n,sourceY:i,sourcePosition:r=vt.Bottom,targetX:u,targetY:o,targetPosition:s=vt.Top}){const[d,m]=W0({pos:r,x1:n,y1:i,x2:u,y2:o}),[h,g]=W0({pos:s,x1:u,y1:o,x2:n,y2:i}),[p,y,v,x]=cp({sourceX:n,sourceY:i,targetX:u,targetY:o,sourceControlX:d,sourceControlY:m,targetControlX:h,targetControlY:g});return[\`M\${n},\${i} C\${d},\${m} \${h},\${g} \${u},\${o}\`,p,y,v,x]}function kp(n){return ut.memo(({id:i,sourceX:r,sourceY:u,targetX:o,targetY:s,sourcePosition:d,targetPosition:m,label:h,labelStyle:g,labelShowBg:p,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:x,style:w,markerEnd:N,markerStart:C,interactionWidth:A})=>{const[D,E,_]=Lp({sourceX:r,sourceY:u,sourcePosition:d,targetX:o,targetY:s,targetPosition:m}),q=n.isInternal?void 0:i;return P.jsx(Lo,{id:q,path:D,labelX:E,labelY:_,label:h,labelStyle:g,labelShowBg:p,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:x,style:w,markerEnd:N,markerStart:C,interactionWidth:A})})}const H2=kp({isInternal:!1}),qp=kp({isInternal:!0});H2.displayName="SimpleBezierEdge";qp.displayName="SimpleBezierEdgeInternal";function Vp(n){return ut.memo(({id:i,sourceX:r,sourceY:u,targetX:o,targetY:s,label:d,labelStyle:m,labelShowBg:h,labelBgStyle:g,labelBgPadding:p,labelBgBorderRadius:y,style:v,sourcePosition:x=vt.Bottom,targetPosition:w=vt.Top,markerEnd:N,markerStart:C,pathOptions:A,interactionWidth:D})=>{const[E,_,q]=Yf({sourceX:r,sourceY:u,sourcePosition:x,targetX:o,targetY:s,targetPosition:w,borderRadius:A==null?void 0:A.borderRadius,offset:A==null?void 0:A.offset,stepPosition:A==null?void 0:A.stepPosition}),Y=n.isInternal?void 0:i;return P.jsx(Lo,{id:Y,path:E,labelX:_,labelY:q,label:d,labelStyle:m,labelShowBg:h,labelBgStyle:g,labelBgPadding:p,labelBgBorderRadius:y,style:v,markerEnd:N,markerStart:C,interactionWidth:D})})}const Xp=Vp({isInternal:!1}),Gp=Vp({isInternal:!0});Xp.displayName="SmoothStepEdge";Gp.displayName="SmoothStepEdgeInternal";function Qp(n){return ut.memo(({id:i,...r})=>{var o;const u=n.isInternal?void 0:i;return P.jsx(Xp,{...r,id:u,pathOptions:ut.useMemo(()=>{var s;return{borderRadius:0,offset:(s=r.pathOptions)==null?void 0:s.offset}},[(o=r.pathOptions)==null?void 0:o.offset])})})}const R2=Qp({isInternal:!1}),Zp=Qp({isInternal:!0});R2.displayName="StepEdge";Zp.displayName="StepEdgeInternal";function Kp(n){return ut.memo(({id:i,sourceX:r,sourceY:u,targetX:o,targetY:s,label:d,labelStyle:m,labelShowBg:h,labelBgStyle:g,labelBgPadding:p,labelBgBorderRadius:y,style:v,markerEnd:x,markerStart:w,interactionWidth:N})=>{const[C,A,D]=dp({sourceX:r,sourceY:u,targetX:o,targetY:s}),E=n.isInternal?void 0:i;return P.jsx(Lo,{id:E,path:C,labelX:A,labelY:D,label:d,labelStyle:m,labelShowBg:h,labelBgStyle:g,labelBgPadding:p,labelBgBorderRadius:y,style:v,markerEnd:x,markerStart:w,interactionWidth:N})})}const j2=Kp({isInternal:!1}),$p=Kp({isInternal:!0});j2.displayName="StraightEdge";$p.displayName="StraightEdgeInternal";function Jp(n){return ut.memo(({id:i,sourceX:r,sourceY:u,targetX:o,targetY:s,sourcePosition:d=vt.Bottom,targetPosition:m=vt.Top,label:h,labelStyle:g,labelShowBg:p,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:x,style:w,markerEnd:N,markerStart:C,pathOptions:A,interactionWidth:D})=>{const[E,_,q]=sp({sourceX:r,sourceY:u,sourcePosition:d,targetX:o,targetY:s,targetPosition:m,curvature:A==null?void 0:A.curvature}),Y=n.isInternal?void 0:i;return P.jsx(Lo,{id:Y,path:E,labelX:_,labelY:q,label:h,labelStyle:g,labelShowBg:p,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:x,style:w,markerEnd:N,markerStart:C,interactionWidth:D})})}const Y2=Jp({isInternal:!1}),Wp=Jp({isInternal:!0});Y2.displayName="BezierEdge";Wp.displayName="BezierEdgeInternal";const I0={default:Wp,straight:$p,step:Zp,smoothstep:Gp,simplebezier:qp},F0={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},B2=(n,i,r)=>r===vt.Left?n-i:r===vt.Right?n+i:n,U2=(n,i,r)=>r===vt.Top?n-i:r===vt.Bottom?n+i:n,P0="react-flow__edgeupdater";function ty({position:n,centerX:i,centerY:r,radius:u=10,onMouseDown:o,onMouseEnter:s,onMouseOut:d,type:m}){return P.jsx("circle",{onMouseDown:o,onMouseEnter:s,onMouseOut:d,className:re([P0,\`\${P0}-\${m}\`]),cx:B2(i,u,n),cy:U2(r,u,n),r:u,stroke:"transparent",fill:"transparent"})}function L2({isReconnectable:n,reconnectRadius:i,edge:r,sourceX:u,sourceY:o,targetX:s,targetY:d,sourcePosition:m,targetPosition:h,onReconnect:g,onReconnectStart:p,onReconnectEnd:y,setReconnecting:v,setUpdateHover:x}){const w=$t(),N=(_,q)=>{if(_.button!==0)return;const{autoPanOnConnect:Y,domNode:k,isValidConnection:K,connectionMode:et,connectionRadius:Z,lib:L,onConnectStart:V,onConnectEnd:Q,cancelConnection:T,nodeLookup:G,rfId:S,panBy:H,updateConnection:j}=w.getState(),U=q.type==="target",J=(F,R)=>{v(!1),y==null||y(F,r,q.type,R)},M=F=>g==null?void 0:g(r,F),B=(F,R)=>{v(!0),p==null||p(_,r,q.type),V==null||V(F,R)};Lf.onPointerDown(_.nativeEvent,{autoPanOnConnect:Y,connectionMode:et,connectionRadius:Z,domNode:k,handleId:q.id,nodeId:q.nodeId,nodeLookup:G,isTarget:U,edgeUpdaterType:q.type,lib:L,flowId:S,cancelConnection:T,panBy:H,isValidConnection:K,onConnect:M,onConnectStart:B,onConnectEnd:Q,onReconnectEnd:J,updateConnection:j,getTransform:()=>w.getState().transform,getFromHandle:()=>w.getState().connection.fromHandle,dragThreshold:w.getState().connectionDragThreshold,handleDomNode:_.currentTarget})},C=_=>N(_,{nodeId:r.target,id:r.targetHandle??null,type:"target"}),A=_=>N(_,{nodeId:r.source,id:r.sourceHandle??null,type:"source"}),D=()=>x(!0),E=()=>x(!1);return P.jsxs(P.Fragment,{children:[(n===!0||n==="source")&&P.jsx(ty,{position:m,centerX:u,centerY:o,radius:i,onMouseDown:C,onMouseEnter:D,onMouseOut:E,type:"source"}),(n===!0||n==="target")&&P.jsx(ty,{position:h,centerX:s,centerY:d,radius:i,onMouseDown:A,onMouseEnter:D,onMouseOut:E,type:"target"})]})}function k2({id:n,edgesFocusable:i,edgesReconnectable:r,elementsSelectable:u,onClick:o,onDoubleClick:s,onContextMenu:d,onMouseEnter:m,onMouseMove:h,onMouseLeave:g,reconnectRadius:p,onReconnect:y,onReconnectStart:v,onReconnectEnd:x,rfId:w,edgeTypes:N,noPanClassName:C,onError:A,disableKeyboardA11y:D}){let E=Dt(gt=>gt.edgeLookup.get(n));const _=Dt(gt=>gt.defaultEdgeOptions);E=_?{..._,...E}:E;let q=E.type||"default",Y=(N==null?void 0:N[q])||I0[q];Y===void 0&&(A==null||A("011",yn.error011(q)),q="default",Y=(N==null?void 0:N.default)||I0.default);const k=!!(E.focusable||i&&typeof E.focusable>"u"),K=typeof y<"u"&&(E.reconnectable||r&&typeof E.reconnectable>"u"),et=!!(E.selectable||u&&typeof E.selectable>"u"),Z=ut.useRef(null),[L,V]=ut.useState(!1),[Q,T]=ut.useState(!1),G=$t(),{zIndex:S,sourceX:H,sourceY:j,targetX:U,targetY:J,sourcePosition:M,targetPosition:B}=Dt(ut.useCallback(gt=>{const pt=gt.nodeLookup.get(E.source),xt=gt.nodeLookup.get(E.target);if(!pt||!xt)return{zIndex:E.zIndex,...F0};const Et=OS({id:n,sourceNode:pt,targetNode:xt,sourceHandle:E.sourceHandle||null,targetHandle:E.targetHandle||null,connectionMode:gt.connectionMode,onError:A});return{zIndex:wS({selected:E.selected,zIndex:E.zIndex,sourceNode:pt,targetNode:xt,elevateOnSelect:gt.elevateEdgesOnSelect,zIndexMode:gt.zIndexMode}),...Et||F0}},[E.source,E.target,E.sourceHandle,E.targetHandle,E.selected,E.zIndex]),Kt),F=ut.useMemo(()=>E.markerStart?\`url('#\${Bf(E.markerStart,w)}')\`:void 0,[E.markerStart,w]),R=ut.useMemo(()=>E.markerEnd?\`url('#\${Bf(E.markerEnd,w)}')\`:void 0,[E.markerEnd,w]);if(E.hidden||H===null||j===null||U===null||J===null)return null;const z=gt=>{var _t;const{addSelectedEdges:pt,unselectNodesAndEdges:xt,multiSelectionActive:Et}=G.getState();et&&(G.setState({nodesSelectionActive:!1}),E.selected&&Et?(xt({nodes:[],edges:[E]}),(_t=Z.current)==null||_t.blur()):pt([n])),o&&o(gt,E)},X=s?gt=>{s(gt,{...E})}:void 0,$=d?gt=>{d(gt,{...E})}:void 0,I=m?gt=>{m(gt,{...E})}:void 0,at=h?gt=>{h(gt,{...E})}:void 0,dt=g?gt=>{g(gt,{...E})}:void 0,ht=gt=>{var pt;if(!D&&Jy.includes(gt.key)&&et){const{unselectNodesAndEdges:xt,addSelectedEdges:Et}=G.getState();gt.key==="Escape"?((pt=Z.current)==null||pt.blur(),xt({edges:[E]})):Et([n])}};return P.jsx("svg",{style:{zIndex:S},children:P.jsxs("g",{className:re(["react-flow__edge",\`react-flow__edge-\${q}\`,E.className,C,{selected:E.selected,animated:E.animated,inactive:!et&&!o,updating:L,selectable:et}]),onClick:z,onDoubleClick:X,onContextMenu:$,onMouseEnter:I,onMouseMove:at,onMouseLeave:dt,onKeyDown:k?ht:void 0,tabIndex:k?0:void 0,role:E.ariaRole??(k?"group":"img"),"aria-roledescription":"edge","data-id":n,"data-testid":\`rf__edge-\${n}\`,"aria-label":E.ariaLabel===null?void 0:E.ariaLabel||\`Edge from \${E.source} to \${E.target}\`,"aria-describedby":k?\`\${Tp}-\${w}\`:void 0,ref:Z,...E.domAttributes,children:[!Q&&P.jsx(Y,{id:n,source:E.source,target:E.target,type:E.type,selected:E.selected,animated:E.animated,selectable:et,deletable:E.deletable??!0,label:E.label,labelStyle:E.labelStyle,labelShowBg:E.labelShowBg,labelBgStyle:E.labelBgStyle,labelBgPadding:E.labelBgPadding,labelBgBorderRadius:E.labelBgBorderRadius,sourceX:H,sourceY:j,targetX:U,targetY:J,sourcePosition:M,targetPosition:B,data:E.data,style:E.style,sourceHandleId:E.sourceHandle,targetHandleId:E.targetHandle,markerStart:F,markerEnd:R,pathOptions:"pathOptions"in E?E.pathOptions:void 0,interactionWidth:E.interactionWidth}),K&&P.jsx(L2,{edge:E,isReconnectable:K,reconnectRadius:p,onReconnect:y,onReconnectStart:v,onReconnectEnd:x,sourceX:H,sourceY:j,targetX:U,targetY:J,sourcePosition:M,targetPosition:B,setUpdateHover:V,setReconnecting:T})]})})}var q2=ut.memo(k2);const V2=n=>({edgesFocusable:n.edgesFocusable,edgesReconnectable:n.edgesReconnectable,elementsSelectable:n.elementsSelectable,connectionMode:n.connectionMode,onError:n.onError});function Ip({defaultMarkerColor:n,onlyRenderVisibleElements:i,rfId:r,edgeTypes:u,noPanClassName:o,onReconnect:s,onEdgeContextMenu:d,onEdgeMouseEnter:m,onEdgeMouseMove:h,onEdgeMouseLeave:g,onEdgeClick:p,reconnectRadius:y,onEdgeDoubleClick:v,onReconnectStart:x,onReconnectEnd:w,disableKeyboardA11y:N}){const{edgesFocusable:C,edgesReconnectable:A,elementsSelectable:D,onError:E}=Dt(V2,Kt),_=N2(i);return P.jsxs("div",{className:"react-flow__edges",children:[P.jsx(z2,{defaultColor:n,rfId:r}),_.map(q=>P.jsx(q2,{id:q,edgesFocusable:C,edgesReconnectable:A,elementsSelectable:D,noPanClassName:o,onReconnect:s,onContextMenu:d,onMouseEnter:m,onMouseMove:h,onMouseLeave:g,onClick:p,reconnectRadius:y,onDoubleClick:v,onReconnectStart:x,onReconnectEnd:w,rfId:r,onError:E,edgeTypes:u,disableKeyboardA11y:N},q))]})}Ip.displayName="EdgeRenderer";const X2=ut.memo(Ip),G2=n=>\`translate(\${n.transform[0]}px,\${n.transform[1]}px) scale(\${n.transform[2]})\`;function Q2({children:n}){const i=Dt(G2);return P.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:i},children:n})}function Z2(n){const i=ad(),r=ut.useRef(!1);ut.useEffect(()=>{!r.current&&i.viewportInitialized&&n&&(setTimeout(()=>n(i),1),r.current=!0)},[n,i.viewportInitialized])}const K2=n=>{var i;return(i=n.panZoom)==null?void 0:i.syncViewport};function $2(n){const i=Dt(K2),r=$t();return ut.useEffect(()=>{n&&(i==null||i(n),r.setState({transform:[n.x,n.y,n.zoom]}))},[n,i]),null}function J2(n){return n.connection.inProgress?{...n.connection,to:Or(n.connection.to,n.transform)}:{...n.connection}}function W2(n){return J2}function I2(n){const i=W2();return Dt(i,Kt)}const F2=n=>({nodesConnectable:n.nodesConnectable,isValid:n.connection.isValid,inProgress:n.connection.inProgress,width:n.width,height:n.height});function P2({containerStyle:n,style:i,type:r,component:u}){const{nodesConnectable:o,width:s,height:d,isValid:m,inProgress:h}=Dt(F2,Kt);return!(s&&o&&h)?null:P.jsx("svg",{style:n,width:s,height:d,className:"react-flow__connectionline react-flow__container",children:P.jsx("g",{className:re(["react-flow__connection",Fy(m)]),children:P.jsx(Fp,{style:i,type:r,CustomComponent:u,isValid:m})})})}const Fp=({style:n,type:i=Na.Bezier,CustomComponent:r,isValid:u})=>{const{inProgress:o,from:s,fromNode:d,fromHandle:m,fromPosition:h,to:g,toNode:p,toHandle:y,toPosition:v,pointer:x}=I2();if(!o)return;if(r)return P.jsx(r,{connectionLineType:i,connectionLineStyle:n,fromNode:d,fromHandle:m,fromX:s.x,fromY:s.y,toX:g.x,toY:g.y,fromPosition:h,toPosition:v,connectionStatus:Fy(u),toNode:p,toHandle:y,pointer:x});let w="";const N={sourceX:s.x,sourceY:s.y,sourcePosition:h,targetX:g.x,targetY:g.y,targetPosition:v};switch(i){case Na.Bezier:[w]=sp(N);break;case Na.SimpleBezier:[w]=Lp(N);break;case Na.Step:[w]=Yf({...N,borderRadius:0});break;case Na.SmoothStep:[w]=Yf(N);break;default:[w]=dp(N)}return P.jsx("path",{d:w,fill:"none",className:"react-flow__connection-path",style:n})};Fp.displayName="ConnectionLine";const tM={};function ey(n=tM){ut.useRef(n),$t(),ut.useEffect(()=>{},[n])}function eM(){$t(),ut.useRef(!1),ut.useEffect(()=>{},[])}function Pp({nodeTypes:n,edgeTypes:i,onInit:r,onNodeClick:u,onEdgeClick:o,onNodeDoubleClick:s,onEdgeDoubleClick:d,onNodeMouseEnter:m,onNodeMouseMove:h,onNodeMouseLeave:g,onNodeContextMenu:p,onSelectionContextMenu:y,onSelectionStart:v,onSelectionEnd:x,connectionLineType:w,connectionLineStyle:N,connectionLineComponent:C,connectionLineContainerStyle:A,selectionKeyCode:D,selectionOnDrag:E,selectionMode:_,multiSelectionKeyCode:q,panActivationKeyCode:Y,zoomActivationKeyCode:k,deleteKeyCode:K,onlyRenderVisibleElements:et,elementsSelectable:Z,defaultViewport:L,translateExtent:V,minZoom:Q,maxZoom:T,preventScrolling:G,defaultMarkerColor:S,zoomOnScroll:H,zoomOnPinch:j,panOnScroll:U,panOnScrollSpeed:J,panOnScrollMode:M,zoomOnDoubleClick:B,panOnDrag:F,onPaneClick:R,onPaneMouseEnter:z,onPaneMouseMove:X,onPaneMouseLeave:$,onPaneScroll:I,onPaneContextMenu:at,paneClickDistance:dt,nodeClickDistance:ht,onEdgeContextMenu:gt,onEdgeMouseEnter:pt,onEdgeMouseMove:xt,onEdgeMouseLeave:Et,reconnectRadius:_t,onReconnect:It,onReconnectStart:xe,onReconnectEnd:Ce,noDragClassName:We,noWheelClassName:vn,noPanClassName:Ta,disableKeyboardA11y:Aa,nodeExtent:se,rfId:ui,viewport:bn,onViewportChange:Kn}){return ey(n),ey(i),eM(),Z2(r),$2(bn),P.jsx(y2,{onPaneClick:R,onPaneMouseEnter:z,onPaneMouseMove:X,onPaneMouseLeave:$,onPaneContextMenu:at,onPaneScroll:I,paneClickDistance:dt,deleteKeyCode:K,selectionKeyCode:D,selectionOnDrag:E,selectionMode:_,onSelectionStart:v,onSelectionEnd:x,multiSelectionKeyCode:q,panActivationKeyCode:Y,zoomActivationKeyCode:k,elementsSelectable:Z,zoomOnScroll:H,zoomOnPinch:j,zoomOnDoubleClick:B,panOnScroll:U,panOnScrollSpeed:J,panOnScrollMode:M,panOnDrag:F,defaultViewport:L,translateExtent:V,minZoom:Q,maxZoom:T,onSelectionContextMenu:y,preventScrolling:G,noDragClassName:We,noWheelClassName:vn,noPanClassName:Ta,disableKeyboardA11y:Aa,onViewportChange:Kn,isControlledViewport:!!bn,children:P.jsxs(Q2,{children:[P.jsx(X2,{edgeTypes:i,onEdgeClick:o,onEdgeDoubleClick:d,onReconnect:It,onReconnectStart:xe,onReconnectEnd:Ce,onlyRenderVisibleElements:et,onEdgeContextMenu:gt,onEdgeMouseEnter:pt,onEdgeMouseMove:xt,onEdgeMouseLeave:Et,reconnectRadius:_t,defaultMarkerColor:S,noPanClassName:Ta,disableKeyboardA11y:Aa,rfId:ui}),P.jsx(P2,{style:N,type:w,component:C,containerStyle:A}),P.jsx("div",{className:"react-flow__edgelabel-renderer"}),P.jsx(M2,{nodeTypes:n,onNodeClick:u,onNodeDoubleClick:s,onNodeMouseEnter:m,onNodeMouseMove:h,onNodeMouseLeave:g,onNodeContextMenu:p,nodeClickDistance:ht,onlyRenderVisibleElements:et,noPanClassName:Ta,noDragClassName:We,disableKeyboardA11y:Aa,nodeExtent:se,rfId:ui}),P.jsx("div",{className:"react-flow__viewport-portal"})]})})}Pp.displayName="GraphView";const nM=ut.memo(Pp),ny=({nodes:n,edges:i,defaultNodes:r,defaultEdges:u,width:o,height:s,fitView:d,fitViewOptions:m,minZoom:h=.5,maxZoom:g=2,nodeOrigin:p,nodeExtent:y,zIndexMode:v="basic"}={})=>{const x=new Map,w=new Map,N=new Map,C=new Map,A=u??i??[],D=r??n??[],E=p??[0,0],_=y??yr;mp(N,C,A);const q=Uf(D,x,w,{nodeOrigin:E,nodeExtent:_,zIndexMode:v});let Y=[0,0,1];if(d&&o&&s){const k=Tr(x,{filter:L=>!!((L.width||L.initialWidth)&&(L.height||L.initialHeight))}),{x:K,y:et,zoom:Z}=Wf(k,o,s,h,g,(m==null?void 0:m.padding)??.1);Y=[K,et,Z]}return{rfId:"1",width:o??0,height:s??0,transform:Y,nodes:D,nodesInitialized:q,nodeLookup:x,parentLookup:w,edges:A,edgeLookup:C,connectionLookup:N,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:r!==void 0,hasDefaultEdges:u!==void 0,panZoom:null,minZoom:h,maxZoom:g,translateExtent:yr,nodeExtent:_,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:nl.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:E,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:d??!1,fitViewOptions:m,fitViewResolver:null,connection:{...Iy},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:mS,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Wy,zIndexMode:v,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},aM=({nodes:n,edges:i,defaultNodes:r,defaultEdges:u,width:o,height:s,fitView:d,fitViewOptions:m,minZoom:h,maxZoom:g,nodeOrigin:p,nodeExtent:y,zIndexMode:v})=>b_((x,w)=>{async function N(){const{nodeLookup:C,panZoom:A,fitViewOptions:D,fitViewResolver:E,width:_,height:q,minZoom:Y,maxZoom:k}=w();A&&(await hS({nodes:C,width:_,height:q,panZoom:A,minZoom:Y,maxZoom:k},D),E==null||E.resolve(!0),x({fitViewResolver:null}))}return{...ny({nodes:n,edges:i,width:o,height:s,fitView:d,fitViewOptions:m,minZoom:h,maxZoom:g,nodeOrigin:p,nodeExtent:y,defaultNodes:r,defaultEdges:u,zIndexMode:v}),setNodes:C=>{const{nodeLookup:A,parentLookup:D,nodeOrigin:E,elevateNodesOnSelect:_,fitViewQueued:q,zIndexMode:Y}=w(),k=Uf(C,A,D,{nodeOrigin:E,nodeExtent:y,elevateNodesOnSelect:_,checkEquality:!0,zIndexMode:Y});q&&k?(N(),x({nodes:C,nodesInitialized:k,fitViewQueued:!1,fitViewOptions:void 0})):x({nodes:C,nodesInitialized:k})},setEdges:C=>{const{connectionLookup:A,edgeLookup:D}=w();mp(A,D,C),x({edges:C})},setDefaultNodesAndEdges:(C,A)=>{if(C){const{setNodes:D}=w();D(C),x({hasDefaultNodes:!0})}if(A){const{setEdges:D}=w();D(A),x({hasDefaultEdges:!0})}},updateNodeInternals:C=>{const{triggerNodeChanges:A,nodeLookup:D,parentLookup:E,domNode:_,nodeOrigin:q,nodeExtent:Y,debug:k,fitViewQueued:K,zIndexMode:et}=w(),{changes:Z,updatedInternals:L}=BS(C,D,E,_,q,Y,et);L&&(HS(D,E,{nodeOrigin:q,nodeExtent:Y,zIndexMode:et}),K?(N(),x({fitViewQueued:!1,fitViewOptions:void 0})):x({}),(Z==null?void 0:Z.length)>0&&(k&&console.log("React Flow: trigger node changes",Z),A==null||A(Z)))},updateNodePositions:(C,A=!1)=>{const D=[];let E=[];const{nodeLookup:_,triggerNodeChanges:q,connection:Y,updateConnection:k,onNodesChangeMiddlewareMap:K}=w();for(const[et,Z]of C){const L=_.get(et),V=!!(L!=null&&L.expandParent&&(L!=null&&L.parentId)&&(Z!=null&&Z.position)),Q={id:et,type:"position",position:V?{x:Math.max(0,Z.position.x),y:Math.max(0,Z.position.y)}:Z.position,dragging:A};if(L&&Y.inProgress&&Y.fromNode.id===L.id){const T=ri(L,Y.fromHandle,vt.Left,!0);k({...Y,from:T})}V&&L.parentId&&D.push({id:et,parentId:L.parentId,rect:{...Z.internals.positionAbsolute,width:Z.measured.width??0,height:Z.measured.height??0}}),E.push(Q)}if(D.length>0){const{parentLookup:et,nodeOrigin:Z}=w(),L=nd(D,_,et,Z);E.push(...L)}for(const et of K.values())E=et(E);q(E)},triggerNodeChanges:C=>{const{onNodesChange:A,setNodes:D,nodes:E,hasDefaultNodes:_,debug:q}=w();if(C!=null&&C.length){if(_){const Y=k_(C,E);D(Y)}q&&console.log("React Flow: trigger node changes",C),A==null||A(C)}},triggerEdgeChanges:C=>{const{onEdgesChange:A,setEdges:D,edges:E,hasDefaultEdges:_,debug:q}=w();if(C!=null&&C.length){if(_){const Y=q_(C,E);D(Y)}q&&console.log("React Flow: trigger edge changes",C),A==null||A(C)}},addSelectedNodes:C=>{const{multiSelectionActive:A,edgeLookup:D,nodeLookup:E,triggerNodeChanges:_,triggerEdgeChanges:q}=w();if(A){const Y=C.map(k=>Fa(k,!0));_(Y);return}_(Ii(E,new Set([...C]),!0)),q(Ii(D))},addSelectedEdges:C=>{const{multiSelectionActive:A,edgeLookup:D,nodeLookup:E,triggerNodeChanges:_,triggerEdgeChanges:q}=w();if(A){const Y=C.map(k=>Fa(k,!0));q(Y);return}q(Ii(D,new Set([...C]))),_(Ii(E,new Set,!0))},unselectNodesAndEdges:({nodes:C,edges:A}={})=>{const{edges:D,nodes:E,nodeLookup:_,triggerNodeChanges:q,triggerEdgeChanges:Y}=w(),k=C||E,K=A||D,et=k.map(L=>{const V=_.get(L.id);return V&&(V.selected=!1),Fa(L.id,!1)}),Z=K.map(L=>Fa(L.id,!1));q(et),Y(Z)},setMinZoom:C=>{const{panZoom:A,maxZoom:D}=w();A==null||A.setScaleExtent([C,D]),x({minZoom:C})},setMaxZoom:C=>{const{panZoom:A,minZoom:D}=w();A==null||A.setScaleExtent([D,C]),x({maxZoom:C})},setTranslateExtent:C=>{var A;(A=w().panZoom)==null||A.setTranslateExtent(C),x({translateExtent:C})},resetSelectedElements:()=>{const{edges:C,nodes:A,triggerNodeChanges:D,triggerEdgeChanges:E,elementsSelectable:_}=w();if(!_)return;const q=A.reduce((k,K)=>K.selected?[...k,Fa(K.id,!1)]:k,[]),Y=C.reduce((k,K)=>K.selected?[...k,Fa(K.id,!1)]:k,[]);D(q),E(Y)},setNodeExtent:C=>{const{nodes:A,nodeLookup:D,parentLookup:E,nodeOrigin:_,elevateNodesOnSelect:q,nodeExtent:Y,zIndexMode:k}=w();C[0][0]===Y[0][0]&&C[0][1]===Y[0][1]&&C[1][0]===Y[1][0]&&C[1][1]===Y[1][1]||(Uf(A,D,E,{nodeOrigin:_,nodeExtent:C,elevateNodesOnSelect:q,checkEquality:!1,zIndexMode:k}),x({nodeExtent:C}))},panBy:C=>{const{transform:A,width:D,height:E,panZoom:_,translateExtent:q}=w();return US({delta:C,panZoom:_,transform:A,translateExtent:q,width:D,height:E})},setCenter:async(C,A,D)=>{const{width:E,height:_,maxZoom:q,panZoom:Y}=w();if(!Y)return Promise.resolve(!1);const k=typeof(D==null?void 0:D.zoom)<"u"?D.zoom:q;return await Y.setViewport({x:E/2-C*k,y:_/2-A*k,zoom:k},{duration:D==null?void 0:D.duration,ease:D==null?void 0:D.ease,interpolate:D==null?void 0:D.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{x({connection:{...Iy}})},updateConnection:C=>{x({connection:C})},reset:()=>x({...ny()})}},Object.is);function tv({initialNodes:n,initialEdges:i,defaultNodes:r,defaultEdges:u,initialWidth:o,initialHeight:s,initialMinZoom:d,initialMaxZoom:m,initialFitViewOptions:h,fitView:g,nodeOrigin:p,nodeExtent:y,zIndexMode:v,children:x}){const[w]=ut.useState(()=>aM({nodes:n,edges:i,defaultNodes:r,defaultEdges:u,width:o,height:s,fitView:g,minZoom:d,maxZoom:m,fitViewOptions:h,nodeOrigin:p,nodeExtent:y,zIndexMode:v}));return P.jsx(x_,{value:w,children:P.jsx(Q_,{children:x})})}function iM({children:n,nodes:i,edges:r,defaultNodes:u,defaultEdges:o,width:s,height:d,fitView:m,fitViewOptions:h,minZoom:g,maxZoom:p,nodeOrigin:y,nodeExtent:v,zIndexMode:x}){return ut.useContext(Yo)?P.jsx(P.Fragment,{children:n}):P.jsx(tv,{initialNodes:i,initialEdges:r,defaultNodes:u,defaultEdges:o,initialWidth:s,initialHeight:d,fitView:m,initialFitViewOptions:h,initialMinZoom:g,initialMaxZoom:p,nodeOrigin:y,nodeExtent:v,zIndexMode:x,children:n})}const lM={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function rM({nodes:n,edges:i,defaultNodes:r,defaultEdges:u,className:o,nodeTypes:s,edgeTypes:d,onNodeClick:m,onEdgeClick:h,onInit:g,onMove:p,onMoveStart:y,onMoveEnd:v,onConnect:x,onConnectStart:w,onConnectEnd:N,onClickConnectStart:C,onClickConnectEnd:A,onNodeMouseEnter:D,onNodeMouseMove:E,onNodeMouseLeave:_,onNodeContextMenu:q,onNodeDoubleClick:Y,onNodeDragStart:k,onNodeDrag:K,onNodeDragStop:et,onNodesDelete:Z,onEdgesDelete:L,onDelete:V,onSelectionChange:Q,onSelectionDragStart:T,onSelectionDrag:G,onSelectionDragStop:S,onSelectionContextMenu:H,onSelectionStart:j,onSelectionEnd:U,onBeforeDelete:J,connectionMode:M,connectionLineType:B=Na.Bezier,connectionLineStyle:F,connectionLineComponent:R,connectionLineContainerStyle:z,deleteKeyCode:X="Backspace",selectionKeyCode:$="Shift",selectionOnDrag:I=!1,selectionMode:at=pr.Full,panActivationKeyCode:dt="Space",multiSelectionKeyCode:ht=br()?"Meta":"Control",zoomActivationKeyCode:gt=br()?"Meta":"Control",snapToGrid:pt,snapGrid:xt,onlyRenderVisibleElements:Et=!1,selectNodesOnDrag:_t,nodesDraggable:It,autoPanOnNodeFocus:xe,nodesConnectable:Ce,nodesFocusable:We,nodeOrigin:vn=Ap,edgesFocusable:Ta,edgesReconnectable:Aa,elementsSelectable:se=!0,defaultViewport:ui=H_,minZoom:bn=.5,maxZoom:Kn=2,translateExtent:Oa=yr,preventScrolling:qo=!0,nodeExtent:oi,defaultMarkerColor:Vo="#b1b1b7",zoomOnScroll:Xo=!0,zoomOnPinch:Ca=!0,panOnScroll:pe=!1,panOnScrollSpeed:on=.5,panOnScrollMode:ve=ni.Free,zoomOnDoubleClick:Go=!0,panOnDrag:Qo=!0,onPaneClick:Zo,onPaneMouseEnter:ci,onPaneMouseMove:si,onPaneMouseLeave:fi,onPaneScroll:xn,onPaneContextMenu:di,paneClickDistance:za=1,nodeClickDistance:Ko=0,children:Cr,onReconnect:ol,onReconnectStart:Da,onReconnectEnd:$o,onEdgeContextMenu:zr,onEdgeDoubleClick:Dr,onEdgeMouseEnter:Hr,onEdgeMouseMove:cl,onEdgeMouseLeave:sl,reconnectRadius:Rr=10,onNodesChange:jr,onEdgesChange:cn,noDragClassName:ue="nodrag",noWheelClassName:me="nowheel",noPanClassName:wn="nopan",fitView:hi,fitViewOptions:Yr,connectOnClick:Jo,attributionPosition:Br,proOptions:Ha,defaultEdgeOptions:fl,elevateNodesOnSelect:$n=!0,elevateEdgesOnSelect:Jn=!1,disableKeyboardA11y:Wn=!1,autoPanOnConnect:In,autoPanOnNodeDrag:te,autoPanSpeed:Ur,connectionRadius:Lr,isValidConnection:En,onError:Fn,style:Wo,id:dl,nodeDragThreshold:kr,connectionDragThreshold:Io,viewport:gi,onViewportChange:mi,width:Ie,height:we,colorMode:qr="light",debug:Fo,onScroll:Pn,ariaLabelConfig:Vr,zIndexMode:Ra="basic",...Po},Ee){const ja=dl||"1",Xr=B_(qr),hl=ut.useCallback(Sn=>{Sn.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Pn==null||Pn(Sn)},[Pn]);return P.jsx("div",{"data-testid":"rf__wrapper",...Po,onScroll:hl,style:{...Wo,...lM},ref:Ee,className:re(["react-flow",o,Xr]),id:dl,role:"application",children:P.jsxs(iM,{nodes:n,edges:i,width:Ie,height:we,fitView:hi,fitViewOptions:Yr,minZoom:bn,maxZoom:Kn,nodeOrigin:vn,nodeExtent:oi,zIndexMode:Ra,children:[P.jsx(nM,{onInit:g,onNodeClick:m,onEdgeClick:h,onNodeMouseEnter:D,onNodeMouseMove:E,onNodeMouseLeave:_,onNodeContextMenu:q,onNodeDoubleClick:Y,nodeTypes:s,edgeTypes:d,connectionLineType:B,connectionLineStyle:F,connectionLineComponent:R,connectionLineContainerStyle:z,selectionKeyCode:$,selectionOnDrag:I,selectionMode:at,deleteKeyCode:X,multiSelectionKeyCode:ht,panActivationKeyCode:dt,zoomActivationKeyCode:gt,onlyRenderVisibleElements:Et,defaultViewport:ui,translateExtent:Oa,minZoom:bn,maxZoom:Kn,preventScrolling:qo,zoomOnScroll:Xo,zoomOnPinch:Ca,zoomOnDoubleClick:Go,panOnScroll:pe,panOnScrollSpeed:on,panOnScrollMode:ve,panOnDrag:Qo,onPaneClick:Zo,onPaneMouseEnter:ci,onPaneMouseMove:si,onPaneMouseLeave:fi,onPaneScroll:xn,onPaneContextMenu:di,paneClickDistance:za,nodeClickDistance:Ko,onSelectionContextMenu:H,onSelectionStart:j,onSelectionEnd:U,onReconnect:ol,onReconnectStart:Da,onReconnectEnd:$o,onEdgeContextMenu:zr,onEdgeDoubleClick:Dr,onEdgeMouseEnter:Hr,onEdgeMouseMove:cl,onEdgeMouseLeave:sl,reconnectRadius:Rr,defaultMarkerColor:Vo,noDragClassName:ue,noWheelClassName:me,noPanClassName:wn,rfId:ja,disableKeyboardA11y:Wn,nodeExtent:oi,viewport:gi,onViewportChange:mi}),P.jsx(Y_,{nodes:n,edges:i,defaultNodes:r,defaultEdges:u,onConnect:x,onConnectStart:w,onConnectEnd:N,onClickConnectStart:C,onClickConnectEnd:A,nodesDraggable:It,autoPanOnNodeFocus:xe,nodesConnectable:Ce,nodesFocusable:We,edgesFocusable:Ta,edgesReconnectable:Aa,elementsSelectable:se,elevateNodesOnSelect:$n,elevateEdgesOnSelect:Jn,minZoom:bn,maxZoom:Kn,nodeExtent:oi,onNodesChange:jr,onEdgesChange:cn,snapToGrid:pt,snapGrid:xt,connectionMode:M,translateExtent:Oa,connectOnClick:Jo,defaultEdgeOptions:fl,fitView:hi,fitViewOptions:Yr,onNodesDelete:Z,onEdgesDelete:L,onDelete:V,onNodeDragStart:k,onNodeDrag:K,onNodeDragStop:et,onSelectionDrag:G,onSelectionDragStart:T,onSelectionDragStop:S,onMove:p,onMoveStart:y,onMoveEnd:v,noPanClassName:wn,nodeOrigin:vn,rfId:ja,autoPanOnConnect:In,autoPanOnNodeDrag:te,autoPanSpeed:Ur,onError:Fn,connectionRadius:Lr,isValidConnection:En,selectNodesOnDrag:_t,nodeDragThreshold:kr,connectionDragThreshold:Io,onBeforeDelete:J,debug:Fo,ariaLabelConfig:Vr,zIndexMode:Ra}),P.jsx(D_,{onSelectionChange:Q}),Cr,P.jsx(T_,{proOptions:Ha,position:Br}),P.jsx(N_,{rfId:ja,disableKeyboardA11y:Wn})]})})}var uM=Cp(rM);function oM({dimensions:n,lineWidth:i,variant:r,className:u}){return P.jsx("path",{strokeWidth:i,d:\`M\${n[0]/2} 0 V\${n[1]} M0 \${n[1]/2} H\${n[0]}\`,className:re(["react-flow__background-pattern",r,u])})}function cM({radius:n,className:i}){return P.jsx("circle",{cx:n,cy:n,r:n,className:re(["react-flow__background-pattern","dots",i])})}var Xn;(function(n){n.Lines="lines",n.Dots="dots",n.Cross="cross"})(Xn||(Xn={}));const sM={[Xn.Dots]:1,[Xn.Lines]:1,[Xn.Cross]:6},fM=n=>({transform:n.transform,patternId:\`pattern-\${n.rfId}\`});function ev({id:n,variant:i=Xn.Dots,gap:r=20,size:u,lineWidth:o=1,offset:s=0,color:d,bgColor:m,style:h,className:g,patternClassName:p}){const y=ut.useRef(null),{transform:v,patternId:x}=Dt(fM,Kt),w=u||sM[i],N=i===Xn.Dots,C=i===Xn.Cross,A=Array.isArray(r)?r:[r,r],D=[A[0]*v[2]||1,A[1]*v[2]||1],E=w*v[2],_=Array.isArray(s)?s:[s,s],q=C?[E,E]:D,Y=[_[0]*v[2]||1+q[0]/2,_[1]*v[2]||1+q[1]/2],k=\`\${x}\${n||""}\`;return P.jsxs("svg",{className:re(["react-flow__background",g]),style:{...h,...Uo,"--xy-background-color-props":m,"--xy-background-pattern-color-props":d},ref:y,"data-testid":"rf__background",children:[P.jsx("pattern",{id:k,x:v[0]%D[0],y:v[1]%D[1],width:D[0],height:D[1],patternUnits:"userSpaceOnUse",patternTransform:\`translate(-\${Y[0]},-\${Y[1]})\`,children:N?P.jsx(cM,{radius:E/2,className:p}):P.jsx(oM,{dimensions:q,lineWidth:o,variant:i,className:p})}),P.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:\`url(#\${k})\`})]})}ev.displayName="Background";const dM=ut.memo(ev);function hM(){return P.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:P.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function gM(){return P.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:P.jsx("path",{d:"M0 0h32v4.2H0z"})})}function mM(){return P.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:P.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 yM(){return P.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:P.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 pM(){return P.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:P.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 uo({children:n,className:i,...r}){return P.jsx("button",{type:"button",className:re(["react-flow__controls-button",i]),...r,children:n})}const vM=n=>({isInteractive:n.nodesDraggable||n.nodesConnectable||n.elementsSelectable,minZoomReached:n.transform[2]<=n.minZoom,maxZoomReached:n.transform[2]>=n.maxZoom,ariaLabelConfig:n.ariaLabelConfig});function nv({style:n,showZoom:i=!0,showFitView:r=!0,showInteractive:u=!0,fitViewOptions:o,onZoomIn:s,onZoomOut:d,onFitView:m,onInteractiveChange:h,className:g,children:p,position:y="bottom-left",orientation:v="vertical","aria-label":x}){const w=$t(),{isInteractive:N,minZoomReached:C,maxZoomReached:A,ariaLabelConfig:D}=Dt(vM,Kt),{zoomIn:E,zoomOut:_,fitView:q}=ad(),Y=()=>{E(),s==null||s()},k=()=>{_(),d==null||d()},K=()=>{q(o),m==null||m()},et=()=>{w.setState({nodesDraggable:!N,nodesConnectable:!N,elementsSelectable:!N}),h==null||h(!N)},Z=v==="horizontal"?"horizontal":"vertical";return P.jsxs(Bo,{className:re(["react-flow__controls",Z,g]),position:y,style:n,"data-testid":"rf__controls","aria-label":x??D["controls.ariaLabel"],children:[i&&P.jsxs(P.Fragment,{children:[P.jsx(uo,{onClick:Y,className:"react-flow__controls-zoomin",title:D["controls.zoomIn.ariaLabel"],"aria-label":D["controls.zoomIn.ariaLabel"],disabled:A,children:P.jsx(hM,{})}),P.jsx(uo,{onClick:k,className:"react-flow__controls-zoomout",title:D["controls.zoomOut.ariaLabel"],"aria-label":D["controls.zoomOut.ariaLabel"],disabled:C,children:P.jsx(gM,{})})]}),r&&P.jsx(uo,{className:"react-flow__controls-fitview",onClick:K,title:D["controls.fitView.ariaLabel"],"aria-label":D["controls.fitView.ariaLabel"],children:P.jsx(mM,{})}),u&&P.jsx(uo,{className:"react-flow__controls-interactive",onClick:et,title:D["controls.interactive.ariaLabel"],"aria-label":D["controls.interactive.ariaLabel"],children:N?P.jsx(pM,{}):P.jsx(yM,{})}),p]})}nv.displayName="Controls";const bM=ut.memo(nv);function xM({id:n,x:i,y:r,width:u,height:o,style:s,color:d,strokeColor:m,strokeWidth:h,className:g,borderRadius:p,shapeRendering:y,selected:v,onClick:x}){const{background:w,backgroundColor:N}=s||{},C=d||w||N;return P.jsx("rect",{className:re(["react-flow__minimap-node",{selected:v},g]),x:i,y:r,rx:p,ry:p,width:u,height:o,style:{fill:C,stroke:m,strokeWidth:h},shapeRendering:y,onClick:x?A=>x(A,n):void 0})}const wM=ut.memo(xM),EM=n=>n.nodes.map(i=>i.id),Sf=n=>n instanceof Function?n:()=>n;function SM({nodeStrokeColor:n,nodeColor:i,nodeClassName:r="",nodeBorderRadius:u=5,nodeStrokeWidth:o,nodeComponent:s=wM,onClick:d}){const m=Dt(EM,Kt),h=Sf(i),g=Sf(n),p=Sf(r),y=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return P.jsx(P.Fragment,{children:m.map(v=>P.jsx(MM,{id:v,nodeColorFunc:h,nodeStrokeColorFunc:g,nodeClassNameFunc:p,nodeBorderRadius:u,nodeStrokeWidth:o,NodeComponent:s,onClick:d,shapeRendering:y},v))})}function _M({id:n,nodeColorFunc:i,nodeStrokeColorFunc:r,nodeClassNameFunc:u,nodeBorderRadius:o,nodeStrokeWidth:s,shapeRendering:d,NodeComponent:m,onClick:h}){const{node:g,x:p,y,width:v,height:x}=Dt(w=>{const{internals:N}=w.nodeLookup.get(n),C=N.userNode,{x:A,y:D}=N.positionAbsolute,{width:E,height:_}=Zn(C);return{node:C,x:A,y:D,width:E,height:_}},Kt);return!g||g.hidden||!ip(g)?null:P.jsx(m,{x:p,y,width:v,height:x,style:g.style,selected:!!g.selected,className:u(g),color:i(g),borderRadius:o,strokeColor:r(g),strokeWidth:s,shapeRendering:d,onClick:h,id:g.id})}const MM=ut.memo(_M);var NM=ut.memo(SM);const TM=200,AM=150,OM=n=>!n.hidden,CM=n=>{const i={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:i,boundingRect:n.nodeLookup.size>0?ap(Tr(n.nodeLookup,{filter:OM}),i):i,rfId:n.rfId,panZoom:n.panZoom,translateExtent:n.translateExtent,flowWidth:n.width,flowHeight:n.height,ariaLabelConfig:n.ariaLabelConfig}},zM="react-flow__minimap-desc";function av({style:n,className:i,nodeStrokeColor:r,nodeColor:u,nodeClassName:o="",nodeBorderRadius:s=5,nodeStrokeWidth:d,nodeComponent:m,bgColor:h,maskColor:g,maskStrokeColor:p,maskStrokeWidth:y,position:v="bottom-right",onClick:x,onNodeClick:w,pannable:N=!1,zoomable:C=!1,ariaLabel:A,inversePan:D,zoomStep:E=1,offsetScale:_=5}){const q=$t(),Y=ut.useRef(null),{boundingRect:k,viewBB:K,rfId:et,panZoom:Z,translateExtent:L,flowWidth:V,flowHeight:Q,ariaLabelConfig:T}=Dt(CM,Kt),G=(n==null?void 0:n.width)??TM,S=(n==null?void 0:n.height)??AM,H=k.width/G,j=k.height/S,U=Math.max(H,j),J=U*G,M=U*S,B=_*U,F=k.x-(J-k.width)/2-B,R=k.y-(M-k.height)/2-B,z=J+B*2,X=M+B*2,$=\`\${zM}-\${et}\`,I=ut.useRef(0),at=ut.useRef();I.current=U,ut.useEffect(()=>{if(Y.current&&Z)return at.current=KS({domNode:Y.current,panZoom:Z,getTransform:()=>q.getState().transform,getViewScale:()=>I.current}),()=>{var pt;(pt=at.current)==null||pt.destroy()}},[Z]),ut.useEffect(()=>{var pt;(pt=at.current)==null||pt.update({translateExtent:L,width:V,height:Q,inversePan:D,pannable:N,zoomStep:E,zoomable:C})},[N,C,D,E,L,V,Q]);const dt=x?pt=>{var _t;const[xt,Et]=((_t=at.current)==null?void 0:_t.pointer(pt))||[0,0];x(pt,{x:xt,y:Et})}:void 0,ht=w?ut.useCallback((pt,xt)=>{const Et=q.getState().nodeLookup.get(xt).internals.userNode;w(pt,Et)},[]):void 0,gt=A??T["minimap.ariaLabel"];return P.jsx(Bo,{position:v,style:{...n,"--xy-minimap-background-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-background-color-props":typeof g=="string"?g:void 0,"--xy-minimap-mask-stroke-color-props":typeof p=="string"?p:void 0,"--xy-minimap-mask-stroke-width-props":typeof y=="number"?y*U:void 0,"--xy-minimap-node-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-node-stroke-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-width-props":typeof d=="number"?d:void 0},className:re(["react-flow__minimap",i]),"data-testid":"rf__minimap",children:P.jsxs("svg",{width:G,height:S,viewBox:\`\${F} \${R} \${z} \${X}\`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":$,ref:Y,onClick:dt,children:[gt&&P.jsx("title",{id:$,children:gt}),P.jsx(NM,{onClick:ht,nodeColor:u,nodeStrokeColor:r,nodeBorderRadius:s,nodeClassName:o,nodeStrokeWidth:d,nodeComponent:m}),P.jsx("path",{className:"react-flow__minimap-mask",d:\`M\${F-B},\${R-B}h\${z+B*2}v\${X+B*2}h\${-z-B*2}z
|
|
77
|
+
M\${K.x},\${K.y}h\${K.width}v\${K.height}h\${-K.width}z\`,fillRule:"evenodd",pointerEvents:"none"})]})})}av.displayName="MiniMap";const DM=ut.memo(av),HM=n=>i=>n?\`\${Math.max(1/i.transform[2],1)}\`:void 0,RM={[rl.Line]:"right",[rl.Handle]:"bottom-right"};function jM({nodeId:n,position:i,variant:r=rl.Handle,className:u,style:o=void 0,children:s,color:d,minWidth:m=10,minHeight:h=10,maxWidth:g=Number.MAX_VALUE,maxHeight:p=Number.MAX_VALUE,keepAspectRatio:y=!1,resizeDirection:v,autoScale:x=!0,shouldResize:w,onResizeStart:N,onResize:C,onResizeEnd:A}){const D=Rp(),E=typeof n=="string"?n:D,_=$t(),q=ut.useRef(null),Y=r===rl.Handle,k=Dt(ut.useCallback(HM(Y&&x),[Y,x]),Kt),K=ut.useRef(null),et=i??RM[r];ut.useEffect(()=>{if(!(!q.current||!E))return K.current||(K.current=u_({domNode:q.current,nodeId:E,getStoreItems:()=>{const{nodeLookup:L,transform:V,snapGrid:Q,snapToGrid:T,nodeOrigin:G,domNode:S}=_.getState();return{nodeLookup:L,transform:V,snapGrid:Q,snapToGrid:T,nodeOrigin:G,paneDomNode:S}},onChange:(L,V)=>{const{triggerNodeChanges:Q,nodeLookup:T,parentLookup:G,nodeOrigin:S}=_.getState(),H=[],j={x:L.x,y:L.y},U=T.get(E);if(U&&U.expandParent&&U.parentId){const J=U.origin??S,M=L.width??U.measured.width??0,B=L.height??U.measured.height??0,F={id:U.id,parentId:U.parentId,rect:{width:M,height:B,...lp({x:L.x??U.position.x,y:L.y??U.position.y},{width:M,height:B},U.parentId,T,J)}},R=nd([F],T,G,S);H.push(...R),j.x=L.x?Math.max(J[0]*M,L.x):void 0,j.y=L.y?Math.max(J[1]*B,L.y):void 0}if(j.x!==void 0&&j.y!==void 0){const J={id:E,type:"position",position:{...j}};H.push(J)}if(L.width!==void 0&&L.height!==void 0){const M={id:E,type:"dimensions",resizing:!0,setAttributes:v?v==="horizontal"?"width":"height":!0,dimensions:{width:L.width,height:L.height}};H.push(M)}for(const J of V){const M={...J,type:"position"};H.push(M)}Q(H)},onEnd:({width:L,height:V})=>{const Q={id:E,type:"dimensions",resizing:!1,dimensions:{width:L,height:V}};_.getState().triggerNodeChanges([Q])}})),K.current.update({controlPosition:et,boundaries:{minWidth:m,minHeight:h,maxWidth:g,maxHeight:p},keepAspectRatio:y,resizeDirection:v,onResizeStart:N,onResize:C,onResizeEnd:A,shouldResize:w}),()=>{var L;(L=K.current)==null||L.destroy()}},[et,m,h,g,p,y,N,C,A,w]);const Z=et.split("-");return P.jsx("div",{className:re(["react-flow__resize-control","nodrag",...Z,r,u]),ref:q,style:{...o,scale:k,...d&&{[Y?"backgroundColor":"borderColor"]:d}},children:s})}ut.memo(jM);async function YM(){const n=await fetch("/api/instances",{cache:"no-store"});if(!n.ok)throw new Error(\`HTTP \${n.status}\`);const i=await n.json();return Array.isArray(i.items)?i.items:[]}async function BM(n,i=20){const r=encodeURIComponent(n),u=await fetch(\`/api/instances/\${r}/visualization?recent=\${i}\`,{cache:"no-store"});if(!u.ok)throw new Error(\`HTTP \${u.status}\`);return u.json()}function ay(n){return[n.at,n.source,n.target??"",n.subtype,n.detail].join("|")}function UM(){const[n,i]=ut.useState([]),[r,u]=ut.useState(null),[o,s]=ut.useState(null),[d,m]=ut.useState([]),h=ut.useRef(new Set),g=ut.useRef([]),p=ut.useRef(!1),y=ut.useCallback(v=>{u(v),h.current.clear(),g.current=[],p.current=!1,m([])},[]);return ut.useEffect(()=>{let v=!0;const x=async()=>{if(v)try{const N=await YM();if(!v)return;i(N),u(C=>C&&N.some(A=>A.key===C)?C:N.length>0?N[0].key:null)}catch{}};x();const w=setInterval(()=>void x(),1e3);return()=>{v=!1,clearInterval(w)}},[]),ut.useEffect(()=>{if(!r){s(null);return}let v=!0;const x=async()=>{if(v)try{const N=await BM(r);if(!v)return;s(N);const C=N.recentEvents??[];if(p.current){const A=[];for(const D of C){const E=ay(D);h.current.has(E)||(h.current.add(E),g.current.push(E),A.push(D))}for(;g.current.length>2e3;){const D=g.current.shift();D&&h.current.delete(D)}A.length>0&&m(A)}else{for(const A of C){const D=ay(A);h.current.add(D),g.current.push(D)}p.current=!0,m([])}}catch{}};x();const w=setInterval(()=>void x(),1e3);return()=>{v=!1,clearInterval(w)}},[r]),{instances:n,selectedKey:r,selectInstance:y,viz:o,pulseEvents:d}}function iv(n){var i,r,u="";if(typeof n=="string"||typeof n=="number")u+=n;else if(typeof n=="object")if(Array.isArray(n)){var o=n.length;for(i=0;i<o;i++)n[i]&&(r=iv(n[i]))&&(u&&(u+=" "),u+=r)}else for(r in n)n[r]&&(u&&(u+=" "),u+=r);return u}function wr(){for(var n,i,r=0,u="",o=arguments.length;r<o;r++)(n=arguments[r])&&(i=iv(n))&&(u&&(u+=" "),u+=i);return u}function LM({instances:n,selectedKey:i,onSelect:r}){return P.jsxs("aside",{className:"left-panel",children:[P.jsxs("div",{className:"brand",children:[P.jsx("div",{className:"brand-kicker",children:"GOONDAN"}),P.jsx("h1",{children:"Studio"})]}),P.jsx("div",{className:"instance-list",children:n.length===0?P.jsx("div",{className:"empty",children:"실행 중인 인스턴스가 없습니다."}):n.map(u=>P.jsxs("button",{type:"button",className:wr("instance-btn",u.key===i&&"is-active"),onClick:()=>r(u.key),children:[P.jsx("div",{className:"inst-key",children:u.key}),P.jsxs("div",{className:"inst-meta",children:[u.status||"unknown"," · ",u.agent||"orchestrator"]})]},u.key))})]})}function kM({instanceKey:n,participantCount:i,eventCount:r,mode:u,onModeChange:o}){return P.jsxs("header",{className:"top-bar",children:[P.jsxs("div",{className:"title-wrap",children:[P.jsx("h2",{children:n??"인스턴스를 선택하세요"}),P.jsx("p",{children:n?\`participants \${i} / events \${r}\`:"runtime event stream"})]}),P.jsxs("div",{className:"mode-toggle",children:[P.jsx("button",{type:"button",className:\`mode-btn\${u==="graph"?" is-active":""}\`,onClick:()=>o("graph"),children:"Graph"}),P.jsx("button",{type:"button",className:\`mode-btn\${u==="flow"?" is-active":""}\`,onClick:()=>o("flow"),children:"Flow"})]})]})}var Lt=(n,i)=>()=>(i||n((i={exports:{}}).exports,i),i.exports),rn=Lt((n,i)=>{var r=Object.defineProperty,u=(Q,T,G)=>T in Q?r(Q,T,{enumerable:!0,configurable:!0,writable:!0,value:G}):Q[T]=G,o=(Q,T)=>()=>(T||Q((T={exports:{}}).exports,T),T.exports),s=(Q,T,G)=>u(Q,typeof T!="symbol"?T+"":T,G),d=o((Q,T)=>{var G="\\0",S="\\0",H="",j=class{constructor(R){s(this,"_isDirected",!0),s(this,"_isMultigraph",!1),s(this,"_isCompound",!1),s(this,"_label"),s(this,"_defaultNodeLabelFn",()=>{}),s(this,"_defaultEdgeLabelFn",()=>{}),s(this,"_nodes",{}),s(this,"_in",{}),s(this,"_preds",{}),s(this,"_out",{}),s(this,"_sucs",{}),s(this,"_edgeObjs",{}),s(this,"_edgeLabels",{}),s(this,"_nodeCount",0),s(this,"_edgeCount",0),s(this,"_parent"),s(this,"_children"),R&&(this._isDirected=Object.hasOwn(R,"directed")?R.directed:!0,this._isMultigraph=Object.hasOwn(R,"multigraph")?R.multigraph:!1,this._isCompound=Object.hasOwn(R,"compound")?R.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[S]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(R){return this._label=R,this}graph(){return this._label}setDefaultNodeLabel(R){return this._defaultNodeLabelFn=R,typeof R!="function"&&(this._defaultNodeLabelFn=()=>R),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var R=this;return this.nodes().filter(z=>Object.keys(R._in[z]).length===0)}sinks(){var R=this;return this.nodes().filter(z=>Object.keys(R._out[z]).length===0)}setNodes(R,z){var X=arguments,$=this;return R.forEach(function(I){X.length>1?$.setNode(I,z):$.setNode(I)}),this}setNode(R,z){return Object.hasOwn(this._nodes,R)?(arguments.length>1&&(this._nodes[R]=z),this):(this._nodes[R]=arguments.length>1?z:this._defaultNodeLabelFn(R),this._isCompound&&(this._parent[R]=S,this._children[R]={},this._children[S][R]=!0),this._in[R]={},this._preds[R]={},this._out[R]={},this._sucs[R]={},++this._nodeCount,this)}node(R){return this._nodes[R]}hasNode(R){return Object.hasOwn(this._nodes,R)}removeNode(R){var z=this;if(Object.hasOwn(this._nodes,R)){var X=$=>z.removeEdge(z._edgeObjs[$]);delete this._nodes[R],this._isCompound&&(this._removeFromParentsChildList(R),delete this._parent[R],this.children(R).forEach(function($){z.setParent($)}),delete this._children[R]),Object.keys(this._in[R]).forEach(X),delete this._in[R],delete this._preds[R],Object.keys(this._out[R]).forEach(X),delete this._out[R],delete this._sucs[R],--this._nodeCount}return this}setParent(R,z){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(z===void 0)z=S;else{z+="";for(var X=z;X!==void 0;X=this.parent(X))if(X===R)throw new Error("Setting "+z+" as parent of "+R+" would create a cycle");this.setNode(z)}return this.setNode(R),this._removeFromParentsChildList(R),this._parent[R]=z,this._children[z][R]=!0,this}_removeFromParentsChildList(R){delete this._children[this._parent[R]][R]}parent(R){if(this._isCompound){var z=this._parent[R];if(z!==S)return z}}children(R=S){if(this._isCompound){var z=this._children[R];if(z)return Object.keys(z)}else{if(R===S)return this.nodes();if(this.hasNode(R))return[]}}predecessors(R){var z=this._preds[R];if(z)return Object.keys(z)}successors(R){var z=this._sucs[R];if(z)return Object.keys(z)}neighbors(R){var z=this.predecessors(R);if(z){let $=new Set(z);for(var X of this.successors(R))$.add(X);return Array.from($.values())}}isLeaf(R){var z;return this.isDirected()?z=this.successors(R):z=this.neighbors(R),z.length===0}filterNodes(R){var z=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});z.setGraph(this.graph());var X=this;Object.entries(this._nodes).forEach(function([at,dt]){R(at)&&z.setNode(at,dt)}),Object.values(this._edgeObjs).forEach(function(at){z.hasNode(at.v)&&z.hasNode(at.w)&&z.setEdge(at,X.edge(at))});var $={};function I(at){var dt=X.parent(at);return dt===void 0||z.hasNode(dt)?($[at]=dt,dt):dt in $?$[dt]:I(dt)}return this._isCompound&&z.nodes().forEach(at=>z.setParent(at,I(at))),z}setDefaultEdgeLabel(R){return this._defaultEdgeLabelFn=R,typeof R!="function"&&(this._defaultEdgeLabelFn=()=>R),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(R,z){var X=this,$=arguments;return R.reduce(function(I,at){return $.length>1?X.setEdge(I,at,z):X.setEdge(I,at),at}),this}setEdge(){var R,z,X,$,I=!1,at=arguments[0];typeof at=="object"&&at!==null&&"v"in at?(R=at.v,z=at.w,X=at.name,arguments.length===2&&($=arguments[1],I=!0)):(R=at,z=arguments[1],X=arguments[3],arguments.length>2&&($=arguments[2],I=!0)),R=""+R,z=""+z,X!==void 0&&(X=""+X);var dt=M(this._isDirected,R,z,X);if(Object.hasOwn(this._edgeLabels,dt))return I&&(this._edgeLabels[dt]=$),this;if(X!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(R),this.setNode(z),this._edgeLabels[dt]=I?$:this._defaultEdgeLabelFn(R,z,X);var ht=B(this._isDirected,R,z,X);return R=ht.v,z=ht.w,Object.freeze(ht),this._edgeObjs[dt]=ht,U(this._preds[z],R),U(this._sucs[R],z),this._in[z][dt]=ht,this._out[R][dt]=ht,this._edgeCount++,this}edge(R,z,X){var $=arguments.length===1?F(this._isDirected,arguments[0]):M(this._isDirected,R,z,X);return this._edgeLabels[$]}edgeAsObj(){let R=this.edge(...arguments);return typeof R!="object"?{label:R}:R}hasEdge(R,z,X){var $=arguments.length===1?F(this._isDirected,arguments[0]):M(this._isDirected,R,z,X);return Object.hasOwn(this._edgeLabels,$)}removeEdge(R,z,X){var $=arguments.length===1?F(this._isDirected,arguments[0]):M(this._isDirected,R,z,X),I=this._edgeObjs[$];return I&&(R=I.v,z=I.w,delete this._edgeLabels[$],delete this._edgeObjs[$],J(this._preds[z],R),J(this._sucs[R],z),delete this._in[z][$],delete this._out[R][$],this._edgeCount--),this}inEdges(R,z){return this.isDirected()?this.filterEdges(this._in[R],R,z):this.nodeEdges(R,z)}outEdges(R,z){return this.isDirected()?this.filterEdges(this._out[R],R,z):this.nodeEdges(R,z)}nodeEdges(R,z){if(R in this._nodes)return this.filterEdges({...this._in[R],...this._out[R]},R,z)}filterEdges(R,z,X){if(R){var $=Object.values(R);return X?$.filter(function(I){return I.v===z&&I.w===X||I.v===X&&I.w===z}):$}}};function U(R,z){R[z]?R[z]++:R[z]=1}function J(R,z){--R[z]||delete R[z]}function M(R,z,X,$){var I=""+z,at=""+X;if(!R&&I>at){var dt=I;I=at,at=dt}return I+H+at+H+($===void 0?G:$)}function B(R,z,X,$){var I=""+z,at=""+X;if(!R&&I>at){var dt=I;I=at,at=dt}var ht={v:I,w:at};return $&&(ht.name=$),ht}function F(R,z){return M(R,z.v,z.w,z.name)}T.exports=j}),m=o((Q,T)=>{T.exports="3.0.2"}),h=o((Q,T)=>{T.exports={Graph:d(),version:m()}}),g=o((Q,T)=>{var G=d();T.exports={write:S,read:U};function S(J){var M={options:{directed:J.isDirected(),multigraph:J.isMultigraph(),compound:J.isCompound()},nodes:H(J),edges:j(J)};return J.graph()!==void 0&&(M.value=structuredClone(J.graph())),M}function H(J){return J.nodes().map(function(M){var B=J.node(M),F=J.parent(M),R={v:M};return B!==void 0&&(R.value=B),F!==void 0&&(R.parent=F),R})}function j(J){return J.edges().map(function(M){var B=J.edge(M),F={v:M.v,w:M.w};return M.name!==void 0&&(F.name=M.name),B!==void 0&&(F.value=B),F})}function U(J){var M=new G(J.options).setGraph(J.value);return J.nodes.forEach(function(B){M.setNode(B.v,B.value),B.parent&&M.setParent(B.v,B.parent)}),J.edges.forEach(function(B){M.setEdge({v:B.v,w:B.w,name:B.name},B.value)}),M}}),p=o((Q,T)=>{T.exports=S;var G=()=>1;function S(j,U,J,M){return H(j,String(U),J||G,M||function(B){return j.outEdges(B)})}function H(j,U,J,M){var B={},F=!0,R=0,z=j.nodes(),X=function(dt){var ht=J(dt);B[dt.v].distance+ht<B[dt.w].distance&&(B[dt.w]={distance:B[dt.v].distance+ht,predecessor:dt.v},F=!0)},$=function(){z.forEach(function(dt){M(dt).forEach(function(ht){var gt=ht.v===dt?ht.v:ht.w,pt=gt===ht.v?ht.w:ht.v;X({v:gt,w:pt})})})};z.forEach(function(dt){var ht=dt===U?0:Number.POSITIVE_INFINITY;B[dt]={distance:ht}});for(var I=z.length,at=1;at<I&&(F=!1,R++,$(),!!F);at++);if(R===I-1&&(F=!1,$(),F))throw new Error("The graph contains a negative weight cycle");return B}}),y=o((Q,T)=>{T.exports=G;function G(S){var H={},j=[],U;function J(M){Object.hasOwn(H,M)||(H[M]=!0,U.push(M),S.successors(M).forEach(J),S.predecessors(M).forEach(J))}return S.nodes().forEach(function(M){U=[],J(M),U.length&&j.push(U)}),j}}),v=o((Q,T)=>{var G=class{constructor(){s(this,"_arr",[]),s(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(S){return S.key})}has(S){return Object.hasOwn(this._keyIndices,S)}priority(S){var H=this._keyIndices[S];if(H!==void 0)return this._arr[H].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(S,H){var j=this._keyIndices;if(S=String(S),!Object.hasOwn(j,S)){var U=this._arr,J=U.length;return j[S]=J,U.push({key:S,priority:H}),this._decrease(J),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var S=this._arr.pop();return delete this._keyIndices[S.key],this._heapify(0),S.key}decrease(S,H){var j=this._keyIndices[S];if(H>this._arr[j].priority)throw new Error("New priority is greater than current priority. Key: "+S+" Old: "+this._arr[j].priority+" New: "+H);this._arr[j].priority=H,this._decrease(j)}_heapify(S){var H=this._arr,j=2*S,U=j+1,J=S;j<H.length&&(J=H[j].priority<H[J].priority?j:J,U<H.length&&(J=H[U].priority<H[J].priority?U:J),J!==S&&(this._swap(S,J),this._heapify(J)))}_decrease(S){for(var H=this._arr,j=H[S].priority,U;S!==0&&(U=S>>1,!(H[U].priority<j));)this._swap(S,U),S=U}_swap(S,H){var j=this._arr,U=this._keyIndices,J=j[S],M=j[H];j[S]=M,j[H]=J,U[M.key]=S,U[J.key]=H}};T.exports=G}),x=o((Q,T)=>{var G=v();T.exports=H;var S=()=>1;function H(U,J,M,B){var F=function(R){return U.outEdges(R)};return j(U,String(J),M||S,B||F)}function j(U,J,M,B){var F={},R=new G,z,X,$=function(I){var at=I.v!==z?I.v:I.w,dt=F[at],ht=M(I),gt=X.distance+ht;if(ht<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+I+" Weight: "+ht);gt<dt.distance&&(dt.distance=gt,dt.predecessor=z,R.decrease(at,gt))};for(U.nodes().forEach(function(I){var at=I===J?0:Number.POSITIVE_INFINITY;F[I]={distance:at},R.add(I,at)});R.size()>0&&(z=R.removeMin(),X=F[z],X.distance!==Number.POSITIVE_INFINITY);)B(z).forEach($);return F}}),w=o((Q,T)=>{var G=x();T.exports=S;function S(H,j,U){return H.nodes().reduce(function(J,M){return J[M]=G(H,M,j,U),J},{})}}),N=o((Q,T)=>{T.exports=G;function G(H,j,U){if(H[j].predecessor!==void 0)throw new Error("Invalid source vertex");if(H[U].predecessor===void 0&&U!==j)throw new Error("Invalid destination vertex");return{weight:H[U].distance,path:S(H,j,U)}}function S(H,j,U){for(var J=[],M=U;M!==j;)J.push(M),M=H[M].predecessor;return J.push(j),J.reverse()}}),C=o((Q,T)=>{T.exports=G;function G(S){var H=0,j=[],U={},J=[];function M(B){var F=U[B]={onStack:!0,lowlink:H,index:H++};if(j.push(B),S.successors(B).forEach(function(X){Object.hasOwn(U,X)?U[X].onStack&&(F.lowlink=Math.min(F.lowlink,U[X].index)):(M(X),F.lowlink=Math.min(F.lowlink,U[X].lowlink))}),F.lowlink===F.index){var R=[],z;do z=j.pop(),U[z].onStack=!1,R.push(z);while(B!==z);J.push(R)}}return S.nodes().forEach(function(B){Object.hasOwn(U,B)||M(B)}),J}}),A=o((Q,T)=>{var G=C();T.exports=S;function S(H){return G(H).filter(function(j){return j.length>1||j.length===1&&H.hasEdge(j[0],j[0])})}}),D=o((Q,T)=>{T.exports=S;var G=()=>1;function S(j,U,J){return H(j,U||G,J||function(M){return j.outEdges(M)})}function H(j,U,J){var M={},B=j.nodes();return B.forEach(function(F){M[F]={},M[F][F]={distance:0},B.forEach(function(R){F!==R&&(M[F][R]={distance:Number.POSITIVE_INFINITY})}),J(F).forEach(function(R){var z=R.v===F?R.w:R.v,X=U(R);M[F][z]={distance:X,predecessor:F}})}),B.forEach(function(F){var R=M[F];B.forEach(function(z){var X=M[z];B.forEach(function($){var I=X[F],at=R[$],dt=X[$],ht=I.distance+at.distance;ht<dt.distance&&(dt.distance=ht,dt.predecessor=at.predecessor)})})}),M}}),E=o((Q,T)=>{function G(H){var j={},U={},J=[];function M(B){if(Object.hasOwn(U,B))throw new S;Object.hasOwn(j,B)||(U[B]=!0,j[B]=!0,H.predecessors(B).forEach(M),delete U[B],J.push(B))}if(H.sinks().forEach(M),Object.keys(j).length!==H.nodeCount())throw new S;return J}var S=class extends Error{constructor(){super(...arguments)}};T.exports=G,G.CycleException=S}),_=o((Q,T)=>{var G=E();T.exports=S;function S(H){try{G(H)}catch(j){if(j instanceof G.CycleException)return!1;throw j}return!0}}),q=o((Q,T)=>{T.exports=G;function G(H,j,U,J,M){Array.isArray(j)||(j=[j]);var B=(H.isDirected()?H.successors:H.neighbors).bind(H),F={};return j.forEach(function(R){if(!H.hasNode(R))throw new Error("Graph does not have node: "+R);M=S(H,R,U==="post",F,B,J,M)}),M}function S(H,j,U,J,M,B,F){return Object.hasOwn(J,j)||(J[j]=!0,U||(F=B(F,j)),M(j).forEach(function(R){F=S(H,R,U,J,M,B,F)}),U&&(F=B(F,j))),F}}),Y=o((Q,T)=>{var G=q();T.exports=S;function S(H,j,U){return G(H,j,U,function(J,M){return J.push(M),J},[])}}),k=o((Q,T)=>{var G=Y();T.exports=S;function S(H,j){return G(H,j,"post")}}),K=o((Q,T)=>{var G=Y();T.exports=S;function S(H,j){return G(H,j,"pre")}}),et=o((Q,T)=>{var G=d(),S=v();T.exports=H;function H(j,U){var J=new G,M={},B=new S,F;function R(X){var $=X.v===F?X.w:X.v,I=B.priority($);if(I!==void 0){var at=U(X);at<I&&(M[$]=F,B.decrease($,at))}}if(j.nodeCount()===0)return J;j.nodes().forEach(function(X){B.add(X,Number.POSITIVE_INFINITY),J.setNode(X)}),B.decrease(j.nodes()[0],0);for(var z=!1;B.size()>0;){if(F=B.removeMin(),Object.hasOwn(M,F))J.setEdge(F,M[F]);else{if(z)throw new Error("Input graph is not connected: "+j);z=!0}j.nodeEdges(F).forEach(R)}return J}}),Z=o((Q,T)=>{var G=x(),S=p();T.exports=H;function H(U,J,M,B){return j(U,J,M,B||function(F){return U.outEdges(F)})}function j(U,J,M,B){if(M===void 0)return G(U,J,M,B);for(var F=!1,R=U.nodes(),z=0;z<R.length;z++){for(var X=B(R[z]),$=0;$<X.length;$++){var I=X[$],at=I.v===R[z]?I.v:I.w,dt=at===I.v?I.w:I.v;M({v:at,w:dt})<0&&(F=!0)}if(F)return S(U,J,M,B)}return G(U,J,M,B)}}),L=o((Q,T)=>{T.exports={bellmanFord:p(),components:y(),dijkstra:x(),dijkstraAll:w(),extractPath:N(),findCycles:A(),floydWarshall:D(),isAcyclic:_(),postorder:k(),preorder:K(),prim:et(),shortestPaths:Z(),reduce:q(),tarjan:C(),topsort:E()}}),V=h();i.exports={Graph:V.Graph,json:g(),alg:L(),version:V.version}}),qM=Lt((n,i)=>{var r=class{constructor(){let s={};s._next=s._prev=s,this._sentinel=s}dequeue(){let s=this._sentinel,d=s._prev;if(d!==s)return u(d),d}enqueue(s){let d=this._sentinel;s._prev&&s._next&&u(s),s._next=d._next,d._next._prev=s,d._next=s,s._prev=d}toString(){let s=[],d=this._sentinel,m=d._prev;for(;m!==d;)s.push(JSON.stringify(m,o)),m=m._prev;return"["+s.join(", ")+"]"}};function u(s){s._prev._next=s._next,s._next._prev=s._prev,delete s._next,delete s._prev}function o(s,d){if(s!=="_next"&&s!=="_prev")return d}i.exports=r}),VM=Lt((n,i)=>{var r=rn().Graph,u=qM();i.exports=s;var o=()=>1;function s(y,v){if(y.nodeCount()<=1)return[];let x=h(y,v||o);return d(x.graph,x.buckets,x.zeroIdx).flatMap(w=>y.outEdges(w.v,w.w))}function d(y,v,x){let w=[],N=v[v.length-1],C=v[0],A;for(;y.nodeCount();){for(;A=C.dequeue();)m(y,v,x,A);for(;A=N.dequeue();)m(y,v,x,A);if(y.nodeCount()){for(let D=v.length-2;D>0;--D)if(A=v[D].dequeue(),A){w=w.concat(m(y,v,x,A,!0));break}}}return w}function m(y,v,x,w,N){let C=N?[]:void 0;return y.inEdges(w.v).forEach(A=>{let D=y.edge(A),E=y.node(A.v);N&&C.push({v:A.v,w:A.w}),E.out-=D,g(v,x,E)}),y.outEdges(w.v).forEach(A=>{let D=y.edge(A),E=A.w,_=y.node(E);_.in-=D,g(v,x,_)}),y.removeNode(w.v),C}function h(y,v){let x=new r,w=0,N=0;y.nodes().forEach(D=>{x.setNode(D,{v:D,in:0,out:0})}),y.edges().forEach(D=>{let E=x.edge(D.v,D.w)||0,_=v(D),q=E+_;x.setEdge(D.v,D.w,q),N=Math.max(N,x.node(D.v).out+=_),w=Math.max(w,x.node(D.w).in+=_)});let C=p(N+w+3).map(()=>new u),A=w+1;return x.nodes().forEach(D=>{g(C,A,x.node(D))}),{graph:x,buckets:C,zeroIdx:A}}function g(y,v,x){x.out?x.in?y[x.out-x.in+v].enqueue(x):y[y.length-1].enqueue(x):y[0].enqueue(x)}function p(y){let v=[];for(let x=0;x<y;x++)v.push(x);return v}}),le=Lt((n,i)=>{var r=rn().Graph;i.exports={addBorderNode:v,addDummyNode:u,applyWithChunking:N,asNonCompoundGraph:s,buildLayerMatrix:g,intersectRect:h,mapValues:K,maxRank:C,normalizeRanks:p,notime:E,partition:A,pick:k,predecessorWeights:m,range:Y,removeEmptyRanks:y,simplify:o,successorWeights:d,time:D,uniqueId:q,zipObject:et};function u(Z,L,V,Q){for(var T=Q;Z.hasNode(T);)T=q(Q);return V.dummy=L,Z.setNode(T,V),T}function o(Z){let L=new r().setGraph(Z.graph());return Z.nodes().forEach(V=>L.setNode(V,Z.node(V))),Z.edges().forEach(V=>{let Q=L.edge(V.v,V.w)||{weight:0,minlen:1},T=Z.edge(V);L.setEdge(V.v,V.w,{weight:Q.weight+T.weight,minlen:Math.max(Q.minlen,T.minlen)})}),L}function s(Z){let L=new r({multigraph:Z.isMultigraph()}).setGraph(Z.graph());return Z.nodes().forEach(V=>{Z.children(V).length||L.setNode(V,Z.node(V))}),Z.edges().forEach(V=>{L.setEdge(V,Z.edge(V))}),L}function d(Z){let L=Z.nodes().map(V=>{let Q={};return Z.outEdges(V).forEach(T=>{Q[T.w]=(Q[T.w]||0)+Z.edge(T).weight}),Q});return et(Z.nodes(),L)}function m(Z){let L=Z.nodes().map(V=>{let Q={};return Z.inEdges(V).forEach(T=>{Q[T.v]=(Q[T.v]||0)+Z.edge(T).weight}),Q});return et(Z.nodes(),L)}function h(Z,L){let V=Z.x,Q=Z.y,T=L.x-V,G=L.y-Q,S=Z.width/2,H=Z.height/2;if(!T&&!G)throw new Error("Not possible to find intersection inside of the rectangle");let j,U;return Math.abs(G)*S>Math.abs(T)*H?(G<0&&(H=-H),j=H*T/G,U=H):(T<0&&(S=-S),j=S,U=S*G/T),{x:V+j,y:Q+U}}function g(Z){let L=Y(C(Z)+1).map(()=>[]);return Z.nodes().forEach(V=>{let Q=Z.node(V),T=Q.rank;T!==void 0&&(L[T][Q.order]=V)}),L}function p(Z){let L=Z.nodes().map(Q=>{let T=Z.node(Q).rank;return T===void 0?Number.MAX_VALUE:T}),V=N(Math.min,L);Z.nodes().forEach(Q=>{let T=Z.node(Q);Object.hasOwn(T,"rank")&&(T.rank-=V)})}function y(Z){let L=Z.nodes().map(S=>Z.node(S).rank).filter(S=>S!==void 0),V=N(Math.min,L),Q=[];Z.nodes().forEach(S=>{let H=Z.node(S).rank-V;Q[H]||(Q[H]=[]),Q[H].push(S)});let T=0,G=Z.graph().nodeRankFactor;Array.from(Q).forEach((S,H)=>{S===void 0&&H%G!==0?--T:S!==void 0&&T&&S.forEach(j=>Z.node(j).rank+=T)})}function v(Z,L,V,Q){let T={width:0,height:0};return arguments.length>=4&&(T.rank=V,T.order=Q),u(Z,"border",T,L)}function x(Z,L=w){let V=[];for(let Q=0;Q<Z.length;Q+=L){let T=Z.slice(Q,Q+L);V.push(T)}return V}var w=65535;function N(Z,L){if(L.length>w){let V=x(L);return Z.apply(null,V.map(Q=>Z.apply(null,Q)))}else return Z.apply(null,L)}function C(Z){let L=Z.nodes().map(V=>{let Q=Z.node(V).rank;return Q===void 0?Number.MIN_VALUE:Q});return N(Math.max,L)}function A(Z,L){let V={lhs:[],rhs:[]};return Z.forEach(Q=>{L(Q)?V.lhs.push(Q):V.rhs.push(Q)}),V}function D(Z,L){let V=Date.now();try{return L()}finally{console.log(Z+" time: "+(Date.now()-V)+"ms")}}function E(Z,L){return L()}var _=0;function q(Z){var L=++_;return Z+(""+L)}function Y(Z,L,V=1){L==null&&(L=Z,Z=0);let Q=G=>G<L;V<0&&(Q=G=>L<G);let T=[];for(let G=Z;Q(G);G+=V)T.push(G);return T}function k(Z,L){let V={};for(let Q of L)Z[Q]!==void 0&&(V[Q]=Z[Q]);return V}function K(Z,L){let V=L;return typeof L=="string"&&(V=Q=>Q[L]),Object.entries(Z).reduce((Q,[T,G])=>(Q[T]=V(G,T),Q),{})}function et(Z,L){return Z.reduce((V,Q,T)=>(V[Q]=L[T],V),{})}}),XM=Lt((n,i)=>{var r=VM(),u=le().uniqueId;i.exports={run:o,undo:d};function o(m){(m.graph().acyclicer==="greedy"?r(m,h(m)):s(m)).forEach(g=>{let p=m.edge(g);m.removeEdge(g),p.forwardName=g.name,p.reversed=!0,m.setEdge(g.w,g.v,p,u("rev"))});function h(g){return p=>g.edge(p).weight}}function s(m){let h=[],g={},p={};function y(v){Object.hasOwn(p,v)||(p[v]=!0,g[v]=!0,m.outEdges(v).forEach(x=>{Object.hasOwn(g,x.w)?h.push(x):y(x.w)}),delete g[v])}return m.nodes().forEach(y),h}function d(m){m.edges().forEach(h=>{let g=m.edge(h);if(g.reversed){m.removeEdge(h);let p=g.forwardName;delete g.reversed,delete g.forwardName,m.setEdge(h.w,h.v,g,p)}})}}),GM=Lt((n,i)=>{var r=le();i.exports={run:u,undo:s};function u(d){d.graph().dummyChains=[],d.edges().forEach(m=>o(d,m))}function o(d,m){let h=m.v,g=d.node(h).rank,p=m.w,y=d.node(p).rank,v=m.name,x=d.edge(m),w=x.labelRank;if(y===g+1)return;d.removeEdge(m);let N,C,A;for(A=0,++g;g<y;++A,++g)x.points=[],C={width:0,height:0,edgeLabel:x,edgeObj:m,rank:g},N=r.addDummyNode(d,"edge",C,"_d"),g===w&&(C.width=x.width,C.height=x.height,C.dummy="edge-label",C.labelpos=x.labelpos),d.setEdge(h,N,{weight:x.weight},v),A===0&&d.graph().dummyChains.push(N),h=N;d.setEdge(h,p,{weight:x.weight},v)}function s(d){d.graph().dummyChains.forEach(m=>{let h=d.node(m),g=h.edgeLabel,p;for(d.setEdge(h.edgeObj,g);h.dummy;)p=d.successors(m)[0],d.removeNode(m),g.points.push({x:h.x,y:h.y}),h.dummy==="edge-label"&&(g.x=h.x,g.y=h.y,g.width=h.width,g.height=h.height),m=p,h=d.node(m)})}}),No=Lt((n,i)=>{var{applyWithChunking:r}=le();i.exports={longestPath:u,slack:o};function u(s){var d={};function m(h){var g=s.node(h);if(Object.hasOwn(d,h))return g.rank;d[h]=!0;let p=s.outEdges(h).map(v=>v==null?Number.POSITIVE_INFINITY:m(v.w)-s.edge(v).minlen);var y=r(Math.min,p);return y===Number.POSITIVE_INFINITY&&(y=0),g.rank=y}s.sources().forEach(m)}function o(s,d){return s.node(d.w).rank-s.node(d.v).rank-s.edge(d).minlen}}),lv=Lt((n,i)=>{var r=rn().Graph,u=No().slack;i.exports=o;function o(h){var g=new r({directed:!1}),p=h.nodes()[0],y=h.nodeCount();g.setNode(p,{});for(var v,x;s(g,h)<y;)v=d(g,h),x=g.hasNode(v.v)?u(h,v):-u(h,v),m(g,h,x);return g}function s(h,g){function p(y){g.nodeEdges(y).forEach(v=>{var x=v.v,w=y===x?v.w:x;!h.hasNode(w)&&!u(g,v)&&(h.setNode(w,{}),h.setEdge(y,w,{}),p(w))})}return h.nodes().forEach(p),h.nodeCount()}function d(h,g){return g.edges().reduce((p,y)=>{let v=Number.POSITIVE_INFINITY;return h.hasNode(y.v)!==h.hasNode(y.w)&&(v=u(g,y)),v<p[0]?[v,y]:p},[Number.POSITIVE_INFINITY,null])[1]}function m(h,g,p){h.nodes().forEach(y=>g.node(y).rank+=p)}}),QM=Lt((n,i)=>{var r=lv(),u=No().slack,o=No().longestPath,s=rn().alg.preorder,d=rn().alg.postorder,m=le().simplify;i.exports=h,h.initLowLimValues=v,h.initCutValues=g,h.calcCutValue=y,h.leaveEdge=w,h.enterEdge=N,h.exchangeEdges=C;function h(_){_=m(_),o(_);var q=r(_);v(q),g(q,_);for(var Y,k;Y=w(q);)k=N(q,_,Y),C(q,_,Y,k)}function g(_,q){var Y=d(_,_.nodes());Y=Y.slice(0,Y.length-1),Y.forEach(k=>p(_,q,k))}function p(_,q,Y){var k=_.node(Y),K=k.parent;_.edge(Y,K).cutvalue=y(_,q,Y)}function y(_,q,Y){var k=_.node(Y),K=k.parent,et=!0,Z=q.edge(Y,K),L=0;return Z||(et=!1,Z=q.edge(K,Y)),L=Z.weight,q.nodeEdges(Y).forEach(V=>{var Q=V.v===Y,T=Q?V.w:V.v;if(T!==K){var G=Q===et,S=q.edge(V).weight;if(L+=G?S:-S,D(_,Y,T)){var H=_.edge(Y,T).cutvalue;L+=G?-H:H}}}),L}function v(_,q){arguments.length<2&&(q=_.nodes()[0]),x(_,{},1,q)}function x(_,q,Y,k,K){var et=Y,Z=_.node(k);return q[k]=!0,_.neighbors(k).forEach(L=>{Object.hasOwn(q,L)||(Y=x(_,q,Y,L,k))}),Z.low=et,Z.lim=Y++,K?Z.parent=K:delete Z.parent,Y}function w(_){return _.edges().find(q=>_.edge(q).cutvalue<0)}function N(_,q,Y){var k=Y.v,K=Y.w;q.hasEdge(k,K)||(k=Y.w,K=Y.v);var et=_.node(k),Z=_.node(K),L=et,V=!1;et.lim>Z.lim&&(L=Z,V=!0);var Q=q.edges().filter(T=>V===E(_,_.node(T.v),L)&&V!==E(_,_.node(T.w),L));return Q.reduce((T,G)=>u(q,G)<u(q,T)?G:T)}function C(_,q,Y,k){var K=Y.v,et=Y.w;_.removeEdge(K,et),_.setEdge(k.v,k.w,{}),v(_),g(_,q),A(_,q)}function A(_,q){var Y=_.nodes().find(K=>!q.node(K).parent),k=s(_,Y);k=k.slice(1),k.forEach(K=>{var et=_.node(K).parent,Z=q.edge(K,et),L=!1;Z||(Z=q.edge(et,K),L=!0),q.node(K).rank=q.node(et).rank+(L?Z.minlen:-Z.minlen)})}function D(_,q,Y){return _.hasEdge(q,Y)}function E(_,q,Y){return Y.low<=q.lim&&q.lim<=Y.lim}}),ZM=Lt((n,i)=>{var r=No(),u=r.longestPath,o=lv(),s=QM();i.exports=d;function d(p){var y=p.graph().ranker;if(y instanceof Function)return y(p);switch(p.graph().ranker){case"network-simplex":g(p);break;case"tight-tree":h(p);break;case"longest-path":m(p);break;case"none":break;default:g(p)}}var m=u;function h(p){u(p),o(p)}function g(p){s(p)}}),KM=Lt((n,i)=>{i.exports=r;function r(s){let d=o(s);s.graph().dummyChains.forEach(m=>{let h=s.node(m),g=h.edgeObj,p=u(s,d,g.v,g.w),y=p.path,v=p.lca,x=0,w=y[x],N=!0;for(;m!==g.w;){if(h=s.node(m),N){for(;(w=y[x])!==v&&s.node(w).maxRank<h.rank;)x++;w===v&&(N=!1)}if(!N){for(;x<y.length-1&&s.node(w=y[x+1]).minRank<=h.rank;)x++;w=y[x]}s.setParent(m,w),m=s.successors(m)[0]}})}function u(s,d,m,h){let g=[],p=[],y=Math.min(d[m].low,d[h].low),v=Math.max(d[m].lim,d[h].lim),x,w;x=m;do x=s.parent(x),g.push(x);while(x&&(d[x].low>y||v>d[x].lim));for(w=x,x=h;(x=s.parent(x))!==w;)p.push(x);return{path:g.concat(p.reverse()),lca:w}}function o(s){let d={},m=0;function h(g){let p=m;s.children(g).forEach(h),d[g]={low:p,lim:m++}}return s.children().forEach(h),d}}),$M=Lt((n,i)=>{var r=le();i.exports={run:u,cleanup:m};function u(h){let g=r.addDummyNode(h,"root",{},"_root"),p=s(h),y=Object.values(p),v=r.applyWithChunking(Math.max,y)-1,x=2*v+1;h.graph().nestingRoot=g,h.edges().forEach(N=>h.edge(N).minlen*=x);let w=d(h)+1;h.children().forEach(N=>o(h,g,x,w,v,p,N)),h.graph().nodeRankFactor=x}function o(h,g,p,y,v,x,w){let N=h.children(w);if(!N.length){w!==g&&h.setEdge(g,w,{weight:0,minlen:p});return}let C=r.addBorderNode(h,"_bt"),A=r.addBorderNode(h,"_bb"),D=h.node(w);h.setParent(C,w),D.borderTop=C,h.setParent(A,w),D.borderBottom=A,N.forEach(E=>{o(h,g,p,y,v,x,E);let _=h.node(E),q=_.borderTop?_.borderTop:E,Y=_.borderBottom?_.borderBottom:E,k=_.borderTop?y:2*y,K=q!==Y?1:v-x[w]+1;h.setEdge(C,q,{weight:k,minlen:K,nestingEdge:!0}),h.setEdge(Y,A,{weight:k,minlen:K,nestingEdge:!0})}),h.parent(w)||h.setEdge(g,C,{weight:0,minlen:v+x[w]})}function s(h){var g={};function p(y,v){var x=h.children(y);x&&x.length&&x.forEach(w=>p(w,v+1)),g[y]=v}return h.children().forEach(y=>p(y,1)),g}function d(h){return h.edges().reduce((g,p)=>g+h.edge(p).weight,0)}function m(h){var g=h.graph();h.removeNode(g.nestingRoot),delete g.nestingRoot,h.edges().forEach(p=>{var y=h.edge(p);y.nestingEdge&&h.removeEdge(p)})}}),JM=Lt((n,i)=>{var r=le();i.exports=u;function u(s){function d(m){let h=s.children(m),g=s.node(m);if(h.length&&h.forEach(d),Object.hasOwn(g,"minRank")){g.borderLeft=[],g.borderRight=[];for(let p=g.minRank,y=g.maxRank+1;p<y;++p)o(s,"borderLeft","_bl",m,g,p),o(s,"borderRight","_br",m,g,p)}}s.children().forEach(d)}function o(s,d,m,h,g,p){let y={width:0,height:0,rank:p,borderType:d},v=g[d][p-1],x=r.addDummyNode(s,"border",y,m);g[d][p]=x,s.setParent(x,h),v&&s.setEdge(v,x,{weight:1})}}),WM=Lt((n,i)=>{i.exports={adjust:r,undo:u};function r(p){let y=p.graph().rankdir.toLowerCase();(y==="lr"||y==="rl")&&o(p)}function u(p){let y=p.graph().rankdir.toLowerCase();(y==="bt"||y==="rl")&&d(p),(y==="lr"||y==="rl")&&(h(p),o(p))}function o(p){p.nodes().forEach(y=>s(p.node(y))),p.edges().forEach(y=>s(p.edge(y)))}function s(p){let y=p.width;p.width=p.height,p.height=y}function d(p){p.nodes().forEach(y=>m(p.node(y))),p.edges().forEach(y=>{let v=p.edge(y);v.points.forEach(m),Object.hasOwn(v,"y")&&m(v)})}function m(p){p.y=-p.y}function h(p){p.nodes().forEach(y=>g(p.node(y))),p.edges().forEach(y=>{let v=p.edge(y);v.points.forEach(g),Object.hasOwn(v,"x")&&g(v)})}function g(p){let y=p.x;p.x=p.y,p.y=y}}),IM=Lt((n,i)=>{var r=le();i.exports=u;function u(o){let s={},d=o.nodes().filter(y=>!o.children(y).length),m=d.map(y=>o.node(y).rank),h=r.applyWithChunking(Math.max,m),g=r.range(h+1).map(()=>[]);function p(y){if(s[y])return;s[y]=!0;let v=o.node(y);g[v.rank].push(y),o.successors(y).forEach(p)}return d.sort((y,v)=>o.node(y).rank-o.node(v).rank).forEach(p),g}}),FM=Lt((n,i)=>{var r=le().zipObject;i.exports=u;function u(s,d){let m=0;for(let h=1;h<d.length;++h)m+=o(s,d[h-1],d[h]);return m}function o(s,d,m){let h=r(m,m.map((w,N)=>N)),g=d.flatMap(w=>s.outEdges(w).map(N=>({pos:h[N.w],weight:s.edge(N).weight})).sort((N,C)=>N.pos-C.pos)),p=1;for(;p<m.length;)p<<=1;let y=2*p-1;p-=1;let v=new Array(y).fill(0),x=0;return g.forEach(w=>{let N=w.pos+p;v[N]+=w.weight;let C=0;for(;N>0;)N%2&&(C+=v[N+1]),N=N-1>>1,v[N]+=w.weight;x+=w.weight*C}),x}}),PM=Lt((n,i)=>{i.exports=r;function r(u,o=[]){return o.map(s=>{let d=u.inEdges(s);if(d.length){let m=d.reduce((h,g)=>{let p=u.edge(g),y=u.node(g.v);return{sum:h.sum+p.weight*y.order,weight:h.weight+p.weight}},{sum:0,weight:0});return{v:s,barycenter:m.sum/m.weight,weight:m.weight}}else return{v:s}})}}),tN=Lt((n,i)=>{var r=le();i.exports=u;function u(d,m){let h={};d.forEach((p,y)=>{let v=h[p.v]={indegree:0,in:[],out:[],vs:[p.v],i:y};p.barycenter!==void 0&&(v.barycenter=p.barycenter,v.weight=p.weight)}),m.edges().forEach(p=>{let y=h[p.v],v=h[p.w];y!==void 0&&v!==void 0&&(v.indegree++,y.out.push(h[p.w]))});let g=Object.values(h).filter(p=>!p.indegree);return o(g)}function o(d){let m=[];function h(p){return y=>{y.merged||(y.barycenter===void 0||p.barycenter===void 0||y.barycenter>=p.barycenter)&&s(p,y)}}function g(p){return y=>{y.in.push(p),--y.indegree===0&&d.push(y)}}for(;d.length;){let p=d.pop();m.push(p),p.in.reverse().forEach(h(p)),p.out.forEach(g(p))}return m.filter(p=>!p.merged).map(p=>r.pick(p,["vs","i","barycenter","weight"]))}function s(d,m){let h=0,g=0;d.weight&&(h+=d.barycenter*d.weight,g+=d.weight),m.weight&&(h+=m.barycenter*m.weight,g+=m.weight),d.vs=m.vs.concat(d.vs),d.barycenter=h/g,d.weight=g,d.i=Math.min(m.i,d.i),m.merged=!0}}),eN=Lt((n,i)=>{var r=le();i.exports=u;function u(d,m){let h=r.partition(d,C=>Object.hasOwn(C,"barycenter")),g=h.lhs,p=h.rhs.sort((C,A)=>A.i-C.i),y=[],v=0,x=0,w=0;g.sort(s(!!m)),w=o(y,p,w),g.forEach(C=>{w+=C.vs.length,y.push(C.vs),v+=C.barycenter*C.weight,x+=C.weight,w=o(y,p,w)});let N={vs:y.flat(!0)};return x&&(N.barycenter=v/x,N.weight=x),N}function o(d,m,h){let g;for(;m.length&&(g=m[m.length-1]).i<=h;)m.pop(),d.push(g.vs),h++;return h}function s(d){return(m,h)=>m.barycenter<h.barycenter?-1:m.barycenter>h.barycenter?1:d?h.i-m.i:m.i-h.i}}),nN=Lt((n,i)=>{var r=PM(),u=tN(),o=eN();i.exports=s;function s(h,g,p,y){let v=h.children(g),x=h.node(g),w=x?x.borderLeft:void 0,N=x?x.borderRight:void 0,C={};w&&(v=v.filter(_=>_!==w&&_!==N));let A=r(h,v);A.forEach(_=>{if(h.children(_.v).length){let q=s(h,_.v,p,y);C[_.v]=q,Object.hasOwn(q,"barycenter")&&m(_,q)}});let D=u(A,p);d(D,C);let E=o(D,y);if(w&&(E.vs=[w,E.vs,N].flat(!0),h.predecessors(w).length)){let _=h.node(h.predecessors(w)[0]),q=h.node(h.predecessors(N)[0]);Object.hasOwn(E,"barycenter")||(E.barycenter=0,E.weight=0),E.barycenter=(E.barycenter*E.weight+_.order+q.order)/(E.weight+2),E.weight+=2}return E}function d(h,g){h.forEach(p=>{p.vs=p.vs.flatMap(y=>g[y]?g[y].vs:y)})}function m(h,g){h.barycenter!==void 0?(h.barycenter=(h.barycenter*h.weight+g.barycenter*g.weight)/(h.weight+g.weight),h.weight+=g.weight):(h.barycenter=g.barycenter,h.weight=g.weight)}}),aN=Lt((n,i)=>{var r=rn().Graph,u=le();i.exports=o;function o(d,m,h,g){g||(g=d.nodes());let p=s(d),y=new r({compound:!0}).setGraph({root:p}).setDefaultNodeLabel(v=>d.node(v));return g.forEach(v=>{let x=d.node(v),w=d.parent(v);(x.rank===m||x.minRank<=m&&m<=x.maxRank)&&(y.setNode(v),y.setParent(v,w||p),d[h](v).forEach(N=>{let C=N.v===v?N.w:N.v,A=y.edge(C,v),D=A!==void 0?A.weight:0;y.setEdge(C,v,{weight:d.edge(N).weight+D})}),Object.hasOwn(x,"minRank")&&y.setNode(v,{borderLeft:x.borderLeft[m],borderRight:x.borderRight[m]}))}),y}function s(d){for(var m;d.hasNode(m=u.uniqueId("_root")););return m}}),iN=Lt((n,i)=>{i.exports=r;function r(u,o,s){let d={},m;s.forEach(h=>{let g=u.parent(h),p,y;for(;g;){if(p=u.parent(g),p?(y=d[p],d[p]=g):(y=m,m=g),y&&y!==g){o.setEdge(y,g);return}g=p}})}}),lN=Lt((n,i)=>{var r=IM(),u=FM(),o=nN(),s=aN(),d=iN(),m=rn().Graph,h=le();i.exports=g;function g(x,w={}){if(typeof w.customOrder=="function"){w.customOrder(x,g);return}let N=h.maxRank(x),C=p(x,h.range(1,N+1),"inEdges"),A=p(x,h.range(N-1,-1,-1),"outEdges"),D=r(x);if(v(x,D),w.disableOptimalOrderHeuristic)return;let E=Number.POSITIVE_INFINITY,_,q=w.constraints||[];for(let Y=0,k=0;k<4;++Y,++k){y(Y%2?C:A,Y%4>=2,q),D=h.buildLayerMatrix(x);let K=u(x,D);K<E?(k=0,_=Object.assign({},D),E=K):K===E&&(_=structuredClone(D))}v(x,_)}function p(x,w,N){let C=new Map,A=(D,E)=>{C.has(D)||C.set(D,[]),C.get(D).push(E)};for(let D of x.nodes()){let E=x.node(D);if(typeof E.rank=="number"&&A(E.rank,D),typeof E.minRank=="number"&&typeof E.maxRank=="number")for(let _=E.minRank;_<=E.maxRank;_++)_!==E.rank&&A(_,D)}return w.map(function(D){return s(x,D,N,C.get(D)||[])})}function y(x,w,N){let C=new m;x.forEach(function(A){N.forEach(_=>C.setEdge(_.left,_.right));let D=A.graph().root,E=o(A,D,C,w);E.vs.forEach((_,q)=>A.node(_).order=q),d(A,C,E.vs)})}function v(x,w){Object.values(w).forEach(N=>N.forEach((C,A)=>x.node(C).order=A))}}),rN=Lt((n,i)=>{var r=rn().Graph,u=le();i.exports={positionX:N,findType1Conflicts:o,findType2Conflicts:s,addConflict:m,hasConflict:h,verticalAlignment:g,horizontalCompaction:p,alignCoordinates:x,findSmallestWidthAlignment:v,balance:w};function o(D,E){let _={};function q(Y,k){let K=0,et=0,Z=Y.length,L=k[k.length-1];return k.forEach((V,Q)=>{let T=d(D,V),G=T?D.node(T).order:Z;(T||V===L)&&(k.slice(et,Q+1).forEach(S=>{D.predecessors(S).forEach(H=>{let j=D.node(H),U=j.order;(U<K||G<U)&&!(j.dummy&&D.node(S).dummy)&&m(_,H,S)})}),et=Q+1,K=G)}),k}return E.length&&E.reduce(q),_}function s(D,E){let _={};function q(k,K,et,Z,L){let V;u.range(K,et).forEach(Q=>{V=k[Q],D.node(V).dummy&&D.predecessors(V).forEach(T=>{let G=D.node(T);G.dummy&&(G.order<Z||G.order>L)&&m(_,T,V)})})}function Y(k,K){let et=-1,Z,L=0;return K.forEach((V,Q)=>{if(D.node(V).dummy==="border"){let T=D.predecessors(V);T.length&&(Z=D.node(T[0]).order,q(K,L,Q,et,Z),L=Q,et=Z)}q(K,L,K.length,Z,k.length)}),K}return E.length&&E.reduce(Y),_}function d(D,E){if(D.node(E).dummy)return D.predecessors(E).find(_=>D.node(_).dummy)}function m(D,E,_){if(E>_){let Y=E;E=_,_=Y}let q=D[E];q||(D[E]=q={}),q[_]=!0}function h(D,E,_){if(E>_){let q=E;E=_,_=q}return!!D[E]&&Object.hasOwn(D[E],_)}function g(D,E,_,q){let Y={},k={},K={};return E.forEach(et=>{et.forEach((Z,L)=>{Y[Z]=Z,k[Z]=Z,K[Z]=L})}),E.forEach(et=>{let Z=-1;et.forEach(L=>{let V=q(L);if(V.length){V=V.sort((T,G)=>K[T]-K[G]);let Q=(V.length-1)/2;for(let T=Math.floor(Q),G=Math.ceil(Q);T<=G;++T){let S=V[T];k[L]===L&&Z<K[S]&&!h(_,L,S)&&(k[S]=L,k[L]=Y[L]=Y[S],Z=K[S])}}})}),{root:Y,align:k}}function p(D,E,_,q,Y){let k={},K=y(D,E,_,Y),et=Y?"borderLeft":"borderRight";function Z(Q,T){let G=K.nodes().slice(),S={},H=G.pop();for(;H;){if(S[H])Q(H);else{S[H]=!0,G.push(H);for(let j of T(H))G.push(j)}H=G.pop()}}function L(Q){k[Q]=K.inEdges(Q).reduce((T,G)=>Math.max(T,k[G.v]+K.edge(G)),0)}function V(Q){let T=K.outEdges(Q).reduce((S,H)=>Math.min(S,k[H.w]-K.edge(H)),Number.POSITIVE_INFINITY),G=D.node(Q);T!==Number.POSITIVE_INFINITY&&G.borderType!==et&&(k[Q]=Math.max(k[Q],T))}return Z(L,K.predecessors.bind(K)),Z(V,K.successors.bind(K)),Object.keys(q).forEach(Q=>k[Q]=k[_[Q]]),k}function y(D,E,_,q){let Y=new r,k=D.graph(),K=C(k.nodesep,k.edgesep,q);return E.forEach(et=>{let Z;et.forEach(L=>{let V=_[L];if(Y.setNode(V),Z){var Q=_[Z],T=Y.edge(Q,V);Y.setEdge(Q,V,Math.max(K(D,L,Z),T||0))}Z=L})}),Y}function v(D,E){return Object.values(E).reduce((_,q)=>{let Y=Number.NEGATIVE_INFINITY,k=Number.POSITIVE_INFINITY;Object.entries(q).forEach(([et,Z])=>{let L=A(D,et)/2;Y=Math.max(Z+L,Y),k=Math.min(Z-L,k)});let K=Y-k;return K<_[0]&&(_=[K,q]),_},[Number.POSITIVE_INFINITY,null])[1]}function x(D,E){let _=Object.values(E),q=u.applyWithChunking(Math.min,_),Y=u.applyWithChunking(Math.max,_);["u","d"].forEach(k=>{["l","r"].forEach(K=>{let et=k+K,Z=D[et];if(Z===E)return;let L=Object.values(Z),V=q-u.applyWithChunking(Math.min,L);K!=="l"&&(V=Y-u.applyWithChunking(Math.max,L)),V&&(D[et]=u.mapValues(Z,Q=>Q+V))})})}function w(D,E){return u.mapValues(D.ul,(_,q)=>{if(E)return D[E.toLowerCase()][q];{let Y=Object.values(D).map(k=>k[q]).sort((k,K)=>k-K);return(Y[1]+Y[2])/2}})}function N(D){let E=u.buildLayerMatrix(D),_=Object.assign(o(D,E),s(D,E)),q={},Y;["u","d"].forEach(K=>{Y=K==="u"?E:Object.values(E).reverse(),["l","r"].forEach(et=>{et==="r"&&(Y=Y.map(Q=>Object.values(Q).reverse()));let Z=(K==="u"?D.predecessors:D.successors).bind(D),L=g(D,Y,_,Z),V=p(D,Y,L.root,L.align,et==="r");et==="r"&&(V=u.mapValues(V,Q=>-Q)),q[K+et]=V})});let k=v(D,q);return x(q,k),w(q,D.graph().align)}function C(D,E,_){return(q,Y,k)=>{let K=q.node(Y),et=q.node(k),Z=0,L;if(Z+=K.width/2,Object.hasOwn(K,"labelpos"))switch(K.labelpos.toLowerCase()){case"l":L=-K.width/2;break;case"r":L=K.width/2;break}if(L&&(Z+=_?L:-L),L=0,Z+=(K.dummy?E:D)/2,Z+=(et.dummy?E:D)/2,Z+=et.width/2,Object.hasOwn(et,"labelpos"))switch(et.labelpos.toLowerCase()){case"l":L=et.width/2;break;case"r":L=-et.width/2;break}return L&&(Z+=_?L:-L),L=0,Z}}function A(D,E){return D.node(E).width}}),uN=Lt((n,i)=>{var r=le(),u=rN().positionX;i.exports=o;function o(d){d=r.asNonCompoundGraph(d),s(d),Object.entries(u(d)).forEach(([m,h])=>d.node(m).x=h)}function s(d){let m=r.buildLayerMatrix(d),h=d.graph().ranksep,g=d.graph().rankalign,p=0;m.forEach(y=>{let v=y.reduce((x,w)=>{let N=d.node(w).height;return x>N?x:N},0);y.forEach(x=>{let w=d.node(x);g==="top"?w.y=p+w.height/2:g==="bottom"?w.y=p+v-w.height/2:w.y=p+v/2}),p+=v+h})}}),oN=Lt((n,i)=>{var r=XM(),u=GM(),o=ZM(),s=le().normalizeRanks,d=KM(),m=le().removeEmptyRanks,h=$M(),g=JM(),p=WM(),y=lN(),v=uN(),x=le(),w=rn().Graph;i.exports=N;function N(z,X={}){let $=X.debugTiming?x.time:x.notime;return $("layout",()=>{let I=$(" buildLayoutGraph",()=>Z(z));return $(" runLayout",()=>C(I,$,X)),$(" updateInputGraph",()=>A(z,I)),I})}function C(z,X,$){X(" makeSpaceForEdgeLabels",()=>L(z)),X(" removeSelfEdges",()=>J(z)),X(" acyclic",()=>r.run(z)),X(" nestingGraph.run",()=>h.run(z)),X(" rank",()=>o(x.asNonCompoundGraph(z))),X(" injectEdgeLabelProxies",()=>V(z)),X(" removeEmptyRanks",()=>m(z)),X(" nestingGraph.cleanup",()=>h.cleanup(z)),X(" normalizeRanks",()=>s(z)),X(" assignRankMinMax",()=>Q(z)),X(" removeEdgeLabelProxies",()=>T(z)),X(" normalize.run",()=>u.run(z)),X(" parentDummyChains",()=>d(z)),X(" addBorderSegments",()=>g(z)),X(" order",()=>y(z,$)),X(" insertSelfEdges",()=>M(z)),X(" adjustCoordinateSystem",()=>p.adjust(z)),X(" position",()=>v(z)),X(" positionSelfEdges",()=>B(z)),X(" removeBorderNodes",()=>U(z)),X(" normalize.undo",()=>u.undo(z)),X(" fixupEdgeLabelCoords",()=>H(z)),X(" undoCoordinateSystem",()=>p.undo(z)),X(" translateGraph",()=>G(z)),X(" assignNodeIntersects",()=>S(z)),X(" reversePoints",()=>j(z)),X(" acyclic.undo",()=>r.undo(z))}function A(z,X){z.nodes().forEach($=>{let I=z.node($),at=X.node($);I&&(I.x=at.x,I.y=at.y,I.order=at.order,I.rank=at.rank,X.children($).length&&(I.width=at.width,I.height=at.height))}),z.edges().forEach($=>{let I=z.edge($),at=X.edge($);I.points=at.points,Object.hasOwn(at,"x")&&(I.x=at.x,I.y=at.y)}),z.graph().width=X.graph().width,z.graph().height=X.graph().height}var D=["nodesep","edgesep","ranksep","marginx","marginy"],E={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb",rankalign:"center"},_=["acyclicer","ranker","rankdir","align","rankalign"],q=["width","height","rank"],Y={width:0,height:0},k=["minlen","weight","width","height","labeloffset"],K={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},et=["labelpos"];function Z(z){let X=new w({multigraph:!0,compound:!0}),$=R(z.graph());return X.setGraph(Object.assign({},E,F($,D),x.pick($,_))),z.nodes().forEach(I=>{let at=R(z.node(I)),dt=F(at,q);Object.keys(Y).forEach(ht=>{dt[ht]===void 0&&(dt[ht]=Y[ht])}),X.setNode(I,dt),X.setParent(I,z.parent(I))}),z.edges().forEach(I=>{let at=R(z.edge(I));X.setEdge(I,Object.assign({},K,F(at,k),x.pick(at,et)))}),X}function L(z){let X=z.graph();X.ranksep/=2,z.edges().forEach($=>{let I=z.edge($);I.minlen*=2,I.labelpos.toLowerCase()!=="c"&&(X.rankdir==="TB"||X.rankdir==="BT"?I.width+=I.labeloffset:I.height+=I.labeloffset)})}function V(z){z.edges().forEach(X=>{let $=z.edge(X);if($.width&&$.height){let I=z.node(X.v),at={rank:(z.node(X.w).rank-I.rank)/2+I.rank,e:X};x.addDummyNode(z,"edge-proxy",at,"_ep")}})}function Q(z){let X=0;z.nodes().forEach($=>{let I=z.node($);I.borderTop&&(I.minRank=z.node(I.borderTop).rank,I.maxRank=z.node(I.borderBottom).rank,X=Math.max(X,I.maxRank))}),z.graph().maxRank=X}function T(z){z.nodes().forEach(X=>{let $=z.node(X);$.dummy==="edge-proxy"&&(z.edge($.e).labelRank=$.rank,z.removeNode(X))})}function G(z){let X=Number.POSITIVE_INFINITY,$=0,I=Number.POSITIVE_INFINITY,at=0,dt=z.graph(),ht=dt.marginx||0,gt=dt.marginy||0;function pt(xt){let Et=xt.x,_t=xt.y,It=xt.width,xe=xt.height;X=Math.min(X,Et-It/2),$=Math.max($,Et+It/2),I=Math.min(I,_t-xe/2),at=Math.max(at,_t+xe/2)}z.nodes().forEach(xt=>pt(z.node(xt))),z.edges().forEach(xt=>{let Et=z.edge(xt);Object.hasOwn(Et,"x")&&pt(Et)}),X-=ht,I-=gt,z.nodes().forEach(xt=>{let Et=z.node(xt);Et.x-=X,Et.y-=I}),z.edges().forEach(xt=>{let Et=z.edge(xt);Et.points.forEach(_t=>{_t.x-=X,_t.y-=I}),Object.hasOwn(Et,"x")&&(Et.x-=X),Object.hasOwn(Et,"y")&&(Et.y-=I)}),dt.width=$-X+ht,dt.height=at-I+gt}function S(z){z.edges().forEach(X=>{let $=z.edge(X),I=z.node(X.v),at=z.node(X.w),dt,ht;$.points?(dt=$.points[0],ht=$.points[$.points.length-1]):($.points=[],dt=at,ht=I),$.points.unshift(x.intersectRect(I,dt)),$.points.push(x.intersectRect(at,ht))})}function H(z){z.edges().forEach(X=>{let $=z.edge(X);if(Object.hasOwn($,"x"))switch(($.labelpos==="l"||$.labelpos==="r")&&($.width-=$.labeloffset),$.labelpos){case"l":$.x-=$.width/2+$.labeloffset;break;case"r":$.x+=$.width/2+$.labeloffset;break}})}function j(z){z.edges().forEach(X=>{let $=z.edge(X);$.reversed&&$.points.reverse()})}function U(z){z.nodes().forEach(X=>{if(z.children(X).length){let $=z.node(X),I=z.node($.borderTop),at=z.node($.borderBottom),dt=z.node($.borderLeft[$.borderLeft.length-1]),ht=z.node($.borderRight[$.borderRight.length-1]);$.width=Math.abs(ht.x-dt.x),$.height=Math.abs(at.y-I.y),$.x=dt.x+$.width/2,$.y=I.y+$.height/2}}),z.nodes().forEach(X=>{z.node(X).dummy==="border"&&z.removeNode(X)})}function J(z){z.edges().forEach(X=>{if(X.v===X.w){var $=z.node(X.v);$.selfEdges||($.selfEdges=[]),$.selfEdges.push({e:X,label:z.edge(X)}),z.removeEdge(X)}})}function M(z){var X=x.buildLayerMatrix(z);X.forEach($=>{var I=0;$.forEach((at,dt)=>{var ht=z.node(at);ht.order=dt+I,(ht.selfEdges||[]).forEach(gt=>{x.addDummyNode(z,"selfedge",{width:gt.label.width,height:gt.label.height,rank:ht.rank,order:dt+ ++I,e:gt.e,label:gt.label},"_se")}),delete ht.selfEdges})})}function B(z){z.nodes().forEach(X=>{var $=z.node(X);if($.dummy==="selfedge"){var I=z.node($.e.v),at=I.x+I.width/2,dt=I.y,ht=$.x-at,gt=I.height/2;z.setEdge($.e,$.label),z.removeNode(X),$.label.points=[{x:at+2*ht/3,y:dt-gt},{x:at+5*ht/6,y:dt-gt},{x:at+ht,y:dt},{x:at+5*ht/6,y:dt+gt},{x:at+2*ht/3,y:dt+gt}],$.label.x=$.x,$.label.y=$.y}})}function F(z,X){return x.mapValues(x.pick(z,X),Number)}function R(z){var X={};return z&&Object.entries(z).forEach(([$,I])=>{typeof $=="string"&&($=$.toLowerCase()),X[$]=I}),X}}),cN=Lt((n,i)=>{var r=le(),u=rn().Graph;i.exports={debugOrdering:o};function o(s){let d=r.buildLayerMatrix(s),m=new u({compound:!0,multigraph:!0}).setGraph({});return s.nodes().forEach(h=>{m.setNode(h,{label:h}),m.setParent(h,"layer"+s.node(h).rank)}),s.edges().forEach(h=>m.setEdge(h.v,h.w,{},h.name)),d.forEach((h,g)=>{let p="layer"+g;m.setNode(p,{rank:"same"}),h.reduce((y,v)=>(m.setEdge(y,v,{style:"invis"}),v))}),m}}),sN=Lt((n,i)=>{i.exports="2.0.4"}),fN=Lt((n,i)=>{i.exports={graphlib:rn(),layout:oN(),debug:cN(),util:{time:le().time,notime:le().notime},version:sN()}});const iy=fN();/*! For license information please see dagre.esm.js.LEGAL.txt */const ly=180,ry=50;function dN(n,i,r="LR"){const u=new iy.graphlib.Graph;u.setDefaultEdgeLabel(()=>({})),u.setGraph({rankdir:r,ranksep:120,nodesep:80,marginx:40,marginy:40});const o=n.filter(g=>g.kind==="agent"||g.kind==="connector"),s=o.length>0?o:n,d=new Set(s.map(g=>g.id));for(const g of s)u.setNode(g.id,{width:ly,height:ry});for(const g of i)d.has(g.a)&&d.has(g.b)&&u.setEdge(g.a,g.b);iy.layout(u);const m=s.map(g=>{const p=u.node(g.id);return{id:g.id,type:"participant",data:{label:g.label,kind:g.kind,isActive:!1},position:{x:((p==null?void 0:p.x)??0)-ly/2,y:((p==null?void 0:p.y)??0)-ry/2}}}),h=i.filter(g=>d.has(g.a)&&d.has(g.b)).map(g=>({id:g.key,source:g.a,target:g.b,label:g.total>1?\`\${g.total}\`:void 0}));return{nodes:m,edges:h}}function hN(n){return n==="agent"?"A":n==="connector"?"C":n==="tool"?"T":n==="extension"?"E":"?"}function gN({data:n}){return P.jsxs("div",{className:wr("participant-node",\`kind-\${n.kind}\`,n.isActive&&"is-active"),children:[P.jsx(ul,{type:"target",position:vt.Left,className:"participant-handle"}),P.jsx("span",{className:"participant-badge",children:hN(n.kind)}),P.jsx("span",{className:"participant-label",children:n.label}),P.jsx(ul,{type:"source",position:vt.Right,className:"participant-handle"})]})}const mN={participant:gN};function yN({viz:n,selectedEdgeKey:i,pulseEvents:r,onEdgeClick:u}){const o=(n==null?void 0:n.interactions)??[],s=(n==null?void 0:n.participants)??[],d=ut.useRef(""),m=ut.useRef(null),{activeNodes:h,activeEdges:g}=ut.useMemo(()=>{const x=new Set,w=new Set;for(const N of r)if(x.add(N.source),N.target){x.add(N.target);for(const C of o)(C.a===N.source&&C.b===N.target||C.a===N.target&&C.b===N.source)&&w.add(C.key)}return{activeNodes:x,activeEdges:w}},[r,o]),{nodes:p,edges:y}=ut.useMemo(()=>{if(!n||s.length===0)return{nodes:[],edges:[]};const x=s.map(C=>C.id).sort().join(",")+"|"+o.map(C=>C.key).sort().join(",");(x!==d.current||!m.current)&&(d.current=x,m.current=dN(s,o));const w=m.current.nodes.map(C=>({...C,data:{...C.data,isActive:h.has(C.id)}})),N=m.current.edges.map(C=>{const A=i===C.id,D=g.has(C.id);return{...C,animated:D,style:{stroke:A?"#ff9f6e":D?"#73f0d6":"rgba(145, 167, 226, 0.35)",strokeWidth:A||D?2.5:1.5,cursor:"pointer"},labelStyle:{fill:"#9fb0dc",fontSize:11,fontWeight:600}}});return{nodes:w,edges:N}},[n,s,o,i,h,g]),v=ut.useCallback((x,w)=>{u(w.id)},[u]);return s.length===0?P.jsx("div",{className:"empty",children:"표시할 participant가 없습니다."}):P.jsx("div",{className:"graph-wrap",children:P.jsxs(uM,{nodes:p,edges:y,nodeTypes:mN,onEdgeClick:v,nodesDraggable:!1,nodesConnectable:!1,colorMode:"dark",fitView:!0,fitViewOptions:{padding:.3},children:[P.jsx(dM,{variant:Xn.Dots,gap:20,size:1,color:"rgba(145, 167, 226, 0.15)"}),P.jsx(bM,{showInteractive:!1}),P.jsx(DM,{nodeColor:x=>{const w=x.data.kind;return w==="agent"?"#ffce6e":w==="connector"?"#8eb8ff":"#b7c9ff"},maskColor:"rgba(11, 19, 38, 0.7)"})]},n==null?void 0:n.instanceKey)})}const rv=6048e5,pN=864e5,uv=6e4,ov=36e5,uy=Symbol.for("constructDateFrom");function Qn(n,i){return typeof n=="function"?n(i):n&&typeof n=="object"&&uy in n?n[uy](i):n instanceof Date?new n.constructor(i):new Date(i)}function ke(n,i){return Qn(i||n,n)}let vN={};function ko(){return vN}function Er(n,i){var m,h,g,p;const r=ko(),u=(i==null?void 0:i.weekStartsOn)??((h=(m=i==null?void 0:i.locale)==null?void 0:m.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((p=(g=r.locale)==null?void 0:g.options)==null?void 0:p.weekStartsOn)??0,o=ke(n,i==null?void 0:i.in),s=o.getDay(),d=(s<u?7:0)+s-u;return o.setDate(o.getDate()-d),o.setHours(0,0,0,0),o}function To(n,i){return Er(n,{...i,weekStartsOn:1})}function cv(n,i){const r=ke(n,i==null?void 0:i.in),u=r.getFullYear(),o=Qn(r,0);o.setFullYear(u+1,0,4),o.setHours(0,0,0,0);const s=To(o),d=Qn(r,0);d.setFullYear(u,0,4),d.setHours(0,0,0,0);const m=To(d);return r.getTime()>=s.getTime()?u+1:r.getTime()>=m.getTime()?u:u-1}function oy(n){const i=ke(n),r=new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()));return r.setUTCFullYear(i.getFullYear()),+n-+r}function bN(n,...i){const r=Qn.bind(null,i.find(u=>typeof u=="object"));return i.map(r)}function cy(n,i){const r=ke(n,i==null?void 0:i.in);return r.setHours(0,0,0,0),r}function xN(n,i,r){const[u,o]=bN(r==null?void 0:r.in,n,i),s=cy(u),d=cy(o),m=+s-oy(s),h=+d-oy(d);return Math.round((m-h)/pN)}function wN(n,i){const r=cv(n,i),u=Qn(n,0);return u.setFullYear(r,0,4),u.setHours(0,0,0,0),To(u)}function EN(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function sv(n){return!(!EN(n)&&typeof n!="number"||isNaN(+ke(n)))}function SN(n,i){const r=ke(n,i==null?void 0:i.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}const _N={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},MN=(n,i,r)=>{let u;const o=_N[n];return typeof o=="string"?u=o:i===1?u=o.one:u=o.other.replace("{{count}}",i.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+u:u+" ago":u};function _f(n){return(i={})=>{const r=i.width?String(i.width):n.defaultWidth;return n.formats[r]||n.formats[n.defaultWidth]}}const NN={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},TN={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},AN={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ON={date:_f({formats:NN,defaultWidth:"full"}),time:_f({formats:TN,defaultWidth:"full"}),dateTime:_f({formats:AN,defaultWidth:"full"})},CN={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},zN=(n,i,r,u)=>CN[n];function lr(n){return(i,r)=>{const u=r!=null&&r.context?String(r.context):"standalone";let o;if(u==="formatting"&&n.formattingValues){const d=n.defaultFormattingWidth||n.defaultWidth,m=r!=null&&r.width?String(r.width):d;o=n.formattingValues[m]||n.formattingValues[d]}else{const d=n.defaultWidth,m=r!=null&&r.width?String(r.width):n.defaultWidth;o=n.values[m]||n.values[d]}const s=n.argumentCallback?n.argumentCallback(i):i;return o[s]}}const DN={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},HN={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},RN={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},jN={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},YN={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},BN={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},UN=(n,i)=>{const r=Number(n),u=r%100;if(u>20||u<10)switch(u%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},LN={ordinalNumber:UN,era:lr({values:DN,defaultWidth:"wide"}),quarter:lr({values:HN,defaultWidth:"wide",argumentCallback:n=>n-1}),month:lr({values:RN,defaultWidth:"wide"}),day:lr({values:jN,defaultWidth:"wide"}),dayPeriod:lr({values:YN,defaultWidth:"wide",formattingValues:BN,defaultFormattingWidth:"wide"})};function rr(n){return(i,r={})=>{const u=r.width,o=u&&n.matchPatterns[u]||n.matchPatterns[n.defaultMatchWidth],s=i.match(o);if(!s)return null;const d=s[0],m=u&&n.parsePatterns[u]||n.parsePatterns[n.defaultParseWidth],h=Array.isArray(m)?qN(m,y=>y.test(d)):kN(m,y=>y.test(d));let g;g=n.valueCallback?n.valueCallback(h):h,g=r.valueCallback?r.valueCallback(g):g;const p=i.slice(d.length);return{value:g,rest:p}}}function kN(n,i){for(const r in n)if(Object.prototype.hasOwnProperty.call(n,r)&&i(n[r]))return r}function qN(n,i){for(let r=0;r<n.length;r++)if(i(n[r]))return r}function VN(n){return(i,r={})=>{const u=i.match(n.matchPattern);if(!u)return null;const o=u[0],s=i.match(n.parsePattern);if(!s)return null;let d=n.valueCallback?n.valueCallback(s[0]):s[0];d=r.valueCallback?r.valueCallback(d):d;const m=i.slice(o.length);return{value:d,rest:m}}}const XN=/^(\\d+)(th|st|nd|rd)?/i,GN=/\\d+/i,QN={narrow:/^(b|a)/i,abbreviated:/^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ZN={any:[/^b/i,/^(a|c)/i]},KN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},$N={any:[/1/i,/2/i,/3/i,/4/i]},JN={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},WN={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},IN={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},FN={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},PN={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},t3={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},e3={ordinalNumber:VN({matchPattern:XN,parsePattern:GN,valueCallback:n=>parseInt(n,10)}),era:rr({matchPatterns:QN,defaultMatchWidth:"wide",parsePatterns:ZN,defaultParseWidth:"any"}),quarter:rr({matchPatterns:KN,defaultMatchWidth:"wide",parsePatterns:$N,defaultParseWidth:"any",valueCallback:n=>n+1}),month:rr({matchPatterns:JN,defaultMatchWidth:"wide",parsePatterns:WN,defaultParseWidth:"any"}),day:rr({matchPatterns:IN,defaultMatchWidth:"wide",parsePatterns:FN,defaultParseWidth:"any"}),dayPeriod:rr({matchPatterns:PN,defaultMatchWidth:"any",parsePatterns:t3,defaultParseWidth:"any"})},n3={code:"en-US",formatDistance:MN,formatLong:ON,formatRelative:zN,localize:LN,match:e3,options:{weekStartsOn:0,firstWeekContainsDate:1}};function a3(n,i){const r=ke(n,i==null?void 0:i.in);return xN(r,SN(r))+1}function i3(n,i){const r=ke(n,i==null?void 0:i.in),u=+To(r)-+wN(r);return Math.round(u/rv)+1}function fv(n,i){var p,y,v,x;const r=ke(n,i==null?void 0:i.in),u=r.getFullYear(),o=ko(),s=(i==null?void 0:i.firstWeekContainsDate)??((y=(p=i==null?void 0:i.locale)==null?void 0:p.options)==null?void 0:y.firstWeekContainsDate)??o.firstWeekContainsDate??((x=(v=o.locale)==null?void 0:v.options)==null?void 0:x.firstWeekContainsDate)??1,d=Qn((i==null?void 0:i.in)||n,0);d.setFullYear(u+1,0,s),d.setHours(0,0,0,0);const m=Er(d,i),h=Qn((i==null?void 0:i.in)||n,0);h.setFullYear(u,0,s),h.setHours(0,0,0,0);const g=Er(h,i);return+r>=+m?u+1:+r>=+g?u:u-1}function l3(n,i){var m,h,g,p;const r=ko(),u=(i==null?void 0:i.firstWeekContainsDate)??((h=(m=i==null?void 0:i.locale)==null?void 0:m.options)==null?void 0:h.firstWeekContainsDate)??r.firstWeekContainsDate??((p=(g=r.locale)==null?void 0:g.options)==null?void 0:p.firstWeekContainsDate)??1,o=fv(n,i),s=Qn((i==null?void 0:i.in)||n,0);return s.setFullYear(o,0,u),s.setHours(0,0,0,0),Er(s,i)}function r3(n,i){const r=ke(n,i==null?void 0:i.in),u=+Er(r,i)-+l3(r,i);return Math.round(u/rv)+1}function Ut(n,i){const r=n<0?"-":"",u=Math.abs(n).toString().padStart(i,"0");return r+u}const Ma={y(n,i){const r=n.getFullYear(),u=r>0?r:1-r;return Ut(i==="yy"?u%100:u,i.length)},M(n,i){const r=n.getMonth();return i==="M"?String(r+1):Ut(r+1,2)},d(n,i){return Ut(n.getDate(),i.length)},a(n,i){const r=n.getHours()/12>=1?"pm":"am";switch(i){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(n,i){return Ut(n.getHours()%12||12,i.length)},H(n,i){return Ut(n.getHours(),i.length)},m(n,i){return Ut(n.getMinutes(),i.length)},s(n,i){return Ut(n.getSeconds(),i.length)},S(n,i){const r=i.length,u=n.getMilliseconds(),o=Math.trunc(u*Math.pow(10,r-3));return Ut(o,i.length)}},Ji={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},sy={G:function(n,i,r){const u=n.getFullYear()>0?1:0;switch(i){case"G":case"GG":case"GGG":return r.era(u,{width:"abbreviated"});case"GGGGG":return r.era(u,{width:"narrow"});case"GGGG":default:return r.era(u,{width:"wide"})}},y:function(n,i,r){if(i==="yo"){const u=n.getFullYear(),o=u>0?u:1-u;return r.ordinalNumber(o,{unit:"year"})}return Ma.y(n,i)},Y:function(n,i,r,u){const o=fv(n,u),s=o>0?o:1-o;if(i==="YY"){const d=s%100;return Ut(d,2)}return i==="Yo"?r.ordinalNumber(s,{unit:"year"}):Ut(s,i.length)},R:function(n,i){const r=cv(n);return Ut(r,i.length)},u:function(n,i){const r=n.getFullYear();return Ut(r,i.length)},Q:function(n,i,r){const u=Math.ceil((n.getMonth()+1)/3);switch(i){case"Q":return String(u);case"QQ":return Ut(u,2);case"Qo":return r.ordinalNumber(u,{unit:"quarter"});case"QQQ":return r.quarter(u,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(u,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(u,{width:"wide",context:"formatting"})}},q:function(n,i,r){const u=Math.ceil((n.getMonth()+1)/3);switch(i){case"q":return String(u);case"qq":return Ut(u,2);case"qo":return r.ordinalNumber(u,{unit:"quarter"});case"qqq":return r.quarter(u,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(u,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(u,{width:"wide",context:"standalone"})}},M:function(n,i,r){const u=n.getMonth();switch(i){case"M":case"MM":return Ma.M(n,i);case"Mo":return r.ordinalNumber(u+1,{unit:"month"});case"MMM":return r.month(u,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(u,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(u,{width:"wide",context:"formatting"})}},L:function(n,i,r){const u=n.getMonth();switch(i){case"L":return String(u+1);case"LL":return Ut(u+1,2);case"Lo":return r.ordinalNumber(u+1,{unit:"month"});case"LLL":return r.month(u,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(u,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(u,{width:"wide",context:"standalone"})}},w:function(n,i,r,u){const o=r3(n,u);return i==="wo"?r.ordinalNumber(o,{unit:"week"}):Ut(o,i.length)},I:function(n,i,r){const u=i3(n);return i==="Io"?r.ordinalNumber(u,{unit:"week"}):Ut(u,i.length)},d:function(n,i,r){return i==="do"?r.ordinalNumber(n.getDate(),{unit:"date"}):Ma.d(n,i)},D:function(n,i,r){const u=a3(n);return i==="Do"?r.ordinalNumber(u,{unit:"dayOfYear"}):Ut(u,i.length)},E:function(n,i,r){const u=n.getDay();switch(i){case"E":case"EE":case"EEE":return r.day(u,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(u,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(u,{width:"short",context:"formatting"});case"EEEE":default:return r.day(u,{width:"wide",context:"formatting"})}},e:function(n,i,r,u){const o=n.getDay(),s=(o-u.weekStartsOn+8)%7||7;switch(i){case"e":return String(s);case"ee":return Ut(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(n,i,r,u){const o=n.getDay(),s=(o-u.weekStartsOn+8)%7||7;switch(i){case"c":return String(s);case"cc":return Ut(s,i.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(n,i,r){const u=n.getDay(),o=u===0?7:u;switch(i){case"i":return String(o);case"ii":return Ut(o,i.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(u,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(u,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(u,{width:"short",context:"formatting"});case"iiii":default:return r.day(u,{width:"wide",context:"formatting"})}},a:function(n,i,r){const o=n.getHours()/12>=1?"pm":"am";switch(i){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(n,i,r){const u=n.getHours();let o;switch(u===12?o=Ji.noon:u===0?o=Ji.midnight:o=u/12>=1?"pm":"am",i){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(n,i,r){const u=n.getHours();let o;switch(u>=17?o=Ji.evening:u>=12?o=Ji.afternoon:u>=4?o=Ji.morning:o=Ji.night,i){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(n,i,r){if(i==="ho"){let u=n.getHours()%12;return u===0&&(u=12),r.ordinalNumber(u,{unit:"hour"})}return Ma.h(n,i)},H:function(n,i,r){return i==="Ho"?r.ordinalNumber(n.getHours(),{unit:"hour"}):Ma.H(n,i)},K:function(n,i,r){const u=n.getHours()%12;return i==="Ko"?r.ordinalNumber(u,{unit:"hour"}):Ut(u,i.length)},k:function(n,i,r){let u=n.getHours();return u===0&&(u=24),i==="ko"?r.ordinalNumber(u,{unit:"hour"}):Ut(u,i.length)},m:function(n,i,r){return i==="mo"?r.ordinalNumber(n.getMinutes(),{unit:"minute"}):Ma.m(n,i)},s:function(n,i,r){return i==="so"?r.ordinalNumber(n.getSeconds(),{unit:"second"}):Ma.s(n,i)},S:function(n,i){return Ma.S(n,i)},X:function(n,i,r){const u=n.getTimezoneOffset();if(u===0)return"Z";switch(i){case"X":return dy(u);case"XXXX":case"XX":return Pa(u);case"XXXXX":case"XXX":default:return Pa(u,":")}},x:function(n,i,r){const u=n.getTimezoneOffset();switch(i){case"x":return dy(u);case"xxxx":case"xx":return Pa(u);case"xxxxx":case"xxx":default:return Pa(u,":")}},O:function(n,i,r){const u=n.getTimezoneOffset();switch(i){case"O":case"OO":case"OOO":return"GMT"+fy(u,":");case"OOOO":default:return"GMT"+Pa(u,":")}},z:function(n,i,r){const u=n.getTimezoneOffset();switch(i){case"z":case"zz":case"zzz":return"GMT"+fy(u,":");case"zzzz":default:return"GMT"+Pa(u,":")}},t:function(n,i,r){const u=Math.trunc(+n/1e3);return Ut(u,i.length)},T:function(n,i,r){return Ut(+n,i.length)}};function fy(n,i=""){const r=n>0?"-":"+",u=Math.abs(n),o=Math.trunc(u/60),s=u%60;return s===0?r+String(o):r+String(o)+i+Ut(s,2)}function dy(n,i){return n%60===0?(n>0?"-":"+")+Ut(Math.abs(n)/60,2):Pa(n,i)}function Pa(n,i=""){const r=n>0?"-":"+",u=Math.abs(n),o=Ut(Math.trunc(u/60),2),s=Ut(u%60,2);return r+o+i+s}const hy=(n,i)=>{switch(n){case"P":return i.date({width:"short"});case"PP":return i.date({width:"medium"});case"PPP":return i.date({width:"long"});case"PPPP":default:return i.date({width:"full"})}},dv=(n,i)=>{switch(n){case"p":return i.time({width:"short"});case"pp":return i.time({width:"medium"});case"ppp":return i.time({width:"long"});case"pppp":default:return i.time({width:"full"})}},u3=(n,i)=>{const r=n.match(/(P+)(p+)?/)||[],u=r[1],o=r[2];if(!o)return hy(n,i);let s;switch(u){case"P":s=i.dateTime({width:"short"});break;case"PP":s=i.dateTime({width:"medium"});break;case"PPP":s=i.dateTime({width:"long"});break;case"PPPP":default:s=i.dateTime({width:"full"});break}return s.replace("{{date}}",hy(u,i)).replace("{{time}}",dv(o,i))},o3={p:dv,P:u3},c3=/^D+$/,s3=/^Y+$/,f3=["D","DD","YY","YYYY"];function d3(n){return c3.test(n)}function h3(n){return s3.test(n)}function g3(n,i,r){const u=m3(n,i,r);if(console.warn(u),f3.includes(n))throw new RangeError(u)}function m3(n,i,r){const u=n[0]==="Y"?"years":"days of the month";return\`Use \\\`\${n.toLowerCase()}\\\` instead of \\\`\${n}\\\` (in \\\`\${i}\\\`) for formatting \${u} to the input \\\`\${r}\\\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\`}const y3=/[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g,p3=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,v3=/^'([^]*?)'?$/,b3=/''/g,x3=/[a-zA-Z]/;function w3(n,i,r){var p,y,v,x;const u=ko(),o=u.locale??n3,s=u.firstWeekContainsDate??((y=(p=u.locale)==null?void 0:p.options)==null?void 0:y.firstWeekContainsDate)??1,d=u.weekStartsOn??((x=(v=u.locale)==null?void 0:v.options)==null?void 0:x.weekStartsOn)??0,m=ke(n,r==null?void 0:r.in);if(!sv(m))throw new RangeError("Invalid time value");let h=i.match(p3).map(w=>{const N=w[0];if(N==="p"||N==="P"){const C=o3[N];return C(w,o.formatLong)}return w}).join("").match(y3).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const N=w[0];if(N==="'")return{isToken:!1,value:E3(w)};if(sy[N])return{isToken:!0,value:w};if(N.match(x3))throw new RangeError("Format string contains an unescaped latin alphabet character \`"+N+"\`");return{isToken:!1,value:w}});o.localize.preprocessor&&(h=o.localize.preprocessor(m,h));const g={firstWeekContainsDate:s,weekStartsOn:d,locale:o};return h.map(w=>{if(!w.isToken)return w.value;const N=w.value;(h3(N)||d3(N))&&g3(N,i,String(n));const C=sy[N[0]];return C(m,N,o.localize,g)}).join("")}function E3(n){const i=n.match(v3);return i?i[1].replace(b3,"'"):n}function S3(n,i){const r=()=>Qn(i==null?void 0:i.in,NaN),o=T3(n);let s;if(o.date){const g=A3(o.date,2);s=O3(g.restDateString,g.year)}if(!s||isNaN(+s))return r();const d=+s;let m=0,h;if(o.time&&(m=C3(o.time),isNaN(m)))return r();if(o.timezone){if(h=z3(o.timezone),isNaN(h))return r()}else{const g=new Date(d+m),p=ke(0,i==null?void 0:i.in);return p.setFullYear(g.getUTCFullYear(),g.getUTCMonth(),g.getUTCDate()),p.setHours(g.getUTCHours(),g.getUTCMinutes(),g.getUTCSeconds(),g.getUTCMilliseconds()),p}return ke(d+m+h,i==null?void 0:i.in)}const oo={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},_3=/^-?(?:(\\d{3})|(\\d{2})(?:-?(\\d{2}))?|W(\\d{2})(?:-?(\\d{1}))?|)$/,M3=/^(\\d{2}(?:[.,]\\d*)?)(?::?(\\d{2}(?:[.,]\\d*)?))?(?::?(\\d{2}(?:[.,]\\d*)?))?$/,N3=/^([+-])(\\d{2})(?::?(\\d{2}))?$/;function T3(n){const i={},r=n.split(oo.dateTimeDelimiter);let u;if(r.length>2)return i;if(/:/.test(r[0])?u=r[0]:(i.date=r[0],u=r[1],oo.timeZoneDelimiter.test(i.date)&&(i.date=n.split(oo.timeZoneDelimiter)[0],u=n.substr(i.date.length,n.length))),u){const o=oo.timezone.exec(u);o?(i.time=u.replace(o[1],""),i.timezone=o[1]):i.time=u}return i}function A3(n,i){const r=new RegExp("^(?:(\\\\d{4}|[+-]\\\\d{"+(4+i)+"})|(\\\\d{2}|[+-]\\\\d{"+(2+i)+"})$)"),u=n.match(r);if(!u)return{year:NaN,restDateString:""};const o=u[1]?parseInt(u[1]):null,s=u[2]?parseInt(u[2]):null;return{year:s===null?o:s*100,restDateString:n.slice((u[1]||u[2]).length)}}function O3(n,i){if(i===null)return new Date(NaN);const r=n.match(_3);if(!r)return new Date(NaN);const u=!!r[4],o=ur(r[1]),s=ur(r[2])-1,d=ur(r[3]),m=ur(r[4]),h=ur(r[5])-1;if(u)return Y3(i,m,h)?D3(i,m,h):new Date(NaN);{const g=new Date(0);return!R3(i,s,d)||!j3(i,o)?new Date(NaN):(g.setUTCFullYear(i,s,Math.max(o,d)),g)}}function ur(n){return n?parseInt(n):1}function C3(n){const i=n.match(M3);if(!i)return NaN;const r=Mf(i[1]),u=Mf(i[2]),o=Mf(i[3]);return B3(r,u,o)?r*ov+u*uv+o*1e3:NaN}function Mf(n){return n&&parseFloat(n.replace(",","."))||0}function z3(n){if(n==="Z")return 0;const i=n.match(N3);if(!i)return 0;const r=i[1]==="+"?-1:1,u=parseInt(i[2]),o=i[3]&&parseInt(i[3])||0;return U3(u,o)?r*(u*ov+o*uv):NaN}function D3(n,i,r){const u=new Date(0);u.setUTCFullYear(n,0,4);const o=u.getUTCDay()||7,s=(i-1)*7+r+1-o;return u.setUTCDate(u.getUTCDate()+s),u}const H3=[31,null,31,30,31,30,31,31,30,31,30,31];function hv(n){return n%400===0||n%4===0&&n%100!==0}function R3(n,i,r){return i>=0&&i<=11&&r>=1&&r<=(H3[i]||(hv(n)?29:28))}function j3(n,i){return i>=1&&i<=(hv(n)?366:365)}function Y3(n,i,r){return i>=1&&i<=53&&r>=0&&r<=6}function B3(n,i,r){return n===24?i===0&&r===0:r>=0&&r<60&&i>=0&&i<60&&n>=0&&n<25}function U3(n,i){return i>=0&&i<=59}function gv(n){if(!n)return"-";const i=S3(n);return sv(i)?w3(i,"yyyy-MM-dd HH:mm:ss"):n}function L3(n){const i=n.filter(u=>u.kind==="agent"||u.kind==="connector");if(i.length>0)return i;const r=n.filter(u=>u.kind!=="tool"&&u.kind!=="extension");return r.length>0?r:n}function k3(n){return n.kind==="runtime-event"&&(n.subtype==="tool.called"||n.subtype==="tool.completed"||n.subtype==="tool.failed")}function Nf(n,i){const r=n.detail||"",u=\`\${gv(n.at)} · \${n.subtype}\${r?\` · \${r}\`:""}\`;return u.length>i?u.slice(0,i)+"…":u}function q3(n,i){const r=i.get(n.source),u=n.target?i.get(n.target):void 0;return n.subtype==="tool.called"?r??u??0:u??r??0}const Je=220,gy=42,my=64;function V3({viz:n}){const i=(n==null?void 0:n.participants)??[],r=(n==null?void 0:n.timeline)??[],u=ut.useMemo(()=>L3(i).slice(0,10),[i]),o=ut.useMemo(()=>new Map(u.map((h,g)=>[h.id,g])),[u]),s=r.slice(-160),d=Math.max(760,Je*u.length),m=Math.max(280,gy+s.length*my+40);return i.length===0?P.jsx("div",{className:"empty",children:"표시할 participant가 없습니다."}):P.jsx("div",{className:"flow-wrap",children:P.jsxs("svg",{className:"flow-svg",width:d,height:m,viewBox:\`0 0 \${d} \${m}\`,children:[P.jsx("defs",{children:P.jsx("marker",{id:"arrowHead",markerWidth:8,markerHeight:8,refX:7,refY:4,orient:"auto",children:P.jsx("path",{d:"M 0 0 L 8 4 L 0 8 z",fill:"#73f0d6"})})}),u.map((h,g)=>{const p=Je*g+Je/2;return P.jsxs("g",{children:[P.jsx("text",{x:p,y:22,textAnchor:"middle",className:"flow-label",children:h.label}),P.jsx("line",{x1:p,y1:28,x2:p,y2:m-12,className:"flow-lane"})]},h.id)}),s.map((h,g)=>{const p=gy+g*my;if(k3(h)){const A=q3(h,o),D=Je*A+Je/2,E=Math.max(140,Je-30),_=28;return P.jsxs("g",{children:[P.jsx("rect",{x:D-E/2,y:p-_/2,width:E,height:_,className:wr("flow-step",{called:h.subtype==="tool.called",failed:h.subtype==="tool.failed",done:h.subtype==="tool.completed"})}),P.jsx("text",{x:D,y:p+4,textAnchor:"middle",className:"flow-event",children:Nf(h,88)})]},g)}const y=o.get(h.source),v=h.target?o.get(h.target):void 0,x=y??v??0;if(y===void 0||v===void 0||y===v){const A=Je*x+Je/2;return P.jsxs("g",{children:[P.jsx("circle",{cx:A,cy:p,r:4,className:"flow-dot"}),P.jsx("text",{x:A+10,y:p-6,textAnchor:"start",className:"flow-event",children:Nf(h,88)})]},g)}const w=Je*y+Je/2,N=Je*v+Je/2,C=p-18;return P.jsxs("g",{children:[P.jsx("path",{d:\`M \${w} \${p} Q \${(w+N)/2} \${C} \${N} \${p}\`,className:"flow-arc",markerEnd:"url(#arrowHead)"}),P.jsx("text",{x:(w+N)/2,y:p-6,textAnchor:"middle",className:"flow-event",children:Nf(h,92)})]},g)})]})})}function X3({isOpen:n,onClose:i,viz:r,edgeKey:u}){var s;const o=u&&r?(r.interactions??[]).find(d=>d.key===u):void 0;return P.jsxs(P.Fragment,{children:[P.jsxs("aside",{className:wr("flyout",n&&"is-open"),children:[P.jsxs("div",{className:"flyout-head",children:[P.jsx("h3",{children:"Edge History"}),P.jsx("button",{type:"button",className:"flyout-close-btn",onClick:i,children:"×"})]}),P.jsxs("div",{className:"flyout-body",children:[(o==null?void 0:o.key)&&P.jsxs("div",{className:"flyout-edge-label",children:[o.a.replace(/^[^:]+:/,"")," ↔ ",o.b.replace(/^[^:]+:/,""),P.jsxs("span",{className:"flyout-edge-count",children:[o.total," event",o.total!==1?"s":""]})]}),P.jsx("div",{className:"edge-history",children:(s=o==null?void 0:o.history)!=null&&s.length?o.history.map((d,m)=>P.jsxs("div",{className:"history-item",children:[P.jsxs("div",{className:"history-meta",children:[P.jsx("span",{className:"history-time",children:gv(d.at)}),P.jsx("span",{className:"history-dir",children:d.direction}),P.jsx("span",{className:"history-kind",children:d.kind})]}),d.detail&&P.jsx("div",{className:"history-detail",children:d.detail})]},m)):P.jsx("div",{className:"empty",children:"이력 데이터가 없습니다."})})]})]}),P.jsx("div",{className:wr("flyout-scrim",n&&"is-open"),onClick:i})]})}function G3(){var v,x;const{instances:n,selectedKey:i,selectInstance:r,viz:u,pulseEvents:o}=UM(),[s,d]=ut.useState("graph"),[m,h]=ut.useState(null),g=ut.useCallback(w=>{r(w),h(null)},[r]),p=ut.useCallback(w=>{h(N=>N===w?null:w)},[]),y=ut.useCallback(()=>{h(null)},[]);return P.jsxs(tv,{children:[P.jsxs("div",{className:"studio-shell",children:[P.jsx(LM,{instances:n,selectedKey:i,onSelect:g}),P.jsxs("main",{className:"main-panel",children:[P.jsx(kM,{instanceKey:u==null?void 0:u.instanceKey,participantCount:((v=u==null?void 0:u.participants)==null?void 0:v.length)??0,eventCount:((x=u==null?void 0:u.timeline)==null?void 0:x.length)??0,mode:s,onModeChange:d}),P.jsx("section",{className:"visual-stage",children:s==="graph"?P.jsx(yN,{viz:u,selectedEdgeKey:m,pulseEvents:o,onEdgeClick:p}):P.jsx(V3,{viz:u})})]})]}),P.jsx(X3,{isOpen:m!==null,onClose:y,viz:u,edgeKey:m})]})}const yy=document.getElementById("root");yy&&Ob.createRoot(yy).render(P.jsx(ut.StrictMode,{children:P.jsx(G3,{})}));
|
|
78
|
+
</script>
|
|
79
|
+
<style>.react-flow{direction:ltr;--xy-edge-stroke-default: #b1b1b7;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #555;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(255, 255, 255, .5);--xy-minimap-background-color-default: #fff;--xy-minimap-mask-background-color-default: rgba(240, 240, 240, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #e2e2e2;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: transparent;--xy-background-pattern-dots-color-default: #91919a;--xy-background-pattern-lines-color-default: #eee;--xy-background-pattern-cross-color-default: #e2e2e2;background-color:var(--xy-background-color, var(--xy-background-color-default));--xy-node-color-default: inherit;--xy-node-border-default: 1px solid #1a192b;--xy-node-background-color-default: #fff;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #1a192b;--xy-node-border-radius-default: 3px;--xy-handle-background-color-default: #1a192b;--xy-handle-border-color-default: #fff;--xy-selection-background-color-default: rgba(0, 89, 220, .08);--xy-selection-border-default: 1px dotted rgba(0, 89, 220, .8);--xy-controls-button-background-color-default: #fefefe;--xy-controls-button-background-color-hover-default: #f4f4f4;--xy-controls-button-color-default: inherit;--xy-controls-button-color-hover-default: inherit;--xy-controls-button-border-color-default: #eee;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #ffffff;--xy-edge-label-color-default: inherit;--xy-resize-background-color-default: #3367d9}.react-flow.dark{--xy-edge-stroke-default: #3e3e3e;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #727272;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(150, 150, 150, .25);--xy-minimap-background-color-default: #141414;--xy-minimap-mask-background-color-default: rgba(60, 60, 60, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #2b2b2b;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: #141414;--xy-background-pattern-dots-color-default: #777;--xy-background-pattern-lines-color-default: #777;--xy-background-pattern-cross-color-default: #777;--xy-node-color-default: #f8f8f8;--xy-node-border-default: 1px solid #3c3c3c;--xy-node-background-color-default: #1e1e1e;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #999;--xy-handle-background-color-default: #bebebe;--xy-handle-border-color-default: #1e1e1e;--xy-selection-background-color-default: rgba(200, 200, 220, .08);--xy-selection-border-default: 1px dotted rgba(200, 200, 220, .8);--xy-controls-button-background-color-default: #2b2b2b;--xy-controls-button-background-color-hover-default: #3e3e3e;--xy-controls-button-color-default: #f8f8f8;--xy-controls-button-color-hover-default: #fff;--xy-controls-button-border-color-default: #5b5b5b;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #141414;--xy-edge-label-color-default: #f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{overflow:visible;position:absolute;pointer-events:none}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}svg.react-flow__connectionline{z-index:1001;overflow:visible;position:absolute}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background-color:var(--xy-handle-background-color, var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));border-radius:100%}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:0;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px) translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px) translateY(-50%)}.react-flow__attribution{font-size:10px;background:var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;left:0;top:0}.react-flow__viewport-portal{position:absolute;width:100%;height:100%;left:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__minimap{background:var( --xy-minimap-background-color-props, var(--xy-minimap-background-color, var(--xy-minimap-background-color-default)) )}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var( --xy-minimap-mask-background-color-props, var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default)) );stroke:var( --xy-minimap-mask-stroke-color-props, var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default)) );stroke-width:var( --xy-minimap-mask-stroke-width-props, var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default)) )}.react-flow__minimap-node{fill:var( --xy-minimap-node-background-color-props, var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default)) );stroke:var( --xy-minimap-node-stroke-color-props, var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default)) );stroke-width:var( --xy-minimap-node-stroke-width-props, var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default)) )}.react-flow__background-pattern.dots{fill:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default)) )}.react-flow__background-pattern.lines{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default)) )}.react-flow__background-pattern.cross{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default)) )}.react-flow__controls{display:flex;flex-direction:column;box-shadow:var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default))}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{display:flex;justify-content:center;align-items:center;height:26px;width:26px;padding:4px;border:none;background:var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));border-bottom:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) );color:var( --xy-controls-button-color-props, var(--xy-controls-button-color, var(--xy-controls-button-color-default)) );cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px;fill:currentColor}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:var(--xy-node-border-radius, var(--xy-node-border-radius-default));width:150px;font-size:12px;color:var(--xy-node-color, var(--xy-node-color-default));text-align:center;border:var(--xy-node-border, var(--xy-node-border-default));background-color:var(--xy-node-background-color, var(--xy-node-background-color-default))}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default))}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default))}.react-flow__node-group{background-color:var(--xy-node-group-background-color, var(--xy-node-group-background-color-default))}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color, var(--xy-selection-background-color-default));border:var(--xy-selection-border, var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var( --xy-controls-button-background-color-hover-props, var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default)) );color:var( --xy-controls-button-color-hover-props, var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default)) )}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__controls.horizontal .react-flow__controls-button{border-bottom:none;border-right:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) )}.react-flow__controls.horizontal .react-flow__controls-button:last-child{border-right:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:5px;height:5px;border:1px solid #fff;border-radius:1px;background-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));translate:-50% -50%}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default))}.react-flow__edge-text{fill:var(--xy-edge-label-color, var(--xy-edge-label-color-default))}:root{--bg-0: #0b1326;--bg-1: #101c3f;--bg-2: #13295b;--panel: rgba(7, 14, 33, .82);--panel-strong: rgba(9, 20, 46, .95);--text: #e7edff;--muted: #9fb0dc;--dim: #6b80b3;--line: rgba(145, 167, 226, .2);--line-active: #73f0d6;--node-agent: #ffce6e;--node-connector: #8eb8ff;--node-default: #b7c9ff;--accent: #7cf5de;--warn: #ff9f6e;--radius: 12px;--flyout-w: 380px}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body,#root{height:100%}body{font-family:Space Grotesk,IBM Plex Sans KR,Noto Sans KR,system-ui,sans-serif;color:var(--text);background:radial-gradient(circle at 10% 0%,rgba(124,245,222,.14),transparent 36%),radial-gradient(circle at 95% 20%,rgba(142,184,255,.18),transparent 42%),linear-gradient(132deg,var(--bg-0),var(--bg-1) 48%,var(--bg-2))}body:before{content:"";position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;opacity:.12;background-image:linear-gradient(0deg,transparent 24%,rgba(255,255,255,.18) 25%,transparent 26%),linear-gradient(90deg,transparent 24%,rgba(255,255,255,.18) 25%,transparent 26%);background-size:32px 32px}.studio-shell{position:relative;z-index:1;display:grid;grid-template-columns:260px 1fr;height:100vh}.left-panel{border-right:1px solid var(--line);background:linear-gradient(180deg,#081126f5,#081126bd);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);padding:24px 16px 16px;display:flex;flex-direction:column;gap:16px;overflow-y:auto}.brand{padding:0 4px}.brand-kicker{letter-spacing:.22em;font-size:10px;color:var(--accent);text-transform:uppercase}.brand h1{font-size:28px;line-height:1;margin-top:6px;font-weight:700}.instance-list{display:flex;flex-direction:column;gap:6px}.instance-btn{border:1px solid var(--line);background:#12214473;color:var(--text);text-align:left;padding:10px 12px;border-radius:10px;cursor:pointer;font-size:13px;line-height:1.35;font-family:inherit;transition:border-color .2s,background .2s,transform .15s}.inst-key{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.inst-meta{font-size:11px;color:var(--muted);margin-top:3px}.instance-btn:hover{transform:translate(2px);border-color:#7cf5de80;background:#162a5699}.instance-btn.is-active{border-color:var(--accent);background:#1a386eb3;box-shadow:inset 0 0 0 1px #7cf5de24}.main-panel{padding:16px;display:grid;grid-template-rows:auto 1fr;gap:12px;min-width:0;min-height:0}.top-bar{border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:10px 16px;display:flex;justify-content:space-between;align-items:center;gap:12px}.title-wrap h2{font-size:17px;font-weight:600}.title-wrap p{margin-top:2px;color:var(--muted);font-size:12px}.mode-toggle{display:inline-flex;border:1px solid var(--line);border-radius:999px;overflow:hidden;flex-shrink:0}.mode-btn{border:0;background:#1629528c;color:var(--muted);padding:6px 16px;cursor:pointer;font-weight:600;font-size:13px;font-family:inherit;transition:background .2s,color .2s}.mode-btn:hover{background:#1e3464b3}.mode-btn.is-active{background:#7cf5de2e;color:var(--text)}.visual-stage{border:1px solid var(--line);border-radius:var(--radius);background:var(--panel-strong);overflow:hidden;position:relative;min-height:0}.graph-wrap{width:100%;height:100%}.participant-node{display:flex;align-items:center;gap:8px;padding:8px 14px;border-radius:10px;background:var(--bg-1);border:1.5px solid var(--line);font-size:13px;font-weight:600;color:var(--text);min-width:100px;transition:border-color .2s,box-shadow .2s}.participant-node.kind-agent{border-color:var(--node-agent)}.participant-node.kind-connector{border-color:var(--node-connector)}.participant-node.kind-tool{border-color:var(--node-default)}.participant-node.is-active{box-shadow:0 0 14px #7cf5de80;border-color:var(--accent)}.participant-badge{width:24px;height:24px;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;flex-shrink:0}.kind-agent .participant-badge{background:var(--node-agent);color:#1a1200}.kind-connector .participant-badge{background:var(--node-connector);color:#001a3a}.kind-tool .participant-badge{background:var(--node-default);color:#0b1326}.participant-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:120px}.participant-handle{width:6px!important;height:6px!important;background:var(--line)!important;border:none!important;opacity:.4}.react-flow__controls{box-shadow:0 4px 12px #0000004d!important}.react-flow__controls button{background:var(--bg-1)!important;border-color:var(--line)!important;color:var(--muted)!important;fill:var(--muted)!important}.react-flow__controls button:hover{background:var(--bg-2)!important}.react-flow__controls button svg{fill:var(--muted)!important}.react-flow__minimap{border:1px solid var(--line)!important;border-radius:8px!important;overflow:hidden!important;background:#0b1326cc!important}.flow-wrap{width:100%;height:100%;overflow:auto}.flow-svg{display:block}.flow-label{fill:var(--muted);font-size:11px}.flow-event{fill:var(--text);font-size:11px}.flow-lane{stroke:#8eb8ff33;stroke-width:1}.flow-arc{stroke:#73f0d6cc;stroke-width:2;fill:none}.flow-step{fill:#8eb8ff2e;stroke:#8eb8ff8c;stroke-width:1.2;rx:8;ry:8}.flow-step.called{fill:#8eb8ff38;stroke:#8eb8ffb8}.flow-step.done{fill:#7cf5de2e;stroke:#7cf5deb8}.flow-step.failed{fill:#ff9f6e2e;stroke:#ff9f6eb8}.flow-dot{fill:#73f0d6;stroke:#081126cc;stroke-width:1}.flyout{position:fixed;top:0;right:0;bottom:0;width:var(--flyout-w);max-width:90vw;z-index:200;display:flex;flex-direction:column;background:linear-gradient(180deg,#0a1228fa,#080f22f5);border-left:1px solid var(--line);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);box-shadow:-8px 0 32px #00000059;transform:translate(100%);transition:transform .28s cubic-bezier(.4,0,.2,1)}.flyout.is-open{transform:translate(0)}.flyout-head{display:flex;justify-content:space-between;align-items:center;padding:18px 18px 14px;border-bottom:1px solid var(--line);flex-shrink:0}.flyout-head h3{font-size:15px;font-weight:600;color:var(--accent)}.flyout-close-btn{border:0;background:#ffffff14;color:var(--muted);width:28px;height:28px;border-radius:8px;cursor:pointer;font-size:18px;line-height:1;display:flex;align-items:center;justify-content:center;transition:background .15s,color .15s}.flyout-close-btn:hover{background:#ffffff24;color:var(--text)}.flyout-body{flex:1;overflow-y:auto;padding:14px 18px 18px}.flyout-edge-label{font-size:14px;font-weight:600;margin-bottom:12px;color:var(--text);display:flex;align-items:center;gap:8px}.flyout-edge-count{font-size:11px;font-weight:500;color:var(--muted);background:#ffffff0f;padding:2px 8px;border-radius:6px}.flyout-scrim{position:fixed;top:0;right:0;bottom:0;left:0;z-index:199;background:#00000040;opacity:0;pointer-events:none;transition:opacity .28s ease}.flyout-scrim.is-open{opacity:1;pointer-events:auto}.edge-history{font-size:12px;line-height:1.5}.history-item{padding:10px 0;border-bottom:1px solid var(--line)}.history-item:last-child{border-bottom:none}.history-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.history-time{font-size:11px;color:var(--dim)}.history-dir{font-size:10px;font-weight:700;color:var(--accent);letter-spacing:.02em}.history-kind{font-size:10px;padding:1px 7px;border-radius:4px;background:#7cf5de1a;color:var(--accent)}.history-detail{margin-top:4px;font-size:12px;line-height:1.45;color:var(--text);word-break:break-word;opacity:.88}.empty{color:var(--muted);padding:16px;font-size:13px}@media(max-width:920px){.studio-shell{grid-template-columns:1fr;grid-template-rows:auto 1fr}.left-panel{border-right:0;border-bottom:1px solid var(--line);max-height:200px;padding:16px}.brand h1{font-size:22px}}
|
|
80
|
+
</style>
|
|
8
81
|
</head>
|
|
9
82
|
<body>
|
|
10
|
-
<div
|
|
11
|
-
<aside class="left-panel">
|
|
12
|
-
<div class="brand">
|
|
13
|
-
<div class="brand-kicker">GOONDAN</div>
|
|
14
|
-
<h1>Studio</h1>
|
|
15
|
-
</div>
|
|
16
|
-
<div id="instance-list" class="instance-list"></div>
|
|
17
|
-
</aside>
|
|
18
|
-
<main class="main-panel">
|
|
19
|
-
<header class="top-bar">
|
|
20
|
-
<div class="title-wrap">
|
|
21
|
-
<h2 id="instance-title">인스턴스를 선택하세요</h2>
|
|
22
|
-
<p id="instance-subtitle">runtime event stream</p>
|
|
23
|
-
</div>
|
|
24
|
-
<div class="mode-toggle">
|
|
25
|
-
<button id="mode-graph" class="mode-btn is-active" type="button">Graph</button>
|
|
26
|
-
<button id="mode-flow" class="mode-btn" type="button">Flow</button>
|
|
27
|
-
</div>
|
|
28
|
-
</header>
|
|
29
|
-
<section class="visual-stage">
|
|
30
|
-
<div id="graph-view" class="view is-active"></div>
|
|
31
|
-
<div id="flow-view" class="view"></div>
|
|
32
|
-
</section>
|
|
33
|
-
<section class="detail-panel">
|
|
34
|
-
<h3>Edge History</h3>
|
|
35
|
-
<div id="edge-history" class="edge-history"></div>
|
|
36
|
-
</section>
|
|
37
|
-
</main>
|
|
38
|
-
</div>
|
|
39
|
-
<script type="module" src="/studio.js"></script>
|
|
83
|
+
<div id="root"></div>
|
|
40
84
|
</body>
|
|
41
85
|
</html>
|
|
42
86
|
`;
|
|
43
|
-
export const STUDIO_CSS = `:root {
|
|
44
|
-
--bg-0: #0b1326;
|
|
45
|
-
--bg-1: #101c3f;
|
|
46
|
-
--bg-2: #13295b;
|
|
47
|
-
--panel: rgba(7, 14, 33, 0.78);
|
|
48
|
-
--panel-strong: rgba(9, 20, 46, 0.94);
|
|
49
|
-
--text: #e7edff;
|
|
50
|
-
--muted: #9fb0dc;
|
|
51
|
-
--line: rgba(145, 167, 226, 0.28);
|
|
52
|
-
--line-active: #73f0d6;
|
|
53
|
-
--node-agent: #ffce6e;
|
|
54
|
-
--node-connector: #8eb8ff;
|
|
55
|
-
--node-default: #b7c9ff;
|
|
56
|
-
--accent: #7cf5de;
|
|
57
|
-
--warn: #ff9f6e;
|
|
58
|
-
--radius: 14px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
* {
|
|
62
|
-
box-sizing: border-box;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
html,
|
|
66
|
-
body {
|
|
67
|
-
margin: 0;
|
|
68
|
-
min-height: 100%;
|
|
69
|
-
font-family: "Space Grotesk", "IBM Plex Sans KR", "Noto Sans KR", sans-serif;
|
|
70
|
-
color: var(--text);
|
|
71
|
-
background:
|
|
72
|
-
radial-gradient(circle at 10% 0%, rgba(124, 245, 222, 0.16), transparent 36%),
|
|
73
|
-
radial-gradient(circle at 95% 20%, rgba(142, 184, 255, 0.22), transparent 42%),
|
|
74
|
-
linear-gradient(132deg, var(--bg-0), var(--bg-1) 48%, var(--bg-2));
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
body::before {
|
|
78
|
-
content: "";
|
|
79
|
-
position: fixed;
|
|
80
|
-
inset: 0;
|
|
81
|
-
pointer-events: none;
|
|
82
|
-
opacity: 0.18;
|
|
83
|
-
background-image:
|
|
84
|
-
linear-gradient(0deg, transparent 24%, rgba(255, 255, 255, 0.22) 25%, transparent 26%),
|
|
85
|
-
linear-gradient(90deg, transparent 24%, rgba(255, 255, 255, 0.22) 25%, transparent 26%);
|
|
86
|
-
background-size: 28px 28px;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.studio-shell {
|
|
90
|
-
position: relative;
|
|
91
|
-
z-index: 1;
|
|
92
|
-
display: grid;
|
|
93
|
-
grid-template-columns: minmax(220px, 320px) 1fr;
|
|
94
|
-
min-height: 100vh;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.left-panel {
|
|
98
|
-
border-right: 1px solid var(--line);
|
|
99
|
-
background: linear-gradient(180deg, rgba(8, 17, 38, 0.94), rgba(8, 17, 38, 0.72));
|
|
100
|
-
backdrop-filter: blur(10px);
|
|
101
|
-
padding: 20px 16px;
|
|
102
|
-
overflow-y: auto;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.brand-kicker {
|
|
106
|
-
letter-spacing: 0.24em;
|
|
107
|
-
font-size: 11px;
|
|
108
|
-
color: var(--accent);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.brand h1 {
|
|
112
|
-
margin: 6px 0 18px;
|
|
113
|
-
font-size: 30px;
|
|
114
|
-
line-height: 1;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.instance-list {
|
|
118
|
-
display: flex;
|
|
119
|
-
flex-direction: column;
|
|
120
|
-
gap: 8px;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.instance-btn {
|
|
124
|
-
border: 1px solid var(--line);
|
|
125
|
-
background: rgba(18, 33, 68, 0.55);
|
|
126
|
-
color: var(--text);
|
|
127
|
-
text-align: left;
|
|
128
|
-
padding: 11px 12px;
|
|
129
|
-
border-radius: 10px;
|
|
130
|
-
cursor: pointer;
|
|
131
|
-
transition: border-color 0.25s ease, transform 0.2s ease, background 0.2s ease;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.instance-btn .status {
|
|
135
|
-
font-size: 12px;
|
|
136
|
-
color: var(--muted);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.instance-btn:hover {
|
|
140
|
-
transform: translateX(2px);
|
|
141
|
-
border-color: rgba(124, 245, 222, 0.62);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.instance-btn.is-active {
|
|
145
|
-
border-color: var(--accent);
|
|
146
|
-
background: rgba(26, 56, 110, 0.75);
|
|
147
|
-
box-shadow: 0 0 0 1px rgba(124, 245, 222, 0.18) inset;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.main-panel {
|
|
151
|
-
padding: 16px;
|
|
152
|
-
display: grid;
|
|
153
|
-
grid-template-rows: auto 1fr 170px;
|
|
154
|
-
gap: 12px;
|
|
155
|
-
min-width: 0;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.top-bar {
|
|
159
|
-
border: 1px solid var(--line);
|
|
160
|
-
border-radius: var(--radius);
|
|
161
|
-
background: var(--panel);
|
|
162
|
-
backdrop-filter: blur(10px);
|
|
163
|
-
padding: 12px 14px;
|
|
164
|
-
display: flex;
|
|
165
|
-
justify-content: space-between;
|
|
166
|
-
align-items: center;
|
|
167
|
-
gap: 10px;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.title-wrap h2 {
|
|
171
|
-
margin: 0;
|
|
172
|
-
font-size: 19px;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.title-wrap p {
|
|
176
|
-
margin: 2px 0 0;
|
|
177
|
-
color: var(--muted);
|
|
178
|
-
font-size: 13px;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.mode-toggle {
|
|
182
|
-
display: inline-flex;
|
|
183
|
-
border: 1px solid var(--line);
|
|
184
|
-
border-radius: 999px;
|
|
185
|
-
overflow: hidden;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.mode-btn {
|
|
189
|
-
border: 0;
|
|
190
|
-
background: rgba(22, 41, 82, 0.62);
|
|
191
|
-
color: var(--muted);
|
|
192
|
-
padding: 7px 15px;
|
|
193
|
-
cursor: pointer;
|
|
194
|
-
font-weight: 600;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.mode-btn.is-active {
|
|
198
|
-
background: rgba(124, 245, 222, 0.22);
|
|
199
|
-
color: var(--text);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.visual-stage {
|
|
203
|
-
border: 1px solid var(--line);
|
|
204
|
-
border-radius: var(--radius);
|
|
205
|
-
background: var(--panel-strong);
|
|
206
|
-
overflow: hidden;
|
|
207
|
-
position: relative;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.view {
|
|
211
|
-
display: none;
|
|
212
|
-
width: 100%;
|
|
213
|
-
height: 100%;
|
|
214
|
-
min-height: 320px;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.view.is-active {
|
|
218
|
-
display: block;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.detail-panel {
|
|
222
|
-
border: 1px solid var(--line);
|
|
223
|
-
border-radius: var(--radius);
|
|
224
|
-
background: var(--panel);
|
|
225
|
-
padding: 10px 12px;
|
|
226
|
-
overflow: hidden;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.detail-panel h3 {
|
|
230
|
-
margin: 0 0 8px;
|
|
231
|
-
font-size: 14px;
|
|
232
|
-
color: var(--accent);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.edge-history {
|
|
236
|
-
overflow: auto;
|
|
237
|
-
max-height: 118px;
|
|
238
|
-
font-size: 12px;
|
|
239
|
-
line-height: 1.45;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.history-item {
|
|
243
|
-
border-bottom: 1px dashed rgba(159, 176, 220, 0.25);
|
|
244
|
-
padding: 5px 0;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.history-item:last-child {
|
|
248
|
-
border-bottom: none;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.empty {
|
|
252
|
-
color: var(--muted);
|
|
253
|
-
padding: 12px;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.graph-wrap,
|
|
257
|
-
.flow-wrap {
|
|
258
|
-
width: 100%;
|
|
259
|
-
height: 100%;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.graph-svg,
|
|
263
|
-
.flow-svg {
|
|
264
|
-
width: 100%;
|
|
265
|
-
height: 100%;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.edge {
|
|
269
|
-
stroke: var(--line);
|
|
270
|
-
stroke-width: 2;
|
|
271
|
-
cursor: pointer;
|
|
272
|
-
transition: stroke 0.2s ease, stroke-width 0.2s ease, opacity 0.2s ease;
|
|
273
|
-
opacity: 0.72;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.edge.is-active {
|
|
277
|
-
stroke: var(--line-active);
|
|
278
|
-
stroke-width: 3;
|
|
279
|
-
opacity: 1;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
.edge.is-selected {
|
|
283
|
-
stroke: var(--warn);
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.node circle {
|
|
287
|
-
stroke: rgba(240, 248, 255, 0.84);
|
|
288
|
-
stroke-width: 1.5;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
.node text {
|
|
292
|
-
fill: var(--text);
|
|
293
|
-
font-size: 12px;
|
|
294
|
-
text-anchor: middle;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.node.kind-agent circle {
|
|
298
|
-
fill: var(--node-agent);
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.node.kind-connector circle {
|
|
302
|
-
fill: var(--node-connector);
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
.node.kind-other circle {
|
|
306
|
-
fill: var(--node-default);
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.node.is-active circle {
|
|
310
|
-
filter: drop-shadow(0 0 6px rgba(124, 245, 222, 0.78));
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.flow-wrap {
|
|
314
|
-
overflow: auto;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
.flow-label {
|
|
318
|
-
fill: var(--muted);
|
|
319
|
-
font-size: 11px;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
.flow-event {
|
|
323
|
-
fill: var(--text);
|
|
324
|
-
font-size: 11px;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
.flow-lane {
|
|
328
|
-
stroke: rgba(142, 184, 255, 0.25);
|
|
329
|
-
stroke-width: 1;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
.flow-arc {
|
|
333
|
-
stroke: rgba(115, 240, 214, 0.85);
|
|
334
|
-
stroke-width: 2;
|
|
335
|
-
fill: none;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
.flow-step {
|
|
339
|
-
fill: rgba(142, 184, 255, 0.2);
|
|
340
|
-
stroke: rgba(142, 184, 255, 0.62);
|
|
341
|
-
stroke-width: 1.2;
|
|
342
|
-
rx: 8;
|
|
343
|
-
ry: 8;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
.flow-step.called {
|
|
347
|
-
fill: rgba(142, 184, 255, 0.24);
|
|
348
|
-
stroke: rgba(142, 184, 255, 0.78);
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
.flow-step.done {
|
|
352
|
-
fill: rgba(124, 245, 222, 0.22);
|
|
353
|
-
stroke: rgba(124, 245, 222, 0.78);
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
.flow-step.failed {
|
|
357
|
-
fill: rgba(255, 159, 110, 0.2);
|
|
358
|
-
stroke: rgba(255, 159, 110, 0.78);
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
.flow-dot {
|
|
362
|
-
fill: #73f0d6;
|
|
363
|
-
stroke: rgba(8, 17, 38, 0.8);
|
|
364
|
-
stroke-width: 1;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
.event-particle {
|
|
368
|
-
fill: #ffffff;
|
|
369
|
-
filter: drop-shadow(0 0 6px rgba(124, 245, 222, 0.9));
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
@media (max-width: 920px) {
|
|
373
|
-
.studio-shell {
|
|
374
|
-
grid-template-columns: 1fr;
|
|
375
|
-
grid-template-rows: auto 1fr;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
.left-panel {
|
|
379
|
-
border-right: 0;
|
|
380
|
-
border-bottom: 1px solid var(--line);
|
|
381
|
-
max-height: 210px;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
.main-panel {
|
|
385
|
-
grid-template-rows: auto 1fr 180px;
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
`;
|
|
389
|
-
export const STUDIO_JS = `const state = {
|
|
390
|
-
mode: "graph",
|
|
391
|
-
instances: [],
|
|
392
|
-
instancesDigest: "",
|
|
393
|
-
selectedInstanceKey: null,
|
|
394
|
-
visualization: null,
|
|
395
|
-
visualizationDigest: "",
|
|
396
|
-
selectedEdgeKey: null,
|
|
397
|
-
pollTimer: null,
|
|
398
|
-
seenRecentEventKeys: new Set(),
|
|
399
|
-
recentEventKeyQueue: [],
|
|
400
|
-
recentPulseEvents: [],
|
|
401
|
-
hasHydratedRecentEvents: false,
|
|
402
|
-
};
|
|
403
|
-
|
|
404
|
-
const els = {
|
|
405
|
-
list: document.getElementById("instance-list"),
|
|
406
|
-
title: document.getElementById("instance-title"),
|
|
407
|
-
subtitle: document.getElementById("instance-subtitle"),
|
|
408
|
-
graphView: document.getElementById("graph-view"),
|
|
409
|
-
flowView: document.getElementById("flow-view"),
|
|
410
|
-
edgeHistory: document.getElementById("edge-history"),
|
|
411
|
-
modeGraph: document.getElementById("mode-graph"),
|
|
412
|
-
modeFlow: document.getElementById("mode-flow"),
|
|
413
|
-
};
|
|
414
|
-
|
|
415
|
-
function createSvgEl(tag) {
|
|
416
|
-
return document.createElementNS("http://www.w3.org/2000/svg", tag);
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
function setMode(next) {
|
|
420
|
-
state.mode = next;
|
|
421
|
-
const isGraph = next === "graph";
|
|
422
|
-
els.graphView.classList.toggle("is-active", isGraph);
|
|
423
|
-
els.flowView.classList.toggle("is-active", !isGraph);
|
|
424
|
-
els.modeGraph.classList.toggle("is-active", isGraph);
|
|
425
|
-
els.modeFlow.classList.toggle("is-active", !isGraph);
|
|
426
|
-
renderVisualization();
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
function formatTs(iso) {
|
|
430
|
-
if (!iso) {
|
|
431
|
-
return "-";
|
|
432
|
-
}
|
|
433
|
-
const date = new Date(iso);
|
|
434
|
-
if (Number.isNaN(date.getTime())) {
|
|
435
|
-
return iso;
|
|
436
|
-
}
|
|
437
|
-
return date.toLocaleString();
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
function eventKey(event) {
|
|
441
|
-
return [event.at, event.source, event.target || "", event.subtype, event.detail].join("|");
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
function computeInstancesDigest(items, selectedInstanceKey) {
|
|
445
|
-
const normalized = Array.isArray(items) ? items : [];
|
|
446
|
-
const rows = normalized.map((item) =>
|
|
447
|
-
[
|
|
448
|
-
item && typeof item.key === "string" ? item.key : "",
|
|
449
|
-
item && typeof item.status === "string" ? item.status : "",
|
|
450
|
-
item && typeof item.agent === "string" ? item.agent : "",
|
|
451
|
-
item && typeof item.updatedAt === "string" ? item.updatedAt : "",
|
|
452
|
-
].join(":"),
|
|
453
|
-
);
|
|
454
|
-
return selectedInstanceKey + "|" + rows.join("||");
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
function computeVisualizationDigest(payload) {
|
|
458
|
-
if (!payload) {
|
|
459
|
-
return "";
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
const participants = Array.isArray(payload.participants) ? payload.participants : [];
|
|
463
|
-
const interactions = Array.isArray(payload.interactions) ? payload.interactions : [];
|
|
464
|
-
const timeline = Array.isArray(payload.timeline) ? payload.timeline : [];
|
|
465
|
-
const recent = Array.isArray(payload.recentEvents) ? payload.recentEvents : [];
|
|
466
|
-
|
|
467
|
-
const timelineTail = timeline.length > 0 ? eventKey(timeline[timeline.length - 1]) : "";
|
|
468
|
-
const recentTail = recent.length > 0 ? eventKey(recent[recent.length - 1]) : "";
|
|
469
|
-
return [
|
|
470
|
-
payload.instanceKey || "",
|
|
471
|
-
String(participants.length),
|
|
472
|
-
String(interactions.length),
|
|
473
|
-
String(timeline.length),
|
|
474
|
-
timelineTail,
|
|
475
|
-
recentTail,
|
|
476
|
-
].join("|");
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
function resetRecentEventTracking() {
|
|
480
|
-
state.seenRecentEventKeys = new Set();
|
|
481
|
-
state.recentEventKeyQueue = [];
|
|
482
|
-
state.recentPulseEvents = [];
|
|
483
|
-
state.hasHydratedRecentEvents = false;
|
|
484
|
-
state.visualizationDigest = "";
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
function trackRecentEventKey(key) {
|
|
488
|
-
if (state.seenRecentEventKeys.has(key)) {
|
|
489
|
-
return false;
|
|
490
|
-
}
|
|
491
|
-
state.seenRecentEventKeys.add(key);
|
|
492
|
-
state.recentEventKeyQueue.push(key);
|
|
493
|
-
|
|
494
|
-
while (state.recentEventKeyQueue.length > 2000) {
|
|
495
|
-
const oldest = state.recentEventKeyQueue.shift();
|
|
496
|
-
if (oldest) {
|
|
497
|
-
state.seenRecentEventKeys.delete(oldest);
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
return true;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
async function fetchJson(url) {
|
|
504
|
-
const res = await fetch(url, { cache: "no-store" });
|
|
505
|
-
if (!res.ok) {
|
|
506
|
-
throw new Error("request failed: " + res.status);
|
|
507
|
-
}
|
|
508
|
-
return await res.json();
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
async function refreshInstances() {
|
|
512
|
-
const previousSelected = state.selectedInstanceKey;
|
|
513
|
-
const payload = await fetchJson("/api/instances");
|
|
514
|
-
state.instances = Array.isArray(payload.items) ? payload.items : [];
|
|
515
|
-
if (!state.selectedInstanceKey && state.instances.length > 0) {
|
|
516
|
-
state.selectedInstanceKey = state.instances[0].key;
|
|
517
|
-
}
|
|
518
|
-
if (
|
|
519
|
-
state.selectedInstanceKey &&
|
|
520
|
-
!state.instances.some((item) => item.key === state.selectedInstanceKey)
|
|
521
|
-
) {
|
|
522
|
-
state.selectedInstanceKey = state.instances.length > 0 ? state.instances[0].key : null;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
if (previousSelected !== state.selectedInstanceKey) {
|
|
526
|
-
resetRecentEventTracking();
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
const digest = computeInstancesDigest(state.instances, state.selectedInstanceKey);
|
|
530
|
-
if (digest !== state.instancesDigest) {
|
|
531
|
-
state.instancesDigest = digest;
|
|
532
|
-
renderInstanceList();
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
async function refreshVisualization() {
|
|
537
|
-
if (!state.selectedInstanceKey) {
|
|
538
|
-
const hadVisualization = state.visualization !== null;
|
|
539
|
-
state.visualization = null;
|
|
540
|
-
state.visualizationDigest = "";
|
|
541
|
-
if (hadVisualization) {
|
|
542
|
-
resetRecentEventTracking();
|
|
543
|
-
renderVisualization();
|
|
544
|
-
}
|
|
545
|
-
return;
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
const key = encodeURIComponent(state.selectedInstanceKey);
|
|
549
|
-
const payload = await fetchJson("/api/instances/" + key + "/visualization");
|
|
550
|
-
const recentEvents = Array.isArray(payload.recentEvents) ? payload.recentEvents : [];
|
|
551
|
-
if (!state.hasHydratedRecentEvents) {
|
|
552
|
-
for (const event of recentEvents) {
|
|
553
|
-
trackRecentEventKey(eventKey(event));
|
|
554
|
-
}
|
|
555
|
-
state.recentPulseEvents = [];
|
|
556
|
-
state.hasHydratedRecentEvents = true;
|
|
557
|
-
} else {
|
|
558
|
-
const pulseEvents = [];
|
|
559
|
-
for (const event of recentEvents) {
|
|
560
|
-
const keyForEvent = eventKey(event);
|
|
561
|
-
if (trackRecentEventKey(keyForEvent)) {
|
|
562
|
-
pulseEvents.push(event);
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
state.recentPulseEvents = pulseEvents;
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
const nextDigest = computeVisualizationDigest(payload);
|
|
569
|
-
const hasPulse = Array.isArray(state.recentPulseEvents) && state.recentPulseEvents.length > 0;
|
|
570
|
-
if (nextDigest !== state.visualizationDigest || hasPulse) {
|
|
571
|
-
state.visualization = payload;
|
|
572
|
-
state.visualizationDigest = nextDigest;
|
|
573
|
-
renderVisualization();
|
|
574
|
-
} else {
|
|
575
|
-
state.visualization = payload;
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
function renderInstanceList() {
|
|
580
|
-
els.list.innerHTML = "";
|
|
581
|
-
if (state.instances.length === 0) {
|
|
582
|
-
const empty = document.createElement("div");
|
|
583
|
-
empty.className = "empty";
|
|
584
|
-
empty.textContent = "실행 중인 인스턴스가 없습니다.";
|
|
585
|
-
els.list.appendChild(empty);
|
|
586
|
-
return;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
for (const item of state.instances) {
|
|
590
|
-
const button = document.createElement("button");
|
|
591
|
-
button.type = "button";
|
|
592
|
-
button.className = "instance-btn";
|
|
593
|
-
if (item.key === state.selectedInstanceKey) {
|
|
594
|
-
button.classList.add("is-active");
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
const title = document.createElement("div");
|
|
598
|
-
title.textContent = item.key;
|
|
599
|
-
const meta = document.createElement("div");
|
|
600
|
-
meta.className = "status";
|
|
601
|
-
meta.textContent = (item.status || "unknown") + " / " + (item.agent || "orchestrator");
|
|
602
|
-
|
|
603
|
-
button.appendChild(title);
|
|
604
|
-
button.appendChild(meta);
|
|
605
|
-
button.addEventListener("click", () => {
|
|
606
|
-
state.selectedInstanceKey = item.key;
|
|
607
|
-
state.selectedEdgeKey = null;
|
|
608
|
-
resetRecentEventTracking();
|
|
609
|
-
state.instancesDigest = "";
|
|
610
|
-
renderInstanceList();
|
|
611
|
-
void refreshVisualization();
|
|
612
|
-
});
|
|
613
|
-
els.list.appendChild(button);
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
function renderEdgeHistory() {
|
|
618
|
-
els.edgeHistory.innerHTML = "";
|
|
619
|
-
const viz = state.visualization;
|
|
620
|
-
if (!viz || !state.selectedEdgeKey) {
|
|
621
|
-
const empty = document.createElement("div");
|
|
622
|
-
empty.className = "empty";
|
|
623
|
-
empty.textContent = "간선을 선택하면 이벤트 이력이 표시됩니다.";
|
|
624
|
-
els.edgeHistory.appendChild(empty);
|
|
625
|
-
return;
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
const target = (viz.interactions || []).find((edge) => edge.key === state.selectedEdgeKey);
|
|
629
|
-
if (!target || !Array.isArray(target.history) || target.history.length === 0) {
|
|
630
|
-
const empty = document.createElement("div");
|
|
631
|
-
empty.className = "empty";
|
|
632
|
-
empty.textContent = "이력 데이터가 없습니다.";
|
|
633
|
-
els.edgeHistory.appendChild(empty);
|
|
634
|
-
return;
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
for (const item of target.history) {
|
|
638
|
-
const row = document.createElement("div");
|
|
639
|
-
row.className = "history-item";
|
|
640
|
-
row.textContent =
|
|
641
|
-
formatTs(item.at) +
|
|
642
|
-
" " +
|
|
643
|
-
item.direction +
|
|
644
|
-
" " +
|
|
645
|
-
item.kind +
|
|
646
|
-
" " +
|
|
647
|
-
(item.detail || "");
|
|
648
|
-
els.edgeHistory.appendChild(row);
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
function renderVisualization() {
|
|
653
|
-
const viz = state.visualization;
|
|
654
|
-
if (!viz) {
|
|
655
|
-
els.title.textContent = "인스턴스를 선택하세요";
|
|
656
|
-
els.subtitle.textContent = "runtime event stream";
|
|
657
|
-
els.graphView.innerHTML = "<div class='empty'>데이터가 없습니다.</div>";
|
|
658
|
-
els.flowView.innerHTML = "<div class='empty'>데이터가 없습니다.</div>";
|
|
659
|
-
renderEdgeHistory();
|
|
660
|
-
return;
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
els.title.textContent = viz.instanceKey || "instance";
|
|
664
|
-
const participantCount = Array.isArray(viz.participants) ? viz.participants.length : 0;
|
|
665
|
-
const eventCount = Array.isArray(viz.timeline) ? viz.timeline.length : 0;
|
|
666
|
-
els.subtitle.textContent = "participants " + participantCount + " / events " + eventCount;
|
|
667
|
-
|
|
668
|
-
if (state.mode === "graph") {
|
|
669
|
-
renderGraph(viz);
|
|
670
|
-
} else {
|
|
671
|
-
renderFlow(viz);
|
|
672
|
-
}
|
|
673
|
-
renderEdgeHistory();
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
function pickGraphParticipants(participants) {
|
|
677
|
-
const list = participants.filter((item) => item.kind === "agent" || item.kind === "connector");
|
|
678
|
-
if (list.length > 0) {
|
|
679
|
-
return list;
|
|
680
|
-
}
|
|
681
|
-
return participants;
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
function renderGraph(viz) {
|
|
685
|
-
const participants = Array.isArray(viz.participants) ? pickGraphParticipants(viz.participants) : [];
|
|
686
|
-
const interactions = Array.isArray(viz.interactions) ? viz.interactions : [];
|
|
687
|
-
const pulseEvents = Array.isArray(state.recentPulseEvents) ? state.recentPulseEvents : [];
|
|
688
|
-
|
|
689
|
-
if (participants.length === 0) {
|
|
690
|
-
els.graphView.innerHTML = "<div class='empty'>표시할 participant가 없습니다.</div>";
|
|
691
|
-
return;
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
const wrap = document.createElement("div");
|
|
695
|
-
wrap.className = "graph-wrap";
|
|
696
|
-
const svg = createSvgEl("svg");
|
|
697
|
-
svg.setAttribute("class", "graph-svg");
|
|
698
|
-
svg.setAttribute("viewBox", "0 0 1000 600");
|
|
699
|
-
|
|
700
|
-
const centerX = 500;
|
|
701
|
-
const centerY = 300;
|
|
702
|
-
const radius = Math.max(170, Math.min(250, 70 + participants.length * 18));
|
|
703
|
-
const positions = new Map();
|
|
704
|
-
|
|
705
|
-
participants.forEach((node, index) => {
|
|
706
|
-
const ratio = (Math.PI * 2 * index) / participants.length;
|
|
707
|
-
const x = centerX + Math.cos(ratio) * radius;
|
|
708
|
-
const y = centerY + Math.sin(ratio) * radius;
|
|
709
|
-
positions.set(node.id, { x, y, item: node });
|
|
710
|
-
});
|
|
711
|
-
|
|
712
|
-
const edgeLayer = createSvgEl("g");
|
|
713
|
-
const nodeLayer = createSvgEl("g");
|
|
714
|
-
const fxLayer = createSvgEl("g");
|
|
715
|
-
svg.appendChild(edgeLayer);
|
|
716
|
-
svg.appendChild(nodeLayer);
|
|
717
|
-
svg.appendChild(fxLayer);
|
|
718
|
-
|
|
719
|
-
const edgePathByKey = new Map();
|
|
720
|
-
for (const edge of interactions) {
|
|
721
|
-
const from = positions.get(edge.a);
|
|
722
|
-
const to = positions.get(edge.b);
|
|
723
|
-
if (!from || !to) {
|
|
724
|
-
continue;
|
|
725
|
-
}
|
|
726
|
-
const line = createSvgEl("line");
|
|
727
|
-
line.setAttribute("x1", String(from.x));
|
|
728
|
-
line.setAttribute("y1", String(from.y));
|
|
729
|
-
line.setAttribute("x2", String(to.x));
|
|
730
|
-
line.setAttribute("y2", String(to.y));
|
|
731
|
-
line.setAttribute("class", "edge");
|
|
732
|
-
if (state.selectedEdgeKey === edge.key) {
|
|
733
|
-
line.classList.add("is-selected");
|
|
734
|
-
}
|
|
735
|
-
line.addEventListener("click", () => {
|
|
736
|
-
state.selectedEdgeKey = edge.key;
|
|
737
|
-
renderVisualization();
|
|
738
|
-
});
|
|
739
|
-
edgeLayer.appendChild(line);
|
|
740
|
-
edgePathByKey.set(edge.key, {
|
|
741
|
-
path: "M " + from.x + " " + from.y + " L " + to.x + " " + to.y,
|
|
742
|
-
line,
|
|
743
|
-
from: edge.a,
|
|
744
|
-
to: edge.b,
|
|
745
|
-
});
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
const activeNodes = new Set();
|
|
749
|
-
const activeEdges = new Set();
|
|
750
|
-
for (const event of pulseEvents) {
|
|
751
|
-
const source = event.source;
|
|
752
|
-
const target = event.target || "";
|
|
753
|
-
activeNodes.add(source);
|
|
754
|
-
if (target) {
|
|
755
|
-
activeNodes.add(target);
|
|
756
|
-
for (const edge of interactions) {
|
|
757
|
-
if (
|
|
758
|
-
(edge.a === source && edge.b === target) ||
|
|
759
|
-
(edge.a === target && edge.b === source)
|
|
760
|
-
) {
|
|
761
|
-
activeEdges.add(edge.key);
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
for (const edge of interactions) {
|
|
768
|
-
const edgeInfo = edgePathByKey.get(edge.key);
|
|
769
|
-
if (!edgeInfo) {
|
|
770
|
-
continue;
|
|
771
|
-
}
|
|
772
|
-
if (activeEdges.has(edge.key)) {
|
|
773
|
-
edgeInfo.line.classList.add("is-active");
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
for (const node of participants) {
|
|
778
|
-
const point = positions.get(node.id);
|
|
779
|
-
if (!point) {
|
|
780
|
-
continue;
|
|
781
|
-
}
|
|
782
|
-
const g = createSvgEl("g");
|
|
783
|
-
g.setAttribute("class", "node");
|
|
784
|
-
if (node.kind === "agent") {
|
|
785
|
-
g.classList.add("kind-agent");
|
|
786
|
-
} else if (node.kind === "connector") {
|
|
787
|
-
g.classList.add("kind-connector");
|
|
788
|
-
} else {
|
|
789
|
-
g.classList.add("kind-other");
|
|
790
|
-
}
|
|
791
|
-
if (activeNodes.has(node.id)) {
|
|
792
|
-
g.classList.add("is-active");
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
const circle = createSvgEl("circle");
|
|
796
|
-
circle.setAttribute("cx", String(point.x));
|
|
797
|
-
circle.setAttribute("cy", String(point.y));
|
|
798
|
-
circle.setAttribute("r", "28");
|
|
799
|
-
const text = createSvgEl("text");
|
|
800
|
-
text.setAttribute("x", String(point.x));
|
|
801
|
-
text.setAttribute("y", String(point.y + 4));
|
|
802
|
-
text.textContent = node.label.length > 16 ? node.label.slice(0, 16) + "…" : node.label;
|
|
803
|
-
|
|
804
|
-
g.appendChild(circle);
|
|
805
|
-
g.appendChild(text);
|
|
806
|
-
nodeLayer.appendChild(g);
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
for (const event of pulseEvents) {
|
|
810
|
-
if (!event.target) {
|
|
811
|
-
continue;
|
|
812
|
-
}
|
|
813
|
-
let hit = null;
|
|
814
|
-
for (const edge of interactions) {
|
|
815
|
-
if (
|
|
816
|
-
(edge.a === event.source && edge.b === event.target) ||
|
|
817
|
-
(edge.a === event.target && edge.b === event.source)
|
|
818
|
-
) {
|
|
819
|
-
hit = edgePathByKey.get(edge.key) || null;
|
|
820
|
-
break;
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
if (!hit) {
|
|
824
|
-
continue;
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
const dot = createSvgEl("circle");
|
|
828
|
-
dot.setAttribute("r", "4");
|
|
829
|
-
dot.setAttribute("class", "event-particle");
|
|
830
|
-
const motion = createSvgEl("animateMotion");
|
|
831
|
-
motion.setAttribute("dur", "1.1s");
|
|
832
|
-
motion.setAttribute("repeatCount", "1");
|
|
833
|
-
motion.setAttribute("path", hit.path);
|
|
834
|
-
dot.appendChild(motion);
|
|
835
|
-
fxLayer.appendChild(dot);
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
wrap.appendChild(svg);
|
|
839
|
-
els.graphView.innerHTML = "";
|
|
840
|
-
els.graphView.appendChild(wrap);
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
function pickFlowParticipants(participants) {
|
|
844
|
-
const prioritized = participants.filter((item) => item.kind === "agent" || item.kind === "connector");
|
|
845
|
-
if (prioritized.length > 0) {
|
|
846
|
-
return prioritized;
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
const fallback = participants.filter((item) => item.kind !== "tool" && item.kind !== "extension");
|
|
850
|
-
if (fallback.length > 0) {
|
|
851
|
-
return fallback;
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
return participants;
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
function isToolStepEvent(event) {
|
|
858
|
-
return (
|
|
859
|
-
event &&
|
|
860
|
-
event.kind === "runtime-event" &&
|
|
861
|
-
(event.subtype === "tool.called" || event.subtype === "tool.completed" || event.subtype === "tool.failed")
|
|
862
|
-
);
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
function truncateFlowText(text, limit) {
|
|
866
|
-
if (typeof text !== "string") {
|
|
867
|
-
return "";
|
|
868
|
-
}
|
|
869
|
-
if (text.length <= limit) {
|
|
870
|
-
return text;
|
|
871
|
-
}
|
|
872
|
-
return text.slice(0, limit) + "…";
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
function summarizeFlowEvent(event, maxLength) {
|
|
876
|
-
const detail = event.detail || "";
|
|
877
|
-
const text = formatTs(event.at) + " · " + event.subtype + (detail ? " · " + detail : "");
|
|
878
|
-
return truncateFlowText(text, maxLength);
|
|
879
|
-
}
|
|
880
|
-
|
|
881
|
-
function resolveToolStepLaneIndex(event, laneById) {
|
|
882
|
-
const sourceIndex = laneById.has(event.source) ? laneById.get(event.source) : undefined;
|
|
883
|
-
const targetIndex = laneById.has(event.target) ? laneById.get(event.target) : undefined;
|
|
884
|
-
if (event.subtype === "tool.called") {
|
|
885
|
-
if (typeof sourceIndex === "number") {
|
|
886
|
-
return sourceIndex;
|
|
887
|
-
}
|
|
888
|
-
if (typeof targetIndex === "number") {
|
|
889
|
-
return targetIndex;
|
|
890
|
-
}
|
|
891
|
-
return 0;
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
if (typeof targetIndex === "number") {
|
|
895
|
-
return targetIndex;
|
|
896
|
-
}
|
|
897
|
-
if (typeof sourceIndex === "number") {
|
|
898
|
-
return sourceIndex;
|
|
899
|
-
}
|
|
900
|
-
return 0;
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
function renderFlow(viz) {
|
|
904
|
-
const timeline = Array.isArray(viz.timeline) ? viz.timeline : [];
|
|
905
|
-
const participants = Array.isArray(viz.participants) ? viz.participants : [];
|
|
906
|
-
if (participants.length === 0) {
|
|
907
|
-
els.flowView.innerHTML = "<div class='empty'>표시할 participant가 없습니다.</div>";
|
|
908
|
-
return;
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
const laneWidth = 220;
|
|
912
|
-
const topPad = 42;
|
|
913
|
-
const rowGap = 64;
|
|
914
|
-
const lanes = pickFlowParticipants(participants).slice(0, 10);
|
|
915
|
-
const visibleTimeline = timeline.slice(-160);
|
|
916
|
-
const width = Math.max(760, laneWidth * lanes.length);
|
|
917
|
-
const height = Math.max(280, topPad + visibleTimeline.length * rowGap + 40);
|
|
918
|
-
const laneById = new Map(lanes.map((item, index) => [item.id, index]));
|
|
919
|
-
|
|
920
|
-
const wrap = document.createElement("div");
|
|
921
|
-
wrap.className = "flow-wrap";
|
|
922
|
-
const svg = createSvgEl("svg");
|
|
923
|
-
svg.setAttribute("class", "flow-svg");
|
|
924
|
-
svg.setAttribute("viewBox", "0 0 " + width + " " + height);
|
|
925
|
-
svg.setAttribute("preserveAspectRatio", "xMinYMin meet");
|
|
926
|
-
|
|
927
|
-
const defs = createSvgEl("defs");
|
|
928
|
-
const marker = createSvgEl("marker");
|
|
929
|
-
marker.setAttribute("id", "arrowHead");
|
|
930
|
-
marker.setAttribute("markerWidth", "8");
|
|
931
|
-
marker.setAttribute("markerHeight", "8");
|
|
932
|
-
marker.setAttribute("refX", "7");
|
|
933
|
-
marker.setAttribute("refY", "4");
|
|
934
|
-
marker.setAttribute("orient", "auto");
|
|
935
|
-
const arrowPath = createSvgEl("path");
|
|
936
|
-
arrowPath.setAttribute("d", "M 0 0 L 8 4 L 0 8 z");
|
|
937
|
-
arrowPath.setAttribute("fill", "#73f0d6");
|
|
938
|
-
marker.appendChild(arrowPath);
|
|
939
|
-
defs.appendChild(marker);
|
|
940
|
-
svg.appendChild(defs);
|
|
941
|
-
|
|
942
|
-
lanes.forEach((lane, index) => {
|
|
943
|
-
const x = laneWidth * index + laneWidth / 2;
|
|
944
|
-
const label = createSvgEl("text");
|
|
945
|
-
label.setAttribute("x", String(x));
|
|
946
|
-
label.setAttribute("y", "22");
|
|
947
|
-
label.setAttribute("text-anchor", "middle");
|
|
948
|
-
label.setAttribute("class", "flow-label");
|
|
949
|
-
label.textContent = lane.label;
|
|
950
|
-
svg.appendChild(label);
|
|
951
|
-
|
|
952
|
-
const laneLine = createSvgEl("line");
|
|
953
|
-
laneLine.setAttribute("x1", String(x));
|
|
954
|
-
laneLine.setAttribute("y1", "28");
|
|
955
|
-
laneLine.setAttribute("x2", String(x));
|
|
956
|
-
laneLine.setAttribute("y2", String(height - 12));
|
|
957
|
-
laneLine.setAttribute("class", "flow-lane");
|
|
958
|
-
svg.appendChild(laneLine);
|
|
959
|
-
});
|
|
960
|
-
|
|
961
|
-
visibleTimeline.forEach((event, index) => {
|
|
962
|
-
const y = topPad + index * rowGap;
|
|
963
|
-
if (isToolStepEvent(event)) {
|
|
964
|
-
const laneIndex = resolveToolStepLaneIndex(event, laneById);
|
|
965
|
-
const laneCenter = laneWidth * laneIndex + laneWidth / 2;
|
|
966
|
-
const stepWidth = Math.max(140, laneWidth - 30);
|
|
967
|
-
const stepHeight = 28;
|
|
968
|
-
const stepX = laneCenter - stepWidth / 2;
|
|
969
|
-
const stepY = y - stepHeight / 2;
|
|
970
|
-
const step = createSvgEl("rect");
|
|
971
|
-
const stepClass =
|
|
972
|
-
event.subtype === "tool.called"
|
|
973
|
-
? "flow-step called"
|
|
974
|
-
: event.subtype === "tool.failed"
|
|
975
|
-
? "flow-step failed"
|
|
976
|
-
: "flow-step done";
|
|
977
|
-
step.setAttribute("x", String(stepX));
|
|
978
|
-
step.setAttribute("y", String(stepY));
|
|
979
|
-
step.setAttribute("width", String(stepWidth));
|
|
980
|
-
step.setAttribute("height", String(stepHeight));
|
|
981
|
-
step.setAttribute("class", stepClass);
|
|
982
|
-
svg.appendChild(step);
|
|
983
|
-
|
|
984
|
-
const stepText = createSvgEl("text");
|
|
985
|
-
stepText.setAttribute("x", String(laneCenter));
|
|
986
|
-
stepText.setAttribute("y", String(y + 4));
|
|
987
|
-
stepText.setAttribute("text-anchor", "middle");
|
|
988
|
-
stepText.setAttribute("class", "flow-event");
|
|
989
|
-
stepText.textContent = summarizeFlowEvent(event, 88);
|
|
990
|
-
svg.appendChild(stepText);
|
|
991
|
-
return;
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
const sourceIndex = laneById.has(event.source) ? laneById.get(event.source) : undefined;
|
|
995
|
-
const targetIndex = laneById.has(event.target) ? laneById.get(event.target) : undefined;
|
|
996
|
-
const anchorIndex =
|
|
997
|
-
typeof sourceIndex === "number"
|
|
998
|
-
? sourceIndex
|
|
999
|
-
: typeof targetIndex === "number"
|
|
1000
|
-
? targetIndex
|
|
1001
|
-
: 0;
|
|
1002
|
-
|
|
1003
|
-
if (typeof sourceIndex !== "number" || typeof targetIndex !== "number" || sourceIndex === targetIndex) {
|
|
1004
|
-
const x = laneWidth * anchorIndex + laneWidth / 2;
|
|
1005
|
-
const dot = createSvgEl("circle");
|
|
1006
|
-
dot.setAttribute("cx", String(x));
|
|
1007
|
-
dot.setAttribute("cy", String(y));
|
|
1008
|
-
dot.setAttribute("r", "4");
|
|
1009
|
-
dot.setAttribute("class", "flow-dot");
|
|
1010
|
-
svg.appendChild(dot);
|
|
1011
|
-
|
|
1012
|
-
const label = createSvgEl("text");
|
|
1013
|
-
label.setAttribute("x", String(x + 10));
|
|
1014
|
-
label.setAttribute("y", String(y - 6));
|
|
1015
|
-
label.setAttribute("text-anchor", "start");
|
|
1016
|
-
label.setAttribute("class", "flow-event");
|
|
1017
|
-
label.textContent = summarizeFlowEvent(event, 88);
|
|
1018
|
-
svg.appendChild(label);
|
|
1019
|
-
return;
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
const sx = laneWidth * sourceIndex + laneWidth / 2;
|
|
1023
|
-
const tx = laneWidth * targetIndex + laneWidth / 2;
|
|
1024
|
-
const arc = createSvgEl("path");
|
|
1025
|
-
const midY = y - 18;
|
|
1026
|
-
arc.setAttribute("d", "M " + sx + " " + y + " Q " + (sx + tx) / 2 + " " + midY + " " + tx + " " + y);
|
|
1027
|
-
arc.setAttribute("class", "flow-arc");
|
|
1028
|
-
arc.setAttribute("marker-end", "url(#arrowHead)");
|
|
1029
|
-
svg.appendChild(arc);
|
|
1030
|
-
|
|
1031
|
-
const label = createSvgEl("text");
|
|
1032
|
-
label.setAttribute("x", String((sx + tx) / 2));
|
|
1033
|
-
label.setAttribute("y", String(y - 6));
|
|
1034
|
-
label.setAttribute("text-anchor", "middle");
|
|
1035
|
-
label.setAttribute("class", "flow-event");
|
|
1036
|
-
label.textContent = summarizeFlowEvent(event, 92);
|
|
1037
|
-
svg.appendChild(label);
|
|
1038
|
-
});
|
|
1039
|
-
|
|
1040
|
-
wrap.appendChild(svg);
|
|
1041
|
-
els.flowView.innerHTML = "";
|
|
1042
|
-
els.flowView.appendChild(wrap);
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
async function tick() {
|
|
1046
|
-
try {
|
|
1047
|
-
await refreshInstances();
|
|
1048
|
-
await refreshVisualization();
|
|
1049
|
-
} catch (error) {
|
|
1050
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
1051
|
-
els.subtitle.textContent = "polling failed: " + message;
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
function startPolling() {
|
|
1056
|
-
if (state.pollTimer) {
|
|
1057
|
-
clearInterval(state.pollTimer);
|
|
1058
|
-
}
|
|
1059
|
-
state.pollTimer = setInterval(() => {
|
|
1060
|
-
void tick();
|
|
1061
|
-
}, 1000);
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
els.modeGraph.addEventListener("click", () => setMode("graph"));
|
|
1065
|
-
els.modeFlow.addEventListener("click", () => setMode("flow"));
|
|
1066
|
-
|
|
1067
|
-
void tick();
|
|
1068
|
-
startPolling();
|
|
1069
|
-
`;
|
|
1070
87
|
//# sourceMappingURL=assets.js.map
|