@pipelex/mthds-ui 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-WNSV4E7G.js → chunk-D2ID5Z3Y.js} +39 -1
- package/dist/chunk-D2ID5Z3Y.js.map +1 -0
- package/dist/graph/index.d.ts +6 -4
- package/dist/graph/index.js +7 -1
- package/dist/graph/react/index.css +11 -3
- package/dist/graph/react/index.css.map +1 -1
- package/dist/graph/react/index.d.ts +15 -2
- package/dist/graph/react/index.js +78 -54
- package/dist/graph/react/index.js.map +1 -1
- package/dist/graph/react/viewer/GraphToolbar.css +18 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -1
- package/dist/standalone/graph-standalone.html +27 -12
- package/dist/standalone/graph-viewer.css +18 -3
- package/dist/standalone/graph-viewer.js +9 -9
- package/dist/{types-uGRs3n4k.d.ts → types-CEDZIAmh.d.ts} +48 -1
- package/package.json +2 -2
- package/dist/chunk-WNSV4E7G.js.map +0 -1
|
@@ -2107,16 +2107,31 @@ button.stuff-viewer-local-file--button:focus-visible {
|
|
|
2107
2107
|
/* Token-only styling: theme switching happens by swapping `--surface-*`, */
|
|
2108
2108
|
/* `--text-*`, `--border-*`, and `--color-accent` values on the container. */
|
|
2109
2109
|
|
|
2110
|
+
/* The ReactFlow <Panel> owns positioning now (anchor + margin). It sits above
|
|
2111
|
+
the graph but the old code used z-index 11, so keep parity. */
|
|
2112
|
+
.graph-toolbar-panel {
|
|
2113
|
+
z-index: 11;
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2110
2116
|
.graph-toolbar {
|
|
2111
|
-
position: absolute;
|
|
2112
|
-
top: 8px;
|
|
2113
2117
|
display: flex;
|
|
2114
2118
|
align-items: center;
|
|
2115
2119
|
gap: 4px;
|
|
2116
|
-
z-index: 11;
|
|
2117
2120
|
pointer-events: auto;
|
|
2118
2121
|
}
|
|
2119
2122
|
|
|
2123
|
+
/* Vertical bar — `center-left` / `center-right` anchors. Stack the buttons in a
|
|
2124
|
+
column and rotate the separators so they divide rows instead of columns. */
|
|
2125
|
+
.graph-toolbar--vertical {
|
|
2126
|
+
flex-direction: column;
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
.graph-toolbar--vertical .graph-toolbar-separator {
|
|
2130
|
+
width: 18px;
|
|
2131
|
+
height: 1px;
|
|
2132
|
+
margin: 2px 0;
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2120
2135
|
.graph-toolbar-btn {
|
|
2121
2136
|
all: unset;
|
|
2122
2137
|
box-sizing: border-box;
|
|
@@ -2456,23 +2471,23 @@ body[data-theme="light"] .header-logo.light-logo {
|
|
|
2456
2471
|
</script>
|
|
2457
2472
|
|
|
2458
2473
|
<script nonce="PIPELEX_CSP_NONCE">
|
|
2459
|
-
"use strict";(()=>{var YT=Object.create;var Ng=Object.defineProperty;var XT=Object.getOwnPropertyDescriptor;var qT=Object.getOwnPropertyNames;var ZT=Object.getPrototypeOf,jT=Object.prototype.hasOwnProperty;var en=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var $T=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of qT(t))!jT.call(e,i)&&i!==n&&Ng(e,i,{get:()=>t[i],enumerable:!(o=XT(t,i))||o.enumerable});return e};var oe=(e,t,n)=>(n=e!=null?YT(ZT(e)):{},$T(t||!e||!e.__esModule?Ng(n,"default",{value:e,enumerable:!0}):n,e));var Bg=en(pe=>{"use strict";var Qf=Symbol.for("react.transitional.element"),KT=Symbol.for("react.portal"),QT=Symbol.for("react.fragment"),FT=Symbol.for("react.strict_mode"),WT=Symbol.for("react.profiler"),JT=Symbol.for("react.consumer"),e2=Symbol.for("react.context"),t2=Symbol.for("react.forward_ref"),n2=Symbol.for("react.suspense"),o2=Symbol.for("react.memo"),Dg=Symbol.for("react.lazy"),i2=Symbol.for("react.activity"),Cg=Symbol.iterator;function a2(e){return e===null||typeof e!="object"?null:(e=Cg&&e[Cg]||e["@@iterator"],typeof e=="function"?e:null)}var Rg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Og=Object.assign,zg={};function Ha(e,t,n){this.props=e,this.context=t,this.refs=zg,this.updater=n||Rg}Ha.prototype.isReactComponent={};Ha.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Ha.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Lg(){}Lg.prototype=Ha.prototype;function Ff(e,t,n){this.props=e,this.context=t,this.refs=zg,this.updater=n||Rg}var Wf=Ff.prototype=new Lg;Wf.constructor=Ff;Og(Wf,Ha.prototype);Wf.isPureReactComponent=!0;var wg=Array.isArray;function Kf(){}var Ye={H:null,A:null,T:null,S:null},Hg=Object.prototype.hasOwnProperty;function Jf(e,t,n){var o=n.ref;return{$$typeof:Qf,type:e,key:t,ref:o!==void 0?o:null,props:n}}function l2(e,t){return Jf(e.type,t,e.props)}function ed(e){return typeof e=="object"&&e!==null&&e.$$typeof===Qf}function r2(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ag=/\/+/g;function $f(e,t){return typeof e=="object"&&e!==null&&e.key!=null?r2(""+e.key):t.toString(36)}function s2(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Kf,Kf):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function La(e,t,n,o,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(a){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case Qf:case KT:l=!0;break;case Dg:return l=e._init,La(l(e._payload),t,n,o,i)}}if(l)return i=i(e),l=o===""?"."+$f(e,0):o,wg(i)?(n="",l!=null&&(n=l.replace(Ag,"$&/")+"/"),La(i,t,n,"",function(u){return u})):i!=null&&(ed(i)&&(i=l2(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(Ag,"$&/")+"/")+l)),t.push(i)),1;l=0;var r=o===""?".":o+":";if(wg(e))for(var s=0;s<e.length;s++)o=e[s],a=r+$f(o,s),l+=La(o,t,n,a,i);else if(s=a2(e),typeof s=="function")for(e=s.call(e),s=0;!(o=e.next()).done;)o=o.value,a=r+$f(o,s++),l+=La(o,t,n,a,i);else if(a==="object"){if(typeof e.then=="function")return La(s2(e),t,n,o,i);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return l}function eu(e,t,n){if(e==null)return e;var o=[],i=0;return La(e,o,"","",function(a){return t.call(n,a,i++)}),o}function u2(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Mg=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},c2={map:eu,forEach:function(e,t,n){eu(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return eu(e,function(){t++}),t},toArray:function(e){return eu(e,function(t){return t})||[]},only:function(e){if(!ed(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};pe.Activity=i2;pe.Children=c2;pe.Component=Ha;pe.Fragment=QT;pe.Profiler=WT;pe.PureComponent=Ff;pe.StrictMode=FT;pe.Suspense=n2;pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ye;pe.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ye.H.useMemoCache(e)}};pe.cache=function(e){return function(){return e.apply(null,arguments)}};pe.cacheSignal=function(){return null};pe.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=Og({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=""+t.key),t)!Hg.call(t,a)||a==="key"||a==="__self"||a==="__source"||a==="ref"&&t.ref===void 0||(o[a]=t[a]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),r=0;r<a;r++)l[r]=arguments[r+2];o.children=l}return Jf(e.type,i,o)};pe.createContext=function(e){return e={$$typeof:e2,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:JT,_context:e},e};pe.createElement=function(e,t,n){var o,i={},a=null;if(t!=null)for(o in t.key!==void 0&&(a=""+t.key),t)Hg.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(i[o]=t[o]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var r=Array(l),s=0;s<l;s++)r[s]=arguments[s+2];i.children=r}if(e&&e.defaultProps)for(o in l=e.defaultProps,l)i[o]===void 0&&(i[o]=l[o]);return Jf(e,a,i)};pe.createRef=function(){return{current:null}};pe.forwardRef=function(e){return{$$typeof:t2,render:e}};pe.isValidElement=ed;pe.lazy=function(e){return{$$typeof:Dg,_payload:{_status:-1,_result:e},_init:u2}};pe.memo=function(e,t){return{$$typeof:o2,type:e,compare:t===void 0?null:t}};pe.startTransition=function(e){var t=Ye.T,n={};Ye.T=n;try{var o=e(),i=Ye.S;i!==null&&i(n,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(Kf,Mg)}catch(a){Mg(a)}finally{t!==null&&n.types!==null&&(t.types=n.types),Ye.T=t}};pe.unstable_useCacheRefresh=function(){return Ye.H.useCacheRefresh()};pe.use=function(e){return Ye.H.use(e)};pe.useActionState=function(e,t,n){return Ye.H.useActionState(e,t,n)};pe.useCallback=function(e,t){return Ye.H.useCallback(e,t)};pe.useContext=function(e){return Ye.H.useContext(e)};pe.useDebugValue=function(){};pe.useDeferredValue=function(e,t){return Ye.H.useDeferredValue(e,t)};pe.useEffect=function(e,t){return Ye.H.useEffect(e,t)};pe.useEffectEvent=function(e){return Ye.H.useEffectEvent(e)};pe.useId=function(){return Ye.H.useId()};pe.useImperativeHandle=function(e,t,n){return Ye.H.useImperativeHandle(e,t,n)};pe.useInsertionEffect=function(e,t){return Ye.H.useInsertionEffect(e,t)};pe.useLayoutEffect=function(e,t){return Ye.H.useLayoutEffect(e,t)};pe.useMemo=function(e,t){return Ye.H.useMemo(e,t)};pe.useOptimistic=function(e,t){return Ye.H.useOptimistic(e,t)};pe.useReducer=function(e,t,n){return Ye.H.useReducer(e,t,n)};pe.useRef=function(e){return Ye.H.useRef(e)};pe.useState=function(e){return Ye.H.useState(e)};pe.useSyncExternalStore=function(e,t,n){return Ye.H.useSyncExternalStore(e,t,n)};pe.useTransition=function(){return Ye.H.useTransition()};pe.version="19.2.4"});var wt=en((Tz,kg)=>{"use strict";kg.exports=Bg()});var jg=en($e=>{"use strict";function id(e,t){var n=e.length;e.push(t);e:for(;0<n;){var o=n-1>>>1,i=e[o];if(0<tu(i,t))e[o]=t,e[n]=i,n=o;else break e}}function fo(e){return e.length===0?null:e[0]}function ou(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var o=0,i=e.length,a=i>>>1;o<a;){var l=2*(o+1)-1,r=e[l],s=l+1,u=e[s];if(0>tu(r,n))s<i&&0>tu(u,r)?(e[o]=u,e[s]=n,o=s):(e[o]=r,e[l]=n,o=l);else if(s<i&&0>tu(u,n))e[o]=u,e[s]=n,o=s;else break e}}return t}function tu(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}$e.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(Gg=performance,$e.unstable_now=function(){return Gg.now()}):(td=Date,Pg=td.now(),$e.unstable_now=function(){return td.now()-Pg});var Gg,td,Pg,Ro=[],ri=[],f2=1,Ln=null,kt=3,ad=!1,sr=!1,ur=!1,ld=!1,Vg=typeof setTimeout=="function"?setTimeout:null,Yg=typeof clearTimeout=="function"?clearTimeout:null,Ug=typeof setImmediate<"u"?setImmediate:null;function nu(e){for(var t=fo(ri);t!==null;){if(t.callback===null)ou(ri);else if(t.startTime<=e)ou(ri),t.sortIndex=t.expirationTime,id(Ro,t);else break;t=fo(ri)}}function rd(e){if(ur=!1,nu(e),!sr)if(fo(Ro)!==null)sr=!0,ka||(ka=!0,Ba());else{var t=fo(ri);t!==null&&sd(rd,t.startTime-e)}}var ka=!1,cr=-1,Xg=5,qg=-1;function Zg(){return ld?!0:!($e.unstable_now()-qg<Xg)}function nd(){if(ld=!1,ka){var e=$e.unstable_now();qg=e;var t=!0;try{e:{sr=!1,ur&&(ur=!1,Yg(cr),cr=-1),ad=!0;var n=kt;try{t:{for(nu(e),Ln=fo(Ro);Ln!==null&&!(Ln.expirationTime>e&&Zg());){var o=Ln.callback;if(typeof o=="function"){Ln.callback=null,kt=Ln.priorityLevel;var i=o(Ln.expirationTime<=e);if(e=$e.unstable_now(),typeof i=="function"){Ln.callback=i,nu(e),t=!0;break t}Ln===fo(Ro)&&ou(Ro),nu(e)}else ou(Ro);Ln=fo(Ro)}if(Ln!==null)t=!0;else{var a=fo(ri);a!==null&&sd(rd,a.startTime-e),t=!1}}break e}finally{Ln=null,kt=n,ad=!1}t=void 0}}finally{t?Ba():ka=!1}}}var Ba;typeof Ug=="function"?Ba=function(){Ug(nd)}:typeof MessageChannel<"u"?(od=new MessageChannel,Ig=od.port2,od.port1.onmessage=nd,Ba=function(){Ig.postMessage(null)}):Ba=function(){Vg(nd,0)};var od,Ig;function sd(e,t){cr=Vg(function(){e($e.unstable_now())},t)}$e.unstable_IdlePriority=5;$e.unstable_ImmediatePriority=1;$e.unstable_LowPriority=4;$e.unstable_NormalPriority=3;$e.unstable_Profiling=null;$e.unstable_UserBlockingPriority=2;$e.unstable_cancelCallback=function(e){e.callback=null};$e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Xg=0<e?Math.floor(1e3/e):5};$e.unstable_getCurrentPriorityLevel=function(){return kt};$e.unstable_next=function(e){switch(kt){case 1:case 2:case 3:var t=3;break;default:t=kt}var n=kt;kt=t;try{return e()}finally{kt=n}};$e.unstable_requestPaint=function(){ld=!0};$e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=kt;kt=e;try{return t()}finally{kt=n}};$e.unstable_scheduleCallback=function(e,t,n){var o=$e.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?o+n:o):n=o,e){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5e3}return i=n+i,e={id:f2++,callback:t,priorityLevel:e,startTime:n,expirationTime:i,sortIndex:-1},n>o?(e.sortIndex=n,id(ri,e),fo(Ro)===null&&e===fo(ri)&&(ur?(Yg(cr),cr=-1):ur=!0,sd(rd,n-o))):(e.sortIndex=i,id(Ro,e),sr||ad||(sr=!0,ka||(ka=!0,Ba()))),e};$e.unstable_shouldYield=Zg;$e.unstable_wrapCallback=function(e){var t=kt;return function(){var n=kt;kt=t;try{return e.apply(this,arguments)}finally{kt=n}}}});var Kg=en((Cz,$g)=>{"use strict";$g.exports=jg()});var Fg=en(Yt=>{"use strict";var d2=wt();function Qg(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function si(){}var Vt={d:{f:si,r:function(){throw Error(Qg(522))},D:si,C:si,L:si,m:si,X:si,S:si,M:si},p:0,findDOMNode:null},p2=Symbol.for("react.portal");function m2(e,t,n){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:p2,key:o==null?null:""+o,children:e,containerInfo:t,implementation:n}}var fr=d2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function iu(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Vt;Yt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(Qg(299));return m2(e,t,null,n)};Yt.flushSync=function(e){var t=fr.T,n=Vt.p;try{if(fr.T=null,Vt.p=2,e)return e()}finally{fr.T=t,Vt.p=n,Vt.d.f()}};Yt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Vt.d.C(e,t))};Yt.prefetchDNS=function(e){typeof e=="string"&&Vt.d.D(e)};Yt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,o=iu(n,t.crossOrigin),i=typeof t.integrity=="string"?t.integrity:void 0,a=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Vt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:o,integrity:i,fetchPriority:a}):n==="script"&&Vt.d.X(e,{crossOrigin:o,integrity:i,fetchPriority:a,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Yt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=iu(t.as,t.crossOrigin);Vt.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Vt.d.M(e)};Yt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,o=iu(n,t.crossOrigin);Vt.d.L(e,n,{crossOrigin:o,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Yt.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=iu(t.as,t.crossOrigin);Vt.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Vt.d.m(e)};Yt.requestFormReset=function(e){Vt.d.r(e)};Yt.unstable_batchedUpdates=function(e,t){return e(t)};Yt.useFormState=function(e,t,n){return fr.H.useFormState(e,t,n)};Yt.useFormStatus=function(){return fr.H.useHostTransitionStatus()};Yt.version="19.2.4"});var ud=en((Az,Jg)=>{"use strict";function Wg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Wg)}catch(e){console.error(e)}}Wg(),Jg.exports=Fg()});var f1=en(Mc=>{"use strict";var gt=Kg(),N0=wt(),h2=ud();function U(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function C0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Fr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function w0(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function A0(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ey(e){if(Fr(e)!==e)throw Error(U(188))}function g2(e){var t=e.alternate;if(!t){if(t=Fr(e),t===null)throw Error(U(188));return t!==e?null:e}for(var n=e,o=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(o=i.return,o!==null){n=o;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return ey(i),e;if(a===o)return ey(i),t;a=a.sibling}throw Error(U(188))}if(n.return!==o.return)n=i,o=a;else{for(var l=!1,r=i.child;r;){if(r===n){l=!0,n=i,o=a;break}if(r===o){l=!0,o=i,n=a;break}r=r.sibling}if(!l){for(r=a.child;r;){if(r===n){l=!0,n=a,o=i;break}if(r===o){l=!0,o=a,n=i;break}r=r.sibling}if(!l)throw Error(U(189))}}if(n.alternate!==o)throw Error(U(190))}if(n.tag!==3)throw Error(U(188));return n.stateNode.current===n?e:t}function M0(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=M0(e),t!==null)return t;e=e.sibling}return null}var Ze=Object.assign,y2=Symbol.for("react.element"),au=Symbol.for("react.transitional.element"),br=Symbol.for("react.portal"),Ya=Symbol.for("react.fragment"),D0=Symbol.for("react.strict_mode"),Yd=Symbol.for("react.profiler"),R0=Symbol.for("react.consumer"),Po=Symbol.for("react.context"),Gp=Symbol.for("react.forward_ref"),Xd=Symbol.for("react.suspense"),qd=Symbol.for("react.suspense_list"),Pp=Symbol.for("react.memo"),ui=Symbol.for("react.lazy"),Zd=Symbol.for("react.activity"),v2=Symbol.for("react.memo_cache_sentinel"),ty=Symbol.iterator;function dr(e){return e===null||typeof e!="object"?null:(e=ty&&e[ty]||e["@@iterator"],typeof e=="function"?e:null)}var b2=Symbol.for("react.client.reference");function jd(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===b2?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ya:return"Fragment";case Yd:return"Profiler";case D0:return"StrictMode";case Xd:return"Suspense";case qd:return"SuspenseList";case Zd:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case br:return"Portal";case Po:return e.displayName||"Context";case R0:return(e._context.displayName||"Context")+".Consumer";case Gp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Pp:return t=e.displayName||null,t!==null?t:jd(e.type)||"Memo";case ui:t=e._payload,e=e._init;try{return jd(e(t))}catch{}}return null}var Sr=Array.isArray,ue=N0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Re=h2.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Fi={pending:!1,data:null,method:null,action:null},$d=[],Xa=-1;function yo(e){return{current:e}}function Et(e){0>Xa||(e.current=$d[Xa],$d[Xa]=null,Xa--)}function Ie(e,t){Xa++,$d[Xa]=e.current,e.current=t}var go=yo(null),kr=yo(null),Si=yo(null),Gu=yo(null);function Pu(e,t){switch(Ie(Si,t),Ie(kr,e),Ie(go,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?s0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=s0(t),e=Fb(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Et(go),Ie(go,e)}function sl(){Et(go),Et(kr),Et(Si)}function Kd(e){e.memoizedState!==null&&Ie(Gu,e);var t=go.current,n=Fb(t,e.type);t!==n&&(Ie(kr,e),Ie(go,n))}function Uu(e){kr.current===e&&(Et(go),Et(kr)),Gu.current===e&&(Et(Gu),$r._currentValue=Fi)}var cd,ny;function ji(e){if(cd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);cd=t&&t[1]||"",ny=-1<n.stack.indexOf(`
|
|
2474
|
+
"use strict";(()=>{var ZT=Object.create;var Cg=Object.defineProperty;var jT=Object.getOwnPropertyDescriptor;var $T=Object.getOwnPropertyNames;var FT=Object.getPrototypeOf,KT=Object.prototype.hasOwnProperty;var Jt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var QT=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $T(t))!KT.call(e,i)&&i!==n&&Cg(e,i,{get:()=>t[i],enumerable:!(o=jT(t,i))||o.enumerable});return e};var oe=(e,t,n)=>(n=e!=null?ZT(FT(e)):{},QT(t||!e||!e.__esModule?Cg(n,"default",{value:e,enumerable:!0}):n,e));var Pg=Jt(me=>{"use strict";var Qf=Symbol.for("react.transitional.element"),WT=Symbol.for("react.portal"),JT=Symbol.for("react.fragment"),e2=Symbol.for("react.strict_mode"),t2=Symbol.for("react.profiler"),n2=Symbol.for("react.consumer"),o2=Symbol.for("react.context"),i2=Symbol.for("react.forward_ref"),a2=Symbol.for("react.suspense"),l2=Symbol.for("react.memo"),Rg=Symbol.for("react.lazy"),r2=Symbol.for("react.activity"),wg=Symbol.iterator;function s2(e){return e===null||typeof e!="object"?null:(e=wg&&e[wg]||e["@@iterator"],typeof e=="function"?e:null)}var Og={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},zg=Object.assign,Lg={};function Ia(e,t,n){this.props=e,this.context=t,this.refs=Lg,this.updater=n||Og}Ia.prototype.isReactComponent={};Ia.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Ia.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Bg(){}Bg.prototype=Ia.prototype;function Wf(e,t,n){this.props=e,this.context=t,this.refs=Lg,this.updater=n||Og}var Jf=Wf.prototype=new Bg;Jf.constructor=Wf;zg(Jf,Ia.prototype);Jf.isPureReactComponent=!0;var Ag=Array.isArray;function Kf(){}var Ye={H:null,A:null,T:null,S:null},Hg=Object.prototype.hasOwnProperty;function ed(e,t,n){var o=n.ref;return{$$typeof:Qf,type:e,key:t,ref:o!==void 0?o:null,props:n}}function u2(e,t){return ed(e.type,t,e.props)}function td(e){return typeof e=="object"&&e!==null&&e.$$typeof===Qf}function c2(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Mg=/\/+/g;function Ff(e,t){return typeof e=="object"&&e!==null&&e.key!=null?c2(""+e.key):t.toString(36)}function f2(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Kf,Kf):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Ua(e,t,n,o,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(a){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case Qf:case WT:l=!0;break;case Rg:return l=e._init,Ua(l(e._payload),t,n,o,i)}}if(l)return i=i(e),l=o===""?"."+Ff(e,0):o,Ag(i)?(n="",l!=null&&(n=l.replace(Mg,"$&/")+"/"),Ua(i,t,n,"",function(u){return u})):i!=null&&(td(i)&&(i=u2(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(Mg,"$&/")+"/")+l)),t.push(i)),1;l=0;var r=o===""?".":o+":";if(Ag(e))for(var s=0;s<e.length;s++)o=e[s],a=r+Ff(o,s),l+=Ua(o,t,n,a,i);else if(s=s2(e),typeof s=="function")for(e=s.call(e),s=0;!(o=e.next()).done;)o=o.value,a=r+Ff(o,s++),l+=Ua(o,t,n,a,i);else if(a==="object"){if(typeof e.then=="function")return Ua(f2(e),t,n,o,i);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return l}function nu(e,t,n){if(e==null)return e;var o=[],i=0;return Ua(e,o,"","",function(a){return t.call(n,a,i++)}),o}function d2(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Dg=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},p2={map:nu,forEach:function(e,t,n){nu(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return nu(e,function(){t++}),t},toArray:function(e){return nu(e,function(t){return t})||[]},only:function(e){if(!td(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};me.Activity=r2;me.Children=p2;me.Component=Ia;me.Fragment=JT;me.Profiler=t2;me.PureComponent=Wf;me.StrictMode=e2;me.Suspense=a2;me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ye;me.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ye.H.useMemoCache(e)}};me.cache=function(e){return function(){return e.apply(null,arguments)}};me.cacheSignal=function(){return null};me.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=zg({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=""+t.key),t)!Hg.call(t,a)||a==="key"||a==="__self"||a==="__source"||a==="ref"&&t.ref===void 0||(o[a]=t[a]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),r=0;r<a;r++)l[r]=arguments[r+2];o.children=l}return ed(e.type,i,o)};me.createContext=function(e){return e={$$typeof:o2,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:n2,_context:e},e};me.createElement=function(e,t,n){var o,i={},a=null;if(t!=null)for(o in t.key!==void 0&&(a=""+t.key),t)Hg.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(i[o]=t[o]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var r=Array(l),s=0;s<l;s++)r[s]=arguments[s+2];i.children=r}if(e&&e.defaultProps)for(o in l=e.defaultProps,l)i[o]===void 0&&(i[o]=l[o]);return ed(e,a,i)};me.createRef=function(){return{current:null}};me.forwardRef=function(e){return{$$typeof:i2,render:e}};me.isValidElement=td;me.lazy=function(e){return{$$typeof:Rg,_payload:{_status:-1,_result:e},_init:d2}};me.memo=function(e,t){return{$$typeof:l2,type:e,compare:t===void 0?null:t}};me.startTransition=function(e){var t=Ye.T,n={};Ye.T=n;try{var o=e(),i=Ye.S;i!==null&&i(n,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(Kf,Dg)}catch(a){Dg(a)}finally{t!==null&&n.types!==null&&(t.types=n.types),Ye.T=t}};me.unstable_useCacheRefresh=function(){return Ye.H.useCacheRefresh()};me.use=function(e){return Ye.H.use(e)};me.useActionState=function(e,t,n){return Ye.H.useActionState(e,t,n)};me.useCallback=function(e,t){return Ye.H.useCallback(e,t)};me.useContext=function(e){return Ye.H.useContext(e)};me.useDebugValue=function(){};me.useDeferredValue=function(e,t){return Ye.H.useDeferredValue(e,t)};me.useEffect=function(e,t){return Ye.H.useEffect(e,t)};me.useEffectEvent=function(e){return Ye.H.useEffectEvent(e)};me.useId=function(){return Ye.H.useId()};me.useImperativeHandle=function(e,t,n){return Ye.H.useImperativeHandle(e,t,n)};me.useInsertionEffect=function(e,t){return Ye.H.useInsertionEffect(e,t)};me.useLayoutEffect=function(e,t){return Ye.H.useLayoutEffect(e,t)};me.useMemo=function(e,t){return Ye.H.useMemo(e,t)};me.useOptimistic=function(e,t){return Ye.H.useOptimistic(e,t)};me.useReducer=function(e,t,n){return Ye.H.useReducer(e,t,n)};me.useRef=function(e){return Ye.H.useRef(e)};me.useState=function(e){return Ye.H.useState(e)};me.useSyncExternalStore=function(e,t,n){return Ye.H.useSyncExternalStore(e,t,n)};me.useTransition=function(){return Ye.H.useTransition()};me.version="19.2.4"});var At=Jt((Rz,kg)=>{"use strict";kg.exports=Pg()});var $g=Jt(Fe=>{"use strict";function ad(e,t){var n=e.length;e.push(t);e:for(;0<n;){var o=n-1>>>1,i=e[o];if(0<ou(i,t))e[o]=t,e[n]=i,n=o;else break e}}function uo(e){return e.length===0?null:e[0]}function au(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var o=0,i=e.length,a=i>>>1;o<a;){var l=2*(o+1)-1,r=e[l],s=l+1,u=e[s];if(0>ou(r,n))s<i&&0>ou(u,r)?(e[o]=u,e[s]=n,o=s):(e[o]=r,e[l]=n,o=l);else if(s<i&&0>ou(u,n))e[o]=u,e[s]=n,o=s;else break e}}return t}function ou(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}Fe.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(Gg=performance,Fe.unstable_now=function(){return Gg.now()}):(nd=Date,Ug=nd.now(),Fe.unstable_now=function(){return nd.now()-Ug});var Gg,nd,Ug,Ro=[],fi=[],m2=1,zn=null,Pt=3,ld=!1,fr=!1,dr=!1,rd=!1,Yg=typeof setTimeout=="function"?setTimeout:null,Xg=typeof clearTimeout=="function"?clearTimeout:null,Ig=typeof setImmediate<"u"?setImmediate:null;function iu(e){for(var t=uo(fi);t!==null;){if(t.callback===null)au(fi);else if(t.startTime<=e)au(fi),t.sortIndex=t.expirationTime,ad(Ro,t);else break;t=uo(fi)}}function sd(e){if(dr=!1,iu(e),!fr)if(uo(Ro)!==null)fr=!0,Ya||(Ya=!0,Va());else{var t=uo(fi);t!==null&&ud(sd,t.startTime-e)}}var Ya=!1,pr=-1,qg=5,Zg=-1;function jg(){return rd?!0:!(Fe.unstable_now()-Zg<qg)}function od(){if(rd=!1,Ya){var e=Fe.unstable_now();Zg=e;var t=!0;try{e:{fr=!1,dr&&(dr=!1,Xg(pr),pr=-1),ld=!0;var n=Pt;try{t:{for(iu(e),zn=uo(Ro);zn!==null&&!(zn.expirationTime>e&&jg());){var o=zn.callback;if(typeof o=="function"){zn.callback=null,Pt=zn.priorityLevel;var i=o(zn.expirationTime<=e);if(e=Fe.unstable_now(),typeof i=="function"){zn.callback=i,iu(e),t=!0;break t}zn===uo(Ro)&&au(Ro),iu(e)}else au(Ro);zn=uo(Ro)}if(zn!==null)t=!0;else{var a=uo(fi);a!==null&&ud(sd,a.startTime-e),t=!1}}break e}finally{zn=null,Pt=n,ld=!1}t=void 0}}finally{t?Va():Ya=!1}}}var Va;typeof Ig=="function"?Va=function(){Ig(od)}:typeof MessageChannel<"u"?(id=new MessageChannel,Vg=id.port2,id.port1.onmessage=od,Va=function(){Vg.postMessage(null)}):Va=function(){Yg(od,0)};var id,Vg;function ud(e,t){pr=Yg(function(){e(Fe.unstable_now())},t)}Fe.unstable_IdlePriority=5;Fe.unstable_ImmediatePriority=1;Fe.unstable_LowPriority=4;Fe.unstable_NormalPriority=3;Fe.unstable_Profiling=null;Fe.unstable_UserBlockingPriority=2;Fe.unstable_cancelCallback=function(e){e.callback=null};Fe.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):qg=0<e?Math.floor(1e3/e):5};Fe.unstable_getCurrentPriorityLevel=function(){return Pt};Fe.unstable_next=function(e){switch(Pt){case 1:case 2:case 3:var t=3;break;default:t=Pt}var n=Pt;Pt=t;try{return e()}finally{Pt=n}};Fe.unstable_requestPaint=function(){rd=!0};Fe.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Pt;Pt=e;try{return t()}finally{Pt=n}};Fe.unstable_scheduleCallback=function(e,t,n){var o=Fe.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?o+n:o):n=o,e){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5e3}return i=n+i,e={id:m2++,callback:t,priorityLevel:e,startTime:n,expirationTime:i,sortIndex:-1},n>o?(e.sortIndex=n,ad(fi,e),uo(Ro)===null&&e===uo(fi)&&(dr?(Xg(pr),pr=-1):dr=!0,ud(sd,n-o))):(e.sortIndex=i,ad(Ro,e),fr||ld||(fr=!0,Ya||(Ya=!0,Va()))),e};Fe.unstable_shouldYield=jg;Fe.unstable_wrapCallback=function(e){var t=Pt;return function(){var n=Pt;Pt=t;try{return e.apply(this,arguments)}finally{Pt=n}}}});var Kg=Jt((zz,Fg)=>{"use strict";Fg.exports=$g()});var Wg=Jt(Vt=>{"use strict";var h2=At();function Qg(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function di(){}var It={d:{f:di,r:function(){throw Error(Qg(522))},D:di,C:di,L:di,m:di,X:di,S:di,M:di},p:0,findDOMNode:null},g2=Symbol.for("react.portal");function y2(e,t,n){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:g2,key:o==null?null:""+o,children:e,containerInfo:t,implementation:n}}var mr=h2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function lu(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=It;Vt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(Qg(299));return y2(e,t,null,n)};Vt.flushSync=function(e){var t=mr.T,n=It.p;try{if(mr.T=null,It.p=2,e)return e()}finally{mr.T=t,It.p=n,It.d.f()}};Vt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,It.d.C(e,t))};Vt.prefetchDNS=function(e){typeof e=="string"&&It.d.D(e)};Vt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,o=lu(n,t.crossOrigin),i=typeof t.integrity=="string"?t.integrity:void 0,a=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?It.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:o,integrity:i,fetchPriority:a}):n==="script"&&It.d.X(e,{crossOrigin:o,integrity:i,fetchPriority:a,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Vt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=lu(t.as,t.crossOrigin);It.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&It.d.M(e)};Vt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,o=lu(n,t.crossOrigin);It.d.L(e,n,{crossOrigin:o,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Vt.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=lu(t.as,t.crossOrigin);It.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else It.d.m(e)};Vt.requestFormReset=function(e){It.d.r(e)};Vt.unstable_batchedUpdates=function(e,t){return e(t)};Vt.useFormState=function(e,t,n){return mr.H.useFormState(e,t,n)};Vt.useFormStatus=function(){return mr.H.useHostTransitionStatus()};Vt.version="19.2.4"});var cd=Jt((Bz,ey)=>{"use strict";function Jg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Jg)}catch(e){console.error(e)}}Jg(),ey.exports=Wg()});var d1=Jt(Rc=>{"use strict";var gt=Kg(),C0=At(),v2=cd();function U(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function w0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function es(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function A0(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function M0(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ty(e){if(es(e)!==e)throw Error(U(188))}function b2(e){var t=e.alternate;if(!t){if(t=es(e),t===null)throw Error(U(188));return t!==e?null:e}for(var n=e,o=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(o=i.return,o!==null){n=o;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return ty(i),e;if(a===o)return ty(i),t;a=a.sibling}throw Error(U(188))}if(n.return!==o.return)n=i,o=a;else{for(var l=!1,r=i.child;r;){if(r===n){l=!0,n=i,o=a;break}if(r===o){l=!0,o=i,n=a;break}r=r.sibling}if(!l){for(r=a.child;r;){if(r===n){l=!0,n=a,o=i;break}if(r===o){l=!0,o=a,n=i;break}r=r.sibling}if(!l)throw Error(U(189))}}if(n.alternate!==o)throw Error(U(190))}if(n.tag!==3)throw Error(U(188));return n.stateNode.current===n?e:t}function D0(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=D0(e),t!==null)return t;e=e.sibling}return null}var Ze=Object.assign,S2=Symbol.for("react.element"),ru=Symbol.for("react.transitional.element"),_r=Symbol.for("react.portal"),Fa=Symbol.for("react.fragment"),R0=Symbol.for("react.strict_mode"),Xd=Symbol.for("react.profiler"),O0=Symbol.for("react.consumer"),Go=Symbol.for("react.context"),Gp=Symbol.for("react.forward_ref"),qd=Symbol.for("react.suspense"),Zd=Symbol.for("react.suspense_list"),Up=Symbol.for("react.memo"),pi=Symbol.for("react.lazy"),jd=Symbol.for("react.activity"),x2=Symbol.for("react.memo_cache_sentinel"),ny=Symbol.iterator;function hr(e){return e===null||typeof e!="object"?null:(e=ny&&e[ny]||e["@@iterator"],typeof e=="function"?e:null)}var _2=Symbol.for("react.client.reference");function $d(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===_2?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Fa:return"Fragment";case Xd:return"Profiler";case R0:return"StrictMode";case qd:return"Suspense";case Zd:return"SuspenseList";case jd:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _r:return"Portal";case Go:return e.displayName||"Context";case O0:return(e._context.displayName||"Context")+".Consumer";case Gp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Up:return t=e.displayName||null,t!==null?t:$d(e.type)||"Memo";case pi:t=e._payload,e=e._init;try{return $d(e(t))}catch{}}return null}var Er=Array.isArray,ce=C0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,De=v2.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ea={pending:!1,data:null,method:null,action:null},Fd=[],Ka=-1;function ho(e){return{current:e}}function Nt(e){0>Ka||(e.current=Fd[Ka],Fd[Ka]=null,Ka--)}function Ie(e,t){Ka++,Fd[Ka]=e.current,e.current=t}var mo=ho(null),Ur=ho(null),Ti=ho(null),Uu=ho(null);function Iu(e,t){switch(Ie(Ti,t),Ie(Ur,e),Ie(mo,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?u0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=u0(t),e=Wb(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Nt(mo),Ie(mo,e)}function ml(){Nt(mo),Nt(Ur),Nt(Ti)}function Kd(e){e.memoizedState!==null&&Ie(Uu,e);var t=mo.current,n=Wb(t,e.type);t!==n&&(Ie(Ur,e),Ie(mo,n))}function Vu(e){Ur.current===e&&(Nt(mo),Nt(Ur)),Uu.current===e&&(Nt(Uu),Qr._currentValue=ea)}var fd,oy;function Ki(e){if(fd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);fd=t&&t[1]||"",oy=-1<n.stack.indexOf(`
|
|
2460
2475
|
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
2461
|
-
`+
|
|
2476
|
+
`+fd+e+oy}var dd=!1;function pd(e,t){if(!e||dd)return"";dd=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(t){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(h){var f=h}Reflect.construct(e,[],d)}else{try{d.call()}catch(h){f=h}e.call(d.prototype)}}else{try{throw Error()}catch(h){f=h}(d=e())&&typeof d.catch=="function"&&d.catch(function(){})}}catch(h){if(h&&f&&typeof h.stack=="string")return[h.stack,f.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=o.DetermineComponentFrameRoot(),l=a[0],r=a[1];if(l&&r){var s=l.split(`
|
|
2462
2477
|
`),u=r.split(`
|
|
2463
2478
|
`);for(i=o=0;o<s.length&&!s[o].includes("DetermineComponentFrameRoot");)o++;for(;i<u.length&&!u[i].includes("DetermineComponentFrameRoot");)i++;if(o===s.length||i===u.length)for(o=s.length-1,i=u.length-1;1<=o&&0<=i&&s[o]!==u[i];)i--;for(;1<=o&&0<=i;o--,i--)if(s[o]!==u[i]){if(o!==1||i!==1)do if(o--,i--,0>i||s[o]!==u[i]){var c=`
|
|
2464
|
-
`+s[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=i);break}}}finally{
|
|
2479
|
+
`+s[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=i);break}}}finally{dd=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Ki(n):""}function E2(e,t){switch(e.tag){case 26:case 27:case 5:return Ki(e.type);case 16:return Ki("Lazy");case 13:return e.child!==t&&t!==null?Ki("Suspense Fallback"):Ki("Suspense");case 19:return Ki("SuspenseList");case 0:case 15:return pd(e.type,!1);case 11:return pd(e.type.render,!1);case 1:return pd(e.type,!0);case 31:return Ki("Activity");default:return""}}function iy(e){try{var t="",n=null;do t+=E2(e,n),n=e,e=e.return;while(e);return t}catch(o){return`
|
|
2465
2480
|
Error generating stack: `+o.message+`
|
|
2466
|
-
`+o.stack}}var Qd=Object.prototype.hasOwnProperty,Up=gt.unstable_scheduleCallback,pd=gt.unstable_cancelCallback,x2=gt.unstable_shouldYield,_2=gt.unstable_requestPaint,xn=gt.unstable_now,E2=gt.unstable_getCurrentPriorityLevel,O0=gt.unstable_ImmediatePriority,z0=gt.unstable_UserBlockingPriority,Iu=gt.unstable_NormalPriority,T2=gt.unstable_LowPriority,L0=gt.unstable_IdlePriority,N2=gt.log,C2=gt.unstable_setDisableYieldValue,Wr=null,_n=null;function hi(e){if(typeof N2=="function"&&C2(e),_n&&typeof _n.setStrictMode=="function")try{_n.setStrictMode(Wr,e)}catch{}}var En=Math.clz32?Math.clz32:M2,w2=Math.log,A2=Math.LN2;function M2(e){return e>>>=0,e===0?32:31-(w2(e)/A2|0)|0}var lu=256,ru=262144,su=4194304;function $i(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function pc(e,t,n){var o=e.pendingLanes;if(o===0)return 0;var i=0,a=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var r=o&134217727;return r!==0?(o=r&~a,o!==0?i=$i(o):(l&=r,l!==0?i=$i(l):n||(n=r&~e,n!==0&&(i=$i(n))))):(r=o&~a,r!==0?i=$i(r):l!==0?i=$i(l):n||(n=o&~e,n!==0&&(i=$i(n)))),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&(n&4194048)!==0)?t:i}function Jr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function D2(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function H0(){var e=su;return su<<=1,(su&62914560)===0&&(su=4194304),e}function md(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function es(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function R2(e,t,n,o,i,a){var l=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var r=e.entanglements,s=e.expirationTimes,u=e.hiddenUpdates;for(n=l&~n;0<n;){var c=31-En(n),d=1<<c;r[c]=0,s[c]=-1;var f=u[c];if(f!==null)for(u[c]=null,c=0;c<f.length;c++){var h=f[c];h!==null&&(h.lane&=-536870913)}n&=~d}o!==0&&B0(e,o,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(l&~t))}function B0(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-En(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|n&261930}function k0(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var o=31-En(n),i=1<<o;i&t|e[o]&t&&(e[o]|=t),n&=~i}}function G0(e,t){var n=t&-t;return n=(n&42)!==0?1:Ip(n),(n&(e.suspendedLanes|t))!==0?0:n}function Ip(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Vp(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function P0(){var e=Re.p;return e!==0?e:(e=window.event,e===void 0?32:s1(e.type))}function iy(e,t){var n=Re.p;try{return Re.p=e,t()}finally{Re.p=n}}var zi=Math.random().toString(36).slice(2),Mt="__reactFiber$"+zi,rn="__reactProps$"+zi,bl="__reactContainer$"+zi,Fd="__reactEvents$"+zi,O2="__reactListeners$"+zi,z2="__reactHandles$"+zi,ay="__reactResources$"+zi,ts="__reactMarker$"+zi;function Yp(e){delete e[Mt],delete e[rn],delete e[Fd],delete e[O2],delete e[z2]}function qa(e){var t=e[Mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[bl]||n[Mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=p0(e);e!==null;){if(n=e[Mt])return n;e=p0(e)}return t}e=n,n=e.parentNode}return null}function Sl(e){if(e=e[Mt]||e[bl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function xr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(U(33))}function tl(e){var t=e[ay];return t||(t=e[ay]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function _t(e){e[ts]=!0}var U0=new Set,I0={};function ra(e,t){ul(e,t),ul(e+"Capture",t)}function ul(e,t){for(I0[e]=t,e=0;e<t.length;e++)U0.add(t[e])}var L2=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]*$"),ly={},ry={};function H2(e){return Qd.call(ry,e)?!0:Qd.call(ly,e)?!1:L2.test(e)?ry[e]=!0:(ly[e]=!0,!1)}function Eu(e,t,n){if(H2(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var o=t.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function uu(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Oo(e,t,n,o){if(o===null)e.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+o)}}function Bn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function V0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function B2(e,t,n){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var i=o.get,a=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){n=""+l,a.call(this,l)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return n},setValue:function(l){n=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Wd(e){if(!e._valueTracker){var t=V0(e)?"checked":"value";e._valueTracker=B2(e,t,""+e[t])}}function Y0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=V0(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function Vu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var k2=/[\n"\\]/g;function Pn(e){return e.replace(k2,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Jd(e,t,n,o,i,a,l,r){e.name="",l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.type=l:e.removeAttribute("type"),t!=null?l==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Bn(t)):e.value!==""+Bn(t)&&(e.value=""+Bn(t)):l!=="submit"&&l!=="reset"||e.removeAttribute("value"),t!=null?ep(e,l,Bn(t)):n!=null?ep(e,l,Bn(n)):o!=null&&e.removeAttribute("value"),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.name=""+Bn(r):e.removeAttribute("name")}function X0(e,t,n,o,i,a,l,r){if(a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.type=a),t!=null||n!=null){if(!(a!=="submit"&&a!=="reset"||t!=null)){Wd(e);return}n=n!=null?""+Bn(n):"",t=t!=null?""+Bn(t):n,r||t===e.value||(e.value=t),e.defaultValue=t}o=o??i,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=r?e.checked:!!o,e.defaultChecked=!!o,l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.name=l),Wd(e)}function ep(e,t,n){t==="number"&&Vu(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function nl(e,t,n,o){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&o&&(e[n].defaultSelected=!0)}else{for(n=""+Bn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,o&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function q0(e,t,n){if(t!=null&&(t=""+Bn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Bn(n):""}function Z0(e,t,n,o){if(t==null){if(o!=null){if(n!=null)throw Error(U(92));if(Sr(o)){if(1<o.length)throw Error(U(93));o=o[0]}n=o}n==null&&(n=""),t=n}n=Bn(t),e.defaultValue=n,o=e.textContent,o===n&&o!==""&&o!==null&&(e.value=o),Wd(e)}function cl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var G2=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 sy(e,t,n){var o=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,n):typeof n!="number"||n===0||G2.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function j0(e,t,n){if(t!=null&&typeof t!="object")throw Error(U(62));if(e=e.style,n!=null){for(var o in n)!n.hasOwnProperty(o)||t!=null&&t.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var i in t)o=t[i],t.hasOwnProperty(i)&&n[i]!==o&&sy(e,i,o)}else for(var a in t)t.hasOwnProperty(a)&&sy(e,a,t[a])}function Xp(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var P2=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"]]),U2=/^[\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 Tu(e){return U2.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Uo(){}var tp=null;function qp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Za=null,ol=null;function uy(e){var t=Sl(e);if(t&&(e=t.stateNode)){var n=e[rn]||null;e:switch(e=t.stateNode,t.type){case"input":if(Jd(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Pn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var i=o[rn]||null;if(!i)throw Error(U(90));Jd(o,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)o=n[t],o.form===e.form&&Y0(o)}break e;case"textarea":q0(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&nl(e,!!n.multiple,t,!1)}}}var hd=!1;function $0(e,t,n){if(hd)return e(t,n);hd=!0;try{var o=e(t);return o}finally{if(hd=!1,(Za!==null||ol!==null)&&(Nc(),Za&&(t=Za,e=ol,ol=Za=null,uy(t),e)))for(t=0;t<e.length;t++)uy(e[t])}}function Gr(e,t){var n=e.stateNode;if(n===null)return null;var o=n[rn]||null;if(o===null)return null;n=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(U(231,t,typeof n));return n}var qo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),np=!1;if(qo)try{Ga={},Object.defineProperty(Ga,"passive",{get:function(){np=!0}}),window.addEventListener("test",Ga,Ga),window.removeEventListener("test",Ga,Ga)}catch{np=!1}var Ga,gi=null,Zp=null,Nu=null;function K0(){if(Nu)return Nu;var e,t=Zp,n=t.length,o,i="value"in gi?gi.value:gi.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var l=n-e;for(o=1;o<=l&&t[n-o]===i[a-o];o++);return Nu=i.slice(e,1<o?1-o:void 0)}function Cu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function cu(){return!0}function cy(){return!1}function sn(e){function t(n,o,i,a,l){this._reactName=n,this._targetInst=i,this.type=o,this.nativeEvent=a,this.target=l,this.currentTarget=null;for(var r in e)e.hasOwnProperty(r)&&(n=e[r],this[r]=n?n(a):a[r]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?cu:cy,this.isPropagationStopped=cy,this}return Ze(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=cu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=cu)},persist:function(){},isPersistent:cu}),t}var sa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mc=sn(sa),ns=Ze({},sa,{view:0,detail:0}),I2=sn(ns),gd,yd,pr,hc=Ze({},ns,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jp,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==pr&&(pr&&e.type==="mousemove"?(gd=e.screenX-pr.screenX,yd=e.screenY-pr.screenY):yd=gd=0,pr=e),gd)},movementY:function(e){return"movementY"in e?e.movementY:yd}}),fy=sn(hc),V2=Ze({},hc,{dataTransfer:0}),Y2=sn(V2),X2=Ze({},ns,{relatedTarget:0}),vd=sn(X2),q2=Ze({},sa,{animationName:0,elapsedTime:0,pseudoElement:0}),Z2=sn(q2),j2=Ze({},sa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),$2=sn(j2),K2=Ze({},sa,{data:0}),dy=sn(K2),Q2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},F2={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"},W2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function J2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=W2[e])?!!t[e]:!1}function jp(){return J2}var eN=Ze({},ns,{key:function(e){if(e.key){var t=Q2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Cu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?F2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jp,charCode:function(e){return e.type==="keypress"?Cu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Cu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),tN=sn(eN),nN=Ze({},hc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),py=sn(nN),oN=Ze({},ns,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jp}),iN=sn(oN),aN=Ze({},sa,{propertyName:0,elapsedTime:0,pseudoElement:0}),lN=sn(aN),rN=Ze({},hc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),sN=sn(rN),uN=Ze({},sa,{newState:0,oldState:0}),cN=sn(uN),fN=[9,13,27,32],$p=qo&&"CompositionEvent"in window,Tr=null;qo&&"documentMode"in document&&(Tr=document.documentMode);var dN=qo&&"TextEvent"in window&&!Tr,Q0=qo&&(!$p||Tr&&8<Tr&&11>=Tr),my=" ",hy=!1;function F0(e,t){switch(e){case"keyup":return fN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function W0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ja=!1;function pN(e,t){switch(e){case"compositionend":return W0(t);case"keypress":return t.which!==32?null:(hy=!0,my);case"textInput":return e=t.data,e===my&&hy?null:e;default:return null}}function mN(e,t){if(ja)return e==="compositionend"||!$p&&F0(e,t)?(e=K0(),Nu=Zp=gi=null,ja=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Q0&&t.locale!=="ko"?null:t.data;default:return null}}var hN={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function gy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!hN[e.type]:t==="textarea"}function J0(e,t,n,o){Za?ol?ol.push(o):ol=[o]:Za=o,t=lc(t,"onChange"),0<t.length&&(n=new mc("onChange","change",null,n,o),e.push({event:n,listeners:t}))}var Nr=null,Pr=null;function gN(e){$b(e,0)}function gc(e){var t=xr(e);if(Y0(t))return e}function yy(e,t){if(e==="change")return t}var ev=!1;qo&&(qo?(du="oninput"in document,du||(bd=document.createElement("div"),bd.setAttribute("oninput","return;"),du=typeof bd.oninput=="function"),fu=du):fu=!1,ev=fu&&(!document.documentMode||9<document.documentMode));var fu,du,bd;function vy(){Nr&&(Nr.detachEvent("onpropertychange",tv),Pr=Nr=null)}function tv(e){if(e.propertyName==="value"&&gc(Pr)){var t=[];J0(t,Pr,e,qp(e)),$0(gN,t)}}function yN(e,t,n){e==="focusin"?(vy(),Nr=t,Pr=n,Nr.attachEvent("onpropertychange",tv)):e==="focusout"&&vy()}function vN(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gc(Pr)}function bN(e,t){if(e==="click")return gc(t)}function SN(e,t){if(e==="input"||e==="change")return gc(t)}function xN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Nn=typeof Object.is=="function"?Object.is:xN;function Ur(e,t){if(Nn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(o=0;o<n.length;o++){var i=n[o];if(!Qd.call(t,i)||!Nn(e[i],t[i]))return!1}return!0}function by(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sy(e,t){var n=by(e);e=0;for(var o;n;){if(n.nodeType===3){if(o=e+n.textContent.length,e<=t&&o>=t)return{node:n,offset:t-e};e=o}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=by(n)}}function nv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?nv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ov(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vu(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vu(e.document)}return t}function Kp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var _N=qo&&"documentMode"in document&&11>=document.documentMode,$a=null,op=null,Cr=null,ip=!1;function xy(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ip||$a==null||$a!==Vu(o)||(o=$a,"selectionStart"in o&&Kp(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Cr&&Ur(Cr,o)||(Cr=o,o=lc(op,"onSelect"),0<o.length&&(t=new mc("onSelect","select",null,t,n),e.push({event:t,listeners:o}),t.target=$a)))}function Zi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ka={animationend:Zi("Animation","AnimationEnd"),animationiteration:Zi("Animation","AnimationIteration"),animationstart:Zi("Animation","AnimationStart"),transitionrun:Zi("Transition","TransitionRun"),transitionstart:Zi("Transition","TransitionStart"),transitioncancel:Zi("Transition","TransitionCancel"),transitionend:Zi("Transition","TransitionEnd")},Sd={},iv={};qo&&(iv=document.createElement("div").style,"AnimationEvent"in window||(delete Ka.animationend.animation,delete Ka.animationiteration.animation,delete Ka.animationstart.animation),"TransitionEvent"in window||delete Ka.transitionend.transition);function ua(e){if(Sd[e])return Sd[e];if(!Ka[e])return e;var t=Ka[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in iv)return Sd[e]=t[n];return e}var av=ua("animationend"),lv=ua("animationiteration"),rv=ua("animationstart"),EN=ua("transitionrun"),TN=ua("transitionstart"),NN=ua("transitioncancel"),sv=ua("transitionend"),uv=new Map,ap="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(" ");ap.push("scrollEnd");function eo(e,t){uv.set(e,t),ra(t,[e])}var Yu=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Hn=[],Qa=0,Qp=0;function yc(){for(var e=Qa,t=Qp=Qa=0;t<e;){var n=Hn[t];Hn[t++]=null;var o=Hn[t];Hn[t++]=null;var i=Hn[t];Hn[t++]=null;var a=Hn[t];if(Hn[t++]=null,o!==null&&i!==null){var l=o.pending;l===null?i.next=i:(i.next=l.next,l.next=i),o.pending=i}a!==0&&cv(n,i,a)}}function vc(e,t,n,o){Hn[Qa++]=e,Hn[Qa++]=t,Hn[Qa++]=n,Hn[Qa++]=o,Qp|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Fp(e,t,n,o){return vc(e,t,n,o),Xu(e)}function ca(e,t){return vc(e,null,null,t),Xu(e)}function cv(e,t,n){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,o=a.alternate,o!==null&&(o.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-En(n),e=a.hiddenUpdates,o=e[i],o===null?e[i]=[t]:o.push(t),t.lane=n|536870912),a):null}function Xu(e){if(50<Hr)throw Hr=0,Cp=null,Error(U(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Fa={};function CN(e,t,n,o){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bn(e,t,n,o){return new CN(e,t,n,o)}function Wp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Vo(e,t){var n=e.alternate;return n===null?(n=bn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function fv(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function wu(e,t,n,o,i,a){var l=0;if(o=e,typeof e=="function")Wp(e)&&(l=1);else if(typeof e=="string")l=MC(e,n,go.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Zd:return e=bn(31,n,t,i),e.elementType=Zd,e.lanes=a,e;case Ya:return Wi(n.children,i,a,t);case D0:l=8,i|=24;break;case Yd:return e=bn(12,n,t,i|2),e.elementType=Yd,e.lanes=a,e;case Xd:return e=bn(13,n,t,i),e.elementType=Xd,e.lanes=a,e;case qd:return e=bn(19,n,t,i),e.elementType=qd,e.lanes=a,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Po:l=10;break e;case R0:l=9;break e;case Gp:l=11;break e;case Pp:l=14;break e;case ui:l=16,o=null;break e}l=29,n=Error(U(130,e===null?"null":typeof e,"")),o=null}return t=bn(l,n,t,i),t.elementType=e,t.type=o,t.lanes=a,t}function Wi(e,t,n,o){return e=bn(7,e,o,t),e.lanes=n,e}function xd(e,t,n){return e=bn(6,e,null,t),e.lanes=n,e}function dv(e){var t=bn(18,null,null,0);return t.stateNode=e,t}function _d(e,t,n){return t=bn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var _y=new WeakMap;function Un(e,t){if(typeof e=="object"&&e!==null){var n=_y.get(e);return n!==void 0?n:(t={value:e,source:t,stack:oy(t)},_y.set(e,t),t)}return{value:e,source:t,stack:oy(t)}}var Wa=[],Ja=0,qu=null,Ir=0,kn=[],Gn=0,Mi=null,po=1,mo="";function ko(e,t){Wa[Ja++]=Ir,Wa[Ja++]=qu,qu=e,Ir=t}function pv(e,t,n){kn[Gn++]=po,kn[Gn++]=mo,kn[Gn++]=Mi,Mi=e;var o=po;e=mo;var i=32-En(o)-1;o&=~(1<<i),n+=1;var a=32-En(t)+i;if(30<a){var l=i-i%5;a=(o&(1<<l)-1).toString(32),o>>=l,i-=l,po=1<<32-En(t)+i|n<<i|o,mo=a+e}else po=1<<a|n<<i|o,mo=e}function Jp(e){e.return!==null&&(ko(e,1),pv(e,1,0))}function em(e){for(;e===qu;)qu=Wa[--Ja],Wa[Ja]=null,Ir=Wa[--Ja],Wa[Ja]=null;for(;e===Mi;)Mi=kn[--Gn],kn[Gn]=null,mo=kn[--Gn],kn[Gn]=null,po=kn[--Gn],kn[Gn]=null}function mv(e,t){kn[Gn++]=po,kn[Gn++]=mo,kn[Gn++]=Mi,po=t.id,mo=t.overflow,Mi=e}var Dt=null,qe=null,Ce=!1,xi=null,In=!1,lp=Error(U(519));function Di(e){var t=Error(U(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Vr(Un(t,e)),lp}function Ey(e){var t=e.stateNode,n=e.type,o=e.memoizedProps;switch(t[Mt]=e,t[rn]=o,n){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(n=0;n<Zr.length;n++)xe(Zr[n],t);break;case"source":xe("error",t);break;case"img":case"image":case"link":xe("error",t),xe("load",t);break;case"details":xe("toggle",t);break;case"input":xe("invalid",t),X0(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),Z0(t,o.value,o.defaultValue,o.children)}n=o.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||o.suppressHydrationWarning===!0||Qb(t.textContent,n)?(o.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),o.onScroll!=null&&xe("scroll",t),o.onScrollEnd!=null&&xe("scrollend",t),o.onClick!=null&&(t.onclick=Uo),t=!0):t=!1,t||Di(e,!0)}function Ty(e){for(Dt=e.return;Dt;)switch(Dt.tag){case 5:case 31:case 13:In=!1;return;case 27:case 3:In=!0;return;default:Dt=Dt.return}}function Pa(e){if(e!==Dt)return!1;if(!Ce)return Ty(e),Ce=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Rp(e.type,e.memoizedProps)),n=!n),n&&qe&&Di(e),Ty(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));qe=d0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));qe=d0(e)}else t===27?(t=qe,Li(e.type)?(e=Hp,Hp=null,qe=e):qe=t):qe=Dt?Yn(e.stateNode.nextSibling):null;return!0}function na(){qe=Dt=null,Ce=!1}function Ed(){var e=xi;return e!==null&&(an===null?an=e:an.push.apply(an,e),xi=null),e}function Vr(e){xi===null?xi=[e]:xi.push(e)}var rp=yo(null),fa=null,Io=null;function fi(e,t,n){Ie(rp,t._currentValue),t._currentValue=n}function Yo(e){e._currentValue=rp.current,Et(rp)}function sp(e,t,n){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===n)break;e=e.return}}function up(e,t,n,o){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var l=i.child;a=a.firstContext;e:for(;a!==null;){var r=a;a=i;for(var s=0;s<t.length;s++)if(r.context===t[s]){a.lanes|=n,r=a.alternate,r!==null&&(r.lanes|=n),sp(a.return,n,e),o||(l=null);break e}a=r.next}}else if(i.tag===18){if(l=i.return,l===null)throw Error(U(341));l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),sp(l,n,e),l=null}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===e){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}}function xl(e,t,n,o){e=null;for(var i=t,a=!1;i!==null;){if(!a){if((i.flags&524288)!==0)a=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var l=i.alternate;if(l===null)throw Error(U(387));if(l=l.memoizedProps,l!==null){var r=i.type;Nn(i.pendingProps.value,l.value)||(e!==null?e.push(r):e=[r])}}else if(i===Gu.current){if(l=i.alternate,l===null)throw Error(U(387));l.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push($r):e=[$r])}i=i.return}e!==null&&up(t,e,n,o),t.flags|=262144}function Zu(e){for(e=e.firstContext;e!==null;){if(!Nn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function oa(e){fa=e,Io=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Rt(e){return hv(fa,e)}function pu(e,t){return fa===null&&oa(e),hv(e,t)}function hv(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Io===null){if(e===null)throw Error(U(308));Io=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Io=Io.next=t;return n}var wN=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,o){e.push(o)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},AN=gt.unstable_scheduleCallback,MN=gt.unstable_NormalPriority,dt={$$typeof:Po,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function tm(){return{controller:new wN,data:new Map,refCount:0}}function os(e){e.refCount--,e.refCount===0&&AN(MN,function(){e.controller.abort()})}var wr=null,cp=0,fl=0,il=null;function DN(e,t){if(wr===null){var n=wr=[];cp=0,fl=Cm(),il={status:"pending",value:void 0,then:function(o){n.push(o)}}}return cp++,t.then(Ny,Ny),t}function Ny(){if(--cp===0&&wr!==null){il!==null&&(il.status="fulfilled");var e=wr;wr=null,fl=0,il=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function RN(e,t){var n=[],o={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(o.status="rejected",o.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),o}var Cy=ue.S;ue.S=function(e,t){Mb=xn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&DN(e,t),Cy!==null&&Cy(e,t)};var Ji=yo(null);function nm(){var e=Ji.current;return e!==null?e:Pe.pooledCache}function Au(e,t){t===null?Ie(Ji,Ji.current):Ie(Ji,t.pool)}function gv(){var e=nm();return e===null?null:{parent:dt._currentValue,pool:e}}var _l=Error(U(460)),om=Error(U(474)),bc=Error(U(542)),ju={then:function(){}};function wy(e){return e=e.status,e==="fulfilled"||e==="rejected"}function yv(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Uo,Uo),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,My(e),e;default:if(typeof t.status=="string")t.then(Uo,Uo);else{if(e=Pe,e!==null&&100<e.shellSuspendCounter)throw Error(U(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=o}},function(o){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,My(e),e}throw ea=t,_l}}function Ki(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ea=n,_l):n}}var ea=null;function Ay(){if(ea===null)throw Error(U(459));var e=ea;return ea=null,e}function My(e){if(e===_l||e===bc)throw Error(U(483))}var al=null,Yr=0;function mu(e){var t=Yr;return Yr+=1,al===null&&(al=[]),yv(al,e,t)}function mr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function hu(e,t){throw t.$$typeof===y2?Error(U(525)):(e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function vv(e){function t(p,y){if(e){var m=p.deletions;m===null?(p.deletions=[y],p.flags|=16):m.push(y)}}function n(p,y){if(!e)return null;for(;y!==null;)t(p,y),y=y.sibling;return null}function o(p){for(var y=new Map;p!==null;)p.key!==null?y.set(p.key,p):y.set(p.index,p),p=p.sibling;return y}function i(p,y){return p=Vo(p,y),p.index=0,p.sibling=null,p}function a(p,y,m){return p.index=m,e?(m=p.alternate,m!==null?(m=m.index,m<y?(p.flags|=67108866,y):m):(p.flags|=67108866,y)):(p.flags|=1048576,y)}function l(p){return e&&p.alternate===null&&(p.flags|=67108866),p}function r(p,y,m,g){return y===null||y.tag!==6?(y=xd(m,p.mode,g),y.return=p,y):(y=i(y,m),y.return=p,y)}function s(p,y,m,g){var x=m.type;return x===Ya?c(p,y,m.props.children,g,m.key):y!==null&&(y.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===ui&&Ki(x)===y.type)?(y=i(y,m.props),mr(y,m),y.return=p,y):(y=wu(m.type,m.key,m.props,null,p.mode,g),mr(y,m),y.return=p,y)}function u(p,y,m,g){return y===null||y.tag!==4||y.stateNode.containerInfo!==m.containerInfo||y.stateNode.implementation!==m.implementation?(y=_d(m,p.mode,g),y.return=p,y):(y=i(y,m.children||[]),y.return=p,y)}function c(p,y,m,g,x){return y===null||y.tag!==7?(y=Wi(m,p.mode,g,x),y.return=p,y):(y=i(y,m),y.return=p,y)}function d(p,y,m){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return y=xd(""+y,p.mode,m),y.return=p,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case au:return m=wu(y.type,y.key,y.props,null,p.mode,m),mr(m,y),m.return=p,m;case br:return y=_d(y,p.mode,m),y.return=p,y;case ui:return y=Ki(y),d(p,y,m)}if(Sr(y)||dr(y))return y=Wi(y,p.mode,m,null),y.return=p,y;if(typeof y.then=="function")return d(p,mu(y),m);if(y.$$typeof===Po)return d(p,pu(p,y),m);hu(p,y)}return null}function f(p,y,m,g){var x=y!==null?y.key:null;if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return x!==null?null:r(p,y,""+m,g);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case au:return m.key===x?s(p,y,m,g):null;case br:return m.key===x?u(p,y,m,g):null;case ui:return m=Ki(m),f(p,y,m,g)}if(Sr(m)||dr(m))return x!==null?null:c(p,y,m,g,null);if(typeof m.then=="function")return f(p,y,mu(m),g);if(m.$$typeof===Po)return f(p,y,pu(p,m),g);hu(p,m)}return null}function h(p,y,m,g,x){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return p=p.get(m)||null,r(y,p,""+g,x);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case au:return p=p.get(g.key===null?m:g.key)||null,s(y,p,g,x);case br:return p=p.get(g.key===null?m:g.key)||null,u(y,p,g,x);case ui:return g=Ki(g),h(p,y,m,g,x)}if(Sr(g)||dr(g))return p=p.get(m)||null,c(y,p,g,x,null);if(typeof g.then=="function")return h(p,y,m,mu(g),x);if(g.$$typeof===Po)return h(p,y,m,pu(y,g),x);hu(y,g)}return null}function v(p,y,m,g){for(var x=null,_=null,E=y,w=y=0,N=null;E!==null&&w<m.length;w++){E.index>w?(N=E,E=null):N=E.sibling;var k=f(p,E,m[w],g);if(k===null){E===null&&(E=N);break}e&&E&&k.alternate===null&&t(p,E),y=a(k,y,w),_===null?x=k:_.sibling=k,_=k,E=N}if(w===m.length)return n(p,E),Ce&&ko(p,w),x;if(E===null){for(;w<m.length;w++)E=d(p,m[w],g),E!==null&&(y=a(E,y,w),_===null?x=E:_.sibling=E,_=E);return Ce&&ko(p,w),x}for(E=o(E);w<m.length;w++)N=h(E,p,w,m[w],g),N!==null&&(e&&N.alternate!==null&&E.delete(N.key===null?w:N.key),y=a(N,y,w),_===null?x=N:_.sibling=N,_=N);return e&&E.forEach(function(D){return t(p,D)}),Ce&&ko(p,w),x}function b(p,y,m,g){if(m==null)throw Error(U(151));for(var x=null,_=null,E=y,w=y=0,N=null,k=m.next();E!==null&&!k.done;w++,k=m.next()){E.index>w?(N=E,E=null):N=E.sibling;var D=f(p,E,k.value,g);if(D===null){E===null&&(E=N);break}e&&E&&D.alternate===null&&t(p,E),y=a(D,y,w),_===null?x=D:_.sibling=D,_=D,E=N}if(k.done)return n(p,E),Ce&&ko(p,w),x;if(E===null){for(;!k.done;w++,k=m.next())k=d(p,k.value,g),k!==null&&(y=a(k,y,w),_===null?x=k:_.sibling=k,_=k);return Ce&&ko(p,w),x}for(E=o(E);!k.done;w++,k=m.next())k=h(E,p,w,k.value,g),k!==null&&(e&&k.alternate!==null&&E.delete(k.key===null?w:k.key),y=a(k,y,w),_===null?x=k:_.sibling=k,_=k);return e&&E.forEach(function(z){return t(p,z)}),Ce&&ko(p,w),x}function S(p,y,m,g){if(typeof m=="object"&&m!==null&&m.type===Ya&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case au:e:{for(var x=m.key;y!==null;){if(y.key===x){if(x=m.type,x===Ya){if(y.tag===7){n(p,y.sibling),g=i(y,m.props.children),g.return=p,p=g;break e}}else if(y.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===ui&&Ki(x)===y.type){n(p,y.sibling),g=i(y,m.props),mr(g,m),g.return=p,p=g;break e}n(p,y);break}else t(p,y);y=y.sibling}m.type===Ya?(g=Wi(m.props.children,p.mode,g,m.key),g.return=p,p=g):(g=wu(m.type,m.key,m.props,null,p.mode,g),mr(g,m),g.return=p,p=g)}return l(p);case br:e:{for(x=m.key;y!==null;){if(y.key===x)if(y.tag===4&&y.stateNode.containerInfo===m.containerInfo&&y.stateNode.implementation===m.implementation){n(p,y.sibling),g=i(y,m.children||[]),g.return=p,p=g;break e}else{n(p,y);break}else t(p,y);y=y.sibling}g=_d(m,p.mode,g),g.return=p,p=g}return l(p);case ui:return m=Ki(m),S(p,y,m,g)}if(Sr(m))return v(p,y,m,g);if(dr(m)){if(x=dr(m),typeof x!="function")throw Error(U(150));return m=x.call(m),b(p,y,m,g)}if(typeof m.then=="function")return S(p,y,mu(m),g);if(m.$$typeof===Po)return S(p,y,pu(p,m),g);hu(p,m)}return typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint"?(m=""+m,y!==null&&y.tag===6?(n(p,y.sibling),g=i(y,m),g.return=p,p=g):(n(p,y),g=xd(m,p.mode,g),g.return=p,p=g),l(p)):n(p,y)}return function(p,y,m,g){try{Yr=0;var x=S(p,y,m,g);return al=null,x}catch(E){if(E===_l||E===bc)throw E;var _=bn(29,E,null,p.mode);return _.lanes=g,_.return=p,_}}}var ia=vv(!0),bv=vv(!1),ci=!1;function im(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function fp(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function _i(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ei(e,t,n){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(De&2)!==0){var i=o.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),o.pending=t,t=Xu(e),cv(e,null,n),t}return vc(e,o,t,n),Xu(e)}function Ar(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,k0(e,n)}}function Td(e,t){var n=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,n===o)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var l={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=l:a=a.next=l,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:o.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:o.shared,callbacks:o.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var dp=!1;function Mr(){if(dp){var e=il;if(e!==null)throw e}}function Dr(e,t,n,o){dp=!1;var i=e.updateQueue;ci=!1;var a=i.firstBaseUpdate,l=i.lastBaseUpdate,r=i.shared.pending;if(r!==null){i.shared.pending=null;var s=r,u=s.next;s.next=null,l===null?a=u:l.next=u,l=s;var c=e.alternate;c!==null&&(c=c.updateQueue,r=c.lastBaseUpdate,r!==l&&(r===null?c.firstBaseUpdate=u:r.next=u,c.lastBaseUpdate=s))}if(a!==null){var d=i.baseState;l=0,c=u=s=null,r=a;do{var f=r.lane&-536870913,h=f!==r.lane;if(h?(Te&f)===f:(o&f)===f){f!==0&&f===fl&&(dp=!0),c!==null&&(c=c.next={lane:0,tag:r.tag,payload:r.payload,callback:null,next:null});e:{var v=e,b=r;f=t;var S=n;switch(b.tag){case 1:if(v=b.payload,typeof v=="function"){d=v.call(S,d,f);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=b.payload,f=typeof v=="function"?v.call(S,d,f):v,f==null)break e;d=Ze({},d,f);break e;case 2:ci=!0}}f=r.callback,f!==null&&(e.flags|=64,h&&(e.flags|=8192),h=i.callbacks,h===null?i.callbacks=[f]:h.push(f))}else h={lane:f,tag:r.tag,payload:r.payload,callback:r.callback,next:null},c===null?(u=c=h,s=d):c=c.next=h,l|=f;if(r=r.next,r===null){if(r=i.shared.pending,r===null)break;h=r,r=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);c===null&&(s=d),i.baseState=s,i.firstBaseUpdate=u,i.lastBaseUpdate=c,a===null&&(i.shared.lanes=0),Oi|=l,e.lanes=l,e.memoizedState=d}}function Sv(e,t){if(typeof e!="function")throw Error(U(191,e));e.call(t)}function xv(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Sv(n[e],t)}var dl=yo(null),$u=yo(0);function Dy(e,t){e=Ko,Ie($u,e),Ie(dl,t),Ko=e|t.baseLanes}function pp(){Ie($u,Ko),Ie(dl,dl.current)}function am(){Ko=$u.current,Et(dl),Et($u)}var Cn=yo(null),Vn=null;function di(e){var t=e.alternate;Ie(at,at.current&1),Ie(Cn,e),Vn===null&&(t===null||dl.current!==null||t.memoizedState!==null)&&(Vn=e)}function mp(e){Ie(at,at.current),Ie(Cn,e),Vn===null&&(Vn=e)}function _v(e){e.tag===22?(Ie(at,at.current),Ie(Cn,e),Vn===null&&(Vn=e)):pi(e)}function pi(){Ie(at,at.current),Ie(Cn,Cn.current)}function vn(e){Et(Cn),Vn===e&&(Vn=null),Et(at)}var at=yo(0);function Ku(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||zp(n)||Lp(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Zo=0,he=null,Be=null,ct=null,Qu=!1,ll=!1,aa=!1,Fu=0,Xr=0,rl=null,ON=0;function et(){throw Error(U(321))}function lm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Nn(e[n],t[n]))return!1;return!0}function rm(e,t,n,o,i,a){return Zo=a,he=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ue.H=e===null||e.memoizedState===null?Jv:vm,aa=!1,a=n(o,i),aa=!1,ll&&(a=Tv(t,n,o,i)),Ev(e),a}function Ev(e){ue.H=qr;var t=Be!==null&&Be.next!==null;if(Zo=0,ct=Be=he=null,Qu=!1,Xr=0,rl=null,t)throw Error(U(300));e===null||pt||(e=e.dependencies,e!==null&&Zu(e)&&(pt=!0))}function Tv(e,t,n,o){he=e;var i=0;do{if(ll&&(rl=null),Xr=0,ll=!1,25<=i)throw Error(U(301));if(i+=1,ct=Be=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}ue.H=eb,a=t(n,o)}while(ll);return a}function zN(){var e=ue.H,t=e.useState()[0];return t=typeof t.then=="function"?is(t):t,e=e.useState()[0],(Be!==null?Be.memoizedState:null)!==e&&(he.flags|=1024),t}function sm(){var e=Fu!==0;return Fu=0,e}function um(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function cm(e){if(Qu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Qu=!1}Zo=0,ct=Be=he=null,ll=!1,Xr=Fu=0,rl=null}function Xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ct===null?he.memoizedState=ct=e:ct=ct.next=e,ct}function lt(){if(Be===null){var e=he.alternate;e=e!==null?e.memoizedState:null}else e=Be.next;var t=ct===null?he.memoizedState:ct.next;if(t!==null)ct=t,Be=e;else{if(e===null)throw he.alternate===null?Error(U(467)):Error(U(310));Be=e,e={memoizedState:Be.memoizedState,baseState:Be.baseState,baseQueue:Be.baseQueue,queue:Be.queue,next:null},ct===null?he.memoizedState=ct=e:ct=ct.next=e}return ct}function Sc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function is(e){var t=Xr;return Xr+=1,rl===null&&(rl=[]),e=yv(rl,e,t),t=he,(ct===null?t.memoizedState:ct.next)===null&&(t=t.alternate,ue.H=t===null||t.memoizedState===null?Jv:vm),e}function xc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return is(e);if(e.$$typeof===Po)return Rt(e)}throw Error(U(438,String(e)))}function fm(e){var t=null,n=he.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var o=he.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Sc(),he.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),o=0;o<e;o++)n[o]=v2;return t.index++,n}function jo(e,t){return typeof t=="function"?t(e):t}function Mu(e){var t=lt();return dm(t,Be,e)}function dm(e,t,n){var o=e.queue;if(o===null)throw Error(U(311));o.lastRenderedReducer=n;var i=e.baseQueue,a=o.pending;if(a!==null){if(i!==null){var l=i.next;i.next=a.next,a.next=l}t.baseQueue=i=a,o.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var r=l=null,s=null,u=t,c=!1;do{var d=u.lane&-536870913;if(d!==u.lane?(Te&d)===d:(Zo&d)===d){var f=u.revertLane;if(f===0)s!==null&&(s=s.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),d===fl&&(c=!0);else if((Zo&f)===f){u=u.next,f===fl&&(c=!0);continue}else d={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(r=s=d,l=a):s=s.next=d,he.lanes|=f,Oi|=f;d=u.action,aa&&n(a,d),a=u.hasEagerState?u.eagerState:n(a,d)}else f={lane:d,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(r=s=f,l=a):s=s.next=f,he.lanes|=d,Oi|=d;u=u.next}while(u!==null&&u!==t);if(s===null?l=a:s.next=r,!Nn(a,e.memoizedState)&&(pt=!0,c&&(n=il,n!==null)))throw n;e.memoizedState=a,e.baseState=l,e.baseQueue=s,o.lastRenderedState=a}return i===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Nd(e){var t=lt(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var o=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do a=e(a,l.action),l=l.next;while(l!==i);Nn(a,t.memoizedState)||(pt=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,o]}function Nv(e,t,n){var o=he,i=lt(),a=Ce;if(a){if(n===void 0)throw Error(U(407));n=n()}else n=t();var l=!Nn((Be||i).memoizedState,n);if(l&&(i.memoizedState=n,pt=!0),i=i.queue,pm(Av.bind(null,o,i,e),[e]),i.getSnapshot!==t||l||ct!==null&&ct.memoizedState.tag&1){if(o.flags|=2048,pl(9,{destroy:void 0},wv.bind(null,o,i,n,t),null),Pe===null)throw Error(U(349));a||(Zo&127)!==0||Cv(o,t,n)}return n}function Cv(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=he.updateQueue,t===null?(t=Sc(),he.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function wv(e,t,n,o){t.value=n,t.getSnapshot=o,Mv(t)&&Dv(e)}function Av(e,t,n){return n(function(){Mv(t)&&Dv(e)})}function Mv(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Nn(e,n)}catch{return!0}}function Dv(e){var t=ca(e,2);t!==null&&ln(t,e,2)}function hp(e){var t=Xt();if(typeof e=="function"){var n=e;if(e=n(),aa){hi(!0);try{n()}finally{hi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:e},t}function Rv(e,t,n,o){return e.baseState=n,dm(e,Be,typeof o=="function"?o:jo)}function LN(e,t,n,o,i){if(Ec(e))throw Error(U(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(l){a.listeners.push(l)}};ue.T!==null?n(!0):a.isTransition=!1,o(a),n=t.pending,n===null?(a.next=t.pending=a,Ov(t,a)):(a.next=n.next,t.pending=n.next=a)}}function Ov(e,t){var n=t.action,o=t.payload,i=e.state;if(t.isTransition){var a=ue.T,l={};ue.T=l;try{var r=n(i,o),s=ue.S;s!==null&&s(l,r),Ry(e,t,r)}catch(u){gp(e,t,u)}finally{a!==null&&l.types!==null&&(a.types=l.types),ue.T=a}}else try{a=n(i,o),Ry(e,t,a)}catch(u){gp(e,t,u)}}function Ry(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(o){Oy(e,t,o)},function(o){return gp(e,t,o)}):Oy(e,t,n)}function Oy(e,t,n){t.status="fulfilled",t.value=n,zv(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ov(e,n)))}function gp(e,t,n){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=n,zv(t),t=t.next;while(t!==o)}e.action=null}function zv(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Lv(e,t){return t}function zy(e,t){if(Ce){var n=Pe.formState;if(n!==null){e:{var o=he;if(Ce){if(qe){t:{for(var i=qe,a=In;i.nodeType!==8;){if(!a){i=null;break t}if(i=Yn(i.nextSibling),i===null){i=null;break t}}a=i.data,i=a==="F!"||a==="F"?i:null}if(i){qe=Yn(i.nextSibling),o=i.data==="F!";break e}}Di(o)}o=!1}o&&(t=n[0])}}return n=Xt(),n.memoizedState=n.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lv,lastRenderedState:t},n.queue=o,n=Qv.bind(null,he,o),o.dispatch=n,o=hp(!1),a=ym.bind(null,he,!1,o.queue),o=Xt(),i={state:t,dispatch:null,action:e,pending:null},o.queue=i,n=LN.bind(null,he,i,a,n),i.dispatch=n,o.memoizedState=e,[t,n,!1]}function Ly(e){var t=lt();return Hv(t,Be,e)}function Hv(e,t,n){if(t=dm(e,t,Lv)[0],e=Mu(jo)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=is(t)}catch(l){throw l===_l?bc:l}else o=t;t=lt();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(he.flags|=2048,pl(9,{destroy:void 0},HN.bind(null,i,n),null)),[o,a,e]}function HN(e,t){e.action=t}function Hy(e){var t=lt(),n=Be;if(n!==null)return Hv(t,n,e);lt(),t=t.memoizedState,n=lt();var o=n.queue.dispatch;return n.memoizedState=e,[t,o,!1]}function pl(e,t,n,o){return e={tag:e,create:n,deps:o,inst:t,next:null},t=he.updateQueue,t===null&&(t=Sc(),he.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(o=n.next,n.next=e,e.next=o,t.lastEffect=e),e}function Bv(){return lt().memoizedState}function Du(e,t,n,o){var i=Xt();he.flags|=e,i.memoizedState=pl(1|t,{destroy:void 0},n,o===void 0?null:o)}function _c(e,t,n,o){var i=lt();o=o===void 0?null:o;var a=i.memoizedState.inst;Be!==null&&o!==null&&lm(o,Be.memoizedState.deps)?i.memoizedState=pl(t,a,n,o):(he.flags|=e,i.memoizedState=pl(1|t,a,n,o))}function By(e,t){Du(8390656,8,e,t)}function pm(e,t){_c(2048,8,e,t)}function BN(e){he.flags|=4;var t=he.updateQueue;if(t===null)t=Sc(),he.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function kv(e){var t=lt().memoizedState;return BN({ref:t,nextImpl:e}),function(){if((De&2)!==0)throw Error(U(440));return t.impl.apply(void 0,arguments)}}function Gv(e,t){return _c(4,2,e,t)}function Pv(e,t){return _c(4,4,e,t)}function Uv(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Iv(e,t,n){n=n!=null?n.concat([e]):null,_c(4,4,Uv.bind(null,t,e),n)}function mm(){}function Vv(e,t){var n=lt();t=t===void 0?null:t;var o=n.memoizedState;return t!==null&&lm(t,o[1])?o[0]:(n.memoizedState=[e,t],e)}function Yv(e,t){var n=lt();t=t===void 0?null:t;var o=n.memoizedState;if(t!==null&&lm(t,o[1]))return o[0];if(o=e(),aa){hi(!0);try{e()}finally{hi(!1)}}return n.memoizedState=[o,t],o}function hm(e,t,n){return n===void 0||(Zo&1073741824)!==0&&(Te&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Rb(),he.lanes|=e,Oi|=e,n)}function Xv(e,t,n,o){return Nn(n,t)?n:dl.current!==null?(e=hm(e,n,o),Nn(e,t)||(pt=!0),e):(Zo&42)===0||(Zo&1073741824)!==0&&(Te&261930)===0?(pt=!0,e.memoizedState=n):(e=Rb(),he.lanes|=e,Oi|=e,t)}function qv(e,t,n,o,i){var a=Re.p;Re.p=a!==0&&8>a?a:8;var l=ue.T,r={};ue.T=r,ym(e,!1,t,n);try{var s=i(),u=ue.S;if(u!==null&&u(r,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var c=RN(s,o);Rr(e,t,c,Tn(e))}else Rr(e,t,o,Tn(e))}catch(d){Rr(e,t,{then:function(){},status:"rejected",reason:d},Tn())}finally{Re.p=a,l!==null&&r.types!==null&&(l.types=r.types),ue.T=l}}function kN(){}function yp(e,t,n,o){if(e.tag!==5)throw Error(U(476));var i=Zv(e).queue;qv(e,i,t,Fi,n===null?kN:function(){return jv(e),n(o)})}function Zv(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Fi,baseState:Fi,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:Fi},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function jv(e){var t=Zv(e);t.next===null&&(t=e.alternate.memoizedState),Rr(e,t.next.queue,{},Tn())}function gm(){return Rt($r)}function $v(){return lt().memoizedState}function Kv(){return lt().memoizedState}function GN(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Tn();e=_i(n);var o=Ei(t,e,n);o!==null&&(ln(o,t,n),Ar(o,t,n)),t={cache:tm()},e.payload=t;return}t=t.return}}function PN(e,t,n){var o=Tn();n={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ec(e)?Fv(t,n):(n=Fp(e,t,n,o),n!==null&&(ln(n,e,o),Wv(n,t,o)))}function Qv(e,t,n){var o=Tn();Rr(e,t,n,o)}function Rr(e,t,n,o){var i={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ec(e))Fv(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var l=t.lastRenderedState,r=a(l,n);if(i.hasEagerState=!0,i.eagerState=r,Nn(r,l))return vc(e,t,i,0),Pe===null&&yc(),!1}catch{}if(n=Fp(e,t,i,o),n!==null)return ln(n,e,o),Wv(n,t,o),!0}return!1}function ym(e,t,n,o){if(o={lane:2,revertLane:Cm(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Ec(e)){if(t)throw Error(U(479))}else t=Fp(e,n,o,2),t!==null&&ln(t,e,2)}function Ec(e){var t=e.alternate;return e===he||t!==null&&t===he}function Fv(e,t){ll=Qu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Wv(e,t,n){if((n&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,k0(e,n)}}var qr={readContext:Rt,use:xc,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useLayoutEffect:et,useInsertionEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useSyncExternalStore:et,useId:et,useHostTransitionStatus:et,useFormState:et,useActionState:et,useOptimistic:et,useMemoCache:et,useCacheRefresh:et};qr.useEffectEvent=et;var Jv={readContext:Rt,use:xc,useCallback:function(e,t){return Xt().memoizedState=[e,t===void 0?null:t],e},useContext:Rt,useEffect:By,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Du(4194308,4,Uv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Du(4194308,4,e,t)},useInsertionEffect:function(e,t){Du(4,2,e,t)},useMemo:function(e,t){var n=Xt();t=t===void 0?null:t;var o=e();if(aa){hi(!0);try{e()}finally{hi(!1)}}return n.memoizedState=[o,t],o},useReducer:function(e,t,n){var o=Xt();if(n!==void 0){var i=n(t);if(aa){hi(!0);try{n(t)}finally{hi(!1)}}}else i=t;return o.memoizedState=o.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},o.queue=e,e=e.dispatch=PN.bind(null,he,e),[o.memoizedState,e]},useRef:function(e){var t=Xt();return e={current:e},t.memoizedState=e},useState:function(e){e=hp(e);var t=e.queue,n=Qv.bind(null,he,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:mm,useDeferredValue:function(e,t){var n=Xt();return hm(n,e,t)},useTransition:function(){var e=hp(!1);return e=qv.bind(null,he,e.queue,!0,!1),Xt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var o=he,i=Xt();if(Ce){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),Pe===null)throw Error(U(349));(Te&127)!==0||Cv(o,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,By(Av.bind(null,o,a,e),[e]),o.flags|=2048,pl(9,{destroy:void 0},wv.bind(null,o,a,n,t),null),n},useId:function(){var e=Xt(),t=Pe.identifierPrefix;if(Ce){var n=mo,o=po;n=(o&~(1<<32-En(o)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Fu++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=ON++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:gm,useFormState:zy,useActionState:zy,useOptimistic:function(e){var t=Xt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ym.bind(null,he,!0,n),n.dispatch=t,[e,t]},useMemoCache:fm,useCacheRefresh:function(){return Xt().memoizedState=GN.bind(null,he)},useEffectEvent:function(e){var t=Xt(),n={impl:e};return t.memoizedState=n,function(){if((De&2)!==0)throw Error(U(440));return n.impl.apply(void 0,arguments)}}},vm={readContext:Rt,use:xc,useCallback:Vv,useContext:Rt,useEffect:pm,useImperativeHandle:Iv,useInsertionEffect:Gv,useLayoutEffect:Pv,useMemo:Yv,useReducer:Mu,useRef:Bv,useState:function(){return Mu(jo)},useDebugValue:mm,useDeferredValue:function(e,t){var n=lt();return Xv(n,Be.memoizedState,e,t)},useTransition:function(){var e=Mu(jo)[0],t=lt().memoizedState;return[typeof e=="boolean"?e:is(e),t]},useSyncExternalStore:Nv,useId:$v,useHostTransitionStatus:gm,useFormState:Ly,useActionState:Ly,useOptimistic:function(e,t){var n=lt();return Rv(n,Be,e,t)},useMemoCache:fm,useCacheRefresh:Kv};vm.useEffectEvent=kv;var eb={readContext:Rt,use:xc,useCallback:Vv,useContext:Rt,useEffect:pm,useImperativeHandle:Iv,useInsertionEffect:Gv,useLayoutEffect:Pv,useMemo:Yv,useReducer:Nd,useRef:Bv,useState:function(){return Nd(jo)},useDebugValue:mm,useDeferredValue:function(e,t){var n=lt();return Be===null?hm(n,e,t):Xv(n,Be.memoizedState,e,t)},useTransition:function(){var e=Nd(jo)[0],t=lt().memoizedState;return[typeof e=="boolean"?e:is(e),t]},useSyncExternalStore:Nv,useId:$v,useHostTransitionStatus:gm,useFormState:Hy,useActionState:Hy,useOptimistic:function(e,t){var n=lt();return Be!==null?Rv(n,Be,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:fm,useCacheRefresh:Kv};eb.useEffectEvent=kv;function Cd(e,t,n,o){t=e.memoizedState,n=n(o,t),n=n==null?t:Ze({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var vp={enqueueSetState:function(e,t,n){e=e._reactInternals;var o=Tn(),i=_i(o);i.payload=t,n!=null&&(i.callback=n),t=Ei(e,i,o),t!==null&&(ln(t,e,o),Ar(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var o=Tn(),i=_i(o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ei(e,i,o),t!==null&&(ln(t,e,o),Ar(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Tn(),o=_i(n);o.tag=2,t!=null&&(o.callback=t),t=Ei(e,o,n),t!==null&&(ln(t,e,n),Ar(t,e,n))}};function ky(e,t,n,o,i,a,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,a,l):t.prototype&&t.prototype.isPureReactComponent?!Ur(n,o)||!Ur(i,a):!0}function Gy(e,t,n,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,o),t.state!==e&&vp.enqueueReplaceState(t,t.state,null)}function la(e,t){var n=t;if("ref"in t){n={};for(var o in t)o!=="ref"&&(n[o]=t[o])}if(e=e.defaultProps){n===t&&(n=Ze({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function tb(e){Yu(e)}function nb(e){console.error(e)}function ob(e){Yu(e)}function Wu(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function Py(e,t,n){try{var o=e.onCaughtError;o(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function bp(e,t,n){return n=_i(n),n.tag=3,n.payload={element:null},n.callback=function(){Wu(e,t)},n}function ib(e){return e=_i(e),e.tag=3,e}function ab(e,t,n,o){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var a=o.value;e.payload=function(){return i(a)},e.callback=function(){Py(t,n,o)}}var l=n.stateNode;l!==null&&typeof l.componentDidCatch=="function"&&(e.callback=function(){Py(t,n,o),typeof i!="function"&&(Ti===null?Ti=new Set([this]):Ti.add(this));var r=o.stack;this.componentDidCatch(o.value,{componentStack:r!==null?r:""})})}function UN(e,t,n,o,i){if(n.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=n.alternate,t!==null&&xl(t,n,i,!0),n=Cn.current,n!==null){switch(n.tag){case 31:case 13:return Vn===null?oc():n.alternate===null&&tt===0&&(tt=3),n.flags&=-257,n.flags|=65536,n.lanes=i,o===ju?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([o]):t.add(o),kd(e,o,i)),!1;case 22:return n.flags|=65536,o===ju?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([o]):n.add(o)),kd(e,o,i)),!1}throw Error(U(435,n.tag))}return kd(e,o,i),oc(),!1}if(Ce)return t=Cn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,o!==lp&&(e=Error(U(422),{cause:o}),Vr(Un(e,n)))):(o!==lp&&(t=Error(U(423),{cause:o}),Vr(Un(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,o=Un(o,n),i=bp(e.stateNode,o,i),Td(e,i),tt!==4&&(tt=2)),!1;var a=Error(U(520),{cause:o});if(a=Un(a,n),Lr===null?Lr=[a]:Lr.push(a),tt!==4&&(tt=2),t===null)return!0;o=Un(o,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=bp(n.stateNode,o,e),Td(n,e),!1;case 1:if(t=n.type,a=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||a!==null&&typeof a.componentDidCatch=="function"&&(Ti===null||!Ti.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=ib(i),ab(i,e,n,o),Td(n,i),!1}n=n.return}while(n!==null);return!1}var bm=Error(U(461)),pt=!1;function At(e,t,n,o){t.child=e===null?bv(t,null,n,o):ia(t,e.child,n,o)}function Uy(e,t,n,o,i){n=n.render;var a=t.ref;if("ref"in o){var l={};for(var r in o)r!=="ref"&&(l[r]=o[r])}else l=o;return oa(t),o=rm(e,t,n,l,a,i),r=sm(),e!==null&&!pt?(um(e,t,i),$o(e,t,i)):(Ce&&r&&Jp(t),t.flags|=1,At(e,t,o,i),t.child)}function Iy(e,t,n,o,i){if(e===null){var a=n.type;return typeof a=="function"&&!Wp(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,lb(e,t,a,o,i)):(e=wu(n.type,null,o,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Sm(e,i)){var l=a.memoizedProps;if(n=n.compare,n=n!==null?n:Ur,n(l,o)&&e.ref===t.ref)return $o(e,t,i)}return t.flags|=1,e=Vo(a,o),e.ref=t.ref,e.return=t,t.child=e}function lb(e,t,n,o,i){if(e!==null){var a=e.memoizedProps;if(Ur(a,o)&&e.ref===t.ref)if(pt=!1,t.pendingProps=o=a,Sm(e,i))(e.flags&131072)!==0&&(pt=!0);else return t.lanes=e.lanes,$o(e,t,i)}return Sp(e,t,n,o,i)}function rb(e,t,n,o){var i=o.children,a=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((t.flags&128)!==0){if(a=a!==null?a.baseLanes|n:n,e!==null){for(o=t.child=e.child,i=0;o!==null;)i=i|o.lanes|o.childLanes,o=o.sibling;o=i&~a}else o=0,t.child=null;return Vy(e,t,a,n,o)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Au(t,a!==null?a.cachePool:null),a!==null?Dy(t,a):pp(),_v(t);else return o=t.lanes=536870912,Vy(e,t,a!==null?a.baseLanes|n:n,n,o)}else a!==null?(Au(t,a.cachePool),Dy(t,a),pi(t),t.memoizedState=null):(e!==null&&Au(t,null),pp(),pi(t));return At(e,t,i,n),t.child}function _r(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Vy(e,t,n,o,i){var a=nm();return a=a===null?null:{parent:dt._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Au(t,null),pp(),_v(t),e!==null&&xl(e,t,o,!0),t.childLanes=i,null}function Ru(e,t){return t=Ju({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Yy(e,t,n){return ia(t,e.child,null,n),e=Ru(t,t.pendingProps),e.flags|=2,vn(t),t.memoizedState=null,e}function IN(e,t,n){var o=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ce){if(o.mode==="hidden")return e=Ru(t,o),t.lanes=536870912,_r(null,e);if(mp(t),(e=qe)?(e=Jb(e,In),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mi!==null?{id:po,overflow:mo}:null,retryLane:536870912,hydrationErrors:null},n=dv(e),n.return=t,t.child=n,Dt=t,qe=null)):e=null,e===null)throw Di(t);return t.lanes=536870912,null}return Ru(t,o)}var a=e.memoizedState;if(a!==null){var l=a.dehydrated;if(mp(t),i)if(t.flags&256)t.flags&=-257,t=Yy(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(U(558));else if(pt||xl(e,t,n,!1),i=(n&e.childLanes)!==0,pt||i){if(o=Pe,o!==null&&(l=G0(o,n),l!==0&&l!==a.retryLane))throw a.retryLane=l,ca(e,l),ln(o,e,l),bm;oc(),t=Yy(e,t,n)}else e=a.treeContext,qe=Yn(l.nextSibling),Dt=t,Ce=!0,xi=null,In=!1,e!==null&&mv(t,e),t=Ru(t,o),t.flags|=4096;return t}return e=Vo(e.child,{mode:o.mode,children:o.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ou(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(U(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Sp(e,t,n,o,i){return oa(t),n=rm(e,t,n,o,void 0,i),o=sm(),e!==null&&!pt?(um(e,t,i),$o(e,t,i)):(Ce&&o&&Jp(t),t.flags|=1,At(e,t,n,i),t.child)}function Xy(e,t,n,o,i,a){return oa(t),t.updateQueue=null,n=Tv(t,o,n,i),Ev(e),o=sm(),e!==null&&!pt?(um(e,t,a),$o(e,t,a)):(Ce&&o&&Jp(t),t.flags|=1,At(e,t,n,a),t.child)}function qy(e,t,n,o,i){if(oa(t),t.stateNode===null){var a=Fa,l=n.contextType;typeof l=="object"&&l!==null&&(a=Rt(l)),a=new n(o,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=vp,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=o,a.state=t.memoizedState,a.refs={},im(t),l=n.contextType,a.context=typeof l=="object"&&l!==null?Rt(l):Fa,a.state=t.memoizedState,l=n.getDerivedStateFromProps,typeof l=="function"&&(Cd(t,n,l,o),a.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(l=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),l!==a.state&&vp.enqueueReplaceState(a,a.state,null),Dr(t,o,a,i),Mr(),a.state=t.memoizedState),typeof a.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){a=t.stateNode;var r=t.memoizedProps,s=la(n,r);a.props=s;var u=a.context,c=n.contextType;l=Fa,typeof c=="object"&&c!==null&&(l=Rt(c));var d=n.getDerivedStateFromProps;c=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function",r=t.pendingProps!==r,c||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(r||u!==l)&&Gy(t,a,o,l),ci=!1;var f=t.memoizedState;a.state=f,Dr(t,o,a,i),Mr(),u=t.memoizedState,r||f!==u||ci?(typeof d=="function"&&(Cd(t,n,d,o),u=t.memoizedState),(s=ci||ky(t,n,s,o,f,u,l))?(c||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=u),a.props=o,a.state=u,a.context=l,o=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{a=t.stateNode,fp(e,t),l=t.memoizedProps,c=la(n,l),a.props=c,d=t.pendingProps,f=a.context,u=n.contextType,s=Fa,typeof u=="object"&&u!==null&&(s=Rt(u)),r=n.getDerivedStateFromProps,(u=typeof r=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==d||f!==s)&&Gy(t,a,o,s),ci=!1,f=t.memoizedState,a.state=f,Dr(t,o,a,i),Mr();var h=t.memoizedState;l!==d||f!==h||ci||e!==null&&e.dependencies!==null&&Zu(e.dependencies)?(typeof r=="function"&&(Cd(t,n,r,o),h=t.memoizedState),(c=ci||ky(t,n,c,o,f,h,s)||e!==null&&e.dependencies!==null&&Zu(e.dependencies))?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(o,h,s),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(o,h,s)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=h),a.props=o,a.state=h,a.context=s,o=c):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),o=!1)}return a=o,Ou(e,t),o=(t.flags&128)!==0,a||o?(a=t.stateNode,n=o&&typeof n.getDerivedStateFromError!="function"?null:a.render(),t.flags|=1,e!==null&&o?(t.child=ia(t,e.child,null,i),t.child=ia(t,null,n,i)):At(e,t,n,i),t.memoizedState=a.state,e=t.child):e=$o(e,t,i),e}function Zy(e,t,n,o){return na(),t.flags|=256,At(e,t,n,o),t.child}var wd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ad(e){return{baseLanes:e,cachePool:gv()}}function Md(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Sn),e}function sb(e,t,n){var o=t.pendingProps,i=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(at.current&2)!==0),l&&(i=!0,t.flags&=-129),l=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ce){if(i?di(t):pi(t),(e=qe)?(e=Jb(e,In),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mi!==null?{id:po,overflow:mo}:null,retryLane:536870912,hydrationErrors:null},n=dv(e),n.return=t,t.child=n,Dt=t,qe=null)):e=null,e===null)throw Di(t);return Lp(e)?t.lanes=32:t.lanes=536870912,null}var r=o.children;return o=o.fallback,i?(pi(t),i=t.mode,r=Ju({mode:"hidden",children:r},i),o=Wi(o,i,n,null),r.return=t,o.return=t,r.sibling=o,t.child=r,o=t.child,o.memoizedState=Ad(n),o.childLanes=Md(e,l,n),t.memoizedState=wd,_r(null,o)):(di(t),xp(t,r))}var s=e.memoizedState;if(s!==null&&(r=s.dehydrated,r!==null)){if(a)t.flags&256?(di(t),t.flags&=-257,t=Dd(e,t,n)):t.memoizedState!==null?(pi(t),t.child=e.child,t.flags|=128,t=null):(pi(t),r=o.fallback,i=t.mode,o=Ju({mode:"visible",children:o.children},i),r=Wi(r,i,n,null),r.flags|=2,o.return=t,r.return=t,o.sibling=r,t.child=o,ia(t,e.child,null,n),o=t.child,o.memoizedState=Ad(n),o.childLanes=Md(e,l,n),t.memoizedState=wd,t=_r(null,o));else if(di(t),Lp(r)){if(l=r.nextSibling&&r.nextSibling.dataset,l)var u=l.dgst;l=u,o=Error(U(419)),o.stack="",o.digest=l,Vr({value:o,source:null,stack:null}),t=Dd(e,t,n)}else if(pt||xl(e,t,n,!1),l=(n&e.childLanes)!==0,pt||l){if(l=Pe,l!==null&&(o=G0(l,n),o!==0&&o!==s.retryLane))throw s.retryLane=o,ca(e,o),ln(l,e,o),bm;zp(r)||oc(),t=Dd(e,t,n)}else zp(r)?(t.flags|=192,t.child=e.child,t=null):(e=s.treeContext,qe=Yn(r.nextSibling),Dt=t,Ce=!0,xi=null,In=!1,e!==null&&mv(t,e),t=xp(t,o.children),t.flags|=4096);return t}return i?(pi(t),r=o.fallback,i=t.mode,s=e.child,u=s.sibling,o=Vo(s,{mode:"hidden",children:o.children}),o.subtreeFlags=s.subtreeFlags&65011712,u!==null?r=Vo(u,r):(r=Wi(r,i,n,null),r.flags|=2),r.return=t,o.return=t,o.sibling=r,t.child=o,_r(null,o),o=t.child,r=e.child.memoizedState,r===null?r=Ad(n):(i=r.cachePool,i!==null?(s=dt._currentValue,i=i.parent!==s?{parent:s,pool:s}:i):i=gv(),r={baseLanes:r.baseLanes|n,cachePool:i}),o.memoizedState=r,o.childLanes=Md(e,l,n),t.memoizedState=wd,_r(e.child,o)):(di(t),n=e.child,e=n.sibling,n=Vo(n,{mode:"visible",children:o.children}),n.return=t,n.sibling=null,e!==null&&(l=t.deletions,l===null?(t.deletions=[e],t.flags|=16):l.push(e)),t.child=n,t.memoizedState=null,n)}function xp(e,t){return t=Ju({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ju(e,t){return e=bn(22,e,null,t),e.lanes=0,e}function Dd(e,t,n){return ia(t,e.child,null,n),e=xp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function jy(e,t,n){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),sp(e.return,t,n)}function Rd(e,t,n,o,i,a){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:n,tailMode:i,treeForkCount:a}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=o,l.tail=n,l.tailMode=i,l.treeForkCount=a)}function ub(e,t,n){var o=t.pendingProps,i=o.revealOrder,a=o.tail;o=o.children;var l=at.current,r=(l&2)!==0;if(r?(l=l&1|2,t.flags|=128):l&=1,Ie(at,l),At(e,t,o,n),o=Ce?Ir:0,!r&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&jy(e,n,t);else if(e.tag===19)jy(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ku(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Rd(t,!1,i,n,a,o);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ku(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Rd(t,!0,n,null,a,o);break;case"together":Rd(t,!1,null,null,void 0,o);break;default:t.memoizedState=null}return t.child}function $o(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Oi|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(xl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,n=Vo(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Vo(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Sm(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Zu(e)))}function VN(e,t,n){switch(t.tag){case 3:Pu(t,t.stateNode.containerInfo),fi(t,dt,e.memoizedState.cache),na();break;case 27:case 5:Kd(t);break;case 4:Pu(t,t.stateNode.containerInfo);break;case 10:fi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,mp(t),null;break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(di(t),t.flags|=128,null):(n&t.child.childLanes)!==0?sb(e,t,n):(di(t),e=$o(e,t,n),e!==null?e.sibling:null);di(t);break;case 19:var i=(e.flags&128)!==0;if(o=(n&t.childLanes)!==0,o||(xl(e,t,n,!1),o=(n&t.childLanes)!==0),i){if(o)return ub(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ie(at,at.current),o)break;return null;case 22:return t.lanes=0,rb(e,t,n,t.pendingProps);case 24:fi(t,dt,e.memoizedState.cache)}return $o(e,t,n)}function cb(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)pt=!0;else{if(!Sm(e,n)&&(t.flags&128)===0)return pt=!1,VN(e,t,n);pt=(e.flags&131072)!==0}else pt=!1,Ce&&(t.flags&1048576)!==0&&pv(t,Ir,t.index);switch(t.lanes=0,t.tag){case 16:e:{var o=t.pendingProps;if(e=Ki(t.elementType),t.type=e,typeof e=="function")Wp(e)?(o=la(e,o),t.tag=1,t=qy(null,t,e,o,n)):(t.tag=0,t=Sp(null,t,e,o,n));else{if(e!=null){var i=e.$$typeof;if(i===Gp){t.tag=11,t=Uy(null,t,e,o,n);break e}else if(i===Pp){t.tag=14,t=Iy(null,t,e,o,n);break e}}throw t=jd(e)||e,Error(U(306,t,""))}}return t;case 0:return Sp(e,t,t.type,t.pendingProps,n);case 1:return o=t.type,i=la(o,t.pendingProps),qy(e,t,o,i,n);case 3:e:{if(Pu(t,t.stateNode.containerInfo),e===null)throw Error(U(387));o=t.pendingProps;var a=t.memoizedState;i=a.element,fp(e,t),Dr(t,o,null,n);var l=t.memoizedState;if(o=l.cache,fi(t,dt,o),o!==a.cache&&up(t,[dt],n,!0),Mr(),o=l.element,a.isDehydrated)if(a={element:o,isDehydrated:!1,cache:l.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=Zy(e,t,o,n);break e}else if(o!==i){i=Un(Error(U(424)),t),Vr(i),t=Zy(e,t,o,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,qe=Yn(e.firstChild),Dt=t,Ce=!0,xi=null,In=!0,n=bv(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(na(),o===i){t=$o(e,t,n);break e}At(e,t,o,n)}t=t.child}return t;case 26:return Ou(e,t),e===null?(n=h0(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ce||(n=t.type,e=t.pendingProps,o=rc(Si.current).createElement(n),o[Mt]=t,o[rn]=e,Ot(o,n,e),_t(o),t.stateNode=o):t.memoizedState=h0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Kd(t),e===null&&Ce&&(o=t.stateNode=e1(t.type,t.pendingProps,Si.current),Dt=t,In=!0,i=qe,Li(t.type)?(Hp=i,qe=Yn(o.firstChild)):qe=i),At(e,t,t.pendingProps.children,n),Ou(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ce&&((i=o=qe)&&(o=gC(o,t.type,t.pendingProps,In),o!==null?(t.stateNode=o,Dt=t,qe=Yn(o.firstChild),In=!1,i=!0):i=!1),i||Di(t)),Kd(t),i=t.type,a=t.pendingProps,l=e!==null?e.memoizedProps:null,o=a.children,Rp(i,a)?o=null:l!==null&&Rp(i,l)&&(t.flags|=32),t.memoizedState!==null&&(i=rm(e,t,zN,null,null,n),$r._currentValue=i),Ou(e,t),At(e,t,o,n),t.child;case 6:return e===null&&Ce&&((e=n=qe)&&(n=yC(n,t.pendingProps,In),n!==null?(t.stateNode=n,Dt=t,qe=null,e=!0):e=!1),e||Di(t)),null;case 13:return sb(e,t,n);case 4:return Pu(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=ia(t,null,o,n):At(e,t,o,n),t.child;case 11:return Uy(e,t,t.type,t.pendingProps,n);case 7:return At(e,t,t.pendingProps,n),t.child;case 8:return At(e,t,t.pendingProps.children,n),t.child;case 12:return At(e,t,t.pendingProps.children,n),t.child;case 10:return o=t.pendingProps,fi(t,t.type,o.value),At(e,t,o.children,n),t.child;case 9:return i=t.type._context,o=t.pendingProps.children,oa(t),i=Rt(i),o=o(i),t.flags|=1,At(e,t,o,n),t.child;case 14:return Iy(e,t,t.type,t.pendingProps,n);case 15:return lb(e,t,t.type,t.pendingProps,n);case 19:return ub(e,t,n);case 31:return IN(e,t,n);case 22:return rb(e,t,n,t.pendingProps);case 24:return oa(t),o=Rt(dt),e===null?(i=nm(),i===null&&(i=Pe,a=tm(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:o,cache:i},im(t),fi(t,dt,i)):((e.lanes&n)!==0&&(fp(e,t),Dr(t,null,null,n),Mr()),i=e.memoizedState,a=t.memoizedState,i.parent!==o?(i={parent:o,cache:o},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),fi(t,dt,o)):(o=a.cache,fi(t,dt,o),o!==i.cache&&up(t,[dt],n,!0))),At(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(U(156,t.tag))}function zo(e){e.flags|=4}function Od(e,t,n,o,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Lb())e.flags|=8192;else throw ea=ju,om}else e.flags&=-16777217}function $y(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!o1(t))if(Lb())e.flags|=8192;else throw ea=ju,om}function gu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?H0():536870912,e.lanes|=t,ml|=t)}function hr(e,t){if(!Ce)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Xe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,o=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,o|=i.subtreeFlags&65011712,o|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,o|=i.subtreeFlags,o|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=o,e.childLanes=n,t}function YN(e,t,n){var o=t.pendingProps;switch(em(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(t),null;case 1:return Xe(t),null;case 3:return n=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),Yo(dt),sl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Pa(t)?zo(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ed())),Xe(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(zo(t),a!==null?(Xe(t),$y(t,a)):(Xe(t),Od(t,i,null,o,n))):a?a!==e.memoizedState?(zo(t),Xe(t),$y(t,a)):(Xe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==o&&zo(t),Xe(t),Od(t,i,e,o,n)),null;case 27:if(Uu(t),n=Si.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&zo(t);else{if(!o){if(t.stateNode===null)throw Error(U(166));return Xe(t),null}e=go.current,Pa(t)?Ey(t,e):(e=e1(i,o,n),t.stateNode=e,zo(t))}return Xe(t),null;case 5:if(Uu(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&zo(t);else{if(!o){if(t.stateNode===null)throw Error(U(166));return Xe(t),null}if(a=go.current,Pa(t))Ey(t,a);else{var l=rc(Si.current);switch(a){case 1:a=l.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:a=l.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":a=l.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":a=l.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":a=l.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof o.is=="string"?l.createElement("select",{is:o.is}):l.createElement("select"),o.multiple?a.multiple=!0:o.size&&(a.size=o.size);break;default:a=typeof o.is=="string"?l.createElement(i,{is:o.is}):l.createElement(i)}}a[Mt]=t,a[rn]=o;e:for(l=t.child;l!==null;){if(l.tag===5||l.tag===6)a.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;l.sibling===null;){if(l.return===null||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=a;e:switch(Ot(a,i,o),i){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&zo(t)}}return Xe(t),Od(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&zo(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(U(166));if(e=Si.current,Pa(t)){if(e=t.stateNode,n=t.memoizedProps,o=null,i=Dt,i!==null)switch(i.tag){case 27:case 5:o=i.memoizedProps}e[Mt]=t,e=!!(e.nodeValue===n||o!==null&&o.suppressHydrationWarning===!0||Qb(e.nodeValue,n)),e||Di(t,!0)}else e=rc(e).createTextNode(o),e[Mt]=t,t.stateNode=e}return Xe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(o=Pa(t),n!==null){if(e===null){if(!o)throw Error(U(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(557));e[Mt]=t}else na(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),e=!1}else n=Ed(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(vn(t),t):(vn(t),null);if((t.flags&128)!==0)throw Error(U(558))}return Xe(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Pa(t),o!==null&&o.dehydrated!==null){if(e===null){if(!i)throw Error(U(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(U(317));i[Mt]=t}else na(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),i=!1}else i=Ed(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(vn(t),t):(vn(t),null)}return vn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=o!==null,e=e!==null&&e.memoizedState!==null,n&&(o=t.child,i=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(i=o.alternate.memoizedState.cachePool.pool),a=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(a=o.memoizedState.cachePool.pool),a!==i&&(o.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),gu(t,t.updateQueue),Xe(t),null);case 4:return sl(),e===null&&wm(t.stateNode.containerInfo),Xe(t),null;case 10:return Yo(t.type),Xe(t),null;case 19:if(Et(at),o=t.memoizedState,o===null)return Xe(t),null;if(i=(t.flags&128)!==0,a=o.rendering,a===null)if(i)hr(o,!1);else{if(tt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=Ku(e),a!==null){for(t.flags|=128,hr(o,!1),e=a.updateQueue,t.updateQueue=e,gu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)fv(n,e),n=n.sibling;return Ie(at,at.current&1|2),Ce&&ko(t,o.treeForkCount),t.child}e=e.sibling}o.tail!==null&&xn()>tc&&(t.flags|=128,i=!0,hr(o,!1),t.lanes=4194304)}else{if(!i)if(e=Ku(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,gu(t,e),hr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Ce)return Xe(t),null}else 2*xn()-o.renderingStartTime>tc&&n!==536870912&&(t.flags|=128,i=!0,hr(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(e=o.last,e!==null?e.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=xn(),e.sibling=null,n=at.current,Ie(at,i?n&1|2:n&1),Ce&&ko(t,o.treeForkCount),e):(Xe(t),null);case 22:case 23:return vn(t),am(),o=t.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?(n&536870912)!==0&&(t.flags&128)===0&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),n=t.updateQueue,n!==null&&gu(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),o=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),o!==n&&(t.flags|=2048),e!==null&&Et(Ji),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Yo(dt),Xe(t),null;case 25:return null;case 30:return null}throw Error(U(156,t.tag))}function XN(e,t){switch(em(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yo(dt),sl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Uu(t),null;case 31:if(t.memoizedState!==null){if(vn(t),t.alternate===null)throw Error(U(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(vn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Et(at),null;case 4:return sl(),null;case 10:return Yo(t.type),null;case 22:case 23:return vn(t),am(),e!==null&&Et(Ji),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Yo(dt),null;case 25:return null;default:return null}}function fb(e,t){switch(em(t),t.tag){case 3:Yo(dt),sl();break;case 26:case 27:case 5:Uu(t);break;case 4:sl();break;case 31:t.memoizedState!==null&&vn(t);break;case 13:vn(t);break;case 19:Et(at);break;case 10:Yo(t.type);break;case 22:case 23:vn(t),am(),e!==null&&Et(Ji);break;case 24:Yo(dt)}}function as(e,t){try{var n=t.updateQueue,o=n!==null?n.lastEffect:null;if(o!==null){var i=o.next;n=i;do{if((n.tag&e)===e){o=void 0;var a=n.create,l=n.inst;o=a(),l.destroy=o}n=n.next}while(n!==i)}}catch(r){ze(t,t.return,r)}}function Ri(e,t,n){try{var o=t.updateQueue,i=o!==null?o.lastEffect:null;if(i!==null){var a=i.next;o=a;do{if((o.tag&e)===e){var l=o.inst,r=l.destroy;if(r!==void 0){l.destroy=void 0,i=t;var s=n,u=r;try{u()}catch(c){ze(i,s,c)}}}o=o.next}while(o!==a)}}catch(c){ze(t,t.return,c)}}function db(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{xv(t,n)}catch(o){ze(e,e.return,o)}}}function pb(e,t,n){n.props=la(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(o){ze(e,t,o)}}function Or(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof n=="function"?e.refCleanup=n(o):n.current=o}}catch(i){ze(e,t,i)}}function ho(e,t){var n=e.ref,o=e.refCleanup;if(n!==null)if(typeof o=="function")try{o()}catch(i){ze(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){ze(e,t,i)}else n.current=null}function mb(e){var t=e.type,n=e.memoizedProps,o=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&o.focus();break e;case"img":n.src?o.src=n.src:n.srcSet&&(o.srcset=n.srcSet)}}catch(i){ze(e,e.return,i)}}function zd(e,t,n){try{var o=e.stateNode;cC(o,e.type,n,t),o[rn]=t}catch(i){ze(e,e.return,i)}}function hb(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Li(e.type)||e.tag===4}function Ld(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Li(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function _p(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Uo));else if(o!==4&&(o===27&&Li(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(_p(e,t,n),e=e.sibling;e!==null;)_p(e,t,n),e=e.sibling}function ec(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(o!==4&&(o===27&&Li(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(ec(e,t,n),e=e.sibling;e!==null;)ec(e,t,n),e=e.sibling}function gb(e){var t=e.stateNode,n=e.memoizedProps;try{for(var o=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ot(t,o,n),t[Mt]=e,t[rn]=n}catch(a){ze(e,e.return,a)}}var Go=!1,ft=!1,Hd=!1,Ky=typeof WeakSet=="function"?WeakSet:Set,xt=null;function qN(e,t){if(e=e.containerInfo,Mp=fc,e=ov(e),Kp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var o=n.getSelection&&n.getSelection();if(o&&o.rangeCount!==0){n=o.anchorNode;var i=o.anchorOffset,a=o.focusNode;o=o.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var l=0,r=-1,s=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(r=l+i),d!==a||o!==0&&d.nodeType!==3||(s=l+o),d.nodeType===3&&(l+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===i&&(r=l),f===a&&++c===o&&(s=l),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=r===-1||s===-1?null:{start:r,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Dp={focusedElem:e,selectionRange:n},fc=!1,xt=t;xt!==null;)if(t=xt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,xt=e;else for(;xt!==null;){switch(t=xt,a=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&a!==null){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,o=n.stateNode;try{var v=la(n.type,i);e=o.getSnapshotBeforeUpdate(v,a),o.__reactInternalSnapshotBeforeUpdate=e}catch(b){ze(n,n.return,b)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Op(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Op(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(U(163))}if(e=t.sibling,e!==null){e.return=t.return,xt=e;break}xt=t.return}}function yb(e,t,n){var o=n.flags;switch(n.tag){case 0:case 11:case 15:Ho(e,n),o&4&&as(5,n);break;case 1:if(Ho(e,n),o&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(l){ze(n,n.return,l)}else{var i=la(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){ze(n,n.return,l)}}o&64&&db(n),o&512&&Or(n,n.return);break;case 3:if(Ho(e,n),o&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{xv(e,t)}catch(l){ze(n,n.return,l)}}break;case 27:t===null&&o&4&&gb(n);case 26:case 5:Ho(e,n),t===null&&o&4&&mb(n),o&512&&Or(n,n.return);break;case 12:Ho(e,n);break;case 31:Ho(e,n),o&4&&Sb(e,n);break;case 13:Ho(e,n),o&4&&xb(e,n),o&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=eC.bind(null,n),vC(e,n))));break;case 22:if(o=n.memoizedState!==null||Go,!o){t=t!==null&&t.memoizedState!==null||ft,i=Go;var a=ft;Go=o,(ft=t)&&!a?Bo(e,n,(n.subtreeFlags&8772)!==0):Ho(e,n),Go=i,ft=a}break;case 30:break;default:Ho(e,n)}}function vb(e){var t=e.alternate;t!==null&&(e.alternate=null,vb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Yp(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ke=null,on=!1;function Lo(e,t,n){for(n=n.child;n!==null;)bb(e,t,n),n=n.sibling}function bb(e,t,n){if(_n&&typeof _n.onCommitFiberUnmount=="function")try{_n.onCommitFiberUnmount(Wr,n)}catch{}switch(n.tag){case 26:ft||ho(n,t),Lo(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ft||ho(n,t);var o=Ke,i=on;Li(n.type)&&(Ke=n.stateNode,on=!1),Lo(e,t,n),Br(n.stateNode),Ke=o,on=i;break;case 5:ft||ho(n,t);case 6:if(o=Ke,i=on,Ke=null,Lo(e,t,n),Ke=o,on=i,Ke!==null)if(on)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(n.stateNode)}catch(a){ze(n,t,a)}else try{Ke.removeChild(n.stateNode)}catch(a){ze(n,t,a)}break;case 18:Ke!==null&&(on?(e=Ke,c0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),vl(e)):c0(Ke,n.stateNode));break;case 4:o=Ke,i=on,Ke=n.stateNode.containerInfo,on=!0,Lo(e,t,n),Ke=o,on=i;break;case 0:case 11:case 14:case 15:Ri(2,n,t),ft||Ri(4,n,t),Lo(e,t,n);break;case 1:ft||(ho(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"&&pb(n,t,o)),Lo(e,t,n);break;case 21:Lo(e,t,n);break;case 22:ft=(o=ft)||n.memoizedState!==null,Lo(e,t,n),ft=o;break;default:Lo(e,t,n)}}function Sb(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{vl(e)}catch(n){ze(t,t.return,n)}}}function xb(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{vl(e)}catch(n){ze(t,t.return,n)}}function ZN(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ky),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ky),t;default:throw Error(U(435,e.tag))}}function yu(e,t){var n=ZN(e);t.forEach(function(o){if(!n.has(o)){n.add(o);var i=tC.bind(null,e,o);o.then(i,i)}})}function tn(e,t){var n=t.deletions;if(n!==null)for(var o=0;o<n.length;o++){var i=n[o],a=e,l=t,r=l;e:for(;r!==null;){switch(r.tag){case 27:if(Li(r.type)){Ke=r.stateNode,on=!1;break e}break;case 5:Ke=r.stateNode,on=!1;break e;case 3:case 4:Ke=r.stateNode.containerInfo,on=!0;break e}r=r.return}if(Ke===null)throw Error(U(160));bb(a,l,i),Ke=null,on=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_b(t,e),t=t.sibling}var Jn=null;function _b(e,t){var n=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:tn(t,e),nn(e),o&4&&(Ri(3,e,e.return),as(3,e),Ri(5,e,e.return));break;case 1:tn(t,e),nn(e),o&512&&(ft||n===null||ho(n,n.return)),o&64&&Go&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?o:n.concat(o))));break;case 26:var i=Jn;if(tn(t,e),nn(e),o&512&&(ft||n===null||ho(n,n.return)),o&4){var a=n!==null?n.memoizedState:null;if(o=e.memoizedState,n===null)if(o===null)if(e.stateNode===null){e:{o=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(o){case"title":a=i.getElementsByTagName("title")[0],(!a||a[ts]||a[Mt]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=i.createElement(o),i.head.insertBefore(a,i.querySelector("head > title"))),Ot(a,o,n),a[Mt]=e,_t(a),o=a;break e;case"link":var l=y0("link","href",i).get(o+(n.href||""));if(l){for(var r=0;r<l.length;r++)if(a=l[r],a.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&a.getAttribute("rel")===(n.rel==null?null:n.rel)&&a.getAttribute("title")===(n.title==null?null:n.title)&&a.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){l.splice(r,1);break t}}a=i.createElement(o),Ot(a,o,n),i.head.appendChild(a);break;case"meta":if(l=y0("meta","content",i).get(o+(n.content||""))){for(r=0;r<l.length;r++)if(a=l[r],a.getAttribute("content")===(n.content==null?null:""+n.content)&&a.getAttribute("name")===(n.name==null?null:n.name)&&a.getAttribute("property")===(n.property==null?null:n.property)&&a.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute("charset")===(n.charSet==null?null:n.charSet)){l.splice(r,1);break t}}a=i.createElement(o),Ot(a,o,n),i.head.appendChild(a);break;default:throw Error(U(468,o))}a[Mt]=e,_t(a),o=a}e.stateNode=o}else v0(i,e.type,e.stateNode);else e.stateNode=g0(i,o,e.memoizedProps);else a!==o?(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,o===null?v0(i,e.type,e.stateNode):g0(i,o,e.memoizedProps)):o===null&&e.stateNode!==null&&zd(e,e.memoizedProps,n.memoizedProps)}break;case 27:tn(t,e),nn(e),o&512&&(ft||n===null||ho(n,n.return)),n!==null&&o&4&&zd(e,e.memoizedProps,n.memoizedProps);break;case 5:if(tn(t,e),nn(e),o&512&&(ft||n===null||ho(n,n.return)),e.flags&32){i=e.stateNode;try{cl(i,"")}catch(v){ze(e,e.return,v)}}o&4&&e.stateNode!=null&&(i=e.memoizedProps,zd(e,i,n!==null?n.memoizedProps:i)),o&1024&&(Hd=!0);break;case 6:if(tn(t,e),nn(e),o&4){if(e.stateNode===null)throw Error(U(162));o=e.memoizedProps,n=e.stateNode;try{n.nodeValue=o}catch(v){ze(e,e.return,v)}}break;case 3:if(Hu=null,i=Jn,Jn=sc(t.containerInfo),tn(t,e),Jn=i,nn(e),o&4&&n!==null&&n.memoizedState.isDehydrated)try{vl(t.containerInfo)}catch(v){ze(e,e.return,v)}Hd&&(Hd=!1,Eb(e));break;case 4:o=Jn,Jn=sc(e.stateNode.containerInfo),tn(t,e),nn(e),Jn=o;break;case 12:tn(t,e),nn(e);break;case 31:tn(t,e),nn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,yu(e,o)));break;case 13:tn(t,e),nn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Tc=xn()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,yu(e,o)));break;case 22:i=e.memoizedState!==null;var s=n!==null&&n.memoizedState!==null,u=Go,c=ft;if(Go=u||i,ft=c||s,tn(t,e),ft=c,Go=u,nn(e),o&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||s||Go||ft||Qi(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){s=n=t;try{if(a=s.stateNode,i)l=a.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none";else{r=s.stateNode;var d=s.memoizedProps.style,f=d!=null&&d.hasOwnProperty("display")?d.display:null;r.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(v){ze(s,s.return,v)}}}else if(t.tag===6){if(n===null){s=t;try{s.stateNode.nodeValue=i?"":s.memoizedProps}catch(v){ze(s,s.return,v)}}}else if(t.tag===18){if(n===null){s=t;try{var h=s.stateNode;i?f0(h,!0):f0(s.stateNode,!1)}catch(v){ze(s,s.return,v)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}o&4&&(o=e.updateQueue,o!==null&&(n=o.retryQueue,n!==null&&(o.retryQueue=null,yu(e,n))));break;case 19:tn(t,e),nn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,yu(e,o)));break;case 30:break;case 21:break;default:tn(t,e),nn(e)}}function nn(e){var t=e.flags;if(t&2){try{for(var n,o=e.return;o!==null;){if(hb(o)){n=o;break}o=o.return}if(n==null)throw Error(U(160));switch(n.tag){case 27:var i=n.stateNode,a=Ld(e);ec(e,a,i);break;case 5:var l=n.stateNode;n.flags&32&&(cl(l,""),n.flags&=-33);var r=Ld(e);ec(e,r,l);break;case 3:case 4:var s=n.stateNode.containerInfo,u=Ld(e);_p(e,u,s);break;default:throw Error(U(161))}}catch(c){ze(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Eb(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Eb(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ho(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)yb(e,t.alternate,t),t=t.sibling}function Qi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ri(4,t,t.return),Qi(t);break;case 1:ho(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&pb(t,t.return,n),Qi(t);break;case 27:Br(t.stateNode);case 26:case 5:ho(t,t.return),Qi(t);break;case 22:t.memoizedState===null&&Qi(t);break;case 30:Qi(t);break;default:Qi(t)}e=e.sibling}}function Bo(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,i=e,a=t,l=a.flags;switch(a.tag){case 0:case 11:case 15:Bo(i,a,n),as(4,a);break;case 1:if(Bo(i,a,n),o=a,i=o.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(u){ze(o,o.return,u)}if(o=a,i=o.updateQueue,i!==null){var r=o.stateNode;try{var s=i.shared.hiddenCallbacks;if(s!==null)for(i.shared.hiddenCallbacks=null,i=0;i<s.length;i++)Sv(s[i],r)}catch(u){ze(o,o.return,u)}}n&&l&64&&db(a),Or(a,a.return);break;case 27:gb(a);case 26:case 5:Bo(i,a,n),n&&o===null&&l&4&&mb(a),Or(a,a.return);break;case 12:Bo(i,a,n);break;case 31:Bo(i,a,n),n&&l&4&&Sb(i,a);break;case 13:Bo(i,a,n),n&&l&4&&xb(i,a);break;case 22:a.memoizedState===null&&Bo(i,a,n),Or(a,a.return);break;case 30:break;default:Bo(i,a,n)}t=t.sibling}}function xm(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&os(n))}function _m(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&os(e))}function Wn(e,t,n,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Tb(e,t,n,o),t=t.sibling}function Tb(e,t,n,o){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Wn(e,t,n,o),i&2048&&as(9,t);break;case 1:Wn(e,t,n,o);break;case 3:Wn(e,t,n,o),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&os(e)));break;case 12:if(i&2048){Wn(e,t,n,o),e=t.stateNode;try{var a=t.memoizedProps,l=a.id,r=a.onPostCommit;typeof r=="function"&&r(l,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(s){ze(t,t.return,s)}}else Wn(e,t,n,o);break;case 31:Wn(e,t,n,o);break;case 13:Wn(e,t,n,o);break;case 23:break;case 22:a=t.stateNode,l=t.alternate,t.memoizedState!==null?a._visibility&2?Wn(e,t,n,o):zr(e,t):a._visibility&2?Wn(e,t,n,o):(a._visibility|=2,Ia(e,t,n,o,(t.subtreeFlags&10256)!==0||!1)),i&2048&&xm(l,t);break;case 24:Wn(e,t,n,o),i&2048&&_m(t.alternate,t);break;default:Wn(e,t,n,o)}}function Ia(e,t,n,o,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var a=e,l=t,r=n,s=o,u=l.flags;switch(l.tag){case 0:case 11:case 15:Ia(a,l,r,s,i),as(8,l);break;case 23:break;case 22:var c=l.stateNode;l.memoizedState!==null?c._visibility&2?Ia(a,l,r,s,i):zr(a,l):(c._visibility|=2,Ia(a,l,r,s,i)),i&&u&2048&&xm(l.alternate,l);break;case 24:Ia(a,l,r,s,i),i&&u&2048&&_m(l.alternate,l);break;default:Ia(a,l,r,s,i)}t=t.sibling}}function zr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,o=t,i=o.flags;switch(o.tag){case 22:zr(n,o),i&2048&&xm(o.alternate,o);break;case 24:zr(n,o),i&2048&&_m(o.alternate,o);break;default:zr(n,o)}t=t.sibling}}var Er=8192;function Ua(e,t,n){if(e.subtreeFlags&Er)for(e=e.child;e!==null;)Nb(e,t,n),e=e.sibling}function Nb(e,t,n){switch(e.tag){case 26:Ua(e,t,n),e.flags&Er&&e.memoizedState!==null&&DC(n,Jn,e.memoizedState,e.memoizedProps);break;case 5:Ua(e,t,n);break;case 3:case 4:var o=Jn;Jn=sc(e.stateNode.containerInfo),Ua(e,t,n),Jn=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=Er,Er=16777216,Ua(e,t,n),Er=o):Ua(e,t,n));break;default:Ua(e,t,n)}}function Cb(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function gr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var o=t[n];xt=o,Ab(o,e)}Cb(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)wb(e),e=e.sibling}function wb(e){switch(e.tag){case 0:case 11:case 15:gr(e),e.flags&2048&&Ri(9,e,e.return);break;case 3:gr(e);break;case 12:gr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,zu(e)):gr(e);break;default:gr(e)}}function zu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var o=t[n];xt=o,Ab(o,e)}Cb(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ri(8,t,t.return),zu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,zu(t));break;default:zu(t)}e=e.sibling}}function Ab(e,t){for(;xt!==null;){var n=xt;switch(n.tag){case 0:case 11:case 15:Ri(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var o=n.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:os(n.memoizedState.cache)}if(o=n.child,o!==null)o.return=n,xt=o;else e:for(n=e;xt!==null;){o=xt;var i=o.sibling,a=o.return;if(vb(o),o===n){xt=null;break e}if(i!==null){i.return=a,xt=i;break e}xt=a}}}var jN={getCacheForType:function(e){var t=Rt(dt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Rt(dt).controller.signal}},$N=typeof WeakMap=="function"?WeakMap:Map,De=0,Pe=null,_e=null,Te=0,Oe=0,yn=null,yi=!1,El=!1,Em=!1,Ko=0,tt=0,Oi=0,ta=0,Tm=0,Sn=0,ml=0,Lr=null,an=null,Ep=!1,Tc=0,Mb=0,tc=1/0,nc=null,Ti=null,ht=0,Ni=null,hl=null,Xo=0,Tp=0,Np=null,Db=null,Hr=0,Cp=null;function Tn(){return(De&2)!==0&&Te!==0?Te&-Te:ue.T!==null?Cm():P0()}function Rb(){if(Sn===0)if((Te&536870912)===0||Ce){var e=ru;ru<<=1,(ru&3932160)===0&&(ru=262144),Sn=e}else Sn=536870912;return e=Cn.current,e!==null&&(e.flags|=32),Sn}function ln(e,t,n){(e===Pe&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)&&(gl(e,0),vi(e,Te,Sn,!1)),es(e,n),((De&2)===0||e!==Pe)&&(e===Pe&&((De&2)===0&&(ta|=n),tt===4&&vi(e,Te,Sn,!1)),vo(e))}function Ob(e,t,n){if((De&6)!==0)throw Error(U(327));var o=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Jr(e,t),i=o?FN(e,t):Bd(e,t,!0),a=o;do{if(i===0){El&&!o&&vi(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!KN(n)){i=Bd(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)var l=0;else l=e.pendingLanes&-536870913,l=l!==0?l:l&536870912?536870912:0;if(l!==0){t=l;e:{var r=e;i=Lr;var s=r.current.memoizedState.isDehydrated;if(s&&(gl(r,l).flags|=256),l=Bd(r,l,!1),l!==2){if(Em&&!s){r.errorRecoveryDisabledLanes|=a,ta|=a,i=4;break e}a=an,an=i,a!==null&&(an===null?an=a:an.push.apply(an,a))}i=l}if(a=!1,i!==2)continue}}if(i===1){gl(e,0),vi(e,t,0,!0);break}e:{switch(o=e,a=i,a){case 0:case 1:throw Error(U(345));case 4:if((t&4194048)!==t)break;case 6:vi(o,t,Sn,!yi);break e;case 2:an=null;break;case 3:case 5:break;default:throw Error(U(329))}if((t&62914560)===t&&(i=Tc+300-xn(),10<i)){if(vi(o,t,Sn,!yi),pc(o,0,!0)!==0)break e;Xo=t,o.timeoutHandle=Wb(Qy.bind(null,o,n,an,nc,Ep,t,Sn,ta,ml,yi,a,"Throttled",-0,0),i);break e}Qy(o,n,an,nc,Ep,t,Sn,ta,ml,yi,a,null,-0,0)}}break}while(!0);vo(e)}function Qy(e,t,n,o,i,a,l,r,s,u,c,d,f,h){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)===16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Uo},Nb(t,a,d);var v=(a&62914560)===a?Tc-xn():(a&4194048)===a?Mb-xn():0;if(v=RC(d,v),v!==null){Xo=a,e.cancelPendingCommit=v(Wy.bind(null,e,t,a,n,o,i,l,r,s,c,d,null,f,h)),vi(e,a,l,!u);return}}Wy(e,t,a,n,o,i,l,r,s)}function KN(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var o=0;o<n.length;o++){var i=n[o],a=i.getSnapshot;i=i.value;try{if(!Nn(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function vi(e,t,n,o){t&=~Tm,t&=~ta,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var i=t;0<i;){var a=31-En(i),l=1<<a;o[a]=-1,i&=~l}n!==0&&B0(e,n,t)}function Nc(){return(De&6)===0?(ls(0,!1),!1):!0}function Nm(){if(_e!==null){if(Oe===0)var e=_e.return;else e=_e,Io=fa=null,cm(e),al=null,Yr=0,e=_e;for(;e!==null;)fb(e.alternate,e),e=e.return;_e=null}}function gl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,pC(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Xo=0,Nm(),Pe=e,_e=n=Vo(e.current,null),Te=t,Oe=0,yn=null,yi=!1,El=Jr(e,t),Em=!1,ml=Sn=Tm=ta=Oi=tt=0,an=Lr=null,Ep=!1,(t&8)!==0&&(t|=t&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=t;0<o;){var i=31-En(o),a=1<<i;t|=e[i],o&=~a}return Ko=t,yc(),n}function zb(e,t){he=null,ue.H=qr,t===_l||t===bc?(t=Ay(),Oe=3):t===om?(t=Ay(),Oe=4):Oe=t===bm?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,yn=t,_e===null&&(tt=1,Wu(e,Un(t,e.current)))}function Lb(){var e=Cn.current;return e===null?!0:(Te&4194048)===Te?Vn===null:(Te&62914560)===Te||(Te&536870912)!==0?e===Vn:!1}function Hb(){var e=ue.H;return ue.H=qr,e===null?qr:e}function Bb(){var e=ue.A;return ue.A=jN,e}function oc(){tt=4,yi||(Te&4194048)!==Te&&Cn.current!==null||(El=!0),(Oi&134217727)===0&&(ta&134217727)===0||Pe===null||vi(Pe,Te,Sn,!1)}function Bd(e,t,n){var o=De;De|=2;var i=Hb(),a=Bb();(Pe!==e||Te!==t)&&(nc=null,gl(e,t)),t=!1;var l=tt;e:do try{if(Oe!==0&&_e!==null){var r=_e,s=yn;switch(Oe){case 8:Nm(),l=6;break e;case 3:case 2:case 9:case 6:Cn.current===null&&(t=!0);var u=Oe;if(Oe=0,yn=null,el(e,r,s,u),n&&El){l=0;break e}break;default:u=Oe,Oe=0,yn=null,el(e,r,s,u)}}QN(),l=tt;break}catch(c){zb(e,c)}while(!0);return t&&e.shellSuspendCounter++,Io=fa=null,De=o,ue.H=i,ue.A=a,_e===null&&(Pe=null,Te=0,yc()),l}function QN(){for(;_e!==null;)kb(_e)}function FN(e,t){var n=De;De|=2;var o=Hb(),i=Bb();Pe!==e||Te!==t?(nc=null,tc=xn()+500,gl(e,t)):El=Jr(e,t);e:do try{if(Oe!==0&&_e!==null){t=_e;var a=yn;t:switch(Oe){case 1:Oe=0,yn=null,el(e,t,a,1);break;case 2:case 9:if(wy(a)){Oe=0,yn=null,Fy(t);break}t=function(){Oe!==2&&Oe!==9||Pe!==e||(Oe=7),vo(e)},a.then(t,t);break e;case 3:Oe=7;break e;case 4:Oe=5;break e;case 7:wy(a)?(Oe=0,yn=null,Fy(t)):(Oe=0,yn=null,el(e,t,a,7));break;case 5:var l=null;switch(_e.tag){case 26:l=_e.memoizedState;case 5:case 27:var r=_e;if(l?o1(l):r.stateNode.complete){Oe=0,yn=null;var s=r.sibling;if(s!==null)_e=s;else{var u=r.return;u!==null?(_e=u,Cc(u)):_e=null}break t}}Oe=0,yn=null,el(e,t,a,5);break;case 6:Oe=0,yn=null,el(e,t,a,6);break;case 8:Nm(),tt=6;break e;default:throw Error(U(462))}}WN();break}catch(c){zb(e,c)}while(!0);return Io=fa=null,ue.H=o,ue.A=i,De=n,_e!==null?0:(Pe=null,Te=0,yc(),tt)}function WN(){for(;_e!==null&&!x2();)kb(_e)}function kb(e){var t=cb(e.alternate,e,Ko);e.memoizedProps=e.pendingProps,t===null?Cc(e):_e=t}function Fy(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Xy(n,t,t.pendingProps,t.type,void 0,Te);break;case 11:t=Xy(n,t,t.pendingProps,t.type.render,t.ref,Te);break;case 5:cm(t);default:fb(n,t),t=_e=fv(t,Ko),t=cb(n,t,Ko)}e.memoizedProps=e.pendingProps,t===null?Cc(e):_e=t}function el(e,t,n,o){Io=fa=null,cm(t),al=null,Yr=0;var i=t.return;try{if(UN(e,i,t,n,Te)){tt=1,Wu(e,Un(n,e.current)),_e=null;return}}catch(a){if(i!==null)throw _e=i,a;tt=1,Wu(e,Un(n,e.current)),_e=null;return}t.flags&32768?(Ce||o===1?e=!0:El||(Te&536870912)!==0?e=!1:(yi=e=!0,(o===2||o===9||o===3||o===6)&&(o=Cn.current,o!==null&&o.tag===13&&(o.flags|=16384))),Gb(t,e)):Cc(t)}function Cc(e){var t=e;do{if((t.flags&32768)!==0){Gb(t,yi);return}e=t.return;var n=YN(t.alternate,t,Ko);if(n!==null){_e=n;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);tt===0&&(tt=5)}function Gb(e,t){do{var n=XN(e.alternate,e);if(n!==null){n.flags&=32767,_e=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){_e=e;return}_e=e=n}while(e!==null);tt=6,_e=null}function Wy(e,t,n,o,i,a,l,r,s){e.cancelPendingCommit=null;do wc();while(ht!==0);if((De&6)!==0)throw Error(U(327));if(t!==null){if(t===e.current)throw Error(U(177));if(a=t.lanes|t.childLanes,a|=Qp,R2(e,n,a,l,r,s),e===Pe&&(_e=Pe=null,Te=0),hl=t,Ni=e,Xo=n,Tp=a,Np=i,Db=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,nC(Iu,function(){return Yb(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=ue.T,ue.T=null,i=Re.p,Re.p=2,l=De,De|=4;try{qN(e,t,n)}finally{De=l,Re.p=i,ue.T=o}}ht=1,Pb(),Ub(),Ib()}}function Pb(){if(ht===1){ht=0;var e=Ni,t=hl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=ue.T,ue.T=null;var o=Re.p;Re.p=2;var i=De;De|=4;try{_b(t,e);var a=Dp,l=ov(e.containerInfo),r=a.focusedElem,s=a.selectionRange;if(l!==r&&r&&r.ownerDocument&&nv(r.ownerDocument.documentElement,r)){if(s!==null&&Kp(r)){var u=s.start,c=s.end;if(c===void 0&&(c=u),"selectionStart"in r)r.selectionStart=u,r.selectionEnd=Math.min(c,r.value.length);else{var d=r.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var h=f.getSelection(),v=r.textContent.length,b=Math.min(s.start,v),S=s.end===void 0?b:Math.min(s.end,v);!h.extend&&b>S&&(l=S,S=b,b=l);var p=Sy(r,b),y=Sy(r,S);if(p&&y&&(h.rangeCount!==1||h.anchorNode!==p.node||h.anchorOffset!==p.offset||h.focusNode!==y.node||h.focusOffset!==y.offset)){var m=d.createRange();m.setStart(p.node,p.offset),h.removeAllRanges(),b>S?(h.addRange(m),h.extend(y.node,y.offset)):(m.setEnd(y.node,y.offset),h.addRange(m))}}}}for(d=[],h=r;h=h.parentNode;)h.nodeType===1&&d.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<d.length;r++){var g=d[r];g.element.scrollLeft=g.left,g.element.scrollTop=g.top}}fc=!!Mp,Dp=Mp=null}finally{De=i,Re.p=o,ue.T=n}}e.current=t,ht=2}}function Ub(){if(ht===2){ht=0;var e=Ni,t=hl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=ue.T,ue.T=null;var o=Re.p;Re.p=2;var i=De;De|=4;try{yb(e,t.alternate,t)}finally{De=i,Re.p=o,ue.T=n}}ht=3}}function Ib(){if(ht===4||ht===3){ht=0,_2();var e=Ni,t=hl,n=Xo,o=Db;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ht=5:(ht=0,hl=Ni=null,Vb(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Ti=null),Vp(n),t=t.stateNode,_n&&typeof _n.onCommitFiberRoot=="function")try{_n.onCommitFiberRoot(Wr,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=ue.T,i=Re.p,Re.p=2,ue.T=null;try{for(var a=e.onRecoverableError,l=0;l<o.length;l++){var r=o[l];a(r.value,{componentStack:r.stack})}}finally{ue.T=t,Re.p=i}}(Xo&3)!==0&&wc(),vo(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===Cp?Hr++:(Hr=0,Cp=e):Hr=0,ls(0,!1)}}function Vb(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,os(t)))}function wc(){return Pb(),Ub(),Ib(),Yb()}function Yb(){if(ht!==5)return!1;var e=Ni,t=Tp;Tp=0;var n=Vp(Xo),o=ue.T,i=Re.p;try{Re.p=32>n?32:n,ue.T=null,n=Np,Np=null;var a=Ni,l=Xo;if(ht=0,hl=Ni=null,Xo=0,(De&6)!==0)throw Error(U(331));var r=De;if(De|=4,wb(a.current),Tb(a,a.current,l,n),De=r,ls(0,!1),_n&&typeof _n.onPostCommitFiberRoot=="function")try{_n.onPostCommitFiberRoot(Wr,a)}catch{}return!0}finally{Re.p=i,ue.T=o,Vb(e,t)}}function Jy(e,t,n){t=Un(n,t),t=bp(e.stateNode,t,2),e=Ei(e,t,2),e!==null&&(es(e,2),vo(e))}function ze(e,t,n){if(e.tag===3)Jy(e,e,n);else for(;t!==null;){if(t.tag===3){Jy(t,e,n);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Ti===null||!Ti.has(o))){e=Un(n,e),n=ib(2),o=Ei(t,n,2),o!==null&&(ab(n,o,t,e),es(o,2),vo(o));break}}t=t.return}}function kd(e,t,n){var o=e.pingCache;if(o===null){o=e.pingCache=new $N;var i=new Set;o.set(t,i)}else i=o.get(t),i===void 0&&(i=new Set,o.set(t,i));i.has(n)||(Em=!0,i.add(n),e=JN.bind(null,e,t,n),t.then(e,e))}function JN(e,t,n){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Pe===e&&(Te&n)===n&&(tt===4||tt===3&&(Te&62914560)===Te&&300>xn()-Tc?(De&2)===0&&gl(e,0):Tm|=n,ml===Te&&(ml=0)),vo(e)}function Xb(e,t){t===0&&(t=H0()),e=ca(e,t),e!==null&&(es(e,t),vo(e))}function eC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Xb(e,n)}function tC(e,t){var n=0;switch(e.tag){case 31:case 13:var o=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(U(314))}o!==null&&o.delete(t),Xb(e,n)}function nC(e,t){return Up(e,t)}var ic=null,Va=null,wp=!1,ac=!1,Gd=!1,bi=0;function vo(e){e!==Va&&e.next===null&&(Va===null?ic=Va=e:Va=Va.next=e),ac=!0,wp||(wp=!0,iC())}function ls(e,t){if(!Gd&&ac){Gd=!0;do for(var n=!1,o=ic;o!==null;){if(!t)if(e!==0){var i=o.pendingLanes;if(i===0)var a=0;else{var l=o.suspendedLanes,r=o.pingedLanes;a=(1<<31-En(42|e)+1)-1,a&=i&~(l&~r),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,e0(o,a))}else a=Te,a=pc(o,o===Pe?a:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(a&3)===0||Jr(o,a)||(n=!0,e0(o,a));o=o.next}while(n);Gd=!1}}function oC(){qb()}function qb(){ac=wp=!1;var e=0;bi!==0&&dC()&&(e=bi);for(var t=xn(),n=null,o=ic;o!==null;){var i=o.next,a=Zb(o,t);a===0?(o.next=null,n===null?ic=i:n.next=i,i===null&&(Va=n)):(n=o,(e!==0||(a&3)!==0)&&(ac=!0)),o=i}ht!==0&&ht!==5||ls(e,!1),bi!==0&&(bi=0)}function Zb(e,t){for(var n=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var l=31-En(a),r=1<<l,s=i[l];s===-1?((r&n)===0||(r&o)!==0)&&(i[l]=D2(r,t)):s<=t&&(e.expiredLanes|=r),a&=~r}if(t=Pe,n=Te,n=pc(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,n===0||e===t&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&pd(o),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Jr(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(o!==null&&pd(o),Vp(n)){case 2:case 8:n=z0;break;case 32:n=Iu;break;case 268435456:n=L0;break;default:n=Iu}return o=jb.bind(null,e),n=Up(n,o),e.callbackPriority=t,e.callbackNode=n,t}return o!==null&&o!==null&&pd(o),e.callbackPriority=2,e.callbackNode=null,2}function jb(e,t){if(ht!==0&&ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(wc()&&e.callbackNode!==n)return null;var o=Te;return o=pc(e,e===Pe?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(Ob(e,o,t),Zb(e,xn()),e.callbackNode!=null&&e.callbackNode===n?jb.bind(null,e):null)}function e0(e,t){if(wc())return null;Ob(e,t,!0)}function iC(){mC(function(){(De&6)!==0?Up(O0,oC):qb()})}function Cm(){if(bi===0){var e=fl;e===0&&(e=lu,lu<<=1,(lu&261888)===0&&(lu=256)),bi=e}return bi}function t0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Tu(""+e)}function n0(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function aC(e,t,n,o,i){if(t==="submit"&&n&&n.stateNode===i){var a=t0((i[rn]||null).action),l=o.submitter;l&&(t=(t=l[rn]||null)?t0(t.formAction):l.getAttribute("formAction"),t!==null&&(a=t,l=null));var r=new mc("action","action",null,o,i);e.push({event:r,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(bi!==0){var s=l?n0(i,l):new FormData(i);yp(n,{pending:!0,data:s,method:i.method,action:a},null,s)}}else typeof a=="function"&&(r.preventDefault(),s=l?n0(i,l):new FormData(i),yp(n,{pending:!0,data:s,method:i.method,action:a},a,s))},currentTarget:i}]})}}for(vu=0;vu<ap.length;vu++)bu=ap[vu],o0=bu.toLowerCase(),i0=bu[0].toUpperCase()+bu.slice(1),eo(o0,"on"+i0);var bu,o0,i0,vu;eo(av,"onAnimationEnd");eo(lv,"onAnimationIteration");eo(rv,"onAnimationStart");eo("dblclick","onDoubleClick");eo("focusin","onFocus");eo("focusout","onBlur");eo(EN,"onTransitionRun");eo(TN,"onTransitionStart");eo(NN,"onTransitionCancel");eo(sv,"onTransitionEnd");ul("onMouseEnter",["mouseout","mouseover"]);ul("onMouseLeave",["mouseout","mouseover"]);ul("onPointerEnter",["pointerout","pointerover"]);ul("onPointerLeave",["pointerout","pointerover"]);ra("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ra("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ra("onBeforeInput",["compositionend","keypress","textInput","paste"]);ra("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ra("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ra("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zr="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(" "),lC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Zr));function $b(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var o=e[n],i=o.event;o=o.listeners;e:{var a=void 0;if(t)for(var l=o.length-1;0<=l;l--){var r=o[l],s=r.instance,u=r.currentTarget;if(r=r.listener,s!==a&&i.isPropagationStopped())break e;a=r,i.currentTarget=u;try{a(i)}catch(c){Yu(c)}i.currentTarget=null,a=s}else for(l=0;l<o.length;l++){if(r=o[l],s=r.instance,u=r.currentTarget,r=r.listener,s!==a&&i.isPropagationStopped())break e;a=r,i.currentTarget=u;try{a(i)}catch(c){Yu(c)}i.currentTarget=null,a=s}}}}function xe(e,t){var n=t[Fd];n===void 0&&(n=t[Fd]=new Set);var o=e+"__bubble";n.has(o)||(Kb(t,e,2,!1),n.add(o))}function Pd(e,t,n){var o=0;t&&(o|=4),Kb(n,e,o,t)}var Su="_reactListening"+Math.random().toString(36).slice(2);function wm(e){if(!e[Su]){e[Su]=!0,U0.forEach(function(n){n!=="selectionchange"&&(lC.has(n)||Pd(n,!1,e),Pd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Su]||(t[Su]=!0,Pd("selectionchange",!1,t))}}function Kb(e,t,n,o){switch(s1(t)){case 2:var i=LC;break;case 8:i=HC;break;default:i=Rm}n=i.bind(null,t,n,e),i=void 0,!np||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),o?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Ud(e,t,n,o,i){var a=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var l=o.tag;if(l===3||l===4){var r=o.stateNode.containerInfo;if(r===i)break;if(l===4)for(l=o.return;l!==null;){var s=l.tag;if((s===3||s===4)&&l.stateNode.containerInfo===i)return;l=l.return}for(;r!==null;){if(l=qa(r),l===null)return;if(s=l.tag,s===5||s===6||s===26||s===27){o=a=l;continue e}r=r.parentNode}}o=o.return}$0(function(){var u=a,c=qp(n),d=[];e:{var f=uv.get(e);if(f!==void 0){var h=mc,v=e;switch(e){case"keypress":if(Cu(n)===0)break e;case"keydown":case"keyup":h=tN;break;case"focusin":v="focus",h=vd;break;case"focusout":v="blur",h=vd;break;case"beforeblur":case"afterblur":h=vd;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=fy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Y2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=iN;break;case av:case lv:case rv:h=Z2;break;case sv:h=lN;break;case"scroll":case"scrollend":h=I2;break;case"wheel":h=sN;break;case"copy":case"cut":case"paste":h=$2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=py;break;case"toggle":case"beforetoggle":h=cN}var b=(t&4)!==0,S=!b&&(e==="scroll"||e==="scrollend"),p=b?f!==null?f+"Capture":null:f;b=[];for(var y=u,m;y!==null;){var g=y;if(m=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||m===null||p===null||(g=Gr(y,p),g!=null&&b.push(jr(y,g,m))),S)break;y=y.return}0<b.length&&(f=new h(f,v,null,n,c),d.push({event:f,listeners:b}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==tp&&(v=n.relatedTarget||n.fromElement)&&(qa(v)||v[bl]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(v=n.relatedTarget||n.toElement,h=u,v=v?qa(v):null,v!==null&&(S=Fr(v),b=v.tag,v!==S||b!==5&&b!==27&&b!==6)&&(v=null)):(h=null,v=u),h!==v)){if(b=fy,g="onMouseLeave",p="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(b=py,g="onPointerLeave",p="onPointerEnter",y="pointer"),S=h==null?f:xr(h),m=v==null?f:xr(v),f=new b(g,y+"leave",h,n,c),f.target=S,f.relatedTarget=m,g=null,qa(c)===u&&(b=new b(p,y+"enter",v,n,c),b.target=m,b.relatedTarget=S,g=b),S=g,h&&v)t:{for(b=rC,p=h,y=v,m=0,g=p;g;g=b(g))m++;g=0;for(var x=y;x;x=b(x))g++;for(;0<m-g;)p=b(p),m--;for(;0<g-m;)y=b(y),g--;for(;m--;){if(p===y||y!==null&&p===y.alternate){b=p;break t}p=b(p),y=b(y)}b=null}else b=null;h!==null&&a0(d,f,h,b,!1),v!==null&&S!==null&&a0(d,S,v,b,!0)}}e:{if(f=u?xr(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var _=yy;else if(gy(f))if(ev)_=SN;else{_=vN;var E=yN}else h=f.nodeName,!h||h.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?u&&Xp(u.elementType)&&(_=yy):_=bN;if(_&&(_=_(e,u))){J0(d,_,n,c);break e}E&&E(e,f,u),e==="focusout"&&u&&f.type==="number"&&u.memoizedProps.value!=null&&ep(f,"number",f.value)}switch(E=u?xr(u):window,e){case"focusin":(gy(E)||E.contentEditable==="true")&&($a=E,op=u,Cr=null);break;case"focusout":Cr=op=$a=null;break;case"mousedown":ip=!0;break;case"contextmenu":case"mouseup":case"dragend":ip=!1,xy(d,n,c);break;case"selectionchange":if(_N)break;case"keydown":case"keyup":xy(d,n,c)}var w;if($p)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else ja?F0(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(Q0&&n.locale!=="ko"&&(ja||N!=="onCompositionStart"?N==="onCompositionEnd"&&ja&&(w=K0()):(gi=c,Zp="value"in gi?gi.value:gi.textContent,ja=!0)),E=lc(u,N),0<E.length&&(N=new dy(N,e,null,n,c),d.push({event:N,listeners:E}),w?N.data=w:(w=W0(n),w!==null&&(N.data=w)))),(w=dN?pN(e,n):mN(e,n))&&(N=lc(u,"onBeforeInput"),0<N.length&&(E=new dy("onBeforeInput","beforeinput",null,n,c),d.push({event:E,listeners:N}),E.data=w)),aC(d,e,u,n,c)}$b(d,t)})}function jr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function lc(e,t){for(var n=t+"Capture",o=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Gr(e,n),i!=null&&o.unshift(jr(e,i,a)),i=Gr(e,t),i!=null&&o.push(jr(e,i,a))),e.tag===3)return o;e=e.return}return[]}function rC(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function a0(e,t,n,o,i){for(var a=t._reactName,l=[];n!==null&&n!==o;){var r=n,s=r.alternate,u=r.stateNode;if(r=r.tag,s!==null&&s===o)break;r!==5&&r!==26&&r!==27||u===null||(s=u,i?(u=Gr(n,a),u!=null&&l.unshift(jr(n,u,s))):i||(u=Gr(n,a),u!=null&&l.push(jr(n,u,s)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var sC=/\r\n?/g,uC=/\u0000|\uFFFD/g;function l0(e){return(typeof e=="string"?e:""+e).replace(sC,`
|
|
2467
|
-
`).replace(uC,"")}function Qb(e,t){return t=l0(t),l0(e)===t}function He(e,t,n,o,i,a){switch(n){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||cl(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&cl(e,""+o);break;case"className":uu(e,"class",o);break;case"tabIndex":uu(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":uu(e,n,o);break;case"style":j0(e,o,a);break;case"data":if(t!=="object"){uu(e,"data",o);break}case"src":case"href":if(o===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(n);break}o=Tu(""+o),e.setAttribute(n,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(n,"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 a=="function"&&(n==="formAction"?(t!=="input"&&He(e,t,"name",i.name,i,null),He(e,t,"formEncType",i.formEncType,i,null),He(e,t,"formMethod",i.formMethod,i,null),He(e,t,"formTarget",i.formTarget,i,null)):(He(e,t,"encType",i.encType,i,null),He(e,t,"method",i.method,i,null),He(e,t,"target",i.target,i,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(n);break}o=Tu(""+o),e.setAttribute(n,o);break;case"onClick":o!=null&&(e.onclick=Uo);break;case"onScroll":o!=null&&xe("scroll",e);break;case"onScrollEnd":o!=null&&xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(U(61));if(n=o.__html,n!=null){if(i.children!=null)throw Error(U(60));e.innerHTML=n}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}n=Tu(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,""+o):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":o===!0?e.setAttribute(n,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,o):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(n,o):e.removeAttribute(n);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(n):e.setAttribute(n,o);break;case"popover":xe("beforetoggle",e),xe("toggle",e),Eu(e,"popover",o);break;case"xlinkActuate":Oo(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Oo(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Oo(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Oo(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Oo(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Oo(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Oo(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Oo(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Oo(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Eu(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=P2.get(n)||n,Eu(e,n,o))}}function Ap(e,t,n,o,i,a){switch(n){case"style":j0(e,o,a);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(U(61));if(n=o.__html,n!=null){if(i.children!=null)throw Error(U(60));e.innerHTML=n}}break;case"children":typeof o=="string"?cl(e,o):(typeof o=="number"||typeof o=="bigint")&&cl(e,""+o);break;case"onScroll":o!=null&&xe("scroll",e);break;case"onScrollEnd":o!=null&&xe("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Uo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!I0.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),a=e[rn]||null,a=a!=null?a[n]:null,typeof a=="function"&&e.removeEventListener(t,a,i),typeof o=="function")){typeof a!="function"&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,o,i);break e}n in e?e[n]=o:o===!0?e.setAttribute(n,""):Eu(e,n,o)}}}function Ot(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",e),xe("load",e);var o=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var l=n[a];if(l!=null)switch(a){case"src":o=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(U(137,t));default:He(e,t,a,l,n,null)}}i&&He(e,t,"srcSet",n.srcSet,n,null),o&&He(e,t,"src",n.src,n,null);return;case"input":xe("invalid",e);var r=a=l=i=null,s=null,u=null;for(o in n)if(n.hasOwnProperty(o)){var c=n[o];if(c!=null)switch(o){case"name":i=c;break;case"type":l=c;break;case"checked":s=c;break;case"defaultChecked":u=c;break;case"value":a=c;break;case"defaultValue":r=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(U(137,t));break;default:He(e,t,o,c,n,null)}}X0(e,a,r,s,u,l,i,!1);return;case"select":xe("invalid",e),o=l=a=null;for(i in n)if(n.hasOwnProperty(i)&&(r=n[i],r!=null))switch(i){case"value":a=r;break;case"defaultValue":l=r;break;case"multiple":o=r;default:He(e,t,i,r,n,null)}t=a,n=l,e.multiple=!!o,t!=null?nl(e,!!o,t,!1):n!=null&&nl(e,!!o,n,!0);return;case"textarea":xe("invalid",e),a=i=o=null;for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case"value":o=r;break;case"defaultValue":i=r;break;case"children":a=r;break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(U(91));break;default:He(e,t,l,r,n,null)}Z0(e,o,i,a);return;case"option":for(s in n)n.hasOwnProperty(s)&&(o=n[s],o!=null)&&(s==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":He(e,t,s,o,n,null));return;case"dialog":xe("beforetoggle",e),xe("toggle",e),xe("cancel",e),xe("close",e);break;case"iframe":case"object":xe("load",e);break;case"video":case"audio":for(o=0;o<Zr.length;o++)xe(Zr[o],e);break;case"image":xe("error",e),xe("load",e);break;case"details":xe("toggle",e);break;case"embed":case"source":case"link":xe("error",e),xe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(o=n[u],o!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(U(137,t));default:He(e,t,u,o,n,null)}return;default:if(Xp(t)){for(c in n)n.hasOwnProperty(c)&&(o=n[c],o!==void 0&&Ap(e,t,c,o,n,void 0));return}}for(r in n)n.hasOwnProperty(r)&&(o=n[r],o!=null&&He(e,t,r,o,n,null))}function cC(e,t,n,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,a=null,l=null,r=null,s=null,u=null,c=null;for(h in n){var d=n[h];if(n.hasOwnProperty(h)&&d!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":s=d;default:o.hasOwnProperty(h)||He(e,t,h,null,o,d)}}for(var f in o){var h=o[f];if(d=n[f],o.hasOwnProperty(f)&&(h!=null||d!=null))switch(f){case"type":a=h;break;case"name":i=h;break;case"checked":u=h;break;case"defaultChecked":c=h;break;case"value":l=h;break;case"defaultValue":r=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(U(137,t));break;default:h!==d&&He(e,t,f,h,o,d)}}Jd(e,l,r,s,u,c,a,i);return;case"select":h=l=r=f=null;for(a in n)if(s=n[a],n.hasOwnProperty(a)&&s!=null)switch(a){case"value":break;case"multiple":h=s;default:o.hasOwnProperty(a)||He(e,t,a,null,o,s)}for(i in o)if(a=o[i],s=n[i],o.hasOwnProperty(i)&&(a!=null||s!=null))switch(i){case"value":f=a;break;case"defaultValue":r=a;break;case"multiple":l=a;default:a!==s&&He(e,t,i,a,o,s)}t=r,n=l,o=h,f!=null?nl(e,!!n,f,!1):!!o!=!!n&&(t!=null?nl(e,!!n,t,!0):nl(e,!!n,n?[]:"",!1));return;case"textarea":h=f=null;for(r in n)if(i=n[r],n.hasOwnProperty(r)&&i!=null&&!o.hasOwnProperty(r))switch(r){case"value":break;case"children":break;default:He(e,t,r,null,o,i)}for(l in o)if(i=o[l],a=n[l],o.hasOwnProperty(l)&&(i!=null||a!=null))switch(l){case"value":f=i;break;case"defaultValue":h=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(U(91));break;default:i!==a&&He(e,t,l,i,o,a)}q0(e,f,h);return;case"option":for(var v in n)f=n[v],n.hasOwnProperty(v)&&f!=null&&!o.hasOwnProperty(v)&&(v==="selected"?e.selected=!1:He(e,t,v,null,o,f));for(s in o)f=o[s],h=n[s],o.hasOwnProperty(s)&&f!==h&&(f!=null||h!=null)&&(s==="selected"?e.selected=f&&typeof f!="function"&&typeof f!="symbol":He(e,t,s,f,o,h));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 b in n)f=n[b],n.hasOwnProperty(b)&&f!=null&&!o.hasOwnProperty(b)&&He(e,t,b,null,o,f);for(u in o)if(f=o[u],h=n[u],o.hasOwnProperty(u)&&f!==h&&(f!=null||h!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(U(137,t));break;default:He(e,t,u,f,o,h)}return;default:if(Xp(t)){for(var S in n)f=n[S],n.hasOwnProperty(S)&&f!==void 0&&!o.hasOwnProperty(S)&&Ap(e,t,S,void 0,o,f);for(c in o)f=o[c],h=n[c],!o.hasOwnProperty(c)||f===h||f===void 0&&h===void 0||Ap(e,t,c,f,o,h);return}}for(var p in n)f=n[p],n.hasOwnProperty(p)&&f!=null&&!o.hasOwnProperty(p)&&He(e,t,p,null,o,f);for(d in o)f=o[d],h=n[d],!o.hasOwnProperty(d)||f===h||f==null&&h==null||He(e,t,d,f,o,h)}function r0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function fC(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),o=0;o<n.length;o++){var i=n[o],a=i.transferSize,l=i.initiatorType,r=i.duration;if(a&&r&&r0(l)){for(l=0,r=i.responseEnd,o+=1;o<n.length;o++){var s=n[o],u=s.startTime;if(u>r)break;var c=s.transferSize,d=s.initiatorType;c&&r0(d)&&(s=s.responseEnd,l+=c*(s<r?1:(r-u)/(s-u)))}if(--o,t+=8*(a+l)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Mp=null,Dp=null;function rc(e){return e.nodeType===9?e:e.ownerDocument}function s0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Fb(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Rp(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Id=null;function dC(){var e=window.event;return e&&e.type==="popstate"?e===Id?!1:(Id=e,!0):(Id=null,!1)}var Wb=typeof setTimeout=="function"?setTimeout:void 0,pC=typeof clearTimeout=="function"?clearTimeout:void 0,u0=typeof Promise=="function"?Promise:void 0,mC=typeof queueMicrotask=="function"?queueMicrotask:typeof u0<"u"?function(e){return u0.resolve(null).then(e).catch(hC)}:Wb;function hC(e){setTimeout(function(){throw e})}function Li(e){return e==="head"}function c0(e,t){var n=t,o=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(o===0){e.removeChild(i),vl(t);return}o--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")o++;else if(n==="html")Br(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Br(n);for(var a=n.firstChild;a;){var l=a.nextSibling,r=a.nodeName;a[ts]||r==="SCRIPT"||r==="STYLE"||r==="LINK"&&a.rel.toLowerCase()==="stylesheet"||n.removeChild(a),a=l}}else n==="body"&&Br(e.ownerDocument.body);n=i}while(n);vl(t)}function f0(e,t){var n=e;e=0;do{var o=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=o}while(n)}function Op(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Op(n),Yp(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function gC(e,t,n,o){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[ts])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(a=e.getAttribute("rel"),a==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(a!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(a=e.getAttribute("src"),(a!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var a=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===a)return e}else return e;if(e=Yn(e.nextSibling),e===null)break}return null}function yC(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Yn(e.nextSibling),e===null))return null;return e}function Jb(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Yn(e.nextSibling),e===null))return null;return e}function zp(e){return e.data==="$?"||e.data==="$~"}function Lp(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function vC(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var o=function(){t(),n.removeEventListener("DOMContentLoaded",o)};n.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Yn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Hp=null;function d0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Yn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function p0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function e1(e,t,n){switch(t=rc(n),e){case"html":if(e=t.documentElement,!e)throw Error(U(452));return e;case"head":if(e=t.head,!e)throw Error(U(453));return e;case"body":if(e=t.body,!e)throw Error(U(454));return e;default:throw Error(U(451))}}function Br(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Yp(e)}var Xn=new Map,m0=new Set;function sc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Qo=Re.d;Re.d={f:bC,r:SC,D:xC,C:_C,L:EC,m:TC,X:CC,S:NC,M:wC};function bC(){var e=Qo.f(),t=Nc();return e||t}function SC(e){var t=Sl(e);t!==null&&t.tag===5&&t.type==="form"?jv(t):Qo.r(e)}var Tl=typeof document>"u"?null:document;function t1(e,t,n){var o=Tl;if(o&&typeof t=="string"&&t){var i=Pn(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),m0.has(i)||(m0.add(i),e={rel:e,crossOrigin:n,href:t},o.querySelector(i)===null&&(t=o.createElement("link"),Ot(t,"link",e),_t(t),o.head.appendChild(t)))}}function xC(e){Qo.D(e),t1("dns-prefetch",e,null)}function _C(e,t){Qo.C(e,t),t1("preconnect",e,t)}function EC(e,t,n){Qo.L(e,t,n);var o=Tl;if(o&&e&&t){var i='link[rel="preload"][as="'+Pn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Pn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Pn(n.imageSizes)+'"]')):i+='[href="'+Pn(e)+'"]';var a=i;switch(t){case"style":a=yl(e);break;case"script":a=Nl(e)}Xn.has(a)||(e=Ze({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Xn.set(a,e),o.querySelector(i)!==null||t==="style"&&o.querySelector(rs(a))||t==="script"&&o.querySelector(ss(a))||(t=o.createElement("link"),Ot(t,"link",e),_t(t),o.head.appendChild(t)))}}function TC(e,t){Qo.m(e,t);var n=Tl;if(n&&e){var o=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Pn(o)+'"][href="'+Pn(e)+'"]',a=i;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=Nl(e)}if(!Xn.has(a)&&(e=Ze({rel:"modulepreload",href:e},t),Xn.set(a,e),n.querySelector(i)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ss(a)))return}o=n.createElement("link"),Ot(o,"link",e),_t(o),n.head.appendChild(o)}}}function NC(e,t,n){Qo.S(e,t,n);var o=Tl;if(o&&e){var i=tl(o).hoistableStyles,a=yl(e);t=t||"default";var l=i.get(a);if(!l){var r={loading:0,preload:null};if(l=o.querySelector(rs(a)))r.loading=5;else{e=Ze({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Xn.get(a))&&Am(e,n);var s=l=o.createElement("link");_t(s),Ot(s,"link",e),s._p=new Promise(function(u,c){s.onload=u,s.onerror=c}),s.addEventListener("load",function(){r.loading|=1}),s.addEventListener("error",function(){r.loading|=2}),r.loading|=4,Lu(l,t,o)}l={type:"stylesheet",instance:l,count:1,state:r},i.set(a,l)}}}function CC(e,t){Qo.X(e,t);var n=Tl;if(n&&e){var o=tl(n).hoistableScripts,i=Nl(e),a=o.get(i);a||(a=n.querySelector(ss(i)),a||(e=Ze({src:e,async:!0},t),(t=Xn.get(i))&&Mm(e,t),a=n.createElement("script"),_t(a),Ot(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},o.set(i,a))}}function wC(e,t){Qo.M(e,t);var n=Tl;if(n&&e){var o=tl(n).hoistableScripts,i=Nl(e),a=o.get(i);a||(a=n.querySelector(ss(i)),a||(e=Ze({src:e,async:!0,type:"module"},t),(t=Xn.get(i))&&Mm(e,t),a=n.createElement("script"),_t(a),Ot(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},o.set(i,a))}}function h0(e,t,n,o){var i=(i=Si.current)?sc(i):null;if(!i)throw Error(U(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=yl(n.href),n=tl(i).hoistableStyles,o=n.get(t),o||(o={type:"style",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=yl(n.href);var a=tl(i).hoistableStyles,l=a.get(e);if(l||(i=i.ownerDocument||i,l={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,l),(a=i.querySelector(rs(e)))&&!a._p&&(l.instance=a,l.state.loading=5),Xn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Xn.set(e,n),a||AC(i,e,n,l.state))),t&&o===null)throw Error(U(528,""));return l}if(t&&o!==null)throw Error(U(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Nl(n),n=tl(i).hoistableScripts,o=n.get(t),o||(o={type:"script",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(U(444,e))}}function yl(e){return'href="'+Pn(e)+'"'}function rs(e){return'link[rel="stylesheet"]['+e+"]"}function n1(e){return Ze({},e,{"data-precedence":e.precedence,precedence:null})}function AC(e,t,n,o){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?o.loading=1:(t=e.createElement("link"),o.preload=t,t.addEventListener("load",function(){return o.loading|=1}),t.addEventListener("error",function(){return o.loading|=2}),Ot(t,"link",n),_t(t),e.head.appendChild(t))}function Nl(e){return'[src="'+Pn(e)+'"]'}function ss(e){return"script[async]"+e}function g0(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+Pn(n.href)+'"]');if(o)return t.instance=o,_t(o),o;var i=Ze({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),_t(o),Ot(o,"style",i),Lu(o,n.precedence,e),t.instance=o;case"stylesheet":i=yl(n.href);var a=e.querySelector(rs(i));if(a)return t.state.loading|=4,t.instance=a,_t(a),a;o=n1(n),(i=Xn.get(i))&&Am(o,i),a=(e.ownerDocument||e).createElement("link"),_t(a);var l=a;return l._p=new Promise(function(r,s){l.onload=r,l.onerror=s}),Ot(a,"link",o),t.state.loading|=4,Lu(a,n.precedence,e),t.instance=a;case"script":return a=Nl(n.src),(i=e.querySelector(ss(a)))?(t.instance=i,_t(i),i):(o=n,(i=Xn.get(a))&&(o=Ze({},n),Mm(o,i)),e=e.ownerDocument||e,i=e.createElement("script"),_t(i),Ot(i,"link",o),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(U(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,Lu(o,n.precedence,e));return t.instance}function Lu(e,t,n){for(var o=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=o.length?o[o.length-1]:null,a=i,l=0;l<o.length;l++){var r=o[l];if(r.dataset.precedence===t)a=r;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Am(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Mm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Hu=null;function y0(e,t,n){if(Hu===null){var o=new Map,i=Hu=new Map;i.set(n,o)}else i=Hu,o=i.get(n),o||(o=new Map,i.set(n,o));if(o.has(e))return o;for(o.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[ts]||a[Mt]||e==="link"&&a.getAttribute("rel")==="stylesheet")&&a.namespaceURI!=="http://www.w3.org/2000/svg"){var l=a.getAttribute(t)||"";l=e+l;var r=o.get(l);r?r.push(a):o.set(l,[a])}}return o}function v0(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function MC(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function o1(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function DC(e,t,n,o){if(n.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=yl(o.href),a=t.querySelector(rs(i));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=uc.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,_t(a);return}a=t.ownerDocument||t,o=n1(o),(i=Xn.get(i))&&Am(o,i),a=a.createElement("link"),_t(a);var l=a;l._p=new Promise(function(r,s){l.onload=r,l.onerror=s}),Ot(a,"link",o),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=uc.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Vd=0;function RC(e,t){return e.stylesheets&&e.count===0&&Bu(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var o=setTimeout(function(){if(e.stylesheets&&Bu(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&Vd===0&&(Vd=62500*fC());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Bu(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>Vd?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(i)}}:null}function uc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Bu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var cc=null;function Bu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,cc=new Map,t.forEach(OC,e),cc=null,uc.call(e))}function OC(e,t){if(!(t.state.loading&4)){var n=cc.get(e);if(n)var o=n.get(null);else{n=new Map,cc.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<i.length;a++){var l=i[a];(l.nodeName==="LINK"||l.getAttribute("media")!=="not all")&&(n.set(l.dataset.precedence,l),o=l)}o&&n.set(null,o)}i=t.instance,l=i.getAttribute("data-precedence"),a=n.get(l)||o,a===o&&n.set(null,i),n.set(l,i),this.count++,o=uc.bind(this),i.addEventListener("load",o),i.addEventListener("error",o),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var $r={$$typeof:Po,Provider:null,Consumer:null,_currentValue:Fi,_currentValue2:Fi,_threadCount:0};function zC(e,t,n,o,i,a,l,r,s){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=md(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=md(0),this.hiddenUpdates=md(null),this.identifierPrefix=o,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=l,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function i1(e,t,n,o,i,a,l,r,s,u,c,d){return e=new zC(e,t,n,l,s,u,c,d,r),t=1,a===!0&&(t|=24),a=bn(3,null,null,t),e.current=a,a.stateNode=e,t=tm(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:o,isDehydrated:n,cache:t},im(a),e}function a1(e){return e?(e=Fa,e):Fa}function l1(e,t,n,o,i,a){i=a1(i),o.context===null?o.context=i:o.pendingContext=i,o=_i(t),o.payload={element:n},a=a===void 0?null:a,a!==null&&(o.callback=a),n=Ei(e,o,t),n!==null&&(ln(n,e,t),Ar(n,e,t))}function b0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Dm(e,t){b0(e,t),(e=e.alternate)&&b0(e,t)}function r1(e){if(e.tag===13||e.tag===31){var t=ca(e,67108864);t!==null&&ln(t,e,67108864),Dm(e,67108864)}}function S0(e){if(e.tag===13||e.tag===31){var t=Tn();t=Ip(t);var n=ca(e,t);n!==null&&ln(n,e,t),Dm(e,t)}}var fc=!0;function LC(e,t,n,o){var i=ue.T;ue.T=null;var a=Re.p;try{Re.p=2,Rm(e,t,n,o)}finally{Re.p=a,ue.T=i}}function HC(e,t,n,o){var i=ue.T;ue.T=null;var a=Re.p;try{Re.p=8,Rm(e,t,n,o)}finally{Re.p=a,ue.T=i}}function Rm(e,t,n,o){if(fc){var i=Bp(o);if(i===null)Ud(e,t,o,dc,n),x0(e,o);else if(kC(i,e,t,n,o))o.stopPropagation();else if(x0(e,o),t&4&&-1<BC.indexOf(e)){for(;i!==null;){var a=Sl(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var l=$i(a.pendingLanes);if(l!==0){var r=a;for(r.pendingLanes|=2,r.entangledLanes|=2;l;){var s=1<<31-En(l);r.entanglements[1]|=s,l&=~s}vo(a),(De&6)===0&&(tc=xn()+500,ls(0,!1))}}break;case 31:case 13:r=ca(a,2),r!==null&&ln(r,a,2),Nc(),Dm(a,2)}if(a=Bp(o),a===null&&Ud(e,t,o,dc,n),a===i)break;i=a}i!==null&&o.stopPropagation()}else Ud(e,t,o,null,n)}}function Bp(e){return e=qp(e),Om(e)}var dc=null;function Om(e){if(dc=null,e=qa(e),e!==null){var t=Fr(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=w0(t),e!==null)return e;e=null}else if(n===31){if(e=A0(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return dc=e,null}function s1(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(E2()){case O0:return 2;case z0:return 8;case Iu:case T2:return 32;case L0:return 268435456;default:return 32}default:return 32}}var kp=!1,Ci=null,wi=null,Ai=null,Kr=new Map,Qr=new Map,mi=[],BC="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 x0(e,t){switch(e){case"focusin":case"focusout":Ci=null;break;case"dragenter":case"dragleave":wi=null;break;case"mouseover":case"mouseout":Ai=null;break;case"pointerover":case"pointerout":Kr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qr.delete(t.pointerId)}}function yr(e,t,n,o,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:o,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Sl(t),t!==null&&r1(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function kC(e,t,n,o,i){switch(t){case"focusin":return Ci=yr(Ci,e,t,n,o,i),!0;case"dragenter":return wi=yr(wi,e,t,n,o,i),!0;case"mouseover":return Ai=yr(Ai,e,t,n,o,i),!0;case"pointerover":var a=i.pointerId;return Kr.set(a,yr(Kr.get(a)||null,e,t,n,o,i)),!0;case"gotpointercapture":return a=i.pointerId,Qr.set(a,yr(Qr.get(a)||null,e,t,n,o,i)),!0}return!1}function u1(e){var t=qa(e.target);if(t!==null){var n=Fr(t);if(n!==null){if(t=n.tag,t===13){if(t=w0(n),t!==null){e.blockedOn=t,iy(e.priority,function(){S0(n)});return}}else if(t===31){if(t=A0(n),t!==null){e.blockedOn=t,iy(e.priority,function(){S0(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ku(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Bp(e.nativeEvent);if(n===null){n=e.nativeEvent;var o=new n.constructor(n.type,n);tp=o,n.target.dispatchEvent(o),tp=null}else return t=Sl(n),t!==null&&r1(t),e.blockedOn=n,!1;t.shift()}return!0}function _0(e,t,n){ku(e)&&n.delete(t)}function GC(){kp=!1,Ci!==null&&ku(Ci)&&(Ci=null),wi!==null&&ku(wi)&&(wi=null),Ai!==null&&ku(Ai)&&(Ai=null),Kr.forEach(_0),Qr.forEach(_0)}function xu(e,t){e.blockedOn===t&&(e.blockedOn=null,kp||(kp=!0,gt.unstable_scheduleCallback(gt.unstable_NormalPriority,GC)))}var _u=null;function E0(e){_u!==e&&(_u=e,gt.unstable_scheduleCallback(gt.unstable_NormalPriority,function(){_u===e&&(_u=null);for(var t=0;t<e.length;t+=3){var n=e[t],o=e[t+1],i=e[t+2];if(typeof o!="function"){if(Om(o||n)===null)continue;break}var a=Sl(n);a!==null&&(e.splice(t,3),t-=3,yp(a,{pending:!0,data:i,method:n.method,action:o},o,i))}}))}function vl(e){function t(s){return xu(s,e)}Ci!==null&&xu(Ci,e),wi!==null&&xu(wi,e),Ai!==null&&xu(Ai,e),Kr.forEach(t),Qr.forEach(t);for(var n=0;n<mi.length;n++){var o=mi[n];o.blockedOn===e&&(o.blockedOn=null)}for(;0<mi.length&&(n=mi[0],n.blockedOn===null);)u1(n),n.blockedOn===null&&mi.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(o=0;o<n.length;o+=3){var i=n[o],a=n[o+1],l=i[rn]||null;if(typeof a=="function")l||E0(n);else if(l){var r=null;if(a&&a.hasAttribute("formAction")){if(i=a,l=a[rn]||null)r=l.formAction;else if(Om(i)!==null)continue}else r=l.action;typeof r=="function"?n[o+1]=r:(n.splice(o,3),o-=3),E0(n)}}}function c1(){function e(a){a.canIntercept&&a.info==="react-transition"&&a.intercept({handler:function(){return new Promise(function(l){return i=l})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),o||setTimeout(n,20)}function n(){if(!o&&!navigation.transition){var a=navigation.currentEntry;a&&a.url!=null&&navigation.navigate(a.url,{state:a.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function zm(e){this._internalRoot=e}Ac.prototype.render=zm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));var n=t.current,o=Tn();l1(n,o,e,t,null,null)};Ac.prototype.unmount=zm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;l1(e.current,2,null,e,null,null),Nc(),t[bl]=null}};function Ac(e){this._internalRoot=e}Ac.prototype.unstable_scheduleHydration=function(e){if(e){var t=P0();e={blockedOn:null,target:e,priority:t};for(var n=0;n<mi.length&&t!==0&&t<mi[n].priority;n++);mi.splice(n,0,e),n===0&&u1(e)}};var T0=N0.version;if(T0!=="19.2.4")throw Error(U(527,T0,"19.2.4"));Re.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=g2(t),e=e!==null?M0(e):null,e=e===null?null:e.stateNode,e};var PC={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:ue,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(vr=__REACT_DEVTOOLS_GLOBAL_HOOK__,!vr.isDisabled&&vr.supportsFiber))try{Wr=vr.inject(PC),_n=vr}catch{}var vr;Mc.createRoot=function(e,t){if(!C0(e))throw Error(U(299));var n=!1,o="",i=tb,a=nb,l=ob;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=i1(e,1,!1,null,null,n,o,null,i,a,l,c1),e[bl]=t.current,wm(e),new zm(t)};Mc.hydrateRoot=function(e,t,n){if(!C0(e))throw Error(U(299));var o=!1,i="",a=tb,l=nb,r=ob,s=null;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(a=n.onUncaughtError),n.onCaughtError!==void 0&&(l=n.onCaughtError),n.onRecoverableError!==void 0&&(r=n.onRecoverableError),n.formState!==void 0&&(s=n.formState)),t=i1(e,1,!0,t,n??null,o,i,s,a,l,r,c1),t.context=a1(null),n=t.current,o=Tn(),o=Ip(o),i=_i(o),i.callback=null,Ei(n,i,o),n=o,t.current.lanes=n,es(t,n),vo(t),e[bl]=t.current,wm(e),new Ac(t)};Mc.version="19.2.4"});var m1=en((Dz,p1)=>{"use strict";function d1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(d1)}catch(e){console.error(e)}}d1(),p1.exports=f1()});var T1=en(Hc=>{"use strict";var YC=Symbol.for("react.transitional.element"),XC=Symbol.for("react.fragment");function E1(e,t,n){var o=null;if(n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),"key"in t){n={};for(var i in t)i!=="key"&&(n[i]=t[i])}else n=t;return t=n.ref,{$$typeof:YC,type:e,key:o,ref:t!==void 0?t:null,props:n}}Hc.Fragment=XC;Hc.jsx=E1;Hc.jsxs=E1});var ge=en((Hz,N1)=>{"use strict";N1.exports=T1()});var s_=en(r_=>{"use strict";var ql=wt();function PM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var UM=typeof Object.is=="function"?Object.is:PM,IM=ql.useState,VM=ql.useEffect,YM=ql.useLayoutEffect,XM=ql.useDebugValue;function qM(e,t){var n=t(),o=IM({inst:{value:n,getSnapshot:t}}),i=o[0].inst,a=o[1];return YM(function(){i.value=n,i.getSnapshot=t,Eh(i)&&a({inst:i})},[e,n,t]),VM(function(){return Eh(i)&&a({inst:i}),e(function(){Eh(i)&&a({inst:i})})},[e]),XM(n),n}function Eh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!UM(e,n)}catch{return!0}}function ZM(e,t){return t()}var jM=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?ZM:qM;r_.useSyncExternalStore=ql.useSyncExternalStore!==void 0?ql.useSyncExternalStore:jM});var c_=en((AH,u_)=>{"use strict";u_.exports=s_()});var d_=en(f_=>{"use strict";var wf=wt(),$M=c_();function KM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var QM=typeof Object.is=="function"?Object.is:KM,FM=$M.useSyncExternalStore,WM=wf.useRef,JM=wf.useEffect,eD=wf.useMemo,tD=wf.useDebugValue;f_.useSyncExternalStoreWithSelector=function(e,t,n,o,i){var a=WM(null);if(a.current===null){var l={hasValue:!1,value:null};a.current=l}else l=a.current;a=eD(function(){function s(h){if(!u){if(u=!0,c=h,h=o(h),i!==void 0&&l.hasValue){var v=l.value;if(i(v,h))return d=v}return d=h}if(v=d,QM(c,h))return v;var b=o(h);return i!==void 0&&i(v,b)?(c=h,v):(c=h,d=b)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return s(t())},f===null?void 0:function(){return s(f())}]},[t,n,o,i]);var r=FM(e,a[0],a[1]);return JM(function(){l.hasValue=!0,l.value=r},[r]),tD(r),r}});var m_=en((DH,p_)=>{"use strict";p_.exports=d_()});var Oa=oe(wt(),1),MT=oe(m1(),1);var UC={PipeLLM:!0,PipeExtract:!0,PipeCompose:!0,PipeImgGen:!0,PipeSearch:!0,PipeFunc:!0,PipeSignature:!0,PipeSequence:!0,PipeParallel:!0,PipeCondition:!0,PipeBatch:!0},h1=new Set(Object.keys(UC)),Cl="pipeCard",g1="default",y1="controllerGroup",Lm="stuff_";function Hi(e){return Lm+e}function wl(e){return e.startsWith(Lm)}function us(e){return e.slice(Lm.length)}var wn={TB:"TB",BT:"BT",LR:"LR",RL:"RL"},Dc={DEFAULT:"default",STEP:"step",STRAIGHT:"straight",SMOOTH_STEP:"smoothstep"},to={FOLDED:"folded",EXPANDED:"expanded",AUTO:"auto"},da={DARK:"dark",LIGHT:"light"},yt={DARK:"dark",LIGHT:"light",SYSTEM:"system"},Rc=40,Oc=48,zc=20,pa="arrowclosed";function v1(e){let t=e.style?.width;if(t==null)return 200;let n=typeof t=="number"?t:parseFloat(t);return isNaN(n)||n<=0?200:n}function b1(e){let t=e.style?.height;if(t!=null){let n=typeof t=="number"?t:parseFloat(t);if(!isNaN(n)&&n>0)return n}return e.data?.isStuff?60:70}var cs=class extends Error{constructor(t,n){let o=t===""?"<root>":t;super(`GraphSpec validation failed at ${o}: ${n}`),this.name="GraphSpecValidationError",this.path=t}},S1=new Set(["succeeded","failed","running","scheduled","skipped","canceled"]),x1=new Set(["contains","data","control","selected_outcome","batch_item","batch_aggregate","parallel_combine"]);function Bi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function An(e){return e===null?"null":e===void 0?"undefined":Array.isArray(e)?"an array":`a ${typeof e}`}function vt(e,t){throw new cs(e,t)}function bo(e,t){return(typeof e!="string"||e.length===0)&&vt(t,`expected a non-empty string, got ${An(e)}`),e}function _1(e,t){Bi(e)||vt(t,`expected an object, got ${An(e)}`),bo(e.name,`${t}.name`)}function IC(e,t){Bi(e)||vt(t,`expected an object, got ${An(e)}`),bo(e.id,`${t}.id`),e.kind!=="controller"&&e.kind!=="operator"&&vt(`${t}.kind`,`expected "controller" or "operator" \u2014 a real pipelex run emits only pipe-call nodes, got ${JSON.stringify(e.kind)}`),(typeof e.status!="string"||!S1.has(e.status))&&vt(`${t}.status`,`expected one of ${[...S1].join(", ")}, got ${JSON.stringify(e.status)}`),bo(e.pipe_code,`${t}.pipe_code`);let n=bo(e.pipe_type,`${t}.pipe_type`);h1.has(n)||vt(`${t}.pipe_type`,`unrecognized pipe class "${n}" \u2014 add it to PipeOperatorType or PipeControllerType in types.ts`),bo(e.description,`${t}.description`),bo(e.domain_code,`${t}.domain_code`);let o=e.io;o===void 0&&(o={inputs:[],outputs:[]},e.io=o),Bi(o)||vt(`${t}.io`,`expected an object, got ${An(o)}`),o.inputs===void 0?o.inputs=[]:Array.isArray(o.inputs)||vt(`${t}.io.inputs`,`expected an array, got ${An(o.inputs)}`),o.outputs===void 0?o.outputs=[]:Array.isArray(o.outputs)||vt(`${t}.io.outputs`,`expected an array, got ${An(o.outputs)}`),o.inputs.forEach((i,a)=>_1(i,`${t}.io.inputs[${a}]`)),o.outputs.forEach((i,a)=>_1(i,`${t}.io.outputs[${a}]`))}function VC(e,t){Bi(e)||vt(t,`expected an object, got ${An(e)}`),bo(e.id,`${t}.id`),bo(e.source,`${t}.source`),bo(e.target,`${t}.target`),(typeof e.kind!="string"||!x1.has(e.kind))&&vt(`${t}.kind`,`expected one of ${[...x1].join(", ")}, got ${JSON.stringify(e.kind)}`)}function Lc(e){return Bi(e)||vt("",`expected a GraphSpec object, got ${An(e)}`),Array.isArray(e.nodes)||vt("nodes",`expected an array, got ${An(e.nodes)}`),Array.isArray(e.edges)||vt("edges",`expected an array, got ${An(e.edges)}`),Bi(e.meta)||vt("meta",`expected an object, got ${An(e.meta)}`),e.meta.format!=="mthds"&&vt("meta.format",`expected "mthds" (this does not look like pipelex GraphSpec JSON), got ${JSON.stringify(e.meta.format)}`),e.pipe_registry!==void 0&&!Bi(e.pipe_registry)&&vt("pipe_registry",`expected an object when present, got ${An(e.pipe_registry)}`),e.concept_registry!==void 0&&!Bi(e.concept_registry)&&vt("concept_registry",`expected an object when present, got ${An(e.concept_registry)}`),e.nodes.forEach((t,n)=>IC(t,`nodes[${n}]`)),e.edges.forEach((t,n)=>VC(t,`edges[${n}]`)),e}function Al(e,t="node"){return e.kind!=="controller"&&e.kind!=="operator"&&vt(`${t}.kind`,`expected a pipe-call node ("controller" or "operator"), got ${JSON.stringify(e.kind)}`),bo(e.pipe_code,`${t}.pipe_code`),e}var ce=oe(wt(),1);var H=oe(ge()),B=oe(wt());function nt(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,o;n<e.length;n++)(o=nt(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var qC={value:()=>{}};function w1(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new Bc(n)}function Bc(e){this._=e}function ZC(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",i=n.indexOf(".");if(i>=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}Bc.prototype=w1.prototype={constructor:Bc,on:function(e,t){var n=this._,o=ZC(e+"",n),i,a=-1,l=o.length;if(arguments.length<2){for(;++a<l;)if((i=(e=o[a]).type)&&(i=jC(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<l;)if(i=(e=o[a]).type)n[i]=C1(n[i],e.name,t);else if(t==null)for(i in n)n[i]=C1(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Bc(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),o=0,i,a;o<i;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],o=0,i=a.length;o<i;++o)a[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,a=o.length;i<a;++i)o[i].value.apply(t,n)}};function jC(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function C1(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=qC,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var ma=w1;var kc="http://www.w3.org/1999/xhtml",Hm={svg:"http://www.w3.org/2000/svg",xhtml:kc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Fo(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Hm.hasOwnProperty(t)?{space:Hm[t],local:e}:e}function $C(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===kc&&t.documentElement.namespaceURI===kc?t.createElement(e):t.createElementNS(n,e)}}function KC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Gc(e){var t=Fo(e);return(t.local?KC:$C)(t)}function QC(){}function ha(e){return e==null?QC:function(){return this.querySelector(e)}}function A1(e){typeof e!="function"&&(e=ha(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],l=a.length,r=o[i]=new Array(l),s,u,c=0;c<l;++c)(s=a[c])&&(u=e.call(s,s.__data__,c,a))&&("__data__"in s&&(u.__data__=s.__data__),r[c]=u);return new ot(o,this._parents)}function Bm(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function FC(){return[]}function fs(e){return e==null?FC:function(){return this.querySelectorAll(e)}}function WC(e){return function(){return Bm(e.apply(this,arguments))}}function M1(e){typeof e=="function"?e=WC(e):e=fs(e);for(var t=this._groups,n=t.length,o=[],i=[],a=0;a<n;++a)for(var l=t[a],r=l.length,s,u=0;u<r;++u)(s=l[u])&&(o.push(e.call(s,s.__data__,u,l)),i.push(s));return new ot(o,i)}function ds(e){return function(){return this.matches(e)}}function Pc(e){return function(t){return t.matches(e)}}var JC=Array.prototype.find;function ew(e){return function(){return JC.call(this.children,e)}}function tw(){return this.firstElementChild}function D1(e){return this.select(e==null?tw:ew(typeof e=="function"?e:Pc(e)))}var nw=Array.prototype.filter;function ow(){return Array.from(this.children)}function iw(e){return function(){return nw.call(this.children,e)}}function R1(e){return this.selectAll(e==null?ow:iw(typeof e=="function"?e:Pc(e)))}function O1(e){typeof e!="function"&&(e=ds(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],l=a.length,r=o[i]=[],s,u=0;u<l;++u)(s=a[u])&&e.call(s,s.__data__,u,a)&&r.push(s);return new ot(o,this._parents)}function Uc(e){return new Array(e.length)}function z1(){return new ot(this._enter||this._groups.map(Uc),this._parents)}function ps(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ps.prototype={constructor:ps,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function L1(e){return function(){return e}}function aw(e,t,n,o,i,a){for(var l=0,r,s=t.length,u=a.length;l<u;++l)(r=t[l])?(r.__data__=a[l],o[l]=r):n[l]=new ps(e,a[l]);for(;l<s;++l)(r=t[l])&&(i[l]=r)}function lw(e,t,n,o,i,a,l){var r,s,u=new Map,c=t.length,d=a.length,f=new Array(c),h;for(r=0;r<c;++r)(s=t[r])&&(f[r]=h=l.call(s,s.__data__,r,t)+"",u.has(h)?i[r]=s:u.set(h,s));for(r=0;r<d;++r)h=l.call(e,a[r],r,a)+"",(s=u.get(h))?(o[r]=s,s.__data__=a[r],u.delete(h)):n[r]=new ps(e,a[r]);for(r=0;r<c;++r)(s=t[r])&&u.get(f[r])===s&&(i[r]=s)}function rw(e){return e.__data__}function H1(e,t){if(!arguments.length)return Array.from(this,rw);var n=t?lw:aw,o=this._parents,i=this._groups;typeof e!="function"&&(e=L1(e));for(var a=i.length,l=new Array(a),r=new Array(a),s=new Array(a),u=0;u<a;++u){var c=o[u],d=i[u],f=d.length,h=sw(e.call(c,c&&c.__data__,u,o)),v=h.length,b=r[u]=new Array(v),S=l[u]=new Array(v),p=s[u]=new Array(f);n(c,d,b,S,p,h,t);for(var y=0,m=0,g,x;y<v;++y)if(g=b[y]){for(y>=m&&(m=y+1);!(x=S[m])&&++m<v;);g._next=x||null}}return l=new ot(l,o),l._enter=r,l._exit=s,l}function sw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function B1(){return new ot(this._exit||this._groups.map(Uc),this._parents)}function k1(e,t,n){var o=this.enter(),i=this,a=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?a.remove():n(a),o&&i?o.merge(i).order():i}function G1(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,a=o.length,l=Math.min(i,a),r=new Array(i),s=0;s<l;++s)for(var u=n[s],c=o[s],d=u.length,f=r[s]=new Array(d),h,v=0;v<d;++v)(h=u[v]||c[v])&&(f[v]=h);for(;s<i;++s)r[s]=n[s];return new ot(r,this._parents)}function P1(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],i=o.length-1,a=o[i],l;--i>=0;)(l=o[i])&&(a&&l.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(l,a),a=l);return this}function U1(e){e||(e=uw);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,o=n.length,i=new Array(o),a=0;a<o;++a){for(var l=n[a],r=l.length,s=i[a]=new Array(r),u,c=0;c<r;++c)(u=l[c])&&(s[c]=u);s.sort(t)}return new ot(i,this._parents).order()}function uw(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function I1(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function V1(){return Array.from(this)}function Y1(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,a=o.length;i<a;++i){var l=o[i];if(l)return l}return null}function X1(){let e=0;for(let t of this)++e;return e}function q1(){return!this.node()}function Z1(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i=t[n],a=0,l=i.length,r;a<l;++a)(r=i[a])&&e.call(r,r.__data__,a,i);return this}function cw(e){return function(){this.removeAttribute(e)}}function fw(e){return function(){this.removeAttributeNS(e.space,e.local)}}function dw(e,t){return function(){this.setAttribute(e,t)}}function pw(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function mw(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function hw(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function j1(e,t){var n=Fo(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?fw:cw:typeof t=="function"?n.local?hw:mw:n.local?pw:dw)(n,t))}function Ic(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function gw(e){return function(){this.style.removeProperty(e)}}function yw(e,t,n){return function(){this.style.setProperty(e,t,n)}}function vw(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function $1(e,t,n){return arguments.length>1?this.each((t==null?gw:typeof t=="function"?vw:yw)(e,t,n??"")):ki(this.node(),e)}function ki(e,t){return e.style.getPropertyValue(t)||Ic(e).getComputedStyle(e,null).getPropertyValue(t)}function bw(e){return function(){delete this[e]}}function Sw(e,t){return function(){this[e]=t}}function xw(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function K1(e,t){return arguments.length>1?this.each((t==null?bw:typeof t=="function"?xw:Sw)(e,t)):this.node()[e]}function Q1(e){return e.trim().split(/^|\s+/)}function km(e){return e.classList||new F1(e)}function F1(e){this._node=e,this._names=Q1(e.getAttribute("class")||"")}F1.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function W1(e,t){for(var n=km(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function J1(e,t){for(var n=km(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function _w(e){return function(){W1(this,e)}}function Ew(e){return function(){J1(this,e)}}function Tw(e,t){return function(){(t.apply(this,arguments)?W1:J1)(this,e)}}function eS(e,t){var n=Q1(e+"");if(arguments.length<2){for(var o=km(this.node()),i=-1,a=n.length;++i<a;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Tw:t?_w:Ew)(n,t))}function Nw(){this.textContent=""}function Cw(e){return function(){this.textContent=e}}function ww(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function tS(e){return arguments.length?this.each(e==null?Nw:(typeof e=="function"?ww:Cw)(e)):this.node().textContent}function Aw(){this.innerHTML=""}function Mw(e){return function(){this.innerHTML=e}}function Dw(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function nS(e){return arguments.length?this.each(e==null?Aw:(typeof e=="function"?Dw:Mw)(e)):this.node().innerHTML}function Rw(){this.nextSibling&&this.parentNode.appendChild(this)}function oS(){return this.each(Rw)}function Ow(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function iS(){return this.each(Ow)}function aS(e){var t=typeof e=="function"?e:Gc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function zw(){return null}function lS(e,t){var n=typeof e=="function"?e:Gc(e),o=t==null?zw:typeof t=="function"?t:ha(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function Lw(){var e=this.parentNode;e&&e.removeChild(this)}function rS(){return this.each(Lw)}function Hw(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Bw(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function sS(e){return this.select(e?Bw:Hw)}function uS(e){return arguments.length?this.property("__data__",e):this.node().__data__}function kw(e){return function(t){e.call(this,t,this.__data__)}}function Gw(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function Pw(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++o]=a;++o?t.length=o:delete this.__on}}}function Uw(e,t,n){return function(){var o=this.__on,i,a=kw(t);if(o){for(var l=0,r=o.length;l<r;++l)if((i=o[l]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},o?o.push(i):this.__on=[i]}}function cS(e,t,n){var o=Gw(e+""),i,a=o.length,l;if(arguments.length<2){var r=this.node().__on;if(r){for(var s=0,u=r.length,c;s<u;++s)for(i=0,c=r[s];i<a;++i)if((l=o[i]).type===c.type&&l.name===c.name)return c.value}return}for(r=t?Uw:Pw,i=0;i<a;++i)this.each(r(o[i],t,n));return this}function fS(e,t,n){var o=Ic(e),i=o.CustomEvent;typeof i=="function"?i=new i(t,n):(i=o.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Iw(e,t){return function(){return fS(this,e,t)}}function Vw(e,t){return function(){return fS(this,e,t.apply(this,arguments))}}function dS(e,t){return this.each((typeof t=="function"?Vw:Iw)(e,t))}function*pS(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,a=o.length,l;i<a;++i)(l=o[i])&&(yield l)}var Gm=[null];function ot(e,t){this._groups=e,this._parents=t}function mS(){return new ot([[document.documentElement]],Gm)}function Yw(){return this}ot.prototype=mS.prototype={constructor:ot,select:A1,selectAll:M1,selectChild:D1,selectChildren:R1,filter:O1,data:H1,enter:z1,exit:B1,join:k1,merge:G1,selection:Yw,order:P1,sort:U1,call:I1,nodes:V1,node:Y1,size:X1,empty:q1,each:Z1,attr:j1,style:$1,property:K1,classed:eS,text:tS,html:nS,raise:oS,lower:iS,append:aS,insert:lS,remove:rS,clone:sS,datum:uS,on:cS,dispatch:dS,[Symbol.iterator]:pS};var Wo=mS;function Tt(e){return typeof e=="string"?new ot([[document.querySelector(e)]],[document.documentElement]):new ot([[e]],Gm)}function hS(e){let t;for(;t=e.sourceEvent;)e=t;return e}function qt(e,t){if(e=hS(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var gS={passive:!1},ga={capture:!0,passive:!1};function Vc(e){e.stopImmediatePropagation()}function Gi(e){e.preventDefault(),e.stopImmediatePropagation()}function ms(e){var t=e.document.documentElement,n=Tt(e).on("dragstart.drag",Gi,ga);"onselectstart"in t?n.on("selectstart.drag",Gi,ga):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function hs(e,t){var n=e.document.documentElement,o=Tt(e).on("dragstart.drag",null);t&&(o.on("click.drag",Gi,ga),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var gs=e=>()=>e;function ys(e,{sourceEvent:t,subject:n,target:o,identifier:i,active:a,x:l,y:r,dx:s,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:r,enumerable:!0,configurable:!0},dx:{value:s,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}ys.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Xw(e){return!e.ctrlKey&&!e.button}function qw(){return this.parentNode}function Zw(e,t){return t??{x:e.x,y:e.y}}function jw(){return navigator.maxTouchPoints||"ontouchstart"in this}function Yc(){var e=Xw,t=qw,n=Zw,o=jw,i={},a=ma("start","drag","end"),l=0,r,s,u,c,d=0;function f(g){g.on("mousedown.drag",h).filter(o).on("touchstart.drag",S).on("touchmove.drag",p,gS).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(g,x){if(!(c||!e.call(this,g,x))){var _=m(this,t.call(this,g,x),g,x,"mouse");_&&(Tt(g.view).on("mousemove.drag",v,ga).on("mouseup.drag",b,ga),ms(g.view),Vc(g),u=!1,r=g.clientX,s=g.clientY,_("start",g))}}function v(g){if(Gi(g),!u){var x=g.clientX-r,_=g.clientY-s;u=x*x+_*_>d}i.mouse("drag",g)}function b(g){Tt(g.view).on("mousemove.drag mouseup.drag",null),hs(g.view,u),Gi(g),i.mouse("end",g)}function S(g,x){if(e.call(this,g,x)){var _=g.changedTouches,E=t.call(this,g,x),w=_.length,N,k;for(N=0;N<w;++N)(k=m(this,E,g,x,_[N].identifier,_[N]))&&(Vc(g),k("start",g,_[N]))}}function p(g){var x=g.changedTouches,_=x.length,E,w;for(E=0;E<_;++E)(w=i[x[E].identifier])&&(Gi(g),w("drag",g,x[E]))}function y(g){var x=g.changedTouches,_=x.length,E,w;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),E=0;E<_;++E)(w=i[x[E].identifier])&&(Vc(g),w("end",g,x[E]))}function m(g,x,_,E,w,N){var k=a.copy(),D=qt(N||_,x),z,P,T;if((T=n.call(g,new ys("beforestart",{sourceEvent:_,target:f,identifier:w,active:l,x:D[0],y:D[1],dx:0,dy:0,dispatch:k}),E))!=null)return z=T.x-D[0]||0,P=T.y-D[1]||0,function A(M,O,R){var L=D,V;switch(M){case"start":i[w]=A,V=l++;break;case"end":delete i[w],--l;case"drag":D=qt(R||O,x),V=l;break}k.call(M,g,new ys(M,{sourceEvent:O,subject:T,target:f,identifier:w,active:V,x:D[0]+z,y:D[1]+P,dx:D[0]-L[0],dy:D[1]-L[1],dispatch:k}),E)}}return f.filter=function(g){return arguments.length?(e=typeof g=="function"?g:gs(!!g),f):e},f.container=function(g){return arguments.length?(t=typeof g=="function"?g:gs(g),f):t},f.subject=function(g){return arguments.length?(n=typeof g=="function"?g:gs(g),f):n},f.touchable=function(g){return arguments.length?(o=typeof g=="function"?g:gs(!!g),f):o},f.on=function(){var g=a.on.apply(a,arguments);return g===a?f:g},f.clickDistance=function(g){return arguments.length?(d=(g=+g)*g,f):Math.sqrt(d)},f}function Xc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Pm(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function Ss(){}var vs=.7,jc=1/vs,Ml="\\s*([+-]?\\d+)\\s*",bs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",So="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$w=/^#([0-9a-f]{3,8})$/,Kw=new RegExp(`^rgb\\(${Ml},${Ml},${Ml}\\)$`),Qw=new RegExp(`^rgb\\(${So},${So},${So}\\)$`),Fw=new RegExp(`^rgba\\(${Ml},${Ml},${Ml},${bs}\\)$`),Ww=new RegExp(`^rgba\\(${So},${So},${So},${bs}\\)$`),Jw=new RegExp(`^hsl\\(${bs},${So},${So}\\)$`),eA=new RegExp(`^hsla\\(${bs},${So},${So},${bs}\\)$`),yS={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};Xc(Ss,oo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:vS,formatHex:vS,formatHex8:tA,formatHsl:nA,formatRgb:bS,toString:bS});function vS(){return this.rgb().formatHex()}function tA(){return this.rgb().formatHex8()}function nA(){return NS(this).formatHsl()}function bS(){return this.rgb().formatRgb()}function oo(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=$w.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?SS(t):n===3?new un(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?qc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?qc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Kw.exec(e))?new un(t[1],t[2],t[3],1):(t=Qw.exec(e))?new un(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Fw.exec(e))?qc(t[1],t[2],t[3],t[4]):(t=Ww.exec(e))?qc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Jw.exec(e))?ES(t[1],t[2]/100,t[3]/100,1):(t=eA.exec(e))?ES(t[1],t[2]/100,t[3]/100,t[4]):yS.hasOwnProperty(e)?SS(yS[e]):e==="transparent"?new un(NaN,NaN,NaN,0):null}function SS(e){return new un(e>>16&255,e>>8&255,e&255,1)}function qc(e,t,n,o){return o<=0&&(e=t=n=NaN),new un(e,t,n,o)}function oA(e){return e instanceof Ss||(e=oo(e)),e?(e=e.rgb(),new un(e.r,e.g,e.b,e.opacity)):new un}function Dl(e,t,n,o){return arguments.length===1?oA(e):new un(e,t,n,o??1)}function un(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}Xc(un,Dl,Pm(Ss,{brighter(e){return e=e==null?jc:Math.pow(jc,e),new un(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?vs:Math.pow(vs,e),new un(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new un(va(this.r),va(this.g),va(this.b),$c(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:xS,formatHex:xS,formatHex8:iA,formatRgb:_S,toString:_S}));function xS(){return`#${ya(this.r)}${ya(this.g)}${ya(this.b)}`}function iA(){return`#${ya(this.r)}${ya(this.g)}${ya(this.b)}${ya((isNaN(this.opacity)?1:this.opacity)*255)}`}function _S(){let e=$c(this.opacity);return`${e===1?"rgb(":"rgba("}${va(this.r)}, ${va(this.g)}, ${va(this.b)}${e===1?")":`, ${e})`}`}function $c(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function va(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ya(e){return e=va(e),(e<16?"0":"")+e.toString(16)}function ES(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new no(e,t,n,o)}function NS(e){if(e instanceof no)return new no(e.h,e.s,e.l,e.opacity);if(e instanceof Ss||(e=oo(e)),!e)return new no;if(e instanceof no)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),a=Math.max(t,n,o),l=NaN,r=a-i,s=(a+i)/2;return r?(t===a?l=(n-o)/r+(n<o)*6:n===a?l=(o-t)/r+2:l=(t-n)/r+4,r/=s<.5?a+i:2-a-i,l*=60):r=s>0&&s<1?0:l,new no(l,r,s,e.opacity)}function CS(e,t,n,o){return arguments.length===1?NS(e):new no(e,t,n,o??1)}function no(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}Xc(no,CS,Pm(Ss,{brighter(e){return e=e==null?jc:Math.pow(jc,e),new no(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?vs:Math.pow(vs,e),new no(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new un(Um(e>=240?e-240:e+120,i,o),Um(e,i,o),Um(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new no(TS(this.h),Zc(this.s),Zc(this.l),$c(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(){let e=$c(this.opacity);return`${e===1?"hsl(":"hsla("}${TS(this.h)}, ${Zc(this.s)*100}%, ${Zc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function TS(e){return e=(e||0)%360,e<0?e+360:e}function Zc(e){return Math.max(0,Math.min(1,e||0))}function Um(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function Im(e,t,n,o,i){var a=e*e,l=a*e;return((1-3*e+3*a-l)*t+(4-6*a+3*l)*n+(1+3*e+3*a-3*l)*o+l*i)/6}function wS(e){var t=e.length-1;return function(n){var o=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[o],a=e[o+1],l=o>0?e[o-1]:2*i-a,r=o<t-1?e[o+2]:2*a-i;return Im((n-o/t)*t,l,i,a,r)}}function AS(e){var t=e.length;return function(n){var o=Math.floor(((n%=1)<0?++n:n)*t),i=e[(o+t-1)%t],a=e[o%t],l=e[(o+1)%t],r=e[(o+2)%t];return Im((n-o/t)*t,i,a,l,r)}}var xs=e=>()=>e;function aA(e,t){return function(n){return e+n*t}}function lA(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function MS(e){return(e=+e)==1?Kc:function(t,n){return n-t?lA(t,n,e):xs(isNaN(t)?n:t)}}function Kc(e,t){var n=t-e;return n?aA(e,n):xs(isNaN(e)?t:e)}var ba=(function e(t){var n=MS(t);function o(i,a){var l=n((i=Dl(i)).r,(a=Dl(a)).r),r=n(i.g,a.g),s=n(i.b,a.b),u=Kc(i.opacity,a.opacity);return function(c){return i.r=l(c),i.g=r(c),i.b=s(c),i.opacity=u(c),i+""}}return o.gamma=e,o})(1);function DS(e){return function(t){var n=t.length,o=new Array(n),i=new Array(n),a=new Array(n),l,r;for(l=0;l<n;++l)r=Dl(t[l]),o[l]=r.r||0,i[l]=r.g||0,a[l]=r.b||0;return o=e(o),i=e(i),a=e(a),r.opacity=1,function(s){return r.r=o(s),r.g=i(s),r.b=a(s),r+""}}}var rA=DS(wS),sA=DS(AS);function RS(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),i;return function(a){for(i=0;i<n;++i)o[i]=e[i]*(1-a)+t[i]*a;return o}}function OS(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function zS(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,i=new Array(o),a=new Array(n),l;for(l=0;l<o;++l)i[l]=Jo(e[l],t[l]);for(;l<n;++l)a[l]=t[l];return function(r){for(l=0;l<o;++l)a[l]=i[l](r);return a}}function LS(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function Zt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function HS(e,t){var n={},o={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Jo(e[i],t[i]):o[i]=t[i];return function(a){for(i in n)o[i]=n[i](a);return o}}var Ym=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Vm=new RegExp(Ym.source,"g");function uA(e){return function(){return e}}function cA(e){return function(t){return e(t)+""}}function _s(e,t){var n=Ym.lastIndex=Vm.lastIndex=0,o,i,a,l=-1,r=[],s=[];for(e=e+"",t=t+"";(o=Ym.exec(e))&&(i=Vm.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),r[l]?r[l]+=a:r[++l]=a),(o=o[0])===(i=i[0])?r[l]?r[l]+=i:r[++l]=i:(r[++l]=null,s.push({i:l,x:Zt(o,i)})),n=Vm.lastIndex;return n<t.length&&(a=t.slice(n),r[l]?r[l]+=a:r[++l]=a),r.length<2?s[0]?cA(s[0].x):uA(t):(t=s.length,function(u){for(var c=0,d;c<t;++c)r[(d=s[c]).i]=d.x(u);return r.join("")})}function Jo(e,t){var n=typeof t,o;return t==null||n==="boolean"?xs(t):(n==="number"?Zt:n==="string"?(o=oo(t))?(t=o,ba):_s:t instanceof oo?ba:t instanceof Date?LS:OS(t)?RS:Array.isArray(t)?zS:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?HS:Zt)(e,t)}var BS=180/Math.PI,Qc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Xm(e,t,n,o,i,a){var l,r,s;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(s=e*n+t*o)&&(n-=e*s,o-=t*s),(r=Math.sqrt(n*n+o*o))&&(n/=r,o/=r,s/=r),e*o<t*n&&(e=-e,t=-t,s=-s,l=-l),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*BS,skewX:Math.atan(s)*BS,scaleX:l,scaleY:r}}var Fc;function kS(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Qc:Xm(t.a,t.b,t.c,t.d,t.e,t.f)}function GS(e){return e==null?Qc:(Fc||(Fc=document.createElementNS("http://www.w3.org/2000/svg","g")),Fc.setAttribute("transform",e),(e=Fc.transform.baseVal.consolidate())?(e=e.matrix,Xm(e.a,e.b,e.c,e.d,e.e,e.f)):Qc)}function PS(e,t,n,o){function i(u){return u.length?u.pop()+" ":""}function a(u,c,d,f,h,v){if(u!==d||c!==f){var b=h.push("translate(",null,t,null,n);v.push({i:b-4,x:Zt(u,d)},{i:b-2,x:Zt(c,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function l(u,c,d,f){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),f.push({i:d.push(i(d)+"rotate(",null,o)-2,x:Zt(u,c)})):c&&d.push(i(d)+"rotate("+c+o)}function r(u,c,d,f){u!==c?f.push({i:d.push(i(d)+"skewX(",null,o)-2,x:Zt(u,c)}):c&&d.push(i(d)+"skewX("+c+o)}function s(u,c,d,f,h,v){if(u!==d||c!==f){var b=h.push(i(h)+"scale(",null,",",null,")");v.push({i:b-4,x:Zt(u,d)},{i:b-2,x:Zt(c,f)})}else(d!==1||f!==1)&&h.push(i(h)+"scale("+d+","+f+")")}return function(u,c){var d=[],f=[];return u=e(u),c=e(c),a(u.translateX,u.translateY,c.translateX,c.translateY,d,f),l(u.rotate,c.rotate,d,f),r(u.skewX,c.skewX,d,f),s(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(h){for(var v=-1,b=f.length,S;++v<b;)d[(S=f[v]).i]=S.x(h);return d.join("")}}}var qm=PS(kS,"px, ","px)","deg)"),Zm=PS(GS,", ",")",")");var fA=1e-12;function US(e){return((e=Math.exp(e))+1/e)/2}function dA(e){return((e=Math.exp(e))-1/e)/2}function pA(e){return((e=Math.exp(2*e))-1)/(e+1)}var Sa=(function e(t,n,o){function i(a,l){var r=a[0],s=a[1],u=a[2],c=l[0],d=l[1],f=l[2],h=c-r,v=d-s,b=h*h+v*v,S,p;if(b<fA)p=Math.log(f/u)/t,S=function(E){return[r+E*h,s+E*v,u*Math.exp(t*E*p)]};else{var y=Math.sqrt(b),m=(f*f-u*u+o*b)/(2*u*n*y),g=(f*f-u*u-o*b)/(2*f*n*y),x=Math.log(Math.sqrt(m*m+1)-m),_=Math.log(Math.sqrt(g*g+1)-g);p=(_-x)/t,S=function(E){var w=E*p,N=US(x),k=u/(n*y)*(N*pA(t*w+x)-dA(x));return[r+k*h,s+k*v,u*N/US(t*w+x)]}}return S.duration=p*1e3*t/Math.SQRT2,S}return i.rho=function(a){var l=Math.max(.001,+a),r=l*l,s=r*r;return e(l,r,s)},i})(Math.SQRT2,2,4);var Rl=0,Ts=0,Es=0,VS=1e3,Wc,Ns,Jc=0,xa=0,ef=0,Cs=typeof performance=="object"&&performance.now?performance:Date,YS=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function As(){return xa||(YS(mA),xa=Cs.now()+ef)}function mA(){xa=0}function ws(){this._call=this._time=this._next=null}ws.prototype=tf.prototype={constructor:ws,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?As():+n)+(t==null?0:+t),!this._next&&Ns!==this&&(Ns?Ns._next=this:Wc=this,Ns=this),this._call=e,this._time=n,jm()},stop:function(){this._call&&(this._call=null,this._time=1/0,jm())}};function tf(e,t,n){var o=new ws;return o.restart(e,t,n),o}function XS(){As(),++Rl;for(var e=Wc,t;e;)(t=xa-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Rl}function IS(){xa=(Jc=Cs.now())+ef,Rl=Ts=0;try{XS()}finally{Rl=0,gA(),xa=0}}function hA(){var e=Cs.now(),t=e-Jc;t>VS&&(ef-=t,Jc=e)}function gA(){for(var e,t=Wc,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Wc=n);Ns=e,jm(o)}function jm(e){if(!Rl){Ts&&(Ts=clearTimeout(Ts));var t=e-xa;t>24?(e<1/0&&(Ts=setTimeout(IS,e-Cs.now()-ef)),Es&&(Es=clearInterval(Es))):(Es||(Jc=Cs.now(),Es=setInterval(hA,VS)),Rl=1,YS(IS))}}function nf(e,t,n){var o=new ws;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var yA=ma("start","end","cancel","interrupt"),vA=[],jS=0,qS=1,af=2,of=3,ZS=4,lf=5,Ms=6;function Pi(e,t,n,o,i,a){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;bA(e,n,{name:t,index:o,group:i,on:yA,tween:vA,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:jS})}function Ds(e,t){var n=bt(e,t);if(n.state>jS)throw new Error("too late; already scheduled");return n}function zt(e,t){var n=bt(e,t);if(n.state>of)throw new Error("too late; already running");return n}function bt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function bA(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=tf(a,0,n.time);function a(u){n.state=qS,n.timer.restart(l,n.delay,n.time),n.delay<=u&&l(u-n.delay)}function l(u){var c,d,f,h;if(n.state!==qS)return s();for(c in o)if(h=o[c],h.name===n.name){if(h.state===of)return nf(l);h.state===ZS?(h.state=Ms,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[c]):+c<t&&(h.state=Ms,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[c])}if(nf(function(){n.state===of&&(n.state=ZS,n.timer.restart(r,n.delay,n.time),r(u))}),n.state=af,n.on.call("start",e,e.__data__,n.index,n.group),n.state===af){for(n.state=of,i=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=h);i.length=d+1}}function r(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(s),n.state=lf,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===lf&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){n.state=Ms,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function _a(e,t){var n=e.__transition,o,i,a=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((o=n[l]).name!==t){a=!1;continue}i=o.state>af&&o.state<lf,o.state=Ms,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[l]}a&&delete e.__transition}}function $S(e){return this.each(function(){_a(this,e)})}function SA(e,t){var n,o;return function(){var i=zt(this,e),a=i.tween;if(a!==n){o=n=a;for(var l=0,r=o.length;l<r;++l)if(o[l].name===t){o=o.slice(),o.splice(l,1);break}}i.tween=o}}function xA(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var a=zt(this,e),l=a.tween;if(l!==o){i=(o=l).slice();for(var r={name:t,value:n},s=0,u=i.length;s<u;++s)if(i[s].name===t){i[s]=r;break}s===u&&i.push(r)}a.tween=i}}function KS(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=bt(this.node(),n).tween,i=0,a=o.length,l;i<a;++i)if((l=o[i]).name===e)return l.value;return null}return this.each((t==null?SA:xA)(n,e,t))}function Ol(e,t,n){var o=e._id;return e.each(function(){var i=zt(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return bt(i,o).value[t]}}function rf(e,t){var n;return(typeof t=="number"?Zt:t instanceof oo?ba:(n=oo(t))?(t=n,ba):_s)(e,t)}function _A(e){return function(){this.removeAttribute(e)}}function EA(e){return function(){this.removeAttributeNS(e.space,e.local)}}function TA(e,t,n){var o,i=n+"",a;return function(){var l=this.getAttribute(e);return l===i?null:l===o?a:a=t(o=l,n)}}function NA(e,t,n){var o,i=n+"",a;return function(){var l=this.getAttributeNS(e.space,e.local);return l===i?null:l===o?a:a=t(o=l,n)}}function CA(e,t,n){var o,i,a;return function(){var l,r=n(this),s;return r==null?void this.removeAttribute(e):(l=this.getAttribute(e),s=r+"",l===s?null:l===o&&s===i?a:(i=s,a=t(o=l,r)))}}function wA(e,t,n){var o,i,a;return function(){var l,r=n(this),s;return r==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),s=r+"",l===s?null:l===o&&s===i?a:(i=s,a=t(o=l,r)))}}function QS(e,t){var n=Fo(e),o=n==="transform"?Zm:rf;return this.attrTween(e,typeof t=="function"?(n.local?wA:CA)(n,o,Ol(this,"attr."+e,t)):t==null?(n.local?EA:_A)(n):(n.local?NA:TA)(n,o,t))}function AA(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function MA(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function DA(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&MA(e,a)),n}return i._value=t,i}function RA(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&AA(e,a)),n}return i._value=t,i}function FS(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=Fo(e);return this.tween(n,(o.local?DA:RA)(o,t))}function OA(e,t){return function(){Ds(this,e).delay=+t.apply(this,arguments)}}function zA(e,t){return t=+t,function(){Ds(this,e).delay=t}}function WS(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?OA:zA)(t,e)):bt(this.node(),t).delay}function LA(e,t){return function(){zt(this,e).duration=+t.apply(this,arguments)}}function HA(e,t){return t=+t,function(){zt(this,e).duration=t}}function JS(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?LA:HA)(t,e)):bt(this.node(),t).duration}function BA(e,t){if(typeof t!="function")throw new Error;return function(){zt(this,e).ease=t}}function ex(e){var t=this._id;return arguments.length?this.each(BA(t,e)):bt(this.node(),t).ease}function kA(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;zt(this,e).ease=n}}function tx(e){if(typeof e!="function")throw new Error;return this.each(kA(this._id,e))}function nx(e){typeof e!="function"&&(e=ds(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],l=a.length,r=o[i]=[],s,u=0;u<l;++u)(s=a[u])&&e.call(s,s.__data__,u,a)&&r.push(s);return new jt(o,this._parents,this._name,this._id)}function ox(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,i=n.length,a=Math.min(o,i),l=new Array(o),r=0;r<a;++r)for(var s=t[r],u=n[r],c=s.length,d=l[r]=new Array(c),f,h=0;h<c;++h)(f=s[h]||u[h])&&(d[h]=f);for(;r<o;++r)l[r]=t[r];return new jt(l,this._parents,this._name,this._id)}function GA(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function PA(e,t,n){var o,i,a=GA(t)?Ds:zt;return function(){var l=a(this,e),r=l.on;r!==o&&(i=(o=r).copy()).on(t,n),l.on=i}}function ix(e,t){var n=this._id;return arguments.length<2?bt(this.node(),n).on.on(e):this.each(PA(n,e,t))}function UA(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function ax(){return this.on("end.remove",UA(this._id))}function lx(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ha(e));for(var o=this._groups,i=o.length,a=new Array(i),l=0;l<i;++l)for(var r=o[l],s=r.length,u=a[l]=new Array(s),c,d,f=0;f<s;++f)(c=r[f])&&(d=e.call(c,c.__data__,f,r))&&("__data__"in c&&(d.__data__=c.__data__),u[f]=d,Pi(u[f],t,n,f,u,bt(c,n)));return new jt(a,this._parents,t,n)}function rx(e){var t=this._name,n=this._id;typeof e!="function"&&(e=fs(e));for(var o=this._groups,i=o.length,a=[],l=[],r=0;r<i;++r)for(var s=o[r],u=s.length,c,d=0;d<u;++d)if(c=s[d]){for(var f=e.call(c,c.__data__,d,s),h,v=bt(c,n),b=0,S=f.length;b<S;++b)(h=f[b])&&Pi(h,t,n,b,f,v);a.push(f),l.push(c)}return new jt(a,l,t,n)}var IA=Wo.prototype.constructor;function sx(){return new IA(this._groups,this._parents)}function VA(e,t){var n,o,i;return function(){var a=ki(this,e),l=(this.style.removeProperty(e),ki(this,e));return a===l?null:a===n&&l===o?i:i=t(n=a,o=l)}}function ux(e){return function(){this.style.removeProperty(e)}}function YA(e,t,n){var o,i=n+"",a;return function(){var l=ki(this,e);return l===i?null:l===o?a:a=t(o=l,n)}}function XA(e,t,n){var o,i,a;return function(){var l=ki(this,e),r=n(this),s=r+"";return r==null&&(s=r=(this.style.removeProperty(e),ki(this,e))),l===s?null:l===o&&s===i?a:(i=s,a=t(o=l,r))}}function qA(e,t){var n,o,i,a="style."+t,l="end."+a,r;return function(){var s=zt(this,e),u=s.on,c=s.value[a]==null?r||(r=ux(t)):void 0;(u!==n||i!==c)&&(o=(n=u).copy()).on(l,i=c),s.on=o}}function cx(e,t,n){var o=(e+="")=="transform"?qm:rf;return t==null?this.styleTween(e,VA(e,o)).on("end.style."+e,ux(e)):typeof t=="function"?this.styleTween(e,XA(e,o,Ol(this,"style."+e,t))).each(qA(this._id,e)):this.styleTween(e,YA(e,o,t),n).on("end.style."+e,null)}function ZA(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function jA(e,t,n){var o,i;function a(){var l=t.apply(this,arguments);return l!==i&&(o=(i=l)&&ZA(e,l,n)),o}return a._value=t,a}function fx(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,jA(e,t,n??""))}function $A(e){return function(){this.textContent=e}}function KA(e){return function(){var t=e(this);this.textContent=t??""}}function dx(e){return this.tween("text",typeof e=="function"?KA(Ol(this,"text",e)):$A(e==null?"":e+""))}function QA(e){return function(t){this.textContent=e.call(this,t)}}function FA(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&QA(i)),t}return o._value=e,o}function px(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,FA(e))}function mx(){for(var e=this._name,t=this._id,n=sf(),o=this._groups,i=o.length,a=0;a<i;++a)for(var l=o[a],r=l.length,s,u=0;u<r;++u)if(s=l[u]){var c=bt(s,t);Pi(s,e,n,u,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new jt(o,this._parents,e,n)}function hx(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(a,l){var r={value:l},s={value:function(){--i===0&&a()}};n.each(function(){var u=zt(this,o),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(r),t._.interrupt.push(r),t._.end.push(s)),u.on=t}),i===0&&a()})}var WA=0;function jt(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function gx(e){return Wo().transition(e)}function sf(){return++WA}var ei=Wo.prototype;jt.prototype=gx.prototype={constructor:jt,select:lx,selectAll:rx,selectChild:ei.selectChild,selectChildren:ei.selectChildren,filter:nx,merge:ox,selection:sx,transition:mx,call:ei.call,nodes:ei.nodes,node:ei.node,size:ei.size,empty:ei.empty,each:ei.each,on:ix,attr:QS,attrTween:FS,style:cx,styleTween:fx,text:dx,textTween:px,remove:ax,tween:KS,delay:WS,duration:JS,ease:ex,easeVarying:tx,end:hx,[Symbol.iterator]:ei[Symbol.iterator]};function uf(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var JA={time:null,delay:0,duration:250,ease:uf};function eM(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function yx(e){var t,n;e instanceof jt?(t=e._id,e=e._name):(t=sf(),(n=JA).time=As(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,a=0;a<i;++a)for(var l=o[a],r=l.length,s,u=0;u<r;++u)(s=l[u])&&Pi(s,e,t,u,l,n||eM(s,t));return new jt(o,this._parents,e,t)}Wo.prototype.interrupt=$S;Wo.prototype.transition=yx;var Rs=e=>()=>e;function $m(e,{sourceEvent:t,target:n,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function io(e,t,n){this.k=e,this.x=t,this.y=n}io.prototype={constructor:io,scale:function(e){return e===1?this:new io(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new io(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ea=new io(1,0,0);Os.prototype=io.prototype;function Os(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Ea;return e.__zoom}function cf(e){e.stopImmediatePropagation()}function zl(e){e.preventDefault(),e.stopImmediatePropagation()}function tM(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function nM(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function vx(){return this.__zoom||Ea}function oM(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function iM(){return navigator.maxTouchPoints||"ontouchstart"in this}function aM(e,t,n){var o=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],l=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),l>a?(a+l)/2:Math.min(0,a)||Math.max(0,l))}function ff(){var e=tM,t=nM,n=aM,o=oM,i=iM,a=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],r=250,s=Sa,u=ma("start","zoom","end"),c,d,f,h=500,v=150,b=0,S=10;function p(T){T.property("__zoom",vx).on("wheel.zoom",w,{passive:!1}).on("mousedown.zoom",N).on("dblclick.zoom",k).filter(i).on("touchstart.zoom",D).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",P).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.transform=function(T,A,M,O){var R=T.selection?T.selection():T;R.property("__zoom",vx),T!==R?x(T,A,M,O):R.interrupt().each(function(){_(this,arguments).event(O).start().zoom(null,typeof A=="function"?A.apply(this,arguments):A).end()})},p.scaleBy=function(T,A,M,O){p.scaleTo(T,function(){var R=this.__zoom.k,L=typeof A=="function"?A.apply(this,arguments):A;return R*L},M,O)},p.scaleTo=function(T,A,M,O){p.transform(T,function(){var R=t.apply(this,arguments),L=this.__zoom,V=M==null?g(R):typeof M=="function"?M.apply(this,arguments):M,G=L.invert(V),I=typeof A=="function"?A.apply(this,arguments):A;return n(m(y(L,I),V,G),R,l)},M,O)},p.translateBy=function(T,A,M,O){p.transform(T,function(){return n(this.__zoom.translate(typeof A=="function"?A.apply(this,arguments):A,typeof M=="function"?M.apply(this,arguments):M),t.apply(this,arguments),l)},null,O)},p.translateTo=function(T,A,M,O,R){p.transform(T,function(){var L=t.apply(this,arguments),V=this.__zoom,G=O==null?g(L):typeof O=="function"?O.apply(this,arguments):O;return n(Ea.translate(G[0],G[1]).scale(V.k).translate(typeof A=="function"?-A.apply(this,arguments):-A,typeof M=="function"?-M.apply(this,arguments):-M),L,l)},O,R)};function y(T,A){return A=Math.max(a[0],Math.min(a[1],A)),A===T.k?T:new io(A,T.x,T.y)}function m(T,A,M){var O=A[0]-M[0]*T.k,R=A[1]-M[1]*T.k;return O===T.x&&R===T.y?T:new io(T.k,O,R)}function g(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function x(T,A,M,O){T.on("start.zoom",function(){_(this,arguments).event(O).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(O).end()}).tween("zoom",function(){var R=this,L=arguments,V=_(R,L).event(O),G=t.apply(R,L),I=M==null?g(G):typeof M=="function"?M.apply(R,L):M,q=Math.max(G[1][0]-G[0][0],G[1][1]-G[0][1]),j=R.__zoom,$=typeof A=="function"?A.apply(R,L):A,fe=s(j.invert(I).concat(q/j.k),$.invert(I).concat(q/$.k));return function(J){if(J===1)J=$;else{var X=fe(J),Q=q/X[2];J=new io(Q,I[0]-X[0]*Q,I[1]-X[1]*Q)}V.zoom(null,J)}})}function _(T,A,M){return!M&&T.__zooming||new E(T,A)}function E(T,A){this.that=T,this.args=A,this.active=0,this.sourceEvent=null,this.extent=t.apply(T,A),this.taps=0}E.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,A){return this.mouse&&T!=="mouse"&&(this.mouse[1]=A.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=A.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=A.invert(this.touch1[0])),this.that.__zoom=A,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var A=Tt(this.that).datum();u.call(T,this.that,new $m(T,{sourceEvent:this.sourceEvent,target:p,type:T,transform:this.that.__zoom,dispatch:u}),A)}};function w(T,...A){if(!e.apply(this,arguments))return;var M=_(this,A).event(T),O=this.__zoom,R=Math.max(a[0],Math.min(a[1],O.k*Math.pow(2,o.apply(this,arguments)))),L=qt(T);if(M.wheel)(M.mouse[0][0]!==L[0]||M.mouse[0][1]!==L[1])&&(M.mouse[1]=O.invert(M.mouse[0]=L)),clearTimeout(M.wheel);else{if(O.k===R)return;M.mouse=[L,O.invert(L)],_a(this),M.start()}zl(T),M.wheel=setTimeout(V,v),M.zoom("mouse",n(m(y(O,R),M.mouse[0],M.mouse[1]),M.extent,l));function V(){M.wheel=null,M.end()}}function N(T,...A){if(f||!e.apply(this,arguments))return;var M=T.currentTarget,O=_(this,A,!0).event(T),R=Tt(T.view).on("mousemove.zoom",I,!0).on("mouseup.zoom",q,!0),L=qt(T,M),V=T.clientX,G=T.clientY;ms(T.view),cf(T),O.mouse=[L,this.__zoom.invert(L)],_a(this),O.start();function I(j){if(zl(j),!O.moved){var $=j.clientX-V,fe=j.clientY-G;O.moved=$*$+fe*fe>b}O.event(j).zoom("mouse",n(m(O.that.__zoom,O.mouse[0]=qt(j,M),O.mouse[1]),O.extent,l))}function q(j){R.on("mousemove.zoom mouseup.zoom",null),hs(j.view,O.moved),zl(j),O.event(j).end()}}function k(T,...A){if(e.apply(this,arguments)){var M=this.__zoom,O=qt(T.changedTouches?T.changedTouches[0]:T,this),R=M.invert(O),L=M.k*(T.shiftKey?.5:2),V=n(m(y(M,L),O,R),t.apply(this,A),l);zl(T),r>0?Tt(this).transition().duration(r).call(x,V,O,T):Tt(this).call(p.transform,V,O,T)}}function D(T,...A){if(e.apply(this,arguments)){var M=T.touches,O=M.length,R=_(this,A,T.changedTouches.length===O).event(T),L,V,G,I;for(cf(T),V=0;V<O;++V)G=M[V],I=qt(G,this),I=[I,this.__zoom.invert(I),G.identifier],R.touch0?!R.touch1&&R.touch0[2]!==I[2]&&(R.touch1=I,R.taps=0):(R.touch0=I,L=!0,R.taps=1+!!c);c&&(c=clearTimeout(c)),L&&(R.taps<2&&(d=I[0],c=setTimeout(function(){c=null},h)),_a(this),R.start())}}function z(T,...A){if(this.__zooming){var M=_(this,A).event(T),O=T.changedTouches,R=O.length,L,V,G,I;for(zl(T),L=0;L<R;++L)V=O[L],G=qt(V,this),M.touch0&&M.touch0[2]===V.identifier?M.touch0[0]=G:M.touch1&&M.touch1[2]===V.identifier&&(M.touch1[0]=G);if(V=M.that.__zoom,M.touch1){var q=M.touch0[0],j=M.touch0[1],$=M.touch1[0],fe=M.touch1[1],J=(J=$[0]-q[0])*J+(J=$[1]-q[1])*J,X=(X=fe[0]-j[0])*X+(X=fe[1]-j[1])*X;V=y(V,Math.sqrt(J/X)),G=[(q[0]+$[0])/2,(q[1]+$[1])/2],I=[(j[0]+fe[0])/2,(j[1]+fe[1])/2]}else if(M.touch0)G=M.touch0[0],I=M.touch0[1];else return;M.zoom("touch",n(m(V,G,I),M.extent,l))}}function P(T,...A){if(this.__zooming){var M=_(this,A).event(T),O=T.changedTouches,R=O.length,L,V;for(cf(T),f&&clearTimeout(f),f=setTimeout(function(){f=null},h),L=0;L<R;++L)V=O[L],M.touch0&&M.touch0[2]===V.identifier?delete M.touch0:M.touch1&&M.touch1[2]===V.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(V=qt(V,this),Math.hypot(d[0]-V[0],d[1]-V[1])<S)){var G=Tt(this).on("dblclick.zoom");G&&G.apply(this,arguments)}}}return p.wheelDelta=function(T){return arguments.length?(o=typeof T=="function"?T:Rs(+T),p):o},p.filter=function(T){return arguments.length?(e=typeof T=="function"?T:Rs(!!T),p):e},p.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:Rs(!!T),p):i},p.extent=function(T){return arguments.length?(t=typeof T=="function"?T:Rs([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),p):t},p.scaleExtent=function(T){return arguments.length?(a[0]=+T[0],a[1]=+T[1],p):[a[0],a[1]]},p.translateExtent=function(T){return arguments.length?(l[0][0]=+T[0][0],l[1][0]=+T[1][0],l[0][1]=+T[0][1],l[1][1]=+T[1][1],p):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},p.constrain=function(T){return arguments.length?(n=T,p):n},p.duration=function(T){return arguments.length?(r=+T,p):r},p.interpolate=function(T){return arguments.length?(s=T,p):s},p.on=function(){var T=u.on.apply(u,arguments);return T===u?p:T},p.clickDistance=function(T){return arguments.length?(b=(T=+T)*T,p):Math.sqrt(b)},p.tapDistance=function(T){return arguments.length?(S=+T,p):S},p}var Mn={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:e=>`Node type "${e}" 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:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:o}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/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."},Pl=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Jm=["Enter"," ","Escape"],eh={"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:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"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"},Vi;(function(e){e.Strict="strict",e.Loose="loose"})(Vi||(Vi={}));var ti;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(ti||(ti={}));var Ta;(function(e){e.Partial="partial",e.Full="full"})(Ta||(Ta={}));var th={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},xo;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(xo||(xo={}));var Bl;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Bl||(Bl={}));var W;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(W||(W={}));var bx={[W.Left]:W.Right,[W.Right]:W.Left,[W.Top]:W.Bottom,[W.Bottom]:W.Top};function nh(e){return e===null?null:e?"valid":"invalid"}var oh=e=>"id"in e&&"source"in e&&"target"in e,Ox=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),ih=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e);var Hs=(e,t=[0,0])=>{let{width:n,height:o}=_o(e),i=e.origin??t,a=n*i[0],l=o*i[1];return{x:e.position.x-a,y:e.position.y-l}},ah=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=e.reduce((o,i)=>{let a=typeof i=="string",l=!t.nodeLookup&&!a?i:void 0;t.nodeLookup&&(l=a?t.nodeLookup.get(i):ih(i)?i:t.nodeLookup.get(i.id));let r=l?mf(l,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return gf(o,r)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return yf(n)},Ul=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(i=>{(t.filter===void 0||t.filter(i))&&(n=gf(n,mf(i)),o=!0)}),o?yf(n):{x:0,y:0,width:0,height:0}},hf=(e,t,[n,o,i]=[0,0,1],a=!1,l=!1)=>{let r={...Yl(t,[n,o,i]),width:t.width/i,height:t.height/i},s=[];for(let u of e.values()){let{measured:c,selectable:d=!0,hidden:f=!1}=u;if(l&&!d||f)continue;let h=c.width??u.width??u.initialWidth??null,v=c.height??u.height??u.initialHeight??null,b=Il(r,Ca(u)),S=(h??0)*(v??0),p=a&&b>0;(!u.internals.handleBounds||p||b>=S||u.dragging)&&s.push(u)}return s},zx=(e,t)=>{let n=new Set;return e.forEach(o=>{n.add(o.id)}),t.filter(o=>n.has(o.source)||n.has(o.target))};function lM(e,t){let n=new Map,o=t?.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&(t?.includeHiddenNodes||!i.hidden)&&(!o||o.has(i.id))&&n.set(i.id,i)}),n}async function Lx({nodes:e,width:t,height:n,panZoom:o,minZoom:i,maxZoom:a},l){if(e.size===0)return Promise.resolve(!0);let r=lM(e,l),s=Ul(r),u=Bs(s,t,n,l?.minZoom??i,l?.maxZoom??a,l?.padding??.1);return await o.setViewport(u,{duration:l?.duration,ease:l?.ease,interpolate:l?.interpolate}),Promise.resolve(!0)}function lh({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:i,onError:a}){let l=n.get(e),r=l.parentId?n.get(l.parentId):void 0,{x:s,y:u}=r?r.internals.positionAbsolute:{x:0,y:0},c=l.origin??o,d=l.extent||i;if(l.extent==="parent"&&!l.expandParent)if(!r)a?.("005",Mn.error005());else{let h=r.measured.width,v=r.measured.height;h&&v&&(d=[[s,u],[s+h,u+v]])}else r&&Gl(l.extent)&&(d=[[l.extent[0][0]+s,l.extent[0][1]+u],[l.extent[1][0]+s,l.extent[1][1]+u]]);let f=Gl(d)?Na(t,d,l.measured):t;return(l.measured.width===void 0||l.measured.height===void 0)&&a?.("015",Mn.error015()),{position:{x:f.x-s+(l.measured.width??0)*c[0],y:f.y-u+(l.measured.height??0)*c[1]},positionAbsolute:f}}async function Hx({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:i}){let a=new Set(e.map(f=>f.id)),l=[];for(let f of n){if(f.deletable===!1)continue;let h=a.has(f.id),v=!h&&f.parentId&&l.find(b=>b.id===f.parentId);(h||v)&&l.push(f)}let r=new Set(t.map(f=>f.id)),s=o.filter(f=>f.deletable!==!1),c=zx(l,s);for(let f of s)r.has(f.id)&&!c.find(v=>v.id===f.id)&&c.push(f);if(!i)return{edges:c,nodes:l};let d=await i({nodes:l,edges:c});return typeof d=="boolean"?d?{edges:c,nodes:l}:{edges:[],nodes:[]}:d}var kl=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Na=(e={x:0,y:0},t,n)=>({x:kl(e.x,t[0][0],t[1][0]-(n?.width??0)),y:kl(e.y,t[0][1],t[1][1]-(n?.height??0))});function Bx(e,t,n){let{width:o,height:i}=_o(n),{x:a,y:l}=n.internals.positionAbsolute;return Na(e,[[a,l],[a+o,l+i]],t)}var Sx=(e,t,n)=>e<t?kl(Math.abs(e-t),1,t)/t:e>n?-kl(Math.abs(e-n),1,t)/t:0,kx=(e,t,n=15,o=40)=>{let i=Sx(e.x,o,t.width-o)*n,a=Sx(e.y,o,t.height-o)*n;return[i,a]},gf=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Wm=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),yf=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),Ca=(e,t=[0,0])=>{let{x:n,y:o}=ih(e)?e.internals.positionAbsolute:Hs(e,t);return{x:n,y:o,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},mf=(e,t=[0,0])=>{let{x:n,y:o}=ih(e)?e.internals.positionAbsolute:Hs(e,t);return{x:n,y:o,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:o+(e.measured?.height??e.height??e.initialHeight??0)}},rh=(e,t)=>yf(gf(Wm(e),Wm(t))),Il=(e,t)=>{let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)},sh=e=>qn(e.width)&&qn(e.height)&&qn(e.x)&&qn(e.y),qn=e=>!isNaN(e)&&isFinite(e),uh=(e,t)=>{},Vl=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Yl=({x:e,y:t},[n,o,i],a=!1,l=[1,1])=>{let r={x:(e-n)/i,y:(t-o)/i};return a?Vl(r,l):r},Ls=({x:e,y:t},[n,o,i])=>({x:e*i+n,y:t*i+o});function Ll(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function rM(e,t,n){if(typeof e=="string"||typeof e=="number"){let o=Ll(e,n),i=Ll(e,t);return{top:o,right:i,bottom:o,left:i,x:i*2,y:o*2}}if(typeof e=="object"){let o=Ll(e.top??e.y??0,n),i=Ll(e.bottom??e.y??0,n),a=Ll(e.left??e.x??0,t),l=Ll(e.right??e.x??0,t);return{top:o,right:l,bottom:i,left:a,x:a+l,y:o+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function sM(e,t,n,o,i,a){let{x:l,y:r}=Ls(e,[t,n,o]),{x:s,y:u}=Ls({x:e.x+e.width,y:e.y+e.height},[t,n,o]),c=i-s,d=a-u;return{left:Math.floor(l),top:Math.floor(r),right:Math.floor(c),bottom:Math.floor(d)}}var Bs=(e,t,n,o,i,a)=>{let l=rM(a,t,n),r=(t-l.x)/e.width,s=(n-l.y)/e.height,u=Math.min(r,s),c=kl(u,o,i),d=e.x+e.width/2,f=e.y+e.height/2,h=t/2-d*c,v=n/2-f*c,b=sM(e,h,v,c,t,n),S={left:Math.min(b.left-l.left,0),top:Math.min(b.top-l.top,0),right:Math.min(b.right-l.right,0),bottom:Math.min(b.bottom-l.bottom,0)};return{x:h-S.left+S.right,y:v-S.top+S.bottom,zoom:c}},Xl=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function Gl(e){return e!=null&&e!=="parent"}function _o(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function ch(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function fh(e,t={width:0,height:0},n,o,i){let a={...e},l=o.get(n);if(l){let r=l.origin||i;a.x+=l.internals.positionAbsolute.x-(t.width??0)*r[0],a.y+=l.internals.positionAbsolute.y-(t.height??0)*r[1]}return a}function dh(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Gx(){let e,t;return{promise:new Promise((o,i)=>{e=o,t=i}),resolve:e,reject:t}}function Px(e){return{...eh,...e||{}}}function zs(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:i}){let{x:a,y:l}=Zn(e),r=Yl({x:a-(i?.left??0),y:l-(i?.top??0)},o),{x:s,y:u}=n?Vl(r,t):r;return{xSnapped:s,ySnapped:u,...r}}var vf=e=>({width:e.offsetWidth,height:e.offsetHeight}),ph=e=>e?.getRootNode?.()||window?.document,uM=["INPUT","SELECT","TEXTAREA"];function mh(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:uM.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}var hh=e=>"clientX"in e,Zn=(e,t)=>{let n=hh(e),o=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:o-(t?.left??0),y:i-(t?.top??0)}},xx=(e,t,n,o,i)=>{let a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(l=>{let r=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),type:e,nodeId:i,position:l.getAttribute("data-handlepos"),x:(r.left-n.left)/o,y:(r.top-n.top)/o,...vf(l)}})};function bf({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:i,sourceControlY:a,targetControlX:l,targetControlY:r}){let s=e*.125+i*.375+l*.375+n*.125,u=t*.125+a*.375+r*.375+o*.125,c=Math.abs(s-e),d=Math.abs(u-t);return[s,u,c,d]}function df(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function _x({pos:e,x1:t,y1:n,x2:o,y2:i,c:a}){switch(e){case W.Left:return[t-df(t-o,a),n];case W.Right:return[t+df(o-t,a),n];case W.Top:return[t,n-df(n-i,a)];case W.Bottom:return[t,n+df(i-n,a)]}}function Sf({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top,curvature:l=.25}){let[r,s]=_x({pos:n,x1:e,y1:t,x2:o,y2:i,c:l}),[u,c]=_x({pos:a,x1:o,y1:i,x2:e,y2:t,c:l}),[d,f,h,v]=bf({sourceX:e,sourceY:t,targetX:o,targetY:i,sourceControlX:r,sourceControlY:s,targetControlX:u,targetControlY:c});return[`M${e},${t} C${r},${s} ${u},${c} ${o},${i}`,d,f,h,v]}function gh({sourceX:e,sourceY:t,targetX:n,targetY:o}){let i=Math.abs(n-e)/2,a=n<e?n+i:n-i,l=Math.abs(o-t)/2,r=o<t?o+l:o-l;return[a,r,i,l]}function Ux({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o=0,elevateOnSelect:i=!1,zIndexMode:a="basic"}){if(a==="manual")return o;let l=i&&n?o+1e3:o,r=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return l+r}function Ix({sourceNode:e,targetNode:t,width:n,height:o,transform:i}){let a=gf(mf(e),mf(t));a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);let l={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:o/i[2]};return Il(l,yf(a))>0}var cM=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,fM=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),yh=(e,t,n={})=>{if(!e.source||!e.target)return uh("006",Mn.error006()),t;let o=n.getEdgeId||cM,i;return oh(e)?i={...e}:i={...e,id:o(e)},fM(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function xf({sourceX:e,sourceY:t,targetX:n,targetY:o}){let[i,a,l,r]=gh({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,i,a,l,r]}var Ex={[W.Left]:{x:-1,y:0},[W.Right]:{x:1,y:0},[W.Top]:{x:0,y:-1},[W.Bottom]:{x:0,y:1}},dM=({source:e,sourcePosition:t=W.Bottom,target:n})=>t===W.Left||t===W.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},Tx=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function pM({source:e,sourcePosition:t=W.Bottom,target:n,targetPosition:o=W.Top,center:i,offset:a,stepPosition:l}){let r=Ex[t],s=Ex[o],u={x:e.x+r.x*a,y:e.y+r.y*a},c={x:n.x+s.x*a,y:n.y+s.y*a},d=dM({source:u,sourcePosition:t,target:c}),f=d.x!==0?"x":"y",h=d[f],v=[],b,S,p={x:0,y:0},y={x:0,y:0},[,,m,g]=gh({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(r[f]*s[f]===-1){f==="x"?(b=i.x??u.x+(c.x-u.x)*l,S=i.y??(u.y+c.y)/2):(b=i.x??(u.x+c.x)/2,S=i.y??u.y+(c.y-u.y)*l);let _=[{x:b,y:u.y},{x:b,y:c.y}],E=[{x:u.x,y:S},{x:c.x,y:S}];r[f]===h?v=f==="x"?_:E:v=f==="x"?E:_}else{let _=[{x:u.x,y:c.y}],E=[{x:c.x,y:u.y}];if(f==="x"?v=r.x===h?E:_:v=r.y===h?_:E,t===o){let z=Math.abs(e[f]-n[f]);if(z<=a){let P=Math.min(a-1,a-z);r[f]===h?p[f]=(u[f]>e[f]?-1:1)*P:y[f]=(c[f]>n[f]?-1:1)*P}}if(t!==o){let z=f==="x"?"y":"x",P=r[f]===s[z],T=u[z]>c[z],A=u[z]<c[z];(r[f]===1&&(!P&&T||P&&A)||r[f]!==1&&(!P&&A||P&&T))&&(v=f==="x"?_:E)}let w={x:u.x+p.x,y:u.y+p.y},N={x:c.x+y.x,y:c.y+y.y},k=Math.max(Math.abs(w.x-v[0].x),Math.abs(N.x-v[0].x)),D=Math.max(Math.abs(w.y-v[0].y),Math.abs(N.y-v[0].y));k>=D?(b=(w.x+N.x)/2,S=v[0].y):(b=v[0].x,S=(w.y+N.y)/2)}return[[e,{x:u.x+p.x,y:u.y+p.y},...v,{x:c.x+y.x,y:c.y+y.y},n],b,S,m,g]}function mM(e,t,n,o){let i=Math.min(Tx(e,t)/2,Tx(t,n)/2,o),{x:a,y:l}=t;if(e.x===a&&a===n.x||e.y===l&&l===n.y)return`L${a} ${l}`;if(e.y===l){let u=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${a+i*u},${l}Q ${a},${l} ${a},${l+i*c}`}let r=e.x<n.x?1:-1,s=e.y<n.y?-1:1;return`L ${a},${l+i*s}Q ${a},${l} ${a+i*r},${l}`}function ks({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top,borderRadius:l=5,centerX:r,centerY:s,offset:u=20,stepPosition:c=.5}){let[d,f,h,v,b]=pM({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:i},targetPosition:a,center:{x:r,y:s},offset:u,stepPosition:c});return[d.reduce((p,y,m)=>{let g="";return m>0&&m<d.length-1?g=mM(d[m-1],y,d[m+1],l):g=`${m===0?"M":"L"}${y.x} ${y.y}`,p+=g,p},""),f,h,v,b]}function Nx(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function Vx(e){let{sourceNode:t,targetNode:n}=e;if(!Nx(t)||!Nx(n))return null;let o=t.internals.handleBounds||Cx(t.handles),i=n.internals.handleBounds||Cx(n.handles),a=wx(o?.source??[],e.sourceHandle),l=wx(e.connectionMode===Vi.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!l)return e.onError?.("008",Mn.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let r=a?.position||W.Bottom,s=l?.position||W.Top,u=Yi(t,a,r),c=Yi(n,l,s);return{sourceX:u.x,sourceY:u.y,targetX:c.x,targetY:c.y,sourcePosition:r,targetPosition:s}}function Cx(e){if(!e)return null;let t=[],n=[];for(let o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?t.push(o):o.type==="target"&&n.push(o);return{source:t,target:n}}function Yi(e,t,n=W.Left,o=!1){let i=(t?.x??0)+e.internals.positionAbsolute.x,a=(t?.y??0)+e.internals.positionAbsolute.y,{width:l,height:r}=t??_o(e);if(o)return{x:i+l/2,y:a+r/2};switch(t?.position??n){case W.Top:return{x:i+l/2,y:a};case W.Right:return{x:i+l,y:a+r/2};case W.Bottom:return{x:i+l/2,y:a+r};case W.Left:return{x:i,y:a+r/2}}}function wx(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function _f(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function Yx(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:i}){let a=new Set;return e.reduce((l,r)=>([r.markerStart||o,r.markerEnd||i].forEach(s=>{if(s&&typeof s=="object"){let u=_f(s,t);a.has(u)||(l.push({id:u,color:s.color||n,...s}),a.add(u))}}),l),[]).sort((l,r)=>l.id.localeCompare(r.id))}var Xx=1e3,hM=10,vh={nodeOrigin:[0,0],nodeExtent:Pl,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},gM={...vh,checkEquality:!0};function bh(e,t){let n={...e};for(let o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function qx(e,t,n){let o=bh(vh,n);for(let i of e.values())if(i.parentId)xh(i,e,t,o);else{let a=Hs(i,o.nodeOrigin),l=Gl(i.extent)?i.extent:o.nodeExtent,r=Na(a,l,_o(i));i.internals.positionAbsolute=r}}function yM(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],o=[];for(let i of e.handles){let a={id:i.id,width:i.width??1,height:i.height??1,nodeId:e.id,x:i.x,y:i.y,position:i.position,type:i.type};i.type==="source"?n.push(a):i.type==="target"&&o.push(a)}return{source:n,target:o}}function Sh(e){return e==="manual"}function Ef(e,t,n,o={}){let i=bh(gM,o),a={i:0},l=new Map(t),r=i?.elevateNodesOnSelect&&!Sh(i.zIndexMode)?Xx:0,s=e.length>0;t.clear(),n.clear();for(let u of e){let c=l.get(u.id);if(i.checkEquality&&u===c?.internals.userNode)t.set(u.id,c);else{let d=Hs(u,i.nodeOrigin),f=Gl(u.extent)?u.extent:i.nodeExtent,h=Na(d,f,_o(u));c={...i.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:h,handleBounds:yM(u,c),z:Zx(u,r,i.zIndexMode),userNode:u}},t.set(u.id,c)}(c.measured===void 0||c.measured.width===void 0||c.measured.height===void 0)&&!c.hidden&&(s=!1),u.parentId&&xh(c,t,n,o,a)}return s}function vM(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function xh(e,t,n,o,i){let{elevateNodesOnSelect:a,nodeOrigin:l,nodeExtent:r,zIndexMode:s}=bh(vh,o),u=e.parentId,c=t.get(u);if(!c){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}vM(e,n),i&&!c.parentId&&c.internals.rootParentIndex===void 0&&s==="auto"&&(c.internals.rootParentIndex=++i.i,c.internals.z=c.internals.z+i.i*hM),i&&c.internals.rootParentIndex!==void 0&&(i.i=c.internals.rootParentIndex);let d=a&&!Sh(s)?Xx:0,{x:f,y:h,z:v}=bM(e,c,l,r,d,s),{positionAbsolute:b}=e.internals,S=f!==b.x||h!==b.y;(S||v!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:S?{x:f,y:h}:b,z:v}})}function Zx(e,t,n){let o=qn(e.zIndex)?e.zIndex:0;return Sh(n)?o:o+(e.selected?t:0)}function bM(e,t,n,o,i,a){let{x:l,y:r}=t.internals.positionAbsolute,s=_o(e),u=Hs(e,n),c=Gl(e.extent)?Na(u,e.extent,s):u,d=Na({x:l+c.x,y:r+c.y},o,s);e.extent==="parent"&&(d=Bx(d,s,t));let f=Zx(e,i,a),h=t.internals.z??0;return{x:d.x,y:d.y,z:h>=f?h+1:f}}function Tf(e,t,n,o=[0,0]){let i=[],a=new Map;for(let l of e){let r=t.get(l.parentId);if(!r)continue;let s=a.get(l.parentId)?.expandedRect??Ca(r),u=rh(s,l.rect);a.set(l.parentId,{expandedRect:u,parent:r})}return a.size>0&&a.forEach(({expandedRect:l,parent:r},s)=>{let u=r.internals.positionAbsolute,c=_o(r),d=r.origin??o,f=l.x<u.x?Math.round(Math.abs(u.x-l.x)):0,h=l.y<u.y?Math.round(Math.abs(u.y-l.y)):0,v=Math.max(c.width,Math.round(l.width)),b=Math.max(c.height,Math.round(l.height)),S=(v-c.width)*d[0],p=(b-c.height)*d[1];(f>0||h>0||S||p)&&(i.push({id:s,type:"position",position:{x:r.position.x-f+S,y:r.position.y-h+p}}),n.get(s)?.forEach(y=>{e.some(m=>m.id===y.id)||i.push({id:y.id,type:"position",position:{x:y.position.x+f,y:y.position.y+h}})})),(c.width<l.width||c.height<l.height||f||h)&&i.push({id:s,type:"dimensions",setAttributes:!0,dimensions:{width:v+(f?d[0]*f-S:0),height:b+(h?d[1]*h-p:0)}})}),i}function jx(e,t,n,o,i,a,l){let r=o?.querySelector(".xyflow__viewport"),s=!1;if(!r)return{changes:[],updatedInternals:s};let u=[],c=window.getComputedStyle(r),{m22:d}=new window.DOMMatrixReadOnly(c.transform),f=[];for(let h of e.values()){let v=t.get(h.id);if(!v)continue;if(v.hidden){t.set(v.id,{...v,internals:{...v.internals,handleBounds:void 0}}),s=!0;continue}let b=vf(h.nodeElement),S=v.measured.width!==b.width||v.measured.height!==b.height;if(!!(b.width&&b.height&&(S||!v.internals.handleBounds||h.force))){let y=h.nodeElement.getBoundingClientRect(),m=Gl(v.extent)?v.extent:a,{positionAbsolute:g}=v.internals;v.parentId&&v.extent==="parent"?g=Bx(g,b,t.get(v.parentId)):m&&(g=Na(g,m,b));let x={...v,measured:b,internals:{...v.internals,positionAbsolute:g,handleBounds:{source:xx("source",h.nodeElement,y,d,v.id),target:xx("target",h.nodeElement,y,d,v.id)}}};t.set(v.id,x),v.parentId&&xh(x,t,n,{nodeOrigin:i,zIndexMode:l}),s=!0,S&&(u.push({id:v.id,type:"dimensions",dimensions:b}),v.expandParent&&v.parentId&&f.push({id:v.id,parentId:v.parentId,rect:Ca(x,i)}))}}if(f.length>0){let h=Tf(f,t,n,i);u.push(...h)}return{changes:u,updatedInternals:s}}async function $x({delta:e,panZoom:t,transform:n,translateExtent:o,width:i,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);let l=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],o),r=!!l&&(l.x!==n[0]||l.y!==n[1]||l.k!==n[2]);return Promise.resolve(r)}function Ax(e,t,n,o,i,a){let l=i,r=o.get(l)||new Map;o.set(l,r.set(n,t)),l=`${i}-${e}`;let s=o.get(l)||new Map;if(o.set(l,s.set(n,t)),a){l=`${i}-${e}-${a}`;let u=o.get(l)||new Map;o.set(l,u.set(n,t))}}function _h(e,t,n){e.clear(),t.clear();for(let o of n){let{source:i,target:a,sourceHandle:l=null,targetHandle:r=null}=o,s={edgeId:o.id,source:i,target:a,sourceHandle:l,targetHandle:r},u=`${i}-${l}--${a}-${r}`,c=`${a}-${r}--${i}-${l}`;Ax("source",s,c,e,i,l),Ax("target",s,u,e,a,r),t.set(o.id,o)}}function Kx(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:Kx(n,t):!1}function Mx(e,t,n){let o=e;do{if(o?.matches?.(t))return!0;if(o===n)return!1;o=o?.parentElement}while(o);return!1}function SM(e,t,n,o){let i=new Map;for(let[a,l]of e)if((l.selected||l.id===o)&&(!l.parentId||!Kx(l,e))&&(l.draggable||t&&typeof l.draggable>"u")){let r=e.get(a);r&&i.set(a,{id:a,position:r.position||{x:0,y:0},distance:{x:n.x-r.internals.positionAbsolute.x,y:n.y-r.internals.positionAbsolute.y},extent:r.extent,parentId:r.parentId,origin:r.origin,expandParent:r.expandParent,internals:{positionAbsolute:r.internals.positionAbsolute||{x:0,y:0}},measured:{width:r.measured.width??0,height:r.measured.height??0}})}return i}function Km({nodeId:e,dragItems:t,nodeLookup:n,dragging:o=!0}){let i=[];for(let[l,r]of t){let s=n.get(l)?.internals.userNode;s&&i.push({...s,position:r.position,dragging:o})}if(!e)return[i[0],i];let a=n.get(e)?.internals.userNode;return[a?{...a,position:t.get(e)?.position||a.position,dragging:o}:i[0],i]}function xM({dragItems:e,snapGrid:t,x:n,y:o}){let i=e.values().next().value;if(!i)return null;let a={x:n-i.distance.x,y:o-i.distance.y},l=Vl(a,t);return{x:l.x-a.x,y:l.y-a.y}}function Qx({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:o,onDragStop:i}){let a={x:null,y:null},l=0,r=new Map,s=!1,u={x:0,y:0},c=null,d=!1,f=null,h=!1,v=!1,b=null;function S({noDragClassName:y,handleSelector:m,domNode:g,isSelectable:x,nodeId:_,nodeClickDistance:E=0}){f=Tt(g);function w({x:z,y:P}){let{nodeLookup:T,nodeExtent:A,snapGrid:M,snapToGrid:O,nodeOrigin:R,onNodeDrag:L,onSelectionDrag:V,onError:G,updateNodePositions:I}=t();a={x:z,y:P};let q=!1,j=r.size>1,$=j&&A?Wm(Ul(r)):null,fe=j&&O?xM({dragItems:r,snapGrid:M,x:z,y:P}):null;for(let[J,X]of r){if(!T.has(J))continue;let Q={x:z-X.distance.x,y:P-X.distance.y};O&&(Q=fe?{x:Math.round(Q.x+fe.x),y:Math.round(Q.y+fe.y)}:Vl(Q,M));let ye=null;if(j&&A&&!X.extent&&$){let{positionAbsolute:ae}=X.internals,se=ae.x-$.x+A[0][0],de=ae.x+X.measured.width-$.x2+A[1][0],Se=ae.y-$.y+A[0][1],Ae=ae.y+X.measured.height-$.y2+A[1][1];ye=[[se,Se],[de,Ae]]}let{position:me,positionAbsolute:ee}=lh({nodeId:J,nextPosition:Q,nodeLookup:T,nodeExtent:ye||A,nodeOrigin:R,onError:G});q=q||X.position.x!==me.x||X.position.y!==me.y,X.position=me,X.internals.positionAbsolute=ee}if(v=v||q,!!q&&(I(r,!0),b&&(o||L||!_&&V))){let[J,X]=Km({nodeId:_,dragItems:r,nodeLookup:T});o?.(b,r,J,X),L?.(b,J,X),_||V?.(b,X)}}async function N(){if(!c)return;let{transform:z,panBy:P,autoPanSpeed:T,autoPanOnNodeDrag:A}=t();if(!A){s=!1,cancelAnimationFrame(l);return}let[M,O]=kx(u,c,T);(M!==0||O!==0)&&(a.x=(a.x??0)-M/z[2],a.y=(a.y??0)-O/z[2],await P({x:M,y:O})&&w(a)),l=requestAnimationFrame(N)}function k(z){let{nodeLookup:P,multiSelectionActive:T,nodesDraggable:A,transform:M,snapGrid:O,snapToGrid:R,selectNodesOnDrag:L,onNodeDragStart:V,onSelectionDragStart:G,unselectNodesAndEdges:I}=t();d=!0,(!L||!x)&&!T&&_&&(P.get(_)?.selected||I()),x&&L&&_&&e?.(_);let q=zs(z.sourceEvent,{transform:M,snapGrid:O,snapToGrid:R,containerBounds:c});if(a=q,r=SM(P,A,q,_),r.size>0&&(n||V||!_&&G)){let[j,$]=Km({nodeId:_,dragItems:r,nodeLookup:P});n?.(z.sourceEvent,r,j,$),V?.(z.sourceEvent,j,$),_||G?.(z.sourceEvent,$)}}let D=Yc().clickDistance(E).on("start",z=>{let{domNode:P,nodeDragThreshold:T,transform:A,snapGrid:M,snapToGrid:O}=t();c=P?.getBoundingClientRect()||null,h=!1,v=!1,b=z.sourceEvent,T===0&&k(z),a=zs(z.sourceEvent,{transform:A,snapGrid:M,snapToGrid:O,containerBounds:c}),u=Zn(z.sourceEvent,c)}).on("drag",z=>{let{autoPanOnNodeDrag:P,transform:T,snapGrid:A,snapToGrid:M,nodeDragThreshold:O,nodeLookup:R}=t(),L=zs(z.sourceEvent,{transform:T,snapGrid:A,snapToGrid:M,containerBounds:c});if(b=z.sourceEvent,(z.sourceEvent.type==="touchmove"&&z.sourceEvent.touches.length>1||_&&!R.has(_))&&(h=!0),!h){if(!s&&P&&d&&(s=!0,N()),!d){let V=Zn(z.sourceEvent,c),G=V.x-u.x,I=V.y-u.y;Math.sqrt(G*G+I*I)>O&&k(z)}(a.x!==L.xSnapped||a.y!==L.ySnapped)&&r&&d&&(u=Zn(z.sourceEvent,c),w(L))}}).on("end",z=>{if(!(!d||h)&&(s=!1,d=!1,cancelAnimationFrame(l),r.size>0)){let{nodeLookup:P,updateNodePositions:T,onNodeDragStop:A,onSelectionDragStop:M}=t();if(v&&(T(r,!1),v=!1),i||A||!_&&M){let[O,R]=Km({nodeId:_,dragItems:r,nodeLookup:P,dragging:!1});i?.(z.sourceEvent,r,O,R),A?.(z.sourceEvent,O,R),_||M?.(z.sourceEvent,R)}}}).filter(z=>{let P=z.target;return!z.button&&(!y||!Mx(P,`.${y}`,g))&&(!m||Mx(P,m,g))});f.call(D)}function p(){f?.on(".drag",null)}return{update:S,destroy:p}}function _M(e,t,n){let o=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let a of t.values())Il(i,Ca(a))>0&&o.push(a);return o}var EM=250;function TM(e,t,n,o){let i=[],a=1/0,l=_M(e,n,t+EM);for(let r of l){let s=[...r.internals.handleBounds?.source??[],...r.internals.handleBounds?.target??[]];for(let u of s){if(o.nodeId===u.nodeId&&o.type===u.type&&o.id===u.id)continue;let{x:c,y:d}=Yi(r,u,u.position,!0),f=Math.sqrt(Math.pow(c-e.x,2)+Math.pow(d-e.y,2));f>t||(f<a?(i=[{...u,x:c,y:d}],a=f):f===a&&i.push({...u,x:c,y:d}))}}if(!i.length)return null;if(i.length>1){let r=o.type==="source"?"target":"source";return i.find(s=>s.type===r)??i[0]}return i[0]}function Fx(e,t,n,o,i,a=!1){let l=o.get(e);if(!l)return null;let r=i==="strict"?l.internals.handleBounds?.[t]:[...l.internals.handleBounds?.source??[],...l.internals.handleBounds?.target??[]],s=(n?r?.find(u=>u.id===n):r?.[0])??null;return s&&a?{...s,...Yi(l,s,s.position,!0)}:s}function Wx(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function NM(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var Jx=()=>!0;function CM(e,{connectionMode:t,connectionRadius:n,handleId:o,nodeId:i,edgeUpdaterType:a,isTarget:l,domNode:r,nodeLookup:s,lib:u,autoPanOnConnect:c,flowId:d,panBy:f,cancelConnection:h,onConnectStart:v,onConnect:b,onConnectEnd:S,isValidConnection:p=Jx,onReconnectEnd:y,updateConnection:m,getTransform:g,getFromHandle:x,autoPanSpeed:_,dragThreshold:E=1,handleDomNode:w}){let N=ph(e.target),k=0,D,{x:z,y:P}=Zn(e),T=Wx(a,w),A=r?.getBoundingClientRect(),M=!1;if(!A||!T)return;let O=Fx(i,T,o,s,t);if(!O)return;let R=Zn(e,A),L=!1,V=null,G=!1,I=null;function q(){if(!c||!A)return;let[me,ee]=kx(R,A,_);f({x:me,y:ee}),k=requestAnimationFrame(q)}let j={...O,nodeId:i,type:T,position:O.position},$=s.get(i),J={inProgress:!0,isValid:null,from:Yi($,j,W.Left,!0),fromHandle:j,fromPosition:j.position,fromNode:$,to:R,toHandle:null,toPosition:bx[j.position],toNode:null,pointer:R};function X(){M=!0,m(J),v?.(e,{nodeId:i,handleId:o,handleType:T})}E===0&&X();function Q(me){if(!M){let{x:Ae,y:rt}=Zn(me),Nt=Ae-z,Ct=rt-P;if(!(Nt*Nt+Ct*Ct>E*E))return;X()}if(!x()||!j){ye(me);return}let ee=g();R=Zn(me,A),D=TM(Yl(R,ee,!1,[1,1]),n,s,j),L||(q(),L=!0);let ae=e_(me,{handle:D,connectionMode:t,fromNodeId:i,fromHandleId:o,fromType:l?"target":"source",isValidConnection:p,doc:N,lib:u,flowId:d,nodeLookup:s});I=ae.handleDomNode,V=ae.connection,G=NM(!!D,ae.isValid);let se=s.get(i),de=se?Yi(se,j,W.Left,!0):J.from,Se={...J,from:de,isValid:G,to:ae.toHandle&&G?Ls({x:ae.toHandle.x,y:ae.toHandle.y},ee):R,toHandle:ae.toHandle,toPosition:G&&ae.toHandle?ae.toHandle.position:bx[j.position],toNode:ae.toHandle?s.get(ae.toHandle.nodeId):null,pointer:R};m(Se),J=Se}function ye(me){if(!("touches"in me&&me.touches.length>0)){if(M){(D||I)&&V&&G&&b?.(V);let{inProgress:ee,...ae}=J,se={...ae,toPosition:J.toHandle?J.toPosition:null};S?.(me,se),a&&y?.(me,se)}h(),cancelAnimationFrame(k),L=!1,G=!1,V=null,I=null,N.removeEventListener("mousemove",Q),N.removeEventListener("mouseup",ye),N.removeEventListener("touchmove",Q),N.removeEventListener("touchend",ye)}}N.addEventListener("mousemove",Q),N.addEventListener("mouseup",ye),N.addEventListener("touchmove",Q),N.addEventListener("touchend",ye)}function e_(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:i,fromType:a,doc:l,lib:r,flowId:s,isValidConnection:u=Jx,nodeLookup:c}){let d=a==="target",f=t?l.querySelector(`.${r}-flow__handle[data-id="${s}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:h,y:v}=Zn(e),b=l.elementFromPoint(h,v),S=b?.classList.contains(`${r}-flow__handle`)?b:f,p={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){let y=Wx(void 0,S),m=S.getAttribute("data-nodeid"),g=S.getAttribute("data-handleid"),x=S.classList.contains("connectable"),_=S.classList.contains("connectableend");if(!m||!y)return p;let E={source:d?m:o,sourceHandle:d?g:i,target:d?o:m,targetHandle:d?i:g};p.connection=E;let N=x&&_&&(n===Vi.Strict?d&&y==="source"||!d&&y==="target":m!==o||g!==i);p.isValid=N&&u(E),p.toHandle=Fx(m,y,g,c,n,!0)}return p}var Nf={onPointerDown:CM,isValid:e_};function t_({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){let i=Tt(e);function a({translateExtent:r,width:s,height:u,zoomStep:c=1,pannable:d=!0,zoomable:f=!0,inversePan:h=!1}){let v=m=>{if(m.sourceEvent.type!=="wheel"||!t)return;let g=n(),x=m.sourceEvent.ctrlKey&&Xl()?10:1,_=-m.sourceEvent.deltaY*(m.sourceEvent.deltaMode===1?.05:m.sourceEvent.deltaMode?1:.002)*c,E=g[2]*Math.pow(2,_*x);t.scaleTo(E)},b=[0,0],S=m=>{(m.sourceEvent.type==="mousedown"||m.sourceEvent.type==="touchstart")&&(b=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY])},p=m=>{let g=n();if(m.sourceEvent.type!=="mousemove"&&m.sourceEvent.type!=="touchmove"||!t)return;let x=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY],_=[x[0]-b[0],x[1]-b[1]];b=x;let E=o()*Math.max(g[2],Math.log(g[2]))*(h?-1:1),w={x:g[0]-_[0]*E,y:g[1]-_[1]*E},N=[[0,0],[s,u]];t.setViewportConstrained({x:w.x,y:w.y,zoom:g[2]},N,r)},y=ff().on("start",S).on("zoom",d?p:null).on("zoom.wheel",f?v:null);i.call(y,{})}function l(){i.on("zoom",null)}return{update:a,destroy:l,pointer:qt}}var Cf=e=>({x:e.x,y:e.y,zoom:e.k}),Qm=({x:e,y:t,zoom:n})=>Ea.translate(e,t).scale(n),Hl=(e,t)=>e.target.closest(`.${t}`),n_=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),wM=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Fm=(e,t=0,n=wM,o=()=>{})=>{let i=typeof t=="number"&&t>0;return i||o(),i?e.transition().duration(t).ease(n).on("end",o):e},o_=e=>{let t=e.ctrlKey&&Xl()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function AM({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:l,onPanZoomStart:r,onPanZoom:s,onPanZoomEnd:u}){return c=>{if(Hl(c,t))return c.ctrlKey&&c.preventDefault(),!1;c.preventDefault(),c.stopImmediatePropagation();let d=n.property("__zoom").k||1;if(c.ctrlKey&&l){let S=qt(c),p=o_(c),y=d*Math.pow(2,p);o.scaleTo(n,y,S,c);return}let f=c.deltaMode===1?20:1,h=i===ti.Vertical?0:c.deltaX*f,v=i===ti.Horizontal?0:c.deltaY*f;!Xl()&&c.shiftKey&&i!==ti.Vertical&&(h=c.deltaY*f,v=0),o.translateBy(n,-(h/d)*a,-(v/d)*a,{internal:!0});let b=Cf(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(s?.(c,b),e.panScrollTimeout=setTimeout(()=>{u?.(c,b),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,r?.(c,b))}}function MM({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,i){let a=o.type==="wheel",l=!t&&a&&!o.ctrlKey,r=Hl(o,e);if(o.ctrlKey&&a&&r&&o.preventDefault(),l||r)return null;o.preventDefault(),n.call(this,o,i)}}function DM({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{if(o.sourceEvent?.internal)return;let i=Cf(o.transform);e.mouseButton=o.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,o.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(o.sourceEvent,i)}}function RM({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&n_(t,e.mouseButton??0)),a.sourceEvent?.sync||o([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,Cf(a.transform))}}function OM({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:i,onPaneContextMenu:a}){return l=>{if(!l.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&n_(t,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&a(l.sourceEvent),e.usedRightMouseButton=!1,o(!1),i)){let r=Cf(l.transform);e.prevViewport=r,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(l.sourceEvent,r)},n?150:0)}}}function zM({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:o,panOnScroll:i,zoomOnDoubleClick:a,userSelectionActive:l,noWheelClassName:r,noPanClassName:s,lib:u,connectionInProgress:c}){return d=>{let f=e||t,h=n&&d.ctrlKey,v=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&(Hl(d,`${u}-flow__node`)||Hl(d,`${u}-flow__edge`)))return!0;if(!o&&!f&&!i&&!a&&!n||l||c&&!v||Hl(d,r)&&v||Hl(d,s)&&(!v||i&&v&&!e)||!n&&d.ctrlKey&&v)return!1;if(!n&&d.type==="touchstart"&&d.touches?.length>1)return d.preventDefault(),!1;if(!f&&!i&&!h&&v||!o&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(o)&&!o.includes(d.button)&&d.type==="mousedown")return!1;let b=Array.isArray(o)&&o.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||v)&&b}}function i_({domNode:e,minZoom:t,maxZoom:n,translateExtent:o,viewport:i,onPanZoom:a,onPanZoomStart:l,onPanZoomEnd:r,onDraggingChange:s}){let u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},c=e.getBoundingClientRect(),d=ff().scaleExtent([t,n]).translateExtent(o),f=Tt(e).call(d);y({x:i.x,y:i.y,zoom:kl(i.zoom,t,n)},[[0,0],[c.width,c.height]],o);let h=f.on("wheel.zoom"),v=f.on("dblclick.zoom");d.wheelDelta(o_);function b(D,z){return f?new Promise(P=>{d?.interpolate(z?.interpolate==="linear"?Jo:Sa).transform(Fm(f,z?.duration,z?.ease,()=>P(!0)),D)}):Promise.resolve(!1)}function S({noWheelClassName:D,noPanClassName:z,onPaneContextMenu:P,userSelectionActive:T,panOnScroll:A,panOnDrag:M,panOnScrollMode:O,panOnScrollSpeed:R,preventScrolling:L,zoomOnPinch:V,zoomOnScroll:G,zoomOnDoubleClick:I,zoomActivationKeyPressed:q,lib:j,onTransformChange:$,connectionInProgress:fe,paneClickDistance:J,selectionOnDrag:X}){T&&!u.isZoomingOrPanning&&p();let Q=A&&!q&&!T;d.clickDistance(X?1/0:!qn(J)||J<0?0:J);let ye=Q?AM({zoomPanValues:u,noWheelClassName:D,d3Selection:f,d3Zoom:d,panOnScrollMode:O,panOnScrollSpeed:R,zoomOnPinch:V,onPanZoomStart:l,onPanZoom:a,onPanZoomEnd:r}):MM({noWheelClassName:D,preventScrolling:L,d3ZoomHandler:h});if(f.on("wheel.zoom",ye,{passive:!1}),!T){let ee=DM({zoomPanValues:u,onDraggingChange:s,onPanZoomStart:l});d.on("start",ee);let ae=RM({zoomPanValues:u,panOnDrag:M,onPaneContextMenu:!!P,onPanZoom:a,onTransformChange:$});d.on("zoom",ae);let se=OM({zoomPanValues:u,panOnDrag:M,panOnScroll:A,onPaneContextMenu:P,onPanZoomEnd:r,onDraggingChange:s});d.on("end",se)}let me=zM({zoomActivationKeyPressed:q,panOnDrag:M,zoomOnScroll:G,panOnScroll:A,zoomOnDoubleClick:I,zoomOnPinch:V,userSelectionActive:T,noPanClassName:z,noWheelClassName:D,lib:j,connectionInProgress:fe});d.filter(me),I?f.on("dblclick.zoom",v):f.on("dblclick.zoom",null)}function p(){d.on("zoom",null)}async function y(D,z,P){let T=Qm(D),A=d?.constrain()(T,z,P);return A&&await b(A),new Promise(M=>M(A))}async function m(D,z){let P=Qm(D);return await b(P,z),new Promise(T=>T(P))}function g(D){if(f){let z=Qm(D),P=f.property("__zoom");(P.k!==D.zoom||P.x!==D.x||P.y!==D.y)&&d?.transform(f,z,null,{sync:!0})}}function x(){let D=f?Os(f.node()):{x:0,y:0,k:1};return{x:D.x,y:D.y,zoom:D.k}}function _(D,z){return f?new Promise(P=>{d?.interpolate(z?.interpolate==="linear"?Jo:Sa).scaleTo(Fm(f,z?.duration,z?.ease,()=>P(!0)),D)}):Promise.resolve(!1)}function E(D,z){return f?new Promise(P=>{d?.interpolate(z?.interpolate==="linear"?Jo:Sa).scaleBy(Fm(f,z?.duration,z?.ease,()=>P(!0)),D)}):Promise.resolve(!1)}function w(D){d?.scaleExtent(D)}function N(D){d?.translateExtent(D)}function k(D){let z=!qn(D)||D<0?0:D;d?.clickDistance(z)}return{update:S,destroy:p,setViewport:m,setViewportConstrained:y,getViewport:x,scaleTo:_,scaleBy:E,setScaleExtent:w,setTranslateExtent:N,syncViewport:g,setClickDistance:k}}var Xi;(function(e){e.Line="line",e.Handle="handle"})(Xi||(Xi={}));function LM({width:e,prevWidth:t,height:n,prevHeight:o,affectsX:i,affectsY:a}){let l=e-t,r=n-o,s=[l>0?1:l<0?-1:0,r>0?1:r<0?-1:0];return l&&i&&(s[0]=s[0]*-1),r&&a&&(s[1]=s[1]*-1),s}function Dx(e){let t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),o=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:o,affectsY:i}}function Ui(e,t){return Math.max(0,t-e)}function Ii(e,t){return Math.max(0,e-t)}function pf(e,t,n){return Math.max(0,t-e,e-n)}function Rx(e,t){return e?!t:t}function HM(e,t,n,o,i,a,l,r){let{affectsX:s,affectsY:u}=t,{isHorizontal:c,isVertical:d}=t,f=c&&d,{xSnapped:h,ySnapped:v}=n,{minWidth:b,maxWidth:S,minHeight:p,maxHeight:y}=o,{x:m,y:g,width:x,height:_,aspectRatio:E}=e,w=Math.floor(c?h-e.pointerX:0),N=Math.floor(d?v-e.pointerY:0),k=x+(s?-w:w),D=_+(u?-N:N),z=-a[0]*x,P=-a[1]*_,T=pf(k,b,S),A=pf(D,p,y);if(l){let R=0,L=0;s&&w<0?R=Ui(m+w+z,l[0][0]):!s&&w>0&&(R=Ii(m+k+z,l[1][0])),u&&N<0?L=Ui(g+N+P,l[0][1]):!u&&N>0&&(L=Ii(g+D+P,l[1][1])),T=Math.max(T,R),A=Math.max(A,L)}if(r){let R=0,L=0;s&&w>0?R=Ii(m+w,r[0][0]):!s&&w<0&&(R=Ui(m+k,r[1][0])),u&&N>0?L=Ii(g+N,r[0][1]):!u&&N<0&&(L=Ui(g+D,r[1][1])),T=Math.max(T,R),A=Math.max(A,L)}if(i){if(c){let R=pf(k/E,p,y)*E;if(T=Math.max(T,R),l){let L=0;!s&&!u||s&&!u&&f?L=Ii(g+P+k/E,l[1][1])*E:L=Ui(g+P+(s?w:-w)/E,l[0][1])*E,T=Math.max(T,L)}if(r){let L=0;!s&&!u||s&&!u&&f?L=Ui(g+k/E,r[1][1])*E:L=Ii(g+(s?w:-w)/E,r[0][1])*E,T=Math.max(T,L)}}if(d){let R=pf(D*E,b,S)/E;if(A=Math.max(A,R),l){let L=0;!s&&!u||u&&!s&&f?L=Ii(m+D*E+z,l[1][0])/E:L=Ui(m+(u?N:-N)*E+z,l[0][0])/E,A=Math.max(A,L)}if(r){let L=0;!s&&!u||u&&!s&&f?L=Ui(m+D*E,r[1][0])/E:L=Ii(m+(u?N:-N)*E,r[0][0])/E,A=Math.max(A,L)}}}N=N+(N<0?A:-A),w=w+(w<0?T:-T),i&&(f?k>D*E?N=(Rx(s,u)?-w:w)/E:w=(Rx(s,u)?-N:N)*E:c?(N=w/E,u=s):(w=N*E,s=u));let M=s?m+w:m,O=u?g+N:g;return{width:x+(s?-w:w),height:_+(u?-N:N),x:a[0]*w*(s?-1:1)+M,y:a[1]*N*(u?-1:1)+O}}var a_={width:0,height:0,x:0,y:0},BM={...a_,pointerX:0,pointerY:0,aspectRatio:1};function kM(e){return[[0,0],[e.measured.width,e.measured.height]]}function GM(e,t,n){let o=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,l=e.measured.height??0,r=n[0]*a,s=n[1]*l;return[[o-r,i-s],[o+a-r,i+l-s]]}function l_({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:i}){let a=Tt(e),l={controlDirection:Dx("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function r({controlPosition:u,boundaries:c,keepAspectRatio:d,resizeDirection:f,onResizeStart:h,onResize:v,onResizeEnd:b,shouldResize:S}){let p={...a_},y={...BM};l={boundaries:c,resizeDirection:f,keepAspectRatio:d,controlDirection:Dx(u)};let m,g=null,x=[],_,E,w,N=!1,k=Yc().on("start",D=>{let{nodeLookup:z,transform:P,snapGrid:T,snapToGrid:A,nodeOrigin:M,paneDomNode:O}=n();if(m=z.get(t),!m)return;g=O?.getBoundingClientRect()??null;let{xSnapped:R,ySnapped:L}=zs(D.sourceEvent,{transform:P,snapGrid:T,snapToGrid:A,containerBounds:g});p={width:m.measured.width??0,height:m.measured.height??0,x:m.position.x??0,y:m.position.y??0},y={...p,pointerX:R,pointerY:L,aspectRatio:p.width/p.height},_=void 0,m.parentId&&(m.extent==="parent"||m.expandParent)&&(_=z.get(m.parentId),E=_&&m.extent==="parent"?kM(_):void 0),x=[],w=void 0;for(let[V,G]of z)if(G.parentId===t&&(x.push({id:V,position:{...G.position},extent:G.extent}),G.extent==="parent"||G.expandParent)){let I=GM(G,m,G.origin??M);w?w=[[Math.min(I[0][0],w[0][0]),Math.min(I[0][1],w[0][1])],[Math.max(I[1][0],w[1][0]),Math.max(I[1][1],w[1][1])]]:w=I}h?.(D,{...p})}).on("drag",D=>{let{transform:z,snapGrid:P,snapToGrid:T,nodeOrigin:A}=n(),M=zs(D.sourceEvent,{transform:z,snapGrid:P,snapToGrid:T,containerBounds:g}),O=[];if(!m)return;let{x:R,y:L,width:V,height:G}=p,I={},q=m.origin??A,{width:j,height:$,x:fe,y:J}=HM(y,l.controlDirection,M,l.boundaries,l.keepAspectRatio,q,E,w),X=j!==V,Q=$!==G,ye=fe!==R&&X,me=J!==L&&Q;if(!ye&&!me&&!X&&!Q)return;if((ye||me||q[0]===1||q[1]===1)&&(I.x=ye?fe:p.x,I.y=me?J:p.y,p.x=I.x,p.y=I.y,x.length>0)){let de=fe-R,Se=J-L;for(let Ae of x)Ae.position={x:Ae.position.x-de+q[0]*(j-V),y:Ae.position.y-Se+q[1]*($-G)},O.push(Ae)}if((X||Q)&&(I.width=X&&(!l.resizeDirection||l.resizeDirection==="horizontal")?j:p.width,I.height=Q&&(!l.resizeDirection||l.resizeDirection==="vertical")?$:p.height,p.width=I.width,p.height=I.height),_&&m.expandParent){let de=q[0]*(I.width??0);I.x&&I.x<de&&(p.x=de,y.x=y.x-(I.x-de));let Se=q[1]*(I.height??0);I.y&&I.y<Se&&(p.y=Se,y.y=y.y-(I.y-Se))}let ee=LM({width:p.width,prevWidth:V,height:p.height,prevHeight:G,affectsX:l.controlDirection.affectsX,affectsY:l.controlDirection.affectsY}),ae={...p,direction:ee};S?.(D,ae)!==!1&&(N=!0,v?.(D,ae),o(I,O))}).on("end",D=>{N&&(b?.(D,{...p}),i?.({...p}),N=!1)});a.call(k)}function s(){a.on(".drag",null)}return{update:r,destroy:s}}var b_=oe(wt(),1),S_=oe(m_(),1);var g_={},h_=e=>{let t,n=new Set,o=(c,d)=>{let f=typeof c=="function"?c(t):c;if(!Object.is(f,t)){let h=t;t=d??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(v=>v(t,h))}},i=()=>t,s={setState:o,getState:i,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(g_.env?g_.env.MODE: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."),n.clear()}},u=t=e(o,i,s);return s},y_=e=>e?h_(e):h_;var{useDebugValue:nD}=b_.default,{useSyncExternalStoreWithSelector:oD}=S_.default,iD=e=>e;function Th(e,t=iD,n){let o=oD(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return nD(o),o}var v_=(e,t)=>{let n=y_(e),o=(i,a=t)=>Th(n,i,a);return Object.assign(o,n),o},x_=(e,t)=>e?v_(e,t):v_;function je(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[o,i]of e)if(!Object.is(i,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let o of e)if(!t.has(o))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let o of n)if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1;return!0}var aD=oe(ud()),Rf=(0,B.createContext)(null),lD=Rf.Provider,q_=Mn.error001();function we(e,t){let n=(0,B.useContext)(Rf);if(n===null)throw new Error(q_);return Th(n,e,t)}function Qe(){let e=(0,B.useContext)(Rf);if(e===null)throw new Error(q_);return(0,B.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var __={display:"none"},rD={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Z_="react-flow__node-desc",j_="react-flow__edge-desc",sD="react-flow__aria-live",uD=e=>e.ariaLiveMessage,cD=e=>e.ariaLabelConfig;function fD({rfId:e}){let t=we(uD);return(0,H.jsx)("div",{id:`${sD}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:rD,children:t})}function dD({rfId:e,disableKeyboardA11y:t}){let n=we(cD);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("div",{id:`${Z_}-${e}`,style:__,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,H.jsx)("div",{id:`${j_}-${e}`,style:__,children:n["edge.a11yDescription.default"]}),!t&&(0,H.jsx)(fD,{rfId:e})]})}var Of=(0,B.forwardRef)(({position:e="top-left",children:t,className:n,style:o,...i},a)=>{let l=`${e}`.split("-");return(0,H.jsx)("div",{className:nt(["react-flow__panel",n,...l]),style:o,ref:a,...i,children:t})});Of.displayName="Panel";function pD({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,H.jsx)(Of,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:(0,H.jsx)("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}var mD=e=>{let t=[],n=[];for(let[,o]of e.nodeLookup)o.selected&&t.push(o.internals.userNode);for(let[,o]of e.edgeLookup)o.selected&&n.push(o);return{selectedNodes:t,selectedEdges:n}},Af=e=>e.id;function hD(e,t){return je(e.selectedNodes.map(Af),t.selectedNodes.map(Af))&&je(e.selectedEdges.map(Af),t.selectedEdges.map(Af))}function gD({onSelectionChange:e}){let t=Qe(),{selectedNodes:n,selectedEdges:o}=we(mD,hD);return(0,B.useEffect)(()=>{let i={nodes:n,edges:o};e?.(i),t.getState().onSelectionChangeHandlers.forEach(a=>a(i))},[n,o,e]),null}var yD=e=>!!e.onSelectionChangeHandlers;function vD({onSelectionChange:e}){let t=we(yD);return e||t?(0,H.jsx)(gD,{onSelectionChange:e}):null}var $_=[0,0],bD={x:0,y:0,zoom:1},SD=["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"],E_=[...SD,"rfId"],xD=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),T_={translateExtent:Pl,nodeOrigin:$_,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function _D(e){let{setNodes:t,setEdges:n,setMinZoom:o,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:l,reset:r,setDefaultNodesAndEdges:s}=we(xD,je),u=Qe();(0,B.useEffect)(()=>(s(e.defaultNodes,e.defaultEdges),()=>{c.current=T_,r()}),[]);let c=(0,B.useRef)(T_);return(0,B.useEffect)(()=>{for(let d of E_){let f=e[d],h=c.current[d];f!==h&&(typeof e[d]>"u"||(d==="nodes"?t(f):d==="edges"?n(f):d==="minZoom"?o(f):d==="maxZoom"?i(f):d==="translateExtent"?a(f):d==="nodeExtent"?l(f):d==="ariaLabelConfig"?u.setState({ariaLabelConfig:Px(f)}):d==="fitView"?u.setState({fitViewQueued:f}):d==="fitViewOptions"?u.setState({fitViewOptions:f}):u.setState({[d]:f})))}c.current=e},E_.map(d=>e[d])),null}function N_(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function ED(e){let[t,n]=(0,B.useState)(e==="system"?null:e);return(0,B.useEffect)(()=>{if(e!=="system"){n(e);return}let o=N_(),i=()=>n(o?.matches?"dark":"light");return i(),o?.addEventListener("change",i),()=>{o?.removeEventListener("change",i)}},[e]),t!==null?t:N_()?.matches?"dark":"light"}var C_=typeof document<"u"?document:null;function Gs(e=null,t={target:C_,actInsideInputWithModifier:!0}){let[n,o]=(0,B.useState)(!1),i=(0,B.useRef)(!1),a=(0,B.useRef)(new Set([])),[l,r]=(0,B.useMemo)(()=>{if(e!==null){let u=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.replace("+",`
|
|
2481
|
+
`+o.stack}}var Qd=Object.prototype.hasOwnProperty,Ip=gt.unstable_scheduleCallback,md=gt.unstable_cancelCallback,T2=gt.unstable_shouldYield,N2=gt.unstable_requestPaint,bn=gt.unstable_now,C2=gt.unstable_getCurrentPriorityLevel,z0=gt.unstable_ImmediatePriority,L0=gt.unstable_UserBlockingPriority,Yu=gt.unstable_NormalPriority,w2=gt.unstable_LowPriority,B0=gt.unstable_IdlePriority,A2=gt.log,M2=gt.unstable_setDisableYieldValue,ts=null,Sn=null;function bi(e){if(typeof A2=="function"&&M2(e),Sn&&typeof Sn.setStrictMode=="function")try{Sn.setStrictMode(ts,e)}catch{}}var xn=Math.clz32?Math.clz32:O2,D2=Math.log,R2=Math.LN2;function O2(e){return e>>>=0,e===0?32:31-(D2(e)/R2|0)|0}var su=256,uu=262144,cu=4194304;function Qi(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function hc(e,t,n){var o=e.pendingLanes;if(o===0)return 0;var i=0,a=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var r=o&134217727;return r!==0?(o=r&~a,o!==0?i=Qi(o):(l&=r,l!==0?i=Qi(l):n||(n=r&~e,n!==0&&(i=Qi(n))))):(r=o&~a,r!==0?i=Qi(r):l!==0?i=Qi(l):n||(n=o&~e,n!==0&&(i=Qi(n)))),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&(n&4194048)!==0)?t:i}function ns(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function z2(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function H0(){var e=cu;return cu<<=1,(cu&62914560)===0&&(cu=4194304),e}function hd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function os(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function L2(e,t,n,o,i,a){var l=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var r=e.entanglements,s=e.expirationTimes,u=e.hiddenUpdates;for(n=l&~n;0<n;){var c=31-xn(n),d=1<<c;r[c]=0,s[c]=-1;var f=u[c];if(f!==null)for(u[c]=null,c=0;c<f.length;c++){var h=f[c];h!==null&&(h.lane&=-536870913)}n&=~d}o!==0&&P0(e,o,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(l&~t))}function P0(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-xn(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|n&261930}function k0(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var o=31-xn(n),i=1<<o;i&t|e[o]&t&&(e[o]|=t),n&=~i}}function G0(e,t){var n=t&-t;return n=(n&42)!==0?1:Vp(n),(n&(e.suspendedLanes|t))!==0?0:n}function Vp(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Yp(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function U0(){var e=De.p;return e!==0?e:(e=window.event,e===void 0?32:u1(e.type))}function ay(e,t){var n=De.p;try{return De.p=e,t()}finally{De.p=n}}var Pi=Math.random().toString(36).slice(2),Dt="__reactFiber$"+Pi,ln="__reactProps$"+Pi,Nl="__reactContainer$"+Pi,Wd="__reactEvents$"+Pi,B2="__reactListeners$"+Pi,H2="__reactHandles$"+Pi,ly="__reactResources$"+Pi,is="__reactMarker$"+Pi;function Xp(e){delete e[Dt],delete e[ln],delete e[Wd],delete e[B2],delete e[H2]}function Qa(e){var t=e[Dt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Nl]||n[Dt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=m0(e);e!==null;){if(n=e[Dt])return n;e=m0(e)}return t}e=n,n=e.parentNode}return null}function Cl(e){if(e=e[Dt]||e[Nl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Tr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(U(33))}function rl(e){var t=e[ly];return t||(t=e[ly]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Tt(e){e[is]=!0}var I0=new Set,V0={};function ca(e,t){hl(e,t),hl(e+"Capture",t)}function hl(e,t){for(V0[e]=t,e=0;e<t.length;e++)I0.add(t[e])}var P2=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]*$"),ry={},sy={};function k2(e){return Qd.call(sy,e)?!0:Qd.call(ry,e)?!1:P2.test(e)?sy[e]=!0:(ry[e]=!0,!1)}function Nu(e,t,n){if(k2(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var o=t.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function fu(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Oo(e,t,n,o){if(o===null)e.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+o)}}function Bn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Y0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function G2(e,t,n){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var i=o.get,a=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){n=""+l,a.call(this,l)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return n},setValue:function(l){n=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Jd(e){if(!e._valueTracker){var t=Y0(e)?"checked":"value";e._valueTracker=G2(e,t,""+e[t])}}function X0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=Y0(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function Xu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var U2=/[\n"\\]/g;function kn(e){return e.replace(U2,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ep(e,t,n,o,i,a,l,r){e.name="",l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.type=l:e.removeAttribute("type"),t!=null?l==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Bn(t)):e.value!==""+Bn(t)&&(e.value=""+Bn(t)):l!=="submit"&&l!=="reset"||e.removeAttribute("value"),t!=null?tp(e,l,Bn(t)):n!=null?tp(e,l,Bn(n)):o!=null&&e.removeAttribute("value"),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.name=""+Bn(r):e.removeAttribute("name")}function q0(e,t,n,o,i,a,l,r){if(a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.type=a),t!=null||n!=null){if(!(a!=="submit"&&a!=="reset"||t!=null)){Jd(e);return}n=n!=null?""+Bn(n):"",t=t!=null?""+Bn(t):n,r||t===e.value||(e.value=t),e.defaultValue=t}o=o??i,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=r?e.checked:!!o,e.defaultChecked=!!o,l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.name=l),Jd(e)}function tp(e,t,n){t==="number"&&Xu(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function sl(e,t,n,o){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&o&&(e[n].defaultSelected=!0)}else{for(n=""+Bn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,o&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Z0(e,t,n){if(t!=null&&(t=""+Bn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Bn(n):""}function j0(e,t,n,o){if(t==null){if(o!=null){if(n!=null)throw Error(U(92));if(Er(o)){if(1<o.length)throw Error(U(93));o=o[0]}n=o}n==null&&(n=""),t=n}n=Bn(t),e.defaultValue=n,o=e.textContent,o===n&&o!==""&&o!==null&&(e.value=o),Jd(e)}function gl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var I2=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 uy(e,t,n){var o=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,n):typeof n!="number"||n===0||I2.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function $0(e,t,n){if(t!=null&&typeof t!="object")throw Error(U(62));if(e=e.style,n!=null){for(var o in n)!n.hasOwnProperty(o)||t!=null&&t.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var i in t)o=t[i],t.hasOwnProperty(i)&&n[i]!==o&&uy(e,i,o)}else for(var a in t)t.hasOwnProperty(a)&&uy(e,a,t[a])}function qp(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var V2=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"]]),Y2=/^[\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 Cu(e){return Y2.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Uo(){}var np=null;function Zp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wa=null,ul=null;function cy(e){var t=Cl(e);if(t&&(e=t.stateNode)){var n=e[ln]||null;e:switch(e=t.stateNode,t.type){case"input":if(ep(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+kn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var i=o[ln]||null;if(!i)throw Error(U(90));ep(o,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)o=n[t],o.form===e.form&&X0(o)}break e;case"textarea":Z0(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&sl(e,!!n.multiple,t,!1)}}}var gd=!1;function F0(e,t,n){if(gd)return e(t,n);gd=!0;try{var o=e(t);return o}finally{if(gd=!1,(Wa!==null||ul!==null)&&(wc(),Wa&&(t=Wa,e=ul,ul=Wa=null,cy(t),e)))for(t=0;t<e.length;t++)cy(e[t])}}function Ir(e,t){var n=e.stateNode;if(n===null)return null;var o=n[ln]||null;if(o===null)return null;n=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(U(231,t,typeof n));return n}var qo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),op=!1;if(qo)try{Xa={},Object.defineProperty(Xa,"passive",{get:function(){op=!0}}),window.addEventListener("test",Xa,Xa),window.removeEventListener("test",Xa,Xa)}catch{op=!1}var Xa,Si=null,jp=null,wu=null;function K0(){if(wu)return wu;var e,t=jp,n=t.length,o,i="value"in Si?Si.value:Si.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var l=n-e;for(o=1;o<=l&&t[n-o]===i[a-o];o++);return wu=i.slice(e,1<o?1-o:void 0)}function Au(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function du(){return!0}function fy(){return!1}function rn(e){function t(n,o,i,a,l){this._reactName=n,this._targetInst=i,this.type=o,this.nativeEvent=a,this.target=l,this.currentTarget=null;for(var r in e)e.hasOwnProperty(r)&&(n=e[r],this[r]=n?n(a):a[r]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?du:fy,this.isPropagationStopped=fy,this}return Ze(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=du)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=du)},persist:function(){},isPersistent:du}),t}var fa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gc=rn(fa),as=Ze({},fa,{view:0,detail:0}),X2=rn(as),yd,vd,gr,yc=Ze({},as,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$p,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==gr&&(gr&&e.type==="mousemove"?(yd=e.screenX-gr.screenX,vd=e.screenY-gr.screenY):vd=yd=0,gr=e),yd)},movementY:function(e){return"movementY"in e?e.movementY:vd}}),dy=rn(yc),q2=Ze({},yc,{dataTransfer:0}),Z2=rn(q2),j2=Ze({},as,{relatedTarget:0}),bd=rn(j2),$2=Ze({},fa,{animationName:0,elapsedTime:0,pseudoElement:0}),F2=rn($2),K2=Ze({},fa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Q2=rn(K2),W2=Ze({},fa,{data:0}),py=rn(W2),J2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eN={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"},tN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nN(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=tN[e])?!!t[e]:!1}function $p(){return nN}var oN=Ze({},as,{key:function(e){if(e.key){var t=J2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Au(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?eN[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$p,charCode:function(e){return e.type==="keypress"?Au(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Au(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),iN=rn(oN),aN=Ze({},yc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),my=rn(aN),lN=Ze({},as,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$p}),rN=rn(lN),sN=Ze({},fa,{propertyName:0,elapsedTime:0,pseudoElement:0}),uN=rn(sN),cN=Ze({},yc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),fN=rn(cN),dN=Ze({},fa,{newState:0,oldState:0}),pN=rn(dN),mN=[9,13,27,32],Fp=qo&&"CompositionEvent"in window,wr=null;qo&&"documentMode"in document&&(wr=document.documentMode);var hN=qo&&"TextEvent"in window&&!wr,Q0=qo&&(!Fp||wr&&8<wr&&11>=wr),hy=" ",gy=!1;function W0(e,t){switch(e){case"keyup":return mN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function J0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ja=!1;function gN(e,t){switch(e){case"compositionend":return J0(t);case"keypress":return t.which!==32?null:(gy=!0,hy);case"textInput":return e=t.data,e===hy&&gy?null:e;default:return null}}function yN(e,t){if(Ja)return e==="compositionend"||!Fp&&W0(e,t)?(e=K0(),wu=jp=Si=null,Ja=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Q0&&t.locale!=="ko"?null:t.data;default:return null}}var vN={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function yy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!vN[e.type]:t==="textarea"}function ev(e,t,n,o){Wa?ul?ul.push(o):ul=[o]:Wa=o,t=sc(t,"onChange"),0<t.length&&(n=new gc("onChange","change",null,n,o),e.push({event:n,listeners:t}))}var Ar=null,Vr=null;function bN(e){Fb(e,0)}function vc(e){var t=Tr(e);if(X0(t))return e}function vy(e,t){if(e==="change")return t}var tv=!1;qo&&(qo?(mu="oninput"in document,mu||(Sd=document.createElement("div"),Sd.setAttribute("oninput","return;"),mu=typeof Sd.oninput=="function"),pu=mu):pu=!1,tv=pu&&(!document.documentMode||9<document.documentMode));var pu,mu,Sd;function by(){Ar&&(Ar.detachEvent("onpropertychange",nv),Vr=Ar=null)}function nv(e){if(e.propertyName==="value"&&vc(Vr)){var t=[];ev(t,Vr,e,Zp(e)),F0(bN,t)}}function SN(e,t,n){e==="focusin"?(by(),Ar=t,Vr=n,Ar.attachEvent("onpropertychange",nv)):e==="focusout"&&by()}function xN(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vc(Vr)}function _N(e,t){if(e==="click")return vc(t)}function EN(e,t){if(e==="input"||e==="change")return vc(t)}function TN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var En=typeof Object.is=="function"?Object.is:TN;function Yr(e,t){if(En(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(o=0;o<n.length;o++){var i=n[o];if(!Qd.call(t,i)||!En(e[i],t[i]))return!1}return!0}function Sy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xy(e,t){var n=Sy(e);e=0;for(var o;n;){if(n.nodeType===3){if(o=e+n.textContent.length,e<=t&&o>=t)return{node:n,offset:t-e};e=o}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Sy(n)}}function ov(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ov(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function iv(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Xu(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Xu(e.document)}return t}function Kp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var NN=qo&&"documentMode"in document&&11>=document.documentMode,el=null,ip=null,Mr=null,ap=!1;function _y(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ap||el==null||el!==Xu(o)||(o=el,"selectionStart"in o&&Kp(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Mr&&Yr(Mr,o)||(Mr=o,o=sc(ip,"onSelect"),0<o.length&&(t=new gc("onSelect","select",null,t,n),e.push({event:t,listeners:o}),t.target=el)))}function Fi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var tl={animationend:Fi("Animation","AnimationEnd"),animationiteration:Fi("Animation","AnimationIteration"),animationstart:Fi("Animation","AnimationStart"),transitionrun:Fi("Transition","TransitionRun"),transitionstart:Fi("Transition","TransitionStart"),transitioncancel:Fi("Transition","TransitionCancel"),transitionend:Fi("Transition","TransitionEnd")},xd={},av={};qo&&(av=document.createElement("div").style,"AnimationEvent"in window||(delete tl.animationend.animation,delete tl.animationiteration.animation,delete tl.animationstart.animation),"TransitionEvent"in window||delete tl.transitionend.transition);function da(e){if(xd[e])return xd[e];if(!tl[e])return e;var t=tl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in av)return xd[e]=t[n];return e}var lv=da("animationend"),rv=da("animationiteration"),sv=da("animationstart"),CN=da("transitionrun"),wN=da("transitionstart"),AN=da("transitioncancel"),uv=da("transitionend"),cv=new Map,lp="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(" ");lp.push("scrollEnd");function eo(e,t){cv.set(e,t),ca(t,[e])}var qu=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Ln=[],nl=0,Qp=0;function bc(){for(var e=nl,t=Qp=nl=0;t<e;){var n=Ln[t];Ln[t++]=null;var o=Ln[t];Ln[t++]=null;var i=Ln[t];Ln[t++]=null;var a=Ln[t];if(Ln[t++]=null,o!==null&&i!==null){var l=o.pending;l===null?i.next=i:(i.next=l.next,l.next=i),o.pending=i}a!==0&&fv(n,i,a)}}function Sc(e,t,n,o){Ln[nl++]=e,Ln[nl++]=t,Ln[nl++]=n,Ln[nl++]=o,Qp|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Wp(e,t,n,o){return Sc(e,t,n,o),Zu(e)}function pa(e,t){return Sc(e,null,null,t),Zu(e)}function fv(e,t,n){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,o=a.alternate,o!==null&&(o.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-xn(n),e=a.hiddenUpdates,o=e[i],o===null?e[i]=[t]:o.push(t),t.lane=n|536870912),a):null}function Zu(e){if(50<kr)throw kr=0,wp=null,Error(U(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ol={};function MN(e,t,n,o){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yn(e,t,n,o){return new MN(e,t,n,o)}function Jp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Vo(e,t){var n=e.alternate;return n===null?(n=yn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function dv(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Mu(e,t,n,o,i,a){var l=0;if(o=e,typeof e=="function")Jp(e)&&(l=1);else if(typeof e=="string")l=OC(e,n,mo.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case jd:return e=yn(31,n,t,i),e.elementType=jd,e.lanes=a,e;case Fa:return ta(n.children,i,a,t);case R0:l=8,i|=24;break;case Xd:return e=yn(12,n,t,i|2),e.elementType=Xd,e.lanes=a,e;case qd:return e=yn(13,n,t,i),e.elementType=qd,e.lanes=a,e;case Zd:return e=yn(19,n,t,i),e.elementType=Zd,e.lanes=a,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Go:l=10;break e;case O0:l=9;break e;case Gp:l=11;break e;case Up:l=14;break e;case pi:l=16,o=null;break e}l=29,n=Error(U(130,e===null?"null":typeof e,"")),o=null}return t=yn(l,n,t,i),t.elementType=e,t.type=o,t.lanes=a,t}function ta(e,t,n,o){return e=yn(7,e,o,t),e.lanes=n,e}function _d(e,t,n){return e=yn(6,e,null,t),e.lanes=n,e}function pv(e){var t=yn(18,null,null,0);return t.stateNode=e,t}function Ed(e,t,n){return t=yn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ey=new WeakMap;function Gn(e,t){if(typeof e=="object"&&e!==null){var n=Ey.get(e);return n!==void 0?n:(t={value:e,source:t,stack:iy(t)},Ey.set(e,t),t)}return{value:e,source:t,stack:iy(t)}}var il=[],al=0,ju=null,Xr=0,Hn=[],Pn=0,zi=null,co=1,fo="";function Po(e,t){il[al++]=Xr,il[al++]=ju,ju=e,Xr=t}function mv(e,t,n){Hn[Pn++]=co,Hn[Pn++]=fo,Hn[Pn++]=zi,zi=e;var o=co;e=fo;var i=32-xn(o)-1;o&=~(1<<i),n+=1;var a=32-xn(t)+i;if(30<a){var l=i-i%5;a=(o&(1<<l)-1).toString(32),o>>=l,i-=l,co=1<<32-xn(t)+i|n<<i|o,fo=a+e}else co=1<<a|n<<i|o,fo=e}function em(e){e.return!==null&&(Po(e,1),mv(e,1,0))}function tm(e){for(;e===ju;)ju=il[--al],il[al]=null,Xr=il[--al],il[al]=null;for(;e===zi;)zi=Hn[--Pn],Hn[Pn]=null,fo=Hn[--Pn],Hn[Pn]=null,co=Hn[--Pn],Hn[Pn]=null}function hv(e,t){Hn[Pn++]=co,Hn[Pn++]=fo,Hn[Pn++]=zi,co=t.id,fo=t.overflow,zi=e}var Rt=null,qe=null,Ce=!1,Ni=null,Un=!1,rp=Error(U(519));function Li(e){var t=Error(U(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw qr(Gn(t,e)),rp}function Ty(e){var t=e.stateNode,n=e.type,o=e.memoizedProps;switch(t[Dt]=e,t[ln]=o,n){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(n=0;n<Fr.length;n++)xe(Fr[n],t);break;case"source":xe("error",t);break;case"img":case"image":case"link":xe("error",t),xe("load",t);break;case"details":xe("toggle",t);break;case"input":xe("invalid",t),q0(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),j0(t,o.value,o.defaultValue,o.children)}n=o.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||o.suppressHydrationWarning===!0||Qb(t.textContent,n)?(o.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),o.onScroll!=null&&xe("scroll",t),o.onScrollEnd!=null&&xe("scrollend",t),o.onClick!=null&&(t.onclick=Uo),t=!0):t=!1,t||Li(e,!0)}function Ny(e){for(Rt=e.return;Rt;)switch(Rt.tag){case 5:case 31:case 13:Un=!1;return;case 27:case 3:Un=!0;return;default:Rt=Rt.return}}function qa(e){if(e!==Rt)return!1;if(!Ce)return Ny(e),Ce=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Op(e.type,e.memoizedProps)),n=!n),n&&qe&&Li(e),Ny(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));qe=p0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));qe=p0(e)}else t===27?(t=qe,ki(e.type)?(e=Hp,Hp=null,qe=e):qe=t):qe=Rt?Vn(e.stateNode.nextSibling):null;return!0}function aa(){qe=Rt=null,Ce=!1}function Td(){var e=Ni;return e!==null&&(on===null?on=e:on.push.apply(on,e),Ni=null),e}function qr(e){Ni===null?Ni=[e]:Ni.push(e)}var sp=ho(null),ma=null,Io=null;function hi(e,t,n){Ie(sp,t._currentValue),t._currentValue=n}function Yo(e){e._currentValue=sp.current,Nt(sp)}function up(e,t,n){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===n)break;e=e.return}}function cp(e,t,n,o){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var l=i.child;a=a.firstContext;e:for(;a!==null;){var r=a;a=i;for(var s=0;s<t.length;s++)if(r.context===t[s]){a.lanes|=n,r=a.alternate,r!==null&&(r.lanes|=n),up(a.return,n,e),o||(l=null);break e}a=r.next}}else if(i.tag===18){if(l=i.return,l===null)throw Error(U(341));l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),up(l,n,e),l=null}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===e){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}}function wl(e,t,n,o){e=null;for(var i=t,a=!1;i!==null;){if(!a){if((i.flags&524288)!==0)a=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var l=i.alternate;if(l===null)throw Error(U(387));if(l=l.memoizedProps,l!==null){var r=i.type;En(i.pendingProps.value,l.value)||(e!==null?e.push(r):e=[r])}}else if(i===Uu.current){if(l=i.alternate,l===null)throw Error(U(387));l.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Qr):e=[Qr])}i=i.return}e!==null&&cp(t,e,n,o),t.flags|=262144}function $u(e){for(e=e.firstContext;e!==null;){if(!En(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function la(e){ma=e,Io=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ot(e){return gv(ma,e)}function hu(e,t){return ma===null&&la(e),gv(e,t)}function gv(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Io===null){if(e===null)throw Error(U(308));Io=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Io=Io.next=t;return n}var DN=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,o){e.push(o)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},RN=gt.unstable_scheduleCallback,ON=gt.unstable_NormalPriority,ct={$$typeof:Go,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function nm(){return{controller:new DN,data:new Map,refCount:0}}function ls(e){e.refCount--,e.refCount===0&&RN(ON,function(){e.controller.abort()})}var Dr=null,fp=0,yl=0,cl=null;function zN(e,t){if(Dr===null){var n=Dr=[];fp=0,yl=wm(),cl={status:"pending",value:void 0,then:function(o){n.push(o)}}}return fp++,t.then(Cy,Cy),t}function Cy(){if(--fp===0&&Dr!==null){cl!==null&&(cl.status="fulfilled");var e=Dr;Dr=null,yl=0,cl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function LN(e,t){var n=[],o={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(o.status="rejected",o.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),o}var wy=ce.S;ce.S=function(e,t){Db=bn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&zN(e,t),wy!==null&&wy(e,t)};var na=ho(null);function om(){var e=na.current;return e!==null?e:Ue.pooledCache}function Du(e,t){t===null?Ie(na,na.current):Ie(na,t.pool)}function yv(){var e=om();return e===null?null:{parent:ct._currentValue,pool:e}}var Al=Error(U(460)),im=Error(U(474)),xc=Error(U(542)),Fu={then:function(){}};function Ay(e){return e=e.status,e==="fulfilled"||e==="rejected"}function vv(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Uo,Uo),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Dy(e),e;default:if(typeof t.status=="string")t.then(Uo,Uo);else{if(e=Ue,e!==null&&100<e.shellSuspendCounter)throw Error(U(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=o}},function(o){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Dy(e),e}throw oa=t,Al}}function Wi(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(oa=n,Al):n}}var oa=null;function My(){if(oa===null)throw Error(U(459));var e=oa;return oa=null,e}function Dy(e){if(e===Al||e===xc)throw Error(U(483))}var fl=null,Zr=0;function gu(e){var t=Zr;return Zr+=1,fl===null&&(fl=[]),vv(fl,e,t)}function yr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function yu(e,t){throw t.$$typeof===S2?Error(U(525)):(e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function bv(e){function t(p,y){if(e){var m=p.deletions;m===null?(p.deletions=[y],p.flags|=16):m.push(y)}}function n(p,y){if(!e)return null;for(;y!==null;)t(p,y),y=y.sibling;return null}function o(p){for(var y=new Map;p!==null;)p.key!==null?y.set(p.key,p):y.set(p.index,p),p=p.sibling;return y}function i(p,y){return p=Vo(p,y),p.index=0,p.sibling=null,p}function a(p,y,m){return p.index=m,e?(m=p.alternate,m!==null?(m=m.index,m<y?(p.flags|=67108866,y):m):(p.flags|=67108866,y)):(p.flags|=1048576,y)}function l(p){return e&&p.alternate===null&&(p.flags|=67108866),p}function r(p,y,m,g){return y===null||y.tag!==6?(y=_d(m,p.mode,g),y.return=p,y):(y=i(y,m),y.return=p,y)}function s(p,y,m,g){var x=m.type;return x===Fa?c(p,y,m.props.children,g,m.key):y!==null&&(y.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===pi&&Wi(x)===y.type)?(y=i(y,m.props),yr(y,m),y.return=p,y):(y=Mu(m.type,m.key,m.props,null,p.mode,g),yr(y,m),y.return=p,y)}function u(p,y,m,g){return y===null||y.tag!==4||y.stateNode.containerInfo!==m.containerInfo||y.stateNode.implementation!==m.implementation?(y=Ed(m,p.mode,g),y.return=p,y):(y=i(y,m.children||[]),y.return=p,y)}function c(p,y,m,g,x){return y===null||y.tag!==7?(y=ta(m,p.mode,g,x),y.return=p,y):(y=i(y,m),y.return=p,y)}function d(p,y,m){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return y=_d(""+y,p.mode,m),y.return=p,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case ru:return m=Mu(y.type,y.key,y.props,null,p.mode,m),yr(m,y),m.return=p,m;case _r:return y=Ed(y,p.mode,m),y.return=p,y;case pi:return y=Wi(y),d(p,y,m)}if(Er(y)||hr(y))return y=ta(y,p.mode,m,null),y.return=p,y;if(typeof y.then=="function")return d(p,gu(y),m);if(y.$$typeof===Go)return d(p,hu(p,y),m);yu(p,y)}return null}function f(p,y,m,g){var x=y!==null?y.key:null;if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return x!==null?null:r(p,y,""+m,g);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case ru:return m.key===x?s(p,y,m,g):null;case _r:return m.key===x?u(p,y,m,g):null;case pi:return m=Wi(m),f(p,y,m,g)}if(Er(m)||hr(m))return x!==null?null:c(p,y,m,g,null);if(typeof m.then=="function")return f(p,y,gu(m),g);if(m.$$typeof===Go)return f(p,y,hu(p,m),g);yu(p,m)}return null}function h(p,y,m,g,x){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return p=p.get(m)||null,r(y,p,""+g,x);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case ru:return p=p.get(g.key===null?m:g.key)||null,s(y,p,g,x);case _r:return p=p.get(g.key===null?m:g.key)||null,u(y,p,g,x);case pi:return g=Wi(g),h(p,y,m,g,x)}if(Er(g)||hr(g))return p=p.get(m)||null,c(y,p,g,x,null);if(typeof g.then=="function")return h(p,y,m,gu(g),x);if(g.$$typeof===Go)return h(p,y,m,hu(y,g),x);yu(y,g)}return null}function v(p,y,m,g){for(var x=null,_=null,E=y,w=y=0,C=null;E!==null&&w<m.length;w++){E.index>w?(C=E,E=null):C=E.sibling;var H=f(p,E,m[w],g);if(H===null){E===null&&(E=C);break}e&&E&&H.alternate===null&&t(p,E),y=a(H,y,w),_===null?x=H:_.sibling=H,_=H,E=C}if(w===m.length)return n(p,E),Ce&&Po(p,w),x;if(E===null){for(;w<m.length;w++)E=d(p,m[w],g),E!==null&&(y=a(E,y,w),_===null?x=E:_.sibling=E,_=E);return Ce&&Po(p,w),x}for(E=o(E);w<m.length;w++)C=h(E,p,w,m[w],g),C!==null&&(e&&C.alternate!==null&&E.delete(C.key===null?w:C.key),y=a(C,y,w),_===null?x=C:_.sibling=C,_=C);return e&&E.forEach(function(D){return t(p,D)}),Ce&&Po(p,w),x}function b(p,y,m,g){if(m==null)throw Error(U(151));for(var x=null,_=null,E=y,w=y=0,C=null,H=m.next();E!==null&&!H.done;w++,H=m.next()){E.index>w?(C=E,E=null):C=E.sibling;var D=f(p,E,H.value,g);if(D===null){E===null&&(E=C);break}e&&E&&D.alternate===null&&t(p,E),y=a(D,y,w),_===null?x=D:_.sibling=D,_=D,E=C}if(H.done)return n(p,E),Ce&&Po(p,w),x;if(E===null){for(;!H.done;w++,H=m.next())H=d(p,H.value,g),H!==null&&(y=a(H,y,w),_===null?x=H:_.sibling=H,_=H);return Ce&&Po(p,w),x}for(E=o(E);!H.done;w++,H=m.next())H=h(E,p,w,H.value,g),H!==null&&(e&&H.alternate!==null&&E.delete(H.key===null?w:H.key),y=a(H,y,w),_===null?x=H:_.sibling=H,_=H);return e&&E.forEach(function(z){return t(p,z)}),Ce&&Po(p,w),x}function S(p,y,m,g){if(typeof m=="object"&&m!==null&&m.type===Fa&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case ru:e:{for(var x=m.key;y!==null;){if(y.key===x){if(x=m.type,x===Fa){if(y.tag===7){n(p,y.sibling),g=i(y,m.props.children),g.return=p,p=g;break e}}else if(y.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===pi&&Wi(x)===y.type){n(p,y.sibling),g=i(y,m.props),yr(g,m),g.return=p,p=g;break e}n(p,y);break}else t(p,y);y=y.sibling}m.type===Fa?(g=ta(m.props.children,p.mode,g,m.key),g.return=p,p=g):(g=Mu(m.type,m.key,m.props,null,p.mode,g),yr(g,m),g.return=p,p=g)}return l(p);case _r:e:{for(x=m.key;y!==null;){if(y.key===x)if(y.tag===4&&y.stateNode.containerInfo===m.containerInfo&&y.stateNode.implementation===m.implementation){n(p,y.sibling),g=i(y,m.children||[]),g.return=p,p=g;break e}else{n(p,y);break}else t(p,y);y=y.sibling}g=Ed(m,p.mode,g),g.return=p,p=g}return l(p);case pi:return m=Wi(m),S(p,y,m,g)}if(Er(m))return v(p,y,m,g);if(hr(m)){if(x=hr(m),typeof x!="function")throw Error(U(150));return m=x.call(m),b(p,y,m,g)}if(typeof m.then=="function")return S(p,y,gu(m),g);if(m.$$typeof===Go)return S(p,y,hu(p,m),g);yu(p,m)}return typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint"?(m=""+m,y!==null&&y.tag===6?(n(p,y.sibling),g=i(y,m),g.return=p,p=g):(n(p,y),g=_d(m,p.mode,g),g.return=p,p=g),l(p)):n(p,y)}return function(p,y,m,g){try{Zr=0;var x=S(p,y,m,g);return fl=null,x}catch(E){if(E===Al||E===xc)throw E;var _=yn(29,E,null,p.mode);return _.lanes=g,_.return=p,_}}}var ra=bv(!0),Sv=bv(!1),mi=!1;function am(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function dp(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ci(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wi(e,t,n){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Me&2)!==0){var i=o.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),o.pending=t,t=Zu(e),fv(e,null,n),t}return Sc(e,o,t,n),Zu(e)}function Rr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,k0(e,n)}}function Nd(e,t){var n=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,n===o)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var l={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=l:a=a.next=l,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:o.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:o.shared,callbacks:o.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var pp=!1;function Or(){if(pp){var e=cl;if(e!==null)throw e}}function zr(e,t,n,o){pp=!1;var i=e.updateQueue;mi=!1;var a=i.firstBaseUpdate,l=i.lastBaseUpdate,r=i.shared.pending;if(r!==null){i.shared.pending=null;var s=r,u=s.next;s.next=null,l===null?a=u:l.next=u,l=s;var c=e.alternate;c!==null&&(c=c.updateQueue,r=c.lastBaseUpdate,r!==l&&(r===null?c.firstBaseUpdate=u:r.next=u,c.lastBaseUpdate=s))}if(a!==null){var d=i.baseState;l=0,c=u=s=null,r=a;do{var f=r.lane&-536870913,h=f!==r.lane;if(h?(Ne&f)===f:(o&f)===f){f!==0&&f===yl&&(pp=!0),c!==null&&(c=c.next={lane:0,tag:r.tag,payload:r.payload,callback:null,next:null});e:{var v=e,b=r;f=t;var S=n;switch(b.tag){case 1:if(v=b.payload,typeof v=="function"){d=v.call(S,d,f);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=b.payload,f=typeof v=="function"?v.call(S,d,f):v,f==null)break e;d=Ze({},d,f);break e;case 2:mi=!0}}f=r.callback,f!==null&&(e.flags|=64,h&&(e.flags|=8192),h=i.callbacks,h===null?i.callbacks=[f]:h.push(f))}else h={lane:f,tag:r.tag,payload:r.payload,callback:r.callback,next:null},c===null?(u=c=h,s=d):c=c.next=h,l|=f;if(r=r.next,r===null){if(r=i.shared.pending,r===null)break;h=r,r=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);c===null&&(s=d),i.baseState=s,i.firstBaseUpdate=u,i.lastBaseUpdate=c,a===null&&(i.shared.lanes=0),Hi|=l,e.lanes=l,e.memoizedState=d}}function xv(e,t){if(typeof e!="function")throw Error(U(191,e));e.call(t)}function _v(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)xv(n[e],t)}var vl=ho(null),Ku=ho(0);function Ry(e,t){e=Fo,Ie(Ku,e),Ie(vl,t),Fo=e|t.baseLanes}function mp(){Ie(Ku,Fo),Ie(vl,vl.current)}function lm(){Fo=Ku.current,Nt(vl),Nt(Ku)}var Tn=ho(null),In=null;function gi(e){var t=e.alternate;Ie(at,at.current&1),Ie(Tn,e),In===null&&(t===null||vl.current!==null||t.memoizedState!==null)&&(In=e)}function hp(e){Ie(at,at.current),Ie(Tn,e),In===null&&(In=e)}function Ev(e){e.tag===22?(Ie(at,at.current),Ie(Tn,e),In===null&&(In=e)):yi(e)}function yi(){Ie(at,at.current),Ie(Tn,Tn.current)}function gn(e){Nt(Tn),In===e&&(In=null),Nt(at)}var at=ho(0);function Qu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Lp(n)||Bp(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Zo=0,ye=null,ke=null,st=null,Wu=!1,dl=!1,sa=!1,Ju=0,jr=0,pl=null,BN=0;function tt(){throw Error(U(321))}function rm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!En(e[n],t[n]))return!1;return!0}function sm(e,t,n,o,i,a){return Zo=a,ye=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ce.H=e===null||e.memoizedState===null?eb:bm,sa=!1,a=n(o,i),sa=!1,dl&&(a=Nv(t,n,o,i)),Tv(e),a}function Tv(e){ce.H=$r;var t=ke!==null&&ke.next!==null;if(Zo=0,st=ke=ye=null,Wu=!1,jr=0,pl=null,t)throw Error(U(300));e===null||ft||(e=e.dependencies,e!==null&&$u(e)&&(ft=!0))}function Nv(e,t,n,o){ye=e;var i=0;do{if(dl&&(pl=null),jr=0,dl=!1,25<=i)throw Error(U(301));if(i+=1,st=ke=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}ce.H=tb,a=t(n,o)}while(dl);return a}function HN(){var e=ce.H,t=e.useState()[0];return t=typeof t.then=="function"?rs(t):t,e=e.useState()[0],(ke!==null?ke.memoizedState:null)!==e&&(ye.flags|=1024),t}function um(){var e=Ju!==0;return Ju=0,e}function cm(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function fm(e){if(Wu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Wu=!1}Zo=0,st=ke=ye=null,dl=!1,jr=Ju=0,pl=null}function Yt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return st===null?ye.memoizedState=st=e:st=st.next=e,st}function lt(){if(ke===null){var e=ye.alternate;e=e!==null?e.memoizedState:null}else e=ke.next;var t=st===null?ye.memoizedState:st.next;if(t!==null)st=t,ke=e;else{if(e===null)throw ye.alternate===null?Error(U(467)):Error(U(310));ke=e,e={memoizedState:ke.memoizedState,baseState:ke.baseState,baseQueue:ke.baseQueue,queue:ke.queue,next:null},st===null?ye.memoizedState=st=e:st=st.next=e}return st}function _c(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function rs(e){var t=jr;return jr+=1,pl===null&&(pl=[]),e=vv(pl,e,t),t=ye,(st===null?t.memoizedState:st.next)===null&&(t=t.alternate,ce.H=t===null||t.memoizedState===null?eb:bm),e}function Ec(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return rs(e);if(e.$$typeof===Go)return Ot(e)}throw Error(U(438,String(e)))}function dm(e){var t=null,n=ye.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var o=ye.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=_c(),ye.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),o=0;o<e;o++)n[o]=x2;return t.index++,n}function jo(e,t){return typeof t=="function"?t(e):t}function Ru(e){var t=lt();return pm(t,ke,e)}function pm(e,t,n){var o=e.queue;if(o===null)throw Error(U(311));o.lastRenderedReducer=n;var i=e.baseQueue,a=o.pending;if(a!==null){if(i!==null){var l=i.next;i.next=a.next,a.next=l}t.baseQueue=i=a,o.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var r=l=null,s=null,u=t,c=!1;do{var d=u.lane&-536870913;if(d!==u.lane?(Ne&d)===d:(Zo&d)===d){var f=u.revertLane;if(f===0)s!==null&&(s=s.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),d===yl&&(c=!0);else if((Zo&f)===f){u=u.next,f===yl&&(c=!0);continue}else d={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(r=s=d,l=a):s=s.next=d,ye.lanes|=f,Hi|=f;d=u.action,sa&&n(a,d),a=u.hasEagerState?u.eagerState:n(a,d)}else f={lane:d,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(r=s=f,l=a):s=s.next=f,ye.lanes|=d,Hi|=d;u=u.next}while(u!==null&&u!==t);if(s===null?l=a:s.next=r,!En(a,e.memoizedState)&&(ft=!0,c&&(n=cl,n!==null)))throw n;e.memoizedState=a,e.baseState=l,e.baseQueue=s,o.lastRenderedState=a}return i===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Cd(e){var t=lt(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var o=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do a=e(a,l.action),l=l.next;while(l!==i);En(a,t.memoizedState)||(ft=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,o]}function Cv(e,t,n){var o=ye,i=lt(),a=Ce;if(a){if(n===void 0)throw Error(U(407));n=n()}else n=t();var l=!En((ke||i).memoizedState,n);if(l&&(i.memoizedState=n,ft=!0),i=i.queue,mm(Mv.bind(null,o,i,e),[e]),i.getSnapshot!==t||l||st!==null&&st.memoizedState.tag&1){if(o.flags|=2048,bl(9,{destroy:void 0},Av.bind(null,o,i,n,t),null),Ue===null)throw Error(U(349));a||(Zo&127)!==0||wv(o,t,n)}return n}function wv(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ye.updateQueue,t===null?(t=_c(),ye.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Av(e,t,n,o){t.value=n,t.getSnapshot=o,Dv(t)&&Rv(e)}function Mv(e,t,n){return n(function(){Dv(t)&&Rv(e)})}function Dv(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!En(e,n)}catch{return!0}}function Rv(e){var t=pa(e,2);t!==null&&an(t,e,2)}function gp(e){var t=Yt();if(typeof e=="function"){var n=e;if(e=n(),sa){bi(!0);try{n()}finally{bi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:e},t}function Ov(e,t,n,o){return e.baseState=n,pm(e,ke,typeof o=="function"?o:jo)}function PN(e,t,n,o,i){if(Nc(e))throw Error(U(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(l){a.listeners.push(l)}};ce.T!==null?n(!0):a.isTransition=!1,o(a),n=t.pending,n===null?(a.next=t.pending=a,zv(t,a)):(a.next=n.next,t.pending=n.next=a)}}function zv(e,t){var n=t.action,o=t.payload,i=e.state;if(t.isTransition){var a=ce.T,l={};ce.T=l;try{var r=n(i,o),s=ce.S;s!==null&&s(l,r),Oy(e,t,r)}catch(u){yp(e,t,u)}finally{a!==null&&l.types!==null&&(a.types=l.types),ce.T=a}}else try{a=n(i,o),Oy(e,t,a)}catch(u){yp(e,t,u)}}function Oy(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(o){zy(e,t,o)},function(o){return yp(e,t,o)}):zy(e,t,n)}function zy(e,t,n){t.status="fulfilled",t.value=n,Lv(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,zv(e,n)))}function yp(e,t,n){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=n,Lv(t),t=t.next;while(t!==o)}e.action=null}function Lv(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Bv(e,t){return t}function Ly(e,t){if(Ce){var n=Ue.formState;if(n!==null){e:{var o=ye;if(Ce){if(qe){t:{for(var i=qe,a=Un;i.nodeType!==8;){if(!a){i=null;break t}if(i=Vn(i.nextSibling),i===null){i=null;break t}}a=i.data,i=a==="F!"||a==="F"?i:null}if(i){qe=Vn(i.nextSibling),o=i.data==="F!";break e}}Li(o)}o=!1}o&&(t=n[0])}}return n=Yt(),n.memoizedState=n.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bv,lastRenderedState:t},n.queue=o,n=Qv.bind(null,ye,o),o.dispatch=n,o=gp(!1),a=vm.bind(null,ye,!1,o.queue),o=Yt(),i={state:t,dispatch:null,action:e,pending:null},o.queue=i,n=PN.bind(null,ye,i,a,n),i.dispatch=n,o.memoizedState=e,[t,n,!1]}function By(e){var t=lt();return Hv(t,ke,e)}function Hv(e,t,n){if(t=pm(e,t,Bv)[0],e=Ru(jo)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=rs(t)}catch(l){throw l===Al?xc:l}else o=t;t=lt();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(ye.flags|=2048,bl(9,{destroy:void 0},kN.bind(null,i,n),null)),[o,a,e]}function kN(e,t){e.action=t}function Hy(e){var t=lt(),n=ke;if(n!==null)return Hv(t,n,e);lt(),t=t.memoizedState,n=lt();var o=n.queue.dispatch;return n.memoizedState=e,[t,o,!1]}function bl(e,t,n,o){return e={tag:e,create:n,deps:o,inst:t,next:null},t=ye.updateQueue,t===null&&(t=_c(),ye.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(o=n.next,n.next=e,e.next=o,t.lastEffect=e),e}function Pv(){return lt().memoizedState}function Ou(e,t,n,o){var i=Yt();ye.flags|=e,i.memoizedState=bl(1|t,{destroy:void 0},n,o===void 0?null:o)}function Tc(e,t,n,o){var i=lt();o=o===void 0?null:o;var a=i.memoizedState.inst;ke!==null&&o!==null&&rm(o,ke.memoizedState.deps)?i.memoizedState=bl(t,a,n,o):(ye.flags|=e,i.memoizedState=bl(1|t,a,n,o))}function Py(e,t){Ou(8390656,8,e,t)}function mm(e,t){Tc(2048,8,e,t)}function GN(e){ye.flags|=4;var t=ye.updateQueue;if(t===null)t=_c(),ye.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function kv(e){var t=lt().memoizedState;return GN({ref:t,nextImpl:e}),function(){if((Me&2)!==0)throw Error(U(440));return t.impl.apply(void 0,arguments)}}function Gv(e,t){return Tc(4,2,e,t)}function Uv(e,t){return Tc(4,4,e,t)}function Iv(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Vv(e,t,n){n=n!=null?n.concat([e]):null,Tc(4,4,Iv.bind(null,t,e),n)}function hm(){}function Yv(e,t){var n=lt();t=t===void 0?null:t;var o=n.memoizedState;return t!==null&&rm(t,o[1])?o[0]:(n.memoizedState=[e,t],e)}function Xv(e,t){var n=lt();t=t===void 0?null:t;var o=n.memoizedState;if(t!==null&&rm(t,o[1]))return o[0];if(o=e(),sa){bi(!0);try{e()}finally{bi(!1)}}return n.memoizedState=[o,t],o}function gm(e,t,n){return n===void 0||(Zo&1073741824)!==0&&(Ne&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Ob(),ye.lanes|=e,Hi|=e,n)}function qv(e,t,n,o){return En(n,t)?n:vl.current!==null?(e=gm(e,n,o),En(e,t)||(ft=!0),e):(Zo&42)===0||(Zo&1073741824)!==0&&(Ne&261930)===0?(ft=!0,e.memoizedState=n):(e=Ob(),ye.lanes|=e,Hi|=e,t)}function Zv(e,t,n,o,i){var a=De.p;De.p=a!==0&&8>a?a:8;var l=ce.T,r={};ce.T=r,vm(e,!1,t,n);try{var s=i(),u=ce.S;if(u!==null&&u(r,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var c=LN(s,o);Lr(e,t,c,_n(e))}else Lr(e,t,o,_n(e))}catch(d){Lr(e,t,{then:function(){},status:"rejected",reason:d},_n())}finally{De.p=a,l!==null&&r.types!==null&&(l.types=r.types),ce.T=l}}function UN(){}function vp(e,t,n,o){if(e.tag!==5)throw Error(U(476));var i=jv(e).queue;Zv(e,i,t,ea,n===null?UN:function(){return $v(e),n(o)})}function jv(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ea,baseState:ea,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:ea},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function $v(e){var t=jv(e);t.next===null&&(t=e.alternate.memoizedState),Lr(e,t.next.queue,{},_n())}function ym(){return Ot(Qr)}function Fv(){return lt().memoizedState}function Kv(){return lt().memoizedState}function IN(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=_n();e=Ci(n);var o=wi(t,e,n);o!==null&&(an(o,t,n),Rr(o,t,n)),t={cache:nm()},e.payload=t;return}t=t.return}}function VN(e,t,n){var o=_n();n={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Nc(e)?Wv(t,n):(n=Wp(e,t,n,o),n!==null&&(an(n,e,o),Jv(n,t,o)))}function Qv(e,t,n){var o=_n();Lr(e,t,n,o)}function Lr(e,t,n,o){var i={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Nc(e))Wv(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var l=t.lastRenderedState,r=a(l,n);if(i.hasEagerState=!0,i.eagerState=r,En(r,l))return Sc(e,t,i,0),Ue===null&&bc(),!1}catch{}if(n=Wp(e,t,i,o),n!==null)return an(n,e,o),Jv(n,t,o),!0}return!1}function vm(e,t,n,o){if(o={lane:2,revertLane:wm(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Nc(e)){if(t)throw Error(U(479))}else t=Wp(e,n,o,2),t!==null&&an(t,e,2)}function Nc(e){var t=e.alternate;return e===ye||t!==null&&t===ye}function Wv(e,t){dl=Wu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Jv(e,t,n){if((n&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,k0(e,n)}}var $r={readContext:Ot,use:Ec,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};$r.useEffectEvent=tt;var eb={readContext:Ot,use:Ec,useCallback:function(e,t){return Yt().memoizedState=[e,t===void 0?null:t],e},useContext:Ot,useEffect:Py,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Ou(4194308,4,Iv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ou(4194308,4,e,t)},useInsertionEffect:function(e,t){Ou(4,2,e,t)},useMemo:function(e,t){var n=Yt();t=t===void 0?null:t;var o=e();if(sa){bi(!0);try{e()}finally{bi(!1)}}return n.memoizedState=[o,t],o},useReducer:function(e,t,n){var o=Yt();if(n!==void 0){var i=n(t);if(sa){bi(!0);try{n(t)}finally{bi(!1)}}}else i=t;return o.memoizedState=o.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},o.queue=e,e=e.dispatch=VN.bind(null,ye,e),[o.memoizedState,e]},useRef:function(e){var t=Yt();return e={current:e},t.memoizedState=e},useState:function(e){e=gp(e);var t=e.queue,n=Qv.bind(null,ye,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:hm,useDeferredValue:function(e,t){var n=Yt();return gm(n,e,t)},useTransition:function(){var e=gp(!1);return e=Zv.bind(null,ye,e.queue,!0,!1),Yt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var o=ye,i=Yt();if(Ce){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),Ue===null)throw Error(U(349));(Ne&127)!==0||wv(o,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Py(Mv.bind(null,o,a,e),[e]),o.flags|=2048,bl(9,{destroy:void 0},Av.bind(null,o,a,n,t),null),n},useId:function(){var e=Yt(),t=Ue.identifierPrefix;if(Ce){var n=fo,o=co;n=(o&~(1<<32-xn(o)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Ju++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=BN++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ym,useFormState:Ly,useActionState:Ly,useOptimistic:function(e){var t=Yt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=vm.bind(null,ye,!0,n),n.dispatch=t,[e,t]},useMemoCache:dm,useCacheRefresh:function(){return Yt().memoizedState=IN.bind(null,ye)},useEffectEvent:function(e){var t=Yt(),n={impl:e};return t.memoizedState=n,function(){if((Me&2)!==0)throw Error(U(440));return n.impl.apply(void 0,arguments)}}},bm={readContext:Ot,use:Ec,useCallback:Yv,useContext:Ot,useEffect:mm,useImperativeHandle:Vv,useInsertionEffect:Gv,useLayoutEffect:Uv,useMemo:Xv,useReducer:Ru,useRef:Pv,useState:function(){return Ru(jo)},useDebugValue:hm,useDeferredValue:function(e,t){var n=lt();return qv(n,ke.memoizedState,e,t)},useTransition:function(){var e=Ru(jo)[0],t=lt().memoizedState;return[typeof e=="boolean"?e:rs(e),t]},useSyncExternalStore:Cv,useId:Fv,useHostTransitionStatus:ym,useFormState:By,useActionState:By,useOptimistic:function(e,t){var n=lt();return Ov(n,ke,e,t)},useMemoCache:dm,useCacheRefresh:Kv};bm.useEffectEvent=kv;var tb={readContext:Ot,use:Ec,useCallback:Yv,useContext:Ot,useEffect:mm,useImperativeHandle:Vv,useInsertionEffect:Gv,useLayoutEffect:Uv,useMemo:Xv,useReducer:Cd,useRef:Pv,useState:function(){return Cd(jo)},useDebugValue:hm,useDeferredValue:function(e,t){var n=lt();return ke===null?gm(n,e,t):qv(n,ke.memoizedState,e,t)},useTransition:function(){var e=Cd(jo)[0],t=lt().memoizedState;return[typeof e=="boolean"?e:rs(e),t]},useSyncExternalStore:Cv,useId:Fv,useHostTransitionStatus:ym,useFormState:Hy,useActionState:Hy,useOptimistic:function(e,t){var n=lt();return ke!==null?Ov(n,ke,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:dm,useCacheRefresh:Kv};tb.useEffectEvent=kv;function wd(e,t,n,o){t=e.memoizedState,n=n(o,t),n=n==null?t:Ze({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var bp={enqueueSetState:function(e,t,n){e=e._reactInternals;var o=_n(),i=Ci(o);i.payload=t,n!=null&&(i.callback=n),t=wi(e,i,o),t!==null&&(an(t,e,o),Rr(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var o=_n(),i=Ci(o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=wi(e,i,o),t!==null&&(an(t,e,o),Rr(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_n(),o=Ci(n);o.tag=2,t!=null&&(o.callback=t),t=wi(e,o,n),t!==null&&(an(t,e,n),Rr(t,e,n))}};function ky(e,t,n,o,i,a,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,a,l):t.prototype&&t.prototype.isPureReactComponent?!Yr(n,o)||!Yr(i,a):!0}function Gy(e,t,n,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,o),t.state!==e&&bp.enqueueReplaceState(t,t.state,null)}function ua(e,t){var n=t;if("ref"in t){n={};for(var o in t)o!=="ref"&&(n[o]=t[o])}if(e=e.defaultProps){n===t&&(n=Ze({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function nb(e){qu(e)}function ob(e){console.error(e)}function ib(e){qu(e)}function ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function Uy(e,t,n){try{var o=e.onCaughtError;o(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function Sp(e,t,n){return n=Ci(n),n.tag=3,n.payload={element:null},n.callback=function(){ec(e,t)},n}function ab(e){return e=Ci(e),e.tag=3,e}function lb(e,t,n,o){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var a=o.value;e.payload=function(){return i(a)},e.callback=function(){Uy(t,n,o)}}var l=n.stateNode;l!==null&&typeof l.componentDidCatch=="function"&&(e.callback=function(){Uy(t,n,o),typeof i!="function"&&(Ai===null?Ai=new Set([this]):Ai.add(this));var r=o.stack;this.componentDidCatch(o.value,{componentStack:r!==null?r:""})})}function YN(e,t,n,o,i){if(n.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=n.alternate,t!==null&&wl(t,n,i,!0),n=Tn.current,n!==null){switch(n.tag){case 31:case 13:return In===null?ac():n.alternate===null&&nt===0&&(nt=3),n.flags&=-257,n.flags|=65536,n.lanes=i,o===Fu?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([o]):t.add(o),kd(e,o,i)),!1;case 22:return n.flags|=65536,o===Fu?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([o]):n.add(o)),kd(e,o,i)),!1}throw Error(U(435,n.tag))}return kd(e,o,i),ac(),!1}if(Ce)return t=Tn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,o!==rp&&(e=Error(U(422),{cause:o}),qr(Gn(e,n)))):(o!==rp&&(t=Error(U(423),{cause:o}),qr(Gn(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,o=Gn(o,n),i=Sp(e.stateNode,o,i),Nd(e,i),nt!==4&&(nt=2)),!1;var a=Error(U(520),{cause:o});if(a=Gn(a,n),Pr===null?Pr=[a]:Pr.push(a),nt!==4&&(nt=2),t===null)return!0;o=Gn(o,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Sp(n.stateNode,o,e),Nd(n,e),!1;case 1:if(t=n.type,a=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||a!==null&&typeof a.componentDidCatch=="function"&&(Ai===null||!Ai.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=ab(i),lb(i,e,n,o),Nd(n,i),!1}n=n.return}while(n!==null);return!1}var Sm=Error(U(461)),ft=!1;function Mt(e,t,n,o){t.child=e===null?Sv(t,null,n,o):ra(t,e.child,n,o)}function Iy(e,t,n,o,i){n=n.render;var a=t.ref;if("ref"in o){var l={};for(var r in o)r!=="ref"&&(l[r]=o[r])}else l=o;return la(t),o=sm(e,t,n,l,a,i),r=um(),e!==null&&!ft?(cm(e,t,i),$o(e,t,i)):(Ce&&r&&em(t),t.flags|=1,Mt(e,t,o,i),t.child)}function Vy(e,t,n,o,i){if(e===null){var a=n.type;return typeof a=="function"&&!Jp(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,rb(e,t,a,o,i)):(e=Mu(n.type,null,o,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!xm(e,i)){var l=a.memoizedProps;if(n=n.compare,n=n!==null?n:Yr,n(l,o)&&e.ref===t.ref)return $o(e,t,i)}return t.flags|=1,e=Vo(a,o),e.ref=t.ref,e.return=t,t.child=e}function rb(e,t,n,o,i){if(e!==null){var a=e.memoizedProps;if(Yr(a,o)&&e.ref===t.ref)if(ft=!1,t.pendingProps=o=a,xm(e,i))(e.flags&131072)!==0&&(ft=!0);else return t.lanes=e.lanes,$o(e,t,i)}return xp(e,t,n,o,i)}function sb(e,t,n,o){var i=o.children,a=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((t.flags&128)!==0){if(a=a!==null?a.baseLanes|n:n,e!==null){for(o=t.child=e.child,i=0;o!==null;)i=i|o.lanes|o.childLanes,o=o.sibling;o=i&~a}else o=0,t.child=null;return Yy(e,t,a,n,o)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Du(t,a!==null?a.cachePool:null),a!==null?Ry(t,a):mp(),Ev(t);else return o=t.lanes=536870912,Yy(e,t,a!==null?a.baseLanes|n:n,n,o)}else a!==null?(Du(t,a.cachePool),Ry(t,a),yi(t),t.memoizedState=null):(e!==null&&Du(t,null),mp(),yi(t));return Mt(e,t,i,n),t.child}function Nr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Yy(e,t,n,o,i){var a=om();return a=a===null?null:{parent:ct._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Du(t,null),mp(),Ev(t),e!==null&&wl(e,t,o,!0),t.childLanes=i,null}function zu(e,t){return t=tc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Xy(e,t,n){return ra(t,e.child,null,n),e=zu(t,t.pendingProps),e.flags|=2,gn(t),t.memoizedState=null,e}function XN(e,t,n){var o=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ce){if(o.mode==="hidden")return e=zu(t,o),t.lanes=536870912,Nr(null,e);if(hp(t),(e=qe)?(e=e1(e,Un),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:zi!==null?{id:co,overflow:fo}:null,retryLane:536870912,hydrationErrors:null},n=pv(e),n.return=t,t.child=n,Rt=t,qe=null)):e=null,e===null)throw Li(t);return t.lanes=536870912,null}return zu(t,o)}var a=e.memoizedState;if(a!==null){var l=a.dehydrated;if(hp(t),i)if(t.flags&256)t.flags&=-257,t=Xy(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(U(558));else if(ft||wl(e,t,n,!1),i=(n&e.childLanes)!==0,ft||i){if(o=Ue,o!==null&&(l=G0(o,n),l!==0&&l!==a.retryLane))throw a.retryLane=l,pa(e,l),an(o,e,l),Sm;ac(),t=Xy(e,t,n)}else e=a.treeContext,qe=Vn(l.nextSibling),Rt=t,Ce=!0,Ni=null,Un=!1,e!==null&&hv(t,e),t=zu(t,o),t.flags|=4096;return t}return e=Vo(e.child,{mode:o.mode,children:o.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Lu(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(U(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function xp(e,t,n,o,i){return la(t),n=sm(e,t,n,o,void 0,i),o=um(),e!==null&&!ft?(cm(e,t,i),$o(e,t,i)):(Ce&&o&&em(t),t.flags|=1,Mt(e,t,n,i),t.child)}function qy(e,t,n,o,i,a){return la(t),t.updateQueue=null,n=Nv(t,o,n,i),Tv(e),o=um(),e!==null&&!ft?(cm(e,t,a),$o(e,t,a)):(Ce&&o&&em(t),t.flags|=1,Mt(e,t,n,a),t.child)}function Zy(e,t,n,o,i){if(la(t),t.stateNode===null){var a=ol,l=n.contextType;typeof l=="object"&&l!==null&&(a=Ot(l)),a=new n(o,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=bp,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=o,a.state=t.memoizedState,a.refs={},am(t),l=n.contextType,a.context=typeof l=="object"&&l!==null?Ot(l):ol,a.state=t.memoizedState,l=n.getDerivedStateFromProps,typeof l=="function"&&(wd(t,n,l,o),a.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(l=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),l!==a.state&&bp.enqueueReplaceState(a,a.state,null),zr(t,o,a,i),Or(),a.state=t.memoizedState),typeof a.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){a=t.stateNode;var r=t.memoizedProps,s=ua(n,r);a.props=s;var u=a.context,c=n.contextType;l=ol,typeof c=="object"&&c!==null&&(l=Ot(c));var d=n.getDerivedStateFromProps;c=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function",r=t.pendingProps!==r,c||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(r||u!==l)&&Gy(t,a,o,l),mi=!1;var f=t.memoizedState;a.state=f,zr(t,o,a,i),Or(),u=t.memoizedState,r||f!==u||mi?(typeof d=="function"&&(wd(t,n,d,o),u=t.memoizedState),(s=mi||ky(t,n,s,o,f,u,l))?(c||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=u),a.props=o,a.state=u,a.context=l,o=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{a=t.stateNode,dp(e,t),l=t.memoizedProps,c=ua(n,l),a.props=c,d=t.pendingProps,f=a.context,u=n.contextType,s=ol,typeof u=="object"&&u!==null&&(s=Ot(u)),r=n.getDerivedStateFromProps,(u=typeof r=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==d||f!==s)&&Gy(t,a,o,s),mi=!1,f=t.memoizedState,a.state=f,zr(t,o,a,i),Or();var h=t.memoizedState;l!==d||f!==h||mi||e!==null&&e.dependencies!==null&&$u(e.dependencies)?(typeof r=="function"&&(wd(t,n,r,o),h=t.memoizedState),(c=mi||ky(t,n,c,o,f,h,s)||e!==null&&e.dependencies!==null&&$u(e.dependencies))?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(o,h,s),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(o,h,s)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=h),a.props=o,a.state=h,a.context=s,o=c):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),o=!1)}return a=o,Lu(e,t),o=(t.flags&128)!==0,a||o?(a=t.stateNode,n=o&&typeof n.getDerivedStateFromError!="function"?null:a.render(),t.flags|=1,e!==null&&o?(t.child=ra(t,e.child,null,i),t.child=ra(t,null,n,i)):Mt(e,t,n,i),t.memoizedState=a.state,e=t.child):e=$o(e,t,i),e}function jy(e,t,n,o){return aa(),t.flags|=256,Mt(e,t,n,o),t.child}var Ad={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Md(e){return{baseLanes:e,cachePool:yv()}}function Dd(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=vn),e}function ub(e,t,n){var o=t.pendingProps,i=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(at.current&2)!==0),l&&(i=!0,t.flags&=-129),l=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ce){if(i?gi(t):yi(t),(e=qe)?(e=e1(e,Un),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:zi!==null?{id:co,overflow:fo}:null,retryLane:536870912,hydrationErrors:null},n=pv(e),n.return=t,t.child=n,Rt=t,qe=null)):e=null,e===null)throw Li(t);return Bp(e)?t.lanes=32:t.lanes=536870912,null}var r=o.children;return o=o.fallback,i?(yi(t),i=t.mode,r=tc({mode:"hidden",children:r},i),o=ta(o,i,n,null),r.return=t,o.return=t,r.sibling=o,t.child=r,o=t.child,o.memoizedState=Md(n),o.childLanes=Dd(e,l,n),t.memoizedState=Ad,Nr(null,o)):(gi(t),_p(t,r))}var s=e.memoizedState;if(s!==null&&(r=s.dehydrated,r!==null)){if(a)t.flags&256?(gi(t),t.flags&=-257,t=Rd(e,t,n)):t.memoizedState!==null?(yi(t),t.child=e.child,t.flags|=128,t=null):(yi(t),r=o.fallback,i=t.mode,o=tc({mode:"visible",children:o.children},i),r=ta(r,i,n,null),r.flags|=2,o.return=t,r.return=t,o.sibling=r,t.child=o,ra(t,e.child,null,n),o=t.child,o.memoizedState=Md(n),o.childLanes=Dd(e,l,n),t.memoizedState=Ad,t=Nr(null,o));else if(gi(t),Bp(r)){if(l=r.nextSibling&&r.nextSibling.dataset,l)var u=l.dgst;l=u,o=Error(U(419)),o.stack="",o.digest=l,qr({value:o,source:null,stack:null}),t=Rd(e,t,n)}else if(ft||wl(e,t,n,!1),l=(n&e.childLanes)!==0,ft||l){if(l=Ue,l!==null&&(o=G0(l,n),o!==0&&o!==s.retryLane))throw s.retryLane=o,pa(e,o),an(l,e,o),Sm;Lp(r)||ac(),t=Rd(e,t,n)}else Lp(r)?(t.flags|=192,t.child=e.child,t=null):(e=s.treeContext,qe=Vn(r.nextSibling),Rt=t,Ce=!0,Ni=null,Un=!1,e!==null&&hv(t,e),t=_p(t,o.children),t.flags|=4096);return t}return i?(yi(t),r=o.fallback,i=t.mode,s=e.child,u=s.sibling,o=Vo(s,{mode:"hidden",children:o.children}),o.subtreeFlags=s.subtreeFlags&65011712,u!==null?r=Vo(u,r):(r=ta(r,i,n,null),r.flags|=2),r.return=t,o.return=t,o.sibling=r,t.child=o,Nr(null,o),o=t.child,r=e.child.memoizedState,r===null?r=Md(n):(i=r.cachePool,i!==null?(s=ct._currentValue,i=i.parent!==s?{parent:s,pool:s}:i):i=yv(),r={baseLanes:r.baseLanes|n,cachePool:i}),o.memoizedState=r,o.childLanes=Dd(e,l,n),t.memoizedState=Ad,Nr(e.child,o)):(gi(t),n=e.child,e=n.sibling,n=Vo(n,{mode:"visible",children:o.children}),n.return=t,n.sibling=null,e!==null&&(l=t.deletions,l===null?(t.deletions=[e],t.flags|=16):l.push(e)),t.child=n,t.memoizedState=null,n)}function _p(e,t){return t=tc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function tc(e,t){return e=yn(22,e,null,t),e.lanes=0,e}function Rd(e,t,n){return ra(t,e.child,null,n),e=_p(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $y(e,t,n){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),up(e.return,t,n)}function Od(e,t,n,o,i,a){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:n,tailMode:i,treeForkCount:a}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=o,l.tail=n,l.tailMode=i,l.treeForkCount=a)}function cb(e,t,n){var o=t.pendingProps,i=o.revealOrder,a=o.tail;o=o.children;var l=at.current,r=(l&2)!==0;if(r?(l=l&1|2,t.flags|=128):l&=1,Ie(at,l),Mt(e,t,o,n),o=Ce?Xr:0,!r&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$y(e,n,t);else if(e.tag===19)$y(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Qu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Od(t,!1,i,n,a,o);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Qu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Od(t,!0,n,null,a,o);break;case"together":Od(t,!1,null,null,void 0,o);break;default:t.memoizedState=null}return t.child}function $o(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Hi|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(wl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,n=Vo(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Vo(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function xm(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&$u(e)))}function qN(e,t,n){switch(t.tag){case 3:Iu(t,t.stateNode.containerInfo),hi(t,ct,e.memoizedState.cache),aa();break;case 27:case 5:Kd(t);break;case 4:Iu(t,t.stateNode.containerInfo);break;case 10:hi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,hp(t),null;break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(gi(t),t.flags|=128,null):(n&t.child.childLanes)!==0?ub(e,t,n):(gi(t),e=$o(e,t,n),e!==null?e.sibling:null);gi(t);break;case 19:var i=(e.flags&128)!==0;if(o=(n&t.childLanes)!==0,o||(wl(e,t,n,!1),o=(n&t.childLanes)!==0),i){if(o)return cb(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ie(at,at.current),o)break;return null;case 22:return t.lanes=0,sb(e,t,n,t.pendingProps);case 24:hi(t,ct,e.memoizedState.cache)}return $o(e,t,n)}function fb(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ft=!0;else{if(!xm(e,n)&&(t.flags&128)===0)return ft=!1,qN(e,t,n);ft=(e.flags&131072)!==0}else ft=!1,Ce&&(t.flags&1048576)!==0&&mv(t,Xr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var o=t.pendingProps;if(e=Wi(t.elementType),t.type=e,typeof e=="function")Jp(e)?(o=ua(e,o),t.tag=1,t=Zy(null,t,e,o,n)):(t.tag=0,t=xp(null,t,e,o,n));else{if(e!=null){var i=e.$$typeof;if(i===Gp){t.tag=11,t=Iy(null,t,e,o,n);break e}else if(i===Up){t.tag=14,t=Vy(null,t,e,o,n);break e}}throw t=$d(e)||e,Error(U(306,t,""))}}return t;case 0:return xp(e,t,t.type,t.pendingProps,n);case 1:return o=t.type,i=ua(o,t.pendingProps),Zy(e,t,o,i,n);case 3:e:{if(Iu(t,t.stateNode.containerInfo),e===null)throw Error(U(387));o=t.pendingProps;var a=t.memoizedState;i=a.element,dp(e,t),zr(t,o,null,n);var l=t.memoizedState;if(o=l.cache,hi(t,ct,o),o!==a.cache&&cp(t,[ct],n,!0),Or(),o=l.element,a.isDehydrated)if(a={element:o,isDehydrated:!1,cache:l.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=jy(e,t,o,n);break e}else if(o!==i){i=Gn(Error(U(424)),t),qr(i),t=jy(e,t,o,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,qe=Vn(e.firstChild),Rt=t,Ce=!0,Ni=null,Un=!0,n=Sv(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(aa(),o===i){t=$o(e,t,n);break e}Mt(e,t,o,n)}t=t.child}return t;case 26:return Lu(e,t),e===null?(n=g0(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ce||(n=t.type,e=t.pendingProps,o=uc(Ti.current).createElement(n),o[Dt]=t,o[ln]=e,zt(o,n,e),Tt(o),t.stateNode=o):t.memoizedState=g0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Kd(t),e===null&&Ce&&(o=t.stateNode=t1(t.type,t.pendingProps,Ti.current),Rt=t,Un=!0,i=qe,ki(t.type)?(Hp=i,qe=Vn(o.firstChild)):qe=i),Mt(e,t,t.pendingProps.children,n),Lu(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ce&&((i=o=qe)&&(o=bC(o,t.type,t.pendingProps,Un),o!==null?(t.stateNode=o,Rt=t,qe=Vn(o.firstChild),Un=!1,i=!0):i=!1),i||Li(t)),Kd(t),i=t.type,a=t.pendingProps,l=e!==null?e.memoizedProps:null,o=a.children,Op(i,a)?o=null:l!==null&&Op(i,l)&&(t.flags|=32),t.memoizedState!==null&&(i=sm(e,t,HN,null,null,n),Qr._currentValue=i),Lu(e,t),Mt(e,t,o,n),t.child;case 6:return e===null&&Ce&&((e=n=qe)&&(n=SC(n,t.pendingProps,Un),n!==null?(t.stateNode=n,Rt=t,qe=null,e=!0):e=!1),e||Li(t)),null;case 13:return ub(e,t,n);case 4:return Iu(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=ra(t,null,o,n):Mt(e,t,o,n),t.child;case 11:return Iy(e,t,t.type,t.pendingProps,n);case 7:return Mt(e,t,t.pendingProps,n),t.child;case 8:return Mt(e,t,t.pendingProps.children,n),t.child;case 12:return Mt(e,t,t.pendingProps.children,n),t.child;case 10:return o=t.pendingProps,hi(t,t.type,o.value),Mt(e,t,o.children,n),t.child;case 9:return i=t.type._context,o=t.pendingProps.children,la(t),i=Ot(i),o=o(i),t.flags|=1,Mt(e,t,o,n),t.child;case 14:return Vy(e,t,t.type,t.pendingProps,n);case 15:return rb(e,t,t.type,t.pendingProps,n);case 19:return cb(e,t,n);case 31:return XN(e,t,n);case 22:return sb(e,t,n,t.pendingProps);case 24:return la(t),o=Ot(ct),e===null?(i=om(),i===null&&(i=Ue,a=nm(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:o,cache:i},am(t),hi(t,ct,i)):((e.lanes&n)!==0&&(dp(e,t),zr(t,null,null,n),Or()),i=e.memoizedState,a=t.memoizedState,i.parent!==o?(i={parent:o,cache:o},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),hi(t,ct,o)):(o=a.cache,hi(t,ct,o),o!==i.cache&&cp(t,[ct],n,!0))),Mt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(U(156,t.tag))}function zo(e){e.flags|=4}function zd(e,t,n,o,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Bb())e.flags|=8192;else throw oa=Fu,im}else e.flags&=-16777217}function Fy(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!i1(t))if(Bb())e.flags|=8192;else throw oa=Fu,im}function vu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?H0():536870912,e.lanes|=t,Sl|=t)}function vr(e,t){if(!Ce)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Xe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,o=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,o|=i.subtreeFlags&65011712,o|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,o|=i.subtreeFlags,o|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=o,e.childLanes=n,t}function ZN(e,t,n){var o=t.pendingProps;switch(tm(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(t),null;case 1:return Xe(t),null;case 3:return n=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),Yo(ct),ml(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(qa(t)?zo(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Td())),Xe(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(zo(t),a!==null?(Xe(t),Fy(t,a)):(Xe(t),zd(t,i,null,o,n))):a?a!==e.memoizedState?(zo(t),Xe(t),Fy(t,a)):(Xe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==o&&zo(t),Xe(t),zd(t,i,e,o,n)),null;case 27:if(Vu(t),n=Ti.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&zo(t);else{if(!o){if(t.stateNode===null)throw Error(U(166));return Xe(t),null}e=mo.current,qa(t)?Ty(t,e):(e=t1(i,o,n),t.stateNode=e,zo(t))}return Xe(t),null;case 5:if(Vu(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&zo(t);else{if(!o){if(t.stateNode===null)throw Error(U(166));return Xe(t),null}if(a=mo.current,qa(t))Ty(t,a);else{var l=uc(Ti.current);switch(a){case 1:a=l.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:a=l.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":a=l.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":a=l.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":a=l.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof o.is=="string"?l.createElement("select",{is:o.is}):l.createElement("select"),o.multiple?a.multiple=!0:o.size&&(a.size=o.size);break;default:a=typeof o.is=="string"?l.createElement(i,{is:o.is}):l.createElement(i)}}a[Dt]=t,a[ln]=o;e:for(l=t.child;l!==null;){if(l.tag===5||l.tag===6)a.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;l.sibling===null;){if(l.return===null||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=a;e:switch(zt(a,i,o),i){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&zo(t)}}return Xe(t),zd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&zo(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(U(166));if(e=Ti.current,qa(t)){if(e=t.stateNode,n=t.memoizedProps,o=null,i=Rt,i!==null)switch(i.tag){case 27:case 5:o=i.memoizedProps}e[Dt]=t,e=!!(e.nodeValue===n||o!==null&&o.suppressHydrationWarning===!0||Qb(e.nodeValue,n)),e||Li(t,!0)}else e=uc(e).createTextNode(o),e[Dt]=t,t.stateNode=e}return Xe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(o=qa(t),n!==null){if(e===null){if(!o)throw Error(U(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(557));e[Dt]=t}else aa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),e=!1}else n=Td(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(gn(t),t):(gn(t),null);if((t.flags&128)!==0)throw Error(U(558))}return Xe(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=qa(t),o!==null&&o.dehydrated!==null){if(e===null){if(!i)throw Error(U(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(U(317));i[Dt]=t}else aa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),i=!1}else i=Td(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(gn(t),t):(gn(t),null)}return gn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=o!==null,e=e!==null&&e.memoizedState!==null,n&&(o=t.child,i=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(i=o.alternate.memoizedState.cachePool.pool),a=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(a=o.memoizedState.cachePool.pool),a!==i&&(o.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),vu(t,t.updateQueue),Xe(t),null);case 4:return ml(),e===null&&Am(t.stateNode.containerInfo),Xe(t),null;case 10:return Yo(t.type),Xe(t),null;case 19:if(Nt(at),o=t.memoizedState,o===null)return Xe(t),null;if(i=(t.flags&128)!==0,a=o.rendering,a===null)if(i)vr(o,!1);else{if(nt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=Qu(e),a!==null){for(t.flags|=128,vr(o,!1),e=a.updateQueue,t.updateQueue=e,vu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)dv(n,e),n=n.sibling;return Ie(at,at.current&1|2),Ce&&Po(t,o.treeForkCount),t.child}e=e.sibling}o.tail!==null&&bn()>oc&&(t.flags|=128,i=!0,vr(o,!1),t.lanes=4194304)}else{if(!i)if(e=Qu(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,vu(t,e),vr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Ce)return Xe(t),null}else 2*bn()-o.renderingStartTime>oc&&n!==536870912&&(t.flags|=128,i=!0,vr(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(e=o.last,e!==null?e.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=bn(),e.sibling=null,n=at.current,Ie(at,i?n&1|2:n&1),Ce&&Po(t,o.treeForkCount),e):(Xe(t),null);case 22:case 23:return gn(t),lm(),o=t.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?(n&536870912)!==0&&(t.flags&128)===0&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),n=t.updateQueue,n!==null&&vu(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),o=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),o!==n&&(t.flags|=2048),e!==null&&Nt(na),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Yo(ct),Xe(t),null;case 25:return null;case 30:return null}throw Error(U(156,t.tag))}function jN(e,t){switch(tm(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yo(ct),ml(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Vu(t),null;case 31:if(t.memoizedState!==null){if(gn(t),t.alternate===null)throw Error(U(340));aa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(gn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));aa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Nt(at),null;case 4:return ml(),null;case 10:return Yo(t.type),null;case 22:case 23:return gn(t),lm(),e!==null&&Nt(na),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Yo(ct),null;case 25:return null;default:return null}}function db(e,t){switch(tm(t),t.tag){case 3:Yo(ct),ml();break;case 26:case 27:case 5:Vu(t);break;case 4:ml();break;case 31:t.memoizedState!==null&&gn(t);break;case 13:gn(t);break;case 19:Nt(at);break;case 10:Yo(t.type);break;case 22:case 23:gn(t),lm(),e!==null&&Nt(na);break;case 24:Yo(ct)}}function ss(e,t){try{var n=t.updateQueue,o=n!==null?n.lastEffect:null;if(o!==null){var i=o.next;n=i;do{if((n.tag&e)===e){o=void 0;var a=n.create,l=n.inst;o=a(),l.destroy=o}n=n.next}while(n!==i)}}catch(r){Oe(t,t.return,r)}}function Bi(e,t,n){try{var o=t.updateQueue,i=o!==null?o.lastEffect:null;if(i!==null){var a=i.next;o=a;do{if((o.tag&e)===e){var l=o.inst,r=l.destroy;if(r!==void 0){l.destroy=void 0,i=t;var s=n,u=r;try{u()}catch(c){Oe(i,s,c)}}}o=o.next}while(o!==a)}}catch(c){Oe(t,t.return,c)}}function pb(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{_v(t,n)}catch(o){Oe(e,e.return,o)}}}function mb(e,t,n){n.props=ua(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(o){Oe(e,t,o)}}function Br(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof n=="function"?e.refCleanup=n(o):n.current=o}}catch(i){Oe(e,t,i)}}function po(e,t){var n=e.ref,o=e.refCleanup;if(n!==null)if(typeof o=="function")try{o()}catch(i){Oe(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){Oe(e,t,i)}else n.current=null}function hb(e){var t=e.type,n=e.memoizedProps,o=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&o.focus();break e;case"img":n.src?o.src=n.src:n.srcSet&&(o.srcset=n.srcSet)}}catch(i){Oe(e,e.return,i)}}function Ld(e,t,n){try{var o=e.stateNode;pC(o,e.type,n,t),o[ln]=t}catch(i){Oe(e,e.return,i)}}function gb(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ki(e.type)||e.tag===4}function Bd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ki(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ep(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Uo));else if(o!==4&&(o===27&&ki(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Ep(e,t,n),e=e.sibling;e!==null;)Ep(e,t,n),e=e.sibling}function nc(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(o!==4&&(o===27&&ki(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(nc(e,t,n),e=e.sibling;e!==null;)nc(e,t,n),e=e.sibling}function yb(e){var t=e.stateNode,n=e.memoizedProps;try{for(var o=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);zt(t,o,n),t[Dt]=e,t[ln]=n}catch(a){Oe(e,e.return,a)}}var ko=!1,ut=!1,Hd=!1,Ky=typeof WeakSet=="function"?WeakSet:Set,Et=null;function $N(e,t){if(e=e.containerInfo,Dp=pc,e=iv(e),Kp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var o=n.getSelection&&n.getSelection();if(o&&o.rangeCount!==0){n=o.anchorNode;var i=o.anchorOffset,a=o.focusNode;o=o.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var l=0,r=-1,s=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(r=l+i),d!==a||o!==0&&d.nodeType!==3||(s=l+o),d.nodeType===3&&(l+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===i&&(r=l),f===a&&++c===o&&(s=l),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=r===-1||s===-1?null:{start:r,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Rp={focusedElem:e,selectionRange:n},pc=!1,Et=t;Et!==null;)if(t=Et,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Et=e;else for(;Et!==null;){switch(t=Et,a=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&a!==null){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,o=n.stateNode;try{var v=ua(n.type,i);e=o.getSnapshotBeforeUpdate(v,a),o.__reactInternalSnapshotBeforeUpdate=e}catch(b){Oe(n,n.return,b)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)zp(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":zp(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(U(163))}if(e=t.sibling,e!==null){e.return=t.return,Et=e;break}Et=t.return}}function vb(e,t,n){var o=n.flags;switch(n.tag){case 0:case 11:case 15:Bo(e,n),o&4&&ss(5,n);break;case 1:if(Bo(e,n),o&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(l){Oe(n,n.return,l)}else{var i=ua(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){Oe(n,n.return,l)}}o&64&&pb(n),o&512&&Br(n,n.return);break;case 3:if(Bo(e,n),o&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{_v(e,t)}catch(l){Oe(n,n.return,l)}}break;case 27:t===null&&o&4&&yb(n);case 26:case 5:Bo(e,n),t===null&&o&4&&hb(n),o&512&&Br(n,n.return);break;case 12:Bo(e,n);break;case 31:Bo(e,n),o&4&&xb(e,n);break;case 13:Bo(e,n),o&4&&_b(e,n),o&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=oC.bind(null,n),xC(e,n))));break;case 22:if(o=n.memoizedState!==null||ko,!o){t=t!==null&&t.memoizedState!==null||ut,i=ko;var a=ut;ko=o,(ut=t)&&!a?Ho(e,n,(n.subtreeFlags&8772)!==0):Bo(e,n),ko=i,ut=a}break;case 30:break;default:Bo(e,n)}}function bb(e){var t=e.alternate;t!==null&&(e.alternate=null,bb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Xp(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ke=null,nn=!1;function Lo(e,t,n){for(n=n.child;n!==null;)Sb(e,t,n),n=n.sibling}function Sb(e,t,n){if(Sn&&typeof Sn.onCommitFiberUnmount=="function")try{Sn.onCommitFiberUnmount(ts,n)}catch{}switch(n.tag){case 26:ut||po(n,t),Lo(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ut||po(n,t);var o=Ke,i=nn;ki(n.type)&&(Ke=n.stateNode,nn=!1),Lo(e,t,n),Gr(n.stateNode),Ke=o,nn=i;break;case 5:ut||po(n,t);case 6:if(o=Ke,i=nn,Ke=null,Lo(e,t,n),Ke=o,nn=i,Ke!==null)if(nn)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(n.stateNode)}catch(a){Oe(n,t,a)}else try{Ke.removeChild(n.stateNode)}catch(a){Oe(n,t,a)}break;case 18:Ke!==null&&(nn?(e=Ke,f0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Tl(e)):f0(Ke,n.stateNode));break;case 4:o=Ke,i=nn,Ke=n.stateNode.containerInfo,nn=!0,Lo(e,t,n),Ke=o,nn=i;break;case 0:case 11:case 14:case 15:Bi(2,n,t),ut||Bi(4,n,t),Lo(e,t,n);break;case 1:ut||(po(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"&&mb(n,t,o)),Lo(e,t,n);break;case 21:Lo(e,t,n);break;case 22:ut=(o=ut)||n.memoizedState!==null,Lo(e,t,n),ut=o;break;default:Lo(e,t,n)}}function xb(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Tl(e)}catch(n){Oe(t,t.return,n)}}}function _b(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Tl(e)}catch(n){Oe(t,t.return,n)}}function FN(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ky),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ky),t;default:throw Error(U(435,e.tag))}}function bu(e,t){var n=FN(e);t.forEach(function(o){if(!n.has(o)){n.add(o);var i=iC.bind(null,e,o);o.then(i,i)}})}function en(e,t){var n=t.deletions;if(n!==null)for(var o=0;o<n.length;o++){var i=n[o],a=e,l=t,r=l;e:for(;r!==null;){switch(r.tag){case 27:if(ki(r.type)){Ke=r.stateNode,nn=!1;break e}break;case 5:Ke=r.stateNode,nn=!1;break e;case 3:case 4:Ke=r.stateNode.containerInfo,nn=!0;break e}r=r.return}if(Ke===null)throw Error(U(160));Sb(a,l,i),Ke=null,nn=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Eb(t,e),t=t.sibling}var Jn=null;function Eb(e,t){var n=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:en(t,e),tn(e),o&4&&(Bi(3,e,e.return),ss(3,e),Bi(5,e,e.return));break;case 1:en(t,e),tn(e),o&512&&(ut||n===null||po(n,n.return)),o&64&&ko&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?o:n.concat(o))));break;case 26:var i=Jn;if(en(t,e),tn(e),o&512&&(ut||n===null||po(n,n.return)),o&4){var a=n!==null?n.memoizedState:null;if(o=e.memoizedState,n===null)if(o===null)if(e.stateNode===null){e:{o=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(o){case"title":a=i.getElementsByTagName("title")[0],(!a||a[is]||a[Dt]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=i.createElement(o),i.head.insertBefore(a,i.querySelector("head > title"))),zt(a,o,n),a[Dt]=e,Tt(a),o=a;break e;case"link":var l=v0("link","href",i).get(o+(n.href||""));if(l){for(var r=0;r<l.length;r++)if(a=l[r],a.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&a.getAttribute("rel")===(n.rel==null?null:n.rel)&&a.getAttribute("title")===(n.title==null?null:n.title)&&a.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){l.splice(r,1);break t}}a=i.createElement(o),zt(a,o,n),i.head.appendChild(a);break;case"meta":if(l=v0("meta","content",i).get(o+(n.content||""))){for(r=0;r<l.length;r++)if(a=l[r],a.getAttribute("content")===(n.content==null?null:""+n.content)&&a.getAttribute("name")===(n.name==null?null:n.name)&&a.getAttribute("property")===(n.property==null?null:n.property)&&a.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute("charset")===(n.charSet==null?null:n.charSet)){l.splice(r,1);break t}}a=i.createElement(o),zt(a,o,n),i.head.appendChild(a);break;default:throw Error(U(468,o))}a[Dt]=e,Tt(a),o=a}e.stateNode=o}else b0(i,e.type,e.stateNode);else e.stateNode=y0(i,o,e.memoizedProps);else a!==o?(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,o===null?b0(i,e.type,e.stateNode):y0(i,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Ld(e,e.memoizedProps,n.memoizedProps)}break;case 27:en(t,e),tn(e),o&512&&(ut||n===null||po(n,n.return)),n!==null&&o&4&&Ld(e,e.memoizedProps,n.memoizedProps);break;case 5:if(en(t,e),tn(e),o&512&&(ut||n===null||po(n,n.return)),e.flags&32){i=e.stateNode;try{gl(i,"")}catch(v){Oe(e,e.return,v)}}o&4&&e.stateNode!=null&&(i=e.memoizedProps,Ld(e,i,n!==null?n.memoizedProps:i)),o&1024&&(Hd=!0);break;case 6:if(en(t,e),tn(e),o&4){if(e.stateNode===null)throw Error(U(162));o=e.memoizedProps,n=e.stateNode;try{n.nodeValue=o}catch(v){Oe(e,e.return,v)}}break;case 3:if(Pu=null,i=Jn,Jn=cc(t.containerInfo),en(t,e),Jn=i,tn(e),o&4&&n!==null&&n.memoizedState.isDehydrated)try{Tl(t.containerInfo)}catch(v){Oe(e,e.return,v)}Hd&&(Hd=!1,Tb(e));break;case 4:o=Jn,Jn=cc(e.stateNode.containerInfo),en(t,e),tn(e),Jn=o;break;case 12:en(t,e),tn(e);break;case 31:en(t,e),tn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,bu(e,o)));break;case 13:en(t,e),tn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Cc=bn()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,bu(e,o)));break;case 22:i=e.memoizedState!==null;var s=n!==null&&n.memoizedState!==null,u=ko,c=ut;if(ko=u||i,ut=c||s,en(t,e),ut=c,ko=u,tn(e),o&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||s||ko||ut||Ji(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){s=n=t;try{if(a=s.stateNode,i)l=a.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none";else{r=s.stateNode;var d=s.memoizedProps.style,f=d!=null&&d.hasOwnProperty("display")?d.display:null;r.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(v){Oe(s,s.return,v)}}}else if(t.tag===6){if(n===null){s=t;try{s.stateNode.nodeValue=i?"":s.memoizedProps}catch(v){Oe(s,s.return,v)}}}else if(t.tag===18){if(n===null){s=t;try{var h=s.stateNode;i?d0(h,!0):d0(s.stateNode,!1)}catch(v){Oe(s,s.return,v)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}o&4&&(o=e.updateQueue,o!==null&&(n=o.retryQueue,n!==null&&(o.retryQueue=null,bu(e,n))));break;case 19:en(t,e),tn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,bu(e,o)));break;case 30:break;case 21:break;default:en(t,e),tn(e)}}function tn(e){var t=e.flags;if(t&2){try{for(var n,o=e.return;o!==null;){if(gb(o)){n=o;break}o=o.return}if(n==null)throw Error(U(160));switch(n.tag){case 27:var i=n.stateNode,a=Bd(e);nc(e,a,i);break;case 5:var l=n.stateNode;n.flags&32&&(gl(l,""),n.flags&=-33);var r=Bd(e);nc(e,r,l);break;case 3:case 4:var s=n.stateNode.containerInfo,u=Bd(e);Ep(e,u,s);break;default:throw Error(U(161))}}catch(c){Oe(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Tb(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Tb(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Bo(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)vb(e,t.alternate,t),t=t.sibling}function Ji(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Bi(4,t,t.return),Ji(t);break;case 1:po(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&mb(t,t.return,n),Ji(t);break;case 27:Gr(t.stateNode);case 26:case 5:po(t,t.return),Ji(t);break;case 22:t.memoizedState===null&&Ji(t);break;case 30:Ji(t);break;default:Ji(t)}e=e.sibling}}function Ho(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,i=e,a=t,l=a.flags;switch(a.tag){case 0:case 11:case 15:Ho(i,a,n),ss(4,a);break;case 1:if(Ho(i,a,n),o=a,i=o.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(u){Oe(o,o.return,u)}if(o=a,i=o.updateQueue,i!==null){var r=o.stateNode;try{var s=i.shared.hiddenCallbacks;if(s!==null)for(i.shared.hiddenCallbacks=null,i=0;i<s.length;i++)xv(s[i],r)}catch(u){Oe(o,o.return,u)}}n&&l&64&&pb(a),Br(a,a.return);break;case 27:yb(a);case 26:case 5:Ho(i,a,n),n&&o===null&&l&4&&hb(a),Br(a,a.return);break;case 12:Ho(i,a,n);break;case 31:Ho(i,a,n),n&&l&4&&xb(i,a);break;case 13:Ho(i,a,n),n&&l&4&&_b(i,a);break;case 22:a.memoizedState===null&&Ho(i,a,n),Br(a,a.return);break;case 30:break;default:Ho(i,a,n)}t=t.sibling}}function _m(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ls(n))}function Em(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ls(e))}function Wn(e,t,n,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Nb(e,t,n,o),t=t.sibling}function Nb(e,t,n,o){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Wn(e,t,n,o),i&2048&&ss(9,t);break;case 1:Wn(e,t,n,o);break;case 3:Wn(e,t,n,o),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ls(e)));break;case 12:if(i&2048){Wn(e,t,n,o),e=t.stateNode;try{var a=t.memoizedProps,l=a.id,r=a.onPostCommit;typeof r=="function"&&r(l,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(s){Oe(t,t.return,s)}}else Wn(e,t,n,o);break;case 31:Wn(e,t,n,o);break;case 13:Wn(e,t,n,o);break;case 23:break;case 22:a=t.stateNode,l=t.alternate,t.memoizedState!==null?a._visibility&2?Wn(e,t,n,o):Hr(e,t):a._visibility&2?Wn(e,t,n,o):(a._visibility|=2,ja(e,t,n,o,(t.subtreeFlags&10256)!==0||!1)),i&2048&&_m(l,t);break;case 24:Wn(e,t,n,o),i&2048&&Em(t.alternate,t);break;default:Wn(e,t,n,o)}}function ja(e,t,n,o,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var a=e,l=t,r=n,s=o,u=l.flags;switch(l.tag){case 0:case 11:case 15:ja(a,l,r,s,i),ss(8,l);break;case 23:break;case 22:var c=l.stateNode;l.memoizedState!==null?c._visibility&2?ja(a,l,r,s,i):Hr(a,l):(c._visibility|=2,ja(a,l,r,s,i)),i&&u&2048&&_m(l.alternate,l);break;case 24:ja(a,l,r,s,i),i&&u&2048&&Em(l.alternate,l);break;default:ja(a,l,r,s,i)}t=t.sibling}}function Hr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,o=t,i=o.flags;switch(o.tag){case 22:Hr(n,o),i&2048&&_m(o.alternate,o);break;case 24:Hr(n,o),i&2048&&Em(o.alternate,o);break;default:Hr(n,o)}t=t.sibling}}var Cr=8192;function Za(e,t,n){if(e.subtreeFlags&Cr)for(e=e.child;e!==null;)Cb(e,t,n),e=e.sibling}function Cb(e,t,n){switch(e.tag){case 26:Za(e,t,n),e.flags&Cr&&e.memoizedState!==null&&zC(n,Jn,e.memoizedState,e.memoizedProps);break;case 5:Za(e,t,n);break;case 3:case 4:var o=Jn;Jn=cc(e.stateNode.containerInfo),Za(e,t,n),Jn=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=Cr,Cr=16777216,Za(e,t,n),Cr=o):Za(e,t,n));break;default:Za(e,t,n)}}function wb(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function br(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var o=t[n];Et=o,Mb(o,e)}wb(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ab(e),e=e.sibling}function Ab(e){switch(e.tag){case 0:case 11:case 15:br(e),e.flags&2048&&Bi(9,e,e.return);break;case 3:br(e);break;case 12:br(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Bu(e)):br(e);break;default:br(e)}}function Bu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var o=t[n];Et=o,Mb(o,e)}wb(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Bi(8,t,t.return),Bu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Bu(t));break;default:Bu(t)}e=e.sibling}}function Mb(e,t){for(;Et!==null;){var n=Et;switch(n.tag){case 0:case 11:case 15:Bi(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var o=n.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:ls(n.memoizedState.cache)}if(o=n.child,o!==null)o.return=n,Et=o;else e:for(n=e;Et!==null;){o=Et;var i=o.sibling,a=o.return;if(bb(o),o===n){Et=null;break e}if(i!==null){i.return=a,Et=i;break e}Et=a}}}var KN={getCacheForType:function(e){var t=Ot(ct),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ot(ct).controller.signal}},QN=typeof WeakMap=="function"?WeakMap:Map,Me=0,Ue=null,_e=null,Ne=0,Re=0,hn=null,xi=!1,Ml=!1,Tm=!1,Fo=0,nt=0,Hi=0,ia=0,Nm=0,vn=0,Sl=0,Pr=null,on=null,Tp=!1,Cc=0,Db=0,oc=1/0,ic=null,Ai=null,ht=0,Mi=null,xl=null,Xo=0,Np=0,Cp=null,Rb=null,kr=0,wp=null;function _n(){return(Me&2)!==0&&Ne!==0?Ne&-Ne:ce.T!==null?wm():U0()}function Ob(){if(vn===0)if((Ne&536870912)===0||Ce){var e=uu;uu<<=1,(uu&3932160)===0&&(uu=262144),vn=e}else vn=536870912;return e=Tn.current,e!==null&&(e.flags|=32),vn}function an(e,t,n){(e===Ue&&(Re===2||Re===9)||e.cancelPendingCommit!==null)&&(_l(e,0),_i(e,Ne,vn,!1)),os(e,n),((Me&2)===0||e!==Ue)&&(e===Ue&&((Me&2)===0&&(ia|=n),nt===4&&_i(e,Ne,vn,!1)),go(e))}function zb(e,t,n){if((Me&6)!==0)throw Error(U(327));var o=!n&&(t&127)===0&&(t&e.expiredLanes)===0||ns(e,t),i=o?eC(e,t):Pd(e,t,!0),a=o;do{if(i===0){Ml&&!o&&_i(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!WN(n)){i=Pd(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)var l=0;else l=e.pendingLanes&-536870913,l=l!==0?l:l&536870912?536870912:0;if(l!==0){t=l;e:{var r=e;i=Pr;var s=r.current.memoizedState.isDehydrated;if(s&&(_l(r,l).flags|=256),l=Pd(r,l,!1),l!==2){if(Tm&&!s){r.errorRecoveryDisabledLanes|=a,ia|=a,i=4;break e}a=on,on=i,a!==null&&(on===null?on=a:on.push.apply(on,a))}i=l}if(a=!1,i!==2)continue}}if(i===1){_l(e,0),_i(e,t,0,!0);break}e:{switch(o=e,a=i,a){case 0:case 1:throw Error(U(345));case 4:if((t&4194048)!==t)break;case 6:_i(o,t,vn,!xi);break e;case 2:on=null;break;case 3:case 5:break;default:throw Error(U(329))}if((t&62914560)===t&&(i=Cc+300-bn(),10<i)){if(_i(o,t,vn,!xi),hc(o,0,!0)!==0)break e;Xo=t,o.timeoutHandle=Jb(Qy.bind(null,o,n,on,ic,Tp,t,vn,ia,Sl,xi,a,"Throttled",-0,0),i);break e}Qy(o,n,on,ic,Tp,t,vn,ia,Sl,xi,a,null,-0,0)}}break}while(!0);go(e)}function Qy(e,t,n,o,i,a,l,r,s,u,c,d,f,h){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)===16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Uo},Cb(t,a,d);var v=(a&62914560)===a?Cc-bn():(a&4194048)===a?Db-bn():0;if(v=LC(d,v),v!==null){Xo=a,e.cancelPendingCommit=v(Jy.bind(null,e,t,a,n,o,i,l,r,s,c,d,null,f,h)),_i(e,a,l,!u);return}}Jy(e,t,a,n,o,i,l,r,s)}function WN(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var o=0;o<n.length;o++){var i=n[o],a=i.getSnapshot;i=i.value;try{if(!En(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function _i(e,t,n,o){t&=~Nm,t&=~ia,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var i=t;0<i;){var a=31-xn(i),l=1<<a;o[a]=-1,i&=~l}n!==0&&P0(e,n,t)}function wc(){return(Me&6)===0?(us(0,!1),!1):!0}function Cm(){if(_e!==null){if(Re===0)var e=_e.return;else e=_e,Io=ma=null,fm(e),fl=null,Zr=0,e=_e;for(;e!==null;)db(e.alternate,e),e=e.return;_e=null}}function _l(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,gC(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Xo=0,Cm(),Ue=e,_e=n=Vo(e.current,null),Ne=t,Re=0,hn=null,xi=!1,Ml=ns(e,t),Tm=!1,Sl=vn=Nm=ia=Hi=nt=0,on=Pr=null,Tp=!1,(t&8)!==0&&(t|=t&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=t;0<o;){var i=31-xn(o),a=1<<i;t|=e[i],o&=~a}return Fo=t,bc(),n}function Lb(e,t){ye=null,ce.H=$r,t===Al||t===xc?(t=My(),Re=3):t===im?(t=My(),Re=4):Re=t===Sm?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,hn=t,_e===null&&(nt=1,ec(e,Gn(t,e.current)))}function Bb(){var e=Tn.current;return e===null?!0:(Ne&4194048)===Ne?In===null:(Ne&62914560)===Ne||(Ne&536870912)!==0?e===In:!1}function Hb(){var e=ce.H;return ce.H=$r,e===null?$r:e}function Pb(){var e=ce.A;return ce.A=KN,e}function ac(){nt=4,xi||(Ne&4194048)!==Ne&&Tn.current!==null||(Ml=!0),(Hi&134217727)===0&&(ia&134217727)===0||Ue===null||_i(Ue,Ne,vn,!1)}function Pd(e,t,n){var o=Me;Me|=2;var i=Hb(),a=Pb();(Ue!==e||Ne!==t)&&(ic=null,_l(e,t)),t=!1;var l=nt;e:do try{if(Re!==0&&_e!==null){var r=_e,s=hn;switch(Re){case 8:Cm(),l=6;break e;case 3:case 2:case 9:case 6:Tn.current===null&&(t=!0);var u=Re;if(Re=0,hn=null,ll(e,r,s,u),n&&Ml){l=0;break e}break;default:u=Re,Re=0,hn=null,ll(e,r,s,u)}}JN(),l=nt;break}catch(c){Lb(e,c)}while(!0);return t&&e.shellSuspendCounter++,Io=ma=null,Me=o,ce.H=i,ce.A=a,_e===null&&(Ue=null,Ne=0,bc()),l}function JN(){for(;_e!==null;)kb(_e)}function eC(e,t){var n=Me;Me|=2;var o=Hb(),i=Pb();Ue!==e||Ne!==t?(ic=null,oc=bn()+500,_l(e,t)):Ml=ns(e,t);e:do try{if(Re!==0&&_e!==null){t=_e;var a=hn;t:switch(Re){case 1:Re=0,hn=null,ll(e,t,a,1);break;case 2:case 9:if(Ay(a)){Re=0,hn=null,Wy(t);break}t=function(){Re!==2&&Re!==9||Ue!==e||(Re=7),go(e)},a.then(t,t);break e;case 3:Re=7;break e;case 4:Re=5;break e;case 7:Ay(a)?(Re=0,hn=null,Wy(t)):(Re=0,hn=null,ll(e,t,a,7));break;case 5:var l=null;switch(_e.tag){case 26:l=_e.memoizedState;case 5:case 27:var r=_e;if(l?i1(l):r.stateNode.complete){Re=0,hn=null;var s=r.sibling;if(s!==null)_e=s;else{var u=r.return;u!==null?(_e=u,Ac(u)):_e=null}break t}}Re=0,hn=null,ll(e,t,a,5);break;case 6:Re=0,hn=null,ll(e,t,a,6);break;case 8:Cm(),nt=6;break e;default:throw Error(U(462))}}tC();break}catch(c){Lb(e,c)}while(!0);return Io=ma=null,ce.H=o,ce.A=i,Me=n,_e!==null?0:(Ue=null,Ne=0,bc(),nt)}function tC(){for(;_e!==null&&!T2();)kb(_e)}function kb(e){var t=fb(e.alternate,e,Fo);e.memoizedProps=e.pendingProps,t===null?Ac(e):_e=t}function Wy(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=qy(n,t,t.pendingProps,t.type,void 0,Ne);break;case 11:t=qy(n,t,t.pendingProps,t.type.render,t.ref,Ne);break;case 5:fm(t);default:db(n,t),t=_e=dv(t,Fo),t=fb(n,t,Fo)}e.memoizedProps=e.pendingProps,t===null?Ac(e):_e=t}function ll(e,t,n,o){Io=ma=null,fm(t),fl=null,Zr=0;var i=t.return;try{if(YN(e,i,t,n,Ne)){nt=1,ec(e,Gn(n,e.current)),_e=null;return}}catch(a){if(i!==null)throw _e=i,a;nt=1,ec(e,Gn(n,e.current)),_e=null;return}t.flags&32768?(Ce||o===1?e=!0:Ml||(Ne&536870912)!==0?e=!1:(xi=e=!0,(o===2||o===9||o===3||o===6)&&(o=Tn.current,o!==null&&o.tag===13&&(o.flags|=16384))),Gb(t,e)):Ac(t)}function Ac(e){var t=e;do{if((t.flags&32768)!==0){Gb(t,xi);return}e=t.return;var n=ZN(t.alternate,t,Fo);if(n!==null){_e=n;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);nt===0&&(nt=5)}function Gb(e,t){do{var n=jN(e.alternate,e);if(n!==null){n.flags&=32767,_e=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){_e=e;return}_e=e=n}while(e!==null);nt=6,_e=null}function Jy(e,t,n,o,i,a,l,r,s){e.cancelPendingCommit=null;do Mc();while(ht!==0);if((Me&6)!==0)throw Error(U(327));if(t!==null){if(t===e.current)throw Error(U(177));if(a=t.lanes|t.childLanes,a|=Qp,L2(e,n,a,l,r,s),e===Ue&&(_e=Ue=null,Ne=0),xl=t,Mi=e,Xo=n,Np=a,Cp=i,Rb=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,aC(Yu,function(){return Xb(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=ce.T,ce.T=null,i=De.p,De.p=2,l=Me,Me|=4;try{$N(e,t,n)}finally{Me=l,De.p=i,ce.T=o}}ht=1,Ub(),Ib(),Vb()}}function Ub(){if(ht===1){ht=0;var e=Mi,t=xl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=ce.T,ce.T=null;var o=De.p;De.p=2;var i=Me;Me|=4;try{Eb(t,e);var a=Rp,l=iv(e.containerInfo),r=a.focusedElem,s=a.selectionRange;if(l!==r&&r&&r.ownerDocument&&ov(r.ownerDocument.documentElement,r)){if(s!==null&&Kp(r)){var u=s.start,c=s.end;if(c===void 0&&(c=u),"selectionStart"in r)r.selectionStart=u,r.selectionEnd=Math.min(c,r.value.length);else{var d=r.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var h=f.getSelection(),v=r.textContent.length,b=Math.min(s.start,v),S=s.end===void 0?b:Math.min(s.end,v);!h.extend&&b>S&&(l=S,S=b,b=l);var p=xy(r,b),y=xy(r,S);if(p&&y&&(h.rangeCount!==1||h.anchorNode!==p.node||h.anchorOffset!==p.offset||h.focusNode!==y.node||h.focusOffset!==y.offset)){var m=d.createRange();m.setStart(p.node,p.offset),h.removeAllRanges(),b>S?(h.addRange(m),h.extend(y.node,y.offset)):(m.setEnd(y.node,y.offset),h.addRange(m))}}}}for(d=[],h=r;h=h.parentNode;)h.nodeType===1&&d.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<d.length;r++){var g=d[r];g.element.scrollLeft=g.left,g.element.scrollTop=g.top}}pc=!!Dp,Rp=Dp=null}finally{Me=i,De.p=o,ce.T=n}}e.current=t,ht=2}}function Ib(){if(ht===2){ht=0;var e=Mi,t=xl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=ce.T,ce.T=null;var o=De.p;De.p=2;var i=Me;Me|=4;try{vb(e,t.alternate,t)}finally{Me=i,De.p=o,ce.T=n}}ht=3}}function Vb(){if(ht===4||ht===3){ht=0,N2();var e=Mi,t=xl,n=Xo,o=Rb;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ht=5:(ht=0,xl=Mi=null,Yb(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Ai=null),Yp(n),t=t.stateNode,Sn&&typeof Sn.onCommitFiberRoot=="function")try{Sn.onCommitFiberRoot(ts,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=ce.T,i=De.p,De.p=2,ce.T=null;try{for(var a=e.onRecoverableError,l=0;l<o.length;l++){var r=o[l];a(r.value,{componentStack:r.stack})}}finally{ce.T=t,De.p=i}}(Xo&3)!==0&&Mc(),go(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===wp?kr++:(kr=0,wp=e):kr=0,us(0,!1)}}function Yb(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ls(t)))}function Mc(){return Ub(),Ib(),Vb(),Xb()}function Xb(){if(ht!==5)return!1;var e=Mi,t=Np;Np=0;var n=Yp(Xo),o=ce.T,i=De.p;try{De.p=32>n?32:n,ce.T=null,n=Cp,Cp=null;var a=Mi,l=Xo;if(ht=0,xl=Mi=null,Xo=0,(Me&6)!==0)throw Error(U(331));var r=Me;if(Me|=4,Ab(a.current),Nb(a,a.current,l,n),Me=r,us(0,!1),Sn&&typeof Sn.onPostCommitFiberRoot=="function")try{Sn.onPostCommitFiberRoot(ts,a)}catch{}return!0}finally{De.p=i,ce.T=o,Yb(e,t)}}function e0(e,t,n){t=Gn(n,t),t=Sp(e.stateNode,t,2),e=wi(e,t,2),e!==null&&(os(e,2),go(e))}function Oe(e,t,n){if(e.tag===3)e0(e,e,n);else for(;t!==null;){if(t.tag===3){e0(t,e,n);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Ai===null||!Ai.has(o))){e=Gn(n,e),n=ab(2),o=wi(t,n,2),o!==null&&(lb(n,o,t,e),os(o,2),go(o));break}}t=t.return}}function kd(e,t,n){var o=e.pingCache;if(o===null){o=e.pingCache=new QN;var i=new Set;o.set(t,i)}else i=o.get(t),i===void 0&&(i=new Set,o.set(t,i));i.has(n)||(Tm=!0,i.add(n),e=nC.bind(null,e,t,n),t.then(e,e))}function nC(e,t,n){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ue===e&&(Ne&n)===n&&(nt===4||nt===3&&(Ne&62914560)===Ne&&300>bn()-Cc?(Me&2)===0&&_l(e,0):Nm|=n,Sl===Ne&&(Sl=0)),go(e)}function qb(e,t){t===0&&(t=H0()),e=pa(e,t),e!==null&&(os(e,t),go(e))}function oC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qb(e,n)}function iC(e,t){var n=0;switch(e.tag){case 31:case 13:var o=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(U(314))}o!==null&&o.delete(t),qb(e,n)}function aC(e,t){return Ip(e,t)}var lc=null,$a=null,Ap=!1,rc=!1,Gd=!1,Ei=0;function go(e){e!==$a&&e.next===null&&($a===null?lc=$a=e:$a=$a.next=e),rc=!0,Ap||(Ap=!0,rC())}function us(e,t){if(!Gd&&rc){Gd=!0;do for(var n=!1,o=lc;o!==null;){if(!t)if(e!==0){var i=o.pendingLanes;if(i===0)var a=0;else{var l=o.suspendedLanes,r=o.pingedLanes;a=(1<<31-xn(42|e)+1)-1,a&=i&~(l&~r),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,t0(o,a))}else a=Ne,a=hc(o,o===Ue?a:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(a&3)===0||ns(o,a)||(n=!0,t0(o,a));o=o.next}while(n);Gd=!1}}function lC(){Zb()}function Zb(){rc=Ap=!1;var e=0;Ei!==0&&hC()&&(e=Ei);for(var t=bn(),n=null,o=lc;o!==null;){var i=o.next,a=jb(o,t);a===0?(o.next=null,n===null?lc=i:n.next=i,i===null&&($a=n)):(n=o,(e!==0||(a&3)!==0)&&(rc=!0)),o=i}ht!==0&&ht!==5||us(e,!1),Ei!==0&&(Ei=0)}function jb(e,t){for(var n=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var l=31-xn(a),r=1<<l,s=i[l];s===-1?((r&n)===0||(r&o)!==0)&&(i[l]=z2(r,t)):s<=t&&(e.expiredLanes|=r),a&=~r}if(t=Ue,n=Ne,n=hc(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,n===0||e===t&&(Re===2||Re===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&md(o),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||ns(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(o!==null&&md(o),Yp(n)){case 2:case 8:n=L0;break;case 32:n=Yu;break;case 268435456:n=B0;break;default:n=Yu}return o=$b.bind(null,e),n=Ip(n,o),e.callbackPriority=t,e.callbackNode=n,t}return o!==null&&o!==null&&md(o),e.callbackPriority=2,e.callbackNode=null,2}function $b(e,t){if(ht!==0&&ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Mc()&&e.callbackNode!==n)return null;var o=Ne;return o=hc(e,e===Ue?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(zb(e,o,t),jb(e,bn()),e.callbackNode!=null&&e.callbackNode===n?$b.bind(null,e):null)}function t0(e,t){if(Mc())return null;zb(e,t,!0)}function rC(){yC(function(){(Me&6)!==0?Ip(z0,lC):Zb()})}function wm(){if(Ei===0){var e=yl;e===0&&(e=su,su<<=1,(su&261888)===0&&(su=256)),Ei=e}return Ei}function n0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Cu(""+e)}function o0(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function sC(e,t,n,o,i){if(t==="submit"&&n&&n.stateNode===i){var a=n0((i[ln]||null).action),l=o.submitter;l&&(t=(t=l[ln]||null)?n0(t.formAction):l.getAttribute("formAction"),t!==null&&(a=t,l=null));var r=new gc("action","action",null,o,i);e.push({event:r,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Ei!==0){var s=l?o0(i,l):new FormData(i);vp(n,{pending:!0,data:s,method:i.method,action:a},null,s)}}else typeof a=="function"&&(r.preventDefault(),s=l?o0(i,l):new FormData(i),vp(n,{pending:!0,data:s,method:i.method,action:a},a,s))},currentTarget:i}]})}}for(Su=0;Su<lp.length;Su++)xu=lp[Su],i0=xu.toLowerCase(),a0=xu[0].toUpperCase()+xu.slice(1),eo(i0,"on"+a0);var xu,i0,a0,Su;eo(lv,"onAnimationEnd");eo(rv,"onAnimationIteration");eo(sv,"onAnimationStart");eo("dblclick","onDoubleClick");eo("focusin","onFocus");eo("focusout","onBlur");eo(CN,"onTransitionRun");eo(wN,"onTransitionStart");eo(AN,"onTransitionCancel");eo(uv,"onTransitionEnd");hl("onMouseEnter",["mouseout","mouseover"]);hl("onMouseLeave",["mouseout","mouseover"]);hl("onPointerEnter",["pointerout","pointerover"]);hl("onPointerLeave",["pointerout","pointerover"]);ca("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ca("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ca("onBeforeInput",["compositionend","keypress","textInput","paste"]);ca("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ca("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ca("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fr="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(" "),uC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fr));function Fb(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var o=e[n],i=o.event;o=o.listeners;e:{var a=void 0;if(t)for(var l=o.length-1;0<=l;l--){var r=o[l],s=r.instance,u=r.currentTarget;if(r=r.listener,s!==a&&i.isPropagationStopped())break e;a=r,i.currentTarget=u;try{a(i)}catch(c){qu(c)}i.currentTarget=null,a=s}else for(l=0;l<o.length;l++){if(r=o[l],s=r.instance,u=r.currentTarget,r=r.listener,s!==a&&i.isPropagationStopped())break e;a=r,i.currentTarget=u;try{a(i)}catch(c){qu(c)}i.currentTarget=null,a=s}}}}function xe(e,t){var n=t[Wd];n===void 0&&(n=t[Wd]=new Set);var o=e+"__bubble";n.has(o)||(Kb(t,e,2,!1),n.add(o))}function Ud(e,t,n){var o=0;t&&(o|=4),Kb(n,e,o,t)}var _u="_reactListening"+Math.random().toString(36).slice(2);function Am(e){if(!e[_u]){e[_u]=!0,I0.forEach(function(n){n!=="selectionchange"&&(uC.has(n)||Ud(n,!1,e),Ud(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_u]||(t[_u]=!0,Ud("selectionchange",!1,t))}}function Kb(e,t,n,o){switch(u1(t)){case 2:var i=PC;break;case 8:i=kC;break;default:i=Om}n=i.bind(null,t,n,e),i=void 0,!op||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),o?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Id(e,t,n,o,i){var a=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var l=o.tag;if(l===3||l===4){var r=o.stateNode.containerInfo;if(r===i)break;if(l===4)for(l=o.return;l!==null;){var s=l.tag;if((s===3||s===4)&&l.stateNode.containerInfo===i)return;l=l.return}for(;r!==null;){if(l=Qa(r),l===null)return;if(s=l.tag,s===5||s===6||s===26||s===27){o=a=l;continue e}r=r.parentNode}}o=o.return}F0(function(){var u=a,c=Zp(n),d=[];e:{var f=cv.get(e);if(f!==void 0){var h=gc,v=e;switch(e){case"keypress":if(Au(n)===0)break e;case"keydown":case"keyup":h=iN;break;case"focusin":v="focus",h=bd;break;case"focusout":v="blur",h=bd;break;case"beforeblur":case"afterblur":h=bd;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=dy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Z2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=rN;break;case lv:case rv:case sv:h=F2;break;case uv:h=uN;break;case"scroll":case"scrollend":h=X2;break;case"wheel":h=fN;break;case"copy":case"cut":case"paste":h=Q2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=my;break;case"toggle":case"beforetoggle":h=pN}var b=(t&4)!==0,S=!b&&(e==="scroll"||e==="scrollend"),p=b?f!==null?f+"Capture":null:f;b=[];for(var y=u,m;y!==null;){var g=y;if(m=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||m===null||p===null||(g=Ir(y,p),g!=null&&b.push(Kr(y,g,m))),S)break;y=y.return}0<b.length&&(f=new h(f,v,null,n,c),d.push({event:f,listeners:b}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==np&&(v=n.relatedTarget||n.fromElement)&&(Qa(v)||v[Nl]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(v=n.relatedTarget||n.toElement,h=u,v=v?Qa(v):null,v!==null&&(S=es(v),b=v.tag,v!==S||b!==5&&b!==27&&b!==6)&&(v=null)):(h=null,v=u),h!==v)){if(b=dy,g="onMouseLeave",p="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(b=my,g="onPointerLeave",p="onPointerEnter",y="pointer"),S=h==null?f:Tr(h),m=v==null?f:Tr(v),f=new b(g,y+"leave",h,n,c),f.target=S,f.relatedTarget=m,g=null,Qa(c)===u&&(b=new b(p,y+"enter",v,n,c),b.target=m,b.relatedTarget=S,g=b),S=g,h&&v)t:{for(b=cC,p=h,y=v,m=0,g=p;g;g=b(g))m++;g=0;for(var x=y;x;x=b(x))g++;for(;0<m-g;)p=b(p),m--;for(;0<g-m;)y=b(y),g--;for(;m--;){if(p===y||y!==null&&p===y.alternate){b=p;break t}p=b(p),y=b(y)}b=null}else b=null;h!==null&&l0(d,f,h,b,!1),v!==null&&S!==null&&l0(d,S,v,b,!0)}}e:{if(f=u?Tr(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var _=vy;else if(yy(f))if(tv)_=EN;else{_=xN;var E=SN}else h=f.nodeName,!h||h.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?u&&qp(u.elementType)&&(_=vy):_=_N;if(_&&(_=_(e,u))){ev(d,_,n,c);break e}E&&E(e,f,u),e==="focusout"&&u&&f.type==="number"&&u.memoizedProps.value!=null&&tp(f,"number",f.value)}switch(E=u?Tr(u):window,e){case"focusin":(yy(E)||E.contentEditable==="true")&&(el=E,ip=u,Mr=null);break;case"focusout":Mr=ip=el=null;break;case"mousedown":ap=!0;break;case"contextmenu":case"mouseup":case"dragend":ap=!1,_y(d,n,c);break;case"selectionchange":if(NN)break;case"keydown":case"keyup":_y(d,n,c)}var w;if(Fp)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Ja?W0(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(Q0&&n.locale!=="ko"&&(Ja||C!=="onCompositionStart"?C==="onCompositionEnd"&&Ja&&(w=K0()):(Si=c,jp="value"in Si?Si.value:Si.textContent,Ja=!0)),E=sc(u,C),0<E.length&&(C=new py(C,e,null,n,c),d.push({event:C,listeners:E}),w?C.data=w:(w=J0(n),w!==null&&(C.data=w)))),(w=hN?gN(e,n):yN(e,n))&&(C=sc(u,"onBeforeInput"),0<C.length&&(E=new py("onBeforeInput","beforeinput",null,n,c),d.push({event:E,listeners:C}),E.data=w)),sC(d,e,u,n,c)}Fb(d,t)})}function Kr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function sc(e,t){for(var n=t+"Capture",o=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Ir(e,n),i!=null&&o.unshift(Kr(e,i,a)),i=Ir(e,t),i!=null&&o.push(Kr(e,i,a))),e.tag===3)return o;e=e.return}return[]}function cC(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function l0(e,t,n,o,i){for(var a=t._reactName,l=[];n!==null&&n!==o;){var r=n,s=r.alternate,u=r.stateNode;if(r=r.tag,s!==null&&s===o)break;r!==5&&r!==26&&r!==27||u===null||(s=u,i?(u=Ir(n,a),u!=null&&l.unshift(Kr(n,u,s))):i||(u=Ir(n,a),u!=null&&l.push(Kr(n,u,s)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var fC=/\r\n?/g,dC=/\u0000|\uFFFD/g;function r0(e){return(typeof e=="string"?e:""+e).replace(fC,`
|
|
2482
|
+
`).replace(dC,"")}function Qb(e,t){return t=r0(t),r0(e)===t}function Pe(e,t,n,o,i,a){switch(n){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||gl(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&gl(e,""+o);break;case"className":fu(e,"class",o);break;case"tabIndex":fu(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":fu(e,n,o);break;case"style":$0(e,o,a);break;case"data":if(t!=="object"){fu(e,"data",o);break}case"src":case"href":if(o===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(n);break}o=Cu(""+o),e.setAttribute(n,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(n,"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 a=="function"&&(n==="formAction"?(t!=="input"&&Pe(e,t,"name",i.name,i,null),Pe(e,t,"formEncType",i.formEncType,i,null),Pe(e,t,"formMethod",i.formMethod,i,null),Pe(e,t,"formTarget",i.formTarget,i,null)):(Pe(e,t,"encType",i.encType,i,null),Pe(e,t,"method",i.method,i,null),Pe(e,t,"target",i.target,i,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(n);break}o=Cu(""+o),e.setAttribute(n,o);break;case"onClick":o!=null&&(e.onclick=Uo);break;case"onScroll":o!=null&&xe("scroll",e);break;case"onScrollEnd":o!=null&&xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(U(61));if(n=o.__html,n!=null){if(i.children!=null)throw Error(U(60));e.innerHTML=n}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}n=Cu(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,""+o):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":o===!0?e.setAttribute(n,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,o):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(n,o):e.removeAttribute(n);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(n):e.setAttribute(n,o);break;case"popover":xe("beforetoggle",e),xe("toggle",e),Nu(e,"popover",o);break;case"xlinkActuate":Oo(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Oo(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Oo(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Oo(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Oo(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Oo(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Oo(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Oo(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Oo(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Nu(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=V2.get(n)||n,Nu(e,n,o))}}function Mp(e,t,n,o,i,a){switch(n){case"style":$0(e,o,a);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(U(61));if(n=o.__html,n!=null){if(i.children!=null)throw Error(U(60));e.innerHTML=n}}break;case"children":typeof o=="string"?gl(e,o):(typeof o=="number"||typeof o=="bigint")&&gl(e,""+o);break;case"onScroll":o!=null&&xe("scroll",e);break;case"onScrollEnd":o!=null&&xe("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Uo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!V0.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),a=e[ln]||null,a=a!=null?a[n]:null,typeof a=="function"&&e.removeEventListener(t,a,i),typeof o=="function")){typeof a!="function"&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,o,i);break e}n in e?e[n]=o:o===!0?e.setAttribute(n,""):Nu(e,n,o)}}}function zt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",e),xe("load",e);var o=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var l=n[a];if(l!=null)switch(a){case"src":o=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(U(137,t));default:Pe(e,t,a,l,n,null)}}i&&Pe(e,t,"srcSet",n.srcSet,n,null),o&&Pe(e,t,"src",n.src,n,null);return;case"input":xe("invalid",e);var r=a=l=i=null,s=null,u=null;for(o in n)if(n.hasOwnProperty(o)){var c=n[o];if(c!=null)switch(o){case"name":i=c;break;case"type":l=c;break;case"checked":s=c;break;case"defaultChecked":u=c;break;case"value":a=c;break;case"defaultValue":r=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(U(137,t));break;default:Pe(e,t,o,c,n,null)}}q0(e,a,r,s,u,l,i,!1);return;case"select":xe("invalid",e),o=l=a=null;for(i in n)if(n.hasOwnProperty(i)&&(r=n[i],r!=null))switch(i){case"value":a=r;break;case"defaultValue":l=r;break;case"multiple":o=r;default:Pe(e,t,i,r,n,null)}t=a,n=l,e.multiple=!!o,t!=null?sl(e,!!o,t,!1):n!=null&&sl(e,!!o,n,!0);return;case"textarea":xe("invalid",e),a=i=o=null;for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case"value":o=r;break;case"defaultValue":i=r;break;case"children":a=r;break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(U(91));break;default:Pe(e,t,l,r,n,null)}j0(e,o,i,a);return;case"option":for(s in n)n.hasOwnProperty(s)&&(o=n[s],o!=null)&&(s==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":Pe(e,t,s,o,n,null));return;case"dialog":xe("beforetoggle",e),xe("toggle",e),xe("cancel",e),xe("close",e);break;case"iframe":case"object":xe("load",e);break;case"video":case"audio":for(o=0;o<Fr.length;o++)xe(Fr[o],e);break;case"image":xe("error",e),xe("load",e);break;case"details":xe("toggle",e);break;case"embed":case"source":case"link":xe("error",e),xe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(o=n[u],o!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(U(137,t));default:Pe(e,t,u,o,n,null)}return;default:if(qp(t)){for(c in n)n.hasOwnProperty(c)&&(o=n[c],o!==void 0&&Mp(e,t,c,o,n,void 0));return}}for(r in n)n.hasOwnProperty(r)&&(o=n[r],o!=null&&Pe(e,t,r,o,n,null))}function pC(e,t,n,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,a=null,l=null,r=null,s=null,u=null,c=null;for(h in n){var d=n[h];if(n.hasOwnProperty(h)&&d!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":s=d;default:o.hasOwnProperty(h)||Pe(e,t,h,null,o,d)}}for(var f in o){var h=o[f];if(d=n[f],o.hasOwnProperty(f)&&(h!=null||d!=null))switch(f){case"type":a=h;break;case"name":i=h;break;case"checked":u=h;break;case"defaultChecked":c=h;break;case"value":l=h;break;case"defaultValue":r=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(U(137,t));break;default:h!==d&&Pe(e,t,f,h,o,d)}}ep(e,l,r,s,u,c,a,i);return;case"select":h=l=r=f=null;for(a in n)if(s=n[a],n.hasOwnProperty(a)&&s!=null)switch(a){case"value":break;case"multiple":h=s;default:o.hasOwnProperty(a)||Pe(e,t,a,null,o,s)}for(i in o)if(a=o[i],s=n[i],o.hasOwnProperty(i)&&(a!=null||s!=null))switch(i){case"value":f=a;break;case"defaultValue":r=a;break;case"multiple":l=a;default:a!==s&&Pe(e,t,i,a,o,s)}t=r,n=l,o=h,f!=null?sl(e,!!n,f,!1):!!o!=!!n&&(t!=null?sl(e,!!n,t,!0):sl(e,!!n,n?[]:"",!1));return;case"textarea":h=f=null;for(r in n)if(i=n[r],n.hasOwnProperty(r)&&i!=null&&!o.hasOwnProperty(r))switch(r){case"value":break;case"children":break;default:Pe(e,t,r,null,o,i)}for(l in o)if(i=o[l],a=n[l],o.hasOwnProperty(l)&&(i!=null||a!=null))switch(l){case"value":f=i;break;case"defaultValue":h=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(U(91));break;default:i!==a&&Pe(e,t,l,i,o,a)}Z0(e,f,h);return;case"option":for(var v in n)f=n[v],n.hasOwnProperty(v)&&f!=null&&!o.hasOwnProperty(v)&&(v==="selected"?e.selected=!1:Pe(e,t,v,null,o,f));for(s in o)f=o[s],h=n[s],o.hasOwnProperty(s)&&f!==h&&(f!=null||h!=null)&&(s==="selected"?e.selected=f&&typeof f!="function"&&typeof f!="symbol":Pe(e,t,s,f,o,h));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 b in n)f=n[b],n.hasOwnProperty(b)&&f!=null&&!o.hasOwnProperty(b)&&Pe(e,t,b,null,o,f);for(u in o)if(f=o[u],h=n[u],o.hasOwnProperty(u)&&f!==h&&(f!=null||h!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(U(137,t));break;default:Pe(e,t,u,f,o,h)}return;default:if(qp(t)){for(var S in n)f=n[S],n.hasOwnProperty(S)&&f!==void 0&&!o.hasOwnProperty(S)&&Mp(e,t,S,void 0,o,f);for(c in o)f=o[c],h=n[c],!o.hasOwnProperty(c)||f===h||f===void 0&&h===void 0||Mp(e,t,c,f,o,h);return}}for(var p in n)f=n[p],n.hasOwnProperty(p)&&f!=null&&!o.hasOwnProperty(p)&&Pe(e,t,p,null,o,f);for(d in o)f=o[d],h=n[d],!o.hasOwnProperty(d)||f===h||f==null&&h==null||Pe(e,t,d,f,o,h)}function s0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function mC(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),o=0;o<n.length;o++){var i=n[o],a=i.transferSize,l=i.initiatorType,r=i.duration;if(a&&r&&s0(l)){for(l=0,r=i.responseEnd,o+=1;o<n.length;o++){var s=n[o],u=s.startTime;if(u>r)break;var c=s.transferSize,d=s.initiatorType;c&&s0(d)&&(s=s.responseEnd,l+=c*(s<r?1:(r-u)/(s-u)))}if(--o,t+=8*(a+l)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Dp=null,Rp=null;function uc(e){return e.nodeType===9?e:e.ownerDocument}function u0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Wb(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Op(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Vd=null;function hC(){var e=window.event;return e&&e.type==="popstate"?e===Vd?!1:(Vd=e,!0):(Vd=null,!1)}var Jb=typeof setTimeout=="function"?setTimeout:void 0,gC=typeof clearTimeout=="function"?clearTimeout:void 0,c0=typeof Promise=="function"?Promise:void 0,yC=typeof queueMicrotask=="function"?queueMicrotask:typeof c0<"u"?function(e){return c0.resolve(null).then(e).catch(vC)}:Jb;function vC(e){setTimeout(function(){throw e})}function ki(e){return e==="head"}function f0(e,t){var n=t,o=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(o===0){e.removeChild(i),Tl(t);return}o--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")o++;else if(n==="html")Gr(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Gr(n);for(var a=n.firstChild;a;){var l=a.nextSibling,r=a.nodeName;a[is]||r==="SCRIPT"||r==="STYLE"||r==="LINK"&&a.rel.toLowerCase()==="stylesheet"||n.removeChild(a),a=l}}else n==="body"&&Gr(e.ownerDocument.body);n=i}while(n);Tl(t)}function d0(e,t){var n=e;e=0;do{var o=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=o}while(n)}function zp(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":zp(n),Xp(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function bC(e,t,n,o){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[is])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(a=e.getAttribute("rel"),a==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(a!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(a=e.getAttribute("src"),(a!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var a=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===a)return e}else return e;if(e=Vn(e.nextSibling),e===null)break}return null}function SC(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Vn(e.nextSibling),e===null))return null;return e}function e1(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Vn(e.nextSibling),e===null))return null;return e}function Lp(e){return e.data==="$?"||e.data==="$~"}function Bp(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function xC(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var o=function(){t(),n.removeEventListener("DOMContentLoaded",o)};n.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Vn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Hp=null;function p0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Vn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function m0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function t1(e,t,n){switch(t=uc(n),e){case"html":if(e=t.documentElement,!e)throw Error(U(452));return e;case"head":if(e=t.head,!e)throw Error(U(453));return e;case"body":if(e=t.body,!e)throw Error(U(454));return e;default:throw Error(U(451))}}function Gr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Xp(e)}var Yn=new Map,h0=new Set;function cc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ko=De.d;De.d={f:_C,r:EC,D:TC,C:NC,L:CC,m:wC,X:MC,S:AC,M:DC};function _C(){var e=Ko.f(),t=wc();return e||t}function EC(e){var t=Cl(e);t!==null&&t.tag===5&&t.type==="form"?$v(t):Ko.r(e)}var Dl=typeof document>"u"?null:document;function n1(e,t,n){var o=Dl;if(o&&typeof t=="string"&&t){var i=kn(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),h0.has(i)||(h0.add(i),e={rel:e,crossOrigin:n,href:t},o.querySelector(i)===null&&(t=o.createElement("link"),zt(t,"link",e),Tt(t),o.head.appendChild(t)))}}function TC(e){Ko.D(e),n1("dns-prefetch",e,null)}function NC(e,t){Ko.C(e,t),n1("preconnect",e,t)}function CC(e,t,n){Ko.L(e,t,n);var o=Dl;if(o&&e&&t){var i='link[rel="preload"][as="'+kn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+kn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+kn(n.imageSizes)+'"]')):i+='[href="'+kn(e)+'"]';var a=i;switch(t){case"style":a=El(e);break;case"script":a=Rl(e)}Yn.has(a)||(e=Ze({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Yn.set(a,e),o.querySelector(i)!==null||t==="style"&&o.querySelector(cs(a))||t==="script"&&o.querySelector(fs(a))||(t=o.createElement("link"),zt(t,"link",e),Tt(t),o.head.appendChild(t)))}}function wC(e,t){Ko.m(e,t);var n=Dl;if(n&&e){var o=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+kn(o)+'"][href="'+kn(e)+'"]',a=i;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=Rl(e)}if(!Yn.has(a)&&(e=Ze({rel:"modulepreload",href:e},t),Yn.set(a,e),n.querySelector(i)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(fs(a)))return}o=n.createElement("link"),zt(o,"link",e),Tt(o),n.head.appendChild(o)}}}function AC(e,t,n){Ko.S(e,t,n);var o=Dl;if(o&&e){var i=rl(o).hoistableStyles,a=El(e);t=t||"default";var l=i.get(a);if(!l){var r={loading:0,preload:null};if(l=o.querySelector(cs(a)))r.loading=5;else{e=Ze({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Yn.get(a))&&Mm(e,n);var s=l=o.createElement("link");Tt(s),zt(s,"link",e),s._p=new Promise(function(u,c){s.onload=u,s.onerror=c}),s.addEventListener("load",function(){r.loading|=1}),s.addEventListener("error",function(){r.loading|=2}),r.loading|=4,Hu(l,t,o)}l={type:"stylesheet",instance:l,count:1,state:r},i.set(a,l)}}}function MC(e,t){Ko.X(e,t);var n=Dl;if(n&&e){var o=rl(n).hoistableScripts,i=Rl(e),a=o.get(i);a||(a=n.querySelector(fs(i)),a||(e=Ze({src:e,async:!0},t),(t=Yn.get(i))&&Dm(e,t),a=n.createElement("script"),Tt(a),zt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},o.set(i,a))}}function DC(e,t){Ko.M(e,t);var n=Dl;if(n&&e){var o=rl(n).hoistableScripts,i=Rl(e),a=o.get(i);a||(a=n.querySelector(fs(i)),a||(e=Ze({src:e,async:!0,type:"module"},t),(t=Yn.get(i))&&Dm(e,t),a=n.createElement("script"),Tt(a),zt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},o.set(i,a))}}function g0(e,t,n,o){var i=(i=Ti.current)?cc(i):null;if(!i)throw Error(U(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=El(n.href),n=rl(i).hoistableStyles,o=n.get(t),o||(o={type:"style",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=El(n.href);var a=rl(i).hoistableStyles,l=a.get(e);if(l||(i=i.ownerDocument||i,l={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,l),(a=i.querySelector(cs(e)))&&!a._p&&(l.instance=a,l.state.loading=5),Yn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Yn.set(e,n),a||RC(i,e,n,l.state))),t&&o===null)throw Error(U(528,""));return l}if(t&&o!==null)throw Error(U(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Rl(n),n=rl(i).hoistableScripts,o=n.get(t),o||(o={type:"script",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(U(444,e))}}function El(e){return'href="'+kn(e)+'"'}function cs(e){return'link[rel="stylesheet"]['+e+"]"}function o1(e){return Ze({},e,{"data-precedence":e.precedence,precedence:null})}function RC(e,t,n,o){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?o.loading=1:(t=e.createElement("link"),o.preload=t,t.addEventListener("load",function(){return o.loading|=1}),t.addEventListener("error",function(){return o.loading|=2}),zt(t,"link",n),Tt(t),e.head.appendChild(t))}function Rl(e){return'[src="'+kn(e)+'"]'}function fs(e){return"script[async]"+e}function y0(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+kn(n.href)+'"]');if(o)return t.instance=o,Tt(o),o;var i=Ze({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),Tt(o),zt(o,"style",i),Hu(o,n.precedence,e),t.instance=o;case"stylesheet":i=El(n.href);var a=e.querySelector(cs(i));if(a)return t.state.loading|=4,t.instance=a,Tt(a),a;o=o1(n),(i=Yn.get(i))&&Mm(o,i),a=(e.ownerDocument||e).createElement("link"),Tt(a);var l=a;return l._p=new Promise(function(r,s){l.onload=r,l.onerror=s}),zt(a,"link",o),t.state.loading|=4,Hu(a,n.precedence,e),t.instance=a;case"script":return a=Rl(n.src),(i=e.querySelector(fs(a)))?(t.instance=i,Tt(i),i):(o=n,(i=Yn.get(a))&&(o=Ze({},n),Dm(o,i)),e=e.ownerDocument||e,i=e.createElement("script"),Tt(i),zt(i,"link",o),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(U(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,Hu(o,n.precedence,e));return t.instance}function Hu(e,t,n){for(var o=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=o.length?o[o.length-1]:null,a=i,l=0;l<o.length;l++){var r=o[l];if(r.dataset.precedence===t)a=r;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Mm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Dm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Pu=null;function v0(e,t,n){if(Pu===null){var o=new Map,i=Pu=new Map;i.set(n,o)}else i=Pu,o=i.get(n),o||(o=new Map,i.set(n,o));if(o.has(e))return o;for(o.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[is]||a[Dt]||e==="link"&&a.getAttribute("rel")==="stylesheet")&&a.namespaceURI!=="http://www.w3.org/2000/svg"){var l=a.getAttribute(t)||"";l=e+l;var r=o.get(l);r?r.push(a):o.set(l,[a])}}return o}function b0(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function OC(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function i1(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function zC(e,t,n,o){if(n.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=El(o.href),a=t.querySelector(cs(i));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=fc.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Tt(a);return}a=t.ownerDocument||t,o=o1(o),(i=Yn.get(i))&&Mm(o,i),a=a.createElement("link"),Tt(a);var l=a;l._p=new Promise(function(r,s){l.onload=r,l.onerror=s}),zt(a,"link",o),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=fc.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Yd=0;function LC(e,t){return e.stylesheets&&e.count===0&&ku(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var o=setTimeout(function(){if(e.stylesheets&&ku(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&Yd===0&&(Yd=62500*mC());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ku(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>Yd?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(i)}}:null}function fc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ku(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var dc=null;function ku(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,dc=new Map,t.forEach(BC,e),dc=null,fc.call(e))}function BC(e,t){if(!(t.state.loading&4)){var n=dc.get(e);if(n)var o=n.get(null);else{n=new Map,dc.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<i.length;a++){var l=i[a];(l.nodeName==="LINK"||l.getAttribute("media")!=="not all")&&(n.set(l.dataset.precedence,l),o=l)}o&&n.set(null,o)}i=t.instance,l=i.getAttribute("data-precedence"),a=n.get(l)||o,a===o&&n.set(null,i),n.set(l,i),this.count++,o=fc.bind(this),i.addEventListener("load",o),i.addEventListener("error",o),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qr={$$typeof:Go,Provider:null,Consumer:null,_currentValue:ea,_currentValue2:ea,_threadCount:0};function HC(e,t,n,o,i,a,l,r,s){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=hd(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hd(0),this.hiddenUpdates=hd(null),this.identifierPrefix=o,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=l,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function a1(e,t,n,o,i,a,l,r,s,u,c,d){return e=new HC(e,t,n,l,s,u,c,d,r),t=1,a===!0&&(t|=24),a=yn(3,null,null,t),e.current=a,a.stateNode=e,t=nm(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:o,isDehydrated:n,cache:t},am(a),e}function l1(e){return e?(e=ol,e):ol}function r1(e,t,n,o,i,a){i=l1(i),o.context===null?o.context=i:o.pendingContext=i,o=Ci(t),o.payload={element:n},a=a===void 0?null:a,a!==null&&(o.callback=a),n=wi(e,o,t),n!==null&&(an(n,e,t),Rr(n,e,t))}function S0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Rm(e,t){S0(e,t),(e=e.alternate)&&S0(e,t)}function s1(e){if(e.tag===13||e.tag===31){var t=pa(e,67108864);t!==null&&an(t,e,67108864),Rm(e,67108864)}}function x0(e){if(e.tag===13||e.tag===31){var t=_n();t=Vp(t);var n=pa(e,t);n!==null&&an(n,e,t),Rm(e,t)}}var pc=!0;function PC(e,t,n,o){var i=ce.T;ce.T=null;var a=De.p;try{De.p=2,Om(e,t,n,o)}finally{De.p=a,ce.T=i}}function kC(e,t,n,o){var i=ce.T;ce.T=null;var a=De.p;try{De.p=8,Om(e,t,n,o)}finally{De.p=a,ce.T=i}}function Om(e,t,n,o){if(pc){var i=Pp(o);if(i===null)Id(e,t,o,mc,n),_0(e,o);else if(UC(i,e,t,n,o))o.stopPropagation();else if(_0(e,o),t&4&&-1<GC.indexOf(e)){for(;i!==null;){var a=Cl(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var l=Qi(a.pendingLanes);if(l!==0){var r=a;for(r.pendingLanes|=2,r.entangledLanes|=2;l;){var s=1<<31-xn(l);r.entanglements[1]|=s,l&=~s}go(a),(Me&6)===0&&(oc=bn()+500,us(0,!1))}}break;case 31:case 13:r=pa(a,2),r!==null&&an(r,a,2),wc(),Rm(a,2)}if(a=Pp(o),a===null&&Id(e,t,o,mc,n),a===i)break;i=a}i!==null&&o.stopPropagation()}else Id(e,t,o,null,n)}}function Pp(e){return e=Zp(e),zm(e)}var mc=null;function zm(e){if(mc=null,e=Qa(e),e!==null){var t=es(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=A0(t),e!==null)return e;e=null}else if(n===31){if(e=M0(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return mc=e,null}function u1(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(C2()){case z0:return 2;case L0:return 8;case Yu:case w2:return 32;case B0:return 268435456;default:return 32}default:return 32}}var kp=!1,Di=null,Ri=null,Oi=null,Wr=new Map,Jr=new Map,vi=[],GC="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 _0(e,t){switch(e){case"focusin":case"focusout":Di=null;break;case"dragenter":case"dragleave":Ri=null;break;case"mouseover":case"mouseout":Oi=null;break;case"pointerover":case"pointerout":Wr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Jr.delete(t.pointerId)}}function Sr(e,t,n,o,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:o,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Cl(t),t!==null&&s1(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function UC(e,t,n,o,i){switch(t){case"focusin":return Di=Sr(Di,e,t,n,o,i),!0;case"dragenter":return Ri=Sr(Ri,e,t,n,o,i),!0;case"mouseover":return Oi=Sr(Oi,e,t,n,o,i),!0;case"pointerover":var a=i.pointerId;return Wr.set(a,Sr(Wr.get(a)||null,e,t,n,o,i)),!0;case"gotpointercapture":return a=i.pointerId,Jr.set(a,Sr(Jr.get(a)||null,e,t,n,o,i)),!0}return!1}function c1(e){var t=Qa(e.target);if(t!==null){var n=es(t);if(n!==null){if(t=n.tag,t===13){if(t=A0(n),t!==null){e.blockedOn=t,ay(e.priority,function(){x0(n)});return}}else if(t===31){if(t=M0(n),t!==null){e.blockedOn=t,ay(e.priority,function(){x0(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Gu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Pp(e.nativeEvent);if(n===null){n=e.nativeEvent;var o=new n.constructor(n.type,n);np=o,n.target.dispatchEvent(o),np=null}else return t=Cl(n),t!==null&&s1(t),e.blockedOn=n,!1;t.shift()}return!0}function E0(e,t,n){Gu(e)&&n.delete(t)}function IC(){kp=!1,Di!==null&&Gu(Di)&&(Di=null),Ri!==null&&Gu(Ri)&&(Ri=null),Oi!==null&&Gu(Oi)&&(Oi=null),Wr.forEach(E0),Jr.forEach(E0)}function Eu(e,t){e.blockedOn===t&&(e.blockedOn=null,kp||(kp=!0,gt.unstable_scheduleCallback(gt.unstable_NormalPriority,IC)))}var Tu=null;function T0(e){Tu!==e&&(Tu=e,gt.unstable_scheduleCallback(gt.unstable_NormalPriority,function(){Tu===e&&(Tu=null);for(var t=0;t<e.length;t+=3){var n=e[t],o=e[t+1],i=e[t+2];if(typeof o!="function"){if(zm(o||n)===null)continue;break}var a=Cl(n);a!==null&&(e.splice(t,3),t-=3,vp(a,{pending:!0,data:i,method:n.method,action:o},o,i))}}))}function Tl(e){function t(s){return Eu(s,e)}Di!==null&&Eu(Di,e),Ri!==null&&Eu(Ri,e),Oi!==null&&Eu(Oi,e),Wr.forEach(t),Jr.forEach(t);for(var n=0;n<vi.length;n++){var o=vi[n];o.blockedOn===e&&(o.blockedOn=null)}for(;0<vi.length&&(n=vi[0],n.blockedOn===null);)c1(n),n.blockedOn===null&&vi.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(o=0;o<n.length;o+=3){var i=n[o],a=n[o+1],l=i[ln]||null;if(typeof a=="function")l||T0(n);else if(l){var r=null;if(a&&a.hasAttribute("formAction")){if(i=a,l=a[ln]||null)r=l.formAction;else if(zm(i)!==null)continue}else r=l.action;typeof r=="function"?n[o+1]=r:(n.splice(o,3),o-=3),T0(n)}}}function f1(){function e(a){a.canIntercept&&a.info==="react-transition"&&a.intercept({handler:function(){return new Promise(function(l){return i=l})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),o||setTimeout(n,20)}function n(){if(!o&&!navigation.transition){var a=navigation.currentEntry;a&&a.url!=null&&navigation.navigate(a.url,{state:a.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function Lm(e){this._internalRoot=e}Dc.prototype.render=Lm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));var n=t.current,o=_n();r1(n,o,e,t,null,null)};Dc.prototype.unmount=Lm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;r1(e.current,2,null,e,null,null),wc(),t[Nl]=null}};function Dc(e){this._internalRoot=e}Dc.prototype.unstable_scheduleHydration=function(e){if(e){var t=U0();e={blockedOn:null,target:e,priority:t};for(var n=0;n<vi.length&&t!==0&&t<vi[n].priority;n++);vi.splice(n,0,e),n===0&&c1(e)}};var N0=C0.version;if(N0!=="19.2.4")throw Error(U(527,N0,"19.2.4"));De.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=b2(t),e=e!==null?D0(e):null,e=e===null?null:e.stateNode,e};var VC={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:ce,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(xr=__REACT_DEVTOOLS_GLOBAL_HOOK__,!xr.isDisabled&&xr.supportsFiber))try{ts=xr.inject(VC),Sn=xr}catch{}var xr;Rc.createRoot=function(e,t){if(!w0(e))throw Error(U(299));var n=!1,o="",i=nb,a=ob,l=ib;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=a1(e,1,!1,null,null,n,o,null,i,a,l,f1),e[Nl]=t.current,Am(e),new Lm(t)};Rc.hydrateRoot=function(e,t,n){if(!w0(e))throw Error(U(299));var o=!1,i="",a=nb,l=ob,r=ib,s=null;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(a=n.onUncaughtError),n.onCaughtError!==void 0&&(l=n.onCaughtError),n.onRecoverableError!==void 0&&(r=n.onRecoverableError),n.formState!==void 0&&(s=n.formState)),t=a1(e,1,!0,t,n??null,o,i,s,a,l,r,f1),t.context=l1(null),n=t.current,o=_n(),o=Vp(o),i=Ci(o),i.callback=null,wi(n,i,o),n=o,t.current.lanes=n,os(t,n),go(t),e[Nl]=t.current,Am(e),new Dc(t)};Rc.version="19.2.4"});var h1=Jt((Pz,m1)=>{"use strict";function p1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(p1)}catch(e){console.error(e)}}p1(),m1.exports=d1()});var w1=Jt(Pc=>{"use strict";var ZC=Symbol.for("react.transitional.element"),jC=Symbol.for("react.fragment");function C1(e,t,n){var o=null;if(n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),"key"in t){n={};for(var i in t)i!=="key"&&(n[i]=t[i])}else n=t;return t=n.ref,{$$typeof:ZC,type:e,key:o,ref:t!==void 0?t:null,props:n}}Pc.Fragment=jC;Pc.jsx=C1;Pc.jsxs=C1});var ve=Jt((Vz,A1)=>{"use strict";A1.exports=w1()});var f_=Jt(c_=>{"use strict";var Ql=At();function VM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var YM=typeof Object.is=="function"?Object.is:VM,XM=Ql.useState,qM=Ql.useEffect,ZM=Ql.useLayoutEffect,jM=Ql.useDebugValue;function $M(e,t){var n=t(),o=XM({inst:{value:n,getSnapshot:t}}),i=o[0].inst,a=o[1];return ZM(function(){i.value=n,i.getSnapshot=t,Th(i)&&a({inst:i})},[e,n,t]),qM(function(){return Th(i)&&a({inst:i}),e(function(){Th(i)&&a({inst:i})})},[e]),jM(n),n}function Th(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!YM(e,n)}catch{return!0}}function FM(e,t){return t()}var KM=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?FM:$M;c_.useSyncExternalStore=Ql.useSyncExternalStore!==void 0?Ql.useSyncExternalStore:KM});var p_=Jt((BH,d_)=>{"use strict";d_.exports=f_()});var h_=Jt(m_=>{"use strict";var Mf=At(),QM=p_();function WM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var JM=typeof Object.is=="function"?Object.is:WM,eD=QM.useSyncExternalStore,tD=Mf.useRef,nD=Mf.useEffect,oD=Mf.useMemo,iD=Mf.useDebugValue;m_.useSyncExternalStoreWithSelector=function(e,t,n,o,i){var a=tD(null);if(a.current===null){var l={hasValue:!1,value:null};a.current=l}else l=a.current;a=oD(function(){function s(h){if(!u){if(u=!0,c=h,h=o(h),i!==void 0&&l.hasValue){var v=l.value;if(i(v,h))return d=v}return d=h}if(v=d,JM(c,h))return v;var b=o(h);return i!==void 0&&i(v,b)?(c=h,v):(c=h,d=b)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return s(t())},f===null?void 0:function(){return s(f())}]},[t,n,o,i]);var r=eD(e,a[0],a[1]);return nD(function(){l.hasValue=!0,l.value=r},[r]),iD(r),r}});var y_=Jt((PH,g_)=>{"use strict";g_.exports=h_()});var Ha=oe(At(),1),OT=oe(h1(),1);var YC={PipeLLM:!0,PipeExtract:!0,PipeCompose:!0,PipeImgGen:!0,PipeSearch:!0,PipeFunc:!0,PipeSignature:!0,PipeSequence:!0,PipeParallel:!0,PipeCondition:!0,PipeBatch:!0},g1=new Set(Object.keys(YC)),Ol="pipeCard",y1="default",v1="controllerGroup",Bm="stuff_";function Gi(e){return Bm+e}function zl(e){return e.startsWith(Bm)}function ds(e){return e.slice(Bm.length)}var Nn={TB:"TB",BT:"BT",LR:"LR",RL:"RL"},Oc={DEFAULT:"default",STEP:"step",STRAIGHT:"straight",SMOOTH_STEP:"smoothstep"},to={FOLDED:"folded",EXPANDED:"expanded",AUTO:"auto"},ha={DARK:"dark",LIGHT:"light"},yt={DARK:"dark",LIGHT:"light",SYSTEM:"system"},sn={TOP_LEFT:"top-left",TOP_CENTER:"top-center",TOP_RIGHT:"top-right",BOTTOM_LEFT:"bottom-left",BOTTOM_CENTER:"bottom-center",BOTTOM_RIGHT:"bottom-right",CENTER_LEFT:"center-left",CENTER_RIGHT:"center-right"};function b1(e){return e===sn.CENTER_LEFT||e===sn.CENTER_RIGHT?"vertical":"horizontal"}function S1(e){switch(e){case sn.TOP_LEFT:case sn.CENTER_LEFT:case sn.BOTTOM_LEFT:return"left";case sn.TOP_RIGHT:case sn.CENTER_RIGHT:case sn.BOTTOM_RIGHT:return"right";case sn.TOP_CENTER:case sn.BOTTOM_CENTER:return"center";default:return e}}var zc=40,Lc=48,Bc=20,ga="arrowclosed";function x1(e){let t=e.style?.width;if(t==null)return 200;let n=typeof t=="number"?t:parseFloat(t);return isNaN(n)||n<=0?200:n}function _1(e){let t=e.style?.height;if(t!=null){let n=typeof t=="number"?t:parseFloat(t);if(!isNaN(n)&&n>0)return n}return e.data?.isStuff?60:70}var ps=class extends Error{constructor(t,n){let o=t===""?"<root>":t;super(`GraphSpec validation failed at ${o}: ${n}`),this.name="GraphSpecValidationError",this.path=t}},E1=new Set(["succeeded","failed","running","scheduled","skipped","canceled"]),T1=new Set(["contains","data","control","selected_outcome","batch_item","batch_aggregate","parallel_combine"]);function Ui(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Cn(e){return e===null?"null":e===void 0?"undefined":Array.isArray(e)?"an array":`a ${typeof e}`}function vt(e,t){throw new ps(e,t)}function yo(e,t){return(typeof e!="string"||e.length===0)&&vt(t,`expected a non-empty string, got ${Cn(e)}`),e}function N1(e,t){Ui(e)||vt(t,`expected an object, got ${Cn(e)}`),yo(e.name,`${t}.name`)}function XC(e,t){Ui(e)||vt(t,`expected an object, got ${Cn(e)}`),yo(e.id,`${t}.id`),e.kind!=="controller"&&e.kind!=="operator"&&vt(`${t}.kind`,`expected "controller" or "operator" \u2014 a real pipelex run emits only pipe-call nodes, got ${JSON.stringify(e.kind)}`),(typeof e.status!="string"||!E1.has(e.status))&&vt(`${t}.status`,`expected one of ${[...E1].join(", ")}, got ${JSON.stringify(e.status)}`),yo(e.pipe_code,`${t}.pipe_code`);let n=yo(e.pipe_type,`${t}.pipe_type`);g1.has(n)||vt(`${t}.pipe_type`,`unrecognized pipe class "${n}" \u2014 add it to PipeOperatorType or PipeControllerType in types.ts`),yo(e.description,`${t}.description`),yo(e.domain_code,`${t}.domain_code`);let o=e.io;o===void 0&&(o={inputs:[],outputs:[]},e.io=o),Ui(o)||vt(`${t}.io`,`expected an object, got ${Cn(o)}`),o.inputs===void 0?o.inputs=[]:Array.isArray(o.inputs)||vt(`${t}.io.inputs`,`expected an array, got ${Cn(o.inputs)}`),o.outputs===void 0?o.outputs=[]:Array.isArray(o.outputs)||vt(`${t}.io.outputs`,`expected an array, got ${Cn(o.outputs)}`),o.inputs.forEach((i,a)=>N1(i,`${t}.io.inputs[${a}]`)),o.outputs.forEach((i,a)=>N1(i,`${t}.io.outputs[${a}]`))}function qC(e,t){Ui(e)||vt(t,`expected an object, got ${Cn(e)}`),yo(e.id,`${t}.id`),yo(e.source,`${t}.source`),yo(e.target,`${t}.target`),(typeof e.kind!="string"||!T1.has(e.kind))&&vt(`${t}.kind`,`expected one of ${[...T1].join(", ")}, got ${JSON.stringify(e.kind)}`)}function Hc(e){return Ui(e)||vt("",`expected a GraphSpec object, got ${Cn(e)}`),Array.isArray(e.nodes)||vt("nodes",`expected an array, got ${Cn(e.nodes)}`),Array.isArray(e.edges)||vt("edges",`expected an array, got ${Cn(e.edges)}`),Ui(e.meta)||vt("meta",`expected an object, got ${Cn(e.meta)}`),e.meta.format!=="mthds"&&vt("meta.format",`expected "mthds" (this does not look like pipelex GraphSpec JSON), got ${JSON.stringify(e.meta.format)}`),e.pipe_registry!==void 0&&!Ui(e.pipe_registry)&&vt("pipe_registry",`expected an object when present, got ${Cn(e.pipe_registry)}`),e.concept_registry!==void 0&&!Ui(e.concept_registry)&&vt("concept_registry",`expected an object when present, got ${Cn(e.concept_registry)}`),e.nodes.forEach((t,n)=>XC(t,`nodes[${n}]`)),e.edges.forEach((t,n)=>qC(t,`edges[${n}]`)),e}function Ll(e,t="node"){return e.kind!=="controller"&&e.kind!=="operator"&&vt(`${t}.kind`,`expected a pipe-call node ("controller" or "operator"), got ${JSON.stringify(e.kind)}`),yo(e.pipe_code,`${t}.pipe_code`),e}var fe=oe(At(),1);var B=oe(ve()),P=oe(At());function ot(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,o;n<e.length;n++)(o=ot(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var $C={value:()=>{}};function D1(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new kc(n)}function kc(e){this._=e}function FC(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",i=n.indexOf(".");if(i>=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}kc.prototype=D1.prototype={constructor:kc,on:function(e,t){var n=this._,o=FC(e+"",n),i,a=-1,l=o.length;if(arguments.length<2){for(;++a<l;)if((i=(e=o[a]).type)&&(i=KC(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<l;)if(i=(e=o[a]).type)n[i]=M1(n[i],e.name,t);else if(t==null)for(i in n)n[i]=M1(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new kc(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),o=0,i,a;o<i;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],o=0,i=a.length;o<i;++o)a[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,a=o.length;i<a;++i)o[i].value.apply(t,n)}};function KC(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function M1(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=$C,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var ya=D1;var Gc="http://www.w3.org/1999/xhtml",Hm={svg:"http://www.w3.org/2000/svg",xhtml:Gc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Qo(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Hm.hasOwnProperty(t)?{space:Hm[t],local:e}:e}function QC(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Gc&&t.documentElement.namespaceURI===Gc?t.createElement(e):t.createElementNS(n,e)}}function WC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Uc(e){var t=Qo(e);return(t.local?WC:QC)(t)}function JC(){}function va(e){return e==null?JC:function(){return this.querySelector(e)}}function R1(e){typeof e!="function"&&(e=va(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],l=a.length,r=o[i]=new Array(l),s,u,c=0;c<l;++c)(s=a[c])&&(u=e.call(s,s.__data__,c,a))&&("__data__"in s&&(u.__data__=s.__data__),r[c]=u);return new it(o,this._parents)}function Pm(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ew(){return[]}function ms(e){return e==null?ew:function(){return this.querySelectorAll(e)}}function tw(e){return function(){return Pm(e.apply(this,arguments))}}function O1(e){typeof e=="function"?e=tw(e):e=ms(e);for(var t=this._groups,n=t.length,o=[],i=[],a=0;a<n;++a)for(var l=t[a],r=l.length,s,u=0;u<r;++u)(s=l[u])&&(o.push(e.call(s,s.__data__,u,l)),i.push(s));return new it(o,i)}function hs(e){return function(){return this.matches(e)}}function Ic(e){return function(t){return t.matches(e)}}var nw=Array.prototype.find;function ow(e){return function(){return nw.call(this.children,e)}}function iw(){return this.firstElementChild}function z1(e){return this.select(e==null?iw:ow(typeof e=="function"?e:Ic(e)))}var aw=Array.prototype.filter;function lw(){return Array.from(this.children)}function rw(e){return function(){return aw.call(this.children,e)}}function L1(e){return this.selectAll(e==null?lw:rw(typeof e=="function"?e:Ic(e)))}function B1(e){typeof e!="function"&&(e=hs(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],l=a.length,r=o[i]=[],s,u=0;u<l;++u)(s=a[u])&&e.call(s,s.__data__,u,a)&&r.push(s);return new it(o,this._parents)}function Vc(e){return new Array(e.length)}function H1(){return new it(this._enter||this._groups.map(Vc),this._parents)}function gs(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}gs.prototype={constructor:gs,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function P1(e){return function(){return e}}function sw(e,t,n,o,i,a){for(var l=0,r,s=t.length,u=a.length;l<u;++l)(r=t[l])?(r.__data__=a[l],o[l]=r):n[l]=new gs(e,a[l]);for(;l<s;++l)(r=t[l])&&(i[l]=r)}function uw(e,t,n,o,i,a,l){var r,s,u=new Map,c=t.length,d=a.length,f=new Array(c),h;for(r=0;r<c;++r)(s=t[r])&&(f[r]=h=l.call(s,s.__data__,r,t)+"",u.has(h)?i[r]=s:u.set(h,s));for(r=0;r<d;++r)h=l.call(e,a[r],r,a)+"",(s=u.get(h))?(o[r]=s,s.__data__=a[r],u.delete(h)):n[r]=new gs(e,a[r]);for(r=0;r<c;++r)(s=t[r])&&u.get(f[r])===s&&(i[r]=s)}function cw(e){return e.__data__}function k1(e,t){if(!arguments.length)return Array.from(this,cw);var n=t?uw:sw,o=this._parents,i=this._groups;typeof e!="function"&&(e=P1(e));for(var a=i.length,l=new Array(a),r=new Array(a),s=new Array(a),u=0;u<a;++u){var c=o[u],d=i[u],f=d.length,h=fw(e.call(c,c&&c.__data__,u,o)),v=h.length,b=r[u]=new Array(v),S=l[u]=new Array(v),p=s[u]=new Array(f);n(c,d,b,S,p,h,t);for(var y=0,m=0,g,x;y<v;++y)if(g=b[y]){for(y>=m&&(m=y+1);!(x=S[m])&&++m<v;);g._next=x||null}}return l=new it(l,o),l._enter=r,l._exit=s,l}function fw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function G1(){return new it(this._exit||this._groups.map(Vc),this._parents)}function U1(e,t,n){var o=this.enter(),i=this,a=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?a.remove():n(a),o&&i?o.merge(i).order():i}function I1(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,a=o.length,l=Math.min(i,a),r=new Array(i),s=0;s<l;++s)for(var u=n[s],c=o[s],d=u.length,f=r[s]=new Array(d),h,v=0;v<d;++v)(h=u[v]||c[v])&&(f[v]=h);for(;s<i;++s)r[s]=n[s];return new it(r,this._parents)}function V1(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],i=o.length-1,a=o[i],l;--i>=0;)(l=o[i])&&(a&&l.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(l,a),a=l);return this}function Y1(e){e||(e=dw);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,o=n.length,i=new Array(o),a=0;a<o;++a){for(var l=n[a],r=l.length,s=i[a]=new Array(r),u,c=0;c<r;++c)(u=l[c])&&(s[c]=u);s.sort(t)}return new it(i,this._parents).order()}function dw(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function X1(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function q1(){return Array.from(this)}function Z1(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,a=o.length;i<a;++i){var l=o[i];if(l)return l}return null}function j1(){let e=0;for(let t of this)++e;return e}function $1(){return!this.node()}function F1(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i=t[n],a=0,l=i.length,r;a<l;++a)(r=i[a])&&e.call(r,r.__data__,a,i);return this}function pw(e){return function(){this.removeAttribute(e)}}function mw(e){return function(){this.removeAttributeNS(e.space,e.local)}}function hw(e,t){return function(){this.setAttribute(e,t)}}function gw(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function yw(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function vw(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function K1(e,t){var n=Qo(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?mw:pw:typeof t=="function"?n.local?vw:yw:n.local?gw:hw)(n,t))}function Yc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function bw(e){return function(){this.style.removeProperty(e)}}function Sw(e,t,n){return function(){this.style.setProperty(e,t,n)}}function xw(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function Q1(e,t,n){return arguments.length>1?this.each((t==null?bw:typeof t=="function"?xw:Sw)(e,t,n??"")):Ii(this.node(),e)}function Ii(e,t){return e.style.getPropertyValue(t)||Yc(e).getComputedStyle(e,null).getPropertyValue(t)}function _w(e){return function(){delete this[e]}}function Ew(e,t){return function(){this[e]=t}}function Tw(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function W1(e,t){return arguments.length>1?this.each((t==null?_w:typeof t=="function"?Tw:Ew)(e,t)):this.node()[e]}function J1(e){return e.trim().split(/^|\s+/)}function km(e){return e.classList||new eS(e)}function eS(e){this._node=e,this._names=J1(e.getAttribute("class")||"")}eS.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function tS(e,t){for(var n=km(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function nS(e,t){for(var n=km(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function Nw(e){return function(){tS(this,e)}}function Cw(e){return function(){nS(this,e)}}function ww(e,t){return function(){(t.apply(this,arguments)?tS:nS)(this,e)}}function oS(e,t){var n=J1(e+"");if(arguments.length<2){for(var o=km(this.node()),i=-1,a=n.length;++i<a;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?ww:t?Nw:Cw)(n,t))}function Aw(){this.textContent=""}function Mw(e){return function(){this.textContent=e}}function Dw(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function iS(e){return arguments.length?this.each(e==null?Aw:(typeof e=="function"?Dw:Mw)(e)):this.node().textContent}function Rw(){this.innerHTML=""}function Ow(e){return function(){this.innerHTML=e}}function zw(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function aS(e){return arguments.length?this.each(e==null?Rw:(typeof e=="function"?zw:Ow)(e)):this.node().innerHTML}function Lw(){this.nextSibling&&this.parentNode.appendChild(this)}function lS(){return this.each(Lw)}function Bw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function rS(){return this.each(Bw)}function sS(e){var t=typeof e=="function"?e:Uc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Hw(){return null}function uS(e,t){var n=typeof e=="function"?e:Uc(e),o=t==null?Hw:typeof t=="function"?t:va(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function Pw(){var e=this.parentNode;e&&e.removeChild(this)}function cS(){return this.each(Pw)}function kw(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Gw(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function fS(e){return this.select(e?Gw:kw)}function dS(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Uw(e){return function(t){e.call(this,t,this.__data__)}}function Iw(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function Vw(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++o]=a;++o?t.length=o:delete this.__on}}}function Yw(e,t,n){return function(){var o=this.__on,i,a=Uw(t);if(o){for(var l=0,r=o.length;l<r;++l)if((i=o[l]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},o?o.push(i):this.__on=[i]}}function pS(e,t,n){var o=Iw(e+""),i,a=o.length,l;if(arguments.length<2){var r=this.node().__on;if(r){for(var s=0,u=r.length,c;s<u;++s)for(i=0,c=r[s];i<a;++i)if((l=o[i]).type===c.type&&l.name===c.name)return c.value}return}for(r=t?Yw:Vw,i=0;i<a;++i)this.each(r(o[i],t,n));return this}function mS(e,t,n){var o=Yc(e),i=o.CustomEvent;typeof i=="function"?i=new i(t,n):(i=o.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Xw(e,t){return function(){return mS(this,e,t)}}function qw(e,t){return function(){return mS(this,e,t.apply(this,arguments))}}function hS(e,t){return this.each((typeof t=="function"?qw:Xw)(e,t))}function*gS(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,a=o.length,l;i<a;++i)(l=o[i])&&(yield l)}var Gm=[null];function it(e,t){this._groups=e,this._parents=t}function yS(){return new it([[document.documentElement]],Gm)}function Zw(){return this}it.prototype=yS.prototype={constructor:it,select:R1,selectAll:O1,selectChild:z1,selectChildren:L1,filter:B1,data:k1,enter:H1,exit:G1,join:U1,merge:I1,selection:Zw,order:V1,sort:Y1,call:X1,nodes:q1,node:Z1,size:j1,empty:$1,each:F1,attr:K1,style:Q1,property:W1,classed:oS,text:iS,html:aS,raise:lS,lower:rS,append:sS,insert:uS,remove:cS,clone:fS,datum:dS,on:pS,dispatch:hS,[Symbol.iterator]:gS};var Wo=yS;function Ct(e){return typeof e=="string"?new it([[document.querySelector(e)]],[document.documentElement]):new it([[e]],Gm)}function vS(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Xt(e,t){if(e=vS(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var bS={passive:!1},ba={capture:!0,passive:!1};function Xc(e){e.stopImmediatePropagation()}function Vi(e){e.preventDefault(),e.stopImmediatePropagation()}function ys(e){var t=e.document.documentElement,n=Ct(e).on("dragstart.drag",Vi,ba);"onselectstart"in t?n.on("selectstart.drag",Vi,ba):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function vs(e,t){var n=e.document.documentElement,o=Ct(e).on("dragstart.drag",null);t&&(o.on("click.drag",Vi,ba),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var bs=e=>()=>e;function Ss(e,{sourceEvent:t,subject:n,target:o,identifier:i,active:a,x:l,y:r,dx:s,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:r,enumerable:!0,configurable:!0},dx:{value:s,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}Ss.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function jw(e){return!e.ctrlKey&&!e.button}function $w(){return this.parentNode}function Fw(e,t){return t??{x:e.x,y:e.y}}function Kw(){return navigator.maxTouchPoints||"ontouchstart"in this}function qc(){var e=jw,t=$w,n=Fw,o=Kw,i={},a=ya("start","drag","end"),l=0,r,s,u,c,d=0;function f(g){g.on("mousedown.drag",h).filter(o).on("touchstart.drag",S).on("touchmove.drag",p,bS).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(g,x){if(!(c||!e.call(this,g,x))){var _=m(this,t.call(this,g,x),g,x,"mouse");_&&(Ct(g.view).on("mousemove.drag",v,ba).on("mouseup.drag",b,ba),ys(g.view),Xc(g),u=!1,r=g.clientX,s=g.clientY,_("start",g))}}function v(g){if(Vi(g),!u){var x=g.clientX-r,_=g.clientY-s;u=x*x+_*_>d}i.mouse("drag",g)}function b(g){Ct(g.view).on("mousemove.drag mouseup.drag",null),vs(g.view,u),Vi(g),i.mouse("end",g)}function S(g,x){if(e.call(this,g,x)){var _=g.changedTouches,E=t.call(this,g,x),w=_.length,C,H;for(C=0;C<w;++C)(H=m(this,E,g,x,_[C].identifier,_[C]))&&(Xc(g),H("start",g,_[C]))}}function p(g){var x=g.changedTouches,_=x.length,E,w;for(E=0;E<_;++E)(w=i[x[E].identifier])&&(Vi(g),w("drag",g,x[E]))}function y(g){var x=g.changedTouches,_=x.length,E,w;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),E=0;E<_;++E)(w=i[x[E].identifier])&&(Xc(g),w("end",g,x[E]))}function m(g,x,_,E,w,C){var H=a.copy(),D=Xt(C||_,x),z,I,T;if((T=n.call(g,new Ss("beforestart",{sourceEvent:_,target:f,identifier:w,active:l,x:D[0],y:D[1],dx:0,dy:0,dispatch:H}),E))!=null)return z=T.x-D[0]||0,I=T.y-D[1]||0,function A(M,O,R){var L=D,V;switch(M){case"start":i[w]=A,V=l++;break;case"end":delete i[w],--l;case"drag":D=Xt(R||O,x),V=l;break}H.call(M,g,new Ss(M,{sourceEvent:O,subject:T,target:f,identifier:w,active:V,x:D[0]+z,y:D[1]+I,dx:D[0]-L[0],dy:D[1]-L[1],dispatch:H}),E)}}return f.filter=function(g){return arguments.length?(e=typeof g=="function"?g:bs(!!g),f):e},f.container=function(g){return arguments.length?(t=typeof g=="function"?g:bs(g),f):t},f.subject=function(g){return arguments.length?(n=typeof g=="function"?g:bs(g),f):n},f.touchable=function(g){return arguments.length?(o=typeof g=="function"?g:bs(!!g),f):o},f.on=function(){var g=a.on.apply(a,arguments);return g===a?f:g},f.clickDistance=function(g){return arguments.length?(d=(g=+g)*g,f):Math.sqrt(d)},f}function Zc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Um(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function Es(){}var xs=.7,Fc=1/xs,Bl="\\s*([+-]?\\d+)\\s*",_s="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",vo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Qw=/^#([0-9a-f]{3,8})$/,Ww=new RegExp(`^rgb\\(${Bl},${Bl},${Bl}\\)$`),Jw=new RegExp(`^rgb\\(${vo},${vo},${vo}\\)$`),eA=new RegExp(`^rgba\\(${Bl},${Bl},${Bl},${_s}\\)$`),tA=new RegExp(`^rgba\\(${vo},${vo},${vo},${_s}\\)$`),nA=new RegExp(`^hsl\\(${_s},${vo},${vo}\\)$`),oA=new RegExp(`^hsla\\(${_s},${vo},${vo},${_s}\\)$`),SS={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};Zc(Es,oo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:xS,formatHex:xS,formatHex8:iA,formatHsl:aA,formatRgb:_S,toString:_S});function xS(){return this.rgb().formatHex()}function iA(){return this.rgb().formatHex8()}function aA(){return AS(this).formatHsl()}function _S(){return this.rgb().formatRgb()}function oo(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Qw.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?ES(t):n===3?new un(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?jc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?jc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Ww.exec(e))?new un(t[1],t[2],t[3],1):(t=Jw.exec(e))?new un(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=eA.exec(e))?jc(t[1],t[2],t[3],t[4]):(t=tA.exec(e))?jc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=nA.exec(e))?CS(t[1],t[2]/100,t[3]/100,1):(t=oA.exec(e))?CS(t[1],t[2]/100,t[3]/100,t[4]):SS.hasOwnProperty(e)?ES(SS[e]):e==="transparent"?new un(NaN,NaN,NaN,0):null}function ES(e){return new un(e>>16&255,e>>8&255,e&255,1)}function jc(e,t,n,o){return o<=0&&(e=t=n=NaN),new un(e,t,n,o)}function lA(e){return e instanceof Es||(e=oo(e)),e?(e=e.rgb(),new un(e.r,e.g,e.b,e.opacity)):new un}function Hl(e,t,n,o){return arguments.length===1?lA(e):new un(e,t,n,o??1)}function un(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}Zc(un,Hl,Um(Es,{brighter(e){return e=e==null?Fc:Math.pow(Fc,e),new un(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?xs:Math.pow(xs,e),new un(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new un(xa(this.r),xa(this.g),xa(this.b),Kc(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:TS,formatHex:TS,formatHex8:rA,formatRgb:NS,toString:NS}));function TS(){return`#${Sa(this.r)}${Sa(this.g)}${Sa(this.b)}`}function rA(){return`#${Sa(this.r)}${Sa(this.g)}${Sa(this.b)}${Sa((isNaN(this.opacity)?1:this.opacity)*255)}`}function NS(){let e=Kc(this.opacity);return`${e===1?"rgb(":"rgba("}${xa(this.r)}, ${xa(this.g)}, ${xa(this.b)}${e===1?")":`, ${e})`}`}function Kc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function xa(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Sa(e){return e=xa(e),(e<16?"0":"")+e.toString(16)}function CS(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new no(e,t,n,o)}function AS(e){if(e instanceof no)return new no(e.h,e.s,e.l,e.opacity);if(e instanceof Es||(e=oo(e)),!e)return new no;if(e instanceof no)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),a=Math.max(t,n,o),l=NaN,r=a-i,s=(a+i)/2;return r?(t===a?l=(n-o)/r+(n<o)*6:n===a?l=(o-t)/r+2:l=(t-n)/r+4,r/=s<.5?a+i:2-a-i,l*=60):r=s>0&&s<1?0:l,new no(l,r,s,e.opacity)}function MS(e,t,n,o){return arguments.length===1?AS(e):new no(e,t,n,o??1)}function no(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}Zc(no,MS,Um(Es,{brighter(e){return e=e==null?Fc:Math.pow(Fc,e),new no(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?xs:Math.pow(xs,e),new no(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new un(Im(e>=240?e-240:e+120,i,o),Im(e,i,o),Im(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new no(wS(this.h),$c(this.s),$c(this.l),Kc(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(){let e=Kc(this.opacity);return`${e===1?"hsl(":"hsla("}${wS(this.h)}, ${$c(this.s)*100}%, ${$c(this.l)*100}%${e===1?")":`, ${e})`}`}}));function wS(e){return e=(e||0)%360,e<0?e+360:e}function $c(e){return Math.max(0,Math.min(1,e||0))}function Im(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function Vm(e,t,n,o,i){var a=e*e,l=a*e;return((1-3*e+3*a-l)*t+(4-6*a+3*l)*n+(1+3*e+3*a-3*l)*o+l*i)/6}function DS(e){var t=e.length-1;return function(n){var o=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[o],a=e[o+1],l=o>0?e[o-1]:2*i-a,r=o<t-1?e[o+2]:2*a-i;return Vm((n-o/t)*t,l,i,a,r)}}function RS(e){var t=e.length;return function(n){var o=Math.floor(((n%=1)<0?++n:n)*t),i=e[(o+t-1)%t],a=e[o%t],l=e[(o+1)%t],r=e[(o+2)%t];return Vm((n-o/t)*t,i,a,l,r)}}var Ts=e=>()=>e;function sA(e,t){return function(n){return e+n*t}}function uA(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function OS(e){return(e=+e)==1?Qc:function(t,n){return n-t?uA(t,n,e):Ts(isNaN(t)?n:t)}}function Qc(e,t){var n=t-e;return n?sA(e,n):Ts(isNaN(e)?t:e)}var _a=(function e(t){var n=OS(t);function o(i,a){var l=n((i=Hl(i)).r,(a=Hl(a)).r),r=n(i.g,a.g),s=n(i.b,a.b),u=Qc(i.opacity,a.opacity);return function(c){return i.r=l(c),i.g=r(c),i.b=s(c),i.opacity=u(c),i+""}}return o.gamma=e,o})(1);function zS(e){return function(t){var n=t.length,o=new Array(n),i=new Array(n),a=new Array(n),l,r;for(l=0;l<n;++l)r=Hl(t[l]),o[l]=r.r||0,i[l]=r.g||0,a[l]=r.b||0;return o=e(o),i=e(i),a=e(a),r.opacity=1,function(s){return r.r=o(s),r.g=i(s),r.b=a(s),r+""}}}var cA=zS(DS),fA=zS(RS);function LS(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),i;return function(a){for(i=0;i<n;++i)o[i]=e[i]*(1-a)+t[i]*a;return o}}function BS(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function HS(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,i=new Array(o),a=new Array(n),l;for(l=0;l<o;++l)i[l]=Jo(e[l],t[l]);for(;l<n;++l)a[l]=t[l];return function(r){for(l=0;l<o;++l)a[l]=i[l](r);return a}}function PS(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function qt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function kS(e,t){var n={},o={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Jo(e[i],t[i]):o[i]=t[i];return function(a){for(i in n)o[i]=n[i](a);return o}}var Xm=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ym=new RegExp(Xm.source,"g");function dA(e){return function(){return e}}function pA(e){return function(t){return e(t)+""}}function Ns(e,t){var n=Xm.lastIndex=Ym.lastIndex=0,o,i,a,l=-1,r=[],s=[];for(e=e+"",t=t+"";(o=Xm.exec(e))&&(i=Ym.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),r[l]?r[l]+=a:r[++l]=a),(o=o[0])===(i=i[0])?r[l]?r[l]+=i:r[++l]=i:(r[++l]=null,s.push({i:l,x:qt(o,i)})),n=Ym.lastIndex;return n<t.length&&(a=t.slice(n),r[l]?r[l]+=a:r[++l]=a),r.length<2?s[0]?pA(s[0].x):dA(t):(t=s.length,function(u){for(var c=0,d;c<t;++c)r[(d=s[c]).i]=d.x(u);return r.join("")})}function Jo(e,t){var n=typeof t,o;return t==null||n==="boolean"?Ts(t):(n==="number"?qt:n==="string"?(o=oo(t))?(t=o,_a):Ns:t instanceof oo?_a:t instanceof Date?PS:BS(t)?LS:Array.isArray(t)?HS:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?kS:qt)(e,t)}var GS=180/Math.PI,Wc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function qm(e,t,n,o,i,a){var l,r,s;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(s=e*n+t*o)&&(n-=e*s,o-=t*s),(r=Math.sqrt(n*n+o*o))&&(n/=r,o/=r,s/=r),e*o<t*n&&(e=-e,t=-t,s=-s,l=-l),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*GS,skewX:Math.atan(s)*GS,scaleX:l,scaleY:r}}var Jc;function US(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Wc:qm(t.a,t.b,t.c,t.d,t.e,t.f)}function IS(e){return e==null?Wc:(Jc||(Jc=document.createElementNS("http://www.w3.org/2000/svg","g")),Jc.setAttribute("transform",e),(e=Jc.transform.baseVal.consolidate())?(e=e.matrix,qm(e.a,e.b,e.c,e.d,e.e,e.f)):Wc)}function VS(e,t,n,o){function i(u){return u.length?u.pop()+" ":""}function a(u,c,d,f,h,v){if(u!==d||c!==f){var b=h.push("translate(",null,t,null,n);v.push({i:b-4,x:qt(u,d)},{i:b-2,x:qt(c,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function l(u,c,d,f){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),f.push({i:d.push(i(d)+"rotate(",null,o)-2,x:qt(u,c)})):c&&d.push(i(d)+"rotate("+c+o)}function r(u,c,d,f){u!==c?f.push({i:d.push(i(d)+"skewX(",null,o)-2,x:qt(u,c)}):c&&d.push(i(d)+"skewX("+c+o)}function s(u,c,d,f,h,v){if(u!==d||c!==f){var b=h.push(i(h)+"scale(",null,",",null,")");v.push({i:b-4,x:qt(u,d)},{i:b-2,x:qt(c,f)})}else(d!==1||f!==1)&&h.push(i(h)+"scale("+d+","+f+")")}return function(u,c){var d=[],f=[];return u=e(u),c=e(c),a(u.translateX,u.translateY,c.translateX,c.translateY,d,f),l(u.rotate,c.rotate,d,f),r(u.skewX,c.skewX,d,f),s(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(h){for(var v=-1,b=f.length,S;++v<b;)d[(S=f[v]).i]=S.x(h);return d.join("")}}}var Zm=VS(US,"px, ","px)","deg)"),jm=VS(IS,", ",")",")");var mA=1e-12;function YS(e){return((e=Math.exp(e))+1/e)/2}function hA(e){return((e=Math.exp(e))-1/e)/2}function gA(e){return((e=Math.exp(2*e))-1)/(e+1)}var Ea=(function e(t,n,o){function i(a,l){var r=a[0],s=a[1],u=a[2],c=l[0],d=l[1],f=l[2],h=c-r,v=d-s,b=h*h+v*v,S,p;if(b<mA)p=Math.log(f/u)/t,S=function(E){return[r+E*h,s+E*v,u*Math.exp(t*E*p)]};else{var y=Math.sqrt(b),m=(f*f-u*u+o*b)/(2*u*n*y),g=(f*f-u*u-o*b)/(2*f*n*y),x=Math.log(Math.sqrt(m*m+1)-m),_=Math.log(Math.sqrt(g*g+1)-g);p=(_-x)/t,S=function(E){var w=E*p,C=YS(x),H=u/(n*y)*(C*gA(t*w+x)-hA(x));return[r+H*h,s+H*v,u*C/YS(t*w+x)]}}return S.duration=p*1e3*t/Math.SQRT2,S}return i.rho=function(a){var l=Math.max(.001,+a),r=l*l,s=r*r;return e(l,r,s)},i})(Math.SQRT2,2,4);var Pl=0,ws=0,Cs=0,qS=1e3,ef,As,tf=0,Ta=0,nf=0,Ms=typeof performance=="object"&&performance.now?performance:Date,ZS=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Rs(){return Ta||(ZS(yA),Ta=Ms.now()+nf)}function yA(){Ta=0}function Ds(){this._call=this._time=this._next=null}Ds.prototype=of.prototype={constructor:Ds,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Rs():+n)+(t==null?0:+t),!this._next&&As!==this&&(As?As._next=this:ef=this,As=this),this._call=e,this._time=n,$m()},stop:function(){this._call&&(this._call=null,this._time=1/0,$m())}};function of(e,t,n){var o=new Ds;return o.restart(e,t,n),o}function jS(){Rs(),++Pl;for(var e=ef,t;e;)(t=Ta-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Pl}function XS(){Ta=(tf=Ms.now())+nf,Pl=ws=0;try{jS()}finally{Pl=0,bA(),Ta=0}}function vA(){var e=Ms.now(),t=e-tf;t>qS&&(nf-=t,tf=e)}function bA(){for(var e,t=ef,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ef=n);As=e,$m(o)}function $m(e){if(!Pl){ws&&(ws=clearTimeout(ws));var t=e-Ta;t>24?(e<1/0&&(ws=setTimeout(XS,e-Ms.now()-nf)),Cs&&(Cs=clearInterval(Cs))):(Cs||(tf=Ms.now(),Cs=setInterval(vA,qS)),Pl=1,ZS(XS))}}function af(e,t,n){var o=new Ds;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var SA=ya("start","end","cancel","interrupt"),xA=[],KS=0,$S=1,rf=2,lf=3,FS=4,sf=5,Os=6;function Yi(e,t,n,o,i,a){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;_A(e,n,{name:t,index:o,group:i,on:SA,tween:xA,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:KS})}function zs(e,t){var n=bt(e,t);if(n.state>KS)throw new Error("too late; already scheduled");return n}function Lt(e,t){var n=bt(e,t);if(n.state>lf)throw new Error("too late; already running");return n}function bt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function _A(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=of(a,0,n.time);function a(u){n.state=$S,n.timer.restart(l,n.delay,n.time),n.delay<=u&&l(u-n.delay)}function l(u){var c,d,f,h;if(n.state!==$S)return s();for(c in o)if(h=o[c],h.name===n.name){if(h.state===lf)return af(l);h.state===FS?(h.state=Os,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[c]):+c<t&&(h.state=Os,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[c])}if(af(function(){n.state===lf&&(n.state=FS,n.timer.restart(r,n.delay,n.time),r(u))}),n.state=rf,n.on.call("start",e,e.__data__,n.index,n.group),n.state===rf){for(n.state=lf,i=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=h);i.length=d+1}}function r(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(s),n.state=sf,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===sf&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){n.state=Os,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function Na(e,t){var n=e.__transition,o,i,a=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((o=n[l]).name!==t){a=!1;continue}i=o.state>rf&&o.state<sf,o.state=Os,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[l]}a&&delete e.__transition}}function QS(e){return this.each(function(){Na(this,e)})}function EA(e,t){var n,o;return function(){var i=Lt(this,e),a=i.tween;if(a!==n){o=n=a;for(var l=0,r=o.length;l<r;++l)if(o[l].name===t){o=o.slice(),o.splice(l,1);break}}i.tween=o}}function TA(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var a=Lt(this,e),l=a.tween;if(l!==o){i=(o=l).slice();for(var r={name:t,value:n},s=0,u=i.length;s<u;++s)if(i[s].name===t){i[s]=r;break}s===u&&i.push(r)}a.tween=i}}function WS(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=bt(this.node(),n).tween,i=0,a=o.length,l;i<a;++i)if((l=o[i]).name===e)return l.value;return null}return this.each((t==null?EA:TA)(n,e,t))}function kl(e,t,n){var o=e._id;return e.each(function(){var i=Lt(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return bt(i,o).value[t]}}function uf(e,t){var n;return(typeof t=="number"?qt:t instanceof oo?_a:(n=oo(t))?(t=n,_a):Ns)(e,t)}function NA(e){return function(){this.removeAttribute(e)}}function CA(e){return function(){this.removeAttributeNS(e.space,e.local)}}function wA(e,t,n){var o,i=n+"",a;return function(){var l=this.getAttribute(e);return l===i?null:l===o?a:a=t(o=l,n)}}function AA(e,t,n){var o,i=n+"",a;return function(){var l=this.getAttributeNS(e.space,e.local);return l===i?null:l===o?a:a=t(o=l,n)}}function MA(e,t,n){var o,i,a;return function(){var l,r=n(this),s;return r==null?void this.removeAttribute(e):(l=this.getAttribute(e),s=r+"",l===s?null:l===o&&s===i?a:(i=s,a=t(o=l,r)))}}function DA(e,t,n){var o,i,a;return function(){var l,r=n(this),s;return r==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),s=r+"",l===s?null:l===o&&s===i?a:(i=s,a=t(o=l,r)))}}function JS(e,t){var n=Qo(e),o=n==="transform"?jm:uf;return this.attrTween(e,typeof t=="function"?(n.local?DA:MA)(n,o,kl(this,"attr."+e,t)):t==null?(n.local?CA:NA)(n):(n.local?AA:wA)(n,o,t))}function RA(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function OA(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function zA(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&OA(e,a)),n}return i._value=t,i}function LA(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&RA(e,a)),n}return i._value=t,i}function ex(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=Qo(e);return this.tween(n,(o.local?zA:LA)(o,t))}function BA(e,t){return function(){zs(this,e).delay=+t.apply(this,arguments)}}function HA(e,t){return t=+t,function(){zs(this,e).delay=t}}function tx(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?BA:HA)(t,e)):bt(this.node(),t).delay}function PA(e,t){return function(){Lt(this,e).duration=+t.apply(this,arguments)}}function kA(e,t){return t=+t,function(){Lt(this,e).duration=t}}function nx(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?PA:kA)(t,e)):bt(this.node(),t).duration}function GA(e,t){if(typeof t!="function")throw new Error;return function(){Lt(this,e).ease=t}}function ox(e){var t=this._id;return arguments.length?this.each(GA(t,e)):bt(this.node(),t).ease}function UA(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Lt(this,e).ease=n}}function ix(e){if(typeof e!="function")throw new Error;return this.each(UA(this._id,e))}function ax(e){typeof e!="function"&&(e=hs(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],l=a.length,r=o[i]=[],s,u=0;u<l;++u)(s=a[u])&&e.call(s,s.__data__,u,a)&&r.push(s);return new Zt(o,this._parents,this._name,this._id)}function lx(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,i=n.length,a=Math.min(o,i),l=new Array(o),r=0;r<a;++r)for(var s=t[r],u=n[r],c=s.length,d=l[r]=new Array(c),f,h=0;h<c;++h)(f=s[h]||u[h])&&(d[h]=f);for(;r<o;++r)l[r]=t[r];return new Zt(l,this._parents,this._name,this._id)}function IA(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function VA(e,t,n){var o,i,a=IA(t)?zs:Lt;return function(){var l=a(this,e),r=l.on;r!==o&&(i=(o=r).copy()).on(t,n),l.on=i}}function rx(e,t){var n=this._id;return arguments.length<2?bt(this.node(),n).on.on(e):this.each(VA(n,e,t))}function YA(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function sx(){return this.on("end.remove",YA(this._id))}function ux(e){var t=this._name,n=this._id;typeof e!="function"&&(e=va(e));for(var o=this._groups,i=o.length,a=new Array(i),l=0;l<i;++l)for(var r=o[l],s=r.length,u=a[l]=new Array(s),c,d,f=0;f<s;++f)(c=r[f])&&(d=e.call(c,c.__data__,f,r))&&("__data__"in c&&(d.__data__=c.__data__),u[f]=d,Yi(u[f],t,n,f,u,bt(c,n)));return new Zt(a,this._parents,t,n)}function cx(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ms(e));for(var o=this._groups,i=o.length,a=[],l=[],r=0;r<i;++r)for(var s=o[r],u=s.length,c,d=0;d<u;++d)if(c=s[d]){for(var f=e.call(c,c.__data__,d,s),h,v=bt(c,n),b=0,S=f.length;b<S;++b)(h=f[b])&&Yi(h,t,n,b,f,v);a.push(f),l.push(c)}return new Zt(a,l,t,n)}var XA=Wo.prototype.constructor;function fx(){return new XA(this._groups,this._parents)}function qA(e,t){var n,o,i;return function(){var a=Ii(this,e),l=(this.style.removeProperty(e),Ii(this,e));return a===l?null:a===n&&l===o?i:i=t(n=a,o=l)}}function dx(e){return function(){this.style.removeProperty(e)}}function ZA(e,t,n){var o,i=n+"",a;return function(){var l=Ii(this,e);return l===i?null:l===o?a:a=t(o=l,n)}}function jA(e,t,n){var o,i,a;return function(){var l=Ii(this,e),r=n(this),s=r+"";return r==null&&(s=r=(this.style.removeProperty(e),Ii(this,e))),l===s?null:l===o&&s===i?a:(i=s,a=t(o=l,r))}}function $A(e,t){var n,o,i,a="style."+t,l="end."+a,r;return function(){var s=Lt(this,e),u=s.on,c=s.value[a]==null?r||(r=dx(t)):void 0;(u!==n||i!==c)&&(o=(n=u).copy()).on(l,i=c),s.on=o}}function px(e,t,n){var o=(e+="")=="transform"?Zm:uf;return t==null?this.styleTween(e,qA(e,o)).on("end.style."+e,dx(e)):typeof t=="function"?this.styleTween(e,jA(e,o,kl(this,"style."+e,t))).each($A(this._id,e)):this.styleTween(e,ZA(e,o,t),n).on("end.style."+e,null)}function FA(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function KA(e,t,n){var o,i;function a(){var l=t.apply(this,arguments);return l!==i&&(o=(i=l)&&FA(e,l,n)),o}return a._value=t,a}function mx(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,KA(e,t,n??""))}function QA(e){return function(){this.textContent=e}}function WA(e){return function(){var t=e(this);this.textContent=t??""}}function hx(e){return this.tween("text",typeof e=="function"?WA(kl(this,"text",e)):QA(e==null?"":e+""))}function JA(e){return function(t){this.textContent=e.call(this,t)}}function eM(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&JA(i)),t}return o._value=e,o}function gx(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,eM(e))}function yx(){for(var e=this._name,t=this._id,n=cf(),o=this._groups,i=o.length,a=0;a<i;++a)for(var l=o[a],r=l.length,s,u=0;u<r;++u)if(s=l[u]){var c=bt(s,t);Yi(s,e,n,u,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Zt(o,this._parents,e,n)}function vx(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(a,l){var r={value:l},s={value:function(){--i===0&&a()}};n.each(function(){var u=Lt(this,o),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(r),t._.interrupt.push(r),t._.end.push(s)),u.on=t}),i===0&&a()})}var tM=0;function Zt(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function bx(e){return Wo().transition(e)}function cf(){return++tM}var ei=Wo.prototype;Zt.prototype=bx.prototype={constructor:Zt,select:ux,selectAll:cx,selectChild:ei.selectChild,selectChildren:ei.selectChildren,filter:ax,merge:lx,selection:fx,transition:yx,call:ei.call,nodes:ei.nodes,node:ei.node,size:ei.size,empty:ei.empty,each:ei.each,on:rx,attr:JS,attrTween:ex,style:px,styleTween:mx,text:hx,textTween:gx,remove:sx,tween:WS,delay:tx,duration:nx,ease:ox,easeVarying:ix,end:vx,[Symbol.iterator]:ei[Symbol.iterator]};function ff(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var nM={time:null,delay:0,duration:250,ease:ff};function oM(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Sx(e){var t,n;e instanceof Zt?(t=e._id,e=e._name):(t=cf(),(n=nM).time=Rs(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,a=0;a<i;++a)for(var l=o[a],r=l.length,s,u=0;u<r;++u)(s=l[u])&&Yi(s,e,t,u,l,n||oM(s,t));return new Zt(o,this._parents,e,t)}Wo.prototype.interrupt=QS;Wo.prototype.transition=Sx;var Ls=e=>()=>e;function Fm(e,{sourceEvent:t,target:n,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function io(e,t,n){this.k=e,this.x=t,this.y=n}io.prototype={constructor:io,scale:function(e){return e===1?this:new io(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new io(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ca=new io(1,0,0);Bs.prototype=io.prototype;function Bs(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Ca;return e.__zoom}function df(e){e.stopImmediatePropagation()}function Gl(e){e.preventDefault(),e.stopImmediatePropagation()}function iM(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function aM(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function xx(){return this.__zoom||Ca}function lM(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function rM(){return navigator.maxTouchPoints||"ontouchstart"in this}function sM(e,t,n){var o=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],l=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),l>a?(a+l)/2:Math.min(0,a)||Math.max(0,l))}function pf(){var e=iM,t=aM,n=sM,o=lM,i=rM,a=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],r=250,s=Ea,u=ya("start","zoom","end"),c,d,f,h=500,v=150,b=0,S=10;function p(T){T.property("__zoom",xx).on("wheel.zoom",w,{passive:!1}).on("mousedown.zoom",C).on("dblclick.zoom",H).filter(i).on("touchstart.zoom",D).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",I).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.transform=function(T,A,M,O){var R=T.selection?T.selection():T;R.property("__zoom",xx),T!==R?x(T,A,M,O):R.interrupt().each(function(){_(this,arguments).event(O).start().zoom(null,typeof A=="function"?A.apply(this,arguments):A).end()})},p.scaleBy=function(T,A,M,O){p.scaleTo(T,function(){var R=this.__zoom.k,L=typeof A=="function"?A.apply(this,arguments):A;return R*L},M,O)},p.scaleTo=function(T,A,M,O){p.transform(T,function(){var R=t.apply(this,arguments),L=this.__zoom,V=M==null?g(R):typeof M=="function"?M.apply(this,arguments):M,k=L.invert(V),G=typeof A=="function"?A.apply(this,arguments):A;return n(m(y(L,G),V,k),R,l)},M,O)},p.translateBy=function(T,A,M,O){p.transform(T,function(){return n(this.__zoom.translate(typeof A=="function"?A.apply(this,arguments):A,typeof M=="function"?M.apply(this,arguments):M),t.apply(this,arguments),l)},null,O)},p.translateTo=function(T,A,M,O,R){p.transform(T,function(){var L=t.apply(this,arguments),V=this.__zoom,k=O==null?g(L):typeof O=="function"?O.apply(this,arguments):O;return n(Ca.translate(k[0],k[1]).scale(V.k).translate(typeof A=="function"?-A.apply(this,arguments):-A,typeof M=="function"?-M.apply(this,arguments):-M),L,l)},O,R)};function y(T,A){return A=Math.max(a[0],Math.min(a[1],A)),A===T.k?T:new io(A,T.x,T.y)}function m(T,A,M){var O=A[0]-M[0]*T.k,R=A[1]-M[1]*T.k;return O===T.x&&R===T.y?T:new io(T.k,O,R)}function g(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function x(T,A,M,O){T.on("start.zoom",function(){_(this,arguments).event(O).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(O).end()}).tween("zoom",function(){var R=this,L=arguments,V=_(R,L).event(O),k=t.apply(R,L),G=M==null?g(k):typeof M=="function"?M.apply(R,L):M,q=Math.max(k[1][0]-k[0][0],k[1][1]-k[0][1]),Z=R.__zoom,j=typeof A=="function"?A.apply(R,L):A,se=s(Z.invert(G).concat(q/Z.k),j.invert(G).concat(q/j.k));return function(J){if(J===1)J=j;else{var X=se(J),Q=q/X[2];J=new io(Q,G[0]-X[0]*Q,G[1]-X[1]*Q)}V.zoom(null,J)}})}function _(T,A,M){return!M&&T.__zooming||new E(T,A)}function E(T,A){this.that=T,this.args=A,this.active=0,this.sourceEvent=null,this.extent=t.apply(T,A),this.taps=0}E.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,A){return this.mouse&&T!=="mouse"&&(this.mouse[1]=A.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=A.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=A.invert(this.touch1[0])),this.that.__zoom=A,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var A=Ct(this.that).datum();u.call(T,this.that,new Fm(T,{sourceEvent:this.sourceEvent,target:p,type:T,transform:this.that.__zoom,dispatch:u}),A)}};function w(T,...A){if(!e.apply(this,arguments))return;var M=_(this,A).event(T),O=this.__zoom,R=Math.max(a[0],Math.min(a[1],O.k*Math.pow(2,o.apply(this,arguments)))),L=Xt(T);if(M.wheel)(M.mouse[0][0]!==L[0]||M.mouse[0][1]!==L[1])&&(M.mouse[1]=O.invert(M.mouse[0]=L)),clearTimeout(M.wheel);else{if(O.k===R)return;M.mouse=[L,O.invert(L)],Na(this),M.start()}Gl(T),M.wheel=setTimeout(V,v),M.zoom("mouse",n(m(y(O,R),M.mouse[0],M.mouse[1]),M.extent,l));function V(){M.wheel=null,M.end()}}function C(T,...A){if(f||!e.apply(this,arguments))return;var M=T.currentTarget,O=_(this,A,!0).event(T),R=Ct(T.view).on("mousemove.zoom",G,!0).on("mouseup.zoom",q,!0),L=Xt(T,M),V=T.clientX,k=T.clientY;ys(T.view),df(T),O.mouse=[L,this.__zoom.invert(L)],Na(this),O.start();function G(Z){if(Gl(Z),!O.moved){var j=Z.clientX-V,se=Z.clientY-k;O.moved=j*j+se*se>b}O.event(Z).zoom("mouse",n(m(O.that.__zoom,O.mouse[0]=Xt(Z,M),O.mouse[1]),O.extent,l))}function q(Z){R.on("mousemove.zoom mouseup.zoom",null),vs(Z.view,O.moved),Gl(Z),O.event(Z).end()}}function H(T,...A){if(e.apply(this,arguments)){var M=this.__zoom,O=Xt(T.changedTouches?T.changedTouches[0]:T,this),R=M.invert(O),L=M.k*(T.shiftKey?.5:2),V=n(m(y(M,L),O,R),t.apply(this,A),l);Gl(T),r>0?Ct(this).transition().duration(r).call(x,V,O,T):Ct(this).call(p.transform,V,O,T)}}function D(T,...A){if(e.apply(this,arguments)){var M=T.touches,O=M.length,R=_(this,A,T.changedTouches.length===O).event(T),L,V,k,G;for(df(T),V=0;V<O;++V)k=M[V],G=Xt(k,this),G=[G,this.__zoom.invert(G),k.identifier],R.touch0?!R.touch1&&R.touch0[2]!==G[2]&&(R.touch1=G,R.taps=0):(R.touch0=G,L=!0,R.taps=1+!!c);c&&(c=clearTimeout(c)),L&&(R.taps<2&&(d=G[0],c=setTimeout(function(){c=null},h)),Na(this),R.start())}}function z(T,...A){if(this.__zooming){var M=_(this,A).event(T),O=T.changedTouches,R=O.length,L,V,k,G;for(Gl(T),L=0;L<R;++L)V=O[L],k=Xt(V,this),M.touch0&&M.touch0[2]===V.identifier?M.touch0[0]=k:M.touch1&&M.touch1[2]===V.identifier&&(M.touch1[0]=k);if(V=M.that.__zoom,M.touch1){var q=M.touch0[0],Z=M.touch0[1],j=M.touch1[0],se=M.touch1[1],J=(J=j[0]-q[0])*J+(J=j[1]-q[1])*J,X=(X=se[0]-Z[0])*X+(X=se[1]-Z[1])*X;V=y(V,Math.sqrt(J/X)),k=[(q[0]+j[0])/2,(q[1]+j[1])/2],G=[(Z[0]+se[0])/2,(Z[1]+se[1])/2]}else if(M.touch0)k=M.touch0[0],G=M.touch0[1];else return;M.zoom("touch",n(m(V,k,G),M.extent,l))}}function I(T,...A){if(this.__zooming){var M=_(this,A).event(T),O=T.changedTouches,R=O.length,L,V;for(df(T),f&&clearTimeout(f),f=setTimeout(function(){f=null},h),L=0;L<R;++L)V=O[L],M.touch0&&M.touch0[2]===V.identifier?delete M.touch0:M.touch1&&M.touch1[2]===V.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(V=Xt(V,this),Math.hypot(d[0]-V[0],d[1]-V[1])<S)){var k=Ct(this).on("dblclick.zoom");k&&k.apply(this,arguments)}}}return p.wheelDelta=function(T){return arguments.length?(o=typeof T=="function"?T:Ls(+T),p):o},p.filter=function(T){return arguments.length?(e=typeof T=="function"?T:Ls(!!T),p):e},p.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:Ls(!!T),p):i},p.extent=function(T){return arguments.length?(t=typeof T=="function"?T:Ls([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),p):t},p.scaleExtent=function(T){return arguments.length?(a[0]=+T[0],a[1]=+T[1],p):[a[0],a[1]]},p.translateExtent=function(T){return arguments.length?(l[0][0]=+T[0][0],l[1][0]=+T[1][0],l[0][1]=+T[0][1],l[1][1]=+T[1][1],p):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},p.constrain=function(T){return arguments.length?(n=T,p):n},p.duration=function(T){return arguments.length?(r=+T,p):r},p.interpolate=function(T){return arguments.length?(s=T,p):s},p.on=function(){var T=u.on.apply(u,arguments);return T===u?p:T},p.clickDistance=function(T){return arguments.length?(b=(T=+T)*T,p):Math.sqrt(b)},p.tapDistance=function(T){return arguments.length?(S=+T,p):S},p}var wn={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:e=>`Node type "${e}" 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:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:o}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/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."},ql=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],eh=["Enter"," ","Escape"],th={"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:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"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"},Zi;(function(e){e.Strict="strict",e.Loose="loose"})(Zi||(Zi={}));var ti;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(ti||(ti={}));var wa;(function(e){e.Partial="partial",e.Full="full"})(wa||(wa={}));var nh={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},bo;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(bo||(bo={}));var Vl;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Vl||(Vl={}));var W;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(W||(W={}));var _x={[W.Left]:W.Right,[W.Right]:W.Left,[W.Top]:W.Bottom,[W.Bottom]:W.Top};function oh(e){return e===null?null:e?"valid":"invalid"}var ih=e=>"id"in e&&"source"in e&&"target"in e,Bx=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),ah=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e);var ks=(e,t=[0,0])=>{let{width:n,height:o}=So(e),i=e.origin??t,a=n*i[0],l=o*i[1];return{x:e.position.x-a,y:e.position.y-l}},lh=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=e.reduce((o,i)=>{let a=typeof i=="string",l=!t.nodeLookup&&!a?i:void 0;t.nodeLookup&&(l=a?t.nodeLookup.get(i):ah(i)?i:t.nodeLookup.get(i.id));let r=l?gf(l,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return vf(o,r)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return bf(n)},Zl=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(i=>{(t.filter===void 0||t.filter(i))&&(n=vf(n,gf(i)),o=!0)}),o?bf(n):{x:0,y:0,width:0,height:0}},yf=(e,t,[n,o,i]=[0,0,1],a=!1,l=!1)=>{let r={...Fl(t,[n,o,i]),width:t.width/i,height:t.height/i},s=[];for(let u of e.values()){let{measured:c,selectable:d=!0,hidden:f=!1}=u;if(l&&!d||f)continue;let h=c.width??u.width??u.initialWidth??null,v=c.height??u.height??u.initialHeight??null,b=jl(r,Ma(u)),S=(h??0)*(v??0),p=a&&b>0;(!u.internals.handleBounds||p||b>=S||u.dragging)&&s.push(u)}return s},Hx=(e,t)=>{let n=new Set;return e.forEach(o=>{n.add(o.id)}),t.filter(o=>n.has(o.source)||n.has(o.target))};function uM(e,t){let n=new Map,o=t?.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&(t?.includeHiddenNodes||!i.hidden)&&(!o||o.has(i.id))&&n.set(i.id,i)}),n}async function Px({nodes:e,width:t,height:n,panZoom:o,minZoom:i,maxZoom:a},l){if(e.size===0)return Promise.resolve(!0);let r=uM(e,l),s=Zl(r),u=Gs(s,t,n,l?.minZoom??i,l?.maxZoom??a,l?.padding??.1);return await o.setViewport(u,{duration:l?.duration,ease:l?.ease,interpolate:l?.interpolate}),Promise.resolve(!0)}function rh({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:i,onError:a}){let l=n.get(e),r=l.parentId?n.get(l.parentId):void 0,{x:s,y:u}=r?r.internals.positionAbsolute:{x:0,y:0},c=l.origin??o,d=l.extent||i;if(l.extent==="parent"&&!l.expandParent)if(!r)a?.("005",wn.error005());else{let h=r.measured.width,v=r.measured.height;h&&v&&(d=[[s,u],[s+h,u+v]])}else r&&Xl(l.extent)&&(d=[[l.extent[0][0]+s,l.extent[0][1]+u],[l.extent[1][0]+s,l.extent[1][1]+u]]);let f=Xl(d)?Aa(t,d,l.measured):t;return(l.measured.width===void 0||l.measured.height===void 0)&&a?.("015",wn.error015()),{position:{x:f.x-s+(l.measured.width??0)*c[0],y:f.y-u+(l.measured.height??0)*c[1]},positionAbsolute:f}}async function kx({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:i}){let a=new Set(e.map(f=>f.id)),l=[];for(let f of n){if(f.deletable===!1)continue;let h=a.has(f.id),v=!h&&f.parentId&&l.find(b=>b.id===f.parentId);(h||v)&&l.push(f)}let r=new Set(t.map(f=>f.id)),s=o.filter(f=>f.deletable!==!1),c=Hx(l,s);for(let f of s)r.has(f.id)&&!c.find(v=>v.id===f.id)&&c.push(f);if(!i)return{edges:c,nodes:l};let d=await i({nodes:l,edges:c});return typeof d=="boolean"?d?{edges:c,nodes:l}:{edges:[],nodes:[]}:d}var Yl=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Aa=(e={x:0,y:0},t,n)=>({x:Yl(e.x,t[0][0],t[1][0]-(n?.width??0)),y:Yl(e.y,t[0][1],t[1][1]-(n?.height??0))});function Gx(e,t,n){let{width:o,height:i}=So(n),{x:a,y:l}=n.internals.positionAbsolute;return Aa(e,[[a,l],[a+o,l+i]],t)}var Ex=(e,t,n)=>e<t?Yl(Math.abs(e-t),1,t)/t:e>n?-Yl(Math.abs(e-n),1,t)/t:0,Ux=(e,t,n=15,o=40)=>{let i=Ex(e.x,o,t.width-o)*n,a=Ex(e.y,o,t.height-o)*n;return[i,a]},vf=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Jm=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),bf=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),Ma=(e,t=[0,0])=>{let{x:n,y:o}=ah(e)?e.internals.positionAbsolute:ks(e,t);return{x:n,y:o,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},gf=(e,t=[0,0])=>{let{x:n,y:o}=ah(e)?e.internals.positionAbsolute:ks(e,t);return{x:n,y:o,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:o+(e.measured?.height??e.height??e.initialHeight??0)}},sh=(e,t)=>bf(vf(Jm(e),Jm(t))),jl=(e,t)=>{let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)},uh=e=>Xn(e.width)&&Xn(e.height)&&Xn(e.x)&&Xn(e.y),Xn=e=>!isNaN(e)&&isFinite(e),ch=(e,t)=>{},$l=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Fl=({x:e,y:t},[n,o,i],a=!1,l=[1,1])=>{let r={x:(e-n)/i,y:(t-o)/i};return a?$l(r,l):r},Ps=({x:e,y:t},[n,o,i])=>({x:e*i+n,y:t*i+o});function Ul(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function cM(e,t,n){if(typeof e=="string"||typeof e=="number"){let o=Ul(e,n),i=Ul(e,t);return{top:o,right:i,bottom:o,left:i,x:i*2,y:o*2}}if(typeof e=="object"){let o=Ul(e.top??e.y??0,n),i=Ul(e.bottom??e.y??0,n),a=Ul(e.left??e.x??0,t),l=Ul(e.right??e.x??0,t);return{top:o,right:l,bottom:i,left:a,x:a+l,y:o+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function fM(e,t,n,o,i,a){let{x:l,y:r}=Ps(e,[t,n,o]),{x:s,y:u}=Ps({x:e.x+e.width,y:e.y+e.height},[t,n,o]),c=i-s,d=a-u;return{left:Math.floor(l),top:Math.floor(r),right:Math.floor(c),bottom:Math.floor(d)}}var Gs=(e,t,n,o,i,a)=>{let l=cM(a,t,n),r=(t-l.x)/e.width,s=(n-l.y)/e.height,u=Math.min(r,s),c=Yl(u,o,i),d=e.x+e.width/2,f=e.y+e.height/2,h=t/2-d*c,v=n/2-f*c,b=fM(e,h,v,c,t,n),S={left:Math.min(b.left-l.left,0),top:Math.min(b.top-l.top,0),right:Math.min(b.right-l.right,0),bottom:Math.min(b.bottom-l.bottom,0)};return{x:h-S.left+S.right,y:v-S.top+S.bottom,zoom:c}},Kl=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function Xl(e){return e!=null&&e!=="parent"}function So(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function fh(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function dh(e,t={width:0,height:0},n,o,i){let a={...e},l=o.get(n);if(l){let r=l.origin||i;a.x+=l.internals.positionAbsolute.x-(t.width??0)*r[0],a.y+=l.internals.positionAbsolute.y-(t.height??0)*r[1]}return a}function ph(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Ix(){let e,t;return{promise:new Promise((o,i)=>{e=o,t=i}),resolve:e,reject:t}}function Vx(e){return{...th,...e||{}}}function Hs(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:i}){let{x:a,y:l}=qn(e),r=Fl({x:a-(i?.left??0),y:l-(i?.top??0)},o),{x:s,y:u}=n?$l(r,t):r;return{xSnapped:s,ySnapped:u,...r}}var Sf=e=>({width:e.offsetWidth,height:e.offsetHeight}),mh=e=>e?.getRootNode?.()||window?.document,dM=["INPUT","SELECT","TEXTAREA"];function hh(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:dM.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}var gh=e=>"clientX"in e,qn=(e,t)=>{let n=gh(e),o=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:o-(t?.left??0),y:i-(t?.top??0)}},Tx=(e,t,n,o,i)=>{let a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(l=>{let r=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),type:e,nodeId:i,position:l.getAttribute("data-handlepos"),x:(r.left-n.left)/o,y:(r.top-n.top)/o,...Sf(l)}})};function xf({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:i,sourceControlY:a,targetControlX:l,targetControlY:r}){let s=e*.125+i*.375+l*.375+n*.125,u=t*.125+a*.375+r*.375+o*.125,c=Math.abs(s-e),d=Math.abs(u-t);return[s,u,c,d]}function mf(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Nx({pos:e,x1:t,y1:n,x2:o,y2:i,c:a}){switch(e){case W.Left:return[t-mf(t-o,a),n];case W.Right:return[t+mf(o-t,a),n];case W.Top:return[t,n-mf(n-i,a)];case W.Bottom:return[t,n+mf(i-n,a)]}}function _f({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top,curvature:l=.25}){let[r,s]=Nx({pos:n,x1:e,y1:t,x2:o,y2:i,c:l}),[u,c]=Nx({pos:a,x1:o,y1:i,x2:e,y2:t,c:l}),[d,f,h,v]=xf({sourceX:e,sourceY:t,targetX:o,targetY:i,sourceControlX:r,sourceControlY:s,targetControlX:u,targetControlY:c});return[`M${e},${t} C${r},${s} ${u},${c} ${o},${i}`,d,f,h,v]}function yh({sourceX:e,sourceY:t,targetX:n,targetY:o}){let i=Math.abs(n-e)/2,a=n<e?n+i:n-i,l=Math.abs(o-t)/2,r=o<t?o+l:o-l;return[a,r,i,l]}function Yx({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o=0,elevateOnSelect:i=!1,zIndexMode:a="basic"}){if(a==="manual")return o;let l=i&&n?o+1e3:o,r=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return l+r}function Xx({sourceNode:e,targetNode:t,width:n,height:o,transform:i}){let a=vf(gf(e),gf(t));a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);let l={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:o/i[2]};return jl(l,bf(a))>0}var pM=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,mM=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),vh=(e,t,n={})=>{if(!e.source||!e.target)return ch("006",wn.error006()),t;let o=n.getEdgeId||pM,i;return ih(e)?i={...e}:i={...e,id:o(e)},mM(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function Ef({sourceX:e,sourceY:t,targetX:n,targetY:o}){let[i,a,l,r]=yh({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,i,a,l,r]}var Cx={[W.Left]:{x:-1,y:0},[W.Right]:{x:1,y:0},[W.Top]:{x:0,y:-1},[W.Bottom]:{x:0,y:1}},hM=({source:e,sourcePosition:t=W.Bottom,target:n})=>t===W.Left||t===W.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},wx=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function gM({source:e,sourcePosition:t=W.Bottom,target:n,targetPosition:o=W.Top,center:i,offset:a,stepPosition:l}){let r=Cx[t],s=Cx[o],u={x:e.x+r.x*a,y:e.y+r.y*a},c={x:n.x+s.x*a,y:n.y+s.y*a},d=hM({source:u,sourcePosition:t,target:c}),f=d.x!==0?"x":"y",h=d[f],v=[],b,S,p={x:0,y:0},y={x:0,y:0},[,,m,g]=yh({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(r[f]*s[f]===-1){f==="x"?(b=i.x??u.x+(c.x-u.x)*l,S=i.y??(u.y+c.y)/2):(b=i.x??(u.x+c.x)/2,S=i.y??u.y+(c.y-u.y)*l);let _=[{x:b,y:u.y},{x:b,y:c.y}],E=[{x:u.x,y:S},{x:c.x,y:S}];r[f]===h?v=f==="x"?_:E:v=f==="x"?E:_}else{let _=[{x:u.x,y:c.y}],E=[{x:c.x,y:u.y}];if(f==="x"?v=r.x===h?E:_:v=r.y===h?_:E,t===o){let z=Math.abs(e[f]-n[f]);if(z<=a){let I=Math.min(a-1,a-z);r[f]===h?p[f]=(u[f]>e[f]?-1:1)*I:y[f]=(c[f]>n[f]?-1:1)*I}}if(t!==o){let z=f==="x"?"y":"x",I=r[f]===s[z],T=u[z]>c[z],A=u[z]<c[z];(r[f]===1&&(!I&&T||I&&A)||r[f]!==1&&(!I&&A||I&&T))&&(v=f==="x"?_:E)}let w={x:u.x+p.x,y:u.y+p.y},C={x:c.x+y.x,y:c.y+y.y},H=Math.max(Math.abs(w.x-v[0].x),Math.abs(C.x-v[0].x)),D=Math.max(Math.abs(w.y-v[0].y),Math.abs(C.y-v[0].y));H>=D?(b=(w.x+C.x)/2,S=v[0].y):(b=v[0].x,S=(w.y+C.y)/2)}return[[e,{x:u.x+p.x,y:u.y+p.y},...v,{x:c.x+y.x,y:c.y+y.y},n],b,S,m,g]}function yM(e,t,n,o){let i=Math.min(wx(e,t)/2,wx(t,n)/2,o),{x:a,y:l}=t;if(e.x===a&&a===n.x||e.y===l&&l===n.y)return`L${a} ${l}`;if(e.y===l){let u=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${a+i*u},${l}Q ${a},${l} ${a},${l+i*c}`}let r=e.x<n.x?1:-1,s=e.y<n.y?-1:1;return`L ${a},${l+i*s}Q ${a},${l} ${a+i*r},${l}`}function Us({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top,borderRadius:l=5,centerX:r,centerY:s,offset:u=20,stepPosition:c=.5}){let[d,f,h,v,b]=gM({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:i},targetPosition:a,center:{x:r,y:s},offset:u,stepPosition:c});return[d.reduce((p,y,m)=>{let g="";return m>0&&m<d.length-1?g=yM(d[m-1],y,d[m+1],l):g=`${m===0?"M":"L"}${y.x} ${y.y}`,p+=g,p},""),f,h,v,b]}function Ax(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function qx(e){let{sourceNode:t,targetNode:n}=e;if(!Ax(t)||!Ax(n))return null;let o=t.internals.handleBounds||Mx(t.handles),i=n.internals.handleBounds||Mx(n.handles),a=Dx(o?.source??[],e.sourceHandle),l=Dx(e.connectionMode===Zi.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!l)return e.onError?.("008",wn.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let r=a?.position||W.Bottom,s=l?.position||W.Top,u=ji(t,a,r),c=ji(n,l,s);return{sourceX:u.x,sourceY:u.y,targetX:c.x,targetY:c.y,sourcePosition:r,targetPosition:s}}function Mx(e){if(!e)return null;let t=[],n=[];for(let o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?t.push(o):o.type==="target"&&n.push(o);return{source:t,target:n}}function ji(e,t,n=W.Left,o=!1){let i=(t?.x??0)+e.internals.positionAbsolute.x,a=(t?.y??0)+e.internals.positionAbsolute.y,{width:l,height:r}=t??So(e);if(o)return{x:i+l/2,y:a+r/2};switch(t?.position??n){case W.Top:return{x:i+l/2,y:a};case W.Right:return{x:i+l,y:a+r/2};case W.Bottom:return{x:i+l/2,y:a+r};case W.Left:return{x:i,y:a+r/2}}}function Dx(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Tf(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function Zx(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:i}){let a=new Set;return e.reduce((l,r)=>([r.markerStart||o,r.markerEnd||i].forEach(s=>{if(s&&typeof s=="object"){let u=Tf(s,t);a.has(u)||(l.push({id:u,color:s.color||n,...s}),a.add(u))}}),l),[]).sort((l,r)=>l.id.localeCompare(r.id))}var jx=1e3,vM=10,bh={nodeOrigin:[0,0],nodeExtent:ql,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},bM={...bh,checkEquality:!0};function Sh(e,t){let n={...e};for(let o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function $x(e,t,n){let o=Sh(bh,n);for(let i of e.values())if(i.parentId)_h(i,e,t,o);else{let a=ks(i,o.nodeOrigin),l=Xl(i.extent)?i.extent:o.nodeExtent,r=Aa(a,l,So(i));i.internals.positionAbsolute=r}}function SM(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],o=[];for(let i of e.handles){let a={id:i.id,width:i.width??1,height:i.height??1,nodeId:e.id,x:i.x,y:i.y,position:i.position,type:i.type};i.type==="source"?n.push(a):i.type==="target"&&o.push(a)}return{source:n,target:o}}function xh(e){return e==="manual"}function Nf(e,t,n,o={}){let i=Sh(bM,o),a={i:0},l=new Map(t),r=i?.elevateNodesOnSelect&&!xh(i.zIndexMode)?jx:0,s=e.length>0;t.clear(),n.clear();for(let u of e){let c=l.get(u.id);if(i.checkEquality&&u===c?.internals.userNode)t.set(u.id,c);else{let d=ks(u,i.nodeOrigin),f=Xl(u.extent)?u.extent:i.nodeExtent,h=Aa(d,f,So(u));c={...i.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:h,handleBounds:SM(u,c),z:Fx(u,r,i.zIndexMode),userNode:u}},t.set(u.id,c)}(c.measured===void 0||c.measured.width===void 0||c.measured.height===void 0)&&!c.hidden&&(s=!1),u.parentId&&_h(c,t,n,o,a)}return s}function xM(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function _h(e,t,n,o,i){let{elevateNodesOnSelect:a,nodeOrigin:l,nodeExtent:r,zIndexMode:s}=Sh(bh,o),u=e.parentId,c=t.get(u);if(!c){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}xM(e,n),i&&!c.parentId&&c.internals.rootParentIndex===void 0&&s==="auto"&&(c.internals.rootParentIndex=++i.i,c.internals.z=c.internals.z+i.i*vM),i&&c.internals.rootParentIndex!==void 0&&(i.i=c.internals.rootParentIndex);let d=a&&!xh(s)?jx:0,{x:f,y:h,z:v}=_M(e,c,l,r,d,s),{positionAbsolute:b}=e.internals,S=f!==b.x||h!==b.y;(S||v!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:S?{x:f,y:h}:b,z:v}})}function Fx(e,t,n){let o=Xn(e.zIndex)?e.zIndex:0;return xh(n)?o:o+(e.selected?t:0)}function _M(e,t,n,o,i,a){let{x:l,y:r}=t.internals.positionAbsolute,s=So(e),u=ks(e,n),c=Xl(e.extent)?Aa(u,e.extent,s):u,d=Aa({x:l+c.x,y:r+c.y},o,s);e.extent==="parent"&&(d=Gx(d,s,t));let f=Fx(e,i,a),h=t.internals.z??0;return{x:d.x,y:d.y,z:h>=f?h+1:f}}function Cf(e,t,n,o=[0,0]){let i=[],a=new Map;for(let l of e){let r=t.get(l.parentId);if(!r)continue;let s=a.get(l.parentId)?.expandedRect??Ma(r),u=sh(s,l.rect);a.set(l.parentId,{expandedRect:u,parent:r})}return a.size>0&&a.forEach(({expandedRect:l,parent:r},s)=>{let u=r.internals.positionAbsolute,c=So(r),d=r.origin??o,f=l.x<u.x?Math.round(Math.abs(u.x-l.x)):0,h=l.y<u.y?Math.round(Math.abs(u.y-l.y)):0,v=Math.max(c.width,Math.round(l.width)),b=Math.max(c.height,Math.round(l.height)),S=(v-c.width)*d[0],p=(b-c.height)*d[1];(f>0||h>0||S||p)&&(i.push({id:s,type:"position",position:{x:r.position.x-f+S,y:r.position.y-h+p}}),n.get(s)?.forEach(y=>{e.some(m=>m.id===y.id)||i.push({id:y.id,type:"position",position:{x:y.position.x+f,y:y.position.y+h}})})),(c.width<l.width||c.height<l.height||f||h)&&i.push({id:s,type:"dimensions",setAttributes:!0,dimensions:{width:v+(f?d[0]*f-S:0),height:b+(h?d[1]*h-p:0)}})}),i}function Kx(e,t,n,o,i,a,l){let r=o?.querySelector(".xyflow__viewport"),s=!1;if(!r)return{changes:[],updatedInternals:s};let u=[],c=window.getComputedStyle(r),{m22:d}=new window.DOMMatrixReadOnly(c.transform),f=[];for(let h of e.values()){let v=t.get(h.id);if(!v)continue;if(v.hidden){t.set(v.id,{...v,internals:{...v.internals,handleBounds:void 0}}),s=!0;continue}let b=Sf(h.nodeElement),S=v.measured.width!==b.width||v.measured.height!==b.height;if(!!(b.width&&b.height&&(S||!v.internals.handleBounds||h.force))){let y=h.nodeElement.getBoundingClientRect(),m=Xl(v.extent)?v.extent:a,{positionAbsolute:g}=v.internals;v.parentId&&v.extent==="parent"?g=Gx(g,b,t.get(v.parentId)):m&&(g=Aa(g,m,b));let x={...v,measured:b,internals:{...v.internals,positionAbsolute:g,handleBounds:{source:Tx("source",h.nodeElement,y,d,v.id),target:Tx("target",h.nodeElement,y,d,v.id)}}};t.set(v.id,x),v.parentId&&_h(x,t,n,{nodeOrigin:i,zIndexMode:l}),s=!0,S&&(u.push({id:v.id,type:"dimensions",dimensions:b}),v.expandParent&&v.parentId&&f.push({id:v.id,parentId:v.parentId,rect:Ma(x,i)}))}}if(f.length>0){let h=Cf(f,t,n,i);u.push(...h)}return{changes:u,updatedInternals:s}}async function Qx({delta:e,panZoom:t,transform:n,translateExtent:o,width:i,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);let l=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],o),r=!!l&&(l.x!==n[0]||l.y!==n[1]||l.k!==n[2]);return Promise.resolve(r)}function Rx(e,t,n,o,i,a){let l=i,r=o.get(l)||new Map;o.set(l,r.set(n,t)),l=`${i}-${e}`;let s=o.get(l)||new Map;if(o.set(l,s.set(n,t)),a){l=`${i}-${e}-${a}`;let u=o.get(l)||new Map;o.set(l,u.set(n,t))}}function Eh(e,t,n){e.clear(),t.clear();for(let o of n){let{source:i,target:a,sourceHandle:l=null,targetHandle:r=null}=o,s={edgeId:o.id,source:i,target:a,sourceHandle:l,targetHandle:r},u=`${i}-${l}--${a}-${r}`,c=`${a}-${r}--${i}-${l}`;Rx("source",s,c,e,i,l),Rx("target",s,u,e,a,r),t.set(o.id,o)}}function Wx(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:Wx(n,t):!1}function Ox(e,t,n){let o=e;do{if(o?.matches?.(t))return!0;if(o===n)return!1;o=o?.parentElement}while(o);return!1}function EM(e,t,n,o){let i=new Map;for(let[a,l]of e)if((l.selected||l.id===o)&&(!l.parentId||!Wx(l,e))&&(l.draggable||t&&typeof l.draggable>"u")){let r=e.get(a);r&&i.set(a,{id:a,position:r.position||{x:0,y:0},distance:{x:n.x-r.internals.positionAbsolute.x,y:n.y-r.internals.positionAbsolute.y},extent:r.extent,parentId:r.parentId,origin:r.origin,expandParent:r.expandParent,internals:{positionAbsolute:r.internals.positionAbsolute||{x:0,y:0}},measured:{width:r.measured.width??0,height:r.measured.height??0}})}return i}function Km({nodeId:e,dragItems:t,nodeLookup:n,dragging:o=!0}){let i=[];for(let[l,r]of t){let s=n.get(l)?.internals.userNode;s&&i.push({...s,position:r.position,dragging:o})}if(!e)return[i[0],i];let a=n.get(e)?.internals.userNode;return[a?{...a,position:t.get(e)?.position||a.position,dragging:o}:i[0],i]}function TM({dragItems:e,snapGrid:t,x:n,y:o}){let i=e.values().next().value;if(!i)return null;let a={x:n-i.distance.x,y:o-i.distance.y},l=$l(a,t);return{x:l.x-a.x,y:l.y-a.y}}function Jx({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:o,onDragStop:i}){let a={x:null,y:null},l=0,r=new Map,s=!1,u={x:0,y:0},c=null,d=!1,f=null,h=!1,v=!1,b=null;function S({noDragClassName:y,handleSelector:m,domNode:g,isSelectable:x,nodeId:_,nodeClickDistance:E=0}){f=Ct(g);function w({x:z,y:I}){let{nodeLookup:T,nodeExtent:A,snapGrid:M,snapToGrid:O,nodeOrigin:R,onNodeDrag:L,onSelectionDrag:V,onError:k,updateNodePositions:G}=t();a={x:z,y:I};let q=!1,Z=r.size>1,j=Z&&A?Jm(Zl(r)):null,se=Z&&O?TM({dragItems:r,snapGrid:M,x:z,y:I}):null;for(let[J,X]of r){if(!T.has(J))continue;let Q={x:z-X.distance.x,y:I-X.distance.y};O&&(Q=se?{x:Math.round(Q.x+se.x),y:Math.round(Q.y+se.y)}:$l(Q,M));let ue=null;if(Z&&A&&!X.extent&&j){let{positionAbsolute:ee}=X.internals,Te=ee.x-j.x+A[0][0],de=ee.x+X.measured.width-j.x2+A[1][0],be=ee.y-j.y+A[0][1],Le=ee.y+X.measured.height-j.y2+A[1][1];ue=[[Te,be],[de,Le]]}let{position:he,positionAbsolute:ie}=rh({nodeId:J,nextPosition:Q,nodeLookup:T,nodeExtent:ue||A,nodeOrigin:R,onError:k});q=q||X.position.x!==he.x||X.position.y!==he.y,X.position=he,X.internals.positionAbsolute=ie}if(v=v||q,!!q&&(G(r,!0),b&&(o||L||!_&&V))){let[J,X]=Km({nodeId:_,dragItems:r,nodeLookup:T});o?.(b,r,J,X),L?.(b,J,X),_||V?.(b,X)}}async function C(){if(!c)return;let{transform:z,panBy:I,autoPanSpeed:T,autoPanOnNodeDrag:A}=t();if(!A){s=!1,cancelAnimationFrame(l);return}let[M,O]=Ux(u,c,T);(M!==0||O!==0)&&(a.x=(a.x??0)-M/z[2],a.y=(a.y??0)-O/z[2],await I({x:M,y:O})&&w(a)),l=requestAnimationFrame(C)}function H(z){let{nodeLookup:I,multiSelectionActive:T,nodesDraggable:A,transform:M,snapGrid:O,snapToGrid:R,selectNodesOnDrag:L,onNodeDragStart:V,onSelectionDragStart:k,unselectNodesAndEdges:G}=t();d=!0,(!L||!x)&&!T&&_&&(I.get(_)?.selected||G()),x&&L&&_&&e?.(_);let q=Hs(z.sourceEvent,{transform:M,snapGrid:O,snapToGrid:R,containerBounds:c});if(a=q,r=EM(I,A,q,_),r.size>0&&(n||V||!_&&k)){let[Z,j]=Km({nodeId:_,dragItems:r,nodeLookup:I});n?.(z.sourceEvent,r,Z,j),V?.(z.sourceEvent,Z,j),_||k?.(z.sourceEvent,j)}}let D=qc().clickDistance(E).on("start",z=>{let{domNode:I,nodeDragThreshold:T,transform:A,snapGrid:M,snapToGrid:O}=t();c=I?.getBoundingClientRect()||null,h=!1,v=!1,b=z.sourceEvent,T===0&&H(z),a=Hs(z.sourceEvent,{transform:A,snapGrid:M,snapToGrid:O,containerBounds:c}),u=qn(z.sourceEvent,c)}).on("drag",z=>{let{autoPanOnNodeDrag:I,transform:T,snapGrid:A,snapToGrid:M,nodeDragThreshold:O,nodeLookup:R}=t(),L=Hs(z.sourceEvent,{transform:T,snapGrid:A,snapToGrid:M,containerBounds:c});if(b=z.sourceEvent,(z.sourceEvent.type==="touchmove"&&z.sourceEvent.touches.length>1||_&&!R.has(_))&&(h=!0),!h){if(!s&&I&&d&&(s=!0,C()),!d){let V=qn(z.sourceEvent,c),k=V.x-u.x,G=V.y-u.y;Math.sqrt(k*k+G*G)>O&&H(z)}(a.x!==L.xSnapped||a.y!==L.ySnapped)&&r&&d&&(u=qn(z.sourceEvent,c),w(L))}}).on("end",z=>{if(!(!d||h)&&(s=!1,d=!1,cancelAnimationFrame(l),r.size>0)){let{nodeLookup:I,updateNodePositions:T,onNodeDragStop:A,onSelectionDragStop:M}=t();if(v&&(T(r,!1),v=!1),i||A||!_&&M){let[O,R]=Km({nodeId:_,dragItems:r,nodeLookup:I,dragging:!1});i?.(z.sourceEvent,r,O,R),A?.(z.sourceEvent,O,R),_||M?.(z.sourceEvent,R)}}}).filter(z=>{let I=z.target;return!z.button&&(!y||!Ox(I,`.${y}`,g))&&(!m||Ox(I,m,g))});f.call(D)}function p(){f?.on(".drag",null)}return{update:S,destroy:p}}function NM(e,t,n){let o=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let a of t.values())jl(i,Ma(a))>0&&o.push(a);return o}var CM=250;function wM(e,t,n,o){let i=[],a=1/0,l=NM(e,n,t+CM);for(let r of l){let s=[...r.internals.handleBounds?.source??[],...r.internals.handleBounds?.target??[]];for(let u of s){if(o.nodeId===u.nodeId&&o.type===u.type&&o.id===u.id)continue;let{x:c,y:d}=ji(r,u,u.position,!0),f=Math.sqrt(Math.pow(c-e.x,2)+Math.pow(d-e.y,2));f>t||(f<a?(i=[{...u,x:c,y:d}],a=f):f===a&&i.push({...u,x:c,y:d}))}}if(!i.length)return null;if(i.length>1){let r=o.type==="source"?"target":"source";return i.find(s=>s.type===r)??i[0]}return i[0]}function e_(e,t,n,o,i,a=!1){let l=o.get(e);if(!l)return null;let r=i==="strict"?l.internals.handleBounds?.[t]:[...l.internals.handleBounds?.source??[],...l.internals.handleBounds?.target??[]],s=(n?r?.find(u=>u.id===n):r?.[0])??null;return s&&a?{...s,...ji(l,s,s.position,!0)}:s}function t_(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function AM(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var n_=()=>!0;function MM(e,{connectionMode:t,connectionRadius:n,handleId:o,nodeId:i,edgeUpdaterType:a,isTarget:l,domNode:r,nodeLookup:s,lib:u,autoPanOnConnect:c,flowId:d,panBy:f,cancelConnection:h,onConnectStart:v,onConnect:b,onConnectEnd:S,isValidConnection:p=n_,onReconnectEnd:y,updateConnection:m,getTransform:g,getFromHandle:x,autoPanSpeed:_,dragThreshold:E=1,handleDomNode:w}){let C=mh(e.target),H=0,D,{x:z,y:I}=qn(e),T=t_(a,w),A=r?.getBoundingClientRect(),M=!1;if(!A||!T)return;let O=e_(i,T,o,s,t);if(!O)return;let R=qn(e,A),L=!1,V=null,k=!1,G=null;function q(){if(!c||!A)return;let[he,ie]=Ux(R,A,_);f({x:he,y:ie}),H=requestAnimationFrame(q)}let Z={...O,nodeId:i,type:T,position:O.position},j=s.get(i),J={inProgress:!0,isValid:null,from:ji(j,Z,W.Left,!0),fromHandle:Z,fromPosition:Z.position,fromNode:j,to:R,toHandle:null,toPosition:_x[Z.position],toNode:null,pointer:R};function X(){M=!0,m(J),v?.(e,{nodeId:i,handleId:o,handleType:T})}E===0&&X();function Q(he){if(!M){let{x:Le,y:Be}=qn(he),dt=Le-z,Gt=Be-I;if(!(dt*dt+Gt*Gt>E*E))return;X()}if(!x()||!Z){ue(he);return}let ie=g();R=qn(he,A),D=wM(Fl(R,ie,!1,[1,1]),n,s,Z),L||(q(),L=!0);let ee=o_(he,{handle:D,connectionMode:t,fromNodeId:i,fromHandleId:o,fromType:l?"target":"source",isValidConnection:p,doc:C,lib:u,flowId:d,nodeLookup:s});G=ee.handleDomNode,V=ee.connection,k=AM(!!D,ee.isValid);let Te=s.get(i),de=Te?ji(Te,Z,W.Left,!0):J.from,be={...J,from:de,isValid:k,to:ee.toHandle&&k?Ps({x:ee.toHandle.x,y:ee.toHandle.y},ie):R,toHandle:ee.toHandle,toPosition:k&&ee.toHandle?ee.toHandle.position:_x[Z.position],toNode:ee.toHandle?s.get(ee.toHandle.nodeId):null,pointer:R};m(be),J=be}function ue(he){if(!("touches"in he&&he.touches.length>0)){if(M){(D||G)&&V&&k&&b?.(V);let{inProgress:ie,...ee}=J,Te={...ee,toPosition:J.toHandle?J.toPosition:null};S?.(he,Te),a&&y?.(he,Te)}h(),cancelAnimationFrame(H),L=!1,k=!1,V=null,G=null,C.removeEventListener("mousemove",Q),C.removeEventListener("mouseup",ue),C.removeEventListener("touchmove",Q),C.removeEventListener("touchend",ue)}}C.addEventListener("mousemove",Q),C.addEventListener("mouseup",ue),C.addEventListener("touchmove",Q),C.addEventListener("touchend",ue)}function o_(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:i,fromType:a,doc:l,lib:r,flowId:s,isValidConnection:u=n_,nodeLookup:c}){let d=a==="target",f=t?l.querySelector(`.${r}-flow__handle[data-id="${s}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:h,y:v}=qn(e),b=l.elementFromPoint(h,v),S=b?.classList.contains(`${r}-flow__handle`)?b:f,p={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){let y=t_(void 0,S),m=S.getAttribute("data-nodeid"),g=S.getAttribute("data-handleid"),x=S.classList.contains("connectable"),_=S.classList.contains("connectableend");if(!m||!y)return p;let E={source:d?m:o,sourceHandle:d?g:i,target:d?o:m,targetHandle:d?i:g};p.connection=E;let C=x&&_&&(n===Zi.Strict?d&&y==="source"||!d&&y==="target":m!==o||g!==i);p.isValid=C&&u(E),p.toHandle=e_(m,y,g,c,n,!0)}return p}var wf={onPointerDown:MM,isValid:o_};function i_({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){let i=Ct(e);function a({translateExtent:r,width:s,height:u,zoomStep:c=1,pannable:d=!0,zoomable:f=!0,inversePan:h=!1}){let v=m=>{if(m.sourceEvent.type!=="wheel"||!t)return;let g=n(),x=m.sourceEvent.ctrlKey&&Kl()?10:1,_=-m.sourceEvent.deltaY*(m.sourceEvent.deltaMode===1?.05:m.sourceEvent.deltaMode?1:.002)*c,E=g[2]*Math.pow(2,_*x);t.scaleTo(E)},b=[0,0],S=m=>{(m.sourceEvent.type==="mousedown"||m.sourceEvent.type==="touchstart")&&(b=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY])},p=m=>{let g=n();if(m.sourceEvent.type!=="mousemove"&&m.sourceEvent.type!=="touchmove"||!t)return;let x=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY],_=[x[0]-b[0],x[1]-b[1]];b=x;let E=o()*Math.max(g[2],Math.log(g[2]))*(h?-1:1),w={x:g[0]-_[0]*E,y:g[1]-_[1]*E},C=[[0,0],[s,u]];t.setViewportConstrained({x:w.x,y:w.y,zoom:g[2]},C,r)},y=pf().on("start",S).on("zoom",d?p:null).on("zoom.wheel",f?v:null);i.call(y,{})}function l(){i.on("zoom",null)}return{update:a,destroy:l,pointer:Xt}}var Af=e=>({x:e.x,y:e.y,zoom:e.k}),Qm=({x:e,y:t,zoom:n})=>Ca.translate(e,t).scale(n),Il=(e,t)=>e.target.closest(`.${t}`),a_=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),DM=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Wm=(e,t=0,n=DM,o=()=>{})=>{let i=typeof t=="number"&&t>0;return i||o(),i?e.transition().duration(t).ease(n).on("end",o):e},l_=e=>{let t=e.ctrlKey&&Kl()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function RM({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:l,onPanZoomStart:r,onPanZoom:s,onPanZoomEnd:u}){return c=>{if(Il(c,t))return c.ctrlKey&&c.preventDefault(),!1;c.preventDefault(),c.stopImmediatePropagation();let d=n.property("__zoom").k||1;if(c.ctrlKey&&l){let S=Xt(c),p=l_(c),y=d*Math.pow(2,p);o.scaleTo(n,y,S,c);return}let f=c.deltaMode===1?20:1,h=i===ti.Vertical?0:c.deltaX*f,v=i===ti.Horizontal?0:c.deltaY*f;!Kl()&&c.shiftKey&&i!==ti.Vertical&&(h=c.deltaY*f,v=0),o.translateBy(n,-(h/d)*a,-(v/d)*a,{internal:!0});let b=Af(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(s?.(c,b),e.panScrollTimeout=setTimeout(()=>{u?.(c,b),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,r?.(c,b))}}function OM({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,i){let a=o.type==="wheel",l=!t&&a&&!o.ctrlKey,r=Il(o,e);if(o.ctrlKey&&a&&r&&o.preventDefault(),l||r)return null;o.preventDefault(),n.call(this,o,i)}}function zM({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{if(o.sourceEvent?.internal)return;let i=Af(o.transform);e.mouseButton=o.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,o.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(o.sourceEvent,i)}}function LM({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&a_(t,e.mouseButton??0)),a.sourceEvent?.sync||o([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,Af(a.transform))}}function BM({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:i,onPaneContextMenu:a}){return l=>{if(!l.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&a_(t,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&a(l.sourceEvent),e.usedRightMouseButton=!1,o(!1),i)){let r=Af(l.transform);e.prevViewport=r,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(l.sourceEvent,r)},n?150:0)}}}function HM({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:o,panOnScroll:i,zoomOnDoubleClick:a,userSelectionActive:l,noWheelClassName:r,noPanClassName:s,lib:u,connectionInProgress:c}){return d=>{let f=e||t,h=n&&d.ctrlKey,v=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&(Il(d,`${u}-flow__node`)||Il(d,`${u}-flow__edge`)))return!0;if(!o&&!f&&!i&&!a&&!n||l||c&&!v||Il(d,r)&&v||Il(d,s)&&(!v||i&&v&&!e)||!n&&d.ctrlKey&&v)return!1;if(!n&&d.type==="touchstart"&&d.touches?.length>1)return d.preventDefault(),!1;if(!f&&!i&&!h&&v||!o&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(o)&&!o.includes(d.button)&&d.type==="mousedown")return!1;let b=Array.isArray(o)&&o.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||v)&&b}}function r_({domNode:e,minZoom:t,maxZoom:n,translateExtent:o,viewport:i,onPanZoom:a,onPanZoomStart:l,onPanZoomEnd:r,onDraggingChange:s}){let u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},c=e.getBoundingClientRect(),d=pf().scaleExtent([t,n]).translateExtent(o),f=Ct(e).call(d);y({x:i.x,y:i.y,zoom:Yl(i.zoom,t,n)},[[0,0],[c.width,c.height]],o);let h=f.on("wheel.zoom"),v=f.on("dblclick.zoom");d.wheelDelta(l_);function b(D,z){return f?new Promise(I=>{d?.interpolate(z?.interpolate==="linear"?Jo:Ea).transform(Wm(f,z?.duration,z?.ease,()=>I(!0)),D)}):Promise.resolve(!1)}function S({noWheelClassName:D,noPanClassName:z,onPaneContextMenu:I,userSelectionActive:T,panOnScroll:A,panOnDrag:M,panOnScrollMode:O,panOnScrollSpeed:R,preventScrolling:L,zoomOnPinch:V,zoomOnScroll:k,zoomOnDoubleClick:G,zoomActivationKeyPressed:q,lib:Z,onTransformChange:j,connectionInProgress:se,paneClickDistance:J,selectionOnDrag:X}){T&&!u.isZoomingOrPanning&&p();let Q=A&&!q&&!T;d.clickDistance(X?1/0:!Xn(J)||J<0?0:J);let ue=Q?RM({zoomPanValues:u,noWheelClassName:D,d3Selection:f,d3Zoom:d,panOnScrollMode:O,panOnScrollSpeed:R,zoomOnPinch:V,onPanZoomStart:l,onPanZoom:a,onPanZoomEnd:r}):OM({noWheelClassName:D,preventScrolling:L,d3ZoomHandler:h});if(f.on("wheel.zoom",ue,{passive:!1}),!T){let ie=zM({zoomPanValues:u,onDraggingChange:s,onPanZoomStart:l});d.on("start",ie);let ee=LM({zoomPanValues:u,panOnDrag:M,onPaneContextMenu:!!I,onPanZoom:a,onTransformChange:j});d.on("zoom",ee);let Te=BM({zoomPanValues:u,panOnDrag:M,panOnScroll:A,onPaneContextMenu:I,onPanZoomEnd:r,onDraggingChange:s});d.on("end",Te)}let he=HM({zoomActivationKeyPressed:q,panOnDrag:M,zoomOnScroll:k,panOnScroll:A,zoomOnDoubleClick:G,zoomOnPinch:V,userSelectionActive:T,noPanClassName:z,noWheelClassName:D,lib:Z,connectionInProgress:se});d.filter(he),G?f.on("dblclick.zoom",v):f.on("dblclick.zoom",null)}function p(){d.on("zoom",null)}async function y(D,z,I){let T=Qm(D),A=d?.constrain()(T,z,I);return A&&await b(A),new Promise(M=>M(A))}async function m(D,z){let I=Qm(D);return await b(I,z),new Promise(T=>T(I))}function g(D){if(f){let z=Qm(D),I=f.property("__zoom");(I.k!==D.zoom||I.x!==D.x||I.y!==D.y)&&d?.transform(f,z,null,{sync:!0})}}function x(){let D=f?Bs(f.node()):{x:0,y:0,k:1};return{x:D.x,y:D.y,zoom:D.k}}function _(D,z){return f?new Promise(I=>{d?.interpolate(z?.interpolate==="linear"?Jo:Ea).scaleTo(Wm(f,z?.duration,z?.ease,()=>I(!0)),D)}):Promise.resolve(!1)}function E(D,z){return f?new Promise(I=>{d?.interpolate(z?.interpolate==="linear"?Jo:Ea).scaleBy(Wm(f,z?.duration,z?.ease,()=>I(!0)),D)}):Promise.resolve(!1)}function w(D){d?.scaleExtent(D)}function C(D){d?.translateExtent(D)}function H(D){let z=!Xn(D)||D<0?0:D;d?.clickDistance(z)}return{update:S,destroy:p,setViewport:m,setViewportConstrained:y,getViewport:x,scaleTo:_,scaleBy:E,setScaleExtent:w,setTranslateExtent:C,syncViewport:g,setClickDistance:H}}var $i;(function(e){e.Line="line",e.Handle="handle"})($i||($i={}));function PM({width:e,prevWidth:t,height:n,prevHeight:o,affectsX:i,affectsY:a}){let l=e-t,r=n-o,s=[l>0?1:l<0?-1:0,r>0?1:r<0?-1:0];return l&&i&&(s[0]=s[0]*-1),r&&a&&(s[1]=s[1]*-1),s}function zx(e){let t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),o=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:o,affectsY:i}}function Xi(e,t){return Math.max(0,t-e)}function qi(e,t){return Math.max(0,e-t)}function hf(e,t,n){return Math.max(0,t-e,e-n)}function Lx(e,t){return e?!t:t}function kM(e,t,n,o,i,a,l,r){let{affectsX:s,affectsY:u}=t,{isHorizontal:c,isVertical:d}=t,f=c&&d,{xSnapped:h,ySnapped:v}=n,{minWidth:b,maxWidth:S,minHeight:p,maxHeight:y}=o,{x:m,y:g,width:x,height:_,aspectRatio:E}=e,w=Math.floor(c?h-e.pointerX:0),C=Math.floor(d?v-e.pointerY:0),H=x+(s?-w:w),D=_+(u?-C:C),z=-a[0]*x,I=-a[1]*_,T=hf(H,b,S),A=hf(D,p,y);if(l){let R=0,L=0;s&&w<0?R=Xi(m+w+z,l[0][0]):!s&&w>0&&(R=qi(m+H+z,l[1][0])),u&&C<0?L=Xi(g+C+I,l[0][1]):!u&&C>0&&(L=qi(g+D+I,l[1][1])),T=Math.max(T,R),A=Math.max(A,L)}if(r){let R=0,L=0;s&&w>0?R=qi(m+w,r[0][0]):!s&&w<0&&(R=Xi(m+H,r[1][0])),u&&C>0?L=qi(g+C,r[0][1]):!u&&C<0&&(L=Xi(g+D,r[1][1])),T=Math.max(T,R),A=Math.max(A,L)}if(i){if(c){let R=hf(H/E,p,y)*E;if(T=Math.max(T,R),l){let L=0;!s&&!u||s&&!u&&f?L=qi(g+I+H/E,l[1][1])*E:L=Xi(g+I+(s?w:-w)/E,l[0][1])*E,T=Math.max(T,L)}if(r){let L=0;!s&&!u||s&&!u&&f?L=Xi(g+H/E,r[1][1])*E:L=qi(g+(s?w:-w)/E,r[0][1])*E,T=Math.max(T,L)}}if(d){let R=hf(D*E,b,S)/E;if(A=Math.max(A,R),l){let L=0;!s&&!u||u&&!s&&f?L=qi(m+D*E+z,l[1][0])/E:L=Xi(m+(u?C:-C)*E+z,l[0][0])/E,A=Math.max(A,L)}if(r){let L=0;!s&&!u||u&&!s&&f?L=Xi(m+D*E,r[1][0])/E:L=qi(m+(u?C:-C)*E,r[0][0])/E,A=Math.max(A,L)}}}C=C+(C<0?A:-A),w=w+(w<0?T:-T),i&&(f?H>D*E?C=(Lx(s,u)?-w:w)/E:w=(Lx(s,u)?-C:C)*E:c?(C=w/E,u=s):(w=C*E,s=u));let M=s?m+w:m,O=u?g+C:g;return{width:x+(s?-w:w),height:_+(u?-C:C),x:a[0]*w*(s?-1:1)+M,y:a[1]*C*(u?-1:1)+O}}var s_={width:0,height:0,x:0,y:0},GM={...s_,pointerX:0,pointerY:0,aspectRatio:1};function UM(e){return[[0,0],[e.measured.width,e.measured.height]]}function IM(e,t,n){let o=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,l=e.measured.height??0,r=n[0]*a,s=n[1]*l;return[[o-r,i-s],[o+a-r,i+l-s]]}function u_({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:i}){let a=Ct(e),l={controlDirection:zx("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function r({controlPosition:u,boundaries:c,keepAspectRatio:d,resizeDirection:f,onResizeStart:h,onResize:v,onResizeEnd:b,shouldResize:S}){let p={...s_},y={...GM};l={boundaries:c,resizeDirection:f,keepAspectRatio:d,controlDirection:zx(u)};let m,g=null,x=[],_,E,w,C=!1,H=qc().on("start",D=>{let{nodeLookup:z,transform:I,snapGrid:T,snapToGrid:A,nodeOrigin:M,paneDomNode:O}=n();if(m=z.get(t),!m)return;g=O?.getBoundingClientRect()??null;let{xSnapped:R,ySnapped:L}=Hs(D.sourceEvent,{transform:I,snapGrid:T,snapToGrid:A,containerBounds:g});p={width:m.measured.width??0,height:m.measured.height??0,x:m.position.x??0,y:m.position.y??0},y={...p,pointerX:R,pointerY:L,aspectRatio:p.width/p.height},_=void 0,m.parentId&&(m.extent==="parent"||m.expandParent)&&(_=z.get(m.parentId),E=_&&m.extent==="parent"?UM(_):void 0),x=[],w=void 0;for(let[V,k]of z)if(k.parentId===t&&(x.push({id:V,position:{...k.position},extent:k.extent}),k.extent==="parent"||k.expandParent)){let G=IM(k,m,k.origin??M);w?w=[[Math.min(G[0][0],w[0][0]),Math.min(G[0][1],w[0][1])],[Math.max(G[1][0],w[1][0]),Math.max(G[1][1],w[1][1])]]:w=G}h?.(D,{...p})}).on("drag",D=>{let{transform:z,snapGrid:I,snapToGrid:T,nodeOrigin:A}=n(),M=Hs(D.sourceEvent,{transform:z,snapGrid:I,snapToGrid:T,containerBounds:g}),O=[];if(!m)return;let{x:R,y:L,width:V,height:k}=p,G={},q=m.origin??A,{width:Z,height:j,x:se,y:J}=kM(y,l.controlDirection,M,l.boundaries,l.keepAspectRatio,q,E,w),X=Z!==V,Q=j!==k,ue=se!==R&&X,he=J!==L&&Q;if(!ue&&!he&&!X&&!Q)return;if((ue||he||q[0]===1||q[1]===1)&&(G.x=ue?se:p.x,G.y=he?J:p.y,p.x=G.x,p.y=G.y,x.length>0)){let de=se-R,be=J-L;for(let Le of x)Le.position={x:Le.position.x-de+q[0]*(Z-V),y:Le.position.y-be+q[1]*(j-k)},O.push(Le)}if((X||Q)&&(G.width=X&&(!l.resizeDirection||l.resizeDirection==="horizontal")?Z:p.width,G.height=Q&&(!l.resizeDirection||l.resizeDirection==="vertical")?j:p.height,p.width=G.width,p.height=G.height),_&&m.expandParent){let de=q[0]*(G.width??0);G.x&&G.x<de&&(p.x=de,y.x=y.x-(G.x-de));let be=q[1]*(G.height??0);G.y&&G.y<be&&(p.y=be,y.y=y.y-(G.y-be))}let ie=PM({width:p.width,prevWidth:V,height:p.height,prevHeight:k,affectsX:l.controlDirection.affectsX,affectsY:l.controlDirection.affectsY}),ee={...p,direction:ie};S?.(D,ee)!==!1&&(C=!0,v?.(D,ee),o(G,O))}).on("end",D=>{C&&(b?.(D,{...p}),i?.({...p}),C=!1)});a.call(H)}function s(){a.on(".drag",null)}return{update:r,destroy:s}}var __=oe(At(),1),E_=oe(y_(),1);var b_={},v_=e=>{let t,n=new Set,o=(c,d)=>{let f=typeof c=="function"?c(t):c;if(!Object.is(f,t)){let h=t;t=d??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(v=>v(t,h))}},i=()=>t,s={setState:o,getState:i,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(b_.env?b_.env.MODE: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."),n.clear()}},u=t=e(o,i,s);return s},S_=e=>e?v_(e):v_;var{useDebugValue:aD}=__.default,{useSyncExternalStoreWithSelector:lD}=E_.default,rD=e=>e;function Nh(e,t=rD,n){let o=lD(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return aD(o),o}var x_=(e,t)=>{let n=S_(e),o=(i,a=t)=>Nh(n,i,a);return Object.assign(o,n),o},T_=(e,t)=>e?x_(e,t):x_;function je(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[o,i]of e)if(!Object.is(i,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let o of e)if(!t.has(o))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let o of n)if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1;return!0}var sD=oe(cd()),zf=(0,P.createContext)(null),uD=zf.Provider,$_=wn.error001();function Ae(e,t){let n=(0,P.useContext)(zf);if(n===null)throw new Error($_);return Nh(n,e,t)}function Qe(){let e=(0,P.useContext)(zf);if(e===null)throw new Error($_);return(0,P.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var N_={display:"none"},cD={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},F_="react-flow__node-desc",K_="react-flow__edge-desc",fD="react-flow__aria-live",dD=e=>e.ariaLiveMessage,pD=e=>e.ariaLabelConfig;function mD({rfId:e}){let t=Ae(dD);return(0,B.jsx)("div",{id:`${fD}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:cD,children:t})}function hD({rfId:e,disableKeyboardA11y:t}){let n=Ae(pD);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("div",{id:`${F_}-${e}`,style:N_,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,B.jsx)("div",{id:`${K_}-${e}`,style:N_,children:n["edge.a11yDescription.default"]}),!t&&(0,B.jsx)(mD,{rfId:e})]})}var Jl=(0,P.forwardRef)(({position:e="top-left",children:t,className:n,style:o,...i},a)=>{let l=`${e}`.split("-");return(0,B.jsx)("div",{className:ot(["react-flow__panel",n,...l]),style:o,ref:a,...i,children:t})});Jl.displayName="Panel";function gD({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,B.jsx)(Jl,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:(0,B.jsx)("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}var yD=e=>{let t=[],n=[];for(let[,o]of e.nodeLookup)o.selected&&t.push(o.internals.userNode);for(let[,o]of e.edgeLookup)o.selected&&n.push(o);return{selectedNodes:t,selectedEdges:n}},Df=e=>e.id;function vD(e,t){return je(e.selectedNodes.map(Df),t.selectedNodes.map(Df))&&je(e.selectedEdges.map(Df),t.selectedEdges.map(Df))}function bD({onSelectionChange:e}){let t=Qe(),{selectedNodes:n,selectedEdges:o}=Ae(yD,vD);return(0,P.useEffect)(()=>{let i={nodes:n,edges:o};e?.(i),t.getState().onSelectionChangeHandlers.forEach(a=>a(i))},[n,o,e]),null}var SD=e=>!!e.onSelectionChangeHandlers;function xD({onSelectionChange:e}){let t=Ae(SD);return e||t?(0,B.jsx)(bD,{onSelectionChange:e}):null}var Q_=[0,0],_D={x:0,y:0,zoom:1},ED=["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"],C_=[...ED,"rfId"],TD=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),w_={translateExtent:ql,nodeOrigin:Q_,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function ND(e){let{setNodes:t,setEdges:n,setMinZoom:o,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:l,reset:r,setDefaultNodesAndEdges:s}=Ae(TD,je),u=Qe();(0,P.useEffect)(()=>(s(e.defaultNodes,e.defaultEdges),()=>{c.current=w_,r()}),[]);let c=(0,P.useRef)(w_);return(0,P.useEffect)(()=>{for(let d of C_){let f=e[d],h=c.current[d];f!==h&&(typeof e[d]>"u"||(d==="nodes"?t(f):d==="edges"?n(f):d==="minZoom"?o(f):d==="maxZoom"?i(f):d==="translateExtent"?a(f):d==="nodeExtent"?l(f):d==="ariaLabelConfig"?u.setState({ariaLabelConfig:Vx(f)}):d==="fitView"?u.setState({fitViewQueued:f}):d==="fitViewOptions"?u.setState({fitViewOptions:f}):u.setState({[d]:f})))}c.current=e},C_.map(d=>e[d])),null}function A_(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function CD(e){let[t,n]=(0,P.useState)(e==="system"?null:e);return(0,P.useEffect)(()=>{if(e!=="system"){n(e);return}let o=A_(),i=()=>n(o?.matches?"dark":"light");return i(),o?.addEventListener("change",i),()=>{o?.removeEventListener("change",i)}},[e]),t!==null?t:A_()?.matches?"dark":"light"}var M_=typeof document<"u"?document:null;function Is(e=null,t={target:M_,actInsideInputWithModifier:!0}){let[n,o]=(0,P.useState)(!1),i=(0,P.useRef)(!1),a=(0,P.useRef)(new Set([])),[l,r]=(0,P.useMemo)(()=>{if(e!==null){let u=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.replace("+",`
|
|
2468
2483
|
`).replace(`
|
|
2469
2484
|
|
|
2470
2485
|
`,`
|
|
2471
2486
|
+`).split(`
|
|
2472
|
-
`)),c=u.reduce((d,f)=>d.concat(...f),[]);return[u,c]}return[[],[]]},[e]);return(0,B.useEffect)(()=>{let s=t?.target??C_,u=t?.actInsideInputWithModifier??!0;if(e!==null){let c=h=>{if(i.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!i.current||i.current&&!u)&&mh(h))return!1;let b=A_(h.code,r);if(a.current.add(h[b]),w_(l,a.current,!1)){let S=h.composedPath?.()?.[0]||h.target,p=S?.nodeName==="BUTTON"||S?.nodeName==="A";t.preventDefault!==!1&&(i.current||!p)&&h.preventDefault(),o(!0)}},d=h=>{let v=A_(h.code,r);w_(l,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(h[v]),h.key==="Meta"&&a.current.clear(),i.current=!1},f=()=>{a.current.clear(),o(!1)};return s?.addEventListener("keydown",c),s?.addEventListener("keyup",d),window.addEventListener("blur",f),window.addEventListener("contextmenu",f),()=>{s?.removeEventListener("keydown",c),s?.removeEventListener("keyup",d),window.removeEventListener("blur",f),window.removeEventListener("contextmenu",f)}}},[e,o]),n}function w_(e,t,n){return e.filter(o=>n||o.length===t.size).some(o=>o.every(i=>t.has(i)))}function A_(e,t){return t.includes(e)?"code":"key"}var TD=()=>{let e=Qe();return(0,B.useMemo)(()=>({zoomIn:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomOut:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{let{panZoom:o}=e.getState();return o?o.scaleTo(t,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[o,i,a],panZoom:l}=e.getState();return l?(await l.setViewport({x:t.x??o,y:t.y??i,zoom:t.zoom??a},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{let[t,n,o]=e.getState().transform;return{x:t,y:n,zoom:o}},setCenter:async(t,n,o)=>e.getState().setCenter(t,n,o),fitBounds:async(t,n)=>{let{width:o,height:i,minZoom:a,maxZoom:l,panZoom:r}=e.getState(),s=Bs(t,o,i,a,l,n?.padding??.1);return r?(await r.setViewport(s,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{let{transform:o,snapGrid:i,snapToGrid:a,domNode:l}=e.getState();if(!l)return t;let{x:r,y:s}=l.getBoundingClientRect(),u={x:t.x-r,y:t.y-s},c=n.snapGrid??i,d=n.snapToGrid??a;return Yl(u,o,d,c)},flowToScreenPosition:t=>{let{transform:n,domNode:o}=e.getState();if(!o)return t;let{x:i,y:a}=o.getBoundingClientRect(),l=Ls(t,n);return{x:l.x+i,y:l.y+a}}}),[])};function K_(e,t){let n=[],o=new Map,i=[];for(let a of e)if(a.type==="add"){i.push(a);continue}else if(a.type==="remove"||a.type==="replace")o.set(a.id,[a]);else{let l=o.get(a.id);l?l.push(a):o.set(a.id,[a])}for(let a of t){let l=o.get(a.id);if(!l){n.push(a);continue}if(l[0].type==="remove")continue;if(l[0].type==="replace"){n.push({...l[0].item});continue}let r={...a};for(let s of l)ND(s,r);n.push(r)}return i.length&&i.forEach(a=>{a.index!==void 0?n.splice(a.index,0,{...a.item}):n.push({...a.item})}),n}function ND(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function Q_(e,t){return K_(e,t)}function F_(e,t){return K_(e,t)}function wa(e,t){return{id:e,type:"select",selected:t}}function Zl(e,t=new Set,n=!1){let o=[];for(let[i,a]of e){let l=t.has(i);!(a.selected===void 0&&!l)&&a.selected!==l&&(n&&(a.selected=l),o.push(wa(a.id,l)))}return o}function M_({items:e=[],lookup:t}){let n=[],o=new Map(e.map(i=>[i.id,i]));for(let[i,a]of e.entries()){let l=t.get(a.id),r=l?.internals?.userNode??l;r!==void 0&&r!==a&&n.push({id:a.id,item:a,type:"replace"}),r===void 0&&n.push({item:a,type:"add",index:i})}for(let[i]of t)o.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function D_(e){return{id:e.id,type:"remove"}}var R_=e=>Ox(e),CD=e=>oh(e);function W_(e){return(0,B.forwardRef)(e)}var wD=typeof window<"u"?B.useLayoutEffect:B.useEffect;function O_(e){let[t,n]=(0,B.useState)(BigInt(0)),[o]=(0,B.useState)(()=>AD(()=>n(i=>i+BigInt(1))));return wD(()=>{let i=o.get();i.length&&(e(i),o.reset())},[t]),o}function AD(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var J_=(0,B.createContext)(null);function MD({children:e}){let t=Qe(),n=(0,B.useCallback)(r=>{let{nodes:s=[],setNodes:u,hasDefaultNodes:c,onNodesChange:d,nodeLookup:f,fitViewQueued:h,onNodesChangeMiddlewareMap:v}=t.getState(),b=s;for(let p of r)b=typeof p=="function"?p(b):p;let S=M_({items:b,lookup:f});for(let p of v.values())S=p(S);c&&u(b),S.length>0?d?.(S):h&&window.requestAnimationFrame(()=>{let{fitViewQueued:p,nodes:y,setNodes:m}=t.getState();p&&m(y)})},[]),o=O_(n),i=(0,B.useCallback)(r=>{let{edges:s=[],setEdges:u,hasDefaultEdges:c,onEdgesChange:d,edgeLookup:f}=t.getState(),h=s;for(let v of r)h=typeof v=="function"?v(h):v;c?u(h):d&&d(M_({items:h,lookup:f}))},[]),a=O_(i),l=(0,B.useMemo)(()=>({nodeQueue:o,edgeQueue:a}),[]);return(0,H.jsx)(J_.Provider,{value:l,children:e})}function DD(){let e=(0,B.useContext)(J_);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}var RD=e=>!!e.panZoom;function Ah(){let e=TD(),t=Qe(),n=DD(),o=we(RD),i=(0,B.useMemo)(()=>{let a=d=>t.getState().nodeLookup.get(d),l=d=>{n.nodeQueue.push(d)},r=d=>{n.edgeQueue.push(d)},s=d=>{let{nodeLookup:f,nodeOrigin:h}=t.getState(),v=R_(d)?d:f.get(d.id),b=v.parentId?fh(v.position,v.measured,v.parentId,f,h):v.position,S={...v,position:b,width:v.measured?.width??v.width,height:v.measured?.height??v.height};return Ca(S)},u=(d,f,h={replace:!1})=>{l(v=>v.map(b=>{if(b.id===d){let S=typeof f=="function"?f(b):f;return h.replace&&R_(S)?S:{...b,...S}}return b}))},c=(d,f,h={replace:!1})=>{r(v=>v.map(b=>{if(b.id===d){let S=typeof f=="function"?f(b):f;return h.replace&&CD(S)?S:{...b,...S}}return b}))};return{getNodes:()=>t.getState().nodes.map(d=>({...d})),getNode:d=>a(d)?.internals.userNode,getInternalNode:a,getEdges:()=>{let{edges:d=[]}=t.getState();return d.map(f=>({...f}))},getEdge:d=>t.getState().edgeLookup.get(d),setNodes:l,setEdges:r,addNodes:d=>{let f=Array.isArray(d)?d:[d];n.nodeQueue.push(h=>[...h,...f])},addEdges:d=>{let f=Array.isArray(d)?d:[d];n.edgeQueue.push(h=>[...h,...f])},toObject:()=>{let{nodes:d=[],edges:f=[],transform:h}=t.getState(),[v,b,S]=h;return{nodes:d.map(p=>({...p})),edges:f.map(p=>({...p})),viewport:{x:v,y:b,zoom:S}}},deleteElements:async({nodes:d=[],edges:f=[]})=>{let{nodes:h,edges:v,onNodesDelete:b,onEdgesDelete:S,triggerNodeChanges:p,triggerEdgeChanges:y,onDelete:m,onBeforeDelete:g}=t.getState(),{nodes:x,edges:_}=await Hx({nodesToRemove:d,edgesToRemove:f,nodes:h,edges:v,onBeforeDelete:g}),E=_.length>0,w=x.length>0;if(E){let N=_.map(D_);S?.(_),y(N)}if(w){let N=x.map(D_);b?.(x),p(N)}return(w||E)&&m?.({nodes:x,edges:_}),{deletedNodes:x,deletedEdges:_}},getIntersectingNodes:(d,f=!0,h)=>{let v=sh(d),b=v?d:s(d),S=h!==void 0;return b?(h||t.getState().nodes).filter(p=>{let y=t.getState().nodeLookup.get(p.id);if(y&&!v&&(p.id===d.id||!y.internals.positionAbsolute))return!1;let m=Ca(S?p:y),g=Il(m,b);return f&&g>0||g>=m.width*m.height||g>=b.width*b.height}):[]},isNodeIntersecting:(d,f,h=!0)=>{let b=sh(d)?d:s(d);if(!b)return!1;let S=Il(b,f);return h&&S>0||S>=f.width*f.height||S>=b.width*b.height},updateNode:u,updateNodeData:(d,f,h={replace:!1})=>{u(d,v=>{let b=typeof f=="function"?f(v):f;return h.replace?{...v,data:b}:{...v,data:{...v.data,...b}}},h)},updateEdge:c,updateEdgeData:(d,f,h={replace:!1})=>{c(d,v=>{let b=typeof f=="function"?f(v):f;return h.replace?{...v,data:b}:{...v,data:{...v.data,...b}}},h)},getNodesBounds:d=>{let{nodeLookup:f,nodeOrigin:h}=t.getState();return ah(d,{nodeLookup:f,nodeOrigin:h})},getHandleConnections:({type:d,id:f,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}-${d}${f?`-${f}`:""}`)?.values()??[]),getNodeConnections:({type:d,handleId:f,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}${d?f?`-${d}-${f}`:`-${d}`:""}`)?.values()??[]),fitView:async d=>{let f=t.getState().fitViewResolver??Gx();return t.setState({fitViewQueued:!0,fitViewOptions:d,fitViewResolver:f}),n.nodeQueue.push(h=>[...h]),f.promise}}},[]);return(0,B.useMemo)(()=>({...i,...e,viewportInitialized:o}),[o])}var z_=e=>e.selected,OD=typeof window<"u"?window:void 0;function zD({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=Qe(),{deleteElements:o}=Ah(),i=Gs(e,{actInsideInputWithModifier:!1}),a=Gs(t,{target:OD});(0,B.useEffect)(()=>{if(i){let{edges:l,nodes:r}=n.getState();o({nodes:r.filter(z_),edges:l.filter(z_)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,B.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}function LD(e){let t=Qe();(0,B.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let o=vf(e.current);(o.height===0||o.width===0)&&t.getState().onError?.("004",Mn.error004()),t.setState({width:o.width||500,height:o.height||500})};if(e.current){n(),window.addEventListener("resize",n);let o=new ResizeObserver(()=>n());return o.observe(e.current),()=>{window.removeEventListener("resize",n),o&&e.current&&o.unobserve(e.current)}}},[])}var zf={position:"absolute",width:"100%",height:"100%",top:0,left:0},HD=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function BD({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:o=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=ti.Free,zoomOnDoubleClick:l=!0,panOnDrag:r=!0,defaultViewport:s,translateExtent:u,minZoom:c,maxZoom:d,zoomActivationKeyCode:f,preventScrolling:h=!0,children:v,noWheelClassName:b,noPanClassName:S,onViewportChange:p,isControlledViewport:y,paneClickDistance:m,selectionOnDrag:g}){let x=Qe(),_=(0,B.useRef)(null),{userSelectionActive:E,lib:w,connectionInProgress:N}=we(HD,je),k=Gs(f),D=(0,B.useRef)();LD(_);let z=(0,B.useCallback)(P=>{p?.({x:P[0],y:P[1],zoom:P[2]}),y||x.setState({transform:P})},[p,y]);return(0,B.useEffect)(()=>{if(_.current){D.current=i_({domNode:_.current,minZoom:c,maxZoom:d,translateExtent:u,viewport:s,onDraggingChange:M=>x.setState(O=>O.paneDragging===M?O:{paneDragging:M}),onPanZoomStart:(M,O)=>{let{onViewportChangeStart:R,onMoveStart:L}=x.getState();L?.(M,O),R?.(O)},onPanZoom:(M,O)=>{let{onViewportChange:R,onMove:L}=x.getState();L?.(M,O),R?.(O)},onPanZoomEnd:(M,O)=>{let{onViewportChangeEnd:R,onMoveEnd:L}=x.getState();L?.(M,O),R?.(O)}});let{x:P,y:T,zoom:A}=D.current.getViewport();return x.setState({panZoom:D.current,transform:[P,T,A],domNode:_.current.closest(".react-flow")}),()=>{D.current?.destroy()}}},[]),(0,B.useEffect)(()=>{D.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:o,panOnScrollSpeed:i,panOnScrollMode:a,zoomOnDoubleClick:l,panOnDrag:r,zoomActivationKeyPressed:k,preventScrolling:h,noPanClassName:S,userSelectionActive:E,noWheelClassName:b,lib:w,onTransformChange:z,connectionInProgress:N,selectionOnDrag:g,paneClickDistance:m})},[e,t,n,o,i,a,l,r,k,h,S,E,b,w,z,N,g,m]),(0,H.jsx)("div",{className:"react-flow__renderer",ref:_,style:zf,children:v})}var kD=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function GD(){let{userSelectionActive:e,userSelectionRect:t}=we(kD,je);return e&&t?(0,H.jsx)("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}var Nh=(e,t)=>n=>{n.target===t.current&&e?.(n)},PD=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function UD({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Ta.Full,panOnDrag:o,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:l,onSelectionEnd:r,onPaneClick:s,onPaneContextMenu:u,onPaneScroll:c,onPaneMouseEnter:d,onPaneMouseMove:f,onPaneMouseLeave:h,children:v}){let b=Qe(),{userSelectionActive:S,elementsSelectable:p,dragging:y,connectionInProgress:m}=we(PD,je),g=p&&(e||S),x=(0,B.useRef)(null),_=(0,B.useRef)(),E=(0,B.useRef)(new Set),w=(0,B.useRef)(new Set),N=(0,B.useRef)(!1),k=R=>{if(N.current||m){N.current=!1;return}s?.(R),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},D=R=>{if(Array.isArray(o)&&o?.includes(2)){R.preventDefault();return}u?.(R)},z=c?R=>c(R):void 0,P=R=>{N.current&&(R.stopPropagation(),N.current=!1)},T=R=>{let{domNode:L}=b.getState();if(_.current=L?.getBoundingClientRect(),!_.current)return;let V=R.target===x.current;if(!V&&!!R.target.closest(".nokey")||!e||!(a&&V||t)||R.button!==0||!R.isPrimary)return;R.target?.setPointerCapture?.(R.pointerId),N.current=!1;let{x:q,y:j}=Zn(R.nativeEvent,_.current);b.setState({userSelectionRect:{width:0,height:0,startX:q,startY:j,x:q,y:j}}),V||(R.stopPropagation(),R.preventDefault())},A=R=>{let{userSelectionRect:L,transform:V,nodeLookup:G,edgeLookup:I,connectionLookup:q,triggerNodeChanges:j,triggerEdgeChanges:$,defaultEdgeOptions:fe,resetSelectedElements:J}=b.getState();if(!_.current||!L)return;let{x:X,y:Q}=Zn(R.nativeEvent,_.current),{startX:ye,startY:me}=L;if(!N.current){let Se=t?0:i;if(Math.hypot(X-ye,Q-me)<=Se)return;J(),l?.(R)}N.current=!0;let ee={startX:ye,startY:me,x:X<ye?X:ye,y:Q<me?Q:me,width:Math.abs(X-ye),height:Math.abs(Q-me)},ae=E.current,se=w.current;E.current=new Set(hf(G,ee,V,n===Ta.Partial,!0).map(Se=>Se.id)),w.current=new Set;let de=fe?.selectable??!0;for(let Se of E.current){let Ae=q.get(Se);if(Ae)for(let{edgeId:rt}of Ae.values()){let Nt=I.get(rt);Nt&&(Nt.selectable??de)&&w.current.add(rt)}}if(!dh(ae,E.current)){let Se=Zl(G,E.current,!0);j(Se)}if(!dh(se,w.current)){let Se=Zl(I,w.current);$(Se)}b.setState({userSelectionRect:ee,userSelectionActive:!0,nodesSelectionActive:!1})},M=R=>{R.button===0&&(R.target?.releasePointerCapture?.(R.pointerId),!S&&R.target===x.current&&b.getState().userSelectionRect&&k?.(R),b.setState({userSelectionActive:!1,userSelectionRect:null}),N.current&&(r?.(R),b.setState({nodesSelectionActive:E.current.size>0})))},O=o===!0||Array.isArray(o)&&o.includes(0);return(0,H.jsxs)("div",{className:nt(["react-flow__pane",{draggable:O,dragging:y,selection:e}]),onClick:g?void 0:Nh(k,x),onContextMenu:Nh(D,x),onWheel:Nh(z,x),onPointerEnter:g?void 0:d,onPointerMove:g?A:f,onPointerUp:g?M:void 0,onPointerDownCapture:g?T:void 0,onClickCapture:g?P:void 0,onPointerLeave:h,ref:x,style:zf,children:[v,(0,H.jsx)(GD,{})]})}function wh({id:e,store:t,unselect:n=!1,nodeRef:o}){let{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:l,nodeLookup:r,onError:s}=t.getState(),u=r.get(e);if(!u){s?.("012",Mn.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&l)&&(a({nodes:[u],edges:[]}),requestAnimationFrame(()=>o?.current?.blur())):i([e])}function eE({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:i,isSelectable:a,nodeClickDistance:l}){let r=Qe(),[s,u]=(0,B.useState)(!1),c=(0,B.useRef)();return(0,B.useEffect)(()=>{c.current=Qx({getStoreItems:()=>r.getState(),onNodeMouseDown:d=>{wh({id:d,store:r,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),(0,B.useEffect)(()=>{if(!(t||!e.current||!c.current))return c.current.update({noDragClassName:n,handleSelector:o,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:l}),()=>{c.current?.destroy()}},[n,o,t,a,e,i,l]),s}var ID=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function tE(){let e=Qe();return(0,B.useCallback)(n=>{let{nodeExtent:o,snapToGrid:i,snapGrid:a,nodesDraggable:l,onError:r,updateNodePositions:s,nodeLookup:u,nodeOrigin:c}=e.getState(),d=new Map,f=ID(l),h=i?a[0]:5,v=i?a[1]:5,b=n.direction.x*h*n.factor,S=n.direction.y*v*n.factor;for(let[,p]of u){if(!f(p))continue;let y={x:p.internals.positionAbsolute.x+b,y:p.internals.positionAbsolute.y+S};i&&(y=Vl(y,a));let{position:m,positionAbsolute:g}=lh({nodeId:p.id,nextPosition:y,nodeLookup:u,nodeExtent:o,nodeOrigin:c,onError:r});p.position=m,p.internals.positionAbsolute=g,d.set(p.id,p)}s(d)},[])}var Mh=(0,B.createContext)(null),VD=Mh.Provider;Mh.Consumer;var nE=()=>(0,B.useContext)(Mh),YD=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),XD=(e,t,n)=>o=>{let{connectionClickStartHandle:i,connectionMode:a,connection:l}=o,{fromHandle:r,toHandle:s,isValid:u}=l,c=s?.nodeId===e&&s?.id===t&&s?.type===n;return{connectingFrom:r?.nodeId===e&&r?.id===t&&r?.type===n,connectingTo:c,clickConnecting:i?.nodeId===e&&i?.id===t&&i?.type===n,isPossibleEndHandle:a===Vi.Strict?r?.type!==n:e!==r?.nodeId||t!==r?.id,connectionInProcess:!!r,clickConnectionInProcess:!!i,valid:c&&u}};function qD({type:e="source",position:t=W.Top,isValidConnection:n,isConnectable:o=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:l,onConnect:r,children:s,className:u,onMouseDown:c,onTouchStart:d,...f},h){let v=l||null,b=e==="target",S=Qe(),p=nE(),{connectOnClick:y,noPanClassName:m,rfId:g}=we(YD,je),{connectingFrom:x,connectingTo:_,clickConnecting:E,isPossibleEndHandle:w,connectionInProcess:N,clickConnectionInProcess:k,valid:D}=we(XD(p,v,e),je);p||S.getState().onError?.("010",Mn.error010());let z=A=>{let{defaultEdgeOptions:M,onConnect:O,hasDefaultEdges:R}=S.getState(),L={...M,...A};if(R){let{edges:V,setEdges:G}=S.getState();G(yh(L,V))}O?.(L),r?.(L)},P=A=>{if(!p)return;let M=hh(A.nativeEvent);if(i&&(M&&A.button===0||!M)){let O=S.getState();Nf.onPointerDown(A.nativeEvent,{handleDomNode:A.currentTarget,autoPanOnConnect:O.autoPanOnConnect,connectionMode:O.connectionMode,connectionRadius:O.connectionRadius,domNode:O.domNode,nodeLookup:O.nodeLookup,lib:O.lib,isTarget:b,handleId:v,nodeId:p,flowId:O.rfId,panBy:O.panBy,cancelConnection:O.cancelConnection,onConnectStart:O.onConnectStart,onConnectEnd:(...R)=>S.getState().onConnectEnd?.(...R),updateConnection:O.updateConnection,onConnect:z,isValidConnection:n||((...R)=>S.getState().isValidConnection?.(...R)??!0),getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:O.autoPanSpeed,dragThreshold:O.connectionDragThreshold})}M?c?.(A):d?.(A)},T=A=>{let{onClickConnectStart:M,onClickConnectEnd:O,connectionClickStartHandle:R,connectionMode:L,isValidConnection:V,lib:G,rfId:I,nodeLookup:q,connection:j}=S.getState();if(!p||!R&&!i)return;if(!R){M?.(A.nativeEvent,{nodeId:p,handleId:v,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:p,type:e,id:v}});return}let $=ph(A.target),fe=n||V,{connection:J,isValid:X}=Nf.isValid(A.nativeEvent,{handle:{nodeId:p,id:v,type:e},connectionMode:L,fromNodeId:R.nodeId,fromHandleId:R.id||null,fromType:R.type,isValidConnection:fe,flowId:I,doc:$,lib:G,nodeLookup:q});X&&J&&z(J);let Q=structuredClone(j);delete Q.inProgress,Q.toPosition=Q.toHandle?Q.toHandle.position:null,O?.(A,Q),S.setState({connectionClickStartHandle:null})};return(0,H.jsx)("div",{"data-handleid":v,"data-nodeid":p,"data-handlepos":t,"data-id":`${g}-${p}-${v}-${e}`,className:nt(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",m,u,{source:!b,target:b,connectable:o,connectablestart:i,connectableend:a,clickconnecting:E,connectingfrom:x,connectingto:_,valid:D,connectionindicator:o&&(!N||w)&&(N||k?a:i)}]),onMouseDown:P,onTouchStart:P,onClick:y?T:void 0,ref:h,...f,children:s})}var Aa=(0,B.memo)(W_(qD));function ZD({data:e,isConnectable:t,sourcePosition:n=W.Bottom}){return(0,H.jsxs)(H.Fragment,{children:[e?.label,(0,H.jsx)(Aa,{type:"source",position:n,isConnectable:t})]})}function jD({data:e,isConnectable:t,targetPosition:n=W.Top,sourcePosition:o=W.Bottom}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Aa,{type:"target",position:n,isConnectable:t}),e?.label,(0,H.jsx)(Aa,{type:"source",position:o,isConnectable:t})]})}function $D(){return null}function KD({data:e,isConnectable:t,targetPosition:n=W.Top}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Aa,{type:"target",position:n,isConnectable:t}),e?.label]})}var Df={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},L_={input:ZD,default:jD,output:KD,group:$D};function QD(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}var FD=e=>{let{width:t,height:n,x:o,y:i}=Ul(e.nodeLookup,{filter:a=>!!a.selected});return{width:qn(t)?t:null,height:qn(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${i}px)`}};function WD({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let o=Qe(),{width:i,height:a,transformString:l,userSelectionActive:r}=we(FD,je),s=tE(),u=(0,B.useRef)(null);(0,B.useEffect)(()=>{n||u.current?.focus({preventScroll:!0})},[n]);let c=!r&&i!==null&&a!==null;if(eE({nodeRef:u,disabled:!c}),!c)return null;let d=e?h=>{let v=o.getState().nodes.filter(b=>b.selected);e(h,v)}:void 0,f=h=>{Object.prototype.hasOwnProperty.call(Df,h.key)&&(h.preventDefault(),s({direction:Df[h.key],factor:h.shiftKey?4:1}))};return(0,H.jsx)("div",{className:nt(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:(0,H.jsx)("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:f,style:{width:i,height:a}})})}var H_=typeof window<"u"?window:void 0,JD=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function oE({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,paneClickDistance:r,deleteKeyCode:s,selectionKeyCode:u,selectionOnDrag:c,selectionMode:d,onSelectionStart:f,onSelectionEnd:h,multiSelectionKeyCode:v,panActivationKeyCode:b,zoomActivationKeyCode:S,elementsSelectable:p,zoomOnScroll:y,zoomOnPinch:m,panOnScroll:g,panOnScrollSpeed:x,panOnScrollMode:_,zoomOnDoubleClick:E,panOnDrag:w,defaultViewport:N,translateExtent:k,minZoom:D,maxZoom:z,preventScrolling:P,onSelectionContextMenu:T,noWheelClassName:A,noPanClassName:M,disableKeyboardA11y:O,onViewportChange:R,isControlledViewport:L}){let{nodesSelectionActive:V,userSelectionActive:G}=we(JD,je),I=Gs(u,{target:H_}),q=Gs(b,{target:H_}),j=q||w,$=q||g,fe=c&&j!==!0,J=I||G||fe;return zD({deleteKeyCode:s,multiSelectionKeyCode:v}),(0,H.jsx)(BD,{onPaneContextMenu:a,elementsSelectable:p,zoomOnScroll:y,zoomOnPinch:m,panOnScroll:$,panOnScrollSpeed:x,panOnScrollMode:_,zoomOnDoubleClick:E,panOnDrag:!I&&j,defaultViewport:N,translateExtent:k,minZoom:D,maxZoom:z,zoomActivationKeyCode:S,preventScrolling:P,noWheelClassName:A,noPanClassName:M,onViewportChange:R,isControlledViewport:L,paneClickDistance:r,selectionOnDrag:fe,children:(0,H.jsxs)(UD,{onSelectionStart:f,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,panOnDrag:j,isSelecting:!!J,selectionMode:d,selectionKeyPressed:I,paneClickDistance:r,selectionOnDrag:fe,children:[e,V&&(0,H.jsx)(WD,{onSelectionContextMenu:T,noPanClassName:M,disableKeyboardA11y:O})]})})}oE.displayName="FlowRenderer";var eR=(0,B.memo)(oE),tR=e=>t=>e?hf(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function nR(e){return we((0,B.useCallback)(tR(e),[e]),je)}var oR=e=>e.updateNodeInternals;function iR(){let e=we(oR),[t]=(0,B.useState)(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{let o=new Map;n.forEach(i=>{let a=i.target.getAttribute("data-id");o.set(a,{id:a,nodeElement:i.target,force:!0})}),e(o)}));return(0,B.useEffect)(()=>()=>{t?.disconnect()},[t]),t}function aR({node:e,nodeType:t,hasDimensions:n,resizeObserver:o}){let i=Qe(),a=(0,B.useRef)(null),l=(0,B.useRef)(null),r=(0,B.useRef)(e.sourcePosition),s=(0,B.useRef)(e.targetPosition),u=(0,B.useRef)(t),c=n&&!!e.internals.handleBounds;return(0,B.useEffect)(()=>{a.current&&!e.hidden&&(!c||l.current!==a.current)&&(l.current&&o?.unobserve(l.current),o?.observe(a.current),l.current=a.current)},[c,e.hidden]),(0,B.useEffect)(()=>()=>{l.current&&(o?.unobserve(l.current),l.current=null)},[]),(0,B.useEffect)(()=>{if(a.current){let d=u.current!==t,f=r.current!==e.sourcePosition,h=s.current!==e.targetPosition;(d||f||h)&&(u.current=t,r.current=e.sourcePosition,s.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function lR({id:e,onClick:t,onMouseEnter:n,onMouseMove:o,onMouseLeave:i,onContextMenu:a,onDoubleClick:l,nodesDraggable:r,elementsSelectable:s,nodesConnectable:u,nodesFocusable:c,resizeObserver:d,noDragClassName:f,noPanClassName:h,disableKeyboardA11y:v,rfId:b,nodeTypes:S,nodeClickDistance:p,onError:y}){let{node:m,internals:g,isParent:x}=we(X=>{let Q=X.nodeLookup.get(e),ye=X.parentLookup.has(e);return{node:Q,internals:Q.internals,isParent:ye}},je),_=m.type||"default",E=S?.[_]||L_[_];E===void 0&&(y?.("003",Mn.error003(_)),_="default",E=S?.default||L_.default);let w=!!(m.draggable||r&&typeof m.draggable>"u"),N=!!(m.selectable||s&&typeof m.selectable>"u"),k=!!(m.connectable||u&&typeof m.connectable>"u"),D=!!(m.focusable||c&&typeof m.focusable>"u"),z=Qe(),P=ch(m),T=aR({node:m,nodeType:_,hasDimensions:P,resizeObserver:d}),A=eE({nodeRef:T,disabled:m.hidden||!w,noDragClassName:f,handleSelector:m.dragHandle,nodeId:e,isSelectable:N,nodeClickDistance:p}),M=tE();if(m.hidden)return null;let O=_o(m),R=QD(m),L=N||w||t||n||o||i,V=n?X=>n(X,{...g.userNode}):void 0,G=o?X=>o(X,{...g.userNode}):void 0,I=i?X=>i(X,{...g.userNode}):void 0,q=a?X=>a(X,{...g.userNode}):void 0,j=l?X=>l(X,{...g.userNode}):void 0,$=X=>{let{selectNodesOnDrag:Q,nodeDragThreshold:ye}=z.getState();N&&(!Q||!w||ye>0)&&wh({id:e,store:z,nodeRef:T}),t&&t(X,{...g.userNode})},fe=X=>{if(!(mh(X.nativeEvent)||v)){if(Jm.includes(X.key)&&N){let Q=X.key==="Escape";wh({id:e,store:z,unselect:Q,nodeRef:T})}else if(w&&m.selected&&Object.prototype.hasOwnProperty.call(Df,X.key)){X.preventDefault();let{ariaLabelConfig:Q}=z.getState();z.setState({ariaLiveMessage:Q["node.a11yDescription.ariaLiveMessage"]({direction:X.key.replace("Arrow","").toLowerCase(),x:~~g.positionAbsolute.x,y:~~g.positionAbsolute.y})}),M({direction:Df[X.key],factor:X.shiftKey?4:1})}}},J=()=>{if(v||!T.current?.matches(":focus-visible"))return;let{transform:X,width:Q,height:ye,autoPanOnNodeFocus:me,setCenter:ee}=z.getState();if(!me)return;hf(new Map([[e,m]]),{x:0,y:0,width:Q,height:ye},X,!0).length>0||ee(m.position.x+O.width/2,m.position.y+O.height/2,{zoom:X[2]})};return(0,H.jsx)("div",{className:nt(["react-flow__node",`react-flow__node-${_}`,{[h]:w},m.className,{selected:m.selected,selectable:N,parent:x,draggable:w,dragging:A}]),ref:T,style:{zIndex:g.z,transform:`translate(${g.positionAbsolute.x}px,${g.positionAbsolute.y}px)`,pointerEvents:L?"all":"none",visibility:P?"visible":"hidden",...m.style,...R},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:V,onMouseMove:G,onMouseLeave:I,onContextMenu:q,onClick:$,onDoubleClick:j,onKeyDown:D?fe:void 0,tabIndex:D?0:void 0,onFocus:D?J:void 0,role:m.ariaRole??(D?"group":void 0),"aria-roledescription":"node","aria-describedby":v?void 0:`${Z_}-${b}`,"aria-label":m.ariaLabel,...m.domAttributes,children:(0,H.jsx)(VD,{value:e,children:(0,H.jsx)(E,{id:e,data:m.data,type:_,positionAbsoluteX:g.positionAbsolute.x,positionAbsoluteY:g.positionAbsolute.y,selected:m.selected??!1,selectable:N,draggable:w,deletable:m.deletable??!0,isConnectable:k,sourcePosition:m.sourcePosition,targetPosition:m.targetPosition,dragging:A,dragHandle:m.dragHandle,zIndex:g.z,parentId:m.parentId,...O})})})}var rR=(0,B.memo)(lR),sR=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function iE(e){let{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:i,onError:a}=we(sR,je),l=nR(e.onlyRenderVisibleElements),r=iR();return(0,H.jsx)("div",{className:"react-flow__nodes",style:zf,children:l.map(s=>(0,H.jsx)(rR,{id:s,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:r,nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:a},s))})}iE.displayName="NodeRenderer";var uR=(0,B.memo)(iE);function cR(e){return we((0,B.useCallback)(n=>{if(!e)return n.edges.map(i=>i.id);let o=[];if(n.width&&n.height)for(let i of n.edges){let a=n.nodeLookup.get(i.source),l=n.nodeLookup.get(i.target);a&&l&&Ix({sourceNode:a,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&o.push(i.id)}return o},[e]),je)}var fR=({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e}};return(0,H.jsx)("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},dR=({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,H.jsx)("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},B_={[Bl.Arrow]:fR,[Bl.ArrowClosed]:dR};function pR(e){let t=Qe();return(0,B.useMemo)(()=>Object.prototype.hasOwnProperty.call(B_,e)?B_[e]:(t.getState().onError?.("009",Mn.error009(e)),null),[e])}var mR=({id:e,type:t,color:n,width:o=12.5,height:i=12.5,markerUnits:a="strokeWidth",strokeWidth:l,orient:r="auto-start-reverse"})=>{let s=pR(t);return s?(0,H.jsx)("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:r,refX:"0",refY:"0",children:(0,H.jsx)(s,{color:n,strokeWidth:l})}):null},aE=({defaultColor:e,rfId:t})=>{let n=we(a=>a.edges),o=we(a=>a.defaultEdgeOptions),i=(0,B.useMemo)(()=>Yx(n,{id:t,defaultColor:e,defaultMarkerStart:o?.markerStart,defaultMarkerEnd:o?.markerEnd}),[n,o,t,e]);return i.length?(0,H.jsx)("svg",{className:"react-flow__marker","aria-hidden":"true",children:(0,H.jsx)("defs",{children:i.map(a=>(0,H.jsx)(mR,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};aE.displayName="MarkerDefinitions";var hR=(0,B.memo)(aE);function lE({x:e,y:t,label:n,labelStyle:o,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:l=[2,4],labelBgBorderRadius:r=2,children:s,className:u,...c}){let[d,f]=(0,B.useState)({x:1,y:0,width:0,height:0}),h=nt(["react-flow__edge-textwrapper",u]),v=(0,B.useRef)(null);return(0,B.useEffect)(()=>{if(v.current){let b=v.current.getBBox();f({x:b.x,y:b.y,width:b.width,height:b.height})}},[n]),n?(0,H.jsxs)("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:h,visibility:d.width?"visible":"hidden",...c,children:[i&&(0,H.jsx)("rect",{width:d.width+2*l[0],x:-l[0],y:-l[1],height:d.height+2*l[1],className:"react-flow__edge-textbg",style:a,rx:r,ry:r}),(0,H.jsx)("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:v,style:o,children:n}),s]}):null}lE.displayName="EdgeText";var gR=(0,B.memo)(lE);function Lf({path:e,labelX:t,labelY:n,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:r,labelBgBorderRadius:s,interactionWidth:u=20,...c}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("path",{...c,d:e,fill:"none",className:nt(["react-flow__edge-path",c.className])}),u?(0,H.jsx)("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,o&&qn(t)&&qn(n)?(0,H.jsx)(gR,{x:t,y:n,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:r,labelBgBorderRadius:s}):null]})}function k_({pos:e,x1:t,y1:n,x2:o,y2:i}){return e===W.Left||e===W.Right?[.5*(t+o),n]:[t,.5*(n+i)]}function rE({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top}){let[l,r]=k_({pos:n,x1:e,y1:t,x2:o,y2:i}),[s,u]=k_({pos:a,x1:o,y1:i,x2:e,y2:t}),[c,d,f,h]=bf({sourceX:e,sourceY:t,targetX:o,targetY:i,sourceControlX:l,sourceControlY:r,targetControlX:s,targetControlY:u});return[`M${e},${t} C${l},${r} ${s},${u} ${o},${i}`,c,d,f,h]}function sE(e){return(0,B.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,sourcePosition:l,targetPosition:r,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:v,markerEnd:b,markerStart:S,interactionWidth:p})=>{let[y,m,g]=rE({sourceX:n,sourceY:o,sourcePosition:l,targetX:i,targetY:a,targetPosition:r}),x=e.isInternal?void 0:t;return(0,H.jsx)(Lf,{id:x,path:y,labelX:m,labelY:g,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:v,markerEnd:b,markerStart:S,interactionWidth:p})})}var yR=sE({isInternal:!1}),uE=sE({isInternal:!0});yR.displayName="SimpleBezierEdge";uE.displayName="SimpleBezierEdgeInternal";function cE(e){return(0,B.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,sourcePosition:h=W.Bottom,targetPosition:v=W.Top,markerEnd:b,markerStart:S,pathOptions:p,interactionWidth:y})=>{let[m,g,x]=ks({sourceX:n,sourceY:o,sourcePosition:h,targetX:i,targetY:a,targetPosition:v,borderRadius:p?.borderRadius,offset:p?.offset,stepPosition:p?.stepPosition}),_=e.isInternal?void 0:t;return(0,H.jsx)(Lf,{id:_,path:m,labelX:g,labelY:x,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:b,markerStart:S,interactionWidth:y})})}var fE=cE({isInternal:!1}),dE=cE({isInternal:!0});fE.displayName="SmoothStepEdge";dE.displayName="SmoothStepEdgeInternal";function pE(e){return(0,B.memo)(({id:t,...n})=>{let o=e.isInternal?void 0:t;return(0,H.jsx)(fE,{...n,id:o,pathOptions:(0,B.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var vR=pE({isInternal:!1}),mE=pE({isInternal:!0});vR.displayName="StepEdge";mE.displayName="StepEdgeInternal";function hE(e){return(0,B.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:v,interactionWidth:b})=>{let[S,p,y]=xf({sourceX:n,sourceY:o,targetX:i,targetY:a}),m=e.isInternal?void 0:t;return(0,H.jsx)(Lf,{id:m,path:S,labelX:p,labelY:y,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:v,interactionWidth:b})})}var bR=hE({isInternal:!1}),gE=hE({isInternal:!0});bR.displayName="StraightEdge";gE.displayName="StraightEdgeInternal";function yE(e){return(0,B.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,sourcePosition:l=W.Bottom,targetPosition:r=W.Top,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:v,markerEnd:b,markerStart:S,pathOptions:p,interactionWidth:y})=>{let[m,g,x]=Sf({sourceX:n,sourceY:o,sourcePosition:l,targetX:i,targetY:a,targetPosition:r,curvature:p?.curvature}),_=e.isInternal?void 0:t;return(0,H.jsx)(Lf,{id:_,path:m,labelX:g,labelY:x,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:v,markerEnd:b,markerStart:S,interactionWidth:y})})}var SR=yE({isInternal:!1}),vE=yE({isInternal:!0});SR.displayName="BezierEdge";vE.displayName="BezierEdgeInternal";var G_={default:vE,straight:gE,step:mE,smoothstep:dE,simplebezier:uE},P_={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},xR=(e,t,n)=>n===W.Left?e-t:n===W.Right?e+t:e,_R=(e,t,n)=>n===W.Top?e-t:n===W.Bottom?e+t:e,U_="react-flow__edgeupdater";function I_({position:e,centerX:t,centerY:n,radius:o=10,onMouseDown:i,onMouseEnter:a,onMouseOut:l,type:r}){return(0,H.jsx)("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:l,className:nt([U_,`${U_}-${r}`]),cx:xR(t,o,e),cy:_R(n,o,e),r:o,stroke:"transparent",fill:"transparent"})}function ER({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:o,sourceY:i,targetX:a,targetY:l,sourcePosition:r,targetPosition:s,onReconnect:u,onReconnectStart:c,onReconnectEnd:d,setReconnecting:f,setUpdateHover:h}){let v=Qe(),b=(g,x)=>{if(g.button!==0)return;let{autoPanOnConnect:_,domNode:E,connectionMode:w,connectionRadius:N,lib:k,onConnectStart:D,cancelConnection:z,nodeLookup:P,rfId:T,panBy:A,updateConnection:M}=v.getState(),O=x.type==="target",R=(G,I)=>{f(!1),d?.(G,n,x.type,I)},L=G=>u?.(n,G),V=(G,I)=>{f(!0),c?.(g,n,x.type),D?.(G,I)};Nf.onPointerDown(g.nativeEvent,{autoPanOnConnect:_,connectionMode:w,connectionRadius:N,domNode:E,handleId:x.id,nodeId:x.nodeId,nodeLookup:P,isTarget:O,edgeUpdaterType:x.type,lib:k,flowId:T,cancelConnection:z,panBy:A,isValidConnection:(...G)=>v.getState().isValidConnection?.(...G)??!0,onConnect:L,onConnectStart:V,onConnectEnd:(...G)=>v.getState().onConnectEnd?.(...G),onReconnectEnd:R,updateConnection:M,getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,dragThreshold:v.getState().connectionDragThreshold,handleDomNode:g.currentTarget})},S=g=>b(g,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),p=g=>b(g,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),y=()=>h(!0),m=()=>h(!1);return(0,H.jsxs)(H.Fragment,{children:[(e===!0||e==="source")&&(0,H.jsx)(I_,{position:r,centerX:o,centerY:i,radius:t,onMouseDown:S,onMouseEnter:y,onMouseOut:m,type:"source"}),(e===!0||e==="target")&&(0,H.jsx)(I_,{position:s,centerX:a,centerY:l,radius:t,onMouseDown:p,onMouseEnter:y,onMouseOut:m,type:"target"})]})}function TR({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:o,onClick:i,onDoubleClick:a,onContextMenu:l,onMouseEnter:r,onMouseMove:s,onMouseLeave:u,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:h,rfId:v,edgeTypes:b,noPanClassName:S,onError:p,disableKeyboardA11y:y}){let m=we(ee=>ee.edgeLookup.get(e)),g=we(ee=>ee.defaultEdgeOptions);m=g?{...g,...m}:m;let x=m.type||"default",_=b?.[x]||G_[x];_===void 0&&(p?.("011",Mn.error011(x)),x="default",_=b?.default||G_.default);let E=!!(m.focusable||t&&typeof m.focusable>"u"),w=typeof d<"u"&&(m.reconnectable||n&&typeof m.reconnectable>"u"),N=!!(m.selectable||o&&typeof m.selectable>"u"),k=(0,B.useRef)(null),[D,z]=(0,B.useState)(!1),[P,T]=(0,B.useState)(!1),A=Qe(),{zIndex:M,sourceX:O,sourceY:R,targetX:L,targetY:V,sourcePosition:G,targetPosition:I}=we((0,B.useCallback)(ee=>{let ae=ee.nodeLookup.get(m.source),se=ee.nodeLookup.get(m.target);if(!ae||!se)return{zIndex:m.zIndex,...P_};let de=Vx({id:e,sourceNode:ae,targetNode:se,sourceHandle:m.sourceHandle||null,targetHandle:m.targetHandle||null,connectionMode:ee.connectionMode,onError:p});return{zIndex:Ux({selected:m.selected,zIndex:m.zIndex,sourceNode:ae,targetNode:se,elevateOnSelect:ee.elevateEdgesOnSelect,zIndexMode:ee.zIndexMode}),...de||P_}},[m.source,m.target,m.sourceHandle,m.targetHandle,m.selected,m.zIndex]),je),q=(0,B.useMemo)(()=>m.markerStart?`url('#${_f(m.markerStart,v)}')`:void 0,[m.markerStart,v]),j=(0,B.useMemo)(()=>m.markerEnd?`url('#${_f(m.markerEnd,v)}')`:void 0,[m.markerEnd,v]);if(m.hidden||O===null||R===null||L===null||V===null)return null;let $=ee=>{let{addSelectedEdges:ae,unselectNodesAndEdges:se,multiSelectionActive:de}=A.getState();N&&(A.setState({nodesSelectionActive:!1}),m.selected&&de?(se({nodes:[],edges:[m]}),k.current?.blur()):ae([e])),i&&i(ee,m)},fe=a?ee=>{a(ee,{...m})}:void 0,J=l?ee=>{l(ee,{...m})}:void 0,X=r?ee=>{r(ee,{...m})}:void 0,Q=s?ee=>{s(ee,{...m})}:void 0,ye=u?ee=>{u(ee,{...m})}:void 0,me=ee=>{if(!y&&Jm.includes(ee.key)&&N){let{unselectNodesAndEdges:ae,addSelectedEdges:se}=A.getState();ee.key==="Escape"?(k.current?.blur(),ae({edges:[m]})):se([e])}};return(0,H.jsx)("svg",{style:{zIndex:M},children:(0,H.jsxs)("g",{className:nt(["react-flow__edge",`react-flow__edge-${x}`,m.className,S,{selected:m.selected,animated:m.animated,inactive:!N&&!i,updating:D,selectable:N}]),onClick:$,onDoubleClick:fe,onContextMenu:J,onMouseEnter:X,onMouseMove:Q,onMouseLeave:ye,onKeyDown:E?me:void 0,tabIndex:E?0:void 0,role:m.ariaRole??(E?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":m.ariaLabel===null?void 0:m.ariaLabel||`Edge from ${m.source} to ${m.target}`,"aria-describedby":E?`${j_}-${v}`:void 0,ref:k,...m.domAttributes,children:[!P&&(0,H.jsx)(_,{id:e,source:m.source,target:m.target,type:m.type,selected:m.selected,animated:m.animated,selectable:N,deletable:m.deletable??!0,label:m.label,labelStyle:m.labelStyle,labelShowBg:m.labelShowBg,labelBgStyle:m.labelBgStyle,labelBgPadding:m.labelBgPadding,labelBgBorderRadius:m.labelBgBorderRadius,sourceX:O,sourceY:R,targetX:L,targetY:V,sourcePosition:G,targetPosition:I,data:m.data,style:m.style,sourceHandleId:m.sourceHandle,targetHandleId:m.targetHandle,markerStart:q,markerEnd:j,pathOptions:"pathOptions"in m?m.pathOptions:void 0,interactionWidth:m.interactionWidth}),w&&(0,H.jsx)(ER,{edge:m,isReconnectable:w,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:h,sourceX:O,sourceY:R,targetX:L,targetY:V,sourcePosition:G,targetPosition:I,setUpdateHover:z,setReconnecting:T})]})})}var NR=(0,B.memo)(TR),CR=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function bE({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:o,noPanClassName:i,onReconnect:a,onEdgeContextMenu:l,onEdgeMouseEnter:r,onEdgeMouseMove:s,onEdgeMouseLeave:u,onEdgeClick:c,reconnectRadius:d,onEdgeDoubleClick:f,onReconnectStart:h,onReconnectEnd:v,disableKeyboardA11y:b}){let{edgesFocusable:S,edgesReconnectable:p,elementsSelectable:y,onError:m}=we(CR,je),g=cR(t);return(0,H.jsxs)("div",{className:"react-flow__edges",children:[(0,H.jsx)(hR,{defaultColor:e,rfId:n}),g.map(x=>(0,H.jsx)(NR,{id:x,edgesFocusable:S,edgesReconnectable:p,elementsSelectable:y,noPanClassName:i,onReconnect:a,onContextMenu:l,onMouseEnter:r,onMouseMove:s,onMouseLeave:u,onClick:c,reconnectRadius:d,onDoubleClick:f,onReconnectStart:h,onReconnectEnd:v,rfId:n,onError:m,edgeTypes:o,disableKeyboardA11y:b},x))]})}bE.displayName="EdgeRenderer";var wR=(0,B.memo)(bE),AR=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function MR({children:e}){let t=we(AR);return(0,H.jsx)("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function DR(e){let t=Ah(),n=(0,B.useRef)(!1);(0,B.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var RR=e=>e.panZoom?.syncViewport;function OR(e){let t=we(RR),n=Qe();return(0,B.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function V_(e){return e.connection.inProgress?{...e.connection,to:Yl(e.connection.to,e.transform)}:{...e.connection}}function zR(e){return e?n=>{let o=V_(n);return e(o)}:V_}function LR(e){let t=zR(e);return we(t,je)}var HR=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function BR({containerStyle:e,style:t,type:n,component:o}){let{nodesConnectable:i,width:a,height:l,isValid:r,inProgress:s}=we(HR,je);return!(a&&i&&s)?null:(0,H.jsx)("svg",{style:e,width:a,height:l,className:"react-flow__connectionline react-flow__container",children:(0,H.jsx)("g",{className:nt(["react-flow__connection",nh(r)]),children:(0,H.jsx)(SE,{style:t,type:n,CustomComponent:o,isValid:r})})})}var SE=({style:e,type:t=xo.Bezier,CustomComponent:n,isValid:o})=>{let{inProgress:i,from:a,fromNode:l,fromHandle:r,fromPosition:s,to:u,toNode:c,toHandle:d,toPosition:f,pointer:h}=LR();if(!i)return;if(n)return(0,H.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:l,fromHandle:r,fromX:a.x,fromY:a.y,toX:u.x,toY:u.y,fromPosition:s,toPosition:f,connectionStatus:nh(o),toNode:c,toHandle:d,pointer:h});let v="",b={sourceX:a.x,sourceY:a.y,sourcePosition:s,targetX:u.x,targetY:u.y,targetPosition:f};switch(t){case xo.Bezier:[v]=Sf(b);break;case xo.SimpleBezier:[v]=rE(b);break;case xo.Step:[v]=ks({...b,borderRadius:0});break;case xo.SmoothStep:[v]=ks(b);break;default:[v]=xf(b)}return(0,H.jsx)("path",{d:v,fill:"none",className:"react-flow__connection-path",style:e})};SE.displayName="ConnectionLine";var kR={};function Y_(e=kR){let t=(0,B.useRef)(e),n=Qe();(0,B.useEffect)(()=>{},[e])}function GR(){let e=Qe(),t=(0,B.useRef)(!1);(0,B.useEffect)(()=>{},[])}function xE({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:o,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:l,onNodeMouseEnter:r,onNodeMouseMove:s,onNodeMouseLeave:u,onNodeContextMenu:c,onSelectionContextMenu:d,onSelectionStart:f,onSelectionEnd:h,connectionLineType:v,connectionLineStyle:b,connectionLineComponent:S,connectionLineContainerStyle:p,selectionKeyCode:y,selectionOnDrag:m,selectionMode:g,multiSelectionKeyCode:x,panActivationKeyCode:_,zoomActivationKeyCode:E,deleteKeyCode:w,onlyRenderVisibleElements:N,elementsSelectable:k,defaultViewport:D,translateExtent:z,minZoom:P,maxZoom:T,preventScrolling:A,defaultMarkerColor:M,zoomOnScroll:O,zoomOnPinch:R,panOnScroll:L,panOnScrollSpeed:V,panOnScrollMode:G,zoomOnDoubleClick:I,panOnDrag:q,onPaneClick:j,onPaneMouseEnter:$,onPaneMouseMove:fe,onPaneMouseLeave:J,onPaneScroll:X,onPaneContextMenu:Q,paneClickDistance:ye,nodeClickDistance:me,onEdgeContextMenu:ee,onEdgeMouseEnter:ae,onEdgeMouseMove:se,onEdgeMouseLeave:de,reconnectRadius:Se,onReconnect:Ae,onReconnectStart:rt,onReconnectEnd:Nt,noDragClassName:Ct,noWheelClassName:st,noPanClassName:mn,disableKeyboardA11y:Wt,nodeExtent:$n,rfId:Pt,viewport:it,onViewportChange:ut}){return Y_(e),Y_(t),GR(),DR(n),OR(it),(0,H.jsx)(eR,{onPaneClick:j,onPaneMouseEnter:$,onPaneMouseMove:fe,onPaneMouseLeave:J,onPaneContextMenu:Q,onPaneScroll:X,paneClickDistance:ye,deleteKeyCode:w,selectionKeyCode:y,selectionOnDrag:m,selectionMode:g,onSelectionStart:f,onSelectionEnd:h,multiSelectionKeyCode:x,panActivationKeyCode:_,zoomActivationKeyCode:E,elementsSelectable:k,zoomOnScroll:O,zoomOnPinch:R,zoomOnDoubleClick:I,panOnScroll:L,panOnScrollSpeed:V,panOnScrollMode:G,panOnDrag:q,defaultViewport:D,translateExtent:z,minZoom:P,maxZoom:T,onSelectionContextMenu:d,preventScrolling:A,noDragClassName:Ct,noWheelClassName:st,noPanClassName:mn,disableKeyboardA11y:Wt,onViewportChange:ut,isControlledViewport:!!it,children:(0,H.jsxs)(MR,{children:[(0,H.jsx)(wR,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:l,onReconnect:Ae,onReconnectStart:rt,onReconnectEnd:Nt,onlyRenderVisibleElements:N,onEdgeContextMenu:ee,onEdgeMouseEnter:ae,onEdgeMouseMove:se,onEdgeMouseLeave:de,reconnectRadius:Se,defaultMarkerColor:M,noPanClassName:mn,disableKeyboardA11y:Wt,rfId:Pt}),(0,H.jsx)(BR,{style:b,type:v,component:S,containerStyle:p}),(0,H.jsx)("div",{className:"react-flow__edgelabel-renderer"}),(0,H.jsx)(uR,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:a,onNodeMouseEnter:r,onNodeMouseMove:s,onNodeMouseLeave:u,onNodeContextMenu:c,nodeClickDistance:me,onlyRenderVisibleElements:N,noPanClassName:mn,noDragClassName:Ct,disableKeyboardA11y:Wt,nodeExtent:$n,rfId:Pt}),(0,H.jsx)("div",{className:"react-flow__viewport-portal"})]})})}xE.displayName="GraphView";var PR=(0,B.memo)(xE),X_=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:l,fitViewOptions:r,minZoom:s=.5,maxZoom:u=2,nodeOrigin:c,nodeExtent:d,zIndexMode:f="basic"}={})=>{let h=new Map,v=new Map,b=new Map,S=new Map,p=o??t??[],y=n??e??[],m=c??[0,0],g=d??Pl;_h(b,S,p);let x=Ef(y,h,v,{nodeOrigin:m,nodeExtent:g,zIndexMode:f}),_=[0,0,1];if(l&&i&&a){let E=Ul(h,{filter:D=>!!((D.width||D.initialWidth)&&(D.height||D.initialHeight))}),{x:w,y:N,zoom:k}=Bs(E,i,a,s,u,r?.padding??.1);_=[w,N,k]}return{rfId:"1",width:i??0,height:a??0,transform:_,nodes:y,nodesInitialized:x,nodeLookup:h,parentLookup:v,edges:p,edgeLookup:S,connectionLookup:b,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:s,maxZoom:u,translateExtent:Pl,nodeExtent:g,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Vi.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:m,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:l??!1,fitViewOptions:r,fitViewResolver:null,connection:{...th},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:uh,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:eh,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},UR=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:l,fitViewOptions:r,minZoom:s,maxZoom:u,nodeOrigin:c,nodeExtent:d,zIndexMode:f})=>x_((h,v)=>{async function b(){let{nodeLookup:S,panZoom:p,fitViewOptions:y,fitViewResolver:m,width:g,height:x,minZoom:_,maxZoom:E}=v();p&&(await Lx({nodes:S,width:g,height:x,panZoom:p,minZoom:_,maxZoom:E},y),m?.resolve(!0),h({fitViewResolver:null}))}return{...X_({nodes:e,edges:t,width:i,height:a,fitView:l,fitViewOptions:r,minZoom:s,maxZoom:u,nodeOrigin:c,nodeExtent:d,defaultNodes:n,defaultEdges:o,zIndexMode:f}),setNodes:S=>{let{nodeLookup:p,parentLookup:y,nodeOrigin:m,elevateNodesOnSelect:g,fitViewQueued:x,zIndexMode:_}=v(),E=Ef(S,p,y,{nodeOrigin:m,nodeExtent:d,elevateNodesOnSelect:g,checkEquality:!0,zIndexMode:_});x&&E?(b(),h({nodes:S,nodesInitialized:E,fitViewQueued:!1,fitViewOptions:void 0})):h({nodes:S,nodesInitialized:E})},setEdges:S=>{let{connectionLookup:p,edgeLookup:y}=v();_h(p,y,S),h({edges:S})},setDefaultNodesAndEdges:(S,p)=>{if(S){let{setNodes:y}=v();y(S),h({hasDefaultNodes:!0})}if(p){let{setEdges:y}=v();y(p),h({hasDefaultEdges:!0})}},updateNodeInternals:S=>{let{triggerNodeChanges:p,nodeLookup:y,parentLookup:m,domNode:g,nodeOrigin:x,nodeExtent:_,debug:E,fitViewQueued:w,zIndexMode:N}=v(),{changes:k,updatedInternals:D}=jx(S,y,m,g,x,_,N);D&&(qx(y,m,{nodeOrigin:x,nodeExtent:_,zIndexMode:N}),w?(b(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),k?.length>0&&(E&&console.log("React Flow: trigger node changes",k),p?.(k)))},updateNodePositions:(S,p=!1)=>{let y=[],m=[],{nodeLookup:g,triggerNodeChanges:x,connection:_,updateConnection:E,onNodesChangeMiddlewareMap:w}=v();for(let[N,k]of S){let D=g.get(N),z=!!(D?.expandParent&&D?.parentId&&k?.position),P={id:N,type:"position",position:z?{x:Math.max(0,k.position.x),y:Math.max(0,k.position.y)}:k.position,dragging:p};if(D&&_.inProgress&&_.fromNode.id===D.id){let T=Yi(D,_.fromHandle,W.Left,!0);E({..._,from:T})}z&&D.parentId&&y.push({id:N,parentId:D.parentId,rect:{...k.internals.positionAbsolute,width:k.measured.width??0,height:k.measured.height??0}}),m.push(P)}if(y.length>0){let{parentLookup:N,nodeOrigin:k}=v(),D=Tf(y,g,N,k);m.push(...D)}for(let N of w.values())m=N(m);x(m)},triggerNodeChanges:S=>{let{onNodesChange:p,setNodes:y,nodes:m,hasDefaultNodes:g,debug:x}=v();if(S?.length){if(g){let _=Q_(S,m);y(_)}x&&console.log("React Flow: trigger node changes",S),p?.(S)}},triggerEdgeChanges:S=>{let{onEdgesChange:p,setEdges:y,edges:m,hasDefaultEdges:g,debug:x}=v();if(S?.length){if(g){let _=F_(S,m);y(_)}x&&console.log("React Flow: trigger edge changes",S),p?.(S)}},addSelectedNodes:S=>{let{multiSelectionActive:p,edgeLookup:y,nodeLookup:m,triggerNodeChanges:g,triggerEdgeChanges:x}=v();if(p){let _=S.map(E=>wa(E,!0));g(_);return}g(Zl(m,new Set([...S]),!0)),x(Zl(y))},addSelectedEdges:S=>{let{multiSelectionActive:p,edgeLookup:y,nodeLookup:m,triggerNodeChanges:g,triggerEdgeChanges:x}=v();if(p){let _=S.map(E=>wa(E,!0));x(_);return}x(Zl(y,new Set([...S]))),g(Zl(m,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:p}={})=>{let{edges:y,nodes:m,nodeLookup:g,triggerNodeChanges:x,triggerEdgeChanges:_}=v(),E=S||m,w=p||y,N=[];for(let D of E){if(!D.selected)continue;let z=g.get(D.id);z&&(z.selected=!1),N.push(wa(D.id,!1))}let k=[];for(let D of w)D.selected&&k.push(wa(D.id,!1));x(N),_(k)},setMinZoom:S=>{let{panZoom:p,maxZoom:y}=v();p?.setScaleExtent([S,y]),h({minZoom:S})},setMaxZoom:S=>{let{panZoom:p,minZoom:y}=v();p?.setScaleExtent([y,S]),h({maxZoom:S})},setTranslateExtent:S=>{v().panZoom?.setTranslateExtent(S),h({translateExtent:S})},resetSelectedElements:()=>{let{edges:S,nodes:p,triggerNodeChanges:y,triggerEdgeChanges:m,elementsSelectable:g}=v();if(!g)return;let x=p.reduce((E,w)=>w.selected?[...E,wa(w.id,!1)]:E,[]),_=S.reduce((E,w)=>w.selected?[...E,wa(w.id,!1)]:E,[]);y(x),m(_)},setNodeExtent:S=>{let{nodes:p,nodeLookup:y,parentLookup:m,nodeOrigin:g,elevateNodesOnSelect:x,nodeExtent:_,zIndexMode:E}=v();S[0][0]===_[0][0]&&S[0][1]===_[0][1]&&S[1][0]===_[1][0]&&S[1][1]===_[1][1]||(Ef(p,y,m,{nodeOrigin:g,nodeExtent:S,elevateNodesOnSelect:x,checkEquality:!1,zIndexMode:E}),h({nodeExtent:S}))},panBy:S=>{let{transform:p,width:y,height:m,panZoom:g,translateExtent:x}=v();return $x({delta:S,panZoom:g,transform:p,translateExtent:x,width:y,height:m})},setCenter:async(S,p,y)=>{let{width:m,height:g,maxZoom:x,panZoom:_}=v();if(!_)return Promise.resolve(!1);let E=typeof y?.zoom<"u"?y.zoom:x;return await _.setViewport({x:m/2-S*E,y:g/2-p*E,zoom:E},{duration:y?.duration,ease:y?.ease,interpolate:y?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{h({connection:{...th}})},updateConnection:S=>{h({connection:S})},reset:()=>h({...X_()})}},Object.is);function IR({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:o,initialWidth:i,initialHeight:a,initialMinZoom:l,initialMaxZoom:r,initialFitViewOptions:s,fitView:u,nodeOrigin:c,nodeExtent:d,zIndexMode:f,children:h}){let[v]=(0,B.useState)(()=>UR({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:u,minZoom:l,maxZoom:r,fitViewOptions:s,nodeOrigin:c,nodeExtent:d,zIndexMode:f}));return(0,H.jsx)(lD,{value:v,children:(0,H.jsx)(MD,{children:h})})}function VR({children:e,nodes:t,edges:n,defaultNodes:o,defaultEdges:i,width:a,height:l,fitView:r,fitViewOptions:s,minZoom:u,maxZoom:c,nodeOrigin:d,nodeExtent:f,zIndexMode:h}){return(0,B.useContext)(Rf)?(0,H.jsx)(H.Fragment,{children:e}):(0,H.jsx)(IR,{initialNodes:t,initialEdges:n,defaultNodes:o,defaultEdges:i,initialWidth:a,initialHeight:l,fitView:r,initialFitViewOptions:s,initialMinZoom:u,initialMaxZoom:c,nodeOrigin:d,nodeExtent:f,zIndexMode:h,children:e})}var YR={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function XR({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,className:i,nodeTypes:a,edgeTypes:l,onNodeClick:r,onEdgeClick:s,onInit:u,onMove:c,onMoveStart:d,onMoveEnd:f,onConnect:h,onConnectStart:v,onConnectEnd:b,onClickConnectStart:S,onClickConnectEnd:p,onNodeMouseEnter:y,onNodeMouseMove:m,onNodeMouseLeave:g,onNodeContextMenu:x,onNodeDoubleClick:_,onNodeDragStart:E,onNodeDrag:w,onNodeDragStop:N,onNodesDelete:k,onEdgesDelete:D,onDelete:z,onSelectionChange:P,onSelectionDragStart:T,onSelectionDrag:A,onSelectionDragStop:M,onSelectionContextMenu:O,onSelectionStart:R,onSelectionEnd:L,onBeforeDelete:V,connectionMode:G,connectionLineType:I=xo.Bezier,connectionLineStyle:q,connectionLineComponent:j,connectionLineContainerStyle:$,deleteKeyCode:fe="Backspace",selectionKeyCode:J="Shift",selectionOnDrag:X=!1,selectionMode:Q=Ta.Full,panActivationKeyCode:ye="Space",multiSelectionKeyCode:me=Xl()?"Meta":"Control",zoomActivationKeyCode:ee=Xl()?"Meta":"Control",snapToGrid:ae,snapGrid:se,onlyRenderVisibleElements:de=!1,selectNodesOnDrag:Se,nodesDraggable:Ae,autoPanOnNodeFocus:rt,nodesConnectable:Nt,nodesFocusable:Ct,nodeOrigin:st=$_,edgesFocusable:mn,edgesReconnectable:Wt,elementsSelectable:$n=!0,defaultViewport:Pt=bD,minZoom:it=.5,maxZoom:ut=2,translateExtent:ro=Pl,preventScrolling:Co=!0,nodeExtent:wo,defaultMarkerColor:On="#b1b1b7",zoomOnScroll:so=!0,zoomOnPinch:Ao=!0,panOnScroll:hn=!1,panOnScrollSpeed:Ut=.5,panOnScrollMode:Jt=ti.Free,zoomOnDoubleClick:Mo=!0,panOnDrag:Kn=!0,onPaneClick:er,onPaneMouseEnter:li,onPaneMouseMove:Do,onPaneMouseLeave:tr,onPaneScroll:uo,onPaneContextMenu:za,paneClickDistance:Qs=1,nodeClickDistance:ke=0,children:gn,onReconnect:ve,onReconnectStart:le,onReconnectEnd:ie,onEdgeContextMenu:Ne,onEdgeDoubleClick:Me,onEdgeMouseEnter:We,onEdgeMouseMove:Ue,onEdgeMouseLeave:Ht,reconnectRadius:Qn=10,onNodesChange:qi,onEdgesChange:zn,noDragClassName:nr="nodrag",noWheelClassName:Fn="nowheel",noPanClassName:or="nopan",fitView:ir,fitViewOptions:ar,connectOnClick:Fs,attributionPosition:Ws,proOptions:ne,defaultEdgeOptions:C,elevateNodesOnSelect:Y=!0,elevateEdgesOnSelect:F=!1,disableKeyboardA11y:Ge=!1,autoPanOnConnect:St,autoPanOnNodeDrag:Je,autoPanSpeed:Bt,connectionRadius:It,isValidConnection:co,onError:lr,style:mt,id:rr,nodeDragThreshold:Js,connectionDragThreshold:RT,viewport:OT,onViewportChange:zT,width:LT,height:HT,colorMode:BT="light",debug:kT,onScroll:_g,ariaLabelConfig:GT,zIndexMode:Eg="basic",...PT},UT){let jf=rr||"1",IT=ED(BT),VT=(0,B.useCallback)(Tg=>{Tg.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),_g?.(Tg)},[_g]);return(0,H.jsx)("div",{"data-testid":"rf__wrapper",...PT,onScroll:VT,style:{...mt,...YR},ref:UT,className:nt(["react-flow",i,IT]),id:rr,role:"application",children:(0,H.jsxs)(VR,{nodes:e,edges:t,width:LT,height:HT,fitView:ir,fitViewOptions:ar,minZoom:it,maxZoom:ut,nodeOrigin:st,nodeExtent:wo,zIndexMode:Eg,children:[(0,H.jsx)(PR,{onInit:u,onNodeClick:r,onEdgeClick:s,onNodeMouseEnter:y,onNodeMouseMove:m,onNodeMouseLeave:g,onNodeContextMenu:x,onNodeDoubleClick:_,nodeTypes:a,edgeTypes:l,connectionLineType:I,connectionLineStyle:q,connectionLineComponent:j,connectionLineContainerStyle:$,selectionKeyCode:J,selectionOnDrag:X,selectionMode:Q,deleteKeyCode:fe,multiSelectionKeyCode:me,panActivationKeyCode:ye,zoomActivationKeyCode:ee,onlyRenderVisibleElements:de,defaultViewport:Pt,translateExtent:ro,minZoom:it,maxZoom:ut,preventScrolling:Co,zoomOnScroll:so,zoomOnPinch:Ao,zoomOnDoubleClick:Mo,panOnScroll:hn,panOnScrollSpeed:Ut,panOnScrollMode:Jt,panOnDrag:Kn,onPaneClick:er,onPaneMouseEnter:li,onPaneMouseMove:Do,onPaneMouseLeave:tr,onPaneScroll:uo,onPaneContextMenu:za,paneClickDistance:Qs,nodeClickDistance:ke,onSelectionContextMenu:O,onSelectionStart:R,onSelectionEnd:L,onReconnect:ve,onReconnectStart:le,onReconnectEnd:ie,onEdgeContextMenu:Ne,onEdgeDoubleClick:Me,onEdgeMouseEnter:We,onEdgeMouseMove:Ue,onEdgeMouseLeave:Ht,reconnectRadius:Qn,defaultMarkerColor:On,noDragClassName:nr,noWheelClassName:Fn,noPanClassName:or,rfId:jf,disableKeyboardA11y:Ge,nodeExtent:wo,viewport:OT,onViewportChange:zT}),(0,H.jsx)(_D,{nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:h,onConnectStart:v,onConnectEnd:b,onClickConnectStart:S,onClickConnectEnd:p,nodesDraggable:Ae,autoPanOnNodeFocus:rt,nodesConnectable:Nt,nodesFocusable:Ct,edgesFocusable:mn,edgesReconnectable:Wt,elementsSelectable:$n,elevateNodesOnSelect:Y,elevateEdgesOnSelect:F,minZoom:it,maxZoom:ut,nodeExtent:wo,onNodesChange:qi,onEdgesChange:zn,snapToGrid:ae,snapGrid:se,connectionMode:G,translateExtent:ro,connectOnClick:Fs,defaultEdgeOptions:C,fitView:ir,fitViewOptions:ar,onNodesDelete:k,onEdgesDelete:D,onDelete:z,onNodeDragStart:E,onNodeDrag:w,onNodeDragStop:N,onSelectionDrag:A,onSelectionDragStart:T,onSelectionDragStop:M,onMove:c,onMoveStart:d,onMoveEnd:f,noPanClassName:or,nodeOrigin:st,rfId:jf,autoPanOnConnect:St,autoPanOnNodeDrag:Je,autoPanSpeed:Bt,onError:lr,connectionRadius:It,isValidConnection:co,selectNodesOnDrag:Se,nodeDragThreshold:Js,connectionDragThreshold:RT,onBeforeDelete:V,debug:kT,ariaLabelConfig:GT,zIndexMode:Eg}),(0,H.jsx)(vD,{onSelectionChange:P}),gn,(0,H.jsx)(pD,{proOptions:ne,position:Ws}),(0,H.jsx)(dD,{rfId:jf,disableKeyboardA11y:Ge})]})})}var _E=W_(XR);function EE(e){let[t,n]=(0,B.useState)(e),o=(0,B.useCallback)(i=>n(a=>Q_(i,a)),[]);return[t,n,o]}function TE(e){let[t,n]=(0,B.useState)(e),o=(0,B.useCallback)(i=>n(a=>F_(i,a)),[]);return[t,n,o]}var KH=Mn.error014();function qR({dimensions:e,lineWidth:t,variant:n,className:o}){return(0,H.jsx)("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:nt(["react-flow__background-pattern",n,o])})}function ZR({radius:e,className:t}){return(0,H.jsx)("circle",{cx:e,cy:e,r:e,className:nt(["react-flow__background-pattern","dots",t])})}var Eo;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Eo||(Eo={}));var jR={[Eo.Dots]:1,[Eo.Lines]:1,[Eo.Cross]:6},$R=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function NE({id:e,variant:t=Eo.Dots,gap:n=20,size:o,lineWidth:i=1,offset:a=0,color:l,bgColor:r,style:s,className:u,patternClassName:c}){let d=(0,B.useRef)(null),{transform:f,patternId:h}=we($R,je),v=o||jR[t],b=t===Eo.Dots,S=t===Eo.Cross,p=Array.isArray(n)?n:[n,n],y=[p[0]*f[2]||1,p[1]*f[2]||1],m=v*f[2],g=Array.isArray(a)?a:[a,a],x=S?[m,m]:y,_=[g[0]*f[2]||1+x[0]/2,g[1]*f[2]||1+x[1]/2],E=`${h}${e||""}`;return(0,H.jsxs)("svg",{className:nt(["react-flow__background",u]),style:{...s,...zf,"--xy-background-color-props":r,"--xy-background-pattern-color-props":l},ref:d,"data-testid":"rf__background",children:[(0,H.jsx)("pattern",{id:E,x:f[0]%y[0],y:f[1]%y[1],width:y[0],height:y[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${_[0]},-${_[1]})`,children:b?(0,H.jsx)(ZR,{radius:m/2,className:c}):(0,H.jsx)(qR,{dimensions:x,lineWidth:i,variant:t,className:c})}),(0,H.jsx)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${E})`})]})}NE.displayName="Background";var CE=(0,B.memo)(NE);function KR(){return(0,H.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:(0,H.jsx)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function QR(){return(0,H.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:(0,H.jsx)("path",{d:"M0 0h32v4.2H0z"})})}function FR(){return(0,H.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:(0,H.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 WR(){return(0,H.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,H.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 JR(){return(0,H.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,H.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 Mf({children:e,className:t,...n}){return(0,H.jsx)("button",{type:"button",className:nt(["react-flow__controls-button",t]),...n,children:e})}var eO=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function wE({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:o=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:l,onFitView:r,onInteractiveChange:s,className:u,children:c,position:d="bottom-left",orientation:f="vertical","aria-label":h}){let v=Qe(),{isInteractive:b,minZoomReached:S,maxZoomReached:p,ariaLabelConfig:y}=we(eO,je),{zoomIn:m,zoomOut:g,fitView:x}=Ah(),_=()=>{m(),a?.()},E=()=>{g(),l?.()},w=()=>{x(i),r?.()},N=()=>{v.setState({nodesDraggable:!b,nodesConnectable:!b,elementsSelectable:!b}),s?.(!b)};return(0,H.jsxs)(Of,{className:nt(["react-flow__controls",f==="horizontal"?"horizontal":"vertical",u]),position:d,style:e,"data-testid":"rf__controls","aria-label":h??y["controls.ariaLabel"],children:[t&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Mf,{onClick:_,className:"react-flow__controls-zoomin",title:y["controls.zoomIn.ariaLabel"],"aria-label":y["controls.zoomIn.ariaLabel"],disabled:p,children:(0,H.jsx)(KR,{})}),(0,H.jsx)(Mf,{onClick:E,className:"react-flow__controls-zoomout",title:y["controls.zoomOut.ariaLabel"],"aria-label":y["controls.zoomOut.ariaLabel"],disabled:S,children:(0,H.jsx)(QR,{})})]}),n&&(0,H.jsx)(Mf,{className:"react-flow__controls-fitview",onClick:w,title:y["controls.fitView.ariaLabel"],"aria-label":y["controls.fitView.ariaLabel"],children:(0,H.jsx)(FR,{})}),o&&(0,H.jsx)(Mf,{className:"react-flow__controls-interactive",onClick:N,title:y["controls.interactive.ariaLabel"],"aria-label":y["controls.interactive.ariaLabel"],children:b?(0,H.jsx)(JR,{}):(0,H.jsx)(WR,{})}),c]})}wE.displayName="Controls";var QH=(0,B.memo)(wE);function tO({id:e,x:t,y:n,width:o,height:i,style:a,color:l,strokeColor:r,strokeWidth:s,className:u,borderRadius:c,shapeRendering:d,selected:f,onClick:h}){let{background:v,backgroundColor:b}=a||{},S=l||v||b;return(0,H.jsx)("rect",{className:nt(["react-flow__minimap-node",{selected:f},u]),x:t,y:n,rx:c,ry:c,width:o,height:i,style:{fill:S,stroke:r,strokeWidth:s},shapeRendering:d,onClick:h?p=>h(p,e):void 0})}var nO=(0,B.memo)(tO),oO=e=>e.nodes.map(t=>t.id),Ch=e=>e instanceof Function?e:()=>e;function iO({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:i,nodeComponent:a=nO,onClick:l}){let r=we(oO,je),s=Ch(t),u=Ch(e),c=Ch(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return(0,H.jsx)(H.Fragment,{children:r.map(f=>(0,H.jsx)(lO,{id:f,nodeColorFunc:s,nodeStrokeColorFunc:u,nodeClassNameFunc:c,nodeBorderRadius:o,nodeStrokeWidth:i,NodeComponent:a,onClick:l,shapeRendering:d},f))})}function aO({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:o,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:l,NodeComponent:r,onClick:s}){let{node:u,x:c,y:d,width:f,height:h}=we(v=>{let b=v.nodeLookup.get(e);if(!b)return{node:void 0,x:0,y:0,width:0,height:0};let S=b.internals.userNode,{x:p,y}=b.internals.positionAbsolute,{width:m,height:g}=_o(S);return{node:S,x:p,y,width:m,height:g}},je);return!u||u.hidden||!ch(u)?null:(0,H.jsx)(r,{x:c,y:d,width:f,height:h,style:u.style,selected:!!u.selected,className:o(u),color:t(u),borderRadius:i,strokeColor:n(u),strokeWidth:a,shapeRendering:l,onClick:s,id:u.id})}var lO=(0,B.memo)(aO),rO=(0,B.memo)(iO),sO=200,uO=150,cO=e=>!e.hidden,fO=e=>{let t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?rh(Ul(e.nodeLookup,{filter:cO}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},dO="react-flow__minimap-desc";function AE({style:e,className:t,nodeStrokeColor:n,nodeColor:o,nodeClassName:i="",nodeBorderRadius:a=5,nodeStrokeWidth:l,nodeComponent:r,bgColor:s,maskColor:u,maskStrokeColor:c,maskStrokeWidth:d,position:f="bottom-right",onClick:h,onNodeClick:v,pannable:b=!1,zoomable:S=!1,ariaLabel:p,inversePan:y,zoomStep:m=1,offsetScale:g=5}){let x=Qe(),_=(0,B.useRef)(null),{boundingRect:E,viewBB:w,rfId:N,panZoom:k,translateExtent:D,flowWidth:z,flowHeight:P,ariaLabelConfig:T}=we(fO,je),A=e?.width??sO,M=e?.height??uO,O=E.width/A,R=E.height/M,L=Math.max(O,R),V=L*A,G=L*M,I=g*L,q=E.x-(V-E.width)/2-I,j=E.y-(G-E.height)/2-I,$=V+I*2,fe=G+I*2,J=`${dO}-${N}`,X=(0,B.useRef)(0),Q=(0,B.useRef)();X.current=L,(0,B.useEffect)(()=>{if(_.current&&k)return Q.current=t_({domNode:_.current,panZoom:k,getTransform:()=>x.getState().transform,getViewScale:()=>X.current}),()=>{Q.current?.destroy()}},[k]),(0,B.useEffect)(()=>{Q.current?.update({translateExtent:D,width:z,height:P,inversePan:y,pannable:b,zoomStep:m,zoomable:S})},[b,S,y,m,D,z,P]);let ye=h?ae=>{let[se,de]=Q.current?.pointer(ae)||[0,0];h(ae,{x:se,y:de})}:void 0,me=v?(0,B.useCallback)((ae,se)=>{let de=x.getState().nodeLookup.get(se).internals.userNode;v(ae,de)},[]):void 0,ee=p??T["minimap.ariaLabel"];return(0,H.jsx)(Of,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof s=="string"?s:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-stroke-width-props":typeof d=="number"?d*L:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof l=="number"?l:void 0},className:nt(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:(0,H.jsxs)("svg",{width:A,height:M,viewBox:`${q} ${j} ${$} ${fe}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":J,ref:_,onClick:ye,children:[ee&&(0,H.jsx)("title",{id:J,children:ee}),(0,H.jsx)(rO,{onClick:me,nodeColor:o,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:l,nodeComponent:r}),(0,H.jsx)("path",{className:"react-flow__minimap-mask",d:`M${q-I},${j-I}h${$+I*2}v${fe+I*2}h${-$-I*2}z
|
|
2473
|
-
M${w.x},${w.y}h${w.width}v${w.height}h${-w.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}AE.displayName="MiniMap";var FH=(0,B.memo)(AE),pO=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,mO={[Xi.Line]:"right",[Xi.Handle]:"bottom-right"};function hO({nodeId:e,position:t,variant:n=Xi.Handle,className:o,style:i=void 0,children:a,color:l,minWidth:r=10,minHeight:s=10,maxWidth:u=Number.MAX_VALUE,maxHeight:c=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:h=!0,shouldResize:v,onResizeStart:b,onResize:S,onResizeEnd:p}){let y=nE(),m=typeof e=="string"?e:y,g=Qe(),x=(0,B.useRef)(null),_=n===Xi.Handle,E=we((0,B.useCallback)(pO(_&&h),[_,h]),je),w=(0,B.useRef)(null),N=t??mO[n];(0,B.useEffect)(()=>{if(!(!x.current||!m))return w.current||(w.current=l_({domNode:x.current,nodeId:m,getStoreItems:()=>{let{nodeLookup:D,transform:z,snapGrid:P,snapToGrid:T,nodeOrigin:A,domNode:M}=g.getState();return{nodeLookup:D,transform:z,snapGrid:P,snapToGrid:T,nodeOrigin:A,paneDomNode:M}},onChange:(D,z)=>{let{triggerNodeChanges:P,nodeLookup:T,parentLookup:A,nodeOrigin:M}=g.getState(),O=[],R={x:D.x,y:D.y},L=T.get(m);if(L&&L.expandParent&&L.parentId){let V=L.origin??M,G=D.width??L.measured.width??0,I=D.height??L.measured.height??0,q={id:L.id,parentId:L.parentId,rect:{width:G,height:I,...fh({x:D.x??L.position.x,y:D.y??L.position.y},{width:G,height:I},L.parentId,T,V)}},j=Tf([q],T,A,M);O.push(...j),R.x=D.x?Math.max(V[0]*G,D.x):void 0,R.y=D.y?Math.max(V[1]*I,D.y):void 0}if(R.x!==void 0&&R.y!==void 0){let V={id:m,type:"position",position:{...R}};O.push(V)}if(D.width!==void 0&&D.height!==void 0){let G={id:m,type:"dimensions",resizing:!0,setAttributes:f?f==="horizontal"?"width":"height":!0,dimensions:{width:D.width,height:D.height}};O.push(G)}for(let V of z){let G={...V,type:"position"};O.push(G)}P(O)},onEnd:({width:D,height:z})=>{let P={id:m,type:"dimensions",resizing:!1,dimensions:{width:D,height:z}};g.getState().triggerNodeChanges([P])}})),w.current.update({controlPosition:N,boundaries:{minWidth:r,minHeight:s,maxWidth:u,maxHeight:c},keepAspectRatio:d,resizeDirection:f,onResizeStart:b,onResize:S,onResizeEnd:p,shouldResize:v}),()=>{w.current?.destroy()}},[N,r,s,u,c,d,b,S,p,v]);let k=N.split("-");return(0,H.jsx)("div",{className:nt(["react-flow__resize-control","nodrag",...k,n,o]),ref:x,style:{...i,scale:E,...l&&{[_?"backgroundColor":"borderColor"]:l}},children:a})}var WH=(0,B.memo)(hO);var Dh=oe(wt(),1);var ME="(prefers-color-scheme: dark)";function gO(e){return e?da.DARK:da.LIGHT}function Rh(){return typeof window>"u"||typeof window.matchMedia!="function"?da.DARK:gO(window.matchMedia(ME).matches)}function yO(e){if(typeof window>"u"||typeof window.matchMedia!="function")return()=>{};let t=window.matchMedia(ME);return typeof t.addEventListener=="function"?(t.addEventListener("change",e),()=>t.removeEventListener("change",e)):(t.addListener(e),()=>t.removeListener(e))}function vO(e){return e!==void 0?{subscribe:()=>()=>{},getSnapshot:()=>e,getServerSnapshot:()=>e}:{subscribe:yO,getSnapshot:Rh,getServerSnapshot:()=>da.DARK}}function DE(e){let t=Dh.default.useMemo(()=>vO(e),[e]);return Dh.default.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot)}function RE(e){if(!e)return null;let t={},n={},o={},i={},a=new Set;for(let r of e.edges)r.kind==="contains"&&(i[r.source]||(i[r.source]=[]),i[r.source].push(r.target),a.add(r.target));let l=new Set(Object.keys(i));for(let r of e.nodes){let s=r.io,u=l.has(r.id);for(let c of s.outputs)c.digest&&!t[c.digest]&&(t[c.digest]={name:c.name,concept:c.concept,contentType:c.content_type}),c.digest&&!u&&(n[c.digest]=r.id);for(let c of s.inputs)c.digest&&!t[c.digest]&&(t[c.digest]={name:c.name,concept:c.concept,contentType:c.content_type}),c.digest&&!u&&(o[c.digest]||(o[c.digest]=[]),o[c.digest].push(r.id))}return{stuffRegistry:t,stuffProducers:n,stuffConsumers:o,controllerNodeIds:l,childNodeIds:a,containmentTree:i}}function To(e,t){let n={};for(let[l,r]of Object.entries(t.containmentTree))for(let s of r)n[s]=l;for(let[l,r]of Object.entries(t.stuffProducers)){let s="stuff_"+l,u=n[r];u&&(n[s]=u)}for(let l of e.nodes){if(!t.controllerNodeIds.has(l.id))continue;let r=n[l.id];if(r)for(let s of l.io.outputs){if(!s.digest)continue;let u="stuff_"+s.digest;n[u]||(n[u]=r)}}for(let l of e.edges)if(l.kind==="batch_item"&&l.target_stuff_digest){let r="stuff_"+l.target_stuff_digest;t.controllerNodeIds.has(l.source)&&(n[r]=l.source)}let o=new Set;for(let l of e.edges)(l.kind==="batch_item"||l.kind==="batch_aggregate"||l.kind==="parallel_combine")&&(l.source_stuff_digest&&o.add(l.source_stuff_digest),l.target_stuff_digest&&o.add(l.target_stuff_digest));let i="stuff_",a=Object.keys(n).filter(l=>l.startsWith(i));for(let l of a){let r=l.slice(i.length),s=n[l];if(!s)continue;let u=t.stuffConsumers[r]||[];if(u.length===0){o.has(r)||delete n[l];continue}for(;s;){let c=s;if(u.some(h=>bO(h,c,n)))break;let f=n[s];f?(n[l]=f,s=f):(delete n[l],s=void 0)}}return n}function bO(e,t,n){let o=n[e];for(;o;){if(o===t)return!0;o=n[o]}return!1}function OE(e,t){return e.pipe_registry?.[t]}function Oh(e,t){if(!e.concept_registry)return;let n=e.concept_registry[t];if(n)return n;for(let o of Object.values(e.concept_registry))if(o.code===t)return o}function zE(e){return!e||typeof e!="string"?!1:e.startsWith("https://")||e.startsWith("http://")||e.startsWith("file://")||e.startsWith("/")}function Hf(e){return!e||typeof e!="string"?!1:e.startsWith("https://")||e.startsWith("http://")||e.startsWith("file://")||e.startsWith("/")}function LE(e){if(!e)return null;if(typeof e=="string")return zE(e)?e:null;if(typeof e!="object")return null;let t=e,n=[t.public_url,t.src,t.href,t.uri,t.url];for(let o of n)if(zE(o))return o;return null}function HE(e){if(!e)return null;if(typeof e=="string")return Hf(e)?e:null;if(typeof e!="object")return null;let t=e,n=[t.public_url,t.src,t.href,t.uri,t.url];for(let o of n)if(Hf(o))return o;return null}function BE(e){if(!e)return null;if(typeof e=="string")return e.startsWith("pipelex-storage://")?e:null;if(typeof e!="object")return null;let t=e,n=[t.uri,t.url,t.src,t.href];for(let o of n)if(typeof o=="string"&&o.startsWith("pipelex-storage://"))return o;return null}function zh(e){if(!e||typeof e!="object")return null;let t=e;return typeof t.filename=="string"&&t.filename?t.filename:null}function kE(e,t,n){if(t&&t.includes("/"))return t;if(e&&typeof e=="object"){let i=e;if(typeof i.mime_type=="string"&&i.mime_type)return i.mime_type}let o=zh(e)||n||(typeof e=="string"?e:null);if(o){let a=o.match(/\.([a-zA-Z0-9]+)(?:\?|#|$)/)?.[1]?.toLowerCase();if(a){if(a==="pdf")return"application/pdf";if(["png","jpg","jpeg","gif","webp","svg","bmp"].includes(a))return`image/${a==="jpg"?"jpeg":a==="svg"?"svg+xml":a}`}}return null}function GE(e){return e==="application/pdf"?"PDF":e?.startsWith("image/")?"Image":"HTML"}function Lh(e,t){for(let n of e.nodes)for(let o of n.io?.outputs??[])if(o.digest===t)return{digest:t,name:o.name,concept:o.concept,contentType:o.content_type,data:o.data,dataText:o.data_text,dataHtml:o.data_html};for(let n of e.nodes)for(let o of n.io?.inputs??[])if(o.digest===t)return{digest:t,name:o.name,concept:o.concept,contentType:o.content_type,data:o.data,dataText:o.data_text,dataHtml:o.data_html};return null}var Dn=oe(wt(),1);var{entries:jE,setPrototypeOf:PE,isFrozen:SO,getPrototypeOf:xO,getOwnPropertyDescriptor:_O}=Object,{freeze:Kt,seal:jn,create:Xs}=Object,{apply:Ih,construct:Vh}=typeof Reflect<"u"&&Reflect;Kt||(Kt=function(t){return t});jn||(jn=function(t){return t});Ih||(Ih=function(t,n){for(var o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];return t.apply(n,i)});Vh||(Vh=function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return new t(...o)});var Ps=Qt(Array.prototype.forEach),EO=Qt(Array.prototype.lastIndexOf),UE=Qt(Array.prototype.pop),Us=Qt(Array.prototype.push),TO=Qt(Array.prototype.splice),kf=Qt(String.prototype.toLowerCase),Hh=Qt(String.prototype.toString),Bh=Qt(String.prototype.match),jl=Qt(String.prototype.replace),NO=Qt(String.prototype.indexOf),CO=Qt(String.prototype.trim),ao=Qt(Object.prototype.hasOwnProperty),$t=Qt(RegExp.prototype.test),Is=wO(TypeError);function Qt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return Ih(e,t,o)}}function wO(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Vh(e,n)}}function be(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:kf;PE&&PE(e,null);let o=t.length;for(;o--;){let i=t[o];if(typeof i=="string"){let a=n(i);a!==i&&(SO(t)||(t[o]=a),i=a)}e[i]=!0}return e}function AO(e){for(let t=0;t<e.length;t++)ao(e,t)||(e[t]=null);return e}function No(e){let t=Xs(null);for(let[n,o]of jE(e))ao(e,n)&&(Array.isArray(o)?t[n]=AO(o):o&&typeof o=="object"&&o.constructor===Object?t[n]=No(o):t[n]=o);return t}function Vs(e,t){for(;e!==null;){let o=_O(e,t);if(o){if(o.get)return Qt(o.get);if(typeof o.value=="function")return Qt(o.value)}e=xO(e)}function n(){return null}return n}var IE=Kt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),kh=Kt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Gh=Kt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),MO=Kt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ph=Kt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),DO=Kt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),VE=Kt(["#text"]),YE=Kt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Uh=Kt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),XE=Kt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Bf=Kt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),RO=jn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),OO=jn(/<%[\w\W]*|[\w\W]*%>/gm),zO=jn(/\$\{[\w\W]*/gm),LO=jn(/^data-[\-\w.\u00B7-\uFFFF]+$/),HO=jn(/^aria-[\-\w]+$/),$E=jn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),BO=jn(/^(?:\w+script|data):/i),kO=jn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),KE=jn(/^html$/i),GO=jn(/^[a-z][.\w]*(-[.\w]+)+$/i),qE=Object.freeze({__proto__:null,ARIA_ATTR:HO,ATTR_WHITESPACE:kO,CUSTOM_ELEMENT:GO,DATA_ATTR:LO,DOCTYPE_NAME:KE,ERB_EXPR:OO,IS_ALLOWED_URI:$E,IS_SCRIPT_OR_DATA:BO,MUSTACHE_EXPR:RO,TMPLIT_EXPR:zO}),Ys={element:1,text:3,progressingInstruction:7,comment:8,document:9},PO=function(){return typeof window>"u"?null:window},UO=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null,i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(o=n.getAttribute(i));let a="dompurify"+(o?"#"+o:"");try{return t.createPolicy(a,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},ZE=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function QE(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:PO(),t=ne=>QE(ne);if(t.version="3.4.0",t.removed=[],!e||!e.document||e.document.nodeType!==Ys.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,o=n,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:l,Node:r,Element:s,NodeFilter:u,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:h}=e,v=s.prototype,b=Vs(v,"cloneNode"),S=Vs(v,"remove"),p=Vs(v,"nextSibling"),y=Vs(v,"childNodes"),m=Vs(v,"parentNode");if(typeof l=="function"){let ne=n.createElement("template");ne.content&&ne.content.ownerDocument&&(n=ne.content.ownerDocument)}let g,x="",{implementation:_,createNodeIterator:E,createDocumentFragment:w,getElementsByTagName:N}=n,{importNode:k}=o,D=ZE();t.isSupported=typeof jE=="function"&&typeof m=="function"&&_&&_.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:z,ERB_EXPR:P,TMPLIT_EXPR:T,DATA_ATTR:A,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:R,CUSTOM_ELEMENT:L}=qE,{IS_ALLOWED_URI:V}=qE,G=null,I=be({},[...IE,...kh,...Gh,...Ph,...VE]),q=null,j=be({},[...YE,...Uh,...XE,...Bf]),$=Object.seal(Xs(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),fe=null,J=null,X=Object.seal(Xs(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Q=!0,ye=!0,me=!1,ee=!0,ae=!1,se=!0,de=!1,Se=!1,Ae=!1,rt=!1,Nt=!1,Ct=!1,st=!0,mn=!1,Wt="user-content-",$n=!0,Pt=!1,it={},ut=null,ro=be({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Co=null,wo=be({},["audio","video","img","source","image","track"]),On=null,so=be({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ao="http://www.w3.org/1998/Math/MathML",hn="http://www.w3.org/2000/svg",Ut="http://www.w3.org/1999/xhtml",Jt=Ut,Mo=!1,Kn=null,er=be({},[Ao,hn,Ut],Hh),li=be({},["mi","mo","mn","ms","mtext"]),Do=be({},["annotation-xml"]),tr=be({},["title","style","font","a","script"]),uo=null,za=["application/xhtml+xml","text/html"],Qs="text/html",ke=null,gn=null,ve=n.createElement("form"),le=function(C){return C instanceof RegExp||C instanceof Function},ie=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(gn&&gn===C)){if((!C||typeof C!="object")&&(C={}),C=No(C),uo=za.indexOf(C.PARSER_MEDIA_TYPE)===-1?Qs:C.PARSER_MEDIA_TYPE,ke=uo==="application/xhtml+xml"?Hh:kf,G=ao(C,"ALLOWED_TAGS")?be({},C.ALLOWED_TAGS,ke):I,q=ao(C,"ALLOWED_ATTR")?be({},C.ALLOWED_ATTR,ke):j,Kn=ao(C,"ALLOWED_NAMESPACES")?be({},C.ALLOWED_NAMESPACES,Hh):er,On=ao(C,"ADD_URI_SAFE_ATTR")?be(No(so),C.ADD_URI_SAFE_ATTR,ke):so,Co=ao(C,"ADD_DATA_URI_TAGS")?be(No(wo),C.ADD_DATA_URI_TAGS,ke):wo,ut=ao(C,"FORBID_CONTENTS")?be({},C.FORBID_CONTENTS,ke):ro,fe=ao(C,"FORBID_TAGS")?be({},C.FORBID_TAGS,ke):No({}),J=ao(C,"FORBID_ATTR")?be({},C.FORBID_ATTR,ke):No({}),it=ao(C,"USE_PROFILES")?C.USE_PROFILES:!1,Q=C.ALLOW_ARIA_ATTR!==!1,ye=C.ALLOW_DATA_ATTR!==!1,me=C.ALLOW_UNKNOWN_PROTOCOLS||!1,ee=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ae=C.SAFE_FOR_TEMPLATES||!1,se=C.SAFE_FOR_XML!==!1,de=C.WHOLE_DOCUMENT||!1,rt=C.RETURN_DOM||!1,Nt=C.RETURN_DOM_FRAGMENT||!1,Ct=C.RETURN_TRUSTED_TYPE||!1,Ae=C.FORCE_BODY||!1,st=C.SANITIZE_DOM!==!1,mn=C.SANITIZE_NAMED_PROPS||!1,$n=C.KEEP_CONTENT!==!1,Pt=C.IN_PLACE||!1,V=C.ALLOWED_URI_REGEXP||$E,Jt=C.NAMESPACE||Ut,li=C.MATHML_TEXT_INTEGRATION_POINTS||li,Do=C.HTML_INTEGRATION_POINTS||Do,$=C.CUSTOM_ELEMENT_HANDLING||Xs(null),C.CUSTOM_ELEMENT_HANDLING&&le(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=C.CUSTOM_ELEMENT_HANDLING.tagNameCheck),C.CUSTOM_ELEMENT_HANDLING&&le(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),C.CUSTOM_ELEMENT_HANDLING&&typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&($.allowCustomizedBuiltInElements=C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ae&&(ye=!1),Nt&&(rt=!0),it&&(G=be({},VE),q=Xs(null),it.html===!0&&(be(G,IE),be(q,YE)),it.svg===!0&&(be(G,kh),be(q,Uh),be(q,Bf)),it.svgFilters===!0&&(be(G,Gh),be(q,Uh),be(q,Bf)),it.mathMl===!0&&(be(G,Ph),be(q,XE),be(q,Bf))),X.tagCheck=null,X.attributeCheck=null,C.ADD_TAGS&&(typeof C.ADD_TAGS=="function"?X.tagCheck=C.ADD_TAGS:(G===I&&(G=No(G)),be(G,C.ADD_TAGS,ke))),C.ADD_ATTR&&(typeof C.ADD_ATTR=="function"?X.attributeCheck=C.ADD_ATTR:(q===j&&(q=No(q)),be(q,C.ADD_ATTR,ke))),C.ADD_URI_SAFE_ATTR&&be(On,C.ADD_URI_SAFE_ATTR,ke),C.FORBID_CONTENTS&&(ut===ro&&(ut=No(ut)),be(ut,C.FORBID_CONTENTS,ke)),C.ADD_FORBID_CONTENTS&&(ut===ro&&(ut=No(ut)),be(ut,C.ADD_FORBID_CONTENTS,ke)),$n&&(G["#text"]=!0),de&&be(G,["html","head","body"]),G.table&&(be(G,["tbody"]),delete fe.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw Is('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Is('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=C.TRUSTED_TYPES_POLICY,x=g.createHTML("")}else g===void 0&&(g=UO(h,i)),g!==null&&typeof x=="string"&&(x=g.createHTML(""));Kt&&Kt(C),gn=C}},Ne=be({},[...kh,...Gh,...MO]),Me=be({},[...Ph,...DO]),We=function(C){let Y=m(C);(!Y||!Y.tagName)&&(Y={namespaceURI:Jt,tagName:"template"});let F=kf(C.tagName),Ge=kf(Y.tagName);return Kn[C.namespaceURI]?C.namespaceURI===hn?Y.namespaceURI===Ut?F==="svg":Y.namespaceURI===Ao?F==="svg"&&(Ge==="annotation-xml"||li[Ge]):!!Ne[F]:C.namespaceURI===Ao?Y.namespaceURI===Ut?F==="math":Y.namespaceURI===hn?F==="math"&&Do[Ge]:!!Me[F]:C.namespaceURI===Ut?Y.namespaceURI===hn&&!Do[Ge]||Y.namespaceURI===Ao&&!li[Ge]?!1:!Me[F]&&(tr[F]||!Ne[F]):!!(uo==="application/xhtml+xml"&&Kn[C.namespaceURI]):!1},Ue=function(C){Us(t.removed,{element:C});try{m(C).removeChild(C)}catch{S(C)}},Ht=function(C,Y){try{Us(t.removed,{attribute:Y.getAttributeNode(C),from:Y})}catch{Us(t.removed,{attribute:null,from:Y})}if(Y.removeAttribute(C),C==="is")if(rt||Nt)try{Ue(Y)}catch{}else try{Y.setAttribute(C,"")}catch{}},Qn=function(C){let Y=null,F=null;if(Ae)C="<remove></remove>"+C;else{let Je=Bh(C,/^[\r\n\t ]+/);F=Je&&Je[0]}uo==="application/xhtml+xml"&&Jt===Ut&&(C='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+C+"</body></html>");let Ge=g?g.createHTML(C):C;if(Jt===Ut)try{Y=new f().parseFromString(Ge,uo)}catch{}if(!Y||!Y.documentElement){Y=_.createDocument(Jt,"template",null);try{Y.documentElement.innerHTML=Mo?x:Ge}catch{}}let St=Y.body||Y.documentElement;return C&&F&&St.insertBefore(n.createTextNode(F),St.childNodes[0]||null),Jt===Ut?N.call(Y,de?"html":"body")[0]:de?Y.documentElement:St},qi=function(C){return E.call(C.ownerDocument||C,C,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},zn=function(C){return C instanceof d&&(typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||!(C.attributes instanceof c)||typeof C.removeAttribute!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function")},nr=function(C){return typeof r=="function"&&C instanceof r};function Fn(ne,C,Y){Ps(ne,F=>{F.call(t,C,Y,gn)})}let or=function(C){let Y=null;if(Fn(D.beforeSanitizeElements,C,null),zn(C))return Ue(C),!0;let F=ke(C.nodeName);if(Fn(D.uponSanitizeElement,C,{tagName:F,allowedTags:G}),se&&C.hasChildNodes()&&!nr(C.firstElementChild)&&$t(/<[/\w!]/g,C.innerHTML)&&$t(/<[/\w!]/g,C.textContent)||se&&C.namespaceURI===Ut&&F==="style"&&nr(C.firstElementChild)||C.nodeType===Ys.progressingInstruction||se&&C.nodeType===Ys.comment&&$t(/<[/\w]/g,C.data))return Ue(C),!0;if(fe[F]||!(X.tagCheck instanceof Function&&X.tagCheck(F))&&!G[F]){if(!fe[F]&&ar(F)&&($.tagNameCheck instanceof RegExp&&$t($.tagNameCheck,F)||$.tagNameCheck instanceof Function&&$.tagNameCheck(F)))return!1;if($n&&!ut[F]){let Ge=m(C)||C.parentNode,St=y(C)||C.childNodes;if(St&&Ge){let Je=St.length;for(let Bt=Je-1;Bt>=0;--Bt){let It=b(St[Bt],!0);It.__removalCount=(C.__removalCount||0)+1,Ge.insertBefore(It,p(C))}}}return Ue(C),!0}return C instanceof s&&!We(C)||(F==="noscript"||F==="noembed"||F==="noframes")&&$t(/<\/no(script|embed|frames)/i,C.innerHTML)?(Ue(C),!0):(ae&&C.nodeType===Ys.text&&(Y=C.textContent,Ps([z,P,T],Ge=>{Y=jl(Y,Ge," ")}),C.textContent!==Y&&(Us(t.removed,{element:C.cloneNode()}),C.textContent=Y)),Fn(D.afterSanitizeElements,C,null),!1)},ir=function(C,Y,F){if(J[Y]||st&&(Y==="id"||Y==="name")&&(F in n||F in ve))return!1;if(!(ye&&!J[Y]&&$t(A,Y))){if(!(Q&&$t(M,Y))){if(!(X.attributeCheck instanceof Function&&X.attributeCheck(Y,C))){if(!q[Y]||J[Y]){if(!(ar(C)&&($.tagNameCheck instanceof RegExp&&$t($.tagNameCheck,C)||$.tagNameCheck instanceof Function&&$.tagNameCheck(C))&&($.attributeNameCheck instanceof RegExp&&$t($.attributeNameCheck,Y)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(Y,C))||Y==="is"&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&$t($.tagNameCheck,F)||$.tagNameCheck instanceof Function&&$.tagNameCheck(F))))return!1}else if(!On[Y]){if(!$t(V,jl(F,R,""))){if(!((Y==="src"||Y==="xlink:href"||Y==="href")&&C!=="script"&&NO(F,"data:")===0&&Co[C])){if(!(me&&!$t(O,jl(F,R,"")))){if(F)return!1}}}}}}}return!0},ar=function(C){return C!=="annotation-xml"&&Bh(C,L)},Fs=function(C){Fn(D.beforeSanitizeAttributes,C,null);let{attributes:Y}=C;if(!Y||zn(C))return;let F={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:q,forceKeepAttr:void 0},Ge=Y.length;for(;Ge--;){let St=Y[Ge],{name:Je,namespaceURI:Bt,value:It}=St,co=ke(Je),lr=It,mt=Je==="value"?lr:CO(lr);if(F.attrName=co,F.attrValue=mt,F.keepAttr=!0,F.forceKeepAttr=void 0,Fn(D.uponSanitizeAttribute,C,F),mt=F.attrValue,mn&&(co==="id"||co==="name")&&(Ht(Je,C),mt=Wt+mt),se&&$t(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,mt)){Ht(Je,C);continue}if(co==="attributename"&&Bh(mt,"href")){Ht(Je,C);continue}if(F.forceKeepAttr)continue;if(!F.keepAttr){Ht(Je,C);continue}if(!ee&&$t(/\/>/i,mt)){Ht(Je,C);continue}ae&&Ps([z,P,T],Js=>{mt=jl(mt,Js," ")});let rr=ke(C.nodeName);if(!ir(rr,co,mt)){Ht(Je,C);continue}if(g&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!Bt)switch(h.getAttributeType(rr,co)){case"TrustedHTML":{mt=g.createHTML(mt);break}case"TrustedScriptURL":{mt=g.createScriptURL(mt);break}}if(mt!==lr)try{Bt?C.setAttributeNS(Bt,Je,mt):C.setAttribute(Je,mt),zn(C)?Ue(C):UE(t.removed)}catch{Ht(Je,C)}}Fn(D.afterSanitizeAttributes,C,null)},Ws=function(C){let Y=null,F=qi(C);for(Fn(D.beforeSanitizeShadowDOM,C,null);Y=F.nextNode();)Fn(D.uponSanitizeShadowNode,Y,null),or(Y),Fs(Y),Y.content instanceof a&&Ws(Y.content);Fn(D.afterSanitizeShadowDOM,C,null)};return t.sanitize=function(ne){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=null,F=null,Ge=null,St=null;if(Mo=!ne,Mo&&(ne="<!-->"),typeof ne!="string"&&!nr(ne))if(typeof ne.toString=="function"){if(ne=ne.toString(),typeof ne!="string")throw Is("dirty is not a string, aborting")}else throw Is("toString is not a function");if(!t.isSupported)return ne;if(Se||ie(C),t.removed=[],typeof ne=="string"&&(Pt=!1),Pt){if(ne.nodeName){let It=ke(ne.nodeName);if(!G[It]||fe[It])throw Is("root node is forbidden and cannot be sanitized in-place")}}else if(ne instanceof r)Y=Qn("<!---->"),F=Y.ownerDocument.importNode(ne,!0),F.nodeType===Ys.element&&F.nodeName==="BODY"||F.nodeName==="HTML"?Y=F:Y.appendChild(F);else{if(!rt&&!ae&&!de&&ne.indexOf("<")===-1)return g&&Ct?g.createHTML(ne):ne;if(Y=Qn(ne),!Y)return rt?null:Ct?x:""}Y&&Ae&&Ue(Y.firstChild);let Je=qi(Pt?ne:Y);for(;Ge=Je.nextNode();)or(Ge),Fs(Ge),Ge.content instanceof a&&Ws(Ge.content);if(Pt)return ne;if(rt){if(ae){Y.normalize();let It=Y.innerHTML;Ps([z,P,T],co=>{It=jl(It,co," ")}),Y.innerHTML=It}if(Nt)for(St=w.call(Y.ownerDocument);Y.firstChild;)St.appendChild(Y.firstChild);else St=Y;return(q.shadowroot||q.shadowrootmode)&&(St=k.call(o,St,!0)),St}let Bt=de?Y.outerHTML:Y.innerHTML;return de&&G["!doctype"]&&Y.ownerDocument&&Y.ownerDocument.doctype&&Y.ownerDocument.doctype.name&&$t(KE,Y.ownerDocument.doctype.name)&&(Bt="<!DOCTYPE "+Y.ownerDocument.doctype.name+`>
|
|
2474
|
-
`+Bt),ae&&Ps([z,P,T],It=>{Bt=jl(Bt,It," ")}),g&&Ct?g.createHTML(Bt):Bt},t.setConfig=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ie(ne),Se=!0},t.clearConfig=function(){gn=null,Se=!1},t.isValidAttribute=function(ne,C,Y){gn||ie({});let F=ke(ne),Ge=ke(C);return ir(F,Ge,Y)},t.addHook=function(ne,C){typeof C=="function"&&Us(D[ne],C)},t.removeHook=function(ne,C){if(C!==void 0){let Y=EO(D[ne],C);return Y===-1?void 0:TO(D[ne],Y,1)[0]}return UE(D[ne])},t.removeHooks=function(ne){D[ne]=[]},t.removeAllHooks=function(){D=ZE()},t}var FE=QE();var re=oe(ge(),1),IO=(0,re.jsx)("svg",{viewBox:"0 0 24 24",children:(0,re.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),VO=(0,re.jsx)("svg",{viewBox:"0 0 24 24",children:(0,re.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}),YO=(0,re.jsx)("svg",{viewBox:"0 0 24 24",children:(0,re.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"})}),XO=(0,re.jsx)("svg",{viewBox:"0 0 24 24",children:(0,re.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"})}),WE=(0,re.jsx)("svg",{viewBox:"0 0 24 24",children:(0,re.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"})});function Gf(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Yh(e,t,n){let o=new Blob([e],{type:n}),i=URL.createObjectURL(o),a=document.createElement("a");a.href=i,a.download=t,a.click(),setTimeout(()=>URL.revokeObjectURL(i),1e4)}function JE(e,t){let n=document.createElement("a");n.href=e,n.download=t,n.target="_blank",n.click()}function Pf({stuff:e,className:t,resolveStorageUrl:n,canEmbedPdf:o,onOpenExternally:i}){let[a,l]=Dn.default.useState("html"),[r,s]=Dn.default.useState(!1),u=Dn.default.useRef(null),c=Dn.default.useMemo(()=>HE(e.data),[e.data]),d=Dn.default.useMemo(()=>LE(e.data),[e.data]),f=Dn.default.useMemo(()=>BE(e.data),[e.data]),h=Dn.default.useMemo(()=>zh(e.data),[e.data]),[v,b]=Dn.default.useState(null);Dn.default.useEffect(()=>{if(b(null),!f||!n||c)return;let A=!1;return n(f).then(M=>{A||b(Hf(M)?M:null)}).catch(()=>{A||b(null)}),()=>{A=!0}},[f,n,c]);let S=c??v,p=d??v,y=Dn.default.useMemo(()=>kE(e.data,e.contentType,p??f),[e.data,e.contentType,p,f]),m=y==="application/pdf",g=y?.startsWith("image/")??!1,x=GE(y??e.contentType),{jsonString:_,jsonError:E}=Dn.default.useMemo(()=>{if(e.data==null)return{jsonString:null,jsonError:null};try{return{jsonString:JSON.stringify(e.data,null,2),jsonError:null}}catch(A){return{jsonString:null,jsonError:A instanceof Error?A.message:String(A)}}},[e.data]);Dn.default.useEffect(()=>{a!=="html"||!u.current||u.current.querySelectorAll("a").forEach(A=>{A.setAttribute("target","_blank"),A.setAttribute("rel","noopener noreferrer")})},[a,e.dataHtml]);function w(A){let M=h||e.name;return(0,re.jsxs)("div",{className:"stuff-viewer-local-file",children:[(0,re.jsx)("div",{className:"stuff-viewer-local-file-icon",children:WE}),(0,re.jsxs)("div",{className:"stuff-viewer-local-file-info",children:[M&&(0,re.jsx)("div",{className:"stuff-viewer-local-file-name",children:M}),(0,re.jsxs)("div",{className:"stuff-viewer-local-file-hint",children:[A," \u2014 no preview available"]})]})]})}function N(A){return(0,re.jsxs)("div",{className:"stuff-viewer-error",role:"alert",children:[(0,re.jsx)("div",{className:"stuff-viewer-error-title",children:"Unable to serialize data"}),(0,re.jsx)("div",{className:"stuff-viewer-error-detail",children:A})]})}function k(){if(a==="html"){if(m){if(o!==!1&&S){let M=S.includes("#")?S:`${S}#pagemode=none`;return(0,re.jsx)("div",{className:"stuff-viewer-pdf",children:(0,re.jsx)("embed",{src:M,type:"application/pdf"})})}if(p){let M=h||e.name;return(0,re.jsxs)("button",{type:"button",className:"stuff-viewer-local-file stuff-viewer-local-file--button",onClick:P,children:[(0,re.jsx)("div",{className:"stuff-viewer-local-file-icon",children:WE}),(0,re.jsxs)("div",{className:"stuff-viewer-local-file-info",children:[M&&(0,re.jsx)("div",{className:"stuff-viewer-local-file-name",children:M}),(0,re.jsx)("div",{className:"stuff-viewer-local-file-hint",children:"Click to open PDF externally"})]})]})}return w("PDF")}return g?S?(0,re.jsx)("div",{className:"stuff-viewer-image",children:(0,re.jsx)("img",{src:S,alt:e.name??"(unnamed stuff)"})}):w("Image"):e.dataHtml?(0,re.jsx)("div",{className:"stuff-viewer-html",dangerouslySetInnerHTML:{__html:FE.sanitize(e.dataHtml)}}):_?(0,re.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Gf(_)}}):E?N(E):(0,re.jsx)("div",{className:"stuff-viewer-placeholder",children:"No content available"})}return a==="json"?_?(0,re.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Gf(_)}}):E?N(E):(0,re.jsx)("div",{className:"stuff-viewer-placeholder",children:"No JSON data available"}):e.dataText?(0,re.jsx)("pre",{className:"stuff-viewer-pre stuff-viewer-pre--nowrap",dangerouslySetInnerHTML:{__html:Gf(e.dataText)}}):_?(0,re.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Gf(_)}}):E?N(E):(0,re.jsx)("div",{className:"stuff-viewer-placeholder",children:"No text data available"})}function D(){let A;a==="json"?A=_||"":a==="text"?A=e.dataText||_||"":A=e.dataText||e.dataHtml||_||"",A&&navigator.clipboard&&navigator.clipboard.writeText(A).then(()=>{s(!0),setTimeout(()=>s(!1),1500)}).catch(()=>{})}function z(){if(g&&p){let A=y?.split("/")[1]||"png";JE(p,`${e.name||"stuff"}.${A}`);return}if(m&&p){JE(p,`${e.name||"stuff"}.pdf`);return}a==="json"?Yh(_||"{}",`${e.name||"stuff"}.json`,"application/json"):a==="text"?Yh(e.dataText||_||"",`${e.name||"stuff"}.txt`,"text/plain"):Yh(e.dataHtml||_||"",`${e.name||"stuff"}.html`,"text/html")}function P(){if(p){if(i){i(p,h??void 0);return}window.open(p,"_blank","noopener,noreferrer")}}let T=["stuff-viewer",t].filter(Boolean).join(" ");return(0,re.jsxs)("div",{className:T,children:[(0,re.jsxs)("div",{className:"stuff-viewer-header",children:[(0,re.jsx)("h3",{className:"stuff-viewer-title",children:e.name??"(unnamed stuff)"}),e.concept&&(0,re.jsx)("p",{className:"stuff-viewer-subtitle",children:e.concept})]}),(0,re.jsxs)("div",{className:"stuff-viewer-toolbar",children:[(0,re.jsx)("div",{className:"stuff-viewer-tabs",children:["html","json","text"].map(A=>(0,re.jsx)("button",{type:"button",className:`stuff-viewer-tab${a===A?" stuff-viewer-tab--active":""}`,onClick:()=>l(A),children:A==="html"?x:A==="json"?"JSON":"Pretty"},A))}),(0,re.jsxs)("div",{className:"stuff-viewer-actions",children:[p&&(0,re.jsx)("button",{type:"button",className:"stuff-viewer-action-btn",onClick:P,title:"Open in new window","aria-label":"Open in new window",children:XO}),(0,re.jsx)("button",{type:"button",className:`stuff-viewer-action-btn${r?" stuff-viewer-action-btn--copied":""}`,onClick:D,title:"Copy","aria-label":"Copy",children:r?VO:IO}),(0,re.jsx)("button",{type:"button",className:"stuff-viewer-action-btn",onClick:z,title:"Download","aria-label":"Download",children:YO})]})]}),(0,re.jsx)("div",{className:"stuff-viewer-content",ref:u,children:k()})]})}var eT=oe(wt(),1);var Ma=oe(ge(),1);function tT({isOpen:e,onClose:t,children:n,width:o,isDragging:i,onResizeHandleMouseDown:a,closeOnEscape:l=!0}){eT.default.useEffect(()=>{if(!e||!l)return;let s=u=>{u.key==="Escape"&&t()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,l,t]);let r=["detail-panel",!e&&"detail-panel--closed",i&&"detail-panel--dragging"].filter(Boolean).join(" ");return(0,Ma.jsxs)("div",{className:r,style:o?{width:`${o}px`}:void 0,children:[a&&(0,Ma.jsx)("div",{className:"detail-panel-resize-handle",onMouseDown:a,role:"separator","aria-orientation":"vertical","aria-label":"Resize panel"}),(0,Ma.jsxs)("div",{className:"detail-panel-content",children:[(0,Ma.jsx)("div",{className:"detail-panel-close-row",children:(0,Ma.jsx)("button",{className:"detail-panel-close",onClick:t,"aria-label":"Close panel",children:"x"})}),n]})]})}var Da=oe(wt(),1),qO=.6;function nT({defaultWidth:e,minWidth:t,maxWidth:n,containerRef:o}){let[i,a]=Da.default.useState(e),[l,r]=Da.default.useState(!1),s=Da.default.useRef({startX:0,startWidth:0,maxAllowed:n}),u=Da.default.useRef(null),c=Da.default.useCallback(d=>{d.preventDefault(),d.stopPropagation();let f=o?.current?.getBoundingClientRect().width,h=f?Math.min(n,f*qO):n;s.current={startX:d.clientX,startWidth:i,maxAllowed:h},r(!0),document.body.style.userSelect="none",document.body.style.cursor="col-resize"},[i,n,o]);return Da.default.useEffect(()=>{if(!l)return;let d=h=>{u.current!==null&&cancelAnimationFrame(u.current),u.current=requestAnimationFrame(()=>{let{startX:v,startWidth:b,maxAllowed:S}=s.current,p=v-h.clientX,y=Math.max(t,Math.min(S,b+p));a(y),u.current=null})},f=()=>{r(!1),document.body.style.userSelect="",document.body.style.cursor="",u.current!==null&&(cancelAnimationFrame(u.current),u.current=null)};return document.addEventListener("mousemove",d),document.addEventListener("mouseup",f),()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",f),document.body.style.userSelect="",document.body.style.cursor="",u.current!==null&&(cancelAnimationFrame(u.current),u.current=null)}},[l,t]),{width:i,isDragging:l,handleMouseDown:c}}var aT=oe(wt(),1);var Uf=oe(wt(),1),Ve=oe(ge(),1);function Xh(e){return e<1?`${(e*1e3).toFixed(0)}ms`:`${e.toFixed(2)}s`}function te({label:e,value:t}){return t==null?null:(0,Ve.jsxs)("div",{className:"detail-kv-row",children:[(0,Ve.jsx)("span",{className:"detail-kv-key",children:e}),(0,Ve.jsx)("span",{className:"detail-kv-value",children:String(t)})]})}function qh({label:e,text:t}){return t?(0,Ve.jsxs)("div",{children:[(0,Ve.jsx)("div",{className:"detail-section-label",children:e}),(0,Ve.jsx)("div",{className:"detail-prompt-block",children:t})]}):null}var ZO=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})}),jO=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),$O=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),KO=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}),oT={all:"unset",cursor:"pointer",display:"flex",alignItems:"center",gap:4,fontSize:9,color:"#64748b",padding:"2px 6px",borderRadius:3,background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.06)",transition:"color 0.15s"};function lo({label:e,templateText:t,renderedText:n}){let[o,i]=(0,Uf.useState)(!1),[a,l]=(0,Uf.useState)(!1),[r,s]=(0,Uf.useState)(!1),u=!!t,c=!!n;if(!u&&!c)return null;let d=u&&c,f=d?o?t:n:t||n;function h(){!f||!navigator.clipboard||navigator.clipboard.writeText(f).then(()=>{l(!0),setTimeout(()=>l(!1),1500)}).catch(()=>{})}return(0,Ve.jsxs)("div",{children:[(0,Ve.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:4},children:[(0,Ve.jsx)("div",{className:"detail-section-label",style:{marginBottom:0},children:e}),(0,Ve.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,Ve.jsx)("button",{onClick:()=>s(v=>!v),title:r?"Collapse prompt":"Expand prompt","aria-label":r?"Collapse prompt":"Expand prompt",className:"detail-prompt-expand-btn",children:r?jO:ZO}),(0,Ve.jsx)("button",{onClick:h,title:"Copy prompt","aria-label":"Copy prompt",style:{...oT,color:a?"#10b981":"#64748b"},children:a?KO:$O}),d&&(0,Ve.jsxs)("button",{onClick:()=>i(v=>!v),style:oT,children:[(0,Ve.jsx)("span",{style:{width:22,height:12,borderRadius:6,background:o?"rgba(255,255,255,0.12)":"#50FA7B33",position:"relative",display:"inline-block",transition:"background 0.15s"},children:(0,Ve.jsx)("span",{style:{position:"absolute",top:2,left:o?2:12,width:8,height:8,borderRadius:"50%",background:o?"#94a3b8":"#50FA7B",transition:"left 0.15s, background 0.15s"}})}),o?"template":"rendered"]})]})]}),(0,Ve.jsx)("div",{className:`detail-prompt-block ${r?"detail-prompt-block--expanded":"detail-prompt-block--collapsed"}`,style:{marginTop:6},children:f})]})}var Lt=oe(ge(),1);function Zh({blueprint:e,executionData:t}){let n=e.llm_prompt_spec,o=n.user_image_references&&n.user_image_references.length>0,i=n.user_document_references&&n.user_document_references.length>0,a=n.system_image_references&&n.system_image_references.length>0,l=n.system_document_references&&n.system_document_references.length>0,r=t?.resolved_model,s=t?.resolved_model_for_object,u=t?.rendered_system_prompt,c=t?.rendered_user_prompt,d=t?.structuring_path,f=t?.is_multiple_output,h=r||e.llm_choices?.for_text,v=s||e.llm_choices?.for_object;return(0,Lt.jsxs)(Lt.Fragment,{children:[(0,Lt.jsx)(te,{label:"Model",value:h}),v&&v!==h&&(0,Lt.jsx)(te,{label:"Model (object)",value:v}),(0,Lt.jsx)(te,{label:"Structuring",value:d||e.structuring_method}),(0,Lt.jsx)(te,{label:"Multiple Output",value:f}),(0,Lt.jsx)(te,{label:"Output Multiplicity",value:e.output_multiplicity}),(0,Lt.jsx)(te,{label:"Prompt Category",value:n.prompt_blueprint?.category}),o&&(0,Lt.jsx)(te,{label:"User Image Refs",value:`${n.user_image_references.length} references`}),i&&(0,Lt.jsx)(te,{label:"User Document Refs",value:`${n.user_document_references.length} references`}),a&&(0,Lt.jsx)(te,{label:"System Image Refs",value:`${n.system_image_references.length} references`}),l&&(0,Lt.jsx)(te,{label:"System Document Refs",value:`${n.system_document_references.length} references`}),(0,Lt.jsx)(lo,{label:"System Prompt",templateText:n.system_prompt_blueprint?.template,renderedText:u}),(0,Lt.jsx)(lo,{label:"Prompt",templateText:n.prompt_blueprint?.template,renderedText:c})]})}function jh(e){return null}var cn=oe(ge(),1);function $h({blueprint:e,executionData:t}){let n=e.img_gen_prompt_blueprint,o=t?.resolved_model,i=t?.rendered_prompt,a=t?.rendered_negative_prompt;return(0,cn.jsxs)(cn.Fragment,{children:[(0,cn.jsx)(te,{label:"Model",value:o||e.img_gen_choice}),(0,cn.jsx)(lo,{label:"Prompt",templateText:n.prompt_blueprint?.template,renderedText:i}),(0,cn.jsx)(lo,{label:"Negative Prompt",templateText:n.negative_prompt_blueprint?.template,renderedText:a}),(0,cn.jsx)(te,{label:"Aspect Ratio",value:e.aspect_ratio}),(0,cn.jsx)(te,{label:"Output Format",value:e.output_format}),(0,cn.jsx)(te,{label:"Background",value:e.background}),(0,cn.jsx)(te,{label:"Is Raw",value:e.is_raw}),(0,cn.jsx)(te,{label:"Seed",value:e.seed}),(0,cn.jsx)(te,{label:"Images",value:t?.nb_images??e.output_multiplicity})]})}function Kh(e){return null}var fn=oe(ge(),1);function Qh({blueprint:e,executionData:t}){let n=t?.resolved_model;return(0,fn.jsxs)(fn.Fragment,{children:[(0,fn.jsx)(te,{label:"Model",value:n||e.extract_choice}),(0,fn.jsx)(te,{label:"Document Variable",value:e.document_stuff_name}),(0,fn.jsx)(te,{label:"Caption Images",value:e.should_caption_images}),(0,fn.jsx)(te,{label:"Max Page Images",value:e.max_page_images}),(0,fn.jsx)(te,{label:"Include Page Views",value:e.should_include_page_views}),(0,fn.jsx)(te,{label:"Page Views DPI",value:e.page_views_dpi}),(0,fn.jsx)(te,{label:"Render JS",value:e.render_js}),(0,fn.jsx)(te,{label:"Include Raw HTML",value:e.include_raw_html}),(0,fn.jsx)(te,{label:"Image Variable",value:e.image_stuff_name})]})}function Fh(e){return null}var dn=oe(ge(),1);function Wh({blueprint:e,executionData:t}){let n=t?.resolved_model,o=t?.rendered_query;return(0,dn.jsxs)(dn.Fragment,{children:[(0,dn.jsx)(te,{label:"Model",value:n||e.search_choice}),(0,dn.jsx)(lo,{label:"Search Query",templateText:e.prompt_blueprint.template,renderedText:o}),(0,dn.jsx)(te,{label:"Max Results",value:e.max_results_override}),(0,dn.jsx)(te,{label:"Include Images",value:e.include_images_override}),(0,dn.jsx)(te,{label:"Structured Output",value:e.is_structured_output}),(0,dn.jsx)(te,{label:"From Date",value:e.from_date}),(0,dn.jsx)(te,{label:"To Date",value:e.to_date}),e.include_domains&&e.include_domains.length>0&&(0,dn.jsx)(te,{label:"Include Domains",value:e.include_domains.join(", ")}),e.exclude_domains&&e.exclude_domains.length>0&&(0,dn.jsx)(te,{label:"Exclude Domains",value:e.exclude_domains.join(", ")})]})}function Jh(e){return null}var Le=oe(ge(),1);function QO(e){switch(e.method){case"from_var":{let t=`\u2190 ${e.from_path??"?"}`;return e.list_to_dict_keyed_by?`${t} (keyed by ${e.list_to_dict_keyed_by})`:t}case"fixed":return`= ${JSON.stringify(e.fixed_value)}`;case"nested":return"(nested construct)";case"template":return e.template??"(empty template)"}}var FO=60;function WO(e){return e.length>FO||e.includes(`
|
|
2475
|
-
`)}function JO({label:e,value:t}){return(0,Le.jsxs)("div",{className:"detail-field-block",children:[(0,Le.jsx)("div",{className:"detail-field-block-label",children:e}),(0,Le.jsx)("div",{className:"detail-field-block-value",children:t})]})}function iT({blueprint:e,depth:t,fieldResolutions:n}){let o=[],i=[],a=[];for(let[r,s]of Object.entries(e.fields))s.method==="template"?a.push([r,s]):s.method==="nested"?i.push([r,s]):o.push([r,s]);let l=t>0?{paddingLeft:t*12}:void 0;return(0,Le.jsxs)(Le.Fragment,{children:[o.map(([r,s])=>{let u=QO(s);return WO(u)?(0,Le.jsx)("div",{style:l,children:(0,Le.jsx)(JO,{label:r,value:u})},r):(0,Le.jsx)("div",{style:l,children:(0,Le.jsx)(te,{label:r,value:u})},r)}),a.map(([r,s])=>{let u=n?.[r]?.rendered;return(0,Le.jsx)("div",{style:l,children:(0,Le.jsx)(lo,{label:`Template \u2014 ${r}`,templateText:s.template??null,renderedText:u})},r)}),i.map(([r,s])=>s.nested?(0,Le.jsxs)("div",{children:[(0,Le.jsxs)("div",{className:"detail-nested-header",style:t>0?{paddingLeft:t*12}:void 0,children:[(0,Le.jsx)("span",{className:"detail-nested-header-name",children:r}),(0,Le.jsxs)("span",{className:"detail-nested-header-meta",children:["nested \xB7 ",Object.keys(s.nested.fields).length," field",Object.keys(s.nested.fields).length===1?"":"s"]})]}),(0,Le.jsx)(iT,{blueprint:s.nested,depth:t+1,fieldResolutions:null})]},r):null)]})}function eg({blueprint:e,executionData:t}){let n=t?.rendered_text,o=t?.compose_mode,i=t?.fields??null,a=e.construct_blueprint,l=a!==null&&Object.keys(a.fields).length>0;return(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)(te,{label:"Mode",value:o||(l?"construct":"template")}),(0,Le.jsx)(te,{label:"Category",value:e.category}),(0,Le.jsx)(te,{label:"Templating Style",value:e.templating_style}),e.template&&(0,Le.jsx)(lo,{label:"Template",templateText:e.template,renderedText:n}),l&&(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)("div",{className:"detail-section-label",children:"FIELDS"}),(0,Le.jsx)(iT,{blueprint:a,depth:0,fieldResolutions:i})]})]})}function tg(e){return null}var Gt=oe(ge(),1);function ng({blueprint:e,executionData:t}){let n=t?.evaluated_expression,o=t?.selected_outcome;return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(qh,{label:"Expression",text:e.expression}),n&&(0,Gt.jsx)(te,{label:"Expression Result",value:n}),(0,Gt.jsxs)("div",{children:[(0,Gt.jsx)("div",{className:"detail-section-label",children:"Outcomes"}),Object.entries(e.outcome_map).map(([i,a])=>(0,Gt.jsxs)("div",{className:"detail-kv-row",style:o===a?{background:"rgba(80,250,123,0.08)"}:void 0,children:[(0,Gt.jsx)("span",{className:"detail-kv-key",children:i}),(0,Gt.jsx)("span",{className:"detail-kv-value",style:o===a?{color:"#50FA7B"}:void 0,children:a})]},i)),(0,Gt.jsxs)("div",{className:"detail-kv-row",children:[(0,Gt.jsx)("span",{className:"detail-kv-key",children:"default"}),(0,Gt.jsx)("span",{className:"detail-kv-value",children:e.default_outcome})]})]}),(0,Gt.jsx)(te,{label:"Alias Expression To",value:e.add_alias_from_expression_to})]})}function og(e){return null}var ni=oe(ge(),1);function ig({blueprint:e}){return(0,ni.jsxs)("div",{children:[(0,ni.jsx)("div",{className:"detail-section-label",children:"Steps"}),(0,ni.jsx)("div",{className:"detail-steps-list",children:e.sequential_sub_pipes.map((t,n)=>(0,ni.jsxs)("div",{className:"detail-step-item",children:[(0,ni.jsx)("span",{className:"detail-step-index",children:n+1}),(0,ni.jsx)("span",{className:"detail-step-code",children:t.pipe_code}),t.output_name&&(0,ni.jsxs)("span",{className:"detail-io-concept",children:["-> ",t.output_name]})]},n))})]})}function ag(e){return null}var Rn=oe(ge(),1);function lg({blueprint:e}){return(0,Rn.jsxs)(Rn.Fragment,{children:[(0,Rn.jsxs)("div",{children:[(0,Rn.jsx)("div",{className:"detail-section-label",children:"Branches"}),(0,Rn.jsx)("div",{className:"detail-steps-list",children:e.parallel_sub_pipes.map((t,n)=>(0,Rn.jsxs)("div",{className:"detail-step-item",children:[(0,Rn.jsx)("span",{className:"detail-step-code",children:t.pipe_code}),t.output_name&&(0,Rn.jsxs)("span",{className:"detail-io-concept",children:["-> ",t.output_name]})]},n))})]}),(0,Rn.jsx)(te,{label:"Add Each Output",value:e.add_each_output}),(0,Rn.jsx)(te,{label:"Combined Output",value:e.combined_output})]})}function rg(e){return null}var oi=oe(ge(),1);function sg({blueprint:e,executionData:t}){let n=t?.item_count;return(0,oi.jsxs)(oi.Fragment,{children:[(0,oi.jsx)(te,{label:"Branch Pipe",value:e.branch_pipe_code}),(0,oi.jsx)(te,{label:"Input List Variable",value:e.batch_params.input_list_stuff_name}),(0,oi.jsx)(te,{label:"Input Item Variable",value:e.batch_params.input_item_stuff_name}),n!=null&&(0,oi.jsx)(te,{label:"Items Processed",value:n})]})}function ug(e){return null}var K=oe(ge(),1),e3={PipeLLM:"LLM",PipeExtract:"Extract",PipeCompose:"Compose",PipeImgGen:"ImgGen",PipeSearch:"Search",PipeFunc:"Func",PipeSignature:"Signature",PipeSequence:"Seq",PipeParallel:"Par",PipeCondition:"Cond",PipeBatch:"Batch"},t3=new Set(["PipeSequence","PipeParallel","PipeCondition","PipeBatch"]),n3={succeeded:"#50FA7B",failed:"#FF5555",running:"#8BE9FD",scheduled:"#6272a4",skipped:"#6272a4",canceled:"#6272a4"};function lT({node:e,spec:t,onConceptClick:n}){let o=e.pipe_type,i=t3.has(o),a=e3[o],l=e.status,r=n3[l]??"#6272a4",s=aT.default.useMemo(()=>{if(!e.pipe_code||!t.pipe_registry)return;let f=`${t.pipeline_ref?.domain??""}.${e.pipe_code}`,h=OE(t,f);if(h)return h;for(let[v,b]of Object.entries(t.pipe_registry))if(v.endsWith(`.${e.pipe_code}`))return b},[e.pipe_code,t]),u=e.io?.inputs??[],c=e.io?.outputs??[],d=s?.description??e.description;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)("div",{className:"detail-sticky-header",children:[(0,K.jsxs)("div",{className:"detail-header",children:[(0,K.jsx)("span",{className:`detail-badge ${i?"detail-badge--controller":"detail-badge--operator"}`,children:a}),(0,K.jsx)("span",{className:`detail-pipe-code ${i?"detail-pipe-code--controller":""}`,children:e.pipe_code})]}),(0,K.jsxs)("div",{className:"detail-status",children:[(0,K.jsx)("span",{className:"detail-status-dot",style:{background:r}}),(0,K.jsx)("span",{className:"detail-status-label",style:{color:r},children:l}),e.timing?.duration!=null&&(0,K.jsx)("span",{className:"detail-duration",children:Xh(e.timing.duration)})]}),d&&(0,K.jsx)("div",{className:"detail-description",children:d}),u.length>0&&(0,K.jsxs)("div",{children:[(0,K.jsx)("div",{className:"detail-section-label",children:"Inputs"}),(0,K.jsx)("div",{className:"detail-io-list",children:u.map((f,h)=>(0,K.jsxs)("div",{className:"detail-io-pill",style:{cursor:f.concept&&n?"pointer":void 0},onClick:()=>f.concept&&n?.(f.concept),children:[(0,K.jsx)("span",{className:"detail-io-name",children:f.name}),f.concept&&(0,K.jsx)("span",{className:"detail-io-concept",children:f.concept})]},h))})]}),c.length>0&&(0,K.jsxs)("div",{children:[(0,K.jsx)("div",{className:"detail-section-label",children:"Output"}),(0,K.jsx)("div",{className:"detail-io-list",children:c.map((f,h)=>(0,K.jsxs)("div",{className:"detail-io-pill",style:{cursor:f.concept&&n?"pointer":void 0},onClick:()=>f.concept&&n?.(f.concept),children:[(0,K.jsx)("span",{className:"detail-io-name",children:f.name}),f.concept&&(0,K.jsx)("span",{className:"detail-io-concept",children:f.concept})]},h))})]}),(u.length>0||c.length>0)&&(0,K.jsx)("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)",margin:"4px 0"}})]}),s&&(0,K.jsx)(o3,{blueprint:s,executionData:e.execution_data}),e.execution_data&&Object.keys(e.execution_data).length>0&&(0,K.jsx)(i3,{executionData:e.execution_data,pipeType:o}),e.error&&(0,K.jsxs)("div",{className:"detail-error",children:[(0,K.jsx)("div",{className:"detail-error-type",children:e.error.error_type}),(0,K.jsx)("div",{className:"detail-error-message",children:e.error.message}),e.error.stack&&(0,K.jsx)("div",{className:"detail-error-stack",children:e.error.stack})]}),e.metrics&&Object.keys(e.metrics).length>0&&(0,K.jsxs)("div",{children:[(0,K.jsx)("div",{className:"detail-section-label",children:"Metrics"}),Object.entries(e.metrics).map(([f,h])=>(0,K.jsx)(te,{label:f,value:typeof h=="number"?h.toLocaleString():String(h)},f))]}),e.tags&&Object.keys(e.tags).length>0&&(0,K.jsxs)("div",{children:[(0,K.jsx)("div",{className:"detail-section-label",children:"Tags"}),(0,K.jsx)("div",{className:"detail-tags",children:Object.entries(e.tags).map(([f,h])=>(0,K.jsxs)("span",{className:"detail-tag",children:[(0,K.jsxs)("span",{className:"detail-tag-key",children:[f,": "]}),(0,K.jsx)("span",{className:"detail-tag-value",children:h})]},f))})]}),!s&&(0,K.jsx)("div",{className:"detail-not-available",children:"Blueprint not available"})]})}function o3({blueprint:e,executionData:t}){switch(e.type){case"PipeLLM":return(0,K.jsx)(Zh,{blueprint:e,executionData:t});case"PipeImgGen":return(0,K.jsx)($h,{blueprint:e,executionData:t});case"PipeCompose":return(0,K.jsx)(eg,{blueprint:e,executionData:t});case"PipeExtract":return(0,K.jsx)(Qh,{blueprint:e,executionData:t});case"PipeSearch":return(0,K.jsx)(Wh,{blueprint:e,executionData:t});case"PipeSequence":return(0,K.jsx)(ig,{blueprint:e,executionData:t});case"PipeParallel":return(0,K.jsx)(lg,{blueprint:e,executionData:t});case"PipeCondition":return(0,K.jsx)(ng,{blueprint:e,executionData:t});case"PipeBatch":return(0,K.jsx)(sg,{blueprint:e,executionData:t});case"PipeFunc":return null;case"PipeSignature":return(0,K.jsx)("div",{className:"detail-not-available",children:"Signature stub \u2014 declared but not yet implemented."});default:return null}}function i3({executionData:e,pipeType:t}){switch(t){case"PipeLLM":return(0,K.jsx)(jh,{data:e});case"PipeImgGen":return(0,K.jsx)(Kh,{data:e});case"PipeExtract":return(0,K.jsx)(Fh,{data:e});case"PipeSearch":return(0,K.jsx)(Jh,{data:e});case"PipeCompose":return(0,K.jsx)(tg,{data:e});case"PipeCondition":return(0,K.jsx)(og,{data:e});case"PipeSequence":return(0,K.jsx)(ag,{data:e});case"PipeParallel":return(0,K.jsx)(rg,{data:e});case"PipeBatch":return(0,K.jsx)(ug,{data:e});default:return(0,K.jsx)(a3,{data:e})}}function a3({data:e}){let t=Object.entries(e);return t.length===0?null:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)("div",{className:"detail-section-label",children:"Execution"}),t.map(([n,o])=>(0,K.jsx)(te,{label:n,value:String(o)},n))]})}var cg=oe(wt(),1);var Ee=oe(ge(),1);function fg({concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a,instanceKey:l}){return(0,Ee.jsxs)(Ee.Fragment,{children:[(0,Ee.jsxs)("div",{className:"detail-header",children:[(0,Ee.jsx)("span",{className:"detail-concept-code",children:e.code}),(0,Ee.jsx)("span",{className:"detail-concept-domain",children:e.domain_code})]}),e.description&&(0,Ee.jsx)("div",{className:"detail-description",children:e.description}),e.refines&&(0,Ee.jsxs)("div",{className:"detail-refines",children:["refines ",(0,Ee.jsx)("span",{className:"detail-refines-code",children:e.refines})]}),(0,Ee.jsx)(l3,{concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a},l??`${e.code}:${t&&"digest"in t?t.digest:t?.name??""}`)]})}function l3({concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}){let l=!!t&&!n,[r,s]=cg.default.useState(l?"data":"structure"),u=cg.default.useId(),c=b=>`${u}-tab-${b}`,d=b=>`${u}-tabpanel-${b}`,f=e.json_schema?(0,Ee.jsxs)("div",{children:[(0,Ee.jsx)("div",{className:"detail-section-label",children:"Structure"}),(0,Ee.jsx)(r3,{schema:e.json_schema,isDryRun:n})]}):(0,Ee.jsx)("div",{className:"detail-not-available",children:"Schema not available"});if(!l)return f;let h=b=>{let S;switch(b.key){case"ArrowLeft":case"ArrowRight":S=r==="data"?"structure":"data";break;case"Home":S="data";break;case"End":S="structure";break;default:return}b.preventDefault(),s(S),document.getElementById(c(S))?.focus()},v=(b,S)=>(0,Ee.jsx)("button",{type:"button",role:"tab",id:c(b),"aria-selected":r===b,"aria-controls":d(b),tabIndex:r===b?0:-1,className:`detail-tab ${r===b?"detail-tab--active":""}`,onClick:()=>s(b),onKeyDown:h,children:S});return(0,Ee.jsxs)(Ee.Fragment,{children:[(0,Ee.jsxs)("div",{className:"detail-tabs",role:"tablist","aria-label":"Concept views",children:[v("data","Data"),v("structure","Structure")]}),(0,Ee.jsx)("div",{role:"tabpanel",id:d(r),"aria-labelledby":c(r),children:r==="data"?(0,Ee.jsx)(Pf,{stuff:u3(t),resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}):f})]})}function r3({schema:e,isDryRun:t}){let n=e.properties,o=new Set(e.required??[]);if(!n||Object.keys(n).length===0)return(0,Ee.jsx)("div",{className:"detail-not-available",children:"No fields defined"});let i=Object.entries(n),a=t?i.filter(([l])=>o.has(l)):i;return(0,Ee.jsxs)("table",{className:"detail-schema-table",children:[(0,Ee.jsx)("thead",{children:(0,Ee.jsxs)("tr",{children:[(0,Ee.jsx)("th",{children:"Field"}),(0,Ee.jsx)("th",{children:"Type"}),(0,Ee.jsx)("th",{}),(0,Ee.jsx)("th",{children:"Description"})]})}),(0,Ee.jsx)("tbody",{children:a.map(([l,r])=>(0,Ee.jsxs)("tr",{children:[(0,Ee.jsx)("td",{className:"detail-schema-field",children:l}),(0,Ee.jsx)("td",{className:"detail-schema-type",children:s3(r)}),(0,Ee.jsx)("td",{children:o.has(l)&&(0,Ee.jsx)("span",{className:"detail-schema-required",children:"req"})}),(0,Ee.jsx)("td",{children:r.description??""})]},l))})]})}function s3(e){return e.type?String(e.type):e.anyOf?"union":e.allOf?"all":e.$ref?String(e.$ref).split("/").pop()??"(unresolved type)":"(unresolved type)"}function u3(e){return"digest"in e?e:{digest:e.digest??"",name:e.name,concept:e.concept,contentType:e.content_type,data:e.data,dataText:e.data_text,dataHtml:e.data_html}}function $l(e){return e.map(t=>({id:t.id,type:t.type,data:t.data,position:t.position,style:t.style,sourcePosition:t.sourcePosition,targetPosition:t.targetPosition,parentId:t.parentId,extent:t.extent,selected:t.selected}))}function Kl(e){return e.map(t=>({id:t.id,source:t.source,target:t.target,type:t.type,animated:t.animated,label:t.label,labelStyle:t.labelStyle,labelBgStyle:t.labelBgStyle,labelBgPadding:t.labelBgPadding,labelBgBorderRadius:t.labelBgBorderRadius,style:t.style,markerEnd:t.markerEnd}))}function If(e){return{pipeCode:e.pipe_code,pipeType:e.pipe_type,description:e.description,status:e.status,inputs:e.io.inputs.map(t=>({name:t.name,concept:t.concept??""})),outputs:e.io.outputs.map(t=>({name:t.name,concept:t.concept??""}))}}var c3=7,f3=48,d3=140;function p3(e,t,n){let o=[],i=[],a=new Set;for(let s of Object.values(t.stuffProducers))a.add(s);for(let s of Object.values(t.stuffConsumers))for(let u of s)a.add(u);for(let s of e.nodes){if(!a.has(s.id))continue;let u=Al(s,`nodes[${s.id}]`),c=u.status==="failed",d=u.pipe_code,f=If(u);o.push({id:u.id,type:Cl,data:{labelDescriptor:{kind:"pipe",label:d,isFailed:c},nodeData:u,isPipe:!0,isStuff:!1,labelText:d,pipeCode:f.pipeCode,pipeType:u.pipe_type,pipeCardData:f},position:{x:0,y:0}})}for(let[s,u]of Object.entries(t.stuffRegistry)){let c=Hi(s),d=u.name,f=u.concept||"",h=Math.max(d.length,f.length)*c3+f3,v=Math.max(d3,h),b=!t.stuffProducers[s],S=!b&&!t.stuffConsumers[s]?.length,p=b?"input":S?"output":void 0,y=b?"var(--color-stuff-input-border, #50FA7B)":S?"var(--color-stuff-output-border, #a78bfa)":"var(--color-stuff-border)";o.push({id:c,type:g1,data:{labelDescriptor:{kind:"stuff",label:d,concept:f},isStuff:!0,isPipe:!1,labelText:d,stuffRole:p,stuffDigest:s},position:{x:0,y:0},style:{background:"var(--color-stuff-bg)",border:`2px solid ${y}`,borderRadius:"999px",padding:"0",width:v+"px",boxShadow:"var(--shadow-md)"}})}let l=0;for(let[s,u]of Object.entries(t.stuffProducers)){let c=Hi(s);i.push({id:"edge_"+l++,source:u,target:c,type:n,animated:!1,style:{stroke:"var(--color-edge)",strokeWidth:2},markerEnd:{type:pa,color:"var(--color-edge)"}})}for(let[s,u]of Object.entries(t.stuffConsumers)){let c=Hi(s);for(let d of u)i.push({id:"edge_"+l++,source:c,target:d,type:n,animated:!1,style:{stroke:"var(--color-edge)",strokeWidth:2},markerEnd:{type:pa,color:"var(--color-edge)"}})}for(let s of e.edges){if(s.kind!=="parallel_combine"||!s.source_stuff_digest||!s.target_stuff_digest||!t.stuffRegistry[s.source_stuff_digest]||!t.stuffRegistry[s.target_stuff_digest])continue;let u=Hi(s.source_stuff_digest),c=Hi(s.target_stuff_digest);i.push({id:s.id,source:u,target:c,type:"smoothstep",animated:!1,style:{stroke:"var(--color-parallel-combine)",strokeWidth:2,strokeDasharray:"5,5"},markerEnd:{type:pa,color:"var(--color-parallel-combine)"}})}for(let s of e.edges){if(s.kind!=="batch_item"&&s.kind!=="batch_aggregate"||!s.source_stuff_digest||!s.target_stuff_digest||!t.stuffRegistry[s.source_stuff_digest]||!t.stuffRegistry[s.target_stuff_digest])continue;let u=Hi(s.source_stuff_digest),c=Hi(s.target_stuff_digest),d=s.kind==="batch_item";i.push({id:s.id,source:u,target:c,type:n,animated:!1,_batchEdge:!0,label:s.label||"",labelStyle:{fontSize:"10px",fontFamily:"var(--font-mono)",fill:d?"var(--color-batch-item)":"var(--color-batch-aggregate)"},labelBgStyle:{fill:"var(--color-bg)",fillOpacity:.9},style:{stroke:d?"var(--color-batch-item)":"var(--color-batch-aggregate)",strokeWidth:2,strokeDasharray:"5,5"},markerEnd:{type:pa,color:d?"var(--color-batch-item)":"var(--color-batch-aggregate)"}})}let r=To(e,t);for(let s of i){let u=r[s.source]||null,c=r[s.target]||null;u&&c&&u!==c&&(s._crossGroup=!0,s.style={...s.style,strokeWidth:1.5,opacity:.65})}for(let s of i)s._batchEdge&&(s.style={...s.style,opacity:.7});return{nodes:o,edges:i}}function rT(e,t){if(e){let n=RE(e);if(n&&(Object.keys(n.stuffProducers).length>0||Object.keys(n.stuffConsumers).length>0))return{graphData:p3(e,n,t),analysis:n}}return{graphData:{nodes:[],edges:[]},analysis:null}}function uT(e,t,n){let o=new Set([e]),a=t.nodes.find(l=>l.id===e)?.pipe_code;if(!a)return o;for(let l of t.nodes)l.pipe_code===a&&n.has(l.id)&&o.add(l.id);return o}function m3(e,t){let n=[],o=t[e],i=new Set;for(;o&&!i.has(o);)n.push(o),i.add(o),o=t[o];return n}function qs(e,t,n){let o=m3(e,t),i=null;for(let a of o)n.has(a)&&(i=a);return i}function Vf(e,t,n){return qs(e,t,n)??e}function sT(e,t){return e.nodes.find(n=>n.id===t)}function dg(e,t,n,o,i){if(o.size===0)return{nodes:e.nodes,edges:e.edges,analysis:t};let a=To(n,t),l=new Map;for(let p of o){let m=sT(n,p)?.io?.outputs;if(m)for(let g of m){if(!g.digest)continue;let x=l.get(g.digest);x||(x=new Set,l.set(g.digest,x)),x.add(p)}}if(l.size>0)for(let p of e.nodes){if(!wl(p.id))continue;let y=l.get(us(p.id));if(!y)continue;let m=a[p.id],g=null,x=new Set;for(;m&&!x.has(m);)x.add(m),y.has(m)&&(g=m),m=a[m];if(!g)continue;let _=a[g];_?a[p.id]=_:delete a[p.id]}let r=[];for(let p of e.nodes)qs(p.id,a,o)||r.push(p);for(let p of o){if(qs(p,a,o))continue;let y=sT(n,p);if(!y)continue;let m=If(Al(y,p));i&&(m.onExpand=x=>i(p,x));let g={id:p,type:Cl,data:{labelDescriptor:{kind:"pipe",label:m.pipeCode,isFailed:m.status==="failed"},nodeData:y,isPipe:!1,isStuff:!1,isController:!0,labelText:m.pipeCode,pipeCode:m.pipeCode,pipeType:y.pipe_type,pipeCardData:m},position:{x:0,y:0}};r.push(g)}let s=new Set;for(let p of t.controllerNodeIds)o.has(p)||qs(p,a,o)||s.add(p);let u={};for(let p of s){let y=t.containmentTree[p]??[],m=[];for(let g of y){let x=qs(g,a,o);x&&x!==g||m.push(g)}u[p]=m}let c=new Set;for(let p of Object.values(u))for(let y of p)c.add(y);let d={};for(let[p,y]of Object.entries(t.stuffProducers))d[p]=Vf(y,a,o);let f={};for(let[p,y]of Object.entries(t.stuffConsumers)){let m=new Set;for(let g of y)m.add(Vf(g,a,o));f[p]=[...m]}let h={stuffRegistry:t.stuffRegistry,stuffProducers:d,stuffConsumers:f,controllerNodeIds:s,childNodeIds:c,containmentTree:u},v=new Map;for(let p of e.edges){let y=Vf(p.source,a,o),m=Vf(p.target,a,o);if(y===m)continue;let g=p._batchEdge?"batch":"data",x=`${y}->${m}|${g}`;if(v.has(x))continue;let _={...p,source:y,target:m,id:p.id};p._batchEdge&&(y!==p.source||m!==p.target)&&(_.label="[N]"),delete _._crossGroup,v.set(x,_)}let b=To({...n,edges:n.edges.filter(p=>p.kind!=="contains"?!0:s.has(p.source))},h),S=[];for(let p of v.values()){let y=b[p.source]||null,m=b[p.target]||null;if(y&&m&&y!==m)p._crossGroup=!0,p.style={...p.style,strokeWidth:1.5,opacity:.65};else if(p.style&&(p.style.opacity===.65||p.style.strokeWidth===1.5)){let{opacity:g,strokeWidth:x,..._}=p.style;p.style={..._,strokeWidth:2},p.markerEnd||(p.markerEnd={type:pa,color:"var(--color-edge)"})}S.push(p)}return{nodes:r,edges:S,analysis:h}}var h3=window.ELK,cT=h3;function g3(e){switch(e){case"LR":return"RIGHT";case"RL":return"LEFT";case"BT":return"UP";default:return"DOWN"}}var y3="_in",v3="_out";function mg(e){return e+y3}function hg(e){return e+v3}function b3(e,t,n){let o={LR:{inSide:"WEST",outSide:"EAST"},RL:{inSide:"EAST",outSide:"WEST"},TB:{inSide:"NORTH",outSide:"SOUTH"},BT:{inSide:"SOUTH",outSide:"NORTH"}},{inSide:i,outSide:a}=o[n],l=n==="LR"||n==="RL",r=l?n==="LR"?0:t.width:t.width/2,s=l?t.height/2:n==="TB"?0:t.height,u=l?n==="LR"?t.width:0:t.width/2,c=l?t.height/2:n==="TB"?t.height:0;return[{id:mg(e),x:r,y:s,width:1,height:1,layoutOptions:{"elk.port.side":i}},{id:hg(e),x:u,y:c,width:1,height:1,layoutOptions:{"elk.port.side":a}}]}var S3=320,mT=28,x3=24,pg=8,_3=22,E3=50,T3=16,N3=3,fT=38,dT=30,Yf=22,C3=140,w3=100,A3=17,M3=58,D3=5.5,R3=5,O3=4.5,z3=4;function L3(e,t,n){if(!e)return 0;if(!t)return 1;let o=n-mT,i=Math.max(1,Math.floor(o/D3)),a=Math.ceil(e.length/i);return Math.min(N3,Math.max(1,a))}function H3(e,t){let n=Math.min(C3,Math.ceil(e.length*R3)),o=Math.min(w3,Math.ceil(t.length*O3));return n+o+A3}function pT(e,t){if(e.length===0)return 0;let n=t-mT-M3,o=1,i=0;for(let a of e){let l=H3(a.name,a.concept);if(i===0){i=l;continue}i+l<=n?i+=l:(o+=1,i=l)}return o}function Ql(e,t){let n=e.data||{},o=n.isStuff,i=n.labelText||"",a=e.type===Cl,l=t?180:280,r=t?240:400,s=Math.max(180,Math.min(r,i.length*8+60)),u;o?u=Math.max(180,s):a&&n.pipeCardData?u=r:u=Math.max(a?l:200,s);let c;if(o)c=60;else if(a&&n.pipeCardData){let d=n.pipeCardData,f=d.inputs??[],h=d.outputs??[],v=d.description||n.nodeData?.description||"",b=x3+(t?E3:_3),S=L3(v,t,u);S>0&&(b+=pg+S*T3);let p=f.slice(0,z3);if(p.length>0)if(b+=pg,t)b+=fT+(p.length-1)*Yf;else{let y=pT(p,u);b+=dT+(y-1)*Yf}if(h.length>0)if(b+=pg,t)b+=fT+(h.length-1)*Yf;else{let y=pT(h,u);b+=dT+(y-1)*Yf}c=Math.min(S3,b)}else c=a?120:70;return{width:u,height:c}}function B3(e,t){let n={},o=new Set;function i(a){if(n[a]!==void 0)return n[a];if(o.has(a))return 0;o.add(a);let l=t[a]||[],r=-1;for(let s of l)e.has(s)&&(r=Math.max(r,i(s)));return o.delete(a),n[a]=r+1,n[a]}for(let a of e)i(a);return n}function Xf(e,t,n){return{id:e,width:t.width,height:t.height,ports:b3(e,t,n),layoutOptions:{"elk.portConstraints":"FIXED_POS"}}}function hT(e,t,n,o,i,a){let l=i==="LR"||i==="RL",r=a?.nodesep??80,s=a?.ranksep??70,u=g3(i),c="30",d={"elk.algorithm":"layered","elk.direction":u,"elk.hierarchyHandling":"INCLUDE_CHILDREN","elk.spacing.nodeNode":String(r),"elk.layered.spacing.nodeNodeBetweenLayers":String(s),"elk.spacing.edgeNode":c,"elk.spacing.edgeEdge":"20","elk.layered.spacing.edgeNodeBetweenLayers":c,"elk.layered.spacing.edgeEdgeBetweenLayers":"15","elk.layered.nodePlacement.favorStraightEdges":"true"};if(!n||!o||o.controllerNodeIds.size===0){let x={},_=e.map(w=>{let N=Ql(w,l);return x[w.id]=N,Xf(w.id,N,i)}),E=t.map(w=>({id:w.id,sources:[hg(w.source)],targets:[mg(w.target)]}));return{elkGraph:{id:"root",layoutOptions:d,children:_,edges:E},dimensionMap:x}}let f=To(n,o),h=B3(o.controllerNodeIds,o.containmentTree),v={},b=new Map;for(let x of e)b.set(x.id,x);let S={},p=Array.from(o.controllerNodeIds);p.sort((x,_)=>(h[x]??0)-(h[_]??0));for(let x of p){let E=1+(h[x]??0)*.15,w=Math.round(Rc*E),N=Math.round(Oc*E),k=Math.round(zc*E),D={"elk.padding":`[top=${N},left=${w},bottom=${k},right=${w}]`,"elk.spacing.nodeNode":String(r),"elk.layered.spacing.nodeNodeBetweenLayers":String(s),"elk.spacing.edgeNode":c,"elk.layered.spacing.edgeNodeBetweenLayers":c},z=[],P=o.containmentTree[x]||[];for(let T of P)if(o.controllerNodeIds.has(T)){let A=S[T];A&&z.push(A)}else{let A=b.get(T);if(A){let M=Ql(A,l);v[T]=M,z.push(Xf(T,M,i))}}for(let T of e)if(T.data.isStuff&&f[T.id]===x&&!z.some(A=>A.id===T.id)){let A=Ql(T,l);v[T.id]=A,z.push(Xf(T.id,A,i))}S[x]={id:x,layoutOptions:D,children:z}}let y=[];for(let x of p)if(!f[x]){let _=S[x];_&&y.push(_)}for(let x of e)if(!f[x.id]&&!o.controllerNodeIds.has(x.id)){let _=Ql(x,l);v[x.id]=_,y.push(Xf(x.id,_,i))}let m=new Set(e.map(x=>x.id)),g=t.filter(x=>m.has(x.source)&&m.has(x.target)).map(x=>({id:x.id,sources:[hg(x.source)],targets:[mg(x.target)]}));return{elkGraph:{id:"root",layoutOptions:d,children:y,edges:g},dimensionMap:v}}function gT(e){let t={};function n(o,i,a){let l=i+(o.x??0),r=a+(o.y??0);o.id!=="root"&&(t[o.id]={x:l,y:r,width:o.width??0,height:o.height??0});for(let s of o.children??[])n(s,l,r)}return n(e,0,0),t}var gg=null;function k3(){return gg||(gg=new cT),gg}async function qf(e,t,n,o,i,a){if(e.length===0)return{nodes:[],edges:t,controllerPositions:{}};let l=n==="LR"||n==="RL",{elkGraph:r,dimensionMap:s}=hT(e,t,i??null,a??null,n,o),u=await k3().layout(r),c=gT(u),d={};if(a)for(let h of a.controllerNodeIds)c[h]&&(d[h]=c[h]);return{nodes:e.map(h=>{let v=c[h.id],b=s[h.id]??Ql(h,l),S=b.width,p=b.height,y=h.data.pipeCardData,g=y?{...y,direction:l?"LR":"TB"}:void 0;return{...h,data:{...h.data,_estimatedWidth:S,_estimatedHeight:p,pipeCardData:g},style:{...h.style,width:S+"px",height:p+"px"},position:{x:v?v.x:0,y:v?v.y:0},sourcePosition:l?n==="LR"?"right":"left":n==="TB"?"bottom":"top",targetPosition:l?n==="LR"?"left":"right":n==="TB"?"top":"bottom"}}),edges:t,controllerPositions:d}}var Zs=5;function G3(e,t,n){let o=new Set,i=[e];for(;i.length>0;){let a=i.pop();for(let l of t[a]||[])o.add(l),n.has(l)&&i.push(l)}return o}function P3(e,t,n,o){let i={};for(let v of n)i[v.id]=v;let a={};for(let v of e.nodes)t.controllerNodeIds.has(v.id)&&(a[v.id]=Al(v,`nodes[${v.id}]`));let l={},r=new Set;function s(v){if(l[v]!==void 0)return l[v];if(r.has(v))throw new Error(`Cycle detected in containment tree: controller "${v}" is part of a containment cycle`);r.add(v);let b=t.containmentTree[v]||[],S=-1;for(let p of b)t.controllerNodeIds.has(p)&&(S=Math.max(S,s(p)));return r.delete(v),l[v]=S+1,l[v]}let u=To(e,t),c={};for(let[v,b]of Object.entries(u))wl(v)&&i[v]&&(c[b]||(c[b]=[]),c[b].push(v));let d=Array.from(t.controllerNodeIds);for(let v of d)s(v);d.sort((v,b)=>l[v]-l[b]);let f=[],h={};for(let v of d){let S=(t.containmentTree[v]||[]).filter(D=>i[D]),p=c[v]||[],y=[...S,...p];if(y.length===0)continue;let m,g,x,_,E=o?.[v];if(E)m=E.x,g=E.y,x=E.width,_=E.height;else{let D=1/0,z=1/0,P=-1/0,T=-1/0;for(let V of y){let G=i[V],I=G.position,q=v1(G),j=b1(G);D=Math.min(D,I.x),z=Math.min(z,I.y),P=Math.max(P,I.x+q),T=Math.max(T,I.y+j)}let M=1+(l[v]??0)*.15,O=Math.round(Rc*M),R=Math.round(Oc*M),L=Math.round(zc*M);m=D-O,g=z-R,x=P-D+2*O,_=T-z+R+L}let w=a[v];if(!w)throw new cs(`nodes[${v}]`,`controller "${v}" is referenced by a "contains" edge but has no corresponding node in graphspec.nodes`);let N=w.pipe_code,k={id:v,type:y1,data:{label:N,pipeType:w.pipe_type,isController:!0,isPipe:!1,isStuff:!1,pipeCode:N,labelText:N},position:{x:m,y:g},style:{width:x+"px",height:_+"px",padding:"0"}};f.push(k),i[v]=k;for(let D of y)h[D]=v}for(let[v,b]of Object.entries(h)){let S=i[v],p=i[b];!S||!p||(S.position={x:S.position.x-p.position.x,y:S.position.y-p.position.y},S.parentId=b,S.extent="parent")}return f}function Fl(e,t,n,o,i,a,l,r,s){if(!i||!o||!n)return{nodes:e,edges:t};let u={},c=new Set,d={};for(let g of n.nodes)o.controllerNodeIds.has(g.id)&&(d[g.id]=g.pipe_type);for(let g of o.controllerNodeIds){let x=o.containmentTree[g]||[];u[g]=x.length;let _=d[g];(_==="PipeParallel"||_==="PipeBatch")&&x.length>Zs&&!a?.has(g)&&c.add(g)}let f=e,h=t;if(c.size>0){let g=new Set;for(let _ of c){let w=(o.containmentTree[_]||[]).slice(Zs);for(let N of w)if(g.add(N),o.controllerNodeIds.has(N))for(let k of G3(N,o.containmentTree,o.controllerNodeIds))g.add(k)}let x=To(n,o);for(let _ of e){if(!wl(_.id)||g.has(_.id))continue;let E=x[_.id];if(!E||!c.has(E)&&!g.has(E))continue;let w=t.filter(N=>{if(N.source!==_.id&&N.target!==_.id)return!1;let k=N.source===_.id?N.target:N.source;return!wl(k)});(w.length===0||w.every(N=>{let k=N.source===_.id?N.target:N.source;return g.has(k)}))&&g.add(_.id)}f=e.filter(_=>!g.has(_.id)),h=t.filter(_=>!g.has(_.source)&&!g.has(_.target))}let v=P3(n,o,f,r);if(v.length===0)return{nodes:f,edges:h};for(let g of v){let x=u[g.id]??0,_=c.has(g.id);if(g.data.childCount=x,g.data.isCollapsed=_,l){let E=g.id;g.data.onToggleCollapse=()=>l(E)}if(s){let E=g.id;g.data.onToggleFold=w=>s(E,w)}}let b=[...v,...f],S={};for(let g of b)S[g.id]=g;let p={},y=new Set;function m(g){if(p[g]!==void 0)return p[g];if(y.has(g))throw new Error(`Cycle detected in node parent chain: node "${g}" references itself as an ancestor`);y.add(g);let x=S[g];return p[g]=x&&x.parentId?1+m(x.parentId):0,y.delete(g),p[g]}for(let g of b)m(g.id);return b.sort((g,x)=>p[g.id]-p[x.id]),{nodes:b,edges:h}}var yT={"--font-sans":'"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',"--font-mono":'"JetBrains Mono", "Monaco", "Menlo", monospace'},U3={...yT,"--surface-page":"#0a0a0a","--surface-panel":"#111118","--surface-overlay":"rgba(17, 17, 24, 0.8)","--surface-overlay-hover":"rgba(30, 30, 40, 0.9)","--surface-overlay-disabled":"rgba(17, 17, 24, 0.6)","--surface-elevated":"rgba(255, 255, 255, 0.06)","--surface-elevated-hover":"rgba(255, 255, 255, 0.1)","--surface-sunken":"rgba(255, 255, 255, 0.03)","--surface-pill":"rgba(255, 255, 255, 0.06)","--surface-pill-border":"rgba(255, 255, 255, 0.08)","--border-subtle":"rgba(255, 255, 255, 0.06)","--border-default":"rgba(255, 255, 255, 0.1)","--border-strong":"rgba(255, 255, 255, 0.18)","--border-dashed":"rgba(255, 255, 255, 0.15)","--text-primary":"#f8fafc","--text-default":"#e2e8f0","--text-secondary":"#cbd5e1","--text-muted":"#94a3b8","--text-dim":"#64748b","--text-on-accent":"#0e0e0e","--shadow-sm":"0 2px 8px rgba(0, 0, 0, 0.4)","--shadow-md":"0 4px 16px rgba(0, 0, 0, 0.6)","--shadow-lg":"0 8px 24px rgba(0, 0, 0, 0.5)","--focus-ring":"rgba(59, 130, 246, 0.6)","--color-pipe":"#ff6b6b","--color-pipe-bg":"rgba(224,108,117,0.18)","--color-pipe-text":"#ffffff","--color-stuff":"#4ECDC4","--color-stuff-bg":"rgba(78,205,196,0.12)","--color-stuff-border":"#9ddcfd","--color-stuff-text":"#98FB98","--color-stuff-text-dim":"#9ddcfd","--color-edge":"#FFFACD","--color-batch-item":"#bd93f9","--color-batch-aggregate":"#50fa7b","--color-parallel-combine":"#d6a4ff","--color-success":"#50FA7B","--color-success-bg":"rgba(80,250,123,0.15)","--color-error":"#FF5555","--color-error-bg":"rgba(255,85,85,0.15)","--color-error-border":"rgba(255,85,85,0.2)","--color-accent":"#8BE9FD","--color-accent-strong":"#3b82f6","--color-warning":"#FFB86C","--ctrl-sequence-border":"rgba(148, 163, 184, 0.25)","--ctrl-sequence-bg":"rgba(148, 163, 184, 0.03)","--ctrl-sequence-text":"#94a3b8","--ctrl-parallel-border":"rgba(139, 233, 253, 0.35)","--ctrl-parallel-bg":"rgba(139, 233, 253, 0.03)","--ctrl-parallel-text":"#8be9fd","--ctrl-condition-border":"rgba(251, 191, 36, 0.35)","--ctrl-condition-bg":"rgba(251, 191, 36, 0.03)","--ctrl-condition-text":"#fbbf24","--ctrl-batch-border":"rgba(167, 139, 250, 0.35)","--ctrl-batch-bg":"rgba(167, 139, 250, 0.03)","--ctrl-batch-text":"#a78bfa","--ctrl-folded-bg":"rgba(148, 163, 184, 0.25)","--ctrl-folded-border":"rgba(148, 163, 184, 0.4)","--color-bg":"#0a0a0a","--color-bg-dots":"rgba(255, 255, 255, 0.35)","--color-text-muted":"#94a3b8","--color-controller-text":"#94a3b8"},I3={...yT,"--surface-page":"#f8fafc","--surface-panel":"#ffffff","--surface-overlay":"rgba(255, 255, 255, 0.92)","--surface-overlay-hover":"rgba(241, 245, 249, 0.96)","--surface-overlay-disabled":"rgba(255, 255, 255, 0.7)","--surface-elevated":"rgba(15, 23, 42, 0.05)","--surface-elevated-hover":"rgba(15, 23, 42, 0.09)","--surface-sunken":"rgba(15, 23, 42, 0.03)","--surface-pill":"rgba(15, 23, 42, 0.05)","--surface-pill-border":"rgba(15, 23, 42, 0.1)","--border-subtle":"rgba(15, 23, 42, 0.08)","--border-default":"rgba(15, 23, 42, 0.12)","--border-strong":"rgba(15, 23, 42, 0.22)","--border-dashed":"rgba(15, 23, 42, 0.18)","--text-primary":"#020617","--text-default":"#0f172a","--text-secondary":"#1e293b","--text-muted":"#475569","--text-dim":"#64748b","--text-on-accent":"#ffffff","--shadow-sm":"0 2px 8px rgba(15, 23, 42, 0.08)","--shadow-md":"0 4px 16px rgba(15, 23, 42, 0.14)","--shadow-lg":"0 8px 24px rgba(15, 23, 42, 0.15)","--focus-ring":"rgba(2, 132, 199, 0.5)","--color-pipe":"#dc2626","--color-pipe-bg":"rgba(220, 38, 38, 0.1)","--color-pipe-text":"#ffffff","--color-stuff":"#0891b2","--color-stuff-bg":"rgba(8, 145, 178, 0.08)","--color-stuff-border":"#0e7490","--color-stuff-text":"#0f172a","--color-stuff-text-dim":"#475569","--color-edge":"#64748b","--color-batch-item":"#7c3aed","--color-batch-aggregate":"#15803d","--color-parallel-combine":"#6d28d9","--color-success":"#15803d","--color-success-bg":"rgba(21, 128, 61, 0.12)","--color-error":"#dc2626","--color-error-bg":"rgba(220, 38, 38, 0.1)","--color-error-border":"rgba(220, 38, 38, 0.25)","--color-accent":"#0284c7","--color-accent-strong":"#0284c7","--color-warning":"#d97706","--ctrl-sequence-border":"rgba(71, 85, 105, 0.3)","--ctrl-sequence-bg":"rgba(71, 85, 105, 0.04)","--ctrl-sequence-text":"#475569","--ctrl-parallel-border":"rgba(8, 145, 178, 0.4)","--ctrl-parallel-bg":"rgba(8, 145, 178, 0.05)","--ctrl-parallel-text":"#0e7490","--ctrl-condition-border":"rgba(217, 119, 6, 0.4)","--ctrl-condition-bg":"rgba(217, 119, 6, 0.05)","--ctrl-condition-text":"#b45309","--ctrl-batch-border":"rgba(124, 58, 237, 0.4)","--ctrl-batch-bg":"rgba(124, 58, 237, 0.05)","--ctrl-batch-text":"#6d28d9","--ctrl-folded-bg":"rgba(71, 85, 105, 0.18)","--ctrl-folded-border":"rgba(71, 85, 105, 0.35)","--color-bg":"#f8fafc","--color-bg-dots":"rgba(15, 23, 42, 0.18)","--color-text-muted":"#475569","--color-controller-text":"#475569"};function Zf(e){return e===da.LIGHT?I3:U3}var Wl={direction:"LR",showControllers:!1,foldMode:to.EXPANDED,theme:yt.SYSTEM,nodesep:50,ranksep:100,edgeType:Dc.DEFAULT,initialZoom:null,panToTop:!0};var Ra=oe(ge(),1);function V3(e){return e.kind==="pipe"?(0,Ra.jsx)("div",{style:{padding:"10px 14px",display:"flex",flexDirection:"column",gap:"2px",textAlign:"center",width:"100%",boxSizing:"border-box",minWidth:0},title:e.label,children:(0,Ra.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:"13px",fontWeight:600,color:"var(--color-pipe-text)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label})}):(0,Ra.jsxs)("div",{style:{padding:"8px 24px",display:"flex",flexDirection:"column",alignItems:"center",gap:"2px",textAlign:"center",width:"100%",boxSizing:"border-box",minWidth:0},title:e.concept?`${e.label}: ${e.concept}`:e.label,children:[(0,Ra.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:"12px",fontWeight:600,color:"var(--color-stuff-text)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),e.concept&&(0,Ra.jsx)("span",{style:{fontSize:"14px",color:"var(--color-stuff-text-dim)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.concept})]})}function Jl(e){return e.map(t=>t.data.labelDescriptor?{...t,data:{...t.data,label:V3(t.data.labelDescriptor)}}:t)}var Z=oe(ge(),1),Y3=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,Z.jsx)("polyline",{points:"12 5 19 12 12 19"})]}),X3=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,Z.jsx)("polyline",{points:"19 12 12 19 5 12"})]}),q3=(0,Z.jsx)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,Z.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})}),Z3=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,Z.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),j3=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,Z.jsx)("polyline",{points:"9 21 3 21 3 15"}),(0,Z.jsx)("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),(0,Z.jsx)("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),$3=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z"}),(0,Z.jsx)("path",{d:"m7 16.5-4.74-2.85"}),(0,Z.jsx)("path",{d:"m7 16.5 5-3"}),(0,Z.jsx)("path",{d:"M7 16.5v5.17"}),(0,Z.jsx)("path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z"}),(0,Z.jsx)("path",{d:"m17 16.5-5-3"}),(0,Z.jsx)("path",{d:"m17 16.5 4.74-2.85"}),(0,Z.jsx)("path",{d:"M17 16.5v5.17"}),(0,Z.jsx)("path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z"}),(0,Z.jsx)("path",{d:"M12 8 7.26 5.15"}),(0,Z.jsx)("path",{d:"m12 8 4.74-2.85"}),(0,Z.jsx)("path",{d:"M12 13.5V8"})]}),K3=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"}),(0,Z.jsx)("polyline",{points:"2 2 6 6 2 6"}),(0,Z.jsx)("polyline",{points:"22 2 18 6 22 6"}),(0,Z.jsx)("polyline",{points:"2 22 6 18 2 18"}),(0,Z.jsx)("polyline",{points:"22 22 18 18 22 18"})]}),Q3=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("rect",{x:"9",y:"9",width:"6",height:"6",rx:"1"}),(0,Z.jsx)("polyline",{points:"3 3 7 7 3 7"}),(0,Z.jsx)("polyline",{points:"21 3 17 7 21 7"}),(0,Z.jsx)("polyline",{points:"3 21 7 17 3 17"}),(0,Z.jsx)("polyline",{points:"21 21 17 17 21 17"})]}),F3=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,Z.jsx)("line",{x1:"12",y1:"2",x2:"12",y2:"4"}),(0,Z.jsx)("line",{x1:"12",y1:"20",x2:"12",y2:"22"}),(0,Z.jsx)("line",{x1:"4.93",y1:"4.93",x2:"6.34",y2:"6.34"}),(0,Z.jsx)("line",{x1:"17.66",y1:"17.66",x2:"19.07",y2:"19.07"}),(0,Z.jsx)("line",{x1:"2",y1:"12",x2:"4",y2:"12"}),(0,Z.jsx)("line",{x1:"20",y1:"12",x2:"22",y2:"12"}),(0,Z.jsx)("line",{x1:"4.93",y1:"19.07",x2:"6.34",y2:"17.66"}),(0,Z.jsx)("line",{x1:"17.66",y1:"6.34",x2:"19.07",y2:"4.93"})]}),W3=(0,Z.jsx)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,Z.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),J3=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"}),(0,Z.jsx)("line",{x1:"8",y1:"21",x2:"16",y2:"21"}),(0,Z.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"21"})]}),yg=[yt.SYSTEM,yt.LIGHT,yt.DARK];function bT(e){let t=yg.indexOf(e);return yg[(t+1)%yg.length]}function ez(e){return e===yt.LIGHT?F3:e===yt.DARK?W3:J3}function vT(e){let t={[yt.SYSTEM]:"system",[yt.LIGHT]:"light",[yt.DARK]:"dark"},n=bT(e);return`Theme: ${t[e]} \u2014 switch to ${t[n]}`}function ST({direction:e,onDirectionChange:t,showControllers:n,onShowControllersChange:o,onZoomIn:i,onZoomOut:a,onFitView:l,onFoldAll:r,onExpandAll:s,foldAllDisabled:u=!1,expandAllDisabled:c=!1,themeMode:d,onThemeModeChange:f,rightOffset:h=0}){let v=d!==void 0&&f!==void 0,b=e===wn.TB||e===wn.BT,S=b?"Switch to horizontal layout":"Switch to vertical layout",p=n?"Hide pipe controllers":"Show pipe controllers \u2014 groups pipes by their controlling pipe",y=r||s,m=u?"Fold all controllers (nothing to fold)":"Fold all controllers",g=c?"Expand all controllers (nothing to expand)":"Expand all controllers";return(0,Z.jsxs)("div",{className:"graph-toolbar",style:{right:`${h+8}px`},children:[r&&(0,Z.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:r,disabled:u,title:m,"aria-label":m,children:K3}),s&&(0,Z.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:s,disabled:c,title:g,"aria-label":g,children:Q3}),y&&(0,Z.jsx)("div",{className:"graph-toolbar-separator"}),(0,Z.jsx)("button",{type:"button",className:`graph-toolbar-btn${n?" graph-toolbar-btn--active":""}`,onClick:()=>o(!n),title:p,"aria-label":p,children:$3}),(0,Z.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:()=>t(b?wn.LR:wn.TB),title:S,"aria-label":S,children:b?Y3:X3}),(a||i||l)&&(0,Z.jsx)("div",{className:"graph-toolbar-separator"}),a&&(0,Z.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:a,title:"Zoom out","aria-label":"Zoom out",children:q3}),i&&(0,Z.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:i,title:"Zoom in","aria-label":"Zoom in",children:Z3}),l&&(0,Z.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:l,title:"Fit view","aria-label":"Fit view",children:j3}),v&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("div",{className:"graph-toolbar-separator"}),(0,Z.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:()=>f(bT(d)),title:vT(d),"aria-label":vT(d),children:ez(d)})]})]})}var ii=oe(ge(),1),tz={PipeSequence:{badge:"Sequence",icon:"\u2192"},PipeParallel:{badge:"Parallel",icon:"//"},PipeCondition:{badge:"Condition",icon:"\u25C7"},PipeBatch:{badge:"Batch",icon:"\u2261"}};function nz(e){return e?tz[e]:{badge:"",icon:""}}function oz(e){return e?`controller-group--${e.replace("Pipe","").toLowerCase()}`:""}function iz({data:e}){let t=nz(e.pipeType),n=oz(e.pipeType),o=(e.pipeType==="PipeParallel"||e.pipeType==="PipeBatch")&&(e.childCount??0)>Zs,i=o?(e.childCount??0)-Zs:0;return(0,ii.jsxs)("div",{className:`controller-group-node ${n}`,children:[(0,ii.jsxs)("div",{className:"controller-group-header",children:[(0,ii.jsx)("span",{className:"controller-group-icon",children:t.icon}),(0,ii.jsx)("span",{className:"controller-group-badge",children:t.badge}),e.label&&(0,ii.jsx)("span",{className:"controller-group-label",children:e.label}),e.onToggleFold&&(0,ii.jsx)("button",{type:"button",className:"controller-group-fold",title:"Fold controller (alt/option: only this one)","aria-label":"Fold controller",onClick:a=>{a.stopPropagation(),e.onToggleFold?.({soloMode:a.altKey})},children:"\u2921"})]}),o&&(0,ii.jsx)("button",{className:"controller-group-collapse",onClick:a=>{a.stopPropagation(),e.onToggleCollapse?.()},children:e.isCollapsed?`+${i} hidden`:"collapse"})]})}var xT={controllerGroup:iz};var _T=oe(wt(),1),Fe=oe(ge(),1),az={PipeLLM:"LLM",PipeExtract:"Extract",PipeCompose:"Compose",PipeImgGen:"ImgGen",PipeSearch:"Search",PipeFunc:"Func",PipeSignature:"Signature",PipeSequence:"Sequence",PipeParallel:"Parallel",PipeCondition:"Condition",PipeBatch:"Batch"},lz={PipeSequence:!0,PipeParallel:!0,PipeCondition:!0,PipeBatch:!0};function rz(e){return e in lz}var sz={succeeded:{color:"#50FA7B",label:"Succeeded"},failed:{color:"#FF5555",label:"Failed"},running:{color:"#8BE9FD",label:"Running"},scheduled:{color:"#6272a4",label:"Scheduled"},skipped:{color:"#6272a4",label:"Skipped"},canceled:{color:"#6272a4",label:"Canceled"}},vg=4;function uz(e){return az[e]}function pn({data:e,children:t}){let n=uz(e.pipeType),o=sz[e.status],i=e.status==="running",a=rz(e.pipeType),l=e.pipeType==="PipeSignature",[r,s]=(0,_T.useState)(!1),u=e.inputs.length>vg,c=u&&!r?e.inputs.slice(0,vg):e.inputs,d=e.inputs.length-vg,f=e.direction==="TB"?"pipe-card--tb":"pipe-card--lr",h=a?" pipe-card--controller":"",v=l?" pipe-card--signature":"",b=a?"pipe-card-badge pipe-card-badge--controller":l?"pipe-card-badge pipe-card-badge--signature":"pipe-card-badge";return(0,Fe.jsxs)("div",{className:`pipe-card ${f}${h}${v}`,children:[(0,Fe.jsxs)("div",{className:"pipe-card-header",children:[(0,Fe.jsx)("span",{className:b,children:n}),(0,Fe.jsx)("span",{className:"pipe-card-code",title:e.pipeCode,children:e.pipeCode}),(0,Fe.jsx)("span",{className:"pipe-card-status",style:{color:o.color},title:o.label,children:(0,Fe.jsx)("span",{className:`pipe-card-status-dot ${i?"pipe-card-status-dot--pulse":""}`,style:{background:o.color}})}),e.onExpand&&(0,Fe.jsx)("button",{type:"button",className:"pipe-card-expand",title:"Expand controller (alt/option: only this one)","aria-label":"Expand controller",onClick:S=>{S.stopPropagation(),e.onExpand?.({soloMode:S.altKey})},children:"\u2922"})]}),e.description&&(0,Fe.jsx)("span",{className:"pipe-card-description",title:e.description,children:e.description}),e.inputs.length>0&&(0,Fe.jsxs)("div",{className:"pipe-card-io",children:[(0,Fe.jsx)("span",{className:"pipe-card-io-label",children:"INPUTS"}),(0,Fe.jsxs)("div",{className:"pipe-card-io-pills",children:[c.map(S=>(0,Fe.jsxs)("span",{className:"pipe-card-io-pill",title:`${S.name}: ${S.concept}`,children:[(0,Fe.jsx)("span",{className:"pipe-card-io-pill-name",children:S.name}),(0,Fe.jsx)("span",{className:"pipe-card-io-pill-concept",children:S.concept})]},S.name)),u&&(0,Fe.jsx)("button",{className:"pipe-card-io-more",onClick:S=>{S.stopPropagation(),s(p=>!p)},children:r?"show less":`+${d} more`})]})]}),e.outputs.length>0&&(0,Fe.jsxs)("div",{className:"pipe-card-io",children:[(0,Fe.jsx)("span",{className:"pipe-card-io-label",children:"OUTPUT"}),(0,Fe.jsx)("div",{className:"pipe-card-io-pills",children:e.outputs.map(S=>(0,Fe.jsxs)("span",{className:"pipe-card-io-pill",title:`${S.name}: ${S.concept}`,children:[(0,Fe.jsx)("span",{className:"pipe-card-io-pill-name",children:S.name}),(0,Fe.jsx)("span",{className:"pipe-card-io-pill-concept",children:S.concept})]},S.name))})]}),t]})}var cz={PipeLLM:pn,PipeExtract:pn,PipeCompose:pn,PipeImgGen:pn,PipeSearch:pn,PipeFunc:pn,PipeSignature:pn,PipeSequence:pn,PipeParallel:pn,PipeCondition:pn,PipeBatch:pn};function ET(e){return cz[e]}var ai=oe(ge(),1);function fz({data:e}){let t=ET(e.pipeType)??pn;return(0,ai.jsx)(t,{data:e})}function TT({data:e,sourcePosition:t=W.Bottom,targetPosition:n=W.Top}){let o=e.pipeCardData;return o?(0,ai.jsxs)(ai.Fragment,{children:[(0,ai.jsx)(Aa,{type:"target",position:n}),(0,ai.jsx)(fz,{data:o}),(0,ai.jsx)(Aa,{type:"source",position:t})]}):null}var Ft=oe(ge(),1),dz={...xT,pipeCard:TT};function pz({nodeId:e,stuffData:t,graphspec:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}){let l=t.concept&&n?Oh(n,t.concept):void 0;return(0,Ft.jsx)(Ft.Fragment,{children:l?(0,Ft.jsx)(fg,{concept:l,ioData:t,instanceKey:e,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}):(0,Ft.jsx)(Pf,{stuff:t,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a})})}function mz(e,t){return e===to.FOLDED?new Set(t):new Set}function hz(e,t){return e??t??Wl.theme??yt.SYSTEM}function bg(e,t){return e===yt.SYSTEM?t:e}function js(e){return e.map(t=>({...t,position:{...t.position},data:{...t.data},style:t.style?{...t.style}:void 0}))}function $s(e,t){return!t||Object.keys(t).length===0?e:e.map(n=>{let o=n.data.pipeCode;if(!o||!Object.hasOwn(t,o))return n;let i=t[o];return n.data.pipeCardData?.status===i?n:{...n,data:{...n.data,nodeData:n.data.nodeData?{...n.data.nodeData,status:i}:n.data.nodeData,pipeCardData:n.data.pipeCardData?{...n.data.pipeCardData,status:i}:n.data.pipeCardData}}})}function NT(e){let{graphspec:t,config:n=Wl,initialDirection:o,initialShowControllers:i,initialFoldMode:a,hideToolbar:l=!1,theme:r,systemTheme:s,showThemeToggle:u=!0,onThemeChange:c,onNavigateToPipe:d,onStuffNodeClick:f,onReactFlowInit:h,statusMap:v,onNodeSelect:b,onPaneClick:S,renderDetailExtra:p,resolveStorageUrl:y,canEmbedPdf:m,onOpenExternally:g}=e,x=ce.default.useMemo(()=>t===null?null:Lc(t),[t]),[_,E]=ce.default.useState(()=>o??n.direction??Wl.direction??wn.TB),w=hz(r,n.theme),[N,k]=ce.default.useState(w),D=ce.default.useRef(w);ce.default.useEffect(()=>{w!==D.current&&(D.current=w,k(w))},[w]);let z=DE(s),P=bg(N,z),T=ce.default.useRef(c);T.current=c;let A=ce.default.useRef({mode:N,resolvedTheme:P});ce.default.useEffect(()=>{let ve=A.current;(ve.mode!==N||ve.resolvedTheme!==P)&&(A.current={mode:N,resolvedTheme:P},T.current?.(N,P))},[N,P]);let M=a??n.foldMode??Wl.foldMode??to.EXPANDED,[O,R]=ce.default.useState(()=>M===to.FOLDED?!0:i??n.showControllers??Wl.showControllers??!1),L=ce.default.useRef(M);L.current=M;let V=ce.default.useRef(null),[G,I]=ce.default.useState(null),[q,j]=ce.default.useState(null),{width:$,isDragging:fe,handleMouseDown:J}=nT({defaultWidth:380,minWidth:280,maxWidth:800,containerRef:V});ce.default.useEffect(()=>{I(null),j(null)},[x]),ce.default.useEffect(()=>{let ve=V.current;if(!ve)return;let le=Zf(P),ie=n.paletteColors,Ne=ie?{...le,...ie}:le;for(let[Me,We]of Object.entries(Ne))ve.style.setProperty(Me,We);return()=>{for(let Me of Object.keys(Ne))ve.style.removeProperty(Me)}},[n.paletteColors,P]);let[X,Q,ye]=EE([]),[me,ee,ae]=TE([]),se=ce.default.useRef(null),de=ce.default.useRef(null),Se=ce.default.useRef(null),Ae=ce.default.useRef(null),[rt,Nt]=ce.default.useState(new Set),Ct=ce.default.useCallback(ve=>{Nt(le=>{let ie=new Set(le);return ie.has(ve)?ie.delete(ve):ie.add(ve),ie})},[]),[st,mn]=ce.default.useState(new Set),Wt=ce.default.useCallback((ve,le)=>{mn(ie=>{let Ne=new Set(ie),Me=!Ne.has(ve),We=Se.current,Ue=!le?.soloMode&&We?.graphspec&&We.analysis?uT(ve,We.graphspec,We.analysis.controllerNodeIds):new Set([ve]);for(let Ht of Ue)Me?Ne.add(Ht):Ne.delete(Ht);return Ne})},[]),$n=n.edgeType||Dc.DEFAULT,Pt=ce.default.useMemo(()=>({nodesep:n.nodesep,ranksep:n.ranksep}),[n.nodesep,n.ranksep]),it=ce.default.useRef(O);it.current=O;let ut=ce.default.useRef(_);ut.current=_;let ro=ce.default.useRef(Pt);ro.current=Pt;let Co=ce.default.useRef(n.initialZoom);Co.current=n.initialZoom;let wo=ce.default.useRef(n.panToTop);wo.current=n.panToTop;let On=ce.default.useRef(rt);On.current=rt;let so=ce.default.useRef(Ct);so.current=Ct;let Ao=ce.default.useRef(st);Ao.current=st;let hn=ce.default.useRef(Wt);hn.current=Wt;let Ut=ce.default.useRef(!0),Jt=ce.default.useRef(0),Mo=ce.default.useRef(!1),Kn=ce.default.useRef(v);Kn.current=v,ce.default.useEffect(()=>{if(!de.current)return;let ve=!1;return(async()=>{try{let le=de.current;if(!le)return;let ie=await qf(le.nodes,le.edges,_,Pt,le._graphspec,le._analysis);if(ve)return;Ae.current={nodes:ie.nodes,edges:ie.edges,controllerPositions:ie.controllerPositions};let Ne=Fl(js(ie.nodes),ie.edges,le._graphspec,le._analysis,it.current,On.current,so.current,ie.controllerPositions,hn.current);Q($s($l(Jl(Ne.nodes)),Kn.current)),ee(Kl(Ne.edges)),setTimeout(()=>{!ve&&se.current&&se.current.fitView({padding:.1})},50)}catch(le){console.error("[GraphViewer] ELK layout failed:",le)}})(),()=>{ve=!0}},[_,Pt]),ce.default.useEffect(()=>{if(!Ae.current||!de.current)return;let ve=js(Ae.current.nodes),le=Ae.current.edges,ie=Fl(ve,le,de.current._graphspec,de.current._analysis,O,rt,Ct,Ae.current.controllerPositions,Wt);Q($s($l(Jl(ie.nodes)),Kn.current)),ee(Kl(ie.edges))},[O,rt,Ct,Wt]),ce.default.useEffect(()=>{if(!x){de.current=null,Se.current=null,Ae.current=null,Q([]),ee([]);return}let ve=!1;Nt(new Set),On.current=new Set;let{graphData:le,analysis:ie}=rT(x,$n);Se.current={nodes:le.nodes,edges:le.edges,analysis:ie,graphspec:x};let Ne=ie?mz(L.current,ie.controllerNodeIds):new Set;mn(Ne),Ao.current=Ne,Mo.current=Ne.size>0,Jt.current=Ne.size,Ne.size>0&&!it.current&&(R(!0),it.current=!0);let Me=Ne.size>0&&ie?dg({nodes:le.nodes,edges:le.edges},ie,x,Ne,hn.current):{nodes:le.nodes,edges:le.edges,analysis:ie};return de.current={nodes:Me.nodes,edges:Me.edges,_analysis:Me.analysis,_graphspec:x},(async()=>{try{let We=ut.current,Ue=ro.current,Qn=Me.nodes.some(zn=>!zn.position||zn.position.x===0&&zn.position.y===0)?await qf(Me.nodes,Me.edges,We,Ue,x,Me.analysis):{nodes:Me.nodes,edges:Me.edges,controllerPositions:{}};if(ve)return;Ae.current={nodes:Qn.nodes,edges:Qn.edges,controllerPositions:Qn.controllerPositions};let qi=Fl(js(Qn.nodes),Qn.edges,x,Me.analysis,it.current,On.current,so.current,Qn.controllerPositions,hn.current);Q($s($l(Jl(qi.nodes)),Kn.current)),ee(Kl(qi.edges)),setTimeout(()=>{if(!ve&&se.current&&(se.current.fitView({padding:.1}),Co.current!==void 0&&Co.current!==null&&se.current.zoomTo(Co.current),wo.current)){let zn=se.current.getViewport();se.current.setViewport({x:zn.x,y:20,zoom:zn.zoom})}},100)}catch(We){console.error("[GraphViewer] ELK layout failed:",We)}})(),()=>{ve=!0}},[x,$n]),ce.default.useEffect(()=>{if(Ut.current){Ut.current=!1,Jt.current=st.size;return}if(Mo.current){Mo.current=!1,Jt.current=st.size;return}let ve=Jt.current;if(Jt.current=st.size,ve===0&&st.size===0||!Se.current||!Se.current.analysis)return;let le=Se.current,ie=le.graphspec,Ne=le.analysis;if(!ie||!Ne)return;let Me=!1,We=dg({nodes:le.nodes,edges:le.edges},Ne,ie,st,Wt);return de.current={nodes:We.nodes,edges:We.edges,_analysis:We.analysis,_graphspec:ie},(async()=>{try{let Ue=await qf(We.nodes,We.edges,ut.current,ro.current,ie,We.analysis);if(Me)return;Ae.current={nodes:Ue.nodes,edges:Ue.edges,controllerPositions:Ue.controllerPositions};let Ht=Fl(js(Ue.nodes),Ue.edges,ie,We.analysis,it.current,On.current,so.current,Ue.controllerPositions,hn.current);Q($s($l(Jl(Ht.nodes)),Kn.current)),ee(Kl(Ht.edges)),setTimeout(()=>{!Me&&se.current&&se.current.fitView({padding:.1})},50)}catch(Ue){console.error("[GraphViewer] ELK layout failed:",Ue)}})(),()=>{Me=!0}},[st,Wt]),ce.default.useEffect(()=>{if(!Ae.current||!de.current)return;let ve=js(Ae.current.nodes),le=Ae.current.edges,ie=Fl(ve,le,de.current._graphspec,de.current._analysis,it.current,On.current,so.current,Ae.current.controllerPositions,hn.current);Q($s($l(Jl(ie.nodes)),v)),ee(Kl(ie.edges))},[v]);let er=ce.default.useCallback((ve,le)=>{let ie=le.data;if(b?.(le.id,ie,ve),ie.isController||ie.isPipe){let Ne=ie.pipeCode||ie.labelText;Ne&&d&&d(Ne,ie.pipeCardData?.status)}else if(ie.isStuff&&f&&x){let Ne=us(le.id),Me=Lh(x,Ne);Me&&f(Me)}if(j(null),G?.nodeId===le.id&&!q)I(null);else if(ie.isPipe||ie.isController)I({kind:"pipe",nodeId:le.id,nodeData:ie});else if(ie.isStuff&&x){let Ne=us(le.id),Me=Lh(x,Ne);I({kind:"stuff",nodeId:le.id,nodeData:ie,stuffData:Me??void 0})}Q(Ne=>Ne.map(Me=>({...Me,selected:Me.id===le.id})))},[Q,d,b,f,x,G,q]),li=ce.default.useCallback(ve=>{se.current=ve,h&&h(ve)},[h]),Do=ce.default.useCallback(()=>{I(null),j(null),S?.()},[S]),tr=ce.default.useCallback(ve=>{if(!x)return;let le=Oh(x,ve);le&&j(le)},[x]),uo=G?.kind==="pipe"&&x?x.nodes.find(ve=>ve.pipe_code===G.nodeData.pipeCode):void 0,za=G!==null||q!==null,ke=Se.current?.analysis?.controllerNodeIds,gn=ce.default.useMemo(()=>!O||!ke||ke.size===0?{onFoldAll:void 0,onExpandAll:void 0,foldAllDisabled:!1,expandAllDisabled:!1}:{onFoldAll:()=>mn(new Set(ke)),onExpandAll:()=>mn(new Set),foldAllDisabled:st.size===ke.size,expandAllDisabled:st.size===0},[O,ke,st]);return(0,Ft.jsxs)("div",{ref:V,className:`react-flow-container react-flow-container--theme-${P} react-flow-container--mode-${N}`,children:[(0,Ft.jsx)(_E,{nodes:X,edges:me,nodeTypes:dz,onNodesChange:ye,onEdgesChange:ae,onNodeClick:er,onPaneClick:Do,onInit:li,fitView:!0,fitViewOptions:{padding:.1},defaultEdgeOptions:{type:$n},panOnScroll:!0,minZoom:.1,proOptions:{hideAttribution:!0},panActivationKeyCode:null,children:(0,Ft.jsx)(CE,{variant:Eo.Dots,gap:20,size:1,color:"var(--color-bg-dots)"})}),(0,Ft.jsxs)(tT,{isOpen:za,onClose:Do,width:$,isDragging:fe,onResizeHandleMouseDown:J,children:[q?(0,Ft.jsx)(fg,{concept:q}):uo&&x?(0,Ft.jsx)(lT,{node:uo,spec:x,onConceptClick:tr}):G?.stuffData?(0,Ft.jsx)(pz,{nodeId:G.nodeId,stuffData:G.stuffData,graphspec:x,resolveStorageUrl:y,canEmbedPdf:m,onOpenExternally:g}):null,p&&G&&!q&&p(G.nodeId,G.nodeData)]}),!l&&(0,Ft.jsx)(ST,{direction:_,onDirectionChange:E,showControllers:O,onShowControllersChange:R,onZoomIn:()=>se.current?.zoomIn(),onZoomOut:()=>se.current?.zoomOut(),onFitView:()=>se.current?.fitView({padding:.1}),onFoldAll:gn.onFoldAll,onExpandAll:gn.onExpandAll,foldAllDisabled:gn.foldAllDisabled,expandAllDisabled:gn.expandAllDisabled,themeMode:u?N:void 0,onThemeModeChange:u?k:void 0,rightOffset:za?$:0})]})}function gz(e){if(e==null)return to.EXPANDED;if(e===to.FOLDED||e===to.EXPANDED||e===to.AUTO)return e;throw new Error(`Invalid foldMode in standalone config: ${JSON.stringify(e)} \u2014 expected one of "folded", "expanded", "auto".`)}function yz(e){if(e==null)return yt.SYSTEM;if(e===yt.LIGHT||e===yt.DARK||e===yt.SYSTEM)return e;throw new Error(`Invalid theme in standalone config: ${JSON.stringify(e)} \u2014 expected one of "dark", "light", "system".`)}function vz(e){if(e==null)return wn.LR;if(e===wn.LR||e===wn.RL||e===wn.TB||e===wn.BT)return e;throw new Error(`Invalid direction in standalone config: ${JSON.stringify(e)} \u2014 expected one of "TB", "BT", "LR", "RL".`)}function Sg(e,t){let n=e&&typeof e=="object"?e:{},o=vz(n.direction),i=!!n.showControllers,a=gz(n.foldMode),l=yz(n.theme);return{graphspec:t,config:{...n,direction:o,showControllers:i,foldMode:a,theme:l},initialDirection:o,initialShowControllers:i,initialFoldMode:a,theme:l}}function CT(e,t){let n=e?.trim();if(!n)return null;try{return JSON.parse(n)}catch(o){let i=o instanceof Error?o.message:String(o);throw new Error(`Failed to parse JSON from <script id="${t}">: ${i}`)}}var Ks=Sg({},null),xg=null;function wT(e){return CT(document.getElementById(e)?.textContent,e)}function bz(e,t){let n=Zf(e),o=t?{...n,...t}:n;for(let[i,a]of Object.entries(o))document.body.style.setProperty(i,a)}function DT(e,t){document.body.setAttribute("data-theme",e),bz(t,Ks.config.paletteColors)}function Sz(){return Oa.default.createElement(NT,{...Ks,onThemeChange:(e,t)=>{DT(e,t)}})}function xz({message:e}){return Oa.default.createElement("div",{className:"standalone-error",role:"alert"},Oa.default.createElement("strong",{className:"standalone-error-title"},"Failed to render method graph"),Oa.default.createElement("pre",{className:"standalone-error-message"},e))}function AT(){let e=document.getElementById("root");if(!e)return;let t=(0,MT.createRoot)(e);xg=()=>{t.render(Oa.default.createElement(Sz))},xg(),setTimeout(()=>{try{let n=wT("pipelex-config"),o=wT("pipelex-graphspec"),i=o===null?null:Lc(o);Ks=Sg(n,i),DT(Ks.theme,bg(Ks.theme,Rh())),xg?.()}catch(n){let o=n instanceof Error?n.message:String(n);t.render(Oa.default.createElement(xz,{message:o}))}},0)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",AT):AT();})();
|
|
2487
|
+
`)),c=u.reduce((d,f)=>d.concat(...f),[]);return[u,c]}return[[],[]]},[e]);return(0,P.useEffect)(()=>{let s=t?.target??M_,u=t?.actInsideInputWithModifier??!0;if(e!==null){let c=h=>{if(i.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!i.current||i.current&&!u)&&hh(h))return!1;let b=R_(h.code,r);if(a.current.add(h[b]),D_(l,a.current,!1)){let S=h.composedPath?.()?.[0]||h.target,p=S?.nodeName==="BUTTON"||S?.nodeName==="A";t.preventDefault!==!1&&(i.current||!p)&&h.preventDefault(),o(!0)}},d=h=>{let v=R_(h.code,r);D_(l,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(h[v]),h.key==="Meta"&&a.current.clear(),i.current=!1},f=()=>{a.current.clear(),o(!1)};return s?.addEventListener("keydown",c),s?.addEventListener("keyup",d),window.addEventListener("blur",f),window.addEventListener("contextmenu",f),()=>{s?.removeEventListener("keydown",c),s?.removeEventListener("keyup",d),window.removeEventListener("blur",f),window.removeEventListener("contextmenu",f)}}},[e,o]),n}function D_(e,t,n){return e.filter(o=>n||o.length===t.size).some(o=>o.every(i=>t.has(i)))}function R_(e,t){return t.includes(e)?"code":"key"}var wD=()=>{let e=Qe();return(0,P.useMemo)(()=>({zoomIn:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomOut:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{let{panZoom:o}=e.getState();return o?o.scaleTo(t,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[o,i,a],panZoom:l}=e.getState();return l?(await l.setViewport({x:t.x??o,y:t.y??i,zoom:t.zoom??a},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{let[t,n,o]=e.getState().transform;return{x:t,y:n,zoom:o}},setCenter:async(t,n,o)=>e.getState().setCenter(t,n,o),fitBounds:async(t,n)=>{let{width:o,height:i,minZoom:a,maxZoom:l,panZoom:r}=e.getState(),s=Gs(t,o,i,a,l,n?.padding??.1);return r?(await r.setViewport(s,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{let{transform:o,snapGrid:i,snapToGrid:a,domNode:l}=e.getState();if(!l)return t;let{x:r,y:s}=l.getBoundingClientRect(),u={x:t.x-r,y:t.y-s},c=n.snapGrid??i,d=n.snapToGrid??a;return Fl(u,o,d,c)},flowToScreenPosition:t=>{let{transform:n,domNode:o}=e.getState();if(!o)return t;let{x:i,y:a}=o.getBoundingClientRect(),l=Ps(t,n);return{x:l.x+i,y:l.y+a}}}),[])};function W_(e,t){let n=[],o=new Map,i=[];for(let a of e)if(a.type==="add"){i.push(a);continue}else if(a.type==="remove"||a.type==="replace")o.set(a.id,[a]);else{let l=o.get(a.id);l?l.push(a):o.set(a.id,[a])}for(let a of t){let l=o.get(a.id);if(!l){n.push(a);continue}if(l[0].type==="remove")continue;if(l[0].type==="replace"){n.push({...l[0].item});continue}let r={...a};for(let s of l)AD(s,r);n.push(r)}return i.length&&i.forEach(a=>{a.index!==void 0?n.splice(a.index,0,{...a.item}):n.push({...a.item})}),n}function AD(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function J_(e,t){return W_(e,t)}function eE(e,t){return W_(e,t)}function Da(e,t){return{id:e,type:"select",selected:t}}function Wl(e,t=new Set,n=!1){let o=[];for(let[i,a]of e){let l=t.has(i);!(a.selected===void 0&&!l)&&a.selected!==l&&(n&&(a.selected=l),o.push(Da(a.id,l)))}return o}function O_({items:e=[],lookup:t}){let n=[],o=new Map(e.map(i=>[i.id,i]));for(let[i,a]of e.entries()){let l=t.get(a.id),r=l?.internals?.userNode??l;r!==void 0&&r!==a&&n.push({id:a.id,item:a,type:"replace"}),r===void 0&&n.push({item:a,type:"add",index:i})}for(let[i]of t)o.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function z_(e){return{id:e.id,type:"remove"}}var L_=e=>Bx(e),MD=e=>ih(e);function tE(e){return(0,P.forwardRef)(e)}var DD=typeof window<"u"?P.useLayoutEffect:P.useEffect;function B_(e){let[t,n]=(0,P.useState)(BigInt(0)),[o]=(0,P.useState)(()=>RD(()=>n(i=>i+BigInt(1))));return DD(()=>{let i=o.get();i.length&&(e(i),o.reset())},[t]),o}function RD(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var nE=(0,P.createContext)(null);function OD({children:e}){let t=Qe(),n=(0,P.useCallback)(r=>{let{nodes:s=[],setNodes:u,hasDefaultNodes:c,onNodesChange:d,nodeLookup:f,fitViewQueued:h,onNodesChangeMiddlewareMap:v}=t.getState(),b=s;for(let p of r)b=typeof p=="function"?p(b):p;let S=O_({items:b,lookup:f});for(let p of v.values())S=p(S);c&&u(b),S.length>0?d?.(S):h&&window.requestAnimationFrame(()=>{let{fitViewQueued:p,nodes:y,setNodes:m}=t.getState();p&&m(y)})},[]),o=B_(n),i=(0,P.useCallback)(r=>{let{edges:s=[],setEdges:u,hasDefaultEdges:c,onEdgesChange:d,edgeLookup:f}=t.getState(),h=s;for(let v of r)h=typeof v=="function"?v(h):v;c?u(h):d&&d(O_({items:h,lookup:f}))},[]),a=B_(i),l=(0,P.useMemo)(()=>({nodeQueue:o,edgeQueue:a}),[]);return(0,B.jsx)(nE.Provider,{value:l,children:e})}function zD(){let e=(0,P.useContext)(nE);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}var LD=e=>!!e.panZoom;function Mh(){let e=wD(),t=Qe(),n=zD(),o=Ae(LD),i=(0,P.useMemo)(()=>{let a=d=>t.getState().nodeLookup.get(d),l=d=>{n.nodeQueue.push(d)},r=d=>{n.edgeQueue.push(d)},s=d=>{let{nodeLookup:f,nodeOrigin:h}=t.getState(),v=L_(d)?d:f.get(d.id),b=v.parentId?dh(v.position,v.measured,v.parentId,f,h):v.position,S={...v,position:b,width:v.measured?.width??v.width,height:v.measured?.height??v.height};return Ma(S)},u=(d,f,h={replace:!1})=>{l(v=>v.map(b=>{if(b.id===d){let S=typeof f=="function"?f(b):f;return h.replace&&L_(S)?S:{...b,...S}}return b}))},c=(d,f,h={replace:!1})=>{r(v=>v.map(b=>{if(b.id===d){let S=typeof f=="function"?f(b):f;return h.replace&&MD(S)?S:{...b,...S}}return b}))};return{getNodes:()=>t.getState().nodes.map(d=>({...d})),getNode:d=>a(d)?.internals.userNode,getInternalNode:a,getEdges:()=>{let{edges:d=[]}=t.getState();return d.map(f=>({...f}))},getEdge:d=>t.getState().edgeLookup.get(d),setNodes:l,setEdges:r,addNodes:d=>{let f=Array.isArray(d)?d:[d];n.nodeQueue.push(h=>[...h,...f])},addEdges:d=>{let f=Array.isArray(d)?d:[d];n.edgeQueue.push(h=>[...h,...f])},toObject:()=>{let{nodes:d=[],edges:f=[],transform:h}=t.getState(),[v,b,S]=h;return{nodes:d.map(p=>({...p})),edges:f.map(p=>({...p})),viewport:{x:v,y:b,zoom:S}}},deleteElements:async({nodes:d=[],edges:f=[]})=>{let{nodes:h,edges:v,onNodesDelete:b,onEdgesDelete:S,triggerNodeChanges:p,triggerEdgeChanges:y,onDelete:m,onBeforeDelete:g}=t.getState(),{nodes:x,edges:_}=await kx({nodesToRemove:d,edgesToRemove:f,nodes:h,edges:v,onBeforeDelete:g}),E=_.length>0,w=x.length>0;if(E){let C=_.map(z_);S?.(_),y(C)}if(w){let C=x.map(z_);b?.(x),p(C)}return(w||E)&&m?.({nodes:x,edges:_}),{deletedNodes:x,deletedEdges:_}},getIntersectingNodes:(d,f=!0,h)=>{let v=uh(d),b=v?d:s(d),S=h!==void 0;return b?(h||t.getState().nodes).filter(p=>{let y=t.getState().nodeLookup.get(p.id);if(y&&!v&&(p.id===d.id||!y.internals.positionAbsolute))return!1;let m=Ma(S?p:y),g=jl(m,b);return f&&g>0||g>=m.width*m.height||g>=b.width*b.height}):[]},isNodeIntersecting:(d,f,h=!0)=>{let b=uh(d)?d:s(d);if(!b)return!1;let S=jl(b,f);return h&&S>0||S>=f.width*f.height||S>=b.width*b.height},updateNode:u,updateNodeData:(d,f,h={replace:!1})=>{u(d,v=>{let b=typeof f=="function"?f(v):f;return h.replace?{...v,data:b}:{...v,data:{...v.data,...b}}},h)},updateEdge:c,updateEdgeData:(d,f,h={replace:!1})=>{c(d,v=>{let b=typeof f=="function"?f(v):f;return h.replace?{...v,data:b}:{...v,data:{...v.data,...b}}},h)},getNodesBounds:d=>{let{nodeLookup:f,nodeOrigin:h}=t.getState();return lh(d,{nodeLookup:f,nodeOrigin:h})},getHandleConnections:({type:d,id:f,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}-${d}${f?`-${f}`:""}`)?.values()??[]),getNodeConnections:({type:d,handleId:f,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}${d?f?`-${d}-${f}`:`-${d}`:""}`)?.values()??[]),fitView:async d=>{let f=t.getState().fitViewResolver??Ix();return t.setState({fitViewQueued:!0,fitViewOptions:d,fitViewResolver:f}),n.nodeQueue.push(h=>[...h]),f.promise}}},[]);return(0,P.useMemo)(()=>({...i,...e,viewportInitialized:o}),[o])}var H_=e=>e.selected,BD=typeof window<"u"?window:void 0;function HD({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=Qe(),{deleteElements:o}=Mh(),i=Is(e,{actInsideInputWithModifier:!1}),a=Is(t,{target:BD});(0,P.useEffect)(()=>{if(i){let{edges:l,nodes:r}=n.getState();o({nodes:r.filter(H_),edges:l.filter(H_)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,P.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}function PD(e){let t=Qe();(0,P.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let o=Sf(e.current);(o.height===0||o.width===0)&&t.getState().onError?.("004",wn.error004()),t.setState({width:o.width||500,height:o.height||500})};if(e.current){n(),window.addEventListener("resize",n);let o=new ResizeObserver(()=>n());return o.observe(e.current),()=>{window.removeEventListener("resize",n),o&&e.current&&o.unobserve(e.current)}}},[])}var Lf={position:"absolute",width:"100%",height:"100%",top:0,left:0},kD=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function GD({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:o=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=ti.Free,zoomOnDoubleClick:l=!0,panOnDrag:r=!0,defaultViewport:s,translateExtent:u,minZoom:c,maxZoom:d,zoomActivationKeyCode:f,preventScrolling:h=!0,children:v,noWheelClassName:b,noPanClassName:S,onViewportChange:p,isControlledViewport:y,paneClickDistance:m,selectionOnDrag:g}){let x=Qe(),_=(0,P.useRef)(null),{userSelectionActive:E,lib:w,connectionInProgress:C}=Ae(kD,je),H=Is(f),D=(0,P.useRef)();PD(_);let z=(0,P.useCallback)(I=>{p?.({x:I[0],y:I[1],zoom:I[2]}),y||x.setState({transform:I})},[p,y]);return(0,P.useEffect)(()=>{if(_.current){D.current=r_({domNode:_.current,minZoom:c,maxZoom:d,translateExtent:u,viewport:s,onDraggingChange:M=>x.setState(O=>O.paneDragging===M?O:{paneDragging:M}),onPanZoomStart:(M,O)=>{let{onViewportChangeStart:R,onMoveStart:L}=x.getState();L?.(M,O),R?.(O)},onPanZoom:(M,O)=>{let{onViewportChange:R,onMove:L}=x.getState();L?.(M,O),R?.(O)},onPanZoomEnd:(M,O)=>{let{onViewportChangeEnd:R,onMoveEnd:L}=x.getState();L?.(M,O),R?.(O)}});let{x:I,y:T,zoom:A}=D.current.getViewport();return x.setState({panZoom:D.current,transform:[I,T,A],domNode:_.current.closest(".react-flow")}),()=>{D.current?.destroy()}}},[]),(0,P.useEffect)(()=>{D.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:o,panOnScrollSpeed:i,panOnScrollMode:a,zoomOnDoubleClick:l,panOnDrag:r,zoomActivationKeyPressed:H,preventScrolling:h,noPanClassName:S,userSelectionActive:E,noWheelClassName:b,lib:w,onTransformChange:z,connectionInProgress:C,selectionOnDrag:g,paneClickDistance:m})},[e,t,n,o,i,a,l,r,H,h,S,E,b,w,z,C,g,m]),(0,B.jsx)("div",{className:"react-flow__renderer",ref:_,style:Lf,children:v})}var UD=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function ID(){let{userSelectionActive:e,userSelectionRect:t}=Ae(UD,je);return e&&t?(0,B.jsx)("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}var Ch=(e,t)=>n=>{n.target===t.current&&e?.(n)},VD=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function YD({isSelecting:e,selectionKeyPressed:t,selectionMode:n=wa.Full,panOnDrag:o,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:l,onSelectionEnd:r,onPaneClick:s,onPaneContextMenu:u,onPaneScroll:c,onPaneMouseEnter:d,onPaneMouseMove:f,onPaneMouseLeave:h,children:v}){let b=Qe(),{userSelectionActive:S,elementsSelectable:p,dragging:y,connectionInProgress:m}=Ae(VD,je),g=p&&(e||S),x=(0,P.useRef)(null),_=(0,P.useRef)(),E=(0,P.useRef)(new Set),w=(0,P.useRef)(new Set),C=(0,P.useRef)(!1),H=R=>{if(C.current||m){C.current=!1;return}s?.(R),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},D=R=>{if(Array.isArray(o)&&o?.includes(2)){R.preventDefault();return}u?.(R)},z=c?R=>c(R):void 0,I=R=>{C.current&&(R.stopPropagation(),C.current=!1)},T=R=>{let{domNode:L}=b.getState();if(_.current=L?.getBoundingClientRect(),!_.current)return;let V=R.target===x.current;if(!V&&!!R.target.closest(".nokey")||!e||!(a&&V||t)||R.button!==0||!R.isPrimary)return;R.target?.setPointerCapture?.(R.pointerId),C.current=!1;let{x:q,y:Z}=qn(R.nativeEvent,_.current);b.setState({userSelectionRect:{width:0,height:0,startX:q,startY:Z,x:q,y:Z}}),V||(R.stopPropagation(),R.preventDefault())},A=R=>{let{userSelectionRect:L,transform:V,nodeLookup:k,edgeLookup:G,connectionLookup:q,triggerNodeChanges:Z,triggerEdgeChanges:j,defaultEdgeOptions:se,resetSelectedElements:J}=b.getState();if(!_.current||!L)return;let{x:X,y:Q}=qn(R.nativeEvent,_.current),{startX:ue,startY:he}=L;if(!C.current){let be=t?0:i;if(Math.hypot(X-ue,Q-he)<=be)return;J(),l?.(R)}C.current=!0;let ie={startX:ue,startY:he,x:X<ue?X:ue,y:Q<he?Q:he,width:Math.abs(X-ue),height:Math.abs(Q-he)},ee=E.current,Te=w.current;E.current=new Set(yf(k,ie,V,n===wa.Partial,!0).map(be=>be.id)),w.current=new Set;let de=se?.selectable??!0;for(let be of E.current){let Le=q.get(be);if(Le)for(let{edgeId:Be}of Le.values()){let dt=G.get(Be);dt&&(dt.selectable??de)&&w.current.add(Be)}}if(!ph(ee,E.current)){let be=Wl(k,E.current,!0);Z(be)}if(!ph(Te,w.current)){let be=Wl(G,w.current);j(be)}b.setState({userSelectionRect:ie,userSelectionActive:!0,nodesSelectionActive:!1})},M=R=>{R.button===0&&(R.target?.releasePointerCapture?.(R.pointerId),!S&&R.target===x.current&&b.getState().userSelectionRect&&H?.(R),b.setState({userSelectionActive:!1,userSelectionRect:null}),C.current&&(r?.(R),b.setState({nodesSelectionActive:E.current.size>0})))},O=o===!0||Array.isArray(o)&&o.includes(0);return(0,B.jsxs)("div",{className:ot(["react-flow__pane",{draggable:O,dragging:y,selection:e}]),onClick:g?void 0:Ch(H,x),onContextMenu:Ch(D,x),onWheel:Ch(z,x),onPointerEnter:g?void 0:d,onPointerMove:g?A:f,onPointerUp:g?M:void 0,onPointerDownCapture:g?T:void 0,onClickCapture:g?I:void 0,onPointerLeave:h,ref:x,style:Lf,children:[v,(0,B.jsx)(ID,{})]})}function Ah({id:e,store:t,unselect:n=!1,nodeRef:o}){let{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:l,nodeLookup:r,onError:s}=t.getState(),u=r.get(e);if(!u){s?.("012",wn.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&l)&&(a({nodes:[u],edges:[]}),requestAnimationFrame(()=>o?.current?.blur())):i([e])}function oE({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:i,isSelectable:a,nodeClickDistance:l}){let r=Qe(),[s,u]=(0,P.useState)(!1),c=(0,P.useRef)();return(0,P.useEffect)(()=>{c.current=Jx({getStoreItems:()=>r.getState(),onNodeMouseDown:d=>{Ah({id:d,store:r,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),(0,P.useEffect)(()=>{if(!(t||!e.current||!c.current))return c.current.update({noDragClassName:n,handleSelector:o,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:l}),()=>{c.current?.destroy()}},[n,o,t,a,e,i,l]),s}var XD=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function iE(){let e=Qe();return(0,P.useCallback)(n=>{let{nodeExtent:o,snapToGrid:i,snapGrid:a,nodesDraggable:l,onError:r,updateNodePositions:s,nodeLookup:u,nodeOrigin:c}=e.getState(),d=new Map,f=XD(l),h=i?a[0]:5,v=i?a[1]:5,b=n.direction.x*h*n.factor,S=n.direction.y*v*n.factor;for(let[,p]of u){if(!f(p))continue;let y={x:p.internals.positionAbsolute.x+b,y:p.internals.positionAbsolute.y+S};i&&(y=$l(y,a));let{position:m,positionAbsolute:g}=rh({nodeId:p.id,nextPosition:y,nodeLookup:u,nodeExtent:o,nodeOrigin:c,onError:r});p.position=m,p.internals.positionAbsolute=g,d.set(p.id,p)}s(d)},[])}var Dh=(0,P.createContext)(null),qD=Dh.Provider;Dh.Consumer;var aE=()=>(0,P.useContext)(Dh),ZD=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),jD=(e,t,n)=>o=>{let{connectionClickStartHandle:i,connectionMode:a,connection:l}=o,{fromHandle:r,toHandle:s,isValid:u}=l,c=s?.nodeId===e&&s?.id===t&&s?.type===n;return{connectingFrom:r?.nodeId===e&&r?.id===t&&r?.type===n,connectingTo:c,clickConnecting:i?.nodeId===e&&i?.id===t&&i?.type===n,isPossibleEndHandle:a===Zi.Strict?r?.type!==n:e!==r?.nodeId||t!==r?.id,connectionInProcess:!!r,clickConnectionInProcess:!!i,valid:c&&u}};function $D({type:e="source",position:t=W.Top,isValidConnection:n,isConnectable:o=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:l,onConnect:r,children:s,className:u,onMouseDown:c,onTouchStart:d,...f},h){let v=l||null,b=e==="target",S=Qe(),p=aE(),{connectOnClick:y,noPanClassName:m,rfId:g}=Ae(ZD,je),{connectingFrom:x,connectingTo:_,clickConnecting:E,isPossibleEndHandle:w,connectionInProcess:C,clickConnectionInProcess:H,valid:D}=Ae(jD(p,v,e),je);p||S.getState().onError?.("010",wn.error010());let z=A=>{let{defaultEdgeOptions:M,onConnect:O,hasDefaultEdges:R}=S.getState(),L={...M,...A};if(R){let{edges:V,setEdges:k}=S.getState();k(vh(L,V))}O?.(L),r?.(L)},I=A=>{if(!p)return;let M=gh(A.nativeEvent);if(i&&(M&&A.button===0||!M)){let O=S.getState();wf.onPointerDown(A.nativeEvent,{handleDomNode:A.currentTarget,autoPanOnConnect:O.autoPanOnConnect,connectionMode:O.connectionMode,connectionRadius:O.connectionRadius,domNode:O.domNode,nodeLookup:O.nodeLookup,lib:O.lib,isTarget:b,handleId:v,nodeId:p,flowId:O.rfId,panBy:O.panBy,cancelConnection:O.cancelConnection,onConnectStart:O.onConnectStart,onConnectEnd:(...R)=>S.getState().onConnectEnd?.(...R),updateConnection:O.updateConnection,onConnect:z,isValidConnection:n||((...R)=>S.getState().isValidConnection?.(...R)??!0),getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:O.autoPanSpeed,dragThreshold:O.connectionDragThreshold})}M?c?.(A):d?.(A)},T=A=>{let{onClickConnectStart:M,onClickConnectEnd:O,connectionClickStartHandle:R,connectionMode:L,isValidConnection:V,lib:k,rfId:G,nodeLookup:q,connection:Z}=S.getState();if(!p||!R&&!i)return;if(!R){M?.(A.nativeEvent,{nodeId:p,handleId:v,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:p,type:e,id:v}});return}let j=mh(A.target),se=n||V,{connection:J,isValid:X}=wf.isValid(A.nativeEvent,{handle:{nodeId:p,id:v,type:e},connectionMode:L,fromNodeId:R.nodeId,fromHandleId:R.id||null,fromType:R.type,isValidConnection:se,flowId:G,doc:j,lib:k,nodeLookup:q});X&&J&&z(J);let Q=structuredClone(Z);delete Q.inProgress,Q.toPosition=Q.toHandle?Q.toHandle.position:null,O?.(A,Q),S.setState({connectionClickStartHandle:null})};return(0,B.jsx)("div",{"data-handleid":v,"data-nodeid":p,"data-handlepos":t,"data-id":`${g}-${p}-${v}-${e}`,className:ot(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",m,u,{source:!b,target:b,connectable:o,connectablestart:i,connectableend:a,clickconnecting:E,connectingfrom:x,connectingto:_,valid:D,connectionindicator:o&&(!C||w)&&(C||H?a:i)}]),onMouseDown:I,onTouchStart:I,onClick:y?T:void 0,ref:h,...f,children:s})}var Ra=(0,P.memo)(tE($D));function FD({data:e,isConnectable:t,sourcePosition:n=W.Bottom}){return(0,B.jsxs)(B.Fragment,{children:[e?.label,(0,B.jsx)(Ra,{type:"source",position:n,isConnectable:t})]})}function KD({data:e,isConnectable:t,targetPosition:n=W.Top,sourcePosition:o=W.Bottom}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Ra,{type:"target",position:n,isConnectable:t}),e?.label,(0,B.jsx)(Ra,{type:"source",position:o,isConnectable:t})]})}function QD(){return null}function WD({data:e,isConnectable:t,targetPosition:n=W.Top}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Ra,{type:"target",position:n,isConnectable:t}),e?.label]})}var Of={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},P_={input:FD,default:KD,output:WD,group:QD};function JD(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}var eR=e=>{let{width:t,height:n,x:o,y:i}=Zl(e.nodeLookup,{filter:a=>!!a.selected});return{width:Xn(t)?t:null,height:Xn(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${i}px)`}};function tR({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let o=Qe(),{width:i,height:a,transformString:l,userSelectionActive:r}=Ae(eR,je),s=iE(),u=(0,P.useRef)(null);(0,P.useEffect)(()=>{n||u.current?.focus({preventScroll:!0})},[n]);let c=!r&&i!==null&&a!==null;if(oE({nodeRef:u,disabled:!c}),!c)return null;let d=e?h=>{let v=o.getState().nodes.filter(b=>b.selected);e(h,v)}:void 0,f=h=>{Object.prototype.hasOwnProperty.call(Of,h.key)&&(h.preventDefault(),s({direction:Of[h.key],factor:h.shiftKey?4:1}))};return(0,B.jsx)("div",{className:ot(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:(0,B.jsx)("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:f,style:{width:i,height:a}})})}var k_=typeof window<"u"?window:void 0,nR=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function lE({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,paneClickDistance:r,deleteKeyCode:s,selectionKeyCode:u,selectionOnDrag:c,selectionMode:d,onSelectionStart:f,onSelectionEnd:h,multiSelectionKeyCode:v,panActivationKeyCode:b,zoomActivationKeyCode:S,elementsSelectable:p,zoomOnScroll:y,zoomOnPinch:m,panOnScroll:g,panOnScrollSpeed:x,panOnScrollMode:_,zoomOnDoubleClick:E,panOnDrag:w,defaultViewport:C,translateExtent:H,minZoom:D,maxZoom:z,preventScrolling:I,onSelectionContextMenu:T,noWheelClassName:A,noPanClassName:M,disableKeyboardA11y:O,onViewportChange:R,isControlledViewport:L}){let{nodesSelectionActive:V,userSelectionActive:k}=Ae(nR,je),G=Is(u,{target:k_}),q=Is(b,{target:k_}),Z=q||w,j=q||g,se=c&&Z!==!0,J=G||k||se;return HD({deleteKeyCode:s,multiSelectionKeyCode:v}),(0,B.jsx)(GD,{onPaneContextMenu:a,elementsSelectable:p,zoomOnScroll:y,zoomOnPinch:m,panOnScroll:j,panOnScrollSpeed:x,panOnScrollMode:_,zoomOnDoubleClick:E,panOnDrag:!G&&Z,defaultViewport:C,translateExtent:H,minZoom:D,maxZoom:z,zoomActivationKeyCode:S,preventScrolling:I,noWheelClassName:A,noPanClassName:M,onViewportChange:R,isControlledViewport:L,paneClickDistance:r,selectionOnDrag:se,children:(0,B.jsxs)(YD,{onSelectionStart:f,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,panOnDrag:Z,isSelecting:!!J,selectionMode:d,selectionKeyPressed:G,paneClickDistance:r,selectionOnDrag:se,children:[e,V&&(0,B.jsx)(tR,{onSelectionContextMenu:T,noPanClassName:M,disableKeyboardA11y:O})]})})}lE.displayName="FlowRenderer";var oR=(0,P.memo)(lE),iR=e=>t=>e?yf(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function aR(e){return Ae((0,P.useCallback)(iR(e),[e]),je)}var lR=e=>e.updateNodeInternals;function rR(){let e=Ae(lR),[t]=(0,P.useState)(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{let o=new Map;n.forEach(i=>{let a=i.target.getAttribute("data-id");o.set(a,{id:a,nodeElement:i.target,force:!0})}),e(o)}));return(0,P.useEffect)(()=>()=>{t?.disconnect()},[t]),t}function sR({node:e,nodeType:t,hasDimensions:n,resizeObserver:o}){let i=Qe(),a=(0,P.useRef)(null),l=(0,P.useRef)(null),r=(0,P.useRef)(e.sourcePosition),s=(0,P.useRef)(e.targetPosition),u=(0,P.useRef)(t),c=n&&!!e.internals.handleBounds;return(0,P.useEffect)(()=>{a.current&&!e.hidden&&(!c||l.current!==a.current)&&(l.current&&o?.unobserve(l.current),o?.observe(a.current),l.current=a.current)},[c,e.hidden]),(0,P.useEffect)(()=>()=>{l.current&&(o?.unobserve(l.current),l.current=null)},[]),(0,P.useEffect)(()=>{if(a.current){let d=u.current!==t,f=r.current!==e.sourcePosition,h=s.current!==e.targetPosition;(d||f||h)&&(u.current=t,r.current=e.sourcePosition,s.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function uR({id:e,onClick:t,onMouseEnter:n,onMouseMove:o,onMouseLeave:i,onContextMenu:a,onDoubleClick:l,nodesDraggable:r,elementsSelectable:s,nodesConnectable:u,nodesFocusable:c,resizeObserver:d,noDragClassName:f,noPanClassName:h,disableKeyboardA11y:v,rfId:b,nodeTypes:S,nodeClickDistance:p,onError:y}){let{node:m,internals:g,isParent:x}=Ae(X=>{let Q=X.nodeLookup.get(e),ue=X.parentLookup.has(e);return{node:Q,internals:Q.internals,isParent:ue}},je),_=m.type||"default",E=S?.[_]||P_[_];E===void 0&&(y?.("003",wn.error003(_)),_="default",E=S?.default||P_.default);let w=!!(m.draggable||r&&typeof m.draggable>"u"),C=!!(m.selectable||s&&typeof m.selectable>"u"),H=!!(m.connectable||u&&typeof m.connectable>"u"),D=!!(m.focusable||c&&typeof m.focusable>"u"),z=Qe(),I=fh(m),T=sR({node:m,nodeType:_,hasDimensions:I,resizeObserver:d}),A=oE({nodeRef:T,disabled:m.hidden||!w,noDragClassName:f,handleSelector:m.dragHandle,nodeId:e,isSelectable:C,nodeClickDistance:p}),M=iE();if(m.hidden)return null;let O=So(m),R=JD(m),L=C||w||t||n||o||i,V=n?X=>n(X,{...g.userNode}):void 0,k=o?X=>o(X,{...g.userNode}):void 0,G=i?X=>i(X,{...g.userNode}):void 0,q=a?X=>a(X,{...g.userNode}):void 0,Z=l?X=>l(X,{...g.userNode}):void 0,j=X=>{let{selectNodesOnDrag:Q,nodeDragThreshold:ue}=z.getState();C&&(!Q||!w||ue>0)&&Ah({id:e,store:z,nodeRef:T}),t&&t(X,{...g.userNode})},se=X=>{if(!(hh(X.nativeEvent)||v)){if(eh.includes(X.key)&&C){let Q=X.key==="Escape";Ah({id:e,store:z,unselect:Q,nodeRef:T})}else if(w&&m.selected&&Object.prototype.hasOwnProperty.call(Of,X.key)){X.preventDefault();let{ariaLabelConfig:Q}=z.getState();z.setState({ariaLiveMessage:Q["node.a11yDescription.ariaLiveMessage"]({direction:X.key.replace("Arrow","").toLowerCase(),x:~~g.positionAbsolute.x,y:~~g.positionAbsolute.y})}),M({direction:Of[X.key],factor:X.shiftKey?4:1})}}},J=()=>{if(v||!T.current?.matches(":focus-visible"))return;let{transform:X,width:Q,height:ue,autoPanOnNodeFocus:he,setCenter:ie}=z.getState();if(!he)return;yf(new Map([[e,m]]),{x:0,y:0,width:Q,height:ue},X,!0).length>0||ie(m.position.x+O.width/2,m.position.y+O.height/2,{zoom:X[2]})};return(0,B.jsx)("div",{className:ot(["react-flow__node",`react-flow__node-${_}`,{[h]:w},m.className,{selected:m.selected,selectable:C,parent:x,draggable:w,dragging:A}]),ref:T,style:{zIndex:g.z,transform:`translate(${g.positionAbsolute.x}px,${g.positionAbsolute.y}px)`,pointerEvents:L?"all":"none",visibility:I?"visible":"hidden",...m.style,...R},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:V,onMouseMove:k,onMouseLeave:G,onContextMenu:q,onClick:j,onDoubleClick:Z,onKeyDown:D?se:void 0,tabIndex:D?0:void 0,onFocus:D?J:void 0,role:m.ariaRole??(D?"group":void 0),"aria-roledescription":"node","aria-describedby":v?void 0:`${F_}-${b}`,"aria-label":m.ariaLabel,...m.domAttributes,children:(0,B.jsx)(qD,{value:e,children:(0,B.jsx)(E,{id:e,data:m.data,type:_,positionAbsoluteX:g.positionAbsolute.x,positionAbsoluteY:g.positionAbsolute.y,selected:m.selected??!1,selectable:C,draggable:w,deletable:m.deletable??!0,isConnectable:H,sourcePosition:m.sourcePosition,targetPosition:m.targetPosition,dragging:A,dragHandle:m.dragHandle,zIndex:g.z,parentId:m.parentId,...O})})})}var cR=(0,P.memo)(uR),fR=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function rE(e){let{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:i,onError:a}=Ae(fR,je),l=aR(e.onlyRenderVisibleElements),r=rR();return(0,B.jsx)("div",{className:"react-flow__nodes",style:Lf,children:l.map(s=>(0,B.jsx)(cR,{id:s,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:r,nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:a},s))})}rE.displayName="NodeRenderer";var dR=(0,P.memo)(rE);function pR(e){return Ae((0,P.useCallback)(n=>{if(!e)return n.edges.map(i=>i.id);let o=[];if(n.width&&n.height)for(let i of n.edges){let a=n.nodeLookup.get(i.source),l=n.nodeLookup.get(i.target);a&&l&&Xx({sourceNode:a,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&o.push(i.id)}return o},[e]),je)}var mR=({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e}};return(0,B.jsx)("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},hR=({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,B.jsx)("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},G_={[Vl.Arrow]:mR,[Vl.ArrowClosed]:hR};function gR(e){let t=Qe();return(0,P.useMemo)(()=>Object.prototype.hasOwnProperty.call(G_,e)?G_[e]:(t.getState().onError?.("009",wn.error009(e)),null),[e])}var yR=({id:e,type:t,color:n,width:o=12.5,height:i=12.5,markerUnits:a="strokeWidth",strokeWidth:l,orient:r="auto-start-reverse"})=>{let s=gR(t);return s?(0,B.jsx)("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:r,refX:"0",refY:"0",children:(0,B.jsx)(s,{color:n,strokeWidth:l})}):null},sE=({defaultColor:e,rfId:t})=>{let n=Ae(a=>a.edges),o=Ae(a=>a.defaultEdgeOptions),i=(0,P.useMemo)(()=>Zx(n,{id:t,defaultColor:e,defaultMarkerStart:o?.markerStart,defaultMarkerEnd:o?.markerEnd}),[n,o,t,e]);return i.length?(0,B.jsx)("svg",{className:"react-flow__marker","aria-hidden":"true",children:(0,B.jsx)("defs",{children:i.map(a=>(0,B.jsx)(yR,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};sE.displayName="MarkerDefinitions";var vR=(0,P.memo)(sE);function uE({x:e,y:t,label:n,labelStyle:o,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:l=[2,4],labelBgBorderRadius:r=2,children:s,className:u,...c}){let[d,f]=(0,P.useState)({x:1,y:0,width:0,height:0}),h=ot(["react-flow__edge-textwrapper",u]),v=(0,P.useRef)(null);return(0,P.useEffect)(()=>{if(v.current){let b=v.current.getBBox();f({x:b.x,y:b.y,width:b.width,height:b.height})}},[n]),n?(0,B.jsxs)("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:h,visibility:d.width?"visible":"hidden",...c,children:[i&&(0,B.jsx)("rect",{width:d.width+2*l[0],x:-l[0],y:-l[1],height:d.height+2*l[1],className:"react-flow__edge-textbg",style:a,rx:r,ry:r}),(0,B.jsx)("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:v,style:o,children:n}),s]}):null}uE.displayName="EdgeText";var bR=(0,P.memo)(uE);function Bf({path:e,labelX:t,labelY:n,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:r,labelBgBorderRadius:s,interactionWidth:u=20,...c}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("path",{...c,d:e,fill:"none",className:ot(["react-flow__edge-path",c.className])}),u?(0,B.jsx)("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,o&&Xn(t)&&Xn(n)?(0,B.jsx)(bR,{x:t,y:n,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:r,labelBgBorderRadius:s}):null]})}function U_({pos:e,x1:t,y1:n,x2:o,y2:i}){return e===W.Left||e===W.Right?[.5*(t+o),n]:[t,.5*(n+i)]}function cE({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top}){let[l,r]=U_({pos:n,x1:e,y1:t,x2:o,y2:i}),[s,u]=U_({pos:a,x1:o,y1:i,x2:e,y2:t}),[c,d,f,h]=xf({sourceX:e,sourceY:t,targetX:o,targetY:i,sourceControlX:l,sourceControlY:r,targetControlX:s,targetControlY:u});return[`M${e},${t} C${l},${r} ${s},${u} ${o},${i}`,c,d,f,h]}function fE(e){return(0,P.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,sourcePosition:l,targetPosition:r,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:v,markerEnd:b,markerStart:S,interactionWidth:p})=>{let[y,m,g]=cE({sourceX:n,sourceY:o,sourcePosition:l,targetX:i,targetY:a,targetPosition:r}),x=e.isInternal?void 0:t;return(0,B.jsx)(Bf,{id:x,path:y,labelX:m,labelY:g,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:v,markerEnd:b,markerStart:S,interactionWidth:p})})}var SR=fE({isInternal:!1}),dE=fE({isInternal:!0});SR.displayName="SimpleBezierEdge";dE.displayName="SimpleBezierEdgeInternal";function pE(e){return(0,P.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,sourcePosition:h=W.Bottom,targetPosition:v=W.Top,markerEnd:b,markerStart:S,pathOptions:p,interactionWidth:y})=>{let[m,g,x]=Us({sourceX:n,sourceY:o,sourcePosition:h,targetX:i,targetY:a,targetPosition:v,borderRadius:p?.borderRadius,offset:p?.offset,stepPosition:p?.stepPosition}),_=e.isInternal?void 0:t;return(0,B.jsx)(Bf,{id:_,path:m,labelX:g,labelY:x,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:b,markerStart:S,interactionWidth:y})})}var mE=pE({isInternal:!1}),hE=pE({isInternal:!0});mE.displayName="SmoothStepEdge";hE.displayName="SmoothStepEdgeInternal";function gE(e){return(0,P.memo)(({id:t,...n})=>{let o=e.isInternal?void 0:t;return(0,B.jsx)(mE,{...n,id:o,pathOptions:(0,P.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var xR=gE({isInternal:!1}),yE=gE({isInternal:!0});xR.displayName="StepEdge";yE.displayName="StepEdgeInternal";function vE(e){return(0,P.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:v,interactionWidth:b})=>{let[S,p,y]=Ef({sourceX:n,sourceY:o,targetX:i,targetY:a}),m=e.isInternal?void 0:t;return(0,B.jsx)(Bf,{id:m,path:S,labelX:p,labelY:y,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:v,interactionWidth:b})})}var _R=vE({isInternal:!1}),bE=vE({isInternal:!0});_R.displayName="StraightEdge";bE.displayName="StraightEdgeInternal";function SE(e){return(0,P.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,sourcePosition:l=W.Bottom,targetPosition:r=W.Top,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:v,markerEnd:b,markerStart:S,pathOptions:p,interactionWidth:y})=>{let[m,g,x]=_f({sourceX:n,sourceY:o,sourcePosition:l,targetX:i,targetY:a,targetPosition:r,curvature:p?.curvature}),_=e.isInternal?void 0:t;return(0,B.jsx)(Bf,{id:_,path:m,labelX:g,labelY:x,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:v,markerEnd:b,markerStart:S,interactionWidth:y})})}var ER=SE({isInternal:!1}),xE=SE({isInternal:!0});ER.displayName="BezierEdge";xE.displayName="BezierEdgeInternal";var I_={default:xE,straight:bE,step:yE,smoothstep:hE,simplebezier:dE},V_={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},TR=(e,t,n)=>n===W.Left?e-t:n===W.Right?e+t:e,NR=(e,t,n)=>n===W.Top?e-t:n===W.Bottom?e+t:e,Y_="react-flow__edgeupdater";function X_({position:e,centerX:t,centerY:n,radius:o=10,onMouseDown:i,onMouseEnter:a,onMouseOut:l,type:r}){return(0,B.jsx)("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:l,className:ot([Y_,`${Y_}-${r}`]),cx:TR(t,o,e),cy:NR(n,o,e),r:o,stroke:"transparent",fill:"transparent"})}function CR({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:o,sourceY:i,targetX:a,targetY:l,sourcePosition:r,targetPosition:s,onReconnect:u,onReconnectStart:c,onReconnectEnd:d,setReconnecting:f,setUpdateHover:h}){let v=Qe(),b=(g,x)=>{if(g.button!==0)return;let{autoPanOnConnect:_,domNode:E,connectionMode:w,connectionRadius:C,lib:H,onConnectStart:D,cancelConnection:z,nodeLookup:I,rfId:T,panBy:A,updateConnection:M}=v.getState(),O=x.type==="target",R=(k,G)=>{f(!1),d?.(k,n,x.type,G)},L=k=>u?.(n,k),V=(k,G)=>{f(!0),c?.(g,n,x.type),D?.(k,G)};wf.onPointerDown(g.nativeEvent,{autoPanOnConnect:_,connectionMode:w,connectionRadius:C,domNode:E,handleId:x.id,nodeId:x.nodeId,nodeLookup:I,isTarget:O,edgeUpdaterType:x.type,lib:H,flowId:T,cancelConnection:z,panBy:A,isValidConnection:(...k)=>v.getState().isValidConnection?.(...k)??!0,onConnect:L,onConnectStart:V,onConnectEnd:(...k)=>v.getState().onConnectEnd?.(...k),onReconnectEnd:R,updateConnection:M,getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,dragThreshold:v.getState().connectionDragThreshold,handleDomNode:g.currentTarget})},S=g=>b(g,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),p=g=>b(g,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),y=()=>h(!0),m=()=>h(!1);return(0,B.jsxs)(B.Fragment,{children:[(e===!0||e==="source")&&(0,B.jsx)(X_,{position:r,centerX:o,centerY:i,radius:t,onMouseDown:S,onMouseEnter:y,onMouseOut:m,type:"source"}),(e===!0||e==="target")&&(0,B.jsx)(X_,{position:s,centerX:a,centerY:l,radius:t,onMouseDown:p,onMouseEnter:y,onMouseOut:m,type:"target"})]})}function wR({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:o,onClick:i,onDoubleClick:a,onContextMenu:l,onMouseEnter:r,onMouseMove:s,onMouseLeave:u,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:h,rfId:v,edgeTypes:b,noPanClassName:S,onError:p,disableKeyboardA11y:y}){let m=Ae(ie=>ie.edgeLookup.get(e)),g=Ae(ie=>ie.defaultEdgeOptions);m=g?{...g,...m}:m;let x=m.type||"default",_=b?.[x]||I_[x];_===void 0&&(p?.("011",wn.error011(x)),x="default",_=b?.default||I_.default);let E=!!(m.focusable||t&&typeof m.focusable>"u"),w=typeof d<"u"&&(m.reconnectable||n&&typeof m.reconnectable>"u"),C=!!(m.selectable||o&&typeof m.selectable>"u"),H=(0,P.useRef)(null),[D,z]=(0,P.useState)(!1),[I,T]=(0,P.useState)(!1),A=Qe(),{zIndex:M,sourceX:O,sourceY:R,targetX:L,targetY:V,sourcePosition:k,targetPosition:G}=Ae((0,P.useCallback)(ie=>{let ee=ie.nodeLookup.get(m.source),Te=ie.nodeLookup.get(m.target);if(!ee||!Te)return{zIndex:m.zIndex,...V_};let de=qx({id:e,sourceNode:ee,targetNode:Te,sourceHandle:m.sourceHandle||null,targetHandle:m.targetHandle||null,connectionMode:ie.connectionMode,onError:p});return{zIndex:Yx({selected:m.selected,zIndex:m.zIndex,sourceNode:ee,targetNode:Te,elevateOnSelect:ie.elevateEdgesOnSelect,zIndexMode:ie.zIndexMode}),...de||V_}},[m.source,m.target,m.sourceHandle,m.targetHandle,m.selected,m.zIndex]),je),q=(0,P.useMemo)(()=>m.markerStart?`url('#${Tf(m.markerStart,v)}')`:void 0,[m.markerStart,v]),Z=(0,P.useMemo)(()=>m.markerEnd?`url('#${Tf(m.markerEnd,v)}')`:void 0,[m.markerEnd,v]);if(m.hidden||O===null||R===null||L===null||V===null)return null;let j=ie=>{let{addSelectedEdges:ee,unselectNodesAndEdges:Te,multiSelectionActive:de}=A.getState();C&&(A.setState({nodesSelectionActive:!1}),m.selected&&de?(Te({nodes:[],edges:[m]}),H.current?.blur()):ee([e])),i&&i(ie,m)},se=a?ie=>{a(ie,{...m})}:void 0,J=l?ie=>{l(ie,{...m})}:void 0,X=r?ie=>{r(ie,{...m})}:void 0,Q=s?ie=>{s(ie,{...m})}:void 0,ue=u?ie=>{u(ie,{...m})}:void 0,he=ie=>{if(!y&&eh.includes(ie.key)&&C){let{unselectNodesAndEdges:ee,addSelectedEdges:Te}=A.getState();ie.key==="Escape"?(H.current?.blur(),ee({edges:[m]})):Te([e])}};return(0,B.jsx)("svg",{style:{zIndex:M},children:(0,B.jsxs)("g",{className:ot(["react-flow__edge",`react-flow__edge-${x}`,m.className,S,{selected:m.selected,animated:m.animated,inactive:!C&&!i,updating:D,selectable:C}]),onClick:j,onDoubleClick:se,onContextMenu:J,onMouseEnter:X,onMouseMove:Q,onMouseLeave:ue,onKeyDown:E?he:void 0,tabIndex:E?0:void 0,role:m.ariaRole??(E?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":m.ariaLabel===null?void 0:m.ariaLabel||`Edge from ${m.source} to ${m.target}`,"aria-describedby":E?`${K_}-${v}`:void 0,ref:H,...m.domAttributes,children:[!I&&(0,B.jsx)(_,{id:e,source:m.source,target:m.target,type:m.type,selected:m.selected,animated:m.animated,selectable:C,deletable:m.deletable??!0,label:m.label,labelStyle:m.labelStyle,labelShowBg:m.labelShowBg,labelBgStyle:m.labelBgStyle,labelBgPadding:m.labelBgPadding,labelBgBorderRadius:m.labelBgBorderRadius,sourceX:O,sourceY:R,targetX:L,targetY:V,sourcePosition:k,targetPosition:G,data:m.data,style:m.style,sourceHandleId:m.sourceHandle,targetHandleId:m.targetHandle,markerStart:q,markerEnd:Z,pathOptions:"pathOptions"in m?m.pathOptions:void 0,interactionWidth:m.interactionWidth}),w&&(0,B.jsx)(CR,{edge:m,isReconnectable:w,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:h,sourceX:O,sourceY:R,targetX:L,targetY:V,sourcePosition:k,targetPosition:G,setUpdateHover:z,setReconnecting:T})]})})}var AR=(0,P.memo)(wR),MR=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function _E({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:o,noPanClassName:i,onReconnect:a,onEdgeContextMenu:l,onEdgeMouseEnter:r,onEdgeMouseMove:s,onEdgeMouseLeave:u,onEdgeClick:c,reconnectRadius:d,onEdgeDoubleClick:f,onReconnectStart:h,onReconnectEnd:v,disableKeyboardA11y:b}){let{edgesFocusable:S,edgesReconnectable:p,elementsSelectable:y,onError:m}=Ae(MR,je),g=pR(t);return(0,B.jsxs)("div",{className:"react-flow__edges",children:[(0,B.jsx)(vR,{defaultColor:e,rfId:n}),g.map(x=>(0,B.jsx)(AR,{id:x,edgesFocusable:S,edgesReconnectable:p,elementsSelectable:y,noPanClassName:i,onReconnect:a,onContextMenu:l,onMouseEnter:r,onMouseMove:s,onMouseLeave:u,onClick:c,reconnectRadius:d,onDoubleClick:f,onReconnectStart:h,onReconnectEnd:v,rfId:n,onError:m,edgeTypes:o,disableKeyboardA11y:b},x))]})}_E.displayName="EdgeRenderer";var DR=(0,P.memo)(_E),RR=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function OR({children:e}){let t=Ae(RR);return(0,B.jsx)("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function zR(e){let t=Mh(),n=(0,P.useRef)(!1);(0,P.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var LR=e=>e.panZoom?.syncViewport;function BR(e){let t=Ae(LR),n=Qe();return(0,P.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function q_(e){return e.connection.inProgress?{...e.connection,to:Fl(e.connection.to,e.transform)}:{...e.connection}}function HR(e){return e?n=>{let o=q_(n);return e(o)}:q_}function PR(e){let t=HR(e);return Ae(t,je)}var kR=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function GR({containerStyle:e,style:t,type:n,component:o}){let{nodesConnectable:i,width:a,height:l,isValid:r,inProgress:s}=Ae(kR,je);return!(a&&i&&s)?null:(0,B.jsx)("svg",{style:e,width:a,height:l,className:"react-flow__connectionline react-flow__container",children:(0,B.jsx)("g",{className:ot(["react-flow__connection",oh(r)]),children:(0,B.jsx)(EE,{style:t,type:n,CustomComponent:o,isValid:r})})})}var EE=({style:e,type:t=bo.Bezier,CustomComponent:n,isValid:o})=>{let{inProgress:i,from:a,fromNode:l,fromHandle:r,fromPosition:s,to:u,toNode:c,toHandle:d,toPosition:f,pointer:h}=PR();if(!i)return;if(n)return(0,B.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:l,fromHandle:r,fromX:a.x,fromY:a.y,toX:u.x,toY:u.y,fromPosition:s,toPosition:f,connectionStatus:oh(o),toNode:c,toHandle:d,pointer:h});let v="",b={sourceX:a.x,sourceY:a.y,sourcePosition:s,targetX:u.x,targetY:u.y,targetPosition:f};switch(t){case bo.Bezier:[v]=_f(b);break;case bo.SimpleBezier:[v]=cE(b);break;case bo.Step:[v]=Us({...b,borderRadius:0});break;case bo.SmoothStep:[v]=Us(b);break;default:[v]=Ef(b)}return(0,B.jsx)("path",{d:v,fill:"none",className:"react-flow__connection-path",style:e})};EE.displayName="ConnectionLine";var UR={};function Z_(e=UR){let t=(0,P.useRef)(e),n=Qe();(0,P.useEffect)(()=>{},[e])}function IR(){let e=Qe(),t=(0,P.useRef)(!1);(0,P.useEffect)(()=>{},[])}function TE({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:o,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:l,onNodeMouseEnter:r,onNodeMouseMove:s,onNodeMouseLeave:u,onNodeContextMenu:c,onSelectionContextMenu:d,onSelectionStart:f,onSelectionEnd:h,connectionLineType:v,connectionLineStyle:b,connectionLineComponent:S,connectionLineContainerStyle:p,selectionKeyCode:y,selectionOnDrag:m,selectionMode:g,multiSelectionKeyCode:x,panActivationKeyCode:_,zoomActivationKeyCode:E,deleteKeyCode:w,onlyRenderVisibleElements:C,elementsSelectable:H,defaultViewport:D,translateExtent:z,minZoom:I,maxZoom:T,preventScrolling:A,defaultMarkerColor:M,zoomOnScroll:O,zoomOnPinch:R,panOnScroll:L,panOnScrollSpeed:V,panOnScrollMode:k,zoomOnDoubleClick:G,panOnDrag:q,onPaneClick:Z,onPaneMouseEnter:j,onPaneMouseMove:se,onPaneMouseLeave:J,onPaneScroll:X,onPaneContextMenu:Q,paneClickDistance:ue,nodeClickDistance:he,onEdgeContextMenu:ie,onEdgeMouseEnter:ee,onEdgeMouseMove:Te,onEdgeMouseLeave:de,reconnectRadius:be,onReconnect:Le,onReconnectStart:Be,onReconnectEnd:dt,noDragClassName:Gt,noWheelClassName:mn,noPanClassName:rt,disableKeyboardA11y:Dn,nodeExtent:Qt,rfId:Wt,viewport:St,onViewportChange:$e}){return Z_(e),Z_(t),IR(),zR(n),BR(St),(0,B.jsx)(oR,{onPaneClick:Z,onPaneMouseEnter:j,onPaneMouseMove:se,onPaneMouseLeave:J,onPaneContextMenu:Q,onPaneScroll:X,paneClickDistance:ue,deleteKeyCode:w,selectionKeyCode:y,selectionOnDrag:m,selectionMode:g,onSelectionStart:f,onSelectionEnd:h,multiSelectionKeyCode:x,panActivationKeyCode:_,zoomActivationKeyCode:E,elementsSelectable:H,zoomOnScroll:O,zoomOnPinch:R,zoomOnDoubleClick:G,panOnScroll:L,panOnScrollSpeed:V,panOnScrollMode:k,panOnDrag:q,defaultViewport:D,translateExtent:z,minZoom:I,maxZoom:T,onSelectionContextMenu:d,preventScrolling:A,noDragClassName:Gt,noWheelClassName:mn,noPanClassName:rt,disableKeyboardA11y:Dn,onViewportChange:$e,isControlledViewport:!!St,children:(0,B.jsxs)(OR,{children:[(0,B.jsx)(DR,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:l,onReconnect:Le,onReconnectStart:Be,onReconnectEnd:dt,onlyRenderVisibleElements:C,onEdgeContextMenu:ie,onEdgeMouseEnter:ee,onEdgeMouseMove:Te,onEdgeMouseLeave:de,reconnectRadius:be,defaultMarkerColor:M,noPanClassName:rt,disableKeyboardA11y:Dn,rfId:Wt}),(0,B.jsx)(GR,{style:b,type:v,component:S,containerStyle:p}),(0,B.jsx)("div",{className:"react-flow__edgelabel-renderer"}),(0,B.jsx)(dR,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:a,onNodeMouseEnter:r,onNodeMouseMove:s,onNodeMouseLeave:u,onNodeContextMenu:c,nodeClickDistance:he,onlyRenderVisibleElements:C,noPanClassName:rt,noDragClassName:Gt,disableKeyboardA11y:Dn,nodeExtent:Qt,rfId:Wt}),(0,B.jsx)("div",{className:"react-flow__viewport-portal"})]})})}TE.displayName="GraphView";var VR=(0,P.memo)(TE),j_=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:l,fitViewOptions:r,minZoom:s=.5,maxZoom:u=2,nodeOrigin:c,nodeExtent:d,zIndexMode:f="basic"}={})=>{let h=new Map,v=new Map,b=new Map,S=new Map,p=o??t??[],y=n??e??[],m=c??[0,0],g=d??ql;Eh(b,S,p);let x=Nf(y,h,v,{nodeOrigin:m,nodeExtent:g,zIndexMode:f}),_=[0,0,1];if(l&&i&&a){let E=Zl(h,{filter:D=>!!((D.width||D.initialWidth)&&(D.height||D.initialHeight))}),{x:w,y:C,zoom:H}=Gs(E,i,a,s,u,r?.padding??.1);_=[w,C,H]}return{rfId:"1",width:i??0,height:a??0,transform:_,nodes:y,nodesInitialized:x,nodeLookup:h,parentLookup:v,edges:p,edgeLookup:S,connectionLookup:b,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:s,maxZoom:u,translateExtent:ql,nodeExtent:g,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Zi.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:m,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:l??!1,fitViewOptions:r,fitViewResolver:null,connection:{...nh},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:ch,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:th,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},YR=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:l,fitViewOptions:r,minZoom:s,maxZoom:u,nodeOrigin:c,nodeExtent:d,zIndexMode:f})=>T_((h,v)=>{async function b(){let{nodeLookup:S,panZoom:p,fitViewOptions:y,fitViewResolver:m,width:g,height:x,minZoom:_,maxZoom:E}=v();p&&(await Px({nodes:S,width:g,height:x,panZoom:p,minZoom:_,maxZoom:E},y),m?.resolve(!0),h({fitViewResolver:null}))}return{...j_({nodes:e,edges:t,width:i,height:a,fitView:l,fitViewOptions:r,minZoom:s,maxZoom:u,nodeOrigin:c,nodeExtent:d,defaultNodes:n,defaultEdges:o,zIndexMode:f}),setNodes:S=>{let{nodeLookup:p,parentLookup:y,nodeOrigin:m,elevateNodesOnSelect:g,fitViewQueued:x,zIndexMode:_}=v(),E=Nf(S,p,y,{nodeOrigin:m,nodeExtent:d,elevateNodesOnSelect:g,checkEquality:!0,zIndexMode:_});x&&E?(b(),h({nodes:S,nodesInitialized:E,fitViewQueued:!1,fitViewOptions:void 0})):h({nodes:S,nodesInitialized:E})},setEdges:S=>{let{connectionLookup:p,edgeLookup:y}=v();Eh(p,y,S),h({edges:S})},setDefaultNodesAndEdges:(S,p)=>{if(S){let{setNodes:y}=v();y(S),h({hasDefaultNodes:!0})}if(p){let{setEdges:y}=v();y(p),h({hasDefaultEdges:!0})}},updateNodeInternals:S=>{let{triggerNodeChanges:p,nodeLookup:y,parentLookup:m,domNode:g,nodeOrigin:x,nodeExtent:_,debug:E,fitViewQueued:w,zIndexMode:C}=v(),{changes:H,updatedInternals:D}=Kx(S,y,m,g,x,_,C);D&&($x(y,m,{nodeOrigin:x,nodeExtent:_,zIndexMode:C}),w?(b(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),H?.length>0&&(E&&console.log("React Flow: trigger node changes",H),p?.(H)))},updateNodePositions:(S,p=!1)=>{let y=[],m=[],{nodeLookup:g,triggerNodeChanges:x,connection:_,updateConnection:E,onNodesChangeMiddlewareMap:w}=v();for(let[C,H]of S){let D=g.get(C),z=!!(D?.expandParent&&D?.parentId&&H?.position),I={id:C,type:"position",position:z?{x:Math.max(0,H.position.x),y:Math.max(0,H.position.y)}:H.position,dragging:p};if(D&&_.inProgress&&_.fromNode.id===D.id){let T=ji(D,_.fromHandle,W.Left,!0);E({..._,from:T})}z&&D.parentId&&y.push({id:C,parentId:D.parentId,rect:{...H.internals.positionAbsolute,width:H.measured.width??0,height:H.measured.height??0}}),m.push(I)}if(y.length>0){let{parentLookup:C,nodeOrigin:H}=v(),D=Cf(y,g,C,H);m.push(...D)}for(let C of w.values())m=C(m);x(m)},triggerNodeChanges:S=>{let{onNodesChange:p,setNodes:y,nodes:m,hasDefaultNodes:g,debug:x}=v();if(S?.length){if(g){let _=J_(S,m);y(_)}x&&console.log("React Flow: trigger node changes",S),p?.(S)}},triggerEdgeChanges:S=>{let{onEdgesChange:p,setEdges:y,edges:m,hasDefaultEdges:g,debug:x}=v();if(S?.length){if(g){let _=eE(S,m);y(_)}x&&console.log("React Flow: trigger edge changes",S),p?.(S)}},addSelectedNodes:S=>{let{multiSelectionActive:p,edgeLookup:y,nodeLookup:m,triggerNodeChanges:g,triggerEdgeChanges:x}=v();if(p){let _=S.map(E=>Da(E,!0));g(_);return}g(Wl(m,new Set([...S]),!0)),x(Wl(y))},addSelectedEdges:S=>{let{multiSelectionActive:p,edgeLookup:y,nodeLookup:m,triggerNodeChanges:g,triggerEdgeChanges:x}=v();if(p){let _=S.map(E=>Da(E,!0));x(_);return}x(Wl(y,new Set([...S]))),g(Wl(m,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:p}={})=>{let{edges:y,nodes:m,nodeLookup:g,triggerNodeChanges:x,triggerEdgeChanges:_}=v(),E=S||m,w=p||y,C=[];for(let D of E){if(!D.selected)continue;let z=g.get(D.id);z&&(z.selected=!1),C.push(Da(D.id,!1))}let H=[];for(let D of w)D.selected&&H.push(Da(D.id,!1));x(C),_(H)},setMinZoom:S=>{let{panZoom:p,maxZoom:y}=v();p?.setScaleExtent([S,y]),h({minZoom:S})},setMaxZoom:S=>{let{panZoom:p,minZoom:y}=v();p?.setScaleExtent([y,S]),h({maxZoom:S})},setTranslateExtent:S=>{v().panZoom?.setTranslateExtent(S),h({translateExtent:S})},resetSelectedElements:()=>{let{edges:S,nodes:p,triggerNodeChanges:y,triggerEdgeChanges:m,elementsSelectable:g}=v();if(!g)return;let x=p.reduce((E,w)=>w.selected?[...E,Da(w.id,!1)]:E,[]),_=S.reduce((E,w)=>w.selected?[...E,Da(w.id,!1)]:E,[]);y(x),m(_)},setNodeExtent:S=>{let{nodes:p,nodeLookup:y,parentLookup:m,nodeOrigin:g,elevateNodesOnSelect:x,nodeExtent:_,zIndexMode:E}=v();S[0][0]===_[0][0]&&S[0][1]===_[0][1]&&S[1][0]===_[1][0]&&S[1][1]===_[1][1]||(Nf(p,y,m,{nodeOrigin:g,nodeExtent:S,elevateNodesOnSelect:x,checkEquality:!1,zIndexMode:E}),h({nodeExtent:S}))},panBy:S=>{let{transform:p,width:y,height:m,panZoom:g,translateExtent:x}=v();return Qx({delta:S,panZoom:g,transform:p,translateExtent:x,width:y,height:m})},setCenter:async(S,p,y)=>{let{width:m,height:g,maxZoom:x,panZoom:_}=v();if(!_)return Promise.resolve(!1);let E=typeof y?.zoom<"u"?y.zoom:x;return await _.setViewport({x:m/2-S*E,y:g/2-p*E,zoom:E},{duration:y?.duration,ease:y?.ease,interpolate:y?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{h({connection:{...nh}})},updateConnection:S=>{h({connection:S})},reset:()=>h({...j_()})}},Object.is);function XR({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:o,initialWidth:i,initialHeight:a,initialMinZoom:l,initialMaxZoom:r,initialFitViewOptions:s,fitView:u,nodeOrigin:c,nodeExtent:d,zIndexMode:f,children:h}){let[v]=(0,P.useState)(()=>YR({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:u,minZoom:l,maxZoom:r,fitViewOptions:s,nodeOrigin:c,nodeExtent:d,zIndexMode:f}));return(0,B.jsx)(uD,{value:v,children:(0,B.jsx)(OD,{children:h})})}function qR({children:e,nodes:t,edges:n,defaultNodes:o,defaultEdges:i,width:a,height:l,fitView:r,fitViewOptions:s,minZoom:u,maxZoom:c,nodeOrigin:d,nodeExtent:f,zIndexMode:h}){return(0,P.useContext)(zf)?(0,B.jsx)(B.Fragment,{children:e}):(0,B.jsx)(XR,{initialNodes:t,initialEdges:n,defaultNodes:o,defaultEdges:i,initialWidth:a,initialHeight:l,fitView:r,initialFitViewOptions:s,initialMinZoom:u,initialMaxZoom:c,nodeOrigin:d,nodeExtent:f,zIndexMode:h,children:e})}var ZR={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function jR({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,className:i,nodeTypes:a,edgeTypes:l,onNodeClick:r,onEdgeClick:s,onInit:u,onMove:c,onMoveStart:d,onMoveEnd:f,onConnect:h,onConnectStart:v,onConnectEnd:b,onClickConnectStart:S,onClickConnectEnd:p,onNodeMouseEnter:y,onNodeMouseMove:m,onNodeMouseLeave:g,onNodeContextMenu:x,onNodeDoubleClick:_,onNodeDragStart:E,onNodeDrag:w,onNodeDragStop:C,onNodesDelete:H,onEdgesDelete:D,onDelete:z,onSelectionChange:I,onSelectionDragStart:T,onSelectionDrag:A,onSelectionDragStop:M,onSelectionContextMenu:O,onSelectionStart:R,onSelectionEnd:L,onBeforeDelete:V,connectionMode:k,connectionLineType:G=bo.Bezier,connectionLineStyle:q,connectionLineComponent:Z,connectionLineContainerStyle:j,deleteKeyCode:se="Backspace",selectionKeyCode:J="Shift",selectionOnDrag:X=!1,selectionMode:Q=wa.Full,panActivationKeyCode:ue="Space",multiSelectionKeyCode:he=Kl()?"Meta":"Control",zoomActivationKeyCode:ie=Kl()?"Meta":"Control",snapToGrid:ee,snapGrid:Te,onlyRenderVisibleElements:de=!1,selectNodesOnDrag:be,nodesDraggable:Le,autoPanOnNodeFocus:Be,nodesConnectable:dt,nodesFocusable:Gt,nodeOrigin:mn=Q_,edgesFocusable:rt,edgesReconnectable:Dn,elementsSelectable:Qt=!0,defaultViewport:Wt=_D,minZoom:St=.5,maxZoom:$e=2,translateExtent:ro=ql,preventScrolling:li=!0,nodeExtent:jn,defaultMarkerColor:ri="#b1b1b7",zoomOnScroll:$n=!0,zoomOnPinch:Rn=!0,panOnScroll:To=!1,panOnScrollSpeed:pt=.5,panOnScrollMode:Fn=ti.Free,zoomOnDoubleClick:Kn=!0,panOnDrag:No=!0,onPaneClick:Co,onPaneMouseEnter:si,onPaneMouseMove:ui,onPaneMouseLeave:Pa,onPaneScroll:wo,onPaneContextMenu:ka,paneClickDistance:Ga=1,nodeClickDistance:We=0,children:Ao,onReconnect:Mo,onReconnectStart:Do,onReconnectEnd:pe,onEdgeContextMenu:le,onEdgeDoubleClick:ae,onEdgeMouseEnter:we,onEdgeMouseMove:ge,onEdgeMouseLeave:He,reconnectRadius:wt=10,onNodesChange:Qn,onEdgesChange:On,noDragClassName:ci="nodrag",noWheelClassName:xt="nowheel",noPanClassName:lr="nopan",fitView:rr,fitViewOptions:sr,connectOnClick:Js,attributionPosition:eu,proOptions:ne,defaultEdgeOptions:N,elevateNodesOnSelect:Y=!0,elevateEdgesOnSelect:K=!1,disableKeyboardA11y:Ge=!1,autoPanOnConnect:_t,autoPanOnNodeDrag:et,autoPanSpeed:Ht,connectionRadius:Ut,isValidConnection:so,onError:ur,style:mt,id:cr,nodeDragThreshold:tu,connectionDragThreshold:LT,viewport:BT,onViewportChange:HT,width:PT,height:kT,colorMode:GT="light",debug:UT,onScroll:Eg,ariaLabelConfig:IT,zIndexMode:Tg="basic",...VT},YT){let $f=cr||"1",XT=CD(GT),qT=(0,P.useCallback)(Ng=>{Ng.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Eg?.(Ng)},[Eg]);return(0,B.jsx)("div",{"data-testid":"rf__wrapper",...VT,onScroll:qT,style:{...mt,...ZR},ref:YT,className:ot(["react-flow",i,XT]),id:cr,role:"application",children:(0,B.jsxs)(qR,{nodes:e,edges:t,width:PT,height:kT,fitView:rr,fitViewOptions:sr,minZoom:St,maxZoom:$e,nodeOrigin:mn,nodeExtent:jn,zIndexMode:Tg,children:[(0,B.jsx)(VR,{onInit:u,onNodeClick:r,onEdgeClick:s,onNodeMouseEnter:y,onNodeMouseMove:m,onNodeMouseLeave:g,onNodeContextMenu:x,onNodeDoubleClick:_,nodeTypes:a,edgeTypes:l,connectionLineType:G,connectionLineStyle:q,connectionLineComponent:Z,connectionLineContainerStyle:j,selectionKeyCode:J,selectionOnDrag:X,selectionMode:Q,deleteKeyCode:se,multiSelectionKeyCode:he,panActivationKeyCode:ue,zoomActivationKeyCode:ie,onlyRenderVisibleElements:de,defaultViewport:Wt,translateExtent:ro,minZoom:St,maxZoom:$e,preventScrolling:li,zoomOnScroll:$n,zoomOnPinch:Rn,zoomOnDoubleClick:Kn,panOnScroll:To,panOnScrollSpeed:pt,panOnScrollMode:Fn,panOnDrag:No,onPaneClick:Co,onPaneMouseEnter:si,onPaneMouseMove:ui,onPaneMouseLeave:Pa,onPaneScroll:wo,onPaneContextMenu:ka,paneClickDistance:Ga,nodeClickDistance:We,onSelectionContextMenu:O,onSelectionStart:R,onSelectionEnd:L,onReconnect:Mo,onReconnectStart:Do,onReconnectEnd:pe,onEdgeContextMenu:le,onEdgeDoubleClick:ae,onEdgeMouseEnter:we,onEdgeMouseMove:ge,onEdgeMouseLeave:He,reconnectRadius:wt,defaultMarkerColor:ri,noDragClassName:ci,noWheelClassName:xt,noPanClassName:lr,rfId:$f,disableKeyboardA11y:Ge,nodeExtent:jn,viewport:BT,onViewportChange:HT}),(0,B.jsx)(ND,{nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:h,onConnectStart:v,onConnectEnd:b,onClickConnectStart:S,onClickConnectEnd:p,nodesDraggable:Le,autoPanOnNodeFocus:Be,nodesConnectable:dt,nodesFocusable:Gt,edgesFocusable:rt,edgesReconnectable:Dn,elementsSelectable:Qt,elevateNodesOnSelect:Y,elevateEdgesOnSelect:K,minZoom:St,maxZoom:$e,nodeExtent:jn,onNodesChange:Qn,onEdgesChange:On,snapToGrid:ee,snapGrid:Te,connectionMode:k,translateExtent:ro,connectOnClick:Js,defaultEdgeOptions:N,fitView:rr,fitViewOptions:sr,onNodesDelete:H,onEdgesDelete:D,onDelete:z,onNodeDragStart:E,onNodeDrag:w,onNodeDragStop:C,onSelectionDrag:A,onSelectionDragStart:T,onSelectionDragStop:M,onMove:c,onMoveStart:d,onMoveEnd:f,noPanClassName:lr,nodeOrigin:mn,rfId:$f,autoPanOnConnect:_t,autoPanOnNodeDrag:et,autoPanSpeed:Ht,onError:ur,connectionRadius:Ut,isValidConnection:so,selectNodesOnDrag:be,nodeDragThreshold:tu,connectionDragThreshold:LT,onBeforeDelete:V,debug:UT,ariaLabelConfig:IT,zIndexMode:Tg}),(0,B.jsx)(xD,{onSelectionChange:I}),Ao,(0,B.jsx)(gD,{proOptions:ne,position:eu}),(0,B.jsx)(hD,{rfId:$f,disableKeyboardA11y:Ge})]})})}var NE=tE(jR);function CE(e){let[t,n]=(0,P.useState)(e),o=(0,P.useCallback)(i=>n(a=>J_(i,a)),[]);return[t,n,o]}function wE(e){let[t,n]=(0,P.useState)(e),o=(0,P.useCallback)(i=>n(a=>eE(i,a)),[]);return[t,n,o]}var n8=wn.error014();function $R({dimensions:e,lineWidth:t,variant:n,className:o}){return(0,B.jsx)("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:ot(["react-flow__background-pattern",n,o])})}function FR({radius:e,className:t}){return(0,B.jsx)("circle",{cx:e,cy:e,r:e,className:ot(["react-flow__background-pattern","dots",t])})}var xo;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(xo||(xo={}));var KR={[xo.Dots]:1,[xo.Lines]:1,[xo.Cross]:6},QR=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function AE({id:e,variant:t=xo.Dots,gap:n=20,size:o,lineWidth:i=1,offset:a=0,color:l,bgColor:r,style:s,className:u,patternClassName:c}){let d=(0,P.useRef)(null),{transform:f,patternId:h}=Ae(QR,je),v=o||KR[t],b=t===xo.Dots,S=t===xo.Cross,p=Array.isArray(n)?n:[n,n],y=[p[0]*f[2]||1,p[1]*f[2]||1],m=v*f[2],g=Array.isArray(a)?a:[a,a],x=S?[m,m]:y,_=[g[0]*f[2]||1+x[0]/2,g[1]*f[2]||1+x[1]/2],E=`${h}${e||""}`;return(0,B.jsxs)("svg",{className:ot(["react-flow__background",u]),style:{...s,...Lf,"--xy-background-color-props":r,"--xy-background-pattern-color-props":l},ref:d,"data-testid":"rf__background",children:[(0,B.jsx)("pattern",{id:E,x:f[0]%y[0],y:f[1]%y[1],width:y[0],height:y[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${_[0]},-${_[1]})`,children:b?(0,B.jsx)(FR,{radius:m/2,className:c}):(0,B.jsx)($R,{dimensions:x,lineWidth:i,variant:t,className:c})}),(0,B.jsx)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${E})`})]})}AE.displayName="Background";var ME=(0,P.memo)(AE);function WR(){return(0,B.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:(0,B.jsx)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function JR(){return(0,B.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:(0,B.jsx)("path",{d:"M0 0h32v4.2H0z"})})}function eO(){return(0,B.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:(0,B.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 tO(){return(0,B.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,B.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 nO(){return(0,B.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,B.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 Rf({children:e,className:t,...n}){return(0,B.jsx)("button",{type:"button",className:ot(["react-flow__controls-button",t]),...n,children:e})}var oO=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function DE({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:o=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:l,onFitView:r,onInteractiveChange:s,className:u,children:c,position:d="bottom-left",orientation:f="vertical","aria-label":h}){let v=Qe(),{isInteractive:b,minZoomReached:S,maxZoomReached:p,ariaLabelConfig:y}=Ae(oO,je),{zoomIn:m,zoomOut:g,fitView:x}=Mh(),_=()=>{m(),a?.()},E=()=>{g(),l?.()},w=()=>{x(i),r?.()},C=()=>{v.setState({nodesDraggable:!b,nodesConnectable:!b,elementsSelectable:!b}),s?.(!b)};return(0,B.jsxs)(Jl,{className:ot(["react-flow__controls",f==="horizontal"?"horizontal":"vertical",u]),position:d,style:e,"data-testid":"rf__controls","aria-label":h??y["controls.ariaLabel"],children:[t&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(Rf,{onClick:_,className:"react-flow__controls-zoomin",title:y["controls.zoomIn.ariaLabel"],"aria-label":y["controls.zoomIn.ariaLabel"],disabled:p,children:(0,B.jsx)(WR,{})}),(0,B.jsx)(Rf,{onClick:E,className:"react-flow__controls-zoomout",title:y["controls.zoomOut.ariaLabel"],"aria-label":y["controls.zoomOut.ariaLabel"],disabled:S,children:(0,B.jsx)(JR,{})})]}),n&&(0,B.jsx)(Rf,{className:"react-flow__controls-fitview",onClick:w,title:y["controls.fitView.ariaLabel"],"aria-label":y["controls.fitView.ariaLabel"],children:(0,B.jsx)(eO,{})}),o&&(0,B.jsx)(Rf,{className:"react-flow__controls-interactive",onClick:C,title:y["controls.interactive.ariaLabel"],"aria-label":y["controls.interactive.ariaLabel"],children:b?(0,B.jsx)(nO,{}):(0,B.jsx)(tO,{})}),c]})}DE.displayName="Controls";var o8=(0,P.memo)(DE);function iO({id:e,x:t,y:n,width:o,height:i,style:a,color:l,strokeColor:r,strokeWidth:s,className:u,borderRadius:c,shapeRendering:d,selected:f,onClick:h}){let{background:v,backgroundColor:b}=a||{},S=l||v||b;return(0,B.jsx)("rect",{className:ot(["react-flow__minimap-node",{selected:f},u]),x:t,y:n,rx:c,ry:c,width:o,height:i,style:{fill:S,stroke:r,strokeWidth:s},shapeRendering:d,onClick:h?p=>h(p,e):void 0})}var aO=(0,P.memo)(iO),lO=e=>e.nodes.map(t=>t.id),wh=e=>e instanceof Function?e:()=>e;function rO({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:i,nodeComponent:a=aO,onClick:l}){let r=Ae(lO,je),s=wh(t),u=wh(e),c=wh(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return(0,B.jsx)(B.Fragment,{children:r.map(f=>(0,B.jsx)(uO,{id:f,nodeColorFunc:s,nodeStrokeColorFunc:u,nodeClassNameFunc:c,nodeBorderRadius:o,nodeStrokeWidth:i,NodeComponent:a,onClick:l,shapeRendering:d},f))})}function sO({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:o,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:l,NodeComponent:r,onClick:s}){let{node:u,x:c,y:d,width:f,height:h}=Ae(v=>{let b=v.nodeLookup.get(e);if(!b)return{node:void 0,x:0,y:0,width:0,height:0};let S=b.internals.userNode,{x:p,y}=b.internals.positionAbsolute,{width:m,height:g}=So(S);return{node:S,x:p,y,width:m,height:g}},je);return!u||u.hidden||!fh(u)?null:(0,B.jsx)(r,{x:c,y:d,width:f,height:h,style:u.style,selected:!!u.selected,className:o(u),color:t(u),borderRadius:i,strokeColor:n(u),strokeWidth:a,shapeRendering:l,onClick:s,id:u.id})}var uO=(0,P.memo)(sO),cO=(0,P.memo)(rO),fO=200,dO=150,pO=e=>!e.hidden,mO=e=>{let t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?sh(Zl(e.nodeLookup,{filter:pO}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},hO="react-flow__minimap-desc";function RE({style:e,className:t,nodeStrokeColor:n,nodeColor:o,nodeClassName:i="",nodeBorderRadius:a=5,nodeStrokeWidth:l,nodeComponent:r,bgColor:s,maskColor:u,maskStrokeColor:c,maskStrokeWidth:d,position:f="bottom-right",onClick:h,onNodeClick:v,pannable:b=!1,zoomable:S=!1,ariaLabel:p,inversePan:y,zoomStep:m=1,offsetScale:g=5}){let x=Qe(),_=(0,P.useRef)(null),{boundingRect:E,viewBB:w,rfId:C,panZoom:H,translateExtent:D,flowWidth:z,flowHeight:I,ariaLabelConfig:T}=Ae(mO,je),A=e?.width??fO,M=e?.height??dO,O=E.width/A,R=E.height/M,L=Math.max(O,R),V=L*A,k=L*M,G=g*L,q=E.x-(V-E.width)/2-G,Z=E.y-(k-E.height)/2-G,j=V+G*2,se=k+G*2,J=`${hO}-${C}`,X=(0,P.useRef)(0),Q=(0,P.useRef)();X.current=L,(0,P.useEffect)(()=>{if(_.current&&H)return Q.current=i_({domNode:_.current,panZoom:H,getTransform:()=>x.getState().transform,getViewScale:()=>X.current}),()=>{Q.current?.destroy()}},[H]),(0,P.useEffect)(()=>{Q.current?.update({translateExtent:D,width:z,height:I,inversePan:y,pannable:b,zoomStep:m,zoomable:S})},[b,S,y,m,D,z,I]);let ue=h?ee=>{let[Te,de]=Q.current?.pointer(ee)||[0,0];h(ee,{x:Te,y:de})}:void 0,he=v?(0,P.useCallback)((ee,Te)=>{let de=x.getState().nodeLookup.get(Te).internals.userNode;v(ee,de)},[]):void 0,ie=p??T["minimap.ariaLabel"];return(0,B.jsx)(Jl,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof s=="string"?s:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-stroke-width-props":typeof d=="number"?d*L:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof l=="number"?l:void 0},className:ot(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:(0,B.jsxs)("svg",{width:A,height:M,viewBox:`${q} ${Z} ${j} ${se}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":J,ref:_,onClick:ue,children:[ie&&(0,B.jsx)("title",{id:J,children:ie}),(0,B.jsx)(cO,{onClick:he,nodeColor:o,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:l,nodeComponent:r}),(0,B.jsx)("path",{className:"react-flow__minimap-mask",d:`M${q-G},${Z-G}h${j+G*2}v${se+G*2}h${-j-G*2}z
|
|
2488
|
+
M${w.x},${w.y}h${w.width}v${w.height}h${-w.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}RE.displayName="MiniMap";var i8=(0,P.memo)(RE),gO=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,yO={[$i.Line]:"right",[$i.Handle]:"bottom-right"};function vO({nodeId:e,position:t,variant:n=$i.Handle,className:o,style:i=void 0,children:a,color:l,minWidth:r=10,minHeight:s=10,maxWidth:u=Number.MAX_VALUE,maxHeight:c=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:h=!0,shouldResize:v,onResizeStart:b,onResize:S,onResizeEnd:p}){let y=aE(),m=typeof e=="string"?e:y,g=Qe(),x=(0,P.useRef)(null),_=n===$i.Handle,E=Ae((0,P.useCallback)(gO(_&&h),[_,h]),je),w=(0,P.useRef)(null),C=t??yO[n];(0,P.useEffect)(()=>{if(!(!x.current||!m))return w.current||(w.current=u_({domNode:x.current,nodeId:m,getStoreItems:()=>{let{nodeLookup:D,transform:z,snapGrid:I,snapToGrid:T,nodeOrigin:A,domNode:M}=g.getState();return{nodeLookup:D,transform:z,snapGrid:I,snapToGrid:T,nodeOrigin:A,paneDomNode:M}},onChange:(D,z)=>{let{triggerNodeChanges:I,nodeLookup:T,parentLookup:A,nodeOrigin:M}=g.getState(),O=[],R={x:D.x,y:D.y},L=T.get(m);if(L&&L.expandParent&&L.parentId){let V=L.origin??M,k=D.width??L.measured.width??0,G=D.height??L.measured.height??0,q={id:L.id,parentId:L.parentId,rect:{width:k,height:G,...dh({x:D.x??L.position.x,y:D.y??L.position.y},{width:k,height:G},L.parentId,T,V)}},Z=Cf([q],T,A,M);O.push(...Z),R.x=D.x?Math.max(V[0]*k,D.x):void 0,R.y=D.y?Math.max(V[1]*G,D.y):void 0}if(R.x!==void 0&&R.y!==void 0){let V={id:m,type:"position",position:{...R}};O.push(V)}if(D.width!==void 0&&D.height!==void 0){let k={id:m,type:"dimensions",resizing:!0,setAttributes:f?f==="horizontal"?"width":"height":!0,dimensions:{width:D.width,height:D.height}};O.push(k)}for(let V of z){let k={...V,type:"position"};O.push(k)}I(O)},onEnd:({width:D,height:z})=>{let I={id:m,type:"dimensions",resizing:!1,dimensions:{width:D,height:z}};g.getState().triggerNodeChanges([I])}})),w.current.update({controlPosition:C,boundaries:{minWidth:r,minHeight:s,maxWidth:u,maxHeight:c},keepAspectRatio:d,resizeDirection:f,onResizeStart:b,onResize:S,onResizeEnd:p,shouldResize:v}),()=>{w.current?.destroy()}},[C,r,s,u,c,d,b,S,p,v]);let H=C.split("-");return(0,B.jsx)("div",{className:ot(["react-flow__resize-control","nodrag",...H,n,o]),ref:x,style:{...i,scale:E,...l&&{[_?"backgroundColor":"borderColor"]:l}},children:a})}var a8=(0,P.memo)(vO);var Rh=oe(At(),1);var OE="(prefers-color-scheme: dark)";function bO(e){return e?ha.DARK:ha.LIGHT}function Oh(){return typeof window>"u"||typeof window.matchMedia!="function"?ha.DARK:bO(window.matchMedia(OE).matches)}function SO(e){if(typeof window>"u"||typeof window.matchMedia!="function")return()=>{};let t=window.matchMedia(OE);return typeof t.addEventListener=="function"?(t.addEventListener("change",e),()=>t.removeEventListener("change",e)):(t.addListener(e),()=>t.removeListener(e))}function xO(e){return e!==void 0?{subscribe:()=>()=>{},getSnapshot:()=>e,getServerSnapshot:()=>e}:{subscribe:SO,getSnapshot:Oh,getServerSnapshot:()=>ha.DARK}}function zE(e){let t=Rh.default.useMemo(()=>xO(e),[e]);return Rh.default.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot)}function LE(e){if(!e)return null;let t={},n={},o={},i={},a=new Set;for(let r of e.edges)r.kind==="contains"&&(i[r.source]||(i[r.source]=[]),i[r.source].push(r.target),a.add(r.target));let l=new Set(Object.keys(i));for(let r of e.nodes){let s=r.io,u=l.has(r.id);for(let c of s.outputs)c.digest&&!t[c.digest]&&(t[c.digest]={name:c.name,concept:c.concept,contentType:c.content_type}),c.digest&&!u&&(n[c.digest]=r.id);for(let c of s.inputs)c.digest&&!t[c.digest]&&(t[c.digest]={name:c.name,concept:c.concept,contentType:c.content_type}),c.digest&&!u&&(o[c.digest]||(o[c.digest]=[]),o[c.digest].push(r.id))}return{stuffRegistry:t,stuffProducers:n,stuffConsumers:o,controllerNodeIds:l,childNodeIds:a,containmentTree:i}}function _o(e,t){let n={};for(let[l,r]of Object.entries(t.containmentTree))for(let s of r)n[s]=l;for(let[l,r]of Object.entries(t.stuffProducers)){let s="stuff_"+l,u=n[r];u&&(n[s]=u)}for(let l of e.nodes){if(!t.controllerNodeIds.has(l.id))continue;let r=n[l.id];if(r)for(let s of l.io.outputs){if(!s.digest)continue;let u="stuff_"+s.digest;n[u]||(n[u]=r)}}for(let l of e.edges)if(l.kind==="batch_item"&&l.target_stuff_digest){let r="stuff_"+l.target_stuff_digest;t.controllerNodeIds.has(l.source)&&(n[r]=l.source)}let o=new Set;for(let l of e.edges)(l.kind==="batch_item"||l.kind==="batch_aggregate"||l.kind==="parallel_combine")&&(l.source_stuff_digest&&o.add(l.source_stuff_digest),l.target_stuff_digest&&o.add(l.target_stuff_digest));let i="stuff_",a=Object.keys(n).filter(l=>l.startsWith(i));for(let l of a){let r=l.slice(i.length),s=n[l];if(!s)continue;let u=t.stuffConsumers[r]||[];if(u.length===0){o.has(r)||delete n[l];continue}for(;s;){let c=s;if(u.some(h=>_O(h,c,n)))break;let f=n[s];f?(n[l]=f,s=f):(delete n[l],s=void 0)}}return n}function _O(e,t,n){let o=n[e];for(;o;){if(o===t)return!0;o=n[o]}return!1}function BE(e,t){return e.pipe_registry?.[t]}function zh(e,t){if(!e.concept_registry)return;let n=e.concept_registry[t];if(n)return n;for(let o of Object.values(e.concept_registry))if(o.code===t)return o}function HE(e){return!e||typeof e!="string"?!1:e.startsWith("https://")||e.startsWith("http://")||e.startsWith("file://")||e.startsWith("/")}function Hf(e){return!e||typeof e!="string"?!1:e.startsWith("https://")||e.startsWith("http://")||e.startsWith("file://")||e.startsWith("/")}function PE(e){if(!e)return null;if(typeof e=="string")return HE(e)?e:null;if(typeof e!="object")return null;let t=e,n=[t.public_url,t.src,t.href,t.uri,t.url];for(let o of n)if(HE(o))return o;return null}function kE(e){if(!e)return null;if(typeof e=="string")return Hf(e)?e:null;if(typeof e!="object")return null;let t=e,n=[t.public_url,t.src,t.href,t.uri,t.url];for(let o of n)if(Hf(o))return o;return null}function GE(e){if(!e)return null;if(typeof e=="string")return e.startsWith("pipelex-storage://")?e:null;if(typeof e!="object")return null;let t=e,n=[t.uri,t.url,t.src,t.href];for(let o of n)if(typeof o=="string"&&o.startsWith("pipelex-storage://"))return o;return null}function Lh(e){if(!e||typeof e!="object")return null;let t=e;return typeof t.filename=="string"&&t.filename?t.filename:null}function UE(e,t,n){if(t&&t.includes("/"))return t;if(e&&typeof e=="object"){let i=e;if(typeof i.mime_type=="string"&&i.mime_type)return i.mime_type}let o=Lh(e)||n||(typeof e=="string"?e:null);if(o){let a=o.match(/\.([a-zA-Z0-9]+)(?:\?|#|$)/)?.[1]?.toLowerCase();if(a){if(a==="pdf")return"application/pdf";if(["png","jpg","jpeg","gif","webp","svg","bmp"].includes(a))return`image/${a==="jpg"?"jpeg":a==="svg"?"svg+xml":a}`}}return null}function IE(e){return e==="application/pdf"?"PDF":e?.startsWith("image/")?"Image":"HTML"}function Bh(e,t){for(let n of e.nodes)for(let o of n.io?.outputs??[])if(o.digest===t)return{digest:t,name:o.name,concept:o.concept,contentType:o.content_type,data:o.data,dataText:o.data_text,dataHtml:o.data_html};for(let n of e.nodes)for(let o of n.io?.inputs??[])if(o.digest===t)return{digest:t,name:o.name,concept:o.concept,contentType:o.content_type,data:o.data,dataText:o.data_text,dataHtml:o.data_html};return null}var An=oe(At(),1);var{entries:KE,setPrototypeOf:VE,isFrozen:EO,getPrototypeOf:TO,getOwnPropertyDescriptor:NO}=Object,{freeze:$t,seal:Zn,create:js}=Object,{apply:Vh,construct:Yh}=typeof Reflect<"u"&&Reflect;$t||($t=function(t){return t});Zn||(Zn=function(t){return t});Vh||(Vh=function(t,n){for(var o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];return t.apply(n,i)});Yh||(Yh=function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return new t(...o)});var Vs=Ft(Array.prototype.forEach),CO=Ft(Array.prototype.lastIndexOf),YE=Ft(Array.prototype.pop),Ys=Ft(Array.prototype.push),wO=Ft(Array.prototype.splice),kf=Ft(String.prototype.toLowerCase),Hh=Ft(String.prototype.toString),Ph=Ft(String.prototype.match),er=Ft(String.prototype.replace),AO=Ft(String.prototype.indexOf),MO=Ft(String.prototype.trim),ao=Ft(Object.prototype.hasOwnProperty),jt=Ft(RegExp.prototype.test),Xs=DO(TypeError);function Ft(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return Vh(e,t,o)}}function DO(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Yh(e,n)}}function Se(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:kf;VE&&VE(e,null);let o=t.length;for(;o--;){let i=t[o];if(typeof i=="string"){let a=n(i);a!==i&&(EO(t)||(t[o]=a),i=a)}e[i]=!0}return e}function RO(e){for(let t=0;t<e.length;t++)ao(e,t)||(e[t]=null);return e}function Eo(e){let t=js(null);for(let[n,o]of KE(e))ao(e,n)&&(Array.isArray(o)?t[n]=RO(o):o&&typeof o=="object"&&o.constructor===Object?t[n]=Eo(o):t[n]=o);return t}function qs(e,t){for(;e!==null;){let o=NO(e,t);if(o){if(o.get)return Ft(o.get);if(typeof o.value=="function")return Ft(o.value)}e=TO(e)}function n(){return null}return n}var XE=$t(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),kh=$t(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Gh=$t(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),OO=$t(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Uh=$t(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),zO=$t(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),qE=$t(["#text"]),ZE=$t(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ih=$t(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),jE=$t(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Pf=$t(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),LO=Zn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),BO=Zn(/<%[\w\W]*|[\w\W]*%>/gm),HO=Zn(/\$\{[\w\W]*/gm),PO=Zn(/^data-[\-\w.\u00B7-\uFFFF]+$/),kO=Zn(/^aria-[\-\w]+$/),QE=Zn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),GO=Zn(/^(?:\w+script|data):/i),UO=Zn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),WE=Zn(/^html$/i),IO=Zn(/^[a-z][.\w]*(-[.\w]+)+$/i),$E=Object.freeze({__proto__:null,ARIA_ATTR:kO,ATTR_WHITESPACE:UO,CUSTOM_ELEMENT:IO,DATA_ATTR:PO,DOCTYPE_NAME:WE,ERB_EXPR:BO,IS_ALLOWED_URI:QE,IS_SCRIPT_OR_DATA:GO,MUSTACHE_EXPR:LO,TMPLIT_EXPR:HO}),Zs={element:1,text:3,progressingInstruction:7,comment:8,document:9},VO=function(){return typeof window>"u"?null:window},YO=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null,i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(o=n.getAttribute(i));let a="dompurify"+(o?"#"+o:"");try{return t.createPolicy(a,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},FE=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function JE(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:VO(),t=ne=>JE(ne);if(t.version="3.4.0",t.removed=[],!e||!e.document||e.document.nodeType!==Zs.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,o=n,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:l,Node:r,Element:s,NodeFilter:u,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:h}=e,v=s.prototype,b=qs(v,"cloneNode"),S=qs(v,"remove"),p=qs(v,"nextSibling"),y=qs(v,"childNodes"),m=qs(v,"parentNode");if(typeof l=="function"){let ne=n.createElement("template");ne.content&&ne.content.ownerDocument&&(n=ne.content.ownerDocument)}let g,x="",{implementation:_,createNodeIterator:E,createDocumentFragment:w,getElementsByTagName:C}=n,{importNode:H}=o,D=FE();t.isSupported=typeof KE=="function"&&typeof m=="function"&&_&&_.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:z,ERB_EXPR:I,TMPLIT_EXPR:T,DATA_ATTR:A,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:R,CUSTOM_ELEMENT:L}=$E,{IS_ALLOWED_URI:V}=$E,k=null,G=Se({},[...XE,...kh,...Gh,...Uh,...qE]),q=null,Z=Se({},[...ZE,...Ih,...jE,...Pf]),j=Object.seal(js(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),se=null,J=null,X=Object.seal(js(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Q=!0,ue=!0,he=!1,ie=!0,ee=!1,Te=!0,de=!1,be=!1,Le=!1,Be=!1,dt=!1,Gt=!1,mn=!0,rt=!1,Dn="user-content-",Qt=!0,Wt=!1,St={},$e=null,ro=Se({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),li=null,jn=Se({},["audio","video","img","source","image","track"]),ri=null,$n=Se({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Rn="http://www.w3.org/1998/Math/MathML",To="http://www.w3.org/2000/svg",pt="http://www.w3.org/1999/xhtml",Fn=pt,Kn=!1,No=null,Co=Se({},[Rn,To,pt],Hh),si=Se({},["mi","mo","mn","ms","mtext"]),ui=Se({},["annotation-xml"]),Pa=Se({},["title","style","font","a","script"]),wo=null,ka=["application/xhtml+xml","text/html"],Ga="text/html",We=null,Ao=null,Mo=n.createElement("form"),Do=function(N){return N instanceof RegExp||N instanceof Function},pe=function(){let N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ao&&Ao===N)){if((!N||typeof N!="object")&&(N={}),N=Eo(N),wo=ka.indexOf(N.PARSER_MEDIA_TYPE)===-1?Ga:N.PARSER_MEDIA_TYPE,We=wo==="application/xhtml+xml"?Hh:kf,k=ao(N,"ALLOWED_TAGS")?Se({},N.ALLOWED_TAGS,We):G,q=ao(N,"ALLOWED_ATTR")?Se({},N.ALLOWED_ATTR,We):Z,No=ao(N,"ALLOWED_NAMESPACES")?Se({},N.ALLOWED_NAMESPACES,Hh):Co,ri=ao(N,"ADD_URI_SAFE_ATTR")?Se(Eo($n),N.ADD_URI_SAFE_ATTR,We):$n,li=ao(N,"ADD_DATA_URI_TAGS")?Se(Eo(jn),N.ADD_DATA_URI_TAGS,We):jn,$e=ao(N,"FORBID_CONTENTS")?Se({},N.FORBID_CONTENTS,We):ro,se=ao(N,"FORBID_TAGS")?Se({},N.FORBID_TAGS,We):Eo({}),J=ao(N,"FORBID_ATTR")?Se({},N.FORBID_ATTR,We):Eo({}),St=ao(N,"USE_PROFILES")?N.USE_PROFILES:!1,Q=N.ALLOW_ARIA_ATTR!==!1,ue=N.ALLOW_DATA_ATTR!==!1,he=N.ALLOW_UNKNOWN_PROTOCOLS||!1,ie=N.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ee=N.SAFE_FOR_TEMPLATES||!1,Te=N.SAFE_FOR_XML!==!1,de=N.WHOLE_DOCUMENT||!1,Be=N.RETURN_DOM||!1,dt=N.RETURN_DOM_FRAGMENT||!1,Gt=N.RETURN_TRUSTED_TYPE||!1,Le=N.FORCE_BODY||!1,mn=N.SANITIZE_DOM!==!1,rt=N.SANITIZE_NAMED_PROPS||!1,Qt=N.KEEP_CONTENT!==!1,Wt=N.IN_PLACE||!1,V=N.ALLOWED_URI_REGEXP||QE,Fn=N.NAMESPACE||pt,si=N.MATHML_TEXT_INTEGRATION_POINTS||si,ui=N.HTML_INTEGRATION_POINTS||ui,j=N.CUSTOM_ELEMENT_HANDLING||js(null),N.CUSTOM_ELEMENT_HANDLING&&Do(N.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=N.CUSTOM_ELEMENT_HANDLING.tagNameCheck),N.CUSTOM_ELEMENT_HANDLING&&Do(N.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=N.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),N.CUSTOM_ELEMENT_HANDLING&&typeof N.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(j.allowCustomizedBuiltInElements=N.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ee&&(ue=!1),dt&&(Be=!0),St&&(k=Se({},qE),q=js(null),St.html===!0&&(Se(k,XE),Se(q,ZE)),St.svg===!0&&(Se(k,kh),Se(q,Ih),Se(q,Pf)),St.svgFilters===!0&&(Se(k,Gh),Se(q,Ih),Se(q,Pf)),St.mathMl===!0&&(Se(k,Uh),Se(q,jE),Se(q,Pf))),X.tagCheck=null,X.attributeCheck=null,N.ADD_TAGS&&(typeof N.ADD_TAGS=="function"?X.tagCheck=N.ADD_TAGS:(k===G&&(k=Eo(k)),Se(k,N.ADD_TAGS,We))),N.ADD_ATTR&&(typeof N.ADD_ATTR=="function"?X.attributeCheck=N.ADD_ATTR:(q===Z&&(q=Eo(q)),Se(q,N.ADD_ATTR,We))),N.ADD_URI_SAFE_ATTR&&Se(ri,N.ADD_URI_SAFE_ATTR,We),N.FORBID_CONTENTS&&($e===ro&&($e=Eo($e)),Se($e,N.FORBID_CONTENTS,We)),N.ADD_FORBID_CONTENTS&&($e===ro&&($e=Eo($e)),Se($e,N.ADD_FORBID_CONTENTS,We)),Qt&&(k["#text"]=!0),de&&Se(k,["html","head","body"]),k.table&&(Se(k,["tbody"]),delete se.tbody),N.TRUSTED_TYPES_POLICY){if(typeof N.TRUSTED_TYPES_POLICY.createHTML!="function")throw Xs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof N.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Xs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=N.TRUSTED_TYPES_POLICY,x=g.createHTML("")}else g===void 0&&(g=YO(h,i)),g!==null&&typeof x=="string"&&(x=g.createHTML(""));$t&&$t(N),Ao=N}},le=Se({},[...kh,...Gh,...OO]),ae=Se({},[...Uh,...zO]),we=function(N){let Y=m(N);(!Y||!Y.tagName)&&(Y={namespaceURI:Fn,tagName:"template"});let K=kf(N.tagName),Ge=kf(Y.tagName);return No[N.namespaceURI]?N.namespaceURI===To?Y.namespaceURI===pt?K==="svg":Y.namespaceURI===Rn?K==="svg"&&(Ge==="annotation-xml"||si[Ge]):!!le[K]:N.namespaceURI===Rn?Y.namespaceURI===pt?K==="math":Y.namespaceURI===To?K==="math"&&ui[Ge]:!!ae[K]:N.namespaceURI===pt?Y.namespaceURI===To&&!ui[Ge]||Y.namespaceURI===Rn&&!si[Ge]?!1:!ae[K]&&(Pa[K]||!le[K]):!!(wo==="application/xhtml+xml"&&No[N.namespaceURI]):!1},ge=function(N){Ys(t.removed,{element:N});try{m(N).removeChild(N)}catch{S(N)}},He=function(N,Y){try{Ys(t.removed,{attribute:Y.getAttributeNode(N),from:Y})}catch{Ys(t.removed,{attribute:null,from:Y})}if(Y.removeAttribute(N),N==="is")if(Be||dt)try{ge(Y)}catch{}else try{Y.setAttribute(N,"")}catch{}},wt=function(N){let Y=null,K=null;if(Le)N="<remove></remove>"+N;else{let et=Ph(N,/^[\r\n\t ]+/);K=et&&et[0]}wo==="application/xhtml+xml"&&Fn===pt&&(N='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+N+"</body></html>");let Ge=g?g.createHTML(N):N;if(Fn===pt)try{Y=new f().parseFromString(Ge,wo)}catch{}if(!Y||!Y.documentElement){Y=_.createDocument(Fn,"template",null);try{Y.documentElement.innerHTML=Kn?x:Ge}catch{}}let _t=Y.body||Y.documentElement;return N&&K&&_t.insertBefore(n.createTextNode(K),_t.childNodes[0]||null),Fn===pt?C.call(Y,de?"html":"body")[0]:de?Y.documentElement:_t},Qn=function(N){return E.call(N.ownerDocument||N,N,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},On=function(N){return N instanceof d&&(typeof N.nodeName!="string"||typeof N.textContent!="string"||typeof N.removeChild!="function"||!(N.attributes instanceof c)||typeof N.removeAttribute!="function"||typeof N.setAttribute!="function"||typeof N.namespaceURI!="string"||typeof N.insertBefore!="function"||typeof N.hasChildNodes!="function")},ci=function(N){return typeof r=="function"&&N instanceof r};function xt(ne,N,Y){Vs(ne,K=>{K.call(t,N,Y,Ao)})}let lr=function(N){let Y=null;if(xt(D.beforeSanitizeElements,N,null),On(N))return ge(N),!0;let K=We(N.nodeName);if(xt(D.uponSanitizeElement,N,{tagName:K,allowedTags:k}),Te&&N.hasChildNodes()&&!ci(N.firstElementChild)&&jt(/<[/\w!]/g,N.innerHTML)&&jt(/<[/\w!]/g,N.textContent)||Te&&N.namespaceURI===pt&&K==="style"&&ci(N.firstElementChild)||N.nodeType===Zs.progressingInstruction||Te&&N.nodeType===Zs.comment&&jt(/<[/\w]/g,N.data))return ge(N),!0;if(se[K]||!(X.tagCheck instanceof Function&&X.tagCheck(K))&&!k[K]){if(!se[K]&&sr(K)&&(j.tagNameCheck instanceof RegExp&&jt(j.tagNameCheck,K)||j.tagNameCheck instanceof Function&&j.tagNameCheck(K)))return!1;if(Qt&&!$e[K]){let Ge=m(N)||N.parentNode,_t=y(N)||N.childNodes;if(_t&&Ge){let et=_t.length;for(let Ht=et-1;Ht>=0;--Ht){let Ut=b(_t[Ht],!0);Ut.__removalCount=(N.__removalCount||0)+1,Ge.insertBefore(Ut,p(N))}}}return ge(N),!0}return N instanceof s&&!we(N)||(K==="noscript"||K==="noembed"||K==="noframes")&&jt(/<\/no(script|embed|frames)/i,N.innerHTML)?(ge(N),!0):(ee&&N.nodeType===Zs.text&&(Y=N.textContent,Vs([z,I,T],Ge=>{Y=er(Y,Ge," ")}),N.textContent!==Y&&(Ys(t.removed,{element:N.cloneNode()}),N.textContent=Y)),xt(D.afterSanitizeElements,N,null),!1)},rr=function(N,Y,K){if(J[Y]||mn&&(Y==="id"||Y==="name")&&(K in n||K in Mo))return!1;if(!(ue&&!J[Y]&&jt(A,Y))){if(!(Q&&jt(M,Y))){if(!(X.attributeCheck instanceof Function&&X.attributeCheck(Y,N))){if(!q[Y]||J[Y]){if(!(sr(N)&&(j.tagNameCheck instanceof RegExp&&jt(j.tagNameCheck,N)||j.tagNameCheck instanceof Function&&j.tagNameCheck(N))&&(j.attributeNameCheck instanceof RegExp&&jt(j.attributeNameCheck,Y)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(Y,N))||Y==="is"&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&&jt(j.tagNameCheck,K)||j.tagNameCheck instanceof Function&&j.tagNameCheck(K))))return!1}else if(!ri[Y]){if(!jt(V,er(K,R,""))){if(!((Y==="src"||Y==="xlink:href"||Y==="href")&&N!=="script"&&AO(K,"data:")===0&&li[N])){if(!(he&&!jt(O,er(K,R,"")))){if(K)return!1}}}}}}}return!0},sr=function(N){return N!=="annotation-xml"&&Ph(N,L)},Js=function(N){xt(D.beforeSanitizeAttributes,N,null);let{attributes:Y}=N;if(!Y||On(N))return;let K={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:q,forceKeepAttr:void 0},Ge=Y.length;for(;Ge--;){let _t=Y[Ge],{name:et,namespaceURI:Ht,value:Ut}=_t,so=We(et),ur=Ut,mt=et==="value"?ur:MO(ur);if(K.attrName=so,K.attrValue=mt,K.keepAttr=!0,K.forceKeepAttr=void 0,xt(D.uponSanitizeAttribute,N,K),mt=K.attrValue,rt&&(so==="id"||so==="name")&&(He(et,N),mt=Dn+mt),Te&&jt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,mt)){He(et,N);continue}if(so==="attributename"&&Ph(mt,"href")){He(et,N);continue}if(K.forceKeepAttr)continue;if(!K.keepAttr){He(et,N);continue}if(!ie&&jt(/\/>/i,mt)){He(et,N);continue}ee&&Vs([z,I,T],tu=>{mt=er(mt,tu," ")});let cr=We(N.nodeName);if(!rr(cr,so,mt)){He(et,N);continue}if(g&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!Ht)switch(h.getAttributeType(cr,so)){case"TrustedHTML":{mt=g.createHTML(mt);break}case"TrustedScriptURL":{mt=g.createScriptURL(mt);break}}if(mt!==ur)try{Ht?N.setAttributeNS(Ht,et,mt):N.setAttribute(et,mt),On(N)?ge(N):YE(t.removed)}catch{He(et,N)}}xt(D.afterSanitizeAttributes,N,null)},eu=function(N){let Y=null,K=Qn(N);for(xt(D.beforeSanitizeShadowDOM,N,null);Y=K.nextNode();)xt(D.uponSanitizeShadowNode,Y,null),lr(Y),Js(Y),Y.content instanceof a&&eu(Y.content);xt(D.afterSanitizeShadowDOM,N,null)};return t.sanitize=function(ne){let N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=null,K=null,Ge=null,_t=null;if(Kn=!ne,Kn&&(ne="<!-->"),typeof ne!="string"&&!ci(ne))if(typeof ne.toString=="function"){if(ne=ne.toString(),typeof ne!="string")throw Xs("dirty is not a string, aborting")}else throw Xs("toString is not a function");if(!t.isSupported)return ne;if(be||pe(N),t.removed=[],typeof ne=="string"&&(Wt=!1),Wt){if(ne.nodeName){let Ut=We(ne.nodeName);if(!k[Ut]||se[Ut])throw Xs("root node is forbidden and cannot be sanitized in-place")}}else if(ne instanceof r)Y=wt("<!---->"),K=Y.ownerDocument.importNode(ne,!0),K.nodeType===Zs.element&&K.nodeName==="BODY"||K.nodeName==="HTML"?Y=K:Y.appendChild(K);else{if(!Be&&!ee&&!de&&ne.indexOf("<")===-1)return g&&Gt?g.createHTML(ne):ne;if(Y=wt(ne),!Y)return Be?null:Gt?x:""}Y&&Le&&ge(Y.firstChild);let et=Qn(Wt?ne:Y);for(;Ge=et.nextNode();)lr(Ge),Js(Ge),Ge.content instanceof a&&eu(Ge.content);if(Wt)return ne;if(Be){if(ee){Y.normalize();let Ut=Y.innerHTML;Vs([z,I,T],so=>{Ut=er(Ut,so," ")}),Y.innerHTML=Ut}if(dt)for(_t=w.call(Y.ownerDocument);Y.firstChild;)_t.appendChild(Y.firstChild);else _t=Y;return(q.shadowroot||q.shadowrootmode)&&(_t=H.call(o,_t,!0)),_t}let Ht=de?Y.outerHTML:Y.innerHTML;return de&&k["!doctype"]&&Y.ownerDocument&&Y.ownerDocument.doctype&&Y.ownerDocument.doctype.name&&jt(WE,Y.ownerDocument.doctype.name)&&(Ht="<!DOCTYPE "+Y.ownerDocument.doctype.name+`>
|
|
2489
|
+
`+Ht),ee&&Vs([z,I,T],Ut=>{Ht=er(Ht,Ut," ")}),g&&Gt?g.createHTML(Ht):Ht},t.setConfig=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};pe(ne),be=!0},t.clearConfig=function(){Ao=null,be=!1},t.isValidAttribute=function(ne,N,Y){Ao||pe({});let K=We(ne),Ge=We(N);return rr(K,Ge,Y)},t.addHook=function(ne,N){typeof N=="function"&&Ys(D[ne],N)},t.removeHook=function(ne,N){if(N!==void 0){let Y=CO(D[ne],N);return Y===-1?void 0:wO(D[ne],Y,1)[0]}return YE(D[ne])},t.removeHooks=function(ne){D[ne]=[]},t.removeAllHooks=function(){D=FE()},t}var eT=JE();var re=oe(ve(),1),XO=(0,re.jsx)("svg",{viewBox:"0 0 24 24",children:(0,re.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),qO=(0,re.jsx)("svg",{viewBox:"0 0 24 24",children:(0,re.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}),ZO=(0,re.jsx)("svg",{viewBox:"0 0 24 24",children:(0,re.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"})}),jO=(0,re.jsx)("svg",{viewBox:"0 0 24 24",children:(0,re.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"})}),tT=(0,re.jsx)("svg",{viewBox:"0 0 24 24",children:(0,re.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"})});function Gf(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Xh(e,t,n){let o=new Blob([e],{type:n}),i=URL.createObjectURL(o),a=document.createElement("a");a.href=i,a.download=t,a.click(),setTimeout(()=>URL.revokeObjectURL(i),1e4)}function nT(e,t){let n=document.createElement("a");n.href=e,n.download=t,n.target="_blank",n.click()}function Uf({stuff:e,className:t,resolveStorageUrl:n,canEmbedPdf:o,onOpenExternally:i}){let[a,l]=An.default.useState("html"),[r,s]=An.default.useState(!1),u=An.default.useRef(null),c=An.default.useMemo(()=>kE(e.data),[e.data]),d=An.default.useMemo(()=>PE(e.data),[e.data]),f=An.default.useMemo(()=>GE(e.data),[e.data]),h=An.default.useMemo(()=>Lh(e.data),[e.data]),[v,b]=An.default.useState(null);An.default.useEffect(()=>{if(b(null),!f||!n||c)return;let A=!1;return n(f).then(M=>{A||b(Hf(M)?M:null)}).catch(()=>{A||b(null)}),()=>{A=!0}},[f,n,c]);let S=c??v,p=d??v,y=An.default.useMemo(()=>UE(e.data,e.contentType,p??f),[e.data,e.contentType,p,f]),m=y==="application/pdf",g=y?.startsWith("image/")??!1,x=IE(y??e.contentType),{jsonString:_,jsonError:E}=An.default.useMemo(()=>{if(e.data==null)return{jsonString:null,jsonError:null};try{return{jsonString:JSON.stringify(e.data,null,2),jsonError:null}}catch(A){return{jsonString:null,jsonError:A instanceof Error?A.message:String(A)}}},[e.data]);An.default.useEffect(()=>{a!=="html"||!u.current||u.current.querySelectorAll("a").forEach(A=>{A.setAttribute("target","_blank"),A.setAttribute("rel","noopener noreferrer")})},[a,e.dataHtml]);function w(A){let M=h||e.name;return(0,re.jsxs)("div",{className:"stuff-viewer-local-file",children:[(0,re.jsx)("div",{className:"stuff-viewer-local-file-icon",children:tT}),(0,re.jsxs)("div",{className:"stuff-viewer-local-file-info",children:[M&&(0,re.jsx)("div",{className:"stuff-viewer-local-file-name",children:M}),(0,re.jsxs)("div",{className:"stuff-viewer-local-file-hint",children:[A," \u2014 no preview available"]})]})]})}function C(A){return(0,re.jsxs)("div",{className:"stuff-viewer-error",role:"alert",children:[(0,re.jsx)("div",{className:"stuff-viewer-error-title",children:"Unable to serialize data"}),(0,re.jsx)("div",{className:"stuff-viewer-error-detail",children:A})]})}function H(){if(a==="html"){if(m){if(o!==!1&&S){let M=S.includes("#")?S:`${S}#pagemode=none`;return(0,re.jsx)("div",{className:"stuff-viewer-pdf",children:(0,re.jsx)("embed",{src:M,type:"application/pdf"})})}if(p){let M=h||e.name;return(0,re.jsxs)("button",{type:"button",className:"stuff-viewer-local-file stuff-viewer-local-file--button",onClick:I,children:[(0,re.jsx)("div",{className:"stuff-viewer-local-file-icon",children:tT}),(0,re.jsxs)("div",{className:"stuff-viewer-local-file-info",children:[M&&(0,re.jsx)("div",{className:"stuff-viewer-local-file-name",children:M}),(0,re.jsx)("div",{className:"stuff-viewer-local-file-hint",children:"Click to open PDF externally"})]})]})}return w("PDF")}return g?S?(0,re.jsx)("div",{className:"stuff-viewer-image",children:(0,re.jsx)("img",{src:S,alt:e.name??"(unnamed stuff)"})}):w("Image"):e.dataHtml?(0,re.jsx)("div",{className:"stuff-viewer-html",dangerouslySetInnerHTML:{__html:eT.sanitize(e.dataHtml)}}):_?(0,re.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Gf(_)}}):E?C(E):(0,re.jsx)("div",{className:"stuff-viewer-placeholder",children:"No content available"})}return a==="json"?_?(0,re.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Gf(_)}}):E?C(E):(0,re.jsx)("div",{className:"stuff-viewer-placeholder",children:"No JSON data available"}):e.dataText?(0,re.jsx)("pre",{className:"stuff-viewer-pre stuff-viewer-pre--nowrap",dangerouslySetInnerHTML:{__html:Gf(e.dataText)}}):_?(0,re.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Gf(_)}}):E?C(E):(0,re.jsx)("div",{className:"stuff-viewer-placeholder",children:"No text data available"})}function D(){let A;a==="json"?A=_||"":a==="text"?A=e.dataText||_||"":A=e.dataText||e.dataHtml||_||"",A&&navigator.clipboard&&navigator.clipboard.writeText(A).then(()=>{s(!0),setTimeout(()=>s(!1),1500)}).catch(()=>{})}function z(){if(g&&p){let A=y?.split("/")[1]||"png";nT(p,`${e.name||"stuff"}.${A}`);return}if(m&&p){nT(p,`${e.name||"stuff"}.pdf`);return}a==="json"?Xh(_||"{}",`${e.name||"stuff"}.json`,"application/json"):a==="text"?Xh(e.dataText||_||"",`${e.name||"stuff"}.txt`,"text/plain"):Xh(e.dataHtml||_||"",`${e.name||"stuff"}.html`,"text/html")}function I(){if(p){if(i){i(p,h??void 0);return}window.open(p,"_blank","noopener,noreferrer")}}let T=["stuff-viewer",t].filter(Boolean).join(" ");return(0,re.jsxs)("div",{className:T,children:[(0,re.jsxs)("div",{className:"stuff-viewer-header",children:[(0,re.jsx)("h3",{className:"stuff-viewer-title",children:e.name??"(unnamed stuff)"}),e.concept&&(0,re.jsx)("p",{className:"stuff-viewer-subtitle",children:e.concept})]}),(0,re.jsxs)("div",{className:"stuff-viewer-toolbar",children:[(0,re.jsx)("div",{className:"stuff-viewer-tabs",children:["html","json","text"].map(A=>(0,re.jsx)("button",{type:"button",className:`stuff-viewer-tab${a===A?" stuff-viewer-tab--active":""}`,onClick:()=>l(A),children:A==="html"?x:A==="json"?"JSON":"Pretty"},A))}),(0,re.jsxs)("div",{className:"stuff-viewer-actions",children:[p&&(0,re.jsx)("button",{type:"button",className:"stuff-viewer-action-btn",onClick:I,title:"Open in new window","aria-label":"Open in new window",children:jO}),(0,re.jsx)("button",{type:"button",className:`stuff-viewer-action-btn${r?" stuff-viewer-action-btn--copied":""}`,onClick:D,title:"Copy","aria-label":"Copy",children:r?qO:XO}),(0,re.jsx)("button",{type:"button",className:"stuff-viewer-action-btn",onClick:z,title:"Download","aria-label":"Download",children:ZO})]})]}),(0,re.jsx)("div",{className:"stuff-viewer-content",ref:u,children:H()})]})}var oT=oe(At(),1);var Oa=oe(ve(),1);function iT({isOpen:e,onClose:t,children:n,width:o,isDragging:i,onResizeHandleMouseDown:a,closeOnEscape:l=!0}){oT.default.useEffect(()=>{if(!e||!l)return;let s=u=>{u.key==="Escape"&&t()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,l,t]);let r=["detail-panel",!e&&"detail-panel--closed",i&&"detail-panel--dragging"].filter(Boolean).join(" ");return(0,Oa.jsxs)("div",{className:r,style:o?{width:`${o}px`}:void 0,children:[a&&(0,Oa.jsx)("div",{className:"detail-panel-resize-handle",onMouseDown:a,role:"separator","aria-orientation":"vertical","aria-label":"Resize panel"}),(0,Oa.jsxs)("div",{className:"detail-panel-content",children:[(0,Oa.jsx)("div",{className:"detail-panel-close-row",children:(0,Oa.jsx)("button",{className:"detail-panel-close",onClick:t,"aria-label":"Close panel",children:"x"})}),n]})]})}var za=oe(At(),1),$O=.6;function aT({defaultWidth:e,minWidth:t,maxWidth:n,containerRef:o}){let[i,a]=za.default.useState(e),[l,r]=za.default.useState(!1),s=za.default.useRef({startX:0,startWidth:0,maxAllowed:n}),u=za.default.useRef(null),c=za.default.useCallback(d=>{d.preventDefault(),d.stopPropagation();let f=o?.current?.getBoundingClientRect().width,h=f?Math.min(n,f*$O):n;s.current={startX:d.clientX,startWidth:i,maxAllowed:h},r(!0),document.body.style.userSelect="none",document.body.style.cursor="col-resize"},[i,n,o]);return za.default.useEffect(()=>{if(!l)return;let d=h=>{u.current!==null&&cancelAnimationFrame(u.current),u.current=requestAnimationFrame(()=>{let{startX:v,startWidth:b,maxAllowed:S}=s.current,p=v-h.clientX,y=Math.max(t,Math.min(S,b+p));a(y),u.current=null})},f=()=>{r(!1),document.body.style.userSelect="",document.body.style.cursor="",u.current!==null&&(cancelAnimationFrame(u.current),u.current=null)};return document.addEventListener("mousemove",d),document.addEventListener("mouseup",f),()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",f),document.body.style.userSelect="",document.body.style.cursor="",u.current!==null&&(cancelAnimationFrame(u.current),u.current=null)}},[l,t]),{width:i,isDragging:l,handleMouseDown:c}}var sT=oe(At(),1);var If=oe(At(),1),Ve=oe(ve(),1);function qh(e){return e<1?`${(e*1e3).toFixed(0)}ms`:`${e.toFixed(2)}s`}function te({label:e,value:t}){return t==null?null:(0,Ve.jsxs)("div",{className:"detail-kv-row",children:[(0,Ve.jsx)("span",{className:"detail-kv-key",children:e}),(0,Ve.jsx)("span",{className:"detail-kv-value",children:String(t)})]})}function Zh({label:e,text:t}){return t?(0,Ve.jsxs)("div",{children:[(0,Ve.jsx)("div",{className:"detail-section-label",children:e}),(0,Ve.jsx)("div",{className:"detail-prompt-block",children:t})]}):null}var FO=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})}),KO=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),QO=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),WO=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}),lT={all:"unset",cursor:"pointer",display:"flex",alignItems:"center",gap:4,fontSize:9,color:"#64748b",padding:"2px 6px",borderRadius:3,background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.06)",transition:"color 0.15s"};function lo({label:e,templateText:t,renderedText:n}){let[o,i]=(0,If.useState)(!1),[a,l]=(0,If.useState)(!1),[r,s]=(0,If.useState)(!1),u=!!t,c=!!n;if(!u&&!c)return null;let d=u&&c,f=d?o?t:n:t||n;function h(){!f||!navigator.clipboard||navigator.clipboard.writeText(f).then(()=>{l(!0),setTimeout(()=>l(!1),1500)}).catch(()=>{})}return(0,Ve.jsxs)("div",{children:[(0,Ve.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:4},children:[(0,Ve.jsx)("div",{className:"detail-section-label",style:{marginBottom:0},children:e}),(0,Ve.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,Ve.jsx)("button",{onClick:()=>s(v=>!v),title:r?"Collapse prompt":"Expand prompt","aria-label":r?"Collapse prompt":"Expand prompt",className:"detail-prompt-expand-btn",children:r?KO:FO}),(0,Ve.jsx)("button",{onClick:h,title:"Copy prompt","aria-label":"Copy prompt",style:{...lT,color:a?"#10b981":"#64748b"},children:a?WO:QO}),d&&(0,Ve.jsxs)("button",{onClick:()=>i(v=>!v),style:lT,children:[(0,Ve.jsx)("span",{style:{width:22,height:12,borderRadius:6,background:o?"rgba(255,255,255,0.12)":"#50FA7B33",position:"relative",display:"inline-block",transition:"background 0.15s"},children:(0,Ve.jsx)("span",{style:{position:"absolute",top:2,left:o?2:12,width:8,height:8,borderRadius:"50%",background:o?"#94a3b8":"#50FA7B",transition:"left 0.15s, background 0.15s"}})}),o?"template":"rendered"]})]})]}),(0,Ve.jsx)("div",{className:`detail-prompt-block ${r?"detail-prompt-block--expanded":"detail-prompt-block--collapsed"}`,style:{marginTop:6},children:f})]})}var Bt=oe(ve(),1);function jh({blueprint:e,executionData:t}){let n=e.llm_prompt_spec,o=n.user_image_references&&n.user_image_references.length>0,i=n.user_document_references&&n.user_document_references.length>0,a=n.system_image_references&&n.system_image_references.length>0,l=n.system_document_references&&n.system_document_references.length>0,r=t?.resolved_model,s=t?.resolved_model_for_object,u=t?.rendered_system_prompt,c=t?.rendered_user_prompt,d=t?.structuring_path,f=t?.is_multiple_output,h=r||e.llm_choices?.for_text,v=s||e.llm_choices?.for_object;return(0,Bt.jsxs)(Bt.Fragment,{children:[(0,Bt.jsx)(te,{label:"Model",value:h}),v&&v!==h&&(0,Bt.jsx)(te,{label:"Model (object)",value:v}),(0,Bt.jsx)(te,{label:"Structuring",value:d||e.structuring_method}),(0,Bt.jsx)(te,{label:"Multiple Output",value:f}),(0,Bt.jsx)(te,{label:"Output Multiplicity",value:e.output_multiplicity}),(0,Bt.jsx)(te,{label:"Prompt Category",value:n.prompt_blueprint?.category}),o&&(0,Bt.jsx)(te,{label:"User Image Refs",value:`${n.user_image_references.length} references`}),i&&(0,Bt.jsx)(te,{label:"User Document Refs",value:`${n.user_document_references.length} references`}),a&&(0,Bt.jsx)(te,{label:"System Image Refs",value:`${n.system_image_references.length} references`}),l&&(0,Bt.jsx)(te,{label:"System Document Refs",value:`${n.system_document_references.length} references`}),(0,Bt.jsx)(lo,{label:"System Prompt",templateText:n.system_prompt_blueprint?.template,renderedText:u}),(0,Bt.jsx)(lo,{label:"Prompt",templateText:n.prompt_blueprint?.template,renderedText:c})]})}function $h(e){return null}var cn=oe(ve(),1);function Fh({blueprint:e,executionData:t}){let n=e.img_gen_prompt_blueprint,o=t?.resolved_model,i=t?.rendered_prompt,a=t?.rendered_negative_prompt;return(0,cn.jsxs)(cn.Fragment,{children:[(0,cn.jsx)(te,{label:"Model",value:o||e.img_gen_choice}),(0,cn.jsx)(lo,{label:"Prompt",templateText:n.prompt_blueprint?.template,renderedText:i}),(0,cn.jsx)(lo,{label:"Negative Prompt",templateText:n.negative_prompt_blueprint?.template,renderedText:a}),(0,cn.jsx)(te,{label:"Aspect Ratio",value:e.aspect_ratio}),(0,cn.jsx)(te,{label:"Output Format",value:e.output_format}),(0,cn.jsx)(te,{label:"Background",value:e.background}),(0,cn.jsx)(te,{label:"Is Raw",value:e.is_raw}),(0,cn.jsx)(te,{label:"Seed",value:e.seed}),(0,cn.jsx)(te,{label:"Images",value:t?.nb_images??e.output_multiplicity})]})}function Kh(e){return null}var fn=oe(ve(),1);function Qh({blueprint:e,executionData:t}){let n=t?.resolved_model;return(0,fn.jsxs)(fn.Fragment,{children:[(0,fn.jsx)(te,{label:"Model",value:n||e.extract_choice}),(0,fn.jsx)(te,{label:"Document Variable",value:e.document_stuff_name}),(0,fn.jsx)(te,{label:"Caption Images",value:e.should_caption_images}),(0,fn.jsx)(te,{label:"Max Page Images",value:e.max_page_images}),(0,fn.jsx)(te,{label:"Include Page Views",value:e.should_include_page_views}),(0,fn.jsx)(te,{label:"Page Views DPI",value:e.page_views_dpi}),(0,fn.jsx)(te,{label:"Render JS",value:e.render_js}),(0,fn.jsx)(te,{label:"Include Raw HTML",value:e.include_raw_html}),(0,fn.jsx)(te,{label:"Image Variable",value:e.image_stuff_name})]})}function Wh(e){return null}var dn=oe(ve(),1);function Jh({blueprint:e,executionData:t}){let n=t?.resolved_model,o=t?.rendered_query;return(0,dn.jsxs)(dn.Fragment,{children:[(0,dn.jsx)(te,{label:"Model",value:n||e.search_choice}),(0,dn.jsx)(lo,{label:"Search Query",templateText:e.prompt_blueprint.template,renderedText:o}),(0,dn.jsx)(te,{label:"Max Results",value:e.max_results_override}),(0,dn.jsx)(te,{label:"Include Images",value:e.include_images_override}),(0,dn.jsx)(te,{label:"Structured Output",value:e.is_structured_output}),(0,dn.jsx)(te,{label:"From Date",value:e.from_date}),(0,dn.jsx)(te,{label:"To Date",value:e.to_date}),e.include_domains&&e.include_domains.length>0&&(0,dn.jsx)(te,{label:"Include Domains",value:e.include_domains.join(", ")}),e.exclude_domains&&e.exclude_domains.length>0&&(0,dn.jsx)(te,{label:"Exclude Domains",value:e.exclude_domains.join(", ")})]})}function eg(e){return null}var ze=oe(ve(),1);function JO(e){switch(e.method){case"from_var":{let t=`\u2190 ${e.from_path??"?"}`;return e.list_to_dict_keyed_by?`${t} (keyed by ${e.list_to_dict_keyed_by})`:t}case"fixed":return`= ${JSON.stringify(e.fixed_value)}`;case"nested":return"(nested construct)";case"template":return e.template??"(empty template)"}}var e3=60;function t3(e){return e.length>e3||e.includes(`
|
|
2490
|
+
`)}function n3({label:e,value:t}){return(0,ze.jsxs)("div",{className:"detail-field-block",children:[(0,ze.jsx)("div",{className:"detail-field-block-label",children:e}),(0,ze.jsx)("div",{className:"detail-field-block-value",children:t})]})}function rT({blueprint:e,depth:t,fieldResolutions:n}){let o=[],i=[],a=[];for(let[r,s]of Object.entries(e.fields))s.method==="template"?a.push([r,s]):s.method==="nested"?i.push([r,s]):o.push([r,s]);let l=t>0?{paddingLeft:t*12}:void 0;return(0,ze.jsxs)(ze.Fragment,{children:[o.map(([r,s])=>{let u=JO(s);return t3(u)?(0,ze.jsx)("div",{style:l,children:(0,ze.jsx)(n3,{label:r,value:u})},r):(0,ze.jsx)("div",{style:l,children:(0,ze.jsx)(te,{label:r,value:u})},r)}),a.map(([r,s])=>{let u=n?.[r]?.rendered;return(0,ze.jsx)("div",{style:l,children:(0,ze.jsx)(lo,{label:`Template \u2014 ${r}`,templateText:s.template??null,renderedText:u})},r)}),i.map(([r,s])=>s.nested?(0,ze.jsxs)("div",{children:[(0,ze.jsxs)("div",{className:"detail-nested-header",style:t>0?{paddingLeft:t*12}:void 0,children:[(0,ze.jsx)("span",{className:"detail-nested-header-name",children:r}),(0,ze.jsxs)("span",{className:"detail-nested-header-meta",children:["nested \xB7 ",Object.keys(s.nested.fields).length," field",Object.keys(s.nested.fields).length===1?"":"s"]})]}),(0,ze.jsx)(rT,{blueprint:s.nested,depth:t+1,fieldResolutions:null})]},r):null)]})}function tg({blueprint:e,executionData:t}){let n=t?.rendered_text,o=t?.compose_mode,i=t?.fields??null,a=e.construct_blueprint,l=a!==null&&Object.keys(a.fields).length>0;return(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)(te,{label:"Mode",value:o||(l?"construct":"template")}),(0,ze.jsx)(te,{label:"Category",value:e.category}),(0,ze.jsx)(te,{label:"Templating Style",value:e.templating_style}),e.template&&(0,ze.jsx)(lo,{label:"Template",templateText:e.template,renderedText:n}),l&&(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)("div",{className:"detail-section-label",children:"FIELDS"}),(0,ze.jsx)(rT,{blueprint:a,depth:0,fieldResolutions:i})]})]})}function ng(e){return null}var kt=oe(ve(),1);function og({blueprint:e,executionData:t}){let n=t?.evaluated_expression,o=t?.selected_outcome;return(0,kt.jsxs)(kt.Fragment,{children:[(0,kt.jsx)(Zh,{label:"Expression",text:e.expression}),n&&(0,kt.jsx)(te,{label:"Expression Result",value:n}),(0,kt.jsxs)("div",{children:[(0,kt.jsx)("div",{className:"detail-section-label",children:"Outcomes"}),Object.entries(e.outcome_map).map(([i,a])=>(0,kt.jsxs)("div",{className:"detail-kv-row",style:o===a?{background:"rgba(80,250,123,0.08)"}:void 0,children:[(0,kt.jsx)("span",{className:"detail-kv-key",children:i}),(0,kt.jsx)("span",{className:"detail-kv-value",style:o===a?{color:"#50FA7B"}:void 0,children:a})]},i)),(0,kt.jsxs)("div",{className:"detail-kv-row",children:[(0,kt.jsx)("span",{className:"detail-kv-key",children:"default"}),(0,kt.jsx)("span",{className:"detail-kv-value",children:e.default_outcome})]})]}),(0,kt.jsx)(te,{label:"Alias Expression To",value:e.add_alias_from_expression_to})]})}function ig(e){return null}var ni=oe(ve(),1);function ag({blueprint:e}){return(0,ni.jsxs)("div",{children:[(0,ni.jsx)("div",{className:"detail-section-label",children:"Steps"}),(0,ni.jsx)("div",{className:"detail-steps-list",children:e.sequential_sub_pipes.map((t,n)=>(0,ni.jsxs)("div",{className:"detail-step-item",children:[(0,ni.jsx)("span",{className:"detail-step-index",children:n+1}),(0,ni.jsx)("span",{className:"detail-step-code",children:t.pipe_code}),t.output_name&&(0,ni.jsxs)("span",{className:"detail-io-concept",children:["-> ",t.output_name]})]},n))})]})}function lg(e){return null}var Mn=oe(ve(),1);function rg({blueprint:e}){return(0,Mn.jsxs)(Mn.Fragment,{children:[(0,Mn.jsxs)("div",{children:[(0,Mn.jsx)("div",{className:"detail-section-label",children:"Branches"}),(0,Mn.jsx)("div",{className:"detail-steps-list",children:e.parallel_sub_pipes.map((t,n)=>(0,Mn.jsxs)("div",{className:"detail-step-item",children:[(0,Mn.jsx)("span",{className:"detail-step-code",children:t.pipe_code}),t.output_name&&(0,Mn.jsxs)("span",{className:"detail-io-concept",children:["-> ",t.output_name]})]},n))})]}),(0,Mn.jsx)(te,{label:"Add Each Output",value:e.add_each_output}),(0,Mn.jsx)(te,{label:"Combined Output",value:e.combined_output})]})}function sg(e){return null}var oi=oe(ve(),1);function ug({blueprint:e,executionData:t}){let n=t?.item_count;return(0,oi.jsxs)(oi.Fragment,{children:[(0,oi.jsx)(te,{label:"Branch Pipe",value:e.branch_pipe_code}),(0,oi.jsx)(te,{label:"Input List Variable",value:e.batch_params.input_list_stuff_name}),(0,oi.jsx)(te,{label:"Input Item Variable",value:e.batch_params.input_item_stuff_name}),n!=null&&(0,oi.jsx)(te,{label:"Items Processed",value:n})]})}function cg(e){return null}var F=oe(ve(),1),o3={PipeLLM:"LLM",PipeExtract:"Extract",PipeCompose:"Compose",PipeImgGen:"ImgGen",PipeSearch:"Search",PipeFunc:"Func",PipeSignature:"Signature",PipeSequence:"Seq",PipeParallel:"Par",PipeCondition:"Cond",PipeBatch:"Batch"},i3=new Set(["PipeSequence","PipeParallel","PipeCondition","PipeBatch"]),a3={succeeded:"#50FA7B",failed:"#FF5555",running:"#8BE9FD",scheduled:"#6272a4",skipped:"#6272a4",canceled:"#6272a4"};function uT({node:e,spec:t,onConceptClick:n}){let o=e.pipe_type,i=i3.has(o),a=o3[o],l=e.status,r=a3[l]??"#6272a4",s=sT.default.useMemo(()=>{if(!e.pipe_code||!t.pipe_registry)return;let f=`${t.pipeline_ref?.domain??""}.${e.pipe_code}`,h=BE(t,f);if(h)return h;for(let[v,b]of Object.entries(t.pipe_registry))if(v.endsWith(`.${e.pipe_code}`))return b},[e.pipe_code,t]),u=e.io?.inputs??[],c=e.io?.outputs??[],d=s?.description??e.description;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)("div",{className:"detail-sticky-header",children:[(0,F.jsxs)("div",{className:"detail-header",children:[(0,F.jsx)("span",{className:`detail-badge ${i?"detail-badge--controller":"detail-badge--operator"}`,children:a}),(0,F.jsx)("span",{className:`detail-pipe-code ${i?"detail-pipe-code--controller":""}`,children:e.pipe_code})]}),(0,F.jsxs)("div",{className:"detail-status",children:[(0,F.jsx)("span",{className:"detail-status-dot",style:{background:r}}),(0,F.jsx)("span",{className:"detail-status-label",style:{color:r},children:l}),e.timing?.duration!=null&&(0,F.jsx)("span",{className:"detail-duration",children:qh(e.timing.duration)})]}),d&&(0,F.jsx)("div",{className:"detail-description",children:d}),u.length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("div",{className:"detail-section-label",children:"Inputs"}),(0,F.jsx)("div",{className:"detail-io-list",children:u.map((f,h)=>(0,F.jsxs)("div",{className:"detail-io-pill",style:{cursor:f.concept&&n?"pointer":void 0},onClick:()=>f.concept&&n?.(f.concept),children:[(0,F.jsx)("span",{className:"detail-io-name",children:f.name}),f.concept&&(0,F.jsx)("span",{className:"detail-io-concept",children:f.concept})]},h))})]}),c.length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("div",{className:"detail-section-label",children:"Output"}),(0,F.jsx)("div",{className:"detail-io-list",children:c.map((f,h)=>(0,F.jsxs)("div",{className:"detail-io-pill",style:{cursor:f.concept&&n?"pointer":void 0},onClick:()=>f.concept&&n?.(f.concept),children:[(0,F.jsx)("span",{className:"detail-io-name",children:f.name}),f.concept&&(0,F.jsx)("span",{className:"detail-io-concept",children:f.concept})]},h))})]}),(u.length>0||c.length>0)&&(0,F.jsx)("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)",margin:"4px 0"}})]}),s&&(0,F.jsx)(l3,{blueprint:s,executionData:e.execution_data}),e.execution_data&&Object.keys(e.execution_data).length>0&&(0,F.jsx)(r3,{executionData:e.execution_data,pipeType:o}),e.error&&(0,F.jsxs)("div",{className:"detail-error",children:[(0,F.jsx)("div",{className:"detail-error-type",children:e.error.error_type}),(0,F.jsx)("div",{className:"detail-error-message",children:e.error.message}),e.error.stack&&(0,F.jsx)("div",{className:"detail-error-stack",children:e.error.stack})]}),e.metrics&&Object.keys(e.metrics).length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("div",{className:"detail-section-label",children:"Metrics"}),Object.entries(e.metrics).map(([f,h])=>(0,F.jsx)(te,{label:f,value:typeof h=="number"?h.toLocaleString():String(h)},f))]}),e.tags&&Object.keys(e.tags).length>0&&(0,F.jsxs)("div",{children:[(0,F.jsx)("div",{className:"detail-section-label",children:"Tags"}),(0,F.jsx)("div",{className:"detail-tags",children:Object.entries(e.tags).map(([f,h])=>(0,F.jsxs)("span",{className:"detail-tag",children:[(0,F.jsxs)("span",{className:"detail-tag-key",children:[f,": "]}),(0,F.jsx)("span",{className:"detail-tag-value",children:h})]},f))})]}),!s&&(0,F.jsx)("div",{className:"detail-not-available",children:"Blueprint not available"})]})}function l3({blueprint:e,executionData:t}){switch(e.type){case"PipeLLM":return(0,F.jsx)(jh,{blueprint:e,executionData:t});case"PipeImgGen":return(0,F.jsx)(Fh,{blueprint:e,executionData:t});case"PipeCompose":return(0,F.jsx)(tg,{blueprint:e,executionData:t});case"PipeExtract":return(0,F.jsx)(Qh,{blueprint:e,executionData:t});case"PipeSearch":return(0,F.jsx)(Jh,{blueprint:e,executionData:t});case"PipeSequence":return(0,F.jsx)(ag,{blueprint:e,executionData:t});case"PipeParallel":return(0,F.jsx)(rg,{blueprint:e,executionData:t});case"PipeCondition":return(0,F.jsx)(og,{blueprint:e,executionData:t});case"PipeBatch":return(0,F.jsx)(ug,{blueprint:e,executionData:t});case"PipeFunc":return null;case"PipeSignature":return(0,F.jsx)("div",{className:"detail-not-available",children:"Signature stub \u2014 declared but not yet implemented."});default:return null}}function r3({executionData:e,pipeType:t}){switch(t){case"PipeLLM":return(0,F.jsx)($h,{data:e});case"PipeImgGen":return(0,F.jsx)(Kh,{data:e});case"PipeExtract":return(0,F.jsx)(Wh,{data:e});case"PipeSearch":return(0,F.jsx)(eg,{data:e});case"PipeCompose":return(0,F.jsx)(ng,{data:e});case"PipeCondition":return(0,F.jsx)(ig,{data:e});case"PipeSequence":return(0,F.jsx)(lg,{data:e});case"PipeParallel":return(0,F.jsx)(sg,{data:e});case"PipeBatch":return(0,F.jsx)(cg,{data:e});default:return(0,F.jsx)(s3,{data:e})}}function s3({data:e}){let t=Object.entries(e);return t.length===0?null:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)("div",{className:"detail-section-label",children:"Execution"}),t.map(([n,o])=>(0,F.jsx)(te,{label:n,value:String(o)},n))]})}var fg=oe(At(),1);var Ee=oe(ve(),1);function dg({concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a,instanceKey:l}){return(0,Ee.jsxs)(Ee.Fragment,{children:[(0,Ee.jsxs)("div",{className:"detail-header",children:[(0,Ee.jsx)("span",{className:"detail-concept-code",children:e.code}),(0,Ee.jsx)("span",{className:"detail-concept-domain",children:e.domain_code})]}),e.description&&(0,Ee.jsx)("div",{className:"detail-description",children:e.description}),e.refines&&(0,Ee.jsxs)("div",{className:"detail-refines",children:["refines ",(0,Ee.jsx)("span",{className:"detail-refines-code",children:e.refines})]}),(0,Ee.jsx)(u3,{concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a},l??`${e.code}:${t&&"digest"in t?t.digest:t?.name??""}`)]})}function u3({concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}){let l=!!t&&!n,[r,s]=fg.default.useState(l?"data":"structure"),u=fg.default.useId(),c=b=>`${u}-tab-${b}`,d=b=>`${u}-tabpanel-${b}`,f=e.json_schema?(0,Ee.jsxs)("div",{children:[(0,Ee.jsx)("div",{className:"detail-section-label",children:"Structure"}),(0,Ee.jsx)(c3,{schema:e.json_schema,isDryRun:n})]}):(0,Ee.jsx)("div",{className:"detail-not-available",children:"Schema not available"});if(!l)return f;let h=b=>{let S;switch(b.key){case"ArrowLeft":case"ArrowRight":S=r==="data"?"structure":"data";break;case"Home":S="data";break;case"End":S="structure";break;default:return}b.preventDefault(),s(S),document.getElementById(c(S))?.focus()},v=(b,S)=>(0,Ee.jsx)("button",{type:"button",role:"tab",id:c(b),"aria-selected":r===b,"aria-controls":d(b),tabIndex:r===b?0:-1,className:`detail-tab ${r===b?"detail-tab--active":""}`,onClick:()=>s(b),onKeyDown:h,children:S});return(0,Ee.jsxs)(Ee.Fragment,{children:[(0,Ee.jsxs)("div",{className:"detail-tabs",role:"tablist","aria-label":"Concept views",children:[v("data","Data"),v("structure","Structure")]}),(0,Ee.jsx)("div",{role:"tabpanel",id:d(r),"aria-labelledby":c(r),children:r==="data"?(0,Ee.jsx)(Uf,{stuff:d3(t),resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}):f})]})}function c3({schema:e,isDryRun:t}){let n=e.properties,o=new Set(e.required??[]);if(!n||Object.keys(n).length===0)return(0,Ee.jsx)("div",{className:"detail-not-available",children:"No fields defined"});let i=Object.entries(n),a=t?i.filter(([l])=>o.has(l)):i;return(0,Ee.jsxs)("table",{className:"detail-schema-table",children:[(0,Ee.jsx)("thead",{children:(0,Ee.jsxs)("tr",{children:[(0,Ee.jsx)("th",{children:"Field"}),(0,Ee.jsx)("th",{children:"Type"}),(0,Ee.jsx)("th",{}),(0,Ee.jsx)("th",{children:"Description"})]})}),(0,Ee.jsx)("tbody",{children:a.map(([l,r])=>(0,Ee.jsxs)("tr",{children:[(0,Ee.jsx)("td",{className:"detail-schema-field",children:l}),(0,Ee.jsx)("td",{className:"detail-schema-type",children:f3(r)}),(0,Ee.jsx)("td",{children:o.has(l)&&(0,Ee.jsx)("span",{className:"detail-schema-required",children:"req"})}),(0,Ee.jsx)("td",{children:r.description??""})]},l))})]})}function f3(e){return typeof e.type=="string"?e.type:Array.isArray(e.type)?e.type.join(" | "):e.anyOf?"union":e.allOf?"all":typeof e.$ref=="string"?e.$ref.split("/").pop()??"(unresolved type)":"(unresolved type)"}function d3(e){return p3(e)?e:{digest:e.digest??"",name:e.name,concept:e.concept,contentType:e.content_type,data:e.data,dataText:e.data_text,dataHtml:e.data_html}}function p3(e){return"contentType"in e||"dataText"in e||"dataHtml"in e}function tr(e){return e.map(t=>({id:t.id,type:t.type,data:t.data,position:t.position,style:t.style,sourcePosition:t.sourcePosition,targetPosition:t.targetPosition,parentId:t.parentId,extent:t.extent,selected:t.selected}))}function nr(e){return e.map(t=>({id:t.id,source:t.source,target:t.target,type:t.type,animated:t.animated,label:t.label,labelStyle:t.labelStyle,labelBgStyle:t.labelBgStyle,labelBgPadding:t.labelBgPadding,labelBgBorderRadius:t.labelBgBorderRadius,style:t.style,markerEnd:t.markerEnd}))}function Vf(e){return{pipeCode:e.pipe_code,pipeType:e.pipe_type,description:e.description,status:e.status,inputs:e.io.inputs.map(t=>({name:t.name,concept:t.concept??""})),outputs:e.io.outputs.map(t=>({name:t.name,concept:t.concept??""}))}}var m3=7,h3=48,g3=140;function y3(e,t,n){let o=[],i=[],a=new Set;for(let s of Object.values(t.stuffProducers))a.add(s);for(let s of Object.values(t.stuffConsumers))for(let u of s)a.add(u);for(let s of e.nodes){if(!a.has(s.id))continue;let u=Ll(s,`nodes[${s.id}]`),c=u.status==="failed",d=u.pipe_code,f=Vf(u);o.push({id:u.id,type:Ol,data:{labelDescriptor:{kind:"pipe",label:d,isFailed:c},nodeData:u,isPipe:!0,isStuff:!1,labelText:d,pipeCode:f.pipeCode,pipeType:u.pipe_type,pipeCardData:f},position:{x:0,y:0}})}for(let[s,u]of Object.entries(t.stuffRegistry)){let c=Gi(s),d=u.name,f=u.concept||"",h=Math.max(d.length,f.length)*m3+h3,v=Math.max(g3,h),b=!t.stuffProducers[s],S=!b&&!t.stuffConsumers[s]?.length,p=b?"input":S?"output":void 0,y=b?"var(--color-stuff-input-border, #50FA7B)":S?"var(--color-stuff-output-border, #a78bfa)":"var(--color-stuff-border)";o.push({id:c,type:y1,data:{labelDescriptor:{kind:"stuff",label:d,concept:f},isStuff:!0,isPipe:!1,labelText:d,stuffRole:p,stuffDigest:s},position:{x:0,y:0},style:{background:"var(--color-stuff-bg)",border:`2px solid ${y}`,borderRadius:"999px",padding:"0",width:v+"px",boxShadow:"var(--shadow-md)"}})}let l=0;for(let[s,u]of Object.entries(t.stuffProducers)){let c=Gi(s);i.push({id:"edge_"+l++,source:u,target:c,type:n,animated:!1,style:{stroke:"var(--color-edge)",strokeWidth:2},markerEnd:{type:ga,color:"var(--color-edge)"}})}for(let[s,u]of Object.entries(t.stuffConsumers)){let c=Gi(s);for(let d of u)i.push({id:"edge_"+l++,source:c,target:d,type:n,animated:!1,style:{stroke:"var(--color-edge)",strokeWidth:2},markerEnd:{type:ga,color:"var(--color-edge)"}})}for(let s of e.edges){if(s.kind!=="parallel_combine"||!s.source_stuff_digest||!s.target_stuff_digest||!t.stuffRegistry[s.source_stuff_digest]||!t.stuffRegistry[s.target_stuff_digest])continue;let u=Gi(s.source_stuff_digest),c=Gi(s.target_stuff_digest);i.push({id:s.id,source:u,target:c,type:"smoothstep",animated:!1,style:{stroke:"var(--color-parallel-combine)",strokeWidth:2,strokeDasharray:"5,5"},markerEnd:{type:ga,color:"var(--color-parallel-combine)"}})}for(let s of e.edges){if(s.kind!=="batch_item"&&s.kind!=="batch_aggregate"||!s.source_stuff_digest||!s.target_stuff_digest||!t.stuffRegistry[s.source_stuff_digest]||!t.stuffRegistry[s.target_stuff_digest])continue;let u=Gi(s.source_stuff_digest),c=Gi(s.target_stuff_digest),d=s.kind==="batch_item";i.push({id:s.id,source:u,target:c,type:n,animated:!1,_batchEdge:!0,label:s.label||"",labelStyle:{fontSize:"10px",fontFamily:"var(--font-mono)",fill:d?"var(--color-batch-item)":"var(--color-batch-aggregate)"},labelBgStyle:{fill:"var(--color-bg)",fillOpacity:.9},style:{stroke:d?"var(--color-batch-item)":"var(--color-batch-aggregate)",strokeWidth:2,strokeDasharray:"5,5"},markerEnd:{type:ga,color:d?"var(--color-batch-item)":"var(--color-batch-aggregate)"}})}let r=_o(e,t);for(let s of i){let u=r[s.source]||null,c=r[s.target]||null;u&&c&&u!==c&&(s._crossGroup=!0,s.style={...s.style,strokeWidth:1.5,opacity:.65})}for(let s of i)s._batchEdge&&(s.style={...s.style,opacity:.7});return{nodes:o,edges:i}}function cT(e,t){if(e){let n=LE(e);if(n&&(Object.keys(n.stuffProducers).length>0||Object.keys(n.stuffConsumers).length>0))return{graphData:y3(e,n,t),analysis:n}}return{graphData:{nodes:[],edges:[]},analysis:null}}function dT(e,t,n){let o=new Set([e]),a=t.nodes.find(l=>l.id===e)?.pipe_code;if(!a)return o;for(let l of t.nodes)l.pipe_code===a&&n.has(l.id)&&o.add(l.id);return o}function v3(e,t){let n=[],o=t[e],i=new Set;for(;o&&!i.has(o);)n.push(o),i.add(o),o=t[o];return n}function $s(e,t,n){let o=v3(e,t),i=null;for(let a of o)n.has(a)&&(i=a);return i}function Yf(e,t,n){return $s(e,t,n)??e}function fT(e,t){return e.nodes.find(n=>n.id===t)}function pg(e,t,n,o,i){if(o.size===0)return{nodes:e.nodes,edges:e.edges,analysis:t};let a=_o(n,t),l=new Map;for(let p of o){let m=fT(n,p)?.io?.outputs;if(m)for(let g of m){if(!g.digest)continue;let x=l.get(g.digest);x||(x=new Set,l.set(g.digest,x)),x.add(p)}}if(l.size>0)for(let p of e.nodes){if(!zl(p.id))continue;let y=l.get(ds(p.id));if(!y)continue;let m=a[p.id],g=null,x=new Set;for(;m&&!x.has(m);)x.add(m),y.has(m)&&(g=m),m=a[m];if(!g)continue;let _=a[g];_?a[p.id]=_:delete a[p.id]}let r=[];for(let p of e.nodes)$s(p.id,a,o)||r.push(p);for(let p of o){if($s(p,a,o))continue;let y=fT(n,p);if(!y)continue;let m=Vf(Ll(y,p));i&&(m.onExpand=x=>i(p,x));let g={id:p,type:Ol,data:{labelDescriptor:{kind:"pipe",label:m.pipeCode,isFailed:m.status==="failed"},nodeData:y,isPipe:!1,isStuff:!1,isController:!0,labelText:m.pipeCode,pipeCode:m.pipeCode,pipeType:y.pipe_type,pipeCardData:m},position:{x:0,y:0}};r.push(g)}let s=new Set;for(let p of t.controllerNodeIds)o.has(p)||$s(p,a,o)||s.add(p);let u={};for(let p of s){let y=t.containmentTree[p]??[],m=[];for(let g of y){let x=$s(g,a,o);x&&x!==g||m.push(g)}u[p]=m}let c=new Set;for(let p of Object.values(u))for(let y of p)c.add(y);let d={};for(let[p,y]of Object.entries(t.stuffProducers))d[p]=Yf(y,a,o);let f={};for(let[p,y]of Object.entries(t.stuffConsumers)){let m=new Set;for(let g of y)m.add(Yf(g,a,o));f[p]=[...m]}let h={stuffRegistry:t.stuffRegistry,stuffProducers:d,stuffConsumers:f,controllerNodeIds:s,childNodeIds:c,containmentTree:u},v=new Map;for(let p of e.edges){let y=Yf(p.source,a,o),m=Yf(p.target,a,o);if(y===m)continue;let g=p._batchEdge?"batch":"data",x=`${y}->${m}|${g}`;if(v.has(x))continue;let _={...p,source:y,target:m,id:p.id};p._batchEdge&&(y!==p.source||m!==p.target)&&(_.label="[N]"),delete _._crossGroup,v.set(x,_)}let b=_o({...n,edges:n.edges.filter(p=>p.kind!=="contains"?!0:s.has(p.source))},h),S=[];for(let p of v.values()){let y=b[p.source]||null,m=b[p.target]||null;if(y&&m&&y!==m)p._crossGroup=!0,p.style={...p.style,strokeWidth:1.5,opacity:.65};else if(p.style&&(p.style.opacity===.65||p.style.strokeWidth===1.5)){let{opacity:g,strokeWidth:x,..._}=p.style;p.style={..._,strokeWidth:2},p.markerEnd||(p.markerEnd={type:ga,color:"var(--color-edge)"})}S.push(p)}return{nodes:r,edges:S,analysis:h}}var b3=window.ELK,pT=b3;function S3(e){switch(e){case"LR":return"RIGHT";case"RL":return"LEFT";case"BT":return"UP";default:return"DOWN"}}var x3="_in",_3="_out";function hg(e){return e+x3}function gg(e){return e+_3}function E3(e,t,n){let o={LR:{inSide:"WEST",outSide:"EAST"},RL:{inSide:"EAST",outSide:"WEST"},TB:{inSide:"NORTH",outSide:"SOUTH"},BT:{inSide:"SOUTH",outSide:"NORTH"}},{inSide:i,outSide:a}=o[n],l=n==="LR"||n==="RL",r=l?n==="LR"?0:t.width:t.width/2,s=l?t.height/2:n==="TB"?0:t.height,u=l?n==="LR"?t.width:0:t.width/2,c=l?t.height/2:n==="TB"?t.height:0;return[{id:hg(e),x:r,y:s,width:1,height:1,layoutOptions:{"elk.port.side":i}},{id:gg(e),x:u,y:c,width:1,height:1,layoutOptions:{"elk.port.side":a}}]}var T3=320,yT=28,N3=24,mg=8,C3=22,w3=50,A3=16,M3=3,mT=38,hT=30,Xf=22,D3=140,R3=100,O3=17,z3=58,L3=5.5,B3=5,H3=4.5,P3=4;function k3(e,t,n){if(!e)return 0;if(!t)return 1;let o=n-yT,i=Math.max(1,Math.floor(o/L3)),a=Math.ceil(e.length/i);return Math.min(M3,Math.max(1,a))}function G3(e,t){let n=Math.min(D3,Math.ceil(e.length*B3)),o=Math.min(R3,Math.ceil(t.length*H3));return n+o+O3}function gT(e,t){if(e.length===0)return 0;let n=t-yT-z3,o=1,i=0;for(let a of e){let l=G3(a.name,a.concept);if(i===0){i=l;continue}i+l<=n?i+=l:(o+=1,i=l)}return o}function or(e,t){let n=e.data||{},o=n.isStuff,i=n.labelText||"",a=e.type===Ol,l=t?180:280,r=t?240:400,s=Math.max(180,Math.min(r,i.length*8+60)),u;o?u=Math.max(180,s):a&&n.pipeCardData?u=r:u=Math.max(a?l:200,s);let c;if(o)c=60;else if(a&&n.pipeCardData){let d=n.pipeCardData,f=d.inputs??[],h=d.outputs??[],v=d.description||n.nodeData?.description||"",b=N3+(t?w3:C3),S=k3(v,t,u);S>0&&(b+=mg+S*A3);let p=f.slice(0,P3);if(p.length>0)if(b+=mg,t)b+=mT+(p.length-1)*Xf;else{let y=gT(p,u);b+=hT+(y-1)*Xf}if(h.length>0)if(b+=mg,t)b+=mT+(h.length-1)*Xf;else{let y=gT(h,u);b+=hT+(y-1)*Xf}c=Math.min(T3,b)}else c=a?120:70;return{width:u,height:c}}function U3(e,t){let n={},o=new Set;function i(a){if(n[a]!==void 0)return n[a];if(o.has(a))return 0;o.add(a);let l=t[a]||[],r=-1;for(let s of l)e.has(s)&&(r=Math.max(r,i(s)));return o.delete(a),n[a]=r+1,n[a]}for(let a of e)i(a);return n}function qf(e,t,n){return{id:e,width:t.width,height:t.height,ports:E3(e,t,n),layoutOptions:{"elk.portConstraints":"FIXED_POS"}}}function vT(e,t,n,o,i,a){let l=i==="LR"||i==="RL",r=a?.nodesep??80,s=a?.ranksep??70,u=S3(i),c="30",d={"elk.algorithm":"layered","elk.direction":u,"elk.hierarchyHandling":"INCLUDE_CHILDREN","elk.spacing.nodeNode":String(r),"elk.layered.spacing.nodeNodeBetweenLayers":String(s),"elk.spacing.edgeNode":c,"elk.spacing.edgeEdge":"20","elk.layered.spacing.edgeNodeBetweenLayers":c,"elk.layered.spacing.edgeEdgeBetweenLayers":"15","elk.layered.nodePlacement.favorStraightEdges":"true"};if(!n||!o||o.controllerNodeIds.size===0){let x={},_=e.map(w=>{let C=or(w,l);return x[w.id]=C,qf(w.id,C,i)}),E=t.map(w=>({id:w.id,sources:[gg(w.source)],targets:[hg(w.target)]}));return{elkGraph:{id:"root",layoutOptions:d,children:_,edges:E},dimensionMap:x}}let f=_o(n,o),h=U3(o.controllerNodeIds,o.containmentTree),v={},b=new Map;for(let x of e)b.set(x.id,x);let S={},p=Array.from(o.controllerNodeIds);p.sort((x,_)=>(h[x]??0)-(h[_]??0));for(let x of p){let E=1+(h[x]??0)*.15,w=Math.round(zc*E),C=Math.round(Lc*E),H=Math.round(Bc*E),D={"elk.padding":`[top=${C},left=${w},bottom=${H},right=${w}]`,"elk.spacing.nodeNode":String(r),"elk.layered.spacing.nodeNodeBetweenLayers":String(s),"elk.spacing.edgeNode":c,"elk.layered.spacing.edgeNodeBetweenLayers":c},z=[],I=o.containmentTree[x]||[];for(let T of I)if(o.controllerNodeIds.has(T)){let A=S[T];A&&z.push(A)}else{let A=b.get(T);if(A){let M=or(A,l);v[T]=M,z.push(qf(T,M,i))}}for(let T of e)if(T.data.isStuff&&f[T.id]===x&&!z.some(A=>A.id===T.id)){let A=or(T,l);v[T.id]=A,z.push(qf(T.id,A,i))}S[x]={id:x,layoutOptions:D,children:z}}let y=[];for(let x of p)if(!f[x]){let _=S[x];_&&y.push(_)}for(let x of e)if(!f[x.id]&&!o.controllerNodeIds.has(x.id)){let _=or(x,l);v[x.id]=_,y.push(qf(x.id,_,i))}let m=new Set(e.map(x=>x.id)),g=t.filter(x=>m.has(x.source)&&m.has(x.target)).map(x=>({id:x.id,sources:[gg(x.source)],targets:[hg(x.target)]}));return{elkGraph:{id:"root",layoutOptions:d,children:y,edges:g},dimensionMap:v}}function bT(e){let t={};function n(o,i,a){let l=i+(o.x??0),r=a+(o.y??0);o.id!=="root"&&(t[o.id]={x:l,y:r,width:o.width??0,height:o.height??0});for(let s of o.children??[])n(s,l,r)}return n(e,0,0),t}var yg=null;function I3(){return yg||(yg=new pT),yg}async function Zf(e,t,n,o,i,a){if(e.length===0)return{nodes:[],edges:t,controllerPositions:{}};let l=n==="LR"||n==="RL",{elkGraph:r,dimensionMap:s}=vT(e,t,i??null,a??null,n,o),u=await I3().layout(r),c=bT(u),d={};if(a)for(let h of a.controllerNodeIds)c[h]&&(d[h]=c[h]);return{nodes:e.map(h=>{let v=c[h.id],b=s[h.id]??or(h,l),S=b.width,p=b.height,y=h.data.pipeCardData,g=y?{...y,direction:l?"LR":"TB"}:void 0;return{...h,data:{...h.data,_estimatedWidth:S,_estimatedHeight:p,pipeCardData:g},style:{...h.style,width:S+"px",height:p+"px"},position:{x:v?v.x:0,y:v?v.y:0},sourcePosition:l?n==="LR"?"right":"left":n==="TB"?"bottom":"top",targetPosition:l?n==="LR"?"left":"right":n==="TB"?"top":"bottom"}}),edges:t,controllerPositions:d}}var Fs=5;function V3(e,t,n){let o=new Set,i=[e];for(;i.length>0;){let a=i.pop();for(let l of t[a]||[])o.add(l),n.has(l)&&i.push(l)}return o}function Y3(e,t,n,o){let i={};for(let v of n)i[v.id]=v;let a={};for(let v of e.nodes)t.controllerNodeIds.has(v.id)&&(a[v.id]=Ll(v,`nodes[${v.id}]`));let l={},r=new Set;function s(v){if(l[v]!==void 0)return l[v];if(r.has(v))throw new Error(`Cycle detected in containment tree: controller "${v}" is part of a containment cycle`);r.add(v);let b=t.containmentTree[v]||[],S=-1;for(let p of b)t.controllerNodeIds.has(p)&&(S=Math.max(S,s(p)));return r.delete(v),l[v]=S+1,l[v]}let u=_o(e,t),c={};for(let[v,b]of Object.entries(u))zl(v)&&i[v]&&(c[b]||(c[b]=[]),c[b].push(v));let d=Array.from(t.controllerNodeIds);for(let v of d)s(v);d.sort((v,b)=>l[v]-l[b]);let f=[],h={};for(let v of d){let S=(t.containmentTree[v]||[]).filter(D=>i[D]),p=c[v]||[],y=[...S,...p];if(y.length===0)continue;let m,g,x,_,E=o?.[v];if(E)m=E.x,g=E.y,x=E.width,_=E.height;else{let D=1/0,z=1/0,I=-1/0,T=-1/0;for(let V of y){let k=i[V],G=k.position,q=x1(k),Z=_1(k);D=Math.min(D,G.x),z=Math.min(z,G.y),I=Math.max(I,G.x+q),T=Math.max(T,G.y+Z)}let M=1+(l[v]??0)*.15,O=Math.round(zc*M),R=Math.round(Lc*M),L=Math.round(Bc*M);m=D-O,g=z-R,x=I-D+2*O,_=T-z+R+L}let w=a[v];if(!w)throw new ps(`nodes[${v}]`,`controller "${v}" is referenced by a "contains" edge but has no corresponding node in graphspec.nodes`);let C=w.pipe_code,H={id:v,type:v1,data:{label:C,pipeType:w.pipe_type,isController:!0,isPipe:!1,isStuff:!1,pipeCode:C,labelText:C},position:{x:m,y:g},style:{width:x+"px",height:_+"px",padding:"0"}};f.push(H),i[v]=H;for(let D of y)h[D]=v}for(let[v,b]of Object.entries(h)){let S=i[v],p=i[b];!S||!p||(S.position={x:S.position.x-p.position.x,y:S.position.y-p.position.y},S.parentId=b,S.extent="parent")}return f}function ir(e,t,n,o,i,a,l,r,s){if(!i||!o||!n)return{nodes:e,edges:t};let u={},c=new Set,d={};for(let g of n.nodes)o.controllerNodeIds.has(g.id)&&(d[g.id]=g.pipe_type);for(let g of o.controllerNodeIds){let x=o.containmentTree[g]||[];u[g]=x.length;let _=d[g];(_==="PipeParallel"||_==="PipeBatch")&&x.length>Fs&&!a?.has(g)&&c.add(g)}let f=e,h=t;if(c.size>0){let g=new Set;for(let _ of c){let w=(o.containmentTree[_]||[]).slice(Fs);for(let C of w)if(g.add(C),o.controllerNodeIds.has(C))for(let H of V3(C,o.containmentTree,o.controllerNodeIds))g.add(H)}let x=_o(n,o);for(let _ of e){if(!zl(_.id)||g.has(_.id))continue;let E=x[_.id];if(!E||!c.has(E)&&!g.has(E))continue;let w=t.filter(C=>{if(C.source!==_.id&&C.target!==_.id)return!1;let H=C.source===_.id?C.target:C.source;return!zl(H)});(w.length===0||w.every(C=>{let H=C.source===_.id?C.target:C.source;return g.has(H)}))&&g.add(_.id)}f=e.filter(_=>!g.has(_.id)),h=t.filter(_=>!g.has(_.source)&&!g.has(_.target))}let v=Y3(n,o,f,r);if(v.length===0)return{nodes:f,edges:h};for(let g of v){let x=u[g.id]??0,_=c.has(g.id);if(g.data.childCount=x,g.data.isCollapsed=_,l){let E=g.id;g.data.onToggleCollapse=()=>l(E)}if(s){let E=g.id;g.data.onToggleFold=w=>s(E,w)}}let b=[...v,...f],S={};for(let g of b)S[g.id]=g;let p={},y=new Set;function m(g){if(p[g]!==void 0)return p[g];if(y.has(g))throw new Error(`Cycle detected in node parent chain: node "${g}" references itself as an ancestor`);y.add(g);let x=S[g];return p[g]=x&&x.parentId?1+m(x.parentId):0,y.delete(g),p[g]}for(let g of b)m(g.id);return b.sort((g,x)=>p[g.id]-p[x.id]),{nodes:b,edges:h}}var ST={"--font-sans":'"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',"--font-mono":'"JetBrains Mono", "Monaco", "Menlo", monospace'},X3={...ST,"--surface-page":"#0a0a0a","--surface-panel":"#111118","--surface-overlay":"rgba(17, 17, 24, 0.8)","--surface-overlay-hover":"rgba(30, 30, 40, 0.9)","--surface-overlay-disabled":"rgba(17, 17, 24, 0.6)","--surface-elevated":"rgba(255, 255, 255, 0.06)","--surface-elevated-hover":"rgba(255, 255, 255, 0.1)","--surface-sunken":"rgba(255, 255, 255, 0.03)","--surface-pill":"rgba(255, 255, 255, 0.06)","--surface-pill-border":"rgba(255, 255, 255, 0.08)","--border-subtle":"rgba(255, 255, 255, 0.06)","--border-default":"rgba(255, 255, 255, 0.1)","--border-strong":"rgba(255, 255, 255, 0.18)","--border-dashed":"rgba(255, 255, 255, 0.15)","--text-primary":"#f8fafc","--text-default":"#e2e8f0","--text-secondary":"#cbd5e1","--text-muted":"#94a3b8","--text-dim":"#64748b","--text-on-accent":"#0e0e0e","--shadow-sm":"0 2px 8px rgba(0, 0, 0, 0.4)","--shadow-md":"0 4px 16px rgba(0, 0, 0, 0.6)","--shadow-lg":"0 8px 24px rgba(0, 0, 0, 0.5)","--focus-ring":"rgba(59, 130, 246, 0.6)","--color-pipe":"#ff6b6b","--color-pipe-bg":"rgba(224,108,117,0.18)","--color-pipe-text":"#ffffff","--color-stuff":"#4ECDC4","--color-stuff-bg":"rgba(78,205,196,0.12)","--color-stuff-border":"#9ddcfd","--color-stuff-text":"#98FB98","--color-stuff-text-dim":"#9ddcfd","--color-edge":"#FFFACD","--color-batch-item":"#bd93f9","--color-batch-aggregate":"#50fa7b","--color-parallel-combine":"#d6a4ff","--color-success":"#50FA7B","--color-success-bg":"rgba(80,250,123,0.15)","--color-error":"#FF5555","--color-error-bg":"rgba(255,85,85,0.15)","--color-error-border":"rgba(255,85,85,0.2)","--color-accent":"#8BE9FD","--color-accent-strong":"#3b82f6","--color-warning":"#FFB86C","--ctrl-sequence-border":"rgba(148, 163, 184, 0.25)","--ctrl-sequence-bg":"rgba(148, 163, 184, 0.03)","--ctrl-sequence-text":"#94a3b8","--ctrl-parallel-border":"rgba(139, 233, 253, 0.35)","--ctrl-parallel-bg":"rgba(139, 233, 253, 0.03)","--ctrl-parallel-text":"#8be9fd","--ctrl-condition-border":"rgba(251, 191, 36, 0.35)","--ctrl-condition-bg":"rgba(251, 191, 36, 0.03)","--ctrl-condition-text":"#fbbf24","--ctrl-batch-border":"rgba(167, 139, 250, 0.35)","--ctrl-batch-bg":"rgba(167, 139, 250, 0.03)","--ctrl-batch-text":"#a78bfa","--ctrl-folded-bg":"rgba(148, 163, 184, 0.25)","--ctrl-folded-border":"rgba(148, 163, 184, 0.4)","--color-bg":"#0a0a0a","--color-bg-dots":"rgba(255, 255, 255, 0.35)","--color-text-muted":"#94a3b8","--color-controller-text":"#94a3b8"},q3={...ST,"--surface-page":"#f8fafc","--surface-panel":"#ffffff","--surface-overlay":"rgba(255, 255, 255, 0.92)","--surface-overlay-hover":"rgba(241, 245, 249, 0.96)","--surface-overlay-disabled":"rgba(255, 255, 255, 0.7)","--surface-elevated":"rgba(15, 23, 42, 0.05)","--surface-elevated-hover":"rgba(15, 23, 42, 0.09)","--surface-sunken":"rgba(15, 23, 42, 0.03)","--surface-pill":"rgba(15, 23, 42, 0.05)","--surface-pill-border":"rgba(15, 23, 42, 0.1)","--border-subtle":"rgba(15, 23, 42, 0.08)","--border-default":"rgba(15, 23, 42, 0.12)","--border-strong":"rgba(15, 23, 42, 0.22)","--border-dashed":"rgba(15, 23, 42, 0.18)","--text-primary":"#020617","--text-default":"#0f172a","--text-secondary":"#1e293b","--text-muted":"#475569","--text-dim":"#64748b","--text-on-accent":"#ffffff","--shadow-sm":"0 2px 8px rgba(15, 23, 42, 0.08)","--shadow-md":"0 4px 16px rgba(15, 23, 42, 0.14)","--shadow-lg":"0 8px 24px rgba(15, 23, 42, 0.15)","--focus-ring":"rgba(2, 132, 199, 0.5)","--color-pipe":"#dc2626","--color-pipe-bg":"rgba(220, 38, 38, 0.1)","--color-pipe-text":"#ffffff","--color-stuff":"#0891b2","--color-stuff-bg":"rgba(8, 145, 178, 0.08)","--color-stuff-border":"#0e7490","--color-stuff-text":"#0f172a","--color-stuff-text-dim":"#475569","--color-edge":"#64748b","--color-batch-item":"#7c3aed","--color-batch-aggregate":"#15803d","--color-parallel-combine":"#6d28d9","--color-success":"#15803d","--color-success-bg":"rgba(21, 128, 61, 0.12)","--color-error":"#dc2626","--color-error-bg":"rgba(220, 38, 38, 0.1)","--color-error-border":"rgba(220, 38, 38, 0.25)","--color-accent":"#0284c7","--color-accent-strong":"#0284c7","--color-warning":"#d97706","--ctrl-sequence-border":"rgba(71, 85, 105, 0.3)","--ctrl-sequence-bg":"rgba(71, 85, 105, 0.04)","--ctrl-sequence-text":"#475569","--ctrl-parallel-border":"rgba(8, 145, 178, 0.4)","--ctrl-parallel-bg":"rgba(8, 145, 178, 0.05)","--ctrl-parallel-text":"#0e7490","--ctrl-condition-border":"rgba(217, 119, 6, 0.4)","--ctrl-condition-bg":"rgba(217, 119, 6, 0.05)","--ctrl-condition-text":"#b45309","--ctrl-batch-border":"rgba(124, 58, 237, 0.4)","--ctrl-batch-bg":"rgba(124, 58, 237, 0.05)","--ctrl-batch-text":"#6d28d9","--ctrl-folded-bg":"rgba(71, 85, 105, 0.18)","--ctrl-folded-border":"rgba(71, 85, 105, 0.35)","--color-bg":"#f8fafc","--color-bg-dots":"rgba(15, 23, 42, 0.18)","--color-text-muted":"#475569","--color-controller-text":"#475569"};function jf(e){return e===ha.LIGHT?q3:X3}var La={direction:"LR",showControllers:!1,foldMode:to.EXPANDED,theme:yt.SYSTEM,toolbarPosition:sn.TOP_RIGHT,nodesep:50,ranksep:100,edgeType:Oc.DEFAULT,initialZoom:null,panToTop:!0};var Ba=oe(ve(),1);function Z3(e){return e.kind==="pipe"?(0,Ba.jsx)("div",{style:{padding:"10px 14px",display:"flex",flexDirection:"column",gap:"2px",textAlign:"center",width:"100%",boxSizing:"border-box",minWidth:0},title:e.label,children:(0,Ba.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:"13px",fontWeight:600,color:"var(--color-pipe-text)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label})}):(0,Ba.jsxs)("div",{style:{padding:"8px 24px",display:"flex",flexDirection:"column",alignItems:"center",gap:"2px",textAlign:"center",width:"100%",boxSizing:"border-box",minWidth:0},title:e.concept?`${e.label}: ${e.concept}`:e.label,children:[(0,Ba.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:"12px",fontWeight:600,color:"var(--color-stuff-text)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),e.concept&&(0,Ba.jsx)("span",{style:{fontSize:"14px",color:"var(--color-stuff-text-dim)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.concept})]})}function ar(e){return e.map(t=>t.data.labelDescriptor?{...t,data:{...t.data,label:Z3(t.data.labelDescriptor)}}:t)}var $=oe(ve(),1),j3=15;var $3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,$.jsx)("polyline",{points:"12 5 19 12 12 19"})]}),F3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,$.jsx)("polyline",{points:"19 12 12 19 5 12"})]}),K3=(0,$.jsx)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})}),Q3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,$.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),W3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,$.jsx)("polyline",{points:"9 21 3 21 3 15"}),(0,$.jsx)("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),(0,$.jsx)("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),J3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z"}),(0,$.jsx)("path",{d:"m7 16.5-4.74-2.85"}),(0,$.jsx)("path",{d:"m7 16.5 5-3"}),(0,$.jsx)("path",{d:"M7 16.5v5.17"}),(0,$.jsx)("path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z"}),(0,$.jsx)("path",{d:"m17 16.5-5-3"}),(0,$.jsx)("path",{d:"m17 16.5 4.74-2.85"}),(0,$.jsx)("path",{d:"M17 16.5v5.17"}),(0,$.jsx)("path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z"}),(0,$.jsx)("path",{d:"M12 8 7.26 5.15"}),(0,$.jsx)("path",{d:"m12 8 4.74-2.85"}),(0,$.jsx)("path",{d:"M12 13.5V8"})]}),ez=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"}),(0,$.jsx)("polyline",{points:"2 2 6 6 2 6"}),(0,$.jsx)("polyline",{points:"22 2 18 6 22 6"}),(0,$.jsx)("polyline",{points:"2 22 6 18 2 18"}),(0,$.jsx)("polyline",{points:"22 22 18 18 22 18"})]}),tz=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("rect",{x:"9",y:"9",width:"6",height:"6",rx:"1"}),(0,$.jsx)("polyline",{points:"3 3 7 7 3 7"}),(0,$.jsx)("polyline",{points:"21 3 17 7 21 7"}),(0,$.jsx)("polyline",{points:"3 21 7 17 3 17"}),(0,$.jsx)("polyline",{points:"21 21 17 17 21 17"})]}),nz=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,$.jsx)("line",{x1:"12",y1:"2",x2:"12",y2:"4"}),(0,$.jsx)("line",{x1:"12",y1:"20",x2:"12",y2:"22"}),(0,$.jsx)("line",{x1:"4.93",y1:"4.93",x2:"6.34",y2:"6.34"}),(0,$.jsx)("line",{x1:"17.66",y1:"17.66",x2:"19.07",y2:"19.07"}),(0,$.jsx)("line",{x1:"2",y1:"12",x2:"4",y2:"12"}),(0,$.jsx)("line",{x1:"20",y1:"12",x2:"22",y2:"12"}),(0,$.jsx)("line",{x1:"4.93",y1:"19.07",x2:"6.34",y2:"17.66"}),(0,$.jsx)("line",{x1:"17.66",y1:"6.34",x2:"19.07",y2:"4.93"})]}),oz=(0,$.jsx)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),iz=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"}),(0,$.jsx)("line",{x1:"8",y1:"21",x2:"16",y2:"21"}),(0,$.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"21"})]}),vg=[yt.SYSTEM,yt.LIGHT,yt.DARK];function _T(e){let t=vg.indexOf(e);return vg[(t+1)%vg.length]}function az(e){return e===yt.LIGHT?nz:e===yt.DARK?oz:iz}function xT(e){let t={[yt.SYSTEM]:"system",[yt.LIGHT]:"light",[yt.DARK]:"dark"},n=_T(e);return`Theme: ${t[e]} \u2014 switch to ${t[n]}`}function ET({direction:e,onDirectionChange:t,showControllers:n,onShowControllersChange:o,onZoomIn:i,onZoomOut:a,onFitView:l,onFoldAll:r,onExpandAll:s,foldAllDisabled:u=!1,expandAllDisabled:c=!1,themeMode:d,onThemeModeChange:f,rightOffset:h=0,position:v}){let b=d!==void 0&&f!==void 0,S=b1(v),y=S1(v)==="right"&&h>0?{marginRight:j3+h}:void 0,m=e===Nn.TB||e===Nn.BT,g=m?"Switch to horizontal layout":"Switch to vertical layout",x=n?"Hide pipe controllers":"Show pipe controllers \u2014 groups pipes by their controlling pipe",_=r||s,E=u?"Fold all controllers (nothing to fold)":"Fold all controllers",w=c?"Expand all controllers (nothing to expand)":"Expand all controllers";return(0,$.jsx)(Jl,{position:v,className:"graph-toolbar-panel",style:y,children:(0,$.jsxs)("div",{className:`graph-toolbar graph-toolbar--${S}`,children:[r&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:r,disabled:u,title:E,"aria-label":E,children:ez}),s&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:s,disabled:c,title:w,"aria-label":w,children:tz}),_&&(0,$.jsx)("div",{className:"graph-toolbar-separator"}),(0,$.jsx)("button",{type:"button",className:`graph-toolbar-btn${n?" graph-toolbar-btn--active":""}`,onClick:()=>o(!n),title:x,"aria-label":x,children:J3}),(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:()=>t(m?Nn.LR:Nn.TB),title:g,"aria-label":g,children:m?$3:F3}),(a||i||l)&&(0,$.jsx)("div",{className:"graph-toolbar-separator"}),a&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:a,title:"Zoom out","aria-label":"Zoom out",children:K3}),i&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:i,title:"Zoom in","aria-label":"Zoom in",children:Q3}),l&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:l,title:"Fit view","aria-label":"Fit view",children:W3}),b&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("div",{className:"graph-toolbar-separator"}),(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:()=>f(_T(d)),title:xT(d),"aria-label":xT(d),children:az(d)})]})]})})}var ii=oe(ve(),1),lz={PipeSequence:{badge:"Sequence",icon:"\u2192"},PipeParallel:{badge:"Parallel",icon:"//"},PipeCondition:{badge:"Condition",icon:"\u25C7"},PipeBatch:{badge:"Batch",icon:"\u2261"}};function rz(e){return e?lz[e]:{badge:"",icon:""}}function sz(e){return e?`controller-group--${e.replace("Pipe","").toLowerCase()}`:""}function uz({data:e}){let t=rz(e.pipeType),n=sz(e.pipeType),o=(e.pipeType==="PipeParallel"||e.pipeType==="PipeBatch")&&(e.childCount??0)>Fs,i=o?(e.childCount??0)-Fs:0;return(0,ii.jsxs)("div",{className:`controller-group-node ${n}`,children:[(0,ii.jsxs)("div",{className:"controller-group-header",children:[(0,ii.jsx)("span",{className:"controller-group-icon",children:t.icon}),(0,ii.jsx)("span",{className:"controller-group-badge",children:t.badge}),e.label&&(0,ii.jsx)("span",{className:"controller-group-label",children:e.label}),e.onToggleFold&&(0,ii.jsx)("button",{type:"button",className:"controller-group-fold",title:"Fold controller (alt/option: only this one)","aria-label":"Fold controller",onClick:a=>{a.stopPropagation(),e.onToggleFold?.({soloMode:a.altKey})},children:"\u2921"})]}),o&&(0,ii.jsx)("button",{className:"controller-group-collapse",onClick:a=>{a.stopPropagation(),e.onToggleCollapse?.()},children:e.isCollapsed?`+${i} hidden`:"collapse"})]})}var TT={controllerGroup:uz};var NT=oe(At(),1),Je=oe(ve(),1),cz={PipeLLM:"LLM",PipeExtract:"Extract",PipeCompose:"Compose",PipeImgGen:"ImgGen",PipeSearch:"Search",PipeFunc:"Func",PipeSignature:"Signature",PipeSequence:"Sequence",PipeParallel:"Parallel",PipeCondition:"Condition",PipeBatch:"Batch"},fz={PipeSequence:!0,PipeParallel:!0,PipeCondition:!0,PipeBatch:!0};function dz(e){return e in fz}var pz={succeeded:{color:"#50FA7B",label:"Succeeded"},failed:{color:"#FF5555",label:"Failed"},running:{color:"#8BE9FD",label:"Running"},scheduled:{color:"#6272a4",label:"Scheduled"},skipped:{color:"#6272a4",label:"Skipped"},canceled:{color:"#6272a4",label:"Canceled"}},bg=4;function mz(e){return cz[e]}function pn({data:e,children:t}){let n=mz(e.pipeType),o=pz[e.status],i=e.status==="running",a=dz(e.pipeType),l=e.pipeType==="PipeSignature",[r,s]=(0,NT.useState)(!1),u=e.inputs.length>bg,c=u&&!r?e.inputs.slice(0,bg):e.inputs,d=e.inputs.length-bg,f=e.direction==="TB"?"pipe-card--tb":"pipe-card--lr",h=a?" pipe-card--controller":"",v=l?" pipe-card--signature":"",b=a?"pipe-card-badge pipe-card-badge--controller":l?"pipe-card-badge pipe-card-badge--signature":"pipe-card-badge";return(0,Je.jsxs)("div",{className:`pipe-card ${f}${h}${v}`,children:[(0,Je.jsxs)("div",{className:"pipe-card-header",children:[(0,Je.jsx)("span",{className:b,children:n}),(0,Je.jsx)("span",{className:"pipe-card-code",title:e.pipeCode,children:e.pipeCode}),(0,Je.jsx)("span",{className:"pipe-card-status",style:{color:o.color},title:o.label,children:(0,Je.jsx)("span",{className:`pipe-card-status-dot ${i?"pipe-card-status-dot--pulse":""}`,style:{background:o.color}})}),e.onExpand&&(0,Je.jsx)("button",{type:"button",className:"pipe-card-expand",title:"Expand controller (alt/option: only this one)","aria-label":"Expand controller",onClick:S=>{S.stopPropagation(),e.onExpand?.({soloMode:S.altKey})},children:"\u2922"})]}),e.description&&(0,Je.jsx)("span",{className:"pipe-card-description",title:e.description,children:e.description}),e.inputs.length>0&&(0,Je.jsxs)("div",{className:"pipe-card-io",children:[(0,Je.jsx)("span",{className:"pipe-card-io-label",children:"INPUTS"}),(0,Je.jsxs)("div",{className:"pipe-card-io-pills",children:[c.map(S=>(0,Je.jsxs)("span",{className:"pipe-card-io-pill",title:`${S.name}: ${S.concept}`,children:[(0,Je.jsx)("span",{className:"pipe-card-io-pill-name",children:S.name}),(0,Je.jsx)("span",{className:"pipe-card-io-pill-concept",children:S.concept})]},S.name)),u&&(0,Je.jsx)("button",{className:"pipe-card-io-more",onClick:S=>{S.stopPropagation(),s(p=>!p)},children:r?"show less":`+${d} more`})]})]}),e.outputs.length>0&&(0,Je.jsxs)("div",{className:"pipe-card-io",children:[(0,Je.jsx)("span",{className:"pipe-card-io-label",children:"OUTPUT"}),(0,Je.jsx)("div",{className:"pipe-card-io-pills",children:e.outputs.map(S=>(0,Je.jsxs)("span",{className:"pipe-card-io-pill",title:`${S.name}: ${S.concept}`,children:[(0,Je.jsx)("span",{className:"pipe-card-io-pill-name",children:S.name}),(0,Je.jsx)("span",{className:"pipe-card-io-pill-concept",children:S.concept})]},S.name))})]}),t]})}var hz={PipeLLM:pn,PipeExtract:pn,PipeCompose:pn,PipeImgGen:pn,PipeSearch:pn,PipeFunc:pn,PipeSignature:pn,PipeSequence:pn,PipeParallel:pn,PipeCondition:pn,PipeBatch:pn};function CT(e){return hz[e]}var ai=oe(ve(),1);function gz({data:e}){let t=CT(e.pipeType)??pn;return(0,ai.jsx)(t,{data:e})}function wT({data:e,sourcePosition:t=W.Bottom,targetPosition:n=W.Top}){let o=e.pipeCardData;return o?(0,ai.jsxs)(ai.Fragment,{children:[(0,ai.jsx)(Ra,{type:"target",position:n}),(0,ai.jsx)(gz,{data:o}),(0,ai.jsx)(Ra,{type:"source",position:t})]}):null}var Kt=oe(ve(),1),yz={...TT,pipeCard:wT};function vz({nodeId:e,stuffData:t,graphspec:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}){let l=t.concept&&n?zh(n,t.concept):void 0;return(0,Kt.jsx)(Kt.Fragment,{children:l?(0,Kt.jsx)(dg,{concept:l,ioData:t,instanceKey:e,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}):(0,Kt.jsx)(Uf,{stuff:t,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a})})}function bz(e,t){return e===to.FOLDED?new Set(t):new Set}function Sz(e,t){return e??t??La.theme??yt.SYSTEM}function Sg(e,t){return e===yt.SYSTEM?t:e}function xz(e,t){return e??t??La.toolbarPosition}function Ks(e){return e.map(t=>({...t,position:{...t.position},data:{...t.data},style:t.style?{...t.style}:void 0}))}function Qs(e,t){return!t||Object.keys(t).length===0?e:e.map(n=>{let o=n.data.pipeCode;if(!o||!Object.hasOwn(t,o))return n;let i=t[o];return n.data.pipeCardData?.status===i?n:{...n,data:{...n.data,nodeData:n.data.nodeData?{...n.data.nodeData,status:i}:n.data.nodeData,pipeCardData:n.data.pipeCardData?{...n.data.pipeCardData,status:i}:n.data.pipeCardData}}})}function AT(e){let{graphspec:t,config:n=La,initialDirection:o,initialShowControllers:i,initialFoldMode:a,hideToolbar:l=!1,theme:r,toolbarPosition:s,systemTheme:u,showThemeToggle:c=!0,onThemeChange:d,onNavigateToPipe:f,onStuffNodeClick:h,onReactFlowInit:v,statusMap:b,onNodeSelect:S,onPaneClick:p,renderDetailExtra:y,resolveStorageUrl:m,canEmbedPdf:g,onOpenExternally:x}=e,_=fe.default.useMemo(()=>t===null?null:Hc(t),[t]),[E,w]=fe.default.useState(()=>o??n.direction??La.direction??Nn.TB),C=Sz(r,n.theme),[H,D]=fe.default.useState(C),z=fe.default.useRef(C);fe.default.useEffect(()=>{C!==z.current&&(z.current=C,D(C))},[C]);let I=zE(u),T=Sg(H,I),A=fe.default.useRef(d);A.current=d;let M=fe.default.useRef({mode:H,resolvedTheme:T});fe.default.useEffect(()=>{let pe=M.current;(pe.mode!==H||pe.resolvedTheme!==T)&&(M.current={mode:H,resolvedTheme:T},A.current?.(H,T))},[H,T]);let O=a??n.foldMode??La.foldMode??to.EXPANDED,[R,L]=fe.default.useState(()=>O===to.FOLDED?!0:i??n.showControllers??La.showControllers??!1),V=fe.default.useRef(O);V.current=O;let k=fe.default.useRef(null),[G,q]=fe.default.useState(null),[Z,j]=fe.default.useState(null),{width:se,isDragging:J,handleMouseDown:X}=aT({defaultWidth:380,minWidth:280,maxWidth:800,containerRef:k});fe.default.useEffect(()=>{q(null),j(null)},[_]),fe.default.useEffect(()=>{let pe=k.current;if(!pe)return;let le=jf(T),ae=n.paletteColors,we=ae?{...le,...ae}:le;for(let[ge,He]of Object.entries(we))pe.style.setProperty(ge,He);return()=>{for(let ge of Object.keys(we))pe.style.removeProperty(ge)}},[n.paletteColors,T]);let[Q,ue,he]=CE([]),[ie,ee,Te]=wE([]),de=fe.default.useRef(null),be=fe.default.useRef(null),Le=fe.default.useRef(null),Be=fe.default.useRef(null),[dt,Gt]=fe.default.useState(new Set),mn=fe.default.useCallback(pe=>{Gt(le=>{let ae=new Set(le);return ae.has(pe)?ae.delete(pe):ae.add(pe),ae})},[]),[rt,Dn]=fe.default.useState(new Set),Qt=fe.default.useCallback((pe,le)=>{Dn(ae=>{let we=new Set(ae),ge=!we.has(pe),He=Le.current,wt=!le?.soloMode&&He?.graphspec&&He.analysis?dT(pe,He.graphspec,He.analysis.controllerNodeIds):new Set([pe]);for(let Qn of wt)ge?we.add(Qn):we.delete(Qn);return we})},[]),Wt=n.edgeType||Oc.DEFAULT,St=fe.default.useMemo(()=>({nodesep:n.nodesep,ranksep:n.ranksep}),[n.nodesep,n.ranksep]),$e=fe.default.useRef(R);$e.current=R;let ro=fe.default.useRef(E);ro.current=E;let li=fe.default.useRef(St);li.current=St;let jn=fe.default.useRef(n.initialZoom);jn.current=n.initialZoom;let ri=fe.default.useRef(n.panToTop);ri.current=n.panToTop;let $n=fe.default.useRef(dt);$n.current=dt;let Rn=fe.default.useRef(mn);Rn.current=mn;let To=fe.default.useRef(rt);To.current=rt;let pt=fe.default.useRef(Qt);pt.current=Qt;let Fn=fe.default.useRef(!0),Kn=fe.default.useRef(0),No=fe.default.useRef(!1),Co=fe.default.useRef(b);Co.current=b,fe.default.useEffect(()=>{if(!be.current)return;let pe=!1;return(async()=>{try{let le=be.current;if(!le)return;let ae=await Zf(le.nodes,le.edges,E,St,le._graphspec,le._analysis);if(pe)return;Be.current={nodes:ae.nodes,edges:ae.edges,controllerPositions:ae.controllerPositions};let we=ir(Ks(ae.nodes),ae.edges,le._graphspec,le._analysis,$e.current,$n.current,Rn.current,ae.controllerPositions,pt.current);ue(Qs(tr(ar(we.nodes)),Co.current)),ee(nr(we.edges)),setTimeout(()=>{!pe&&de.current&&de.current.fitView({padding:.1})},50)}catch(le){console.error("[GraphViewer] ELK layout failed:",le)}})(),()=>{pe=!0}},[E,St]),fe.default.useEffect(()=>{if(!Be.current||!be.current)return;let pe=Ks(Be.current.nodes),le=Be.current.edges,ae=ir(pe,le,be.current._graphspec,be.current._analysis,R,dt,mn,Be.current.controllerPositions,Qt);ue(Qs(tr(ar(ae.nodes)),Co.current)),ee(nr(ae.edges))},[R,dt,mn,Qt]),fe.default.useEffect(()=>{if(!_){be.current=null,Le.current=null,Be.current=null,ue([]),ee([]);return}let pe=!1;Gt(new Set),$n.current=new Set;let{graphData:le,analysis:ae}=cT(_,Wt);Le.current={nodes:le.nodes,edges:le.edges,analysis:ae,graphspec:_};let we=ae?bz(V.current,ae.controllerNodeIds):new Set;Dn(we),To.current=we,No.current=we.size>0,Kn.current=we.size,we.size>0&&!$e.current&&(L(!0),$e.current=!0);let ge=we.size>0&&ae?pg({nodes:le.nodes,edges:le.edges},ae,_,we,pt.current):{nodes:le.nodes,edges:le.edges,analysis:ae};return be.current={nodes:ge.nodes,edges:ge.edges,_analysis:ge.analysis,_graphspec:_},(async()=>{try{let He=ro.current,wt=li.current,On=ge.nodes.some(xt=>!xt.position||xt.position.x===0&&xt.position.y===0)?await Zf(ge.nodes,ge.edges,He,wt,_,ge.analysis):{nodes:ge.nodes,edges:ge.edges,controllerPositions:{}};if(pe)return;Be.current={nodes:On.nodes,edges:On.edges,controllerPositions:On.controllerPositions};let ci=ir(Ks(On.nodes),On.edges,_,ge.analysis,$e.current,$n.current,Rn.current,On.controllerPositions,pt.current);ue(Qs(tr(ar(ci.nodes)),Co.current)),ee(nr(ci.edges)),setTimeout(()=>{if(!pe&&de.current&&(de.current.fitView({padding:.1}),jn.current!==void 0&&jn.current!==null&&de.current.zoomTo(jn.current),ri.current)){let xt=de.current.getViewport();de.current.setViewport({x:xt.x,y:20,zoom:xt.zoom})}},100)}catch(He){console.error("[GraphViewer] ELK layout failed:",He)}})(),()=>{pe=!0}},[_,Wt]),fe.default.useEffect(()=>{if(Fn.current){Fn.current=!1,Kn.current=rt.size;return}if(No.current){No.current=!1,Kn.current=rt.size;return}let pe=Kn.current;if(Kn.current=rt.size,pe===0&&rt.size===0||!Le.current||!Le.current.analysis)return;let le=Le.current,ae=le.graphspec,we=le.analysis;if(!ae||!we)return;let ge=!1,He=pg({nodes:le.nodes,edges:le.edges},we,ae,rt,Qt);return be.current={nodes:He.nodes,edges:He.edges,_analysis:He.analysis,_graphspec:ae},(async()=>{try{let wt=await Zf(He.nodes,He.edges,ro.current,li.current,ae,He.analysis);if(ge)return;Be.current={nodes:wt.nodes,edges:wt.edges,controllerPositions:wt.controllerPositions};let Qn=ir(Ks(wt.nodes),wt.edges,ae,He.analysis,$e.current,$n.current,Rn.current,wt.controllerPositions,pt.current);ue(Qs(tr(ar(Qn.nodes)),Co.current)),ee(nr(Qn.edges)),setTimeout(()=>{!ge&&de.current&&de.current.fitView({padding:.1})},50)}catch(wt){console.error("[GraphViewer] ELK layout failed:",wt)}})(),()=>{ge=!0}},[rt,Qt]),fe.default.useEffect(()=>{if(!Be.current||!be.current)return;let pe=Ks(Be.current.nodes),le=Be.current.edges,ae=ir(pe,le,be.current._graphspec,be.current._analysis,$e.current,$n.current,Rn.current,Be.current.controllerPositions,pt.current);ue(Qs(tr(ar(ae.nodes)),b)),ee(nr(ae.edges))},[b]);let si=fe.default.useCallback((pe,le)=>{let ae=le.data;if(S?.(le.id,ae,pe),ae.isController||ae.isPipe){let we=ae.pipeCode||ae.labelText;we&&f&&f(we,ae.pipeCardData?.status)}else if(ae.isStuff&&h&&_){let we=ds(le.id),ge=Bh(_,we);ge&&h(ge)}if(j(null),G?.nodeId===le.id&&!Z)q(null);else if(ae.isPipe||ae.isController)q({kind:"pipe",nodeId:le.id,nodeData:ae});else if(ae.isStuff&&_){let we=ds(le.id),ge=Bh(_,we);q({kind:"stuff",nodeId:le.id,nodeData:ae,stuffData:ge??void 0})}ue(we=>we.map(ge=>({...ge,selected:ge.id===le.id})))},[ue,f,S,h,_,G,Z]),ui=fe.default.useCallback(pe=>{de.current=pe,v&&v(pe)},[v]),Pa=fe.default.useCallback(()=>{q(null),j(null),p?.()},[p]),wo=fe.default.useCallback(pe=>{if(!_)return;let le=zh(_,pe);le&&j(le)},[_]),ka=G?.kind==="pipe"&&_?_.nodes.find(pe=>pe.pipe_code===G.nodeData.pipeCode):void 0,Ga=G!==null||Z!==null,We=xz(s,n.toolbarPosition),Mo=Le.current?.analysis?.controllerNodeIds,Do=fe.default.useMemo(()=>!R||!Mo||Mo.size===0?{onFoldAll:void 0,onExpandAll:void 0,foldAllDisabled:!1,expandAllDisabled:!1}:{onFoldAll:()=>Dn(new Set(Mo)),onExpandAll:()=>Dn(new Set),foldAllDisabled:rt.size===Mo.size,expandAllDisabled:rt.size===0},[R,Mo,rt]);return(0,Kt.jsxs)("div",{ref:k,className:`react-flow-container react-flow-container--theme-${T} react-flow-container--mode-${H}`,children:[(0,Kt.jsxs)(NE,{nodes:Q,edges:ie,nodeTypes:yz,onNodesChange:he,onEdgesChange:Te,onNodeClick:si,onPaneClick:Pa,onInit:ui,fitView:!0,fitViewOptions:{padding:.1},defaultEdgeOptions:{type:Wt},panOnScroll:!0,minZoom:.1,proOptions:{hideAttribution:!0},panActivationKeyCode:null,children:[(0,Kt.jsx)(ME,{variant:xo.Dots,gap:20,size:1,color:"var(--color-bg-dots)"}),!l&&(0,Kt.jsx)(ET,{direction:E,onDirectionChange:w,showControllers:R,onShowControllersChange:L,onZoomIn:()=>{de.current?.zoomIn()},onZoomOut:()=>{de.current?.zoomOut()},onFitView:()=>{de.current?.fitView({padding:.1})},onFoldAll:Do.onFoldAll,onExpandAll:Do.onExpandAll,foldAllDisabled:Do.foldAllDisabled,expandAllDisabled:Do.expandAllDisabled,themeMode:c?H:void 0,onThemeModeChange:c?D:void 0,rightOffset:Ga?se:0,position:We})]}),(0,Kt.jsxs)(iT,{isOpen:Ga,onClose:Pa,width:se,isDragging:J,onResizeHandleMouseDown:X,children:[Z?(0,Kt.jsx)(dg,{concept:Z}):ka&&_?(0,Kt.jsx)(uT,{node:ka,spec:_,onConceptClick:wo}):G?.stuffData?(0,Kt.jsx)(vz,{nodeId:G.nodeId,stuffData:G.stuffData,graphspec:_,resolveStorageUrl:m,canEmbedPdf:g,onOpenExternally:x}):null,y&&G&&!Z&&y(G.nodeId,G.nodeData)]})]})}function _z(e){if(e==null)return to.EXPANDED;if(e===to.FOLDED||e===to.EXPANDED||e===to.AUTO)return e;throw new Error(`Invalid foldMode in standalone config: ${JSON.stringify(e)} \u2014 expected one of "folded", "expanded", "auto".`)}function Ez(e){if(e==null)return yt.SYSTEM;if(e===yt.LIGHT||e===yt.DARK||e===yt.SYSTEM)return e;throw new Error(`Invalid theme in standalone config: ${JSON.stringify(e)} \u2014 expected one of "dark", "light", "system".`)}function Tz(e){if(e==null)return Nn.LR;if(e===Nn.LR||e===Nn.RL||e===Nn.TB||e===Nn.BT)return e;throw new Error(`Invalid direction in standalone config: ${JSON.stringify(e)} \u2014 expected one of "TB", "BT", "LR", "RL".`)}function Nz(e){if(e==null)return;let t=Object.values(sn);if(t.includes(e))return e;throw new Error(`Invalid toolbarPosition in standalone config: ${JSON.stringify(e)} \u2014 expected one of ${t.map(n=>`"${n}"`).join(", ")}.`)}function xg(e,t){let n=e&&typeof e=="object"?e:{},o=Tz(n.direction),i=!!n.showControllers,a=_z(n.foldMode),l=Ez(n.theme),r=Nz(n.toolbarPosition);return{graphspec:t,config:{...n,direction:o,showControllers:i,foldMode:a,theme:l,toolbarPosition:r},initialDirection:o,initialShowControllers:i,initialFoldMode:a,theme:l}}function MT(e,t){let n=e?.trim();if(!n)return null;try{return JSON.parse(n)}catch(o){let i=o instanceof Error?o.message:String(o);throw new Error(`Failed to parse JSON from <script id="${t}">: ${i}`)}}var Ws=xg({},null),_g=null;function DT(e){return MT(document.getElementById(e)?.textContent,e)}function Cz(e,t){let n=jf(e),o=t?{...n,...t}:n;for(let[i,a]of Object.entries(o))document.body.style.setProperty(i,a)}function zT(e,t){document.body.setAttribute("data-theme",e),Cz(t,Ws.config.paletteColors)}function wz(){return Ha.default.createElement(AT,{...Ws,onThemeChange:(e,t)=>{zT(e,t)}})}function Az({message:e}){return Ha.default.createElement("div",{className:"standalone-error",role:"alert"},Ha.default.createElement("strong",{className:"standalone-error-title"},"Failed to render method graph"),Ha.default.createElement("pre",{className:"standalone-error-message"},e))}function RT(){let e=document.getElementById("root");if(!e)return;let t=(0,OT.createRoot)(e);_g=()=>{t.render(Ha.default.createElement(wz))},_g(),setTimeout(()=>{try{let n=DT("pipelex-config"),o=DT("pipelex-graphspec"),i=o===null?null:Hc(o);Ws=xg(n,i),zT(Ws.theme,Sg(Ws.theme,Oh())),_g?.()}catch(n){let o=n instanceof Error?n.message:String(n);t.render(Ha.default.createElement(Az,{message:o}))}},0)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",RT):RT();})();
|
|
2476
2491
|
/*! Bundled license information:
|
|
2477
2492
|
|
|
2478
2493
|
react/cjs/react.production.js:
|