@salesforce/metadata-plugins 1.14.0 → 1.16.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/plugins/agent/ui/assets/{VibeEditComposer-D5GykTkw.js → VibeEditComposer-sSbOXosJ.js} +1 -1
- package/dist/plugins/agent/ui/assets/index-BIxtmvIY.js +72 -0
- package/dist/plugins/agent/ui/assets/index-DK6mLwjU.css +1 -0
- package/dist/plugins/agent/ui/index.html +2 -2
- package/dist/plugins/{flow/ui/assets/VibeEditComposer-C36-RsSl.js → flexipage/ui/assets/VibeEditComposer-2omfTQa8.js} +1 -1
- package/dist/plugins/flexipage/ui/assets/index-Ch0zZsHI.css +1 -0
- package/dist/plugins/flexipage/ui/assets/index-uJdxEdOM.js +49 -0
- package/dist/plugins/flexipage/ui/index.html +2 -2
- package/dist/plugins/{permissionset/ui/assets/VibeEditComposer-HYu9RPHQ.js → flow/ui/assets/VibeEditComposer-6VCphcxQ.js} +1 -1
- package/dist/plugins/flow/ui/assets/index-CQ3TDL7z.css +1 -0
- package/dist/plugins/flow/ui/assets/index-CpyTpkLI.js +49 -0
- package/dist/plugins/flow/ui/index.html +2 -2
- package/dist/plugins/flowintent/ui/assets/{index-CzlE9StJ.js → index-y2EUB92Z.js} +8 -8
- package/dist/plugins/flowintent/ui/index.html +1 -1
- package/dist/plugins/keyvaluetable/KeyValueTableParser.d.ts +2 -1
- package/dist/plugins/keyvaluetable/KeyValueTableParser.d.ts.map +1 -1
- package/dist/plugins/keyvaluetable/KeyValueTableParser.js +4 -0
- package/dist/plugins/keyvaluetable/keyvaluetableSelectionGraph.d.ts +42 -0
- package/dist/plugins/keyvaluetable/keyvaluetableSelectionGraph.d.ts.map +1 -0
- package/dist/plugins/keyvaluetable/keyvaluetableSelectionGraph.js +167 -0
- package/dist/plugins/keyvaluetable/panelModel.d.ts +61 -0
- package/dist/plugins/keyvaluetable/panelModel.d.ts.map +1 -0
- package/dist/plugins/keyvaluetable/panelModel.js +101 -0
- package/dist/plugins/keyvaluetable/ui/assets/VibeEditComposer-BQeSigSs.css +1 -0
- package/dist/plugins/{flexipage/ui/assets/VibeEditComposer-CwNZdtC5.js → keyvaluetable/ui/assets/VibeEditComposer-D5tmk2tP.js} +1 -1
- package/dist/plugins/keyvaluetable/ui/assets/index-BHCYa3XE.css +1 -0
- package/dist/plugins/keyvaluetable/ui/assets/index-CKi34Iea.js +51 -0
- package/dist/plugins/keyvaluetable/ui/index.html +2 -2
- package/dist/plugins/permissionset/ui/assets/VibeEditComposer-CIuLlA6k.js +1 -0
- package/dist/plugins/permissionset/ui/assets/index-C30GA5Fg.js +49 -0
- package/dist/plugins/permissionset/ui/assets/index-DrM8dMi5.css +1 -0
- package/dist/plugins/permissionset/ui/index.html +2 -2
- package/dist/plugins/schema/ui/assets/VibeEditComposer-4dxANHzI.js +1 -0
- package/dist/plugins/schema/ui/assets/index-ByiBxce_.js +71 -0
- package/dist/plugins/schema/ui/assets/index-CkSyHqut.css +1 -0
- package/dist/plugins/schema/ui/index.html +2 -2
- package/package.json +3 -3
- package/dist/plugins/agent/ui/assets/index-CFqH429G.css +0 -1
- package/dist/plugins/agent/ui/assets/index-nYWtX5pm.js +0 -72
- package/dist/plugins/flexipage/ui/assets/index-C2upgZns.css +0 -1
- package/dist/plugins/flexipage/ui/assets/index-hFZPLB6p.js +0 -49
- package/dist/plugins/flow/ui/assets/index-CdpIq7gH.js +0 -49
- package/dist/plugins/flow/ui/assets/index-Ckw5Ej7p.css +0 -1
- package/dist/plugins/keyvaluetable/ui/assets/index-BMYDJ7MA.js +0 -50
- package/dist/plugins/keyvaluetable/ui/assets/index-CxfJGu2l.css +0 -1
- package/dist/plugins/permissionset/ui/assets/index-DWBjNYzW.css +0 -1
- package/dist/plugins/permissionset/ui/assets/index-DilBd-cG.js +0 -49
- package/dist/plugins/schema/ui/assets/VibeEditComposer-Ce9dBbb3.js +0 -1
- package/dist/plugins/schema/ui/assets/index-DSSQ6K8b.js +0 -71
- package/dist/plugins/schema/ui/assets/index-Dsaw92BM.css +0 -1
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./VibeEditComposer-4dxANHzI.js","./VibeEditComposer-BQeSigSs.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
(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 bh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lh={exports:{}},tl={},Rh={exports:{}},le={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react.production.min.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var oi=Symbol.for("react.element"),T1=Symbol.for("react.portal"),I1=Symbol.for("react.fragment"),P1=Symbol.for("react.strict_mode"),b1=Symbol.for("react.profiler"),L1=Symbol.for("react.provider"),R1=Symbol.for("react.context"),A1=Symbol.for("react.forward_ref"),O1=Symbol.for("react.suspense"),D1=Symbol.for("react.memo"),z1=Symbol.for("react.lazy"),of=Symbol.iterator;function j1(e){return e===null||typeof e!="object"?null:(e=of&&e[of]||e["@@iterator"],typeof e=="function"?e:null)}var Ah={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Oh=Object.assign,Dh={};function Wr(e,t,n){this.props=e,this.context=t,this.refs=Dh,this.updater=n||Ah}Wr.prototype.isReactComponent={};Wr.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")};Wr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function zh(){}zh.prototype=Wr.prototype;function Ou(e,t,n){this.props=e,this.context=t,this.refs=Dh,this.updater=n||Ah}var Du=Ou.prototype=new zh;Du.constructor=Ou;Oh(Du,Wr.prototype);Du.isPureReactComponent=!0;var sf=Array.isArray,jh=Object.prototype.hasOwnProperty,zu={current:null},$h={key:!0,ref:!0,__self:!0,__source:!0};function Vh(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)jh.call(t,r)&&!$h.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:oi,type:e,key:i,ref:s,props:o,_owner:zu.current}}function $1(e,t){return{$$typeof:oi,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ju(e){return typeof e=="object"&&e!==null&&e.$$typeof===oi}function V1(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var lf=/\/+/g;function jl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?V1(""+e.key):t.toString(36)}function es(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 oi:case T1:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+jl(s,0):r,sf(o)?(n="",e!=null&&(n=e.replace(lf,"$&/")+"/"),es(o,t,n,"",function(u){return u})):o!=null&&(ju(o)&&(o=$1(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(lf,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",sf(e))for(var l=0;l<e.length;l++){i=e[l];var a=r+jl(i,l);s+=es(i,t,n,a,o)}else if(a=j1(e),typeof a=="function")for(e=a.call(e),l=0;!(i=e.next()).done;)i=i.value,a=r+jl(i,l++),s+=es(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 _i(e,t,n){if(e==null)return e;var r=[],o=0;return es(e,r,"","",function(i){return t.call(n,i,o++)}),r}function H1(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 Fe={current:null},ts={transition:null},F1={ReactCurrentDispatcher:Fe,ReactCurrentBatchConfig:ts,ReactCurrentOwner:zu};function Hh(){throw Error("act(...) is not supported in production builds of React.")}le.Children={map:_i,forEach:function(e,t,n){_i(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return _i(e,function(){t++}),t},toArray:function(e){return _i(e,function(t){return t})||[]},only:function(e){if(!ju(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};le.Component=Wr;le.Fragment=I1;le.Profiler=b1;le.PureComponent=Ou;le.StrictMode=P1;le.Suspense=O1;le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=F1;le.act=Hh;le.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=Oh({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=zu.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)jh.call(t,a)&&!$h.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:oi,type:e.type,key:o,ref:i,props:r,_owner:s}};le.createContext=function(e){return e={$$typeof:R1,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:L1,_context:e},e.Consumer=e};le.createElement=Vh;le.createFactory=function(e){var t=Vh.bind(null,e);return t.type=e,t};le.createRef=function(){return{current:null}};le.forwardRef=function(e){return{$$typeof:A1,render:e}};le.isValidElement=ju;le.lazy=function(e){return{$$typeof:z1,_payload:{_status:-1,_result:e},_init:H1}};le.memo=function(e,t){return{$$typeof:D1,type:e,compare:t===void 0?null:t}};le.startTransition=function(e){var t=ts.transition;ts.transition={};try{e()}finally{ts.transition=t}};le.unstable_act=Hh;le.useCallback=function(e,t){return Fe.current.useCallback(e,t)};le.useContext=function(e){return Fe.current.useContext(e)};le.useDebugValue=function(){};le.useDeferredValue=function(e){return Fe.current.useDeferredValue(e)};le.useEffect=function(e,t){return Fe.current.useEffect(e,t)};le.useId=function(){return Fe.current.useId()};le.useImperativeHandle=function(e,t,n){return Fe.current.useImperativeHandle(e,t,n)};le.useInsertionEffect=function(e,t){return Fe.current.useInsertionEffect(e,t)};le.useLayoutEffect=function(e,t){return Fe.current.useLayoutEffect(e,t)};le.useMemo=function(e,t){return Fe.current.useMemo(e,t)};le.useReducer=function(e,t,n){return Fe.current.useReducer(e,t,n)};le.useRef=function(e){return Fe.current.useRef(e)};le.useState=function(e){return Fe.current.useState(e)};le.useSyncExternalStore=function(e,t,n){return Fe.current.useSyncExternalStore(e,t,n)};le.useTransition=function(){return Fe.current.useTransition()};le.version="18.3.1";Rh.exports=le;var V=Rh.exports;const ne=bh(V);/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react-jsx-runtime.production.min.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var B1=V,U1=Symbol.for("react.element"),W1=Symbol.for("react.fragment"),Y1=Object.prototype.hasOwnProperty,X1=B1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,G1={key:!0,ref:!0,__self:!0,__source:!0};function Fh(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)Y1.call(t,r)&&!G1.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:U1,type:e,key:i,ref:s,props:o,_owner:X1.current}}tl.Fragment=W1;tl.jsx=Fh;tl.jsxs=Fh;Lh.exports=tl;var F=Lh.exports;function Me(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=Me(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var Q1={value:()=>{}};function nl(){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 ns(n)}function ns(e){this._=e}function K1(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}})}ns.prototype=nl.prototype={constructor:ns,on:function(e,t){var n=this._,r=K1(e+"",n),o,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((o=(e=r[i]).type)&&(o=Z1(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]=af(n[o],e.name,t);else if(t==null)for(o in n)n[o]=af(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 ns(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 Z1(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function af(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=Q1,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Ca="http://www.w3.org/1999/xhtml";const uf={svg:"http://www.w3.org/2000/svg",xhtml:Ca,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function rl(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),uf.hasOwnProperty(t)?{space:uf[t],local:e}:e}function q1(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Ca&&t.documentElement.namespaceURI===Ca?t.createElement(e):t.createElementNS(n,e)}}function J1(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Bh(e){var t=rl(e);return(t.local?J1:q1)(t)}function ey(){}function $u(e){return e==null?ey:function(){return this.querySelector(e)}}function ty(e){typeof e!="function"&&(e=$u(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,c=0;c<s;++c)(a=i[c])&&(u=e.call(a,a.__data__,c,i))&&("__data__"in a&&(u.__data__=a.__data__),l[c]=u);return new ot(r,this._parents)}function ny(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ry(){return[]}function Uh(e){return e==null?ry:function(){return this.querySelectorAll(e)}}function oy(e){return function(){return ny(e.apply(this,arguments))}}function iy(e){typeof e=="function"?e=oy(e):e=Uh(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 ot(r,o)}function Wh(e){return function(){return this.matches(e)}}function Yh(e){return function(t){return t.matches(e)}}var sy=Array.prototype.find;function ly(e){return function(){return sy.call(this.children,e)}}function ay(){return this.firstElementChild}function uy(e){return this.select(e==null?ay:ly(typeof e=="function"?e:Yh(e)))}var cy=Array.prototype.filter;function fy(){return Array.from(this.children)}function dy(e){return function(){return cy.call(this.children,e)}}function hy(e){return this.selectAll(e==null?fy:dy(typeof e=="function"?e:Yh(e)))}function py(e){typeof e!="function"&&(e=Wh(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 ot(r,this._parents)}function Xh(e){return new Array(e.length)}function gy(){return new ot(this._enter||this._groups.map(Xh),this._parents)}function vs(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}vs.prototype={constructor:vs,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 my(e){return function(){return e}}function yy(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 vs(e,i[s]);for(;s<a;++s)(l=t[s])&&(o[s]=l)}function vy(e,t,n,r,o,i,s){var l,a,u=new Map,c=t.length,f=i.length,d=new Array(c),h;for(l=0;l<c;++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<f;++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 vs(e,i[l]);for(l=0;l<c;++l)(a=t[l])&&u.get(d[l])===a&&(o[l]=a)}function wy(e){return e.__data__}function xy(e,t){if(!arguments.length)return Array.from(this,wy);var n=t?vy:yy,r=this._parents,o=this._groups;typeof e!="function"&&(e=my(e));for(var i=o.length,s=new Array(i),l=new Array(i),a=new Array(i),u=0;u<i;++u){var c=r[u],f=o[u],d=f.length,h=Ey(e.call(c,c&&c.__data__,u,r)),m=h.length,w=l[u]=new Array(m),E=s[u]=new Array(m),y=a[u]=new Array(d);n(c,f,w,E,y,h,t);for(var g=0,p=0,v,_;g<m;++g)if(v=w[g]){for(g>=p&&(p=g+1);!(_=E[p])&&++p<m;);v._next=_||null}}return s=new ot(s,r),s._enter=l,s._exit=a,s}function Ey(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function _y(){return new ot(this._exit||this._groups.map(Xh),this._parents)}function Sy(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 Cy(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],c=r[a],f=u.length,d=l[a]=new Array(f),h,m=0;m<f;++m)(h=u[m]||c[m])&&(d[m]=h);for(;a<o;++a)l[a]=n[a];return new ot(l,this._parents)}function ky(){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 Ny(e){e||(e=My);function t(f,d){return f&&d?e(f.__data__,d.__data__):!f-!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,c=0;c<l;++c)(u=s[c])&&(a[c]=u);a.sort(t)}return new ot(o,this._parents).order()}function My(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ty(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Iy(){return Array.from(this)}function Py(){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 by(){let e=0;for(const t of this)++e;return e}function Ly(){return!this.node()}function Ry(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 Ay(e){return function(){this.removeAttribute(e)}}function Oy(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Dy(e,t){return function(){this.setAttribute(e,t)}}function zy(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function jy(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function $y(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 Vy(e,t){var n=rl(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?Oy:Ay:typeof t=="function"?n.local?$y:jy:n.local?zy:Dy)(n,t))}function Gh(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Hy(e){return function(){this.style.removeProperty(e)}}function Fy(e,t,n){return function(){this.style.setProperty(e,t,n)}}function By(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Uy(e,t,n){return arguments.length>1?this.each((t==null?Hy:typeof t=="function"?By:Fy)(e,t,n??"")):Mr(this.node(),e)}function Mr(e,t){return e.style.getPropertyValue(t)||Gh(e).getComputedStyle(e,null).getPropertyValue(t)}function Wy(e){return function(){delete this[e]}}function Yy(e,t){return function(){this[e]=t}}function Xy(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Gy(e,t){return arguments.length>1?this.each((t==null?Wy:typeof t=="function"?Xy:Yy)(e,t)):this.node()[e]}function Qh(e){return e.trim().split(/^|\s+/)}function Vu(e){return e.classList||new Kh(e)}function Kh(e){this._node=e,this._names=Qh(e.getAttribute("class")||"")}Kh.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 Zh(e,t){for(var n=Vu(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function qh(e,t){for(var n=Vu(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function Qy(e){return function(){Zh(this,e)}}function Ky(e){return function(){qh(this,e)}}function Zy(e,t){return function(){(t.apply(this,arguments)?Zh:qh)(this,e)}}function qy(e,t){var n=Qh(e+"");if(arguments.length<2){for(var r=Vu(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?Zy:t?Qy:Ky)(n,t))}function Jy(){this.textContent=""}function ev(e){return function(){this.textContent=e}}function tv(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function nv(e){return arguments.length?this.each(e==null?Jy:(typeof e=="function"?tv:ev)(e)):this.node().textContent}function rv(){this.innerHTML=""}function ov(e){return function(){this.innerHTML=e}}function iv(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function sv(e){return arguments.length?this.each(e==null?rv:(typeof e=="function"?iv:ov)(e)):this.node().innerHTML}function lv(){this.nextSibling&&this.parentNode.appendChild(this)}function av(){return this.each(lv)}function uv(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function cv(){return this.each(uv)}function fv(e){var t=typeof e=="function"?e:Bh(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function dv(){return null}function hv(e,t){var n=typeof e=="function"?e:Bh(e),r=t==null?dv:typeof t=="function"?t:$u(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function pv(){var e=this.parentNode;e&&e.removeChild(this)}function gv(){return this.each(pv)}function mv(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function yv(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function vv(e){return this.select(e?yv:mv)}function wv(e){return arguments.length?this.property("__data__",e):this.node().__data__}function xv(e){return function(t){e.call(this,t,this.__data__)}}function Ev(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 _v(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 Sv(e,t,n){return function(){var r=this.__on,o,i=xv(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 Cv(e,t,n){var r=Ev(e+""),o,i=r.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var a=0,u=l.length,c;a<u;++a)for(o=0,c=l[a];o<i;++o)if((s=r[o]).type===c.type&&s.name===c.name)return c.value}return}for(l=t?Sv:_v,o=0;o<i;++o)this.each(l(r[o],t,n));return this}function Jh(e,t,n){var r=Gh(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 kv(e,t){return function(){return Jh(this,e,t)}}function Nv(e,t){return function(){return Jh(this,e,t.apply(this,arguments))}}function Mv(e,t){return this.each((typeof t=="function"?Nv:kv)(e,t))}function*Tv(){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 ep=[null];function ot(e,t){this._groups=e,this._parents=t}function ii(){return new ot([[document.documentElement]],ep)}function Iv(){return this}ot.prototype=ii.prototype={constructor:ot,select:ty,selectAll:iy,selectChild:uy,selectChildren:hy,filter:py,data:xy,enter:gy,exit:_y,join:Sy,merge:Cy,selection:Iv,order:ky,sort:Ny,call:Ty,nodes:Iy,node:Py,size:by,empty:Ly,each:Ry,attr:Vy,style:Uy,property:Gy,classed:qy,text:nv,html:sv,raise:av,lower:cv,append:fv,insert:hv,remove:gv,clone:vv,datum:wv,on:Cv,dispatch:Mv,[Symbol.iterator]:Tv};function tt(e){return typeof e=="string"?new ot([[document.querySelector(e)]],[document.documentElement]):new ot([[e]],ep)}function Pv(e){let t;for(;t=e.sourceEvent;)e=t;return e}function xt(e,t){if(e=Pv(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 bv={passive:!1},Lo={capture:!0,passive:!1};function $l(e){e.stopImmediatePropagation()}function wr(e){e.preventDefault(),e.stopImmediatePropagation()}function tp(e){var t=e.document.documentElement,n=tt(e).on("dragstart.drag",wr,Lo);"onselectstart"in t?n.on("selectstart.drag",wr,Lo):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function np(e,t){var n=e.document.documentElement,r=tt(e).on("dragstart.drag",null);t&&(r.on("click.drag",wr,Lo),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 Si=e=>()=>e;function ka(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:s,y:l,dx:a,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value: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:c}})}ka.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Lv(e){return!e.ctrlKey&&!e.button}function Rv(){return this.parentNode}function Av(e,t){return t??{x:e.x,y:e.y}}function Ov(){return navigator.maxTouchPoints||"ontouchstart"in this}function rp(){var e=Lv,t=Rv,n=Av,r=Ov,o={},i=nl("start","drag","end"),s=0,l,a,u,c,f=0;function d(v){v.on("mousedown.drag",h).filter(r).on("touchstart.drag",E).on("touchmove.drag",y,bv).on("touchend.drag touchcancel.drag",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(v,_){if(!(c||!e.call(this,v,_))){var S=p(this,t.call(this,v,_),v,_,"mouse");S&&(tt(v.view).on("mousemove.drag",m,Lo).on("mouseup.drag",w,Lo),tp(v.view),$l(v),u=!1,l=v.clientX,a=v.clientY,S("start",v))}}function m(v){if(wr(v),!u){var _=v.clientX-l,S=v.clientY-a;u=_*_+S*S>f}o.mouse("drag",v)}function w(v){tt(v.view).on("mousemove.drag mouseup.drag",null),np(v.view,u),wr(v),o.mouse("end",v)}function E(v,_){if(e.call(this,v,_)){var S=v.changedTouches,T=t.call(this,v,_),N=S.length,B,b;for(B=0;B<N;++B)(b=p(this,T,v,_,S[B].identifier,S[B]))&&($l(v),b("start",v,S[B]))}}function y(v){var _=v.changedTouches,S=_.length,T,N;for(T=0;T<S;++T)(N=o[_[T].identifier])&&(wr(v),N("drag",v,_[T]))}function g(v){var _=v.changedTouches,S=_.length,T,N;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),T=0;T<S;++T)(N=o[_[T].identifier])&&($l(v),N("end",v,_[T]))}function p(v,_,S,T,N,B){var b=i.copy(),P=xt(B||S,_),j,H,x;if((x=n.call(v,new ka("beforestart",{sourceEvent:S,target:d,identifier:N,active:s,x:P[0],y:P[1],dx:0,dy:0,dispatch:b}),T))!=null)return j=x.x-P[0]||0,H=x.y-P[1]||0,function D(I,A,C){var M=P,z;switch(I){case"start":o[N]=D,z=s++;break;case"end":delete o[N],--s;case"drag":P=xt(C||A,_),z=s;break}b.call(I,v,new ka(I,{sourceEvent:A,subject:x,target:d,identifier:N,active:z,x:P[0]+j,y:P[1]+H,dx:P[0]-M[0],dy:P[1]-M[1],dispatch:b}),T)}}return d.filter=function(v){return arguments.length?(e=typeof v=="function"?v:Si(!!v),d):e},d.container=function(v){return arguments.length?(t=typeof v=="function"?v:Si(v),d):t},d.subject=function(v){return arguments.length?(n=typeof v=="function"?v:Si(v),d):n},d.touchable=function(v){return arguments.length?(r=typeof v=="function"?v:Si(!!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?(f=(v=+v)*v,d):Math.sqrt(f)},d}function Hu(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function op(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function si(){}var Ro=.7,ws=1/Ro,xr="\\s*([+-]?\\d+)\\s*",Ao="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Dt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Dv=/^#([0-9a-f]{3,8})$/,zv=new RegExp(`^rgb\\(${xr},${xr},${xr}\\)$`),jv=new RegExp(`^rgb\\(${Dt},${Dt},${Dt}\\)$`),$v=new RegExp(`^rgba\\(${xr},${xr},${xr},${Ao}\\)$`),Vv=new RegExp(`^rgba\\(${Dt},${Dt},${Dt},${Ao}\\)$`),Hv=new RegExp(`^hsl\\(${Ao},${Dt},${Dt}\\)$`),Fv=new RegExp(`^hsla\\(${Ao},${Dt},${Dt},${Ao}\\)$`),cf={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};Hu(si,Bn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ff,formatHex:ff,formatHex8:Bv,formatHsl:Uv,formatRgb:df,toString:df});function ff(){return this.rgb().formatHex()}function Bv(){return this.rgb().formatHex8()}function Uv(){return ip(this).formatHsl()}function df(){return this.rgb().formatRgb()}function Bn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Dv.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?hf(t):n===3?new Xe(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ci(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ci(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=zv.exec(e))?new Xe(t[1],t[2],t[3],1):(t=jv.exec(e))?new Xe(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=$v.exec(e))?Ci(t[1],t[2],t[3],t[4]):(t=Vv.exec(e))?Ci(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Hv.exec(e))?mf(t[1],t[2]/100,t[3]/100,1):(t=Fv.exec(e))?mf(t[1],t[2]/100,t[3]/100,t[4]):cf.hasOwnProperty(e)?hf(cf[e]):e==="transparent"?new Xe(NaN,NaN,NaN,0):null}function hf(e){return new Xe(e>>16&255,e>>8&255,e&255,1)}function Ci(e,t,n,r){return r<=0&&(e=t=n=NaN),new Xe(e,t,n,r)}function Wv(e){return e instanceof si||(e=Bn(e)),e?(e=e.rgb(),new Xe(e.r,e.g,e.b,e.opacity)):new Xe}function Na(e,t,n,r){return arguments.length===1?Wv(e):new Xe(e,t,n,r??1)}function Xe(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Hu(Xe,Na,op(si,{brighter(e){return e=e==null?ws:Math.pow(ws,e),new Xe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ro:Math.pow(Ro,e),new Xe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xe($n(this.r),$n(this.g),$n(this.b),xs(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:pf,formatHex:pf,formatHex8:Yv,formatRgb:gf,toString:gf}));function pf(){return`#${On(this.r)}${On(this.g)}${On(this.b)}`}function Yv(){return`#${On(this.r)}${On(this.g)}${On(this.b)}${On((isNaN(this.opacity)?1:this.opacity)*255)}`}function gf(){const e=xs(this.opacity);return`${e===1?"rgb(":"rgba("}${$n(this.r)}, ${$n(this.g)}, ${$n(this.b)}${e===1?")":`, ${e})`}`}function xs(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function $n(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function On(e){return e=$n(e),(e<16?"0":"")+e.toString(16)}function mf(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new St(e,t,n,r)}function ip(e){if(e instanceof St)return new St(e.h,e.s,e.l,e.opacity);if(e instanceof si||(e=Bn(e)),!e)return new St;if(e instanceof St)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 St(s,l,a,e.opacity)}function Xv(e,t,n,r){return arguments.length===1?ip(e):new St(e,t,n,r??1)}function St(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Hu(St,Xv,op(si,{brighter(e){return e=e==null?ws:Math.pow(ws,e),new St(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ro:Math.pow(Ro,e),new St(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 Xe(Vl(e>=240?e-240:e+120,o,r),Vl(e,o,r),Vl(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new St(yf(this.h),ki(this.s),ki(this.l),xs(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=xs(this.opacity);return`${e===1?"hsl(":"hsla("}${yf(this.h)}, ${ki(this.s)*100}%, ${ki(this.l)*100}%${e===1?")":`, ${e})`}`}}));function yf(e){return e=(e||0)%360,e<0?e+360:e}function ki(e){return Math.max(0,Math.min(1,e||0))}function Vl(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 Fu=e=>()=>e;function Gv(e,t){return function(n){return e+n*t}}function Qv(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 Kv(e){return(e=+e)==1?sp:function(t,n){return n-t?Qv(t,n,e):Fu(isNaN(t)?n:t)}}function sp(e,t){var n=t-e;return n?Gv(e,n):Fu(isNaN(e)?t:e)}const Es=function e(t){var n=Kv(t);function r(o,i){var s=n((o=Na(o)).r,(i=Na(i)).r),l=n(o.g,i.g),a=n(o.b,i.b),u=sp(o.opacity,i.opacity);return function(c){return o.r=s(c),o.g=l(c),o.b=a(c),o.opacity=u(c),o+""}}return r.gamma=e,r}(1);function Zv(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 qv(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Jv(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]=vo(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 e2(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function At(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function t2(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]=vo(e[o],t[o]):r[o]=t[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var Ma=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Hl=new RegExp(Ma.source,"g");function n2(e){return function(){return e}}function r2(e){return function(t){return e(t)+""}}function lp(e,t){var n=Ma.lastIndex=Hl.lastIndex=0,r,o,i,s=-1,l=[],a=[];for(e=e+"",t=t+"";(r=Ma.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:At(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]?r2(a[0].x):n2(t):(t=a.length,function(u){for(var c=0,f;c<t;++c)l[(f=a[c]).i]=f.x(u);return l.join("")})}function vo(e,t){var n=typeof t,r;return t==null||n==="boolean"?Fu(t):(n==="number"?At:n==="string"?(r=Bn(t))?(t=r,Es):lp:t instanceof Bn?Es:t instanceof Date?e2:qv(t)?Zv:Array.isArray(t)?Jv:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?t2:At)(e,t)}var vf=180/Math.PI,Ta={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ap(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)*vf,skewX:Math.atan(a)*vf,scaleX:s,scaleY:l}}var Ni;function o2(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ta:ap(t.a,t.b,t.c,t.d,t.e,t.f)}function i2(e){return e==null||(Ni||(Ni=document.createElementNS("http://www.w3.org/2000/svg","g")),Ni.setAttribute("transform",e),!(e=Ni.transform.baseVal.consolidate()))?Ta:(e=e.matrix,ap(e.a,e.b,e.c,e.d,e.e,e.f))}function up(e,t,n,r){function o(u){return u.length?u.pop()+" ":""}function i(u,c,f,d,h,m){if(u!==f||c!==d){var w=h.push("translate(",null,t,null,n);m.push({i:w-4,x:At(u,f)},{i:w-2,x:At(c,d)})}else(f||d)&&h.push("translate("+f+t+d+n)}function s(u,c,f,d){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),d.push({i:f.push(o(f)+"rotate(",null,r)-2,x:At(u,c)})):c&&f.push(o(f)+"rotate("+c+r)}function l(u,c,f,d){u!==c?d.push({i:f.push(o(f)+"skewX(",null,r)-2,x:At(u,c)}):c&&f.push(o(f)+"skewX("+c+r)}function a(u,c,f,d,h,m){if(u!==f||c!==d){var w=h.push(o(h)+"scale(",null,",",null,")");m.push({i:w-4,x:At(u,f)},{i:w-2,x:At(c,d)})}else(f!==1||d!==1)&&h.push(o(h)+"scale("+f+","+d+")")}return function(u,c){var f=[],d=[];return u=e(u),c=e(c),i(u.translateX,u.translateY,c.translateX,c.translateY,f,d),s(u.rotate,c.rotate,f,d),l(u.skewX,c.skewX,f,d),a(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,d),u=c=null,function(h){for(var m=-1,w=d.length,E;++m<w;)f[(E=d[m]).i]=E.x(h);return f.join("")}}}var s2=up(o2,"px, ","px)","deg)"),l2=up(i2,", ",")",")"),a2=1e-12;function wf(e){return((e=Math.exp(e))+1/e)/2}function u2(e){return((e=Math.exp(e))-1/e)/2}function c2(e){return((e=Math.exp(2*e))-1)/(e+1)}const rs=function e(t,n,r){function o(i,s){var l=i[0],a=i[1],u=i[2],c=s[0],f=s[1],d=s[2],h=c-l,m=f-a,w=h*h+m*m,E,y;if(w<a2)y=Math.log(d/u)/t,E=function(T){return[l+T*h,a+T*m,u*Math.exp(t*T*y)]};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),S=Math.log(Math.sqrt(v*v+1)-v);y=(S-_)/t,E=function(T){var N=T*y,B=wf(_),b=u/(n*g)*(B*c2(t*N+_)-u2(_));return[l+b*h,a+b*m,u*B/wf(t*N+_)]}}return E.duration=y*1e3*t/Math.SQRT2,E}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 Tr=0,co=0,Jr=0,cp=1e3,_s,fo,Ss=0,Un=0,ol=0,Oo=typeof performance=="object"&&performance.now?performance:Date,fp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Bu(){return Un||(fp(f2),Un=Oo.now()+ol)}function f2(){Un=0}function Cs(){this._call=this._time=this._next=null}Cs.prototype=dp.prototype={constructor:Cs,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Bu():+n)+(t==null?0:+t),!this._next&&fo!==this&&(fo?fo._next=this:_s=this,fo=this),this._call=e,this._time=n,Ia()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ia())}};function dp(e,t,n){var r=new Cs;return r.restart(e,t,n),r}function d2(){Bu(),++Tr;for(var e=_s,t;e;)(t=Un-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Tr}function xf(){Un=(Ss=Oo.now())+ol,Tr=co=0;try{d2()}finally{Tr=0,p2(),Un=0}}function h2(){var e=Oo.now(),t=e-Ss;t>cp&&(ol-=t,Ss=e)}function p2(){for(var e,t=_s,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:_s=n);fo=e,Ia(r)}function Ia(e){if(!Tr){co&&(co=clearTimeout(co));var t=e-Un;t>24?(e<1/0&&(co=setTimeout(xf,e-Oo.now()-ol)),Jr&&(Jr=clearInterval(Jr))):(Jr||(Ss=Oo.now(),Jr=setInterval(h2,cp)),Tr=1,fp(xf))}}function Ef(e,t,n){var r=new Cs;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var g2=nl("start","end","cancel","interrupt"),m2=[],hp=0,_f=1,Pa=2,os=3,Sf=4,ba=5,is=6;function il(e,t,n,r,o,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;y2(e,n,{name:t,index:r,group:o,on:g2,tween:m2,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:hp})}function Uu(e,t){var n=Pt(e,t);if(n.state>hp)throw new Error("too late; already scheduled");return n}function Vt(e,t){var n=Pt(e,t);if(n.state>os)throw new Error("too late; already running");return n}function Pt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function y2(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=dp(i,0,n.time);function i(u){n.state=_f,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,f,d,h;if(n.state!==_f)return a();for(c in r)if(h=r[c],h.name===n.name){if(h.state===os)return Ef(s);h.state===Sf?(h.state=is,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[c]):+c<t&&(h.state=is,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[c])}if(Ef(function(){n.state===os&&(n.state=Sf,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=Pa,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Pa){for(n.state=os,o=new Array(d=n.tween.length),c=0,f=-1;c<d;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(o[++f]=h);o.length=f+1}}function l(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(a),n.state=ba,1),f=-1,d=o.length;++f<d;)o[f].call(e,c);n.state===ba&&(n.on.call("end",e,e.__data__,n.index,n.group),a())}function a(){n.state=is,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function ss(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>Pa&&r.state<ba,r.state=is,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}i&&delete e.__transition}}function v2(e){return this.each(function(){ss(this,e)})}function w2(e,t){var n,r;return function(){var o=Vt(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 x2(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var i=Vt(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 E2(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Pt(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?w2:x2)(n,e,t))}function Wu(e,t,n){var r=e._id;return e.each(function(){var o=Vt(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return Pt(o,r).value[t]}}function pp(e,t){var n;return(typeof t=="number"?At:t instanceof Bn?Es:(n=Bn(t))?(t=n,Es):lp)(e,t)}function _2(e){return function(){this.removeAttribute(e)}}function S2(e){return function(){this.removeAttributeNS(e.space,e.local)}}function C2(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 k2(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 N2(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 M2(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 T2(e,t){var n=rl(e),r=n==="transform"?l2:pp;return this.attrTween(e,typeof t=="function"?(n.local?M2:N2)(n,r,Wu(this,"attr."+e,t)):t==null?(n.local?S2:_2)(n):(n.local?k2:C2)(n,r,t))}function I2(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function P2(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function b2(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&P2(e,i)),n}return o._value=t,o}function L2(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&I2(e,i)),n}return o._value=t,o}function R2(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=rl(e);return this.tween(n,(r.local?b2:L2)(r,t))}function A2(e,t){return function(){Uu(this,e).delay=+t.apply(this,arguments)}}function O2(e,t){return t=+t,function(){Uu(this,e).delay=t}}function D2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?A2:O2)(t,e)):Pt(this.node(),t).delay}function z2(e,t){return function(){Vt(this,e).duration=+t.apply(this,arguments)}}function j2(e,t){return t=+t,function(){Vt(this,e).duration=t}}function $2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?z2:j2)(t,e)):Pt(this.node(),t).duration}function V2(e,t){if(typeof t!="function")throw new Error;return function(){Vt(this,e).ease=t}}function H2(e){var t=this._id;return arguments.length?this.each(V2(t,e)):Pt(this.node(),t).ease}function F2(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Vt(this,e).ease=n}}function B2(e){if(typeof e!="function")throw new Error;return this.each(F2(this._id,e))}function U2(e){typeof e!="function"&&(e=Wh(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 Qt(r,this._parents,this._name,this._id)}function W2(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],c=a.length,f=s[l]=new Array(c),d,h=0;h<c;++h)(d=a[h]||u[h])&&(f[h]=d);for(;l<r;++l)s[l]=t[l];return new Qt(s,this._parents,this._name,this._id)}function Y2(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 X2(e,t,n){var r,o,i=Y2(t)?Uu:Vt;return function(){var s=i(this,e),l=s.on;l!==r&&(o=(r=l).copy()).on(t,n),s.on=o}}function G2(e,t){var n=this._id;return arguments.length<2?Pt(this.node(),n).on.on(e):this.each(X2(n,e,t))}function Q2(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function K2(){return this.on("end.remove",Q2(this._id))}function Z2(e){var t=this._name,n=this._id;typeof e!="function"&&(e=$u(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),c,f,d=0;d<a;++d)(c=l[d])&&(f=e.call(c,c.__data__,d,l))&&("__data__"in c&&(f.__data__=c.__data__),u[d]=f,il(u[d],t,n,d,u,Pt(c,n)));return new Qt(i,this._parents,t,n)}function q2(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Uh(e));for(var r=this._groups,o=r.length,i=[],s=[],l=0;l<o;++l)for(var a=r[l],u=a.length,c,f=0;f<u;++f)if(c=a[f]){for(var d=e.call(c,c.__data__,f,a),h,m=Pt(c,n),w=0,E=d.length;w<E;++w)(h=d[w])&&il(h,t,n,w,d,m);i.push(d),s.push(c)}return new Qt(i,s,t,n)}var J2=ii.prototype.constructor;function ew(){return new J2(this._groups,this._parents)}function tw(e,t){var n,r,o;return function(){var i=Mr(this,e),s=(this.style.removeProperty(e),Mr(this,e));return i===s?null:i===n&&s===r?o:o=t(n=i,r=s)}}function gp(e){return function(){this.style.removeProperty(e)}}function nw(e,t,n){var r,o=n+"",i;return function(){var s=Mr(this,e);return s===o?null:s===r?i:i=t(r=s,n)}}function rw(e,t,n){var r,o,i;return function(){var s=Mr(this,e),l=n(this),a=l+"";return l==null&&(a=l=(this.style.removeProperty(e),Mr(this,e))),s===a?null:s===r&&a===o?i:(o=a,i=t(r=s,l))}}function ow(e,t){var n,r,o,i="style."+t,s="end."+i,l;return function(){var a=Vt(this,e),u=a.on,c=a.value[i]==null?l||(l=gp(t)):void 0;(u!==n||o!==c)&&(r=(n=u).copy()).on(s,o=c),a.on=r}}function iw(e,t,n){var r=(e+="")=="transform"?s2:pp;return t==null?this.styleTween(e,tw(e,r)).on("end.style."+e,gp(e)):typeof t=="function"?this.styleTween(e,rw(e,r,Wu(this,"style."+e,t))).each(ow(this._id,e)):this.styleTween(e,nw(e,r,t),n).on("end.style."+e,null)}function sw(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function lw(e,t,n){var r,o;function i(){var s=t.apply(this,arguments);return s!==o&&(r=(o=s)&&sw(e,s,n)),r}return i._value=t,i}function aw(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,lw(e,t,n??""))}function uw(e){return function(){this.textContent=e}}function cw(e){return function(){var t=e(this);this.textContent=t??""}}function fw(e){return this.tween("text",typeof e=="function"?cw(Wu(this,"text",e)):uw(e==null?"":e+""))}function dw(e){return function(t){this.textContent=e.call(this,t)}}function hw(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&dw(o)),t}return r._value=e,r}function pw(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,hw(e))}function gw(){for(var e=this._name,t=this._id,n=mp(),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 c=Pt(a,t);il(a,e,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Qt(r,this._parents,e,n)}function mw(){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=Vt(this,r),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(a)),u.on=t}),o===0&&i()})}var yw=0;function Qt(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function mp(){return++yw}var Ht=ii.prototype;Qt.prototype={constructor:Qt,select:Z2,selectAll:q2,selectChild:Ht.selectChild,selectChildren:Ht.selectChildren,filter:U2,merge:W2,selection:ew,transition:gw,call:Ht.call,nodes:Ht.nodes,node:Ht.node,size:Ht.size,empty:Ht.empty,each:Ht.each,on:G2,attr:T2,attrTween:R2,style:iw,styleTween:aw,text:fw,textTween:pw,remove:K2,tween:E2,delay:D2,duration:$2,ease:H2,easeVarying:B2,end:mw,[Symbol.iterator]:Ht[Symbol.iterator]};function vw(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var ww={time:null,delay:0,duration:250,ease:vw};function xw(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 Ew(e){var t,n;e instanceof Qt?(t=e._id,e=e._name):(t=mp(),(n=ww).time=Bu(),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])&&il(a,e,t,u,s,n||xw(a,t));return new Qt(r,this._parents,e,t)}ii.prototype.interrupt=v2;ii.prototype.transition=Ew;const Mi=e=>()=>e;function _w(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 Ut(e,t,n){this.k=e,this.x=t,this.y=n}Ut.prototype={constructor:Ut,scale:function(e){return e===1?this:new Ut(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ut(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 sl=new Ut(1,0,0);yp.prototype=Ut.prototype;function yp(e){for(;!e.__zoom;)if(!(e=e.parentNode))return sl;return e.__zoom}function Fl(e){e.stopImmediatePropagation()}function eo(e){e.preventDefault(),e.stopImmediatePropagation()}function Sw(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Cw(){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 Cf(){return this.__zoom||sl}function kw(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Nw(){return navigator.maxTouchPoints||"ontouchstart"in this}function Mw(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 vp(){var e=Sw,t=Cw,n=Mw,r=kw,o=Nw,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,a=rs,u=nl("start","zoom","end"),c,f,d,h=500,m=150,w=0,E=10;function y(x){x.property("__zoom",Cf).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",B).on("dblclick.zoom",b).filter(o).on("touchstart.zoom",P).on("touchmove.zoom",j).on("touchend.zoom touchcancel.zoom",H).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(x,D,I,A){var C=x.selection?x.selection():x;C.property("__zoom",Cf),x!==C?_(x,D,I,A):C.interrupt().each(function(){S(this,arguments).event(A).start().zoom(null,typeof D=="function"?D.apply(this,arguments):D).end()})},y.scaleBy=function(x,D,I,A){y.scaleTo(x,function(){var C=this.__zoom.k,M=typeof D=="function"?D.apply(this,arguments):D;return C*M},I,A)},y.scaleTo=function(x,D,I,A){y.transform(x,function(){var C=t.apply(this,arguments),M=this.__zoom,z=I==null?v(C):typeof I=="function"?I.apply(this,arguments):I,O=M.invert(z),L=typeof D=="function"?D.apply(this,arguments):D;return n(p(g(M,L),z,O),C,s)},I,A)},y.translateBy=function(x,D,I,A){y.transform(x,function(){return n(this.__zoom.translate(typeof D=="function"?D.apply(this,arguments):D,typeof I=="function"?I.apply(this,arguments):I),t.apply(this,arguments),s)},null,A)},y.translateTo=function(x,D,I,A,C){y.transform(x,function(){var M=t.apply(this,arguments),z=this.__zoom,O=A==null?v(M):typeof A=="function"?A.apply(this,arguments):A;return n(sl.translate(O[0],O[1]).scale(z.k).translate(typeof D=="function"?-D.apply(this,arguments):-D,typeof I=="function"?-I.apply(this,arguments):-I),M,s)},A,C)};function g(x,D){return D=Math.max(i[0],Math.min(i[1],D)),D===x.k?x:new Ut(D,x.x,x.y)}function p(x,D,I){var A=D[0]-I[0]*x.k,C=D[1]-I[1]*x.k;return A===x.x&&C===x.y?x:new Ut(x.k,A,C)}function v(x){return[(+x[0][0]+ +x[1][0])/2,(+x[0][1]+ +x[1][1])/2]}function _(x,D,I,A){x.on("start.zoom",function(){S(this,arguments).event(A).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).event(A).end()}).tween("zoom",function(){var C=this,M=arguments,z=S(C,M).event(A),O=t.apply(C,M),L=I==null?v(O):typeof I=="function"?I.apply(C,M):I,Y=Math.max(O[1][0]-O[0][0],O[1][1]-O[0][1]),R=C.__zoom,k=typeof D=="function"?D.apply(C,M):D,$=a(R.invert(L).concat(Y/R.k),k.invert(L).concat(Y/k.k));return function(U){if(U===1)U=k;else{var W=$(U),X=Y/W[2];U=new Ut(X,L[0]-W[0]*X,L[1]-W[1]*X)}z.zoom(null,U)}})}function S(x,D,I){return!I&&x.__zooming||new T(x,D)}function T(x,D){this.that=x,this.args=D,this.active=0,this.sourceEvent=null,this.extent=t.apply(x,D),this.taps=0}T.prototype={event:function(x){return x&&(this.sourceEvent=x),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(x,D){return this.mouse&&x!=="mouse"&&(this.mouse[1]=D.invert(this.mouse[0])),this.touch0&&x!=="touch"&&(this.touch0[1]=D.invert(this.touch0[0])),this.touch1&&x!=="touch"&&(this.touch1[1]=D.invert(this.touch1[0])),this.that.__zoom=D,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(x){var D=tt(this.that).datum();u.call(x,this.that,new _w(x,{sourceEvent:this.sourceEvent,target:y,transform:this.that.__zoom,dispatch:u}),D)}};function N(x,...D){if(!e.apply(this,arguments))return;var I=S(this,D).event(x),A=this.__zoom,C=Math.max(i[0],Math.min(i[1],A.k*Math.pow(2,r.apply(this,arguments)))),M=xt(x);if(I.wheel)(I.mouse[0][0]!==M[0]||I.mouse[0][1]!==M[1])&&(I.mouse[1]=A.invert(I.mouse[0]=M)),clearTimeout(I.wheel);else{if(A.k===C)return;I.mouse=[M,A.invert(M)],ss(this),I.start()}eo(x),I.wheel=setTimeout(z,m),I.zoom("mouse",n(p(g(A,C),I.mouse[0],I.mouse[1]),I.extent,s));function z(){I.wheel=null,I.end()}}function B(x,...D){if(d||!e.apply(this,arguments))return;var I=x.currentTarget,A=S(this,D,!0).event(x),C=tt(x.view).on("mousemove.zoom",L,!0).on("mouseup.zoom",Y,!0),M=xt(x,I),z=x.clientX,O=x.clientY;tp(x.view),Fl(x),A.mouse=[M,this.__zoom.invert(M)],ss(this),A.start();function L(R){if(eo(R),!A.moved){var k=R.clientX-z,$=R.clientY-O;A.moved=k*k+$*$>w}A.event(R).zoom("mouse",n(p(A.that.__zoom,A.mouse[0]=xt(R,I),A.mouse[1]),A.extent,s))}function Y(R){C.on("mousemove.zoom mouseup.zoom",null),np(R.view,A.moved),eo(R),A.event(R).end()}}function b(x,...D){if(e.apply(this,arguments)){var I=this.__zoom,A=xt(x.changedTouches?x.changedTouches[0]:x,this),C=I.invert(A),M=I.k*(x.shiftKey?.5:2),z=n(p(g(I,M),A,C),t.apply(this,D),s);eo(x),l>0?tt(this).transition().duration(l).call(_,z,A,x):tt(this).call(y.transform,z,A,x)}}function P(x,...D){if(e.apply(this,arguments)){var I=x.touches,A=I.length,C=S(this,D,x.changedTouches.length===A).event(x),M,z,O,L;for(Fl(x),z=0;z<A;++z)O=I[z],L=xt(O,this),L=[L,this.__zoom.invert(L),O.identifier],C.touch0?!C.touch1&&C.touch0[2]!==L[2]&&(C.touch1=L,C.taps=0):(C.touch0=L,M=!0,C.taps=1+!!c);c&&(c=clearTimeout(c)),M&&(C.taps<2&&(f=L[0],c=setTimeout(function(){c=null},h)),ss(this),C.start())}}function j(x,...D){if(this.__zooming){var I=S(this,D).event(x),A=x.changedTouches,C=A.length,M,z,O,L;for(eo(x),M=0;M<C;++M)z=A[M],O=xt(z,this),I.touch0&&I.touch0[2]===z.identifier?I.touch0[0]=O:I.touch1&&I.touch1[2]===z.identifier&&(I.touch1[0]=O);if(z=I.that.__zoom,I.touch1){var Y=I.touch0[0],R=I.touch0[1],k=I.touch1[0],$=I.touch1[1],U=(U=k[0]-Y[0])*U+(U=k[1]-Y[1])*U,W=(W=$[0]-R[0])*W+(W=$[1]-R[1])*W;z=g(z,Math.sqrt(U/W)),O=[(Y[0]+k[0])/2,(Y[1]+k[1])/2],L=[(R[0]+$[0])/2,(R[1]+$[1])/2]}else if(I.touch0)O=I.touch0[0],L=I.touch0[1];else return;I.zoom("touch",n(p(z,O,L),I.extent,s))}}function H(x,...D){if(this.__zooming){var I=S(this,D).event(x),A=x.changedTouches,C=A.length,M,z;for(Fl(x),d&&clearTimeout(d),d=setTimeout(function(){d=null},h),M=0;M<C;++M)z=A[M],I.touch0&&I.touch0[2]===z.identifier?delete I.touch0:I.touch1&&I.touch1[2]===z.identifier&&delete I.touch1;if(I.touch1&&!I.touch0&&(I.touch0=I.touch1,delete I.touch1),I.touch0)I.touch0[1]=this.__zoom.invert(I.touch0[0]);else if(I.end(),I.taps===2&&(z=xt(z,this),Math.hypot(f[0]-z[0],f[1]-z[1])<E)){var O=tt(this).on("dblclick.zoom");O&&O.apply(this,arguments)}}}return y.wheelDelta=function(x){return arguments.length?(r=typeof x=="function"?x:Mi(+x),y):r},y.filter=function(x){return arguments.length?(e=typeof x=="function"?x:Mi(!!x),y):e},y.touchable=function(x){return arguments.length?(o=typeof x=="function"?x:Mi(!!x),y):o},y.extent=function(x){return arguments.length?(t=typeof x=="function"?x:Mi([[+x[0][0],+x[0][1]],[+x[1][0],+x[1][1]]]),y):t},y.scaleExtent=function(x){return arguments.length?(i[0]=+x[0],i[1]=+x[1],y):[i[0],i[1]]},y.translateExtent=function(x){return arguments.length?(s[0][0]=+x[0][0],s[1][0]=+x[1][0],s[0][1]=+x[0][1],s[1][1]=+x[1][1],y):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},y.constrain=function(x){return arguments.length?(n=x,y):n},y.duration=function(x){return arguments.length?(l=+x,y):l},y.interpolate=function(x){return arguments.length?(a=x,y):a},y.on=function(){var x=u.on.apply(u,arguments);return x===u?y:x},y.clickDistance=function(x){return arguments.length?(w=(x=+x)*x,y):Math.sqrt(w)},y.tapDistance=function(x){return arguments.length?(E=+x,y):E},y}const $t={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."},Do=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],wp=["Enter"," ","Escape"],xp={"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 Ir;(function(e){e.Strict="strict",e.Loose="loose"})(Ir||(Ir={}));var Vn;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Vn||(Vn={}));var zo;(function(e){e.Partial="partial",e.Full="full"})(zo||(zo={}));const Ep={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var cn;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(cn||(cn={}));var ks;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(ks||(ks={}));var te;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(te||(te={}));const kf={[te.Left]:te.Right,[te.Right]:te.Left,[te.Top]:te.Bottom,[te.Bottom]:te.Top};function _p(e){return e===null?null:e?"valid":"invalid"}const Sp=e=>"id"in e&&"source"in e&&"target"in e,Tw=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Yu=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),li=(e,t=[0,0])=>{const{width:n,height:r}=en(e),o=e.origin??t,i=n*o[0],s=r*o[1];return{x:e.position.x-i,y:e.position.y-s}},Iw=(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):Yu(o)?o:t.nodeLookup.get(o.id));const l=s?Ns(s,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return ll(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return al(n)},ai=(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=ll(n,Ns(o)),r=!0)}),r?al(n):{x:0,y:0,width:0,height:0}},Xu=(e,t,[n,r,o]=[0,0,1],i=!1,s=!1)=>{const l={...ci(t,[n,r,o]),width:t.width/o,height:t.height/o},a=[];for(const u of e.values()){const{measured:c,selectable:f=!0,hidden:d=!1}=u;if(s&&!f||d)continue;const h=c.width??u.width??u.initialWidth??null,m=c.height??u.height??u.initialHeight??null,w=jo(l,br(u)),E=(h??0)*(m??0),y=i&&w>0;(!u.internals.handleBounds||y||w>=E||u.dragging)&&a.push(u)}return a},Pw=(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 bw(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 Lw({nodes:e,width:t,height:n,panZoom:r,minZoom:o,maxZoom:i},s){if(e.size===0)return Promise.resolve(!0);const l=bw(e,s),a=ai(l),u=Gu(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 Cp({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},c=s.origin??r;let f=s.extent||o;if(s.extent==="parent"&&!s.expandParent)if(!l)i==null||i("005",$t.error005());else{const h=l.measured.width,m=l.measured.height;h&&m&&(f=[[a,u],[a+h,u+m]])}else l&&Lr(s.extent)&&(f=[[s.extent[0][0]+a,s.extent[0][1]+u],[s.extent[1][0]+a,s.extent[1][1]+u]]);const d=Lr(f)?Wn(t,f,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&(i==null||i("015",$t.error015())),{position:{x:d.x-a+(s.measured.width??0)*c[0],y:d.y-u+(s.measured.height??0)*c[1]},positionAbsolute:d}}async function Rw({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),m=!h&&d.parentId&&s.find(w=>w.id===d.parentId);(h||m)&&s.push(d)}const l=new Set(t.map(d=>d.id)),a=r.filter(d=>d.deletable!==!1),c=Pw(s,a);for(const d of a)l.has(d.id)&&!c.find(m=>m.id===d.id)&&c.push(d);if(!o)return{edges:c,nodes:s};const f=await o({nodes:s,edges:c});return typeof f=="boolean"?f?{edges:c,nodes:s}:{edges:[],nodes:[]}:f}const Pr=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Wn=(e={x:0,y:0},t,n)=>({x:Pr(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:Pr(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function kp(e,t,n){const{width:r,height:o}=en(n),{x:i,y:s}=n.internals.positionAbsolute;return Wn(e,[[i,s],[i+r,s+o]],t)}const Nf=(e,t,n)=>e<t?Pr(Math.abs(e-t),1,t)/t:e>n?-Pr(Math.abs(e-n),1,t)/t:0,Np=(e,t,n=15,r=40)=>{const o=Nf(e.x,r,t.width-r)*n,i=Nf(e.y,r,t.height-r)*n;return[o,i]},ll=(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)}),La=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),al=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),br=(e,t=[0,0])=>{var o,i;const{x:n,y:r}=Yu(e)?e.internals.positionAbsolute:li(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}},Ns=(e,t=[0,0])=>{var o,i;const{x:n,y:r}=Yu(e)?e.internals.positionAbsolute:li(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)}},Mp=(e,t)=>al(ll(La(e),La(t))),jo=(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)},Mf=e=>Ct(e.width)&&Ct(e.height)&&Ct(e.x)&&Ct(e.y),Ct=e=>!isNaN(e)&&isFinite(e),Aw=(e,t)=>{},ui=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),ci=({x:e,y:t},[n,r,o],i=!1,s=[1,1])=>{const l={x:(e-n)/o,y:(t-r)/o};return i?ui(l,s):l},Ms=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r});function rr(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 Ow(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=rr(e,n),o=rr(e,t);return{top:r,right:o,bottom:r,left:o,x:o*2,y:r*2}}if(typeof e=="object"){const r=rr(e.top??e.y??0,n),o=rr(e.bottom??e.y??0,n),i=rr(e.left??e.x??0,t),s=rr(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 Dw(e,t,n,r,o,i){const{x:s,y:l}=Ms(e,[t,n,r]),{x:a,y:u}=Ms({x:e.x+e.width,y:e.y+e.height},[t,n,r]),c=o-a,f=i-u;return{left:Math.floor(s),top:Math.floor(l),right:Math.floor(c),bottom:Math.floor(f)}}const Gu=(e,t,n,r,o,i)=>{const s=Ow(i,t,n),l=(t-s.x)/e.width,a=(n-s.y)/e.height,u=Math.min(l,a),c=Pr(u,r,o),f=e.x+e.width/2,d=e.y+e.height/2,h=t/2-f*c,m=n/2-d*c,w=Dw(e,h,m,c,t,n),E={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-E.left+E.right,y:m-E.top+E.bottom,zoom:c}},$o=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Lr(e){return e!=null&&e!=="parent"}function en(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 Tp(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 Ip(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 Tf(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function zw(){let e,t;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}function jw(e){return{...xp,...e||{}}}function wo(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:o}){const{x:i,y:s}=kt(e),l=ci({x:i-((o==null?void 0:o.left)??0),y:s-((o==null?void 0:o.top)??0)},r),{x:a,y:u}=n?ui(l,t):l;return{xSnapped:a,ySnapped:u,...l}}const Qu=e=>({width:e.offsetWidth,height:e.offsetHeight}),Pp=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},$w=["INPUT","SELECT","TEXTAREA"];function bp(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:$w.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Lp=e=>"clientX"in e,kt=(e,t)=>{var i,s;const n=Lp(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)}},If=(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,...Qu(s)}})};function Rp({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,c=Math.abs(a-e),f=Math.abs(u-t);return[a,u,c,f]}function Ti(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Pf({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case te.Left:return[t-Ti(t-r,i),n];case te.Right:return[t+Ti(r-t,i),n];case te.Top:return[t,n-Ti(n-o,i)];case te.Bottom:return[t,n+Ti(o-n,i)]}}function Ap({sourceX:e,sourceY:t,sourcePosition:n=te.Bottom,targetX:r,targetY:o,targetPosition:i=te.Top,curvature:s=.25}){const[l,a]=Pf({pos:n,x1:e,y1:t,x2:r,y2:o,c:s}),[u,c]=Pf({pos:i,x1:r,y1:o,x2:e,y2:t,c:s}),[f,d,h,m]=Rp({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:l,sourceControlY:a,targetControlX:u,targetControlY:c});return[`M${e},${t} C${l},${a} ${u},${c} ${r},${o}`,f,d,h,m]}function Op({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 Vw({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 Hw({sourceNode:e,targetNode:t,width:n,height:r,transform:o}){const i=ll(Ns(e),Ns(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 jo(s,al(i))>0}const Fw=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,Bw=(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)),Uw=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||Fw;let o;return Sp(e)?o={...e}:o={...e,id:r(e)},Bw(o,t)?t:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,t.concat(o))};function Dp({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,i,s,l]=Op({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,s,l]}const bf={[te.Left]:{x:-1,y:0},[te.Right]:{x:1,y:0},[te.Top]:{x:0,y:-1},[te.Bottom]:{x:0,y:1}},Ww=({source:e,sourcePosition:t=te.Bottom,target:n})=>t===te.Left||t===te.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},Lf=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Yw({source:e,sourcePosition:t=te.Bottom,target:n,targetPosition:r=te.Top,center:o,offset:i,stepPosition:s}){const l=bf[t],a=bf[r],u={x:e.x+l.x*i,y:e.y+l.y*i},c={x:n.x+a.x*i,y:n.y+a.y*i},f=Ww({source:u,sourcePosition:t,target:c}),d=f.x!==0?"x":"y",h=f[d];let m=[],w,E;const y={x:0,y:0},g={x:0,y:0},[,,p,v]=Op({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+(c.x-u.x)*s,E=o.y??(u.y+c.y)/2):(w=o.x??(u.x+c.x)/2,E=o.y??u.y+(c.y-u.y)*s);const N=[{x:w,y:u.y},{x:w,y:c.y}],B=[{x:u.x,y:E},{x:c.x,y:E}];l[d]===h?m=d==="x"?N:B:m=d==="x"?B:N}else{const N=[{x:u.x,y:c.y}],B=[{x:c.x,y:u.y}];if(d==="x"?m=l.x===h?B:N:m=l.y===h?N:B,t===r){const x=Math.abs(e[d]-n[d]);if(x<=i){const D=Math.min(i-1,i-x);l[d]===h?y[d]=(u[d]>e[d]?-1:1)*D:g[d]=(c[d]>n[d]?-1:1)*D}}if(t!==r){const x=d==="x"?"y":"x",D=l[d]===a[x],I=u[x]>c[x],A=u[x]<c[x];(l[d]===1&&(!D&&I||D&&A)||l[d]!==1&&(!D&&A||D&&I))&&(m=d==="x"?N:B)}const b={x:u.x+y.x,y:u.y+y.y},P={x:c.x+g.x,y:c.y+g.y},j=Math.max(Math.abs(b.x-m[0].x),Math.abs(P.x-m[0].x)),H=Math.max(Math.abs(b.y-m[0].y),Math.abs(P.y-m[0].y));j>=H?(w=(b.x+P.x)/2,E=m[0].y):(w=m[0].x,E=(b.y+P.y)/2)}const _={x:u.x+y.x,y:u.y+y.y},S={x:c.x+g.x,y:c.y+g.y};return[[e,..._.x!==m[0].x||_.y!==m[0].y?[_]:[],...m,...S.x!==m[m.length-1].x||S.y!==m[m.length-1].y?[S]:[],n],w,E,p,v]}function Xw(e,t,n,r){const o=Math.min(Lf(e,t)/2,Lf(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,c=e.y<n.y?1:-1;return`L ${i+o*u},${s}Q ${i},${s} ${i},${s+o*c}`}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 Ts({sourceX:e,sourceY:t,sourcePosition:n=te.Bottom,targetX:r,targetY:o,targetPosition:i=te.Top,borderRadius:s=5,centerX:l,centerY:a,offset:u=20,stepPosition:c=.5}){const[f,d,h,m,w]=Yw({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:i,center:{x:l,y:a},offset:u,stepPosition:c});let E=`M${f[0].x} ${f[0].y}`;for(let y=1;y<f.length-1;y++)E+=Xw(f[y-1],f[y],f[y+1],s);return E+=`L${f[f.length-1].x} ${f[f.length-1].y}`,[E,d,h,m,w]}function Rf(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function Gw(e){var f;const{sourceNode:t,targetNode:n}=e;if(!Rf(t)||!Rf(n))return null;const r=t.internals.handleBounds||Af(t.handles),o=n.internals.handleBounds||Af(n.handles),i=Of((r==null?void 0:r.source)??[],e.sourceHandle),s=Of(e.connectionMode===Ir.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(f=e.onError)==null||f.call(e,"008",$t.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(i==null?void 0:i.position)||te.Bottom,a=(s==null?void 0:s.position)||te.Top,u=Yn(t,i,l),c=Yn(n,s,a);return{sourceX:u.x,sourceY:u.y,targetX:c.x,targetY:c.y,sourcePosition:l,targetPosition:a}}function Af(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 Yn(e,t,n=te.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??en(e);if(r)return{x:o+s/2,y:i+l/2};switch((t==null?void 0:t.position)??n){case te.Top:return{x:o+s/2,y:i};case te.Right:return{x:o+s,y:i+l/2};case te.Bottom:return{x:o+s/2,y:i+l};case te.Left:return{x:o,y:i+l/2}}}function Of(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Ra(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function Qw(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=Ra(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 zp=1e3,Kw=10,Ku={nodeOrigin:[0,0],nodeExtent:Do,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},Zw={...Ku,checkEquality:!0};function Zu(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function qw(e,t,n){const r=Zu(Ku,n);for(const o of e.values())if(o.parentId)Ju(o,e,t,r);else{const i=li(o,r.nodeOrigin),s=Lr(o.extent)?o.extent:r.nodeExtent,l=Wn(i,s,en(o));o.internals.positionAbsolute=l}}function Jw(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 qu(e){return e==="manual"}function Aa(e,t,n,r={}){var c,f;const o=Zu(Zw,r),i={i:0},s=new Map(t),l=o!=null&&o.elevateNodesOnSelect&&!qu(o.zIndexMode)?zp: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 m=li(d,o.nodeOrigin),w=Lr(d.extent)?d.extent:o.nodeExtent,E=Wn(m,w,en(d));h={...o.defaults,...d,measured:{width:(c=d.measured)==null?void 0:c.width,height:(f=d.measured)==null?void 0:f.height},internals:{positionAbsolute:E,handleBounds:Jw(d,h),z:jp(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&&Ju(h,t,n,r,i),u||(u=d.selected??!1)}return{nodesInitialized:a,hasSelectedNodes:u}}function ex(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 Ju(e,t,n,r,o){const{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:l,zIndexMode:a}=Zu(Ku,r),u=e.parentId,c=t.get(u);if(!c){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}ex(e,n),o&&!c.parentId&&c.internals.rootParentIndex===void 0&&a==="auto"&&(c.internals.rootParentIndex=++o.i,c.internals.z=c.internals.z+o.i*Kw),o&&c.internals.rootParentIndex!==void 0&&(o.i=c.internals.rootParentIndex);const f=i&&!qu(a)?zp:0,{x:d,y:h,z:m}=tx(e,c,s,l,f,a),{positionAbsolute:w}=e.internals,E=d!==w.x||h!==w.y;(E||m!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:E?{x:d,y:h}:w,z:m}})}function jp(e,t,n){const r=Ct(e.zIndex)?e.zIndex:0;return qu(n)?r:r+(e.selected?t:0)}function tx(e,t,n,r,o,i){const{x:s,y:l}=t.internals.positionAbsolute,a=en(e),u=li(e,n),c=Lr(e.extent)?Wn(u,e.extent,a):u;let f=Wn({x:s+c.x,y:l+c.y},r,a);e.extent==="parent"&&(f=kp(f,a,t));const d=jp(e,o,i),h=t.internals.z??0;return{x:f.x,y:f.y,z:h>=d?h+1:d}}function ec(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)??br(a),c=Mp(u,l.rect);i.set(l.parentId,{expandedRect:c,parent:a})}return i.size>0&&i.forEach(({expandedRect:l,parent:a},u)=>{var p;const c=a.internals.positionAbsolute,f=en(a),d=a.origin??r,h=l.x<c.x?Math.round(Math.abs(c.x-l.x)):0,m=l.y<c.y?Math.round(Math.abs(c.y-l.y)):0,w=Math.max(f.width,Math.round(l.width)),E=Math.max(f.height,Math.round(l.height)),y=(w-f.width)*d[0],g=(E-f.height)*d[1];(h>0||m>0||y||g)&&(o.push({id:u,type:"position",position:{x:a.position.x-h+y,y:a.position.y-m+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+m}})})),(f.width<l.width||f.height<l.height||h||m)&&o.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:w+(h?d[0]*h-y:0),height:E+(m?d[1]*m-g:0)}})}),o}function nx(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=[],c=window.getComputedStyle(l),{m22:f}=new window.DOMMatrixReadOnly(c.transform),d=[];for(const h of e.values()){const m=t.get(h.id);if(!m)continue;if(m.hidden){t.set(m.id,{...m,internals:{...m.internals,handleBounds:void 0}}),a=!0;continue}const w=Qu(h.nodeElement),E=m.measured.width!==w.width||m.measured.height!==w.height;if(!!(w.width&&w.height&&(E||!m.internals.handleBounds||h.force))){const g=h.nodeElement.getBoundingClientRect(),p=Lr(m.extent)?m.extent:i;let{positionAbsolute:v}=m.internals;m.parentId&&m.extent==="parent"?v=kp(v,w,t.get(m.parentId)):p&&(v=Wn(v,p,w));const _={...m,measured:w,internals:{...m.internals,positionAbsolute:v,handleBounds:{source:If("source",h.nodeElement,g,f,m.id),target:If("target",h.nodeElement,g,f,m.id)}}};t.set(m.id,_),m.parentId&&Ju(_,t,n,{nodeOrigin:o,zIndexMode:s}),a=!0,E&&(u.push({id:m.id,type:"dimensions",dimensions:w}),m.expandParent&&m.parentId&&d.push({id:m.id,parentId:m.parentId,rect:br(_,o)}))}}if(d.length>0){const h=ec(d,t,n,o);u.push(...h)}return{changes:u,updatedInternals:a}}async function rx({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 Df(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 $p(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}`,c=`${i}-${l}--${o}-${s}`;Df("source",a,c,e,o,s),Df("target",a,u,e,i,l),t.set(r.id,r)}}function Vp(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Vp(n,t):!1}function zf(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 ox(e,t,n,r){const o=new Map;for(const[i,s]of e)if((s.selected||s.id===r)&&(!s.parentId||!Vp(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 Bl({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var s,l,a;const o=[];for(const[u,c]of t){const f=(s=n.get(u))==null?void 0:s.internals.userNode;f&&o.push({...f,position:c.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 ix({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=ui(i,t);return{x:s.x-i.x,y:s.y-i.y}}function sx({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},c=null,f=!1,d=null,h=!1,m=!1,w=null;function E({noDragClassName:g,handleSelector:p,domNode:v,isSelectable:_,nodeId:S,nodeClickDistance:T=0}){d=tt(v);function N({x:j,y:H}){const{nodeLookup:x,nodeExtent:D,snapGrid:I,snapToGrid:A,nodeOrigin:C,onNodeDrag:M,onSelectionDrag:z,onError:O,updateNodePositions:L}=t();i={x:j,y:H};let Y=!1;const R=l.size>1,k=R&&D?La(ai(l)):null,$=R&&A?ix({dragItems:l,snapGrid:I,x:j,y:H}):null;for(const[U,W]of l){if(!x.has(U))continue;let X={x:j-W.distance.x,y:H-W.distance.y};A&&(X=$?{x:Math.round(X.x+$.x),y:Math.round(X.y+$.y)}:ui(X,I));let G=null;if(R&&D&&!W.extent&&k){const{positionAbsolute:ee}=W.internals,re=ee.x-k.x+D[0][0],ie=ee.x+W.measured.width-k.x2+D[1][0],se=ee.y-k.y+D[0][1],Se=ee.y+W.measured.height-k.y2+D[1][1];G=[[re,se],[ie,Se]]}const{position:Q,positionAbsolute:Z}=Cp({nodeId:U,nextPosition:X,nodeLookup:x,nodeExtent:G||D,nodeOrigin:C,onError:O});Y=Y||W.position.x!==Q.x||W.position.y!==Q.y,W.position=Q,W.internals.positionAbsolute=Z}if(m=m||Y,!!Y&&(L(l,!0),w&&(r||M||!S&&z))){const[U,W]=Bl({nodeId:S,dragItems:l,nodeLookup:x});r==null||r(w,l,U,W),M==null||M(w,U,W),S||z==null||z(w,W)}}async function B(){if(!c)return;const{transform:j,panBy:H,autoPanSpeed:x,autoPanOnNodeDrag:D}=t();if(!D){a=!1,cancelAnimationFrame(s);return}const[I,A]=Np(u,c,x);(I!==0||A!==0)&&(i.x=(i.x??0)-I/j[2],i.y=(i.y??0)-A/j[2],await H({x:I,y:A})&&N(i)),s=requestAnimationFrame(B)}function b(j){var R;const{nodeLookup:H,multiSelectionActive:x,nodesDraggable:D,transform:I,snapGrid:A,snapToGrid:C,selectNodesOnDrag:M,onNodeDragStart:z,onSelectionDragStart:O,unselectNodesAndEdges:L}=t();f=!0,(!M||!_)&&!x&&S&&((R=H.get(S))!=null&&R.selected||L()),_&&M&&S&&(e==null||e(S));const Y=wo(j.sourceEvent,{transform:I,snapGrid:A,snapToGrid:C,containerBounds:c});if(i=Y,l=ox(H,D,Y,S),l.size>0&&(n||z||!S&&O)){const[k,$]=Bl({nodeId:S,dragItems:l,nodeLookup:H});n==null||n(j.sourceEvent,l,k,$),z==null||z(j.sourceEvent,k,$),S||O==null||O(j.sourceEvent,$)}}const P=rp().clickDistance(T).on("start",j=>{const{domNode:H,nodeDragThreshold:x,transform:D,snapGrid:I,snapToGrid:A}=t();c=(H==null?void 0:H.getBoundingClientRect())||null,h=!1,m=!1,w=j.sourceEvent,x===0&&b(j),i=wo(j.sourceEvent,{transform:D,snapGrid:I,snapToGrid:A,containerBounds:c}),u=kt(j.sourceEvent,c)}).on("drag",j=>{const{autoPanOnNodeDrag:H,transform:x,snapGrid:D,snapToGrid:I,nodeDragThreshold:A,nodeLookup:C}=t(),M=wo(j.sourceEvent,{transform:x,snapGrid:D,snapToGrid:I,containerBounds:c});if(w=j.sourceEvent,(j.sourceEvent.type==="touchmove"&&j.sourceEvent.touches.length>1||S&&!C.has(S))&&(h=!0),!h){if(!a&&H&&f&&(a=!0,B()),!f){const z=kt(j.sourceEvent,c),O=z.x-u.x,L=z.y-u.y;Math.sqrt(O*O+L*L)>A&&b(j)}(i.x!==M.xSnapped||i.y!==M.ySnapped)&&l&&f&&(u=kt(j.sourceEvent,c),N(M))}}).on("end",j=>{if(!(!f||h)&&(a=!1,f=!1,cancelAnimationFrame(s),l.size>0)){const{nodeLookup:H,updateNodePositions:x,onNodeDragStop:D,onSelectionDragStop:I}=t();if(m&&(x(l,!1),m=!1),o||D||!S&&I){const[A,C]=Bl({nodeId:S,dragItems:l,nodeLookup:H,dragging:!1});o==null||o(j.sourceEvent,l,A,C),D==null||D(j.sourceEvent,A,C),S||I==null||I(j.sourceEvent,C)}}}).filter(j=>{const H=j.target;return!j.button&&(!g||!zf(H,`.${g}`,v))&&(!p||zf(H,p,v))});d.call(P)}function y(){d==null||d.on(".drag",null)}return{update:E,destroy:y}}function lx(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())jo(o,br(i))>0&&r.push(i);return r}const ax=250;function ux(e,t,n,r){var l,a;let o=[],i=1/0;const s=lx(e,n,t+ax);for(const u of s){const c=[...((l=u.internals.handleBounds)==null?void 0:l.source)??[],...((a=u.internals.handleBounds)==null?void 0:a.target)??[]];for(const f of c){if(r.nodeId===f.nodeId&&r.type===f.type&&r.id===f.id)continue;const{x:d,y:h}=Yn(u,f,f.position,!0),m=Math.sqrt(Math.pow(d-e.x,2)+Math.pow(h-e.y,2));m>t||(m<i?(o=[{...f,x:d,y:h}],i=m):m===i&&o.push({...f,x:d,y:h}))}}if(!o.length)return null;if(o.length>1){const u=r.type==="source"?"target":"source";return o.find(c=>c.type===u)??o[0]}return o[0]}function Hp(e,t,n,r,o,i=!1){var u,c,f;const s=r.get(e);if(!s)return null;const l=o==="strict"?(u=s.internals.handleBounds)==null?void 0:u[t]:[...((c=s.internals.handleBounds)==null?void 0:c.source)??[],...((f=s.internals.handleBounds)==null?void 0:f.target)??[]],a=(n?l==null?void 0:l.find(d=>d.id===n):l==null?void 0:l[0])??null;return a&&i?{...a,...Yn(s,a,a.position,!0)}:a}function Fp(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function cx(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const Bp=()=>!0;function fx(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:o,edgeUpdaterType:i,isTarget:s,domNode:l,nodeLookup:a,lib:u,autoPanOnConnect:c,flowId:f,panBy:d,cancelConnection:h,onConnectStart:m,onConnect:w,onConnectEnd:E,isValidConnection:y=Bp,onReconnectEnd:g,updateConnection:p,getTransform:v,getFromHandle:_,autoPanSpeed:S,dragThreshold:T=1,handleDomNode:N}){const B=Pp(e.target);let b=0,P;const{x:j,y:H}=kt(e),x=Fp(i,N),D=l==null?void 0:l.getBoundingClientRect();let I=!1;if(!D||!x)return;const A=Hp(o,x,r,a,t);if(!A)return;let C=kt(e,D),M=!1,z=null,O=!1,L=null;function Y(){if(!c||!D)return;const[Q,Z]=Np(C,D,S);d({x:Q,y:Z}),b=requestAnimationFrame(Y)}const R={...A,nodeId:o,type:x,position:A.position},k=a.get(o);let U={inProgress:!0,isValid:null,from:Yn(k,R,te.Left,!0),fromHandle:R,fromPosition:R.position,fromNode:k,to:C,toHandle:null,toPosition:kf[R.position],toNode:null,pointer:C};function W(){I=!0,p(U),m==null||m(e,{nodeId:o,handleId:r,handleType:x})}T===0&&W();function X(Q){if(!I){const{x:Se,y:qe}=kt(Q),gt=Se-j,bt=qe-H;if(!(gt*gt+bt*bt>T*T))return;W()}if(!_()||!R){G(Q);return}const Z=v();C=kt(Q,D),P=ux(ci(C,Z,!1,[1,1]),n,a,R),M||(Y(),M=!0);const ee=Up(Q,{handle:P,connectionMode:t,fromNodeId:o,fromHandleId:r,fromType:s?"target":"source",isValidConnection:y,doc:B,lib:u,flowId:f,nodeLookup:a});L=ee.handleDomNode,z=ee.connection,O=cx(!!P,ee.isValid);const re=a.get(o),ie=re?Yn(re,R,te.Left,!0):U.from,se={...U,from:ie,isValid:O,to:ee.toHandle&&O?Ms({x:ee.toHandle.x,y:ee.toHandle.y},Z):C,toHandle:ee.toHandle,toPosition:O&&ee.toHandle?ee.toHandle.position:kf[R.position],toNode:ee.toHandle?a.get(ee.toHandle.nodeId):null,pointer:C};p(se),U=se}function G(Q){if(!("touches"in Q&&Q.touches.length>0)){if(I){(P||L)&&z&&O&&(w==null||w(z));const{inProgress:Z,...ee}=U,re={...ee,toPosition:U.toHandle?U.toPosition:null};E==null||E(Q,re),i&&(g==null||g(Q,re))}h(),cancelAnimationFrame(b),M=!1,O=!1,z=null,L=null,B.removeEventListener("mousemove",X),B.removeEventListener("mouseup",G),B.removeEventListener("touchmove",X),B.removeEventListener("touchend",G)}}B.addEventListener("mousemove",X),B.addEventListener("mouseup",G),B.addEventListener("touchmove",X),B.addEventListener("touchend",G)}function Up(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:o,fromType:i,doc:s,lib:l,flowId:a,isValidConnection:u=Bp,nodeLookup:c}){const f=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:m}=kt(e),w=s.elementFromPoint(h,m),E=w!=null&&w.classList.contains(`${l}-flow__handle`)?w:d,y={handleDomNode:E,isValid:!1,connection:null,toHandle:null};if(E){const g=Fp(void 0,E),p=E.getAttribute("data-nodeid"),v=E.getAttribute("data-handleid"),_=E.classList.contains("connectable"),S=E.classList.contains("connectableend");if(!p||!g)return y;const T={source:f?p:r,sourceHandle:f?v:o,target:f?r:p,targetHandle:f?o:v};y.connection=T;const B=_&&S&&(n===Ir.Strict?f&&g==="source"||!f&&g==="target":p!==r||v!==o);y.isValid=B&&u(T),y.toHandle=Hp(p,g,v,c,n,!0)}return y}const Oa={onPointerDown:fx,isValid:Up};function dx({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const o=tt(e);function i({translateExtent:l,width:a,height:u,zoomStep:c=1,pannable:f=!0,zoomable:d=!0,inversePan:h=!1}){const m=p=>{if(p.sourceEvent.type!=="wheel"||!t)return;const v=n(),_=p.sourceEvent.ctrlKey&&$o()?10:1,S=-p.sourceEvent.deltaY*(p.sourceEvent.deltaMode===1?.05:p.sourceEvent.deltaMode?1:.002)*c,T=v[2]*Math.pow(2,S*_);t.scaleTo(T)};let w=[0,0];const E=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])},y=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],S=[_[0]-w[0],_[1]-w[1]];w=_;const T=r()*Math.max(v[2],Math.log(v[2]))*(h?-1:1),N={x:v[0]-S[0]*T,y:v[1]-S[1]*T},B=[[0,0],[a,u]];t.setViewportConstrained({x:N.x,y:N.y,zoom:v[2]},B,l)},g=vp().on("start",E).on("zoom",f?y:null).on("zoom.wheel",d?m:null);o.call(g,{})}function s(){o.on("zoom",null)}return{update:i,destroy:s,pointer:xt}}const ul=e=>({x:e.x,y:e.y,zoom:e.k}),Ul=({x:e,y:t,zoom:n})=>sl.translate(e,t).scale(n),ir=(e,t)=>e.target.closest(`.${t}`),Wp=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),hx=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Wl=(e,t=0,n=hx,r=()=>{})=>{const o=typeof t=="number"&&t>0;return o||r(),o?e.transition().duration(t).ease(n).on("end",r):e},Yp=e=>{const t=e.ctrlKey&&$o()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function px({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:o,panOnScrollSpeed:i,zoomOnPinch:s,onPanZoomStart:l,onPanZoom:a,onPanZoomEnd:u}){return c=>{if(ir(c,t))return c.ctrlKey&&c.preventDefault(),!1;c.preventDefault(),c.stopImmediatePropagation();const f=n.property("__zoom").k||1;if(c.ctrlKey&&s){const E=xt(c),y=Yp(c),g=f*Math.pow(2,y);r.scaleTo(n,g,E,c);return}const d=c.deltaMode===1?20:1;let h=o===Vn.Vertical?0:c.deltaX*d,m=o===Vn.Horizontal?0:c.deltaY*d;!$o()&&c.shiftKey&&o!==Vn.Vertical&&(h=c.deltaY*d,m=0),r.translateBy(n,-(h/f)*i,-(m/f)*i,{internal:!0});const w=ul(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(a==null||a(c,w),e.panScrollTimeout=setTimeout(()=>{u==null||u(c,w),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(c,w))}}function gx({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,o){const i=r.type==="wheel",s=!t&&i&&!r.ctrlKey,l=ir(r,e);if(r.ctrlKey&&i&&l&&r.preventDefault(),s||l)return null;r.preventDefault(),n.call(this,r,o)}}function mx({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var i,s,l;if((i=r.sourceEvent)!=null&&i.internal)return;const o=ul(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 yx({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:o}){return i=>{var s,l;e.usedRightMouseButton=!!(n&&Wp(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,ul(i.transform)))}}function vx({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&&Wp(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&i(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),o)){const a=ul(s.transform);e.prevViewport=a,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o==null||o(s.sourceEvent,a)},n?150:0)}}}function wx({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:o,zoomOnDoubleClick:i,userSelectionActive:s,noWheelClassName:l,noPanClassName:a,lib:u,connectionInProgress:c}){return f=>{var E;const d=e||t,h=n&&f.ctrlKey,m=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(ir(f,`${u}-flow__node`)||ir(f,`${u}-flow__edge`)))return!0;if(!r&&!d&&!o&&!i&&!n||s||c&&!m||ir(f,l)&&m||ir(f,a)&&(!m||o&&m&&!e)||!n&&f.ctrlKey&&m)return!1;if(!n&&f.type==="touchstart"&&((E=f.touches)==null?void 0:E.length)>1)return f.preventDefault(),!1;if(!d&&!o&&!h&&m||!r&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(r)&&!r.includes(f.button)&&f.type==="mousedown")return!1;const w=Array.isArray(r)&&r.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||m)&&w}}function xx({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},c=e.getBoundingClientRect(),f=vp().scaleExtent([t,n]).translateExtent(r),d=tt(e).call(f);g({x:o.x,y:o.y,zoom:Pr(o.zoom,t,n)},[[0,0],[c.width,c.height]],r);const h=d.on("wheel.zoom"),m=d.on("dblclick.zoom");f.wheelDelta(Yp);function w(P,j){return d?new Promise(H=>{f==null||f.interpolate((j==null?void 0:j.interpolate)==="linear"?vo:rs).transform(Wl(d,j==null?void 0:j.duration,j==null?void 0:j.ease,()=>H(!0)),P)}):Promise.resolve(!1)}function E({noWheelClassName:P,noPanClassName:j,onPaneContextMenu:H,userSelectionActive:x,panOnScroll:D,panOnDrag:I,panOnScrollMode:A,panOnScrollSpeed:C,preventScrolling:M,zoomOnPinch:z,zoomOnScroll:O,zoomOnDoubleClick:L,zoomActivationKeyPressed:Y,lib:R,onTransformChange:k,connectionInProgress:$,paneClickDistance:U,selectionOnDrag:W}){x&&!u.isZoomingOrPanning&&y();const X=D&&!Y&&!x;f.clickDistance(W?1/0:!Ct(U)||U<0?0:U);const G=X?px({zoomPanValues:u,noWheelClassName:P,d3Selection:d,d3Zoom:f,panOnScrollMode:A,panOnScrollSpeed:C,zoomOnPinch:z,onPanZoomStart:s,onPanZoom:i,onPanZoomEnd:l}):gx({noWheelClassName:P,preventScrolling:M,d3ZoomHandler:h});if(d.on("wheel.zoom",G,{passive:!1}),!x){const Z=mx({zoomPanValues:u,onDraggingChange:a,onPanZoomStart:s});f.on("start",Z);const ee=yx({zoomPanValues:u,panOnDrag:I,onPaneContextMenu:!!H,onPanZoom:i,onTransformChange:k});f.on("zoom",ee);const re=vx({zoomPanValues:u,panOnDrag:I,panOnScroll:D,onPaneContextMenu:H,onPanZoomEnd:l,onDraggingChange:a});f.on("end",re)}const Q=wx({zoomActivationKeyPressed:Y,panOnDrag:I,zoomOnScroll:O,panOnScroll:D,zoomOnDoubleClick:L,zoomOnPinch:z,userSelectionActive:x,noPanClassName:j,noWheelClassName:P,lib:R,connectionInProgress:$});f.filter(Q),L?d.on("dblclick.zoom",m):d.on("dblclick.zoom",null)}function y(){f.on("zoom",null)}async function g(P,j,H){const x=Ul(P),D=f==null?void 0:f.constrain()(x,j,H);return D&&await w(D),new Promise(I=>I(D))}async function p(P,j){const H=Ul(P);return await w(H,j),new Promise(x=>x(H))}function v(P){if(d){const j=Ul(P),H=d.property("__zoom");(H.k!==P.zoom||H.x!==P.x||H.y!==P.y)&&(f==null||f.transform(d,j,null,{sync:!0}))}}function _(){const P=d?yp(d.node()):{x:0,y:0,k:1};return{x:P.x,y:P.y,zoom:P.k}}function S(P,j){return d?new Promise(H=>{f==null||f.interpolate((j==null?void 0:j.interpolate)==="linear"?vo:rs).scaleTo(Wl(d,j==null?void 0:j.duration,j==null?void 0:j.ease,()=>H(!0)),P)}):Promise.resolve(!1)}function T(P,j){return d?new Promise(H=>{f==null||f.interpolate((j==null?void 0:j.interpolate)==="linear"?vo:rs).scaleBy(Wl(d,j==null?void 0:j.duration,j==null?void 0:j.ease,()=>H(!0)),P)}):Promise.resolve(!1)}function N(P){f==null||f.scaleExtent(P)}function B(P){f==null||f.translateExtent(P)}function b(P){const j=!Ct(P)||P<0?0:P;f==null||f.clickDistance(j)}return{update:E,destroy:y,setViewport:p,setViewportConstrained:g,getViewport:_,scaleTo:S,scaleBy:T,setScaleExtent:N,setTranslateExtent:B,syncViewport:v,setClickDistance:b}}var Rr;(function(e){e.Line="line",e.Handle="handle"})(Rr||(Rr={}));function Ex({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 jf(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 on(e,t){return Math.max(0,t-e)}function sn(e,t){return Math.max(0,e-t)}function Ii(e,t,n){return Math.max(0,t-e,e-n)}function $f(e,t){return e?!t:t}function _x(e,t,n,r,o,i,s,l){let{affectsX:a,affectsY:u}=t;const{isHorizontal:c,isVertical:f}=t,d=c&&f,{xSnapped:h,ySnapped:m}=n,{minWidth:w,maxWidth:E,minHeight:y,maxHeight:g}=r,{x:p,y:v,width:_,height:S,aspectRatio:T}=e;let N=Math.floor(c?h-e.pointerX:0),B=Math.floor(f?m-e.pointerY:0);const b=_+(a?-N:N),P=S+(u?-B:B),j=-i[0]*_,H=-i[1]*S;let x=Ii(b,w,E),D=Ii(P,y,g);if(s){let C=0,M=0;a&&N<0?C=on(p+N+j,s[0][0]):!a&&N>0&&(C=sn(p+b+j,s[1][0])),u&&B<0?M=on(v+B+H,s[0][1]):!u&&B>0&&(M=sn(v+P+H,s[1][1])),x=Math.max(x,C),D=Math.max(D,M)}if(l){let C=0,M=0;a&&N>0?C=sn(p+N,l[0][0]):!a&&N<0&&(C=on(p+b,l[1][0])),u&&B>0?M=sn(v+B,l[0][1]):!u&&B<0&&(M=on(v+P,l[1][1])),x=Math.max(x,C),D=Math.max(D,M)}if(o){if(c){const C=Ii(b/T,y,g)*T;if(x=Math.max(x,C),s){let M=0;!a&&!u||a&&!u&&d?M=sn(v+H+b/T,s[1][1])*T:M=on(v+H+(a?N:-N)/T,s[0][1])*T,x=Math.max(x,M)}if(l){let M=0;!a&&!u||a&&!u&&d?M=on(v+b/T,l[1][1])*T:M=sn(v+(a?N:-N)/T,l[0][1])*T,x=Math.max(x,M)}}if(f){const C=Ii(P*T,w,E)/T;if(D=Math.max(D,C),s){let M=0;!a&&!u||u&&!a&&d?M=sn(p+P*T+j,s[1][0])/T:M=on(p+(u?B:-B)*T+j,s[0][0])/T,D=Math.max(D,M)}if(l){let M=0;!a&&!u||u&&!a&&d?M=on(p+P*T,l[1][0])/T:M=sn(p+(u?B:-B)*T,l[0][0])/T,D=Math.max(D,M)}}}B=B+(B<0?D:-D),N=N+(N<0?x:-x),o&&(d?b>P*T?B=($f(a,u)?-N:N)/T:N=($f(a,u)?-B:B)*T:c?(B=N/T,u=a):(N=B*T,a=u));const I=a?p+N:p,A=u?v+B:v;return{width:_+(a?-N:N),height:S+(u?-B:B),x:i[0]*N*(a?-1:1)+I,y:i[1]*B*(u?-1:1)+A}}const Xp={width:0,height:0,x:0,y:0},Sx={...Xp,pointerX:0,pointerY:0,aspectRatio:1};function Cx(e){return[[0,0],[e.measured.width,e.measured.height]]}function kx(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 Nx({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:o}){const i=tt(e);let s={controlDirection:jf("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:c,keepAspectRatio:f,resizeDirection:d,onResizeStart:h,onResize:m,onResizeEnd:w,shouldResize:E}){let y={...Xp},g={...Sx};s={boundaries:c,resizeDirection:d,keepAspectRatio:f,controlDirection:jf(u)};let p,v=null,_=[],S,T,N,B=!1;const b=rp().on("start",P=>{const{nodeLookup:j,transform:H,snapGrid:x,snapToGrid:D,nodeOrigin:I,paneDomNode:A}=n();if(p=j.get(t),!p)return;v=(A==null?void 0:A.getBoundingClientRect())??null;const{xSnapped:C,ySnapped:M}=wo(P.sourceEvent,{transform:H,snapGrid:x,snapToGrid:D,containerBounds:v});y={width:p.measured.width??0,height:p.measured.height??0,x:p.position.x??0,y:p.position.y??0},g={...y,pointerX:C,pointerY:M,aspectRatio:y.width/y.height},S=void 0,p.parentId&&(p.extent==="parent"||p.expandParent)&&(S=j.get(p.parentId),T=S&&p.extent==="parent"?Cx(S):void 0),_=[],N=void 0;for(const[z,O]of j)if(O.parentId===t&&(_.push({id:z,position:{...O.position},extent:O.extent}),O.extent==="parent"||O.expandParent)){const L=kx(O,p,O.origin??I);N?N=[[Math.min(L[0][0],N[0][0]),Math.min(L[0][1],N[0][1])],[Math.max(L[1][0],N[1][0]),Math.max(L[1][1],N[1][1])]]:N=L}h==null||h(P,{...y})}).on("drag",P=>{const{transform:j,snapGrid:H,snapToGrid:x,nodeOrigin:D}=n(),I=wo(P.sourceEvent,{transform:j,snapGrid:H,snapToGrid:x,containerBounds:v}),A=[];if(!p)return;const{x:C,y:M,width:z,height:O}=y,L={},Y=p.origin??D,{width:R,height:k,x:$,y:U}=_x(g,s.controlDirection,I,s.boundaries,s.keepAspectRatio,Y,T,N),W=R!==z,X=k!==O,G=$!==C&&W,Q=U!==M&&X;if(!G&&!Q&&!W&&!X)return;if((G||Q||Y[0]===1||Y[1]===1)&&(L.x=G?$:y.x,L.y=Q?U:y.y,y.x=L.x,y.y=L.y,_.length>0)){const ie=$-C,se=U-M;for(const Se of _)Se.position={x:Se.position.x-ie+Y[0]*(R-z),y:Se.position.y-se+Y[1]*(k-O)},A.push(Se)}if((W||X)&&(L.width=W&&(!s.resizeDirection||s.resizeDirection==="horizontal")?R:y.width,L.height=X&&(!s.resizeDirection||s.resizeDirection==="vertical")?k:y.height,y.width=L.width,y.height=L.height),S&&p.expandParent){const ie=Y[0]*(L.width??0);L.x&&L.x<ie&&(y.x=ie,g.x=g.x-(L.x-ie));const se=Y[1]*(L.height??0);L.y&&L.y<se&&(y.y=se,g.y=g.y-(L.y-se))}const Z=Ex({width:y.width,prevWidth:z,height:y.height,prevHeight:O,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),ee={...y,direction:Z};(E==null?void 0:E(P,ee))!==!1&&(B=!0,m==null||m(P,ee),r(L,A))}).on("end",P=>{B&&(w==null||w(P,{...y}),o==null||o({...y}),B=!1)});i.call(b)}function a(){i.on(".drag",null)}return{update:l,destroy:a}}var Gp={exports:{}},Qp={},Kp={exports:{}},Zp={};/**
|
|
19
|
+
* @license React
|
|
20
|
+
* use-sync-external-store-shim.production.js
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/var Ar=V;function Mx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tx=typeof Object.is=="function"?Object.is:Mx,Ix=Ar.useState,Px=Ar.useEffect,bx=Ar.useLayoutEffect,Lx=Ar.useDebugValue;function Rx(e,t){var n=t(),r=Ix({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return bx(function(){o.value=n,o.getSnapshot=t,Yl(o)&&i({inst:o})},[e,n,t]),Px(function(){return Yl(o)&&i({inst:o}),e(function(){Yl(o)&&i({inst:o})})},[e]),Lx(n),n}function Yl(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tx(e,n)}catch{return!0}}function Ax(e,t){return t()}var Ox=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Ax:Rx;Zp.useSyncExternalStore=Ar.useSyncExternalStore!==void 0?Ar.useSyncExternalStore:Ox;Kp.exports=Zp;var Dx=Kp.exports;/**
|
|
27
|
+
* @license React
|
|
28
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var cl=V,zx=Dx;function jx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $x=typeof Object.is=="function"?Object.is:jx,Vx=zx.useSyncExternalStore,Hx=cl.useRef,Fx=cl.useEffect,Bx=cl.useMemo,Ux=cl.useDebugValue;Qp.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=Hx(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Bx(function(){function a(h){if(!u){if(u=!0,c=h,h=r(h),o!==void 0&&s.hasValue){var m=s.value;if(o(m,h))return f=m}return f=h}if(m=f,$x(c,h))return m;var w=r(h);return o!==void 0&&o(m,w)?(c=h,m):(c=h,f=w)}var u=!1,c,f,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=Vx(e,i[0],i[1]);return Fx(function(){s.hasValue=!0,s.value=l},[l]),Ux(l),l};Gp.exports=Qp;var Wx=Gp.exports;const Yx=bh(Wx),Xx={},Vf=e=>{let t;const n=new Set,r=(c,f)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const h=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(m=>m(t,h))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(Xx?"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},Gx=e=>e?Vf(e):Vf,{useDebugValue:Qx}=ne,{useSyncExternalStoreWithSelector:Kx}=Yx,Zx=e=>e;function qp(e,t=Zx,n){const r=Kx(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Qx(r),r}const Hf=(e,t)=>{const n=Gx(e),r=(o,i=t)=>qp(n,o,i);return Object.assign(r,n),r},qx=(e,t)=>e?Hf(e,t):Hf;function me(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 Jp={exports:{}},st={},eg={exports:{}},tg={};/**
|
|
35
|
+
* @license React
|
|
36
|
+
* scheduler.production.min.js
|
|
37
|
+
*
|
|
38
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the MIT license found in the
|
|
41
|
+
* LICENSE file in the root directory of this source tree.
|
|
42
|
+
*/(function(e){function t(C,M){var z=C.length;C.push(M);e:for(;0<z;){var O=z-1>>>1,L=C[O];if(0<o(L,M))C[O]=M,C[z]=L,z=O;else break e}}function n(C){return C.length===0?null:C[0]}function r(C){if(C.length===0)return null;var M=C[0],z=C.pop();if(z!==M){C[0]=z;e:for(var O=0,L=C.length,Y=L>>>1;O<Y;){var R=2*(O+1)-1,k=C[R],$=R+1,U=C[$];if(0>o(k,z))$<L&&0>o(U,k)?(C[O]=U,C[$]=z,O=$):(C[O]=k,C[R]=z,O=R);else if($<L&&0>o(U,z))C[O]=U,C[$]=z,O=$;else break e}}return M}function o(C,M){var z=C.sortIndex-M.sortIndex;return z!==0?z:C.id-M.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=[],c=1,f=null,d=3,h=!1,m=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,y=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(C){for(var M=n(u);M!==null;){if(M.callback===null)r(u);else if(M.startTime<=C)r(u),M.sortIndex=M.expirationTime,t(a,M);else break;M=n(u)}}function v(C){if(w=!1,p(C),!m)if(n(a)!==null)m=!0,I(_);else{var M=n(u);M!==null&&A(v,M.startTime-C)}}function _(C,M){m=!1,w&&(w=!1,y(N),N=-1),h=!0;var z=d;try{for(p(M),f=n(a);f!==null&&(!(f.expirationTime>M)||C&&!P());){var O=f.callback;if(typeof O=="function"){f.callback=null,d=f.priorityLevel;var L=O(f.expirationTime<=M);M=e.unstable_now(),typeof L=="function"?f.callback=L:f===n(a)&&r(a),p(M)}else r(a);f=n(a)}if(f!==null)var Y=!0;else{var R=n(u);R!==null&&A(v,R.startTime-M),Y=!1}return Y}finally{f=null,d=z,h=!1}}var S=!1,T=null,N=-1,B=5,b=-1;function P(){return!(e.unstable_now()-b<B)}function j(){if(T!==null){var C=e.unstable_now();b=C;var M=!0;try{M=T(!0,C)}finally{M?H():(S=!1,T=null)}}else S=!1}var H;if(typeof g=="function")H=function(){g(j)};else if(typeof MessageChannel<"u"){var x=new MessageChannel,D=x.port2;x.port1.onmessage=j,H=function(){D.postMessage(null)}}else H=function(){E(j,0)};function I(C){T=C,S||(S=!0,H())}function A(C,M){N=E(function(){C(e.unstable_now())},M)}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(C){C.callback=null},e.unstable_continueExecution=function(){m||h||(m=!0,I(_))},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(C){switch(d){case 1:case 2:case 3:var M=3;break;default:M=d}var z=d;d=M;try{return C()}finally{d=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(C,M){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var z=d;d=C;try{return M()}finally{d=z}},e.unstable_scheduleCallback=function(C,M,z){var O=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?O+z:O):z=O,C){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=z+L,C={id:c++,callback:M,priorityLevel:C,startTime:z,expirationTime:L,sortIndex:-1},z>O?(C.sortIndex=z,t(u,C),n(a)===null&&C===n(u)&&(w?(y(N),N=-1):w=!0,A(v,z-O))):(C.sortIndex=L,t(a,C),m||h||(m=!0,I(_))),C},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(C){var M=d;return function(){var z=d;d=M;try{return C.apply(this,arguments)}finally{d=z}}}})(tg);eg.exports=tg;var Jx=eg.exports;/**
|
|
43
|
+
* @license React
|
|
44
|
+
* react-dom.production.min.js
|
|
45
|
+
*
|
|
46
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
47
|
+
*
|
|
48
|
+
* This source code is licensed under the MIT license found in the
|
|
49
|
+
* LICENSE file in the root directory of this source tree.
|
|
50
|
+
*/var eE=V,it=Jx;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 ng=new Set,Vo={};function er(e,t){Or(e,t),Or(e+"Capture",t)}function Or(e,t){for(Vo[e]=t,e=0;e<t.length;e++)ng.add(t[e])}var Kt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Da=Object.prototype.hasOwnProperty,tE=/^[: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]*$/,Ff={},Bf={};function nE(e){return Da.call(Bf,e)?!0:Da.call(Ff,e)?!1:tE.test(e)?Bf[e]=!0:(Ff[e]=!0,!1)}function rE(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 oE(e,t,n,r){if(t===null||typeof t>"u"||rE(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 Be(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 Ae={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ae[e]=new Be(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ae[t]=new Be(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ae[e]=new Be(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ae[e]=new Be(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){Ae[e]=new Be(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ae[e]=new Be(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ae[e]=new Be(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ae[e]=new Be(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ae[e]=new Be(e,5,!1,e.toLowerCase(),null,!1,!1)});var tc=/[\-:]([a-z])/g;function nc(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(tc,nc);Ae[t]=new Be(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(tc,nc);Ae[t]=new Be(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(tc,nc);Ae[t]=new Be(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ae[e]=new Be(e,1,!1,e.toLowerCase(),null,!1,!1)});Ae.xlinkHref=new Be("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ae[e]=new Be(e,1,!1,e.toLowerCase(),null,!0,!0)});function rc(e,t,n,r){var o=Ae.hasOwnProperty(t)?Ae[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(oE(t,n,o,r)&&(n=null),r||o===null?nE(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 tn=eE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Pi=Symbol.for("react.element"),sr=Symbol.for("react.portal"),lr=Symbol.for("react.fragment"),oc=Symbol.for("react.strict_mode"),za=Symbol.for("react.profiler"),rg=Symbol.for("react.provider"),og=Symbol.for("react.context"),ic=Symbol.for("react.forward_ref"),ja=Symbol.for("react.suspense"),$a=Symbol.for("react.suspense_list"),sc=Symbol.for("react.memo"),an=Symbol.for("react.lazy"),ig=Symbol.for("react.offscreen"),Uf=Symbol.iterator;function to(e){return e===null||typeof e!="object"?null:(e=Uf&&e[Uf]||e["@@iterator"],typeof e=="function"?e:null)}var Ee=Object.assign,Xl;function ho(e){if(Xl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Xl=t&&t[1]||""}return`
|
|
51
|
+
`+Xl+e}var Gl=!1;function Ql(e,t){if(!e||Gl)return"";Gl=!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(`
|
|
52
|
+
`),i=r.stack.split(`
|
|
53
|
+
`),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=`
|
|
54
|
+
`+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{Gl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ho(e):""}function iE(e){switch(e.tag){case 5:return ho(e.type);case 16:return ho("Lazy");case 13:return ho("Suspense");case 19:return ho("SuspenseList");case 0:case 2:case 15:return e=Ql(e.type,!1),e;case 11:return e=Ql(e.type.render,!1),e;case 1:return e=Ql(e.type,!0),e;default:return""}}function Va(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 lr:return"Fragment";case sr:return"Portal";case za:return"Profiler";case oc:return"StrictMode";case ja:return"Suspense";case $a:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case og:return(e.displayName||"Context")+".Consumer";case rg:return(e._context.displayName||"Context")+".Provider";case ic:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case sc:return t=e.displayName||null,t!==null?t:Va(e.type)||"Memo";case an:t=e._payload,e=e._init;try{return Va(e(t))}catch{}}return null}function sE(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 Va(t);case 8:return t===oc?"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 Sn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lE(e){var t=sg(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 bi(e){e._valueTracker||(e._valueTracker=lE(e))}function lg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=sg(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Is(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 Ee({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Wf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Sn(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 ag(e,t){t=t.checked,t!=null&&rc(e,"checked",t,!1)}function Fa(e,t){ag(e,t);var n=Sn(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")?Ba(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ba(e,t.type,Sn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Yf(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 Ba(e,t,n){(t!=="number"||Is(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var po=Array.isArray;function Er(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=""+Sn(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 Ua(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(K(91));return Ee({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Xf(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(po(n)){if(1<n.length)throw Error(K(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Sn(n)}}function ug(e,t){var n=Sn(t.value),r=Sn(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 cg(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 Wa(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?cg(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Li,fg=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(Li=Li||document.createElement("div"),Li.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Li.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ho(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var xo={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},aE=["Webkit","ms","Moz","O"];Object.keys(xo).forEach(function(e){aE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),xo[t]=xo[e]})});function dg(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||xo.hasOwnProperty(e)&&xo[e]?(""+t).trim():t+"px"}function hg(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=dg(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var uE=Ee({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 Ya(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 Xa(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 Ga=null;function lc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qa=null,_r=null,Sr=null;function Qf(e){if(e=hi(e)){if(typeof Qa!="function")throw Error(K(280));var t=e.stateNode;t&&(t=gl(t),Qa(e.stateNode,e.type,t))}}function pg(e){_r?Sr?Sr.push(e):Sr=[e]:_r=e}function gg(){if(_r){var e=_r,t=Sr;if(Sr=_r=null,Qf(e),t)for(e=0;e<t.length;e++)Qf(t[e])}}function mg(e,t){return e(t)}function yg(){}var Kl=!1;function vg(e,t,n){if(Kl)return e(t,n);Kl=!0;try{return mg(e,t,n)}finally{Kl=!1,(_r!==null||Sr!==null)&&(yg(),gg())}}function Fo(e,t){var n=e.stateNode;if(n===null)return null;var r=gl(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 Ka=!1;if(Kt)try{var no={};Object.defineProperty(no,"passive",{get:function(){Ka=!0}}),window.addEventListener("test",no,no),window.removeEventListener("test",no,no)}catch{Ka=!1}function cE(e,t,n,r,o,i,s,l,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Eo=!1,Ps=null,bs=!1,Za=null,fE={onError:function(e){Eo=!0,Ps=e}};function dE(e,t,n,r,o,i,s,l,a){Eo=!1,Ps=null,cE.apply(fE,arguments)}function hE(e,t,n,r,o,i,s,l,a){if(dE.apply(this,arguments),Eo){if(Eo){var u=Ps;Eo=!1,Ps=null}else throw Error(K(198));bs||(bs=!0,Za=u)}}function tr(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 wg(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 Kf(e){if(tr(e)!==e)throw Error(K(188))}function pE(e){var t=e.alternate;if(!t){if(t=tr(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 Kf(o),e;if(i===r)return Kf(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 xg(e){return e=pE(e),e!==null?Eg(e):null}function Eg(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Eg(e);if(t!==null)return t;e=e.sibling}return null}var _g=it.unstable_scheduleCallback,Zf=it.unstable_cancelCallback,gE=it.unstable_shouldYield,mE=it.unstable_requestPaint,Ce=it.unstable_now,yE=it.unstable_getCurrentPriorityLevel,ac=it.unstable_ImmediatePriority,Sg=it.unstable_UserBlockingPriority,Ls=it.unstable_NormalPriority,vE=it.unstable_LowPriority,Cg=it.unstable_IdlePriority,fl=null,zt=null;function wE(e){if(zt&&typeof zt.onCommitFiberRoot=="function")try{zt.onCommitFiberRoot(fl,e,void 0,(e.current.flags&128)===128)}catch{}}var Nt=Math.clz32?Math.clz32:_E,xE=Math.log,EE=Math.LN2;function _E(e){return e>>>=0,e===0?32:31-(xE(e)/EE|0)|0}var Ri=64,Ai=4194304;function go(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 Rs(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=go(l):(i&=s,i!==0&&(r=go(i)))}else s=n&~o,s!==0?r=go(s):i!==0&&(r=go(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-Nt(t),o=1<<n,r|=e[n],t&=~o;return r}function SE(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 CE(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-Nt(i),l=1<<s,a=o[s];a===-1?(!(l&n)||l&r)&&(o[s]=SE(l,t)):a<=t&&(e.expiredLanes|=l),i&=~l}}function qa(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function kg(){var e=Ri;return Ri<<=1,!(Ri&4194240)&&(Ri=64),e}function Zl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function fi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Nt(t),e[t]=n}function kE(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-Nt(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function uc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Nt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var fe=0;function Ng(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Mg,cc,Tg,Ig,Pg,Ja=!1,Oi=[],gn=null,mn=null,yn=null,Bo=new Map,Uo=new Map,fn=[],NE="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 qf(e,t){switch(e){case"focusin":case"focusout":gn=null;break;case"dragenter":case"dragleave":mn=null;break;case"mouseover":case"mouseout":yn=null;break;case"pointerover":case"pointerout":Bo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Uo.delete(t.pointerId)}}function ro(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=hi(t),t!==null&&cc(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function ME(e,t,n,r,o){switch(t){case"focusin":return gn=ro(gn,e,t,n,r,o),!0;case"dragenter":return mn=ro(mn,e,t,n,r,o),!0;case"mouseover":return yn=ro(yn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Bo.set(i,ro(Bo.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Uo.set(i,ro(Uo.get(i)||null,e,t,n,r,o)),!0}return!1}function bg(e){var t=Dn(e.target);if(t!==null){var n=tr(t);if(n!==null){if(t=n.tag,t===13){if(t=wg(n),t!==null){e.blockedOn=t,Pg(e.priority,function(){Tg(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 ls(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=eu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ga=r,n.target.dispatchEvent(r),Ga=null}else return t=hi(n),t!==null&&cc(t),e.blockedOn=n,!1;t.shift()}return!0}function Jf(e,t,n){ls(e)&&n.delete(t)}function TE(){Ja=!1,gn!==null&&ls(gn)&&(gn=null),mn!==null&&ls(mn)&&(mn=null),yn!==null&&ls(yn)&&(yn=null),Bo.forEach(Jf),Uo.forEach(Jf)}function oo(e,t){e.blockedOn===t&&(e.blockedOn=null,Ja||(Ja=!0,it.unstable_scheduleCallback(it.unstable_NormalPriority,TE)))}function Wo(e){function t(o){return oo(o,e)}if(0<Oi.length){oo(Oi[0],e);for(var n=1;n<Oi.length;n++){var r=Oi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(gn!==null&&oo(gn,e),mn!==null&&oo(mn,e),yn!==null&&oo(yn,e),Bo.forEach(t),Uo.forEach(t),n=0;n<fn.length;n++)r=fn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<fn.length&&(n=fn[0],n.blockedOn===null);)bg(n),n.blockedOn===null&&fn.shift()}var Cr=tn.ReactCurrentBatchConfig,As=!0;function IE(e,t,n,r){var o=fe,i=Cr.transition;Cr.transition=null;try{fe=1,fc(e,t,n,r)}finally{fe=o,Cr.transition=i}}function PE(e,t,n,r){var o=fe,i=Cr.transition;Cr.transition=null;try{fe=4,fc(e,t,n,r)}finally{fe=o,Cr.transition=i}}function fc(e,t,n,r){if(As){var o=eu(e,t,n,r);if(o===null)la(e,t,r,Os,n),qf(e,r);else if(ME(o,e,t,n,r))r.stopPropagation();else if(qf(e,r),t&4&&-1<NE.indexOf(e)){for(;o!==null;){var i=hi(o);if(i!==null&&Mg(i),i=eu(e,t,n,r),i===null&&la(e,t,r,Os,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else la(e,t,r,null,n)}}var Os=null;function eu(e,t,n,r){if(Os=null,e=lc(r),e=Dn(e),e!==null)if(t=tr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=wg(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 Os=e,null}function Lg(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(yE()){case ac:return 1;case Sg:return 4;case Ls:case vE:return 16;case Cg:return 536870912;default:return 16}default:return 16}}var hn=null,dc=null,as=null;function Rg(){if(as)return as;var e,t=dc,n=t.length,r,o="value"in hn?hn.value:hn.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 as=o.slice(e,1<r?1-r:void 0)}function us(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 Di(){return!0}function ed(){return!1}function lt(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)?Di:ed,this.isPropagationStopped=ed,this}return Ee(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=Di)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Di)},persist:function(){},isPersistent:Di}),t}var Yr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hc=lt(Yr),di=Ee({},Yr,{view:0,detail:0}),bE=lt(di),ql,Jl,io,dl=Ee({},di,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pc,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!==io&&(io&&e.type==="mousemove"?(ql=e.screenX-io.screenX,Jl=e.screenY-io.screenY):Jl=ql=0,io=e),ql)},movementY:function(e){return"movementY"in e?e.movementY:Jl}}),td=lt(dl),LE=Ee({},dl,{dataTransfer:0}),RE=lt(LE),AE=Ee({},di,{relatedTarget:0}),ea=lt(AE),OE=Ee({},Yr,{animationName:0,elapsedTime:0,pseudoElement:0}),DE=lt(OE),zE=Ee({},Yr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),jE=lt(zE),$E=Ee({},Yr,{data:0}),nd=lt($E),VE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},HE={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"},FE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function BE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=FE[e])?!!t[e]:!1}function pc(){return BE}var UE=Ee({},di,{key:function(e){if(e.key){var t=VE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=us(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?HE[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pc,charCode:function(e){return e.type==="keypress"?us(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?us(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),WE=lt(UE),YE=Ee({},dl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rd=lt(YE),XE=Ee({},di,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pc}),GE=lt(XE),QE=Ee({},Yr,{propertyName:0,elapsedTime:0,pseudoElement:0}),KE=lt(QE),ZE=Ee({},dl,{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}),qE=lt(ZE),JE=[9,13,27,32],gc=Kt&&"CompositionEvent"in window,_o=null;Kt&&"documentMode"in document&&(_o=document.documentMode);var e3=Kt&&"TextEvent"in window&&!_o,Ag=Kt&&(!gc||_o&&8<_o&&11>=_o),od=" ",id=!1;function Og(e,t){switch(e){case"keyup":return JE.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ar=!1;function t3(e,t){switch(e){case"compositionend":return Dg(t);case"keypress":return t.which!==32?null:(id=!0,od);case"textInput":return e=t.data,e===od&&id?null:e;default:return null}}function n3(e,t){if(ar)return e==="compositionend"||!gc&&Og(e,t)?(e=Rg(),as=dc=hn=null,ar=!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 Ag&&t.locale!=="ko"?null:t.data;default:return null}}var r3={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 sd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!r3[e.type]:t==="textarea"}function zg(e,t,n,r){pg(r),t=Ds(t,"onChange"),0<t.length&&(n=new hc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var So=null,Yo=null;function o3(e){Gg(e,0)}function hl(e){var t=fr(e);if(lg(t))return e}function i3(e,t){if(e==="change")return t}var jg=!1;if(Kt){var ta;if(Kt){var na="oninput"in document;if(!na){var ld=document.createElement("div");ld.setAttribute("oninput","return;"),na=typeof ld.oninput=="function"}ta=na}else ta=!1;jg=ta&&(!document.documentMode||9<document.documentMode)}function ad(){So&&(So.detachEvent("onpropertychange",$g),Yo=So=null)}function $g(e){if(e.propertyName==="value"&&hl(Yo)){var t=[];zg(t,Yo,e,lc(e)),vg(o3,t)}}function s3(e,t,n){e==="focusin"?(ad(),So=t,Yo=n,So.attachEvent("onpropertychange",$g)):e==="focusout"&&ad()}function l3(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return hl(Yo)}function a3(e,t){if(e==="click")return hl(t)}function u3(e,t){if(e==="input"||e==="change")return hl(t)}function c3(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tt=typeof Object.is=="function"?Object.is:c3;function Xo(e,t){if(Tt(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(!Da.call(t,o)||!Tt(e[o],t[o]))return!1}return!0}function ud(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cd(e,t){var n=ud(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=ud(n)}}function Vg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Vg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hg(){for(var e=window,t=Is();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Is(e.document)}return t}function mc(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 f3(e){var t=Hg(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Vg(n.ownerDocument.documentElement,n)){if(r!==null&&mc(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=cd(n,i);var s=cd(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 d3=Kt&&"documentMode"in document&&11>=document.documentMode,ur=null,tu=null,Co=null,nu=!1;function fd(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;nu||ur==null||ur!==Is(r)||(r=ur,"selectionStart"in r&&mc(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}),Co&&Xo(Co,r)||(Co=r,r=Ds(tu,"onSelect"),0<r.length&&(t=new hc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ur)))}function zi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var cr={animationend:zi("Animation","AnimationEnd"),animationiteration:zi("Animation","AnimationIteration"),animationstart:zi("Animation","AnimationStart"),transitionend:zi("Transition","TransitionEnd")},ra={},Fg={};Kt&&(Fg=document.createElement("div").style,"AnimationEvent"in window||(delete cr.animationend.animation,delete cr.animationiteration.animation,delete cr.animationstart.animation),"TransitionEvent"in window||delete cr.transitionend.transition);function pl(e){if(ra[e])return ra[e];if(!cr[e])return e;var t=cr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Fg)return ra[e]=t[n];return e}var Bg=pl("animationend"),Ug=pl("animationiteration"),Wg=pl("animationstart"),Yg=pl("transitionend"),Xg=new Map,dd="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 kn(e,t){Xg.set(e,t),er(t,[e])}for(var oa=0;oa<dd.length;oa++){var ia=dd[oa],h3=ia.toLowerCase(),p3=ia[0].toUpperCase()+ia.slice(1);kn(h3,"on"+p3)}kn(Bg,"onAnimationEnd");kn(Ug,"onAnimationIteration");kn(Wg,"onAnimationStart");kn("dblclick","onDoubleClick");kn("focusin","onFocus");kn("focusout","onBlur");kn(Yg,"onTransitionEnd");Or("onMouseEnter",["mouseout","mouseover"]);Or("onMouseLeave",["mouseout","mouseover"]);Or("onPointerEnter",["pointerout","pointerover"]);Or("onPointerLeave",["pointerout","pointerover"]);er("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));er("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));er("onBeforeInput",["compositionend","keypress","textInput","paste"]);er("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));er("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));er("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var mo="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(" "),g3=new Set("cancel close invalid load scroll toggle".split(" ").concat(mo));function hd(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,hE(r,t,void 0,e),e.currentTarget=null}function Gg(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;hd(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;hd(o,l,u),i=a}}}if(bs)throw e=Za,bs=!1,Za=null,e}function pe(e,t){var n=t[lu];n===void 0&&(n=t[lu]=new Set);var r=e+"__bubble";n.has(r)||(Qg(t,e,2,!1),n.add(r))}function sa(e,t,n){var r=0;t&&(r|=4),Qg(n,e,r,t)}var ji="_reactListening"+Math.random().toString(36).slice(2);function Go(e){if(!e[ji]){e[ji]=!0,ng.forEach(function(n){n!=="selectionchange"&&(g3.has(n)||sa(n,!1,e),sa(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ji]||(t[ji]=!0,sa("selectionchange",!1,t))}}function Qg(e,t,n,r){switch(Lg(t)){case 1:var o=IE;break;case 4:o=PE;break;default:o=fc}n=o.bind(null,t,n,e),o=void 0,!Ka||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 la(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=Dn(l),s===null)return;if(a=s.tag,a===5||a===6){r=i=s;continue e}l=l.parentNode}}r=r.return}vg(function(){var u=i,c=lc(n),f=[];e:{var d=Xg.get(e);if(d!==void 0){var h=hc,m=e;switch(e){case"keypress":if(us(n)===0)break e;case"keydown":case"keyup":h=WE;break;case"focusin":m="focus",h=ea;break;case"focusout":m="blur",h=ea;break;case"beforeblur":case"afterblur":h=ea;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=td;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=RE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=GE;break;case Bg:case Ug:case Wg:h=DE;break;case Yg:h=KE;break;case"scroll":h=bE;break;case"wheel":h=qE;break;case"copy":case"cut":case"paste":h=jE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=rd}var w=(t&4)!==0,E=!w&&e==="scroll",y=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,y!==null&&(v=Fo(g,y),v!=null&&w.push(Qo(g,v,p)))),E)break;g=g.return}0<w.length&&(d=new h(d,m,null,n,c),f.push({event:d,listeners:w}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==Ga&&(m=n.relatedTarget||n.fromElement)&&(Dn(m)||m[Zt]))break e;if((h||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=u,m=m?Dn(m):null,m!==null&&(E=tr(m),m!==E||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=u),h!==m)){if(w=td,v="onMouseLeave",y="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(w=rd,v="onPointerLeave",y="onPointerEnter",g="pointer"),E=h==null?d:fr(h),p=m==null?d:fr(m),d=new w(v,g+"leave",h,n,c),d.target=E,d.relatedTarget=p,v=null,Dn(c)===u&&(w=new w(y,g+"enter",m,n,c),w.target=p,w.relatedTarget=E,v=w),E=v,h&&m)t:{for(w=h,y=m,g=0,p=w;p;p=or(p))g++;for(p=0,v=y;v;v=or(v))p++;for(;0<g-p;)w=or(w),g--;for(;0<p-g;)y=or(y),p--;for(;g--;){if(w===y||y!==null&&w===y.alternate)break t;w=or(w),y=or(y)}w=null}else w=null;h!==null&&pd(f,d,h,w,!1),m!==null&&E!==null&&pd(f,E,m,w,!0)}}e:{if(d=u?fr(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var _=i3;else if(sd(d))if(jg)_=u3;else{_=l3;var S=s3}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(_=a3);if(_&&(_=_(e,u))){zg(f,_,n,c);break e}S&&S(e,d,u),e==="focusout"&&(S=d._wrapperState)&&S.controlled&&d.type==="number"&&Ba(d,"number",d.value)}switch(S=u?fr(u):window,e){case"focusin":(sd(S)||S.contentEditable==="true")&&(ur=S,tu=u,Co=null);break;case"focusout":Co=tu=ur=null;break;case"mousedown":nu=!0;break;case"contextmenu":case"mouseup":case"dragend":nu=!1,fd(f,n,c);break;case"selectionchange":if(d3)break;case"keydown":case"keyup":fd(f,n,c)}var T;if(gc)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else ar?Og(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(Ag&&n.locale!=="ko"&&(ar||N!=="onCompositionStart"?N==="onCompositionEnd"&&ar&&(T=Rg()):(hn=c,dc="value"in hn?hn.value:hn.textContent,ar=!0)),S=Ds(u,N),0<S.length&&(N=new nd(N,e,null,n,c),f.push({event:N,listeners:S}),T?N.data=T:(T=Dg(n),T!==null&&(N.data=T)))),(T=e3?t3(e,n):n3(e,n))&&(u=Ds(u,"onBeforeInput"),0<u.length&&(c=new nd("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=T))}Gg(f,t)})}function Qo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ds(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Fo(e,n),i!=null&&r.unshift(Qo(e,i,o)),i=Fo(e,t),i!=null&&r.push(Qo(e,i,o))),e=e.return}return r}function or(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function pd(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=Fo(n,i),a!=null&&s.unshift(Qo(n,a,l))):o||(a=Fo(n,i),a!=null&&s.push(Qo(n,a,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var m3=/\r\n?/g,y3=/\u0000|\uFFFD/g;function gd(e){return(typeof e=="string"?e:""+e).replace(m3,`
|
|
55
|
+
`).replace(y3,"")}function $i(e,t,n){if(t=gd(t),gd(e)!==t&&n)throw Error(K(425))}function zs(){}var ru=null,ou=null;function iu(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 su=typeof setTimeout=="function"?setTimeout:void 0,v3=typeof clearTimeout=="function"?clearTimeout:void 0,md=typeof Promise=="function"?Promise:void 0,w3=typeof queueMicrotask=="function"?queueMicrotask:typeof md<"u"?function(e){return md.resolve(null).then(e).catch(x3)}:su;function x3(e){setTimeout(function(){throw e})}function aa(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),Wo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Wo(t)}function vn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function yd(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 Xr=Math.random().toString(36).slice(2),Ot="__reactFiber$"+Xr,Ko="__reactProps$"+Xr,Zt="__reactContainer$"+Xr,lu="__reactEvents$"+Xr,E3="__reactListeners$"+Xr,_3="__reactHandles$"+Xr;function Dn(e){var t=e[Ot];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Zt]||n[Ot]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=yd(e);e!==null;){if(n=e[Ot])return n;e=yd(e)}return t}e=n,n=e.parentNode}return null}function hi(e){return e=e[Ot]||e[Zt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function fr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(K(33))}function gl(e){return e[Ko]||null}var au=[],dr=-1;function Nn(e){return{current:e}}function ge(e){0>dr||(e.current=au[dr],au[dr]=null,dr--)}function he(e,t){dr++,au[dr]=e.current,e.current=t}var Cn={},$e=Nn(Cn),Qe=Nn(!1),Xn=Cn;function Dr(e,t){var n=e.type.contextTypes;if(!n)return Cn;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 Ke(e){return e=e.childContextTypes,e!=null}function js(){ge(Qe),ge($e)}function vd(e,t,n){if($e.current!==Cn)throw Error(K(168));he($e,t),he(Qe,n)}function Kg(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,sE(e)||"Unknown",o));return Ee({},n,r)}function $s(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Cn,Xn=$e.current,he($e,e),he(Qe,Qe.current),!0}function wd(e,t,n){var r=e.stateNode;if(!r)throw Error(K(169));n?(e=Kg(e,t,Xn),r.__reactInternalMemoizedMergedChildContext=e,ge(Qe),ge($e),he($e,e)):ge(Qe),he(Qe,n)}var Bt=null,ml=!1,ua=!1;function Zg(e){Bt===null?Bt=[e]:Bt.push(e)}function S3(e){ml=!0,Zg(e)}function Mn(){if(!ua&&Bt!==null){ua=!0;var e=0,t=fe;try{var n=Bt;for(fe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Bt=null,ml=!1}catch(o){throw Bt!==null&&(Bt=Bt.slice(e+1)),_g(ac,Mn),o}finally{fe=t,ua=!1}}return null}var hr=[],pr=0,Vs=null,Hs=0,ut=[],ct=0,Gn=null,Wt=1,Yt="";function bn(e,t){hr[pr++]=Hs,hr[pr++]=Vs,Vs=e,Hs=t}function qg(e,t,n){ut[ct++]=Wt,ut[ct++]=Yt,ut[ct++]=Gn,Gn=e;var r=Wt;e=Yt;var o=32-Nt(r)-1;r&=~(1<<o),n+=1;var i=32-Nt(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,Wt=1<<32-Nt(t)+o|n<<o|r,Yt=i+e}else Wt=1<<i|n<<o|r,Yt=e}function yc(e){e.return!==null&&(bn(e,1),qg(e,1,0))}function vc(e){for(;e===Vs;)Vs=hr[--pr],hr[pr]=null,Hs=hr[--pr],hr[pr]=null;for(;e===Gn;)Gn=ut[--ct],ut[ct]=null,Yt=ut[--ct],ut[ct]=null,Wt=ut[--ct],ut[ct]=null}var rt=null,nt=null,ye=!1,_t=null;function Jg(e,t){var n=ft(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 xd(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,rt=e,nt=vn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,rt=e,nt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Gn!==null?{id:Wt,overflow:Yt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ft(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,rt=e,nt=null,!0):!1;default:return!1}}function uu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function cu(e){if(ye){var t=nt;if(t){var n=t;if(!xd(e,t)){if(uu(e))throw Error(K(418));t=vn(n.nextSibling);var r=rt;t&&xd(e,t)?Jg(r,n):(e.flags=e.flags&-4097|2,ye=!1,rt=e)}}else{if(uu(e))throw Error(K(418));e.flags=e.flags&-4097|2,ye=!1,rt=e}}}function Ed(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;rt=e}function Vi(e){if(e!==rt)return!1;if(!ye)return Ed(e),ye=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!iu(e.type,e.memoizedProps)),t&&(t=nt)){if(uu(e))throw em(),Error(K(418));for(;t;)Jg(e,t),t=vn(t.nextSibling)}if(Ed(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){nt=vn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}nt=null}}else nt=rt?vn(e.stateNode.nextSibling):null;return!0}function em(){for(var e=nt;e;)e=vn(e.nextSibling)}function zr(){nt=rt=null,ye=!1}function wc(e){_t===null?_t=[e]:_t.push(e)}var C3=tn.ReactCurrentBatchConfig;function so(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 Hi(e,t){throw e=Object.prototype.toString.call(t),Error(K(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function _d(e){var t=e._init;return t(e._payload)}function tm(e){function t(y,g){if(e){var p=y.deletions;p===null?(y.deletions=[g],y.flags|=16):p.push(g)}}function n(y,g){if(!e)return null;for(;g!==null;)t(y,g),g=g.sibling;return null}function r(y,g){for(y=new Map;g!==null;)g.key!==null?y.set(g.key,g):y.set(g.index,g),g=g.sibling;return y}function o(y,g){return y=_n(y,g),y.index=0,y.sibling=null,y}function i(y,g,p){return y.index=p,e?(p=y.alternate,p!==null?(p=p.index,p<g?(y.flags|=2,g):p):(y.flags|=2,g)):(y.flags|=1048576,g)}function s(y){return e&&y.alternate===null&&(y.flags|=2),y}function l(y,g,p,v){return g===null||g.tag!==6?(g=ma(p,y.mode,v),g.return=y,g):(g=o(g,p),g.return=y,g)}function a(y,g,p,v){var _=p.type;return _===lr?c(y,g,p.props.children,v,p.key):g!==null&&(g.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===an&&_d(_)===g.type)?(v=o(g,p.props),v.ref=so(y,g,p),v.return=y,v):(v=ms(p.type,p.key,p.props,null,y.mode,v),v.ref=so(y,g,p),v.return=y,v)}function u(y,g,p,v){return g===null||g.tag!==4||g.stateNode.containerInfo!==p.containerInfo||g.stateNode.implementation!==p.implementation?(g=ya(p,y.mode,v),g.return=y,g):(g=o(g,p.children||[]),g.return=y,g)}function c(y,g,p,v,_){return g===null||g.tag!==7?(g=Fn(p,y.mode,v,_),g.return=y,g):(g=o(g,p),g.return=y,g)}function f(y,g,p){if(typeof g=="string"&&g!==""||typeof g=="number")return g=ma(""+g,y.mode,p),g.return=y,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Pi:return p=ms(g.type,g.key,g.props,null,y.mode,p),p.ref=so(y,null,g),p.return=y,p;case sr:return g=ya(g,y.mode,p),g.return=y,g;case an:var v=g._init;return f(y,v(g._payload),p)}if(po(g)||to(g))return g=Fn(g,y.mode,p,null),g.return=y,g;Hi(y,g)}return null}function d(y,g,p,v){var _=g!==null?g.key:null;if(typeof p=="string"&&p!==""||typeof p=="number")return _!==null?null:l(y,g,""+p,v);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Pi:return p.key===_?a(y,g,p,v):null;case sr:return p.key===_?u(y,g,p,v):null;case an:return _=p._init,d(y,g,_(p._payload),v)}if(po(p)||to(p))return _!==null?null:c(y,g,p,v,null);Hi(y,p)}return null}function h(y,g,p,v,_){if(typeof v=="string"&&v!==""||typeof v=="number")return y=y.get(p)||null,l(g,y,""+v,_);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Pi:return y=y.get(v.key===null?p:v.key)||null,a(g,y,v,_);case sr:return y=y.get(v.key===null?p:v.key)||null,u(g,y,v,_);case an:var S=v._init;return h(y,g,p,S(v._payload),_)}if(po(v)||to(v))return y=y.get(p)||null,c(g,y,v,_,null);Hi(g,v)}return null}function m(y,g,p,v){for(var _=null,S=null,T=g,N=g=0,B=null;T!==null&&N<p.length;N++){T.index>N?(B=T,T=null):B=T.sibling;var b=d(y,T,p[N],v);if(b===null){T===null&&(T=B);break}e&&T&&b.alternate===null&&t(y,T),g=i(b,g,N),S===null?_=b:S.sibling=b,S=b,T=B}if(N===p.length)return n(y,T),ye&&bn(y,N),_;if(T===null){for(;N<p.length;N++)T=f(y,p[N],v),T!==null&&(g=i(T,g,N),S===null?_=T:S.sibling=T,S=T);return ye&&bn(y,N),_}for(T=r(y,T);N<p.length;N++)B=h(T,y,N,p[N],v),B!==null&&(e&&B.alternate!==null&&T.delete(B.key===null?N:B.key),g=i(B,g,N),S===null?_=B:S.sibling=B,S=B);return e&&T.forEach(function(P){return t(y,P)}),ye&&bn(y,N),_}function w(y,g,p,v){var _=to(p);if(typeof _!="function")throw Error(K(150));if(p=_.call(p),p==null)throw Error(K(151));for(var S=_=null,T=g,N=g=0,B=null,b=p.next();T!==null&&!b.done;N++,b=p.next()){T.index>N?(B=T,T=null):B=T.sibling;var P=d(y,T,b.value,v);if(P===null){T===null&&(T=B);break}e&&T&&P.alternate===null&&t(y,T),g=i(P,g,N),S===null?_=P:S.sibling=P,S=P,T=B}if(b.done)return n(y,T),ye&&bn(y,N),_;if(T===null){for(;!b.done;N++,b=p.next())b=f(y,b.value,v),b!==null&&(g=i(b,g,N),S===null?_=b:S.sibling=b,S=b);return ye&&bn(y,N),_}for(T=r(y,T);!b.done;N++,b=p.next())b=h(T,y,N,b.value,v),b!==null&&(e&&b.alternate!==null&&T.delete(b.key===null?N:b.key),g=i(b,g,N),S===null?_=b:S.sibling=b,S=b);return e&&T.forEach(function(j){return t(y,j)}),ye&&bn(y,N),_}function E(y,g,p,v){if(typeof p=="object"&&p!==null&&p.type===lr&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Pi:e:{for(var _=p.key,S=g;S!==null;){if(S.key===_){if(_=p.type,_===lr){if(S.tag===7){n(y,S.sibling),g=o(S,p.props.children),g.return=y,y=g;break e}}else if(S.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===an&&_d(_)===S.type){n(y,S.sibling),g=o(S,p.props),g.ref=so(y,S,p),g.return=y,y=g;break e}n(y,S);break}else t(y,S);S=S.sibling}p.type===lr?(g=Fn(p.props.children,y.mode,v,p.key),g.return=y,y=g):(v=ms(p.type,p.key,p.props,null,y.mode,v),v.ref=so(y,g,p),v.return=y,y=v)}return s(y);case sr:e:{for(S=p.key;g!==null;){if(g.key===S)if(g.tag===4&&g.stateNode.containerInfo===p.containerInfo&&g.stateNode.implementation===p.implementation){n(y,g.sibling),g=o(g,p.children||[]),g.return=y,y=g;break e}else{n(y,g);break}else t(y,g);g=g.sibling}g=ya(p,y.mode,v),g.return=y,y=g}return s(y);case an:return S=p._init,E(y,g,S(p._payload),v)}if(po(p))return m(y,g,p,v);if(to(p))return w(y,g,p,v);Hi(y,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,g!==null&&g.tag===6?(n(y,g.sibling),g=o(g,p),g.return=y,y=g):(n(y,g),g=ma(p,y.mode,v),g.return=y,y=g),s(y)):n(y,g)}return E}var jr=tm(!0),nm=tm(!1),Fs=Nn(null),Bs=null,gr=null,xc=null;function Ec(){xc=gr=Bs=null}function _c(e){var t=Fs.current;ge(Fs),e._currentValue=t}function fu(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 kr(e,t){Bs=e,xc=gr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ge=!0),e.firstContext=null)}function ht(e){var t=e._currentValue;if(xc!==e)if(e={context:e,memoizedValue:t,next:null},gr===null){if(Bs===null)throw Error(K(308));gr=e,Bs.dependencies={lanes:0,firstContext:e}}else gr=gr.next=e;return t}var zn=null;function Sc(e){zn===null?zn=[e]:zn.push(e)}function rm(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Sc(t)):(n.next=o.next,o.next=n),t.interleaved=n,qt(e,r)}function qt(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 un=!1;function Cc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function om(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 Xt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function wn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ue&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,qt(e,n)}return o=r.interleaved,o===null?(t.next=t,Sc(r)):(t.next=o.next,o.next=t),r.interleaved=t,qt(e,n)}function cs(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,uc(e,n)}}function Sd(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 Us(e,t,n,r){var o=e.updateQueue;un=!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 c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(i!==null){var f=o.baseState;s=0,c=u=a=null,l=i;do{var d=l.lane,h=l.eventTime;if((r&d)===d){c!==null&&(c=c.next={eventTime:h,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var m=e,w=l;switch(d=t,h=n,w.tag){case 1:if(m=w.payload,typeof m=="function"){f=m.call(h,f,d);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=w.payload,d=typeof m=="function"?m.call(h,f,d):m,d==null)break e;f=Ee({},f,d);break e;case 2:un=!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},c===null?(u=c=h,a=f):c=c.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(c===null&&(a=f),o.baseState=a,o.firstBaseUpdate=u,o.lastBaseUpdate=c,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);Kn|=s,e.lanes=s,e.memoizedState=f}}function Cd(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 pi={},jt=Nn(pi),Zo=Nn(pi),qo=Nn(pi);function jn(e){if(e===pi)throw Error(K(174));return e}function kc(e,t){switch(he(qo,t),he(Zo,e),he(jt,pi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Wa(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Wa(t,e)}ge(jt),he(jt,t)}function $r(){ge(jt),ge(Zo),ge(qo)}function im(e){jn(qo.current);var t=jn(jt.current),n=Wa(t,e.type);t!==n&&(he(Zo,e),he(jt,n))}function Nc(e){Zo.current===e&&(ge(jt),ge(Zo))}var we=Nn(0);function Ws(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 ca=[];function Mc(){for(var e=0;e<ca.length;e++)ca[e]._workInProgressVersionPrimary=null;ca.length=0}var fs=tn.ReactCurrentDispatcher,fa=tn.ReactCurrentBatchConfig,Qn=0,xe=null,Te=null,Pe=null,Ys=!1,ko=!1,Jo=0,k3=0;function Oe(){throw Error(K(321))}function Tc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tt(e[n],t[n]))return!1;return!0}function Ic(e,t,n,r,o,i){if(Qn=i,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,fs.current=e===null||e.memoizedState===null?I3:P3,e=n(r,o),ko){i=0;do{if(ko=!1,Jo=0,25<=i)throw Error(K(301));i+=1,Pe=Te=null,t.updateQueue=null,fs.current=b3,e=n(r,o)}while(ko)}if(fs.current=Xs,t=Te!==null&&Te.next!==null,Qn=0,Pe=Te=xe=null,Ys=!1,t)throw Error(K(300));return e}function Pc(){var e=Jo!==0;return Jo=0,e}function Rt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pe===null?xe.memoizedState=Pe=e:Pe=Pe.next=e,Pe}function pt(){if(Te===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=Te.next;var t=Pe===null?xe.memoizedState:Pe.next;if(t!==null)Pe=t,Te=e;else{if(e===null)throw Error(K(310));Te=e,e={memoizedState:Te.memoizedState,baseState:Te.baseState,baseQueue:Te.baseQueue,queue:Te.queue,next:null},Pe===null?xe.memoizedState=Pe=e:Pe=Pe.next=e}return Pe}function ei(e,t){return typeof t=="function"?t(e):t}function da(e){var t=pt(),n=t.queue;if(n===null)throw Error(K(311));n.lastRenderedReducer=e;var r=Te,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 c=u.lane;if((Qn&c)===c)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 f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=f,s=r):a=a.next=f,xe.lanes|=c,Kn|=c}u=u.next}while(u!==null&&u!==i);a===null?s=r:a.next=l,Tt(r,t.memoizedState)||(Ge=!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,xe.lanes|=i,Kn|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ha(e){var t=pt(),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);Tt(i,t.memoizedState)||(Ge=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function sm(){}function lm(e,t){var n=xe,r=pt(),o=t(),i=!Tt(r.memoizedState,o);if(i&&(r.memoizedState=o,Ge=!0),r=r.queue,bc(cm.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Pe!==null&&Pe.memoizedState.tag&1){if(n.flags|=2048,ti(9,um.bind(null,n,r,o,t),void 0,null),be===null)throw Error(K(349));Qn&30||am(n,t,o)}return o}function am(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=xe.updateQueue,t===null?(t={lastEffect:null,stores:null},xe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function um(e,t,n,r){t.value=n,t.getSnapshot=r,fm(t)&&dm(e)}function cm(e,t,n){return n(function(){fm(t)&&dm(e)})}function fm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tt(e,n)}catch{return!0}}function dm(e){var t=qt(e,1);t!==null&&Mt(t,e,1,-1)}function kd(e){var t=Rt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ei,lastRenderedState:e},t.queue=e,e=e.dispatch=T3.bind(null,xe,e),[t.memoizedState,e]}function ti(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=xe.updateQueue,t===null?(t={lastEffect:null,stores:null},xe.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 hm(){return pt().memoizedState}function ds(e,t,n,r){var o=Rt();xe.flags|=e,o.memoizedState=ti(1|t,n,void 0,r===void 0?null:r)}function yl(e,t,n,r){var o=pt();r=r===void 0?null:r;var i=void 0;if(Te!==null){var s=Te.memoizedState;if(i=s.destroy,r!==null&&Tc(r,s.deps)){o.memoizedState=ti(t,n,i,r);return}}xe.flags|=e,o.memoizedState=ti(1|t,n,i,r)}function Nd(e,t){return ds(8390656,8,e,t)}function bc(e,t){return yl(2048,8,e,t)}function pm(e,t){return yl(4,2,e,t)}function gm(e,t){return yl(4,4,e,t)}function mm(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 ym(e,t,n){return n=n!=null?n.concat([e]):null,yl(4,4,mm.bind(null,t,e),n)}function Lc(){}function vm(e,t){var n=pt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Tc(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function wm(e,t){var n=pt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Tc(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function xm(e,t,n){return Qn&21?(Tt(n,t)||(n=kg(),xe.lanes|=n,Kn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ge=!0),e.memoizedState=n)}function N3(e,t){var n=fe;fe=n!==0&&4>n?n:4,e(!0);var r=fa.transition;fa.transition={};try{e(!1),t()}finally{fe=n,fa.transition=r}}function Em(){return pt().memoizedState}function M3(e,t,n){var r=En(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},_m(e))Sm(t,n);else if(n=rm(e,t,n,r),n!==null){var o=He();Mt(n,e,r,o),Cm(n,t,r)}}function T3(e,t,n){var r=En(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(_m(e))Sm(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,Tt(l,s)){var a=t.interleaved;a===null?(o.next=o,Sc(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=rm(e,t,o,r),n!==null&&(o=He(),Mt(n,e,r,o),Cm(n,t,r))}}function _m(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function Sm(e,t){ko=Ys=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Cm(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,uc(e,n)}}var Xs={readContext:ht,useCallback:Oe,useContext:Oe,useEffect:Oe,useImperativeHandle:Oe,useInsertionEffect:Oe,useLayoutEffect:Oe,useMemo:Oe,useReducer:Oe,useRef:Oe,useState:Oe,useDebugValue:Oe,useDeferredValue:Oe,useTransition:Oe,useMutableSource:Oe,useSyncExternalStore:Oe,useId:Oe,unstable_isNewReconciler:!1},I3={readContext:ht,useCallback:function(e,t){return Rt().memoizedState=[e,t===void 0?null:t],e},useContext:ht,useEffect:Nd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ds(4194308,4,mm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ds(4194308,4,e,t)},useInsertionEffect:function(e,t){return ds(4,2,e,t)},useMemo:function(e,t){var n=Rt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Rt();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=M3.bind(null,xe,e),[r.memoizedState,e]},useRef:function(e){var t=Rt();return e={current:e},t.memoizedState=e},useState:kd,useDebugValue:Lc,useDeferredValue:function(e){return Rt().memoizedState=e},useTransition:function(){var e=kd(!1),t=e[0];return e=N3.bind(null,e[1]),Rt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=xe,o=Rt();if(ye){if(n===void 0)throw Error(K(407));n=n()}else{if(n=t(),be===null)throw Error(K(349));Qn&30||am(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Nd(cm.bind(null,r,i,e),[e]),r.flags|=2048,ti(9,um.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Rt(),t=be.identifierPrefix;if(ye){var n=Yt,r=Wt;n=(r&~(1<<32-Nt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Jo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=k3++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},P3={readContext:ht,useCallback:vm,useContext:ht,useEffect:bc,useImperativeHandle:ym,useInsertionEffect:pm,useLayoutEffect:gm,useMemo:wm,useReducer:da,useRef:hm,useState:function(){return da(ei)},useDebugValue:Lc,useDeferredValue:function(e){var t=pt();return xm(t,Te.memoizedState,e)},useTransition:function(){var e=da(ei)[0],t=pt().memoizedState;return[e,t]},useMutableSource:sm,useSyncExternalStore:lm,useId:Em,unstable_isNewReconciler:!1},b3={readContext:ht,useCallback:vm,useContext:ht,useEffect:bc,useImperativeHandle:ym,useInsertionEffect:pm,useLayoutEffect:gm,useMemo:wm,useReducer:ha,useRef:hm,useState:function(){return ha(ei)},useDebugValue:Lc,useDeferredValue:function(e){var t=pt();return Te===null?t.memoizedState=e:xm(t,Te.memoizedState,e)},useTransition:function(){var e=ha(ei)[0],t=pt().memoizedState;return[e,t]},useMutableSource:sm,useSyncExternalStore:lm,useId:Em,unstable_isNewReconciler:!1};function vt(e,t){if(e&&e.defaultProps){t=Ee({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function du(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ee({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var vl={isMounted:function(e){return(e=e._reactInternals)?tr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=He(),o=En(e),i=Xt(r,o);i.payload=t,n!=null&&(i.callback=n),t=wn(e,i,o),t!==null&&(Mt(t,e,o,r),cs(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=He(),o=En(e),i=Xt(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=wn(e,i,o),t!==null&&(Mt(t,e,o,r),cs(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=He(),r=En(e),o=Xt(n,r);o.tag=2,t!=null&&(o.callback=t),t=wn(e,o,r),t!==null&&(Mt(t,e,r,n),cs(t,e,r))}};function Md(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?!Xo(n,r)||!Xo(o,i):!0}function km(e,t,n){var r=!1,o=Cn,i=t.contextType;return typeof i=="object"&&i!==null?i=ht(i):(o=Ke(t)?Xn:$e.current,r=t.contextTypes,i=(r=r!=null)?Dr(e,o):Cn),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=vl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Td(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&&vl.enqueueReplaceState(t,t.state,null)}function hu(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Cc(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=ht(i):(i=Ke(t)?Xn:$e.current,o.context=Dr(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(du(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&&vl.enqueueReplaceState(o,o.state,null),Us(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Vr(e,t){try{var n="",r=t;do n+=iE(r),r=r.return;while(r);var o=n}catch(i){o=`
|
|
56
|
+
Error generating stack: `+i.message+`
|
|
57
|
+
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function pa(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function pu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var L3=typeof WeakMap=="function"?WeakMap:Map;function Nm(e,t,n){n=Xt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Qs||(Qs=!0,Cu=r),pu(e,t)},n}function Mm(e,t,n){n=Xt(-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(){pu(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){pu(e,t),typeof r!="function"&&(xn===null?xn=new Set([this]):xn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Id(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new L3;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=Y3.bind(null,e,t,n),t.then(e,e))}function Pd(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 bd(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=Xt(-1,1),t.tag=2,wn(n,t,1))),n.lanes|=1),e)}var R3=tn.ReactCurrentOwner,Ge=!1;function Ve(e,t,n,r){t.child=e===null?nm(t,null,n,r):jr(t,e.child,n,r)}function Ld(e,t,n,r,o){n=n.render;var i=t.ref;return kr(t,o),r=Ic(e,t,n,r,i,o),n=Pc(),e!==null&&!Ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Jt(e,t,o)):(ye&&n&&yc(t),t.flags|=1,Ve(e,t,r,o),t.child)}function Rd(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!Vc(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Tm(e,t,i,r,o)):(e=ms(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:Xo,n(s,r)&&e.ref===t.ref)return Jt(e,t,o)}return t.flags|=1,e=_n(i,r),e.ref=t.ref,e.return=t,t.child=e}function Tm(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Xo(i,r)&&e.ref===t.ref)if(Ge=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(Ge=!0);else return t.lanes=e.lanes,Jt(e,t,o)}return gu(e,t,n,r,o)}function Im(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},he(yr,et),et|=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,he(yr,et),et|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,he(yr,et),et|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,he(yr,et),et|=r;return Ve(e,t,o,n),t.child}function Pm(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function gu(e,t,n,r,o){var i=Ke(n)?Xn:$e.current;return i=Dr(t,i),kr(t,o),n=Ic(e,t,n,r,i,o),r=Pc(),e!==null&&!Ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Jt(e,t,o)):(ye&&r&&yc(t),t.flags|=1,Ve(e,t,n,o),t.child)}function Ad(e,t,n,r,o){if(Ke(n)){var i=!0;$s(t)}else i=!1;if(kr(t,o),t.stateNode===null)hs(e,t),km(t,n,r),hu(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=ht(u):(u=Ke(n)?Xn:$e.current,u=Dr(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||a!==u)&&Td(t,s,r,u),un=!1;var d=t.memoizedState;s.state=d,Us(t,r,s,o),a=t.memoizedState,l!==r||d!==a||Qe.current||un?(typeof c=="function"&&(du(t,n,c,r),a=t.memoizedState),(l=un||Md(t,n,l,r,d,a,u))?(f||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,om(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:vt(t.type,l),s.props=u,f=t.pendingProps,d=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=ht(a):(a=Ke(n)?Xn:$e.current,a=Dr(t,a));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==f||d!==a)&&Td(t,s,r,a),un=!1,d=t.memoizedState,s.state=d,Us(t,r,s,o);var m=t.memoizedState;l!==f||d!==m||Qe.current||un?(typeof h=="function"&&(du(t,n,h,r),m=t.memoizedState),(u=un||Md(t,n,u,r,d,m,a)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,m,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,m,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=m),s.props=r,s.state=m,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 mu(e,t,n,r,i,o)}function mu(e,t,n,r,o,i){Pm(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&wd(t,n,!1),Jt(e,t,i);r=t.stateNode,R3.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=jr(t,e.child,null,i),t.child=jr(t,null,l,i)):Ve(e,t,l,i),t.memoizedState=r.state,o&&wd(t,n,!0),t.child}function bm(e){var t=e.stateNode;t.pendingContext?vd(e,t.pendingContext,t.pendingContext!==t.context):t.context&&vd(e,t.context,!1),kc(e,t.containerInfo)}function Od(e,t,n,r,o){return zr(),wc(o),t.flags|=256,Ve(e,t,n,r),t.child}var yu={dehydrated:null,treeContext:null,retryLane:0};function vu(e){return{baseLanes:e,cachePool:null,transitions:null}}function Lm(e,t,n){var r=t.pendingProps,o=we.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),he(we,o&1),e===null)return cu(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=El(s,r,0,null),e=Fn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=vu(n),t.memoizedState=yu,e):Rc(t,s));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return A3(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=_n(o,a),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?i=_n(l,i):(i=Fn(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?vu(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=yu,r}return i=e.child,e=i.sibling,r=_n(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=El({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Fi(e,t,n,r){return r!==null&&wc(r),jr(t,e.child,null,n),e=Rc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function A3(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=pa(Error(K(422))),Fi(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=El({mode:"visible",children:r.children},o,0,null),i=Fn(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&jr(t,e.child,null,s),t.child.memoizedState=vu(s),t.memoizedState=yu,i);if(!(t.mode&1))return Fi(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=pa(i,r,void 0),Fi(e,t,s,r)}if(l=(s&e.childLanes)!==0,Ge||l){if(r=be,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,qt(e,o),Mt(r,e,o,-1))}return $c(),r=pa(Error(K(421))),Fi(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=X3.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,nt=vn(o.nextSibling),rt=t,ye=!0,_t=null,e!==null&&(ut[ct++]=Wt,ut[ct++]=Yt,ut[ct++]=Gn,Wt=e.id,Yt=e.overflow,Gn=t),t=Rc(t,r.children),t.flags|=4096,t)}function Dd(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),fu(e.return,t,n)}function ga(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 Rm(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ve(e,t,r.children,n),r=we.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&&Dd(e,n,t);else if(e.tag===19)Dd(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(he(we,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&&Ws(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),ga(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&&Ws(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}ga(t,!0,n,null,i);break;case"together":ga(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function hs(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Jt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Kn|=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=_n(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=_n(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function O3(e,t,n){switch(t.tag){case 3:bm(t),zr();break;case 5:im(t);break;case 1:Ke(t.type)&&$s(t);break;case 4:kc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;he(Fs,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(he(we,we.current&1),t.flags|=128,null):n&t.child.childLanes?Lm(e,t,n):(he(we,we.current&1),e=Jt(e,t,n),e!==null?e.sibling:null);he(we,we.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Rm(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),he(we,we.current),r)break;return null;case 22:case 23:return t.lanes=0,Im(e,t,n)}return Jt(e,t,n)}var Am,wu,Om,Dm;Am=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}};wu=function(){};Om=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,jn(jt.current);var i=null;switch(n){case"input":o=Ha(e,o),r=Ha(e,r),i=[];break;case"select":o=Ee({},o,{value:void 0}),r=Ee({},r,{value:void 0}),i=[];break;case"textarea":o=Ua(e,o),r=Ua(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=zs)}Ya(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"&&(Vo.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"&&(Vo.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&pe("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)}};Dm=function(e,t,n,r){n!==r&&(t.flags|=4)};function lo(e,t){if(!ye)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 De(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 D3(e,t,n){var r=t.pendingProps;switch(vc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return De(t),null;case 1:return Ke(t.type)&&js(),De(t),null;case 3:return r=t.stateNode,$r(),ge(Qe),ge($e),Mc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Vi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_t!==null&&(Mu(_t),_t=null))),wu(e,t),De(t),null;case 5:Nc(t);var o=jn(qo.current);if(n=t.type,e!==null&&t.stateNode!=null)Om(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 De(t),null}if(e=jn(jt.current),Vi(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Ot]=t,r[Ko]=i,e=(t.mode&1)!==0,n){case"dialog":pe("cancel",r),pe("close",r);break;case"iframe":case"object":case"embed":pe("load",r);break;case"video":case"audio":for(o=0;o<mo.length;o++)pe(mo[o],r);break;case"source":pe("error",r);break;case"img":case"image":case"link":pe("error",r),pe("load",r);break;case"details":pe("toggle",r);break;case"input":Wf(r,i),pe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},pe("invalid",r);break;case"textarea":Xf(r,i),pe("invalid",r)}Ya(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&&$i(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&$i(r.textContent,l,e),o=["children",""+l]):Vo.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&pe("scroll",r)}switch(n){case"input":bi(r),Yf(r,i,!0);break;case"textarea":bi(r),Gf(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=zs)}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=cg(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[Ot]=t,e[Ko]=r,Am(e,t,!1,!1),t.stateNode=e;e:{switch(s=Xa(n,r),n){case"dialog":pe("cancel",e),pe("close",e),o=r;break;case"iframe":case"object":case"embed":pe("load",e),o=r;break;case"video":case"audio":for(o=0;o<mo.length;o++)pe(mo[o],e);o=r;break;case"source":pe("error",e),o=r;break;case"img":case"image":case"link":pe("error",e),pe("load",e),o=r;break;case"details":pe("toggle",e),o=r;break;case"input":Wf(e,r),o=Ha(e,r),pe("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Ee({},r,{value:void 0}),pe("invalid",e);break;case"textarea":Xf(e,r),o=Ua(e,r),pe("invalid",e);break;default:o=r}Ya(n,o),l=o;for(i in l)if(l.hasOwnProperty(i)){var a=l[i];i==="style"?hg(e,a):i==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&fg(e,a)):i==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Ho(e,a):typeof a=="number"&&Ho(e,""+a):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Vo.hasOwnProperty(i)?a!=null&&i==="onScroll"&&pe("scroll",e):a!=null&&rc(e,i,a,s))}switch(n){case"input":bi(e),Yf(e,r,!1);break;case"textarea":bi(e),Gf(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Sn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Er(e,!!r.multiple,i,!1):r.defaultValue!=null&&Er(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=zs)}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 De(t),null;case 6:if(e&&t.stateNode!=null)Dm(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(K(166));if(n=jn(qo.current),jn(jt.current),Vi(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ot]=t,(i=r.nodeValue!==n)&&(e=rt,e!==null))switch(e.tag){case 3:$i(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&$i(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ot]=t,t.stateNode=r}return De(t),null;case 13:if(ge(we),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ye&&nt!==null&&t.mode&1&&!(t.flags&128))em(),zr(),t.flags|=98560,i=!1;else if(i=Vi(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[Ot]=t}else zr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;De(t),i=!1}else _t!==null&&(Mu(_t),_t=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||we.current&1?Ie===0&&(Ie=3):$c())),t.updateQueue!==null&&(t.flags|=4),De(t),null);case 4:return $r(),wu(e,t),e===null&&Go(t.stateNode.containerInfo),De(t),null;case 10:return _c(t.type._context),De(t),null;case 17:return Ke(t.type)&&js(),De(t),null;case 19:if(ge(we),i=t.memoizedState,i===null)return De(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)lo(i,!1);else{if(Ie!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Ws(e),s!==null){for(t.flags|=128,lo(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 he(we,we.current&1|2),t.child}e=e.sibling}i.tail!==null&&Ce()>Hr&&(t.flags|=128,r=!0,lo(i,!1),t.lanes=4194304)}else{if(!r)if(e=Ws(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),lo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!ye)return De(t),null}else 2*Ce()-i.renderingStartTime>Hr&&n!==1073741824&&(t.flags|=128,r=!0,lo(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=Ce(),t.sibling=null,n=we.current,he(we,r?n&1|2:n&1),t):(De(t),null);case 22:case 23:return jc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?et&1073741824&&(De(t),t.subtreeFlags&6&&(t.flags|=8192)):De(t),null;case 24:return null;case 25:return null}throw Error(K(156,t.tag))}function z3(e,t){switch(vc(t),t.tag){case 1:return Ke(t.type)&&js(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $r(),ge(Qe),ge($e),Mc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Nc(t),null;case 13:if(ge(we),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(K(340));zr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(we),null;case 4:return $r(),null;case 10:return _c(t.type._context),null;case 22:case 23:return jc(),null;case 24:return null;default:return null}}var Bi=!1,je=!1,j3=typeof WeakSet=="function"?WeakSet:Set,q=null;function mr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){_e(e,t,r)}else n.current=null}function xu(e,t,n){try{n()}catch(r){_e(e,t,r)}}var zd=!1;function $3(e,t){if(ru=As,e=Hg(),mc(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,c=0,f=e,d=null;t:for(;;){for(var h;f!==n||o!==0&&f.nodeType!==3||(l=s+o),f!==i||r!==0&&f.nodeType!==3||(a=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===e)break t;if(d===n&&++u===o&&(l=s),d===i&&++c===r&&(a=s),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(ou={focusedElem:e,selectionRange:n},As=!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 m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var w=m.memoizedProps,E=m.memoizedState,y=t.stateNode,g=y.getSnapshotBeforeUpdate(t.elementType===t.type?w:vt(t.type,w),E);y.__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){_e(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,q=e;break}q=t.return}return m=zd,zd=!1,m}function No(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&&xu(t,n,i)}o=o.next}while(o!==r)}}function wl(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 Eu(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 zm(e){var t=e.alternate;t!==null&&(e.alternate=null,zm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ot],delete t[Ko],delete t[lu],delete t[E3],delete t[_3])),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 jm(e){return e.tag===5||e.tag===3||e.tag===4}function jd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jm(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 _u(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=zs));else if(r!==4&&(e=e.child,e!==null))for(_u(e,t,n),e=e.sibling;e!==null;)_u(e,t,n),e=e.sibling}function Su(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(Su(e,t,n),e=e.sibling;e!==null;)Su(e,t,n),e=e.sibling}var Le=null,Et=!1;function ln(e,t,n){for(n=n.child;n!==null;)$m(e,t,n),n=n.sibling}function $m(e,t,n){if(zt&&typeof zt.onCommitFiberUnmount=="function")try{zt.onCommitFiberUnmount(fl,n)}catch{}switch(n.tag){case 5:je||mr(n,t);case 6:var r=Le,o=Et;Le=null,ln(e,t,n),Le=r,Et=o,Le!==null&&(Et?(e=Le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Le.removeChild(n.stateNode));break;case 18:Le!==null&&(Et?(e=Le,n=n.stateNode,e.nodeType===8?aa(e.parentNode,n):e.nodeType===1&&aa(e,n),Wo(e)):aa(Le,n.stateNode));break;case 4:r=Le,o=Et,Le=n.stateNode.containerInfo,Et=!0,ln(e,t,n),Le=r,Et=o;break;case 0:case 11:case 14:case 15:if(!je&&(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)&&xu(n,t,s),o=o.next}while(o!==r)}ln(e,t,n);break;case 1:if(!je&&(mr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){_e(n,t,l)}ln(e,t,n);break;case 21:ln(e,t,n);break;case 22:n.mode&1?(je=(r=je)||n.memoizedState!==null,ln(e,t,n),je=r):ln(e,t,n);break;default:ln(e,t,n)}}function $d(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new j3),t.forEach(function(r){var o=G3.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function yt(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:Le=l.stateNode,Et=!1;break e;case 3:Le=l.stateNode.containerInfo,Et=!0;break e;case 4:Le=l.stateNode.containerInfo,Et=!0;break e}l=l.return}if(Le===null)throw Error(K(160));$m(i,s,o),Le=null,Et=!1;var a=o.alternate;a!==null&&(a.return=null),o.return=null}catch(u){_e(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Vm(t,e),t=t.sibling}function Vm(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(yt(t,e),Lt(e),r&4){try{No(3,e,e.return),wl(3,e)}catch(w){_e(e,e.return,w)}try{No(5,e,e.return)}catch(w){_e(e,e.return,w)}}break;case 1:yt(t,e),Lt(e),r&512&&n!==null&&mr(n,n.return);break;case 5:if(yt(t,e),Lt(e),r&512&&n!==null&&mr(n,n.return),e.flags&32){var o=e.stateNode;try{Ho(o,"")}catch(w){_e(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&&ag(o,i),Xa(l,s);var u=Xa(l,i);for(s=0;s<a.length;s+=2){var c=a[s],f=a[s+1];c==="style"?hg(o,f):c==="dangerouslySetInnerHTML"?fg(o,f):c==="children"?Ho(o,f):rc(o,c,f,u)}switch(l){case"input":Fa(o,i);break;case"textarea":ug(o,i);break;case"select":var d=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?Er(o,!!i.multiple,h,!1):d!==!!i.multiple&&(i.defaultValue!=null?Er(o,!!i.multiple,i.defaultValue,!0):Er(o,!!i.multiple,i.multiple?[]:"",!1))}o[Ko]=i}catch(w){_e(e,e.return,w)}}break;case 6:if(yt(t,e),Lt(e),r&4){if(e.stateNode===null)throw Error(K(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(w){_e(e,e.return,w)}}break;case 3:if(yt(t,e),Lt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Wo(t.containerInfo)}catch(w){_e(e,e.return,w)}break;case 4:yt(t,e),Lt(e);break;case 13:yt(t,e),Lt(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(Dc=Ce())),r&4&&$d(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(je=(u=je)||c,yt(t,e),je=u):yt(t,e),Lt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(q=e,c=e.child;c!==null;){for(f=q=c;q!==null;){switch(d=q,h=d.child,d.tag){case 0:case 11:case 14:case 15:No(4,d,d.return);break;case 1:mr(d,d.return);var m=d.stateNode;if(typeof m.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(w){_e(r,n,w)}}break;case 5:mr(d,d.return);break;case 22:if(d.memoizedState!==null){Hd(f);continue}}h!==null?(h.return=d,q=h):Hd(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{o=f.stateNode,u?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=f.stateNode,a=f.memoizedProps.style,s=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=dg("display",s))}catch(w){_e(e,e.return,w)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(w){_e(e,e.return,w)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:yt(t,e),Lt(e),r&4&&$d(e);break;case 21:break;default:yt(t,e),Lt(e)}}function Lt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(jm(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&&(Ho(o,""),r.flags&=-33);var i=jd(e);Su(e,i,o);break;case 3:case 4:var s=r.stateNode.containerInfo,l=jd(e);_u(e,l,s);break;default:throw Error(K(161))}}catch(a){_e(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function V3(e,t,n){q=e,Hm(e)}function Hm(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||Bi;if(!s){var l=o.alternate,a=l!==null&&l.memoizedState!==null||je;l=Bi;var u=je;if(Bi=s,(je=a)&&!u)for(q=o;q!==null;)s=q,a=s.child,s.tag===22&&s.memoizedState!==null?Fd(o):a!==null?(a.return=s,q=a):Fd(o);for(;i!==null;)q=i,Hm(i),i=i.sibling;q=o,Bi=l,je=u}Vd(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,q=i):Vd(e)}}function Vd(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:je||wl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!je)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:vt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Cd(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}Cd(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 c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&Wo(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(K(163))}je||t.flags&512&&Eu(t)}catch(d){_e(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 Hd(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 Fd(e){for(;q!==null;){var t=q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{wl(4,t)}catch(a){_e(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(a){_e(t,o,a)}}var i=t.return;try{Eu(t)}catch(a){_e(t,i,a)}break;case 5:var s=t.return;try{Eu(t)}catch(a){_e(t,s,a)}}}catch(a){_e(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 H3=Math.ceil,Gs=tn.ReactCurrentDispatcher,Ac=tn.ReactCurrentOwner,dt=tn.ReactCurrentBatchConfig,ue=0,be=null,ke=null,Re=0,et=0,yr=Nn(0),Ie=0,ni=null,Kn=0,xl=0,Oc=0,Mo=null,Ye=null,Dc=0,Hr=1/0,Ft=null,Qs=!1,Cu=null,xn=null,Ui=!1,pn=null,Ks=0,To=0,ku=null,ps=-1,gs=0;function He(){return ue&6?Ce():ps!==-1?ps:ps=Ce()}function En(e){return e.mode&1?ue&2&&Re!==0?Re&-Re:C3.transition!==null?(gs===0&&(gs=kg()),gs):(e=fe,e!==0||(e=window.event,e=e===void 0?16:Lg(e.type)),e):1}function Mt(e,t,n,r){if(50<To)throw To=0,ku=null,Error(K(185));fi(e,n,r),(!(ue&2)||e!==be)&&(e===be&&(!(ue&2)&&(xl|=n),Ie===4&&dn(e,Re)),Ze(e,r),n===1&&ue===0&&!(t.mode&1)&&(Hr=Ce()+500,ml&&Mn()))}function Ze(e,t){var n=e.callbackNode;CE(e,t);var r=Rs(e,e===be?Re:0);if(r===0)n!==null&&Zf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Zf(n),t===1)e.tag===0?S3(Bd.bind(null,e)):Zg(Bd.bind(null,e)),w3(function(){!(ue&6)&&Mn()}),n=null;else{switch(Ng(r)){case 1:n=ac;break;case 4:n=Sg;break;case 16:n=Ls;break;case 536870912:n=Cg;break;default:n=Ls}n=Qm(n,Fm.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Fm(e,t){if(ps=-1,gs=0,ue&6)throw Error(K(327));var n=e.callbackNode;if(Nr()&&e.callbackNode!==n)return null;var r=Rs(e,e===be?Re:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Zs(e,r);else{t=r;var o=ue;ue|=2;var i=Um();(be!==e||Re!==t)&&(Ft=null,Hr=Ce()+500,Hn(e,t));do try{U3();break}catch(l){Bm(e,l)}while(!0);Ec(),Gs.current=i,ue=o,ke!==null?t=0:(be=null,Re=0,t=Ie)}if(t!==0){if(t===2&&(o=qa(e),o!==0&&(r=o,t=Nu(e,o))),t===1)throw n=ni,Hn(e,0),dn(e,r),Ze(e,Ce()),n;if(t===6)dn(e,r);else{if(o=e.current.alternate,!(r&30)&&!F3(o)&&(t=Zs(e,r),t===2&&(i=qa(e),i!==0&&(r=i,t=Nu(e,i))),t===1))throw n=ni,Hn(e,0),dn(e,r),Ze(e,Ce()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(K(345));case 2:Ln(e,Ye,Ft);break;case 3:if(dn(e,r),(r&130023424)===r&&(t=Dc+500-Ce(),10<t)){if(Rs(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){He(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=su(Ln.bind(null,e,Ye,Ft),t);break}Ln(e,Ye,Ft);break;case 4:if(dn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-Nt(r);i=1<<s,s=t[s],s>o&&(o=s),r&=~i}if(r=o,r=Ce()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*H3(r/1960))-r,10<r){e.timeoutHandle=su(Ln.bind(null,e,Ye,Ft),r);break}Ln(e,Ye,Ft);break;case 5:Ln(e,Ye,Ft);break;default:throw Error(K(329))}}}return Ze(e,Ce()),e.callbackNode===n?Fm.bind(null,e):null}function Nu(e,t){var n=Mo;return e.current.memoizedState.isDehydrated&&(Hn(e,t).flags|=256),e=Zs(e,t),e!==2&&(t=Ye,Ye=n,t!==null&&Mu(t)),e}function Mu(e){Ye===null?Ye=e:Ye.push.apply(Ye,e)}function F3(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(!Tt(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 dn(e,t){for(t&=~Oc,t&=~xl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Nt(t),r=1<<n;e[n]=-1,t&=~r}}function Bd(e){if(ue&6)throw Error(K(327));Nr();var t=Rs(e,0);if(!(t&1))return Ze(e,Ce()),null;var n=Zs(e,t);if(e.tag!==0&&n===2){var r=qa(e);r!==0&&(t=r,n=Nu(e,r))}if(n===1)throw n=ni,Hn(e,0),dn(e,t),Ze(e,Ce()),n;if(n===6)throw Error(K(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ln(e,Ye,Ft),Ze(e,Ce()),null}function zc(e,t){var n=ue;ue|=1;try{return e(t)}finally{ue=n,ue===0&&(Hr=Ce()+500,ml&&Mn())}}function Zn(e){pn!==null&&pn.tag===0&&!(ue&6)&&Nr();var t=ue;ue|=1;var n=dt.transition,r=fe;try{if(dt.transition=null,fe=1,e)return e()}finally{fe=r,dt.transition=n,ue=t,!(ue&6)&&Mn()}}function jc(){et=yr.current,ge(yr)}function Hn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,v3(n)),ke!==null)for(n=ke.return;n!==null;){var r=n;switch(vc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&js();break;case 3:$r(),ge(Qe),ge($e),Mc();break;case 5:Nc(r);break;case 4:$r();break;case 13:ge(we);break;case 19:ge(we);break;case 10:_c(r.type._context);break;case 22:case 23:jc()}n=n.return}if(be=e,ke=e=_n(e.current,null),Re=et=t,Ie=0,ni=null,Oc=xl=Kn=0,Ye=Mo=null,zn!==null){for(t=0;t<zn.length;t++)if(n=zn[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}zn=null}return e}function Bm(e,t){do{var n=ke;try{if(Ec(),fs.current=Xs,Ys){for(var r=xe.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Ys=!1}if(Qn=0,Pe=Te=xe=null,ko=!1,Jo=0,Ac.current=null,n===null||n.return===null){Ie=1,ni=t,ke=null;break}e:{var i=e,s=n.return,l=n,a=t;if(t=Re,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=l,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var d=c.alternate;d?(c.updateQueue=d.updateQueue,c.memoizedState=d.memoizedState,c.lanes=d.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=Pd(s);if(h!==null){h.flags&=-257,bd(h,s,l,i,t),h.mode&1&&Id(i,u,t),t=h,a=u;var m=t.updateQueue;if(m===null){var w=new Set;w.add(a),t.updateQueue=w}else m.add(a);break e}else{if(!(t&1)){Id(i,u,t),$c();break e}a=Error(K(426))}}else if(ye&&l.mode&1){var E=Pd(s);if(E!==null){!(E.flags&65536)&&(E.flags|=256),bd(E,s,l,i,t),wc(Vr(a,l));break e}}i=a=Vr(a,l),Ie!==4&&(Ie=2),Mo===null?Mo=[i]:Mo.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var y=Nm(i,a,t);Sd(i,y);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"&&(xn===null||!xn.has(p)))){i.flags|=65536,t&=-t,i.lanes|=t;var v=Mm(i,l,t);Sd(i,v);break e}}i=i.return}while(i!==null)}Ym(n)}catch(_){t=_,ke===n&&n!==null&&(ke=n=n.return);continue}break}while(!0)}function Um(){var e=Gs.current;return Gs.current=Xs,e===null?Xs:e}function $c(){(Ie===0||Ie===3||Ie===2)&&(Ie=4),be===null||!(Kn&268435455)&&!(xl&268435455)||dn(be,Re)}function Zs(e,t){var n=ue;ue|=2;var r=Um();(be!==e||Re!==t)&&(Ft=null,Hn(e,t));do try{B3();break}catch(o){Bm(e,o)}while(!0);if(Ec(),ue=n,Gs.current=r,ke!==null)throw Error(K(261));return be=null,Re=0,Ie}function B3(){for(;ke!==null;)Wm(ke)}function U3(){for(;ke!==null&&!gE();)Wm(ke)}function Wm(e){var t=Gm(e.alternate,e,et);e.memoizedProps=e.pendingProps,t===null?Ym(e):ke=t,Ac.current=null}function Ym(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=z3(n,t),n!==null){n.flags&=32767,ke=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ie=6,ke=null;return}}else if(n=D3(n,t,et),n!==null){ke=n;return}if(t=t.sibling,t!==null){ke=t;return}ke=t=e}while(t!==null);Ie===0&&(Ie=5)}function Ln(e,t,n){var r=fe,o=dt.transition;try{dt.transition=null,fe=1,W3(e,t,n,r)}finally{dt.transition=o,fe=r}return null}function W3(e,t,n,r){do Nr();while(pn!==null);if(ue&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(kE(e,i),e===be&&(ke=be=null,Re=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ui||(Ui=!0,Qm(Ls,function(){return Nr(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=dt.transition,dt.transition=null;var s=fe;fe=1;var l=ue;ue|=4,Ac.current=null,$3(e,n),Vm(n,e),f3(ou),As=!!ru,ou=ru=null,e.current=n,V3(n),mE(),ue=l,fe=s,dt.transition=i}else e.current=n;if(Ui&&(Ui=!1,pn=e,Ks=o),i=e.pendingLanes,i===0&&(xn=null),wE(n.stateNode),Ze(e,Ce()),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(Qs)throw Qs=!1,e=Cu,Cu=null,e;return Ks&1&&e.tag!==0&&Nr(),i=e.pendingLanes,i&1?e===ku?To++:(To=0,ku=e):To=0,Mn(),null}function Nr(){if(pn!==null){var e=Ng(Ks),t=dt.transition,n=fe;try{if(dt.transition=null,fe=16>e?16:e,pn===null)var r=!1;else{if(e=pn,pn=null,Ks=0,ue&6)throw Error(K(331));var o=ue;for(ue|=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 c=q;switch(c.tag){case 0:case 11:case 15:No(8,c,i)}var f=c.child;if(f!==null)f.return=c,q=f;else for(;q!==null;){c=q;var d=c.sibling,h=c.return;if(zm(c),c===u){q=null;break}if(d!==null){d.return=h,q=d;break}q=h}}}var m=i.alternate;if(m!==null){var w=m.child;if(w!==null){m.child=null;do{var E=w.sibling;w.sibling=null,w=E}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:No(9,i,i.return)}var y=i.sibling;if(y!==null){y.return=i.return,q=y;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:wl(9,l)}}catch(_){_e(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(ue=o,Mn(),zt&&typeof zt.onPostCommitFiberRoot=="function")try{zt.onPostCommitFiberRoot(fl,e)}catch{}r=!0}return r}finally{fe=n,dt.transition=t}}return!1}function Ud(e,t,n){t=Vr(n,t),t=Nm(e,t,1),e=wn(e,t,1),t=He(),e!==null&&(fi(e,1,t),Ze(e,t))}function _e(e,t,n){if(e.tag===3)Ud(e,e,n);else for(;t!==null;){if(t.tag===3){Ud(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(xn===null||!xn.has(r))){e=Vr(n,e),e=Mm(t,e,1),t=wn(t,e,1),e=He(),t!==null&&(fi(t,1,e),Ze(t,e));break}}t=t.return}}function Y3(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=He(),e.pingedLanes|=e.suspendedLanes&n,be===e&&(Re&n)===n&&(Ie===4||Ie===3&&(Re&130023424)===Re&&500>Ce()-Dc?Hn(e,0):Oc|=n),Ze(e,t)}function Xm(e,t){t===0&&(e.mode&1?(t=Ai,Ai<<=1,!(Ai&130023424)&&(Ai=4194304)):t=1);var n=He();e=qt(e,t),e!==null&&(fi(e,t,n),Ze(e,n))}function X3(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Xm(e,n)}function G3(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),Xm(e,n)}var Gm;Gm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Qe.current)Ge=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ge=!1,O3(e,t,n);Ge=!!(e.flags&131072)}else Ge=!1,ye&&t.flags&1048576&&qg(t,Hs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;hs(e,t),e=t.pendingProps;var o=Dr(t,$e.current);kr(t,n),o=Ic(null,t,r,e,o,n);var i=Pc();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,Ke(r)?(i=!0,$s(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Cc(t),o.updater=vl,t.stateNode=o,o._reactInternals=t,hu(t,r,e,n),t=mu(null,t,r,!0,i,n)):(t.tag=0,ye&&i&&yc(t),Ve(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(hs(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=K3(r),e=vt(r,e),o){case 0:t=gu(null,t,r,e,n);break e;case 1:t=Ad(null,t,r,e,n);break e;case 11:t=Ld(null,t,r,e,n);break e;case 14:t=Rd(null,t,r,vt(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:vt(r,o),gu(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:vt(r,o),Ad(e,t,r,o,n);case 3:e:{if(bm(t),e===null)throw Error(K(387));r=t.pendingProps,i=t.memoizedState,o=i.element,om(e,t),Us(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=Vr(Error(K(423)),t),t=Od(e,t,r,n,o);break e}else if(r!==o){o=Vr(Error(K(424)),t),t=Od(e,t,r,n,o);break e}else for(nt=vn(t.stateNode.containerInfo.firstChild),rt=t,ye=!0,_t=null,n=nm(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(zr(),r===o){t=Jt(e,t,n);break e}Ve(e,t,r,n)}t=t.child}return t;case 5:return im(t),e===null&&cu(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,iu(r,o)?s=null:i!==null&&iu(r,i)&&(t.flags|=32),Pm(e,t),Ve(e,t,s,n),t.child;case 6:return e===null&&cu(t),null;case 13:return Lm(e,t,n);case 4:return kc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=jr(t,null,r,n):Ve(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:vt(r,o),Ld(e,t,r,o,n);case 7:return Ve(e,t,t.pendingProps,n),t.child;case 8:return Ve(e,t,t.pendingProps.children,n),t.child;case 12:return Ve(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,he(Fs,r._currentValue),r._currentValue=s,i!==null)if(Tt(i.value,s)){if(i.children===o.children&&!Qe.current){t=Jt(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=Xt(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),fu(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),fu(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}Ve(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,kr(t,n),o=ht(o),r=r(o),t.flags|=1,Ve(e,t,r,n),t.child;case 14:return r=t.type,o=vt(r,t.pendingProps),o=vt(r.type,o),Rd(e,t,r,o,n);case 15:return Tm(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:vt(r,o),hs(e,t),t.tag=1,Ke(r)?(e=!0,$s(t)):e=!1,kr(t,n),km(t,r,o),hu(t,r,o,n),mu(null,t,r,!0,e,n);case 19:return Rm(e,t,n);case 22:return Im(e,t,n)}throw Error(K(156,t.tag))};function Qm(e,t){return _g(e,t)}function Q3(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 ft(e,t,n,r){return new Q3(e,t,n,r)}function Vc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function K3(e){if(typeof e=="function")return Vc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ic)return 11;if(e===sc)return 14}return 2}function _n(e,t){var n=e.alternate;return n===null?(n=ft(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 ms(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Vc(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case lr:return Fn(n.children,o,i,t);case oc:s=8,o|=8;break;case za:return e=ft(12,n,t,o|2),e.elementType=za,e.lanes=i,e;case ja:return e=ft(13,n,t,o),e.elementType=ja,e.lanes=i,e;case $a:return e=ft(19,n,t,o),e.elementType=$a,e.lanes=i,e;case ig:return El(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case rg:s=10;break e;case og:s=9;break e;case ic:s=11;break e;case sc:s=14;break e;case an:s=16,r=null;break e}throw Error(K(130,e==null?e:typeof e,""))}return t=ft(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Fn(e,t,n,r){return e=ft(7,e,r,t),e.lanes=n,e}function El(e,t,n,r){return e=ft(22,e,r,t),e.elementType=ig,e.lanes=n,e.stateNode={isHidden:!1},e}function ma(e,t,n){return e=ft(6,e,null,t),e.lanes=n,e}function ya(e,t,n){return t=ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Z3(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=Zl(0),this.expirationTimes=Zl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zl(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Hc(e,t,n,r,o,i,s,l,a){return e=new Z3(e,t,n,l,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ft(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cc(i),e}function q3(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:sr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Km(e){if(!e)return Cn;e=e._reactInternals;e:{if(tr(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(Ke(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(Ke(n))return Kg(e,n,t)}return t}function Zm(e,t,n,r,o,i,s,l,a){return e=Hc(n,r,!0,e,o,i,s,l,a),e.context=Km(null),n=e.current,r=He(),o=En(n),i=Xt(r,o),i.callback=t??null,wn(n,i,o),e.current.lanes=o,fi(e,o,r),Ze(e,r),e}function _l(e,t,n,r){var o=t.current,i=He(),s=En(o);return n=Km(n),t.context===null?t.context=n:t.pendingContext=n,t=Xt(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=wn(o,t,s),e!==null&&(Mt(e,o,s,i),cs(e,o,s)),s}function qs(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 Wd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Fc(e,t){Wd(e,t),(e=e.alternate)&&Wd(e,t)}function J3(){return null}var qm=typeof reportError=="function"?reportError:function(e){console.error(e)};function Bc(e){this._internalRoot=e}Sl.prototype.render=Bc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(K(409));_l(e,t,null,null)};Sl.prototype.unmount=Bc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zn(function(){_l(null,e,null,null)}),t[Zt]=null}};function Sl(e){this._internalRoot=e}Sl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ig();e={blockedOn:null,target:e,priority:t};for(var n=0;n<fn.length&&t!==0&&t<fn[n].priority;n++);fn.splice(n,0,e),n===0&&bg(e)}};function Uc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Cl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Yd(){}function e_(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var u=qs(s);i.call(u)}}var s=Zm(t,r,e,0,null,!1,!1,"",Yd);return e._reactRootContainer=s,e[Zt]=s.current,Go(e.nodeType===8?e.parentNode:e),Zn(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var l=r;r=function(){var u=qs(a);l.call(u)}}var a=Hc(e,0,!1,null,null,!1,!1,"",Yd);return e._reactRootContainer=a,e[Zt]=a.current,Go(e.nodeType===8?e.parentNode:e),Zn(function(){_l(t,a,n,r)}),a}function kl(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=qs(s);l.call(a)}}_l(t,s,e,o)}else s=e_(n,t,e,o,r);return qs(s)}Mg=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=go(t.pendingLanes);n!==0&&(uc(t,n|1),Ze(t,Ce()),!(ue&6)&&(Hr=Ce()+500,Mn()))}break;case 13:Zn(function(){var r=qt(e,1);if(r!==null){var o=He();Mt(r,e,1,o)}}),Fc(e,1)}};cc=function(e){if(e.tag===13){var t=qt(e,134217728);if(t!==null){var n=He();Mt(t,e,134217728,n)}Fc(e,134217728)}};Tg=function(e){if(e.tag===13){var t=En(e),n=qt(e,t);if(n!==null){var r=He();Mt(n,e,t,r)}Fc(e,t)}};Ig=function(){return fe};Pg=function(e,t){var n=fe;try{return fe=e,t()}finally{fe=n}};Qa=function(e,t,n){switch(t){case"input":if(Fa(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=gl(r);if(!o)throw Error(K(90));lg(r),Fa(r,o)}}}break;case"textarea":ug(e,n);break;case"select":t=n.value,t!=null&&Er(e,!!n.multiple,t,!1)}};mg=zc;yg=Zn;var t_={usingClientEntryPoint:!1,Events:[hi,fr,gl,pg,gg,zc]},ao={findFiberByHostInstance:Dn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},n_={bundleType:ao.bundleType,version:ao.version,rendererPackageName:ao.rendererPackageName,rendererConfig:ao.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:tn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=xg(e),e===null?null:e.stateNode},findFiberByHostInstance:ao.findFiberByHostInstance||J3,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 Wi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wi.isDisabled&&Wi.supportsFiber)try{fl=Wi.inject(n_),zt=Wi}catch{}}st.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=t_;st.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Uc(t))throw Error(K(200));return q3(e,t,null,n)};st.createRoot=function(e,t){if(!Uc(e))throw Error(K(299));var n=!1,r="",o=qm;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Hc(e,1,!1,null,null,n,!1,r,o),e[Zt]=t.current,Go(e.nodeType===8?e.parentNode:e),new Bc(t)};st.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=xg(t),e=e===null?null:e.stateNode,e};st.flushSync=function(e){return Zn(e)};st.hydrate=function(e,t,n){if(!Cl(t))throw Error(K(200));return kl(null,e,t,!0,n)};st.hydrateRoot=function(e,t,n){if(!Uc(e))throw Error(K(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",s=qm;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=Zm(t,null,e,1,n??null,o,!1,i,s),e[Zt]=t.current,Go(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 Sl(t)};st.render=function(e,t,n){if(!Cl(t))throw Error(K(200));return kl(null,e,t,!1,n)};st.unmountComponentAtNode=function(e){if(!Cl(e))throw Error(K(40));return e._reactRootContainer?(Zn(function(){kl(null,null,e,!1,function(){e._reactRootContainer=null,e[Zt]=null})}),!0):!1};st.unstable_batchedUpdates=zc;st.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Cl(n))throw Error(K(200));if(e==null||e._reactInternals===void 0)throw Error(K(38));return kl(e,t,n,!1,r)};st.version="18.3.1-next-f1338f8080-20240426";function Jm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Jm)}catch(e){console.error(e)}}Jm(),Jp.exports=st;var Nl=Jp.exports;const Ml=V.createContext(null),r_=Ml.Provider,e0=$t.error001();function ae(e,t){const n=V.useContext(Ml);if(n===null)throw new Error(e0);return qp(n,e,t)}function ve(){const e=V.useContext(Ml);if(e===null)throw new Error(e0);return V.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const Xd={display:"none"},o_={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},t0="react-flow__node-desc",n0="react-flow__edge-desc",i_="react-flow__aria-live",s_=e=>e.ariaLiveMessage,l_=e=>e.ariaLabelConfig;function a_({rfId:e}){const t=ae(s_);return F.jsx("div",{id:`${i_}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:o_,children:t})}function u_({rfId:e,disableKeyboardA11y:t}){const n=ae(l_);return F.jsxs(F.Fragment,{children:[F.jsx("div",{id:`${t0}-${e}`,style:Xd,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),F.jsx("div",{id:`${n0}-${e}`,style:Xd,children:n["edge.a11yDescription.default"]}),!t&&F.jsx(a_,{rfId:e})]})}const gi=V.forwardRef(({position:e="top-left",children:t,className:n,style:r,...o},i)=>{const s=`${e}`.split("-");return F.jsx("div",{className:Me(["react-flow__panel",n,...s]),style:r,ref:i,...o,children:t})});gi.displayName="Panel";function c_({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:F.jsx(gi,{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 f_=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}},Yi=e=>e.id;function d_(e,t){return me(e.selectedNodes.map(Yi),t.selectedNodes.map(Yi))&&me(e.selectedEdges.map(Yi),t.selectedEdges.map(Yi))}function h_({onSelectionChange:e}){const t=ve(),{selectedNodes:n,selectedEdges:r}=ae(f_,d_);return V.useEffect(()=>{const o={nodes:n,edges:r};e==null||e(o),t.getState().onSelectionChangeHandlers.forEach(i=>i(o))},[n,r,e]),null}const p_=e=>!!e.onSelectionChangeHandlers;function g_({onSelectionChange:e}){const t=ae(p_);return e||t?F.jsx(h_,{onSelectionChange:e}):null}const Tu=typeof window<"u"?V.useLayoutEffect:V.useEffect,r0=[0,0],m_={x:0,y:0,zoom:1},y_=["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=[...y_,"rfId"],v_=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}),Qd={translateExtent:Do,nodeOrigin:r0,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function w_(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:o,setTranslateExtent:i,setNodeExtent:s,reset:l,setDefaultNodesAndEdges:a}=ae(v_,me),u=ve();Tu(()=>(a(e.defaultNodes,e.defaultEdges),()=>{c.current=Qd,l()}),[]);const c=V.useRef(Qd);return Tu(()=>{for(const f of Gd){const d=e[f],h=c.current[f];d!==h&&(typeof e[f]>"u"||(f==="nodes"?t(d):f==="edges"?n(d):f==="minZoom"?r(d):f==="maxZoom"?o(d):f==="translateExtent"?i(d):f==="nodeExtent"?s(d):f==="ariaLabelConfig"?u.setState({ariaLabelConfig:jw(d)}):f==="fitView"?u.setState({fitViewQueued:d}):f==="fitViewOptions"?u.setState({fitViewOptions:d}):u.setState({[f]:d})))}c.current=e},Gd.map(f=>e[f])),null}function Kd(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function x_(e){var r;const[t,n]=V.useState(e==="system"?null:e);return V.useEffect(()=>{if(e!=="system"){n(e);return}const o=Kd(),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=Kd())!=null&&r.matches?"dark":"light"}const Zd=typeof document<"u"?document:null;function ri(e=null,t={target:Zd,actInsideInputWithModifier:!0}){const[n,r]=V.useState(!1),o=V.useRef(!1),i=V.useRef(new Set([])),[s,l]=V.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",`
|
|
58
|
+
`).replace(`
|
|
59
|
+
|
|
60
|
+
`,`
|
|
61
|
+
+`).split(`
|
|
62
|
+
`)),c=u.reduce((f,d)=>f.concat(...d),[]);return[u,c]}return[[],[]]},[e]);return V.useEffect(()=>{const a=(t==null?void 0:t.target)??Zd,u=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const c=h=>{var E,y;if(o.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!o.current||o.current&&!u)&&bp(h))return!1;const w=Jd(h.code,l);if(i.current.add(h[w]),qd(s,i.current,!1)){const g=((y=(E=h.composedPath)==null?void 0:E.call(h))==null?void 0:y[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)}},f=h=>{const m=Jd(h.code,l);qd(s,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(h[m]),h.key==="Meta"&&i.current.clear(),o.current=!1},d=()=>{i.current.clear(),r(!1)};return a==null||a.addEventListener("keydown",c),a==null||a.addEventListener("keyup",f),window.addEventListener("blur",d),window.addEventListener("contextmenu",d),()=>{a==null||a.removeEventListener("keydown",c),a==null||a.removeEventListener("keyup",f),window.removeEventListener("blur",d),window.removeEventListener("contextmenu",d)}}},[e,r]),n}function qd(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(o=>t.has(o)))}function Jd(e,t){return t.includes(e)?"code":"key"}const E_=()=>{const e=ve();return V.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=Gu(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},c=n.snapGrid??o,f=n.snapToGrid??i;return ci(u,r,f,c)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:o,y:i}=r.getBoundingClientRect(),s=Ms(t,n);return{x:s.x+o,y:s.y+i}}}),[])};function o0(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)__(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 __(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 i0(e,t){return o0(e,t)}function s0(e,t){return o0(e,t)}function Rn(e,t){return{id:e,type:"select",selected:t}}function vr(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(Rn(i.id,s)))}return r}function eh({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 th(e){return{id:e.id,type:"remove"}}const nh=e=>Tw(e),S_=e=>Sp(e);function l0(e){return V.forwardRef(e)}function rh(e){const[t,n]=V.useState(BigInt(0)),[r]=V.useState(()=>C_(()=>n(o=>o+BigInt(1))));return Tu(()=>{const o=r.get();o.length&&(e(o),r.reset())},[t]),r}function C_(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const a0=V.createContext(null);function k_({children:e}){const t=ve(),n=V.useCallback(l=>{const{nodes:a=[],setNodes:u,hasDefaultNodes:c,onNodesChange:f,nodeLookup:d,fitViewQueued:h,onNodesChangeMiddlewareMap:m}=t.getState();let w=a;for(const y of l)w=typeof y=="function"?y(w):y;let E=eh({items:w,lookup:d});for(const y of m.values())E=y(E);c&&u(w),E.length>0?f==null||f(E):h&&window.requestAnimationFrame(()=>{const{fitViewQueued:y,nodes:g,setNodes:p}=t.getState();y&&p(g)})},[]),r=rh(n),o=V.useCallback(l=>{const{edges:a=[],setEdges:u,hasDefaultEdges:c,onEdgesChange:f,edgeLookup:d}=t.getState();let h=a;for(const m of l)h=typeof m=="function"?m(h):m;c?u(h):f&&f(eh({items:h,lookup:d}))},[]),i=rh(o),s=V.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return F.jsx(a0.Provider,{value:s,children:e})}function N_(){const e=V.useContext(a0);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const M_=e=>!!e.panZoom;function Tl(){const e=E_(),t=ve(),n=N_(),r=ae(M_),o=V.useMemo(()=>{const i=f=>t.getState().nodeLookup.get(f),s=f=>{n.nodeQueue.push(f)},l=f=>{n.edgeQueue.push(f)},a=f=>{var y,g;const{nodeLookup:d,nodeOrigin:h}=t.getState(),m=nh(f)?f:d.get(f.id),w=m.parentId?Ip(m.position,m.measured,m.parentId,d,h):m.position,E={...m,position:w,width:((y=m.measured)==null?void 0:y.width)??m.width,height:((g=m.measured)==null?void 0:g.height)??m.height};return br(E)},u=(f,d,h={replace:!1})=>{s(m=>m.map(w=>{if(w.id===f){const E=typeof d=="function"?d(w):d;return h.replace&&nh(E)?E:{...w,...E}}return w}))},c=(f,d,h={replace:!1})=>{l(m=>m.map(w=>{if(w.id===f){const E=typeof d=="function"?d(w):d;return h.replace&&S_(E)?E:{...w,...E}}return w}))};return{getNodes:()=>t.getState().nodes.map(f=>({...f})),getNode:f=>{var d;return(d=i(f))==null?void 0:d.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:f=[]}=t.getState();return f.map(d=>({...d}))},getEdge:f=>t.getState().edgeLookup.get(f),setNodes:s,setEdges:l,addNodes:f=>{const d=Array.isArray(f)?f:[f];n.nodeQueue.push(h=>[...h,...d])},addEdges:f=>{const d=Array.isArray(f)?f:[f];n.edgeQueue.push(h=>[...h,...d])},toObject:()=>{const{nodes:f=[],edges:d=[],transform:h}=t.getState(),[m,w,E]=h;return{nodes:f.map(y=>({...y})),edges:d.map(y=>({...y})),viewport:{x:m,y:w,zoom:E}}},deleteElements:async({nodes:f=[],edges:d=[]})=>{const{nodes:h,edges:m,onNodesDelete:w,onEdgesDelete:E,triggerNodeChanges:y,triggerEdgeChanges:g,onDelete:p,onBeforeDelete:v}=t.getState(),{nodes:_,edges:S}=await Rw({nodesToRemove:f,edgesToRemove:d,nodes:h,edges:m,onBeforeDelete:v}),T=S.length>0,N=_.length>0;if(T){const B=S.map(th);E==null||E(S),g(B)}if(N){const B=_.map(th);w==null||w(_),y(B)}return(N||T)&&(p==null||p({nodes:_,edges:S})),{deletedNodes:_,deletedEdges:S}},getIntersectingNodes:(f,d=!0,h)=>{const m=Mf(f),w=m?f:a(f),E=h!==void 0;return w?(h||t.getState().nodes).filter(y=>{const g=t.getState().nodeLookup.get(y.id);if(g&&!m&&(y.id===f.id||!g.internals.positionAbsolute))return!1;const p=br(E?y:g),v=jo(p,w);return d&&v>0||v>=p.width*p.height||v>=w.width*w.height}):[]},isNodeIntersecting:(f,d,h=!0)=>{const w=Mf(f)?f:a(f);if(!w)return!1;const E=jo(w,d);return h&&E>0||E>=d.width*d.height||E>=w.width*w.height},updateNode:u,updateNodeData:(f,d,h={replace:!1})=>{u(f,m=>{const w=typeof d=="function"?d(m):d;return h.replace?{...m,data:w}:{...m,data:{...m.data,...w}}},h)},updateEdge:c,updateEdgeData:(f,d,h={replace:!1})=>{c(f,m=>{const w=typeof d=="function"?d(m):d;return h.replace?{...m,data:w}:{...m,data:{...m.data,...w}}},h)},getNodesBounds:f=>{const{nodeLookup:d,nodeOrigin:h}=t.getState();return Iw(f,{nodeLookup:d,nodeOrigin:h})},getHandleConnections:({type:f,id:d,nodeId:h})=>{var m;return Array.from(((m=t.getState().connectionLookup.get(`${h}-${f}${d?`-${d}`:""}`))==null?void 0:m.values())??[])},getNodeConnections:({type:f,handleId:d,nodeId:h})=>{var m;return Array.from(((m=t.getState().connectionLookup.get(`${h}${f?d?`-${f}-${d}`:`-${f}`:""}`))==null?void 0:m.values())??[])},fitView:async f=>{const d=t.getState().fitViewResolver??zw();return t.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:d}),n.nodeQueue.push(h=>[...h]),d.promise}}},[]);return V.useMemo(()=>({...o,...e,viewportInitialized:r}),[r])}const oh=e=>e.selected,T_=typeof window<"u"?window:void 0;function I_({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=ve(),{deleteElements:r}=Tl(),o=ri(e,{actInsideInputWithModifier:!1}),i=ri(t,{target:T_});V.useEffect(()=>{if(o){const{edges:s,nodes:l}=n.getState();r({nodes:l.filter(oh),edges:s.filter(oh)}),n.setState({nodesSelectionActive:!1})}},[o]),V.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function P_(e){const t=ve();V.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=Qu(e.current);(r.height===0||r.width===0)&&((l=(s=t.getState()).onError)==null||l.call(s,"004",$t.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 Il={position:"absolute",width:"100%",height:"100%",top:0,left:0},b_=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function L_({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:o=.5,panOnScrollMode:i=Vn.Free,zoomOnDoubleClick:s=!0,panOnDrag:l=!0,defaultViewport:a,translateExtent:u,minZoom:c,maxZoom:f,zoomActivationKeyCode:d,preventScrolling:h=!0,children:m,noWheelClassName:w,noPanClassName:E,onViewportChange:y,isControlledViewport:g,paneClickDistance:p,selectionOnDrag:v}){const _=ve(),S=V.useRef(null),{userSelectionActive:T,lib:N,connectionInProgress:B}=ae(b_,me),b=ri(d),P=V.useRef();P_(S);const j=V.useCallback(H=>{y==null||y({x:H[0],y:H[1],zoom:H[2]}),g||_.setState({transform:H})},[y,g]);return V.useEffect(()=>{if(S.current){P.current=xx({domNode:S.current,minZoom:c,maxZoom:f,translateExtent:u,viewport:a,onDraggingChange:I=>_.setState(A=>A.paneDragging===I?A:{paneDragging:I}),onPanZoomStart:(I,A)=>{const{onViewportChangeStart:C,onMoveStart:M}=_.getState();M==null||M(I,A),C==null||C(A)},onPanZoom:(I,A)=>{const{onViewportChange:C,onMove:M}=_.getState();M==null||M(I,A),C==null||C(A)},onPanZoomEnd:(I,A)=>{const{onViewportChangeEnd:C,onMoveEnd:M}=_.getState();M==null||M(I,A),C==null||C(A)}});const{x:H,y:x,zoom:D}=P.current.getViewport();return _.setState({panZoom:P.current,transform:[H,x,D],domNode:S.current.closest(".react-flow")}),()=>{var I;(I=P.current)==null||I.destroy()}}},[]),V.useEffect(()=>{var H;(H=P.current)==null||H.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:o,panOnScrollMode:i,zoomOnDoubleClick:s,panOnDrag:l,zoomActivationKeyPressed:b,preventScrolling:h,noPanClassName:E,userSelectionActive:T,noWheelClassName:w,lib:N,onTransformChange:j,connectionInProgress:B,selectionOnDrag:v,paneClickDistance:p})},[e,t,n,r,o,i,s,l,b,h,E,T,w,N,j,B,v,p]),F.jsx("div",{className:"react-flow__renderer",ref:S,style:Il,children:m})}const R_=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function A_(){const{userSelectionActive:e,userSelectionRect:t}=ae(R_,me);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 va=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},O_=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function D_({isSelecting:e,selectionKeyPressed:t,selectionMode:n=zo.Full,panOnDrag:r,paneClickDistance:o,selectionOnDrag:i,onSelectionStart:s,onSelectionEnd:l,onPaneClick:a,onPaneContextMenu:u,onPaneScroll:c,onPaneMouseEnter:f,onPaneMouseMove:d,onPaneMouseLeave:h,children:m}){const w=ve(),{userSelectionActive:E,elementsSelectable:y,dragging:g,connectionInProgress:p}=ae(O_,me),v=y&&(e||E),_=V.useRef(null),S=V.useRef(),T=V.useRef(new Set),N=V.useRef(new Set),B=V.useRef(!1),b=C=>{if(B.current||p){B.current=!1;return}a==null||a(C),w.getState().resetSelectedElements(),w.setState({nodesSelectionActive:!1})},P=C=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){C.preventDefault();return}u==null||u(C)},j=c?C=>c(C):void 0,H=C=>{B.current&&(C.stopPropagation(),B.current=!1)},x=C=>{var k,$;const{domNode:M}=w.getState();if(S.current=M==null?void 0:M.getBoundingClientRect(),!S.current)return;const z=C.target===_.current;if(!z&&!!C.target.closest(".nokey")||!e||!(i&&z||t)||C.button!==0||!C.isPrimary)return;($=(k=C.target)==null?void 0:k.setPointerCapture)==null||$.call(k,C.pointerId),B.current=!1;const{x:Y,y:R}=kt(C.nativeEvent,S.current);w.setState({userSelectionRect:{width:0,height:0,startX:Y,startY:R,x:Y,y:R}}),z||(C.stopPropagation(),C.preventDefault())},D=C=>{const{userSelectionRect:M,transform:z,nodeLookup:O,edgeLookup:L,connectionLookup:Y,triggerNodeChanges:R,triggerEdgeChanges:k,defaultEdgeOptions:$,resetSelectedElements:U}=w.getState();if(!S.current||!M)return;const{x:W,y:X}=kt(C.nativeEvent,S.current),{startX:G,startY:Q}=M;if(!B.current){const se=t?0:o;if(Math.hypot(W-G,X-Q)<=se)return;U(),s==null||s(C)}B.current=!0;const Z={startX:G,startY:Q,x:W<G?W:G,y:X<Q?X:Q,width:Math.abs(W-G),height:Math.abs(X-Q)},ee=T.current,re=N.current;T.current=new Set(Xu(O,Z,z,n===zo.Partial,!0).map(se=>se.id)),N.current=new Set;const ie=($==null?void 0:$.selectable)??!0;for(const se of T.current){const Se=Y.get(se);if(Se)for(const{edgeId:qe}of Se.values()){const gt=L.get(qe);gt&&(gt.selectable??ie)&&N.current.add(qe)}}if(!Tf(ee,T.current)){const se=vr(O,T.current,!0);R(se)}if(!Tf(re,N.current)){const se=vr(L,N.current);k(se)}w.setState({userSelectionRect:Z,userSelectionActive:!0,nodesSelectionActive:!1})},I=C=>{var M,z;C.button===0&&((z=(M=C.target)==null?void 0:M.releasePointerCapture)==null||z.call(M,C.pointerId),!E&&C.target===_.current&&w.getState().userSelectionRect&&(b==null||b(C)),w.setState({userSelectionActive:!1,userSelectionRect:null}),B.current&&(l==null||l(C),w.setState({nodesSelectionActive:T.current.size>0})))},A=r===!0||Array.isArray(r)&&r.includes(0);return F.jsxs("div",{className:Me(["react-flow__pane",{draggable:A,dragging:g,selection:e}]),onClick:v?void 0:va(b,_),onContextMenu:va(P,_),onWheel:va(j,_),onPointerEnter:v?void 0:f,onPointerMove:v?D:d,onPointerUp:v?I:void 0,onPointerDownCapture:v?x:void 0,onClickCapture:v?H:void 0,onPointerLeave:h,ref:_,style:Il,children:[m,F.jsx(A_,{})]})}function Iu({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",$t.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&s)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var c;return(c=r==null?void 0:r.current)==null?void 0:c.blur()})):o([e])}function u0({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:i,nodeClickDistance:s}){const l=ve(),[a,u]=V.useState(!1),c=V.useRef();return V.useEffect(()=>{c.current=sx({getStoreItems:()=>l.getState(),onNodeMouseDown:f=>{Iu({id:f,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),V.useEffect(()=>{if(!(t||!e.current||!c.current))return c.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:o,nodeClickDistance:s}),()=>{var f;(f=c.current)==null||f.destroy()}},[n,r,t,i,e,o,s]),a}const z_=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function c0(){const e=ve();return V.useCallback(n=>{const{nodeExtent:r,snapToGrid:o,snapGrid:i,nodesDraggable:s,onError:l,updateNodePositions:a,nodeLookup:u,nodeOrigin:c}=e.getState(),f=new Map,d=z_(s),h=o?i[0]:5,m=o?i[1]:5,w=n.direction.x*h*n.factor,E=n.direction.y*m*n.factor;for(const[,y]of u){if(!d(y))continue;let g={x:y.internals.positionAbsolute.x+w,y:y.internals.positionAbsolute.y+E};o&&(g=ui(g,i));const{position:p,positionAbsolute:v}=Cp({nodeId:y.id,nextPosition:g,nodeLookup:u,nodeExtent:r,nodeOrigin:c,onError:l});y.position=p,y.internals.positionAbsolute=v,f.set(y.id,y)}a(f)},[])}const Wc=V.createContext(null),j_=Wc.Provider;Wc.Consumer;const f0=()=>V.useContext(Wc),$_=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),V_=(e,t,n)=>r=>{const{connectionClickStartHandle:o,connectionMode:i,connection:s}=r,{fromHandle:l,toHandle:a,isValid:u}=s,c=(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:c,clickConnecting:(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.id)===t&&(o==null?void 0:o.type)===n,isPossibleEndHandle:i===Ir.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:c&&u}};function H_({type:e="source",position:t=te.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:i=!0,id:s,onConnect:l,children:a,className:u,onMouseDown:c,onTouchStart:f,...d},h){var D,I;const m=s||null,w=e==="target",E=ve(),y=f0(),{connectOnClick:g,noPanClassName:p,rfId:v}=ae($_,me),{connectingFrom:_,connectingTo:S,clickConnecting:T,isPossibleEndHandle:N,connectionInProcess:B,clickConnectionInProcess:b,valid:P}=ae(V_(y,m,e),me);y||(I=(D=E.getState()).onError)==null||I.call(D,"010",$t.error010());const j=A=>{const{defaultEdgeOptions:C,onConnect:M,hasDefaultEdges:z}=E.getState(),O={...C,...A};if(z){const{edges:L,setEdges:Y}=E.getState();Y(Uw(O,L))}M==null||M(O),l==null||l(O)},H=A=>{if(!y)return;const C=Lp(A.nativeEvent);if(o&&(C&&A.button===0||!C)){const M=E.getState();Oa.onPointerDown(A.nativeEvent,{handleDomNode:A.currentTarget,autoPanOnConnect:M.autoPanOnConnect,connectionMode:M.connectionMode,connectionRadius:M.connectionRadius,domNode:M.domNode,nodeLookup:M.nodeLookup,lib:M.lib,isTarget:w,handleId:m,nodeId:y,flowId:M.rfId,panBy:M.panBy,cancelConnection:M.cancelConnection,onConnectStart:M.onConnectStart,onConnectEnd:(...z)=>{var O,L;return(L=(O=E.getState()).onConnectEnd)==null?void 0:L.call(O,...z)},updateConnection:M.updateConnection,onConnect:j,isValidConnection:n||((...z)=>{var O,L;return((L=(O=E.getState()).isValidConnection)==null?void 0:L.call(O,...z))??!0}),getTransform:()=>E.getState().transform,getFromHandle:()=>E.getState().connection.fromHandle,autoPanSpeed:M.autoPanSpeed,dragThreshold:M.connectionDragThreshold})}C?c==null||c(A):f==null||f(A)},x=A=>{const{onClickConnectStart:C,onClickConnectEnd:M,connectionClickStartHandle:z,connectionMode:O,isValidConnection:L,lib:Y,rfId:R,nodeLookup:k,connection:$}=E.getState();if(!y||!z&&!o)return;if(!z){C==null||C(A.nativeEvent,{nodeId:y,handleId:m,handleType:e}),E.setState({connectionClickStartHandle:{nodeId:y,type:e,id:m}});return}const U=Pp(A.target),W=n||L,{connection:X,isValid:G}=Oa.isValid(A.nativeEvent,{handle:{nodeId:y,id:m,type:e},connectionMode:O,fromNodeId:z.nodeId,fromHandleId:z.id||null,fromType:z.type,isValidConnection:W,flowId:R,doc:U,lib:Y,nodeLookup:k});G&&X&&j(X);const Q=structuredClone($);delete Q.inProgress,Q.toPosition=Q.toHandle?Q.toHandle.position:null,M==null||M(A,Q),E.setState({connectionClickStartHandle:null})};return F.jsx("div",{"data-handleid":m,"data-nodeid":y,"data-handlepos":t,"data-id":`${v}-${y}-${m}-${e}`,className:Me(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",p,u,{source:!w,target:w,connectable:r,connectablestart:o,connectableend:i,clickconnecting:T,connectingfrom:_,connectingto:S,valid:P,connectionindicator:r&&(!B||N)&&(B||b?i:o)}]),onMouseDown:H,onTouchStart:H,onClick:g?x:void 0,ref:h,...d,children:a})}const qn=V.memo(l0(H_));function F_({data:e,isConnectable:t,sourcePosition:n=te.Bottom}){return F.jsxs(F.Fragment,{children:[e==null?void 0:e.label,F.jsx(qn,{type:"source",position:n,isConnectable:t})]})}function B_({data:e,isConnectable:t,targetPosition:n=te.Top,sourcePosition:r=te.Bottom}){return F.jsxs(F.Fragment,{children:[F.jsx(qn,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,F.jsx(qn,{type:"source",position:r,isConnectable:t})]})}function U_(){return null}function W_({data:e,isConnectable:t,targetPosition:n=te.Top}){return F.jsxs(F.Fragment,{children:[F.jsx(qn,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Js={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},ih={input:F_,default:B_,output:W_,group:U_};function Y_(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 X_=e=>{const{width:t,height:n,x:r,y:o}=ai(e.nodeLookup,{filter:i=>!!i.selected});return{width:Ct(t)?t:null,height:Ct(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 G_({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=ve(),{width:o,height:i,transformString:s,userSelectionActive:l}=ae(X_,me),a=c0(),u=V.useRef(null);V.useEffect(()=>{var h;n||(h=u.current)==null||h.focus({preventScroll:!0})},[n]);const c=!l&&o!==null&&i!==null;if(u0({nodeRef:u,disabled:!c}),!c)return null;const f=e?h=>{const m=r.getState().nodes.filter(w=>w.selected);e(h,m)}:void 0,d=h=>{Object.prototype.hasOwnProperty.call(Js,h.key)&&(h.preventDefault(),a({direction:Js[h.key],factor:h.shiftKey?4:1}))};return F.jsx("div",{className:Me(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:F.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:n?void 0:-1,onKeyDown:n?void 0:d,style:{width:o,height:i}})})}const sh=typeof window<"u"?window:void 0,Q_=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function d0({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,paneClickDistance:l,deleteKeyCode:a,selectionKeyCode:u,selectionOnDrag:c,selectionMode:f,onSelectionStart:d,onSelectionEnd:h,multiSelectionKeyCode:m,panActivationKeyCode:w,zoomActivationKeyCode:E,elementsSelectable:y,zoomOnScroll:g,zoomOnPinch:p,panOnScroll:v,panOnScrollSpeed:_,panOnScrollMode:S,zoomOnDoubleClick:T,panOnDrag:N,defaultViewport:B,translateExtent:b,minZoom:P,maxZoom:j,preventScrolling:H,onSelectionContextMenu:x,noWheelClassName:D,noPanClassName:I,disableKeyboardA11y:A,onViewportChange:C,isControlledViewport:M}){const{nodesSelectionActive:z,userSelectionActive:O}=ae(Q_,me),L=ri(u,{target:sh}),Y=ri(w,{target:sh}),R=Y||N,k=Y||v,$=c&&R!==!0,U=L||O||$;return I_({deleteKeyCode:a,multiSelectionKeyCode:m}),F.jsx(L_,{onPaneContextMenu:i,elementsSelectable:y,zoomOnScroll:g,zoomOnPinch:p,panOnScroll:k,panOnScrollSpeed:_,panOnScrollMode:S,zoomOnDoubleClick:T,panOnDrag:!L&&R,defaultViewport:B,translateExtent:b,minZoom:P,maxZoom:j,zoomActivationKeyCode:E,preventScrolling:H,noWheelClassName:D,noPanClassName:I,onViewportChange:C,isControlledViewport:M,paneClickDistance:l,selectionOnDrag:$,children:F.jsxs(D_,{onSelectionStart:d,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,panOnDrag:R,isSelecting:!!U,selectionMode:f,selectionKeyPressed:L,paneClickDistance:l,selectionOnDrag:$,children:[e,z&&F.jsx(G_,{onSelectionContextMenu:x,noPanClassName:I,disableKeyboardA11y:A})]})})}d0.displayName="FlowRenderer";const K_=V.memo(d0),Z_=e=>t=>e?Xu(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 q_(e){return ae(V.useCallback(Z_(e),[e]),me)}const J_=e=>e.updateNodeInternals;function e4(){const e=ae(J_),[t]=V.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 V.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function t4({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const o=ve(),i=V.useRef(null),s=V.useRef(null),l=V.useRef(e.sourcePosition),a=V.useRef(e.targetPosition),u=V.useRef(t),c=n&&!!e.internals.handleBounds;return V.useEffect(()=>{i.current&&!e.hidden&&(!c||s.current!==i.current)&&(s.current&&(r==null||r.unobserve(s.current)),r==null||r.observe(i.current),s.current=i.current)},[c,e.hidden]),V.useEffect(()=>()=>{s.current&&(r==null||r.unobserve(s.current),s.current=null)},[]),V.useEffect(()=>{if(i.current){const f=u.current!==t,d=l.current!==e.sourcePosition,h=a.current!==e.targetPosition;(f||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 n4({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onContextMenu:i,onDoubleClick:s,nodesDraggable:l,elementsSelectable:a,nodesConnectable:u,nodesFocusable:c,resizeObserver:f,noDragClassName:d,noPanClassName:h,disableKeyboardA11y:m,rfId:w,nodeTypes:E,nodeClickDistance:y,onError:g}){const{node:p,internals:v,isParent:_}=ae(W=>{const X=W.nodeLookup.get(e),G=W.parentLookup.has(e);return{node:X,internals:X.internals,isParent:G}},me);let S=p.type||"default",T=(E==null?void 0:E[S])||ih[S];T===void 0&&(g==null||g("003",$t.error003(S)),S="default",T=(E==null?void 0:E.default)||ih.default);const N=!!(p.draggable||l&&typeof p.draggable>"u"),B=!!(p.selectable||a&&typeof p.selectable>"u"),b=!!(p.connectable||u&&typeof p.connectable>"u"),P=!!(p.focusable||c&&typeof p.focusable>"u"),j=ve(),H=Tp(p),x=t4({node:p,nodeType:S,hasDimensions:H,resizeObserver:f}),D=u0({nodeRef:x,disabled:p.hidden||!N,noDragClassName:d,handleSelector:p.dragHandle,nodeId:e,isSelectable:B,nodeClickDistance:y}),I=c0();if(p.hidden)return null;const A=en(p),C=Y_(p),M=B||N||t||n||r||o,z=n?W=>n(W,{...v.userNode}):void 0,O=r?W=>r(W,{...v.userNode}):void 0,L=o?W=>o(W,{...v.userNode}):void 0,Y=i?W=>i(W,{...v.userNode}):void 0,R=s?W=>s(W,{...v.userNode}):void 0,k=W=>{const{selectNodesOnDrag:X,nodeDragThreshold:G}=j.getState();B&&(!X||!N||G>0)&&Iu({id:e,store:j,nodeRef:x}),t&&t(W,{...v.userNode})},$=W=>{if(!(bp(W.nativeEvent)||m)){if(wp.includes(W.key)&&B){const X=W.key==="Escape";Iu({id:e,store:j,unselect:X,nodeRef:x})}else if(N&&p.selected&&Object.prototype.hasOwnProperty.call(Js,W.key)){W.preventDefault();const{ariaLabelConfig:X}=j.getState();j.setState({ariaLiveMessage:X["node.a11yDescription.ariaLiveMessage"]({direction:W.key.replace("Arrow","").toLowerCase(),x:~~v.positionAbsolute.x,y:~~v.positionAbsolute.y})}),I({direction:Js[W.key],factor:W.shiftKey?4:1})}}},U=()=>{var re;if(m||!((re=x.current)!=null&&re.matches(":focus-visible")))return;const{transform:W,width:X,height:G,autoPanOnNodeFocus:Q,setCenter:Z}=j.getState();if(!Q)return;Xu(new Map([[e,p]]),{x:0,y:0,width:X,height:G},W,!0).length>0||Z(p.position.x+A.width/2,p.position.y+A.height/2,{zoom:W[2]})};return F.jsx("div",{className:Me(["react-flow__node",`react-flow__node-${S}`,{[h]:N},p.className,{selected:p.selected,selectable:B,parent:_,draggable:N,dragging:D}]),ref:x,style:{zIndex:v.z,transform:`translate(${v.positionAbsolute.x}px,${v.positionAbsolute.y}px)`,pointerEvents:M?"all":"none",visibility:H?"visible":"hidden",...p.style,...C},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:z,onMouseMove:O,onMouseLeave:L,onContextMenu:Y,onClick:k,onDoubleClick:R,onKeyDown:P?$:void 0,tabIndex:P?0:void 0,onFocus:P?U:void 0,role:p.ariaRole??(P?"group":void 0),"aria-roledescription":"node","aria-describedby":m?void 0:`${t0}-${w}`,"aria-label":p.ariaLabel,...p.domAttributes,children:F.jsx(j_,{value:e,children:F.jsx(T,{id:e,data:p.data,type:S,positionAbsoluteX:v.positionAbsolute.x,positionAbsoluteY:v.positionAbsolute.y,selected:p.selected??!1,selectable:B,draggable:N,deletable:p.deletable??!0,isConnectable:b,sourcePosition:p.sourcePosition,targetPosition:p.targetPosition,dragging:D,dragHandle:p.dragHandle,zIndex:v.z,parentId:p.parentId,...A})})})}var r4=V.memo(n4);const o4=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function h0(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,onError:i}=ae(o4,me),s=q_(e.onlyRenderVisibleElements),l=e4();return F.jsx("div",{className:"react-flow__nodes",style:Il,children:s.map(a=>F.jsx(r4,{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))})}h0.displayName="NodeRenderer";const i4=V.memo(h0);function s4(e){return ae(V.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&&Hw({sourceNode:i,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&r.push(o.id)}return r},[e]),me)}const l4=({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"})},a4=({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"})},lh={[ks.Arrow]:l4,[ks.ArrowClosed]:a4};function u4(e){const t=ve();return V.useMemo(()=>{var o,i;return Object.prototype.hasOwnProperty.call(lh,e)?lh[e]:((i=(o=t.getState()).onError)==null||i.call(o,"009",$t.error009(e)),null)},[e])}const c4=({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=u4(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},p0=({defaultColor:e,rfId:t})=>{const n=ae(i=>i.edges),r=ae(i=>i.defaultEdgeOptions),o=V.useMemo(()=>Qw(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(c4,{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};p0.displayName="MarkerDefinitions";var f4=V.memo(p0);function g0({x:e,y:t,label:n,labelStyle:r,labelShowBg:o=!0,labelBgStyle:i,labelBgPadding:s=[2,4],labelBgBorderRadius:l=2,children:a,className:u,...c}){const[f,d]=V.useState({x:1,y:0,width:0,height:0}),h=Me(["react-flow__edge-textwrapper",u]),m=V.useRef(null);return V.useEffect(()=>{if(m.current){const w=m.current.getBBox();d({x:w.x,y:w.y,width:w.width,height:w.height})}},[n]),n?F.jsxs("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:h,visibility:f.width?"visible":"hidden",...c,children:[o&&F.jsx("rect",{width:f.width+2*s[0],x:-s[0],y:-s[1],height:f.height+2*s[1],className:"react-flow__edge-textbg",style:i,rx:l,ry:l}),F.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:m,style:r,children:n}),a]}):null}g0.displayName="EdgeText";const d4=V.memo(g0);function mi({path:e,labelX:t,labelY:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:a,interactionWidth:u=20,...c}){return F.jsxs(F.Fragment,{children:[F.jsx("path",{...c,d:e,fill:"none",className:Me(["react-flow__edge-path",c.className])}),u?F.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&Ct(t)&&Ct(n)?F.jsx(d4,{x:t,y:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:a}):null]})}function ah({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===te.Left||e===te.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function m0({sourceX:e,sourceY:t,sourcePosition:n=te.Bottom,targetX:r,targetY:o,targetPosition:i=te.Top}){const[s,l]=ah({pos:n,x1:e,y1:t,x2:r,y2:o}),[a,u]=ah({pos:i,x1:r,y1:o,x2:e,y2:t}),[c,f,d,h]=Rp({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}`,c,f,d,h]}function y0(e){return V.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s,targetPosition:l,label:a,labelStyle:u,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:w,markerStart:E,interactionWidth:y})=>{const[g,p,v]=m0({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:l}),_=e.isInternal?void 0:t;return F.jsx(mi,{id:_,path:g,labelX:p,labelY:v,label:a,labelStyle:u,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:w,markerStart:E,interactionWidth:y})})}const h4=y0({isInternal:!1}),v0=y0({isInternal:!0});h4.displayName="SimpleBezierEdge";v0.displayName="SimpleBezierEdgeInternal";function w0(e){return V.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:d,sourcePosition:h=te.Bottom,targetPosition:m=te.Top,markerEnd:w,markerStart:E,pathOptions:y,interactionWidth:g})=>{const[p,v,_]=Ts({sourceX:n,sourceY:r,sourcePosition:h,targetX:o,targetY:i,targetPosition:m,borderRadius:y==null?void 0:y.borderRadius,offset:y==null?void 0:y.offset,stepPosition:y==null?void 0:y.stepPosition}),S=e.isInternal?void 0:t;return F.jsx(mi,{id:S,path:p,labelX:v,labelY:_,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:d,markerEnd:w,markerStart:E,interactionWidth:g})})}const x0=w0({isInternal:!1}),E0=w0({isInternal:!0});x0.displayName="SmoothStepEdge";E0.displayName="SmoothStepEdgeInternal";function _0(e){return V.memo(({id:t,...n})=>{var o;const r=e.isInternal?void 0:t;return F.jsx(x0,{...n,id:r,pathOptions:V.useMemo(()=>{var i;return{borderRadius:0,offset:(i=n.pathOptions)==null?void 0:i.offset}},[(o=n.pathOptions)==null?void 0:o.offset])})})}const p4=_0({isInternal:!1}),S0=_0({isInternal:!0});p4.displayName="StepEdge";S0.displayName="StepEdgeInternal";function C0(e){return V.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:d,markerEnd:h,markerStart:m,interactionWidth:w})=>{const[E,y,g]=Dp({sourceX:n,sourceY:r,targetX:o,targetY:i}),p=e.isInternal?void 0:t;return F.jsx(mi,{id:p,path:E,labelX:y,labelY:g,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:d,markerEnd:h,markerStart:m,interactionWidth:w})})}const g4=C0({isInternal:!1}),k0=C0({isInternal:!0});g4.displayName="StraightEdge";k0.displayName="StraightEdgeInternal";function N0(e){return V.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s=te.Bottom,targetPosition:l=te.Top,label:a,labelStyle:u,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:w,markerStart:E,pathOptions:y,interactionWidth:g})=>{const[p,v,_]=Ap({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:l,curvature:y==null?void 0:y.curvature}),S=e.isInternal?void 0:t;return F.jsx(mi,{id:S,path:p,labelX:v,labelY:_,label:a,labelStyle:u,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:w,markerStart:E,interactionWidth:g})})}const m4=N0({isInternal:!1}),M0=N0({isInternal:!0});m4.displayName="BezierEdge";M0.displayName="BezierEdgeInternal";const uh={default:M0,straight:k0,step:S0,smoothstep:E0,simplebezier:v0},ch={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},y4=(e,t,n)=>n===te.Left?e-t:n===te.Right?e+t:e,v4=(e,t,n)=>n===te.Top?e-t:n===te.Bottom?e+t:e,fh="react-flow__edgeupdater";function dh({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:Me([fh,`${fh}-${l}`]),cx:y4(t,r,e),cy:v4(n,r,e),r,stroke:"transparent",fill:"transparent"})}function w4({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:o,targetX:i,targetY:s,sourcePosition:l,targetPosition:a,onReconnect:u,onReconnectStart:c,onReconnectEnd:f,setReconnecting:d,setUpdateHover:h}){const m=ve(),w=(v,_)=>{if(v.button!==0)return;const{autoPanOnConnect:S,domNode:T,connectionMode:N,connectionRadius:B,lib:b,onConnectStart:P,cancelConnection:j,nodeLookup:H,rfId:x,panBy:D,updateConnection:I}=m.getState(),A=_.type==="target",C=(O,L)=>{d(!1),f==null||f(O,n,_.type,L)},M=O=>u==null?void 0:u(n,O),z=(O,L)=>{d(!0),c==null||c(v,n,_.type),P==null||P(O,L)};Oa.onPointerDown(v.nativeEvent,{autoPanOnConnect:S,connectionMode:N,connectionRadius:B,domNode:T,handleId:_.id,nodeId:_.nodeId,nodeLookup:H,isTarget:A,edgeUpdaterType:_.type,lib:b,flowId:x,cancelConnection:j,panBy:D,isValidConnection:(...O)=>{var L,Y;return((Y=(L=m.getState()).isValidConnection)==null?void 0:Y.call(L,...O))??!0},onConnect:M,onConnectStart:z,onConnectEnd:(...O)=>{var L,Y;return(Y=(L=m.getState()).onConnectEnd)==null?void 0:Y.call(L,...O)},onReconnectEnd:C,updateConnection:I,getTransform:()=>m.getState().transform,getFromHandle:()=>m.getState().connection.fromHandle,dragThreshold:m.getState().connectionDragThreshold,handleDomNode:v.currentTarget})},E=v=>w(v,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),y=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(dh,{position:l,centerX:r,centerY:o,radius:t,onMouseDown:E,onMouseEnter:g,onMouseOut:p,type:"source"}),(e===!0||e==="target")&&F.jsx(dh,{position:a,centerX:i,centerY:s,radius:t,onMouseDown:y,onMouseEnter:g,onMouseOut:p,type:"target"})]})}function x4({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:o,onDoubleClick:i,onContextMenu:s,onMouseEnter:l,onMouseMove:a,onMouseLeave:u,reconnectRadius:c,onReconnect:f,onReconnectStart:d,onReconnectEnd:h,rfId:m,edgeTypes:w,noPanClassName:E,onError:y,disableKeyboardA11y:g}){let p=ae(Z=>Z.edgeLookup.get(e));const v=ae(Z=>Z.defaultEdgeOptions);p=v?{...v,...p}:p;let _=p.type||"default",S=(w==null?void 0:w[_])||uh[_];S===void 0&&(y==null||y("011",$t.error011(_)),_="default",S=(w==null?void 0:w.default)||uh.default);const T=!!(p.focusable||t&&typeof p.focusable>"u"),N=typeof f<"u"&&(p.reconnectable||n&&typeof p.reconnectable>"u"),B=!!(p.selectable||r&&typeof p.selectable>"u"),b=V.useRef(null),[P,j]=V.useState(!1),[H,x]=V.useState(!1),D=ve(),{zIndex:I,sourceX:A,sourceY:C,targetX:M,targetY:z,sourcePosition:O,targetPosition:L}=ae(V.useCallback(Z=>{const ee=Z.nodeLookup.get(p.source),re=Z.nodeLookup.get(p.target);if(!ee||!re)return{zIndex:p.zIndex,...ch};const ie=Gw({id:e,sourceNode:ee,targetNode:re,sourceHandle:p.sourceHandle||null,targetHandle:p.targetHandle||null,connectionMode:Z.connectionMode,onError:y});return{zIndex:Vw({selected:p.selected,zIndex:p.zIndex,sourceNode:ee,targetNode:re,elevateOnSelect:Z.elevateEdgesOnSelect,zIndexMode:Z.zIndexMode}),...ie||ch}},[p.source,p.target,p.sourceHandle,p.targetHandle,p.selected,p.zIndex]),me),Y=V.useMemo(()=>p.markerStart?`url('#${Ra(p.markerStart,m)}')`:void 0,[p.markerStart,m]),R=V.useMemo(()=>p.markerEnd?`url('#${Ra(p.markerEnd,m)}')`:void 0,[p.markerEnd,m]);if(p.hidden||A===null||C===null||M===null||z===null)return null;const k=Z=>{var se;const{addSelectedEdges:ee,unselectNodesAndEdges:re,multiSelectionActive:ie}=D.getState();B&&(D.setState({nodesSelectionActive:!1}),p.selected&&ie?(re({nodes:[],edges:[p]}),(se=b.current)==null||se.blur()):ee([e])),o&&o(Z,p)},$=i?Z=>{i(Z,{...p})}:void 0,U=s?Z=>{s(Z,{...p})}:void 0,W=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&&wp.includes(Z.key)&&B){const{unselectNodesAndEdges:re,addSelectedEdges:ie}=D.getState();Z.key==="Escape"?((ee=b.current)==null||ee.blur(),re({edges:[p]})):ie([e])}};return F.jsx("svg",{style:{zIndex:I},children:F.jsxs("g",{className:Me(["react-flow__edge",`react-flow__edge-${_}`,p.className,E,{selected:p.selected,animated:p.animated,inactive:!B&&!o,updating:P,selectable:B}]),onClick:k,onDoubleClick:$,onContextMenu:U,onMouseEnter:W,onMouseMove:X,onMouseLeave:G,onKeyDown:T?Q:void 0,tabIndex:T?0:void 0,role:p.ariaRole??(T?"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":T?`${n0}-${m}`:void 0,ref:b,...p.domAttributes,children:[!H&&F.jsx(S,{id:e,source:p.source,target:p.target,type:p.type,selected:p.selected,animated:p.animated,selectable:B,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:C,targetX:M,targetY:z,sourcePosition:O,targetPosition:L,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}),N&&F.jsx(w4,{edge:p,isReconnectable:N,reconnectRadius:c,onReconnect:f,onReconnectStart:d,onReconnectEnd:h,sourceX:A,sourceY:C,targetX:M,targetY:z,sourcePosition:O,targetPosition:L,setUpdateHover:j,setReconnecting:x})]})})}var E4=V.memo(x4);const _4=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function T0({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:o,onReconnect:i,onEdgeContextMenu:s,onEdgeMouseEnter:l,onEdgeMouseMove:a,onEdgeMouseLeave:u,onEdgeClick:c,reconnectRadius:f,onEdgeDoubleClick:d,onReconnectStart:h,onReconnectEnd:m,disableKeyboardA11y:w}){const{edgesFocusable:E,edgesReconnectable:y,elementsSelectable:g,onError:p}=ae(_4,me),v=s4(t);return F.jsxs("div",{className:"react-flow__edges",children:[F.jsx(f4,{defaultColor:e,rfId:n}),v.map(_=>F.jsx(E4,{id:_,edgesFocusable:E,edgesReconnectable:y,elementsSelectable:g,noPanClassName:o,onReconnect:i,onContextMenu:s,onMouseEnter:l,onMouseMove:a,onMouseLeave:u,onClick:c,reconnectRadius:f,onDoubleClick:d,onReconnectStart:h,onReconnectEnd:m,rfId:n,onError:p,edgeTypes:r,disableKeyboardA11y:w},_))]})}T0.displayName="EdgeRenderer";const S4=V.memo(T0),C4=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function k4({children:e}){const t=ae(C4);return F.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function N4(e){const t=Tl(),n=V.useRef(!1);V.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const M4=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function T4(e){const t=ae(M4),n=ve();return V.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function I4(e){return e.connection.inProgress?{...e.connection,to:ci(e.connection.to,e.transform)}:{...e.connection}}function P4(e){return I4}function b4(e){const t=P4();return ae(t,me)}const L4=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function R4({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:o,width:i,height:s,isValid:l,inProgress:a}=ae(L4,me);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:Me(["react-flow__connection",_p(l)]),children:F.jsx(I0,{style:t,type:n,CustomComponent:r,isValid:l})})})}const I0=({style:e,type:t=cn.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:o,from:i,fromNode:s,fromHandle:l,fromPosition:a,to:u,toNode:c,toHandle:f,toPosition:d,pointer:h}=b4();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:_p(r),toNode:c,toHandle:f,pointer:h});let m="";const w={sourceX:i.x,sourceY:i.y,sourcePosition:a,targetX:u.x,targetY:u.y,targetPosition:d};switch(t){case cn.Bezier:[m]=Ap(w);break;case cn.SimpleBezier:[m]=m0(w);break;case cn.Step:[m]=Ts({...w,borderRadius:0});break;case cn.SmoothStep:[m]=Ts(w);break;default:[m]=Dp(w)}return F.jsx("path",{d:m,fill:"none",className:"react-flow__connection-path",style:e})};I0.displayName="ConnectionLine";const A4={};function hh(e=A4){V.useRef(e),ve(),V.useEffect(()=>{},[e])}function O4(){ve(),V.useRef(!1),V.useEffect(()=>{},[])}function P0({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:o,onNodeDoubleClick:i,onEdgeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:a,onNodeMouseLeave:u,onNodeContextMenu:c,onSelectionContextMenu:f,onSelectionStart:d,onSelectionEnd:h,connectionLineType:m,connectionLineStyle:w,connectionLineComponent:E,connectionLineContainerStyle:y,selectionKeyCode:g,selectionOnDrag:p,selectionMode:v,multiSelectionKeyCode:_,panActivationKeyCode:S,zoomActivationKeyCode:T,deleteKeyCode:N,onlyRenderVisibleElements:B,elementsSelectable:b,defaultViewport:P,translateExtent:j,minZoom:H,maxZoom:x,preventScrolling:D,defaultMarkerColor:I,zoomOnScroll:A,zoomOnPinch:C,panOnScroll:M,panOnScrollSpeed:z,panOnScrollMode:O,zoomOnDoubleClick:L,panOnDrag:Y,onPaneClick:R,onPaneMouseEnter:k,onPaneMouseMove:$,onPaneMouseLeave:U,onPaneScroll:W,onPaneContextMenu:X,paneClickDistance:G,nodeClickDistance:Q,onEdgeContextMenu:Z,onEdgeMouseEnter:ee,onEdgeMouseMove:re,onEdgeMouseLeave:ie,reconnectRadius:se,onReconnect:Se,onReconnectStart:qe,onReconnectEnd:gt,noDragClassName:bt,noWheelClassName:nn,noPanClassName:Tn,disableKeyboardA11y:In,nodeExtent:Gr,rfId:nr,viewport:rn,onViewportChange:mt}){return hh(e),hh(t),O4(),N4(n),T4(rn),F.jsx(K_,{onPaneClick:R,onPaneMouseEnter:k,onPaneMouseMove:$,onPaneMouseLeave:U,onPaneContextMenu:X,onPaneScroll:W,paneClickDistance:G,deleteKeyCode:N,selectionKeyCode:g,selectionOnDrag:p,selectionMode:v,onSelectionStart:d,onSelectionEnd:h,multiSelectionKeyCode:_,panActivationKeyCode:S,zoomActivationKeyCode:T,elementsSelectable:b,zoomOnScroll:A,zoomOnPinch:C,zoomOnDoubleClick:L,panOnScroll:M,panOnScrollSpeed:z,panOnScrollMode:O,panOnDrag:Y,defaultViewport:P,translateExtent:j,minZoom:H,maxZoom:x,onSelectionContextMenu:f,preventScrolling:D,noDragClassName:bt,noWheelClassName:nn,noPanClassName:Tn,disableKeyboardA11y:In,onViewportChange:mt,isControlledViewport:!!rn,children:F.jsxs(k4,{children:[F.jsx(S4,{edgeTypes:t,onEdgeClick:o,onEdgeDoubleClick:s,onReconnect:Se,onReconnectStart:qe,onReconnectEnd:gt,onlyRenderVisibleElements:B,onEdgeContextMenu:Z,onEdgeMouseEnter:ee,onEdgeMouseMove:re,onEdgeMouseLeave:ie,reconnectRadius:se,defaultMarkerColor:I,noPanClassName:Tn,disableKeyboardA11y:In,rfId:nr}),F.jsx(R4,{style:w,type:m,component:E,containerStyle:y}),F.jsx("div",{className:"react-flow__edgelabel-renderer"}),F.jsx(i4,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:l,onNodeMouseMove:a,onNodeMouseLeave:u,onNodeContextMenu:c,nodeClickDistance:Q,onlyRenderVisibleElements:B,noPanClassName:Tn,noDragClassName:bt,disableKeyboardA11y:In,nodeExtent:Gr,rfId:nr}),F.jsx("div",{className:"react-flow__viewport-portal"})]})})}P0.displayName="GraphView";const D4=V.memo(P0),ph=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:a=.5,maxZoom:u=2,nodeOrigin:c,nodeExtent:f,zIndexMode:d="basic"}={})=>{const h=new Map,m=new Map,w=new Map,E=new Map,y=r??t??[],g=n??e??[],p=c??[0,0],v=f??Do;$p(w,E,y);const{nodesInitialized:_}=Aa(g,h,m,{nodeOrigin:p,nodeExtent:v,zIndexMode:d});let S=[0,0,1];if(s&&o&&i){const T=ai(h,{filter:P=>!!((P.width||P.initialWidth)&&(P.height||P.initialHeight))}),{x:N,y:B,zoom:b}=Gu(T,o,i,a,u,(l==null?void 0:l.padding)??.1);S=[N,B,b]}return{rfId:"1",width:o??0,height:i??0,transform:S,nodes:g,nodesInitialized:_,nodeLookup:h,parentLookup:m,edges:y,edgeLookup:E,connectionLookup:w,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:a,maxZoom:u,translateExtent:Do,nodeExtent:v,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Ir.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:{...Ep},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:Aw,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:xp,zIndexMode:d,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},z4=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:a,maxZoom:u,nodeOrigin:c,nodeExtent:f,zIndexMode:d})=>qx((h,m)=>{async function w(){const{nodeLookup:E,panZoom:y,fitViewOptions:g,fitViewResolver:p,width:v,height:_,minZoom:S,maxZoom:T}=m();y&&(await Lw({nodes:E,width:v,height:_,panZoom:y,minZoom:S,maxZoom:T},g),p==null||p.resolve(!0),h({fitViewResolver:null}))}return{...ph({nodes:e,edges:t,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:a,maxZoom:u,nodeOrigin:c,nodeExtent:f,defaultNodes:n,defaultEdges:r,zIndexMode:d}),setNodes:E=>{const{nodeLookup:y,parentLookup:g,nodeOrigin:p,elevateNodesOnSelect:v,fitViewQueued:_,zIndexMode:S,nodesSelectionActive:T}=m(),{nodesInitialized:N,hasSelectedNodes:B}=Aa(E,y,g,{nodeOrigin:p,nodeExtent:f,elevateNodesOnSelect:v,checkEquality:!0,zIndexMode:S}),b=T&&B;_&&N?(w(),h({nodes:E,nodesInitialized:N,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:b})):h({nodes:E,nodesInitialized:N,nodesSelectionActive:b})},setEdges:E=>{const{connectionLookup:y,edgeLookup:g}=m();$p(y,g,E),h({edges:E})},setDefaultNodesAndEdges:(E,y)=>{if(E){const{setNodes:g}=m();g(E),h({hasDefaultNodes:!0})}if(y){const{setEdges:g}=m();g(y),h({hasDefaultEdges:!0})}},updateNodeInternals:E=>{const{triggerNodeChanges:y,nodeLookup:g,parentLookup:p,domNode:v,nodeOrigin:_,nodeExtent:S,debug:T,fitViewQueued:N,zIndexMode:B}=m(),{changes:b,updatedInternals:P}=nx(E,g,p,v,_,S,B);P&&(qw(g,p,{nodeOrigin:_,nodeExtent:S,zIndexMode:B}),N?(w(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),(b==null?void 0:b.length)>0&&(T&&console.log("React Flow: trigger node changes",b),y==null||y(b)))},updateNodePositions:(E,y=!1)=>{const g=[];let p=[];const{nodeLookup:v,triggerNodeChanges:_,connection:S,updateConnection:T,onNodesChangeMiddlewareMap:N}=m();for(const[B,b]of E){const P=v.get(B),j=!!(P!=null&&P.expandParent&&(P!=null&&P.parentId)&&(b!=null&&b.position)),H={id:B,type:"position",position:j?{x:Math.max(0,b.position.x),y:Math.max(0,b.position.y)}:b.position,dragging:y};if(P&&S.inProgress&&S.fromNode.id===P.id){const x=Yn(P,S.fromHandle,te.Left,!0);T({...S,from:x})}j&&P.parentId&&g.push({id:B,parentId:P.parentId,rect:{...b.internals.positionAbsolute,width:b.measured.width??0,height:b.measured.height??0}}),p.push(H)}if(g.length>0){const{parentLookup:B,nodeOrigin:b}=m(),P=ec(g,v,B,b);p.push(...P)}for(const B of N.values())p=B(p);_(p)},triggerNodeChanges:E=>{const{onNodesChange:y,setNodes:g,nodes:p,hasDefaultNodes:v,debug:_}=m();if(E!=null&&E.length){if(v){const S=i0(E,p);g(S)}_&&console.log("React Flow: trigger node changes",E),y==null||y(E)}},triggerEdgeChanges:E=>{const{onEdgesChange:y,setEdges:g,edges:p,hasDefaultEdges:v,debug:_}=m();if(E!=null&&E.length){if(v){const S=s0(E,p);g(S)}_&&console.log("React Flow: trigger edge changes",E),y==null||y(E)}},addSelectedNodes:E=>{const{multiSelectionActive:y,edgeLookup:g,nodeLookup:p,triggerNodeChanges:v,triggerEdgeChanges:_}=m();if(y){const S=E.map(T=>Rn(T,!0));v(S);return}v(vr(p,new Set([...E]),!0)),_(vr(g))},addSelectedEdges:E=>{const{multiSelectionActive:y,edgeLookup:g,nodeLookup:p,triggerNodeChanges:v,triggerEdgeChanges:_}=m();if(y){const S=E.map(T=>Rn(T,!0));_(S);return}_(vr(g,new Set([...E]))),v(vr(p,new Set,!0))},unselectNodesAndEdges:({nodes:E,edges:y}={})=>{const{edges:g,nodes:p,nodeLookup:v,triggerNodeChanges:_,triggerEdgeChanges:S}=m(),T=E||p,N=y||g,B=[];for(const P of T){if(!P.selected)continue;const j=v.get(P.id);j&&(j.selected=!1),B.push(Rn(P.id,!1))}const b=[];for(const P of N)P.selected&&b.push(Rn(P.id,!1));_(B),S(b)},setMinZoom:E=>{const{panZoom:y,maxZoom:g}=m();y==null||y.setScaleExtent([E,g]),h({minZoom:E})},setMaxZoom:E=>{const{panZoom:y,minZoom:g}=m();y==null||y.setScaleExtent([g,E]),h({maxZoom:E})},setTranslateExtent:E=>{var y;(y=m().panZoom)==null||y.setTranslateExtent(E),h({translateExtent:E})},resetSelectedElements:()=>{const{edges:E,nodes:y,triggerNodeChanges:g,triggerEdgeChanges:p,elementsSelectable:v}=m();if(!v)return;const _=y.reduce((T,N)=>N.selected?[...T,Rn(N.id,!1)]:T,[]),S=E.reduce((T,N)=>N.selected?[...T,Rn(N.id,!1)]:T,[]);g(_),p(S)},setNodeExtent:E=>{const{nodes:y,nodeLookup:g,parentLookup:p,nodeOrigin:v,elevateNodesOnSelect:_,nodeExtent:S,zIndexMode:T}=m();E[0][0]===S[0][0]&&E[0][1]===S[0][1]&&E[1][0]===S[1][0]&&E[1][1]===S[1][1]||(Aa(y,g,p,{nodeOrigin:v,nodeExtent:E,elevateNodesOnSelect:_,checkEquality:!1,zIndexMode:T}),h({nodeExtent:E}))},panBy:E=>{const{transform:y,width:g,height:p,panZoom:v,translateExtent:_}=m();return rx({delta:E,panZoom:v,transform:y,translateExtent:_,width:g,height:p})},setCenter:async(E,y,g)=>{const{width:p,height:v,maxZoom:_,panZoom:S}=m();if(!S)return Promise.resolve(!1);const T=typeof(g==null?void 0:g.zoom)<"u"?g.zoom:_;return await S.setViewport({x:p/2-E*T,y:v/2-y*T,zoom:T},{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:{...Ep}})},updateConnection:E=>{h({connection:E})},reset:()=>h({...ph()})}},Object.is);function b0({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:o,initialHeight:i,initialMinZoom:s,initialMaxZoom:l,initialFitViewOptions:a,fitView:u,nodeOrigin:c,nodeExtent:f,zIndexMode:d,children:h}){const[m]=V.useState(()=>z4({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:u,minZoom:s,maxZoom:l,fitViewOptions:a,nodeOrigin:c,nodeExtent:f,zIndexMode:d}));return F.jsx(r_,{value:m,children:F.jsx(k_,{children:h})})}function j4({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:o,width:i,height:s,fitView:l,fitViewOptions:a,minZoom:u,maxZoom:c,nodeOrigin:f,nodeExtent:d,zIndexMode:h}){return V.useContext(Ml)?F.jsx(F.Fragment,{children:e}):F.jsx(b0,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:o,initialWidth:i,initialHeight:s,fitView:l,initialFitViewOptions:a,initialMinZoom:u,initialMaxZoom:c,nodeOrigin:f,nodeExtent:d,zIndexMode:h,children:e})}const $4={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function V4({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:i,edgeTypes:s,onNodeClick:l,onEdgeClick:a,onInit:u,onMove:c,onMoveStart:f,onMoveEnd:d,onConnect:h,onConnectStart:m,onConnectEnd:w,onClickConnectStart:E,onClickConnectEnd:y,onNodeMouseEnter:g,onNodeMouseMove:p,onNodeMouseLeave:v,onNodeContextMenu:_,onNodeDoubleClick:S,onNodeDragStart:T,onNodeDrag:N,onNodeDragStop:B,onNodesDelete:b,onEdgesDelete:P,onDelete:j,onSelectionChange:H,onSelectionDragStart:x,onSelectionDrag:D,onSelectionDragStop:I,onSelectionContextMenu:A,onSelectionStart:C,onSelectionEnd:M,onBeforeDelete:z,connectionMode:O,connectionLineType:L=cn.Bezier,connectionLineStyle:Y,connectionLineComponent:R,connectionLineContainerStyle:k,deleteKeyCode:$="Backspace",selectionKeyCode:U="Shift",selectionOnDrag:W=!1,selectionMode:X=zo.Full,panActivationKeyCode:G="Space",multiSelectionKeyCode:Q=$o()?"Meta":"Control",zoomActivationKeyCode:Z=$o()?"Meta":"Control",snapToGrid:ee,snapGrid:re,onlyRenderVisibleElements:ie=!1,selectNodesOnDrag:se,nodesDraggable:Se,autoPanOnNodeFocus:qe,nodesConnectable:gt,nodesFocusable:bt,nodeOrigin:nn=r0,edgesFocusable:Tn,edgesReconnectable:In,elementsSelectable:Gr=!0,defaultViewport:nr=m_,minZoom:rn=.5,maxZoom:mt=2,translateExtent:Qr=Do,preventScrolling:Rl=!0,nodeExtent:Kr,defaultMarkerColor:Al="#b1b1b7",zoomOnScroll:Ol=!0,zoomOnPinch:Zr=!0,panOnScroll:Qc=!1,panOnScrollSpeed:J=.5,panOnScrollMode:oe=Vn.Free,zoomOnDoubleClick:ce=!0,panOnDrag:Ue=!0,onPaneClick:Je,onPaneMouseEnter:We,onPaneMouseMove:yi,onPaneMouseLeave:vi,onPaneScroll:Kc,onPaneContextMenu:Dl,paneClickDistance:wi=1,nodeClickDistance:xi=0,children:Pn,onReconnect:qr,onReconnectStart:U0,onReconnectEnd:W0,onEdgeContextMenu:Y0,onEdgeDoubleClick:X0,onEdgeMouseEnter:G0,onEdgeMouseMove:Q0,onEdgeMouseLeave:K0,reconnectRadius:Z0=10,onNodesChange:q0,onEdgesChange:J0,noDragClassName:e1="nodrag",noWheelClassName:t1="nowheel",noPanClassName:Zc="nopan",fitView:qc,fitViewOptions:Jc,connectOnClick:n1,attributionPosition:r1,proOptions:o1,defaultEdgeOptions:i1,elevateNodesOnSelect:s1=!0,elevateEdgesOnSelect:l1=!1,disableKeyboardA11y:ef=!1,autoPanOnConnect:a1,autoPanOnNodeDrag:u1,autoPanSpeed:c1,connectionRadius:f1,isValidConnection:d1,onError:h1,style:p1,id:tf,nodeDragThreshold:g1,connectionDragThreshold:m1,viewport:y1,onViewportChange:v1,width:w1,height:x1,colorMode:E1="light",debug:_1,onScroll:Ei,ariaLabelConfig:S1,zIndexMode:nf="basic",...C1},k1){const zl=tf||"1",N1=x_(E1),M1=V.useCallback(rf=>{rf.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Ei==null||Ei(rf)},[Ei]);return F.jsx("div",{"data-testid":"rf__wrapper",...C1,onScroll:M1,style:{...p1,...$4},ref:k1,className:Me(["react-flow",o,N1]),id:tf,role:"application",children:F.jsxs(j4,{nodes:e,edges:t,width:w1,height:x1,fitView:qc,fitViewOptions:Jc,minZoom:rn,maxZoom:mt,nodeOrigin:nn,nodeExtent:Kr,zIndexMode:nf,children:[F.jsx(w_,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:h,onConnectStart:m,onConnectEnd:w,onClickConnectStart:E,onClickConnectEnd:y,nodesDraggable:Se,autoPanOnNodeFocus:qe,nodesConnectable:gt,nodesFocusable:bt,edgesFocusable:Tn,edgesReconnectable:In,elementsSelectable:Gr,elevateNodesOnSelect:s1,elevateEdgesOnSelect:l1,minZoom:rn,maxZoom:mt,nodeExtent:Kr,onNodesChange:q0,onEdgesChange:J0,snapToGrid:ee,snapGrid:re,connectionMode:O,translateExtent:Qr,connectOnClick:n1,defaultEdgeOptions:i1,fitView:qc,fitViewOptions:Jc,onNodesDelete:b,onEdgesDelete:P,onDelete:j,onNodeDragStart:T,onNodeDrag:N,onNodeDragStop:B,onSelectionDrag:D,onSelectionDragStart:x,onSelectionDragStop:I,onMove:c,onMoveStart:f,onMoveEnd:d,noPanClassName:Zc,nodeOrigin:nn,rfId:zl,autoPanOnConnect:a1,autoPanOnNodeDrag:u1,autoPanSpeed:c1,onError:h1,connectionRadius:f1,isValidConnection:d1,selectNodesOnDrag:se,nodeDragThreshold:g1,connectionDragThreshold:m1,onBeforeDelete:z,debug:_1,ariaLabelConfig:S1,zIndexMode:nf}),F.jsx(D4,{onInit:u,onNodeClick:l,onEdgeClick:a,onNodeMouseEnter:g,onNodeMouseMove:p,onNodeMouseLeave:v,onNodeContextMenu:_,onNodeDoubleClick:S,nodeTypes:i,edgeTypes:s,connectionLineType:L,connectionLineStyle:Y,connectionLineComponent:R,connectionLineContainerStyle:k,selectionKeyCode:U,selectionOnDrag:W,selectionMode:X,deleteKeyCode:$,multiSelectionKeyCode:Q,panActivationKeyCode:G,zoomActivationKeyCode:Z,onlyRenderVisibleElements:ie,defaultViewport:nr,translateExtent:Qr,minZoom:rn,maxZoom:mt,preventScrolling:Rl,zoomOnScroll:Ol,zoomOnPinch:Zr,zoomOnDoubleClick:ce,panOnScroll:Qc,panOnScrollSpeed:J,panOnScrollMode:oe,panOnDrag:Ue,onPaneClick:Je,onPaneMouseEnter:We,onPaneMouseMove:yi,onPaneMouseLeave:vi,onPaneScroll:Kc,onPaneContextMenu:Dl,paneClickDistance:wi,nodeClickDistance:xi,onSelectionContextMenu:A,onSelectionStart:C,onSelectionEnd:M,onReconnect:qr,onReconnectStart:U0,onReconnectEnd:W0,onEdgeContextMenu:Y0,onEdgeDoubleClick:X0,onEdgeMouseEnter:G0,onEdgeMouseMove:Q0,onEdgeMouseLeave:K0,reconnectRadius:Z0,defaultMarkerColor:Al,noDragClassName:e1,noWheelClassName:t1,noPanClassName:Zc,rfId:zl,disableKeyboardA11y:ef,nodeExtent:Kr,viewport:y1,onViewportChange:v1}),F.jsx(g_,{onSelectionChange:H}),Pn,F.jsx(c_,{proOptions:o1,position:r1}),F.jsx(u_,{rfId:zl,disableKeyboardA11y:ef})]})})}var H4=l0(V4);const F4=e=>({x:e.transform[0],y:e.transform[1],zoom:e.transform[2]});function B4(){return ae(F4,me)}function U4(e){const[t,n]=V.useState(e),r=V.useCallback(o=>n(i=>i0(o,i)),[]);return[t,n,r]}function W4(e){const[t,n]=V.useState(e),r=V.useCallback(o=>n(i=>s0(o,i)),[]);return[t,n,r]}function Y4({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:Me(["react-flow__background-pattern",n,r])})}function X4({radius:e,className:t}){return F.jsx("circle",{cx:e,cy:e,r:e,className:Me(["react-flow__background-pattern","dots",t])})}var Gt;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Gt||(Gt={}));const G4={[Gt.Dots]:1,[Gt.Lines]:1,[Gt.Cross]:6},Q4=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function L0({id:e,variant:t=Gt.Dots,gap:n=20,size:r,lineWidth:o=1,offset:i=0,color:s,bgColor:l,style:a,className:u,patternClassName:c}){const f=V.useRef(null),{transform:d,patternId:h}=ae(Q4,me),m=r||G4[t],w=t===Gt.Dots,E=t===Gt.Cross,y=Array.isArray(n)?n:[n,n],g=[y[0]*d[2]||1,y[1]*d[2]||1],p=m*d[2],v=Array.isArray(i)?i:[i,i],_=E?[p,p]:g,S=[v[0]*d[2]||1+_[0]/2,v[1]*d[2]||1+_[1]/2],T=`${h}${e||""}`;return F.jsxs("svg",{className:Me(["react-flow__background",u]),style:{...a,...Il,"--xy-background-color-props":l,"--xy-background-pattern-color-props":s},ref:f,"data-testid":"rf__background",children:[F.jsx("pattern",{id:T,x:d[0]%g[0],y:d[1]%g[1],width:g[0],height:g[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${S[0]},-${S[1]})`,children:w?F.jsx(X4,{radius:p/2,className:c}):F.jsx(Y4,{dimensions:_,lineWidth:o,variant:t,className:c})}),F.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${T})`})]})}L0.displayName="Background";const K4=V.memo(L0);function Z4(){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 q4(){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 J4(){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 e5(){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 t5(){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 Xi({children:e,className:t,...n}){return F.jsx("button",{type:"button",className:Me(["react-flow__controls-button",t]),...n,children:e})}const n5=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function R0({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:o,onZoomIn:i,onZoomOut:s,onFitView:l,onInteractiveChange:a,className:u,children:c,position:f="bottom-left",orientation:d="vertical","aria-label":h}){const m=ve(),{isInteractive:w,minZoomReached:E,maxZoomReached:y,ariaLabelConfig:g}=ae(n5,me),{zoomIn:p,zoomOut:v,fitView:_}=Tl(),S=()=>{p(),i==null||i()},T=()=>{v(),s==null||s()},N=()=>{_(o),l==null||l()},B=()=>{m.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),a==null||a(!w)},b=d==="horizontal"?"horizontal":"vertical";return F.jsxs(gi,{className:Me(["react-flow__controls",b,u]),position:f,style:e,"data-testid":"rf__controls","aria-label":h??g["controls.ariaLabel"],children:[t&&F.jsxs(F.Fragment,{children:[F.jsx(Xi,{onClick:S,className:"react-flow__controls-zoomin",title:g["controls.zoomIn.ariaLabel"],"aria-label":g["controls.zoomIn.ariaLabel"],disabled:y,children:F.jsx(Z4,{})}),F.jsx(Xi,{onClick:T,className:"react-flow__controls-zoomout",title:g["controls.zoomOut.ariaLabel"],"aria-label":g["controls.zoomOut.ariaLabel"],disabled:E,children:F.jsx(q4,{})})]}),n&&F.jsx(Xi,{className:"react-flow__controls-fitview",onClick:N,title:g["controls.fitView.ariaLabel"],"aria-label":g["controls.fitView.ariaLabel"],children:F.jsx(J4,{})}),r&&F.jsx(Xi,{className:"react-flow__controls-interactive",onClick:B,title:g["controls.interactive.ariaLabel"],"aria-label":g["controls.interactive.ariaLabel"],children:w?F.jsx(t5,{}):F.jsx(e5,{})}),c]})}R0.displayName="Controls";V.memo(R0);function r5({id:e,x:t,y:n,width:r,height:o,style:i,color:s,strokeColor:l,strokeWidth:a,className:u,borderRadius:c,shapeRendering:f,selected:d,onClick:h}){const{background:m,backgroundColor:w}=i||{},E=s||m||w;return F.jsx("rect",{className:Me(["react-flow__minimap-node",{selected:d},u]),x:t,y:n,rx:c,ry:c,width:r,height:o,style:{fill:E,stroke:l,strokeWidth:a},shapeRendering:f,onClick:h?y=>h(y,e):void 0})}const o5=V.memo(r5),i5=e=>e.nodes.map(t=>t.id),wa=e=>e instanceof Function?e:()=>e;function s5({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:o,nodeComponent:i=o5,onClick:s}){const l=ae(i5,me),a=wa(t),u=wa(e),c=wa(n),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return F.jsx(F.Fragment,{children:l.map(d=>F.jsx(a5,{id:d,nodeColorFunc:a,nodeStrokeColorFunc:u,nodeClassNameFunc:c,nodeBorderRadius:r,nodeStrokeWidth:o,NodeComponent:i,onClick:s,shapeRendering:f},d))})}function l5({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:o,nodeStrokeWidth:i,shapeRendering:s,NodeComponent:l,onClick:a}){const{node:u,x:c,y:f,width:d,height:h}=ae(m=>{const w=m.nodeLookup.get(e);if(!w)return{node:void 0,x:0,y:0,width:0,height:0};const E=w.internals.userNode,{x:y,y:g}=w.internals.positionAbsolute,{width:p,height:v}=en(E);return{node:E,x:y,y:g,width:p,height:v}},me);return!u||u.hidden||!Tp(u)?null:F.jsx(l,{x:c,y:f,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 a5=V.memo(l5);var u5=V.memo(s5);const c5=200,f5=150,d5=e=>!e.hidden,h5=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?Mp(ai(e.nodeLookup,{filter:d5}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},p5="react-flow__minimap-desc";function A0({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:o="",nodeBorderRadius:i=5,nodeStrokeWidth:s,nodeComponent:l,bgColor:a,maskColor:u,maskStrokeColor:c,maskStrokeWidth:f,position:d="bottom-right",onClick:h,onNodeClick:m,pannable:w=!1,zoomable:E=!1,ariaLabel:y,inversePan:g,zoomStep:p=1,offsetScale:v=5}){const _=ve(),S=V.useRef(null),{boundingRect:T,viewBB:N,rfId:B,panZoom:b,translateExtent:P,flowWidth:j,flowHeight:H,ariaLabelConfig:x}=ae(h5,me),D=(e==null?void 0:e.width)??c5,I=(e==null?void 0:e.height)??f5,A=T.width/D,C=T.height/I,M=Math.max(A,C),z=M*D,O=M*I,L=v*M,Y=T.x-(z-T.width)/2-L,R=T.y-(O-T.height)/2-L,k=z+L*2,$=O+L*2,U=`${p5}-${B}`,W=V.useRef(0),X=V.useRef();W.current=M,V.useEffect(()=>{if(S.current&&b)return X.current=dx({domNode:S.current,panZoom:b,getTransform:()=>_.getState().transform,getViewScale:()=>W.current}),()=>{var ee;(ee=X.current)==null||ee.destroy()}},[b]),V.useEffect(()=>{var ee;(ee=X.current)==null||ee.update({translateExtent:P,width:j,height:H,inversePan:g,pannable:w,zoomStep:p,zoomable:E})},[w,E,g,p,P,j,H]);const G=h?ee=>{var se;const[re,ie]=((se=X.current)==null?void 0:se.pointer(ee))||[0,0];h(ee,{x:re,y:ie})}:void 0,Q=m?V.useCallback((ee,re)=>{const ie=_.getState().nodeLookup.get(re).internals.userNode;m(ee,ie)},[]):void 0,Z=y??x["minimap.ariaLabel"];return F.jsx(gi,{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 c=="string"?c:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*M: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:Me(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:F.jsxs("svg",{width:D,height:I,viewBox:`${Y} ${R} ${k} ${$}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":U,ref:S,onClick:G,children:[Z&&F.jsx("title",{id:U,children:Z}),F.jsx(u5,{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-L},${R-L}h${k+L*2}v${$+L*2}h${-k-L*2}z
|
|
63
|
+
M${N.x},${N.y}h${N.width}v${N.height}h${-N.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}A0.displayName="MiniMap";V.memo(A0);const g5=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,m5={[Rr.Line]:"right",[Rr.Handle]:"bottom-right"};function y5({nodeId:e,position:t,variant:n=Rr.Handle,className:r,style:o=void 0,children:i,color:s,minWidth:l=10,minHeight:a=10,maxWidth:u=Number.MAX_VALUE,maxHeight:c=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:d,autoScale:h=!0,shouldResize:m,onResizeStart:w,onResize:E,onResizeEnd:y}){const g=f0(),p=typeof e=="string"?e:g,v=ve(),_=V.useRef(null),S=n===Rr.Handle,T=ae(V.useCallback(g5(S&&h),[S,h]),me),N=V.useRef(null),B=t??m5[n];V.useEffect(()=>{if(!(!_.current||!p))return N.current||(N.current=Nx({domNode:_.current,nodeId:p,getStoreItems:()=>{const{nodeLookup:P,transform:j,snapGrid:H,snapToGrid:x,nodeOrigin:D,domNode:I}=v.getState();return{nodeLookup:P,transform:j,snapGrid:H,snapToGrid:x,nodeOrigin:D,paneDomNode:I}},onChange:(P,j)=>{const{triggerNodeChanges:H,nodeLookup:x,parentLookup:D,nodeOrigin:I}=v.getState(),A=[],C={x:P.x,y:P.y},M=x.get(p);if(M&&M.expandParent&&M.parentId){const z=M.origin??I,O=P.width??M.measured.width??0,L=P.height??M.measured.height??0,Y={id:M.id,parentId:M.parentId,rect:{width:O,height:L,...Ip({x:P.x??M.position.x,y:P.y??M.position.y},{width:O,height:L},M.parentId,x,z)}},R=ec([Y],x,D,I);A.push(...R),C.x=P.x?Math.max(z[0]*O,P.x):void 0,C.y=P.y?Math.max(z[1]*L,P.y):void 0}if(C.x!==void 0&&C.y!==void 0){const z={id:p,type:"position",position:{...C}};A.push(z)}if(P.width!==void 0&&P.height!==void 0){const O={id:p,type:"dimensions",resizing:!0,setAttributes:d?d==="horizontal"?"width":"height":!0,dimensions:{width:P.width,height:P.height}};A.push(O)}for(const z of j){const O={...z,type:"position"};A.push(O)}H(A)},onEnd:({width:P,height:j})=>{const H={id:p,type:"dimensions",resizing:!1,dimensions:{width:P,height:j}};v.getState().triggerNodeChanges([H])}})),N.current.update({controlPosition:B,boundaries:{minWidth:l,minHeight:a,maxWidth:u,maxHeight:c},keepAspectRatio:f,resizeDirection:d,onResizeStart:w,onResize:E,onResizeEnd:y,shouldResize:m}),()=>{var P;(P=N.current)==null||P.destroy()}},[B,l,a,u,c,f,w,E,y,m]);const b=B.split("-");return F.jsx("div",{className:Me(["react-flow__resize-control","nodrag",...b,n,r]),ref:_,style:{...o,scale:T,...s&&{[S?"backgroundColor":"borderColor"]:s}},children:i})}V.memo(y5);var Fr;(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"})(Fr||(Fr={}));var gh;(function(e){e.Debug="debug",e.Info="info",e.Warn="warn",e.Error="error",e.Success="success"})(gh||(gh={}));const ze={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",SUBMIT_EDIT_RESULT:"SUBMIT_EDIT_RESULT",TELEMETRY_EVENT:"TELEMETRY_EVENT",MV_READY:"MV_READY",MV_SET_EDIT_STATE:"MV_SET_EDIT_STATE",MV_GET_SELECTION_SNAPSHOT:"MV_GET_SELECTION_SNAPSHOT",MV_SELECTION_CHANGED:"MV_SELECTION_CHANGED",MV_SELECTION_SNAPSHOT:"MV_SELECTION_SNAPSHOT",MV_RESTORE_SELECTION:"MV_RESTORE_SELECTION",MV_COMMAND_RESULT:"MV_COMMAND_RESULT"};new Set(Object.values(ze));let uo=null;function Io(){return typeof window<"u"&&typeof window.getHostApi=="function"}function Yc(e){const t=window.__ExtensionHostExpectedRenderId;return t===void 0||e.renderId===t}function Gi(e,...t){e||console.error(...t)}function O0(e,t){if(typeof window>"u")return Gi(t,"[sendToHost] Not in browser context"),!1;if(typeof window.__ExtensionHostPostMessage=="function")try{return window.__ExtensionHostPostMessage(e),!0}catch(n){Gi(t,"[sendToHost] Error sending via __ExtensionHostPostMessage:",n)}if(window.parent&&window.parent!==window)try{const n=typeof window.location<"u"&&window.location.origin?window.location.origin:"*";return window.parent.postMessage(e,n),!0}catch(n){Gi(t,"[sendToHost] Error sending via window.parent:",n)}return Gi(t,"[sendToHost] No host communication channel available"),!1}function Xc(e){return O0(e,!1)}function v5(e){try{return O0({type:ze.TELEMETRY_EVENT,payload:e},!0)}catch{return!1}}function w5(e){var n,r;if(!Io()||typeof window.__ExtensionHostPostMessage!="function")return Promise.reject(new Error("vibe-edit: acknowledged submission is only available in VS Code"));const t=((r=(n=globalThis.crypto)==null?void 0:n.randomUUID)==null?void 0:r.call(n))??`${Date.now()}-${Math.random()}`;return new Promise((o,i)=>{const s=window.setTimeout(()=>{l(),i(new Error("vibe-edit: host acknowledgement timed out; the edit may still be pending"))},12e4),l=()=>{clearTimeout(s),window.removeEventListener("message",a)},a=u=>{if(!Pl(u))return;const c=u.data,f=c.payload;c.type!==ze.SUBMIT_EDIT_RESULT||!Yc(c)||(f==null?void 0:f.requestId)!==t||(l(),f.result.delivered?o(f):i(new Error(f.result.detail??"vibe-edit: host did not deliver the edit")))};window.addEventListener("message",a);try{window.__ExtensionHostPostMessage({type:ze.SUBMIT_EDIT,payload:e,requestId:t})}catch(u){l(),i(u)}})}async function x5(e=5e3){return typeof window.__ExtensionHostPostMessage!="function"?(console.error("[getPluginData] Extension host postMessage not available. Ensure platform bootstrap has run."),Promise.resolve(null)):(uo!==null||(uo=new Promise(t=>{let n=0;const r=i=>{if(!Pl(i))return;const s=i.data;s.type===ze.PLUGIN_DATA_RESPONSE&&Yc(s)&&(o(),t(s.payload))};function o(){n&&(clearTimeout(n),n=0),window.removeEventListener("message",r),uo=null}window.addEventListener("message",r),n=window.setTimeout(()=>{console.error("[getPluginData] Timeout waiting for plugin data"),o(),t(null)},e),window.__ExtensionHostPostMessage({type:ze.REQUEST_PLUGIN_DATA})})),uo)}function Pl(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 E5(e){const t=n=>{if(!Pl(n))return;const r=n.data;if(r.type===ze.PLUGIN_DATA_UPDATE&&Yc(r)){const o=r.payload;e(o)}};return window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}}class Jn{constructor(){this.error={}}static create(){return new Jn}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();Xc({type:ze.PLUGIN_ERROR,payload:t})||console.error("[ErrorBuilder] Unable to send error to host:",t)}static fromError(t,n,r){const o=Jn.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 _5(){typeof window>"u"||(window.addEventListener("error",e=>{const t=e.error;Jn.create().category(Fr.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";Jn.create().category(Fr.Runtime).message(n).stackTrace(t instanceof Error?t.stack:void 0).send()}))}const S5=2,bl=100,C5=256e3,k5=128,N5=512,M5=["inactive","selecting","locked"],mh={protocolVersions:[S5],supportsHostControlledEntry:!0,supportsSelectionSnapshot:!0,supportsSelectionRestore:!0,maxSelectionCount:bl,maxPayloadBytes:C5},An={MV_READY:ze.MV_READY,MV_SET_EDIT_STATE:ze.MV_SET_EDIT_STATE,MV_GET_SELECTION_SNAPSHOT:ze.MV_GET_SELECTION_SNAPSHOT,MV_SELECTION_CHANGED:ze.MV_SELECTION_CHANGED,MV_SELECTION_SNAPSHOT:ze.MV_SELECTION_SNAPSHOT,MV_RESTORE_SELECTION:ze.MV_RESTORE_SELECTION,MV_COMMAND_RESULT:ze.MV_COMMAND_RESULT},yh=1,T5=["vibeEdit.selectMode","vibeEdit.selection","vibeEdit.promptAbandoned"],I5=["agent","start-agent","subagent","topic","system-instructions","reasoning","reasoning-action","action","action-target","action-input","action-output","messages","description","heading","step","detail","start","screen","apexAction","apexPluginCall","emailAction","externalCallout","routeWork","addScreenPop","addSkillRequirement","checkAvailability","setScreenProperty","assignment","addPromptInstructions","decision","loop","recordCreate","recordLookup","recordUpdate","recordDelete","recordRollback","subflow","wait","collectionProcessor","collectionSort","transform","customError","stage","interactiveStep","managedContentStep","permissionset","objectPermission","fieldPermission","recordTypeVisibility","tabSetting","apexClassAccesses","pageAccesses","flowAccesses","agentAccesses","customPermissions","customMetadataTypeAccesses","customSettingAccesses","externalDataSourceAccesses","externalCredentialPrincipalAccesses","servicePresenceStatusAccesses","emailRoutingAddressAccesses","genComputingSummaryDefAccesses","userPermissions","applicationVisibilities","object","field","region","block","dataProvider","other"],Pu=1e4;new Set(T5);const P5=new Set(I5);function vh(e){return typeof e=="string"&&P5.has(e)?e:"other"}const Br="data-mv-selectable",Ur="data-mv-type",bu="data-mv-id",wh="data-mv-selected",xh="data-mv-hover",D0=.5,b5=.8,L5=5;function Qi(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 R5(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 A5(e){return Math.max(0,e.right-e.left)*Math.max(0,e.bottom-e.top)}function Lu(e,t){const n=A5(t);return n<=0?0:R5(e,t)/n}function Gc(e){const t=e.getAttribute(Ur),n=e.getAttribute(bu);return!t||!n?null:{type:t,id:n}}function Po(e){return`${e.type}::${e.id}`}function O5(e,t,n=D0,r=n){const i=Array.from(e.querySelectorAll(`[${Br}]`)).filter(d=>{const h=d.getBoundingClientRect();return Lu(t,{left:h.left,top:h.top,right:h.right,bottom:h.bottom})>=n}),s=new Set(i),l=new Set;for(const d of i){let h=d.parentElement;for(;h;)s.has(h)&&l.add(h),h=h.parentElement}const a=d=>{const h=d.getBoundingClientRect();return Lu(t,{left:h.left,top:h.top,right:h.right,bottom:h.bottom})>=r},u=i.filter(d=>!l.has(d)||a(d)),c=new Set(u),f=[];for(const d of u){let h=d.parentElement,m=!1;for(;h;){if(c.has(h)){m=!0;break}h=h.parentElement}if(m)continue;const w=Gc(d);w&&f.push(w)}return f}function D5(e,t,n=D0){const r=Array.from(e.querySelectorAll(`[${Br}]`)),o=[];for(const i of r){const s=i.getBoundingClientRect();if(Lu(t,{left:s.left,top:s.top,right:s.right,bottom:s.bottom})>=n){const l=Gc(i);l&&o.push(l)}}return o}function xa(e,t,n){const r=Array.from(e.querySelectorAll(`[${Br}]`));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?Gc(o.el):null}function z0(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 j0(e,t,n,r=0){return`${t}_${z0(`${e}/${t}:${n}#${r}`)}`}function $0(e){return j0("","object",e)}function z5(e,t){return j0($0(e),"field",t)}const j5=()=>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"})}),Ea=({field:e,isNameField:t,objectApiName:n})=>{const[r,o]=V.useState(!1),[i,s]=V.useState({top:0,left:0}),l=V.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)},c=["field-row",a?"field-row--hoverable":"",r?"field-row--hovered":""].filter(Boolean).join(" "),f=e.isRelationship?`${e.apiName}`:void 0,d=z5(n,e.apiName);return F.jsxs("div",{ref:l,className:c,"data-mv-id":d,onMouseEnter:u,onMouseLeave:()=>o(!1),children:[e.isRelationship&&f&&F.jsx(qn,{type:"source",position:te.Right,id:f,className:"field-row__handle"}),F.jsxs("div",{className:"field-row__name",children:[t&&F.jsx(j5,{}),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&&Nl.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)]})},$5=({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":$0(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(Ea,{field:o,isNameField:!0,objectApiName:e.apiName}),i.map(l=>F.jsx(Ea,{field:l,objectApiName:e.apiName},l.apiName)),s.map(l=>F.jsx(Ea,{field:l,objectApiName:e.apiName},l.apiName))]}),F.jsx(qn,{type:"target",position:te.Left,className:`object-card__handle object-card__handle--${t}`}),F.jsx(qn,{type:"source",position:te.Right,className:`object-card__handle object-card__handle--${t}`})]})},V5=({id:e,sourceX:t,sourceY:n,targetX:r,targetY:o,sourcePosition:i,targetPosition:s,data:l,markerEnd:a})=>{const u=l,c=(u==null?void 0:u.relType)==="MasterDetail",[f]=Ts({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)",m=(u==null?void 0:u.targetType)==="standard"?"var(--mv-accent-logic)":"var(--mv-accent-data)";return F.jsxs(F.Fragment,{children:[F.jsx(mi,{id:e,path:f,markerEnd:a,style:{stroke:d,strokeWidth:c?2.5:2,strokeDasharray:c?"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:m,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"})]})]})},H5={searchQuery:"",showStandard:!0,showCustom:!0,showNamespaced:!1,showOrphaned:!1,displayRelationships:!0,autoLayout:!0},F5=()=>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 de=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),It=de((e,t)=>{var n=Object.defineProperty,r=(H,x,D)=>x in H?n(H,x,{enumerable:!0,configurable:!0,writable:!0,value:D}):H[x]=D,o=(H,x)=>()=>(x||H((x={exports:{}}).exports,x),x.exports),i=(H,x,D)=>r(H,typeof x!="symbol"?x+"":x,D),s=o((H,x)=>{var D="\0",I="\0",A="",C=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[I]={})}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(k=>Object.keys(R._in[k]).length===0)}sinks(){var R=this;return this.nodes().filter(k=>Object.keys(R._out[k]).length===0)}setNodes(R,k){var $=arguments,U=this;return R.forEach(function(W){$.length>1?U.setNode(W,k):U.setNode(W)}),this}setNode(R,k){return Object.hasOwn(this._nodes,R)?(arguments.length>1&&(this._nodes[R]=k),this):(this._nodes[R]=arguments.length>1?k:this._defaultNodeLabelFn(R),this._isCompound&&(this._parent[R]=I,this._children[R]={},this._children[I][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 k=this;if(Object.hasOwn(this._nodes,R)){var $=U=>k.removeEdge(k._edgeObjs[U]);delete this._nodes[R],this._isCompound&&(this._removeFromParentsChildList(R),delete this._parent[R],this.children(R).forEach(function(U){k.setParent(U)}),delete this._children[R]),Object.keys(this._in[R]).forEach($),delete this._in[R],delete this._preds[R],Object.keys(this._out[R]).forEach($),delete this._out[R],delete this._sucs[R],--this._nodeCount}return this}setParent(R,k){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(k===void 0)k=I;else{k+="";for(var $=k;$!==void 0;$=this.parent($))if($===R)throw new Error("Setting "+k+" as parent of "+R+" would create a cycle");this.setNode(k)}return this.setNode(R),this._removeFromParentsChildList(R),this._parent[R]=k,this._children[k][R]=!0,this}_removeFromParentsChildList(R){delete this._children[this._parent[R]][R]}parent(R){if(this._isCompound){var k=this._parent[R];if(k!==I)return k}}children(R=I){if(this._isCompound){var k=this._children[R];if(k)return Object.keys(k)}else{if(R===I)return this.nodes();if(this.hasNode(R))return[]}}predecessors(R){var k=this._preds[R];if(k)return Object.keys(k)}successors(R){var k=this._sucs[R];if(k)return Object.keys(k)}neighbors(R){var k=this.predecessors(R);if(k){let U=new Set(k);for(var $ of this.successors(R))U.add($);return Array.from(U.values())}}isLeaf(R){var k;return this.isDirected()?k=this.successors(R):k=this.neighbors(R),k.length===0}filterNodes(R){var k=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});k.setGraph(this.graph());var $=this;Object.entries(this._nodes).forEach(function([X,G]){R(X)&&k.setNode(X,G)}),Object.values(this._edgeObjs).forEach(function(X){k.hasNode(X.v)&&k.hasNode(X.w)&&k.setEdge(X,$.edge(X))});var U={};function W(X){var G=$.parent(X);return G===void 0||k.hasNode(G)?(U[X]=G,G):G in U?U[G]:W(G)}return this._isCompound&&k.nodes().forEach(X=>k.setParent(X,W(X))),k}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,k){var $=this,U=arguments;return R.reduce(function(W,X){return U.length>1?$.setEdge(W,X,k):$.setEdge(W,X),X}),this}setEdge(){var R,k,$,U,W=!1,X=arguments[0];typeof X=="object"&&X!==null&&"v"in X?(R=X.v,k=X.w,$=X.name,arguments.length===2&&(U=arguments[1],W=!0)):(R=X,k=arguments[1],$=arguments[3],arguments.length>2&&(U=arguments[2],W=!0)),R=""+R,k=""+k,$!==void 0&&($=""+$);var G=O(this._isDirected,R,k,$);if(Object.hasOwn(this._edgeLabels,G))return W&&(this._edgeLabels[G]=U),this;if($!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(R),this.setNode(k),this._edgeLabels[G]=W?U:this._defaultEdgeLabelFn(R,k,$);var Q=L(this._isDirected,R,k,$);return R=Q.v,k=Q.w,Object.freeze(Q),this._edgeObjs[G]=Q,M(this._preds[k],R),M(this._sucs[R],k),this._in[k][G]=Q,this._out[R][G]=Q,this._edgeCount++,this}edge(R,k,$){var U=arguments.length===1?Y(this._isDirected,arguments[0]):O(this._isDirected,R,k,$);return this._edgeLabels[U]}edgeAsObj(){let R=this.edge(...arguments);return typeof R!="object"?{label:R}:R}hasEdge(R,k,$){var U=arguments.length===1?Y(this._isDirected,arguments[0]):O(this._isDirected,R,k,$);return Object.hasOwn(this._edgeLabels,U)}removeEdge(R,k,$){var U=arguments.length===1?Y(this._isDirected,arguments[0]):O(this._isDirected,R,k,$),W=this._edgeObjs[U];return W&&(R=W.v,k=W.w,delete this._edgeLabels[U],delete this._edgeObjs[U],z(this._preds[k],R),z(this._sucs[R],k),delete this._in[k][U],delete this._out[R][U],this._edgeCount--),this}inEdges(R,k){return this.isDirected()?this.filterEdges(this._in[R],R,k):this.nodeEdges(R,k)}outEdges(R,k){return this.isDirected()?this.filterEdges(this._out[R],R,k):this.nodeEdges(R,k)}nodeEdges(R,k){if(R in this._nodes)return this.filterEdges({...this._in[R],...this._out[R]},R,k)}filterEdges(R,k,$){if(R){var U=Object.values(R);return $?U.filter(function(W){return W.v===k&&W.w===$||W.v===$&&W.w===k}):U}}};function M(R,k){R[k]?R[k]++:R[k]=1}function z(R,k){--R[k]||delete R[k]}function O(R,k,$,U){var W=""+k,X=""+$;if(!R&&W>X){var G=W;W=X,X=G}return W+A+X+A+(U===void 0?D:U)}function L(R,k,$,U){var W=""+k,X=""+$;if(!R&&W>X){var G=W;W=X,X=G}var Q={v:W,w:X};return U&&(Q.name=U),Q}function Y(R,k){return O(R,k.v,k.w,k.name)}x.exports=C}),l=o((H,x)=>{x.exports="3.0.2"}),a=o((H,x)=>{x.exports={Graph:s(),version:l()}}),u=o((H,x)=>{var D=s();x.exports={write:I,read:M};function I(z){var O={options:{directed:z.isDirected(),multigraph:z.isMultigraph(),compound:z.isCompound()},nodes:A(z),edges:C(z)};return z.graph()!==void 0&&(O.value=structuredClone(z.graph())),O}function A(z){return z.nodes().map(function(O){var L=z.node(O),Y=z.parent(O),R={v:O};return L!==void 0&&(R.value=L),Y!==void 0&&(R.parent=Y),R})}function C(z){return z.edges().map(function(O){var L=z.edge(O),Y={v:O.v,w:O.w};return O.name!==void 0&&(Y.name=O.name),L!==void 0&&(Y.value=L),Y})}function M(z){var O=new D(z.options).setGraph(z.value);return z.nodes.forEach(function(L){O.setNode(L.v,L.value),L.parent&&O.setParent(L.v,L.parent)}),z.edges.forEach(function(L){O.setEdge({v:L.v,w:L.w,name:L.name},L.value)}),O}}),c=o((H,x)=>{x.exports=I;var D=()=>1;function I(C,M,z,O){return A(C,String(M),z||D,O||function(L){return C.outEdges(L)})}function A(C,M,z,O){var L={},Y=!0,R=0,k=C.nodes(),$=function(G){var Q=z(G);L[G.v].distance+Q<L[G.w].distance&&(L[G.w]={distance:L[G.v].distance+Q,predecessor:G.v},Y=!0)},U=function(){k.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;$({v:Z,w:ee})})})};k.forEach(function(G){var Q=G===M?0:Number.POSITIVE_INFINITY;L[G]={distance:Q}});for(var W=k.length,X=1;X<W&&(Y=!1,R++,U(),!!Y);X++);if(R===W-1&&(Y=!1,U(),Y))throw new Error("The graph contains a negative weight cycle");return L}}),f=o((H,x)=>{x.exports=D;function D(I){var A={},C=[],M;function z(O){Object.hasOwn(A,O)||(A[O]=!0,M.push(O),I.successors(O).forEach(z),I.predecessors(O).forEach(z))}return I.nodes().forEach(function(O){M=[],z(O),M.length&&C.push(M)}),C}}),d=o((H,x)=>{var D=class{constructor(){i(this,"_arr",[]),i(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(I){return I.key})}has(I){return Object.hasOwn(this._keyIndices,I)}priority(I){var A=this._keyIndices[I];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(I,A){var C=this._keyIndices;if(I=String(I),!Object.hasOwn(C,I)){var M=this._arr,z=M.length;return C[I]=z,M.push({key:I,priority:A}),this._decrease(z),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var I=this._arr.pop();return delete this._keyIndices[I.key],this._heapify(0),I.key}decrease(I,A){var C=this._keyIndices[I];if(A>this._arr[C].priority)throw new Error("New priority is greater than current priority. Key: "+I+" Old: "+this._arr[C].priority+" New: "+A);this._arr[C].priority=A,this._decrease(C)}_heapify(I){var A=this._arr,C=2*I,M=C+1,z=I;C<A.length&&(z=A[C].priority<A[z].priority?C:z,M<A.length&&(z=A[M].priority<A[z].priority?M:z),z!==I&&(this._swap(I,z),this._heapify(z)))}_decrease(I){for(var A=this._arr,C=A[I].priority,M;I!==0&&(M=I>>1,!(A[M].priority<C));)this._swap(I,M),I=M}_swap(I,A){var C=this._arr,M=this._keyIndices,z=C[I],O=C[A];C[I]=O,C[A]=z,M[O.key]=I,M[z.key]=A}};x.exports=D}),h=o((H,x)=>{var D=d();x.exports=A;var I=()=>1;function A(M,z,O,L){var Y=function(R){return M.outEdges(R)};return C(M,String(z),O||I,L||Y)}function C(M,z,O,L){var Y={},R=new D,k,$,U=function(W){var X=W.v!==k?W.v:W.w,G=Y[X],Q=O(W),Z=$.distance+Q;if(Q<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+W+" Weight: "+Q);Z<G.distance&&(G.distance=Z,G.predecessor=k,R.decrease(X,Z))};for(M.nodes().forEach(function(W){var X=W===z?0:Number.POSITIVE_INFINITY;Y[W]={distance:X},R.add(W,X)});R.size()>0&&(k=R.removeMin(),$=Y[k],$.distance!==Number.POSITIVE_INFINITY);)L(k).forEach(U);return Y}}),m=o((H,x)=>{var D=h();x.exports=I;function I(A,C,M){return A.nodes().reduce(function(z,O){return z[O]=D(A,O,C,M),z},{})}}),w=o((H,x)=>{x.exports=D;function D(A,C,M){if(A[C].predecessor!==void 0)throw new Error("Invalid source vertex");if(A[M].predecessor===void 0&&M!==C)throw new Error("Invalid destination vertex");return{weight:A[M].distance,path:I(A,C,M)}}function I(A,C,M){for(var z=[],O=M;O!==C;)z.push(O),O=A[O].predecessor;return z.push(C),z.reverse()}}),E=o((H,x)=>{x.exports=D;function D(I){var A=0,C=[],M={},z=[];function O(L){var Y=M[L]={onStack:!0,lowlink:A,index:A++};if(C.push(L),I.successors(L).forEach(function($){Object.hasOwn(M,$)?M[$].onStack&&(Y.lowlink=Math.min(Y.lowlink,M[$].index)):(O($),Y.lowlink=Math.min(Y.lowlink,M[$].lowlink))}),Y.lowlink===Y.index){var R=[],k;do k=C.pop(),M[k].onStack=!1,R.push(k);while(L!==k);z.push(R)}}return I.nodes().forEach(function(L){Object.hasOwn(M,L)||O(L)}),z}}),y=o((H,x)=>{var D=E();x.exports=I;function I(A){return D(A).filter(function(C){return C.length>1||C.length===1&&A.hasEdge(C[0],C[0])})}}),g=o((H,x)=>{x.exports=I;var D=()=>1;function I(C,M,z){return A(C,M||D,z||function(O){return C.outEdges(O)})}function A(C,M,z){var O={},L=C.nodes();return L.forEach(function(Y){O[Y]={},O[Y][Y]={distance:0},L.forEach(function(R){Y!==R&&(O[Y][R]={distance:Number.POSITIVE_INFINITY})}),z(Y).forEach(function(R){var k=R.v===Y?R.w:R.v,$=M(R);O[Y][k]={distance:$,predecessor:Y}})}),L.forEach(function(Y){var R=O[Y];L.forEach(function(k){var $=O[k];L.forEach(function(U){var W=$[Y],X=R[U],G=$[U],Q=W.distance+X.distance;Q<G.distance&&(G.distance=Q,G.predecessor=X.predecessor)})})}),O}}),p=o((H,x)=>{function D(A){var C={},M={},z=[];function O(L){if(Object.hasOwn(M,L))throw new I;Object.hasOwn(C,L)||(M[L]=!0,C[L]=!0,A.predecessors(L).forEach(O),delete M[L],z.push(L))}if(A.sinks().forEach(O),Object.keys(C).length!==A.nodeCount())throw new I;return z}var I=class extends Error{constructor(){super(...arguments)}};x.exports=D,D.CycleException=I}),v=o((H,x)=>{var D=p();x.exports=I;function I(A){try{D(A)}catch(C){if(C instanceof D.CycleException)return!1;throw C}return!0}}),_=o((H,x)=>{x.exports=D;function D(A,C,M,z,O){Array.isArray(C)||(C=[C]);var L=(A.isDirected()?A.successors:A.neighbors).bind(A),Y={};return C.forEach(function(R){if(!A.hasNode(R))throw new Error("Graph does not have node: "+R);O=I(A,R,M==="post",Y,L,z,O)}),O}function I(A,C,M,z,O,L,Y){return Object.hasOwn(z,C)||(z[C]=!0,M||(Y=L(Y,C)),O(C).forEach(function(R){Y=I(A,R,M,z,O,L,Y)}),M&&(Y=L(Y,C))),Y}}),S=o((H,x)=>{var D=_();x.exports=I;function I(A,C,M){return D(A,C,M,function(z,O){return z.push(O),z},[])}}),T=o((H,x)=>{var D=S();x.exports=I;function I(A,C){return D(A,C,"post")}}),N=o((H,x)=>{var D=S();x.exports=I;function I(A,C){return D(A,C,"pre")}}),B=o((H,x)=>{var D=s(),I=d();x.exports=A;function A(C,M){var z=new D,O={},L=new I,Y;function R($){var U=$.v===Y?$.w:$.v,W=L.priority(U);if(W!==void 0){var X=M($);X<W&&(O[U]=Y,L.decrease(U,X))}}if(C.nodeCount()===0)return z;C.nodes().forEach(function($){L.add($,Number.POSITIVE_INFINITY),z.setNode($)}),L.decrease(C.nodes()[0],0);for(var k=!1;L.size()>0;){if(Y=L.removeMin(),Object.hasOwn(O,Y))z.setEdge(Y,O[Y]);else{if(k)throw new Error("Input graph is not connected: "+C);k=!0}C.nodeEdges(Y).forEach(R)}return z}}),b=o((H,x)=>{var D=h(),I=c();x.exports=A;function A(M,z,O,L){return C(M,z,O,L||function(Y){return M.outEdges(Y)})}function C(M,z,O,L){if(O===void 0)return D(M,z,O,L);for(var Y=!1,R=M.nodes(),k=0;k<R.length;k++){for(var $=L(R[k]),U=0;U<$.length;U++){var W=$[U],X=W.v===R[k]?W.v:W.w,G=X===W.v?W.w:W.v;O({v:X,w:G})<0&&(Y=!0)}if(Y)return I(M,z,O,L)}return D(M,z,O,L)}}),P=o((H,x)=>{x.exports={bellmanFord:c(),components:f(),dijkstra:h(),dijkstraAll:m(),extractPath:w(),findCycles:y(),floydWarshall:g(),isAcyclic:v(),postorder:T(),preorder:N(),prim:B(),shortestPaths:b(),reduce:_(),tarjan:E(),topsort:p()}}),j=a();t.exports={Graph:j.Graph,json:u(),alg:P(),version:j.version}}),B5=de((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}),U5=de((e,t)=>{var n=It().Graph,r=B5();t.exports=i;var o=()=>1;function i(f,d){if(f.nodeCount()<=1)return[];let h=a(f,d||o);return s(h.graph,h.buckets,h.zeroIdx).flatMap(m=>f.outEdges(m.v,m.w))}function s(f,d,h){let m=[],w=d[d.length-1],E=d[0],y;for(;f.nodeCount();){for(;y=E.dequeue();)l(f,d,h,y);for(;y=w.dequeue();)l(f,d,h,y);if(f.nodeCount()){for(let g=d.length-2;g>0;--g)if(y=d[g].dequeue(),y){m=m.concat(l(f,d,h,y,!0));break}}}return m}function l(f,d,h,m,w){let E=w?[]:void 0;return f.inEdges(m.v).forEach(y=>{let g=f.edge(y),p=f.node(y.v);w&&E.push({v:y.v,w:y.w}),p.out-=g,u(d,h,p)}),f.outEdges(m.v).forEach(y=>{let g=f.edge(y),p=y.w,v=f.node(p);v.in-=g,u(d,h,v)}),f.removeNode(m.v),E}function a(f,d){let h=new n,m=0,w=0;f.nodes().forEach(g=>{h.setNode(g,{v:g,in:0,out:0})}),f.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),m=Math.max(m,h.node(g.w).in+=v)});let E=c(w+m+3).map(()=>new r),y=m+1;return h.nodes().forEach(g=>{u(E,y,h.node(g))}),{graph:h,buckets:E,zeroIdx:y}}function u(f,d,h){h.out?h.in?f[h.out-h.in+d].enqueue(h):f[f.length-1].enqueue(h):f[0].enqueue(h)}function c(f){let d=[];for(let h=0;h<f;h++)d.push(h);return d}}),Ne=de((e,t)=>{var n=It().Graph;t.exports={addBorderNode:d,addDummyNode:r,applyWithChunking:w,asNonCompoundGraph:i,buildLayerMatrix:u,intersectRect:a,mapValues:N,maxRank:E,normalizeRanks:c,notime:p,partition:y,pick:T,predecessorWeights:l,range:S,removeEmptyRanks:f,simplify:o,successorWeights:s,time:g,uniqueId:_,zipObject:B};function r(b,P,j,H){for(var x=H;b.hasNode(x);)x=_(H);return j.dummy=P,b.setNode(x,j),x}function o(b){let P=new n().setGraph(b.graph());return b.nodes().forEach(j=>P.setNode(j,b.node(j))),b.edges().forEach(j=>{let H=P.edge(j.v,j.w)||{weight:0,minlen:1},x=b.edge(j);P.setEdge(j.v,j.w,{weight:H.weight+x.weight,minlen:Math.max(H.minlen,x.minlen)})}),P}function i(b){let P=new n({multigraph:b.isMultigraph()}).setGraph(b.graph());return b.nodes().forEach(j=>{b.children(j).length||P.setNode(j,b.node(j))}),b.edges().forEach(j=>{P.setEdge(j,b.edge(j))}),P}function s(b){let P=b.nodes().map(j=>{let H={};return b.outEdges(j).forEach(x=>{H[x.w]=(H[x.w]||0)+b.edge(x).weight}),H});return B(b.nodes(),P)}function l(b){let P=b.nodes().map(j=>{let H={};return b.inEdges(j).forEach(x=>{H[x.v]=(H[x.v]||0)+b.edge(x).weight}),H});return B(b.nodes(),P)}function a(b,P){let j=b.x,H=b.y,x=P.x-j,D=P.y-H,I=b.width/2,A=b.height/2;if(!x&&!D)throw new Error("Not possible to find intersection inside of the rectangle");let C,M;return Math.abs(D)*I>Math.abs(x)*A?(D<0&&(A=-A),C=A*x/D,M=A):(x<0&&(I=-I),C=I,M=I*D/x),{x:j+C,y:H+M}}function u(b){let P=S(E(b)+1).map(()=>[]);return b.nodes().forEach(j=>{let H=b.node(j),x=H.rank;x!==void 0&&(P[x][H.order]=j)}),P}function c(b){let P=b.nodes().map(H=>{let x=b.node(H).rank;return x===void 0?Number.MAX_VALUE:x}),j=w(Math.min,P);b.nodes().forEach(H=>{let x=b.node(H);Object.hasOwn(x,"rank")&&(x.rank-=j)})}function f(b){let P=b.nodes().map(I=>b.node(I).rank).filter(I=>I!==void 0),j=w(Math.min,P),H=[];b.nodes().forEach(I=>{let A=b.node(I).rank-j;H[A]||(H[A]=[]),H[A].push(I)});let x=0,D=b.graph().nodeRankFactor;Array.from(H).forEach((I,A)=>{I===void 0&&A%D!==0?--x:I!==void 0&&x&&I.forEach(C=>b.node(C).rank+=x)})}function d(b,P,j,H){let x={width:0,height:0};return arguments.length>=4&&(x.rank=j,x.order=H),r(b,"border",x,P)}function h(b,P=m){let j=[];for(let H=0;H<b.length;H+=P){let x=b.slice(H,H+P);j.push(x)}return j}var m=65535;function w(b,P){if(P.length>m){let j=h(P);return b.apply(null,j.map(H=>b.apply(null,H)))}else return b.apply(null,P)}function E(b){let P=b.nodes().map(j=>{let H=b.node(j).rank;return H===void 0?Number.MIN_VALUE:H});return w(Math.max,P)}function y(b,P){let j={lhs:[],rhs:[]};return b.forEach(H=>{P(H)?j.lhs.push(H):j.rhs.push(H)}),j}function g(b,P){let j=Date.now();try{return P()}finally{console.log(b+" time: "+(Date.now()-j)+"ms")}}function p(b,P){return P()}var v=0;function _(b){var P=++v;return b+(""+P)}function S(b,P,j=1){P==null&&(P=b,b=0);let H=D=>D<P;j<0&&(H=D=>P<D);let x=[];for(let D=b;H(D);D+=j)x.push(D);return x}function T(b,P){let j={};for(let H of P)b[H]!==void 0&&(j[H]=b[H]);return j}function N(b,P){let j=P;return typeof P=="string"&&(j=H=>H[P]),Object.entries(b).reduce((H,[x,D])=>(H[x]=j(D,x),H),{})}function B(b,P){return b.reduce((j,H,x)=>(j[H]=P[x],j),{})}}),W5=de((e,t)=>{var n=U5(),r=Ne().uniqueId;t.exports={run:o,undo:s};function o(l){(l.graph().acyclicer==="greedy"?n(l,a(l)):i(l)).forEach(u=>{let c=l.edge(u);l.removeEdge(u),c.forwardName=u.name,c.reversed=!0,l.setEdge(u.w,u.v,c,r("rev"))});function a(u){return c=>u.edge(c).weight}}function i(l){let a=[],u={},c={};function f(d){Object.hasOwn(c,d)||(c[d]=!0,u[d]=!0,l.outEdges(d).forEach(h=>{Object.hasOwn(u,h.w)?a.push(h):f(h.w)}),delete u[d])}return l.nodes().forEach(f),a}function s(l){l.edges().forEach(a=>{let u=l.edge(a);if(u.reversed){l.removeEdge(a);let c=u.forwardName;delete u.reversed,delete u.forwardName,l.setEdge(a.w,a.v,u,c)}})}}),Y5=de((e,t)=>{var n=Ne();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,c=l.w,f=s.node(c).rank,d=l.name,h=s.edge(l),m=h.labelRank;if(f===u+1)return;s.removeEdge(l);let w,E,y;for(y=0,++u;u<f;++y,++u)h.points=[],E={width:0,height:0,edgeLabel:h,edgeObj:l,rank:u},w=n.addDummyNode(s,"edge",E,"_d"),u===m&&(E.width=h.width,E.height=h.height,E.dummy="edge-label",E.labelpos=h.labelpos),s.setEdge(a,w,{weight:h.weight},d),y===0&&s.graph().dummyChains.push(w),a=w;s.setEdge(a,c,{weight:h.weight},d)}function i(s){s.graph().dummyChains.forEach(l=>{let a=s.node(l),u=a.edgeLabel,c;for(s.setEdge(a.edgeObj,u);a.dummy;)c=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=c,a=s.node(l)})}}),el=de((e,t)=>{var{applyWithChunking:n}=Ne();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 c=i.outEdges(a).map(d=>d==null?Number.POSITIVE_INFINITY:l(d.w)-i.edge(d).minlen);var f=n(Math.min,c);return f===Number.POSITIVE_INFINITY&&(f=0),u.rank=f}i.sources().forEach(l)}function o(i,s){return i.node(s.w).rank-i.node(s.v).rank-i.edge(s).minlen}}),V0=de((e,t)=>{var n=It().Graph,r=el().slack;t.exports=o;function o(a){var u=new n({directed:!1}),c=a.nodes()[0],f=a.nodeCount();u.setNode(c,{});for(var d,h;i(u,a)<f;)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 c(f){u.nodeEdges(f).forEach(d=>{var h=d.v,m=f===h?d.w:h;!a.hasNode(m)&&!r(u,d)&&(a.setNode(m,{}),a.setEdge(f,m,{}),c(m))})}return a.nodes().forEach(c),a.nodeCount()}function s(a,u){return u.edges().reduce((c,f)=>{let d=Number.POSITIVE_INFINITY;return a.hasNode(f.v)!==a.hasNode(f.w)&&(d=r(u,f)),d<c[0]?[d,f]:c},[Number.POSITIVE_INFINITY,null])[1]}function l(a,u,c){a.nodes().forEach(f=>u.node(f).rank+=c)}}),X5=de((e,t)=>{var n=V0(),r=el().slack,o=el().longestPath,i=It().alg.preorder,s=It().alg.postorder,l=Ne().simplify;t.exports=a,a.initLowLimValues=d,a.initCutValues=u,a.calcCutValue=f,a.leaveEdge=m,a.enterEdge=w,a.exchangeEdges=E;function a(v){v=l(v),o(v);var _=n(v);d(_),u(_,v);for(var S,T;S=m(_);)T=w(_,v,S),E(_,v,S,T)}function u(v,_){var S=s(v,v.nodes());S=S.slice(0,S.length-1),S.forEach(T=>c(v,_,T))}function c(v,_,S){var T=v.node(S),N=T.parent;v.edge(S,N).cutvalue=f(v,_,S)}function f(v,_,S){var T=v.node(S),N=T.parent,B=!0,b=_.edge(S,N),P=0;return b||(B=!1,b=_.edge(N,S)),P=b.weight,_.nodeEdges(S).forEach(j=>{var H=j.v===S,x=H?j.w:j.v;if(x!==N){var D=H===B,I=_.edge(j).weight;if(P+=D?I:-I,g(v,S,x)){var A=v.edge(S,x).cutvalue;P+=D?-A:A}}}),P}function d(v,_){arguments.length<2&&(_=v.nodes()[0]),h(v,{},1,_)}function h(v,_,S,T,N){var B=S,b=v.node(T);return _[T]=!0,v.neighbors(T).forEach(P=>{Object.hasOwn(_,P)||(S=h(v,_,S,P,T))}),b.low=B,b.lim=S++,N?b.parent=N:delete b.parent,S}function m(v){return v.edges().find(_=>v.edge(_).cutvalue<0)}function w(v,_,S){var T=S.v,N=S.w;_.hasEdge(T,N)||(T=S.w,N=S.v);var B=v.node(T),b=v.node(N),P=B,j=!1;B.lim>b.lim&&(P=b,j=!0);var H=_.edges().filter(x=>j===p(v,v.node(x.v),P)&&j!==p(v,v.node(x.w),P));return H.reduce((x,D)=>r(_,D)<r(_,x)?D:x)}function E(v,_,S,T){var N=S.v,B=S.w;v.removeEdge(N,B),v.setEdge(T.v,T.w,{}),d(v),u(v,_),y(v,_)}function y(v,_){var S=v.nodes().find(N=>!_.node(N).parent),T=i(v,S);T=T.slice(1),T.forEach(N=>{var B=v.node(N).parent,b=_.edge(N,B),P=!1;b||(b=_.edge(B,N),P=!0),_.node(N).rank=_.node(B).rank+(P?b.minlen:-b.minlen)})}function g(v,_,S){return v.hasEdge(_,S)}function p(v,_,S){return S.low<=_.lim&&_.lim<=S.lim}}),G5=de((e,t)=>{var n=el(),r=n.longestPath,o=V0(),i=X5();t.exports=s;function s(c){var f=c.graph().ranker;if(f instanceof Function)return f(c);switch(c.graph().ranker){case"network-simplex":u(c);break;case"tight-tree":a(c);break;case"longest-path":l(c);break;case"none":break;default:u(c)}}var l=r;function a(c){r(c),o(c)}function u(c){i(c)}}),Q5=de((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,c=r(i,s,u.v,u.w),f=c.path,d=c.lca,h=0,m=f[h],w=!0;for(;l!==u.w;){if(a=i.node(l),w){for(;(m=f[h])!==d&&i.node(m).maxRank<a.rank;)h++;m===d&&(w=!1)}if(!w){for(;h<f.length-1&&i.node(m=f[h+1]).minRank<=a.rank;)h++;m=f[h]}i.setParent(l,m),l=i.successors(l)[0]}})}function r(i,s,l,a){let u=[],c=[],f=Math.min(s[l].low,s[a].low),d=Math.max(s[l].lim,s[a].lim),h,m;h=l;do h=i.parent(h),u.push(h);while(h&&(s[h].low>f||d>s[h].lim));for(m=h,h=a;(h=i.parent(h))!==m;)c.push(h);return{path:u.concat(c.reverse()),lca:m}}function o(i){let s={},l=0;function a(u){let c=l;i.children(u).forEach(a),s[u]={low:c,lim:l++}}return i.children().forEach(a),s}}),K5=de((e,t)=>{var n=Ne();t.exports={run:r,cleanup:l};function r(a){let u=n.addDummyNode(a,"root",{},"_root"),c=i(a),f=Object.values(c),d=n.applyWithChunking(Math.max,f)-1,h=2*d+1;a.graph().nestingRoot=u,a.edges().forEach(w=>a.edge(w).minlen*=h);let m=s(a)+1;a.children().forEach(w=>o(a,u,h,m,d,c,w)),a.graph().nodeRankFactor=h}function o(a,u,c,f,d,h,m){let w=a.children(m);if(!w.length){m!==u&&a.setEdge(u,m,{weight:0,minlen:c});return}let E=n.addBorderNode(a,"_bt"),y=n.addBorderNode(a,"_bb"),g=a.node(m);a.setParent(E,m),g.borderTop=E,a.setParent(y,m),g.borderBottom=y,w.forEach(p=>{o(a,u,c,f,d,h,p);let v=a.node(p),_=v.borderTop?v.borderTop:p,S=v.borderBottom?v.borderBottom:p,T=v.borderTop?f:2*f,N=_!==S?1:d-h[m]+1;a.setEdge(E,_,{weight:T,minlen:N,nestingEdge:!0}),a.setEdge(S,y,{weight:T,minlen:N,nestingEdge:!0})}),a.parent(m)||a.setEdge(u,E,{weight:0,minlen:d+h[m]})}function i(a){var u={};function c(f,d){var h=a.children(f);h&&h.length&&h.forEach(m=>c(m,d+1)),u[f]=d}return a.children().forEach(f=>c(f,1)),u}function s(a){return a.edges().reduce((u,c)=>u+a.edge(c).weight,0)}function l(a){var u=a.graph();a.removeNode(u.nestingRoot),delete u.nestingRoot,a.edges().forEach(c=>{var f=a.edge(c);f.nestingEdge&&a.removeEdge(c)})}}),Z5=de((e,t)=>{var n=Ne();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 c=u.minRank,f=u.maxRank+1;c<f;++c)o(i,"borderLeft","_bl",l,u,c),o(i,"borderRight","_br",l,u,c)}}i.children().forEach(s)}function o(i,s,l,a,u,c){let f={width:0,height:0,rank:c,borderType:s},d=u[s][c-1],h=n.addDummyNode(i,"border",f,l);u[s][c]=h,i.setParent(h,a),d&&i.setEdge(d,h,{weight:1})}}),q5=de((e,t)=>{t.exports={adjust:n,undo:r};function n(c){let f=c.graph().rankdir.toLowerCase();(f==="lr"||f==="rl")&&o(c)}function r(c){let f=c.graph().rankdir.toLowerCase();(f==="bt"||f==="rl")&&s(c),(f==="lr"||f==="rl")&&(a(c),o(c))}function o(c){c.nodes().forEach(f=>i(c.node(f))),c.edges().forEach(f=>i(c.edge(f)))}function i(c){let f=c.width;c.width=c.height,c.height=f}function s(c){c.nodes().forEach(f=>l(c.node(f))),c.edges().forEach(f=>{let d=c.edge(f);d.points.forEach(l),Object.hasOwn(d,"y")&&l(d)})}function l(c){c.y=-c.y}function a(c){c.nodes().forEach(f=>u(c.node(f))),c.edges().forEach(f=>{let d=c.edge(f);d.points.forEach(u),Object.hasOwn(d,"x")&&u(d)})}function u(c){let f=c.x;c.x=c.y,c.y=f}}),J5=de((e,t)=>{var n=Ne();t.exports=r;function r(o){let i={},s=o.nodes().filter(f=>!o.children(f).length),l=s.map(f=>o.node(f).rank),a=n.applyWithChunking(Math.max,l),u=n.range(a+1).map(()=>[]);function c(f){if(i[f])return;i[f]=!0;let d=o.node(f);u[d.rank].push(f),o.successors(f).forEach(c)}return s.sort((f,d)=>o.node(f).rank-o.node(d).rank).forEach(c),u}}),eS=de((e,t)=>{var n=Ne().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((m,w)=>w)),u=s.flatMap(m=>i.outEdges(m).map(w=>({pos:a[w.w],weight:i.edge(w).weight})).sort((w,E)=>w.pos-E.pos)),c=1;for(;c<l.length;)c<<=1;let f=2*c-1;c-=1;let d=new Array(f).fill(0),h=0;return u.forEach(m=>{let w=m.pos+c;d[w]+=m.weight;let E=0;for(;w>0;)w%2&&(E+=d[w+1]),w=w-1>>1,d[w]+=m.weight;h+=m.weight*E}),h}}),tS=de((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 c=r.edge(u),f=r.node(u.v);return{sum:a.sum+c.weight*f.order,weight:a.weight+c.weight}},{sum:0,weight:0});return{v:i,barycenter:l.sum/l.weight,weight:l.weight}}else return{v:i}})}}),nS=de((e,t)=>{var n=Ne();t.exports=r;function r(s,l){let a={};s.forEach((c,f)=>{let d=a[c.v]={indegree:0,in:[],out:[],vs:[c.v],i:f};c.barycenter!==void 0&&(d.barycenter=c.barycenter,d.weight=c.weight)}),l.edges().forEach(c=>{let f=a[c.v],d=a[c.w];f!==void 0&&d!==void 0&&(d.indegree++,f.out.push(a[c.w]))});let u=Object.values(a).filter(c=>!c.indegree);return o(u)}function o(s){let l=[];function a(c){return f=>{f.merged||(f.barycenter===void 0||c.barycenter===void 0||f.barycenter>=c.barycenter)&&i(c,f)}}function u(c){return f=>{f.in.push(c),--f.indegree===0&&s.push(f)}}for(;s.length;){let c=s.pop();l.push(c),c.in.reverse().forEach(a(c)),c.out.forEach(u(c))}return l.filter(c=>!c.merged).map(c=>n.pick(c,["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}}),rS=de((e,t)=>{var n=Ne();t.exports=r;function r(s,l){let a=n.partition(s,E=>Object.hasOwn(E,"barycenter")),u=a.lhs,c=a.rhs.sort((E,y)=>y.i-E.i),f=[],d=0,h=0,m=0;u.sort(i(!!l)),m=o(f,c,m),u.forEach(E=>{m+=E.vs.length,f.push(E.vs),d+=E.barycenter*E.weight,h+=E.weight,m=o(f,c,m)});let w={vs:f.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}}),oS=de((e,t)=>{var n=tS(),r=nS(),o=rS();t.exports=i;function i(a,u,c,f){let d=a.children(u),h=a.node(u),m=h?h.borderLeft:void 0,w=h?h.borderRight:void 0,E={};m&&(d=d.filter(v=>v!==m&&v!==w));let y=n(a,d);y.forEach(v=>{if(a.children(v.v).length){let _=i(a,v.v,c,f);E[v.v]=_,Object.hasOwn(_,"barycenter")&&l(v,_)}});let g=r(y,c);s(g,E);let p=o(g,f);if(m&&(p.vs=[m,p.vs,w].flat(!0),a.predecessors(m).length)){let v=a.node(a.predecessors(m)[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(c=>{c.vs=c.vs.flatMap(f=>u[f]?u[f].vs:f)})}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)}}),iS=de((e,t)=>{var n=It().Graph,r=Ne();t.exports=o;function o(s,l,a,u){u||(u=s.nodes());let c=i(s),f=new n({compound:!0}).setGraph({root:c}).setDefaultNodeLabel(d=>s.node(d));return u.forEach(d=>{let h=s.node(d),m=s.parent(d);(h.rank===l||h.minRank<=l&&l<=h.maxRank)&&(f.setNode(d),f.setParent(d,m||c),s[a](d).forEach(w=>{let E=w.v===d?w.w:w.v,y=f.edge(E,d),g=y!==void 0?y.weight:0;f.setEdge(E,d,{weight:s.edge(w).weight+g})}),Object.hasOwn(h,"minRank")&&f.setNode(d,{borderLeft:h.borderLeft[l],borderRight:h.borderRight[l]}))}),f}function i(s){for(var l;s.hasNode(l=r.uniqueId("_root")););return l}}),sS=de((e,t)=>{t.exports=n;function n(r,o,i){let s={},l;i.forEach(a=>{let u=r.parent(a),c,f;for(;u;){if(c=r.parent(u),c?(f=s[c],s[c]=u):(f=l,l=u),f&&f!==u){o.setEdge(f,u);return}u=c}})}}),lS=de((e,t)=>{var n=J5(),r=eS(),o=oS(),i=iS(),s=sS(),l=It().Graph,a=Ne();t.exports=u;function u(h,m={}){if(typeof m.customOrder=="function"){m.customOrder(h,u);return}let w=a.maxRank(h),E=c(h,a.range(1,w+1),"inEdges"),y=c(h,a.range(w-1,-1,-1),"outEdges"),g=n(h);if(d(h,g),m.disableOptimalOrderHeuristic)return;let p=Number.POSITIVE_INFINITY,v,_=m.constraints||[];for(let S=0,T=0;T<4;++S,++T){f(S%2?E:y,S%4>=2,_),g=a.buildLayerMatrix(h);let N=r(h,g);N<p?(T=0,v=Object.assign({},g),p=N):N===p&&(v=structuredClone(g))}d(h,v)}function c(h,m,w){let E=new Map,y=(g,p)=>{E.has(g)||E.set(g,[]),E.get(g).push(p)};for(let g of h.nodes()){let p=h.node(g);if(typeof p.rank=="number"&&y(p.rank,g),typeof p.minRank=="number"&&typeof p.maxRank=="number")for(let v=p.minRank;v<=p.maxRank;v++)v!==p.rank&&y(v,g)}return m.map(function(g){return i(h,g,w,E.get(g)||[])})}function f(h,m,w){let E=new l;h.forEach(function(y){w.forEach(v=>E.setEdge(v.left,v.right));let g=y.graph().root,p=o(y,g,E,m);p.vs.forEach((v,_)=>y.node(v).order=_),s(y,E,p.vs)})}function d(h,m){Object.values(m).forEach(w=>w.forEach((E,y)=>h.node(E).order=y))}}),aS=de((e,t)=>{var n=It().Graph,r=Ne();t.exports={positionX:w,findType1Conflicts:o,findType2Conflicts:i,addConflict:l,hasConflict:a,verticalAlignment:u,horizontalCompaction:c,alignCoordinates:h,findSmallestWidthAlignment:d,balance:m};function o(g,p){let v={};function _(S,T){let N=0,B=0,b=S.length,P=T[T.length-1];return T.forEach((j,H)=>{let x=s(g,j),D=x?g.node(x).order:b;(x||j===P)&&(T.slice(B,H+1).forEach(I=>{g.predecessors(I).forEach(A=>{let C=g.node(A),M=C.order;(M<N||D<M)&&!(C.dummy&&g.node(I).dummy)&&l(v,A,I)})}),B=H+1,N=D)}),T}return p.length&&p.reduce(_),v}function i(g,p){let v={};function _(T,N,B,b,P){let j;r.range(N,B).forEach(H=>{j=T[H],g.node(j).dummy&&g.predecessors(j).forEach(x=>{let D=g.node(x);D.dummy&&(D.order<b||D.order>P)&&l(v,x,j)})})}function S(T,N){let B=-1,b,P=0;return N.forEach((j,H)=>{if(g.node(j).dummy==="border"){let x=g.predecessors(j);x.length&&(b=g.node(x[0]).order,_(N,P,H,B,b),P=H,B=b)}_(N,P,N.length,b,T.length)}),N}return p.length&&p.reduce(S),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 S=p;p=v,v=S}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 S={},T={},N={};return p.forEach(B=>{B.forEach((b,P)=>{S[b]=b,T[b]=b,N[b]=P})}),p.forEach(B=>{let b=-1;B.forEach(P=>{let j=_(P);if(j.length){j=j.sort((x,D)=>N[x]-N[D]);let H=(j.length-1)/2;for(let x=Math.floor(H),D=Math.ceil(H);x<=D;++x){let I=j[x];T[P]===P&&b<N[I]&&!a(v,P,I)&&(T[I]=P,T[P]=S[P]=S[I],b=N[I])}}})}),{root:S,align:T}}function c(g,p,v,_,S){let T={},N=f(g,p,v,S),B=S?"borderLeft":"borderRight";function b(H,x){let D=N.nodes().slice(),I={},A=D.pop();for(;A;){if(I[A])H(A);else{I[A]=!0,D.push(A);for(let C of x(A))D.push(C)}A=D.pop()}}function P(H){T[H]=N.inEdges(H).reduce((x,D)=>Math.max(x,T[D.v]+N.edge(D)),0)}function j(H){let x=N.outEdges(H).reduce((I,A)=>Math.min(I,T[A.w]-N.edge(A)),Number.POSITIVE_INFINITY),D=g.node(H);x!==Number.POSITIVE_INFINITY&&D.borderType!==B&&(T[H]=Math.max(T[H],x))}return b(P,N.predecessors.bind(N)),b(j,N.successors.bind(N)),Object.keys(_).forEach(H=>T[H]=T[v[H]]),T}function f(g,p,v,_){let S=new n,T=g.graph(),N=E(T.nodesep,T.edgesep,_);return p.forEach(B=>{let b;B.forEach(P=>{let j=v[P];if(S.setNode(j),b){var H=v[b],x=S.edge(H,j);S.setEdge(H,j,Math.max(N(g,P,b),x||0))}b=P})}),S}function d(g,p){return Object.values(p).reduce((v,_)=>{let S=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY;Object.entries(_).forEach(([B,b])=>{let P=y(g,B)/2;S=Math.max(b+P,S),T=Math.min(b-P,T)});let N=S-T;return N<v[0]&&(v=[N,_]),v},[Number.POSITIVE_INFINITY,null])[1]}function h(g,p){let v=Object.values(p),_=r.applyWithChunking(Math.min,v),S=r.applyWithChunking(Math.max,v);["u","d"].forEach(T=>{["l","r"].forEach(N=>{let B=T+N,b=g[B];if(b===p)return;let P=Object.values(b),j=_-r.applyWithChunking(Math.min,P);N!=="l"&&(j=S-r.applyWithChunking(Math.max,P)),j&&(g[B]=r.mapValues(b,H=>H+j))})})}function m(g,p){return r.mapValues(g.ul,(v,_)=>{if(p)return g[p.toLowerCase()][_];{let S=Object.values(g).map(T=>T[_]).sort((T,N)=>T-N);return(S[1]+S[2])/2}})}function w(g){let p=r.buildLayerMatrix(g),v=Object.assign(o(g,p),i(g,p)),_={},S;["u","d"].forEach(N=>{S=N==="u"?p:Object.values(p).reverse(),["l","r"].forEach(B=>{B==="r"&&(S=S.map(H=>Object.values(H).reverse()));let b=(N==="u"?g.predecessors:g.successors).bind(g),P=u(g,S,v,b),j=c(g,S,P.root,P.align,B==="r");B==="r"&&(j=r.mapValues(j,H=>-H)),_[N+B]=j})});let T=d(g,_);return h(_,T),m(_,g.graph().align)}function E(g,p,v){return(_,S,T)=>{let N=_.node(S),B=_.node(T),b=0,P;if(b+=N.width/2,Object.hasOwn(N,"labelpos"))switch(N.labelpos.toLowerCase()){case"l":P=-N.width/2;break;case"r":P=N.width/2;break}if(P&&(b+=v?P:-P),P=0,b+=(N.dummy?p:g)/2,b+=(B.dummy?p:g)/2,b+=B.width/2,Object.hasOwn(B,"labelpos"))switch(B.labelpos.toLowerCase()){case"l":P=B.width/2;break;case"r":P=-B.width/2;break}return P&&(b+=v?P:-P),P=0,b}}function y(g,p){return g.node(p).width}}),uS=de((e,t)=>{var n=Ne(),r=aS().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,c=0;l.forEach(f=>{let d=f.reduce((h,m)=>{let w=s.node(m).height;return h>w?h:w},0);f.forEach(h=>{let m=s.node(h);u==="top"?m.y=c+m.height/2:u==="bottom"?m.y=c+d-m.height/2:m.y=c+d/2}),c+=d+a})}}),cS=de((e,t)=>{var n=W5(),r=Y5(),o=G5(),i=Ne().normalizeRanks,s=Q5(),l=Ne().removeEmptyRanks,a=K5(),u=Z5(),c=q5(),f=lS(),d=uS(),h=Ne(),m=It().Graph;t.exports=w;function w(k,$={}){let U=$.debugTiming?h.time:h.notime;return U("layout",()=>{let W=U(" buildLayoutGraph",()=>b(k));return U(" runLayout",()=>E(W,U,$)),U(" updateInputGraph",()=>y(k,W)),W})}function E(k,$,U){$(" makeSpaceForEdgeLabels",()=>P(k)),$(" removeSelfEdges",()=>z(k)),$(" acyclic",()=>n.run(k)),$(" nestingGraph.run",()=>a.run(k)),$(" rank",()=>o(h.asNonCompoundGraph(k))),$(" injectEdgeLabelProxies",()=>j(k)),$(" removeEmptyRanks",()=>l(k)),$(" nestingGraph.cleanup",()=>a.cleanup(k)),$(" normalizeRanks",()=>i(k)),$(" assignRankMinMax",()=>H(k)),$(" removeEdgeLabelProxies",()=>x(k)),$(" normalize.run",()=>r.run(k)),$(" parentDummyChains",()=>s(k)),$(" addBorderSegments",()=>u(k)),$(" order",()=>f(k,U)),$(" insertSelfEdges",()=>O(k)),$(" adjustCoordinateSystem",()=>c.adjust(k)),$(" position",()=>d(k)),$(" positionSelfEdges",()=>L(k)),$(" removeBorderNodes",()=>M(k)),$(" normalize.undo",()=>r.undo(k)),$(" fixupEdgeLabelCoords",()=>A(k)),$(" undoCoordinateSystem",()=>c.undo(k)),$(" translateGraph",()=>D(k)),$(" assignNodeIntersects",()=>I(k)),$(" reversePoints",()=>C(k)),$(" acyclic.undo",()=>n.undo(k))}function y(k,$){k.nodes().forEach(U=>{let W=k.node(U),X=$.node(U);W&&(W.x=X.x,W.y=X.y,W.order=X.order,W.rank=X.rank,$.children(U).length&&(W.width=X.width,W.height=X.height))}),k.edges().forEach(U=>{let W=k.edge(U),X=$.edge(U);W.points=X.points,Object.hasOwn(X,"x")&&(W.x=X.x,W.y=X.y)}),k.graph().width=$.graph().width,k.graph().height=$.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"],S={width:0,height:0},T=["minlen","weight","width","height","labeloffset"],N={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},B=["labelpos"];function b(k){let $=new m({multigraph:!0,compound:!0}),U=R(k.graph());return $.setGraph(Object.assign({},p,Y(U,g),h.pick(U,v))),k.nodes().forEach(W=>{let X=R(k.node(W)),G=Y(X,_);Object.keys(S).forEach(Q=>{G[Q]===void 0&&(G[Q]=S[Q])}),$.setNode(W,G),$.setParent(W,k.parent(W))}),k.edges().forEach(W=>{let X=R(k.edge(W));$.setEdge(W,Object.assign({},N,Y(X,T),h.pick(X,B)))}),$}function P(k){let $=k.graph();$.ranksep/=2,k.edges().forEach(U=>{let W=k.edge(U);W.minlen*=2,W.labelpos.toLowerCase()!=="c"&&($.rankdir==="TB"||$.rankdir==="BT"?W.width+=W.labeloffset:W.height+=W.labeloffset)})}function j(k){k.edges().forEach($=>{let U=k.edge($);if(U.width&&U.height){let W=k.node($.v),X={rank:(k.node($.w).rank-W.rank)/2+W.rank,e:$};h.addDummyNode(k,"edge-proxy",X,"_ep")}})}function H(k){let $=0;k.nodes().forEach(U=>{let W=k.node(U);W.borderTop&&(W.minRank=k.node(W.borderTop).rank,W.maxRank=k.node(W.borderBottom).rank,$=Math.max($,W.maxRank))}),k.graph().maxRank=$}function x(k){k.nodes().forEach($=>{let U=k.node($);U.dummy==="edge-proxy"&&(k.edge(U.e).labelRank=U.rank,k.removeNode($))})}function D(k){let $=Number.POSITIVE_INFINITY,U=0,W=Number.POSITIVE_INFINITY,X=0,G=k.graph(),Q=G.marginx||0,Z=G.marginy||0;function ee(re){let ie=re.x,se=re.y,Se=re.width,qe=re.height;$=Math.min($,ie-Se/2),U=Math.max(U,ie+Se/2),W=Math.min(W,se-qe/2),X=Math.max(X,se+qe/2)}k.nodes().forEach(re=>ee(k.node(re))),k.edges().forEach(re=>{let ie=k.edge(re);Object.hasOwn(ie,"x")&&ee(ie)}),$-=Q,W-=Z,k.nodes().forEach(re=>{let ie=k.node(re);ie.x-=$,ie.y-=W}),k.edges().forEach(re=>{let ie=k.edge(re);ie.points.forEach(se=>{se.x-=$,se.y-=W}),Object.hasOwn(ie,"x")&&(ie.x-=$),Object.hasOwn(ie,"y")&&(ie.y-=W)}),G.width=U-$+Q,G.height=X-W+Z}function I(k){k.edges().forEach($=>{let U=k.edge($),W=k.node($.v),X=k.node($.w),G,Q;U.points?(G=U.points[0],Q=U.points[U.points.length-1]):(U.points=[],G=X,Q=W),U.points.unshift(h.intersectRect(W,G)),U.points.push(h.intersectRect(X,Q))})}function A(k){k.edges().forEach($=>{let U=k.edge($);if(Object.hasOwn(U,"x"))switch((U.labelpos==="l"||U.labelpos==="r")&&(U.width-=U.labeloffset),U.labelpos){case"l":U.x-=U.width/2+U.labeloffset;break;case"r":U.x+=U.width/2+U.labeloffset;break}})}function C(k){k.edges().forEach($=>{let U=k.edge($);U.reversed&&U.points.reverse()})}function M(k){k.nodes().forEach($=>{if(k.children($).length){let U=k.node($),W=k.node(U.borderTop),X=k.node(U.borderBottom),G=k.node(U.borderLeft[U.borderLeft.length-1]),Q=k.node(U.borderRight[U.borderRight.length-1]);U.width=Math.abs(Q.x-G.x),U.height=Math.abs(X.y-W.y),U.x=G.x+U.width/2,U.y=W.y+U.height/2}}),k.nodes().forEach($=>{k.node($).dummy==="border"&&k.removeNode($)})}function z(k){k.edges().forEach($=>{if($.v===$.w){var U=k.node($.v);U.selfEdges||(U.selfEdges=[]),U.selfEdges.push({e:$,label:k.edge($)}),k.removeEdge($)}})}function O(k){var $=h.buildLayerMatrix(k);$.forEach(U=>{var W=0;U.forEach((X,G)=>{var Q=k.node(X);Q.order=G+W,(Q.selfEdges||[]).forEach(Z=>{h.addDummyNode(k,"selfedge",{width:Z.label.width,height:Z.label.height,rank:Q.rank,order:G+ ++W,e:Z.e,label:Z.label},"_se")}),delete Q.selfEdges})})}function L(k){k.nodes().forEach($=>{var U=k.node($);if(U.dummy==="selfedge"){var W=k.node(U.e.v),X=W.x+W.width/2,G=W.y,Q=U.x-X,Z=W.height/2;k.setEdge(U.e,U.label),k.removeNode($),U.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}],U.label.x=U.x,U.label.y=U.y}})}function Y(k,$){return h.mapValues(h.pick(k,$),Number)}function R(k){var $={};return k&&Object.entries(k).forEach(([U,W])=>{typeof U=="string"&&(U=U.toLowerCase()),$[U]=W}),$}}),fS=de((e,t)=>{var n=Ne(),r=It().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 c="layer"+u;l.setNode(c,{rank:"same"}),a.reduce((f,d)=>(l.setEdge(f,d,{style:"invis"}),d))}),l}}),dS=de((e,t)=>{t.exports="2.0.4"}),hS=de((e,t)=>{t.exports={graphlib:It(),layout:cS(),debug:fS(),util:{time:Ne().time,notime:Ne().notime},version:dS()}});const Eh=hS();/*! For license information please see dagre.esm.js.LEGAL.txt */function pS(e,t,n="LR"){var s,l,a;const r=new Eh.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 f=(((s=u.data.fields)==null?void 0:s.length)??0)+1,d=Math.min(80+f*36,o),h=40,m=((l=u.measured)==null?void 0:l.width)??260,w=((a=u.measured)==null?void 0:a.height)??d;r.setNode(u.id,{width:m+h*2,height:w+h*2})}for(const u of t)r.setEdge(u.source,u.target);return Eh.layout(r),{nodes:e.map(u=>{var p,v,_;const c=r.node(u.id),d=(((p=u.data.fields)==null?void 0:p.length)??0)+1,h=Math.min(80+d*36,o),m=((v=u.measured)==null?void 0:v.width)??260,w=((_=u.measured)==null?void 0:_.height)??h,E=40,y=m+E*2,g=w+E*2;return{...u,position:{x:c.x-y/2+E,y:c.y-g/2+E}}}),edges:t}}const gS="modulepreload",mS=function(e,t){return new URL(e,t).href},_h={},yS=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),a=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));o=Promise.allSettled(n.map(u=>{if(u=mS(u,r),u in _h)return;_h[u]=!0;const c=u.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(!!r)for(let m=s.length-1;m>=0;m--){const w=s[m];if(w.href===u&&(!c||w.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${f}`))return;const h=document.createElement("link");if(h.rel=c?"stylesheet":gS,c||(h.as="script"),h.crossOrigin="",h.href=u,a&&h.setAttribute("nonce",a),document.head.appendChild(h),c)return new Promise((m,w)=>{h.addEventListener("load",m),h.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return o.then(s=>{for(const l of s||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})};function vS(e,t,n){if(n)return{changed:!1,key:e,item:null};const r=t?Po(t):null;return r===e?{changed:!1,key:r,item:null}:{changed:!0,key:r,item:t}}function wS(e,t){return t&&!e}const xS=({active:e,selected:t,onReplace:n,onAdd:r,onToggle:o,onClear:i,clearOnEmptyClick:s=!0,wholeContainerCoverage:l,onActivate:a,onHover:u,onMarqueePreview:c})=>{var O;const f=V.useRef(null),d=V.useRef(null),[h,m]=V.useState(null),[w,E]=V.useState(!1),y=V.useRef(!1),g=V.useRef(null),p=V.useRef(null),v=V.useRef(null),_=V.useRef(null),S=V.useCallback(()=>{var L;return((L=f.current)==null?void 0:L.parentElement)??null},[]),T=V.useCallback(()=>{var Y;const L=g.current;L!==null&&((Y=f.current)!=null&&Y.hasPointerCapture(L))&&f.current.releasePointerCapture(L),g.current=null,d.current=null,m(null),c==null||c([])},[c]),N=V.useCallback(L=>{y.current=L,E(L),L&&T()},[T]),B=V.useCallback(L=>{L.code==="Space"&&!L.nativeEvent.isComposing&&(L.preventDefault(),N(!0))},[N]),b=V.useCallback(L=>{L.code==="Space"&&N(!1)},[N]),P=V.useCallback(L=>{var Y;!e||y.current||L.button!==0||(L.currentTarget.focus(),d.current={x:L.clientX,y:L.clientY,additive:L.shiftKey||L.metaKey||L.ctrlKey},m(Qi(L.clientX,L.clientY,L.clientX,L.clientY)),(Y=f.current)==null||Y.setPointerCapture(L.pointerId),g.current=L.pointerId,p.current!==null&&(cancelAnimationFrame(p.current),p.current=null),_.current!==null&&(_.current=null,u==null||u(null)))},[e,u]),j=V.useCallback(L=>{if(d.current){const Y=d.current,R=Qi(Y.x,Y.y,L.clientX,L.clientY);m(R),c&&(v.current={x:L.clientX,y:L.clientY},p.current===null&&(p.current=requestAnimationFrame(()=>{p.current=null;const k=d.current,$=v.current,U=S();!k||!$||!U||c(D5(U,Qi(k.x,k.y,$.x,$.y)))})));return}u&&(v.current={x:L.clientX,y:L.clientY},p.current===null&&(p.current=requestAnimationFrame(()=>{p.current=null;const Y=v.current,R=S();if(!Y||!R)return;const k=xa(R,Y.x,Y.y),$=vS(_.current,k,d.current!==null);$.changed&&(_.current=$.key,u($.item))})))},[u,c,S]),H=V.useCallback(L=>{var W;const Y=d.current;if(d.current=null,g.current=null,m(null),p.current!==null&&(cancelAnimationFrame(p.current),p.current=null),c==null||c([]),!Y)return;(W=f.current)==null||W.releasePointerCapture(L.pointerId);const R=S();if(!R)return;if(Math.hypot(L.clientX-Y.x,L.clientY-Y.y)<L5){const X=xa(R,L.clientX,L.clientY);X?o(X):wS(Y.additive,s)&&i();return}const $=Qi(Y.x,Y.y,L.clientX,L.clientY),U=O5(R,$,void 0,l);Y.additive?r(U):n(U)},[S,r,n,o,i,s,l,c]),x=V.useCallback(L=>{if(!e||!a)return;const Y=S();if(!Y)return;const R=xa(Y,L.clientX,L.clientY);R&&a(R)},[e,a,S]),D=V.useCallback(()=>{d.current||(p.current!==null&&(cancelAnimationFrame(p.current),p.current=null),_.current!==null&&(_.current=null,u==null||u(null)))},[u]),I=V.useCallback(()=>{T()},[T]),A=V.useRef(u);A.current=u;const C=V.useRef(c);if(C.current=c,V.useEffect(()=>()=>{var L,Y;p.current!==null&&(cancelAnimationFrame(p.current),p.current=null),_.current!==null&&(_.current=null,(L=A.current)==null||L.call(A,null)),(Y=C.current)==null||Y.call(C,[])},[]),!e)return null;const M=(O=f.current)==null?void 0:O.getBoundingClientRect(),z=h&&M?{left:h.left-M.left,top:h.top-M.top,width:h.right-h.left,height:h.bottom-h.top}:void 0;return ne.createElement("div",{ref:f,className:`mv-marquee-overlay${w?" mv-marquee-overlay--panning":""}`,tabIndex:0,"aria-label":"Metadata selection canvas",onKeyDown:B,onKeyUp:b,onBlur:()=>N(!1),onPointerDown:P,onPointerMove:j,onPointerUp:H,onPointerCancel:I,onLostPointerCapture:I,onPointerLeave:D,onDoubleClick:x},z&&ne.createElement("div",{className:"mv-marquee-box",style:z}),ne.createElement("span",{hidden:!0},t.size))},ES=4500,_S=1400,SS=1950;function CS(e,t){const n=new Set(e),r=[];for(const o of e){let i=o.parentElement,s=!1;for(;i;){if(n.has(i)){s=!0;break}i=i.parentElement}if(s)continue;const l=o.getBoundingClientRect();l.width<=0||l.height<=0||l.left+l.width<0||l.top+l.height<0||l.left>t.width||l.top>t.height||r.push({left:l.left,top:l.top,width:l.width,height:l.height})}return r}const kS=ne.createElement("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",focusable:"false"},ne.createElement("path",{d:"M11.5 2H10.5C10.3674 2 10.2402 2.05268 10.1464 2.14645C10.0527 2.24021 10 2.36739 10 2.5C10 2.63261 10.0527 2.75979 10.1464 2.85355C10.2402 2.94732 10.3674 3 10.5 3H11V3.5C11 3.63261 11.0527 3.75979 11.1464 3.85355C11.2402 3.94732 11.3674 4 11.5 4C11.6326 4 11.7598 3.94732 11.8536 3.85355C11.9473 3.75979 12 3.63261 12 3.5V2.5C12 2.36739 11.9473 2.24021 11.8536 2.14645C11.7598 2.05268 11.6326 2 11.5 2V2Z",fill:"currentColor"}),ne.createElement("path",{d:"M2.5 8C2.63261 8 2.75979 7.94732 2.85355 7.85355C2.94732 7.75979 3 7.63261 3 7.5V6.5C3 6.36739 2.94732 6.24021 2.85355 6.14645C2.75979 6.05268 2.63261 6 2.5 6C2.36739 6 2.24021 6.05268 2.14645 6.14645C2.05268 6.24021 2 6.36739 2 6.5V7.5C2 7.63261 2.05268 7.75979 2.14645 7.85355C2.24021 7.94732 2.36739 8 2.5 8Z",fill:"currentColor"}),ne.createElement("path",{d:"M11.5 6C11.3674 6 11.2402 6.05268 11.1464 6.14645C11.0527 6.24021 11 6.36739 11 6.5V7.5C11 7.63261 11.0527 7.75979 11.1464 7.85355C11.2402 7.94732 11.3674 8 11.5 8C11.6326 8 11.7598 7.94732 11.8536 7.85355C11.9473 7.75979 12 7.63261 12 7.5V6.5C12 6.36739 11.9473 6.24021 11.8536 6.14645C11.7598 6.05268 11.6326 6 11.5 6Z",fill:"currentColor"}),ne.createElement("path",{d:"M3.5 2H2.5C2.36739 2 2.24021 2.05268 2.14645 2.14645C2.05268 2.24021 2 2.36739 2 2.5V3.5C2 3.63261 2.05268 3.75979 2.14645 3.85355C2.24021 3.94732 2.36739 4 2.5 4C2.63261 4 2.75979 3.94732 2.85355 3.85355C2.94732 3.75979 3 3.63261 3 3.5V3H3.5C3.63261 3 3.75979 2.94732 3.85355 2.85355C3.94732 2.75979 4 2.63261 4 2.5C4 2.36739 3.94732 2.24021 3.85355 2.14645C3.75979 2.05268 3.63261 2 3.5 2V2Z",fill:"currentColor"}),ne.createElement("path",{d:"M6.5 3H7.5C7.63261 3 7.75979 2.94732 7.85355 2.85355C7.94732 2.75979 8 2.63261 8 2.5C8 2.36739 7.94732 2.24021 7.85355 2.14645C7.75979 2.05268 7.63261 2 7.5 2H6.5C6.36739 2 6.24021 2.05268 6.14645 2.14645C6.05268 2.24021 6 2.36739 6 2.5C6 2.63261 6.05268 2.75979 6.14645 2.85355C6.24021 2.94732 6.36739 3 6.5 3V3Z",fill:"currentColor"}),ne.createElement("path",{d:"M3.5 11H3V10.5C3 10.3674 2.94732 10.2402 2.85355 10.1464C2.75979 10.0527 2.63261 10 2.5 10C2.36739 10 2.24021 10.0527 2.14645 10.1464C2.05268 10.2402 2 10.3674 2 10.5V11.5C2 11.6326 2.05268 11.7598 2.14645 11.8536C2.24021 11.9473 2.36739 12 2.5 12H3.5C3.63261 12 3.75979 11.9473 3.85355 11.8536C3.94732 11.7598 4 11.6326 4 11.5C4 11.3674 3.94732 11.2402 3.85355 11.1464C3.75979 11.0527 3.63261 11 3.5 11Z",fill:"currentColor"}),ne.createElement("path",{d:"M6.85002 5.18144C6.78805 5.10177 6.70208 5.04416 6.60483 5.01715C6.50757 4.99013 6.40421 4.99514 6.31002 5.03144C6.21214 5.07132 6.1294 5.14119 6.07371 5.23102C6.01801 5.32086 5.99221 5.42603 6.00002 5.53144V12.5314C6.00052 12.6302 6.03022 12.7265 6.08539 12.8084C6.14055 12.8902 6.21872 12.9539 6.31002 12.9914C6.37257 13.0056 6.43748 13.0056 6.50002 12.9914C6.5656 12.9922 6.63062 12.9793 6.6909 12.9535C6.75117 12.9276 6.80538 12.8895 6.85002 12.8414L8.71002 11.0314H11.5C11.5987 11.0309 11.6951 11.0012 11.777 10.9461C11.8588 10.8909 11.9225 10.8127 11.96 10.7214C12.0009 10.6313 12.0122 10.5306 11.9925 10.4336C11.9727 10.3367 11.9229 10.2484 11.85 10.1814L6.85002 5.18144Z",fill:"currentColor"})),NS=({active:e,getElements:t})=>{const[n,r]=V.useState(!1),[o,i]=V.useState([]),[s,l]=V.useState(!1),a=V.useRef(t);return a.current=t,V.useEffect(()=>{if(!e||typeof window>"u"){r(!1),l(!1),i([]);return}r(!0);const u=[];let c=0;return c=requestAnimationFrame(()=>{c=requestAnimationFrame(()=>{i(CS(a.current(),{width:window.innerWidth,height:window.innerHeight})),l(!0)})}),u.push(window.setTimeout(()=>r(!1),ES)),u.push(window.setTimeout(()=>l(!1),_S)),u.push(window.setTimeout(()=>i([]),SS)),()=>{cancelAnimationFrame(c),u.forEach(f=>window.clearTimeout(f))}},[e]),typeof document>"u"?null:Nl.createPortal(ne.createElement(ne.Fragment,null,o.length>0&&ne.createElement("div",{className:"mv-select-glow-layer","aria-hidden":"true"},o.map((u,c)=>ne.createElement("div",{key:c,className:`mv-select-glow${s?" mv-select-glow--on":""}`,style:{left:u.left,top:u.top,width:u.width,height:u.height}}))),ne.createElement("div",{role:"status",className:`mv-select-hint${n?" mv-select-hint--visible":""}`,"aria-hidden":!n},ne.createElement("span",{className:"mv-select-hint__icon"},kS),ne.createElement("span",null,"Select any element on screen"),ne.createElement("button",{type:"button",className:"mv-select-hint__dismiss","aria-label":"Dismiss",tabIndex:n?0:-1,onClick:()=>r(!1)},ne.createElement("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true"},ne.createElement("path",{d:"M2 2l8 8M10 2l-8 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}))))),document.body)};function MS(){const[e,t]=V.useState(new Map),n=V.useCallback(a=>{const u=new Map;for(const c of a)u.set(Po(c),c);t(u)},[]),r=V.useCallback(a=>{t(u=>{const c=new Map(u);for(const f of a)c.set(Po(f),f);return c})},[]),o=V.useCallback(a=>{t(u=>{const c=new Map(u),f=Po(a);return c.has(f)?c.delete(f):c.set(f,a),c})},[]),i=V.useCallback(()=>t(new Map),[]),s=V.useCallback((a,u)=>e.has(`${a}::${u}`),[e]),l=V.useMemo(()=>Array.from(e.values()),[e]);return{selected:e,items:l,replace:n,add:r,toggle:o,clear:i,isSelected:s}}function Ll(e){const t=new Map;for(const n of e)n.id&&!t.has(n.id)&&t.set(n.id,n);return t}function TS(e,t){if(typeof document>"u")return;const n=new Map,r=document.querySelectorAll(`[${bu}]`);for(let o=0;o<r.length;o++){const i=r.item(o),s=i.getAttribute(bu)??"",l=e.get(s);l&&(i.setAttribute(Br,""),i.setAttribute(Ur,l.type),n.set(s,i))}for(const[o,i]of t)n.get(o)!==i&&(i.removeAttribute(Br),i.removeAttribute(Ur));t.clear(),n.forEach((o,i)=>t.set(i,o))}function Sh(e){for(const t of e.values())t.removeAttribute(Br),t.removeAttribute(Ur);e.clear()}function IS(e,t){const n=Ll(e),r=()=>TS(n,t);if(typeof document>"u"||typeof MutationObserver>"u")return r(),()=>Sh(t);r();const o=new MutationObserver(()=>r());return o.observe(document.documentElement,{childList:!0,subtree:!0}),()=>{o.disconnect(),Sh(t)}}function PS(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 ys(e,t,n){const r=Ll(t),o=[];for(const i of e){const s=r.get(i.id);s&&o.push(PS(s,r,n))}return o}function bS(){return ne.createElement("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},ne.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 LS=({chips:e,onSubmit:t,onClear:n,onRemove:r,placeholder:o,onDraftChange:i})=>{const[s,l]=V.useState(""),[a,u]=V.useState(!1),c=V.useRef(null),f=e.length,d=f===0;V.useEffect(()=>{var g;d||(g=c.current)==null||g.focus()},[d]);const h=!d&&s.trim().length>0;V.useEffect(()=>{i==null||i(h)},[h,i]);const m=e.map(g=>g.title??g.label).join("|");if(V.useEffect(()=>{u(!1)},[m]),d)return null;const w=s.trim().length>0,E=()=>{if(!w)return;t(s)&&(u(!0),l(""))},y=g=>{(g.metaKey||g.ctrlKey)&&g.key==="Enter"&&(g.preventDefault(),E())};return ne.createElement("div",{className:"vibe-edit-panel",role:"dialog","aria-label":"Edit selected metadata with AI"},ne.createElement("div",{className:"vibe-edit-panel__header"},ne.createElement("span",{className:"vibe-edit-panel__title"},"Edit Element (",f," Selected)"),ne.createElement("button",{className:"vibe-edit-panel__close",onClick:n,"aria-label":"Clear selection",type:"button"},"✕")),ne.createElement("div",{className:"vibe-edit-panel__chips"},e.map((g,p)=>ne.createElement("span",{className:`vibe-edit-panel__chip ${g.variant==="primary"?"vibe-edit-panel__chip--field":""}`,key:`${g.title??g.label}:${p}`,title:g.title??g.label},ne.createElement("span",{className:"vibe-edit-panel__chip-label"},g.label),r&&ne.createElement("button",{type:"button",className:"vibe-edit-panel__chip-remove","aria-label":`Remove ${g.label} from selection`,onClick:()=>r(p)},"✕")))),ne.createElement("div",{className:"vibe-edit-panel__input-wrap"},ne.createElement("textarea",{ref:c,className:"vibe-edit-panel__input",value:s,onChange:g=>l(g.target.value),onKeyDown:y,placeholder:o??"Describe the change you want…",rows:3}),ne.createElement("button",{className:"vibe-edit-panel__submit",onClick:E,disabled:!w,type:"button"},ne.createElement(bS,null),ne.createElement("span",null,"Send to Agent"))),ne.createElement("div",{className:"vibe-edit-panel__footer"},ne.createElement("span",{className:"vibe-edit-panel__hint",role:"status","aria-live":"polite"},a?"✓ Sent to agent":"⌘/Ctrl + Enter to send")))};function RS(e,t){const n=Object.keys(t).sort().map(r=>`${r}=${t[r]}`);return`${e}|${n.join("&")}`}const AS=2e4;class OS{constructor(t,n=0){this.send=t,this.flushDelayMs=n,this.buckets=new Map,this.lifecycleAttached=!1}add(t,n,r=1){const o=Math.floor(r);if(!Number.isFinite(o)||o<=0)return;this.scheduleFlush();const i=RS(t,n),s=this.buckets.get(i);s?s.count=Math.min(Pu,s.count+o):this.buckets.set(i,{name:t,properties:{...n},count:Math.min(Pu,o)})}flush(t){t===void 0&&this.cancelScheduledFlush();const n=[];for(const[r,o]of this.buckets)(t===void 0||o.name===t)&&(n.push(o),this.buckets.delete(r));for(const r of n)this.dispatch({schemaVersion:yh,name:r.name,properties:r.properties,measurements:{count:r.count}})}emitNow(t,n,r={}){this.dispatch({schemaVersion:yh,name:t,properties:{...n},measurements:{...r}})}attachPageLifecycle(t,n){if(!this.lifecycleAttached){this.lifecycleAttached=!0;try{t==null||t.addEventListener("pagehide",()=>this.flush()),n==null||n.addEventListener("visibilitychange",()=>{n.visibilityState==="hidden"&&this.flush()})}catch{}}}scheduleFlush(){var t;if(!(this.flushDelayMs<=0||this.flushTimer!==void 0))try{const n=setTimeout(()=>{this.flushTimer=void 0,this.flush()},this.flushDelayMs);(t=n.unref)==null||t.call(n),this.flushTimer=n}catch{}}cancelScheduledFlush(){this.flushTimer!==void 0&&(clearTimeout(this.flushTimer),this.flushTimer=void 0)}dispatch(t){try{this.send(t)}catch{}}}let Ki;function Zi(){return Ki||(Ki=new OS(v5,AS),Ki.attachPageLifecycle(typeof window>"u"?void 0:window,typeof document>"u"?void 0:document)),Ki}function H0(e){const t=new Map;for(const n of e)t.set(Po(n),n.type);return t}function DS(e,t){const n=H0(t),r=[],o=[];for(const[i,s]of n)e.has(i)||r.push(s);for(const[i,s]of e)n.has(i)||o.push(s);return{added:r,removed:o}}function zS(e){return e.attachmentCount>0||e.hadText}function jS(e,t){for(const n of t.added)e.add("vibeEdit.selection",{action:"add",elementType:vh(n)});for(const n of t.removed)e.add("vibeEdit.selection",{action:"remove",elementType:vh(n)})}const $S=["M11.5 2H10.5C10.3674 2 10.2402 2.05268 10.1464 2.14645C10.0527 2.24021 10 2.36739 10 2.5C10 2.63261 10.0527 2.75979 10.1464 2.85355C10.2402 2.94732 10.3674 3 10.5 3H11V3.5C11 3.63261 11.0527 3.75979 11.1464 3.85355C11.2402 3.94732 11.3674 4 11.5 4C11.6326 4 11.7598 3.94732 11.8536 3.85355C11.9473 3.75979 12 3.63261 12 3.5V2.5C12 2.36739 11.9473 2.24021 11.8536 2.14645C11.7598 2.05268 11.6326 2 11.5 2V2Z","M2.5 8C2.63261 8 2.75979 7.94732 2.85355 7.85355C2.94732 7.75979 3 7.63261 3 7.5V6.5C3 6.36739 2.94732 6.24021 2.85355 6.14645C2.75979 6.05268 2.63261 6 2.5 6C2.36739 6 2.24021 6.05268 2.14645 6.14645C2.05268 6.24021 2 6.36739 2 6.5V7.5C2 7.63261 2.05268 7.75979 2.14645 7.85355C2.24021 7.94732 2.36739 8 2.5 8Z","M11.5 6C11.3674 6 11.2402 6.05268 11.1464 6.14645C11.0527 6.24021 11 6.36739 11 6.5V7.5C11 7.63261 11.0527 7.75979 11.1464 7.85355C11.2402 7.94732 11.3674 8 11.5 8C11.6326 8 11.7598 7.94732 11.8536 7.85355C11.9473 7.75979 12 7.63261 12 7.5V6.5C12 6.36739 11.9473 6.24021 11.8536 6.14645C11.7598 6.05268 11.6326 6 11.5 6Z","M3.5 2H2.5C2.36739 2 2.24021 2.05268 2.14645 2.14645C2.05268 2.24021 2 2.36739 2 2.5V3.5C2 3.63261 2.05268 3.75979 2.14645 3.85355C2.24021 3.94732 2.36739 4 2.5 4C2.63261 4 2.75979 3.94732 2.85355 3.85355C2.94732 3.75979 3 3.63261 3 3.5V3H3.5C3.63261 3 3.75979 2.94732 3.85355 2.85355C3.94732 2.75979 4 2.63261 4 2.5C4 2.36739 3.94732 2.24021 3.85355 2.14645C3.75979 2.05268 3.63261 2 3.5 2V2Z","M6.5 3H7.5C7.63261 3 7.75979 2.94732 7.85355 2.85355C7.94732 2.75979 8 2.63261 8 2.5C8 2.36739 7.94732 2.24021 7.85355 2.14645C7.75979 2.05268 7.63261 2 7.5 2H6.5C6.36739 2 6.24021 2.05268 6.14645 2.14645C6.05268 2.24021 6 2.36739 6 2.5C6 2.63261 6.05268 2.75979 6.14645 2.85355C6.24021 2.94732 6.36739 3 6.5 3V3Z","M3.5 11H3V10.5C3 10.3674 2.94732 10.2402 2.85355 10.1464C2.75979 10.0527 2.63261 10 2.5 10C2.36739 10 2.24021 10.0527 2.14645 10.1464C2.05268 10.2402 2 10.3674 2 10.5V11.5C2 11.6326 2.05268 11.7598 2.14645 11.8536C2.24021 11.9473 2.36739 12 2.5 12H3.5C3.63261 12 3.75979 11.9473 3.85355 11.8536C3.94732 11.7598 4 11.6326 4 11.5C4 11.3674 3.94732 11.2402 3.85355 11.1464C3.75979 11.0527 3.63261 11 3.5 11Z","M6.85002 5.18144C6.78805 5.10177 6.70208 5.04416 6.60483 5.01715C6.50757 4.99013 6.40421 4.99514 6.31002 5.03144C6.21214 5.07132 6.1294 5.14119 6.07371 5.23102C6.01801 5.32086 5.99221 5.42603 6.00002 5.53144V12.5314C6.00052 12.6302 6.03022 12.7265 6.08539 12.8084C6.14055 12.8902 6.21872 12.9539 6.31002 12.9914C6.37257 13.0056 6.43748 13.0056 6.50002 12.9914C6.5656 12.9922 6.63062 12.9793 6.6909 12.9535C6.75117 12.9276 6.80538 12.8895 6.85002 12.8414L8.71002 11.0314H11.5C11.5987 11.0309 11.6951 11.0012 11.777 10.9461C11.8588 10.8909 11.9225 10.8127 11.96 10.7214C12.0009 10.6313 12.0122 10.5306 11.9925 10.4336C11.9727 10.3367 11.9229 10.2484 11.85 10.1814L6.85002 5.18144ZM8.50002 10.0314C8.43445 10.0306 8.36943 10.0436 8.30915 10.0694C8.24888 10.0952 8.19467 10.1334 8.15002 10.1814L7.00002 11.3214V6.74144L10.29 10.0314H8.50002Z"],_C=["M9.00527 7.75427C11.1465 7.75427 12.8824 6.01842 12.8824 3.87714C12.8824 1.73585 11.1465 0 9.00527 0C6.86401 0 5.12817 1.73585 5.12817 3.87714C5.12817 6.01842 6.86401 7.75427 9.00527 7.75427Z","M30.9978 7.75427C33.139 7.75427 34.8749 6.01842 34.8749 3.87714C34.8749 1.73585 33.139 0 30.9978 0C28.8565 0 27.1207 1.73585 27.1207 3.87714C27.1207 6.01842 28.8565 7.75427 30.9978 7.75427Z","M20.0013 48.3291C11.2613 48.3291 1.47456 43.1867 0.331247 41.5454C-0.00920626 41.0575 -0.0905088 40.4732 0.102584 39.9396C0.813978 37.9934 2.15038 34.157 3.07011 30.3154C3.54268 28.3387 3.85265 26.5805 3.98985 25.0815L4.00509 24.9392C4.04066 24.5226 4.07623 24.05 4.1118 23.5164C4.37603 19.8222 4.81811 13.6381 6.38318 10.264C7.69418 7.44893 10.4229 4.21205 19.9962 4.21205C29.4933 4.21205 32.1509 7.11864 33.6093 10.264C35.1743 13.6381 35.6164 19.8222 35.8806 23.5164C35.9213 24.05 35.9518 24.5226 35.9873 24.9087L36.0077 25.0713C36.1449 26.5856 36.4548 28.3489 36.9274 30.3154C37.8471 34.1519 39.1835 37.9934 39.8949 39.9396C40.0931 40.4732 40.0067 41.0575 39.6714 41.5454C38.528 43.1867 28.7413 48.3291 20.0013 48.3291ZM3.5935 39.9955C5.86488 41.4183 13.1211 45.0261 20.0013 45.0261C26.8612 45.0261 34.1276 41.4183 36.4091 39.9955C35.6367 37.8156 34.529 34.4618 33.7211 31.0878C33.2129 28.9637 32.8775 27.0429 32.7251 25.3813C32.7149 25.2949 32.7048 25.234 32.7048 25.1781C32.6743 24.7817 32.6387 24.299 32.5981 23.7502C32.3694 20.5082 31.9375 14.4766 30.6265 11.6564C29.9049 10.1065 28.7057 7.51499 20.0064 7.51499C11.307 7.51499 10.0113 10.3098 9.38628 11.6564C8.07528 14.4816 7.64336 20.5133 7.4147 23.7553C7.37405 24.3041 7.33848 24.7919 7.30799 25.1882C7.30291 25.2441 7.29783 25.2949 7.29275 25.3457C7.13523 27.0429 6.79985 28.9637 6.29171 31.0929C5.47361 34.4618 4.36587 37.8207 3.5935 39.9955Z","M19.8686 39.8437C18.9133 39.8437 14.0606 39.5998 12.0483 34.8487C11.1947 32.8415 11.1032 31.373 11.1032 28.7103C11.1032 26.9877 11.2963 25.4531 11.6774 24.1573C11.967 23.1715 12.3736 22.2924 12.8868 21.5455C13.7252 20.3158 14.8533 19.6044 15.7374 19.1165C18.0444 17.8513 22.1298 17.8614 24.3047 19.1419C25.2904 19.7212 26.3169 20.3818 27.1096 21.5455C27.6228 22.2924 28.0293 23.1715 28.319 24.1573C28.7001 25.4531 28.8932 26.9826 28.8932 28.7103C28.8932 31.2815 28.8931 32.8364 27.9226 34.9046C26.4287 38.0855 23.6644 39.8386 20.1328 39.8437H19.8686ZM19.8737 36.5408H20.1328C22.3788 36.5408 23.9947 35.5194 24.9398 33.5021C25.5648 32.1707 25.5953 31.2307 25.5953 28.7154C25.5953 27.3078 25.448 26.0883 25.1532 25.0974C24.9602 24.447 24.7061 23.8778 24.386 23.4205C23.9744 22.8158 23.3443 22.4195 22.6278 21.9977C21.4642 21.3168 18.5881 21.327 17.3177 22.0231C16.6877 22.3687 16.0474 22.7752 15.6053 23.4205C15.2903 23.8829 15.0311 24.447 14.838 25.0974C14.5484 26.0883 14.3959 27.3078 14.3959 28.7154C14.3959 31.2256 14.4874 32.1657 15.0769 33.558C16.2913 36.3934 19.2842 36.5408 19.8737 36.5408Z","M31.2512 12.8562C30.9869 12.6936 30.7125 12.5259 30.4331 12.409C28.116 11.4588 25.7379 11.4893 23.3699 12.1244C22.2419 12.4243 21.1189 12.6529 19.9857 12.6631C18.8577 12.6631 17.7347 12.4243 16.6015 12.1244C14.2336 11.4842 11.8504 11.4588 9.5384 12.409C9.24877 12.5259 8.97437 12.6834 8.7203 12.8562C8.21724 13.1763 7.98858 13.593 8.11053 14.2332C8.32903 15.4172 8.46623 16.6317 8.68473 17.8157C8.90323 18.9895 9.68577 19.7923 10.8748 19.9041C12.4958 20.0566 14.1218 20.143 15.7529 20.1684C17.0589 20.1938 17.9888 19.6043 18.3597 18.273C18.7052 17.0534 19.0609 15.8288 19.4624 14.6194C19.5437 14.3654 19.8181 14.1723 20.0111 13.9538C20.1941 14.1723 20.4736 14.3654 20.5599 14.6194C20.9614 15.8339 21.3171 17.0534 21.6626 18.273C22.0386 19.6043 22.9685 20.1988 24.2694 20.1684C25.8903 20.143 27.5214 20.0566 29.1475 19.9041C30.3314 19.7923 31.1241 18.9844 31.3376 17.8157C31.5561 16.6215 31.6933 15.4172 31.9118 14.2332C32.0286 13.6031 31.7949 13.1763 31.302 12.8562H31.2512Z","M21.3181 34.1013C21.3689 34.0861 21.4197 34.0708 21.4655 34.0505L21.4604 34.0454C21.4147 34.0657 21.3638 34.081 21.3181 34.1013Z","M18.6603 34.0869C18.6603 34.0869 18.6756 34.092 18.6959 34.1022C18.6807 34.0971 18.6705 34.092 18.6603 34.0869Z","M22.6086 30.7222C22.136 30.5291 21.6177 30.6409 21.2722 30.9661V30.8695V30.0108V27.4345C21.7498 27.2262 22.2021 26.9009 22.5832 26.4589C22.7915 26.22 22.9491 25.9761 23.0558 25.7373C23.1625 25.4985 23.2184 25.2596 23.2184 25.0259C23.2184 24.7464 23.132 24.472 22.9745 24.2434C22.8576 24.0706 22.695 23.9181 22.507 23.7911C22.2224 23.598 21.8667 23.4557 21.45 23.3541C21.0334 23.2576 20.5506 23.2067 20.0069 23.2067C19.5242 23.2067 19.0872 23.2474 18.6959 23.3287C18.1167 23.4456 17.6441 23.6488 17.3087 23.9385C17.141 24.0807 17.0038 24.2484 16.9124 24.4364C16.8209 24.6245 16.7701 24.8328 16.7701 25.0462C16.7701 25.2749 16.826 25.5086 16.9276 25.7475C17.0292 25.9812 17.1817 26.22 17.3849 26.4589C17.7356 26.8705 18.1421 27.1855 18.5841 27.3938C18.6299 27.4142 18.6807 27.4345 18.7264 27.4548V30.0108V30.8695V30.9661C18.3606 30.6256 17.8067 30.524 17.329 30.7476C16.6939 31.0423 16.4195 31.7995 16.7142 32.4346C17.141 33.3493 17.9236 33.8371 18.6553 34.0861C18.6654 34.0912 18.6807 34.0963 18.6909 34.1013C18.8941 34.1776 19.9968 34.5333 21.3129 34.1013C21.3586 34.0861 21.4094 34.0658 21.4551 34.0505C22.1818 33.7863 22.9389 33.2832 23.3048 32.3787C23.5741 31.7232 23.259 30.9813 22.6086 30.7222Z"];function F0(e){return e.length>0}function VS(e,t){const n=JSON.stringify({ids:e,contexts:t.map(r=>({elementType:r.elementType,apiName:r.apiName,parent:r.parent??"",fileName:r.fileName??"",filePath:r.filePath??""}))});return z0(n)}function HS(e,t){const n=Ll(t);return e.filter(r=>n.has(r.id)).slice(0,bl)}function FS(e){const t=HS(e.items,e.nodes),n=ys(t,e.nodes,e.fileName),r=t.map(o=>o.id);return{sessionId:e.sessionId,selectionHash:VS(r,n),contexts:n,stableNodeIds:r,...e.anchor?{anchor:e.anchor}:{}}}function BS(e){const{anchor:t}=e;return[e.sessionId,e.selectionHash,t?`${t.x},${t.y},${t.width},${t.height}`:""].join("|")}function US(e){return e.hostControlled&&e.inIframe}function WS(e,t){const n=Ll(t),r=[];for(const o of e){const i=n.get(o);i&&r.push({type:i.type,id:i.id})}return r.slice(0,bl)}function Ch(e){return typeof e=="string"&&e.length>0&&e.length<=k5?e:null}function YS(e){return M5.find(t=>t===e)??null}function XS(e){if(!Array.isArray(e)||e.length>bl)return null;for(const t of e)if(typeof t!="string"||t.length===0||t.length>N5)return null;return e}const GS={sessionId:"",key:"",revision:0};function QS(e,t,n){return t!==e.sessionId?{sessionId:t,key:n,revision:1}:n===e.key?e:{sessionId:t,key:n,revision:e.revision+1}}function kh(e){return typeof e=="object"&&e!==null}function KS(e,t){if(!kh(e))return!1;const n=e,r=typeof n.requestId=="string"?n.requestId:void 0,o=a=>t.post(An.MV_COMMAND_RESULT,a,r),i=a=>(o({ok:!1,error:a}),!0),s=kh(n.payload)?n.payload:null,l=s!==null&&s.instanceId!==void 0&&s.instanceId!==t.instanceId;switch(n.type){case An.MV_SET_EDIT_STATE:{const a=Ch(s==null?void 0:s.sessionId),u=YS(s==null?void 0:s.state);return!s||!a||!u?i("Malformed set-edit-state"):l?i("Unknown instance"):(t.applyHostState(a,u),o({ok:!0}),!0)}case An.MV_GET_SELECTION_SNAPSHOT:{if(l)return i("Unknown instance");const a=t.getSnapshot();return a?(s==null?void 0:s.sessionId)!==void 0&&s.sessionId!==a.sessionId?i("Unknown session"):(t.post(An.MV_SELECTION_SNAPSHOT,a,r),o({ok:!0}),!0):i("No selection snapshot")}case An.MV_RESTORE_SELECTION:{const a=Ch(s==null?void 0:s.sessionId),u=XS(s==null?void 0:s.nodeIds);if(!s||!a||!u)return i("Malformed restore");if(l)return i("Unknown instance");const c=t.restoreSelection(a,u);return u.length>0&&c===0?i("None of the requested nodes exist"):(o({ok:!0,restored:c}),!0)}default:return!1}}function ZS(){var e,t;return((t=(e=globalThis.crypto)==null?void 0:e.randomUUID)==null?void 0:t.call(e))??`mv-${Date.now()}-${Math.random()}`}function qS(e){const{nodes:t,sessionState:n,snapshot:r,applyHostState:o,restoreSelection:i}=e,s=V.useRef(ZS()),l=V.useRef(o),a=V.useRef(i),u=V.useRef(r);l.current=o,a.current=i,u.current=r;const c=!Io(),f=V.useCallback((m,w,E)=>{Xc({type:m,payload:w,requestId:E})},[]);V.useEffect(()=>{if(!c)return;const m=w=>{Pl(w)&&KS(w.data,{instanceId:s.current,getSnapshot:()=>u.current,applyHostState:(E,y)=>l.current(E,y),restoreSelection:(E,y)=>a.current(E,y),post:f})};return window.addEventListener("message",m),()=>window.removeEventListener("message",m)},[c,f]);const d=F0(t);V.useEffect(()=>{c&&f(An.MV_READY,{instanceId:s.current,protocolVersions:mh.protocolVersions,capability:mh,available:d})},[c,d,f]);const h=V.useRef(null);V.useEffect(()=>{if(!c||!r||n==="inactive")return;const m=h.current;m&&m.sessionId===r.sessionId&&m.revision===r.revision||(h.current={sessionId:r.sessionId,revision:r.revision},f(An.MV_SELECTION_CHANGED,r))},[c,r,n,f])}const JS=ne.lazy(()=>yS(()=>import("./VibeEditComposer-4dxANHzI.js"),__vite__mapDeps([0,1]),import.meta.url)),Nh="viz-header-actions";function eC(e){return F0(e)}function tC(e){return{label:e.apiName,title:`${e.elementType}: ${e.apiName}`,variant:e.elementType==="field"?"primary":"default"}}function nC(){return ne.createElement("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true"},$S.map(e=>ne.createElement("path",{key:e,d:e,fill:"currentColor"})))}const rC=20,oC=2e3;function iC(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)??tC,a=r==null?void 0:r.onActivate,u=(r==null?void 0:r.toggleInline)??!1,[c,f]=V.useState(()=>!u&&Io()&&typeof document<"u"?document.getElementById(Nh):null);V.useEffect(()=>{u||c||!Io()||typeof document>"u"||f(document.getElementById(Nh))},[u,c]);const[d,h]=V.useState(!1),[m,w]=V.useState(!1),[E,y]=V.useState("inactive"),[g,p]=V.useState(""),[v,_]=V.useState(null),[S,T]=V.useState([]),N=MS(),B=eC(t),b=V.useRef(!1),P=V.useRef(0),j=V.useRef(!1),H=V.useRef(new Map),x=V.useRef(!1),D=V.useRef(!1),I=V.useRef(!1);V.useEffect(()=>{b.current=d},[d]);const A=V.useCallback(J=>{j.current=J},[]),C=V.useCallback(()=>{if(D.current||I.current)return;const J=Math.min(P.current,Pu),oe=j.current;zS({attachmentCount:J,hadText:oe})&&(D.current=!0,Zi().emitNow("vibeEdit.promptAbandoned",{hadText:String(oe)},{attachmentCount:J}))},[]),M=V.useCallback(()=>{P.current>0&&(x.current=!0)},[]),z=V.useCallback(()=>{const J=Zi();M(),J.flush("vibeEdit.selection"),b.current&&(b.current=!1,J.emitNow("vibeEdit.selectMode",{action:"exit"}))},[M]);V.useEffect(()=>{const J=DS(H.current,N.items);if(H.current=H0(N.items),P.current=N.items.length,!(J.added.length===0&&J.removed.length===0)){if(x.current){x.current=!1;return}B&&jS(Zi(),J)}},[N.items,B]),V.useEffect(()=>{if(!B||typeof window>"u")return;const J=()=>{b.current&&C()};return window.addEventListener("pagehide",J),()=>{window.removeEventListener("pagehide",J)}},[B,C]);const O=V.useRef(new Map);V.useEffect(()=>{if(d)return IS(t,O.current)},[d,t]),V.useEffect(()=>{if(typeof document>"u")return;const J=[];if(d)for(const[oe,ce]of O.current){const Ue=ce.getAttribute(Ur)??"";oe&&N.isSelected(Ue,oe)&&(ce.setAttribute(wh,""),J.push(ce))}return()=>{for(const oe of J)oe.removeAttribute(wh)}},[d,N.selected,t]),V.useEffect(()=>{if(typeof document>"u"||!d)return;const J=new Set;v&&J.add(`${v.type}::${v.id}`);for(const ce of S)J.add(`${ce.type}::${ce.id}`);if(J.size===0)return;const oe=[];for(const[ce,Ue]of O.current){const Je=Ue.getAttribute(Ur)??"";ce&&J.has(`${Je}::${ce}`)&&(Ue.setAttribute(xh,""),oe.push(Ue))}return()=>{for(const ce of oe)ce.removeAttribute(xh)}},[d,v,S,t]);const L=V.useMemo(()=>ys(N.items,t,n),[t,N.items,n]),[Y,R]=V.useState(null);V.useEffect(()=>{if(typeof window>"u")return;const J=N.items[0];if(!m||!d||!J){R(null);return}const oe=()=>{const ce=O.current.get(J.id);if(!ce||!ce.isConnected){R(null);return}const Ue=ce.getBoundingClientRect(),Je={x:Math.round(Ue.left),y:Math.round(Ue.top),width:Math.round(Ue.width),height:Math.round(Ue.height)};R(We=>We&&We.x===Je.x&&We.y===Je.y&&We.width===Je.width&&We.height===Je.height?We:Je)};return oe(),window.addEventListener("resize",oe),()=>window.removeEventListener("resize",oe)},[m,d,N.items,t]);const[k,$]=V.useState(GS),U=V.useMemo(()=>g?FS({sessionId:g,items:N.items,nodes:t,fileName:n,anchor:Y}):null,[g,N.items,t,n,Y]),W=U?QS(k,U.sessionId,BS(U)):k;W!==k&&$(W);const X=V.useMemo(()=>U?{...U,revision:W.revision}:null,[U,W.revision]),G=typeof window<"u"&&window.parent!==window,Q=US({hostControlled:m,inIframe:G});V.useEffect(()=>{if(!(!Q||typeof document>"u"))return document.documentElement.setAttribute("data-mv-host-chrome",""),()=>document.documentElement.removeAttribute("data-mv-host-chrome")},[Q]);const Z=V.useRef("inactive"),ee=V.useCallback((J,oe)=>{Z.current=oe,w(!0),p(J),y(oe),h(oe==="selecting"),oe==="inactive"&&(N.clear(),_(null),T([]))},[N]),re=V.useCallback((J,oe)=>{const ce=WS(oe,t);return oe.length>0&&ce.length===0?0:(w(!0),p(J),Z.current!=="locked"&&(Z.current="selecting",y("selecting"),h(!0)),N.replace(ce),ce.length)},[N,t]);qS({nodes:t,sessionState:E,snapshot:X,applyHostState:ee,restoreSelection:re});const ie=V.useMemo(()=>L.map(l),[L,l]),se=V.useCallback(J=>{const oe={prompt:J.trim(),attachments:L},ce=Xc({type:ze.SUBMIT_EDIT,payload:oe});return ce&&(z(),N.clear(),h(!1)),ce},[L,N,z]),Se=V.useMemo(()=>N.items.flatMap(J=>{const[oe]=ys([J],t,n);return oe?[{id:J.id,elementType:oe.elementType,label:l(oe).label,data:oe}]:[]}),[N.items,t,n,l]),qe=V.useCallback(J=>{const oe=O.current.get(J);if(oe)return oe;if(typeof document>"u")return null;const ce=typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(J):J;return document.querySelector(`[data-mv-id="${ce}"]`)},[]),gt=V.useRef(()=>Array.from(O.current.values())),bt=V.useRef(null),nn=V.useCallback(()=>{var J;return(J=bt.current)==null?void 0:J.focus()},[]),Tn=V.useCallback(async(J,oe,ce)=>{const Ue=J.map(Pn=>({type:"",id:Pn})),Je=ys(Ue,t,n),We=[];let yi=0;for(const Pn of Je.slice(0,rC)){const qr=`@${Pn.apiName}`;if(We.length>0&&yi+qr.length+1>oC)break;We.push(qr),yi+=qr.length+1}const vi=Je.length-We.length,Dl={prompt:[(vi>0?[...We,`and ${vi} more`]:We).join(" "),oe.trim()].filter(Pn=>Pn.length>0).join(" "),attachments:Je,chatTarget:ce,selectionIds:J};let wi;I.current=!0;try{wi=await w5(Dl)}finally{I.current=!1}const{result:xi}=wi;return z(),N.clear(),h(!1),xi.conversationId?{chatId:xi.conversationId}:void 0},[t,n,N,z]),In=V.useCallback(J=>{const oe=N.items.find(ce=>ce.id===J);oe&&N.toggle(oe)},[N]),Gr=V.useCallback(J=>{const oe=N.items[J];oe&&N.toggle(oe)},[N]),nr=V.useCallback((J,oe)=>{d&&N.toggle({type:J,id:oe})},[d,N]),rn=V.useCallback(()=>{const J=Zi();if(!b.current){b.current=!0,D.current=!1,J.emitNow("vibeEdit.selectMode",{action:"enter"}),h(!0);return}b.current=!1,C(),M(),N.clear(),_(null),T([]),h(!1),J.flush("vibeEdit.selection"),J.emitNow("vibeEdit.selectMode",{action:"exit"})},[N,C,M]);if(!B)return{toggleButton:null,overlay:null,panel:null,selectMode:!1,isSelected:()=>!1,toggle:()=>{}};const mt=Q,Qr=ne.createElement("button",{ref:bt,className:`mv-vibe-edit-toggle ${d?"mv-vibe-edit-toggle--active":""}`,onClick:rn,"aria-label":"Select components to edit with AI",title:"Select components to edit with AI",type:"button"},ne.createElement(nC,null),ne.createElement("span",null,d?s:i)),Rl=c?Nl.createPortal(Qr,c):Qr,Kr=mt?null:Rl,Al=gt.current,Ol=ne.createElement(ne.Fragment,null,mt?ne.createElement(NS,{active:d,getElements:Al}):null,ne.createElement(xS,{active:d,selected:N.selected,onReplace:N.replace,onAdd:N.add,onToggle:N.toggle,onClear:N.clear,clearOnEmptyClick:!mt,wholeContainerCoverage:mt?b5:void 0,onActivate:a?J=>a(J.id):void 0,onHover:_,onMarqueePreview:T}));let Zr;return Io()?Zr=ne.createElement(ne.Suspense,{fallback:null},ne.createElement(JS,{elements:Se,active:d,nodeFor:qe,onEdit:Tn,onDeselect:In,onSent:nn,onClose:nn,onDraftChange:A})):Zr=ne.createElement(LS,{chips:ie,onSubmit:se,onClear:N.clear,onRemove:Gr,placeholder:o,onDraftChange:A}),{toggleButton:Kr,overlay:Ol,panel:mt?null:Zr,selectMode:d,isSelected:N.isSelected,toggle:nr}}function sC(e){return e.objects.map(t=>t.apiName).sort().join(",")}function lC(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 yo=new Map;let Mh=!1,_a,bo="",Ru;function B0(){var e;try{return(e=window.getHostApi)==null?void 0:e.call(window)}catch{return}}function Sa(e){const t=B0();if(!(t!=null&&t.setState)||!bo)return;const n={};yo.forEach((o,i)=>{n[i]=o});const r=t.getState();t.setState({fingerprint:bo,positionCache:n,viewport:e??(r==null?void 0:r.viewport)})}(function(){var r;const t=B0(),n=(r=t==null?void 0:t.getState)==null?void 0:r.call(t);!n||!n.fingerprint||(Ru=n)})();const aC={objectCard:$5},uC={relationship:V5};function cC(e){return e.replace(/__c$/,"").split("__").length>1}function fC(e,t){return!t.some(n=>n.sourceObject===e.apiName||n.targetObject===e.apiName)}function dC({data:e,activeObjectName:t,dataFingerprint:n,selectableNodes:r}){const{fitView:o,zoomIn:i,zoomOut:s}=Tl(),{zoom:l}=B4(),[a,u]=V.useState(!1),[c,f]=V.useState(!1),[d,h]=V.useState(H5),m=V.useRef(null),w=V.useRef(),E=V.useMemo(()=>lC(n,bo,Mh,_a,Ru),[n]),[y,g]=V.useState(E.hasLayout);V.useEffect(()=>()=>{w.current&&clearTimeout(w.current)},[]);const p=V.useCallback(O=>{w.current&&clearTimeout(w.current),w.current=setTimeout(()=>Sa(O),300)},[]),v=V.useCallback((O,L)=>{yo.set(L.id,{x:L.position.x,y:L.position.y,zIndex:L.zIndex||10}),Sa()},[]);V.useEffect(()=>{const O=L=>{m.current&&!m.current.contains(L.target)&&(u(!1),f(!1))};return(a||c)&&document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[a,c]);const _=V.useMemo(()=>e.objects.filter(O=>{if(d.searchQuery){const $=d.searchQuery.toLowerCase();if(!O.apiName.toLowerCase().includes($)&&!O.label.toLowerCase().includes($))return!1}const L=O.type==="custom",Y=O.type==="standard",R=L&&cC(O.apiName),k=fC(O,e.relationships);return!(Y&&!d.showStandard||L&&!R&&!d.showCustom||R&&!d.showNamespaced||k&&d.showOrphaned===!1&&!d.showStandard&&!d.showCustom)}),[e.objects,e.relationships,d]),S=V.useMemo(()=>new Set(_.map(O=>O.apiName)),[_]),T=V.useMemo(()=>d.displayRelationships?e.relationships.filter(O=>S.has(O.sourceObject)&&S.has(O.targetObject)):[],[e.relationships,S,d.displayRelationships]),N=V.useMemo(()=>T.map(O=>{const L=_.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:(L==null?void 0:L.type)||"custom",targetType:(Y==null?void 0:Y.type)||"custom"},animated:O.type==="MasterDetail"}}),[T,_]),{laidOutNodes:B,laidOutEdges:b}=V.useMemo(()=>{const O=k=>{var $;return yo.get(k)??(($=E.seed)==null?void 0:$.get(k))},L=_.map(k=>{const $=O(k.apiName);return{id:k.apiName,type:"objectCard",position:$?{x:$.x,y:$.y}:{x:0,y:0},zIndex:($==null?void 0:$.zIndex)||10,data:{...k,isActive:k.apiName===t,isInactive:t&&k.apiName!==t}}});if(L.length>0&&L.every(k=>O(k.id)!=null)||L.length===0)return{laidOutNodes:L,laidOutEdges:N};const R=pS(L,N,"LR");return{laidOutNodes:R.nodes,laidOutEdges:R.edges}},[_,N,t,E]);V.useEffect(()=>{try{bo!==n&&(yo.clear(),_a=E.viewport),B.forEach(L=>{yo.set(L.id,{x:L.position.x,y:L.position.y,zIndex:L.zIndex||10})}),B.length>0&&(Mh=!0)}finally{bo=n,Ru=void 0}},[B,n,E.viewport]);const[P,j,H]=U4(B),[x,D,I]=W4(b);V.useEffect(()=>{j(B),D(b)},[B,b,j,D]),V.useLayoutEffect(()=>{if(B.length===0||y)return;const O=window.requestAnimationFrame(()=>{o({padding:.15}),Sa(),g(!0)});return()=>window.cancelAnimationFrame(O)},[B,y,o]);const A=`${Math.round(l*100)}%`,{toggleButton:C,overlay:M,panel:z}=iC({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:y?"visible":"hidden"},children:[M,F.jsx("div",{className:"erd-vibe-toggle",children:C}),F.jsxs(H4,{nodes:P,edges:x,onNodesChange:H,onEdgesChange:I,onNodeDragStop:v,onViewportChange:p,nodeTypes:aC,edgeTypes:uC,minZoom:.2,maxZoom:2,defaultViewport:_a,defaultEdgeOptions:{type:"relationship"},proOptions:{hideAttribution:!0},children:[F.jsx(gi,{position:"bottom-right",style:{margin:"var(--mv-spacing-md)",marginBottom:"60px"},children:F.jsxs("div",{className:"erd-zoom-bar",ref:m,children:[F.jsx("button",{className:`erd-zoom-bar__btn ${c?"erd-zoom-bar__btn--active":""}`,onClick:()=>{f(!c),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"})]})}),c&&F.jsx(F5,{})]})}),F.jsx(K4,{variant:Gt.Dots,color:"var(--mv-canvas-grid)",gap:20,size:1.5,bgColor:"var(--mv-canvas-bg)"})]}),z]})}const hC=({data:e,activeObjectName:t,selectableNodes:n})=>{const r=V.useMemo(()=>sC(e),[e]);return F.jsx(b0,{children:F.jsx(dC,{data:e,activeObjectName:t,dataFingerprint:r,selectableNodes:n})},r)};function pC({data:e,activeObjectName:t,selectableNodes:n}){return F.jsx("div",{className:"schema-visualization",children:F.jsx(hC,{data:e,activeObjectName:t,selectableNodes:n})})}var Au={},Th=Nl;Au.createRoot=Th.createRoot,Au.hydrateRoot=Th.hydrateRoot;function gC(e,t){Jn.create().category(Fr.Rendering).message(e.message).stackTrace(e.stack).context({componentStack:t.componentStack,errorName:e.name}).send(),console.error("[ErrorBoundary] Rendering error:",e,t)}function mC({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 yC extends ne.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){gC(t,n)}render(){return this.state.hasError?F.jsx(mC,{error:this.state.error}):this.props.children}}let at=null,qi=null,wt=null,Ih=!1;function vC(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 wC(e,t){const{rootClass:n,title:r,message:o,filePath:i}=t,s=i?`<p>File: ${i}</p>`:"";e.innerHTML=`
|
|
64
|
+
<div class="${n}">
|
|
65
|
+
<div class="error-message">
|
|
66
|
+
<h2>${r}</h2>
|
|
67
|
+
<p>${o}</p>
|
|
68
|
+
${s}
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
`}function Ji(e,t){const{logPrefix:n,rootClass:r,title:o,consoleMessage:i,errorBuilderMessage:s,context:l={},domMessage:a,filePath:u}=t;console.error(`${n} ${i}`),Jn.create().category(Fr.Rendering).message(s).context(l).send(),wC(e,{rootClass:r,title:o,message:a,filePath:u})}async function Ph(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(wt&&(wt(),wt=null),at){try{at.unmount()}catch(g){console.warn(`${s} Error unmounting previous root:`,g)}at=null,qi=null}const a={fn:null};let u=null,c=!1;wt=E5(g=>{if(!c)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(ne.StrictMode,{children:F.jsx(yC,{children:o(p,v)})}))},h=()=>{if(at){try{at.unmount()}catch(g){console.warn(`${s} Error unmounting previous root:`,g)}at=null}qi=null},m=g=>g.kind===r,w=()=>{c=!0,wt==null||wt(),wt=null,u=null},E=(g,p)=>{const v=g!=null&&g.context?vC(g.context):void 0,_=g==null?void 0:g.data;if(!v||_==null){h();const b=(v==null?void 0:v.kind)==="file"?v.filePath:void 0;Ji(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:b});return}if(!m(v)){h(),w(),Ji(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 S=v,T=i!=null?i(_):null;if(T!=null){h(),Ji(l,{logPrefix:s,rootClass:n,title:p?"Error: Invalid Updated Data":"Error: Invalid Data",consoleMessage:`Validation failed: ${T}`,errorBuilderMessage:`${t} data structure is invalid`,context:{sourceKind:S.kind,reason:T},domMessage:T,filePath:S.kind==="file"?S.filePath:void 0});return}const N={...S,selectableNodes:g.selectableNodes},B=S.kind==="file"?`file:${S.filePath}`:`payload:${S.pluginId}`;if(at==null||B!==qi){if(at){try{at.unmount()}catch(b){console.warn(`${s} Error unmounting previous root:`,b)}at=null}l.innerHTML="",at=Au.createRoot(l),qi=B}d(at,_,N)},y=await x5();if(!y){if(Ji(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=>E(g,!0),u){const g=u;u=null,a.fn(g)}return}if(E(y,!1),!c&&(a.fn=g=>E(g,!0),u)){const g=u;u=null,a.fn(g)}}function xC(e){_5(),Ih||(window.addEventListener("pagehide",()=>{wt&&(wt(),wt=null)}),Ih=!0),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Ph(e)}):Ph(e)}function EC(e){if(!e)return;const n=(e.split("/").pop()||e.split("\\").pop()||"").match(/^(.+)\.object-meta\.xml$/);if(n)return n[1]}xC({pluginName:"Schema",rootClass:"schema-app",expectedSourceKind:"file",render:(e,t)=>{const n=EC(t.filePath);return F.jsx(pC,{data:e,activeObjectName:n,selectableNodes:t.selectableNodes})},validateData:e=>!e.objects||!e.relationships?"Schema data structure is missing required properties (objects or relationships)":null});export{_C as A,ne as R,$S as S,V as r};
|