@salesforce/metadata-plugins 1.9.0 → 1.11.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/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/plugins/agent/AgentParser.d.ts.map +1 -1
- package/dist/plugins/agent/AgentParser.js +70 -27
- package/dist/plugins/agent/ui/assets/index-BpnirPMA.js +71 -0
- package/dist/plugins/agent/ui/index.html +1 -1
- package/dist/plugins/flexipage/ui/assets/index-DJj6fJsw.js +48 -0
- package/dist/plugins/flexipage/ui/index.html +1 -1
- package/dist/plugins/flow/ui/assets/index-B-Cn56iR.js +48 -0
- package/dist/plugins/flow/ui/index.html +1 -1
- package/dist/plugins/flowintent/FlowIntentParser.d.ts +56 -0
- package/dist/plugins/flowintent/FlowIntentParser.d.ts.map +1 -0
- package/dist/plugins/flowintent/FlowIntentParser.js +144 -0
- package/dist/plugins/flowintent/FlowIntentVisualizer.d.ts +41 -0
- package/dist/plugins/flowintent/FlowIntentVisualizer.d.ts.map +1 -0
- package/dist/plugins/flowintent/FlowIntentVisualizer.js +43 -0
- package/dist/plugins/flowintent/types/IntentFlow.d.ts +139 -0
- package/dist/plugins/flowintent/types/IntentFlow.d.ts.map +1 -0
- package/dist/plugins/flowintent/types/IntentFlow.js +89 -0
- package/dist/plugins/flowintent/types/analyzeFlowBuilderGraph.d.ts +42 -0
- package/dist/plugins/flowintent/types/analyzeFlowBuilderGraph.d.ts.map +1 -0
- package/dist/plugins/flowintent/types/analyzeFlowBuilderGraph.js +226 -0
- package/dist/plugins/flowintent/types/analyzeIntentFlowGraph.d.ts +27 -0
- package/dist/plugins/flowintent/types/analyzeIntentFlowGraph.d.ts.map +1 -0
- package/dist/plugins/flowintent/types/analyzeIntentFlowGraph.js +80 -0
- package/dist/plugins/flowintent/types/index.d.ts +17 -0
- package/dist/plugins/flowintent/types/index.d.ts.map +1 -0
- package/dist/plugins/flowintent/types/index.js +16 -0
- package/dist/plugins/flowintent/types/validateIntentFlow.d.ts +32 -0
- package/dist/plugins/flowintent/types/validateIntentFlow.d.ts.map +1 -0
- package/dist/plugins/flowintent/types/validateIntentFlow.js +438 -0
- package/dist/plugins/flowintent/ui/assets/index-BkuUZejF.js +48 -0
- package/dist/plugins/flowintent/ui/assets/index-Di3MtBl5.css +1 -0
- package/dist/plugins/flowintent/ui/index.html +18 -0
- package/dist/plugins/permissionset/ui/assets/index-BCcTde0G.js +48 -0
- package/dist/plugins/permissionset/ui/index.html +1 -1
- package/dist/plugins/schema/ui/assets/index-BBcLTTbn.js +70 -0
- package/dist/plugins/schema/ui/index.html +1 -1
- package/dist/shared/bootstrap/createPluginApp.d.ts +14 -10
- package/dist/shared/bootstrap/createPluginApp.d.ts.map +1 -1
- package/dist/shared/bootstrap/createPluginApp.js +78 -17
- package/dist/shared/components/FlowIcons.d.ts +107 -0
- package/dist/shared/components/FlowIcons.d.ts.map +1 -0
- package/dist/shared/components/FlowIcons.js +243 -0
- package/package.json +4 -4
- package/dist/plugins/agent/ui/assets/index-C_Q6Mc2L.js +0 -71
- package/dist/plugins/flexipage/ui/assets/index-CuJYcAx_.js +0 -48
- package/dist/plugins/flow/ui/assets/index-OhJU6yxp.js +0 -48
- package/dist/plugins/permissionset/ui/assets/index-CMInRbR2.js +0 -48
- package/dist/plugins/schema/ui/assets/index-CWvLR0Fz.js +0 -70
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function Wd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yd={exports:{}},Rs={},Xd={exports:{}},oe={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Ho=Symbol.for("react.element"),uy=Symbol.for("react.portal"),cy=Symbol.for("react.fragment"),fy=Symbol.for("react.strict_mode"),dy=Symbol.for("react.profiler"),hy=Symbol.for("react.provider"),py=Symbol.for("react.context"),gy=Symbol.for("react.forward_ref"),my=Symbol.for("react.suspense"),yy=Symbol.for("react.memo"),vy=Symbol.for("react.lazy"),Nc=Symbol.iterator;function wy(e){return e===null||typeof e!="object"?null:(e=Nc&&e[Nc]||e["@@iterator"],typeof e=="function"?e:null)}var Gd={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Qd=Object.assign,Kd={};function br(e,t,n){this.props=e,this.context=t,this.refs=Kd,this.updater=n||Gd}br.prototype.isReactComponent={};br.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): 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")};br.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Zd(){}Zd.prototype=br.prototype;function iu(e,t,n){this.props=e,this.context=t,this.refs=Kd,this.updater=n||Gd}var su=iu.prototype=new Zd;su.constructor=iu;Qd(su,br.prototype);su.isPureReactComponent=!0;var Cc=Array.isArray,qd=Object.prototype.hasOwnProperty,lu={current:null},Jd={key:!0,ref:!0,__self:!0,__source:!0};function eh(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)qd.call(t,r)&&!Jd.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1<l){for(var a=Array(l),u=0;u<l;u++)a[u]=arguments[u+2];o.children=a}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)o[r]===void 0&&(o[r]=l[r]);return{$$typeof:Ho,type:e,key:i,ref:s,props:o,_owner:lu.current}}function xy(e,t){return{$$typeof:Ho,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function au(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ho}function Ey(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Mc=/\/+/g;function cl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Ey(""+e.key):t.toString(36)}function bi(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Ho:case uy:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+cl(s,0):r,Cc(o)?(n="",e!=null&&(n=e.replace(Mc,"$&/")+"/"),bi(o,t,n,"",function(u){return u})):o!=null&&(au(o)&&(o=xy(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Mc,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Cc(e))for(var l=0;l<e.length;l++){i=e[l];var a=r+cl(i,l);s+=bi(i,t,n,a,o)}else if(a=wy(e),typeof a=="function")for(e=a.call(e),l=0;!(i=e.next()).done;)i=i.value,a=r+cl(i,l++),s+=bi(i,t,n,a,o);else if(i==="object")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 s}function ri(e,t,n){if(e==null)return e;var r=[],o=0;return bi(e,r,"","",function(i){return t.call(n,i,o++)}),r}function _y(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 $e={current:null},Ri={transition:null},Sy={ReactCurrentDispatcher:$e,ReactCurrentBatchConfig:Ri,ReactCurrentOwner:lu};function th(){throw Error("act(...) is not supported in production builds of React.")}oe.Children={map:ri,forEach:function(e,t,n){ri(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ri(e,function(){t++}),t},toArray:function(e){return ri(e,function(t){return t})||[]},only:function(e){if(!au(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};oe.Component=br;oe.Fragment=cy;oe.Profiler=dy;oe.PureComponent=iu;oe.StrictMode=fy;oe.Suspense=my;oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Sy;oe.act=th;oe.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Qd({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=lu.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)qd.call(t,a)&&!Jd.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&l!==void 0?l[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var u=0;u<a;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Ho,type:e.type,key:o,ref:i,props:r,_owner:s}};oe.createContext=function(e){return e={$$typeof:py,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:hy,_context:e},e.Consumer=e};oe.createElement=eh;oe.createFactory=function(e){var t=eh.bind(null,e);return t.type=e,t};oe.createRef=function(){return{current:null}};oe.forwardRef=function(e){return{$$typeof:gy,render:e}};oe.isValidElement=au;oe.lazy=function(e){return{$$typeof:vy,_payload:{_status:-1,_result:e},_init:_y}};oe.memo=function(e,t){return{$$typeof:yy,type:e,compare:t===void 0?null:t}};oe.startTransition=function(e){var t=Ri.transition;Ri.transition={};try{e()}finally{Ri.transition=t}};oe.unstable_act=th;oe.useCallback=function(e,t){return $e.current.useCallback(e,t)};oe.useContext=function(e){return $e.current.useContext(e)};oe.useDebugValue=function(){};oe.useDeferredValue=function(e){return $e.current.useDeferredValue(e)};oe.useEffect=function(e,t){return $e.current.useEffect(e,t)};oe.useId=function(){return $e.current.useId()};oe.useImperativeHandle=function(e,t,n){return $e.current.useImperativeHandle(e,t,n)};oe.useInsertionEffect=function(e,t){return $e.current.useInsertionEffect(e,t)};oe.useLayoutEffect=function(e,t){return $e.current.useLayoutEffect(e,t)};oe.useMemo=function(e,t){return $e.current.useMemo(e,t)};oe.useReducer=function(e,t,n){return $e.current.useReducer(e,t,n)};oe.useRef=function(e){return $e.current.useRef(e)};oe.useState=function(e){return $e.current.useState(e)};oe.useSyncExternalStore=function(e,t,n){return $e.current.useSyncExternalStore(e,t,n)};oe.useTransition=function(){return $e.current.useTransition()};oe.version="18.3.1";Xd.exports=oe;var W=Xd.exports;const le=Wd(W);/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var ky=W,Ny=Symbol.for("react.element"),Cy=Symbol.for("react.fragment"),My=Object.prototype.hasOwnProperty,Iy=ky.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Py={key:!0,ref:!0,__self:!0,__source:!0};function nh(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)My.call(t,r)&&!Py.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:Ny,type:e,key:i,ref:s,props:o,_owner:Iy.current}}Rs.Fragment=Cy;Rs.jsx=nh;Rs.jsxs=nh;Yd.exports=Rs;var F=Yd.exports;function Se(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=Se(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var Ty={value:()=>{}};function As(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Ai(n)}function Ai(e){this._=e}function Ly(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Ai.prototype=As.prototype={constructor:Ai,on:function(e,t){var n=this._,r=Ly(e+"",n),o,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((o=(e=r[i]).type)&&(o=by(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<s;)if(o=(e=r[i]).type)n[o]=Ic(n[o],e.name,t);else if(t==null)for(o in n)n[o]=Ic(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Ai(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,i;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],r=0,o=i.length;r<o;++r)i[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};function by(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function Ic(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=Ty,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Kl="http://www.w3.org/1999/xhtml";const Pc={svg:"http://www.w3.org/2000/svg",xhtml:Kl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function zs(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Pc.hasOwnProperty(t)?{space:Pc[t],local:e}:e}function Ry(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Kl&&t.documentElement.namespaceURI===Kl?t.createElement(e):t.createElementNS(n,e)}}function Ay(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function rh(e){var t=zs(e);return(t.local?Ay:Ry)(t)}function zy(){}function uu(e){return e==null?zy:function(){return this.querySelector(e)}}function Oy(e){typeof e!="function"&&(e=uu(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,l=r[o]=new Array(s),a,u,f=0;f<s;++f)(a=i[f])&&(u=e.call(a,a.__data__,f,i))&&("__data__"in a&&(u.__data__=a.__data__),l[f]=u);return new Ke(r,this._parents)}function jy(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function $y(){return[]}function oh(e){return e==null?$y:function(){return this.querySelectorAll(e)}}function Dy(e){return function(){return jy(e.apply(this,arguments))}}function Fy(e){typeof e=="function"?e=Dy(e):e=oh(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var s=t[i],l=s.length,a,u=0;u<l;++u)(a=s[u])&&(r.push(e.call(a,a.__data__,u,s)),o.push(a));return new Ke(r,o)}function ih(e){return function(){return this.matches(e)}}function sh(e){return function(t){return t.matches(e)}}var Vy=Array.prototype.find;function Hy(e){return function(){return Vy.call(this.children,e)}}function By(){return this.firstElementChild}function Uy(e){return this.select(e==null?By:Hy(typeof e=="function"?e:sh(e)))}var Wy=Array.prototype.filter;function Yy(){return Array.from(this.children)}function Xy(e){return function(){return Wy.call(this.children,e)}}function Gy(e){return this.selectAll(e==null?Yy:Xy(typeof e=="function"?e:sh(e)))}function Qy(e){typeof e!="function"&&(e=ih(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,l=r[o]=[],a,u=0;u<s;++u)(a=i[u])&&e.call(a,a.__data__,u,i)&&l.push(a);return new Ke(r,this._parents)}function lh(e){return new Array(e.length)}function Ky(){return new Ke(this._enter||this._groups.map(lh),this._parents)}function Ki(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ki.prototype={constructor:Ki,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 Zy(e){return function(){return e}}function qy(e,t,n,r,o,i){for(var s=0,l,a=t.length,u=i.length;s<u;++s)(l=t[s])?(l.__data__=i[s],r[s]=l):n[s]=new Ki(e,i[s]);for(;s<a;++s)(l=t[s])&&(o[s]=l)}function Jy(e,t,n,r,o,i,s){var l,a,u=new Map,f=t.length,c=i.length,d=new Array(f),h;for(l=0;l<f;++l)(a=t[l])&&(d[l]=h=s.call(a,a.__data__,l,t)+"",u.has(h)?o[l]=a:u.set(h,a));for(l=0;l<c;++l)h=s.call(e,i[l],l,i)+"",(a=u.get(h))?(r[l]=a,a.__data__=i[l],u.delete(h)):n[l]=new Ki(e,i[l]);for(l=0;l<f;++l)(a=t[l])&&u.get(d[l])===a&&(o[l]=a)}function ev(e){return e.__data__}function tv(e,t){if(!arguments.length)return Array.from(this,ev);var n=t?Jy:qy,r=this._parents,o=this._groups;typeof e!="function"&&(e=Zy(e));for(var i=o.length,s=new Array(i),l=new Array(i),a=new Array(i),u=0;u<i;++u){var f=r[u],c=o[u],d=c.length,h=nv(e.call(f,f&&f.__data__,u,r)),y=h.length,w=l[u]=new Array(y),x=s[u]=new Array(y),m=a[u]=new Array(d);n(f,c,w,x,m,h,t);for(var g=0,p=0,v,_;g<y;++g)if(v=w[g]){for(g>=p&&(p=g+1);!(_=x[p])&&++p<y;);v._next=_||null}}return s=new Ke(s,r),s._enter=l,s._exit=a,s}function nv(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function rv(){return new Ke(this._exit||this._groups.map(lh),this._parents)}function ov(e,t,n){var r=this.enter(),o=this,i=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?i.remove():n(i),r&&o?r.merge(o).order():o}function iv(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,s=Math.min(o,i),l=new Array(o),a=0;a<s;++a)for(var u=n[a],f=r[a],c=u.length,d=l[a]=new Array(c),h,y=0;y<c;++y)(h=u[y]||f[y])&&(d[y]=h);for(;a<o;++a)l[a]=n[a];return new Ke(l,this._parents)}function sv(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],o=r.length-1,i=r[o],s;--o>=0;)(s=r[o])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function lv(e){e||(e=av);function t(c,d){return c&&d?e(c.__data__,d.__data__):!c-!d}for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var s=n[i],l=s.length,a=o[i]=new Array(l),u,f=0;f<l;++f)(u=s[f])&&(a[f]=u);a.sort(t)}return new Ke(o,this._parents).order()}function av(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function uv(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function cv(){return Array.from(this)}function fv(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length;o<i;++o){var s=r[o];if(s)return s}return null}function dv(){let e=0;for(const t of this)++e;return e}function hv(){return!this.node()}function pv(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],i=0,s=o.length,l;i<s;++i)(l=o[i])&&e.call(l,l.__data__,i,o);return this}function gv(e){return function(){this.removeAttribute(e)}}function mv(e){return function(){this.removeAttributeNS(e.space,e.local)}}function yv(e,t){return function(){this.setAttribute(e,t)}}function vv(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function wv(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function xv(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 Ev(e,t){var n=zs(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?mv:gv:typeof t=="function"?n.local?xv:wv:n.local?vv:yv)(n,t))}function ah(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function _v(e){return function(){this.style.removeProperty(e)}}function Sv(e,t,n){return function(){this.style.setProperty(e,t,n)}}function kv(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Nv(e,t,n){return arguments.length>1?this.each((t==null?_v:typeof t=="function"?kv:Sv)(e,t,n??"")):hr(this.node(),e)}function hr(e,t){return e.style.getPropertyValue(t)||ah(e).getComputedStyle(e,null).getPropertyValue(t)}function Cv(e){return function(){delete this[e]}}function Mv(e,t){return function(){this[e]=t}}function Iv(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Pv(e,t){return arguments.length>1?this.each((t==null?Cv:typeof t=="function"?Iv:Mv)(e,t)):this.node()[e]}function uh(e){return e.trim().split(/^|\s+/)}function cu(e){return e.classList||new ch(e)}function ch(e){this._node=e,this._names=uh(e.getAttribute("class")||"")}ch.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 fh(e,t){for(var n=cu(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function dh(e,t){for(var n=cu(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function Tv(e){return function(){fh(this,e)}}function Lv(e){return function(){dh(this,e)}}function bv(e,t){return function(){(t.apply(this,arguments)?fh:dh)(this,e)}}function Rv(e,t){var n=uh(e+"");if(arguments.length<2){for(var r=cu(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?bv:t?Tv:Lv)(n,t))}function Av(){this.textContent=""}function zv(e){return function(){this.textContent=e}}function Ov(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function jv(e){return arguments.length?this.each(e==null?Av:(typeof e=="function"?Ov:zv)(e)):this.node().textContent}function $v(){this.innerHTML=""}function Dv(e){return function(){this.innerHTML=e}}function Fv(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Vv(e){return arguments.length?this.each(e==null?$v:(typeof e=="function"?Fv:Dv)(e)):this.node().innerHTML}function Hv(){this.nextSibling&&this.parentNode.appendChild(this)}function Bv(){return this.each(Hv)}function Uv(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Wv(){return this.each(Uv)}function Yv(e){var t=typeof e=="function"?e:rh(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Xv(){return null}function Gv(e,t){var n=typeof e=="function"?e:rh(e),r=t==null?Xv:typeof t=="function"?t:uu(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Qv(){var e=this.parentNode;e&&e.removeChild(this)}function Kv(){return this.each(Qv)}function Zv(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function qv(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Jv(e){return this.select(e?qv:Zv)}function ew(e){return arguments.length?this.property("__data__",e):this.node().__data__}function tw(e){return function(t){e.call(this,t,this.__data__)}}function nw(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function rw(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,i;n<o;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++r]=i;++r?t.length=r:delete this.__on}}}function ow(e,t,n){return function(){var r=this.__on,o,i=tw(t);if(r){for(var s=0,l=r.length;s<l;++s)if((o=r[s]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),o.value=t;return}}this.addEventListener(e.type,i,n),o={type:e.type,name:e.name,value:t,listener:i,options:n},r?r.push(o):this.__on=[o]}}function iw(e,t,n){var r=nw(e+""),o,i=r.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var a=0,u=l.length,f;a<u;++a)for(o=0,f=l[a];o<i;++o)if((s=r[o]).type===f.type&&s.name===f.name)return f.value}return}for(l=t?ow:rw,o=0;o<i;++o)this.each(l(r[o],t,n));return this}function hh(e,t,n){var r=ah(e),o=r.CustomEvent;typeof o=="function"?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function sw(e,t){return function(){return hh(this,e,t)}}function lw(e,t){return function(){return hh(this,e,t.apply(this,arguments))}}function aw(e,t){return this.each((typeof t=="function"?lw:sw)(e,t))}function*uw(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length,s;o<i;++o)(s=r[o])&&(yield s)}var ph=[null];function Ke(e,t){this._groups=e,this._parents=t}function Bo(){return new Ke([[document.documentElement]],ph)}function cw(){return this}Ke.prototype=Bo.prototype={constructor:Ke,select:Oy,selectAll:Fy,selectChild:Uy,selectChildren:Gy,filter:Qy,data:tv,enter:Ky,exit:rv,join:ov,merge:iv,selection:cw,order:sv,sort:lv,call:uv,nodes:cv,node:fv,size:dv,empty:hv,each:pv,attr:Ev,style:Nv,property:Pv,classed:Rv,text:jv,html:Vv,raise:Bv,lower:Wv,append:Yv,insert:Gv,remove:Kv,clone:Jv,datum:ew,on:iw,dispatch:aw,[Symbol.iterator]:uw};function Xe(e){return typeof e=="string"?new Ke([[document.querySelector(e)]],[document.documentElement]):new Ke([[e]],ph)}function fw(e){let t;for(;t=e.sourceEvent;)e=t;return e}function ft(e,t){if(e=fw(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const dw={passive:!1},mo={capture:!0,passive:!1};function fl(e){e.stopImmediatePropagation()}function ir(e){e.preventDefault(),e.stopImmediatePropagation()}function gh(e){var t=e.document.documentElement,n=Xe(e).on("dragstart.drag",ir,mo);"onselectstart"in t?n.on("selectstart.drag",ir,mo):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function mh(e,t){var n=e.document.documentElement,r=Xe(e).on("dragstart.drag",null);t&&(r.on("click.drag",ir,mo),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const oi=e=>()=>e;function Zl(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:s,y:l,dx:a,dy:u,dispatch:f}){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:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:f}})}Zl.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function hw(e){return!e.ctrlKey&&!e.button}function pw(){return this.parentNode}function gw(e,t){return t??{x:e.x,y:e.y}}function mw(){return navigator.maxTouchPoints||"ontouchstart"in this}function yh(){var e=hw,t=pw,n=gw,r=mw,o={},i=As("start","drag","end"),s=0,l,a,u,f,c=0;function d(v){v.on("mousedown.drag",h).filter(r).on("touchstart.drag",x).on("touchmove.drag",m,dw).on("touchend.drag touchcancel.drag",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(v,_){if(!(f||!e.call(this,v,_))){var k=p(this,t.call(this,v,_),v,_,"mouse");k&&(Xe(v.view).on("mousemove.drag",y,mo).on("mouseup.drag",w,mo),gh(v.view),fl(v),u=!1,l=v.clientX,a=v.clientY,k("start",v))}}function y(v){if(ir(v),!u){var _=v.clientX-l,k=v.clientY-a;u=_*_+k*k>c}o.mouse("drag",v)}function w(v){Xe(v.view).on("mousemove.drag mouseup.drag",null),mh(v.view,u),ir(v),o.mouse("end",v)}function x(v,_){if(e.call(this,v,_)){var k=v.changedTouches,I=t.call(this,v,_),b=k.length,H,M;for(H=0;H<b;++H)(M=p(this,I,v,_,k[H].identifier,k[H]))&&(fl(v),M("start",v,k[H]))}}function m(v){var _=v.changedTouches,k=_.length,I,b;for(I=0;I<k;++I)(b=o[_[I].identifier])&&(ir(v),b("drag",v,_[I]))}function g(v){var _=v.changedTouches,k=_.length,I,b;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),I=0;I<k;++I)(b=o[_[I].identifier])&&(fl(v),b("end",v,_[I]))}function p(v,_,k,I,b,H){var M=i.copy(),S=ft(H||k,_),L,j,E;if((E=n.call(v,new Zl("beforestart",{sourceEvent:k,target:d,identifier:b,active:s,x:S[0],y:S[1],dx:0,dy:0,dispatch:M}),I))!=null)return L=E.x-S[0]||0,j=E.y-S[1]||0,function z(P,A,N){var T=S,$;switch(P){case"start":o[b]=z,$=s++;break;case"end":delete o[b],--s;case"drag":S=ft(N||A,_),$=s;break}M.call(P,v,new Zl(P,{sourceEvent:A,subject:E,target:d,identifier:b,active:$,x:S[0]+L,y:S[1]+j,dx:S[0]-T[0],dy:S[1]-T[1],dispatch:M}),I)}}return d.filter=function(v){return arguments.length?(e=typeof v=="function"?v:oi(!!v),d):e},d.container=function(v){return arguments.length?(t=typeof v=="function"?v:oi(v),d):t},d.subject=function(v){return arguments.length?(n=typeof v=="function"?v:oi(v),d):n},d.touchable=function(v){return arguments.length?(r=typeof v=="function"?v:oi(!!v),d):r},d.on=function(){var v=i.on.apply(i,arguments);return v===i?d:v},d.clickDistance=function(v){return arguments.length?(c=(v=+v)*v,d):Math.sqrt(c)},d}function fu(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function vh(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Uo(){}var yo=.7,Zi=1/yo,sr="\\s*([+-]?\\d+)\\s*",vo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ct="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",yw=/^#([0-9a-f]{3,8})$/,vw=new RegExp(`^rgb\\(${sr},${sr},${sr}\\)$`),ww=new RegExp(`^rgb\\(${Ct},${Ct},${Ct}\\)$`),xw=new RegExp(`^rgba\\(${sr},${sr},${sr},${vo}\\)$`),Ew=new RegExp(`^rgba\\(${Ct},${Ct},${Ct},${vo}\\)$`),_w=new RegExp(`^hsl\\(${vo},${Ct},${Ct}\\)$`),Sw=new RegExp(`^hsla\\(${vo},${Ct},${Ct},${vo}\\)$`),Tc={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};fu(Uo,Pn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Lc,formatHex:Lc,formatHex8:kw,formatHsl:Nw,formatRgb:bc,toString:bc});function Lc(){return this.rgb().formatHex()}function kw(){return this.rgb().formatHex8()}function Nw(){return wh(this).formatHsl()}function bc(){return this.rgb().formatRgb()}function Pn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=yw.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Rc(t):n===3?new Ve(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ii(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ii(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=vw.exec(e))?new Ve(t[1],t[2],t[3],1):(t=ww.exec(e))?new Ve(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=xw.exec(e))?ii(t[1],t[2],t[3],t[4]):(t=Ew.exec(e))?ii(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=_w.exec(e))?Oc(t[1],t[2]/100,t[3]/100,1):(t=Sw.exec(e))?Oc(t[1],t[2]/100,t[3]/100,t[4]):Tc.hasOwnProperty(e)?Rc(Tc[e]):e==="transparent"?new Ve(NaN,NaN,NaN,0):null}function Rc(e){return new Ve(e>>16&255,e>>8&255,e&255,1)}function ii(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ve(e,t,n,r)}function Cw(e){return e instanceof Uo||(e=Pn(e)),e?(e=e.rgb(),new Ve(e.r,e.g,e.b,e.opacity)):new Ve}function ql(e,t,n,r){return arguments.length===1?Cw(e):new Ve(e,t,n,r??1)}function Ve(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}fu(Ve,ql,vh(Uo,{brighter(e){return e=e==null?Zi:Math.pow(Zi,e),new Ve(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?yo:Math.pow(yo,e),new Ve(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ve(Nn(this.r),Nn(this.g),Nn(this.b),qi(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:Ac,formatHex:Ac,formatHex8:Mw,formatRgb:zc,toString:zc}));function Ac(){return`#${En(this.r)}${En(this.g)}${En(this.b)}`}function Mw(){return`#${En(this.r)}${En(this.g)}${En(this.b)}${En((isNaN(this.opacity)?1:this.opacity)*255)}`}function zc(){const e=qi(this.opacity);return`${e===1?"rgb(":"rgba("}${Nn(this.r)}, ${Nn(this.g)}, ${Nn(this.b)}${e===1?")":`, ${e})`}`}function qi(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Nn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function En(e){return e=Nn(e),(e<16?"0":"")+e.toString(16)}function Oc(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new pt(e,t,n,r)}function wh(e){if(e instanceof pt)return new pt(e.h,e.s,e.l,e.opacity);if(e instanceof Uo||(e=Pn(e)),!e)return new pt;if(e instanceof pt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,l=i-o,a=(i+o)/2;return l?(t===i?s=(n-r)/l+(n<r)*6:n===i?s=(r-t)/l+2:s=(t-n)/l+4,l/=a<.5?i+o:2-i-o,s*=60):l=a>0&&a<1?0:s,new pt(s,l,a,e.opacity)}function Iw(e,t,n,r){return arguments.length===1?wh(e):new pt(e,t,n,r??1)}function pt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}fu(pt,Iw,vh(Uo,{brighter(e){return e=e==null?Zi:Math.pow(Zi,e),new pt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?yo:Math.pow(yo,e),new pt(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,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Ve(dl(e>=240?e-240:e+120,o,r),dl(e,o,r),dl(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new pt(jc(this.h),si(this.s),si(this.l),qi(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=qi(this.opacity);return`${e===1?"hsl(":"hsla("}${jc(this.h)}, ${si(this.s)*100}%, ${si(this.l)*100}%${e===1?")":`, ${e})`}`}}));function jc(e){return e=(e||0)%360,e<0?e+360:e}function si(e){return Math.max(0,Math.min(1,e||0))}function dl(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const du=e=>()=>e;function Pw(e,t){return function(n){return e+n*t}}function Tw(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Lw(e){return(e=+e)==1?xh:function(t,n){return n-t?Tw(t,n,e):du(isNaN(t)?n:t)}}function xh(e,t){var n=t-e;return n?Pw(e,n):du(isNaN(e)?t:e)}const Ji=function e(t){var n=Lw(t);function r(o,i){var s=n((o=ql(o)).r,(i=ql(i)).r),l=n(o.g,i.g),a=n(o.b,i.b),u=xh(o.opacity,i.opacity);return function(f){return o.r=s(f),o.g=l(f),o.b=a(f),o.opacity=u(f),o+""}}return r.gamma=e,r}(1);function bw(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=e[o]*(1-i)+t[o]*i;return r}}function Rw(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Aw(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),i=new Array(n),s;for(s=0;s<r;++s)o[s]=ro(e[s],t[s]);for(;s<n;++s)i[s]=t[s];return function(l){for(s=0;s<r;++s)i[s]=o[s](l);return i}}function zw(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function kt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Ow(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=ro(e[o],t[o]):r[o]=t[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var Jl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,hl=new RegExp(Jl.source,"g");function jw(e){return function(){return e}}function $w(e){return function(t){return e(t)+""}}function Eh(e,t){var n=Jl.lastIndex=hl.lastIndex=0,r,o,i,s=-1,l=[],a=[];for(e=e+"",t=t+"";(r=Jl.exec(e))&&(o=hl.exec(t));)(i=o.index)>n&&(i=t.slice(n,i),l[s]?l[s]+=i:l[++s]=i),(r=r[0])===(o=o[0])?l[s]?l[s]+=o:l[++s]=o:(l[++s]=null,a.push({i:s,x:kt(r,o)})),n=hl.lastIndex;return n<t.length&&(i=t.slice(n),l[s]?l[s]+=i:l[++s]=i),l.length<2?a[0]?$w(a[0].x):jw(t):(t=a.length,function(u){for(var f=0,c;f<t;++f)l[(c=a[f]).i]=c.x(u);return l.join("")})}function ro(e,t){var n=typeof t,r;return t==null||n==="boolean"?du(t):(n==="number"?kt:n==="string"?(r=Pn(t))?(t=r,Ji):Eh:t instanceof Pn?Ji:t instanceof Date?zw:Rw(t)?bw:Array.isArray(t)?Aw:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Ow:kt)(e,t)}var $c=180/Math.PI,ea={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function _h(e,t,n,r,o,i){var s,l,a;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(a=e*n+t*r)&&(n-=e*a,r-=t*a),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,a/=l),e*r<t*n&&(e=-e,t=-t,a=-a,s=-s),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*$c,skewX:Math.atan(a)*$c,scaleX:s,scaleY:l}}var li;function Dw(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ea:_h(t.a,t.b,t.c,t.d,t.e,t.f)}function Fw(e){return e==null||(li||(li=document.createElementNS("http://www.w3.org/2000/svg","g")),li.setAttribute("transform",e),!(e=li.transform.baseVal.consolidate()))?ea:(e=e.matrix,_h(e.a,e.b,e.c,e.d,e.e,e.f))}function Sh(e,t,n,r){function o(u){return u.length?u.pop()+" ":""}function i(u,f,c,d,h,y){if(u!==c||f!==d){var w=h.push("translate(",null,t,null,n);y.push({i:w-4,x:kt(u,c)},{i:w-2,x:kt(f,d)})}else(c||d)&&h.push("translate("+c+t+d+n)}function s(u,f,c,d){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),d.push({i:c.push(o(c)+"rotate(",null,r)-2,x:kt(u,f)})):f&&c.push(o(c)+"rotate("+f+r)}function l(u,f,c,d){u!==f?d.push({i:c.push(o(c)+"skewX(",null,r)-2,x:kt(u,f)}):f&&c.push(o(c)+"skewX("+f+r)}function a(u,f,c,d,h,y){if(u!==c||f!==d){var w=h.push(o(h)+"scale(",null,",",null,")");y.push({i:w-4,x:kt(u,c)},{i:w-2,x:kt(f,d)})}else(c!==1||d!==1)&&h.push(o(h)+"scale("+c+","+d+")")}return function(u,f){var c=[],d=[];return u=e(u),f=e(f),i(u.translateX,u.translateY,f.translateX,f.translateY,c,d),s(u.rotate,f.rotate,c,d),l(u.skewX,f.skewX,c,d),a(u.scaleX,u.scaleY,f.scaleX,f.scaleY,c,d),u=f=null,function(h){for(var y=-1,w=d.length,x;++y<w;)c[(x=d[y]).i]=x.x(h);return c.join("")}}}var Vw=Sh(Dw,"px, ","px)","deg)"),Hw=Sh(Fw,", ",")",")"),Bw=1e-12;function Dc(e){return((e=Math.exp(e))+1/e)/2}function Uw(e){return((e=Math.exp(e))-1/e)/2}function Ww(e){return((e=Math.exp(2*e))-1)/(e+1)}const zi=function e(t,n,r){function o(i,s){var l=i[0],a=i[1],u=i[2],f=s[0],c=s[1],d=s[2],h=f-l,y=c-a,w=h*h+y*y,x,m;if(w<Bw)m=Math.log(d/u)/t,x=function(I){return[l+I*h,a+I*y,u*Math.exp(t*I*m)]};else{var g=Math.sqrt(w),p=(d*d-u*u+r*w)/(2*u*n*g),v=(d*d-u*u-r*w)/(2*d*n*g),_=Math.log(Math.sqrt(p*p+1)-p),k=Math.log(Math.sqrt(v*v+1)-v);m=(k-_)/t,x=function(I){var b=I*m,H=Dc(_),M=u/(n*g)*(H*Ww(t*b+_)-Uw(_));return[l+M*h,a+M*y,u*H/Dc(t*b+_)]}}return x.duration=m*1e3*t/Math.SQRT2,x}return o.rho=function(i){var s=Math.max(.001,+i),l=s*s,a=l*l;return e(s,l,a)},o}(Math.SQRT2,2,4);var pr=0,Kr=0,Dr=0,kh=1e3,es,Zr,ts=0,Tn=0,Os=0,wo=typeof performance=="object"&&performance.now?performance:Date,Nh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function hu(){return Tn||(Nh(Yw),Tn=wo.now()+Os)}function Yw(){Tn=0}function ns(){this._call=this._time=this._next=null}ns.prototype=Ch.prototype={constructor:ns,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?hu():+n)+(t==null?0:+t),!this._next&&Zr!==this&&(Zr?Zr._next=this:es=this,Zr=this),this._call=e,this._time=n,ta()},stop:function(){this._call&&(this._call=null,this._time=1/0,ta())}};function Ch(e,t,n){var r=new ns;return r.restart(e,t,n),r}function Xw(){hu(),++pr;for(var e=es,t;e;)(t=Tn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--pr}function Fc(){Tn=(ts=wo.now())+Os,pr=Kr=0;try{Xw()}finally{pr=0,Qw(),Tn=0}}function Gw(){var e=wo.now(),t=e-ts;t>kh&&(Os-=t,ts=e)}function Qw(){for(var e,t=es,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:es=n);Zr=e,ta(r)}function ta(e){if(!pr){Kr&&(Kr=clearTimeout(Kr));var t=e-Tn;t>24?(e<1/0&&(Kr=setTimeout(Fc,e-wo.now()-Os)),Dr&&(Dr=clearInterval(Dr))):(Dr||(ts=wo.now(),Dr=setInterval(Gw,kh)),pr=1,Nh(Fc))}}function Vc(e,t,n){var r=new ns;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var Kw=As("start","end","cancel","interrupt"),Zw=[],Mh=0,Hc=1,na=2,Oi=3,Bc=4,ra=5,ji=6;function js(e,t,n,r,o,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;qw(e,n,{name:t,index:r,group:o,on:Kw,tween:Zw,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Mh})}function pu(e,t){var n=Et(e,t);if(n.state>Mh)throw new Error("too late; already scheduled");return n}function Tt(e,t){var n=Et(e,t);if(n.state>Oi)throw new Error("too late; already running");return n}function Et(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function qw(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=Ch(i,0,n.time);function i(u){n.state=Hc,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var f,c,d,h;if(n.state!==Hc)return a();for(f in r)if(h=r[f],h.name===n.name){if(h.state===Oi)return Vc(s);h.state===Bc?(h.state=ji,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[f]):+f<t&&(h.state=ji,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[f])}if(Vc(function(){n.state===Oi&&(n.state=Bc,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=na,n.on.call("start",e,e.__data__,n.index,n.group),n.state===na){for(n.state=Oi,o=new Array(d=n.tween.length),f=0,c=-1;f<d;++f)(h=n.tween[f].value.call(e,e.__data__,n.index,n.group))&&(o[++c]=h);o.length=c+1}}function l(u){for(var f=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(a),n.state=ra,1),c=-1,d=o.length;++c<d;)o[c].call(e,f);n.state===ra&&(n.on.call("end",e,e.__data__,n.index,n.group),a())}function a(){n.state=ji,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function $i(e,t){var n=e.__transition,r,o,i=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){i=!1;continue}o=r.state>na&&r.state<ra,r.state=ji,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}i&&delete e.__transition}}function Jw(e){return this.each(function(){$i(this,e)})}function ex(e,t){var n,r;return function(){var o=Tt(this,e),i=o.tween;if(i!==n){r=n=i;for(var s=0,l=r.length;s<l;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}o.tween=r}}function tx(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var i=Tt(this,e),s=i.tween;if(s!==r){o=(r=s).slice();for(var l={name:t,value:n},a=0,u=o.length;a<u;++a)if(o[a].name===t){o[a]=l;break}a===u&&o.push(l)}i.tween=o}}function nx(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Et(this.node(),n).tween,o=0,i=r.length,s;o<i;++o)if((s=r[o]).name===e)return s.value;return null}return this.each((t==null?ex:tx)(n,e,t))}function gu(e,t,n){var r=e._id;return e.each(function(){var o=Tt(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return Et(o,r).value[t]}}function Ih(e,t){var n;return(typeof t=="number"?kt:t instanceof Pn?Ji:(n=Pn(t))?(t=n,Ji):Eh)(e,t)}function rx(e){return function(){this.removeAttribute(e)}}function ox(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ix(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttribute(e);return s===o?null:s===r?i:i=t(r=s,n)}}function sx(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===r?i:i=t(r=s,n)}}function lx(e,t,n){var r,o,i;return function(){var s,l=n(this),a;return l==null?void this.removeAttribute(e):(s=this.getAttribute(e),a=l+"",s===a?null:s===r&&a===o?i:(o=a,i=t(r=s,l)))}}function ax(e,t,n){var r,o,i;return function(){var s,l=n(this),a;return l==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),a=l+"",s===a?null:s===r&&a===o?i:(o=a,i=t(r=s,l)))}}function ux(e,t){var n=zs(e),r=n==="transform"?Hw:Ih;return this.attrTween(e,typeof t=="function"?(n.local?ax:lx)(n,r,gu(this,"attr."+e,t)):t==null?(n.local?ox:rx)(n):(n.local?sx:ix)(n,r,t))}function cx(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function fx(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function dx(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&fx(e,i)),n}return o._value=t,o}function hx(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&cx(e,i)),n}return o._value=t,o}function px(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 r=zs(e);return this.tween(n,(r.local?dx:hx)(r,t))}function gx(e,t){return function(){pu(this,e).delay=+t.apply(this,arguments)}}function mx(e,t){return t=+t,function(){pu(this,e).delay=t}}function yx(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?gx:mx)(t,e)):Et(this.node(),t).delay}function vx(e,t){return function(){Tt(this,e).duration=+t.apply(this,arguments)}}function wx(e,t){return t=+t,function(){Tt(this,e).duration=t}}function xx(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?vx:wx)(t,e)):Et(this.node(),t).duration}function Ex(e,t){if(typeof t!="function")throw new Error;return function(){Tt(this,e).ease=t}}function _x(e){var t=this._id;return arguments.length?this.each(Ex(t,e)):Et(this.node(),t).ease}function Sx(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Tt(this,e).ease=n}}function kx(e){if(typeof e!="function")throw new Error;return this.each(Sx(this._id,e))}function Nx(e){typeof e!="function"&&(e=ih(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,l=r[o]=[],a,u=0;u<s;++u)(a=i[u])&&e.call(a,a.__data__,u,i)&&l.push(a);return new Ft(r,this._parents,this._name,this._id)}function Cx(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,i=Math.min(r,o),s=new Array(r),l=0;l<i;++l)for(var a=t[l],u=n[l],f=a.length,c=s[l]=new Array(f),d,h=0;h<f;++h)(d=a[h]||u[h])&&(c[h]=d);for(;l<r;++l)s[l]=t[l];return new Ft(s,this._parents,this._name,this._id)}function Mx(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 Ix(e,t,n){var r,o,i=Mx(t)?pu:Tt;return function(){var s=i(this,e),l=s.on;l!==r&&(o=(r=l).copy()).on(t,n),s.on=o}}function Px(e,t){var n=this._id;return arguments.length<2?Et(this.node(),n).on.on(e):this.each(Ix(n,e,t))}function Tx(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Lx(){return this.on("end.remove",Tx(this._id))}function bx(e){var t=this._name,n=this._id;typeof e!="function"&&(e=uu(e));for(var r=this._groups,o=r.length,i=new Array(o),s=0;s<o;++s)for(var l=r[s],a=l.length,u=i[s]=new Array(a),f,c,d=0;d<a;++d)(f=l[d])&&(c=e.call(f,f.__data__,d,l))&&("__data__"in f&&(c.__data__=f.__data__),u[d]=c,js(u[d],t,n,d,u,Et(f,n)));return new Ft(i,this._parents,t,n)}function Rx(e){var t=this._name,n=this._id;typeof e!="function"&&(e=oh(e));for(var r=this._groups,o=r.length,i=[],s=[],l=0;l<o;++l)for(var a=r[l],u=a.length,f,c=0;c<u;++c)if(f=a[c]){for(var d=e.call(f,f.__data__,c,a),h,y=Et(f,n),w=0,x=d.length;w<x;++w)(h=d[w])&&js(h,t,n,w,d,y);i.push(d),s.push(f)}return new Ft(i,s,t,n)}var Ax=Bo.prototype.constructor;function zx(){return new Ax(this._groups,this._parents)}function Ox(e,t){var n,r,o;return function(){var i=hr(this,e),s=(this.style.removeProperty(e),hr(this,e));return i===s?null:i===n&&s===r?o:o=t(n=i,r=s)}}function Ph(e){return function(){this.style.removeProperty(e)}}function jx(e,t,n){var r,o=n+"",i;return function(){var s=hr(this,e);return s===o?null:s===r?i:i=t(r=s,n)}}function $x(e,t,n){var r,o,i;return function(){var s=hr(this,e),l=n(this),a=l+"";return l==null&&(a=l=(this.style.removeProperty(e),hr(this,e))),s===a?null:s===r&&a===o?i:(o=a,i=t(r=s,l))}}function Dx(e,t){var n,r,o,i="style."+t,s="end."+i,l;return function(){var a=Tt(this,e),u=a.on,f=a.value[i]==null?l||(l=Ph(t)):void 0;(u!==n||o!==f)&&(r=(n=u).copy()).on(s,o=f),a.on=r}}function Fx(e,t,n){var r=(e+="")=="transform"?Vw:Ih;return t==null?this.styleTween(e,Ox(e,r)).on("end.style."+e,Ph(e)):typeof t=="function"?this.styleTween(e,$x(e,r,gu(this,"style."+e,t))).each(Dx(this._id,e)):this.styleTween(e,jx(e,r,t),n).on("end.style."+e,null)}function Vx(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Hx(e,t,n){var r,o;function i(){var s=t.apply(this,arguments);return s!==o&&(r=(o=s)&&Vx(e,s,n)),r}return i._value=t,i}function Bx(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,Hx(e,t,n??""))}function Ux(e){return function(){this.textContent=e}}function Wx(e){return function(){var t=e(this);this.textContent=t??""}}function Yx(e){return this.tween("text",typeof e=="function"?Wx(gu(this,"text",e)):Ux(e==null?"":e+""))}function Xx(e){return function(t){this.textContent=e.call(this,t)}}function Gx(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&Xx(o)),t}return r._value=e,r}function Qx(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,Gx(e))}function Kx(){for(var e=this._name,t=this._id,n=Th(),r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],l=s.length,a,u=0;u<l;++u)if(a=s[u]){var f=Et(a,t);js(a,e,n,u,s,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Ft(r,this._parents,e,n)}function Zx(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(i,s){var l={value:s},a={value:function(){--o===0&&i()}};n.each(function(){var u=Tt(this,r),f=u.on;f!==e&&(t=(e=f).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(a)),u.on=t}),o===0&&i()})}var qx=0;function Ft(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Th(){return++qx}var bt=Bo.prototype;Ft.prototype={constructor:Ft,select:bx,selectAll:Rx,selectChild:bt.selectChild,selectChildren:bt.selectChildren,filter:Nx,merge:Cx,selection:zx,transition:Kx,call:bt.call,nodes:bt.nodes,node:bt.node,size:bt.size,empty:bt.empty,each:bt.each,on:Px,attr:ux,attrTween:px,style:Fx,styleTween:Bx,text:Yx,textTween:Qx,remove:Lx,tween:nx,delay:yx,duration:xx,ease:_x,easeVarying:kx,end:Zx,[Symbol.iterator]:bt[Symbol.iterator]};function Jx(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var e1={time:null,delay:0,duration:250,ease:Jx};function t1(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 n1(e){var t,n;e instanceof Ft?(t=e._id,e=e._name):(t=Th(),(n=e1).time=hu(),e=e==null?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],l=s.length,a,u=0;u<l;++u)(a=s[u])&&js(a,e,t,u,s,n||t1(a,t));return new Ft(r,this._parents,e,t)}Bo.prototype.interrupt=Jw;Bo.prototype.transition=n1;const ai=e=>()=>e;function r1(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){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:r,enumerable:!0,configurable:!0},_:{value:o}})}function zt(e,t,n){this.k=e,this.x=t,this.y=n}zt.prototype={constructor:zt,scale:function(e){return e===1?this:new zt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new zt(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 $s=new zt(1,0,0);Lh.prototype=zt.prototype;function Lh(e){for(;!e.__zoom;)if(!(e=e.parentNode))return $s;return e.__zoom}function pl(e){e.stopImmediatePropagation()}function Fr(e){e.preventDefault(),e.stopImmediatePropagation()}function o1(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function i1(){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 Uc(){return this.__zoom||$s}function s1(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function l1(){return navigator.maxTouchPoints||"ontouchstart"in this}function a1(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function bh(){var e=o1,t=i1,n=a1,r=s1,o=l1,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,a=zi,u=As("start","zoom","end"),f,c,d,h=500,y=150,w=0,x=10;function m(E){E.property("__zoom",Uc).on("wheel.zoom",b,{passive:!1}).on("mousedown.zoom",H).on("dblclick.zoom",M).filter(o).on("touchstart.zoom",S).on("touchmove.zoom",L).on("touchend.zoom touchcancel.zoom",j).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}m.transform=function(E,z,P,A){var N=E.selection?E.selection():E;N.property("__zoom",Uc),E!==N?_(E,z,P,A):N.interrupt().each(function(){k(this,arguments).event(A).start().zoom(null,typeof z=="function"?z.apply(this,arguments):z).end()})},m.scaleBy=function(E,z,P,A){m.scaleTo(E,function(){var N=this.__zoom.k,T=typeof z=="function"?z.apply(this,arguments):z;return N*T},P,A)},m.scaleTo=function(E,z,P,A){m.transform(E,function(){var N=t.apply(this,arguments),T=this.__zoom,$=P==null?v(N):typeof P=="function"?P.apply(this,arguments):P,O=T.invert($),V=typeof z=="function"?z.apply(this,arguments):z;return n(p(g(T,V),$,O),N,s)},P,A)},m.translateBy=function(E,z,P,A){m.transform(E,function(){return n(this.__zoom.translate(typeof z=="function"?z.apply(this,arguments):z,typeof P=="function"?P.apply(this,arguments):P),t.apply(this,arguments),s)},null,A)},m.translateTo=function(E,z,P,A,N){m.transform(E,function(){var T=t.apply(this,arguments),$=this.__zoom,O=A==null?v(T):typeof A=="function"?A.apply(this,arguments):A;return n($s.translate(O[0],O[1]).scale($.k).translate(typeof z=="function"?-z.apply(this,arguments):-z,typeof P=="function"?-P.apply(this,arguments):-P),T,s)},A,N)};function g(E,z){return z=Math.max(i[0],Math.min(i[1],z)),z===E.k?E:new zt(z,E.x,E.y)}function p(E,z,P){var A=z[0]-P[0]*E.k,N=z[1]-P[1]*E.k;return A===E.x&&N===E.y?E:new zt(E.k,A,N)}function v(E){return[(+E[0][0]+ +E[1][0])/2,(+E[0][1]+ +E[1][1])/2]}function _(E,z,P,A){E.on("start.zoom",function(){k(this,arguments).event(A).start()}).on("interrupt.zoom end.zoom",function(){k(this,arguments).event(A).end()}).tween("zoom",function(){var N=this,T=arguments,$=k(N,T).event(A),O=t.apply(N,T),V=P==null?v(O):typeof P=="function"?P.apply(N,T):P,Y=Math.max(O[1][0]-O[0][0],O[1][1]-O[0][1]),R=N.__zoom,C=typeof z=="function"?z.apply(N,T):z,D=a(R.invert(V).concat(Y/R.k),C.invert(V).concat(Y/C.k));return function(B){if(B===1)B=C;else{var U=D(B),X=Y/U[2];B=new zt(X,V[0]-U[0]*X,V[1]-U[1]*X)}$.zoom(null,B)}})}function k(E,z,P){return!P&&E.__zooming||new I(E,z)}function I(E,z){this.that=E,this.args=z,this.active=0,this.sourceEvent=null,this.extent=t.apply(E,z),this.taps=0}I.prototype={event:function(E){return E&&(this.sourceEvent=E),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(E,z){return this.mouse&&E!=="mouse"&&(this.mouse[1]=z.invert(this.mouse[0])),this.touch0&&E!=="touch"&&(this.touch0[1]=z.invert(this.touch0[0])),this.touch1&&E!=="touch"&&(this.touch1[1]=z.invert(this.touch1[0])),this.that.__zoom=z,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(E){var z=Xe(this.that).datum();u.call(E,this.that,new r1(E,{sourceEvent:this.sourceEvent,target:m,transform:this.that.__zoom,dispatch:u}),z)}};function b(E,...z){if(!e.apply(this,arguments))return;var P=k(this,z).event(E),A=this.__zoom,N=Math.max(i[0],Math.min(i[1],A.k*Math.pow(2,r.apply(this,arguments)))),T=ft(E);if(P.wheel)(P.mouse[0][0]!==T[0]||P.mouse[0][1]!==T[1])&&(P.mouse[1]=A.invert(P.mouse[0]=T)),clearTimeout(P.wheel);else{if(A.k===N)return;P.mouse=[T,A.invert(T)],$i(this),P.start()}Fr(E),P.wheel=setTimeout($,y),P.zoom("mouse",n(p(g(A,N),P.mouse[0],P.mouse[1]),P.extent,s));function $(){P.wheel=null,P.end()}}function H(E,...z){if(d||!e.apply(this,arguments))return;var P=E.currentTarget,A=k(this,z,!0).event(E),N=Xe(E.view).on("mousemove.zoom",V,!0).on("mouseup.zoom",Y,!0),T=ft(E,P),$=E.clientX,O=E.clientY;gh(E.view),pl(E),A.mouse=[T,this.__zoom.invert(T)],$i(this),A.start();function V(R){if(Fr(R),!A.moved){var C=R.clientX-$,D=R.clientY-O;A.moved=C*C+D*D>w}A.event(R).zoom("mouse",n(p(A.that.__zoom,A.mouse[0]=ft(R,P),A.mouse[1]),A.extent,s))}function Y(R){N.on("mousemove.zoom mouseup.zoom",null),mh(R.view,A.moved),Fr(R),A.event(R).end()}}function M(E,...z){if(e.apply(this,arguments)){var P=this.__zoom,A=ft(E.changedTouches?E.changedTouches[0]:E,this),N=P.invert(A),T=P.k*(E.shiftKey?.5:2),$=n(p(g(P,T),A,N),t.apply(this,z),s);Fr(E),l>0?Xe(this).transition().duration(l).call(_,$,A,E):Xe(this).call(m.transform,$,A,E)}}function S(E,...z){if(e.apply(this,arguments)){var P=E.touches,A=P.length,N=k(this,z,E.changedTouches.length===A).event(E),T,$,O,V;for(pl(E),$=0;$<A;++$)O=P[$],V=ft(O,this),V=[V,this.__zoom.invert(V),O.identifier],N.touch0?!N.touch1&&N.touch0[2]!==V[2]&&(N.touch1=V,N.taps=0):(N.touch0=V,T=!0,N.taps=1+!!f);f&&(f=clearTimeout(f)),T&&(N.taps<2&&(c=V[0],f=setTimeout(function(){f=null},h)),$i(this),N.start())}}function L(E,...z){if(this.__zooming){var P=k(this,z).event(E),A=E.changedTouches,N=A.length,T,$,O,V;for(Fr(E),T=0;T<N;++T)$=A[T],O=ft($,this),P.touch0&&P.touch0[2]===$.identifier?P.touch0[0]=O:P.touch1&&P.touch1[2]===$.identifier&&(P.touch1[0]=O);if($=P.that.__zoom,P.touch1){var Y=P.touch0[0],R=P.touch0[1],C=P.touch1[0],D=P.touch1[1],B=(B=C[0]-Y[0])*B+(B=C[1]-Y[1])*B,U=(U=D[0]-R[0])*U+(U=D[1]-R[1])*U;$=g($,Math.sqrt(B/U)),O=[(Y[0]+C[0])/2,(Y[1]+C[1])/2],V=[(R[0]+D[0])/2,(R[1]+D[1])/2]}else if(P.touch0)O=P.touch0[0],V=P.touch0[1];else return;P.zoom("touch",n(p($,O,V),P.extent,s))}}function j(E,...z){if(this.__zooming){var P=k(this,z).event(E),A=E.changedTouches,N=A.length,T,$;for(pl(E),d&&clearTimeout(d),d=setTimeout(function(){d=null},h),T=0;T<N;++T)$=A[T],P.touch0&&P.touch0[2]===$.identifier?delete P.touch0:P.touch1&&P.touch1[2]===$.identifier&&delete P.touch1;if(P.touch1&&!P.touch0&&(P.touch0=P.touch1,delete P.touch1),P.touch0)P.touch0[1]=this.__zoom.invert(P.touch0[0]);else if(P.end(),P.taps===2&&($=ft($,this),Math.hypot(c[0]-$[0],c[1]-$[1])<x)){var O=Xe(this).on("dblclick.zoom");O&&O.apply(this,arguments)}}}return m.wheelDelta=function(E){return arguments.length?(r=typeof E=="function"?E:ai(+E),m):r},m.filter=function(E){return arguments.length?(e=typeof E=="function"?E:ai(!!E),m):e},m.touchable=function(E){return arguments.length?(o=typeof E=="function"?E:ai(!!E),m):o},m.extent=function(E){return arguments.length?(t=typeof E=="function"?E:ai([[+E[0][0],+E[0][1]],[+E[1][0],+E[1][1]]]),m):t},m.scaleExtent=function(E){return arguments.length?(i[0]=+E[0],i[1]=+E[1],m):[i[0],i[1]]},m.translateExtent=function(E){return arguments.length?(s[0][0]=+E[0][0],s[1][0]=+E[1][0],s[0][1]=+E[0][1],s[1][1]=+E[1][1],m):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},m.constrain=function(E){return arguments.length?(n=E,m):n},m.duration=function(E){return arguments.length?(l=+E,m):l},m.interpolate=function(E){return arguments.length?(a=E,m):a},m.on=function(){var E=u.on.apply(u,arguments);return E===u?m:E},m.clickDistance=function(E){return arguments.length?(w=(E=+E)*E,m):Math.sqrt(w)},m.tapDistance=function(E){return arguments.length?(x=+E,m):x},m}const Pt={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:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", 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."},xo=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Rh=["Enter"," ","Escape"],Ah={"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"};var gr;(function(e){e.Strict="strict",e.Loose="loose"})(gr||(gr={}));var Cn;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Cn||(Cn={}));var Eo;(function(e){e.Partial="partial",e.Full="full"})(Eo||(Eo={}));const zh={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var qt;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(qt||(qt={}));var rs;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(rs||(rs={}));var J;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(J||(J={}));const Wc={[J.Left]:J.Right,[J.Right]:J.Left,[J.Top]:J.Bottom,[J.Bottom]:J.Top};function Oh(e){return e===null?null:e?"valid":"invalid"}const jh=e=>"id"in e&&"source"in e&&"target"in e,u1=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),mu=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Wo=(e,t=[0,0])=>{const{width:n,height:r}=Wt(e),o=e.origin??t,i=n*o[0],s=r*o[1];return{x:e.position.x-i,y:e.position.y-s}},c1=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,o)=>{const i=typeof o=="string";let s=!t.nodeLookup&&!i?o:void 0;t.nodeLookup&&(s=i?t.nodeLookup.get(o):mu(o)?o:t.nodeLookup.get(o.id));const l=s?os(s,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Ds(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Fs(n)},Yo=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(o=>{(t.filter===void 0||t.filter(o))&&(n=Ds(n,os(o)),r=!0)}),r?Fs(n):{x:0,y:0,width:0,height:0}},yu=(e,t,[n,r,o]=[0,0,1],i=!1,s=!1)=>{const l={...Go(t,[n,r,o]),width:t.width/o,height:t.height/o},a=[];for(const u of e.values()){const{measured:f,selectable:c=!0,hidden:d=!1}=u;if(s&&!c||d)continue;const h=f.width??u.width??u.initialWidth??null,y=f.height??u.height??u.initialHeight??null,w=_o(l,yr(u)),x=(h??0)*(y??0),m=i&&w>0;(!u.internals.handleBounds||m||w>=x||u.dragging)&&a.push(u)}return a},f1=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function d1(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(o=>o.id)):null;return e.forEach(o=>{o.measured.width&&o.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!o.hidden)&&(!r||r.has(o.id))&&n.set(o.id,o)}),n}async function h1({nodes:e,width:t,height:n,panZoom:r,minZoom:o,maxZoom:i},s){if(e.size===0)return Promise.resolve(!0);const l=d1(e,s),a=Yo(l),u=vu(a,t,n,(s==null?void 0:s.minZoom)??o,(s==null?void 0:s.maxZoom)??i,(s==null?void 0:s.padding)??.1);return await r.setViewport(u,{duration:s==null?void 0:s.duration,ease:s==null?void 0:s.ease,interpolate:s==null?void 0:s.interpolate}),Promise.resolve(!0)}function $h({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:o,onError:i}){const s=n.get(e),l=s.parentId?n.get(s.parentId):void 0,{x:a,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},f=s.origin??r;let c=s.extent||o;if(s.extent==="parent"&&!s.expandParent)if(!l)i==null||i("005",Pt.error005());else{const h=l.measured.width,y=l.measured.height;h&&y&&(c=[[a,u],[a+h,u+y]])}else l&&vr(s.extent)&&(c=[[s.extent[0][0]+a,s.extent[0][1]+u],[s.extent[1][0]+a,s.extent[1][1]+u]]);const d=vr(c)?Ln(t,c,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&(i==null||i("015",Pt.error015())),{position:{x:d.x-a+(s.measured.width??0)*f[0],y:d.y-u+(s.measured.height??0)*f[1]},positionAbsolute:d}}async function p1({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:o}){const i=new Set(e.map(d=>d.id)),s=[];for(const d of n){if(d.deletable===!1)continue;const h=i.has(d.id),y=!h&&d.parentId&&s.find(w=>w.id===d.parentId);(h||y)&&s.push(d)}const l=new Set(t.map(d=>d.id)),a=r.filter(d=>d.deletable!==!1),f=f1(s,a);for(const d of a)l.has(d.id)&&!f.find(y=>y.id===d.id)&&f.push(d);if(!o)return{edges:f,nodes:s};const c=await o({nodes:s,edges:f});return typeof c=="boolean"?c?{edges:f,nodes:s}:{edges:[],nodes:[]}:c}const mr=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Ln=(e={x:0,y:0},t,n)=>({x:mr(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:mr(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function Dh(e,t,n){const{width:r,height:o}=Wt(n),{x:i,y:s}=n.internals.positionAbsolute;return Ln(e,[[i,s],[i+r,s+o]],t)}const Yc=(e,t,n)=>e<t?mr(Math.abs(e-t),1,t)/t:e>n?-mr(Math.abs(e-n),1,t)/t:0,Fh=(e,t,n=15,r=40)=>{const o=Yc(e.x,r,t.width-r)*n,i=Yc(e.y,r,t.height-r)*n;return[o,i]},Ds=(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)}),oa=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Fs=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),yr=(e,t=[0,0])=>{var o,i;const{x:n,y:r}=mu(e)?e.internals.positionAbsolute:Wo(e,t);return{x:n,y:r,width:((o=e.measured)==null?void 0:o.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},os=(e,t=[0,0])=>{var o,i;const{x:n,y:r}=mu(e)?e.internals.positionAbsolute:Wo(e,t);return{x:n,y:r,x2:n+(((o=e.measured)==null?void 0:o.width)??e.width??e.initialWidth??0),y2:r+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},Vh=(e,t)=>Fs(Ds(oa(e),oa(t))),_o=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},Xc=e=>gt(e.width)&>(e.height)&>(e.x)&>(e.y),gt=e=>!isNaN(e)&&isFinite(e),g1=(e,t)=>{},Xo=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Go=({x:e,y:t},[n,r,o],i=!1,s=[1,1])=>{const l={x:(e-n)/o,y:(t-r)/o};return i?Xo(l,s):l},is=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r});function Bn(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const 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 m1(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=Bn(e,n),o=Bn(e,t);return{top:r,right:o,bottom:r,left:o,x:o*2,y:r*2}}if(typeof e=="object"){const r=Bn(e.top??e.y??0,n),o=Bn(e.bottom??e.y??0,n),i=Bn(e.left??e.x??0,t),s=Bn(e.right??e.x??0,t);return{top:r,right:s,bottom:o,left:i,x:i+s,y:r+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function y1(e,t,n,r,o,i){const{x:s,y:l}=is(e,[t,n,r]),{x:a,y:u}=is({x:e.x+e.width,y:e.y+e.height},[t,n,r]),f=o-a,c=i-u;return{left:Math.floor(s),top:Math.floor(l),right:Math.floor(f),bottom:Math.floor(c)}}const vu=(e,t,n,r,o,i)=>{const s=m1(i,t,n),l=(t-s.x)/e.width,a=(n-s.y)/e.height,u=Math.min(l,a),f=mr(u,r,o),c=e.x+e.width/2,d=e.y+e.height/2,h=t/2-c*f,y=n/2-d*f,w=y1(e,h,y,f,t,n),x={left:Math.min(w.left-s.left,0),top:Math.min(w.top-s.top,0),right:Math.min(w.right-s.right,0),bottom:Math.min(w.bottom-s.bottom,0)};return{x:h-x.left+x.right,y:y-x.top+x.bottom,zoom:f}},So=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function vr(e){return e!=null&&e!=="parent"}function Wt(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function Hh(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function Bh(e,t={width:0,height:0},n,r,o){const i={...e},s=r.get(n);if(s){const l=s.origin||o;i.x+=s.internals.positionAbsolute.x-(t.width??0)*l[0],i.y+=s.internals.positionAbsolute.y-(t.height??0)*l[1]}return i}function Gc(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function v1(){let e,t;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}function w1(e){return{...Ah,...e||{}}}function oo(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:o}){const{x:i,y:s}=mt(e),l=Go({x:i-((o==null?void 0:o.left)??0),y:s-((o==null?void 0:o.top)??0)},r),{x:a,y:u}=n?Xo(l,t):l;return{xSnapped:a,ySnapped:u,...l}}const wu=e=>({width:e.offsetWidth,height:e.offsetHeight}),Uh=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},x1=["INPUT","SELECT","TEXTAREA"];function Wh(e){var r,o;const t=((o=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:o[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:x1.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Yh=e=>"clientX"in e,mt=(e,t)=>{var i,s;const n=Yh(e),r=n?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,o=n?e.clientY:(s=e.touches)==null?void 0:s[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:o-((t==null?void 0:t.top)??0)}},Qc=(e,t,n,r,o)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(s=>{const l=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:o,position:s.getAttribute("data-handlepos"),x:(l.left-n.left)/r,y:(l.top-n.top)/r,...wu(s)}})};function Xh({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:i,targetControlX:s,targetControlY:l}){const a=e*.125+o*.375+s*.375+n*.125,u=t*.125+i*.375+l*.375+r*.125,f=Math.abs(a-e),c=Math.abs(u-t);return[a,u,f,c]}function ui(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Kc({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case J.Left:return[t-ui(t-r,i),n];case J.Right:return[t+ui(r-t,i),n];case J.Top:return[t,n-ui(n-o,i)];case J.Bottom:return[t,n+ui(o-n,i)]}}function Gh({sourceX:e,sourceY:t,sourcePosition:n=J.Bottom,targetX:r,targetY:o,targetPosition:i=J.Top,curvature:s=.25}){const[l,a]=Kc({pos:n,x1:e,y1:t,x2:r,y2:o,c:s}),[u,f]=Kc({pos:i,x1:r,y1:o,x2:e,y2:t,c:s}),[c,d,h,y]=Xh({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:l,sourceControlY:a,targetControlX:u,targetControlY:f});return[`M${e},${t} C${l},${a} ${u},${f} ${r},${o}`,c,d,h,y]}function Qh({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,i=n<e?n+o:n-o,s=Math.abs(r-t)/2,l=r<t?r+s:r-s;return[i,l,o,s]}function E1({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:o=!1,zIndexMode:i="basic"}){if(i==="manual")return r;const s=o&&n?r+1e3:r,l=Math.max(e.parentId||o&&e.selected?e.internals.z:0,t.parentId||o&&t.selected?t.internals.z:0);return s+l}function _1({sourceNode:e,targetNode:t,width:n,height:r,transform:o}){const i=Ds(os(e),os(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const s={x:-o[0]/o[2],y:-o[1]/o[2],width:n/o[2],height:r/o[2]};return _o(s,Fs(i))>0}const S1=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,k1=(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)),N1=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||S1;let o;return jh(e)?o={...e}:o={...e,id:r(e)},k1(o,t)?t:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,t.concat(o))};function Kh({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,i,s,l]=Qh({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,s,l]}const Zc={[J.Left]:{x:-1,y:0},[J.Right]:{x:1,y:0},[J.Top]:{x:0,y:-1},[J.Bottom]:{x:0,y:1}},C1=({source:e,sourcePosition:t=J.Bottom,target:n})=>t===J.Left||t===J.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},qc=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function M1({source:e,sourcePosition:t=J.Bottom,target:n,targetPosition:r=J.Top,center:o,offset:i,stepPosition:s}){const l=Zc[t],a=Zc[r],u={x:e.x+l.x*i,y:e.y+l.y*i},f={x:n.x+a.x*i,y:n.y+a.y*i},c=C1({source:u,sourcePosition:t,target:f}),d=c.x!==0?"x":"y",h=c[d];let y=[],w,x;const m={x:0,y:0},g={x:0,y:0},[,,p,v]=Qh({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[d]*a[d]===-1){d==="x"?(w=o.x??u.x+(f.x-u.x)*s,x=o.y??(u.y+f.y)/2):(w=o.x??(u.x+f.x)/2,x=o.y??u.y+(f.y-u.y)*s);const b=[{x:w,y:u.y},{x:w,y:f.y}],H=[{x:u.x,y:x},{x:f.x,y:x}];l[d]===h?y=d==="x"?b:H:y=d==="x"?H:b}else{const b=[{x:u.x,y:f.y}],H=[{x:f.x,y:u.y}];if(d==="x"?y=l.x===h?H:b:y=l.y===h?b:H,t===r){const E=Math.abs(e[d]-n[d]);if(E<=i){const z=Math.min(i-1,i-E);l[d]===h?m[d]=(u[d]>e[d]?-1:1)*z:g[d]=(f[d]>n[d]?-1:1)*z}}if(t!==r){const E=d==="x"?"y":"x",z=l[d]===a[E],P=u[E]>f[E],A=u[E]<f[E];(l[d]===1&&(!z&&P||z&&A)||l[d]!==1&&(!z&&A||z&&P))&&(y=d==="x"?b:H)}const M={x:u.x+m.x,y:u.y+m.y},S={x:f.x+g.x,y:f.y+g.y},L=Math.max(Math.abs(M.x-y[0].x),Math.abs(S.x-y[0].x)),j=Math.max(Math.abs(M.y-y[0].y),Math.abs(S.y-y[0].y));L>=j?(w=(M.x+S.x)/2,x=y[0].y):(w=y[0].x,x=(M.y+S.y)/2)}const _={x:u.x+m.x,y:u.y+m.y},k={x:f.x+g.x,y:f.y+g.y};return[[e,..._.x!==y[0].x||_.y!==y[0].y?[_]:[],...y,...k.x!==y[y.length-1].x||k.y!==y[y.length-1].y?[k]:[],n],w,x,p,v]}function I1(e,t,n,r){const o=Math.min(qc(e,t)/2,qc(t,n)/2,r),{x:i,y:s}=t;if(e.x===i&&i===n.x||e.y===s&&s===n.y)return`L${i} ${s}`;if(e.y===s){const u=e.x<n.x?-1:1,f=e.y<n.y?1:-1;return`L ${i+o*u},${s}Q ${i},${s} ${i},${s+o*f}`}const l=e.x<n.x?1:-1,a=e.y<n.y?-1:1;return`L ${i},${s+o*a}Q ${i},${s} ${i+o*l},${s}`}function ss({sourceX:e,sourceY:t,sourcePosition:n=J.Bottom,targetX:r,targetY:o,targetPosition:i=J.Top,borderRadius:s=5,centerX:l,centerY:a,offset:u=20,stepPosition:f=.5}){const[c,d,h,y,w]=M1({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:i,center:{x:l,y:a},offset:u,stepPosition:f});let x=`M${c[0].x} ${c[0].y}`;for(let m=1;m<c.length-1;m++)x+=I1(c[m-1],c[m],c[m+1],s);return x+=`L${c[c.length-1].x} ${c[c.length-1].y}`,[x,d,h,y,w]}function Jc(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function P1(e){var c;const{sourceNode:t,targetNode:n}=e;if(!Jc(t)||!Jc(n))return null;const r=t.internals.handleBounds||ef(t.handles),o=n.internals.handleBounds||ef(n.handles),i=tf((r==null?void 0:r.source)??[],e.sourceHandle),s=tf(e.connectionMode===gr.Strict?(o==null?void 0:o.target)??[]:((o==null?void 0:o.target)??[]).concat((o==null?void 0:o.source)??[]),e.targetHandle);if(!i||!s)return(c=e.onError)==null||c.call(e,"008",Pt.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(i==null?void 0:i.position)||J.Bottom,a=(s==null?void 0:s.position)||J.Top,u=bn(t,i,l),f=bn(n,s,a);return{sourceX:u.x,sourceY:u.y,targetX:f.x,targetY:f.y,sourcePosition:l,targetPosition:a}}function ef(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function bn(e,t,n=J.Left,r=!1){const o=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,i=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:s,height:l}=t??Wt(e);if(r)return{x:o+s/2,y:i+l/2};switch((t==null?void 0:t.position)??n){case J.Top:return{x:o+s/2,y:i};case J.Right:return{x:o+s,y:i+l/2};case J.Bottom:return{x:o+s/2,y:i+l};case J.Left:return{x:o,y:i+l/2}}}function tf(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function ia(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function T1(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:o}){const i=new Set;return e.reduce((s,l)=>([l.markerStart||r,l.markerEnd||o].forEach(a=>{if(a&&typeof a=="object"){const u=ia(a,t);i.has(u)||(s.push({id:u,color:a.color||n,...a}),i.add(u))}}),s),[]).sort((s,l)=>s.id.localeCompare(l.id))}const Zh=1e3,L1=10,xu={nodeOrigin:[0,0],nodeExtent:xo,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},b1={...xu,checkEquality:!0};function Eu(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function R1(e,t,n){const r=Eu(xu,n);for(const o of e.values())if(o.parentId)Su(o,e,t,r);else{const i=Wo(o,r.nodeOrigin),s=vr(o.extent)?o.extent:r.nodeExtent,l=Ln(i,s,Wt(o));o.internals.positionAbsolute=l}}function A1(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const o of e.handles){const i={id:o.id,width:o.width??1,height:o.height??1,nodeId:e.id,x:o.x,y:o.y,position:o.position,type:o.type};o.type==="source"?n.push(i):o.type==="target"&&r.push(i)}return{source:n,target:r}}function _u(e){return e==="manual"}function sa(e,t,n,r={}){var f,c;const o=Eu(b1,r),i={i:0},s=new Map(t),l=o!=null&&o.elevateNodesOnSelect&&!_u(o.zIndexMode)?Zh:0;let a=e.length>0,u=!1;t.clear(),n.clear();for(const d of e){let h=s.get(d.id);if(o.checkEquality&&d===(h==null?void 0:h.internals.userNode))t.set(d.id,h);else{const y=Wo(d,o.nodeOrigin),w=vr(d.extent)?d.extent:o.nodeExtent,x=Ln(y,w,Wt(d));h={...o.defaults,...d,measured:{width:(f=d.measured)==null?void 0:f.width,height:(c=d.measured)==null?void 0:c.height},internals:{positionAbsolute:x,handleBounds:A1(d,h),z:qh(d,l,o.zIndexMode),userNode:d}},t.set(d.id,h)}(h.measured===void 0||h.measured.width===void 0||h.measured.height===void 0)&&!h.hidden&&(a=!1),d.parentId&&Su(h,t,n,r,i),u||(u=d.selected??!1)}return{nodesInitialized:a,hasSelectedNodes:u}}function z1(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Su(e,t,n,r,o){const{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:l,zIndexMode:a}=Eu(xu,r),u=e.parentId,f=t.get(u);if(!f){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}z1(e,n),o&&!f.parentId&&f.internals.rootParentIndex===void 0&&a==="auto"&&(f.internals.rootParentIndex=++o.i,f.internals.z=f.internals.z+o.i*L1),o&&f.internals.rootParentIndex!==void 0&&(o.i=f.internals.rootParentIndex);const c=i&&!_u(a)?Zh:0,{x:d,y:h,z:y}=O1(e,f,s,l,c,a),{positionAbsolute:w}=e.internals,x=d!==w.x||h!==w.y;(x||y!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:x?{x:d,y:h}:w,z:y}})}function qh(e,t,n){const r=gt(e.zIndex)?e.zIndex:0;return _u(n)?r:r+(e.selected?t:0)}function O1(e,t,n,r,o,i){const{x:s,y:l}=t.internals.positionAbsolute,a=Wt(e),u=Wo(e,n),f=vr(e.extent)?Ln(u,e.extent,a):u;let c=Ln({x:s+f.x,y:l+f.y},r,a);e.extent==="parent"&&(c=Dh(c,a,t));const d=qh(e,o,i),h=t.internals.z??0;return{x:c.x,y:c.y,z:h>=d?h+1:d}}function ku(e,t,n,r=[0,0]){var s;const o=[],i=new Map;for(const l of e){const a=t.get(l.parentId);if(!a)continue;const u=((s=i.get(l.parentId))==null?void 0:s.expandedRect)??yr(a),f=Vh(u,l.rect);i.set(l.parentId,{expandedRect:f,parent:a})}return i.size>0&&i.forEach(({expandedRect:l,parent:a},u)=>{var p;const f=a.internals.positionAbsolute,c=Wt(a),d=a.origin??r,h=l.x<f.x?Math.round(Math.abs(f.x-l.x)):0,y=l.y<f.y?Math.round(Math.abs(f.y-l.y)):0,w=Math.max(c.width,Math.round(l.width)),x=Math.max(c.height,Math.round(l.height)),m=(w-c.width)*d[0],g=(x-c.height)*d[1];(h>0||y>0||m||g)&&(o.push({id:u,type:"position",position:{x:a.position.x-h+m,y:a.position.y-y+g}}),(p=n.get(u))==null||p.forEach(v=>{e.some(_=>_.id===v.id)||o.push({id:v.id,type:"position",position:{x:v.position.x+h,y:v.position.y+y}})})),(c.width<l.width||c.height<l.height||h||y)&&o.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:w+(h?d[0]*h-m:0),height:x+(y?d[1]*y-g:0)}})}),o}function j1(e,t,n,r,o,i,s){const l=r==null?void 0:r.querySelector(".xyflow__viewport");let a=!1;if(!l)return{changes:[],updatedInternals:a};const u=[],f=window.getComputedStyle(l),{m22:c}=new window.DOMMatrixReadOnly(f.transform),d=[];for(const h of e.values()){const y=t.get(h.id);if(!y)continue;if(y.hidden){t.set(y.id,{...y,internals:{...y.internals,handleBounds:void 0}}),a=!0;continue}const w=wu(h.nodeElement),x=y.measured.width!==w.width||y.measured.height!==w.height;if(!!(w.width&&w.height&&(x||!y.internals.handleBounds||h.force))){const g=h.nodeElement.getBoundingClientRect(),p=vr(y.extent)?y.extent:i;let{positionAbsolute:v}=y.internals;y.parentId&&y.extent==="parent"?v=Dh(v,w,t.get(y.parentId)):p&&(v=Ln(v,p,w));const _={...y,measured:w,internals:{...y.internals,positionAbsolute:v,handleBounds:{source:Qc("source",h.nodeElement,g,c,y.id),target:Qc("target",h.nodeElement,g,c,y.id)}}};t.set(y.id,_),y.parentId&&Su(_,t,n,{nodeOrigin:o,zIndexMode:s}),a=!0,x&&(u.push({id:y.id,type:"dimensions",dimensions:w}),y.expandParent&&y.parentId&&d.push({id:y.id,parentId:y.parentId,rect:yr(_,o)}))}}if(d.length>0){const h=ku(d,t,n,o);u.push(...h)}return{changes:u,updatedInternals:a}}async function $1({delta:e,panZoom:t,transform:n,translateExtent:r,width:o,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[o,i]],r),l=!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2]);return Promise.resolve(l)}function nf(e,t,n,r,o,i){let s=o;const l=r.get(s)||new Map;r.set(s,l.set(n,t)),s=`${o}-${e}`;const a=r.get(s)||new Map;if(r.set(s,a.set(n,t)),i){s=`${o}-${e}-${i}`;const u=r.get(s)||new Map;r.set(s,u.set(n,t))}}function Jh(e,t,n){e.clear(),t.clear();for(const r of n){const{source:o,target:i,sourceHandle:s=null,targetHandle:l=null}=r,a={edgeId:r.id,source:o,target:i,sourceHandle:s,targetHandle:l},u=`${o}-${s}--${i}-${l}`,f=`${i}-${l}--${o}-${s}`;nf("source",a,f,e,o,s),nf("target",a,u,e,i,l),t.set(r.id,r)}}function ep(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:ep(n,t):!1}function rf(e,t,n){var o;let r=e;do{if((o=r==null?void 0:r.matches)!=null&&o.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function D1(e,t,n,r){const o=new Map;for(const[i,s]of e)if((s.selected||s.id===r)&&(!s.parentId||!ep(s,e))&&(s.draggable||t&&typeof s.draggable>"u")){const l=e.get(i);l&&o.set(i,{id:i,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return o}function gl({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var s,l,a;const o=[];for(const[u,f]of t){const c=(s=n.get(u))==null?void 0:s.internals.userNode;c&&o.push({...c,position:f.position,dragging:r})}if(!e)return[o[0],o];const i=(l=n.get(e))==null?void 0:l.internals.userNode;return[i?{...i,position:((a=t.get(e))==null?void 0:a.position)||i.position,dragging:r}:o[0],o]}function F1({dragItems:e,snapGrid:t,x:n,y:r}){const o=e.values().next().value;if(!o)return null;const i={x:n-o.distance.x,y:r-o.distance.y},s=Xo(i,t);return{x:s.x-i.x,y:s.y-i.y}}function V1({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:o}){let i={x:null,y:null},s=0,l=new Map,a=!1,u={x:0,y:0},f=null,c=!1,d=null,h=!1,y=!1,w=null;function x({noDragClassName:g,handleSelector:p,domNode:v,isSelectable:_,nodeId:k,nodeClickDistance:I=0}){d=Xe(v);function b({x:L,y:j}){const{nodeLookup:E,nodeExtent:z,snapGrid:P,snapToGrid:A,nodeOrigin:N,onNodeDrag:T,onSelectionDrag:$,onError:O,updateNodePositions:V}=t();i={x:L,y:j};let Y=!1;const R=l.size>1,C=R&&z?oa(Yo(l)):null,D=R&&A?F1({dragItems:l,snapGrid:P,x:L,y:j}):null;for(const[B,U]of l){if(!E.has(B))continue;let X={x:L-U.distance.x,y:j-U.distance.y};A&&(X=D?{x:Math.round(X.x+D.x),y:Math.round(X.y+D.y)}:Xo(X,P));let G=null;if(R&&z&&!U.extent&&C){const{positionAbsolute:ee}=U.internals,te=ee.x-C.x+z[0][0],ne=ee.x+U.measured.width-C.x2+z[1][0],re=ee.y-C.y+z[0][1],ke=ee.y+U.measured.height-C.y2+z[1][1];G=[[te,re],[ne,ke]]}const{position:Q,positionAbsolute:Z}=$h({nodeId:B,nextPosition:X,nodeLookup:E,nodeExtent:G||z,nodeOrigin:N,onError:O});Y=Y||U.position.x!==Q.x||U.position.y!==Q.y,U.position=Q,U.internals.positionAbsolute=Z}if(y=y||Y,!!Y&&(V(l,!0),w&&(r||T||!k&&$))){const[B,U]=gl({nodeId:k,dragItems:l,nodeLookup:E});r==null||r(w,l,B,U),T==null||T(w,B,U),k||$==null||$(w,U)}}async function H(){if(!f)return;const{transform:L,panBy:j,autoPanSpeed:E,autoPanOnNodeDrag:z}=t();if(!z){a=!1,cancelAnimationFrame(s);return}const[P,A]=Fh(u,f,E);(P!==0||A!==0)&&(i.x=(i.x??0)-P/L[2],i.y=(i.y??0)-A/L[2],await j({x:P,y:A})&&b(i)),s=requestAnimationFrame(H)}function M(L){var R;const{nodeLookup:j,multiSelectionActive:E,nodesDraggable:z,transform:P,snapGrid:A,snapToGrid:N,selectNodesOnDrag:T,onNodeDragStart:$,onSelectionDragStart:O,unselectNodesAndEdges:V}=t();c=!0,(!T||!_)&&!E&&k&&((R=j.get(k))!=null&&R.selected||V()),_&&T&&k&&(e==null||e(k));const Y=oo(L.sourceEvent,{transform:P,snapGrid:A,snapToGrid:N,containerBounds:f});if(i=Y,l=D1(j,z,Y,k),l.size>0&&(n||$||!k&&O)){const[C,D]=gl({nodeId:k,dragItems:l,nodeLookup:j});n==null||n(L.sourceEvent,l,C,D),$==null||$(L.sourceEvent,C,D),k||O==null||O(L.sourceEvent,D)}}const S=yh().clickDistance(I).on("start",L=>{const{domNode:j,nodeDragThreshold:E,transform:z,snapGrid:P,snapToGrid:A}=t();f=(j==null?void 0:j.getBoundingClientRect())||null,h=!1,y=!1,w=L.sourceEvent,E===0&&M(L),i=oo(L.sourceEvent,{transform:z,snapGrid:P,snapToGrid:A,containerBounds:f}),u=mt(L.sourceEvent,f)}).on("drag",L=>{const{autoPanOnNodeDrag:j,transform:E,snapGrid:z,snapToGrid:P,nodeDragThreshold:A,nodeLookup:N}=t(),T=oo(L.sourceEvent,{transform:E,snapGrid:z,snapToGrid:P,containerBounds:f});if(w=L.sourceEvent,(L.sourceEvent.type==="touchmove"&&L.sourceEvent.touches.length>1||k&&!N.has(k))&&(h=!0),!h){if(!a&&j&&c&&(a=!0,H()),!c){const $=mt(L.sourceEvent,f),O=$.x-u.x,V=$.y-u.y;Math.sqrt(O*O+V*V)>A&&M(L)}(i.x!==T.xSnapped||i.y!==T.ySnapped)&&l&&c&&(u=mt(L.sourceEvent,f),b(T))}}).on("end",L=>{if(!(!c||h)&&(a=!1,c=!1,cancelAnimationFrame(s),l.size>0)){const{nodeLookup:j,updateNodePositions:E,onNodeDragStop:z,onSelectionDragStop:P}=t();if(y&&(E(l,!1),y=!1),o||z||!k&&P){const[A,N]=gl({nodeId:k,dragItems:l,nodeLookup:j,dragging:!1});o==null||o(L.sourceEvent,l,A,N),z==null||z(L.sourceEvent,A,N),k||P==null||P(L.sourceEvent,N)}}}).filter(L=>{const j=L.target;return!L.button&&(!g||!rf(j,`.${g}`,v))&&(!p||rf(j,p,v))});d.call(S)}function m(){d==null||d.on(".drag",null)}return{update:x,destroy:m}}function H1(e,t,n){const r=[],o={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())_o(o,yr(i))>0&&r.push(i);return r}const B1=250;function U1(e,t,n,r){var l,a;let o=[],i=1/0;const s=H1(e,n,t+B1);for(const u of s){const f=[...((l=u.internals.handleBounds)==null?void 0:l.source)??[],...((a=u.internals.handleBounds)==null?void 0:a.target)??[]];for(const c of f){if(r.nodeId===c.nodeId&&r.type===c.type&&r.id===c.id)continue;const{x:d,y:h}=bn(u,c,c.position,!0),y=Math.sqrt(Math.pow(d-e.x,2)+Math.pow(h-e.y,2));y>t||(y<i?(o=[{...c,x:d,y:h}],i=y):y===i&&o.push({...c,x:d,y:h}))}}if(!o.length)return null;if(o.length>1){const u=r.type==="source"?"target":"source";return o.find(f=>f.type===u)??o[0]}return o[0]}function tp(e,t,n,r,o,i=!1){var u,f,c;const s=r.get(e);if(!s)return null;const l=o==="strict"?(u=s.internals.handleBounds)==null?void 0:u[t]:[...((f=s.internals.handleBounds)==null?void 0:f.source)??[],...((c=s.internals.handleBounds)==null?void 0:c.target)??[]],a=(n?l==null?void 0:l.find(d=>d.id===n):l==null?void 0:l[0])??null;return a&&i?{...a,...bn(s,a,a.position,!0)}:a}function np(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function W1(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const rp=()=>!0;function Y1(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:o,edgeUpdaterType:i,isTarget:s,domNode:l,nodeLookup:a,lib:u,autoPanOnConnect:f,flowId:c,panBy:d,cancelConnection:h,onConnectStart:y,onConnect:w,onConnectEnd:x,isValidConnection:m=rp,onReconnectEnd:g,updateConnection:p,getTransform:v,getFromHandle:_,autoPanSpeed:k,dragThreshold:I=1,handleDomNode:b}){const H=Uh(e.target);let M=0,S;const{x:L,y:j}=mt(e),E=np(i,b),z=l==null?void 0:l.getBoundingClientRect();let P=!1;if(!z||!E)return;const A=tp(o,E,r,a,t);if(!A)return;let N=mt(e,z),T=!1,$=null,O=!1,V=null;function Y(){if(!f||!z)return;const[Q,Z]=Fh(N,z,k);d({x:Q,y:Z}),M=requestAnimationFrame(Y)}const R={...A,nodeId:o,type:E,position:A.position},C=a.get(o);let B={inProgress:!0,isValid:null,from:bn(C,R,J.Left,!0),fromHandle:R,fromPosition:R.position,fromNode:C,to:N,toHandle:null,toPosition:Wc[R.position],toNode:null,pointer:N};function U(){P=!0,p(B),y==null||y(e,{nodeId:o,handleId:r,handleType:E})}I===0&&U();function X(Q){if(!P){const{x:ke,y:lt}=mt(Q),Lt=ke-L,yn=lt-j;if(!(Lt*Lt+yn*yn>I*I))return;U()}if(!_()||!R){G(Q);return}const Z=v();N=mt(Q,z),S=U1(Go(N,Z,!1,[1,1]),n,a,R),T||(Y(),T=!0);const ee=op(Q,{handle:S,connectionMode:t,fromNodeId:o,fromHandleId:r,fromType:s?"target":"source",isValidConnection:m,doc:H,lib:u,flowId:c,nodeLookup:a});V=ee.handleDomNode,$=ee.connection,O=W1(!!S,ee.isValid);const te=a.get(o),ne=te?bn(te,R,J.Left,!0):B.from,re={...B,from:ne,isValid:O,to:ee.toHandle&&O?is({x:ee.toHandle.x,y:ee.toHandle.y},Z):N,toHandle:ee.toHandle,toPosition:O&&ee.toHandle?ee.toHandle.position:Wc[R.position],toNode:ee.toHandle?a.get(ee.toHandle.nodeId):null,pointer:N};p(re),B=re}function G(Q){if(!("touches"in Q&&Q.touches.length>0)){if(P){(S||V)&&$&&O&&(w==null||w($));const{inProgress:Z,...ee}=B,te={...ee,toPosition:B.toHandle?B.toPosition:null};x==null||x(Q,te),i&&(g==null||g(Q,te))}h(),cancelAnimationFrame(M),T=!1,O=!1,$=null,V=null,H.removeEventListener("mousemove",X),H.removeEventListener("mouseup",G),H.removeEventListener("touchmove",X),H.removeEventListener("touchend",G)}}H.addEventListener("mousemove",X),H.addEventListener("mouseup",G),H.addEventListener("touchmove",X),H.addEventListener("touchend",G)}function op(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:o,fromType:i,doc:s,lib:l,flowId:a,isValidConnection:u=rp,nodeLookup:f}){const c=i==="target",d=t?s.querySelector(`.${l}-flow__handle[data-id="${a}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:h,y}=mt(e),w=s.elementFromPoint(h,y),x=w!=null&&w.classList.contains(`${l}-flow__handle`)?w:d,m={handleDomNode:x,isValid:!1,connection:null,toHandle:null};if(x){const g=np(void 0,x),p=x.getAttribute("data-nodeid"),v=x.getAttribute("data-handleid"),_=x.classList.contains("connectable"),k=x.classList.contains("connectableend");if(!p||!g)return m;const I={source:c?p:r,sourceHandle:c?v:o,target:c?r:p,targetHandle:c?o:v};m.connection=I;const H=_&&k&&(n===gr.Strict?c&&g==="source"||!c&&g==="target":p!==r||v!==o);m.isValid=H&&u(I),m.toHandle=tp(p,g,v,f,n,!0)}return m}const la={onPointerDown:Y1,isValid:op};function X1({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const o=Xe(e);function i({translateExtent:l,width:a,height:u,zoomStep:f=1,pannable:c=!0,zoomable:d=!0,inversePan:h=!1}){const y=p=>{if(p.sourceEvent.type!=="wheel"||!t)return;const v=n(),_=p.sourceEvent.ctrlKey&&So()?10:1,k=-p.sourceEvent.deltaY*(p.sourceEvent.deltaMode===1?.05:p.sourceEvent.deltaMode?1:.002)*f,I=v[2]*Math.pow(2,k*_);t.scaleTo(I)};let w=[0,0];const x=p=>{(p.sourceEvent.type==="mousedown"||p.sourceEvent.type==="touchstart")&&(w=[p.sourceEvent.clientX??p.sourceEvent.touches[0].clientX,p.sourceEvent.clientY??p.sourceEvent.touches[0].clientY])},m=p=>{const v=n();if(p.sourceEvent.type!=="mousemove"&&p.sourceEvent.type!=="touchmove"||!t)return;const _=[p.sourceEvent.clientX??p.sourceEvent.touches[0].clientX,p.sourceEvent.clientY??p.sourceEvent.touches[0].clientY],k=[_[0]-w[0],_[1]-w[1]];w=_;const I=r()*Math.max(v[2],Math.log(v[2]))*(h?-1:1),b={x:v[0]-k[0]*I,y:v[1]-k[1]*I},H=[[0,0],[a,u]];t.setViewportConstrained({x:b.x,y:b.y,zoom:v[2]},H,l)},g=bh().on("start",x).on("zoom",c?m:null).on("zoom.wheel",d?y:null);o.call(g,{})}function s(){o.on("zoom",null)}return{update:i,destroy:s,pointer:ft}}const Vs=e=>({x:e.x,y:e.y,zoom:e.k}),ml=({x:e,y:t,zoom:n})=>$s.translate(e,t).scale(n),Wn=(e,t)=>e.target.closest(`.${t}`),ip=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),G1=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,yl=(e,t=0,n=G1,r=()=>{})=>{const o=typeof t=="number"&&t>0;return o||r(),o?e.transition().duration(t).ease(n).on("end",r):e},sp=e=>{const t=e.ctrlKey&&So()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function Q1({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:o,panOnScrollSpeed:i,zoomOnPinch:s,onPanZoomStart:l,onPanZoom:a,onPanZoomEnd:u}){return f=>{if(Wn(f,t))return f.ctrlKey&&f.preventDefault(),!1;f.preventDefault(),f.stopImmediatePropagation();const c=n.property("__zoom").k||1;if(f.ctrlKey&&s){const x=ft(f),m=sp(f),g=c*Math.pow(2,m);r.scaleTo(n,g,x,f);return}const d=f.deltaMode===1?20:1;let h=o===Cn.Vertical?0:f.deltaX*d,y=o===Cn.Horizontal?0:f.deltaY*d;!So()&&f.shiftKey&&o!==Cn.Vertical&&(h=f.deltaY*d,y=0),r.translateBy(n,-(h/c)*i,-(y/c)*i,{internal:!0});const w=Vs(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(a==null||a(f,w),e.panScrollTimeout=setTimeout(()=>{u==null||u(f,w),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(f,w))}}function K1({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,o){const i=r.type==="wheel",s=!t&&i&&!r.ctrlKey,l=Wn(r,e);if(r.ctrlKey&&i&&l&&r.preventDefault(),s||l)return null;r.preventDefault(),n.call(this,r,o)}}function Z1({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var i,s,l;if((i=r.sourceEvent)!=null&&i.internal)return;const o=Vs(r.transform);e.mouseButton=((s=r.sourceEvent)==null?void 0:s.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=o,((l=r.sourceEvent)==null?void 0:l.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,o))}}function q1({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:o}){return i=>{var s,l;e.usedRightMouseButton=!!(n&&ip(t,e.mouseButton??0)),(s=i.sourceEvent)!=null&&s.sync||r([i.transform.x,i.transform.y,i.transform.k]),o&&!((l=i.sourceEvent)!=null&&l.internal)&&(o==null||o(i.sourceEvent,Vs(i.transform)))}}function J1({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:o,onPaneContextMenu:i}){return s=>{var l;if(!((l=s.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,i&&ip(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&i(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),o)){const a=Vs(s.transform);e.prevViewport=a,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o==null||o(s.sourceEvent,a)},n?150:0)}}}function eE({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:o,zoomOnDoubleClick:i,userSelectionActive:s,noWheelClassName:l,noPanClassName:a,lib:u,connectionInProgress:f}){return c=>{var x;const d=e||t,h=n&&c.ctrlKey,y=c.type==="wheel";if(c.button===1&&c.type==="mousedown"&&(Wn(c,`${u}-flow__node`)||Wn(c,`${u}-flow__edge`)))return!0;if(!r&&!d&&!o&&!i&&!n||s||f&&!y||Wn(c,l)&&y||Wn(c,a)&&(!y||o&&y&&!e)||!n&&c.ctrlKey&&y)return!1;if(!n&&c.type==="touchstart"&&((x=c.touches)==null?void 0:x.length)>1)return c.preventDefault(),!1;if(!d&&!o&&!h&&y||!r&&(c.type==="mousedown"||c.type==="touchstart")||Array.isArray(r)&&!r.includes(c.button)&&c.type==="mousedown")return!1;const w=Array.isArray(r)&&r.includes(c.button)||!c.button||c.button<=1;return(!c.ctrlKey||y)&&w}}function tE({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:o,onPanZoom:i,onPanZoomStart:s,onPanZoomEnd:l,onDraggingChange:a}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},f=e.getBoundingClientRect(),c=bh().scaleExtent([t,n]).translateExtent(r),d=Xe(e).call(c);g({x:o.x,y:o.y,zoom:mr(o.zoom,t,n)},[[0,0],[f.width,f.height]],r);const h=d.on("wheel.zoom"),y=d.on("dblclick.zoom");c.wheelDelta(sp);function w(S,L){return d?new Promise(j=>{c==null||c.interpolate((L==null?void 0:L.interpolate)==="linear"?ro:zi).transform(yl(d,L==null?void 0:L.duration,L==null?void 0:L.ease,()=>j(!0)),S)}):Promise.resolve(!1)}function x({noWheelClassName:S,noPanClassName:L,onPaneContextMenu:j,userSelectionActive:E,panOnScroll:z,panOnDrag:P,panOnScrollMode:A,panOnScrollSpeed:N,preventScrolling:T,zoomOnPinch:$,zoomOnScroll:O,zoomOnDoubleClick:V,zoomActivationKeyPressed:Y,lib:R,onTransformChange:C,connectionInProgress:D,paneClickDistance:B,selectionOnDrag:U}){E&&!u.isZoomingOrPanning&&m();const X=z&&!Y&&!E;c.clickDistance(U?1/0:!gt(B)||B<0?0:B);const G=X?Q1({zoomPanValues:u,noWheelClassName:S,d3Selection:d,d3Zoom:c,panOnScrollMode:A,panOnScrollSpeed:N,zoomOnPinch:$,onPanZoomStart:s,onPanZoom:i,onPanZoomEnd:l}):K1({noWheelClassName:S,preventScrolling:T,d3ZoomHandler:h});if(d.on("wheel.zoom",G,{passive:!1}),!E){const Z=Z1({zoomPanValues:u,onDraggingChange:a,onPanZoomStart:s});c.on("start",Z);const ee=q1({zoomPanValues:u,panOnDrag:P,onPaneContextMenu:!!j,onPanZoom:i,onTransformChange:C});c.on("zoom",ee);const te=J1({zoomPanValues:u,panOnDrag:P,panOnScroll:z,onPaneContextMenu:j,onPanZoomEnd:l,onDraggingChange:a});c.on("end",te)}const Q=eE({zoomActivationKeyPressed:Y,panOnDrag:P,zoomOnScroll:O,panOnScroll:z,zoomOnDoubleClick:V,zoomOnPinch:$,userSelectionActive:E,noPanClassName:L,noWheelClassName:S,lib:R,connectionInProgress:D});c.filter(Q),V?d.on("dblclick.zoom",y):d.on("dblclick.zoom",null)}function m(){c.on("zoom",null)}async function g(S,L,j){const E=ml(S),z=c==null?void 0:c.constrain()(E,L,j);return z&&await w(z),new Promise(P=>P(z))}async function p(S,L){const j=ml(S);return await w(j,L),new Promise(E=>E(j))}function v(S){if(d){const L=ml(S),j=d.property("__zoom");(j.k!==S.zoom||j.x!==S.x||j.y!==S.y)&&(c==null||c.transform(d,L,null,{sync:!0}))}}function _(){const S=d?Lh(d.node()):{x:0,y:0,k:1};return{x:S.x,y:S.y,zoom:S.k}}function k(S,L){return d?new Promise(j=>{c==null||c.interpolate((L==null?void 0:L.interpolate)==="linear"?ro:zi).scaleTo(yl(d,L==null?void 0:L.duration,L==null?void 0:L.ease,()=>j(!0)),S)}):Promise.resolve(!1)}function I(S,L){return d?new Promise(j=>{c==null||c.interpolate((L==null?void 0:L.interpolate)==="linear"?ro:zi).scaleBy(yl(d,L==null?void 0:L.duration,L==null?void 0:L.ease,()=>j(!0)),S)}):Promise.resolve(!1)}function b(S){c==null||c.scaleExtent(S)}function H(S){c==null||c.translateExtent(S)}function M(S){const L=!gt(S)||S<0?0:S;c==null||c.clickDistance(L)}return{update:x,destroy:m,setViewport:p,setViewportConstrained:g,getViewport:_,scaleTo:k,scaleBy:I,setScaleExtent:b,setTranslateExtent:H,syncViewport:v,setClickDistance:M}}var wr;(function(e){e.Line="line",e.Handle="handle"})(wr||(wr={}));function nE({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:o,affectsY:i}){const s=e-t,l=n-r,a=[s>0?1:s<0?-1:0,l>0?1:l<0?-1:0];return s&&o&&(a[0]=a[0]*-1),l&&i&&(a[1]=a[1]*-1),a}function of(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),o=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:o}}function Xt(e,t){return Math.max(0,t-e)}function Gt(e,t){return Math.max(0,e-t)}function ci(e,t,n){return Math.max(0,t-e,e-n)}function sf(e,t){return e?!t:t}function rE(e,t,n,r,o,i,s,l){let{affectsX:a,affectsY:u}=t;const{isHorizontal:f,isVertical:c}=t,d=f&&c,{xSnapped:h,ySnapped:y}=n,{minWidth:w,maxWidth:x,minHeight:m,maxHeight:g}=r,{x:p,y:v,width:_,height:k,aspectRatio:I}=e;let b=Math.floor(f?h-e.pointerX:0),H=Math.floor(c?y-e.pointerY:0);const M=_+(a?-b:b),S=k+(u?-H:H),L=-i[0]*_,j=-i[1]*k;let E=ci(M,w,x),z=ci(S,m,g);if(s){let N=0,T=0;a&&b<0?N=Xt(p+b+L,s[0][0]):!a&&b>0&&(N=Gt(p+M+L,s[1][0])),u&&H<0?T=Xt(v+H+j,s[0][1]):!u&&H>0&&(T=Gt(v+S+j,s[1][1])),E=Math.max(E,N),z=Math.max(z,T)}if(l){let N=0,T=0;a&&b>0?N=Gt(p+b,l[0][0]):!a&&b<0&&(N=Xt(p+M,l[1][0])),u&&H>0?T=Gt(v+H,l[0][1]):!u&&H<0&&(T=Xt(v+S,l[1][1])),E=Math.max(E,N),z=Math.max(z,T)}if(o){if(f){const N=ci(M/I,m,g)*I;if(E=Math.max(E,N),s){let T=0;!a&&!u||a&&!u&&d?T=Gt(v+j+M/I,s[1][1])*I:T=Xt(v+j+(a?b:-b)/I,s[0][1])*I,E=Math.max(E,T)}if(l){let T=0;!a&&!u||a&&!u&&d?T=Xt(v+M/I,l[1][1])*I:T=Gt(v+(a?b:-b)/I,l[0][1])*I,E=Math.max(E,T)}}if(c){const N=ci(S*I,w,x)/I;if(z=Math.max(z,N),s){let T=0;!a&&!u||u&&!a&&d?T=Gt(p+S*I+L,s[1][0])/I:T=Xt(p+(u?H:-H)*I+L,s[0][0])/I,z=Math.max(z,T)}if(l){let T=0;!a&&!u||u&&!a&&d?T=Xt(p+S*I,l[1][0])/I:T=Gt(p+(u?H:-H)*I,l[0][0])/I,z=Math.max(z,T)}}}H=H+(H<0?z:-z),b=b+(b<0?E:-E),o&&(d?M>S*I?H=(sf(a,u)?-b:b)/I:b=(sf(a,u)?-H:H)*I:f?(H=b/I,u=a):(b=H*I,a=u));const P=a?p+b:p,A=u?v+H:v;return{width:_+(a?-b:b),height:k+(u?-H:H),x:i[0]*b*(a?-1:1)+P,y:i[1]*H*(u?-1:1)+A}}const lp={width:0,height:0,x:0,y:0},oE={...lp,pointerX:0,pointerY:0,aspectRatio:1};function iE(e){return[[0,0],[e.measured.width,e.measured.height]]}function sE(e,t,n){const r=t.position.x+e.position.x,o=t.position.y+e.position.y,i=e.measured.width??0,s=e.measured.height??0,l=n[0]*i,a=n[1]*s;return[[r-l,o-a],[r+i-l,o+s-a]]}function lE({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:o}){const i=Xe(e);let s={controlDirection:of("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:f,keepAspectRatio:c,resizeDirection:d,onResizeStart:h,onResize:y,onResizeEnd:w,shouldResize:x}){let m={...lp},g={...oE};s={boundaries:f,resizeDirection:d,keepAspectRatio:c,controlDirection:of(u)};let p,v=null,_=[],k,I,b,H=!1;const M=yh().on("start",S=>{const{nodeLookup:L,transform:j,snapGrid:E,snapToGrid:z,nodeOrigin:P,paneDomNode:A}=n();if(p=L.get(t),!p)return;v=(A==null?void 0:A.getBoundingClientRect())??null;const{xSnapped:N,ySnapped:T}=oo(S.sourceEvent,{transform:j,snapGrid:E,snapToGrid:z,containerBounds:v});m={width:p.measured.width??0,height:p.measured.height??0,x:p.position.x??0,y:p.position.y??0},g={...m,pointerX:N,pointerY:T,aspectRatio:m.width/m.height},k=void 0,p.parentId&&(p.extent==="parent"||p.expandParent)&&(k=L.get(p.parentId),I=k&&p.extent==="parent"?iE(k):void 0),_=[],b=void 0;for(const[$,O]of L)if(O.parentId===t&&(_.push({id:$,position:{...O.position},extent:O.extent}),O.extent==="parent"||O.expandParent)){const V=sE(O,p,O.origin??P);b?b=[[Math.min(V[0][0],b[0][0]),Math.min(V[0][1],b[0][1])],[Math.max(V[1][0],b[1][0]),Math.max(V[1][1],b[1][1])]]:b=V}h==null||h(S,{...m})}).on("drag",S=>{const{transform:L,snapGrid:j,snapToGrid:E,nodeOrigin:z}=n(),P=oo(S.sourceEvent,{transform:L,snapGrid:j,snapToGrid:E,containerBounds:v}),A=[];if(!p)return;const{x:N,y:T,width:$,height:O}=m,V={},Y=p.origin??z,{width:R,height:C,x:D,y:B}=rE(g,s.controlDirection,P,s.boundaries,s.keepAspectRatio,Y,I,b),U=R!==$,X=C!==O,G=D!==N&&U,Q=B!==T&&X;if(!G&&!Q&&!U&&!X)return;if((G||Q||Y[0]===1||Y[1]===1)&&(V.x=G?D:m.x,V.y=Q?B:m.y,m.x=V.x,m.y=V.y,_.length>0)){const ne=D-N,re=B-T;for(const ke of _)ke.position={x:ke.position.x-ne+Y[0]*(R-$),y:ke.position.y-re+Y[1]*(C-O)},A.push(ke)}if((U||X)&&(V.width=U&&(!s.resizeDirection||s.resizeDirection==="horizontal")?R:m.width,V.height=X&&(!s.resizeDirection||s.resizeDirection==="vertical")?C:m.height,m.width=V.width,m.height=V.height),k&&p.expandParent){const ne=Y[0]*(V.width??0);V.x&&V.x<ne&&(m.x=ne,g.x=g.x-(V.x-ne));const re=Y[1]*(V.height??0);V.y&&V.y<re&&(m.y=re,g.y=g.y-(V.y-re))}const Z=nE({width:m.width,prevWidth:$,height:m.height,prevHeight:O,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),ee={...m,direction:Z};(x==null?void 0:x(S,ee))!==!1&&(H=!0,y==null||y(S,ee),r(V,A))}).on("end",S=>{H&&(w==null||w(S,{...m}),o==null||o({...m}),H=!1)});i.call(M)}function a(){i.on(".drag",null)}return{update:l,destroy:a}}var ap={exports:{}},up={},cp={exports:{}},fp={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* use-sync-external-store-shim.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var xr=W;function aE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var uE=typeof Object.is=="function"?Object.is:aE,cE=xr.useState,fE=xr.useEffect,dE=xr.useLayoutEffect,hE=xr.useDebugValue;function pE(e,t){var n=t(),r=cE({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return dE(function(){o.value=n,o.getSnapshot=t,vl(o)&&i({inst:o})},[e,n,t]),fE(function(){return vl(o)&&i({inst:o}),e(function(){vl(o)&&i({inst:o})})},[e]),hE(n),n}function vl(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!uE(e,n)}catch{return!0}}function gE(e,t){return t()}var mE=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?gE:pE;fp.useSyncExternalStore=xr.useSyncExternalStore!==void 0?xr.useSyncExternalStore:mE;cp.exports=fp;var yE=cp.exports;/**
|
|
26
|
+
* @license React
|
|
27
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Hs=W,vE=yE;function wE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xE=typeof Object.is=="function"?Object.is:wE,EE=vE.useSyncExternalStore,_E=Hs.useRef,SE=Hs.useEffect,kE=Hs.useMemo,NE=Hs.useDebugValue;up.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=_E(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=kE(function(){function a(h){if(!u){if(u=!0,f=h,h=r(h),o!==void 0&&s.hasValue){var y=s.value;if(o(y,h))return c=y}return c=h}if(y=c,xE(f,h))return y;var w=r(h);return o!==void 0&&o(y,w)?(f=h,y):(f=h,c=w)}var u=!1,f,c,d=n===void 0?null:n;return[function(){return a(t())},d===null?void 0:function(){return a(d())}]},[t,n,r,o]);var l=EE(e,i[0],i[1]);return SE(function(){s.hasValue=!0,s.value=l},[l]),NE(l),l};ap.exports=up;var CE=ap.exports;const ME=Wd(CE),IE={},lf=e=>{let t;const n=new Set,r=(f,c)=>{const d=typeof f=="function"?f(t):f;if(!Object.is(d,t)){const h=t;t=c??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(y=>y(t,h))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>u,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(IE?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,o,a);return a},PE=e=>e?lf(e):lf,{useDebugValue:TE}=le,{useSyncExternalStoreWithSelector:LE}=ME,bE=e=>e;function dp(e,t=bE,n){const r=LE(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return TE(r),r}const af=(e,t)=>{const n=PE(e),r=(o,i=t)=>dp(n,o,i);return Object.assign(r,n),r},RE=(e,t)=>e?af(e,t):af;function he(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(const[r,o]of e)if(!Object.is(o,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}var hp={exports:{}},qe={},pp={exports:{}},gp={};/**
|
|
34
|
+
* @license React
|
|
35
|
+
* scheduler.production.min.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/(function(e){function t(N,T){var $=N.length;N.push(T);e:for(;0<$;){var O=$-1>>>1,V=N[O];if(0<o(V,T))N[O]=T,N[$]=V,$=O;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var T=N[0],$=N.pop();if($!==T){N[0]=$;e:for(var O=0,V=N.length,Y=V>>>1;O<Y;){var R=2*(O+1)-1,C=N[R],D=R+1,B=N[D];if(0>o(C,$))D<V&&0>o(B,C)?(N[O]=B,N[D]=$,O=D):(N[O]=C,N[R]=$,O=R);else if(D<V&&0>o(B,$))N[O]=B,N[D]=$,O=D;else break e}}return T}function o(N,T){var $=N.sortIndex-T.sortIndex;return $!==0?$:N.id-T.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],f=1,c=null,d=3,h=!1,y=!1,w=!1,x=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(N){for(var T=n(u);T!==null;){if(T.callback===null)r(u);else if(T.startTime<=N)r(u),T.sortIndex=T.expirationTime,t(a,T);else break;T=n(u)}}function v(N){if(w=!1,p(N),!y)if(n(a)!==null)y=!0,P(_);else{var T=n(u);T!==null&&A(v,T.startTime-N)}}function _(N,T){y=!1,w&&(w=!1,m(b),b=-1),h=!0;var $=d;try{for(p(T),c=n(a);c!==null&&(!(c.expirationTime>T)||N&&!S());){var O=c.callback;if(typeof O=="function"){c.callback=null,d=c.priorityLevel;var V=O(c.expirationTime<=T);T=e.unstable_now(),typeof V=="function"?c.callback=V:c===n(a)&&r(a),p(T)}else r(a);c=n(a)}if(c!==null)var Y=!0;else{var R=n(u);R!==null&&A(v,R.startTime-T),Y=!1}return Y}finally{c=null,d=$,h=!1}}var k=!1,I=null,b=-1,H=5,M=-1;function S(){return!(e.unstable_now()-M<H)}function L(){if(I!==null){var N=e.unstable_now();M=N;var T=!0;try{T=I(!0,N)}finally{T?j():(k=!1,I=null)}}else k=!1}var j;if(typeof g=="function")j=function(){g(L)};else if(typeof MessageChannel<"u"){var E=new MessageChannel,z=E.port2;E.port1.onmessage=L,j=function(){z.postMessage(null)}}else j=function(){x(L,0)};function P(N){I=N,k||(k=!0,j())}function A(N,T){b=x(function(){N(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(N){N.callback=null},e.unstable_continueExecution=function(){y||h||(y=!0,P(_))},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(N){switch(d){case 1:case 2:case 3:var T=3;break;default:T=d}var $=d;d=T;try{return N()}finally{d=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,T){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var $=d;d=N;try{return T()}finally{d=$}},e.unstable_scheduleCallback=function(N,T,$){var O=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?O+$:O):$=O,N){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=$+V,N={id:f++,callback:T,priorityLevel:N,startTime:$,expirationTime:V,sortIndex:-1},$>O?(N.sortIndex=$,t(u,N),n(a)===null&&N===n(u)&&(w?(m(b),b=-1):w=!0,A(v,$-O))):(N.sortIndex=V,t(a,N),y||h||(y=!0,P(_))),N},e.unstable_shouldYield=S,e.unstable_wrapCallback=function(N){var T=d;return function(){var $=d;d=T;try{return N.apply(this,arguments)}finally{d=$}}}})(gp);pp.exports=gp;var AE=pp.exports;/**
|
|
42
|
+
* @license React
|
|
43
|
+
* react-dom.production.min.js
|
|
44
|
+
*
|
|
45
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
46
|
+
*
|
|
47
|
+
* This source code is licensed under the MIT license found in the
|
|
48
|
+
* LICENSE file in the root directory of this source tree.
|
|
49
|
+
*/var zE=W,Ze=AE;function K(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;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."}var mp=new Set,ko={};function Fn(e,t){Er(e,t),Er(e+"Capture",t)}function Er(e,t){for(ko[e]=t,e=0;e<t.length;e++)mp.add(t[e])}var Vt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),aa=Object.prototype.hasOwnProperty,OE=/^[: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]*$/,uf={},cf={};function jE(e){return aa.call(cf,e)?!0:aa.call(uf,e)?!1:OE.test(e)?cf[e]=!0:(uf[e]=!0,!1)}function $E(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function DE(e,t,n,r){if(t===null||typeof t>"u"||$E(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function De(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var Le={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Le[e]=new De(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Le[t]=new De(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Le[e]=new De(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Le[e]=new De(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Le[e]=new De(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Le[e]=new De(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Le[e]=new De(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Le[e]=new De(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Le[e]=new De(e,5,!1,e.toLowerCase(),null,!1,!1)});var Nu=/[\-:]([a-z])/g;function Cu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Nu,Cu);Le[t]=new De(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Nu,Cu);Le[t]=new De(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Nu,Cu);Le[t]=new De(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Le[e]=new De(e,1,!1,e.toLowerCase(),null,!1,!1)});Le.xlinkHref=new De("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Le[e]=new De(e,1,!1,e.toLowerCase(),null,!0,!0)});function Mu(e,t,n,r){var o=Le.hasOwnProperty(t)?Le[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(DE(t,n,o,r)&&(n=null),r||o===null?jE(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Yt=zE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,fi=Symbol.for("react.element"),Yn=Symbol.for("react.portal"),Xn=Symbol.for("react.fragment"),Iu=Symbol.for("react.strict_mode"),ua=Symbol.for("react.profiler"),yp=Symbol.for("react.provider"),vp=Symbol.for("react.context"),Pu=Symbol.for("react.forward_ref"),ca=Symbol.for("react.suspense"),fa=Symbol.for("react.suspense_list"),Tu=Symbol.for("react.memo"),Kt=Symbol.for("react.lazy"),wp=Symbol.for("react.offscreen"),ff=Symbol.iterator;function Vr(e){return e===null||typeof e!="object"?null:(e=ff&&e[ff]||e["@@iterator"],typeof e=="function"?e:null)}var ve=Object.assign,wl;function qr(e){if(wl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);wl=t&&t[1]||""}return`
|
|
50
|
+
`+wl+e}var xl=!1;function El(e,t){if(!e||xl)return"";xl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var o=u.stack.split(`
|
|
51
|
+
`),i=r.stack.split(`
|
|
52
|
+
`),s=o.length-1,l=i.length-1;1<=s&&0<=l&&o[s]!==i[l];)l--;for(;1<=s&&0<=l;s--,l--)if(o[s]!==i[l]){if(s!==1||l!==1)do if(s--,l--,0>l||o[s]!==i[l]){var a=`
|
|
53
|
+
`+o[s].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{xl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?qr(e):""}function FE(e){switch(e.tag){case 5:return qr(e.type);case 16:return qr("Lazy");case 13:return qr("Suspense");case 19:return qr("SuspenseList");case 0:case 2:case 15:return e=El(e.type,!1),e;case 11:return e=El(e.type.render,!1),e;case 1:return e=El(e.type,!0),e;default:return""}}function da(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Xn:return"Fragment";case Yn:return"Portal";case ua:return"Profiler";case Iu:return"StrictMode";case ca:return"Suspense";case fa:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case vp:return(e.displayName||"Context")+".Consumer";case yp:return(e._context.displayName||"Context")+".Provider";case Pu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Tu:return t=e.displayName||null,t!==null?t:da(e.type)||"Memo";case Kt:t=e._payload,e=e._init;try{return da(e(t))}catch{}}return null}function VE(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return da(t);case 8:return t===Iu?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function dn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function HE(e){var t=xp(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function di(e){e._valueTracker||(e._valueTracker=HE(e))}function Ep(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=xp(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ls(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}}function ha(e,t){var n=t.checked;return ve({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function df(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=dn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function _p(e,t){t=t.checked,t!=null&&Mu(e,"checked",t,!1)}function pa(e,t){_p(e,t);var n=dn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ga(e,t.type,n):t.hasOwnProperty("defaultValue")&&ga(e,t.type,dn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function hf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ga(e,t,n){(t!=="number"||ls(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Jr=Array.isArray;function lr(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+dn(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function ma(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(K(91));return ve({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function pf(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(K(92));if(Jr(n)){if(1<n.length)throw Error(K(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:dn(n)}}function Sp(e,t){var n=dn(t.value),r=dn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function gf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function kp(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ya(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?kp(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var hi,Np=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(hi=hi||document.createElement("div"),hi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=hi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function No(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var io={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},BE=["Webkit","ms","Moz","O"];Object.keys(io).forEach(function(e){BE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),io[t]=io[e]})});function Cp(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||io.hasOwnProperty(e)&&io[e]?(""+t).trim():t+"px"}function Mp(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Cp(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var UE=ve({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function va(e,t){if(t){if(UE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(K(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(K(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(K(61))}if(t.style!=null&&typeof t.style!="object")throw Error(K(62))}}function wa(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 xa=null;function Lu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ea=null,ar=null,ur=null;function mf(e){if(e=Zo(e)){if(typeof Ea!="function")throw Error(K(280));var t=e.stateNode;t&&(t=Xs(t),Ea(e.stateNode,e.type,t))}}function Ip(e){ar?ur?ur.push(e):ur=[e]:ar=e}function Pp(){if(ar){var e=ar,t=ur;if(ur=ar=null,mf(e),t)for(e=0;e<t.length;e++)mf(t[e])}}function Tp(e,t){return e(t)}function Lp(){}var _l=!1;function bp(e,t,n){if(_l)return e(t,n);_l=!0;try{return Tp(e,t,n)}finally{_l=!1,(ar!==null||ur!==null)&&(Lp(),Pp())}}function Co(e,t){var n=e.stateNode;if(n===null)return null;var r=Xs(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(K(231,t,typeof n));return n}var _a=!1;if(Vt)try{var Hr={};Object.defineProperty(Hr,"passive",{get:function(){_a=!0}}),window.addEventListener("test",Hr,Hr),window.removeEventListener("test",Hr,Hr)}catch{_a=!1}function WE(e,t,n,r,o,i,s,l,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(f){this.onError(f)}}var so=!1,as=null,us=!1,Sa=null,YE={onError:function(e){so=!0,as=e}};function XE(e,t,n,r,o,i,s,l,a){so=!1,as=null,WE.apply(YE,arguments)}function GE(e,t,n,r,o,i,s,l,a){if(XE.apply(this,arguments),so){if(so){var u=as;so=!1,as=null}else throw Error(K(198));us||(us=!0,Sa=u)}}function Vn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Rp(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 yf(e){if(Vn(e)!==e)throw Error(K(188))}function QE(e){var t=e.alternate;if(!t){if(t=Vn(e),t===null)throw Error(K(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return yf(o),e;if(i===r)return yf(o),t;i=i.sibling}throw Error(K(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s)throw Error(K(189))}}if(n.alternate!==r)throw Error(K(190))}if(n.tag!==3)throw Error(K(188));return n.stateNode.current===n?e:t}function Ap(e){return e=QE(e),e!==null?zp(e):null}function zp(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=zp(e);if(t!==null)return t;e=e.sibling}return null}var Op=Ze.unstable_scheduleCallback,vf=Ze.unstable_cancelCallback,KE=Ze.unstable_shouldYield,ZE=Ze.unstable_requestPaint,xe=Ze.unstable_now,qE=Ze.unstable_getCurrentPriorityLevel,bu=Ze.unstable_ImmediatePriority,jp=Ze.unstable_UserBlockingPriority,cs=Ze.unstable_NormalPriority,JE=Ze.unstable_LowPriority,$p=Ze.unstable_IdlePriority,Bs=null,Mt=null;function e_(e){if(Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(Bs,e,void 0,(e.current.flags&128)===128)}catch{}}var yt=Math.clz32?Math.clz32:r_,t_=Math.log,n_=Math.LN2;function r_(e){return e>>>=0,e===0?32:31-(t_(e)/n_|0)|0}var pi=64,gi=4194304;function eo(e){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function fs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=eo(l):(i&=s,i!==0&&(r=eo(i)))}else s=n&~o,s!==0?r=eo(s):i!==0&&(r=eo(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-yt(t),o=1<<n,r|=e[n],t&=~o;return r}function o_(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function i_(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-yt(i),l=1<<s,a=o[s];a===-1?(!(l&n)||l&r)&&(o[s]=o_(l,t)):a<=t&&(e.expiredLanes|=l),i&=~l}}function ka(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Dp(){var e=pi;return pi<<=1,!(pi&4194240)&&(pi=64),e}function Sl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-yt(t),e[t]=n}function s_(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-yt(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function Ru(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-yt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var ae=0;function Fp(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Vp,Au,Hp,Bp,Up,Na=!1,mi=[],rn=null,on=null,sn=null,Mo=new Map,Io=new Map,Jt=[],l_="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 submit".split(" ");function wf(e,t){switch(e){case"focusin":case"focusout":rn=null;break;case"dragenter":case"dragleave":on=null;break;case"mouseover":case"mouseout":sn=null;break;case"pointerover":case"pointerout":Mo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Io.delete(t.pointerId)}}function Br(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=Zo(t),t!==null&&Au(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function a_(e,t,n,r,o){switch(t){case"focusin":return rn=Br(rn,e,t,n,r,o),!0;case"dragenter":return on=Br(on,e,t,n,r,o),!0;case"mouseover":return sn=Br(sn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Mo.set(i,Br(Mo.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Io.set(i,Br(Io.get(i)||null,e,t,n,r,o)),!0}return!1}function Wp(e){var t=_n(e.target);if(t!==null){var n=Vn(t);if(n!==null){if(t=n.tag,t===13){if(t=Rp(n),t!==null){e.blockedOn=t,Up(e.priority,function(){Hp(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 Di(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ca(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);xa=r,n.target.dispatchEvent(r),xa=null}else return t=Zo(n),t!==null&&Au(t),e.blockedOn=n,!1;t.shift()}return!0}function xf(e,t,n){Di(e)&&n.delete(t)}function u_(){Na=!1,rn!==null&&Di(rn)&&(rn=null),on!==null&&Di(on)&&(on=null),sn!==null&&Di(sn)&&(sn=null),Mo.forEach(xf),Io.forEach(xf)}function Ur(e,t){e.blockedOn===t&&(e.blockedOn=null,Na||(Na=!0,Ze.unstable_scheduleCallback(Ze.unstable_NormalPriority,u_)))}function Po(e){function t(o){return Ur(o,e)}if(0<mi.length){Ur(mi[0],e);for(var n=1;n<mi.length;n++){var r=mi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(rn!==null&&Ur(rn,e),on!==null&&Ur(on,e),sn!==null&&Ur(sn,e),Mo.forEach(t),Io.forEach(t),n=0;n<Jt.length;n++)r=Jt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Jt.length&&(n=Jt[0],n.blockedOn===null);)Wp(n),n.blockedOn===null&&Jt.shift()}var cr=Yt.ReactCurrentBatchConfig,ds=!0;function c_(e,t,n,r){var o=ae,i=cr.transition;cr.transition=null;try{ae=1,zu(e,t,n,r)}finally{ae=o,cr.transition=i}}function f_(e,t,n,r){var o=ae,i=cr.transition;cr.transition=null;try{ae=4,zu(e,t,n,r)}finally{ae=o,cr.transition=i}}function zu(e,t,n,r){if(ds){var o=Ca(e,t,n,r);if(o===null)Rl(e,t,r,hs,n),wf(e,r);else if(a_(o,e,t,n,r))r.stopPropagation();else if(wf(e,r),t&4&&-1<l_.indexOf(e)){for(;o!==null;){var i=Zo(o);if(i!==null&&Vp(i),i=Ca(e,t,n,r),i===null&&Rl(e,t,r,hs,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else Rl(e,t,r,null,n)}}var hs=null;function Ca(e,t,n,r){if(hs=null,e=Lu(r),e=_n(e),e!==null)if(t=Vn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Rp(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 hs=e,null}function Yp(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(qE()){case bu:return 1;case jp:return 4;case cs:case JE:return 16;case $p:return 536870912;default:return 16}default:return 16}}var tn=null,Ou=null,Fi=null;function Xp(){if(Fi)return Fi;var e,t=Ou,n=t.length,r,o="value"in tn?tn.value:tn.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[i-r];r++);return Fi=o.slice(e,1<r?1-r:void 0)}function Vi(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 yi(){return!0}function Ef(){return!1}function Je(e){function t(n,r,o,i,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?yi:Ef,this.isPropagationStopped=Ef,this}return ve(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=yi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=yi)},persist:function(){},isPersistent:yi}),t}var Rr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ju=Je(Rr),Ko=ve({},Rr,{view:0,detail:0}),d_=Je(Ko),kl,Nl,Wr,Us=ve({},Ko,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$u,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!==Wr&&(Wr&&e.type==="mousemove"?(kl=e.screenX-Wr.screenX,Nl=e.screenY-Wr.screenY):Nl=kl=0,Wr=e),kl)},movementY:function(e){return"movementY"in e?e.movementY:Nl}}),_f=Je(Us),h_=ve({},Us,{dataTransfer:0}),p_=Je(h_),g_=ve({},Ko,{relatedTarget:0}),Cl=Je(g_),m_=ve({},Rr,{animationName:0,elapsedTime:0,pseudoElement:0}),y_=Je(m_),v_=ve({},Rr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),w_=Je(v_),x_=ve({},Rr,{data:0}),Sf=Je(x_),E_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},__={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"},S_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function k_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=S_[e])?!!t[e]:!1}function $u(){return k_}var N_=ve({},Ko,{key:function(e){if(e.key){var t=E_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Vi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?__[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$u,charCode:function(e){return e.type==="keypress"?Vi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),C_=Je(N_),M_=ve({},Us,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kf=Je(M_),I_=ve({},Ko,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$u}),P_=Je(I_),T_=ve({},Rr,{propertyName:0,elapsedTime:0,pseudoElement:0}),L_=Je(T_),b_=ve({},Us,{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}),R_=Je(b_),A_=[9,13,27,32],Du=Vt&&"CompositionEvent"in window,lo=null;Vt&&"documentMode"in document&&(lo=document.documentMode);var z_=Vt&&"TextEvent"in window&&!lo,Gp=Vt&&(!Du||lo&&8<lo&&11>=lo),Nf=" ",Cf=!1;function Qp(e,t){switch(e){case"keyup":return A_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Kp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gn=!1;function O_(e,t){switch(e){case"compositionend":return Kp(t);case"keypress":return t.which!==32?null:(Cf=!0,Nf);case"textInput":return e=t.data,e===Nf&&Cf?null:e;default:return null}}function j_(e,t){if(Gn)return e==="compositionend"||!Du&&Qp(e,t)?(e=Xp(),Fi=Ou=tn=null,Gn=!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 Gp&&t.locale!=="ko"?null:t.data;default:return null}}var $_={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 Mf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!$_[e.type]:t==="textarea"}function Zp(e,t,n,r){Ip(r),t=ps(t,"onChange"),0<t.length&&(n=new ju("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ao=null,To=null;function D_(e){ag(e,0)}function Ws(e){var t=Zn(e);if(Ep(t))return e}function F_(e,t){if(e==="change")return t}var qp=!1;if(Vt){var Ml;if(Vt){var Il="oninput"in document;if(!Il){var If=document.createElement("div");If.setAttribute("oninput","return;"),Il=typeof If.oninput=="function"}Ml=Il}else Ml=!1;qp=Ml&&(!document.documentMode||9<document.documentMode)}function Pf(){ao&&(ao.detachEvent("onpropertychange",Jp),To=ao=null)}function Jp(e){if(e.propertyName==="value"&&Ws(To)){var t=[];Zp(t,To,e,Lu(e)),bp(D_,t)}}function V_(e,t,n){e==="focusin"?(Pf(),ao=t,To=n,ao.attachEvent("onpropertychange",Jp)):e==="focusout"&&Pf()}function H_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ws(To)}function B_(e,t){if(e==="click")return Ws(t)}function U_(e,t){if(e==="input"||e==="change")return Ws(t)}function W_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var wt=typeof Object.is=="function"?Object.is:W_;function Lo(e,t){if(wt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!aa.call(t,o)||!wt(e[o],t[o]))return!1}return!0}function Tf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lf(e,t){var n=Tf(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Tf(n)}}function eg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?eg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function tg(){for(var e=window,t=ls();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ls(e.document)}return t}function Fu(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")}function Y_(e){var t=tg(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&eg(n.ownerDocument.documentElement,n)){if(r!==null&&Fu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Lf(n,i);var s=Lf(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var X_=Vt&&"documentMode"in document&&11>=document.documentMode,Qn=null,Ma=null,uo=null,Ia=!1;function bf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ia||Qn==null||Qn!==ls(r)||(r=Qn,"selectionStart"in r&&Fu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),uo&&Lo(uo,r)||(uo=r,r=ps(Ma,"onSelect"),0<r.length&&(t=new ju("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Qn)))}function vi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Kn={animationend:vi("Animation","AnimationEnd"),animationiteration:vi("Animation","AnimationIteration"),animationstart:vi("Animation","AnimationStart"),transitionend:vi("Transition","TransitionEnd")},Pl={},ng={};Vt&&(ng=document.createElement("div").style,"AnimationEvent"in window||(delete Kn.animationend.animation,delete Kn.animationiteration.animation,delete Kn.animationstart.animation),"TransitionEvent"in window||delete Kn.transitionend.transition);function Ys(e){if(Pl[e])return Pl[e];if(!Kn[e])return e;var t=Kn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ng)return Pl[e]=t[n];return e}var rg=Ys("animationend"),og=Ys("animationiteration"),ig=Ys("animationstart"),sg=Ys("transitionend"),lg=new Map,Rf="abort auxClick 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(" ");function pn(e,t){lg.set(e,t),Fn(t,[e])}for(var Tl=0;Tl<Rf.length;Tl++){var Ll=Rf[Tl],G_=Ll.toLowerCase(),Q_=Ll[0].toUpperCase()+Ll.slice(1);pn(G_,"on"+Q_)}pn(rg,"onAnimationEnd");pn(og,"onAnimationIteration");pn(ig,"onAnimationStart");pn("dblclick","onDoubleClick");pn("focusin","onFocus");pn("focusout","onBlur");pn(sg,"onTransitionEnd");Er("onMouseEnter",["mouseout","mouseover"]);Er("onMouseLeave",["mouseout","mouseover"]);Er("onPointerEnter",["pointerout","pointerover"]);Er("onPointerLeave",["pointerout","pointerover"]);Fn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Fn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Fn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Fn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Fn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Fn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var to="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(" "),K_=new Set("cancel close invalid load scroll toggle".split(" ").concat(to));function Af(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,GE(r,t,void 0,e),e.currentTarget=null}function ag(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var l=r[s],a=l.instance,u=l.currentTarget;if(l=l.listener,a!==i&&o.isPropagationStopped())break e;Af(o,l,u),i=a}else for(s=0;s<r.length;s++){if(l=r[s],a=l.instance,u=l.currentTarget,l=l.listener,a!==i&&o.isPropagationStopped())break e;Af(o,l,u),i=a}}}if(us)throw e=Sa,us=!1,Sa=null,e}function fe(e,t){var n=t[Ra];n===void 0&&(n=t[Ra]=new Set);var r=e+"__bubble";n.has(r)||(ug(t,e,2,!1),n.add(r))}function bl(e,t,n){var r=0;t&&(r|=4),ug(n,e,r,t)}var wi="_reactListening"+Math.random().toString(36).slice(2);function bo(e){if(!e[wi]){e[wi]=!0,mp.forEach(function(n){n!=="selectionchange"&&(K_.has(n)||bl(n,!1,e),bl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wi]||(t[wi]=!0,bl("selectionchange",!1,t))}}function ug(e,t,n,r){switch(Yp(t)){case 1:var o=c_;break;case 4:o=f_;break;default:o=zu}n=o.bind(null,t,n,e),o=void 0,!_a||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Rl(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===o||l.nodeType===8&&l.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var a=s.tag;if((a===3||a===4)&&(a=s.stateNode.containerInfo,a===o||a.nodeType===8&&a.parentNode===o))return;s=s.return}for(;l!==null;){if(s=_n(l),s===null)return;if(a=s.tag,a===5||a===6){r=i=s;continue e}l=l.parentNode}}r=r.return}bp(function(){var u=i,f=Lu(n),c=[];e:{var d=lg.get(e);if(d!==void 0){var h=ju,y=e;switch(e){case"keypress":if(Vi(n)===0)break e;case"keydown":case"keyup":h=C_;break;case"focusin":y="focus",h=Cl;break;case"focusout":y="blur",h=Cl;break;case"beforeblur":case"afterblur":h=Cl;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=_f;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=p_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=P_;break;case rg:case og:case ig:h=y_;break;case sg:h=L_;break;case"scroll":h=d_;break;case"wheel":h=R_;break;case"copy":case"cut":case"paste":h=w_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=kf}var w=(t&4)!==0,x=!w&&e==="scroll",m=w?d!==null?d+"Capture":null:d;w=[];for(var g=u,p;g!==null;){p=g;var v=p.stateNode;if(p.tag===5&&v!==null&&(p=v,m!==null&&(v=Co(g,m),v!=null&&w.push(Ro(g,v,p)))),x)break;g=g.return}0<w.length&&(d=new h(d,y,null,n,f),c.push({event:d,listeners:w}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==xa&&(y=n.relatedTarget||n.fromElement)&&(_n(y)||y[Ht]))break e;if((h||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,h?(y=n.relatedTarget||n.toElement,h=u,y=y?_n(y):null,y!==null&&(x=Vn(y),y!==x||y.tag!==5&&y.tag!==6)&&(y=null)):(h=null,y=u),h!==y)){if(w=_f,v="onMouseLeave",m="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(w=kf,v="onPointerLeave",m="onPointerEnter",g="pointer"),x=h==null?d:Zn(h),p=y==null?d:Zn(y),d=new w(v,g+"leave",h,n,f),d.target=x,d.relatedTarget=p,v=null,_n(f)===u&&(w=new w(m,g+"enter",y,n,f),w.target=p,w.relatedTarget=x,v=w),x=v,h&&y)t:{for(w=h,m=y,g=0,p=w;p;p=Un(p))g++;for(p=0,v=m;v;v=Un(v))p++;for(;0<g-p;)w=Un(w),g--;for(;0<p-g;)m=Un(m),p--;for(;g--;){if(w===m||m!==null&&w===m.alternate)break t;w=Un(w),m=Un(m)}w=null}else w=null;h!==null&&zf(c,d,h,w,!1),y!==null&&x!==null&&zf(c,x,y,w,!0)}}e:{if(d=u?Zn(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var _=F_;else if(Mf(d))if(qp)_=U_;else{_=H_;var k=V_}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(_=B_);if(_&&(_=_(e,u))){Zp(c,_,n,f);break e}k&&k(e,d,u),e==="focusout"&&(k=d._wrapperState)&&k.controlled&&d.type==="number"&&ga(d,"number",d.value)}switch(k=u?Zn(u):window,e){case"focusin":(Mf(k)||k.contentEditable==="true")&&(Qn=k,Ma=u,uo=null);break;case"focusout":uo=Ma=Qn=null;break;case"mousedown":Ia=!0;break;case"contextmenu":case"mouseup":case"dragend":Ia=!1,bf(c,n,f);break;case"selectionchange":if(X_)break;case"keydown":case"keyup":bf(c,n,f)}var I;if(Du)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Gn?Qp(e,n)&&(b="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(b="onCompositionStart");b&&(Gp&&n.locale!=="ko"&&(Gn||b!=="onCompositionStart"?b==="onCompositionEnd"&&Gn&&(I=Xp()):(tn=f,Ou="value"in tn?tn.value:tn.textContent,Gn=!0)),k=ps(u,b),0<k.length&&(b=new Sf(b,e,null,n,f),c.push({event:b,listeners:k}),I?b.data=I:(I=Kp(n),I!==null&&(b.data=I)))),(I=z_?O_(e,n):j_(e,n))&&(u=ps(u,"onBeforeInput"),0<u.length&&(f=new Sf("onBeforeInput","beforeinput",null,n,f),c.push({event:f,listeners:u}),f.data=I))}ag(c,t)})}function Ro(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ps(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Co(e,n),i!=null&&r.unshift(Ro(e,i,o)),i=Co(e,t),i!=null&&r.push(Ro(e,i,o))),e=e.return}return r}function Un(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function zf(e,t,n,r,o){for(var i=t._reactName,s=[];n!==null&&n!==r;){var l=n,a=l.alternate,u=l.stateNode;if(a!==null&&a===r)break;l.tag===5&&u!==null&&(l=u,o?(a=Co(n,i),a!=null&&s.unshift(Ro(n,a,l))):o||(a=Co(n,i),a!=null&&s.push(Ro(n,a,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Z_=/\r\n?/g,q_=/\u0000|\uFFFD/g;function Of(e){return(typeof e=="string"?e:""+e).replace(Z_,`
|
|
54
|
+
`).replace(q_,"")}function xi(e,t,n){if(t=Of(t),Of(e)!==t&&n)throw Error(K(425))}function gs(){}var Pa=null,Ta=null;function La(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ba=typeof setTimeout=="function"?setTimeout:void 0,J_=typeof clearTimeout=="function"?clearTimeout:void 0,jf=typeof Promise=="function"?Promise:void 0,eS=typeof queueMicrotask=="function"?queueMicrotask:typeof jf<"u"?function(e){return jf.resolve(null).then(e).catch(tS)}:ba;function tS(e){setTimeout(function(){throw e})}function Al(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Po(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Po(t)}function ln(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==="$?")break;if(t==="/$")return null}}return e}function $f(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Ar=Math.random().toString(36).slice(2),Nt="__reactFiber$"+Ar,Ao="__reactProps$"+Ar,Ht="__reactContainer$"+Ar,Ra="__reactEvents$"+Ar,nS="__reactListeners$"+Ar,rS="__reactHandles$"+Ar;function _n(e){var t=e[Nt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ht]||n[Nt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=$f(e);e!==null;){if(n=e[Nt])return n;e=$f(e)}return t}e=n,n=e.parentNode}return null}function Zo(e){return e=e[Nt]||e[Ht],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Zn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(K(33))}function Xs(e){return e[Ao]||null}var Aa=[],qn=-1;function gn(e){return{current:e}}function de(e){0>qn||(e.current=Aa[qn],Aa[qn]=null,qn--)}function ce(e,t){qn++,Aa[qn]=e.current,e.current=t}var hn={},ze=gn(hn),Be=gn(!1),Rn=hn;function _r(e,t){var n=e.type.contextTypes;if(!n)return hn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ue(e){return e=e.childContextTypes,e!=null}function ms(){de(Be),de(ze)}function Df(e,t,n){if(ze.current!==hn)throw Error(K(168));ce(ze,t),ce(Be,n)}function cg(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(K(108,VE(e)||"Unknown",o));return ve({},n,r)}function ys(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||hn,Rn=ze.current,ce(ze,e),ce(Be,Be.current),!0}function Ff(e,t,n){var r=e.stateNode;if(!r)throw Error(K(169));n?(e=cg(e,t,Rn),r.__reactInternalMemoizedMergedChildContext=e,de(Be),de(ze),ce(ze,e)):de(Be),ce(Be,n)}var At=null,Gs=!1,zl=!1;function fg(e){At===null?At=[e]:At.push(e)}function oS(e){Gs=!0,fg(e)}function mn(){if(!zl&&At!==null){zl=!0;var e=0,t=ae;try{var n=At;for(ae=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}At=null,Gs=!1}catch(o){throw At!==null&&(At=At.slice(e+1)),Op(bu,mn),o}finally{ae=t,zl=!1}}return null}var Jn=[],er=0,vs=null,ws=0,tt=[],nt=0,An=null,Ot=1,jt="";function vn(e,t){Jn[er++]=ws,Jn[er++]=vs,vs=e,ws=t}function dg(e,t,n){tt[nt++]=Ot,tt[nt++]=jt,tt[nt++]=An,An=e;var r=Ot;e=jt;var o=32-yt(r)-1;r&=~(1<<o),n+=1;var i=32-yt(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,Ot=1<<32-yt(t)+o|n<<o|r,jt=i+e}else Ot=1<<i|n<<o|r,jt=e}function Vu(e){e.return!==null&&(vn(e,1),dg(e,1,0))}function Hu(e){for(;e===vs;)vs=Jn[--er],Jn[er]=null,ws=Jn[--er],Jn[er]=null;for(;e===An;)An=tt[--nt],tt[nt]=null,jt=tt[--nt],tt[nt]=null,Ot=tt[--nt],tt[nt]=null}var Qe=null,Ge=null,pe=!1,ht=null;function hg(e,t){var n=rt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Vf(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Qe=e,Ge=ln(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Qe=e,Ge=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=An!==null?{id:Ot,overflow:jt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=rt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Qe=e,Ge=null,!0):!1;default:return!1}}function za(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Oa(e){if(pe){var t=Ge;if(t){var n=t;if(!Vf(e,t)){if(za(e))throw Error(K(418));t=ln(n.nextSibling);var r=Qe;t&&Vf(e,t)?hg(r,n):(e.flags=e.flags&-4097|2,pe=!1,Qe=e)}}else{if(za(e))throw Error(K(418));e.flags=e.flags&-4097|2,pe=!1,Qe=e}}}function Hf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Qe=e}function Ei(e){if(e!==Qe)return!1;if(!pe)return Hf(e),pe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!La(e.type,e.memoizedProps)),t&&(t=Ge)){if(za(e))throw pg(),Error(K(418));for(;t;)hg(e,t),t=ln(t.nextSibling)}if(Hf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(K(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ge=ln(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ge=null}}else Ge=Qe?ln(e.stateNode.nextSibling):null;return!0}function pg(){for(var e=Ge;e;)e=ln(e.nextSibling)}function Sr(){Ge=Qe=null,pe=!1}function Bu(e){ht===null?ht=[e]:ht.push(e)}var iS=Yt.ReactCurrentBatchConfig;function Yr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(K(309));var r=n.stateNode}if(!r)throw Error(K(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var l=o.refs;s===null?delete l[i]:l[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(K(284));if(!n._owner)throw Error(K(290,e))}return e}function _i(e,t){throw e=Object.prototype.toString.call(t),Error(K(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Bf(e){var t=e._init;return t(e._payload)}function gg(e){function t(m,g){if(e){var p=m.deletions;p===null?(m.deletions=[g],m.flags|=16):p.push(g)}}function n(m,g){if(!e)return null;for(;g!==null;)t(m,g),g=g.sibling;return null}function r(m,g){for(m=new Map;g!==null;)g.key!==null?m.set(g.key,g):m.set(g.index,g),g=g.sibling;return m}function o(m,g){return m=fn(m,g),m.index=0,m.sibling=null,m}function i(m,g,p){return m.index=p,e?(p=m.alternate,p!==null?(p=p.index,p<g?(m.flags|=2,g):p):(m.flags|=2,g)):(m.flags|=1048576,g)}function s(m){return e&&m.alternate===null&&(m.flags|=2),m}function l(m,g,p,v){return g===null||g.tag!==6?(g=Hl(p,m.mode,v),g.return=m,g):(g=o(g,p),g.return=m,g)}function a(m,g,p,v){var _=p.type;return _===Xn?f(m,g,p.props.children,v,p.key):g!==null&&(g.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Kt&&Bf(_)===g.type)?(v=o(g,p.props),v.ref=Yr(m,g,p),v.return=m,v):(v=Gi(p.type,p.key,p.props,null,m.mode,v),v.ref=Yr(m,g,p),v.return=m,v)}function u(m,g,p,v){return g===null||g.tag!==4||g.stateNode.containerInfo!==p.containerInfo||g.stateNode.implementation!==p.implementation?(g=Bl(p,m.mode,v),g.return=m,g):(g=o(g,p.children||[]),g.return=m,g)}function f(m,g,p,v,_){return g===null||g.tag!==7?(g=In(p,m.mode,v,_),g.return=m,g):(g=o(g,p),g.return=m,g)}function c(m,g,p){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Hl(""+g,m.mode,p),g.return=m,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case fi:return p=Gi(g.type,g.key,g.props,null,m.mode,p),p.ref=Yr(m,null,g),p.return=m,p;case Yn:return g=Bl(g,m.mode,p),g.return=m,g;case Kt:var v=g._init;return c(m,v(g._payload),p)}if(Jr(g)||Vr(g))return g=In(g,m.mode,p,null),g.return=m,g;_i(m,g)}return null}function d(m,g,p,v){var _=g!==null?g.key:null;if(typeof p=="string"&&p!==""||typeof p=="number")return _!==null?null:l(m,g,""+p,v);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case fi:return p.key===_?a(m,g,p,v):null;case Yn:return p.key===_?u(m,g,p,v):null;case Kt:return _=p._init,d(m,g,_(p._payload),v)}if(Jr(p)||Vr(p))return _!==null?null:f(m,g,p,v,null);_i(m,p)}return null}function h(m,g,p,v,_){if(typeof v=="string"&&v!==""||typeof v=="number")return m=m.get(p)||null,l(g,m,""+v,_);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case fi:return m=m.get(v.key===null?p:v.key)||null,a(g,m,v,_);case Yn:return m=m.get(v.key===null?p:v.key)||null,u(g,m,v,_);case Kt:var k=v._init;return h(m,g,p,k(v._payload),_)}if(Jr(v)||Vr(v))return m=m.get(p)||null,f(g,m,v,_,null);_i(g,v)}return null}function y(m,g,p,v){for(var _=null,k=null,I=g,b=g=0,H=null;I!==null&&b<p.length;b++){I.index>b?(H=I,I=null):H=I.sibling;var M=d(m,I,p[b],v);if(M===null){I===null&&(I=H);break}e&&I&&M.alternate===null&&t(m,I),g=i(M,g,b),k===null?_=M:k.sibling=M,k=M,I=H}if(b===p.length)return n(m,I),pe&&vn(m,b),_;if(I===null){for(;b<p.length;b++)I=c(m,p[b],v),I!==null&&(g=i(I,g,b),k===null?_=I:k.sibling=I,k=I);return pe&&vn(m,b),_}for(I=r(m,I);b<p.length;b++)H=h(I,m,b,p[b],v),H!==null&&(e&&H.alternate!==null&&I.delete(H.key===null?b:H.key),g=i(H,g,b),k===null?_=H:k.sibling=H,k=H);return e&&I.forEach(function(S){return t(m,S)}),pe&&vn(m,b),_}function w(m,g,p,v){var _=Vr(p);if(typeof _!="function")throw Error(K(150));if(p=_.call(p),p==null)throw Error(K(151));for(var k=_=null,I=g,b=g=0,H=null,M=p.next();I!==null&&!M.done;b++,M=p.next()){I.index>b?(H=I,I=null):H=I.sibling;var S=d(m,I,M.value,v);if(S===null){I===null&&(I=H);break}e&&I&&S.alternate===null&&t(m,I),g=i(S,g,b),k===null?_=S:k.sibling=S,k=S,I=H}if(M.done)return n(m,I),pe&&vn(m,b),_;if(I===null){for(;!M.done;b++,M=p.next())M=c(m,M.value,v),M!==null&&(g=i(M,g,b),k===null?_=M:k.sibling=M,k=M);return pe&&vn(m,b),_}for(I=r(m,I);!M.done;b++,M=p.next())M=h(I,m,b,M.value,v),M!==null&&(e&&M.alternate!==null&&I.delete(M.key===null?b:M.key),g=i(M,g,b),k===null?_=M:k.sibling=M,k=M);return e&&I.forEach(function(L){return t(m,L)}),pe&&vn(m,b),_}function x(m,g,p,v){if(typeof p=="object"&&p!==null&&p.type===Xn&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case fi:e:{for(var _=p.key,k=g;k!==null;){if(k.key===_){if(_=p.type,_===Xn){if(k.tag===7){n(m,k.sibling),g=o(k,p.props.children),g.return=m,m=g;break e}}else if(k.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Kt&&Bf(_)===k.type){n(m,k.sibling),g=o(k,p.props),g.ref=Yr(m,k,p),g.return=m,m=g;break e}n(m,k);break}else t(m,k);k=k.sibling}p.type===Xn?(g=In(p.props.children,m.mode,v,p.key),g.return=m,m=g):(v=Gi(p.type,p.key,p.props,null,m.mode,v),v.ref=Yr(m,g,p),v.return=m,m=v)}return s(m);case Yn:e:{for(k=p.key;g!==null;){if(g.key===k)if(g.tag===4&&g.stateNode.containerInfo===p.containerInfo&&g.stateNode.implementation===p.implementation){n(m,g.sibling),g=o(g,p.children||[]),g.return=m,m=g;break e}else{n(m,g);break}else t(m,g);g=g.sibling}g=Bl(p,m.mode,v),g.return=m,m=g}return s(m);case Kt:return k=p._init,x(m,g,k(p._payload),v)}if(Jr(p))return y(m,g,p,v);if(Vr(p))return w(m,g,p,v);_i(m,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,g!==null&&g.tag===6?(n(m,g.sibling),g=o(g,p),g.return=m,m=g):(n(m,g),g=Hl(p,m.mode,v),g.return=m,m=g),s(m)):n(m,g)}return x}var kr=gg(!0),mg=gg(!1),xs=gn(null),Es=null,tr=null,Uu=null;function Wu(){Uu=tr=Es=null}function Yu(e){var t=xs.current;de(xs),e._currentValue=t}function ja(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function fr(e,t){Es=e,Uu=tr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(He=!0),e.firstContext=null)}function it(e){var t=e._currentValue;if(Uu!==e)if(e={context:e,memoizedValue:t,next:null},tr===null){if(Es===null)throw Error(K(308));tr=e,Es.dependencies={lanes:0,firstContext:e}}else tr=tr.next=e;return t}var Sn=null;function Xu(e){Sn===null?Sn=[e]:Sn.push(e)}function yg(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Xu(t)):(n.next=o.next,o.next=n),t.interleaved=n,Bt(e,r)}function Bt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Zt=!1;function Gu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function $t(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function an(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,se&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Bt(e,n)}return o=r.interleaved,o===null?(t.next=t,Xu(r)):(t.next=o.next,o.next=t),r.interleaved=t,Bt(e,n)}function Hi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ru(e,n)}}function Uf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function _s(e,t,n,r){var o=e.updateQueue;Zt=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?i=u:s.next=u,s=a;var f=e.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==s&&(l===null?f.firstBaseUpdate=u:l.next=u,f.lastBaseUpdate=a))}if(i!==null){var c=o.baseState;s=0,f=u=a=null,l=i;do{var d=l.lane,h=l.eventTime;if((r&d)===d){f!==null&&(f=f.next={eventTime:h,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,w=l;switch(d=t,h=n,w.tag){case 1:if(y=w.payload,typeof y=="function"){c=y.call(h,c,d);break e}c=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=w.payload,d=typeof y=="function"?y.call(h,c,d):y,d==null)break e;c=ve({},c,d);break e;case 2:Zt=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=o.effects,d===null?o.effects=[l]:d.push(l))}else h={eventTime:h,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(u=f=h,a=c):f=f.next=h,s|=d;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;d=l,l=d.next,d.next=null,o.lastBaseUpdate=d,o.shared.pending=null}}while(!0);if(f===null&&(a=c),o.baseState=a,o.firstBaseUpdate=u,o.lastBaseUpdate=f,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);On|=s,e.lanes=s,e.memoizedState=c}}function Wf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(K(191,o));o.call(r)}}}var qo={},It=gn(qo),zo=gn(qo),Oo=gn(qo);function kn(e){if(e===qo)throw Error(K(174));return e}function Qu(e,t){switch(ce(Oo,t),ce(zo,e),ce(It,qo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ya(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ya(t,e)}de(It),ce(It,t)}function Nr(){de(It),de(zo),de(Oo)}function wg(e){kn(Oo.current);var t=kn(It.current),n=ya(t,e.type);t!==n&&(ce(zo,e),ce(It,n))}function Ku(e){zo.current===e&&(de(It),de(zo))}var me=gn(0);function Ss(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 Ol=[];function Zu(){for(var e=0;e<Ol.length;e++)Ol[e]._workInProgressVersionPrimary=null;Ol.length=0}var Bi=Yt.ReactCurrentDispatcher,jl=Yt.ReactCurrentBatchConfig,zn=0,ye=null,Ne=null,Me=null,ks=!1,co=!1,jo=0,sS=0;function be(){throw Error(K(321))}function qu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wt(e[n],t[n]))return!1;return!0}function Ju(e,t,n,r,o,i){if(zn=i,ye=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Bi.current=e===null||e.memoizedState===null?cS:fS,e=n(r,o),co){i=0;do{if(co=!1,jo=0,25<=i)throw Error(K(301));i+=1,Me=Ne=null,t.updateQueue=null,Bi.current=dS,e=n(r,o)}while(co)}if(Bi.current=Ns,t=Ne!==null&&Ne.next!==null,zn=0,Me=Ne=ye=null,ks=!1,t)throw Error(K(300));return e}function ec(){var e=jo!==0;return jo=0,e}function St(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Me===null?ye.memoizedState=Me=e:Me=Me.next=e,Me}function st(){if(Ne===null){var e=ye.alternate;e=e!==null?e.memoizedState:null}else e=Ne.next;var t=Me===null?ye.memoizedState:Me.next;if(t!==null)Me=t,Ne=e;else{if(e===null)throw Error(K(310));Ne=e,e={memoizedState:Ne.memoizedState,baseState:Ne.baseState,baseQueue:Ne.baseQueue,queue:Ne.queue,next:null},Me===null?ye.memoizedState=Me=e:Me=Me.next=e}return Me}function $o(e,t){return typeof t=="function"?t(e):t}function $l(e){var t=st(),n=t.queue;if(n===null)throw Error(K(311));n.lastRenderedReducer=e;var r=Ne,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var l=s=null,a=null,u=i;do{var f=u.lane;if((zn&f)===f)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var c={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=c,s=r):a=a.next=c,ye.lanes|=f,On|=f}u=u.next}while(u!==null&&u!==i);a===null?s=r:a.next=l,wt(r,t.memoizedState)||(He=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,ye.lanes|=i,On|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Dl(e){var t=st(),n=t.queue;if(n===null)throw Error(K(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);wt(i,t.memoizedState)||(He=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function xg(){}function Eg(e,t){var n=ye,r=st(),o=t(),i=!wt(r.memoizedState,o);if(i&&(r.memoizedState=o,He=!0),r=r.queue,tc(kg.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Me!==null&&Me.memoizedState.tag&1){if(n.flags|=2048,Do(9,Sg.bind(null,n,r,o,t),void 0,null),Ie===null)throw Error(K(349));zn&30||_g(n,t,o)}return o}function _g(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ye.updateQueue,t===null?(t={lastEffect:null,stores:null},ye.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Sg(e,t,n,r){t.value=n,t.getSnapshot=r,Ng(t)&&Cg(e)}function kg(e,t,n){return n(function(){Ng(t)&&Cg(e)})}function Ng(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wt(e,n)}catch{return!0}}function Cg(e){var t=Bt(e,1);t!==null&&vt(t,e,1,-1)}function Yf(e){var t=St();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:e},t.queue=e,e=e.dispatch=uS.bind(null,ye,e),[t.memoizedState,e]}function Do(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ye.updateQueue,t===null?(t={lastEffect:null,stores:null},ye.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Mg(){return st().memoizedState}function Ui(e,t,n,r){var o=St();ye.flags|=e,o.memoizedState=Do(1|t,n,void 0,r===void 0?null:r)}function Qs(e,t,n,r){var o=st();r=r===void 0?null:r;var i=void 0;if(Ne!==null){var s=Ne.memoizedState;if(i=s.destroy,r!==null&&qu(r,s.deps)){o.memoizedState=Do(t,n,i,r);return}}ye.flags|=e,o.memoizedState=Do(1|t,n,i,r)}function Xf(e,t){return Ui(8390656,8,e,t)}function tc(e,t){return Qs(2048,8,e,t)}function Ig(e,t){return Qs(4,2,e,t)}function Pg(e,t){return Qs(4,4,e,t)}function Tg(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Lg(e,t,n){return n=n!=null?n.concat([e]):null,Qs(4,4,Tg.bind(null,t,e),n)}function nc(){}function bg(e,t){var n=st();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&qu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Rg(e,t){var n=st();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&qu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ag(e,t,n){return zn&21?(wt(n,t)||(n=Dp(),ye.lanes|=n,On|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,He=!0),e.memoizedState=n)}function lS(e,t){var n=ae;ae=n!==0&&4>n?n:4,e(!0);var r=jl.transition;jl.transition={};try{e(!1),t()}finally{ae=n,jl.transition=r}}function zg(){return st().memoizedState}function aS(e,t,n){var r=cn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Og(e))jg(t,n);else if(n=yg(e,t,n,r),n!==null){var o=je();vt(n,e,r,o),$g(n,t,r)}}function uS(e,t,n){var r=cn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Og(e))jg(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,wt(l,s)){var a=t.interleaved;a===null?(o.next=o,Xu(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=yg(e,t,o,r),n!==null&&(o=je(),vt(n,e,r,o),$g(n,t,r))}}function Og(e){var t=e.alternate;return e===ye||t!==null&&t===ye}function jg(e,t){co=ks=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function $g(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ru(e,n)}}var Ns={readContext:it,useCallback:be,useContext:be,useEffect:be,useImperativeHandle:be,useInsertionEffect:be,useLayoutEffect:be,useMemo:be,useReducer:be,useRef:be,useState:be,useDebugValue:be,useDeferredValue:be,useTransition:be,useMutableSource:be,useSyncExternalStore:be,useId:be,unstable_isNewReconciler:!1},cS={readContext:it,useCallback:function(e,t){return St().memoizedState=[e,t===void 0?null:t],e},useContext:it,useEffect:Xf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ui(4194308,4,Tg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ui(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ui(4,2,e,t)},useMemo:function(e,t){var n=St();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=St();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=aS.bind(null,ye,e),[r.memoizedState,e]},useRef:function(e){var t=St();return e={current:e},t.memoizedState=e},useState:Yf,useDebugValue:nc,useDeferredValue:function(e){return St().memoizedState=e},useTransition:function(){var e=Yf(!1),t=e[0];return e=lS.bind(null,e[1]),St().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ye,o=St();if(pe){if(n===void 0)throw Error(K(407));n=n()}else{if(n=t(),Ie===null)throw Error(K(349));zn&30||_g(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Xf(kg.bind(null,r,i,e),[e]),r.flags|=2048,Do(9,Sg.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=St(),t=Ie.identifierPrefix;if(pe){var n=jt,r=Ot;n=(r&~(1<<32-yt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=jo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=sS++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},fS={readContext:it,useCallback:bg,useContext:it,useEffect:tc,useImperativeHandle:Lg,useInsertionEffect:Ig,useLayoutEffect:Pg,useMemo:Rg,useReducer:$l,useRef:Mg,useState:function(){return $l($o)},useDebugValue:nc,useDeferredValue:function(e){var t=st();return Ag(t,Ne.memoizedState,e)},useTransition:function(){var e=$l($o)[0],t=st().memoizedState;return[e,t]},useMutableSource:xg,useSyncExternalStore:Eg,useId:zg,unstable_isNewReconciler:!1},dS={readContext:it,useCallback:bg,useContext:it,useEffect:tc,useImperativeHandle:Lg,useInsertionEffect:Ig,useLayoutEffect:Pg,useMemo:Rg,useReducer:Dl,useRef:Mg,useState:function(){return Dl($o)},useDebugValue:nc,useDeferredValue:function(e){var t=st();return Ne===null?t.memoizedState=e:Ag(t,Ne.memoizedState,e)},useTransition:function(){var e=Dl($o)[0],t=st().memoizedState;return[e,t]},useMutableSource:xg,useSyncExternalStore:Eg,useId:zg,unstable_isNewReconciler:!1};function ut(e,t){if(e&&e.defaultProps){t=ve({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function $a(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ve({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ks={isMounted:function(e){return(e=e._reactInternals)?Vn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=je(),o=cn(e),i=$t(r,o);i.payload=t,n!=null&&(i.callback=n),t=an(e,i,o),t!==null&&(vt(t,e,o,r),Hi(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=je(),o=cn(e),i=$t(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=an(e,i,o),t!==null&&(vt(t,e,o,r),Hi(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=je(),r=cn(e),o=$t(n,r);o.tag=2,t!=null&&(o.callback=t),t=an(e,o,r),t!==null&&(vt(t,e,r,n),Hi(t,e,r))}};function Gf(e,t,n,r,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!Lo(n,r)||!Lo(o,i):!0}function Dg(e,t,n){var r=!1,o=hn,i=t.contextType;return typeof i=="object"&&i!==null?i=it(i):(o=Ue(t)?Rn:ze.current,r=t.contextTypes,i=(r=r!=null)?_r(e,o):hn),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ks,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Qf(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ks.enqueueReplaceState(t,t.state,null)}function Da(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Gu(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=it(i):(i=Ue(t)?Rn:ze.current,o.context=_r(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&($a(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Ks.enqueueReplaceState(o,o.state,null),_s(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Cr(e,t){try{var n="",r=t;do n+=FE(r),r=r.return;while(r);var o=n}catch(i){o=`
|
|
55
|
+
Error generating stack: `+i.message+`
|
|
56
|
+
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Fl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Fa(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var hS=typeof WeakMap=="function"?WeakMap:Map;function Fg(e,t,n){n=$t(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ms||(Ms=!0,Ka=r),Fa(e,t)},n}function Vg(e,t,n){n=$t(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Fa(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Fa(e,t),typeof r!="function"&&(un===null?un=new Set([this]):un.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Kf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new hS;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=MS.bind(null,e,t,n),t.then(e,e))}function Zf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function qf(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=$t(-1,1),t.tag=2,an(n,t,1))),n.lanes|=1),e)}var pS=Yt.ReactCurrentOwner,He=!1;function Oe(e,t,n,r){t.child=e===null?mg(t,null,n,r):kr(t,e.child,n,r)}function Jf(e,t,n,r,o){n=n.render;var i=t.ref;return fr(t,o),r=Ju(e,t,n,r,i,o),n=ec(),e!==null&&!He?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ut(e,t,o)):(pe&&n&&Vu(t),t.flags|=1,Oe(e,t,r,o),t.child)}function ed(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!cc(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Hg(e,t,i,r,o)):(e=Gi(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:Lo,n(s,r)&&e.ref===t.ref)return Ut(e,t,o)}return t.flags|=1,e=fn(i,r),e.ref=t.ref,e.return=t,t.child=e}function Hg(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Lo(i,r)&&e.ref===t.ref)if(He=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(He=!0);else return t.lanes=e.lanes,Ut(e,t,o)}return Va(e,t,n,r,o)}function Bg(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ce(rr,Ye),Ye|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ce(rr,Ye),Ye|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ce(rr,Ye),Ye|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ce(rr,Ye),Ye|=r;return Oe(e,t,o,n),t.child}function Ug(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Va(e,t,n,r,o){var i=Ue(n)?Rn:ze.current;return i=_r(t,i),fr(t,o),n=Ju(e,t,n,r,i,o),r=ec(),e!==null&&!He?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ut(e,t,o)):(pe&&r&&Vu(t),t.flags|=1,Oe(e,t,n,o),t.child)}function td(e,t,n,r,o){if(Ue(n)){var i=!0;ys(t)}else i=!1;if(fr(t,o),t.stateNode===null)Wi(e,t),Dg(t,n,r),Da(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var a=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=it(u):(u=Ue(n)?Rn:ze.current,u=_r(t,u));var f=n.getDerivedStateFromProps,c=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";c||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||a!==u)&&Qf(t,s,r,u),Zt=!1;var d=t.memoizedState;s.state=d,_s(t,r,s,o),a=t.memoizedState,l!==r||d!==a||Be.current||Zt?(typeof f=="function"&&($a(t,n,f,r),a=t.memoizedState),(l=Zt||Gf(t,n,l,r,d,a,u))?(c||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=u,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,vg(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:ut(t.type,l),s.props=u,c=t.pendingProps,d=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=it(a):(a=Ue(n)?Rn:ze.current,a=_r(t,a));var h=n.getDerivedStateFromProps;(f=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==c||d!==a)&&Qf(t,s,r,a),Zt=!1,d=t.memoizedState,s.state=d,_s(t,r,s,o);var y=t.memoizedState;l!==c||d!==y||Be.current||Zt?(typeof h=="function"&&($a(t,n,h,r),y=t.memoizedState),(u=Zt||Gf(t,n,u,r,d,y,a)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,y,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,y,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),s.props=r,s.state=y,s.context=a,r=u):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Ha(e,t,n,r,i,o)}function Ha(e,t,n,r,o,i){Ug(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&Ff(t,n,!1),Ut(e,t,i);r=t.stateNode,pS.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=kr(t,e.child,null,i),t.child=kr(t,null,l,i)):Oe(e,t,l,i),t.memoizedState=r.state,o&&Ff(t,n,!0),t.child}function Wg(e){var t=e.stateNode;t.pendingContext?Df(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Df(e,t.context,!1),Qu(e,t.containerInfo)}function nd(e,t,n,r,o){return Sr(),Bu(o),t.flags|=256,Oe(e,t,n,r),t.child}var Ba={dehydrated:null,treeContext:null,retryLane:0};function Ua(e){return{baseLanes:e,cachePool:null,transitions:null}}function Yg(e,t,n){var r=t.pendingProps,o=me.current,i=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ce(me,o&1),e===null)return Oa(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=s):i=Js(s,r,0,null),e=In(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Ua(n),t.memoizedState=Ba,e):rc(t,s));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return gS(e,t,s,r,l,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,l=o.sibling;var a={mode:"hidden",children:r.children};return!(s&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=fn(o,a),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?i=fn(l,i):(i=In(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?Ua(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=Ba,r}return i=e.child,e=i.sibling,r=fn(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function rc(e,t){return t=Js({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Si(e,t,n,r){return r!==null&&Bu(r),kr(t,e.child,null,n),e=rc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function gS(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=Fl(Error(K(422))),Si(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Js({mode:"visible",children:r.children},o,0,null),i=In(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&kr(t,e.child,null,s),t.child.memoizedState=Ua(s),t.memoizedState=Ba,i);if(!(t.mode&1))return Si(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(K(419)),r=Fl(i,r,void 0),Si(e,t,s,r)}if(l=(s&e.childLanes)!==0,He||l){if(r=Ie,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|s)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Bt(e,o),vt(r,e,o,-1))}return uc(),r=Fl(Error(K(421))),Si(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=IS.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Ge=ln(o.nextSibling),Qe=t,pe=!0,ht=null,e!==null&&(tt[nt++]=Ot,tt[nt++]=jt,tt[nt++]=An,Ot=e.id,jt=e.overflow,An=t),t=rc(t,r.children),t.flags|=4096,t)}function rd(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ja(e.return,t,n)}function Vl(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Xg(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Oe(e,t,r.children,n),r=me.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rd(e,n,t);else if(e.tag===19)rd(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}r&=1}if(ce(me,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Ss(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Vl(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Ss(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Vl(t,!0,n,null,i);break;case"together":Vl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Wi(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ut(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),On|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(K(153));if(t.child!==null){for(e=t.child,n=fn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function mS(e,t,n){switch(t.tag){case 3:Wg(t),Sr();break;case 5:wg(t);break;case 1:Ue(t.type)&&ys(t);break;case 4:Qu(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ce(xs,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ce(me,me.current&1),t.flags|=128,null):n&t.child.childLanes?Yg(e,t,n):(ce(me,me.current&1),e=Ut(e,t,n),e!==null?e.sibling:null);ce(me,me.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Xg(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ce(me,me.current),r)break;return null;case 22:case 23:return t.lanes=0,Bg(e,t,n)}return Ut(e,t,n)}var Gg,Wa,Qg,Kg;Gg=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Wa=function(){};Qg=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,kn(It.current);var i=null;switch(n){case"input":o=ha(e,o),r=ha(e,r),i=[];break;case"select":o=ve({},o,{value:void 0}),r=ve({},r,{value:void 0}),i=[];break;case"textarea":o=ma(e,o),r=ma(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=gs)}va(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var l=o[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ko.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var a=r[u];if(l=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(s in l)!l.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&l[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(i||(i=[]),i.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(i=i||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(i=i||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ko.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&fe("scroll",e),i||l===a||(i=[])):(i=i||[]).push(u,a))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};Kg=function(e,t,n,r){n!==r&&(t.flags|=4)};function Xr(e,t){if(!pe)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 r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Re(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function yS(e,t,n){var r=t.pendingProps;switch(Hu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Re(t),null;case 1:return Ue(t.type)&&ms(),Re(t),null;case 3:return r=t.stateNode,Nr(),de(Be),de(ze),Zu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ei(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ht!==null&&(Ja(ht),ht=null))),Wa(e,t),Re(t),null;case 5:Ku(t);var o=kn(Oo.current);if(n=t.type,e!==null&&t.stateNode!=null)Qg(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(K(166));return Re(t),null}if(e=kn(It.current),Ei(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Nt]=t,r[Ao]=i,e=(t.mode&1)!==0,n){case"dialog":fe("cancel",r),fe("close",r);break;case"iframe":case"object":case"embed":fe("load",r);break;case"video":case"audio":for(o=0;o<to.length;o++)fe(to[o],r);break;case"source":fe("error",r);break;case"img":case"image":case"link":fe("error",r),fe("load",r);break;case"details":fe("toggle",r);break;case"input":df(r,i),fe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},fe("invalid",r);break;case"textarea":pf(r,i),fe("invalid",r)}va(n,i),o=null;for(var s in i)if(i.hasOwnProperty(s)){var l=i[s];s==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&xi(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&xi(r.textContent,l,e),o=["children",""+l]):ko.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&fe("scroll",r)}switch(n){case"input":di(r),hf(r,i,!0);break;case"textarea":di(r),gf(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=gs)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=kp(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Nt]=t,e[Ao]=r,Gg(e,t,!1,!1),t.stateNode=e;e:{switch(s=wa(n,r),n){case"dialog":fe("cancel",e),fe("close",e),o=r;break;case"iframe":case"object":case"embed":fe("load",e),o=r;break;case"video":case"audio":for(o=0;o<to.length;o++)fe(to[o],e);o=r;break;case"source":fe("error",e),o=r;break;case"img":case"image":case"link":fe("error",e),fe("load",e),o=r;break;case"details":fe("toggle",e),o=r;break;case"input":df(e,r),o=ha(e,r),fe("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ve({},r,{value:void 0}),fe("invalid",e);break;case"textarea":pf(e,r),o=ma(e,r),fe("invalid",e);break;default:o=r}va(n,o),l=o;for(i in l)if(l.hasOwnProperty(i)){var a=l[i];i==="style"?Mp(e,a):i==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&Np(e,a)):i==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&No(e,a):typeof a=="number"&&No(e,""+a):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(ko.hasOwnProperty(i)?a!=null&&i==="onScroll"&&fe("scroll",e):a!=null&&Mu(e,i,a,s))}switch(n){case"input":di(e),hf(e,r,!1);break;case"textarea":di(e),gf(e);break;case"option":r.value!=null&&e.setAttribute("value",""+dn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?lr(e,!!r.multiple,i,!1):r.defaultValue!=null&&lr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=gs)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Re(t),null;case 6:if(e&&t.stateNode!=null)Kg(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(K(166));if(n=kn(Oo.current),kn(It.current),Ei(t)){if(r=t.stateNode,n=t.memoizedProps,r[Nt]=t,(i=r.nodeValue!==n)&&(e=Qe,e!==null))switch(e.tag){case 3:xi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&xi(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Nt]=t,t.stateNode=r}return Re(t),null;case 13:if(de(me),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(pe&&Ge!==null&&t.mode&1&&!(t.flags&128))pg(),Sr(),t.flags|=98560,i=!1;else if(i=Ei(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(K(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(K(317));i[Nt]=t}else Sr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Re(t),i=!1}else ht!==null&&(Ja(ht),ht=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||me.current&1?Ce===0&&(Ce=3):uc())),t.updateQueue!==null&&(t.flags|=4),Re(t),null);case 4:return Nr(),Wa(e,t),e===null&&bo(t.stateNode.containerInfo),Re(t),null;case 10:return Yu(t.type._context),Re(t),null;case 17:return Ue(t.type)&&ms(),Re(t),null;case 19:if(de(me),i=t.memoizedState,i===null)return Re(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)Xr(i,!1);else{if(Ce!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Ss(e),s!==null){for(t.flags|=128,Xr(i,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ce(me,me.current&1|2),t.child}e=e.sibling}i.tail!==null&&xe()>Mr&&(t.flags|=128,r=!0,Xr(i,!1),t.lanes=4194304)}else{if(!r)if(e=Ss(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Xr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!pe)return Re(t),null}else 2*xe()-i.renderingStartTime>Mr&&n!==1073741824&&(t.flags|=128,r=!0,Xr(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=xe(),t.sibling=null,n=me.current,ce(me,r?n&1|2:n&1),t):(Re(t),null);case 22:case 23:return ac(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ye&1073741824&&(Re(t),t.subtreeFlags&6&&(t.flags|=8192)):Re(t),null;case 24:return null;case 25:return null}throw Error(K(156,t.tag))}function vS(e,t){switch(Hu(t),t.tag){case 1:return Ue(t.type)&&ms(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Nr(),de(Be),de(ze),Zu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ku(t),null;case 13:if(de(me),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(K(340));Sr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return de(me),null;case 4:return Nr(),null;case 10:return Yu(t.type._context),null;case 22:case 23:return ac(),null;case 24:return null;default:return null}}var ki=!1,Ae=!1,wS=typeof WeakSet=="function"?WeakSet:Set,q=null;function nr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){we(e,t,r)}else n.current=null}function Ya(e,t,n){try{n()}catch(r){we(e,t,r)}}var od=!1;function xS(e,t){if(Pa=ds,e=tg(),Fu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,f=0,c=e,d=null;t:for(;;){for(var h;c!==n||o!==0&&c.nodeType!==3||(l=s+o),c!==i||r!==0&&c.nodeType!==3||(a=s+r),c.nodeType===3&&(s+=c.nodeValue.length),(h=c.firstChild)!==null;)d=c,c=h;for(;;){if(c===e)break t;if(d===n&&++u===o&&(l=s),d===i&&++f===r&&(a=s),(h=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=h}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ta={focusedElem:e,selectionRange:n},ds=!1,q=t;q!==null;)if(t=q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,q=e;else for(;q!==null;){t=q;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var w=y.memoizedProps,x=y.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?w:ut(t.type,w),x);m.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(K(163))}}catch(v){we(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,q=e;break}q=t.return}return y=od,od=!1,y}function fo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Ya(t,n,i)}o=o.next}while(o!==r)}}function Zs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Xa(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Zg(e){var t=e.alternate;t!==null&&(e.alternate=null,Zg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Nt],delete t[Ao],delete t[Ra],delete t[nS],delete t[rS])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function qg(e){return e.tag===5||e.tag===3||e.tag===4}function id(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||qg(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.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 Ga(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=gs));else if(r!==4&&(e=e.child,e!==null))for(Ga(e,t,n),e=e.sibling;e!==null;)Ga(e,t,n),e=e.sibling}function Qa(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Qa(e,t,n),e=e.sibling;e!==null;)Qa(e,t,n),e=e.sibling}var Pe=null,dt=!1;function Qt(e,t,n){for(n=n.child;n!==null;)Jg(e,t,n),n=n.sibling}function Jg(e,t,n){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(Bs,n)}catch{}switch(n.tag){case 5:Ae||nr(n,t);case 6:var r=Pe,o=dt;Pe=null,Qt(e,t,n),Pe=r,dt=o,Pe!==null&&(dt?(e=Pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pe.removeChild(n.stateNode));break;case 18:Pe!==null&&(dt?(e=Pe,n=n.stateNode,e.nodeType===8?Al(e.parentNode,n):e.nodeType===1&&Al(e,n),Po(e)):Al(Pe,n.stateNode));break;case 4:r=Pe,o=dt,Pe=n.stateNode.containerInfo,dt=!0,Qt(e,t,n),Pe=r,dt=o;break;case 0:case 11:case 14:case 15:if(!Ae&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Ya(n,t,s),o=o.next}while(o!==r)}Qt(e,t,n);break;case 1:if(!Ae&&(nr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){we(n,t,l)}Qt(e,t,n);break;case 21:Qt(e,t,n);break;case 22:n.mode&1?(Ae=(r=Ae)||n.memoizedState!==null,Qt(e,t,n),Ae=r):Qt(e,t,n);break;default:Qt(e,t,n)}}function sd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new wS),t.forEach(function(r){var o=PS.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function at(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 5:Pe=l.stateNode,dt=!1;break e;case 3:Pe=l.stateNode.containerInfo,dt=!0;break e;case 4:Pe=l.stateNode.containerInfo,dt=!0;break e}l=l.return}if(Pe===null)throw Error(K(160));Jg(i,s,o),Pe=null,dt=!1;var a=o.alternate;a!==null&&(a.return=null),o.return=null}catch(u){we(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)em(t,e),t=t.sibling}function em(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(at(t,e),_t(e),r&4){try{fo(3,e,e.return),Zs(3,e)}catch(w){we(e,e.return,w)}try{fo(5,e,e.return)}catch(w){we(e,e.return,w)}}break;case 1:at(t,e),_t(e),r&512&&n!==null&&nr(n,n.return);break;case 5:if(at(t,e),_t(e),r&512&&n!==null&&nr(n,n.return),e.flags&32){var o=e.stateNode;try{No(o,"")}catch(w){we(e,e.return,w)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,s=n!==null?n.memoizedProps:i,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&_p(o,i),wa(l,s);var u=wa(l,i);for(s=0;s<a.length;s+=2){var f=a[s],c=a[s+1];f==="style"?Mp(o,c):f==="dangerouslySetInnerHTML"?Np(o,c):f==="children"?No(o,c):Mu(o,f,c,u)}switch(l){case"input":pa(o,i);break;case"textarea":Sp(o,i);break;case"select":var d=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?lr(o,!!i.multiple,h,!1):d!==!!i.multiple&&(i.defaultValue!=null?lr(o,!!i.multiple,i.defaultValue,!0):lr(o,!!i.multiple,i.multiple?[]:"",!1))}o[Ao]=i}catch(w){we(e,e.return,w)}}break;case 6:if(at(t,e),_t(e),r&4){if(e.stateNode===null)throw Error(K(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(w){we(e,e.return,w)}}break;case 3:if(at(t,e),_t(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Po(t.containerInfo)}catch(w){we(e,e.return,w)}break;case 4:at(t,e),_t(e);break;case 13:at(t,e),_t(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(sc=xe())),r&4&&sd(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(Ae=(u=Ae)||f,at(t,e),Ae=u):at(t,e),_t(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&e.mode&1)for(q=e,f=e.child;f!==null;){for(c=q=f;q!==null;){switch(d=q,h=d.child,d.tag){case 0:case 11:case 14:case 15:fo(4,d,d.return);break;case 1:nr(d,d.return);var y=d.stateNode;if(typeof y.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(w){we(r,n,w)}}break;case 5:nr(d,d.return);break;case 22:if(d.memoizedState!==null){ad(c);continue}}h!==null?(h.return=d,q=h):ad(c)}f=f.sibling}e:for(f=null,c=e;;){if(c.tag===5){if(f===null){f=c;try{o=c.stateNode,u?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=c.stateNode,a=c.memoizedProps.style,s=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=Cp("display",s))}catch(w){we(e,e.return,w)}}}else if(c.tag===6){if(f===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(w){we(e,e.return,w)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;f===c&&(f=null),c=c.return}f===c&&(f=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:at(t,e),_t(e),r&4&&sd(e);break;case 21:break;default:at(t,e),_t(e)}}function _t(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(qg(n)){var r=n;break e}n=n.return}throw Error(K(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(No(o,""),r.flags&=-33);var i=id(e);Qa(e,i,o);break;case 3:case 4:var s=r.stateNode.containerInfo,l=id(e);Ga(e,l,s);break;default:throw Error(K(161))}}catch(a){we(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ES(e,t,n){q=e,tm(e)}function tm(e,t,n){for(var r=(e.mode&1)!==0;q!==null;){var o=q,i=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||ki;if(!s){var l=o.alternate,a=l!==null&&l.memoizedState!==null||Ae;l=ki;var u=Ae;if(ki=s,(Ae=a)&&!u)for(q=o;q!==null;)s=q,a=s.child,s.tag===22&&s.memoizedState!==null?ud(o):a!==null?(a.return=s,q=a):ud(o);for(;i!==null;)q=i,tm(i),i=i.sibling;q=o,ki=l,Ae=u}ld(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,q=i):ld(e)}}function ld(e){for(;q!==null;){var t=q;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ae||Zs(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ae)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:ut(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Wf(t,i,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Wf(t,s,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var f=u.memoizedState;if(f!==null){var c=f.dehydrated;c!==null&&Po(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(K(163))}Ae||t.flags&512&&Xa(t)}catch(d){we(t,t.return,d)}}if(t===e){q=null;break}if(n=t.sibling,n!==null){n.return=t.return,q=n;break}q=t.return}}function ad(e){for(;q!==null;){var t=q;if(t===e){q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,q=n;break}q=t.return}}function ud(e){for(;q!==null;){var t=q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Zs(4,t)}catch(a){we(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(a){we(t,o,a)}}var i=t.return;try{Xa(t)}catch(a){we(t,i,a)}break;case 5:var s=t.return;try{Xa(t)}catch(a){we(t,s,a)}}}catch(a){we(t,t.return,a)}if(t===e){q=null;break}var l=t.sibling;if(l!==null){l.return=t.return,q=l;break}q=t.return}}var _S=Math.ceil,Cs=Yt.ReactCurrentDispatcher,oc=Yt.ReactCurrentOwner,ot=Yt.ReactCurrentBatchConfig,se=0,Ie=null,Ee=null,Te=0,Ye=0,rr=gn(0),Ce=0,Fo=null,On=0,qs=0,ic=0,ho=null,Fe=null,sc=0,Mr=1/0,Rt=null,Ms=!1,Ka=null,un=null,Ni=!1,nn=null,Is=0,po=0,Za=null,Yi=-1,Xi=0;function je(){return se&6?xe():Yi!==-1?Yi:Yi=xe()}function cn(e){return e.mode&1?se&2&&Te!==0?Te&-Te:iS.transition!==null?(Xi===0&&(Xi=Dp()),Xi):(e=ae,e!==0||(e=window.event,e=e===void 0?16:Yp(e.type)),e):1}function vt(e,t,n,r){if(50<po)throw po=0,Za=null,Error(K(185));Qo(e,n,r),(!(se&2)||e!==Ie)&&(e===Ie&&(!(se&2)&&(qs|=n),Ce===4&&en(e,Te)),We(e,r),n===1&&se===0&&!(t.mode&1)&&(Mr=xe()+500,Gs&&mn()))}function We(e,t){var n=e.callbackNode;i_(e,t);var r=fs(e,e===Ie?Te:0);if(r===0)n!==null&&vf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&vf(n),t===1)e.tag===0?oS(cd.bind(null,e)):fg(cd.bind(null,e)),eS(function(){!(se&6)&&mn()}),n=null;else{switch(Fp(r)){case 1:n=bu;break;case 4:n=jp;break;case 16:n=cs;break;case 536870912:n=$p;break;default:n=cs}n=um(n,nm.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function nm(e,t){if(Yi=-1,Xi=0,se&6)throw Error(K(327));var n=e.callbackNode;if(dr()&&e.callbackNode!==n)return null;var r=fs(e,e===Ie?Te:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ps(e,r);else{t=r;var o=se;se|=2;var i=om();(Ie!==e||Te!==t)&&(Rt=null,Mr=xe()+500,Mn(e,t));do try{NS();break}catch(l){rm(e,l)}while(!0);Wu(),Cs.current=i,se=o,Ee!==null?t=0:(Ie=null,Te=0,t=Ce)}if(t!==0){if(t===2&&(o=ka(e),o!==0&&(r=o,t=qa(e,o))),t===1)throw n=Fo,Mn(e,0),en(e,r),We(e,xe()),n;if(t===6)en(e,r);else{if(o=e.current.alternate,!(r&30)&&!SS(o)&&(t=Ps(e,r),t===2&&(i=ka(e),i!==0&&(r=i,t=qa(e,i))),t===1))throw n=Fo,Mn(e,0),en(e,r),We(e,xe()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(K(345));case 2:wn(e,Fe,Rt);break;case 3:if(en(e,r),(r&130023424)===r&&(t=sc+500-xe(),10<t)){if(fs(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){je(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ba(wn.bind(null,e,Fe,Rt),t);break}wn(e,Fe,Rt);break;case 4:if(en(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-yt(r);i=1<<s,s=t[s],s>o&&(o=s),r&=~i}if(r=o,r=xe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*_S(r/1960))-r,10<r){e.timeoutHandle=ba(wn.bind(null,e,Fe,Rt),r);break}wn(e,Fe,Rt);break;case 5:wn(e,Fe,Rt);break;default:throw Error(K(329))}}}return We(e,xe()),e.callbackNode===n?nm.bind(null,e):null}function qa(e,t){var n=ho;return e.current.memoizedState.isDehydrated&&(Mn(e,t).flags|=256),e=Ps(e,t),e!==2&&(t=Fe,Fe=n,t!==null&&Ja(t)),e}function Ja(e){Fe===null?Fe=e:Fe.push.apply(Fe,e)}function SS(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!wt(i(),o))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 en(e,t){for(t&=~ic,t&=~qs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-yt(t),r=1<<n;e[n]=-1,t&=~r}}function cd(e){if(se&6)throw Error(K(327));dr();var t=fs(e,0);if(!(t&1))return We(e,xe()),null;var n=Ps(e,t);if(e.tag!==0&&n===2){var r=ka(e);r!==0&&(t=r,n=qa(e,r))}if(n===1)throw n=Fo,Mn(e,0),en(e,t),We(e,xe()),n;if(n===6)throw Error(K(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wn(e,Fe,Rt),We(e,xe()),null}function lc(e,t){var n=se;se|=1;try{return e(t)}finally{se=n,se===0&&(Mr=xe()+500,Gs&&mn())}}function jn(e){nn!==null&&nn.tag===0&&!(se&6)&&dr();var t=se;se|=1;var n=ot.transition,r=ae;try{if(ot.transition=null,ae=1,e)return e()}finally{ae=r,ot.transition=n,se=t,!(se&6)&&mn()}}function ac(){Ye=rr.current,de(rr)}function Mn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,J_(n)),Ee!==null)for(n=Ee.return;n!==null;){var r=n;switch(Hu(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ms();break;case 3:Nr(),de(Be),de(ze),Zu();break;case 5:Ku(r);break;case 4:Nr();break;case 13:de(me);break;case 19:de(me);break;case 10:Yu(r.type._context);break;case 22:case 23:ac()}n=n.return}if(Ie=e,Ee=e=fn(e.current,null),Te=Ye=t,Ce=0,Fo=null,ic=qs=On=0,Fe=ho=null,Sn!==null){for(t=0;t<Sn.length;t++)if(n=Sn[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var s=i.next;i.next=o,r.next=s}n.pending=r}Sn=null}return e}function rm(e,t){do{var n=Ee;try{if(Wu(),Bi.current=Ns,ks){for(var r=ye.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}ks=!1}if(zn=0,Me=Ne=ye=null,co=!1,jo=0,oc.current=null,n===null||n.return===null){Ce=1,Fo=t,Ee=null;break}e:{var i=e,s=n.return,l=n,a=t;if(t=Te,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,f=l,c=f.tag;if(!(f.mode&1)&&(c===0||c===11||c===15)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=Zf(s);if(h!==null){h.flags&=-257,qf(h,s,l,i,t),h.mode&1&&Kf(i,u,t),t=h,a=u;var y=t.updateQueue;if(y===null){var w=new Set;w.add(a),t.updateQueue=w}else y.add(a);break e}else{if(!(t&1)){Kf(i,u,t),uc();break e}a=Error(K(426))}}else if(pe&&l.mode&1){var x=Zf(s);if(x!==null){!(x.flags&65536)&&(x.flags|=256),qf(x,s,l,i,t),Bu(Cr(a,l));break e}}i=a=Cr(a,l),Ce!==4&&(Ce=2),ho===null?ho=[i]:ho.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=Fg(i,a,t);Uf(i,m);break e;case 1:l=a;var g=i.type,p=i.stateNode;if(!(i.flags&128)&&(typeof g.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(un===null||!un.has(p)))){i.flags|=65536,t&=-t,i.lanes|=t;var v=Vg(i,l,t);Uf(i,v);break e}}i=i.return}while(i!==null)}sm(n)}catch(_){t=_,Ee===n&&n!==null&&(Ee=n=n.return);continue}break}while(!0)}function om(){var e=Cs.current;return Cs.current=Ns,e===null?Ns:e}function uc(){(Ce===0||Ce===3||Ce===2)&&(Ce=4),Ie===null||!(On&268435455)&&!(qs&268435455)||en(Ie,Te)}function Ps(e,t){var n=se;se|=2;var r=om();(Ie!==e||Te!==t)&&(Rt=null,Mn(e,t));do try{kS();break}catch(o){rm(e,o)}while(!0);if(Wu(),se=n,Cs.current=r,Ee!==null)throw Error(K(261));return Ie=null,Te=0,Ce}function kS(){for(;Ee!==null;)im(Ee)}function NS(){for(;Ee!==null&&!KE();)im(Ee)}function im(e){var t=am(e.alternate,e,Ye);e.memoizedProps=e.pendingProps,t===null?sm(e):Ee=t,oc.current=null}function sm(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=vS(n,t),n!==null){n.flags&=32767,Ee=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ce=6,Ee=null;return}}else if(n=yS(n,t,Ye),n!==null){Ee=n;return}if(t=t.sibling,t!==null){Ee=t;return}Ee=t=e}while(t!==null);Ce===0&&(Ce=5)}function wn(e,t,n){var r=ae,o=ot.transition;try{ot.transition=null,ae=1,CS(e,t,n,r)}finally{ot.transition=o,ae=r}return null}function CS(e,t,n,r){do dr();while(nn!==null);if(se&6)throw Error(K(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(K(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(s_(e,i),e===Ie&&(Ee=Ie=null,Te=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ni||(Ni=!0,um(cs,function(){return dr(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=ot.transition,ot.transition=null;var s=ae;ae=1;var l=se;se|=4,oc.current=null,xS(e,n),em(n,e),Y_(Ta),ds=!!Pa,Ta=Pa=null,e.current=n,ES(n),ZE(),se=l,ae=s,ot.transition=i}else e.current=n;if(Ni&&(Ni=!1,nn=e,Is=o),i=e.pendingLanes,i===0&&(un=null),e_(n.stateNode),We(e,xe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Ms)throw Ms=!1,e=Ka,Ka=null,e;return Is&1&&e.tag!==0&&dr(),i=e.pendingLanes,i&1?e===Za?po++:(po=0,Za=e):po=0,mn(),null}function dr(){if(nn!==null){var e=Fp(Is),t=ot.transition,n=ae;try{if(ot.transition=null,ae=16>e?16:e,nn===null)var r=!1;else{if(e=nn,nn=null,Is=0,se&6)throw Error(K(331));var o=se;for(se|=4,q=e.current;q!==null;){var i=q,s=i.child;if(q.flags&16){var l=i.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(q=u;q!==null;){var f=q;switch(f.tag){case 0:case 11:case 15:fo(8,f,i)}var c=f.child;if(c!==null)c.return=f,q=c;else for(;q!==null;){f=q;var d=f.sibling,h=f.return;if(Zg(f),f===u){q=null;break}if(d!==null){d.return=h,q=d;break}q=h}}}var y=i.alternate;if(y!==null){var w=y.child;if(w!==null){y.child=null;do{var x=w.sibling;w.sibling=null,w=x}while(w!==null)}}q=i}}if(i.subtreeFlags&2064&&s!==null)s.return=i,q=s;else e:for(;q!==null;){if(i=q,i.flags&2048)switch(i.tag){case 0:case 11:case 15:fo(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,q=m;break e}q=i.return}}var g=e.current;for(q=g;q!==null;){s=q;var p=s.child;if(s.subtreeFlags&2064&&p!==null)p.return=s,q=p;else e:for(s=g;q!==null;){if(l=q,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Zs(9,l)}}catch(_){we(l,l.return,_)}if(l===s){q=null;break e}var v=l.sibling;if(v!==null){v.return=l.return,q=v;break e}q=l.return}}if(se=o,mn(),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(Bs,e)}catch{}r=!0}return r}finally{ae=n,ot.transition=t}}return!1}function fd(e,t,n){t=Cr(n,t),t=Fg(e,t,1),e=an(e,t,1),t=je(),e!==null&&(Qo(e,1,t),We(e,t))}function we(e,t,n){if(e.tag===3)fd(e,e,n);else for(;t!==null;){if(t.tag===3){fd(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(un===null||!un.has(r))){e=Cr(n,e),e=Vg(t,e,1),t=an(t,e,1),e=je(),t!==null&&(Qo(t,1,e),We(t,e));break}}t=t.return}}function MS(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=je(),e.pingedLanes|=e.suspendedLanes&n,Ie===e&&(Te&n)===n&&(Ce===4||Ce===3&&(Te&130023424)===Te&&500>xe()-sc?Mn(e,0):ic|=n),We(e,t)}function lm(e,t){t===0&&(e.mode&1?(t=gi,gi<<=1,!(gi&130023424)&&(gi=4194304)):t=1);var n=je();e=Bt(e,t),e!==null&&(Qo(e,t,n),We(e,n))}function IS(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),lm(e,n)}function PS(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(K(314))}r!==null&&r.delete(t),lm(e,n)}var am;am=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Be.current)He=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return He=!1,mS(e,t,n);He=!!(e.flags&131072)}else He=!1,pe&&t.flags&1048576&&dg(t,ws,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Wi(e,t),e=t.pendingProps;var o=_r(t,ze.current);fr(t,n),o=Ju(null,t,r,e,o,n);var i=ec();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ue(r)?(i=!0,ys(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Gu(t),o.updater=Ks,t.stateNode=o,o._reactInternals=t,Da(t,r,e,n),t=Ha(null,t,r,!0,i,n)):(t.tag=0,pe&&i&&Vu(t),Oe(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Wi(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=LS(r),e=ut(r,e),o){case 0:t=Va(null,t,r,e,n);break e;case 1:t=td(null,t,r,e,n);break e;case 11:t=Jf(null,t,r,e,n);break e;case 14:t=ed(null,t,r,ut(r.type,e),n);break e}throw Error(K(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ut(r,o),Va(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ut(r,o),td(e,t,r,o,n);case 3:e:{if(Wg(t),e===null)throw Error(K(387));r=t.pendingProps,i=t.memoizedState,o=i.element,vg(e,t),_s(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Cr(Error(K(423)),t),t=nd(e,t,r,n,o);break e}else if(r!==o){o=Cr(Error(K(424)),t),t=nd(e,t,r,n,o);break e}else for(Ge=ln(t.stateNode.containerInfo.firstChild),Qe=t,pe=!0,ht=null,n=mg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Sr(),r===o){t=Ut(e,t,n);break e}Oe(e,t,r,n)}t=t.child}return t;case 5:return wg(t),e===null&&Oa(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,La(r,o)?s=null:i!==null&&La(r,i)&&(t.flags|=32),Ug(e,t),Oe(e,t,s,n),t.child;case 6:return e===null&&Oa(t),null;case 13:return Yg(e,t,n);case 4:return Qu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=kr(t,null,r,n):Oe(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ut(r,o),Jf(e,t,r,o,n);case 7:return Oe(e,t,t.pendingProps,n),t.child;case 8:return Oe(e,t,t.pendingProps.children,n),t.child;case 12:return Oe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,ce(xs,r._currentValue),r._currentValue=s,i!==null)if(wt(i.value,s)){if(i.children===o.children&&!Be.current){t=Ut(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=$t(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?a.next=a:(a.next=f.next,f.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),ja(i.return,n,t),l.lanes|=n;break}a=a.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(K(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),ja(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Oe(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,fr(t,n),o=it(o),r=r(o),t.flags|=1,Oe(e,t,r,n),t.child;case 14:return r=t.type,o=ut(r,t.pendingProps),o=ut(r.type,o),ed(e,t,r,o,n);case 15:return Hg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ut(r,o),Wi(e,t),t.tag=1,Ue(r)?(e=!0,ys(t)):e=!1,fr(t,n),Dg(t,r,o),Da(t,r,o,n),Ha(null,t,r,!0,e,n);case 19:return Xg(e,t,n);case 22:return Bg(e,t,n)}throw Error(K(156,t.tag))};function um(e,t){return Op(e,t)}function TS(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rt(e,t,n,r){return new TS(e,t,n,r)}function cc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function LS(e){if(typeof e=="function")return cc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Pu)return 11;if(e===Tu)return 14}return 2}function fn(e,t){var n=e.alternate;return n===null?(n=rt(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&14680064,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}function Gi(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")cc(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Xn:return In(n.children,o,i,t);case Iu:s=8,o|=8;break;case ua:return e=rt(12,n,t,o|2),e.elementType=ua,e.lanes=i,e;case ca:return e=rt(13,n,t,o),e.elementType=ca,e.lanes=i,e;case fa:return e=rt(19,n,t,o),e.elementType=fa,e.lanes=i,e;case wp:return Js(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case yp:s=10;break e;case vp:s=9;break e;case Pu:s=11;break e;case Tu:s=14;break e;case Kt:s=16,r=null;break e}throw Error(K(130,e==null?e:typeof e,""))}return t=rt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function In(e,t,n,r){return e=rt(7,e,r,t),e.lanes=n,e}function Js(e,t,n,r){return e=rt(22,e,r,t),e.elementType=wp,e.lanes=n,e.stateNode={isHidden:!1},e}function Hl(e,t,n){return e=rt(6,e,null,t),e.lanes=n,e}function Bl(e,t,n){return t=rt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function bS(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Sl(0),this.expirationTimes=Sl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sl(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function fc(e,t,n,r,o,i,s,l,a){return e=new bS(e,t,n,l,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=rt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Gu(i),e}function RS(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Yn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function cm(e){if(!e)return hn;e=e._reactInternals;e:{if(Vn(e)!==e||e.tag!==1)throw Error(K(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ue(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(K(171))}if(e.tag===1){var n=e.type;if(Ue(n))return cg(e,n,t)}return t}function fm(e,t,n,r,o,i,s,l,a){return e=fc(n,r,!0,e,o,i,s,l,a),e.context=cm(null),n=e.current,r=je(),o=cn(n),i=$t(r,o),i.callback=t??null,an(n,i,o),e.current.lanes=o,Qo(e,o,r),We(e,r),e}function el(e,t,n,r){var o=t.current,i=je(),s=cn(o);return n=cm(n),t.context===null?t.context=n:t.pendingContext=n,t=$t(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=an(o,t,s),e!==null&&(vt(e,o,s,i),Hi(e,o,s)),s}function Ts(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function dd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function dc(e,t){dd(e,t),(e=e.alternate)&&dd(e,t)}function AS(){return null}var dm=typeof reportError=="function"?reportError:function(e){console.error(e)};function hc(e){this._internalRoot=e}tl.prototype.render=hc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(K(409));el(e,t,null,null)};tl.prototype.unmount=hc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;jn(function(){el(null,e,null,null)}),t[Ht]=null}};function tl(e){this._internalRoot=e}tl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Bp();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Jt.length&&t!==0&&t<Jt[n].priority;n++);Jt.splice(n,0,e),n===0&&Wp(e)}};function pc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function nl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function hd(){}function zS(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var u=Ts(s);i.call(u)}}var s=fm(t,r,e,0,null,!1,!1,"",hd);return e._reactRootContainer=s,e[Ht]=s.current,bo(e.nodeType===8?e.parentNode:e),jn(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var l=r;r=function(){var u=Ts(a);l.call(u)}}var a=fc(e,0,!1,null,null,!1,!1,"",hd);return e._reactRootContainer=a,e[Ht]=a.current,bo(e.nodeType===8?e.parentNode:e),jn(function(){el(t,a,n,r)}),a}function rl(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i;if(typeof o=="function"){var l=o;o=function(){var a=Ts(s);l.call(a)}}el(t,s,e,o)}else s=zS(n,t,e,o,r);return Ts(s)}Vp=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=eo(t.pendingLanes);n!==0&&(Ru(t,n|1),We(t,xe()),!(se&6)&&(Mr=xe()+500,mn()))}break;case 13:jn(function(){var r=Bt(e,1);if(r!==null){var o=je();vt(r,e,1,o)}}),dc(e,1)}};Au=function(e){if(e.tag===13){var t=Bt(e,134217728);if(t!==null){var n=je();vt(t,e,134217728,n)}dc(e,134217728)}};Hp=function(e){if(e.tag===13){var t=cn(e),n=Bt(e,t);if(n!==null){var r=je();vt(n,e,t,r)}dc(e,t)}};Bp=function(){return ae};Up=function(e,t){var n=ae;try{return ae=e,t()}finally{ae=n}};Ea=function(e,t,n){switch(t){case"input":if(pa(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Xs(r);if(!o)throw Error(K(90));Ep(r),pa(r,o)}}}break;case"textarea":Sp(e,n);break;case"select":t=n.value,t!=null&&lr(e,!!n.multiple,t,!1)}};Tp=lc;Lp=jn;var OS={usingClientEntryPoint:!1,Events:[Zo,Zn,Xs,Ip,Pp,lc]},Gr={findFiberByHostInstance:_n,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},jS={bundleType:Gr.bundleType,version:Gr.version,rendererPackageName:Gr.rendererPackageName,rendererConfig:Gr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Yt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ap(e),e===null?null:e.stateNode},findFiberByHostInstance:Gr.findFiberByHostInstance||AS,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ci=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ci.isDisabled&&Ci.supportsFiber)try{Bs=Ci.inject(jS),Mt=Ci}catch{}}qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=OS;qe.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!pc(t))throw Error(K(200));return RS(e,t,null,n)};qe.createRoot=function(e,t){if(!pc(e))throw Error(K(299));var n=!1,r="",o=dm;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=fc(e,1,!1,null,null,n,!1,r,o),e[Ht]=t.current,bo(e.nodeType===8?e.parentNode:e),new hc(t)};qe.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(K(188)):(e=Object.keys(e).join(","),Error(K(268,e)));return e=Ap(t),e=e===null?null:e.stateNode,e};qe.flushSync=function(e){return jn(e)};qe.hydrate=function(e,t,n){if(!nl(t))throw Error(K(200));return rl(null,e,t,!0,n)};qe.hydrateRoot=function(e,t,n){if(!pc(e))throw Error(K(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",s=dm;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=fm(t,null,e,1,n??null,o,!1,i,s),e[Ht]=t.current,bo(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new tl(t)};qe.render=function(e,t,n){if(!nl(t))throw Error(K(200));return rl(null,e,t,!1,n)};qe.unmountComponentAtNode=function(e){if(!nl(e))throw Error(K(40));return e._reactRootContainer?(jn(function(){rl(null,null,e,!1,function(){e._reactRootContainer=null,e[Ht]=null})}),!0):!1};qe.unstable_batchedUpdates=lc;qe.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!nl(n))throw Error(K(200));if(e==null||e._reactInternals===void 0)throw Error(K(38));return rl(e,t,n,!1,r)};qe.version="18.3.1-next-f1338f8080-20240426";function hm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hm)}catch(e){console.error(e)}}hm(),hp.exports=qe;var pm=hp.exports;const ol=W.createContext(null),$S=ol.Provider,gm=Pt.error001();function ie(e,t){const n=W.useContext(ol);if(n===null)throw new Error(gm);return dp(n,e,t)}function ge(){const e=W.useContext(ol);if(e===null)throw new Error(gm);return W.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const pd={display:"none"},DS={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},mm="react-flow__node-desc",ym="react-flow__edge-desc",FS="react-flow__aria-live",VS=e=>e.ariaLiveMessage,HS=e=>e.ariaLabelConfig;function BS({rfId:e}){const t=ie(VS);return F.jsx("div",{id:`${FS}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:DS,children:t})}function US({rfId:e,disableKeyboardA11y:t}){const n=ie(HS);return F.jsxs(F.Fragment,{children:[F.jsx("div",{id:`${mm}-${e}`,style:pd,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),F.jsx("div",{id:`${ym}-${e}`,style:pd,children:n["edge.a11yDescription.default"]}),!t&&F.jsx(BS,{rfId:e})]})}const Jo=W.forwardRef(({position:e="top-left",children:t,className:n,style:r,...o},i)=>{const s=`${e}`.split("-");return F.jsx("div",{className:Se(["react-flow__panel",n,...s]),style:r,ref:i,...o,children:t})});Jo.displayName="Panel";function WS({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:F.jsx(Jo,{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:F.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const YS=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},Mi=e=>e.id;function XS(e,t){return he(e.selectedNodes.map(Mi),t.selectedNodes.map(Mi))&&he(e.selectedEdges.map(Mi),t.selectedEdges.map(Mi))}function GS({onSelectionChange:e}){const t=ge(),{selectedNodes:n,selectedEdges:r}=ie(YS,XS);return W.useEffect(()=>{const o={nodes:n,edges:r};e==null||e(o),t.getState().onSelectionChangeHandlers.forEach(i=>i(o))},[n,r,e]),null}const QS=e=>!!e.onSelectionChangeHandlers;function KS({onSelectionChange:e}){const t=ie(QS);return e||t?F.jsx(GS,{onSelectionChange:e}):null}const eu=typeof window<"u"?W.useLayoutEffect:W.useEffect,vm=[0,0],ZS={x:0,y:0,zoom:1},qS=["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"],gd=[...qS,"rfId"],JS=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}),md={translateExtent:xo,nodeOrigin:vm,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function ek(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:o,setTranslateExtent:i,setNodeExtent:s,reset:l,setDefaultNodesAndEdges:a}=ie(JS,he),u=ge();eu(()=>(a(e.defaultNodes,e.defaultEdges),()=>{f.current=md,l()}),[]);const f=W.useRef(md);return eu(()=>{for(const c of gd){const d=e[c],h=f.current[c];d!==h&&(typeof e[c]>"u"||(c==="nodes"?t(d):c==="edges"?n(d):c==="minZoom"?r(d):c==="maxZoom"?o(d):c==="translateExtent"?i(d):c==="nodeExtent"?s(d):c==="ariaLabelConfig"?u.setState({ariaLabelConfig:w1(d)}):c==="fitView"?u.setState({fitViewQueued:d}):c==="fitViewOptions"?u.setState({fitViewOptions:d}):u.setState({[c]:d})))}f.current=e},gd.map(c=>e[c])),null}function yd(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function tk(e){var r;const[t,n]=W.useState(e==="system"?null:e);return W.useEffect(()=>{if(e!=="system"){n(e);return}const o=yd(),i=()=>n(o!=null&&o.matches?"dark":"light");return i(),o==null||o.addEventListener("change",i),()=>{o==null||o.removeEventListener("change",i)}},[e]),t!==null?t:(r=yd())!=null&&r.matches?"dark":"light"}const vd=typeof document<"u"?document:null;function Vo(e=null,t={target:vd,actInsideInputWithModifier:!0}){const[n,r]=W.useState(!1),o=W.useRef(!1),i=W.useRef(new Set([])),[s,l]=W.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(c=>typeof c=="string").map(c=>c.replace("+",`
|
|
57
|
+
`).replace(`
|
|
58
|
+
|
|
59
|
+
`,`
|
|
60
|
+
+`).split(`
|
|
61
|
+
`)),f=u.reduce((c,d)=>c.concat(...d),[]);return[u,f]}return[[],[]]},[e]);return W.useEffect(()=>{const a=(t==null?void 0:t.target)??vd,u=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const f=h=>{var x,m;if(o.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!o.current||o.current&&!u)&&Wh(h))return!1;const w=xd(h.code,l);if(i.current.add(h[w]),wd(s,i.current,!1)){const g=((m=(x=h.composedPath)==null?void 0:x.call(h))==null?void 0:m[0])||h.target,p=(g==null?void 0:g.nodeName)==="BUTTON"||(g==null?void 0:g.nodeName)==="A";t.preventDefault!==!1&&(o.current||!p)&&h.preventDefault(),r(!0)}},c=h=>{const y=xd(h.code,l);wd(s,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(h[y]),h.key==="Meta"&&i.current.clear(),o.current=!1},d=()=>{i.current.clear(),r(!1)};return a==null||a.addEventListener("keydown",f),a==null||a.addEventListener("keyup",c),window.addEventListener("blur",d),window.addEventListener("contextmenu",d),()=>{a==null||a.removeEventListener("keydown",f),a==null||a.removeEventListener("keyup",c),window.removeEventListener("blur",d),window.removeEventListener("contextmenu",d)}}},[e,r]),n}function wd(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(o=>t.has(o)))}function xd(e,t){return t.includes(e)?"code":"key"}const nk=()=>{const e=ge();return W.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,n):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,o,i],panZoom:s}=e.getState();return s?(await s.setViewport({x:t.x??r,y:t.y??o,zoom:t.zoom??i},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:o,minZoom:i,maxZoom:s,panZoom:l}=e.getState(),a=vu(t,r,o,i,s,(n==null?void 0:n.padding)??.1);return l?(await l.setViewport(a,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:o,snapToGrid:i,domNode:s}=e.getState();if(!s)return t;const{x:l,y:a}=s.getBoundingClientRect(),u={x:t.x-l,y:t.y-a},f=n.snapGrid??o,c=n.snapToGrid??i;return Go(u,r,c,f)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:o,y:i}=r.getBoundingClientRect(),s=is(t,n);return{x:s.x+o,y:s.y+i}}}),[])};function wm(e,t){const n=[],r=new Map,o=[];for(const i of e)if(i.type==="add"){o.push(i);continue}else if(i.type==="remove"||i.type==="replace")r.set(i.id,[i]);else{const s=r.get(i.id);s?s.push(i):r.set(i.id,[i])}for(const i of t){const s=r.get(i.id);if(!s){n.push(i);continue}if(s[0].type==="remove")continue;if(s[0].type==="replace"){n.push({...s[0].item});continue}const l={...i};for(const a of s)rk(a,l);n.push(l)}return o.length&&o.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function rk(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 xm(e,t){return wm(e,t)}function Em(e,t){return wm(e,t)}function xn(e,t){return{id:e,type:"select",selected:t}}function or(e,t=new Set,n=!1){const r=[];for(const[o,i]of e){const s=t.has(o);!(i.selected===void 0&&!s)&&i.selected!==s&&(n&&(i.selected=s),r.push(xn(i.id,s)))}return r}function Ed({items:e=[],lookup:t}){var o;const n=[],r=new Map(e.map(i=>[i.id,i]));for(const[i,s]of e.entries()){const l=t.get(s.id),a=((o=l==null?void 0:l.internals)==null?void 0:o.userNode)??l;a!==void 0&&a!==s&&n.push({id:s.id,item:s,type:"replace"}),a===void 0&&n.push({item:s,type:"add",index:i})}for(const[i]of t)r.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function _d(e){return{id:e.id,type:"remove"}}const Sd=e=>u1(e),ok=e=>jh(e);function _m(e){return W.forwardRef(e)}function kd(e){const[t,n]=W.useState(BigInt(0)),[r]=W.useState(()=>ik(()=>n(o=>o+BigInt(1))));return eu(()=>{const o=r.get();o.length&&(e(o),r.reset())},[t]),r}function ik(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const Sm=W.createContext(null);function sk({children:e}){const t=ge(),n=W.useCallback(l=>{const{nodes:a=[],setNodes:u,hasDefaultNodes:f,onNodesChange:c,nodeLookup:d,fitViewQueued:h,onNodesChangeMiddlewareMap:y}=t.getState();let w=a;for(const m of l)w=typeof m=="function"?m(w):m;let x=Ed({items:w,lookup:d});for(const m of y.values())x=m(x);f&&u(w),x.length>0?c==null||c(x):h&&window.requestAnimationFrame(()=>{const{fitViewQueued:m,nodes:g,setNodes:p}=t.getState();m&&p(g)})},[]),r=kd(n),o=W.useCallback(l=>{const{edges:a=[],setEdges:u,hasDefaultEdges:f,onEdgesChange:c,edgeLookup:d}=t.getState();let h=a;for(const y of l)h=typeof y=="function"?y(h):y;f?u(h):c&&c(Ed({items:h,lookup:d}))},[]),i=kd(o),s=W.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return F.jsx(Sm.Provider,{value:s,children:e})}function lk(){const e=W.useContext(Sm);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const ak=e=>!!e.panZoom;function il(){const e=nk(),t=ge(),n=lk(),r=ie(ak),o=W.useMemo(()=>{const i=c=>t.getState().nodeLookup.get(c),s=c=>{n.nodeQueue.push(c)},l=c=>{n.edgeQueue.push(c)},a=c=>{var m,g;const{nodeLookup:d,nodeOrigin:h}=t.getState(),y=Sd(c)?c:d.get(c.id),w=y.parentId?Bh(y.position,y.measured,y.parentId,d,h):y.position,x={...y,position:w,width:((m=y.measured)==null?void 0:m.width)??y.width,height:((g=y.measured)==null?void 0:g.height)??y.height};return yr(x)},u=(c,d,h={replace:!1})=>{s(y=>y.map(w=>{if(w.id===c){const x=typeof d=="function"?d(w):d;return h.replace&&Sd(x)?x:{...w,...x}}return w}))},f=(c,d,h={replace:!1})=>{l(y=>y.map(w=>{if(w.id===c){const x=typeof d=="function"?d(w):d;return h.replace&&ok(x)?x:{...w,...x}}return w}))};return{getNodes:()=>t.getState().nodes.map(c=>({...c})),getNode:c=>{var d;return(d=i(c))==null?void 0:d.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:c=[]}=t.getState();return c.map(d=>({...d}))},getEdge:c=>t.getState().edgeLookup.get(c),setNodes:s,setEdges:l,addNodes:c=>{const d=Array.isArray(c)?c:[c];n.nodeQueue.push(h=>[...h,...d])},addEdges:c=>{const d=Array.isArray(c)?c:[c];n.edgeQueue.push(h=>[...h,...d])},toObject:()=>{const{nodes:c=[],edges:d=[],transform:h}=t.getState(),[y,w,x]=h;return{nodes:c.map(m=>({...m})),edges:d.map(m=>({...m})),viewport:{x:y,y:w,zoom:x}}},deleteElements:async({nodes:c=[],edges:d=[]})=>{const{nodes:h,edges:y,onNodesDelete:w,onEdgesDelete:x,triggerNodeChanges:m,triggerEdgeChanges:g,onDelete:p,onBeforeDelete:v}=t.getState(),{nodes:_,edges:k}=await p1({nodesToRemove:c,edgesToRemove:d,nodes:h,edges:y,onBeforeDelete:v}),I=k.length>0,b=_.length>0;if(I){const H=k.map(_d);x==null||x(k),g(H)}if(b){const H=_.map(_d);w==null||w(_),m(H)}return(b||I)&&(p==null||p({nodes:_,edges:k})),{deletedNodes:_,deletedEdges:k}},getIntersectingNodes:(c,d=!0,h)=>{const y=Xc(c),w=y?c:a(c),x=h!==void 0;return w?(h||t.getState().nodes).filter(m=>{const g=t.getState().nodeLookup.get(m.id);if(g&&!y&&(m.id===c.id||!g.internals.positionAbsolute))return!1;const p=yr(x?m:g),v=_o(p,w);return d&&v>0||v>=p.width*p.height||v>=w.width*w.height}):[]},isNodeIntersecting:(c,d,h=!0)=>{const w=Xc(c)?c:a(c);if(!w)return!1;const x=_o(w,d);return h&&x>0||x>=d.width*d.height||x>=w.width*w.height},updateNode:u,updateNodeData:(c,d,h={replace:!1})=>{u(c,y=>{const w=typeof d=="function"?d(y):d;return h.replace?{...y,data:w}:{...y,data:{...y.data,...w}}},h)},updateEdge:f,updateEdgeData:(c,d,h={replace:!1})=>{f(c,y=>{const w=typeof d=="function"?d(y):d;return h.replace?{...y,data:w}:{...y,data:{...y.data,...w}}},h)},getNodesBounds:c=>{const{nodeLookup:d,nodeOrigin:h}=t.getState();return c1(c,{nodeLookup:d,nodeOrigin:h})},getHandleConnections:({type:c,id:d,nodeId:h})=>{var y;return Array.from(((y=t.getState().connectionLookup.get(`${h}-${c}${d?`-${d}`:""}`))==null?void 0:y.values())??[])},getNodeConnections:({type:c,handleId:d,nodeId:h})=>{var y;return Array.from(((y=t.getState().connectionLookup.get(`${h}${c?d?`-${c}-${d}`:`-${c}`:""}`))==null?void 0:y.values())??[])},fitView:async c=>{const d=t.getState().fitViewResolver??v1();return t.setState({fitViewQueued:!0,fitViewOptions:c,fitViewResolver:d}),n.nodeQueue.push(h=>[...h]),d.promise}}},[]);return W.useMemo(()=>({...o,...e,viewportInitialized:r}),[r])}const Nd=e=>e.selected,uk=typeof window<"u"?window:void 0;function ck({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=ge(),{deleteElements:r}=il(),o=Vo(e,{actInsideInputWithModifier:!1}),i=Vo(t,{target:uk});W.useEffect(()=>{if(o){const{edges:s,nodes:l}=n.getState();r({nodes:l.filter(Nd),edges:s.filter(Nd)}),n.setState({nodesSelectionActive:!1})}},[o]),W.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function fk(e){const t=ge();W.useEffect(()=>{const n=()=>{var o,i,s,l;if(!e.current||!(((i=(o=e.current).checkVisibility)==null?void 0:i.call(o))??!0))return!1;const r=wu(e.current);(r.height===0||r.width===0)&&((l=(s=t.getState()).onError)==null||l.call(s,"004",Pt.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const sl={position:"absolute",width:"100%",height:"100%",top:0,left:0},dk=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function hk({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:o=.5,panOnScrollMode:i=Cn.Free,zoomOnDoubleClick:s=!0,panOnDrag:l=!0,defaultViewport:a,translateExtent:u,minZoom:f,maxZoom:c,zoomActivationKeyCode:d,preventScrolling:h=!0,children:y,noWheelClassName:w,noPanClassName:x,onViewportChange:m,isControlledViewport:g,paneClickDistance:p,selectionOnDrag:v}){const _=ge(),k=W.useRef(null),{userSelectionActive:I,lib:b,connectionInProgress:H}=ie(dk,he),M=Vo(d),S=W.useRef();fk(k);const L=W.useCallback(j=>{m==null||m({x:j[0],y:j[1],zoom:j[2]}),g||_.setState({transform:j})},[m,g]);return W.useEffect(()=>{if(k.current){S.current=tE({domNode:k.current,minZoom:f,maxZoom:c,translateExtent:u,viewport:a,onDraggingChange:P=>_.setState(A=>A.paneDragging===P?A:{paneDragging:P}),onPanZoomStart:(P,A)=>{const{onViewportChangeStart:N,onMoveStart:T}=_.getState();T==null||T(P,A),N==null||N(A)},onPanZoom:(P,A)=>{const{onViewportChange:N,onMove:T}=_.getState();T==null||T(P,A),N==null||N(A)},onPanZoomEnd:(P,A)=>{const{onViewportChangeEnd:N,onMoveEnd:T}=_.getState();T==null||T(P,A),N==null||N(A)}});const{x:j,y:E,zoom:z}=S.current.getViewport();return _.setState({panZoom:S.current,transform:[j,E,z],domNode:k.current.closest(".react-flow")}),()=>{var P;(P=S.current)==null||P.destroy()}}},[]),W.useEffect(()=>{var j;(j=S.current)==null||j.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:o,panOnScrollMode:i,zoomOnDoubleClick:s,panOnDrag:l,zoomActivationKeyPressed:M,preventScrolling:h,noPanClassName:x,userSelectionActive:I,noWheelClassName:w,lib:b,onTransformChange:L,connectionInProgress:H,selectionOnDrag:v,paneClickDistance:p})},[e,t,n,r,o,i,s,l,M,h,x,I,w,b,L,H,v,p]),F.jsx("div",{className:"react-flow__renderer",ref:k,style:sl,children:y})}const pk=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function gk(){const{userSelectionActive:e,userSelectionRect:t}=ie(pk,he);return e&&t?F.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}const Ul=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},mk=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function yk({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Eo.Full,panOnDrag:r,paneClickDistance:o,selectionOnDrag:i,onSelectionStart:s,onSelectionEnd:l,onPaneClick:a,onPaneContextMenu:u,onPaneScroll:f,onPaneMouseEnter:c,onPaneMouseMove:d,onPaneMouseLeave:h,children:y}){const w=ge(),{userSelectionActive:x,elementsSelectable:m,dragging:g,connectionInProgress:p}=ie(mk,he),v=m&&(e||x),_=W.useRef(null),k=W.useRef(),I=W.useRef(new Set),b=W.useRef(new Set),H=W.useRef(!1),M=N=>{if(H.current||p){H.current=!1;return}a==null||a(N),w.getState().resetSelectedElements(),w.setState({nodesSelectionActive:!1})},S=N=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){N.preventDefault();return}u==null||u(N)},L=f?N=>f(N):void 0,j=N=>{H.current&&(N.stopPropagation(),H.current=!1)},E=N=>{var C,D;const{domNode:T}=w.getState();if(k.current=T==null?void 0:T.getBoundingClientRect(),!k.current)return;const $=N.target===_.current;if(!$&&!!N.target.closest(".nokey")||!e||!(i&&$||t)||N.button!==0||!N.isPrimary)return;(D=(C=N.target)==null?void 0:C.setPointerCapture)==null||D.call(C,N.pointerId),H.current=!1;const{x:Y,y:R}=mt(N.nativeEvent,k.current);w.setState({userSelectionRect:{width:0,height:0,startX:Y,startY:R,x:Y,y:R}}),$||(N.stopPropagation(),N.preventDefault())},z=N=>{const{userSelectionRect:T,transform:$,nodeLookup:O,edgeLookup:V,connectionLookup:Y,triggerNodeChanges:R,triggerEdgeChanges:C,defaultEdgeOptions:D,resetSelectedElements:B}=w.getState();if(!k.current||!T)return;const{x:U,y:X}=mt(N.nativeEvent,k.current),{startX:G,startY:Q}=T;if(!H.current){const re=t?0:o;if(Math.hypot(U-G,X-Q)<=re)return;B(),s==null||s(N)}H.current=!0;const Z={startX:G,startY:Q,x:U<G?U:G,y:X<Q?X:Q,width:Math.abs(U-G),height:Math.abs(X-Q)},ee=I.current,te=b.current;I.current=new Set(yu(O,Z,$,n===Eo.Partial,!0).map(re=>re.id)),b.current=new Set;const ne=(D==null?void 0:D.selectable)??!0;for(const re of I.current){const ke=Y.get(re);if(ke)for(const{edgeId:lt}of ke.values()){const Lt=V.get(lt);Lt&&(Lt.selectable??ne)&&b.current.add(lt)}}if(!Gc(ee,I.current)){const re=or(O,I.current,!0);R(re)}if(!Gc(te,b.current)){const re=or(V,b.current);C(re)}w.setState({userSelectionRect:Z,userSelectionActive:!0,nodesSelectionActive:!1})},P=N=>{var T,$;N.button===0&&(($=(T=N.target)==null?void 0:T.releasePointerCapture)==null||$.call(T,N.pointerId),!x&&N.target===_.current&&w.getState().userSelectionRect&&(M==null||M(N)),w.setState({userSelectionActive:!1,userSelectionRect:null}),H.current&&(l==null||l(N),w.setState({nodesSelectionActive:I.current.size>0})))},A=r===!0||Array.isArray(r)&&r.includes(0);return F.jsxs("div",{className:Se(["react-flow__pane",{draggable:A,dragging:g,selection:e}]),onClick:v?void 0:Ul(M,_),onContextMenu:Ul(S,_),onWheel:Ul(L,_),onPointerEnter:v?void 0:c,onPointerMove:v?z:d,onPointerUp:v?P:void 0,onPointerDownCapture:v?E:void 0,onClickCapture:v?j:void 0,onPointerLeave:h,ref:_,style:sl,children:[y,F.jsx(gk,{})]})}function tu({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:o,unselectNodesAndEdges:i,multiSelectionActive:s,nodeLookup:l,onError:a}=t.getState(),u=l.get(e);if(!u){a==null||a("012",Pt.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&s)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var f;return(f=r==null?void 0:r.current)==null?void 0:f.blur()})):o([e])}function km({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:i,nodeClickDistance:s}){const l=ge(),[a,u]=W.useState(!1),f=W.useRef();return W.useEffect(()=>{f.current=V1({getStoreItems:()=>l.getState(),onNodeMouseDown:c=>{tu({id:c,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),W.useEffect(()=>{if(!(t||!e.current||!f.current))return f.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:o,nodeClickDistance:s}),()=>{var c;(c=f.current)==null||c.destroy()}},[n,r,t,i,e,o,s]),a}const vk=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function Nm(){const e=ge();return W.useCallback(n=>{const{nodeExtent:r,snapToGrid:o,snapGrid:i,nodesDraggable:s,onError:l,updateNodePositions:a,nodeLookup:u,nodeOrigin:f}=e.getState(),c=new Map,d=vk(s),h=o?i[0]:5,y=o?i[1]:5,w=n.direction.x*h*n.factor,x=n.direction.y*y*n.factor;for(const[,m]of u){if(!d(m))continue;let g={x:m.internals.positionAbsolute.x+w,y:m.internals.positionAbsolute.y+x};o&&(g=Xo(g,i));const{position:p,positionAbsolute:v}=$h({nodeId:m.id,nextPosition:g,nodeLookup:u,nodeExtent:r,nodeOrigin:f,onError:l});m.position=p,m.internals.positionAbsolute=v,c.set(m.id,m)}a(c)},[])}const gc=W.createContext(null),wk=gc.Provider;gc.Consumer;const Cm=()=>W.useContext(gc),xk=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),Ek=(e,t,n)=>r=>{const{connectionClickStartHandle:o,connectionMode:i,connection:s}=r,{fromHandle:l,toHandle:a,isValid:u}=s,f=(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n,connectingTo:f,clickConnecting:(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.id)===t&&(o==null?void 0:o.type)===n,isPossibleEndHandle:i===gr.Strict?(l==null?void 0:l.type)!==n:e!==(l==null?void 0:l.nodeId)||t!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!o,valid:f&&u}};function _k({type:e="source",position:t=J.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:i=!0,id:s,onConnect:l,children:a,className:u,onMouseDown:f,onTouchStart:c,...d},h){var z,P;const y=s||null,w=e==="target",x=ge(),m=Cm(),{connectOnClick:g,noPanClassName:p,rfId:v}=ie(xk,he),{connectingFrom:_,connectingTo:k,clickConnecting:I,isPossibleEndHandle:b,connectionInProcess:H,clickConnectionInProcess:M,valid:S}=ie(Ek(m,y,e),he);m||(P=(z=x.getState()).onError)==null||P.call(z,"010",Pt.error010());const L=A=>{const{defaultEdgeOptions:N,onConnect:T,hasDefaultEdges:$}=x.getState(),O={...N,...A};if($){const{edges:V,setEdges:Y}=x.getState();Y(N1(O,V))}T==null||T(O),l==null||l(O)},j=A=>{if(!m)return;const N=Yh(A.nativeEvent);if(o&&(N&&A.button===0||!N)){const T=x.getState();la.onPointerDown(A.nativeEvent,{handleDomNode:A.currentTarget,autoPanOnConnect:T.autoPanOnConnect,connectionMode:T.connectionMode,connectionRadius:T.connectionRadius,domNode:T.domNode,nodeLookup:T.nodeLookup,lib:T.lib,isTarget:w,handleId:y,nodeId:m,flowId:T.rfId,panBy:T.panBy,cancelConnection:T.cancelConnection,onConnectStart:T.onConnectStart,onConnectEnd:(...$)=>{var O,V;return(V=(O=x.getState()).onConnectEnd)==null?void 0:V.call(O,...$)},updateConnection:T.updateConnection,onConnect:L,isValidConnection:n||((...$)=>{var O,V;return((V=(O=x.getState()).isValidConnection)==null?void 0:V.call(O,...$))??!0}),getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,autoPanSpeed:T.autoPanSpeed,dragThreshold:T.connectionDragThreshold})}N?f==null||f(A):c==null||c(A)},E=A=>{const{onClickConnectStart:N,onClickConnectEnd:T,connectionClickStartHandle:$,connectionMode:O,isValidConnection:V,lib:Y,rfId:R,nodeLookup:C,connection:D}=x.getState();if(!m||!$&&!o)return;if(!$){N==null||N(A.nativeEvent,{nodeId:m,handleId:y,handleType:e}),x.setState({connectionClickStartHandle:{nodeId:m,type:e,id:y}});return}const B=Uh(A.target),U=n||V,{connection:X,isValid:G}=la.isValid(A.nativeEvent,{handle:{nodeId:m,id:y,type:e},connectionMode:O,fromNodeId:$.nodeId,fromHandleId:$.id||null,fromType:$.type,isValidConnection:U,flowId:R,doc:B,lib:Y,nodeLookup:C});G&&X&&L(X);const Q=structuredClone(D);delete Q.inProgress,Q.toPosition=Q.toHandle?Q.toHandle.position:null,T==null||T(A,Q),x.setState({connectionClickStartHandle:null})};return F.jsx("div",{"data-handleid":y,"data-nodeid":m,"data-handlepos":t,"data-id":`${v}-${m}-${y}-${e}`,className:Se(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",p,u,{source:!w,target:w,connectable:r,connectablestart:o,connectableend:i,clickconnecting:I,connectingfrom:_,connectingto:k,valid:S,connectionindicator:r&&(!H||b)&&(H||M?i:o)}]),onMouseDown:j,onTouchStart:j,onClick:g?E:void 0,ref:h,...d,children:a})}const $n=W.memo(_m(_k));function Sk({data:e,isConnectable:t,sourcePosition:n=J.Bottom}){return F.jsxs(F.Fragment,{children:[e==null?void 0:e.label,F.jsx($n,{type:"source",position:n,isConnectable:t})]})}function kk({data:e,isConnectable:t,targetPosition:n=J.Top,sourcePosition:r=J.Bottom}){return F.jsxs(F.Fragment,{children:[F.jsx($n,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,F.jsx($n,{type:"source",position:r,isConnectable:t})]})}function Nk(){return null}function Ck({data:e,isConnectable:t,targetPosition:n=J.Top}){return F.jsxs(F.Fragment,{children:[F.jsx($n,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Ls={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Cd={input:Sk,default:kk,output:Ck,group:Nk};function Mk(e){var t,n,r,o;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((o=e.style)==null?void 0:o.height)}}const Ik=e=>{const{width:t,height:n,x:r,y:o}=Yo(e.nodeLookup,{filter:i=>!!i.selected});return{width:gt(t)?t:null,height:gt(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${o}px)`}};function Pk({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=ge(),{width:o,height:i,transformString:s,userSelectionActive:l}=ie(Ik,he),a=Nm(),u=W.useRef(null);W.useEffect(()=>{var h;n||(h=u.current)==null||h.focus({preventScroll:!0})},[n]);const f=!l&&o!==null&&i!==null;if(km({nodeRef:u,disabled:!f}),!f)return null;const c=e?h=>{const y=r.getState().nodes.filter(w=>w.selected);e(h,y)}:void 0,d=h=>{Object.prototype.hasOwnProperty.call(Ls,h.key)&&(h.preventDefault(),a({direction:Ls[h.key],factor:h.shiftKey?4:1}))};return F.jsx("div",{className:Se(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:F.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:c,tabIndex:n?void 0:-1,onKeyDown:n?void 0:d,style:{width:o,height:i}})})}const Md=typeof window<"u"?window:void 0,Tk=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function Mm({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,paneClickDistance:l,deleteKeyCode:a,selectionKeyCode:u,selectionOnDrag:f,selectionMode:c,onSelectionStart:d,onSelectionEnd:h,multiSelectionKeyCode:y,panActivationKeyCode:w,zoomActivationKeyCode:x,elementsSelectable:m,zoomOnScroll:g,zoomOnPinch:p,panOnScroll:v,panOnScrollSpeed:_,panOnScrollMode:k,zoomOnDoubleClick:I,panOnDrag:b,defaultViewport:H,translateExtent:M,minZoom:S,maxZoom:L,preventScrolling:j,onSelectionContextMenu:E,noWheelClassName:z,noPanClassName:P,disableKeyboardA11y:A,onViewportChange:N,isControlledViewport:T}){const{nodesSelectionActive:$,userSelectionActive:O}=ie(Tk,he),V=Vo(u,{target:Md}),Y=Vo(w,{target:Md}),R=Y||b,C=Y||v,D=f&&R!==!0,B=V||O||D;return ck({deleteKeyCode:a,multiSelectionKeyCode:y}),F.jsx(hk,{onPaneContextMenu:i,elementsSelectable:m,zoomOnScroll:g,zoomOnPinch:p,panOnScroll:C,panOnScrollSpeed:_,panOnScrollMode:k,zoomOnDoubleClick:I,panOnDrag:!V&&R,defaultViewport:H,translateExtent:M,minZoom:S,maxZoom:L,zoomActivationKeyCode:x,preventScrolling:j,noWheelClassName:z,noPanClassName:P,onViewportChange:N,isControlledViewport:T,paneClickDistance:l,selectionOnDrag:D,children:F.jsxs(yk,{onSelectionStart:d,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,panOnDrag:R,isSelecting:!!B,selectionMode:c,selectionKeyPressed:V,paneClickDistance:l,selectionOnDrag:D,children:[e,$&&F.jsx(Pk,{onSelectionContextMenu:E,noPanClassName:P,disableKeyboardA11y:A})]})})}Mm.displayName="FlowRenderer";const Lk=W.memo(Mm),bk=e=>t=>e?yu(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 Rk(e){return ie(W.useCallback(bk(e),[e]),he)}const Ak=e=>e.updateNodeInternals;function zk(){const e=ie(Ak),[t]=W.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(o=>{const i=o.target.getAttribute("data-id");r.set(i,{id:i,nodeElement:o.target,force:!0})}),e(r)}));return W.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function Ok({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const o=ge(),i=W.useRef(null),s=W.useRef(null),l=W.useRef(e.sourcePosition),a=W.useRef(e.targetPosition),u=W.useRef(t),f=n&&!!e.internals.handleBounds;return W.useEffect(()=>{i.current&&!e.hidden&&(!f||s.current!==i.current)&&(s.current&&(r==null||r.unobserve(s.current)),r==null||r.observe(i.current),s.current=i.current)},[f,e.hidden]),W.useEffect(()=>()=>{s.current&&(r==null||r.unobserve(s.current),s.current=null)},[]),W.useEffect(()=>{if(i.current){const c=u.current!==t,d=l.current!==e.sourcePosition,h=a.current!==e.targetPosition;(c||d||h)&&(u.current=t,l.current=e.sourcePosition,a.current=e.targetPosition,o.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function jk({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onContextMenu:i,onDoubleClick:s,nodesDraggable:l,elementsSelectable:a,nodesConnectable:u,nodesFocusable:f,resizeObserver:c,noDragClassName:d,noPanClassName:h,disableKeyboardA11y:y,rfId:w,nodeTypes:x,nodeClickDistance:m,onError:g}){const{node:p,internals:v,isParent:_}=ie(U=>{const X=U.nodeLookup.get(e),G=U.parentLookup.has(e);return{node:X,internals:X.internals,isParent:G}},he);let k=p.type||"default",I=(x==null?void 0:x[k])||Cd[k];I===void 0&&(g==null||g("003",Pt.error003(k)),k="default",I=(x==null?void 0:x.default)||Cd.default);const b=!!(p.draggable||l&&typeof p.draggable>"u"),H=!!(p.selectable||a&&typeof p.selectable>"u"),M=!!(p.connectable||u&&typeof p.connectable>"u"),S=!!(p.focusable||f&&typeof p.focusable>"u"),L=ge(),j=Hh(p),E=Ok({node:p,nodeType:k,hasDimensions:j,resizeObserver:c}),z=km({nodeRef:E,disabled:p.hidden||!b,noDragClassName:d,handleSelector:p.dragHandle,nodeId:e,isSelectable:H,nodeClickDistance:m}),P=Nm();if(p.hidden)return null;const A=Wt(p),N=Mk(p),T=H||b||t||n||r||o,$=n?U=>n(U,{...v.userNode}):void 0,O=r?U=>r(U,{...v.userNode}):void 0,V=o?U=>o(U,{...v.userNode}):void 0,Y=i?U=>i(U,{...v.userNode}):void 0,R=s?U=>s(U,{...v.userNode}):void 0,C=U=>{const{selectNodesOnDrag:X,nodeDragThreshold:G}=L.getState();H&&(!X||!b||G>0)&&tu({id:e,store:L,nodeRef:E}),t&&t(U,{...v.userNode})},D=U=>{if(!(Wh(U.nativeEvent)||y)){if(Rh.includes(U.key)&&H){const X=U.key==="Escape";tu({id:e,store:L,unselect:X,nodeRef:E})}else if(b&&p.selected&&Object.prototype.hasOwnProperty.call(Ls,U.key)){U.preventDefault();const{ariaLabelConfig:X}=L.getState();L.setState({ariaLiveMessage:X["node.a11yDescription.ariaLiveMessage"]({direction:U.key.replace("Arrow","").toLowerCase(),x:~~v.positionAbsolute.x,y:~~v.positionAbsolute.y})}),P({direction:Ls[U.key],factor:U.shiftKey?4:1})}}},B=()=>{var te;if(y||!((te=E.current)!=null&&te.matches(":focus-visible")))return;const{transform:U,width:X,height:G,autoPanOnNodeFocus:Q,setCenter:Z}=L.getState();if(!Q)return;yu(new Map([[e,p]]),{x:0,y:0,width:X,height:G},U,!0).length>0||Z(p.position.x+A.width/2,p.position.y+A.height/2,{zoom:U[2]})};return F.jsx("div",{className:Se(["react-flow__node",`react-flow__node-${k}`,{[h]:b},p.className,{selected:p.selected,selectable:H,parent:_,draggable:b,dragging:z}]),ref:E,style:{zIndex:v.z,transform:`translate(${v.positionAbsolute.x}px,${v.positionAbsolute.y}px)`,pointerEvents:T?"all":"none",visibility:j?"visible":"hidden",...p.style,...N},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:$,onMouseMove:O,onMouseLeave:V,onContextMenu:Y,onClick:C,onDoubleClick:R,onKeyDown:S?D:void 0,tabIndex:S?0:void 0,onFocus:S?B:void 0,role:p.ariaRole??(S?"group":void 0),"aria-roledescription":"node","aria-describedby":y?void 0:`${mm}-${w}`,"aria-label":p.ariaLabel,...p.domAttributes,children:F.jsx(wk,{value:e,children:F.jsx(I,{id:e,data:p.data,type:k,positionAbsoluteX:v.positionAbsolute.x,positionAbsoluteY:v.positionAbsolute.y,selected:p.selected??!1,selectable:H,draggable:b,deletable:p.deletable??!0,isConnectable:M,sourcePosition:p.sourcePosition,targetPosition:p.targetPosition,dragging:z,dragHandle:p.dragHandle,zIndex:v.z,parentId:p.parentId,...A})})})}var $k=W.memo(jk);const Dk=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Im(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,onError:i}=ie(Dk,he),s=Rk(e.onlyRenderVisibleElements),l=zk();return F.jsx("div",{className:"react-flow__nodes",style:sl,children:s.map(a=>F.jsx($k,{id:a,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:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,nodeClickDistance:e.nodeClickDistance,onError:i},a))})}Im.displayName="NodeRenderer";const Fk=W.memo(Im);function Vk(e){return ie(W.useCallback(n=>{if(!e)return n.edges.map(o=>o.id);const r=[];if(n.width&&n.height)for(const o of n.edges){const i=n.nodeLookup.get(o.source),s=n.nodeLookup.get(o.target);i&&s&&_1({sourceNode:i,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&r.push(o.id)}return r},[e]),he)}const Hk=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return F.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},Bk=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return F.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Id={[rs.Arrow]:Hk,[rs.ArrowClosed]:Bk};function Uk(e){const t=ge();return W.useMemo(()=>{var o,i;return Object.prototype.hasOwnProperty.call(Id,e)?Id[e]:((i=(o=t.getState()).onError)==null||i.call(o,"009",Pt.error009(e)),null)},[e])}const Wk=({id:e,type:t,color:n,width:r=12.5,height:o=12.5,markerUnits:i="strokeWidth",strokeWidth:s,orient:l="auto-start-reverse"})=>{const a=Uk(t);return a?F.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:l,refX:"0",refY:"0",children:F.jsx(a,{color:n,strokeWidth:s})}):null},Pm=({defaultColor:e,rfId:t})=>{const n=ie(i=>i.edges),r=ie(i=>i.defaultEdgeOptions),o=W.useMemo(()=>T1(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return o.length?F.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:F.jsx("defs",{children:o.map(i=>F.jsx(Wk,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};Pm.displayName="MarkerDefinitions";var Yk=W.memo(Pm);function Tm({x:e,y:t,label:n,labelStyle:r,labelShowBg:o=!0,labelBgStyle:i,labelBgPadding:s=[2,4],labelBgBorderRadius:l=2,children:a,className:u,...f}){const[c,d]=W.useState({x:1,y:0,width:0,height:0}),h=Se(["react-flow__edge-textwrapper",u]),y=W.useRef(null);return W.useEffect(()=>{if(y.current){const w=y.current.getBBox();d({x:w.x,y:w.y,width:w.width,height:w.height})}},[n]),n?F.jsxs("g",{transform:`translate(${e-c.width/2} ${t-c.height/2})`,className:h,visibility:c.width?"visible":"hidden",...f,children:[o&&F.jsx("rect",{width:c.width+2*s[0],x:-s[0],y:-s[1],height:c.height+2*s[1],className:"react-flow__edge-textbg",style:i,rx:l,ry:l}),F.jsx("text",{className:"react-flow__edge-text",y:c.height/2,dy:"0.3em",ref:y,style:r,children:n}),a]}):null}Tm.displayName="EdgeText";const Xk=W.memo(Tm);function ei({path:e,labelX:t,labelY:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:a,interactionWidth:u=20,...f}){return F.jsxs(F.Fragment,{children:[F.jsx("path",{...f,d:e,fill:"none",className:Se(["react-flow__edge-path",f.className])}),u?F.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&>(t)&>(n)?F.jsx(Xk,{x:t,y:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:a}):null]})}function Pd({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===J.Left||e===J.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function Lm({sourceX:e,sourceY:t,sourcePosition:n=J.Bottom,targetX:r,targetY:o,targetPosition:i=J.Top}){const[s,l]=Pd({pos:n,x1:e,y1:t,x2:r,y2:o}),[a,u]=Pd({pos:i,x1:r,y1:o,x2:e,y2:t}),[f,c,d,h]=Xh({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:s,sourceControlY:l,targetControlX:a,targetControlY:u});return[`M${e},${t} C${s},${l} ${a},${u} ${r},${o}`,f,c,d,h]}function bm(e){return W.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s,targetPosition:l,label:a,labelStyle:u,labelShowBg:f,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:h,style:y,markerEnd:w,markerStart:x,interactionWidth:m})=>{const[g,p,v]=Lm({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:l}),_=e.isInternal?void 0:t;return F.jsx(ei,{id:_,path:g,labelX:p,labelY:v,label:a,labelStyle:u,labelShowBg:f,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:h,style:y,markerEnd:w,markerStart:x,interactionWidth:m})})}const Gk=bm({isInternal:!1}),Rm=bm({isInternal:!0});Gk.displayName="SimpleBezierEdge";Rm.displayName="SimpleBezierEdgeInternal";function Am(e){return W.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:c,style:d,sourcePosition:h=J.Bottom,targetPosition:y=J.Top,markerEnd:w,markerStart:x,pathOptions:m,interactionWidth:g})=>{const[p,v,_]=ss({sourceX:n,sourceY:r,sourcePosition:h,targetX:o,targetY:i,targetPosition:y,borderRadius:m==null?void 0:m.borderRadius,offset:m==null?void 0:m.offset,stepPosition:m==null?void 0:m.stepPosition}),k=e.isInternal?void 0:t;return F.jsx(ei,{id:k,path:p,labelX:v,labelY:_,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:c,style:d,markerEnd:w,markerStart:x,interactionWidth:g})})}const zm=Am({isInternal:!1}),Om=Am({isInternal:!0});zm.displayName="SmoothStepEdge";Om.displayName="SmoothStepEdgeInternal";function jm(e){return W.memo(({id:t,...n})=>{var o;const r=e.isInternal?void 0:t;return F.jsx(zm,{...n,id:r,pathOptions:W.useMemo(()=>{var i;return{borderRadius:0,offset:(i=n.pathOptions)==null?void 0:i.offset}},[(o=n.pathOptions)==null?void 0:o.offset])})})}const Qk=jm({isInternal:!1}),$m=jm({isInternal:!0});Qk.displayName="StepEdge";$m.displayName="StepEdgeInternal";function Dm(e){return W.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:c,style:d,markerEnd:h,markerStart:y,interactionWidth:w})=>{const[x,m,g]=Kh({sourceX:n,sourceY:r,targetX:o,targetY:i}),p=e.isInternal?void 0:t;return F.jsx(ei,{id:p,path:x,labelX:m,labelY:g,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:c,style:d,markerEnd:h,markerStart:y,interactionWidth:w})})}const Kk=Dm({isInternal:!1}),Fm=Dm({isInternal:!0});Kk.displayName="StraightEdge";Fm.displayName="StraightEdgeInternal";function Vm(e){return W.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s=J.Bottom,targetPosition:l=J.Top,label:a,labelStyle:u,labelShowBg:f,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:h,style:y,markerEnd:w,markerStart:x,pathOptions:m,interactionWidth:g})=>{const[p,v,_]=Gh({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:l,curvature:m==null?void 0:m.curvature}),k=e.isInternal?void 0:t;return F.jsx(ei,{id:k,path:p,labelX:v,labelY:_,label:a,labelStyle:u,labelShowBg:f,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:h,style:y,markerEnd:w,markerStart:x,interactionWidth:g})})}const Zk=Vm({isInternal:!1}),Hm=Vm({isInternal:!0});Zk.displayName="BezierEdge";Hm.displayName="BezierEdgeInternal";const Td={default:Hm,straight:Fm,step:$m,smoothstep:Om,simplebezier:Rm},Ld={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},qk=(e,t,n)=>n===J.Left?e-t:n===J.Right?e+t:e,Jk=(e,t,n)=>n===J.Top?e-t:n===J.Bottom?e+t:e,bd="react-flow__edgeupdater";function Rd({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:i,onMouseOut:s,type:l}){return F.jsx("circle",{onMouseDown:o,onMouseEnter:i,onMouseOut:s,className:Se([bd,`${bd}-${l}`]),cx:qk(t,r,e),cy:Jk(n,r,e),r,stroke:"transparent",fill:"transparent"})}function eN({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:o,targetX:i,targetY:s,sourcePosition:l,targetPosition:a,onReconnect:u,onReconnectStart:f,onReconnectEnd:c,setReconnecting:d,setUpdateHover:h}){const y=ge(),w=(v,_)=>{if(v.button!==0)return;const{autoPanOnConnect:k,domNode:I,connectionMode:b,connectionRadius:H,lib:M,onConnectStart:S,cancelConnection:L,nodeLookup:j,rfId:E,panBy:z,updateConnection:P}=y.getState(),A=_.type==="target",N=(O,V)=>{d(!1),c==null||c(O,n,_.type,V)},T=O=>u==null?void 0:u(n,O),$=(O,V)=>{d(!0),f==null||f(v,n,_.type),S==null||S(O,V)};la.onPointerDown(v.nativeEvent,{autoPanOnConnect:k,connectionMode:b,connectionRadius:H,domNode:I,handleId:_.id,nodeId:_.nodeId,nodeLookup:j,isTarget:A,edgeUpdaterType:_.type,lib:M,flowId:E,cancelConnection:L,panBy:z,isValidConnection:(...O)=>{var V,Y;return((Y=(V=y.getState()).isValidConnection)==null?void 0:Y.call(V,...O))??!0},onConnect:T,onConnectStart:$,onConnectEnd:(...O)=>{var V,Y;return(Y=(V=y.getState()).onConnectEnd)==null?void 0:Y.call(V,...O)},onReconnectEnd:N,updateConnection:P,getTransform:()=>y.getState().transform,getFromHandle:()=>y.getState().connection.fromHandle,dragThreshold:y.getState().connectionDragThreshold,handleDomNode:v.currentTarget})},x=v=>w(v,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),m=v=>w(v,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),g=()=>h(!0),p=()=>h(!1);return F.jsxs(F.Fragment,{children:[(e===!0||e==="source")&&F.jsx(Rd,{position:l,centerX:r,centerY:o,radius:t,onMouseDown:x,onMouseEnter:g,onMouseOut:p,type:"source"}),(e===!0||e==="target")&&F.jsx(Rd,{position:a,centerX:i,centerY:s,radius:t,onMouseDown:m,onMouseEnter:g,onMouseOut:p,type:"target"})]})}function tN({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:o,onDoubleClick:i,onContextMenu:s,onMouseEnter:l,onMouseMove:a,onMouseLeave:u,reconnectRadius:f,onReconnect:c,onReconnectStart:d,onReconnectEnd:h,rfId:y,edgeTypes:w,noPanClassName:x,onError:m,disableKeyboardA11y:g}){let p=ie(Z=>Z.edgeLookup.get(e));const v=ie(Z=>Z.defaultEdgeOptions);p=v?{...v,...p}:p;let _=p.type||"default",k=(w==null?void 0:w[_])||Td[_];k===void 0&&(m==null||m("011",Pt.error011(_)),_="default",k=(w==null?void 0:w.default)||Td.default);const I=!!(p.focusable||t&&typeof p.focusable>"u"),b=typeof c<"u"&&(p.reconnectable||n&&typeof p.reconnectable>"u"),H=!!(p.selectable||r&&typeof p.selectable>"u"),M=W.useRef(null),[S,L]=W.useState(!1),[j,E]=W.useState(!1),z=ge(),{zIndex:P,sourceX:A,sourceY:N,targetX:T,targetY:$,sourcePosition:O,targetPosition:V}=ie(W.useCallback(Z=>{const ee=Z.nodeLookup.get(p.source),te=Z.nodeLookup.get(p.target);if(!ee||!te)return{zIndex:p.zIndex,...Ld};const ne=P1({id:e,sourceNode:ee,targetNode:te,sourceHandle:p.sourceHandle||null,targetHandle:p.targetHandle||null,connectionMode:Z.connectionMode,onError:m});return{zIndex:E1({selected:p.selected,zIndex:p.zIndex,sourceNode:ee,targetNode:te,elevateOnSelect:Z.elevateEdgesOnSelect,zIndexMode:Z.zIndexMode}),...ne||Ld}},[p.source,p.target,p.sourceHandle,p.targetHandle,p.selected,p.zIndex]),he),Y=W.useMemo(()=>p.markerStart?`url('#${ia(p.markerStart,y)}')`:void 0,[p.markerStart,y]),R=W.useMemo(()=>p.markerEnd?`url('#${ia(p.markerEnd,y)}')`:void 0,[p.markerEnd,y]);if(p.hidden||A===null||N===null||T===null||$===null)return null;const C=Z=>{var re;const{addSelectedEdges:ee,unselectNodesAndEdges:te,multiSelectionActive:ne}=z.getState();H&&(z.setState({nodesSelectionActive:!1}),p.selected&&ne?(te({nodes:[],edges:[p]}),(re=M.current)==null||re.blur()):ee([e])),o&&o(Z,p)},D=i?Z=>{i(Z,{...p})}:void 0,B=s?Z=>{s(Z,{...p})}:void 0,U=l?Z=>{l(Z,{...p})}:void 0,X=a?Z=>{a(Z,{...p})}:void 0,G=u?Z=>{u(Z,{...p})}:void 0,Q=Z=>{var ee;if(!g&&Rh.includes(Z.key)&&H){const{unselectNodesAndEdges:te,addSelectedEdges:ne}=z.getState();Z.key==="Escape"?((ee=M.current)==null||ee.blur(),te({edges:[p]})):ne([e])}};return F.jsx("svg",{style:{zIndex:P},children:F.jsxs("g",{className:Se(["react-flow__edge",`react-flow__edge-${_}`,p.className,x,{selected:p.selected,animated:p.animated,inactive:!H&&!o,updating:S,selectable:H}]),onClick:C,onDoubleClick:D,onContextMenu:B,onMouseEnter:U,onMouseMove:X,onMouseLeave:G,onKeyDown:I?Q:void 0,tabIndex:I?0:void 0,role:p.ariaRole??(I?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":p.ariaLabel===null?void 0:p.ariaLabel||`Edge from ${p.source} to ${p.target}`,"aria-describedby":I?`${ym}-${y}`:void 0,ref:M,...p.domAttributes,children:[!j&&F.jsx(k,{id:e,source:p.source,target:p.target,type:p.type,selected:p.selected,animated:p.animated,selectable:H,deletable:p.deletable??!0,label:p.label,labelStyle:p.labelStyle,labelShowBg:p.labelShowBg,labelBgStyle:p.labelBgStyle,labelBgPadding:p.labelBgPadding,labelBgBorderRadius:p.labelBgBorderRadius,sourceX:A,sourceY:N,targetX:T,targetY:$,sourcePosition:O,targetPosition:V,data:p.data,style:p.style,sourceHandleId:p.sourceHandle,targetHandleId:p.targetHandle,markerStart:Y,markerEnd:R,pathOptions:"pathOptions"in p?p.pathOptions:void 0,interactionWidth:p.interactionWidth}),b&&F.jsx(eN,{edge:p,isReconnectable:b,reconnectRadius:f,onReconnect:c,onReconnectStart:d,onReconnectEnd:h,sourceX:A,sourceY:N,targetX:T,targetY:$,sourcePosition:O,targetPosition:V,setUpdateHover:L,setReconnecting:E})]})})}var nN=W.memo(tN);const rN=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function Bm({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:o,onReconnect:i,onEdgeContextMenu:s,onEdgeMouseEnter:l,onEdgeMouseMove:a,onEdgeMouseLeave:u,onEdgeClick:f,reconnectRadius:c,onEdgeDoubleClick:d,onReconnectStart:h,onReconnectEnd:y,disableKeyboardA11y:w}){const{edgesFocusable:x,edgesReconnectable:m,elementsSelectable:g,onError:p}=ie(rN,he),v=Vk(t);return F.jsxs("div",{className:"react-flow__edges",children:[F.jsx(Yk,{defaultColor:e,rfId:n}),v.map(_=>F.jsx(nN,{id:_,edgesFocusable:x,edgesReconnectable:m,elementsSelectable:g,noPanClassName:o,onReconnect:i,onContextMenu:s,onMouseEnter:l,onMouseMove:a,onMouseLeave:u,onClick:f,reconnectRadius:c,onDoubleClick:d,onReconnectStart:h,onReconnectEnd:y,rfId:n,onError:p,edgeTypes:r,disableKeyboardA11y:w},_))]})}Bm.displayName="EdgeRenderer";const oN=W.memo(Bm),iN=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function sN({children:e}){const t=ie(iN);return F.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function lN(e){const t=il(),n=W.useRef(!1);W.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const aN=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function uN(e){const t=ie(aN),n=ge();return W.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function cN(e){return e.connection.inProgress?{...e.connection,to:Go(e.connection.to,e.transform)}:{...e.connection}}function fN(e){return cN}function dN(e){const t=fN();return ie(t,he)}const hN=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function pN({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:o,width:i,height:s,isValid:l,inProgress:a}=ie(hN,he);return!(i&&o&&a)?null:F.jsx("svg",{style:e,width:i,height:s,className:"react-flow__connectionline react-flow__container",children:F.jsx("g",{className:Se(["react-flow__connection",Oh(l)]),children:F.jsx(Um,{style:t,type:n,CustomComponent:r,isValid:l})})})}const Um=({style:e,type:t=qt.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:o,from:i,fromNode:s,fromHandle:l,fromPosition:a,to:u,toNode:f,toHandle:c,toPosition:d,pointer:h}=dN();if(!o)return;if(n)return F.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:s,fromHandle:l,fromX:i.x,fromY:i.y,toX:u.x,toY:u.y,fromPosition:a,toPosition:d,connectionStatus:Oh(r),toNode:f,toHandle:c,pointer:h});let y="";const w={sourceX:i.x,sourceY:i.y,sourcePosition:a,targetX:u.x,targetY:u.y,targetPosition:d};switch(t){case qt.Bezier:[y]=Gh(w);break;case qt.SimpleBezier:[y]=Lm(w);break;case qt.Step:[y]=ss({...w,borderRadius:0});break;case qt.SmoothStep:[y]=ss(w);break;default:[y]=Kh(w)}return F.jsx("path",{d:y,fill:"none",className:"react-flow__connection-path",style:e})};Um.displayName="ConnectionLine";const gN={};function Ad(e=gN){W.useRef(e),ge(),W.useEffect(()=>{},[e])}function mN(){ge(),W.useRef(!1),W.useEffect(()=>{},[])}function Wm({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:o,onNodeDoubleClick:i,onEdgeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:a,onNodeMouseLeave:u,onNodeContextMenu:f,onSelectionContextMenu:c,onSelectionStart:d,onSelectionEnd:h,connectionLineType:y,connectionLineStyle:w,connectionLineComponent:x,connectionLineContainerStyle:m,selectionKeyCode:g,selectionOnDrag:p,selectionMode:v,multiSelectionKeyCode:_,panActivationKeyCode:k,zoomActivationKeyCode:I,deleteKeyCode:b,onlyRenderVisibleElements:H,elementsSelectable:M,defaultViewport:S,translateExtent:L,minZoom:j,maxZoom:E,preventScrolling:z,defaultMarkerColor:P,zoomOnScroll:A,zoomOnPinch:N,panOnScroll:T,panOnScrollSpeed:$,panOnScrollMode:O,zoomOnDoubleClick:V,panOnDrag:Y,onPaneClick:R,onPaneMouseEnter:C,onPaneMouseMove:D,onPaneMouseLeave:B,onPaneScroll:U,onPaneContextMenu:X,paneClickDistance:G,nodeClickDistance:Q,onEdgeContextMenu:Z,onEdgeMouseEnter:ee,onEdgeMouseMove:te,onEdgeMouseLeave:ne,reconnectRadius:re,onReconnect:ke,onReconnectStart:lt,onReconnectEnd:Lt,noDragClassName:yn,noWheelClassName:zr,noPanClassName:Or,disableKeyboardA11y:jr,nodeExtent:ll,rfId:ti,viewport:Hn,onViewportChange:$r}){return Ad(e),Ad(t),mN(),lN(n),uN(Hn),F.jsx(Lk,{onPaneClick:R,onPaneMouseEnter:C,onPaneMouseMove:D,onPaneMouseLeave:B,onPaneContextMenu:X,onPaneScroll:U,paneClickDistance:G,deleteKeyCode:b,selectionKeyCode:g,selectionOnDrag:p,selectionMode:v,onSelectionStart:d,onSelectionEnd:h,multiSelectionKeyCode:_,panActivationKeyCode:k,zoomActivationKeyCode:I,elementsSelectable:M,zoomOnScroll:A,zoomOnPinch:N,zoomOnDoubleClick:V,panOnScroll:T,panOnScrollSpeed:$,panOnScrollMode:O,panOnDrag:Y,defaultViewport:S,translateExtent:L,minZoom:j,maxZoom:E,onSelectionContextMenu:c,preventScrolling:z,noDragClassName:yn,noWheelClassName:zr,noPanClassName:Or,disableKeyboardA11y:jr,onViewportChange:$r,isControlledViewport:!!Hn,children:F.jsxs(sN,{children:[F.jsx(oN,{edgeTypes:t,onEdgeClick:o,onEdgeDoubleClick:s,onReconnect:ke,onReconnectStart:lt,onReconnectEnd:Lt,onlyRenderVisibleElements:H,onEdgeContextMenu:Z,onEdgeMouseEnter:ee,onEdgeMouseMove:te,onEdgeMouseLeave:ne,reconnectRadius:re,defaultMarkerColor:P,noPanClassName:Or,disableKeyboardA11y:jr,rfId:ti}),F.jsx(pN,{style:w,type:y,component:x,containerStyle:m}),F.jsx("div",{className:"react-flow__edgelabel-renderer"}),F.jsx(Fk,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:l,onNodeMouseMove:a,onNodeMouseLeave:u,onNodeContextMenu:f,nodeClickDistance:Q,onlyRenderVisibleElements:H,noPanClassName:Or,noDragClassName:yn,disableKeyboardA11y:jr,nodeExtent:ll,rfId:ti}),F.jsx("div",{className:"react-flow__viewport-portal"})]})})}Wm.displayName="GraphView";const yN=W.memo(Wm),zd=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:a=.5,maxZoom:u=2,nodeOrigin:f,nodeExtent:c,zIndexMode:d="basic"}={})=>{const h=new Map,y=new Map,w=new Map,x=new Map,m=r??t??[],g=n??e??[],p=f??[0,0],v=c??xo;Jh(w,x,m);const{nodesInitialized:_}=sa(g,h,y,{nodeOrigin:p,nodeExtent:v,zIndexMode:d});let k=[0,0,1];if(s&&o&&i){const I=Yo(h,{filter:S=>!!((S.width||S.initialWidth)&&(S.height||S.initialHeight))}),{x:b,y:H,zoom:M}=vu(I,o,i,a,u,(l==null?void 0:l.padding)??.1);k=[b,H,M]}return{rfId:"1",width:o??0,height:i??0,transform:k,nodes:g,nodesInitialized:_,nodeLookup:h,parentLookup:y,edges:m,edgeLookup:x,connectionLookup:w,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:a,maxZoom:u,translateExtent:xo,nodeExtent:v,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:gr.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:p,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:s??!1,fitViewOptions:l,fitViewResolver:null,connection:{...zh},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:g1,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Ah,zIndexMode:d,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},vN=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:a,maxZoom:u,nodeOrigin:f,nodeExtent:c,zIndexMode:d})=>RE((h,y)=>{async function w(){const{nodeLookup:x,panZoom:m,fitViewOptions:g,fitViewResolver:p,width:v,height:_,minZoom:k,maxZoom:I}=y();m&&(await h1({nodes:x,width:v,height:_,panZoom:m,minZoom:k,maxZoom:I},g),p==null||p.resolve(!0),h({fitViewResolver:null}))}return{...zd({nodes:e,edges:t,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:a,maxZoom:u,nodeOrigin:f,nodeExtent:c,defaultNodes:n,defaultEdges:r,zIndexMode:d}),setNodes:x=>{const{nodeLookup:m,parentLookup:g,nodeOrigin:p,elevateNodesOnSelect:v,fitViewQueued:_,zIndexMode:k,nodesSelectionActive:I}=y(),{nodesInitialized:b,hasSelectedNodes:H}=sa(x,m,g,{nodeOrigin:p,nodeExtent:c,elevateNodesOnSelect:v,checkEquality:!0,zIndexMode:k}),M=I&&H;_&&b?(w(),h({nodes:x,nodesInitialized:b,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:M})):h({nodes:x,nodesInitialized:b,nodesSelectionActive:M})},setEdges:x=>{const{connectionLookup:m,edgeLookup:g}=y();Jh(m,g,x),h({edges:x})},setDefaultNodesAndEdges:(x,m)=>{if(x){const{setNodes:g}=y();g(x),h({hasDefaultNodes:!0})}if(m){const{setEdges:g}=y();g(m),h({hasDefaultEdges:!0})}},updateNodeInternals:x=>{const{triggerNodeChanges:m,nodeLookup:g,parentLookup:p,domNode:v,nodeOrigin:_,nodeExtent:k,debug:I,fitViewQueued:b,zIndexMode:H}=y(),{changes:M,updatedInternals:S}=j1(x,g,p,v,_,k,H);S&&(R1(g,p,{nodeOrigin:_,nodeExtent:k,zIndexMode:H}),b?(w(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),(M==null?void 0:M.length)>0&&(I&&console.log("React Flow: trigger node changes",M),m==null||m(M)))},updateNodePositions:(x,m=!1)=>{const g=[];let p=[];const{nodeLookup:v,triggerNodeChanges:_,connection:k,updateConnection:I,onNodesChangeMiddlewareMap:b}=y();for(const[H,M]of x){const S=v.get(H),L=!!(S!=null&&S.expandParent&&(S!=null&&S.parentId)&&(M!=null&&M.position)),j={id:H,type:"position",position:L?{x:Math.max(0,M.position.x),y:Math.max(0,M.position.y)}:M.position,dragging:m};if(S&&k.inProgress&&k.fromNode.id===S.id){const E=bn(S,k.fromHandle,J.Left,!0);I({...k,from:E})}L&&S.parentId&&g.push({id:H,parentId:S.parentId,rect:{...M.internals.positionAbsolute,width:M.measured.width??0,height:M.measured.height??0}}),p.push(j)}if(g.length>0){const{parentLookup:H,nodeOrigin:M}=y(),S=ku(g,v,H,M);p.push(...S)}for(const H of b.values())p=H(p);_(p)},triggerNodeChanges:x=>{const{onNodesChange:m,setNodes:g,nodes:p,hasDefaultNodes:v,debug:_}=y();if(x!=null&&x.length){if(v){const k=xm(x,p);g(k)}_&&console.log("React Flow: trigger node changes",x),m==null||m(x)}},triggerEdgeChanges:x=>{const{onEdgesChange:m,setEdges:g,edges:p,hasDefaultEdges:v,debug:_}=y();if(x!=null&&x.length){if(v){const k=Em(x,p);g(k)}_&&console.log("React Flow: trigger edge changes",x),m==null||m(x)}},addSelectedNodes:x=>{const{multiSelectionActive:m,edgeLookup:g,nodeLookup:p,triggerNodeChanges:v,triggerEdgeChanges:_}=y();if(m){const k=x.map(I=>xn(I,!0));v(k);return}v(or(p,new Set([...x]),!0)),_(or(g))},addSelectedEdges:x=>{const{multiSelectionActive:m,edgeLookup:g,nodeLookup:p,triggerNodeChanges:v,triggerEdgeChanges:_}=y();if(m){const k=x.map(I=>xn(I,!0));_(k);return}_(or(g,new Set([...x]))),v(or(p,new Set,!0))},unselectNodesAndEdges:({nodes:x,edges:m}={})=>{const{edges:g,nodes:p,nodeLookup:v,triggerNodeChanges:_,triggerEdgeChanges:k}=y(),I=x||p,b=m||g,H=[];for(const S of I){if(!S.selected)continue;const L=v.get(S.id);L&&(L.selected=!1),H.push(xn(S.id,!1))}const M=[];for(const S of b)S.selected&&M.push(xn(S.id,!1));_(H),k(M)},setMinZoom:x=>{const{panZoom:m,maxZoom:g}=y();m==null||m.setScaleExtent([x,g]),h({minZoom:x})},setMaxZoom:x=>{const{panZoom:m,minZoom:g}=y();m==null||m.setScaleExtent([g,x]),h({maxZoom:x})},setTranslateExtent:x=>{var m;(m=y().panZoom)==null||m.setTranslateExtent(x),h({translateExtent:x})},resetSelectedElements:()=>{const{edges:x,nodes:m,triggerNodeChanges:g,triggerEdgeChanges:p,elementsSelectable:v}=y();if(!v)return;const _=m.reduce((I,b)=>b.selected?[...I,xn(b.id,!1)]:I,[]),k=x.reduce((I,b)=>b.selected?[...I,xn(b.id,!1)]:I,[]);g(_),p(k)},setNodeExtent:x=>{const{nodes:m,nodeLookup:g,parentLookup:p,nodeOrigin:v,elevateNodesOnSelect:_,nodeExtent:k,zIndexMode:I}=y();x[0][0]===k[0][0]&&x[0][1]===k[0][1]&&x[1][0]===k[1][0]&&x[1][1]===k[1][1]||(sa(m,g,p,{nodeOrigin:v,nodeExtent:x,elevateNodesOnSelect:_,checkEquality:!1,zIndexMode:I}),h({nodeExtent:x}))},panBy:x=>{const{transform:m,width:g,height:p,panZoom:v,translateExtent:_}=y();return $1({delta:x,panZoom:v,transform:m,translateExtent:_,width:g,height:p})},setCenter:async(x,m,g)=>{const{width:p,height:v,maxZoom:_,panZoom:k}=y();if(!k)return Promise.resolve(!1);const I=typeof(g==null?void 0:g.zoom)<"u"?g.zoom:_;return await k.setViewport({x:p/2-x*I,y:v/2-m*I,zoom:I},{duration:g==null?void 0:g.duration,ease:g==null?void 0:g.ease,interpolate:g==null?void 0:g.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{h({connection:{...zh}})},updateConnection:x=>{h({connection:x})},reset:()=>h({...zd()})}},Object.is);function Ym({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:o,initialHeight:i,initialMinZoom:s,initialMaxZoom:l,initialFitViewOptions:a,fitView:u,nodeOrigin:f,nodeExtent:c,zIndexMode:d,children:h}){const[y]=W.useState(()=>vN({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:u,minZoom:s,maxZoom:l,fitViewOptions:a,nodeOrigin:f,nodeExtent:c,zIndexMode:d}));return F.jsx($S,{value:y,children:F.jsx(sk,{children:h})})}function wN({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:o,width:i,height:s,fitView:l,fitViewOptions:a,minZoom:u,maxZoom:f,nodeOrigin:c,nodeExtent:d,zIndexMode:h}){return W.useContext(ol)?F.jsx(F.Fragment,{children:e}):F.jsx(Ym,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:o,initialWidth:i,initialHeight:s,fitView:l,initialFitViewOptions:a,initialMinZoom:u,initialMaxZoom:f,nodeOrigin:c,nodeExtent:d,zIndexMode:h,children:e})}const xN={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function EN({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:i,edgeTypes:s,onNodeClick:l,onEdgeClick:a,onInit:u,onMove:f,onMoveStart:c,onMoveEnd:d,onConnect:h,onConnectStart:y,onConnectEnd:w,onClickConnectStart:x,onClickConnectEnd:m,onNodeMouseEnter:g,onNodeMouseMove:p,onNodeMouseLeave:v,onNodeContextMenu:_,onNodeDoubleClick:k,onNodeDragStart:I,onNodeDrag:b,onNodeDragStop:H,onNodesDelete:M,onEdgesDelete:S,onDelete:L,onSelectionChange:j,onSelectionDragStart:E,onSelectionDrag:z,onSelectionDragStop:P,onSelectionContextMenu:A,onSelectionStart:N,onSelectionEnd:T,onBeforeDelete:$,connectionMode:O,connectionLineType:V=qt.Bezier,connectionLineStyle:Y,connectionLineComponent:R,connectionLineContainerStyle:C,deleteKeyCode:D="Backspace",selectionKeyCode:B="Shift",selectionOnDrag:U=!1,selectionMode:X=Eo.Full,panActivationKeyCode:G="Space",multiSelectionKeyCode:Q=So()?"Meta":"Control",zoomActivationKeyCode:Z=So()?"Meta":"Control",snapToGrid:ee,snapGrid:te,onlyRenderVisibleElements:ne=!1,selectNodesOnDrag:re,nodesDraggable:ke,autoPanOnNodeFocus:lt,nodesConnectable:Lt,nodesFocusable:yn,nodeOrigin:zr=vm,edgesFocusable:Or,edgesReconnectable:jr,elementsSelectable:ll=!0,defaultViewport:ti=ZS,minZoom:Hn=.5,maxZoom:$r=2,translateExtent:yc=xo,preventScrolling:s0=!0,nodeExtent:al,defaultMarkerColor:l0="#b1b1b7",zoomOnScroll:a0=!0,zoomOnPinch:u0=!0,panOnScroll:c0=!1,panOnScrollSpeed:f0=.5,panOnScrollMode:d0=Cn.Free,zoomOnDoubleClick:h0=!0,panOnDrag:p0=!0,onPaneClick:g0,onPaneMouseEnter:m0,onPaneMouseMove:y0,onPaneMouseLeave:v0,onPaneScroll:w0,onPaneContextMenu:x0,paneClickDistance:E0=1,nodeClickDistance:_0=0,children:S0,onReconnect:k0,onReconnectStart:N0,onReconnectEnd:C0,onEdgeContextMenu:M0,onEdgeDoubleClick:I0,onEdgeMouseEnter:P0,onEdgeMouseMove:T0,onEdgeMouseLeave:L0,reconnectRadius:b0=10,onNodesChange:R0,onEdgesChange:A0,noDragClassName:z0="nodrag",noWheelClassName:O0="nowheel",noPanClassName:vc="nopan",fitView:wc,fitViewOptions:xc,connectOnClick:j0,attributionPosition:$0,proOptions:D0,defaultEdgeOptions:F0,elevateNodesOnSelect:V0=!0,elevateEdgesOnSelect:H0=!1,disableKeyboardA11y:Ec=!1,autoPanOnConnect:B0,autoPanOnNodeDrag:U0,autoPanSpeed:W0,connectionRadius:Y0,isValidConnection:X0,onError:G0,style:Q0,id:_c,nodeDragThreshold:K0,connectionDragThreshold:Z0,viewport:q0,onViewportChange:J0,width:ey,height:ty,colorMode:ny="light",debug:ry,onScroll:ni,ariaLabelConfig:oy,zIndexMode:Sc="basic",...iy},sy){const ul=_c||"1",ly=tk(ny),ay=W.useCallback(kc=>{kc.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),ni==null||ni(kc)},[ni]);return F.jsx("div",{"data-testid":"rf__wrapper",...iy,onScroll:ay,style:{...Q0,...xN},ref:sy,className:Se(["react-flow",o,ly]),id:_c,role:"application",children:F.jsxs(wN,{nodes:e,edges:t,width:ey,height:ty,fitView:wc,fitViewOptions:xc,minZoom:Hn,maxZoom:$r,nodeOrigin:zr,nodeExtent:al,zIndexMode:Sc,children:[F.jsx(ek,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:h,onConnectStart:y,onConnectEnd:w,onClickConnectStart:x,onClickConnectEnd:m,nodesDraggable:ke,autoPanOnNodeFocus:lt,nodesConnectable:Lt,nodesFocusable:yn,edgesFocusable:Or,edgesReconnectable:jr,elementsSelectable:ll,elevateNodesOnSelect:V0,elevateEdgesOnSelect:H0,minZoom:Hn,maxZoom:$r,nodeExtent:al,onNodesChange:R0,onEdgesChange:A0,snapToGrid:ee,snapGrid:te,connectionMode:O,translateExtent:yc,connectOnClick:j0,defaultEdgeOptions:F0,fitView:wc,fitViewOptions:xc,onNodesDelete:M,onEdgesDelete:S,onDelete:L,onNodeDragStart:I,onNodeDrag:b,onNodeDragStop:H,onSelectionDrag:z,onSelectionDragStart:E,onSelectionDragStop:P,onMove:f,onMoveStart:c,onMoveEnd:d,noPanClassName:vc,nodeOrigin:zr,rfId:ul,autoPanOnConnect:B0,autoPanOnNodeDrag:U0,autoPanSpeed:W0,onError:G0,connectionRadius:Y0,isValidConnection:X0,selectNodesOnDrag:re,nodeDragThreshold:K0,connectionDragThreshold:Z0,onBeforeDelete:$,debug:ry,ariaLabelConfig:oy,zIndexMode:Sc}),F.jsx(yN,{onInit:u,onNodeClick:l,onEdgeClick:a,onNodeMouseEnter:g,onNodeMouseMove:p,onNodeMouseLeave:v,onNodeContextMenu:_,onNodeDoubleClick:k,nodeTypes:i,edgeTypes:s,connectionLineType:V,connectionLineStyle:Y,connectionLineComponent:R,connectionLineContainerStyle:C,selectionKeyCode:B,selectionOnDrag:U,selectionMode:X,deleteKeyCode:D,multiSelectionKeyCode:Q,panActivationKeyCode:G,zoomActivationKeyCode:Z,onlyRenderVisibleElements:ne,defaultViewport:ti,translateExtent:yc,minZoom:Hn,maxZoom:$r,preventScrolling:s0,zoomOnScroll:a0,zoomOnPinch:u0,zoomOnDoubleClick:h0,panOnScroll:c0,panOnScrollSpeed:f0,panOnScrollMode:d0,panOnDrag:p0,onPaneClick:g0,onPaneMouseEnter:m0,onPaneMouseMove:y0,onPaneMouseLeave:v0,onPaneScroll:w0,onPaneContextMenu:x0,paneClickDistance:E0,nodeClickDistance:_0,onSelectionContextMenu:A,onSelectionStart:N,onSelectionEnd:T,onReconnect:k0,onReconnectStart:N0,onReconnectEnd:C0,onEdgeContextMenu:M0,onEdgeDoubleClick:I0,onEdgeMouseEnter:P0,onEdgeMouseMove:T0,onEdgeMouseLeave:L0,reconnectRadius:b0,defaultMarkerColor:l0,noDragClassName:z0,noWheelClassName:O0,noPanClassName:vc,rfId:ul,disableKeyboardA11y:Ec,nodeExtent:al,viewport:q0,onViewportChange:J0}),F.jsx(KS,{onSelectionChange:j}),S0,F.jsx(WS,{proOptions:D0,position:$0}),F.jsx(US,{rfId:ul,disableKeyboardA11y:Ec})]})})}var _N=_m(EN);const SN=e=>({x:e.transform[0],y:e.transform[1],zoom:e.transform[2]});function kN(){return ie(SN,he)}function NN(e){const[t,n]=W.useState(e),r=W.useCallback(o=>n(i=>xm(o,i)),[]);return[t,n,r]}function CN(e){const[t,n]=W.useState(e),r=W.useCallback(o=>n(i=>Em(o,i)),[]);return[t,n,r]}function MN({dimensions:e,lineWidth:t,variant:n,className:r}){return F.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Se(["react-flow__background-pattern",n,r])})}function IN({radius:e,className:t}){return F.jsx("circle",{cx:e,cy:e,r:e,className:Se(["react-flow__background-pattern","dots",t])})}var Dt;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Dt||(Dt={}));const PN={[Dt.Dots]:1,[Dt.Lines]:1,[Dt.Cross]:6},TN=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Xm({id:e,variant:t=Dt.Dots,gap:n=20,size:r,lineWidth:o=1,offset:i=0,color:s,bgColor:l,style:a,className:u,patternClassName:f}){const c=W.useRef(null),{transform:d,patternId:h}=ie(TN,he),y=r||PN[t],w=t===Dt.Dots,x=t===Dt.Cross,m=Array.isArray(n)?n:[n,n],g=[m[0]*d[2]||1,m[1]*d[2]||1],p=y*d[2],v=Array.isArray(i)?i:[i,i],_=x?[p,p]:g,k=[v[0]*d[2]||1+_[0]/2,v[1]*d[2]||1+_[1]/2],I=`${h}${e||""}`;return F.jsxs("svg",{className:Se(["react-flow__background",u]),style:{...a,...sl,"--xy-background-color-props":l,"--xy-background-pattern-color-props":s},ref:c,"data-testid":"rf__background",children:[F.jsx("pattern",{id:I,x:d[0]%g[0],y:d[1]%g[1],width:g[0],height:g[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${k[0]},-${k[1]})`,children:w?F.jsx(IN,{radius:p/2,className:f}):F.jsx(MN,{dimensions:_,lineWidth:o,variant:t,className:f})}),F.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${I})`})]})}Xm.displayName="Background";const LN=W.memo(Xm);function bN(){return F.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:F.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function RN(){return F.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:F.jsx("path",{d:"M0 0h32v4.2H0z"})})}function AN(){return F.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:F.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 zN(){return F.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:F.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 ON(){return F.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:F.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 Ii({children:e,className:t,...n}){return F.jsx("button",{type:"button",className:Se(["react-flow__controls-button",t]),...n,children:e})}const jN=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function Gm({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:o,onZoomIn:i,onZoomOut:s,onFitView:l,onInteractiveChange:a,className:u,children:f,position:c="bottom-left",orientation:d="vertical","aria-label":h}){const y=ge(),{isInteractive:w,minZoomReached:x,maxZoomReached:m,ariaLabelConfig:g}=ie(jN,he),{zoomIn:p,zoomOut:v,fitView:_}=il(),k=()=>{p(),i==null||i()},I=()=>{v(),s==null||s()},b=()=>{_(o),l==null||l()},H=()=>{y.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),a==null||a(!w)},M=d==="horizontal"?"horizontal":"vertical";return F.jsxs(Jo,{className:Se(["react-flow__controls",M,u]),position:c,style:e,"data-testid":"rf__controls","aria-label":h??g["controls.ariaLabel"],children:[t&&F.jsxs(F.Fragment,{children:[F.jsx(Ii,{onClick:k,className:"react-flow__controls-zoomin",title:g["controls.zoomIn.ariaLabel"],"aria-label":g["controls.zoomIn.ariaLabel"],disabled:m,children:F.jsx(bN,{})}),F.jsx(Ii,{onClick:I,className:"react-flow__controls-zoomout",title:g["controls.zoomOut.ariaLabel"],"aria-label":g["controls.zoomOut.ariaLabel"],disabled:x,children:F.jsx(RN,{})})]}),n&&F.jsx(Ii,{className:"react-flow__controls-fitview",onClick:b,title:g["controls.fitView.ariaLabel"],"aria-label":g["controls.fitView.ariaLabel"],children:F.jsx(AN,{})}),r&&F.jsx(Ii,{className:"react-flow__controls-interactive",onClick:H,title:g["controls.interactive.ariaLabel"],"aria-label":g["controls.interactive.ariaLabel"],children:w?F.jsx(ON,{}):F.jsx(zN,{})}),f]})}Gm.displayName="Controls";W.memo(Gm);function $N({id:e,x:t,y:n,width:r,height:o,style:i,color:s,strokeColor:l,strokeWidth:a,className:u,borderRadius:f,shapeRendering:c,selected:d,onClick:h}){const{background:y,backgroundColor:w}=i||{},x=s||y||w;return F.jsx("rect",{className:Se(["react-flow__minimap-node",{selected:d},u]),x:t,y:n,rx:f,ry:f,width:r,height:o,style:{fill:x,stroke:l,strokeWidth:a},shapeRendering:c,onClick:h?m=>h(m,e):void 0})}const DN=W.memo($N),FN=e=>e.nodes.map(t=>t.id),Wl=e=>e instanceof Function?e:()=>e;function VN({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:o,nodeComponent:i=DN,onClick:s}){const l=ie(FN,he),a=Wl(t),u=Wl(e),f=Wl(n),c=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return F.jsx(F.Fragment,{children:l.map(d=>F.jsx(BN,{id:d,nodeColorFunc:a,nodeStrokeColorFunc:u,nodeClassNameFunc:f,nodeBorderRadius:r,nodeStrokeWidth:o,NodeComponent:i,onClick:s,shapeRendering:c},d))})}function HN({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:o,nodeStrokeWidth:i,shapeRendering:s,NodeComponent:l,onClick:a}){const{node:u,x:f,y:c,width:d,height:h}=ie(y=>{const w=y.nodeLookup.get(e);if(!w)return{node:void 0,x:0,y:0,width:0,height:0};const x=w.internals.userNode,{x:m,y:g}=w.internals.positionAbsolute,{width:p,height:v}=Wt(x);return{node:x,x:m,y:g,width:p,height:v}},he);return!u||u.hidden||!Hh(u)?null:F.jsx(l,{x:f,y:c,width:d,height:h,style:u.style,selected:!!u.selected,className:r(u),color:t(u),borderRadius:o,strokeColor:n(u),strokeWidth:i,shapeRendering:s,onClick:a,id:u.id})}const BN=W.memo(HN);var UN=W.memo(VN);const WN=200,YN=150,XN=e=>!e.hidden,GN=e=>{const 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?Vh(Yo(e.nodeLookup,{filter:XN}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},QN="react-flow__minimap-desc";function Qm({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:o="",nodeBorderRadius:i=5,nodeStrokeWidth:s,nodeComponent:l,bgColor:a,maskColor:u,maskStrokeColor:f,maskStrokeWidth:c,position:d="bottom-right",onClick:h,onNodeClick:y,pannable:w=!1,zoomable:x=!1,ariaLabel:m,inversePan:g,zoomStep:p=1,offsetScale:v=5}){const _=ge(),k=W.useRef(null),{boundingRect:I,viewBB:b,rfId:H,panZoom:M,translateExtent:S,flowWidth:L,flowHeight:j,ariaLabelConfig:E}=ie(GN,he),z=(e==null?void 0:e.width)??WN,P=(e==null?void 0:e.height)??YN,A=I.width/z,N=I.height/P,T=Math.max(A,N),$=T*z,O=T*P,V=v*T,Y=I.x-($-I.width)/2-V,R=I.y-(O-I.height)/2-V,C=$+V*2,D=O+V*2,B=`${QN}-${H}`,U=W.useRef(0),X=W.useRef();U.current=T,W.useEffect(()=>{if(k.current&&M)return X.current=X1({domNode:k.current,panZoom:M,getTransform:()=>_.getState().transform,getViewScale:()=>U.current}),()=>{var ee;(ee=X.current)==null||ee.destroy()}},[M]),W.useEffect(()=>{var ee;(ee=X.current)==null||ee.update({translateExtent:S,width:L,height:j,inversePan:g,pannable:w,zoomStep:p,zoomable:x})},[w,x,g,p,S,L,j]);const G=h?ee=>{var re;const[te,ne]=((re=X.current)==null?void 0:re.pointer(ee))||[0,0];h(ee,{x:te,y:ne})}:void 0,Q=y?W.useCallback((ee,te)=>{const ne=_.getState().nodeLookup.get(te).internals.userNode;y(ee,ne)},[]):void 0,Z=m??E["minimap.ariaLabel"];return F.jsx(Jo,{position:d,style:{...e,"--xy-minimap-background-color-props":typeof a=="string"?a:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-stroke-width-props":typeof c=="number"?c*T:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof s=="number"?s:void 0},className:Se(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:F.jsxs("svg",{width:z,height:P,viewBox:`${Y} ${R} ${C} ${D}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":B,ref:k,onClick:G,children:[Z&&F.jsx("title",{id:B,children:Z}),F.jsx(UN,{onClick:Q,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:o,nodeStrokeWidth:s,nodeComponent:l}),F.jsx("path",{className:"react-flow__minimap-mask",d:`M${Y-V},${R-V}h${C+V*2}v${D+V*2}h${-C-V*2}z
|
|
62
|
+
M${b.x},${b.y}h${b.width}v${b.height}h${-b.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Qm.displayName="MiniMap";W.memo(Qm);const KN=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,ZN={[wr.Line]:"right",[wr.Handle]:"bottom-right"};function qN({nodeId:e,position:t,variant:n=wr.Handle,className:r,style:o=void 0,children:i,color:s,minWidth:l=10,minHeight:a=10,maxWidth:u=Number.MAX_VALUE,maxHeight:f=Number.MAX_VALUE,keepAspectRatio:c=!1,resizeDirection:d,autoScale:h=!0,shouldResize:y,onResizeStart:w,onResize:x,onResizeEnd:m}){const g=Cm(),p=typeof e=="string"?e:g,v=ge(),_=W.useRef(null),k=n===wr.Handle,I=ie(W.useCallback(KN(k&&h),[k,h]),he),b=W.useRef(null),H=t??ZN[n];W.useEffect(()=>{if(!(!_.current||!p))return b.current||(b.current=lE({domNode:_.current,nodeId:p,getStoreItems:()=>{const{nodeLookup:S,transform:L,snapGrid:j,snapToGrid:E,nodeOrigin:z,domNode:P}=v.getState();return{nodeLookup:S,transform:L,snapGrid:j,snapToGrid:E,nodeOrigin:z,paneDomNode:P}},onChange:(S,L)=>{const{triggerNodeChanges:j,nodeLookup:E,parentLookup:z,nodeOrigin:P}=v.getState(),A=[],N={x:S.x,y:S.y},T=E.get(p);if(T&&T.expandParent&&T.parentId){const $=T.origin??P,O=S.width??T.measured.width??0,V=S.height??T.measured.height??0,Y={id:T.id,parentId:T.parentId,rect:{width:O,height:V,...Bh({x:S.x??T.position.x,y:S.y??T.position.y},{width:O,height:V},T.parentId,E,$)}},R=ku([Y],E,z,P);A.push(...R),N.x=S.x?Math.max($[0]*O,S.x):void 0,N.y=S.y?Math.max($[1]*V,S.y):void 0}if(N.x!==void 0&&N.y!==void 0){const $={id:p,type:"position",position:{...N}};A.push($)}if(S.width!==void 0&&S.height!==void 0){const O={id:p,type:"dimensions",resizing:!0,setAttributes:d?d==="horizontal"?"width":"height":!0,dimensions:{width:S.width,height:S.height}};A.push(O)}for(const $ of L){const O={...$,type:"position"};A.push(O)}j(A)},onEnd:({width:S,height:L})=>{const j={id:p,type:"dimensions",resizing:!1,dimensions:{width:S,height:L}};v.getState().triggerNodeChanges([j])}})),b.current.update({controlPosition:H,boundaries:{minWidth:l,minHeight:a,maxWidth:u,maxHeight:f},keepAspectRatio:c,resizeDirection:d,onResizeStart:w,onResize:x,onResizeEnd:m,shouldResize:y}),()=>{var S;(S=b.current)==null||S.destroy()}},[H,l,a,u,f,c,w,x,m,y]);const M=H.split("-");return F.jsx("div",{className:Se(["react-flow__resize-control","nodrag",...M,n,r]),ref:_,style:{...o,scale:I,...s&&{[k?"backgroundColor":"borderColor"]:s}},children:i})}W.memo(qN);var Ir;(function(e){e.Parsing="Parsing",e.Validation="Validation",e.Network="Network",e.Dependency="Dependency",e.Rendering="Rendering",e.Timeout="Timeout",e.Permission="Permission",e.Configuration="Configuration",e.Runtime="Runtime"})(Ir||(Ir={}));var Od;(function(e){e.Debug="debug",e.Info="info",e.Warn="warn",e.Error="error",e.Success="success"})(Od||(Od={}));const Pr={PLUGIN_ERROR:"PLUGIN_ERROR",RETRY_VISUALIZATION:"RETRY_VISUALIZATION",CLOSE_VISUALIZER:"CLOSE_VISUALIZER",COPY_STACK_TRACE:"COPY_STACK_TRACE",OPEN_SETTINGS:"openSettings",REQUEST_PLUGIN_DATA:"REQUEST_PLUGIN_DATA",PLUGIN_DATA_RESPONSE:"PLUGIN_DATA_RESPONSE",PLUGIN_DATA_UPDATE:"PLUGIN_DATA_UPDATE",SUBMIT_EDIT:"SUBMIT_EDIT"};new Set(Object.values(Pr));let Qr=null;function Km(e){const t=window.__ExtensionHostExpectedRenderId;return t===void 0||e.renderId===t}function Zm(e){if(typeof window>"u")return console.error("[sendToHost] Not in browser context"),!1;if(typeof window.__ExtensionHostPostMessage=="function")try{return window.__ExtensionHostPostMessage(e),!0}catch(t){console.error("[sendToHost] Error sending via __ExtensionHostPostMessage:",t)}if(window.parent&&window.parent!==window)try{const t=typeof window.location<"u"&&window.location.origin?window.location.origin:"*";return window.parent.postMessage(e,t),!0}catch(t){console.error("[sendToHost] Error sending via window.parent:",t)}return console.error("[sendToHost] No host communication channel available"),!1}async function JN(e=5e3){return typeof window.__ExtensionHostPostMessage!="function"?(console.error("[getPluginData] Extension host postMessage not available. Ensure platform bootstrap has run."),Promise.resolve(null)):(Qr!==null||(Qr=new Promise(t=>{let n=0;const r=i=>{if(!qm(i))return;const s=i.data;s.type===Pr.PLUGIN_DATA_RESPONSE&&Km(s)&&(o(),t(s.payload))};function o(){n&&(clearTimeout(n),n=0),window.removeEventListener("message",r),Qr=null}window.addEventListener("message",r),n=window.setTimeout(()=>{console.error("[getPluginData] Timeout waiting for plugin data"),o(),t(null)},e),window.__ExtensionHostPostMessage({type:Pr.REQUEST_PLUGIN_DATA})})),Qr)}function qm(e){var t,n;return e.source===null?!0:typeof window>"u"?!1:window.parent!==window&&e.source===window.parent||window.parent===window&&((n=(t=e.source)==null?void 0:t.constructor)==null?void 0:n.name)==="Window"}function e2(e){const t=n=>{if(!qm(n))return;const r=n.data;if(r.type===Pr.PLUGIN_DATA_UPDATE&&Km(r)){const o=r.payload;e(o)}};return window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}}class Dn{constructor(){this.error={}}static create(){return new Dn}category(t){return this.error.category=t,this}message(t){return this.error.message=t,this}stackTrace(t){return this.error.stackTrace=t,this}context(t){return this.error.context={...this.error.context,...t},this}build(){if(!this.error.category)throw new Error("ErrorBuilder: category is required");if(!this.error.message)throw new Error("ErrorBuilder: message is required");return this.error}send(){const t=this.build();Zm({type:Pr.PLUGIN_ERROR,payload:t})||console.error("[ErrorBuilder] Unable to send error to host:",t)}static fromError(t,n,r){const o=Dn.create().category(t);return n instanceof Error?(o.message(n.message),o.stackTrace(n.stack)):o.message(String(n)),r&&o.context(r),o}}function t2(){typeof window>"u"||(window.addEventListener("error",e=>{const t=e.error;Dn.create().category(Ir.Runtime).message(e.message||"An error occurred").stackTrace(t==null?void 0:t.stack).context({lineno:e.lineno,colno:e.colno,filename:e.filename}).send()}),window.addEventListener("unhandledrejection",e=>{const t=e.reason;let n;if(t instanceof Error)n=t.message;else if(t!=null&&typeof t=="object")try{n=JSON.stringify(t)}catch{n=String(t)}else n=t!=null?String(t):"Unhandled promise rejection";Dn.create().category(Ir.Runtime).message(n).stackTrace(t instanceof Error?t.stack:void 0).send()}))}const Tr="data-mv-selectable",Lr="data-mv-type",nu="data-mv-id",jd="data-mv-selected",$d="data-mv-hover",Jm=.5,n2=5;function Pi(e,t,n,r){return{left:Math.min(e,n),top:Math.min(t,r),right:Math.max(e,n),bottom:Math.max(t,r)}}function r2(e,t){const n=Math.max(0,Math.min(e.right,t.right)-Math.max(e.left,t.left)),r=Math.max(0,Math.min(e.bottom,t.bottom)-Math.max(e.top,t.top));return n*r}function o2(e){return Math.max(0,e.right-e.left)*Math.max(0,e.bottom-e.top)}function e0(e,t){const n=o2(t);return n<=0?0:r2(e,t)/n}function mc(e){const t=e.getAttribute(Lr),n=e.getAttribute(nu);return!t||!n?null:{type:t,id:n}}function Qi(e){return`${e.type}::${e.id}`}function i2(e,t,n=Jm){const o=Array.from(e.querySelectorAll(`[${Tr}]`)).filter(l=>{const a=l.getBoundingClientRect();return e0(t,{left:a.left,top:a.top,right:a.right,bottom:a.bottom})>=n}),i=new Set(o),s=[];for(const l of o){let a=l.parentElement,u=!1;for(;a;){if(i.has(a)){u=!0;break}a=a.parentElement}if(u)continue;const f=mc(l);f&&s.push(f)}return s}function s2(e,t,n=Jm){const r=Array.from(e.querySelectorAll(`[${Tr}]`)),o=[];for(const i of r){const s=i.getBoundingClientRect();if(e0(t,{left:s.left,top:s.top,right:s.right,bottom:s.bottom})>=n){const l=mc(i);l&&o.push(l)}}return o}function Yl(e,t,n){const r=Array.from(e.querySelectorAll(`[${Tr}]`));let o=null;for(const i of r){const s=i.getBoundingClientRect();if(t<s.left||t>s.right||n<s.top||n>s.bottom)continue;const l=(s.right-s.left)*(s.bottom-s.top);(!o||l<o.area)&&(o={el:i,area:l})}return o?mc(o.el):null}function l2(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=t+((t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24))>>>0;return t.toString(16).padStart(8,"0")}function t0(e,t,n,r=0){return`${t}_${l2(`${e}/${t}:${n}#${r}`)}`}function n0(e){return t0("","object",e)}function a2(e,t){return t0(n0(e),"field",t)}const u2=()=>F.jsx("svg",{className:"field-row__icon",viewBox:"0 0 52 52",width:"14",height:"14","aria-label":"Identity field",children:F.jsx("path",{fill:"currentColor",d:"M46 8H34.9l.1 1a7 7 0 0 1-7 7h-6a7 7 0 0 1-7-7l.1-1H6a4 4 0 0 0-4 4v30a4 4 0 0 0 4 4h40a4 4 0 0 0 4-4V12a4 4 0 0 0-4-4M21.7 38H10.3C9 38 8 36.8 8 35.5c0-2 2.1-3.1 4.3-4 1.5-.6 1.7-1.2 1.7-1.9 0-.6-.4-1.2-.9-1.7-.9-.8-1.4-2-1.4-3.3 0-2.5 1.5-4.6 4.2-4.6s4.2 2.1 4.2 4.6c0 1.3-.5 2.5-1.4 3.3-.5.5-.9 1.1-.9 1.7s.2 1.2 1.7 1.9c2.2.9 4.3 2 4.3 4 .2 1.3-.8 2.5-2.1 2.5M44 34a.94.94 0 0 1-1 1H29a.94.94 0 0 1-1-1v-2a.94.94 0 0 1 1-1h14a.94.94 0 0 1 1 1zm2-8a.94.94 0 0 1-1 1H29a.94.94 0 0 1-1-1v-2a.94.94 0 0 1 1-1h16a.94.94 0 0 1 1 1zM22 12h6c1.7 0 3-1.3 3-3s-1.3-3-3-3h-6c-1.7 0-3 1.3-3 3s1.3 3 3 3"})}),Xl=({field:e,isNameField:t,objectApiName:n})=>{const[r,o]=W.useState(!1),[i,s]=W.useState({top:0,left:0}),l=W.useRef(null),a=e.description||e.helpText,u=()=>{if(!a||!l.current)return;const h=l.current.getBoundingClientRect();s({top:h.top,left:h.left+h.width/2}),o(!0)},f=["field-row",a?"field-row--hoverable":"",r?"field-row--hovered":""].filter(Boolean).join(" "),c=e.isRelationship?`${e.apiName}`:void 0,d=a2(n,e.apiName);return F.jsxs("div",{ref:l,className:f,"data-mv-id":d,onMouseEnter:u,onMouseLeave:()=>o(!1),children:[e.isRelationship&&c&&F.jsx($n,{type:"source",position:J.Right,id:c,className:"field-row__handle"}),F.jsxs("div",{className:"field-row__name",children:[t&&F.jsx(u2,{}),e.isExternalId&&F.jsx("span",{className:"field-row__ext-tag",children:"[EXT]"}),F.jsx("span",{className:`field-row__api-name ${e.isRelationship?"field-row__api-name--relationship":""}`,children:e.apiName})]}),F.jsx("span",{className:"field-row__type",children:e.dataType}),r&&a&&pm.createPortal(F.jsxs("div",{className:"field-row__tooltip",style:{top:i.top,left:i.left},children:[e.description&&F.jsxs("div",{children:[F.jsx("strong",{children:"Description:"})," ",e.description]}),e.helpText&&F.jsxs("div",{style:{marginTop:e.description?4:0},children:[F.jsx("strong",{children:"Help Text:"})," ",e.helpText]})]}),document.body)]})},c2=({data:e})=>{const t=e.type==="standard"?"standard":"custom",n=e.isActive?"object-card--active":"",r=e.isInactive?"object-card--inactive":"",o={apiName:"Name",label:"Name",dataType:e.nameFieldType==="AutoNumber"?"Auto-Number":"Text (255)",isRelationship:!1},i=e.fields.filter(l=>l.isRelationship),s=e.fields.filter(l=>!l.isRelationship);return F.jsxs("div",{className:`object-card object-card--${t} ${n} ${r}`,"data-mv-id":n0(e.apiName),children:[e.isActive&&F.jsxs("div",{className:"object-card__active-badge",children:[e.apiName,".object-meta.xml"]}),F.jsxs("div",{className:"object-card__header",children:[F.jsx("div",{className:"object-card__title",title:"API Name",children:e.apiName}),F.jsxs("div",{className:"object-card__subtitle",title:"Master Label",children:[F.jsx("span",{className:"object-card__subtitle-prefix",children:"Label: "}),e.label]})]}),F.jsxs("div",{className:"object-card__fields nowheel",children:[F.jsx(Xl,{field:o,isNameField:!0,objectApiName:e.apiName}),i.map(l=>F.jsx(Xl,{field:l,objectApiName:e.apiName},l.apiName)),s.map(l=>F.jsx(Xl,{field:l,objectApiName:e.apiName},l.apiName))]}),F.jsx($n,{type:"target",position:J.Left,className:`object-card__handle object-card__handle--${t}`}),F.jsx($n,{type:"source",position:J.Right,className:`object-card__handle object-card__handle--${t}`})]})},f2=({id:e,sourceX:t,sourceY:n,targetX:r,targetY:o,sourcePosition:i,targetPosition:s,data:l,markerEnd:a})=>{const u=l,f=(u==null?void 0:u.relType)==="MasterDetail",[c]=ss({sourceX:t,sourceY:n,targetX:r,targetY:o,sourcePosition:i,targetPosition:s,borderRadius:16}),d="var(--mv-edge-neutral)",h=(u==null?void 0:u.sourceType)==="standard"?"var(--mv-accent-logic)":"var(--mv-accent-data)",y=(u==null?void 0:u.targetType)==="standard"?"var(--mv-accent-logic)":"var(--mv-accent-data)";return F.jsxs(F.Fragment,{children:[F.jsx(ei,{id:e,path:c,markerEnd:a,style:{stroke:d,strokeWidth:f?2.5:2,strokeDasharray:f?"none":"8 4"}}),F.jsx("circle",{cx:t,cy:n,r:6,fill:h,stroke:"var(--mv-bg-surface)",strokeWidth:2}),F.jsx("circle",{cx:r,cy:o,r:6,fill:y,stroke:"var(--mv-bg-surface)",strokeWidth:2}),F.jsxs("g",{transform:`translate(${r-16}, ${o})`,children:[F.jsx("line",{x1:"0",y1:"-6",x2:"12",y2:"0",style:{stroke:d},strokeWidth:"1.5"}),F.jsx("line",{x1:"0",y1:"6",x2:"12",y2:"0",style:{stroke:d},strokeWidth:"1.5"}),F.jsx("line",{x1:"0",y1:"0",x2:"12",y2:"0",style:{stroke:d},strokeWidth:"1.5"})]})]})},d2={searchQuery:"",showStandard:!0,showCustom:!0,showNamespaced:!1,showOrphaned:!1,displayRelationships:!0,autoLayout:!0},h2=()=>F.jsxs("div",{className:"legend-panel",children:[F.jsx("div",{className:"legend-panel__header",children:"LEGEND"}),F.jsxs("div",{className:"legend-panel__body",children:[F.jsxs("div",{className:"legend-panel__item",children:[F.jsx("span",{className:"legend-panel__icon",children:F.jsx("span",{className:"legend-panel__swatch legend-panel__swatch--standard"})}),"Standard Object"]}),F.jsxs("div",{className:"legend-panel__item",children:[F.jsx("span",{className:"legend-panel__icon",children:F.jsx("span",{className:"legend-panel__swatch legend-panel__swatch--custom"})}),"Custom Object"]}),F.jsxs("div",{className:"legend-panel__item",children:[F.jsx("span",{className:"legend-panel__icon",children:F.jsx("span",{className:"legend-panel__swatch legend-panel__swatch--active"})}),"Active File"]}),F.jsxs("div",{className:"legend-panel__item",children:[F.jsx("span",{className:"legend-panel__icon",children:F.jsx("span",{className:"legend-panel__line--lookup"})}),"Lookup"]}),F.jsxs("div",{className:"legend-panel__item",children:[F.jsx("span",{className:"legend-panel__icon",children:F.jsx("span",{className:"legend-panel__line--master-detail"})}),"Master Detail"]}),F.jsxs("div",{className:"legend-panel__item",children:[F.jsx("span",{className:"legend-panel__icon",children:F.jsx("svg",{viewBox:"0 0 52 52",width:"16",height:"16",className:"legend-panel__svg--identity",children:F.jsx("path",{fill:"currentColor",d:"M46 8H34.9l.1 1a7 7 0 0 1-7 7h-6a7 7 0 0 1-7-7l.1-1H6a4 4 0 0 0-4 4v30a4 4 0 0 0 4 4h40a4 4 0 0 0 4-4V12a4 4 0 0 0-4-4M21.7 38H10.3C9 38 8 36.8 8 35.5c0-2 2.1-3.1 4.3-4 1.5-.6 1.7-1.2 1.7-1.9 0-.6-.4-1.2-.9-1.7-.9-.8-1.4-2-1.4-3.3 0-2.5 1.5-4.6 4.2-4.6s4.2 2.1 4.2 4.6c0 1.3-.5 2.5-1.4 3.3-.5.5-.9 1.1-.9 1.7s.2 1.2 1.7 1.9c2.2.9 4.3 2 4.3 4 .2 1.3-.8 2.5-2.1 2.5M44 34a.94.94 0 0 1-1 1H29a.94.94 0 0 1-1-1v-2a.94.94 0 0 1 1-1h14a.94.94 0 0 1 1 1zm2-8a.94.94 0 0 1-1 1H29a.94.94 0 0 1-1-1v-2a.94.94 0 0 1 1-1h16a.94.94 0 0 1 1 1zM22 12h6c1.7 0 3-1.3 3-3s-1.3-3-3-3h-6c-1.7 0-3 1.3-3 3s1.3 3 3 3"})})}),"Identity (Name)"]}),F.jsxs("div",{className:"legend-panel__item",children:[F.jsx("span",{className:"legend-panel__icon",children:F.jsx("span",{className:"legend-panel__ext-tag",children:"[EXT]"})}),"External ID"]})]})]});var ue=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),xt=ue((e,t)=>{var n=Object.defineProperty,r=(j,E,z)=>E in j?n(j,E,{enumerable:!0,configurable:!0,writable:!0,value:z}):j[E]=z,o=(j,E)=>()=>(E||j((E={exports:{}}).exports,E),E.exports),i=(j,E,z)=>r(j,typeof E!="symbol"?E+"":E,z),s=o((j,E)=>{var z="\0",P="\0",A="",N=class{constructor(R){i(this,"_isDirected",!0),i(this,"_isMultigraph",!1),i(this,"_isCompound",!1),i(this,"_label"),i(this,"_defaultNodeLabelFn",()=>{}),i(this,"_defaultEdgeLabelFn",()=>{}),i(this,"_nodes",{}),i(this,"_in",{}),i(this,"_preds",{}),i(this,"_out",{}),i(this,"_sucs",{}),i(this,"_edgeObjs",{}),i(this,"_edgeLabels",{}),i(this,"_nodeCount",0),i(this,"_edgeCount",0),i(this,"_parent"),i(this,"_children"),R&&(this._isDirected=Object.hasOwn(R,"directed")?R.directed:!0,this._isMultigraph=Object.hasOwn(R,"multigraph")?R.multigraph:!1,this._isCompound=Object.hasOwn(R,"compound")?R.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[P]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(R){return this._label=R,this}graph(){return this._label}setDefaultNodeLabel(R){return this._defaultNodeLabelFn=R,typeof R!="function"&&(this._defaultNodeLabelFn=()=>R),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var R=this;return this.nodes().filter(C=>Object.keys(R._in[C]).length===0)}sinks(){var R=this;return this.nodes().filter(C=>Object.keys(R._out[C]).length===0)}setNodes(R,C){var D=arguments,B=this;return R.forEach(function(U){D.length>1?B.setNode(U,C):B.setNode(U)}),this}setNode(R,C){return Object.hasOwn(this._nodes,R)?(arguments.length>1&&(this._nodes[R]=C),this):(this._nodes[R]=arguments.length>1?C:this._defaultNodeLabelFn(R),this._isCompound&&(this._parent[R]=P,this._children[R]={},this._children[P][R]=!0),this._in[R]={},this._preds[R]={},this._out[R]={},this._sucs[R]={},++this._nodeCount,this)}node(R){return this._nodes[R]}hasNode(R){return Object.hasOwn(this._nodes,R)}removeNode(R){var C=this;if(Object.hasOwn(this._nodes,R)){var D=B=>C.removeEdge(C._edgeObjs[B]);delete this._nodes[R],this._isCompound&&(this._removeFromParentsChildList(R),delete this._parent[R],this.children(R).forEach(function(B){C.setParent(B)}),delete this._children[R]),Object.keys(this._in[R]).forEach(D),delete this._in[R],delete this._preds[R],Object.keys(this._out[R]).forEach(D),delete this._out[R],delete this._sucs[R],--this._nodeCount}return this}setParent(R,C){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(C===void 0)C=P;else{C+="";for(var D=C;D!==void 0;D=this.parent(D))if(D===R)throw new Error("Setting "+C+" as parent of "+R+" would create a cycle");this.setNode(C)}return this.setNode(R),this._removeFromParentsChildList(R),this._parent[R]=C,this._children[C][R]=!0,this}_removeFromParentsChildList(R){delete this._children[this._parent[R]][R]}parent(R){if(this._isCompound){var C=this._parent[R];if(C!==P)return C}}children(R=P){if(this._isCompound){var C=this._children[R];if(C)return Object.keys(C)}else{if(R===P)return this.nodes();if(this.hasNode(R))return[]}}predecessors(R){var C=this._preds[R];if(C)return Object.keys(C)}successors(R){var C=this._sucs[R];if(C)return Object.keys(C)}neighbors(R){var C=this.predecessors(R);if(C){let B=new Set(C);for(var D of this.successors(R))B.add(D);return Array.from(B.values())}}isLeaf(R){var C;return this.isDirected()?C=this.successors(R):C=this.neighbors(R),C.length===0}filterNodes(R){var C=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});C.setGraph(this.graph());var D=this;Object.entries(this._nodes).forEach(function([X,G]){R(X)&&C.setNode(X,G)}),Object.values(this._edgeObjs).forEach(function(X){C.hasNode(X.v)&&C.hasNode(X.w)&&C.setEdge(X,D.edge(X))});var B={};function U(X){var G=D.parent(X);return G===void 0||C.hasNode(G)?(B[X]=G,G):G in B?B[G]:U(G)}return this._isCompound&&C.nodes().forEach(X=>C.setParent(X,U(X))),C}setDefaultEdgeLabel(R){return this._defaultEdgeLabelFn=R,typeof R!="function"&&(this._defaultEdgeLabelFn=()=>R),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(R,C){var D=this,B=arguments;return R.reduce(function(U,X){return B.length>1?D.setEdge(U,X,C):D.setEdge(U,X),X}),this}setEdge(){var R,C,D,B,U=!1,X=arguments[0];typeof X=="object"&&X!==null&&"v"in X?(R=X.v,C=X.w,D=X.name,arguments.length===2&&(B=arguments[1],U=!0)):(R=X,C=arguments[1],D=arguments[3],arguments.length>2&&(B=arguments[2],U=!0)),R=""+R,C=""+C,D!==void 0&&(D=""+D);var G=O(this._isDirected,R,C,D);if(Object.hasOwn(this._edgeLabels,G))return U&&(this._edgeLabels[G]=B),this;if(D!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(R),this.setNode(C),this._edgeLabels[G]=U?B:this._defaultEdgeLabelFn(R,C,D);var Q=V(this._isDirected,R,C,D);return R=Q.v,C=Q.w,Object.freeze(Q),this._edgeObjs[G]=Q,T(this._preds[C],R),T(this._sucs[R],C),this._in[C][G]=Q,this._out[R][G]=Q,this._edgeCount++,this}edge(R,C,D){var B=arguments.length===1?Y(this._isDirected,arguments[0]):O(this._isDirected,R,C,D);return this._edgeLabels[B]}edgeAsObj(){let R=this.edge(...arguments);return typeof R!="object"?{label:R}:R}hasEdge(R,C,D){var B=arguments.length===1?Y(this._isDirected,arguments[0]):O(this._isDirected,R,C,D);return Object.hasOwn(this._edgeLabels,B)}removeEdge(R,C,D){var B=arguments.length===1?Y(this._isDirected,arguments[0]):O(this._isDirected,R,C,D),U=this._edgeObjs[B];return U&&(R=U.v,C=U.w,delete this._edgeLabels[B],delete this._edgeObjs[B],$(this._preds[C],R),$(this._sucs[R],C),delete this._in[C][B],delete this._out[R][B],this._edgeCount--),this}inEdges(R,C){return this.isDirected()?this.filterEdges(this._in[R],R,C):this.nodeEdges(R,C)}outEdges(R,C){return this.isDirected()?this.filterEdges(this._out[R],R,C):this.nodeEdges(R,C)}nodeEdges(R,C){if(R in this._nodes)return this.filterEdges({...this._in[R],...this._out[R]},R,C)}filterEdges(R,C,D){if(R){var B=Object.values(R);return D?B.filter(function(U){return U.v===C&&U.w===D||U.v===D&&U.w===C}):B}}};function T(R,C){R[C]?R[C]++:R[C]=1}function $(R,C){--R[C]||delete R[C]}function O(R,C,D,B){var U=""+C,X=""+D;if(!R&&U>X){var G=U;U=X,X=G}return U+A+X+A+(B===void 0?z:B)}function V(R,C,D,B){var U=""+C,X=""+D;if(!R&&U>X){var G=U;U=X,X=G}var Q={v:U,w:X};return B&&(Q.name=B),Q}function Y(R,C){return O(R,C.v,C.w,C.name)}E.exports=N}),l=o((j,E)=>{E.exports="3.0.2"}),a=o((j,E)=>{E.exports={Graph:s(),version:l()}}),u=o((j,E)=>{var z=s();E.exports={write:P,read:T};function P($){var O={options:{directed:$.isDirected(),multigraph:$.isMultigraph(),compound:$.isCompound()},nodes:A($),edges:N($)};return $.graph()!==void 0&&(O.value=structuredClone($.graph())),O}function A($){return $.nodes().map(function(O){var V=$.node(O),Y=$.parent(O),R={v:O};return V!==void 0&&(R.value=V),Y!==void 0&&(R.parent=Y),R})}function N($){return $.edges().map(function(O){var V=$.edge(O),Y={v:O.v,w:O.w};return O.name!==void 0&&(Y.name=O.name),V!==void 0&&(Y.value=V),Y})}function T($){var O=new z($.options).setGraph($.value);return $.nodes.forEach(function(V){O.setNode(V.v,V.value),V.parent&&O.setParent(V.v,V.parent)}),$.edges.forEach(function(V){O.setEdge({v:V.v,w:V.w,name:V.name},V.value)}),O}}),f=o((j,E)=>{E.exports=P;var z=()=>1;function P(N,T,$,O){return A(N,String(T),$||z,O||function(V){return N.outEdges(V)})}function A(N,T,$,O){var V={},Y=!0,R=0,C=N.nodes(),D=function(G){var Q=$(G);V[G.v].distance+Q<V[G.w].distance&&(V[G.w]={distance:V[G.v].distance+Q,predecessor:G.v},Y=!0)},B=function(){C.forEach(function(G){O(G).forEach(function(Q){var Z=Q.v===G?Q.v:Q.w,ee=Z===Q.v?Q.w:Q.v;D({v:Z,w:ee})})})};C.forEach(function(G){var Q=G===T?0:Number.POSITIVE_INFINITY;V[G]={distance:Q}});for(var U=C.length,X=1;X<U&&(Y=!1,R++,B(),!!Y);X++);if(R===U-1&&(Y=!1,B(),Y))throw new Error("The graph contains a negative weight cycle");return V}}),c=o((j,E)=>{E.exports=z;function z(P){var A={},N=[],T;function $(O){Object.hasOwn(A,O)||(A[O]=!0,T.push(O),P.successors(O).forEach($),P.predecessors(O).forEach($))}return P.nodes().forEach(function(O){T=[],$(O),T.length&&N.push(T)}),N}}),d=o((j,E)=>{var z=class{constructor(){i(this,"_arr",[]),i(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(P){return P.key})}has(P){return Object.hasOwn(this._keyIndices,P)}priority(P){var A=this._keyIndices[P];if(A!==void 0)return this._arr[A].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(P,A){var N=this._keyIndices;if(P=String(P),!Object.hasOwn(N,P)){var T=this._arr,$=T.length;return N[P]=$,T.push({key:P,priority:A}),this._decrease($),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var P=this._arr.pop();return delete this._keyIndices[P.key],this._heapify(0),P.key}decrease(P,A){var N=this._keyIndices[P];if(A>this._arr[N].priority)throw new Error("New priority is greater than current priority. Key: "+P+" Old: "+this._arr[N].priority+" New: "+A);this._arr[N].priority=A,this._decrease(N)}_heapify(P){var A=this._arr,N=2*P,T=N+1,$=P;N<A.length&&($=A[N].priority<A[$].priority?N:$,T<A.length&&($=A[T].priority<A[$].priority?T:$),$!==P&&(this._swap(P,$),this._heapify($)))}_decrease(P){for(var A=this._arr,N=A[P].priority,T;P!==0&&(T=P>>1,!(A[T].priority<N));)this._swap(P,T),P=T}_swap(P,A){var N=this._arr,T=this._keyIndices,$=N[P],O=N[A];N[P]=O,N[A]=$,T[O.key]=P,T[$.key]=A}};E.exports=z}),h=o((j,E)=>{var z=d();E.exports=A;var P=()=>1;function A(T,$,O,V){var Y=function(R){return T.outEdges(R)};return N(T,String($),O||P,V||Y)}function N(T,$,O,V){var Y={},R=new z,C,D,B=function(U){var X=U.v!==C?U.v:U.w,G=Y[X],Q=O(U),Z=D.distance+Q;if(Q<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+U+" Weight: "+Q);Z<G.distance&&(G.distance=Z,G.predecessor=C,R.decrease(X,Z))};for(T.nodes().forEach(function(U){var X=U===$?0:Number.POSITIVE_INFINITY;Y[U]={distance:X},R.add(U,X)});R.size()>0&&(C=R.removeMin(),D=Y[C],D.distance!==Number.POSITIVE_INFINITY);)V(C).forEach(B);return Y}}),y=o((j,E)=>{var z=h();E.exports=P;function P(A,N,T){return A.nodes().reduce(function($,O){return $[O]=z(A,O,N,T),$},{})}}),w=o((j,E)=>{E.exports=z;function z(A,N,T){if(A[N].predecessor!==void 0)throw new Error("Invalid source vertex");if(A[T].predecessor===void 0&&T!==N)throw new Error("Invalid destination vertex");return{weight:A[T].distance,path:P(A,N,T)}}function P(A,N,T){for(var $=[],O=T;O!==N;)$.push(O),O=A[O].predecessor;return $.push(N),$.reverse()}}),x=o((j,E)=>{E.exports=z;function z(P){var A=0,N=[],T={},$=[];function O(V){var Y=T[V]={onStack:!0,lowlink:A,index:A++};if(N.push(V),P.successors(V).forEach(function(D){Object.hasOwn(T,D)?T[D].onStack&&(Y.lowlink=Math.min(Y.lowlink,T[D].index)):(O(D),Y.lowlink=Math.min(Y.lowlink,T[D].lowlink))}),Y.lowlink===Y.index){var R=[],C;do C=N.pop(),T[C].onStack=!1,R.push(C);while(V!==C);$.push(R)}}return P.nodes().forEach(function(V){Object.hasOwn(T,V)||O(V)}),$}}),m=o((j,E)=>{var z=x();E.exports=P;function P(A){return z(A).filter(function(N){return N.length>1||N.length===1&&A.hasEdge(N[0],N[0])})}}),g=o((j,E)=>{E.exports=P;var z=()=>1;function P(N,T,$){return A(N,T||z,$||function(O){return N.outEdges(O)})}function A(N,T,$){var O={},V=N.nodes();return V.forEach(function(Y){O[Y]={},O[Y][Y]={distance:0},V.forEach(function(R){Y!==R&&(O[Y][R]={distance:Number.POSITIVE_INFINITY})}),$(Y).forEach(function(R){var C=R.v===Y?R.w:R.v,D=T(R);O[Y][C]={distance:D,predecessor:Y}})}),V.forEach(function(Y){var R=O[Y];V.forEach(function(C){var D=O[C];V.forEach(function(B){var U=D[Y],X=R[B],G=D[B],Q=U.distance+X.distance;Q<G.distance&&(G.distance=Q,G.predecessor=X.predecessor)})})}),O}}),p=o((j,E)=>{function z(A){var N={},T={},$=[];function O(V){if(Object.hasOwn(T,V))throw new P;Object.hasOwn(N,V)||(T[V]=!0,N[V]=!0,A.predecessors(V).forEach(O),delete T[V],$.push(V))}if(A.sinks().forEach(O),Object.keys(N).length!==A.nodeCount())throw new P;return $}var P=class extends Error{constructor(){super(...arguments)}};E.exports=z,z.CycleException=P}),v=o((j,E)=>{var z=p();E.exports=P;function P(A){try{z(A)}catch(N){if(N instanceof z.CycleException)return!1;throw N}return!0}}),_=o((j,E)=>{E.exports=z;function z(A,N,T,$,O){Array.isArray(N)||(N=[N]);var V=(A.isDirected()?A.successors:A.neighbors).bind(A),Y={};return N.forEach(function(R){if(!A.hasNode(R))throw new Error("Graph does not have node: "+R);O=P(A,R,T==="post",Y,V,$,O)}),O}function P(A,N,T,$,O,V,Y){return Object.hasOwn($,N)||($[N]=!0,T||(Y=V(Y,N)),O(N).forEach(function(R){Y=P(A,R,T,$,O,V,Y)}),T&&(Y=V(Y,N))),Y}}),k=o((j,E)=>{var z=_();E.exports=P;function P(A,N,T){return z(A,N,T,function($,O){return $.push(O),$},[])}}),I=o((j,E)=>{var z=k();E.exports=P;function P(A,N){return z(A,N,"post")}}),b=o((j,E)=>{var z=k();E.exports=P;function P(A,N){return z(A,N,"pre")}}),H=o((j,E)=>{var z=s(),P=d();E.exports=A;function A(N,T){var $=new z,O={},V=new P,Y;function R(D){var B=D.v===Y?D.w:D.v,U=V.priority(B);if(U!==void 0){var X=T(D);X<U&&(O[B]=Y,V.decrease(B,X))}}if(N.nodeCount()===0)return $;N.nodes().forEach(function(D){V.add(D,Number.POSITIVE_INFINITY),$.setNode(D)}),V.decrease(N.nodes()[0],0);for(var C=!1;V.size()>0;){if(Y=V.removeMin(),Object.hasOwn(O,Y))$.setEdge(Y,O[Y]);else{if(C)throw new Error("Input graph is not connected: "+N);C=!0}N.nodeEdges(Y).forEach(R)}return $}}),M=o((j,E)=>{var z=h(),P=f();E.exports=A;function A(T,$,O,V){return N(T,$,O,V||function(Y){return T.outEdges(Y)})}function N(T,$,O,V){if(O===void 0)return z(T,$,O,V);for(var Y=!1,R=T.nodes(),C=0;C<R.length;C++){for(var D=V(R[C]),B=0;B<D.length;B++){var U=D[B],X=U.v===R[C]?U.v:U.w,G=X===U.v?U.w:U.v;O({v:X,w:G})<0&&(Y=!0)}if(Y)return P(T,$,O,V)}return z(T,$,O,V)}}),S=o((j,E)=>{E.exports={bellmanFord:f(),components:c(),dijkstra:h(),dijkstraAll:y(),extractPath:w(),findCycles:m(),floydWarshall:g(),isAcyclic:v(),postorder:I(),preorder:b(),prim:H(),shortestPaths:M(),reduce:_(),tarjan:x(),topsort:p()}}),L=a();t.exports={Graph:L.Graph,json:u(),alg:S(),version:L.version}}),p2=ue((e,t)=>{var n=class{constructor(){let i={};i._next=i._prev=i,this._sentinel=i}dequeue(){let i=this._sentinel,s=i._prev;if(s!==i)return r(s),s}enqueue(i){let s=this._sentinel;i._prev&&i._next&&r(i),i._next=s._next,s._next._prev=i,s._next=i,i._prev=s}toString(){let i=[],s=this._sentinel,l=s._prev;for(;l!==s;)i.push(JSON.stringify(l,o)),l=l._prev;return"["+i.join(", ")+"]"}};function r(i){i._prev._next=i._next,i._next._prev=i._prev,delete i._next,delete i._prev}function o(i,s){if(i!=="_next"&&i!=="_prev")return s}t.exports=n}),g2=ue((e,t)=>{var n=xt().Graph,r=p2();t.exports=i;var o=()=>1;function i(c,d){if(c.nodeCount()<=1)return[];let h=a(c,d||o);return s(h.graph,h.buckets,h.zeroIdx).flatMap(y=>c.outEdges(y.v,y.w))}function s(c,d,h){let y=[],w=d[d.length-1],x=d[0],m;for(;c.nodeCount();){for(;m=x.dequeue();)l(c,d,h,m);for(;m=w.dequeue();)l(c,d,h,m);if(c.nodeCount()){for(let g=d.length-2;g>0;--g)if(m=d[g].dequeue(),m){y=y.concat(l(c,d,h,m,!0));break}}}return y}function l(c,d,h,y,w){let x=w?[]:void 0;return c.inEdges(y.v).forEach(m=>{let g=c.edge(m),p=c.node(m.v);w&&x.push({v:m.v,w:m.w}),p.out-=g,u(d,h,p)}),c.outEdges(y.v).forEach(m=>{let g=c.edge(m),p=m.w,v=c.node(p);v.in-=g,u(d,h,v)}),c.removeNode(y.v),x}function a(c,d){let h=new n,y=0,w=0;c.nodes().forEach(g=>{h.setNode(g,{v:g,in:0,out:0})}),c.edges().forEach(g=>{let p=h.edge(g.v,g.w)||0,v=d(g),_=p+v;h.setEdge(g.v,g.w,_),w=Math.max(w,h.node(g.v).out+=v),y=Math.max(y,h.node(g.w).in+=v)});let x=f(w+y+3).map(()=>new r),m=y+1;return h.nodes().forEach(g=>{u(x,m,h.node(g))}),{graph:h,buckets:x,zeroIdx:m}}function u(c,d,h){h.out?h.in?c[h.out-h.in+d].enqueue(h):c[c.length-1].enqueue(h):c[0].enqueue(h)}function f(c){let d=[];for(let h=0;h<c;h++)d.push(h);return d}}),_e=ue((e,t)=>{var n=xt().Graph;t.exports={addBorderNode:d,addDummyNode:r,applyWithChunking:w,asNonCompoundGraph:i,buildLayerMatrix:u,intersectRect:a,mapValues:b,maxRank:x,normalizeRanks:f,notime:p,partition:m,pick:I,predecessorWeights:l,range:k,removeEmptyRanks:c,simplify:o,successorWeights:s,time:g,uniqueId:_,zipObject:H};function r(M,S,L,j){for(var E=j;M.hasNode(E);)E=_(j);return L.dummy=S,M.setNode(E,L),E}function o(M){let S=new n().setGraph(M.graph());return M.nodes().forEach(L=>S.setNode(L,M.node(L))),M.edges().forEach(L=>{let j=S.edge(L.v,L.w)||{weight:0,minlen:1},E=M.edge(L);S.setEdge(L.v,L.w,{weight:j.weight+E.weight,minlen:Math.max(j.minlen,E.minlen)})}),S}function i(M){let S=new n({multigraph:M.isMultigraph()}).setGraph(M.graph());return M.nodes().forEach(L=>{M.children(L).length||S.setNode(L,M.node(L))}),M.edges().forEach(L=>{S.setEdge(L,M.edge(L))}),S}function s(M){let S=M.nodes().map(L=>{let j={};return M.outEdges(L).forEach(E=>{j[E.w]=(j[E.w]||0)+M.edge(E).weight}),j});return H(M.nodes(),S)}function l(M){let S=M.nodes().map(L=>{let j={};return M.inEdges(L).forEach(E=>{j[E.v]=(j[E.v]||0)+M.edge(E).weight}),j});return H(M.nodes(),S)}function a(M,S){let L=M.x,j=M.y,E=S.x-L,z=S.y-j,P=M.width/2,A=M.height/2;if(!E&&!z)throw new Error("Not possible to find intersection inside of the rectangle");let N,T;return Math.abs(z)*P>Math.abs(E)*A?(z<0&&(A=-A),N=A*E/z,T=A):(E<0&&(P=-P),N=P,T=P*z/E),{x:L+N,y:j+T}}function u(M){let S=k(x(M)+1).map(()=>[]);return M.nodes().forEach(L=>{let j=M.node(L),E=j.rank;E!==void 0&&(S[E][j.order]=L)}),S}function f(M){let S=M.nodes().map(j=>{let E=M.node(j).rank;return E===void 0?Number.MAX_VALUE:E}),L=w(Math.min,S);M.nodes().forEach(j=>{let E=M.node(j);Object.hasOwn(E,"rank")&&(E.rank-=L)})}function c(M){let S=M.nodes().map(P=>M.node(P).rank).filter(P=>P!==void 0),L=w(Math.min,S),j=[];M.nodes().forEach(P=>{let A=M.node(P).rank-L;j[A]||(j[A]=[]),j[A].push(P)});let E=0,z=M.graph().nodeRankFactor;Array.from(j).forEach((P,A)=>{P===void 0&&A%z!==0?--E:P!==void 0&&E&&P.forEach(N=>M.node(N).rank+=E)})}function d(M,S,L,j){let E={width:0,height:0};return arguments.length>=4&&(E.rank=L,E.order=j),r(M,"border",E,S)}function h(M,S=y){let L=[];for(let j=0;j<M.length;j+=S){let E=M.slice(j,j+S);L.push(E)}return L}var y=65535;function w(M,S){if(S.length>y){let L=h(S);return M.apply(null,L.map(j=>M.apply(null,j)))}else return M.apply(null,S)}function x(M){let S=M.nodes().map(L=>{let j=M.node(L).rank;return j===void 0?Number.MIN_VALUE:j});return w(Math.max,S)}function m(M,S){let L={lhs:[],rhs:[]};return M.forEach(j=>{S(j)?L.lhs.push(j):L.rhs.push(j)}),L}function g(M,S){let L=Date.now();try{return S()}finally{console.log(M+" time: "+(Date.now()-L)+"ms")}}function p(M,S){return S()}var v=0;function _(M){var S=++v;return M+(""+S)}function k(M,S,L=1){S==null&&(S=M,M=0);let j=z=>z<S;L<0&&(j=z=>S<z);let E=[];for(let z=M;j(z);z+=L)E.push(z);return E}function I(M,S){let L={};for(let j of S)M[j]!==void 0&&(L[j]=M[j]);return L}function b(M,S){let L=S;return typeof S=="string"&&(L=j=>j[S]),Object.entries(M).reduce((j,[E,z])=>(j[E]=L(z,E),j),{})}function H(M,S){return M.reduce((L,j,E)=>(L[j]=S[E],L),{})}}),m2=ue((e,t)=>{var n=g2(),r=_e().uniqueId;t.exports={run:o,undo:s};function o(l){(l.graph().acyclicer==="greedy"?n(l,a(l)):i(l)).forEach(u=>{let f=l.edge(u);l.removeEdge(u),f.forwardName=u.name,f.reversed=!0,l.setEdge(u.w,u.v,f,r("rev"))});function a(u){return f=>u.edge(f).weight}}function i(l){let a=[],u={},f={};function c(d){Object.hasOwn(f,d)||(f[d]=!0,u[d]=!0,l.outEdges(d).forEach(h=>{Object.hasOwn(u,h.w)?a.push(h):c(h.w)}),delete u[d])}return l.nodes().forEach(c),a}function s(l){l.edges().forEach(a=>{let u=l.edge(a);if(u.reversed){l.removeEdge(a);let f=u.forwardName;delete u.reversed,delete u.forwardName,l.setEdge(a.w,a.v,u,f)}})}}),y2=ue((e,t)=>{var n=_e();t.exports={run:r,undo:i};function r(s){s.graph().dummyChains=[],s.edges().forEach(l=>o(s,l))}function o(s,l){let a=l.v,u=s.node(a).rank,f=l.w,c=s.node(f).rank,d=l.name,h=s.edge(l),y=h.labelRank;if(c===u+1)return;s.removeEdge(l);let w,x,m;for(m=0,++u;u<c;++m,++u)h.points=[],x={width:0,height:0,edgeLabel:h,edgeObj:l,rank:u},w=n.addDummyNode(s,"edge",x,"_d"),u===y&&(x.width=h.width,x.height=h.height,x.dummy="edge-label",x.labelpos=h.labelpos),s.setEdge(a,w,{weight:h.weight},d),m===0&&s.graph().dummyChains.push(w),a=w;s.setEdge(a,f,{weight:h.weight},d)}function i(s){s.graph().dummyChains.forEach(l=>{let a=s.node(l),u=a.edgeLabel,f;for(s.setEdge(a.edgeObj,u);a.dummy;)f=s.successors(l)[0],s.removeNode(l),u.points.push({x:a.x,y:a.y}),a.dummy==="edge-label"&&(u.x=a.x,u.y=a.y,u.width=a.width,u.height=a.height),l=f,a=s.node(l)})}}),bs=ue((e,t)=>{var{applyWithChunking:n}=_e();t.exports={longestPath:r,slack:o};function r(i){var s={};function l(a){var u=i.node(a);if(Object.hasOwn(s,a))return u.rank;s[a]=!0;let f=i.outEdges(a).map(d=>d==null?Number.POSITIVE_INFINITY:l(d.w)-i.edge(d).minlen);var c=n(Math.min,f);return c===Number.POSITIVE_INFINITY&&(c=0),u.rank=c}i.sources().forEach(l)}function o(i,s){return i.node(s.w).rank-i.node(s.v).rank-i.edge(s).minlen}}),r0=ue((e,t)=>{var n=xt().Graph,r=bs().slack;t.exports=o;function o(a){var u=new n({directed:!1}),f=a.nodes()[0],c=a.nodeCount();u.setNode(f,{});for(var d,h;i(u,a)<c;)d=s(u,a),h=u.hasNode(d.v)?r(a,d):-r(a,d),l(u,a,h);return u}function i(a,u){function f(c){u.nodeEdges(c).forEach(d=>{var h=d.v,y=c===h?d.w:h;!a.hasNode(y)&&!r(u,d)&&(a.setNode(y,{}),a.setEdge(c,y,{}),f(y))})}return a.nodes().forEach(f),a.nodeCount()}function s(a,u){return u.edges().reduce((f,c)=>{let d=Number.POSITIVE_INFINITY;return a.hasNode(c.v)!==a.hasNode(c.w)&&(d=r(u,c)),d<f[0]?[d,c]:f},[Number.POSITIVE_INFINITY,null])[1]}function l(a,u,f){a.nodes().forEach(c=>u.node(c).rank+=f)}}),v2=ue((e,t)=>{var n=r0(),r=bs().slack,o=bs().longestPath,i=xt().alg.preorder,s=xt().alg.postorder,l=_e().simplify;t.exports=a,a.initLowLimValues=d,a.initCutValues=u,a.calcCutValue=c,a.leaveEdge=y,a.enterEdge=w,a.exchangeEdges=x;function a(v){v=l(v),o(v);var _=n(v);d(_),u(_,v);for(var k,I;k=y(_);)I=w(_,v,k),x(_,v,k,I)}function u(v,_){var k=s(v,v.nodes());k=k.slice(0,k.length-1),k.forEach(I=>f(v,_,I))}function f(v,_,k){var I=v.node(k),b=I.parent;v.edge(k,b).cutvalue=c(v,_,k)}function c(v,_,k){var I=v.node(k),b=I.parent,H=!0,M=_.edge(k,b),S=0;return M||(H=!1,M=_.edge(b,k)),S=M.weight,_.nodeEdges(k).forEach(L=>{var j=L.v===k,E=j?L.w:L.v;if(E!==b){var z=j===H,P=_.edge(L).weight;if(S+=z?P:-P,g(v,k,E)){var A=v.edge(k,E).cutvalue;S+=z?-A:A}}}),S}function d(v,_){arguments.length<2&&(_=v.nodes()[0]),h(v,{},1,_)}function h(v,_,k,I,b){var H=k,M=v.node(I);return _[I]=!0,v.neighbors(I).forEach(S=>{Object.hasOwn(_,S)||(k=h(v,_,k,S,I))}),M.low=H,M.lim=k++,b?M.parent=b:delete M.parent,k}function y(v){return v.edges().find(_=>v.edge(_).cutvalue<0)}function w(v,_,k){var I=k.v,b=k.w;_.hasEdge(I,b)||(I=k.w,b=k.v);var H=v.node(I),M=v.node(b),S=H,L=!1;H.lim>M.lim&&(S=M,L=!0);var j=_.edges().filter(E=>L===p(v,v.node(E.v),S)&&L!==p(v,v.node(E.w),S));return j.reduce((E,z)=>r(_,z)<r(_,E)?z:E)}function x(v,_,k,I){var b=k.v,H=k.w;v.removeEdge(b,H),v.setEdge(I.v,I.w,{}),d(v),u(v,_),m(v,_)}function m(v,_){var k=v.nodes().find(b=>!_.node(b).parent),I=i(v,k);I=I.slice(1),I.forEach(b=>{var H=v.node(b).parent,M=_.edge(b,H),S=!1;M||(M=_.edge(H,b),S=!0),_.node(b).rank=_.node(H).rank+(S?M.minlen:-M.minlen)})}function g(v,_,k){return v.hasEdge(_,k)}function p(v,_,k){return k.low<=_.lim&&_.lim<=k.lim}}),w2=ue((e,t)=>{var n=bs(),r=n.longestPath,o=r0(),i=v2();t.exports=s;function s(f){var c=f.graph().ranker;if(c instanceof Function)return c(f);switch(f.graph().ranker){case"network-simplex":u(f);break;case"tight-tree":a(f);break;case"longest-path":l(f);break;case"none":break;default:u(f)}}var l=r;function a(f){r(f),o(f)}function u(f){i(f)}}),x2=ue((e,t)=>{t.exports=n;function n(i){let s=o(i);i.graph().dummyChains.forEach(l=>{let a=i.node(l),u=a.edgeObj,f=r(i,s,u.v,u.w),c=f.path,d=f.lca,h=0,y=c[h],w=!0;for(;l!==u.w;){if(a=i.node(l),w){for(;(y=c[h])!==d&&i.node(y).maxRank<a.rank;)h++;y===d&&(w=!1)}if(!w){for(;h<c.length-1&&i.node(y=c[h+1]).minRank<=a.rank;)h++;y=c[h]}i.setParent(l,y),l=i.successors(l)[0]}})}function r(i,s,l,a){let u=[],f=[],c=Math.min(s[l].low,s[a].low),d=Math.max(s[l].lim,s[a].lim),h,y;h=l;do h=i.parent(h),u.push(h);while(h&&(s[h].low>c||d>s[h].lim));for(y=h,h=a;(h=i.parent(h))!==y;)f.push(h);return{path:u.concat(f.reverse()),lca:y}}function o(i){let s={},l=0;function a(u){let f=l;i.children(u).forEach(a),s[u]={low:f,lim:l++}}return i.children().forEach(a),s}}),E2=ue((e,t)=>{var n=_e();t.exports={run:r,cleanup:l};function r(a){let u=n.addDummyNode(a,"root",{},"_root"),f=i(a),c=Object.values(f),d=n.applyWithChunking(Math.max,c)-1,h=2*d+1;a.graph().nestingRoot=u,a.edges().forEach(w=>a.edge(w).minlen*=h);let y=s(a)+1;a.children().forEach(w=>o(a,u,h,y,d,f,w)),a.graph().nodeRankFactor=h}function o(a,u,f,c,d,h,y){let w=a.children(y);if(!w.length){y!==u&&a.setEdge(u,y,{weight:0,minlen:f});return}let x=n.addBorderNode(a,"_bt"),m=n.addBorderNode(a,"_bb"),g=a.node(y);a.setParent(x,y),g.borderTop=x,a.setParent(m,y),g.borderBottom=m,w.forEach(p=>{o(a,u,f,c,d,h,p);let v=a.node(p),_=v.borderTop?v.borderTop:p,k=v.borderBottom?v.borderBottom:p,I=v.borderTop?c:2*c,b=_!==k?1:d-h[y]+1;a.setEdge(x,_,{weight:I,minlen:b,nestingEdge:!0}),a.setEdge(k,m,{weight:I,minlen:b,nestingEdge:!0})}),a.parent(y)||a.setEdge(u,x,{weight:0,minlen:d+h[y]})}function i(a){var u={};function f(c,d){var h=a.children(c);h&&h.length&&h.forEach(y=>f(y,d+1)),u[c]=d}return a.children().forEach(c=>f(c,1)),u}function s(a){return a.edges().reduce((u,f)=>u+a.edge(f).weight,0)}function l(a){var u=a.graph();a.removeNode(u.nestingRoot),delete u.nestingRoot,a.edges().forEach(f=>{var c=a.edge(f);c.nestingEdge&&a.removeEdge(f)})}}),_2=ue((e,t)=>{var n=_e();t.exports=r;function r(i){function s(l){let a=i.children(l),u=i.node(l);if(a.length&&a.forEach(s),Object.hasOwn(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(let f=u.minRank,c=u.maxRank+1;f<c;++f)o(i,"borderLeft","_bl",l,u,f),o(i,"borderRight","_br",l,u,f)}}i.children().forEach(s)}function o(i,s,l,a,u,f){let c={width:0,height:0,rank:f,borderType:s},d=u[s][f-1],h=n.addDummyNode(i,"border",c,l);u[s][f]=h,i.setParent(h,a),d&&i.setEdge(d,h,{weight:1})}}),S2=ue((e,t)=>{t.exports={adjust:n,undo:r};function n(f){let c=f.graph().rankdir.toLowerCase();(c==="lr"||c==="rl")&&o(f)}function r(f){let c=f.graph().rankdir.toLowerCase();(c==="bt"||c==="rl")&&s(f),(c==="lr"||c==="rl")&&(a(f),o(f))}function o(f){f.nodes().forEach(c=>i(f.node(c))),f.edges().forEach(c=>i(f.edge(c)))}function i(f){let c=f.width;f.width=f.height,f.height=c}function s(f){f.nodes().forEach(c=>l(f.node(c))),f.edges().forEach(c=>{let d=f.edge(c);d.points.forEach(l),Object.hasOwn(d,"y")&&l(d)})}function l(f){f.y=-f.y}function a(f){f.nodes().forEach(c=>u(f.node(c))),f.edges().forEach(c=>{let d=f.edge(c);d.points.forEach(u),Object.hasOwn(d,"x")&&u(d)})}function u(f){let c=f.x;f.x=f.y,f.y=c}}),k2=ue((e,t)=>{var n=_e();t.exports=r;function r(o){let i={},s=o.nodes().filter(c=>!o.children(c).length),l=s.map(c=>o.node(c).rank),a=n.applyWithChunking(Math.max,l),u=n.range(a+1).map(()=>[]);function f(c){if(i[c])return;i[c]=!0;let d=o.node(c);u[d.rank].push(c),o.successors(c).forEach(f)}return s.sort((c,d)=>o.node(c).rank-o.node(d).rank).forEach(f),u}}),N2=ue((e,t)=>{var n=_e().zipObject;t.exports=r;function r(i,s){let l=0;for(let a=1;a<s.length;++a)l+=o(i,s[a-1],s[a]);return l}function o(i,s,l){let a=n(l,l.map((y,w)=>w)),u=s.flatMap(y=>i.outEdges(y).map(w=>({pos:a[w.w],weight:i.edge(w).weight})).sort((w,x)=>w.pos-x.pos)),f=1;for(;f<l.length;)f<<=1;let c=2*f-1;f-=1;let d=new Array(c).fill(0),h=0;return u.forEach(y=>{let w=y.pos+f;d[w]+=y.weight;let x=0;for(;w>0;)w%2&&(x+=d[w+1]),w=w-1>>1,d[w]+=y.weight;h+=y.weight*x}),h}}),C2=ue((e,t)=>{t.exports=n;function n(r,o=[]){return o.map(i=>{let s=r.inEdges(i);if(s.length){let l=s.reduce((a,u)=>{let f=r.edge(u),c=r.node(u.v);return{sum:a.sum+f.weight*c.order,weight:a.weight+f.weight}},{sum:0,weight:0});return{v:i,barycenter:l.sum/l.weight,weight:l.weight}}else return{v:i}})}}),M2=ue((e,t)=>{var n=_e();t.exports=r;function r(s,l){let a={};s.forEach((f,c)=>{let d=a[f.v]={indegree:0,in:[],out:[],vs:[f.v],i:c};f.barycenter!==void 0&&(d.barycenter=f.barycenter,d.weight=f.weight)}),l.edges().forEach(f=>{let c=a[f.v],d=a[f.w];c!==void 0&&d!==void 0&&(d.indegree++,c.out.push(a[f.w]))});let u=Object.values(a).filter(f=>!f.indegree);return o(u)}function o(s){let l=[];function a(f){return c=>{c.merged||(c.barycenter===void 0||f.barycenter===void 0||c.barycenter>=f.barycenter)&&i(f,c)}}function u(f){return c=>{c.in.push(f),--c.indegree===0&&s.push(c)}}for(;s.length;){let f=s.pop();l.push(f),f.in.reverse().forEach(a(f)),f.out.forEach(u(f))}return l.filter(f=>!f.merged).map(f=>n.pick(f,["vs","i","barycenter","weight"]))}function i(s,l){let a=0,u=0;s.weight&&(a+=s.barycenter*s.weight,u+=s.weight),l.weight&&(a+=l.barycenter*l.weight,u+=l.weight),s.vs=l.vs.concat(s.vs),s.barycenter=a/u,s.weight=u,s.i=Math.min(l.i,s.i),l.merged=!0}}),I2=ue((e,t)=>{var n=_e();t.exports=r;function r(s,l){let a=n.partition(s,x=>Object.hasOwn(x,"barycenter")),u=a.lhs,f=a.rhs.sort((x,m)=>m.i-x.i),c=[],d=0,h=0,y=0;u.sort(i(!!l)),y=o(c,f,y),u.forEach(x=>{y+=x.vs.length,c.push(x.vs),d+=x.barycenter*x.weight,h+=x.weight,y=o(c,f,y)});let w={vs:c.flat(!0)};return h&&(w.barycenter=d/h,w.weight=h),w}function o(s,l,a){let u;for(;l.length&&(u=l[l.length-1]).i<=a;)l.pop(),s.push(u.vs),a++;return a}function i(s){return(l,a)=>l.barycenter<a.barycenter?-1:l.barycenter>a.barycenter?1:s?a.i-l.i:l.i-a.i}}),P2=ue((e,t)=>{var n=C2(),r=M2(),o=I2();t.exports=i;function i(a,u,f,c){let d=a.children(u),h=a.node(u),y=h?h.borderLeft:void 0,w=h?h.borderRight:void 0,x={};y&&(d=d.filter(v=>v!==y&&v!==w));let m=n(a,d);m.forEach(v=>{if(a.children(v.v).length){let _=i(a,v.v,f,c);x[v.v]=_,Object.hasOwn(_,"barycenter")&&l(v,_)}});let g=r(m,f);s(g,x);let p=o(g,c);if(y&&(p.vs=[y,p.vs,w].flat(!0),a.predecessors(y).length)){let v=a.node(a.predecessors(y)[0]),_=a.node(a.predecessors(w)[0]);Object.hasOwn(p,"barycenter")||(p.barycenter=0,p.weight=0),p.barycenter=(p.barycenter*p.weight+v.order+_.order)/(p.weight+2),p.weight+=2}return p}function s(a,u){a.forEach(f=>{f.vs=f.vs.flatMap(c=>u[c]?u[c].vs:c)})}function l(a,u){a.barycenter!==void 0?(a.barycenter=(a.barycenter*a.weight+u.barycenter*u.weight)/(a.weight+u.weight),a.weight+=u.weight):(a.barycenter=u.barycenter,a.weight=u.weight)}}),T2=ue((e,t)=>{var n=xt().Graph,r=_e();t.exports=o;function o(s,l,a,u){u||(u=s.nodes());let f=i(s),c=new n({compound:!0}).setGraph({root:f}).setDefaultNodeLabel(d=>s.node(d));return u.forEach(d=>{let h=s.node(d),y=s.parent(d);(h.rank===l||h.minRank<=l&&l<=h.maxRank)&&(c.setNode(d),c.setParent(d,y||f),s[a](d).forEach(w=>{let x=w.v===d?w.w:w.v,m=c.edge(x,d),g=m!==void 0?m.weight:0;c.setEdge(x,d,{weight:s.edge(w).weight+g})}),Object.hasOwn(h,"minRank")&&c.setNode(d,{borderLeft:h.borderLeft[l],borderRight:h.borderRight[l]}))}),c}function i(s){for(var l;s.hasNode(l=r.uniqueId("_root")););return l}}),L2=ue((e,t)=>{t.exports=n;function n(r,o,i){let s={},l;i.forEach(a=>{let u=r.parent(a),f,c;for(;u;){if(f=r.parent(u),f?(c=s[f],s[f]=u):(c=l,l=u),c&&c!==u){o.setEdge(c,u);return}u=f}})}}),b2=ue((e,t)=>{var n=k2(),r=N2(),o=P2(),i=T2(),s=L2(),l=xt().Graph,a=_e();t.exports=u;function u(h,y={}){if(typeof y.customOrder=="function"){y.customOrder(h,u);return}let w=a.maxRank(h),x=f(h,a.range(1,w+1),"inEdges"),m=f(h,a.range(w-1,-1,-1),"outEdges"),g=n(h);if(d(h,g),y.disableOptimalOrderHeuristic)return;let p=Number.POSITIVE_INFINITY,v,_=y.constraints||[];for(let k=0,I=0;I<4;++k,++I){c(k%2?x:m,k%4>=2,_),g=a.buildLayerMatrix(h);let b=r(h,g);b<p?(I=0,v=Object.assign({},g),p=b):b===p&&(v=structuredClone(g))}d(h,v)}function f(h,y,w){let x=new Map,m=(g,p)=>{x.has(g)||x.set(g,[]),x.get(g).push(p)};for(let g of h.nodes()){let p=h.node(g);if(typeof p.rank=="number"&&m(p.rank,g),typeof p.minRank=="number"&&typeof p.maxRank=="number")for(let v=p.minRank;v<=p.maxRank;v++)v!==p.rank&&m(v,g)}return y.map(function(g){return i(h,g,w,x.get(g)||[])})}function c(h,y,w){let x=new l;h.forEach(function(m){w.forEach(v=>x.setEdge(v.left,v.right));let g=m.graph().root,p=o(m,g,x,y);p.vs.forEach((v,_)=>m.node(v).order=_),s(m,x,p.vs)})}function d(h,y){Object.values(y).forEach(w=>w.forEach((x,m)=>h.node(x).order=m))}}),R2=ue((e,t)=>{var n=xt().Graph,r=_e();t.exports={positionX:w,findType1Conflicts:o,findType2Conflicts:i,addConflict:l,hasConflict:a,verticalAlignment:u,horizontalCompaction:f,alignCoordinates:h,findSmallestWidthAlignment:d,balance:y};function o(g,p){let v={};function _(k,I){let b=0,H=0,M=k.length,S=I[I.length-1];return I.forEach((L,j)=>{let E=s(g,L),z=E?g.node(E).order:M;(E||L===S)&&(I.slice(H,j+1).forEach(P=>{g.predecessors(P).forEach(A=>{let N=g.node(A),T=N.order;(T<b||z<T)&&!(N.dummy&&g.node(P).dummy)&&l(v,A,P)})}),H=j+1,b=z)}),I}return p.length&&p.reduce(_),v}function i(g,p){let v={};function _(I,b,H,M,S){let L;r.range(b,H).forEach(j=>{L=I[j],g.node(L).dummy&&g.predecessors(L).forEach(E=>{let z=g.node(E);z.dummy&&(z.order<M||z.order>S)&&l(v,E,L)})})}function k(I,b){let H=-1,M,S=0;return b.forEach((L,j)=>{if(g.node(L).dummy==="border"){let E=g.predecessors(L);E.length&&(M=g.node(E[0]).order,_(b,S,j,H,M),S=j,H=M)}_(b,S,b.length,M,I.length)}),b}return p.length&&p.reduce(k),v}function s(g,p){if(g.node(p).dummy)return g.predecessors(p).find(v=>g.node(v).dummy)}function l(g,p,v){if(p>v){let k=p;p=v,v=k}let _=g[p];_||(g[p]=_={}),_[v]=!0}function a(g,p,v){if(p>v){let _=p;p=v,v=_}return!!g[p]&&Object.hasOwn(g[p],v)}function u(g,p,v,_){let k={},I={},b={};return p.forEach(H=>{H.forEach((M,S)=>{k[M]=M,I[M]=M,b[M]=S})}),p.forEach(H=>{let M=-1;H.forEach(S=>{let L=_(S);if(L.length){L=L.sort((E,z)=>b[E]-b[z]);let j=(L.length-1)/2;for(let E=Math.floor(j),z=Math.ceil(j);E<=z;++E){let P=L[E];I[S]===S&&M<b[P]&&!a(v,S,P)&&(I[P]=S,I[S]=k[S]=k[P],M=b[P])}}})}),{root:k,align:I}}function f(g,p,v,_,k){let I={},b=c(g,p,v,k),H=k?"borderLeft":"borderRight";function M(j,E){let z=b.nodes().slice(),P={},A=z.pop();for(;A;){if(P[A])j(A);else{P[A]=!0,z.push(A);for(let N of E(A))z.push(N)}A=z.pop()}}function S(j){I[j]=b.inEdges(j).reduce((E,z)=>Math.max(E,I[z.v]+b.edge(z)),0)}function L(j){let E=b.outEdges(j).reduce((P,A)=>Math.min(P,I[A.w]-b.edge(A)),Number.POSITIVE_INFINITY),z=g.node(j);E!==Number.POSITIVE_INFINITY&&z.borderType!==H&&(I[j]=Math.max(I[j],E))}return M(S,b.predecessors.bind(b)),M(L,b.successors.bind(b)),Object.keys(_).forEach(j=>I[j]=I[v[j]]),I}function c(g,p,v,_){let k=new n,I=g.graph(),b=x(I.nodesep,I.edgesep,_);return p.forEach(H=>{let M;H.forEach(S=>{let L=v[S];if(k.setNode(L),M){var j=v[M],E=k.edge(j,L);k.setEdge(j,L,Math.max(b(g,S,M),E||0))}M=S})}),k}function d(g,p){return Object.values(p).reduce((v,_)=>{let k=Number.NEGATIVE_INFINITY,I=Number.POSITIVE_INFINITY;Object.entries(_).forEach(([H,M])=>{let S=m(g,H)/2;k=Math.max(M+S,k),I=Math.min(M-S,I)});let b=k-I;return b<v[0]&&(v=[b,_]),v},[Number.POSITIVE_INFINITY,null])[1]}function h(g,p){let v=Object.values(p),_=r.applyWithChunking(Math.min,v),k=r.applyWithChunking(Math.max,v);["u","d"].forEach(I=>{["l","r"].forEach(b=>{let H=I+b,M=g[H];if(M===p)return;let S=Object.values(M),L=_-r.applyWithChunking(Math.min,S);b!=="l"&&(L=k-r.applyWithChunking(Math.max,S)),L&&(g[H]=r.mapValues(M,j=>j+L))})})}function y(g,p){return r.mapValues(g.ul,(v,_)=>{if(p)return g[p.toLowerCase()][_];{let k=Object.values(g).map(I=>I[_]).sort((I,b)=>I-b);return(k[1]+k[2])/2}})}function w(g){let p=r.buildLayerMatrix(g),v=Object.assign(o(g,p),i(g,p)),_={},k;["u","d"].forEach(b=>{k=b==="u"?p:Object.values(p).reverse(),["l","r"].forEach(H=>{H==="r"&&(k=k.map(j=>Object.values(j).reverse()));let M=(b==="u"?g.predecessors:g.successors).bind(g),S=u(g,k,v,M),L=f(g,k,S.root,S.align,H==="r");H==="r"&&(L=r.mapValues(L,j=>-j)),_[b+H]=L})});let I=d(g,_);return h(_,I),y(_,g.graph().align)}function x(g,p,v){return(_,k,I)=>{let b=_.node(k),H=_.node(I),M=0,S;if(M+=b.width/2,Object.hasOwn(b,"labelpos"))switch(b.labelpos.toLowerCase()){case"l":S=-b.width/2;break;case"r":S=b.width/2;break}if(S&&(M+=v?S:-S),S=0,M+=(b.dummy?p:g)/2,M+=(H.dummy?p:g)/2,M+=H.width/2,Object.hasOwn(H,"labelpos"))switch(H.labelpos.toLowerCase()){case"l":S=H.width/2;break;case"r":S=-H.width/2;break}return S&&(M+=v?S:-S),S=0,M}}function m(g,p){return g.node(p).width}}),A2=ue((e,t)=>{var n=_e(),r=R2().positionX;t.exports=o;function o(s){s=n.asNonCompoundGraph(s),i(s),Object.entries(r(s)).forEach(([l,a])=>s.node(l).x=a)}function i(s){let l=n.buildLayerMatrix(s),a=s.graph().ranksep,u=s.graph().rankalign,f=0;l.forEach(c=>{let d=c.reduce((h,y)=>{let w=s.node(y).height;return h>w?h:w},0);c.forEach(h=>{let y=s.node(h);u==="top"?y.y=f+y.height/2:u==="bottom"?y.y=f+d-y.height/2:y.y=f+d/2}),f+=d+a})}}),z2=ue((e,t)=>{var n=m2(),r=y2(),o=w2(),i=_e().normalizeRanks,s=x2(),l=_e().removeEmptyRanks,a=E2(),u=_2(),f=S2(),c=b2(),d=A2(),h=_e(),y=xt().Graph;t.exports=w;function w(C,D={}){let B=D.debugTiming?h.time:h.notime;return B("layout",()=>{let U=B(" buildLayoutGraph",()=>M(C));return B(" runLayout",()=>x(U,B,D)),B(" updateInputGraph",()=>m(C,U)),U})}function x(C,D,B){D(" makeSpaceForEdgeLabels",()=>S(C)),D(" removeSelfEdges",()=>$(C)),D(" acyclic",()=>n.run(C)),D(" nestingGraph.run",()=>a.run(C)),D(" rank",()=>o(h.asNonCompoundGraph(C))),D(" injectEdgeLabelProxies",()=>L(C)),D(" removeEmptyRanks",()=>l(C)),D(" nestingGraph.cleanup",()=>a.cleanup(C)),D(" normalizeRanks",()=>i(C)),D(" assignRankMinMax",()=>j(C)),D(" removeEdgeLabelProxies",()=>E(C)),D(" normalize.run",()=>r.run(C)),D(" parentDummyChains",()=>s(C)),D(" addBorderSegments",()=>u(C)),D(" order",()=>c(C,B)),D(" insertSelfEdges",()=>O(C)),D(" adjustCoordinateSystem",()=>f.adjust(C)),D(" position",()=>d(C)),D(" positionSelfEdges",()=>V(C)),D(" removeBorderNodes",()=>T(C)),D(" normalize.undo",()=>r.undo(C)),D(" fixupEdgeLabelCoords",()=>A(C)),D(" undoCoordinateSystem",()=>f.undo(C)),D(" translateGraph",()=>z(C)),D(" assignNodeIntersects",()=>P(C)),D(" reversePoints",()=>N(C)),D(" acyclic.undo",()=>n.undo(C))}function m(C,D){C.nodes().forEach(B=>{let U=C.node(B),X=D.node(B);U&&(U.x=X.x,U.y=X.y,U.order=X.order,U.rank=X.rank,D.children(B).length&&(U.width=X.width,U.height=X.height))}),C.edges().forEach(B=>{let U=C.edge(B),X=D.edge(B);U.points=X.points,Object.hasOwn(X,"x")&&(U.x=X.x,U.y=X.y)}),C.graph().width=D.graph().width,C.graph().height=D.graph().height}var g=["nodesep","edgesep","ranksep","marginx","marginy"],p={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb",rankalign:"center"},v=["acyclicer","ranker","rankdir","align","rankalign"],_=["width","height","rank"],k={width:0,height:0},I=["minlen","weight","width","height","labeloffset"],b={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},H=["labelpos"];function M(C){let D=new y({multigraph:!0,compound:!0}),B=R(C.graph());return D.setGraph(Object.assign({},p,Y(B,g),h.pick(B,v))),C.nodes().forEach(U=>{let X=R(C.node(U)),G=Y(X,_);Object.keys(k).forEach(Q=>{G[Q]===void 0&&(G[Q]=k[Q])}),D.setNode(U,G),D.setParent(U,C.parent(U))}),C.edges().forEach(U=>{let X=R(C.edge(U));D.setEdge(U,Object.assign({},b,Y(X,I),h.pick(X,H)))}),D}function S(C){let D=C.graph();D.ranksep/=2,C.edges().forEach(B=>{let U=C.edge(B);U.minlen*=2,U.labelpos.toLowerCase()!=="c"&&(D.rankdir==="TB"||D.rankdir==="BT"?U.width+=U.labeloffset:U.height+=U.labeloffset)})}function L(C){C.edges().forEach(D=>{let B=C.edge(D);if(B.width&&B.height){let U=C.node(D.v),X={rank:(C.node(D.w).rank-U.rank)/2+U.rank,e:D};h.addDummyNode(C,"edge-proxy",X,"_ep")}})}function j(C){let D=0;C.nodes().forEach(B=>{let U=C.node(B);U.borderTop&&(U.minRank=C.node(U.borderTop).rank,U.maxRank=C.node(U.borderBottom).rank,D=Math.max(D,U.maxRank))}),C.graph().maxRank=D}function E(C){C.nodes().forEach(D=>{let B=C.node(D);B.dummy==="edge-proxy"&&(C.edge(B.e).labelRank=B.rank,C.removeNode(D))})}function z(C){let D=Number.POSITIVE_INFINITY,B=0,U=Number.POSITIVE_INFINITY,X=0,G=C.graph(),Q=G.marginx||0,Z=G.marginy||0;function ee(te){let ne=te.x,re=te.y,ke=te.width,lt=te.height;D=Math.min(D,ne-ke/2),B=Math.max(B,ne+ke/2),U=Math.min(U,re-lt/2),X=Math.max(X,re+lt/2)}C.nodes().forEach(te=>ee(C.node(te))),C.edges().forEach(te=>{let ne=C.edge(te);Object.hasOwn(ne,"x")&&ee(ne)}),D-=Q,U-=Z,C.nodes().forEach(te=>{let ne=C.node(te);ne.x-=D,ne.y-=U}),C.edges().forEach(te=>{let ne=C.edge(te);ne.points.forEach(re=>{re.x-=D,re.y-=U}),Object.hasOwn(ne,"x")&&(ne.x-=D),Object.hasOwn(ne,"y")&&(ne.y-=U)}),G.width=B-D+Q,G.height=X-U+Z}function P(C){C.edges().forEach(D=>{let B=C.edge(D),U=C.node(D.v),X=C.node(D.w),G,Q;B.points?(G=B.points[0],Q=B.points[B.points.length-1]):(B.points=[],G=X,Q=U),B.points.unshift(h.intersectRect(U,G)),B.points.push(h.intersectRect(X,Q))})}function A(C){C.edges().forEach(D=>{let B=C.edge(D);if(Object.hasOwn(B,"x"))switch((B.labelpos==="l"||B.labelpos==="r")&&(B.width-=B.labeloffset),B.labelpos){case"l":B.x-=B.width/2+B.labeloffset;break;case"r":B.x+=B.width/2+B.labeloffset;break}})}function N(C){C.edges().forEach(D=>{let B=C.edge(D);B.reversed&&B.points.reverse()})}function T(C){C.nodes().forEach(D=>{if(C.children(D).length){let B=C.node(D),U=C.node(B.borderTop),X=C.node(B.borderBottom),G=C.node(B.borderLeft[B.borderLeft.length-1]),Q=C.node(B.borderRight[B.borderRight.length-1]);B.width=Math.abs(Q.x-G.x),B.height=Math.abs(X.y-U.y),B.x=G.x+B.width/2,B.y=U.y+B.height/2}}),C.nodes().forEach(D=>{C.node(D).dummy==="border"&&C.removeNode(D)})}function $(C){C.edges().forEach(D=>{if(D.v===D.w){var B=C.node(D.v);B.selfEdges||(B.selfEdges=[]),B.selfEdges.push({e:D,label:C.edge(D)}),C.removeEdge(D)}})}function O(C){var D=h.buildLayerMatrix(C);D.forEach(B=>{var U=0;B.forEach((X,G)=>{var Q=C.node(X);Q.order=G+U,(Q.selfEdges||[]).forEach(Z=>{h.addDummyNode(C,"selfedge",{width:Z.label.width,height:Z.label.height,rank:Q.rank,order:G+ ++U,e:Z.e,label:Z.label},"_se")}),delete Q.selfEdges})})}function V(C){C.nodes().forEach(D=>{var B=C.node(D);if(B.dummy==="selfedge"){var U=C.node(B.e.v),X=U.x+U.width/2,G=U.y,Q=B.x-X,Z=U.height/2;C.setEdge(B.e,B.label),C.removeNode(D),B.label.points=[{x:X+2*Q/3,y:G-Z},{x:X+5*Q/6,y:G-Z},{x:X+Q,y:G},{x:X+5*Q/6,y:G+Z},{x:X+2*Q/3,y:G+Z}],B.label.x=B.x,B.label.y=B.y}})}function Y(C,D){return h.mapValues(h.pick(C,D),Number)}function R(C){var D={};return C&&Object.entries(C).forEach(([B,U])=>{typeof B=="string"&&(B=B.toLowerCase()),D[B]=U}),D}}),O2=ue((e,t)=>{var n=_e(),r=xt().Graph;t.exports={debugOrdering:o};function o(i){let s=n.buildLayerMatrix(i),l=new r({compound:!0,multigraph:!0}).setGraph({});return i.nodes().forEach(a=>{l.setNode(a,{label:a}),l.setParent(a,"layer"+i.node(a).rank)}),i.edges().forEach(a=>l.setEdge(a.v,a.w,{},a.name)),s.forEach((a,u)=>{let f="layer"+u;l.setNode(f,{rank:"same"}),a.reduce((c,d)=>(l.setEdge(c,d,{style:"invis"}),d))}),l}}),j2=ue((e,t)=>{t.exports="2.0.4"}),$2=ue((e,t)=>{t.exports={graphlib:xt(),layout:z2(),debug:O2(),util:{time:_e().time,notime:_e().notime},version:j2()}});const Dd=$2();/*! For license information please see dagre.esm.js.LEGAL.txt */function D2(e,t,n="LR"){var s,l,a;const r=new Dd.graphlib.Graph().setDefaultEdgeLabel(()=>({}));r.setGraph({rankdir:n,nodesep:220,ranksep:400,edgesep:100,marginx:80,marginy:80,ranker:"network-simplex"});const o=290;for(const u of e){const c=(((s=u.data.fields)==null?void 0:s.length)??0)+1,d=Math.min(80+c*36,o),h=40,y=((l=u.measured)==null?void 0:l.width)??260,w=((a=u.measured)==null?void 0:a.height)??d;r.setNode(u.id,{width:y+h*2,height:w+h*2})}for(const u of t)r.setEdge(u.source,u.target);return Dd.layout(r),{nodes:e.map(u=>{var p,v,_;const f=r.node(u.id),d=(((p=u.data.fields)==null?void 0:p.length)??0)+1,h=Math.min(80+d*36,o),y=((v=u.measured)==null?void 0:v.width)??260,w=((_=u.measured)==null?void 0:_.height)??h,x=40,m=y+x*2,g=w+x*2;return{...u,position:{x:f.x-m/2+x,y:f.y-g/2+x}}}),edges:t}}function F2(e,t,n){if(n)return{changed:!1,key:e,item:null};const r=t?Qi(t):null;return r===e?{changed:!1,key:r,item:null}:{changed:!0,key:r,item:t}}const V2=({active:e,selected:t,onReplace:n,onAdd:r,onToggle:o,onClear:i,onActivate:s,onHover:l,onMarqueePreview:a})=>{var M;const u=W.useRef(null),f=W.useRef(null),[c,d]=W.useState(null),h=W.useRef(null),y=W.useRef(null),w=W.useRef(null),x=W.useCallback(()=>{var S;return((S=u.current)==null?void 0:S.parentElement)??null},[]),m=W.useCallback(S=>{var L;!e||S.button!==0||(f.current={x:S.clientX,y:S.clientY,additive:S.shiftKey||S.metaKey||S.ctrlKey},d(Pi(S.clientX,S.clientY,S.clientX,S.clientY)),(L=u.current)==null||L.setPointerCapture(S.pointerId),h.current!==null&&(cancelAnimationFrame(h.current),h.current=null),w.current!==null&&(w.current=null,l==null||l(null)))},[e,l]),g=W.useCallback(S=>{if(f.current){const L=f.current,j=Pi(L.x,L.y,S.clientX,S.clientY);d(j),a&&(y.current={x:S.clientX,y:S.clientY},h.current===null&&(h.current=requestAnimationFrame(()=>{h.current=null;const E=f.current,z=y.current,P=x();!E||!z||!P||a(s2(P,Pi(E.x,E.y,z.x,z.y)))})));return}l&&(y.current={x:S.clientX,y:S.clientY},h.current===null&&(h.current=requestAnimationFrame(()=>{h.current=null;const L=y.current,j=x();if(!L||!j)return;const E=Yl(j,L.x,L.y),z=F2(w.current,E,f.current!==null);z.changed&&(w.current=z.key,l(z.item))})))},[l,a,x]),p=W.useCallback(S=>{var A;const L=f.current;if(f.current=null,d(null),h.current!==null&&(cancelAnimationFrame(h.current),h.current=null),a==null||a([]),!L)return;(A=u.current)==null||A.releasePointerCapture(S.pointerId);const j=x();if(!j)return;if(Math.hypot(S.clientX-L.x,S.clientY-L.y)<n2){const N=Yl(j,S.clientX,S.clientY);N?o(N):L.additive||i();return}const z=Pi(L.x,L.y,S.clientX,S.clientY),P=i2(j,z);L.additive?r(P):n(P)},[x,r,n,o,i,a]),v=W.useCallback(S=>{if(!e||!s)return;const L=x();if(!L)return;const j=Yl(L,S.clientX,S.clientY);j&&s(j)},[e,s,x]),_=W.useCallback(()=>{f.current||(h.current!==null&&(cancelAnimationFrame(h.current),h.current=null),w.current!==null&&(w.current=null,l==null||l(null)))},[l]),k=W.useRef(l);k.current=l;const I=W.useRef(a);if(I.current=a,W.useEffect(()=>()=>{var S,L;h.current!==null&&(cancelAnimationFrame(h.current),h.current=null),w.current!==null&&(w.current=null,(S=k.current)==null||S.call(k,null)),(L=I.current)==null||L.call(I,[])},[]),!e)return null;const b=(M=u.current)==null?void 0:M.getBoundingClientRect(),H=c&&b?{left:c.left-b.left,top:c.top-b.top,width:c.right-c.left,height:c.bottom-c.top}:void 0;return le.createElement("div",{ref:u,className:"mv-marquee-overlay",onPointerDown:m,onPointerMove:g,onPointerUp:p,onPointerLeave:_,onDoubleClick:v},H&&le.createElement("div",{className:"mv-marquee-box",style:H}),le.createElement("span",{hidden:!0},t.size))};function H2(){const[e,t]=W.useState(new Map),n=W.useCallback(a=>{const u=new Map;for(const f of a)u.set(Qi(f),f);t(u)},[]),r=W.useCallback(a=>{t(u=>{const f=new Map(u);for(const c of a)f.set(Qi(c),c);return f})},[]),o=W.useCallback(a=>{t(u=>{const f=new Map(u),c=Qi(a);return f.has(c)?f.delete(c):f.set(c,a),f})},[]),i=W.useCallback(()=>t(new Map),[]),s=W.useCallback((a,u)=>e.has(`${a}::${u}`),[e]),l=W.useMemo(()=>Array.from(e.values()),[e]);return{selected:e,items:l,replace:n,add:r,toggle:o,clear:i,isSelected:s}}function o0(e){const t=new Map;for(const n of e)n.id&&!t.has(n.id)&&t.set(n.id,n);return t}function B2(e,t){if(typeof document>"u")return;const n=new Map,r=document.querySelectorAll(`[${nu}]`);for(let o=0;o<r.length;o++){const i=r.item(o),s=i.getAttribute(nu)??"",l=e.get(s);l&&(i.setAttribute(Tr,""),i.setAttribute(Lr,l.type),n.set(s,i))}for(const[o,i]of t)n.get(o)!==i&&(i.removeAttribute(Tr),i.removeAttribute(Lr));t.clear(),n.forEach((o,i)=>t.set(i,o))}function Fd(e){for(const t of e.values())t.removeAttribute(Tr),t.removeAttribute(Lr);e.clear()}function U2(e,t){const n=o0(e),r=()=>B2(n,t);if(typeof document>"u"||typeof MutationObserver>"u")return r(),()=>Fd(t);r();const o=new MutationObserver(()=>r());return o.observe(document.documentElement,{childList:!0,subtree:!0}),()=>{o.disconnect(),Fd(t)}}function W2(e,t,n){var l;const r=e.parentId?(l=t.get(e.parentId))==null?void 0:l.apiName:void 0,o={elementType:e.type,apiName:e.apiName};r&&(o.parent=r),e.attributes&&Object.keys(e.attributes).length>0&&(o.attributes=e.attributes),e.filePath&&(o.filePath=e.filePath);const s=(e.filePath?e.filePath.split("/").pop():void 0)||n;return s&&(o.fileName=s),o}function Y2(e,t,n){const r=o0(t),o=[];for(const i of e){const s=r.get(i.id);s&&o.push(W2(s,r,n))}return o}function X2(){return le.createElement("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},le.createElement("path",{d:"M14.5 1.5L7 9M14.5 1.5L10 14.5l-3-5.5-5.5-3L14.5 1.5z",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"}))}const G2=({chips:e,onSubmit:t,onClear:n,onRemove:r,placeholder:o})=>{const[i,s]=W.useState(""),[l,a]=W.useState(!1),u=W.useRef(null),f=e.length,c=f===0,d=e.map(x=>x.title??x.label).sort().join(",");if(W.useEffect(()=>{var x;c||(x=u.current)==null||x.focus()},[c]),W.useEffect(()=>{a(!1)},[d]),c)return null;const h=i.trim().length>0,y=()=>{if(!h)return;t(i)&&(a(!0),s(""))},w=x=>{(x.metaKey||x.ctrlKey)&&x.key==="Enter"&&(x.preventDefault(),y())};return le.createElement("div",{className:"vibe-edit-panel",role:"dialog","aria-label":"Edit selected metadata with AI"},le.createElement("div",{className:"vibe-edit-panel__header"},le.createElement("span",{className:"vibe-edit-panel__title"},"Edit Element (",f," Selected)"),le.createElement("button",{className:"vibe-edit-panel__close",onClick:n,"aria-label":"Clear selection",type:"button"},"✕")),le.createElement("div",{className:"vibe-edit-panel__chips"},e.map((x,m)=>le.createElement("span",{className:`vibe-edit-panel__chip ${x.variant==="primary"?"vibe-edit-panel__chip--field":""}`,key:`${x.title??x.label}:${m}`,title:x.title??x.label},le.createElement("span",{className:"vibe-edit-panel__chip-label"},x.label),r&&le.createElement("button",{type:"button",className:"vibe-edit-panel__chip-remove","aria-label":`Remove ${x.label} from selection`,onClick:()=>r(m)},"✕")))),le.createElement("div",{className:"vibe-edit-panel__input-wrap"},le.createElement("textarea",{ref:u,className:"vibe-edit-panel__input",value:i,onChange:x=>s(x.target.value),onKeyDown:w,placeholder:o??"Describe the change you want…",rows:3}),le.createElement("button",{className:"vibe-edit-panel__submit",onClick:y,disabled:!h,type:"button"},le.createElement(X2,null),le.createElement("span",null,"Send to Agent"))),le.createElement("div",{className:"vibe-edit-panel__footer"},le.createElement("span",{className:"vibe-edit-panel__hint"},l?"✓ Sent to agent":"⌘/Ctrl + Enter to send")))};function Q2(e){return e.length>0}function K2(e){return{label:e.apiName,title:`${e.elementType}: ${e.apiName}`,variant:e.elementType==="field"?"primary":"default"}}function Z2(){return le.createElement("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},le.createElement("rect",{x:"1.5",y:"1.5",width:"9",height:"9",stroke:"currentColor",strokeWidth:"1.25",strokeDasharray:"2 1.75"}),le.createElement("path",{d:"M7 7l7 2.6-2.9 0.9-0.9 2.9L7 7z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.5",strokeLinejoin:"round"}))}function q2(e){const{nodes:t,fileName:n,options:r}=e,o=r==null?void 0:r.placeholder,i=(r==null?void 0:r.selectLabel)??"Select",s=(r==null?void 0:r.selectingLabel)??"Selecting",l=(r==null?void 0:r.chipFor)??K2,a=r==null?void 0:r.onActivate,[u,f]=W.useState(!1),[c,d]=W.useState(null),[h,y]=W.useState([]),w=H2(),x=W.useRef(new Map);W.useEffect(()=>{if(u)return U2(t,x.current)},[u,t]),W.useEffect(()=>{if(typeof document>"u")return;const M=[];if(u)for(const[S,L]of x.current){const j=L.getAttribute(Lr)??"";S&&w.isSelected(j,S)&&(L.setAttribute(jd,""),M.push(L))}return()=>{for(const S of M)S.removeAttribute(jd)}},[u,w.selected,t]),W.useEffect(()=>{if(typeof document>"u"||!u)return;const M=new Set;c&&M.add(`${c.type}::${c.id}`);for(const L of h)M.add(`${L.type}::${L.id}`);if(M.size===0)return;const S=[];for(const[L,j]of x.current){const E=j.getAttribute(Lr)??"";L&&M.has(`${E}::${L}`)&&(j.setAttribute($d,""),S.push(j))}return()=>{for(const L of S)L.removeAttribute($d)}},[u,c,h,t]);const m=W.useMemo(()=>Y2(w.items,t,n),[t,w.items,n]),g=W.useMemo(()=>m.map(l),[m,l]),p=W.useCallback(M=>{const S={prompt:M.trim(),attachments:m},L=Zm({type:Pr.SUBMIT_EDIT,payload:S});return L&&(w.clear(),f(!1)),L},[m,w]),v=W.useCallback(M=>{const S=w.items[M];S&&w.toggle(S)},[w]),_=W.useCallback((M,S)=>{u&&w.toggle({type:M,id:S})},[u,w]),k=W.useCallback(()=>{f(M=>{const S=!M;return S||(w.clear(),d(null),y([])),S})},[w]);if(!Q2(t))return{toggleButton:null,overlay:null,panel:null,selectMode:!1,isSelected:()=>!1,toggle:()=>{}};const I=le.createElement("button",{className:`mv-vibe-edit-toggle ${u?"mv-vibe-edit-toggle--active":""}`,onClick:k,"aria-label":"Select components to edit with AI",title:"Select components to edit with AI",type:"button"},le.createElement(Z2,null),le.createElement("span",null,u?s:i)),b=le.createElement(V2,{active:u,selected:w.selected,onReplace:w.replace,onAdd:w.add,onToggle:w.toggle,onClear:w.clear,onActivate:a?M=>a(M.id):void 0,onHover:d,onMarqueePreview:y}),H=le.createElement(G2,{chips:g,onSubmit:p,onClear:w.clear,onRemove:v,placeholder:o});return{toggleButton:I,overlay:b,panel:H,selectMode:u,isSelected:w.isSelected,toggle:_}}function J2(e){return e.objects.map(t=>t.apiName).sort().join(",")}function eC(e,t,n,r,o){if(t===e)return{seed:void 0,viewport:r,hasLayout:n};if(o&&o.fingerprint===e){const i=new Map;try{for(const[s,l]of Object.entries(o.positionCache||{}))i.set(s,l);return{seed:i,viewport:o.viewport,hasLayout:!0}}catch{}}return{seed:new Map,viewport:void 0,hasLayout:!1}}const no=new Map;let Vd=!1,Gl,go="",ru;function i0(){var e;try{return(e=window.getHostApi)==null?void 0:e.call(window)}catch{return}}function Ql(e){const t=i0();if(!(t!=null&&t.setState)||!go)return;const n={};no.forEach((o,i)=>{n[i]=o});const r=t.getState();t.setState({fingerprint:go,positionCache:n,viewport:e??(r==null?void 0:r.viewport)})}(function(){var r;const t=i0(),n=(r=t==null?void 0:t.getState)==null?void 0:r.call(t);!n||!n.fingerprint||(ru=n)})();const tC={objectCard:c2},nC={relationship:f2};function rC(e){return e.replace(/__c$/,"").split("__").length>1}function oC(e,t){return!t.some(n=>n.sourceObject===e.apiName||n.targetObject===e.apiName)}function iC({data:e,activeObjectName:t,dataFingerprint:n,selectableNodes:r}){const{fitView:o,zoomIn:i,zoomOut:s}=il(),{zoom:l}=kN(),[a,u]=W.useState(!1),[f,c]=W.useState(!1),[d,h]=W.useState(d2),y=W.useRef(null),w=W.useRef(),x=W.useMemo(()=>eC(n,go,Vd,Gl,ru),[n]),[m,g]=W.useState(x.hasLayout);W.useEffect(()=>()=>{w.current&&clearTimeout(w.current)},[]);const p=W.useCallback(O=>{w.current&&clearTimeout(w.current),w.current=setTimeout(()=>Ql(O),300)},[]),v=W.useCallback((O,V)=>{no.set(V.id,{x:V.position.x,y:V.position.y,zIndex:V.zIndex||10}),Ql()},[]);W.useEffect(()=>{const O=V=>{y.current&&!y.current.contains(V.target)&&(u(!1),c(!1))};return(a||f)&&document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[a,f]);const _=W.useMemo(()=>e.objects.filter(O=>{if(d.searchQuery){const D=d.searchQuery.toLowerCase();if(!O.apiName.toLowerCase().includes(D)&&!O.label.toLowerCase().includes(D))return!1}const V=O.type==="custom",Y=O.type==="standard",R=V&&rC(O.apiName),C=oC(O,e.relationships);return!(Y&&!d.showStandard||V&&!R&&!d.showCustom||R&&!d.showNamespaced||C&&d.showOrphaned===!1&&!d.showStandard&&!d.showCustom)}),[e.objects,e.relationships,d]),k=W.useMemo(()=>new Set(_.map(O=>O.apiName)),[_]),I=W.useMemo(()=>d.displayRelationships?e.relationships.filter(O=>k.has(O.sourceObject)&&k.has(O.targetObject)):[],[e.relationships,k,d.displayRelationships]),b=W.useMemo(()=>I.map(O=>{const V=_.find(R=>R.apiName===O.sourceObject),Y=_.find(R=>R.apiName===O.targetObject);return{id:`${O.sourceObject}-${O.fieldApiName}-${O.targetObject}`,source:O.sourceObject,target:O.targetObject,sourceHandle:O.fieldApiName,type:"relationship",data:{relType:O.type,fieldApiName:O.fieldApiName,sourceType:(V==null?void 0:V.type)||"custom",targetType:(Y==null?void 0:Y.type)||"custom"},animated:O.type==="MasterDetail"}}),[I,_]),{laidOutNodes:H,laidOutEdges:M}=W.useMemo(()=>{const O=C=>{var D;return no.get(C)??((D=x.seed)==null?void 0:D.get(C))},V=_.map(C=>{const D=O(C.apiName);return{id:C.apiName,type:"objectCard",position:D?{x:D.x,y:D.y}:{x:0,y:0},zIndex:(D==null?void 0:D.zIndex)||10,data:{...C,isActive:C.apiName===t,isInactive:t&&C.apiName!==t}}});if(V.length>0&&V.every(C=>O(C.id)!=null)||V.length===0)return{laidOutNodes:V,laidOutEdges:b};const R=D2(V,b,"LR");return{laidOutNodes:R.nodes,laidOutEdges:R.edges}},[_,b,t,x]);W.useEffect(()=>{try{go!==n&&(no.clear(),Gl=x.viewport),H.forEach(V=>{no.set(V.id,{x:V.position.x,y:V.position.y,zIndex:V.zIndex||10})}),H.length>0&&(Vd=!0)}finally{go=n,ru=void 0}},[H,n,x.viewport]);const[S,L,j]=NN(H),[E,z,P]=CN(M);W.useEffect(()=>{L(H),z(M)},[H,M,L,z]),W.useLayoutEffect(()=>{if(H.length===0||m)return;const O=window.requestAnimationFrame(()=>{o({padding:.15}),Ql(),g(!0)});return()=>window.cancelAnimationFrame(O)},[H,m,o]);const A=`${Math.round(l*100)}%`,{toggleButton:N,overlay:T,panel:$}=q2({nodes:r??[],options:{selectLabel:"Select to Edit",selectingLabel:"Selecting…",placeholder:"Describe your changes…"}});return F.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",visibility:m?"visible":"hidden"},children:[T,F.jsx("div",{className:"erd-vibe-toggle",children:N}),F.jsxs(_N,{nodes:S,edges:E,onNodesChange:j,onEdgesChange:P,onNodeDragStop:v,onViewportChange:p,nodeTypes:tC,edgeTypes:nC,minZoom:.2,maxZoom:2,defaultViewport:Gl,defaultEdgeOptions:{type:"relationship"},proOptions:{hideAttribution:!0},children:[F.jsx(Jo,{position:"bottom-right",style:{margin:"var(--mv-spacing-md)",marginBottom:"60px"},children:F.jsxs("div",{className:"erd-zoom-bar",ref:y,children:[F.jsx("button",{className:`erd-zoom-bar__btn ${f?"erd-zoom-bar__btn--active":""}`,onClick:()=>{c(!f),u(!1)},"aria-label":"Legend",children:F.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[F.jsx("line",{x1:"6",y1:"3.5",x2:"14",y2:"3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),F.jsx("line",{x1:"6",y1:"8",x2:"14",y2:"8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),F.jsx("line",{x1:"6",y1:"12.5",x2:"14",y2:"12.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),F.jsx("circle",{cx:"3",cy:"3.5",r:"1.5",fill:"currentColor"}),F.jsx("circle",{cx:"3",cy:"8",r:"1.5",fill:"currentColor"}),F.jsx("circle",{cx:"3",cy:"12.5",r:"1.5",fill:"currentColor"})]})}),F.jsx("span",{className:"erd-zoom-bar__divider"}),F.jsx("button",{className:"erd-zoom-bar__btn",onClick:()=>s(),"aria-label":"Zoom out",children:F.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[F.jsx("circle",{cx:"7",cy:"7",r:"5.5",stroke:"currentColor",strokeWidth:"1.5"}),F.jsx("line",{x1:"11",y1:"11",x2:"14",y2:"14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),F.jsx("line",{x1:"4.5",y1:"7",x2:"9.5",y2:"7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}),F.jsx("span",{className:"erd-zoom-bar__level",children:A}),F.jsx("button",{className:"erd-zoom-bar__btn",onClick:()=>i(),"aria-label":"Zoom in",children:F.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[F.jsx("circle",{cx:"7",cy:"7",r:"5.5",stroke:"currentColor",strokeWidth:"1.5"}),F.jsx("line",{x1:"11",y1:"11",x2:"14",y2:"14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),F.jsx("line",{x1:"4.5",y1:"7",x2:"9.5",y2:"7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),F.jsx("line",{x1:"7",y1:"4.5",x2:"7",y2:"9.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}),f&&F.jsx(h2,{})]})}),F.jsx(LN,{variant:Dt.Dots,color:"var(--mv-canvas-grid)",gap:20,size:1.5,bgColor:"var(--mv-canvas-bg)"})]}),$]})}const sC=({data:e,activeObjectName:t,selectableNodes:n})=>{const r=W.useMemo(()=>J2(e),[e]);return F.jsx(Ym,{children:F.jsx(iC,{data:e,activeObjectName:t,dataFingerprint:r,selectableNodes:n})},r)};function lC({data:e,activeObjectName:t,selectableNodes:n}){return F.jsx("div",{className:"schema-visualization",children:F.jsx(sC,{data:e,activeObjectName:t,selectableNodes:n})})}var ou={},Hd=pm;ou.createRoot=Hd.createRoot,ou.hydrateRoot=Hd.hydrateRoot;function aC(e,t){Dn.create().category(Ir.Rendering).message(e.message).stackTrace(e.stack).context({componentStack:t.componentStack,errorName:e.name}).send(),console.error("[ErrorBoundary] Rendering error:",e,t)}function uC({error:e}){return F.jsxs(F.Fragment,{children:[F.jsx("p",{children:"Something went wrong. Check the error panel for details."}),e&&F.jsxs(F.Fragment,{children:[e.message&&F.jsx("p",{children:e.message}),e.stack&&F.jsx("pre",{children:e.stack})]})]})}class cC extends le.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){aC(t,n)}render(){return this.state.hasError?F.jsx(uC,{error:this.state.error}):this.props.children}}let et=null,Ti=null,ct=null,Bd=!1;function fC(e){if(typeof e!="object"||e===null)return e;const t=e;return t.kind===void 0&&typeof t.filePath=="string"&&typeof t.fileName=="string"?{...t,kind:"file",filePath:t.filePath,fileName:t.fileName}:e}function dC(e,t){const{rootClass:n,title:r,message:o,filePath:i}=t,s=i?`<p>File: ${i}</p>`:"";e.innerHTML=`
|
|
63
|
+
<div class="${n}">
|
|
64
|
+
<div class="error-message">
|
|
65
|
+
<h2>${r}</h2>
|
|
66
|
+
<p>${o}</p>
|
|
67
|
+
${s}
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
`}function Li(e,t){const{logPrefix:n,rootClass:r,title:o,consoleMessage:i,errorBuilderMessage:s,context:l={},domMessage:a,filePath:u}=t;console.error(`${n} ${i}`),Dn.create().category(Ir.Rendering).message(s).context(l).send(),dC(e,{rootClass:r,title:o,message:a,filePath:u})}async function Ud(e){const{pluginName:t,rootClass:n,expectedSourceKind:r,render:o,validateData:i}=e,s=`[${t} React App]`,l=document.getElementById("root");if(!l){console.error(`${s} Root element not found`);return}if(ct&&(ct(),ct=null),et){try{et.unmount()}catch(g){console.warn(`${s} Error unmounting previous root:`,g)}et=null,Ti=null}const a={fn:null};let u=null,f=!1;ct=e2(g=>{if(!f)if(a.fn)try{a.fn(g)}catch(p){console.error(`${s} Update handler threw:`,p)}else u=g});const d=(g,p,v)=>{g.render(F.jsx(le.StrictMode,{children:F.jsx(cC,{children:o(p,v)})}))},h=()=>{if(et){try{et.unmount()}catch(g){console.warn(`${s} Error unmounting previous root:`,g)}et=null}Ti=null},y=g=>g.kind===r,w=()=>{f=!0,ct==null||ct(),ct=null,u=null},x=(g,p)=>{const v=g!=null&&g.context?fC(g.context):void 0,_=g==null?void 0:g.data;if(!v||_==null){h();const M=(v==null?void 0:v.kind)==="file"?v.filePath:void 0;Li(l,{logPrefix:s,rootClass:n,title:p?"Error: No updated data provided":"Error: No data provided",consoleMessage:"No data provided",errorBuilderMessage:`${t} data is missing or invalid`,context:{sourceKind:v==null?void 0:v.kind,reason:"No data provided in response"},domMessage:`${t} data is missing or invalid.`,filePath:M});return}if(!y(v)){h(),w(),Li(l,{logPrefix:s,rootClass:n,title:"Error: Unsupported visualization source",consoleMessage:`Expected ${r} context but received ${v.kind}`,errorBuilderMessage:`${t} received an incompatible visualization source`,context:{expectedSourceKind:r,actualSourceKind:v.kind},domMessage:`${t} cannot render data from this source.`});return}const k=v,I=i!=null?i(_):null;if(I!=null){h(),Li(l,{logPrefix:s,rootClass:n,title:p?"Error: Invalid Updated Data":"Error: Invalid Data",consoleMessage:`Validation failed: ${I}`,errorBuilderMessage:`${t} data structure is invalid`,context:{sourceKind:k.kind,reason:I},domMessage:I,filePath:k.kind==="file"?k.filePath:void 0});return}const b={...k,selectableNodes:g.selectableNodes},H=k.kind==="file"?`file:${k.filePath}`:`payload:${k.pluginId}`;if(et==null||H!==Ti){if(et){try{et.unmount()}catch(M){console.warn(`${s} Error unmounting previous root:`,M)}et=null}l.innerHTML="",et=ou.createRoot(l),Ti=H}d(et,_,b)},m=await JN();if(!m){if(Li(l,{logPrefix:s,rootClass:n,title:"Error: Failed to load data",consoleMessage:"Failed to receive plugin data from host",errorBuilderMessage:`${t} data is missing or invalid`,context:{reason:"Failed to receive plugin data from host"},domMessage:`Could not receive ${t} data from the extension host.`}),a.fn=g=>x(g,!0),u){const g=u;u=null,a.fn(g)}return}if(x(m,!1),!f&&(a.fn=g=>x(g,!0),u)){const g=u;u=null,a.fn(g)}}function hC(e){t2(),Bd||(window.addEventListener("pagehide",()=>{ct&&(ct(),ct=null)}),Bd=!0),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Ud(e)}):Ud(e)}function pC(e){if(!e)return;const n=(e.split("/").pop()||e.split("\\").pop()||"").match(/^(.+)\.object-meta\.xml$/);if(n)return n[1]}hC({pluginName:"Schema",rootClass:"schema-app",expectedSourceKind:"file",render:(e,t)=>{const n=pC(t.filePath);return F.jsx(lC,{data:e,activeObjectName:n,selectableNodes:t.selectableNodes})},validateData:e=>!e.objects||!e.relationships?"Schema data structure is missing required properties (objects or relationships)":null});
|