ctxmedic 0.0.0 → 0.1.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/LICENSE +110 -0
- package/NOTICE +19 -0
- package/README.md +80 -5
- package/dist/index.js +1850 -0
- package/package.json +61 -7
- package/public/assets/index-Bqo1oFYC.css +1 -0
- package/public/assets/index-CuWHlsFL.js +130 -0
- package/public/index.html +14 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))l(u);new MutationObserver(u=>{for(const a of u)if(a.type==="childList")for(const f of a.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&l(f)}).observe(document,{childList:!0,subtree:!0});function i(u){const a={};return u.integrity&&(a.integrity=u.integrity),u.referrerPolicy&&(a.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?a.credentials="include":u.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function l(u){if(u.ep)return;u.ep=!0;const a=i(u);fetch(u.href,a)}})();function Ap(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var La={exports:{}},ui={},$a={exports:{}},Ce={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var fh;function hy(){if(fh)return Ce;fh=1;var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.iterator;function m(k){return k===null||typeof k!="object"?null:(k=v&&k[v]||k["@@iterator"],typeof k=="function"?k:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,M={};function N(k,A,oe){this.props=k,this.context=A,this.refs=M,this.updater=oe||w}N.prototype.isReactComponent={},N.prototype.setState=function(k,A){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,A,"setState")},N.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function E(){}E.prototype=N.prototype;function T(k,A,oe){this.props=k,this.context=A,this.refs=M,this.updater=oe||w}var _=T.prototype=new E;_.constructor=T,S(_,N.prototype),_.isPureReactComponent=!0;var P=Array.isArray,H=Object.prototype.hasOwnProperty,D={current:null},V={key:!0,ref:!0,__self:!0,__source:!0};function Y(k,A,oe){var ne,ue={},ce=null,ae=null;if(A!=null)for(ne in A.ref!==void 0&&(ae=A.ref),A.key!==void 0&&(ce=""+A.key),A)H.call(A,ne)&&!V.hasOwnProperty(ne)&&(ue[ne]=A[ne]);var Q=arguments.length-2;if(Q===1)ue.children=oe;else if(1<Q){for(var ie=Array(Q),he=0;he<Q;he++)ie[he]=arguments[he+2];ue.children=ie}if(k&&k.defaultProps)for(ne in Q=k.defaultProps,Q)ue[ne]===void 0&&(ue[ne]=Q[ne]);return{$$typeof:t,type:k,key:ce,ref:ae,props:ue,_owner:D.current}}function X(k,A){return{$$typeof:t,type:k.type,key:A,ref:k.ref,props:k.props,_owner:k._owner}}function J(k){return typeof k=="object"&&k!==null&&k.$$typeof===t}function q(k){var A={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(oe){return A[oe]})}var ee=/\/+/g;function Z(k,A){return typeof k=="object"&&k!==null&&k.key!=null?q(""+k.key):A.toString(36)}function C(k,A,oe,ne,ue){var ce=typeof k;(ce==="undefined"||ce==="boolean")&&(k=null);var ae=!1;if(k===null)ae=!0;else switch(ce){case"string":case"number":ae=!0;break;case"object":switch(k.$$typeof){case t:case r:ae=!0}}if(ae)return ae=k,ue=ue(ae),k=ne===""?"."+Z(ae,0):ne,P(ue)?(oe="",k!=null&&(oe=k.replace(ee,"$&/")+"/"),C(ue,A,oe,"",function(he){return he})):ue!=null&&(J(ue)&&(ue=X(ue,oe+(!ue.key||ae&&ae.key===ue.key?"":(""+ue.key).replace(ee,"$&/")+"/")+k)),A.push(ue)),1;if(ae=0,ne=ne===""?".":ne+":",P(k))for(var Q=0;Q<k.length;Q++){ce=k[Q];var ie=ne+Z(ce,Q);ae+=C(ce,A,oe,ie,ue)}else if(ie=m(k),typeof ie=="function")for(k=ie.call(k),Q=0;!(ce=k.next()).done;)ce=ce.value,ie=ne+Z(ce,Q++),ae+=C(ce,A,oe,ie,ue);else if(ce==="object")throw A=String(k),Error("Objects are not valid as a React child (found: "+(A==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":A)+"). If you meant to render a collection of children, use an array instead.");return ae}function B(k,A,oe){if(k==null)return k;var ne=[],ue=0;return C(k,ne,"","",function(ce){return A.call(oe,ce,ue++)}),ne}function F(k){if(k._status===-1){var A=k._result;A=A(),A.then(function(oe){(k._status===0||k._status===-1)&&(k._status=1,k._result=oe)},function(oe){(k._status===0||k._status===-1)&&(k._status=2,k._result=oe)}),k._status===-1&&(k._status=0,k._result=A)}if(k._status===1)return k._result.default;throw k._result}var b={current:null},R={transition:null},$={ReactCurrentDispatcher:b,ReactCurrentBatchConfig:R,ReactCurrentOwner:D};function O(){throw Error("act(...) is not supported in production builds of React.")}return Ce.Children={map:B,forEach:function(k,A,oe){B(k,function(){A.apply(this,arguments)},oe)},count:function(k){var A=0;return B(k,function(){A++}),A},toArray:function(k){return B(k,function(A){return A})||[]},only:function(k){if(!J(k))throw Error("React.Children.only expected to receive a single React element child.");return k}},Ce.Component=N,Ce.Fragment=i,Ce.Profiler=u,Ce.PureComponent=T,Ce.StrictMode=l,Ce.Suspense=p,Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$,Ce.act=O,Ce.cloneElement=function(k,A,oe){if(k==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+k+".");var ne=S({},k.props),ue=k.key,ce=k.ref,ae=k._owner;if(A!=null){if(A.ref!==void 0&&(ce=A.ref,ae=D.current),A.key!==void 0&&(ue=""+A.key),k.type&&k.type.defaultProps)var Q=k.type.defaultProps;for(ie in A)H.call(A,ie)&&!V.hasOwnProperty(ie)&&(ne[ie]=A[ie]===void 0&&Q!==void 0?Q[ie]:A[ie])}var ie=arguments.length-2;if(ie===1)ne.children=oe;else if(1<ie){Q=Array(ie);for(var he=0;he<ie;he++)Q[he]=arguments[he+2];ne.children=Q}return{$$typeof:t,type:k.type,key:ue,ref:ce,props:ne,_owner:ae}},Ce.createContext=function(k){return k={$$typeof:f,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},k.Provider={$$typeof:a,_context:k},k.Consumer=k},Ce.createElement=Y,Ce.createFactory=function(k){var A=Y.bind(null,k);return A.type=k,A},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(k){return{$$typeof:h,render:k}},Ce.isValidElement=J,Ce.lazy=function(k){return{$$typeof:y,_payload:{_status:-1,_result:k},_init:F}},Ce.memo=function(k,A){return{$$typeof:g,type:k,compare:A===void 0?null:A}},Ce.startTransition=function(k){var A=R.transition;R.transition={};try{k()}finally{R.transition=A}},Ce.unstable_act=O,Ce.useCallback=function(k,A){return b.current.useCallback(k,A)},Ce.useContext=function(k){return b.current.useContext(k)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(k){return b.current.useDeferredValue(k)},Ce.useEffect=function(k,A){return b.current.useEffect(k,A)},Ce.useId=function(){return b.current.useId()},Ce.useImperativeHandle=function(k,A,oe){return b.current.useImperativeHandle(k,A,oe)},Ce.useInsertionEffect=function(k,A){return b.current.useInsertionEffect(k,A)},Ce.useLayoutEffect=function(k,A){return b.current.useLayoutEffect(k,A)},Ce.useMemo=function(k,A){return b.current.useMemo(k,A)},Ce.useReducer=function(k,A,oe){return b.current.useReducer(k,A,oe)},Ce.useRef=function(k){return b.current.useRef(k)},Ce.useState=function(k){return b.current.useState(k)},Ce.useSyncExternalStore=function(k,A,oe){return b.current.useSyncExternalStore(k,A,oe)},Ce.useTransition=function(){return b.current.useTransition()},Ce.version="18.3.1",Ce}var dh;function Ni(){return dh||(dh=1,$a.exports=hy()),$a.exports}/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var hh;function py(){if(hh)return ui;hh=1;var t=Ni(),r=Symbol.for("react.element"),i=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,u=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function f(h,p,g){var y,v={},m=null,w=null;g!==void 0&&(m=""+g),p.key!==void 0&&(m=""+p.key),p.ref!==void 0&&(w=p.ref);for(y in p)l.call(p,y)&&!a.hasOwnProperty(y)&&(v[y]=p[y]);if(h&&h.defaultProps)for(y in p=h.defaultProps,p)v[y]===void 0&&(v[y]=p[y]);return{$$typeof:r,type:h,key:m,ref:w,props:v,_owner:u.current}}return ui.Fragment=i,ui.jsx=f,ui.jsxs=f,ui}var ph;function gy(){return ph||(ph=1,La.exports=py()),La.exports}var z=gy(),K=Ni();const my=Ap(K);var Gs={},Ra={exports:{}},mt={},Aa={exports:{}},Da={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var gh;function yy(){return gh||(gh=1,(function(t){function r(R,$){var O=R.length;R.push($);e:for(;0<O;){var k=O-1>>>1,A=R[k];if(0<u(A,$))R[k]=$,R[O]=A,O=k;else break e}}function i(R){return R.length===0?null:R[0]}function l(R){if(R.length===0)return null;var $=R[0],O=R.pop();if(O!==$){R[0]=O;e:for(var k=0,A=R.length,oe=A>>>1;k<oe;){var ne=2*(k+1)-1,ue=R[ne],ce=ne+1,ae=R[ce];if(0>u(ue,O))ce<A&&0>u(ae,ue)?(R[k]=ae,R[ce]=O,k=ce):(R[k]=ue,R[ne]=O,k=ne);else if(ce<A&&0>u(ae,O))R[k]=ae,R[ce]=O,k=ce;else break e}}return $}function u(R,$){var O=R.sortIndex-$.sortIndex;return O!==0?O:R.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var f=Date,h=f.now();t.unstable_now=function(){return f.now()-h}}var p=[],g=[],y=1,v=null,m=3,w=!1,S=!1,M=!1,N=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(R){for(var $=i(g);$!==null;){if($.callback===null)l(g);else if($.startTime<=R)l(g),$.sortIndex=$.expirationTime,r(p,$);else break;$=i(g)}}function P(R){if(M=!1,_(R),!S)if(i(p)!==null)S=!0,F(H);else{var $=i(g);$!==null&&b(P,$.startTime-R)}}function H(R,$){S=!1,M&&(M=!1,E(Y),Y=-1),w=!0;var O=m;try{for(_($),v=i(p);v!==null&&(!(v.expirationTime>$)||R&&!q());){var k=v.callback;if(typeof k=="function"){v.callback=null,m=v.priorityLevel;var A=k(v.expirationTime<=$);$=t.unstable_now(),typeof A=="function"?v.callback=A:v===i(p)&&l(p),_($)}else l(p);v=i(p)}if(v!==null)var oe=!0;else{var ne=i(g);ne!==null&&b(P,ne.startTime-$),oe=!1}return oe}finally{v=null,m=O,w=!1}}var D=!1,V=null,Y=-1,X=5,J=-1;function q(){return!(t.unstable_now()-J<X)}function ee(){if(V!==null){var R=t.unstable_now();J=R;var $=!0;try{$=V(!0,R)}finally{$?Z():(D=!1,V=null)}}else D=!1}var Z;if(typeof T=="function")Z=function(){T(ee)};else if(typeof MessageChannel<"u"){var C=new MessageChannel,B=C.port2;C.port1.onmessage=ee,Z=function(){B.postMessage(null)}}else Z=function(){N(ee,0)};function F(R){V=R,D||(D=!0,Z())}function b(R,$){Y=N(function(){R(t.unstable_now())},$)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(R){R.callback=null},t.unstable_continueExecution=function(){S||w||(S=!0,F(H))},t.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):X=0<R?Math.floor(1e3/R):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_getFirstCallbackNode=function(){return i(p)},t.unstable_next=function(R){switch(m){case 1:case 2:case 3:var $=3;break;default:$=m}var O=m;m=$;try{return R()}finally{m=O}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(R,$){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var O=m;m=R;try{return $()}finally{m=O}},t.unstable_scheduleCallback=function(R,$,O){var k=t.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?k+O:k):O=k,R){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=O+A,R={id:y++,callback:$,priorityLevel:R,startTime:O,expirationTime:A,sortIndex:-1},O>k?(R.sortIndex=O,r(g,R),i(p)===null&&R===i(g)&&(M?(E(Y),Y=-1):M=!0,b(P,O-k))):(R.sortIndex=A,r(p,R),S||w||(S=!0,F(H))),R},t.unstable_shouldYield=q,t.unstable_wrapCallback=function(R){var $=m;return function(){var O=m;m=$;try{return R.apply(this,arguments)}finally{m=O}}}})(Da)),Da}var mh;function vy(){return mh||(mh=1,Aa.exports=yy()),Aa.exports}/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var yh;function xy(){if(yh)return mt;yh=1;var t=Ni(),r=vy();function i(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o<arguments.length;o++)n+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=new Set,u={};function a(e,n){f(e,n),f(e+"Capture",n)}function f(e,n){for(u[e]=n,e=0;e<n.length;e++)l.add(n[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,g=/^[: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]*$/,y={},v={};function m(e){return p.call(v,e)?!0:p.call(y,e)?!1:g.test(e)?v[e]=!0:(y[e]=!0,!1)}function w(e,n,o,s){if(o!==null&&o.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return s?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function S(e,n,o,s){if(n===null||typeof n>"u"||w(e,n,o,s))return!0;if(s)return!1;if(o!==null)switch(o.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function M(e,n,o,s,c,d,x){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=s,this.attributeNamespace=c,this.mustUseProperty=o,this.propertyName=e,this.type=n,this.sanitizeURL=d,this.removeEmptyString=x}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){N[e]=new M(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];N[n]=new M(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){N[e]=new M(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){N[e]=new M(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){N[e]=new M(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){N[e]=new M(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){N[e]=new M(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){N[e]=new M(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){N[e]=new M(e,5,!1,e.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function T(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 n=e.replace(E,T);N[n]=new M(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(E,T);N[n]=new M(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(E,T);N[n]=new M(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){N[e]=new M(e,1,!1,e.toLowerCase(),null,!1,!1)}),N.xlinkHref=new M("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){N[e]=new M(e,1,!1,e.toLowerCase(),null,!0,!0)});function _(e,n,o,s){var c=N.hasOwnProperty(n)?N[n]:null;(c!==null?c.type!==0:s||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(S(n,o,c,s)&&(o=null),s||c===null?m(n)&&(o===null?e.removeAttribute(n):e.setAttribute(n,""+o)):c.mustUseProperty?e[c.propertyName]=o===null?c.type===3?!1:"":o:(n=c.attributeName,s=c.attributeNamespace,o===null?e.removeAttribute(n):(c=c.type,o=c===3||c===4&&o===!0?"":""+o,s?e.setAttributeNS(s,n,o):e.setAttribute(n,o))))}var P=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,H=Symbol.for("react.element"),D=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),X=Symbol.for("react.profiler"),J=Symbol.for("react.provider"),q=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),R=Symbol.iterator;function $(e){return e===null||typeof e!="object"?null:(e=R&&e[R]||e["@@iterator"],typeof e=="function"?e:null)}var O=Object.assign,k;function A(e){if(k===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);k=n&&n[1]||""}return`
|
|
34
|
+
`+k+e}var oe=!1;function ne(e,n){if(!e||oe)return"";oe=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(G){var s=G}Reflect.construct(e,[],n)}else{try{n.call()}catch(G){s=G}e.call(n.prototype)}else{try{throw Error()}catch(G){s=G}e()}}catch(G){if(G&&s&&typeof G.stack=="string"){for(var c=G.stack.split(`
|
|
35
|
+
`),d=s.stack.split(`
|
|
36
|
+
`),x=c.length-1,I=d.length-1;1<=x&&0<=I&&c[x]!==d[I];)I--;for(;1<=x&&0<=I;x--,I--)if(c[x]!==d[I]){if(x!==1||I!==1)do if(x--,I--,0>I||c[x]!==d[I]){var L=`
|
|
37
|
+
`+c[x].replace(" at new "," at ");return e.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",e.displayName)),L}while(1<=x&&0<=I);break}}}finally{oe=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?A(e):""}function ue(e){switch(e.tag){case 5:return A(e.type);case 16:return A("Lazy");case 13:return A("Suspense");case 19:return A("SuspenseList");case 0:case 2:case 15:return e=ne(e.type,!1),e;case 11:return e=ne(e.type.render,!1),e;case 1:return e=ne(e.type,!0),e;default:return""}}function ce(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 V:return"Fragment";case D:return"Portal";case X:return"Profiler";case Y:return"StrictMode";case Z:return"Suspense";case C:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case q:return(e.displayName||"Context")+".Consumer";case J:return(e._context.displayName||"Context")+".Provider";case ee:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case B:return n=e.displayName||null,n!==null?n:ce(e.type)||"Memo";case F:n=e._payload,e=e._init;try{return ce(e(n))}catch{}}return null}function ae(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ce(n);case 8:return n===Y?"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 n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Q(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ie(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function he(e){var n=ie(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),s=""+e[n];if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var c=o.get,d=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(x){s=""+x,d.call(this,x)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return s},setValue:function(x){s=""+x},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function xe(e){e._valueTracker||(e._valueTracker=he(e))}function ye(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),s="";return e&&(s=ie(e)?e.checked?"true":"false":e.value),e=s,e!==o?(n.setValue(e),!0):!1}function ve(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 Ee(e,n){var o=n.checked;return O({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function Ne(e,n){var o=n.defaultValue==null?"":n.defaultValue,s=n.checked!=null?n.checked:n.defaultChecked;o=Q(n.value!=null?n.value:o),e._wrapperState={initialChecked:s,initialValue:o,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Me(e,n){n=n.checked,n!=null&&_(e,"checked",n,!1)}function Te(e,n){Me(e,n);var o=Q(n.value),s=n.type;if(o!=null)s==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?at(e,n.type,o):n.hasOwnProperty("defaultValue")&&at(e,n.type,Q(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function st(e,n,o){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var s=n.type;if(!(s!=="submit"&&s!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,o||n===e.value||(e.value=n),e.defaultValue=n}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function at(e,n,o){(n!=="number"||ve(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var et=Array.isArray;function tt(e,n,o,s){if(e=e.options,n){n={};for(var c=0;c<o.length;c++)n["$"+o[c]]=!0;for(o=0;o<e.length;o++)c=n.hasOwnProperty("$"+e[o].value),e[o].selected!==c&&(e[o].selected=c),c&&s&&(e[o].defaultSelected=!0)}else{for(o=""+Q(o),n=null,c=0;c<e.length;c++){if(e[c].value===o){e[c].selected=!0,s&&(e[c].defaultSelected=!0);return}n!==null||e[c].disabled||(n=e[c])}n!==null&&(n.selected=!0)}}function on(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(i(91));return O({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Xt(e,n){var o=n.value;if(o==null){if(o=n.children,n=n.defaultValue,o!=null){if(n!=null)throw Error(i(92));if(et(o)){if(1<o.length)throw Error(i(93));o=o[0]}n=o}n==null&&(n=""),o=n}e._wrapperState={initialValue:Q(o)}}function Qt(e,n){var o=Q(n.value),s=Q(n.defaultValue);o!=null&&(o=""+o,o!==e.value&&(e.value=o),n.defaultValue==null&&e.defaultValue!==o&&(e.defaultValue=o)),s!=null&&(e.defaultValue=""+s)}function ct(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function Ct(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 yt(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?Ct(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Mt,Mr=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,o,s,c){MSApp.execUnsafeLocalFunction(function(){return e(n,o,s,c)})}:e})(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(Mt=Mt||document.createElement("div"),Mt.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=Mt.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function sn(e,n){if(n){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=n;return}}e.textContent=n}var Qn={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},Fl=["Webkit","ms","Moz","O"];Object.keys(Qn).forEach(function(e){Fl.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Qn[n]=Qn[e]})});function Li(e,n,o){return n==null||typeof n=="boolean"||n===""?"":o||typeof n!="number"||n===0||Qn.hasOwnProperty(e)&&Qn[e]?(""+n).trim():n+"px"}function $i(e,n){e=e.style;for(var o in n)if(n.hasOwnProperty(o)){var s=o.indexOf("--")===0,c=Li(o,n[o],s);o==="float"&&(o="cssFloat"),s?e.setProperty(o,c):e[o]=c}}var Vl=O({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 xo(e,n){if(n){if(Vl[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(i(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(i(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(i(61))}if(n.style!=null&&typeof n.style!="object")throw Error(i(62))}}function wo(e,n){if(e.indexOf("-")===-1)return typeof n.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 So=null;function _o(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Eo=null,Sn=null,_n=null;function Ri(e){if(e=Xo(e)){if(typeof Eo!="function")throw Error(i(280));var n=e.stateNode;n&&(n=cs(n),Eo(e.stateNode,e.type,n))}}function Ai(e){Sn?_n?_n.push(e):_n=[e]:Sn=e}function Di(){if(Sn){var e=Sn,n=_n;if(_n=Sn=null,Ri(e),n)for(e=0;e<n.length;e++)Ri(n[e])}}function ji(e,n){return e(n)}function Oi(){}var ko=!1;function Hi(e,n,o){if(ko)return e(n,o);ko=!0;try{return ji(e,n,o)}finally{ko=!1,(Sn!==null||_n!==null)&&(Oi(),Di())}}function Gn(e,n){var o=e.stateNode;if(o===null)return null;var s=cs(o);if(s===null)return null;o=s[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(o&&typeof o!="function")throw Error(i(231,n,typeof o));return o}var No=!1;if(h)try{var Kn={};Object.defineProperty(Kn,"passive",{get:function(){No=!0}}),window.addEventListener("test",Kn,Kn),window.removeEventListener("test",Kn,Kn)}catch{No=!1}function Bl(e,n,o,s,c,d,x,I,L){var G=Array.prototype.slice.call(arguments,3);try{n.apply(o,G)}catch(re){this.onError(re)}}var qn=!1,Pr=null,zr=!1,Co=null,bl={onError:function(e){qn=!0,Pr=e}};function Ul(e,n,o,s,c,d,x,I,L){qn=!1,Pr=null,Bl.apply(bl,arguments)}function Wl(e,n,o,s,c,d,x,I,L){if(Ul.apply(this,arguments),qn){if(qn){var G=Pr;qn=!1,Pr=null}else throw Error(i(198));zr||(zr=!0,Co=G)}}function Gt(e){var n=e,o=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(o=n.return),e=n.return;while(e)}return n.tag===3?o:null}function Mo(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function Po(e){if(Gt(e)!==e)throw Error(i(188))}function Yl(e){var n=e.alternate;if(!n){if(n=Gt(e),n===null)throw Error(i(188));return n!==e?null:e}for(var o=e,s=n;;){var c=o.return;if(c===null)break;var d=c.alternate;if(d===null){if(s=c.return,s!==null){o=s;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===o)return Po(c),e;if(d===s)return Po(c),n;d=d.sibling}throw Error(i(188))}if(o.return!==s.return)o=c,s=d;else{for(var x=!1,I=c.child;I;){if(I===o){x=!0,o=c,s=d;break}if(I===s){x=!0,s=c,o=d;break}I=I.sibling}if(!x){for(I=d.child;I;){if(I===o){x=!0,o=d,s=c;break}if(I===s){x=!0,s=d,o=c;break}I=I.sibling}if(!x)throw Error(i(189))}}if(o.alternate!==s)throw Error(i(190))}if(o.tag!==3)throw Error(i(188));return o.stateNode.current===o?e:n}function Fi(e){return e=Yl(e),e!==null?Vi(e):null}function Vi(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=Vi(e);if(n!==null)return n;e=e.sibling}return null}var Bi=r.unstable_scheduleCallback,bi=r.unstable_cancelCallback,Xl=r.unstable_shouldYield,Ui=r.unstable_requestPaint,Oe=r.unstable_now,Ql=r.unstable_getCurrentPriorityLevel,zo=r.unstable_ImmediatePriority,Wi=r.unstable_UserBlockingPriority,Ir=r.unstable_NormalPriority,Gl=r.unstable_LowPriority,Yi=r.unstable_IdlePriority,Tr=null,vt=null;function Kl(e){if(vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(Tr,e,void 0,(e.current.flags&128)===128)}catch{}}var xt=Math.clz32?Math.clz32:Jl,ql=Math.log,Zl=Math.LN2;function Jl(e){return e>>>=0,e===0?32:31-(ql(e)/Zl|0)|0}var Lr=64,$r=4194304;function Zn(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 ln(e,n){var o=e.pendingLanes;if(o===0)return 0;var s=0,c=e.suspendedLanes,d=e.pingedLanes,x=o&268435455;if(x!==0){var I=x&~c;I!==0?s=Zn(I):(d&=x,d!==0&&(s=Zn(d)))}else x=o&~c,x!==0?s=Zn(x):d!==0&&(s=Zn(d));if(s===0)return 0;if(n!==0&&n!==s&&(n&c)===0&&(c=s&-s,d=n&-n,c>=d||c===16&&(d&4194240)!==0))return n;if((s&4)!==0&&(s|=o&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=s;0<n;)o=31-xt(n),c=1<<o,s|=e[o],n&=~c;return s}function eu(e,n){switch(e){case 1:case 2:case 4:return n+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 n+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 Xi(e,n){for(var o=e.suspendedLanes,s=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes;0<d;){var x=31-xt(d),I=1<<x,L=c[x];L===-1?((I&o)===0||(I&s)!==0)&&(c[x]=eu(I,n)):L<=n&&(e.expiredLanes|=I),d&=~I}}function Io(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Qi(){var e=Lr;return Lr<<=1,(Lr&4194240)===0&&(Lr=64),e}function Jn(e){for(var n=[],o=0;31>o;o++)n.push(e);return n}function er(e,n,o){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-xt(n),e[n]=o}function tu(e,n){var o=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var s=e.eventTimes;for(e=e.expirationTimes;0<o;){var c=31-xt(o),d=1<<c;n[c]=0,s[c]=-1,e[c]=-1,o&=~d}}function Rr(e,n){var o=e.entangledLanes|=n;for(e=e.entanglements;o;){var s=31-xt(o),c=1<<s;c&n|e[s]&n&&(e[s]|=n),o&=~c}}var Le=0;function Bc(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var bc,nu,Uc,Wc,Yc,ru=!1,Gi=[],En=null,kn=null,Nn=null,To=new Map,Lo=new Map,Cn=[],Ag="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 Xc(e,n){switch(e){case"focusin":case"focusout":En=null;break;case"dragenter":case"dragleave":kn=null;break;case"mouseover":case"mouseout":Nn=null;break;case"pointerover":case"pointerout":To.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lo.delete(n.pointerId)}}function $o(e,n,o,s,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:n,domEventName:o,eventSystemFlags:s,nativeEvent:d,targetContainers:[c]},n!==null&&(n=Xo(n),n!==null&&nu(n)),e):(e.eventSystemFlags|=s,n=e.targetContainers,c!==null&&n.indexOf(c)===-1&&n.push(c),e)}function Dg(e,n,o,s,c){switch(n){case"focusin":return En=$o(En,e,n,o,s,c),!0;case"dragenter":return kn=$o(kn,e,n,o,s,c),!0;case"mouseover":return Nn=$o(Nn,e,n,o,s,c),!0;case"pointerover":var d=c.pointerId;return To.set(d,$o(To.get(d)||null,e,n,o,s,c)),!0;case"gotpointercapture":return d=c.pointerId,Lo.set(d,$o(Lo.get(d)||null,e,n,o,s,c)),!0}return!1}function Qc(e){var n=tr(e.target);if(n!==null){var o=Gt(n);if(o!==null){if(n=o.tag,n===13){if(n=Mo(o),n!==null){e.blockedOn=n,Yc(e.priority,function(){Uc(o)});return}}else if(n===3&&o.stateNode.current.memoizedState.isDehydrated){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ki(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var o=iu(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(o===null){o=e.nativeEvent;var s=new o.constructor(o.type,o);So=s,o.target.dispatchEvent(s),So=null}else return n=Xo(o),n!==null&&nu(n),e.blockedOn=o,!1;n.shift()}return!0}function Gc(e,n,o){Ki(e)&&o.delete(n)}function jg(){ru=!1,En!==null&&Ki(En)&&(En=null),kn!==null&&Ki(kn)&&(kn=null),Nn!==null&&Ki(Nn)&&(Nn=null),To.forEach(Gc),Lo.forEach(Gc)}function Ro(e,n){e.blockedOn===n&&(e.blockedOn=null,ru||(ru=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,jg)))}function Ao(e){function n(c){return Ro(c,e)}if(0<Gi.length){Ro(Gi[0],e);for(var o=1;o<Gi.length;o++){var s=Gi[o];s.blockedOn===e&&(s.blockedOn=null)}}for(En!==null&&Ro(En,e),kn!==null&&Ro(kn,e),Nn!==null&&Ro(Nn,e),To.forEach(n),Lo.forEach(n),o=0;o<Cn.length;o++)s=Cn[o],s.blockedOn===e&&(s.blockedOn=null);for(;0<Cn.length&&(o=Cn[0],o.blockedOn===null);)Qc(o),o.blockedOn===null&&Cn.shift()}var Ar=P.ReactCurrentBatchConfig,qi=!0;function Og(e,n,o,s){var c=Le,d=Ar.transition;Ar.transition=null;try{Le=1,ou(e,n,o,s)}finally{Le=c,Ar.transition=d}}function Hg(e,n,o,s){var c=Le,d=Ar.transition;Ar.transition=null;try{Le=4,ou(e,n,o,s)}finally{Le=c,Ar.transition=d}}function ou(e,n,o,s){if(qi){var c=iu(e,n,o,s);if(c===null)_u(e,n,s,Zi,o),Xc(e,s);else if(Dg(c,e,n,o,s))s.stopPropagation();else if(Xc(e,s),n&4&&-1<Ag.indexOf(e)){for(;c!==null;){var d=Xo(c);if(d!==null&&bc(d),d=iu(e,n,o,s),d===null&&_u(e,n,s,Zi,o),d===c)break;c=d}c!==null&&s.stopPropagation()}else _u(e,n,s,null,o)}}var Zi=null;function iu(e,n,o,s){if(Zi=null,e=_o(s),e=tr(e),e!==null)if(n=Gt(e),n===null)e=null;else if(o=n.tag,o===13){if(e=Mo(n),e!==null)return e;e=null}else if(o===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return Zi=e,null}function Kc(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(Ql()){case zo:return 1;case Wi:return 4;case Ir:case Gl:return 16;case Yi:return 536870912;default:return 16}default:return 16}}var Mn=null,su=null,Ji=null;function qc(){if(Ji)return Ji;var e,n=su,o=n.length,s,c="value"in Mn?Mn.value:Mn.textContent,d=c.length;for(e=0;e<o&&n[e]===c[e];e++);var x=o-e;for(s=1;s<=x&&n[o-s]===c[d-s];s++);return Ji=c.slice(e,1<s?1-s:void 0)}function es(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function ts(){return!0}function Zc(){return!1}function wt(e){function n(o,s,c,d,x){this._reactName=o,this._targetInst=c,this.type=s,this.nativeEvent=d,this.target=x,this.currentTarget=null;for(var I in e)e.hasOwnProperty(I)&&(o=e[I],this[I]=o?o(d):d[I]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?ts:Zc,this.isPropagationStopped=Zc,this}return O(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=ts)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=ts)},persist:function(){},isPersistent:ts}),n}var Dr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},lu=wt(Dr),Do=O({},Dr,{view:0,detail:0}),Fg=wt(Do),uu,au,jo,ns=O({},Do,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fu,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!==jo&&(jo&&e.type==="mousemove"?(uu=e.screenX-jo.screenX,au=e.screenY-jo.screenY):au=uu=0,jo=e),uu)},movementY:function(e){return"movementY"in e?e.movementY:au}}),Jc=wt(ns),Vg=O({},ns,{dataTransfer:0}),Bg=wt(Vg),bg=O({},Do,{relatedTarget:0}),cu=wt(bg),Ug=O({},Dr,{animationName:0,elapsedTime:0,pseudoElement:0}),Wg=wt(Ug),Yg=O({},Dr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Xg=wt(Yg),Qg=O({},Dr,{data:0}),ef=wt(Qg),Gg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Kg={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"},qg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Zg(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=qg[e])?!!n[e]:!1}function fu(){return Zg}var Jg=O({},Do,{key:function(e){if(e.key){var n=Gg[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=es(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Kg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fu,charCode:function(e){return e.type==="keypress"?es(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?es(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),em=wt(Jg),tm=O({},ns,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tf=wt(tm),nm=O({},Do,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fu}),rm=wt(nm),om=O({},Dr,{propertyName:0,elapsedTime:0,pseudoElement:0}),im=wt(om),sm=O({},ns,{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}),lm=wt(sm),um=[9,13,27,32],du=h&&"CompositionEvent"in window,Oo=null;h&&"documentMode"in document&&(Oo=document.documentMode);var am=h&&"TextEvent"in window&&!Oo,nf=h&&(!du||Oo&&8<Oo&&11>=Oo),rf=" ",of=!1;function sf(e,n){switch(e){case"keyup":return um.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jr=!1;function cm(e,n){switch(e){case"compositionend":return lf(n);case"keypress":return n.which!==32?null:(of=!0,rf);case"textInput":return e=n.data,e===rf&&of?null:e;default:return null}}function fm(e,n){if(jr)return e==="compositionend"||!du&&sf(e,n)?(e=qc(),Ji=su=Mn=null,jr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return nf&&n.locale!=="ko"?null:n.data;default:return null}}var dm={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 uf(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!dm[e.type]:n==="textarea"}function af(e,n,o,s){Ai(s),n=ls(n,"onChange"),0<n.length&&(o=new lu("onChange","change",null,o,s),e.push({event:o,listeners:n}))}var Ho=null,Fo=null;function hm(e){Mf(e,0)}function rs(e){var n=Br(e);if(ye(n))return e}function pm(e,n){if(e==="change")return n}var cf=!1;if(h){var hu;if(h){var pu="oninput"in document;if(!pu){var ff=document.createElement("div");ff.setAttribute("oninput","return;"),pu=typeof ff.oninput=="function"}hu=pu}else hu=!1;cf=hu&&(!document.documentMode||9<document.documentMode)}function df(){Ho&&(Ho.detachEvent("onpropertychange",hf),Fo=Ho=null)}function hf(e){if(e.propertyName==="value"&&rs(Fo)){var n=[];af(n,Fo,e,_o(e)),Hi(hm,n)}}function gm(e,n,o){e==="focusin"?(df(),Ho=n,Fo=o,Ho.attachEvent("onpropertychange",hf)):e==="focusout"&&df()}function mm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return rs(Fo)}function ym(e,n){if(e==="click")return rs(n)}function vm(e,n){if(e==="input"||e==="change")return rs(n)}function xm(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Rt=typeof Object.is=="function"?Object.is:xm;function Vo(e,n){if(Rt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var o=Object.keys(e),s=Object.keys(n);if(o.length!==s.length)return!1;for(s=0;s<o.length;s++){var c=o[s];if(!p.call(n,c)||!Rt(e[c],n[c]))return!1}return!0}function pf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gf(e,n){var o=pf(e);e=0;for(var s;o;){if(o.nodeType===3){if(s=e+o.textContent.length,e<=n&&s>=n)return{node:o,offset:n-e};e=s}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=pf(o)}}function mf(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?mf(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function yf(){for(var e=window,n=ve();n instanceof e.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)e=n.contentWindow;else break;n=ve(e.document)}return n}function gu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function wm(e){var n=yf(),o=e.focusedElem,s=e.selectionRange;if(n!==o&&o&&o.ownerDocument&&mf(o.ownerDocument.documentElement,o)){if(s!==null&&gu(o)){if(n=s.start,e=s.end,e===void 0&&(e=n),"selectionStart"in o)o.selectionStart=n,o.selectionEnd=Math.min(e,o.value.length);else if(e=(n=o.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var c=o.textContent.length,d=Math.min(s.start,c);s=s.end===void 0?d:Math.min(s.end,c),!e.extend&&d>s&&(c=s,s=d,d=c),c=gf(o,d);var x=gf(o,s);c&&x&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==x.node||e.focusOffset!==x.offset)&&(n=n.createRange(),n.setStart(c.node,c.offset),e.removeAllRanges(),d>s?(e.addRange(n),e.extend(x.node,x.offset)):(n.setEnd(x.node,x.offset),e.addRange(n)))}}for(n=[],e=o;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<n.length;o++)e=n[o],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Sm=h&&"documentMode"in document&&11>=document.documentMode,Or=null,mu=null,Bo=null,yu=!1;function vf(e,n,o){var s=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;yu||Or==null||Or!==ve(s)||(s=Or,"selectionStart"in s&&gu(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Bo&&Vo(Bo,s)||(Bo=s,s=ls(mu,"onSelect"),0<s.length&&(n=new lu("onSelect","select",null,n,o),e.push({event:n,listeners:s}),n.target=Or)))}function os(e,n){var o={};return o[e.toLowerCase()]=n.toLowerCase(),o["Webkit"+e]="webkit"+n,o["Moz"+e]="moz"+n,o}var Hr={animationend:os("Animation","AnimationEnd"),animationiteration:os("Animation","AnimationIteration"),animationstart:os("Animation","AnimationStart"),transitionend:os("Transition","TransitionEnd")},vu={},xf={};h&&(xf=document.createElement("div").style,"AnimationEvent"in window||(delete Hr.animationend.animation,delete Hr.animationiteration.animation,delete Hr.animationstart.animation),"TransitionEvent"in window||delete Hr.transitionend.transition);function is(e){if(vu[e])return vu[e];if(!Hr[e])return e;var n=Hr[e],o;for(o in n)if(n.hasOwnProperty(o)&&o in xf)return vu[e]=n[o];return e}var wf=is("animationend"),Sf=is("animationiteration"),_f=is("animationstart"),Ef=is("transitionend"),kf=new Map,Nf="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Pn(e,n){kf.set(e,n),a(n,[e])}for(var xu=0;xu<Nf.length;xu++){var wu=Nf[xu],_m=wu.toLowerCase(),Em=wu[0].toUpperCase()+wu.slice(1);Pn(_m,"on"+Em)}Pn(wf,"onAnimationEnd"),Pn(Sf,"onAnimationIteration"),Pn(_f,"onAnimationStart"),Pn("dblclick","onDoubleClick"),Pn("focusin","onFocus"),Pn("focusout","onBlur"),Pn(Ef,"onTransitionEnd"),f("onMouseEnter",["mouseout","mouseover"]),f("onMouseLeave",["mouseout","mouseover"]),f("onPointerEnter",["pointerout","pointerover"]),f("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bo="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(" "),km=new Set("cancel close invalid load scroll toggle".split(" ").concat(bo));function Cf(e,n,o){var s=e.type||"unknown-event";e.currentTarget=o,Wl(s,n,void 0,e),e.currentTarget=null}function Mf(e,n){n=(n&4)!==0;for(var o=0;o<e.length;o++){var s=e[o],c=s.event;s=s.listeners;e:{var d=void 0;if(n)for(var x=s.length-1;0<=x;x--){var I=s[x],L=I.instance,G=I.currentTarget;if(I=I.listener,L!==d&&c.isPropagationStopped())break e;Cf(c,I,G),d=L}else for(x=0;x<s.length;x++){if(I=s[x],L=I.instance,G=I.currentTarget,I=I.listener,L!==d&&c.isPropagationStopped())break e;Cf(c,I,G),d=L}}}if(zr)throw e=Co,zr=!1,Co=null,e}function Re(e,n){var o=n[Pu];o===void 0&&(o=n[Pu]=new Set);var s=e+"__bubble";o.has(s)||(Pf(n,e,2,!1),o.add(s))}function Su(e,n,o){var s=0;n&&(s|=4),Pf(o,e,s,n)}var ss="_reactListening"+Math.random().toString(36).slice(2);function Uo(e){if(!e[ss]){e[ss]=!0,l.forEach(function(o){o!=="selectionchange"&&(km.has(o)||Su(o,!1,e),Su(o,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[ss]||(n[ss]=!0,Su("selectionchange",!1,n))}}function Pf(e,n,o,s){switch(Kc(n)){case 1:var c=Og;break;case 4:c=Hg;break;default:c=ou}o=c.bind(null,n,o,e),c=void 0,!No||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(c=!0),s?c!==void 0?e.addEventListener(n,o,{capture:!0,passive:c}):e.addEventListener(n,o,!0):c!==void 0?e.addEventListener(n,o,{passive:c}):e.addEventListener(n,o,!1)}function _u(e,n,o,s,c){var d=s;if((n&1)===0&&(n&2)===0&&s!==null)e:for(;;){if(s===null)return;var x=s.tag;if(x===3||x===4){var I=s.stateNode.containerInfo;if(I===c||I.nodeType===8&&I.parentNode===c)break;if(x===4)for(x=s.return;x!==null;){var L=x.tag;if((L===3||L===4)&&(L=x.stateNode.containerInfo,L===c||L.nodeType===8&&L.parentNode===c))return;x=x.return}for(;I!==null;){if(x=tr(I),x===null)return;if(L=x.tag,L===5||L===6){s=d=x;continue e}I=I.parentNode}}s=s.return}Hi(function(){var G=d,re=_o(o),se=[];e:{var te=kf.get(e);if(te!==void 0){var fe=lu,pe=e;switch(e){case"keypress":if(es(o)===0)break e;case"keydown":case"keyup":fe=em;break;case"focusin":pe="focus",fe=cu;break;case"focusout":pe="blur",fe=cu;break;case"beforeblur":case"afterblur":fe=cu;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=Jc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=Bg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=rm;break;case wf:case Sf:case _f:fe=Wg;break;case Ef:fe=im;break;case"scroll":fe=Fg;break;case"wheel":fe=lm;break;case"copy":case"cut":case"paste":fe=Xg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=tf}var ge=(n&4)!==0,be=!ge&&e==="scroll",U=ge?te!==null?te+"Capture":null:te;ge=[];for(var j=G,W;j!==null;){W=j;var le=W.stateNode;if(W.tag===5&&le!==null&&(W=le,U!==null&&(le=Gn(j,U),le!=null&&ge.push(Wo(j,le,W)))),be)break;j=j.return}0<ge.length&&(te=new fe(te,pe,null,o,re),se.push({event:te,listeners:ge}))}}if((n&7)===0){e:{if(te=e==="mouseover"||e==="pointerover",fe=e==="mouseout"||e==="pointerout",te&&o!==So&&(pe=o.relatedTarget||o.fromElement)&&(tr(pe)||pe[un]))break e;if((fe||te)&&(te=re.window===re?re:(te=re.ownerDocument)?te.defaultView||te.parentWindow:window,fe?(pe=o.relatedTarget||o.toElement,fe=G,pe=pe?tr(pe):null,pe!==null&&(be=Gt(pe),pe!==be||pe.tag!==5&&pe.tag!==6)&&(pe=null)):(fe=null,pe=G),fe!==pe)){if(ge=Jc,le="onMouseLeave",U="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(ge=tf,le="onPointerLeave",U="onPointerEnter",j="pointer"),be=fe==null?te:Br(fe),W=pe==null?te:Br(pe),te=new ge(le,j+"leave",fe,o,re),te.target=be,te.relatedTarget=W,le=null,tr(re)===G&&(ge=new ge(U,j+"enter",pe,o,re),ge.target=W,ge.relatedTarget=be,le=ge),be=le,fe&&pe)t:{for(ge=fe,U=pe,j=0,W=ge;W;W=Fr(W))j++;for(W=0,le=U;le;le=Fr(le))W++;for(;0<j-W;)ge=Fr(ge),j--;for(;0<W-j;)U=Fr(U),W--;for(;j--;){if(ge===U||U!==null&&ge===U.alternate)break t;ge=Fr(ge),U=Fr(U)}ge=null}else ge=null;fe!==null&&zf(se,te,fe,ge,!1),pe!==null&&be!==null&&zf(se,be,pe,ge,!0)}}e:{if(te=G?Br(G):window,fe=te.nodeName&&te.nodeName.toLowerCase(),fe==="select"||fe==="input"&&te.type==="file")var me=pm;else if(uf(te))if(cf)me=vm;else{me=mm;var Se=gm}else(fe=te.nodeName)&&fe.toLowerCase()==="input"&&(te.type==="checkbox"||te.type==="radio")&&(me=ym);if(me&&(me=me(e,G))){af(se,me,o,re);break e}Se&&Se(e,te,G),e==="focusout"&&(Se=te._wrapperState)&&Se.controlled&&te.type==="number"&&at(te,"number",te.value)}switch(Se=G?Br(G):window,e){case"focusin":(uf(Se)||Se.contentEditable==="true")&&(Or=Se,mu=G,Bo=null);break;case"focusout":Bo=mu=Or=null;break;case"mousedown":yu=!0;break;case"contextmenu":case"mouseup":case"dragend":yu=!1,vf(se,o,re);break;case"selectionchange":if(Sm)break;case"keydown":case"keyup":vf(se,o,re)}var _e;if(du)e:{switch(e){case"compositionstart":var ke="onCompositionStart";break e;case"compositionend":ke="onCompositionEnd";break e;case"compositionupdate":ke="onCompositionUpdate";break e}ke=void 0}else jr?sf(e,o)&&(ke="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(ke="onCompositionStart");ke&&(nf&&o.locale!=="ko"&&(jr||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&jr&&(_e=qc()):(Mn=re,su="value"in Mn?Mn.value:Mn.textContent,jr=!0)),Se=ls(G,ke),0<Se.length&&(ke=new ef(ke,e,null,o,re),se.push({event:ke,listeners:Se}),_e?ke.data=_e:(_e=lf(o),_e!==null&&(ke.data=_e)))),(_e=am?cm(e,o):fm(e,o))&&(G=ls(G,"onBeforeInput"),0<G.length&&(re=new ef("onBeforeInput","beforeinput",null,o,re),se.push({event:re,listeners:G}),re.data=_e))}Mf(se,n)})}function Wo(e,n,o){return{instance:e,listener:n,currentTarget:o}}function ls(e,n){for(var o=n+"Capture",s=[];e!==null;){var c=e,d=c.stateNode;c.tag===5&&d!==null&&(c=d,d=Gn(e,o),d!=null&&s.unshift(Wo(e,d,c)),d=Gn(e,n),d!=null&&s.push(Wo(e,d,c))),e=e.return}return s}function Fr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function zf(e,n,o,s,c){for(var d=n._reactName,x=[];o!==null&&o!==s;){var I=o,L=I.alternate,G=I.stateNode;if(L!==null&&L===s)break;I.tag===5&&G!==null&&(I=G,c?(L=Gn(o,d),L!=null&&x.unshift(Wo(o,L,I))):c||(L=Gn(o,d),L!=null&&x.push(Wo(o,L,I)))),o=o.return}x.length!==0&&e.push({event:n,listeners:x})}var Nm=/\r\n?/g,Cm=/\u0000|\uFFFD/g;function If(e){return(typeof e=="string"?e:""+e).replace(Nm,`
|
|
38
|
+
`).replace(Cm,"")}function us(e,n,o){if(n=If(n),If(e)!==n&&o)throw Error(i(425))}function as(){}var Eu=null,ku=null;function Nu(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Cu=typeof setTimeout=="function"?setTimeout:void 0,Mm=typeof clearTimeout=="function"?clearTimeout:void 0,Tf=typeof Promise=="function"?Promise:void 0,Pm=typeof queueMicrotask=="function"?queueMicrotask:typeof Tf<"u"?function(e){return Tf.resolve(null).then(e).catch(zm)}:Cu;function zm(e){setTimeout(function(){throw e})}function Mu(e,n){var o=n,s=0;do{var c=o.nextSibling;if(e.removeChild(o),c&&c.nodeType===8)if(o=c.data,o==="/$"){if(s===0){e.removeChild(c),Ao(n);return}s--}else o!=="$"&&o!=="$?"&&o!=="$!"||s++;o=c}while(o);Ao(n)}function zn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function Lf(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"){if(n===0)return e;n--}else o==="/$"&&n++}e=e.previousSibling}return null}var Vr=Math.random().toString(36).slice(2),Kt="__reactFiber$"+Vr,Yo="__reactProps$"+Vr,un="__reactContainer$"+Vr,Pu="__reactEvents$"+Vr,Im="__reactListeners$"+Vr,Tm="__reactHandles$"+Vr;function tr(e){var n=e[Kt];if(n)return n;for(var o=e.parentNode;o;){if(n=o[un]||o[Kt]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(e=Lf(e);e!==null;){if(o=e[Kt])return o;e=Lf(e)}return n}e=o,o=e.parentNode}return null}function Xo(e){return e=e[Kt]||e[un],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Br(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(i(33))}function cs(e){return e[Yo]||null}var zu=[],br=-1;function In(e){return{current:e}}function Ae(e){0>br||(e.current=zu[br],zu[br]=null,br--)}function $e(e,n){br++,zu[br]=e.current,e.current=n}var Tn={},nt=In(Tn),ft=In(!1),nr=Tn;function Ur(e,n){var o=e.type.contextTypes;if(!o)return Tn;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===n)return s.__reactInternalMemoizedMaskedChildContext;var c={},d;for(d in o)c[d]=n[d];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=c),c}function dt(e){return e=e.childContextTypes,e!=null}function fs(){Ae(ft),Ae(nt)}function $f(e,n,o){if(nt.current!==Tn)throw Error(i(168));$e(nt,n),$e(ft,o)}function Rf(e,n,o){var s=e.stateNode;if(n=n.childContextTypes,typeof s.getChildContext!="function")return o;s=s.getChildContext();for(var c in s)if(!(c in n))throw Error(i(108,ae(e)||"Unknown",c));return O({},o,s)}function ds(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Tn,nr=nt.current,$e(nt,e),$e(ft,ft.current),!0}function Af(e,n,o){var s=e.stateNode;if(!s)throw Error(i(169));o?(e=Rf(e,n,nr),s.__reactInternalMemoizedMergedChildContext=e,Ae(ft),Ae(nt),$e(nt,e)):Ae(ft),$e(ft,o)}var an=null,hs=!1,Iu=!1;function Df(e){an===null?an=[e]:an.push(e)}function Lm(e){hs=!0,Df(e)}function Ln(){if(!Iu&&an!==null){Iu=!0;var e=0,n=Le;try{var o=an;for(Le=1;e<o.length;e++){var s=o[e];do s=s(!0);while(s!==null)}an=null,hs=!1}catch(c){throw an!==null&&(an=an.slice(e+1)),Bi(zo,Ln),c}finally{Le=n,Iu=!1}}return null}var Wr=[],Yr=0,ps=null,gs=0,Pt=[],zt=0,rr=null,cn=1,fn="";function or(e,n){Wr[Yr++]=gs,Wr[Yr++]=ps,ps=e,gs=n}function jf(e,n,o){Pt[zt++]=cn,Pt[zt++]=fn,Pt[zt++]=rr,rr=e;var s=cn;e=fn;var c=32-xt(s)-1;s&=~(1<<c),o+=1;var d=32-xt(n)+c;if(30<d){var x=c-c%5;d=(s&(1<<x)-1).toString(32),s>>=x,c-=x,cn=1<<32-xt(n)+c|o<<c|s,fn=d+e}else cn=1<<d|o<<c|s,fn=e}function Tu(e){e.return!==null&&(or(e,1),jf(e,1,0))}function Lu(e){for(;e===ps;)ps=Wr[--Yr],Wr[Yr]=null,gs=Wr[--Yr],Wr[Yr]=null;for(;e===rr;)rr=Pt[--zt],Pt[zt]=null,fn=Pt[--zt],Pt[zt]=null,cn=Pt[--zt],Pt[zt]=null}var St=null,_t=null,je=!1,At=null;function Of(e,n){var o=$t(5,null,null,0);o.elementType="DELETED",o.stateNode=n,o.return=e,n=e.deletions,n===null?(e.deletions=[o],e.flags|=16):n.push(o)}function Hf(e,n){switch(e.tag){case 5:var o=e.type;return n=n.nodeType!==1||o.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,St=e,_t=zn(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,St=e,_t=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(o=rr!==null?{id:cn,overflow:fn}:null,e.memoizedState={dehydrated:n,treeContext:o,retryLane:1073741824},o=$t(18,null,null,0),o.stateNode=n,o.return=e,e.child=o,St=e,_t=null,!0):!1;default:return!1}}function $u(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ru(e){if(je){var n=_t;if(n){var o=n;if(!Hf(e,n)){if($u(e))throw Error(i(418));n=zn(o.nextSibling);var s=St;n&&Hf(e,n)?Of(s,o):(e.flags=e.flags&-4097|2,je=!1,St=e)}}else{if($u(e))throw Error(i(418));e.flags=e.flags&-4097|2,je=!1,St=e}}}function Ff(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;St=e}function ms(e){if(e!==St)return!1;if(!je)return Ff(e),je=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!Nu(e.type,e.memoizedProps)),n&&(n=_t)){if($u(e))throw Vf(),Error(i(418));for(;n;)Of(e,n),n=zn(n.nextSibling)}if(Ff(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="/$"){if(n===0){_t=zn(e.nextSibling);break e}n--}else o!=="$"&&o!=="$!"&&o!=="$?"||n++}e=e.nextSibling}_t=null}}else _t=St?zn(e.stateNode.nextSibling):null;return!0}function Vf(){for(var e=_t;e;)e=zn(e.nextSibling)}function Xr(){_t=St=null,je=!1}function Au(e){At===null?At=[e]:At.push(e)}var $m=P.ReactCurrentBatchConfig;function Qo(e,n,o){if(e=o.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(i(309));var s=o.stateNode}if(!s)throw Error(i(147,e));var c=s,d=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===d?n.ref:(n=function(x){var I=c.refs;x===null?delete I[d]:I[d]=x},n._stringRef=d,n)}if(typeof e!="string")throw Error(i(284));if(!o._owner)throw Error(i(290,e))}return e}function ys(e,n){throw e=Object.prototype.toString.call(n),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function Bf(e){var n=e._init;return n(e._payload)}function bf(e){function n(U,j){if(e){var W=U.deletions;W===null?(U.deletions=[j],U.flags|=16):W.push(j)}}function o(U,j){if(!e)return null;for(;j!==null;)n(U,j),j=j.sibling;return null}function s(U,j){for(U=new Map;j!==null;)j.key!==null?U.set(j.key,j):U.set(j.index,j),j=j.sibling;return U}function c(U,j){return U=Fn(U,j),U.index=0,U.sibling=null,U}function d(U,j,W){return U.index=W,e?(W=U.alternate,W!==null?(W=W.index,W<j?(U.flags|=2,j):W):(U.flags|=2,j)):(U.flags|=1048576,j)}function x(U){return e&&U.alternate===null&&(U.flags|=2),U}function I(U,j,W,le){return j===null||j.tag!==6?(j=Ca(W,U.mode,le),j.return=U,j):(j=c(j,W),j.return=U,j)}function L(U,j,W,le){var me=W.type;return me===V?re(U,j,W.props.children,le,W.key):j!==null&&(j.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===F&&Bf(me)===j.type)?(le=c(j,W.props),le.ref=Qo(U,j,W),le.return=U,le):(le=Vs(W.type,W.key,W.props,null,U.mode,le),le.ref=Qo(U,j,W),le.return=U,le)}function G(U,j,W,le){return j===null||j.tag!==4||j.stateNode.containerInfo!==W.containerInfo||j.stateNode.implementation!==W.implementation?(j=Ma(W,U.mode,le),j.return=U,j):(j=c(j,W.children||[]),j.return=U,j)}function re(U,j,W,le,me){return j===null||j.tag!==7?(j=dr(W,U.mode,le,me),j.return=U,j):(j=c(j,W),j.return=U,j)}function se(U,j,W){if(typeof j=="string"&&j!==""||typeof j=="number")return j=Ca(""+j,U.mode,W),j.return=U,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case H:return W=Vs(j.type,j.key,j.props,null,U.mode,W),W.ref=Qo(U,null,j),W.return=U,W;case D:return j=Ma(j,U.mode,W),j.return=U,j;case F:var le=j._init;return se(U,le(j._payload),W)}if(et(j)||$(j))return j=dr(j,U.mode,W,null),j.return=U,j;ys(U,j)}return null}function te(U,j,W,le){var me=j!==null?j.key:null;if(typeof W=="string"&&W!==""||typeof W=="number")return me!==null?null:I(U,j,""+W,le);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case H:return W.key===me?L(U,j,W,le):null;case D:return W.key===me?G(U,j,W,le):null;case F:return me=W._init,te(U,j,me(W._payload),le)}if(et(W)||$(W))return me!==null?null:re(U,j,W,le,null);ys(U,W)}return null}function fe(U,j,W,le,me){if(typeof le=="string"&&le!==""||typeof le=="number")return U=U.get(W)||null,I(j,U,""+le,me);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case H:return U=U.get(le.key===null?W:le.key)||null,L(j,U,le,me);case D:return U=U.get(le.key===null?W:le.key)||null,G(j,U,le,me);case F:var Se=le._init;return fe(U,j,W,Se(le._payload),me)}if(et(le)||$(le))return U=U.get(W)||null,re(j,U,le,me,null);ys(j,le)}return null}function pe(U,j,W,le){for(var me=null,Se=null,_e=j,ke=j=0,Ke=null;_e!==null&&ke<W.length;ke++){_e.index>ke?(Ke=_e,_e=null):Ke=_e.sibling;var Ie=te(U,_e,W[ke],le);if(Ie===null){_e===null&&(_e=Ke);break}e&&_e&&Ie.alternate===null&&n(U,_e),j=d(Ie,j,ke),Se===null?me=Ie:Se.sibling=Ie,Se=Ie,_e=Ke}if(ke===W.length)return o(U,_e),je&&or(U,ke),me;if(_e===null){for(;ke<W.length;ke++)_e=se(U,W[ke],le),_e!==null&&(j=d(_e,j,ke),Se===null?me=_e:Se.sibling=_e,Se=_e);return je&&or(U,ke),me}for(_e=s(U,_e);ke<W.length;ke++)Ke=fe(_e,U,ke,W[ke],le),Ke!==null&&(e&&Ke.alternate!==null&&_e.delete(Ke.key===null?ke:Ke.key),j=d(Ke,j,ke),Se===null?me=Ke:Se.sibling=Ke,Se=Ke);return e&&_e.forEach(function(Vn){return n(U,Vn)}),je&&or(U,ke),me}function ge(U,j,W,le){var me=$(W);if(typeof me!="function")throw Error(i(150));if(W=me.call(W),W==null)throw Error(i(151));for(var Se=me=null,_e=j,ke=j=0,Ke=null,Ie=W.next();_e!==null&&!Ie.done;ke++,Ie=W.next()){_e.index>ke?(Ke=_e,_e=null):Ke=_e.sibling;var Vn=te(U,_e,Ie.value,le);if(Vn===null){_e===null&&(_e=Ke);break}e&&_e&&Vn.alternate===null&&n(U,_e),j=d(Vn,j,ke),Se===null?me=Vn:Se.sibling=Vn,Se=Vn,_e=Ke}if(Ie.done)return o(U,_e),je&&or(U,ke),me;if(_e===null){for(;!Ie.done;ke++,Ie=W.next())Ie=se(U,Ie.value,le),Ie!==null&&(j=d(Ie,j,ke),Se===null?me=Ie:Se.sibling=Ie,Se=Ie);return je&&or(U,ke),me}for(_e=s(U,_e);!Ie.done;ke++,Ie=W.next())Ie=fe(_e,U,ke,Ie.value,le),Ie!==null&&(e&&Ie.alternate!==null&&_e.delete(Ie.key===null?ke:Ie.key),j=d(Ie,j,ke),Se===null?me=Ie:Se.sibling=Ie,Se=Ie);return e&&_e.forEach(function(dy){return n(U,dy)}),je&&or(U,ke),me}function be(U,j,W,le){if(typeof W=="object"&&W!==null&&W.type===V&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case H:e:{for(var me=W.key,Se=j;Se!==null;){if(Se.key===me){if(me=W.type,me===V){if(Se.tag===7){o(U,Se.sibling),j=c(Se,W.props.children),j.return=U,U=j;break e}}else if(Se.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===F&&Bf(me)===Se.type){o(U,Se.sibling),j=c(Se,W.props),j.ref=Qo(U,Se,W),j.return=U,U=j;break e}o(U,Se);break}else n(U,Se);Se=Se.sibling}W.type===V?(j=dr(W.props.children,U.mode,le,W.key),j.return=U,U=j):(le=Vs(W.type,W.key,W.props,null,U.mode,le),le.ref=Qo(U,j,W),le.return=U,U=le)}return x(U);case D:e:{for(Se=W.key;j!==null;){if(j.key===Se)if(j.tag===4&&j.stateNode.containerInfo===W.containerInfo&&j.stateNode.implementation===W.implementation){o(U,j.sibling),j=c(j,W.children||[]),j.return=U,U=j;break e}else{o(U,j);break}else n(U,j);j=j.sibling}j=Ma(W,U.mode,le),j.return=U,U=j}return x(U);case F:return Se=W._init,be(U,j,Se(W._payload),le)}if(et(W))return pe(U,j,W,le);if($(W))return ge(U,j,W,le);ys(U,W)}return typeof W=="string"&&W!==""||typeof W=="number"?(W=""+W,j!==null&&j.tag===6?(o(U,j.sibling),j=c(j,W),j.return=U,U=j):(o(U,j),j=Ca(W,U.mode,le),j.return=U,U=j),x(U)):o(U,j)}return be}var Qr=bf(!0),Uf=bf(!1),vs=In(null),xs=null,Gr=null,Du=null;function ju(){Du=Gr=xs=null}function Ou(e){var n=vs.current;Ae(vs),e._currentValue=n}function Hu(e,n,o){for(;e!==null;){var s=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,s!==null&&(s.childLanes|=n)):s!==null&&(s.childLanes&n)!==n&&(s.childLanes|=n),e===o)break;e=e.return}}function Kr(e,n){xs=e,Du=Gr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(ht=!0),e.firstContext=null)}function It(e){var n=e._currentValue;if(Du!==e)if(e={context:e,memoizedValue:n,next:null},Gr===null){if(xs===null)throw Error(i(308));Gr=e,xs.dependencies={lanes:0,firstContext:e}}else Gr=Gr.next=e;return n}var ir=null;function Fu(e){ir===null?ir=[e]:ir.push(e)}function Wf(e,n,o,s){var c=n.interleaved;return c===null?(o.next=o,Fu(n)):(o.next=c.next,c.next=o),n.interleaved=o,dn(e,s)}function dn(e,n){e.lanes|=n;var o=e.alternate;for(o!==null&&(o.lanes|=n),o=e,e=e.return;e!==null;)e.childLanes|=n,o=e.alternate,o!==null&&(o.childLanes|=n),o=e,e=e.return;return o.tag===3?o.stateNode:null}var $n=!1;function Vu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Yf(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function hn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function Rn(e,n,o){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Pe&2)!==0){var c=s.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),s.pending=n,dn(e,o)}return c=s.interleaved,c===null?(n.next=n,Fu(s)):(n.next=c.next,c.next=n),s.interleaved=n,dn(e,o)}function ws(e,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194240)!==0)){var s=n.lanes;s&=e.pendingLanes,o|=s,n.lanes=o,Rr(e,o)}}function Xf(e,n){var o=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,o===s)){var c=null,d=null;if(o=o.firstBaseUpdate,o!==null){do{var x={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};d===null?c=d=x:d=d.next=x,o=o.next}while(o!==null);d===null?c=d=n:d=d.next=n}else c=d=n;o={baseState:s.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:s.shared,effects:s.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=n:e.next=n,o.lastBaseUpdate=n}function Ss(e,n,o,s){var c=e.updateQueue;$n=!1;var d=c.firstBaseUpdate,x=c.lastBaseUpdate,I=c.shared.pending;if(I!==null){c.shared.pending=null;var L=I,G=L.next;L.next=null,x===null?d=G:x.next=G,x=L;var re=e.alternate;re!==null&&(re=re.updateQueue,I=re.lastBaseUpdate,I!==x&&(I===null?re.firstBaseUpdate=G:I.next=G,re.lastBaseUpdate=L))}if(d!==null){var se=c.baseState;x=0,re=G=L=null,I=d;do{var te=I.lane,fe=I.eventTime;if((s&te)===te){re!==null&&(re=re.next={eventTime:fe,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var pe=e,ge=I;switch(te=n,fe=o,ge.tag){case 1:if(pe=ge.payload,typeof pe=="function"){se=pe.call(fe,se,te);break e}se=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=ge.payload,te=typeof pe=="function"?pe.call(fe,se,te):pe,te==null)break e;se=O({},se,te);break e;case 2:$n=!0}}I.callback!==null&&I.lane!==0&&(e.flags|=64,te=c.effects,te===null?c.effects=[I]:te.push(I))}else fe={eventTime:fe,lane:te,tag:I.tag,payload:I.payload,callback:I.callback,next:null},re===null?(G=re=fe,L=se):re=re.next=fe,x|=te;if(I=I.next,I===null){if(I=c.shared.pending,I===null)break;te=I,I=te.next,te.next=null,c.lastBaseUpdate=te,c.shared.pending=null}}while(!0);if(re===null&&(L=se),c.baseState=L,c.firstBaseUpdate=G,c.lastBaseUpdate=re,n=c.shared.interleaved,n!==null){c=n;do x|=c.lane,c=c.next;while(c!==n)}else d===null&&(c.shared.lanes=0);ur|=x,e.lanes=x,e.memoizedState=se}}function Qf(e,n,o){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var s=e[n],c=s.callback;if(c!==null){if(s.callback=null,s=o,typeof c!="function")throw Error(i(191,c));c.call(s)}}}var Go={},qt=In(Go),Ko=In(Go),qo=In(Go);function sr(e){if(e===Go)throw Error(i(174));return e}function Bu(e,n){switch($e(qo,n),$e(Ko,e),$e(qt,Go),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:yt(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=yt(n,e)}Ae(qt),$e(qt,n)}function qr(){Ae(qt),Ae(Ko),Ae(qo)}function Gf(e){sr(qo.current);var n=sr(qt.current),o=yt(n,e.type);n!==o&&($e(Ko,e),$e(qt,o))}function bu(e){Ko.current===e&&(Ae(qt),Ae(Ko))}var He=In(0);function _s(e){for(var n=e;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Uu=[];function Wu(){for(var e=0;e<Uu.length;e++)Uu[e]._workInProgressVersionPrimary=null;Uu.length=0}var Es=P.ReactCurrentDispatcher,Yu=P.ReactCurrentBatchConfig,lr=0,Fe=null,Ye=null,Qe=null,ks=!1,Zo=!1,Jo=0,Rm=0;function rt(){throw Error(i(321))}function Xu(e,n){if(n===null)return!1;for(var o=0;o<n.length&&o<e.length;o++)if(!Rt(e[o],n[o]))return!1;return!0}function Qu(e,n,o,s,c,d){if(lr=d,Fe=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Es.current=e===null||e.memoizedState===null?Om:Hm,e=o(s,c),Zo){d=0;do{if(Zo=!1,Jo=0,25<=d)throw Error(i(301));d+=1,Qe=Ye=null,n.updateQueue=null,Es.current=Fm,e=o(s,c)}while(Zo)}if(Es.current=Ms,n=Ye!==null&&Ye.next!==null,lr=0,Qe=Ye=Fe=null,ks=!1,n)throw Error(i(300));return e}function Gu(){var e=Jo!==0;return Jo=0,e}function Zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qe===null?Fe.memoizedState=Qe=e:Qe=Qe.next=e,Qe}function Tt(){if(Ye===null){var e=Fe.alternate;e=e!==null?e.memoizedState:null}else e=Ye.next;var n=Qe===null?Fe.memoizedState:Qe.next;if(n!==null)Qe=n,Ye=e;else{if(e===null)throw Error(i(310));Ye=e,e={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},Qe===null?Fe.memoizedState=Qe=e:Qe=Qe.next=e}return Qe}function ei(e,n){return typeof n=="function"?n(e):n}function Ku(e){var n=Tt(),o=n.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=e;var s=Ye,c=s.baseQueue,d=o.pending;if(d!==null){if(c!==null){var x=c.next;c.next=d.next,d.next=x}s.baseQueue=c=d,o.pending=null}if(c!==null){d=c.next,s=s.baseState;var I=x=null,L=null,G=d;do{var re=G.lane;if((lr&re)===re)L!==null&&(L=L.next={lane:0,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),s=G.hasEagerState?G.eagerState:e(s,G.action);else{var se={lane:re,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null};L===null?(I=L=se,x=s):L=L.next=se,Fe.lanes|=re,ur|=re}G=G.next}while(G!==null&&G!==d);L===null?x=s:L.next=I,Rt(s,n.memoizedState)||(ht=!0),n.memoizedState=s,n.baseState=x,n.baseQueue=L,o.lastRenderedState=s}if(e=o.interleaved,e!==null){c=e;do d=c.lane,Fe.lanes|=d,ur|=d,c=c.next;while(c!==e)}else c===null&&(o.lanes=0);return[n.memoizedState,o.dispatch]}function qu(e){var n=Tt(),o=n.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=e;var s=o.dispatch,c=o.pending,d=n.memoizedState;if(c!==null){o.pending=null;var x=c=c.next;do d=e(d,x.action),x=x.next;while(x!==c);Rt(d,n.memoizedState)||(ht=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),o.lastRenderedState=d}return[d,s]}function Kf(){}function qf(e,n){var o=Fe,s=Tt(),c=n(),d=!Rt(s.memoizedState,c);if(d&&(s.memoizedState=c,ht=!0),s=s.queue,Zu(ed.bind(null,o,s,e),[e]),s.getSnapshot!==n||d||Qe!==null&&Qe.memoizedState.tag&1){if(o.flags|=2048,ti(9,Jf.bind(null,o,s,c,n),void 0,null),Ge===null)throw Error(i(349));(lr&30)!==0||Zf(o,n,c)}return c}function Zf(e,n,o){e.flags|=16384,e={getSnapshot:n,value:o},n=Fe.updateQueue,n===null?(n={lastEffect:null,stores:null},Fe.updateQueue=n,n.stores=[e]):(o=n.stores,o===null?n.stores=[e]:o.push(e))}function Jf(e,n,o,s){n.value=o,n.getSnapshot=s,td(n)&&nd(e)}function ed(e,n,o){return o(function(){td(n)&&nd(e)})}function td(e){var n=e.getSnapshot;e=e.value;try{var o=n();return!Rt(e,o)}catch{return!0}}function nd(e){var n=dn(e,1);n!==null&&Ht(n,e,1,-1)}function rd(e){var n=Zt();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ei,lastRenderedState:e},n.queue=e,e=e.dispatch=jm.bind(null,Fe,e),[n.memoizedState,e]}function ti(e,n,o,s){return e={tag:e,create:n,destroy:o,deps:s,next:null},n=Fe.updateQueue,n===null?(n={lastEffect:null,stores:null},Fe.updateQueue=n,n.lastEffect=e.next=e):(o=n.lastEffect,o===null?n.lastEffect=e.next=e:(s=o.next,o.next=e,e.next=s,n.lastEffect=e)),e}function od(){return Tt().memoizedState}function Ns(e,n,o,s){var c=Zt();Fe.flags|=e,c.memoizedState=ti(1|n,o,void 0,s===void 0?null:s)}function Cs(e,n,o,s){var c=Tt();s=s===void 0?null:s;var d=void 0;if(Ye!==null){var x=Ye.memoizedState;if(d=x.destroy,s!==null&&Xu(s,x.deps)){c.memoizedState=ti(n,o,d,s);return}}Fe.flags|=e,c.memoizedState=ti(1|n,o,d,s)}function id(e,n){return Ns(8390656,8,e,n)}function Zu(e,n){return Cs(2048,8,e,n)}function sd(e,n){return Cs(4,2,e,n)}function ld(e,n){return Cs(4,4,e,n)}function ud(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function ad(e,n,o){return o=o!=null?o.concat([e]):null,Cs(4,4,ud.bind(null,n,e),o)}function Ju(){}function cd(e,n){var o=Tt();n=n===void 0?null:n;var s=o.memoizedState;return s!==null&&n!==null&&Xu(n,s[1])?s[0]:(o.memoizedState=[e,n],e)}function fd(e,n){var o=Tt();n=n===void 0?null:n;var s=o.memoizedState;return s!==null&&n!==null&&Xu(n,s[1])?s[0]:(e=e(),o.memoizedState=[e,n],e)}function dd(e,n,o){return(lr&21)===0?(e.baseState&&(e.baseState=!1,ht=!0),e.memoizedState=o):(Rt(o,n)||(o=Qi(),Fe.lanes|=o,ur|=o,e.baseState=!0),n)}function Am(e,n){var o=Le;Le=o!==0&&4>o?o:4,e(!0);var s=Yu.transition;Yu.transition={};try{e(!1),n()}finally{Le=o,Yu.transition=s}}function hd(){return Tt().memoizedState}function Dm(e,n,o){var s=On(e);if(o={lane:s,action:o,hasEagerState:!1,eagerState:null,next:null},pd(e))gd(n,o);else if(o=Wf(e,n,o,s),o!==null){var c=ut();Ht(o,e,s,c),md(o,n,s)}}function jm(e,n,o){var s=On(e),c={lane:s,action:o,hasEagerState:!1,eagerState:null,next:null};if(pd(e))gd(n,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var x=n.lastRenderedState,I=d(x,o);if(c.hasEagerState=!0,c.eagerState=I,Rt(I,x)){var L=n.interleaved;L===null?(c.next=c,Fu(n)):(c.next=L.next,L.next=c),n.interleaved=c;return}}catch{}finally{}o=Wf(e,n,c,s),o!==null&&(c=ut(),Ht(o,e,s,c),md(o,n,s))}}function pd(e){var n=e.alternate;return e===Fe||n!==null&&n===Fe}function gd(e,n){Zo=ks=!0;var o=e.pending;o===null?n.next=n:(n.next=o.next,o.next=n),e.pending=n}function md(e,n,o){if((o&4194240)!==0){var s=n.lanes;s&=e.pendingLanes,o|=s,n.lanes=o,Rr(e,o)}}var Ms={readContext:It,useCallback:rt,useContext:rt,useEffect:rt,useImperativeHandle:rt,useInsertionEffect:rt,useLayoutEffect:rt,useMemo:rt,useReducer:rt,useRef:rt,useState:rt,useDebugValue:rt,useDeferredValue:rt,useTransition:rt,useMutableSource:rt,useSyncExternalStore:rt,useId:rt,unstable_isNewReconciler:!1},Om={readContext:It,useCallback:function(e,n){return Zt().memoizedState=[e,n===void 0?null:n],e},useContext:It,useEffect:id,useImperativeHandle:function(e,n,o){return o=o!=null?o.concat([e]):null,Ns(4194308,4,ud.bind(null,n,e),o)},useLayoutEffect:function(e,n){return Ns(4194308,4,e,n)},useInsertionEffect:function(e,n){return Ns(4,2,e,n)},useMemo:function(e,n){var o=Zt();return n=n===void 0?null:n,e=e(),o.memoizedState=[e,n],e},useReducer:function(e,n,o){var s=Zt();return n=o!==void 0?o(n):n,s.memoizedState=s.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},s.queue=e,e=e.dispatch=Dm.bind(null,Fe,e),[s.memoizedState,e]},useRef:function(e){var n=Zt();return e={current:e},n.memoizedState=e},useState:rd,useDebugValue:Ju,useDeferredValue:function(e){return Zt().memoizedState=e},useTransition:function(){var e=rd(!1),n=e[0];return e=Am.bind(null,e[1]),Zt().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,o){var s=Fe,c=Zt();if(je){if(o===void 0)throw Error(i(407));o=o()}else{if(o=n(),Ge===null)throw Error(i(349));(lr&30)!==0||Zf(s,n,o)}c.memoizedState=o;var d={value:o,getSnapshot:n};return c.queue=d,id(ed.bind(null,s,d,e),[e]),s.flags|=2048,ti(9,Jf.bind(null,s,d,o,n),void 0,null),o},useId:function(){var e=Zt(),n=Ge.identifierPrefix;if(je){var o=fn,s=cn;o=(s&~(1<<32-xt(s)-1)).toString(32)+o,n=":"+n+"R"+o,o=Jo++,0<o&&(n+="H"+o.toString(32)),n+=":"}else o=Rm++,n=":"+n+"r"+o.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},Hm={readContext:It,useCallback:cd,useContext:It,useEffect:Zu,useImperativeHandle:ad,useInsertionEffect:sd,useLayoutEffect:ld,useMemo:fd,useReducer:Ku,useRef:od,useState:function(){return Ku(ei)},useDebugValue:Ju,useDeferredValue:function(e){var n=Tt();return dd(n,Ye.memoizedState,e)},useTransition:function(){var e=Ku(ei)[0],n=Tt().memoizedState;return[e,n]},useMutableSource:Kf,useSyncExternalStore:qf,useId:hd,unstable_isNewReconciler:!1},Fm={readContext:It,useCallback:cd,useContext:It,useEffect:Zu,useImperativeHandle:ad,useInsertionEffect:sd,useLayoutEffect:ld,useMemo:fd,useReducer:qu,useRef:od,useState:function(){return qu(ei)},useDebugValue:Ju,useDeferredValue:function(e){var n=Tt();return Ye===null?n.memoizedState=e:dd(n,Ye.memoizedState,e)},useTransition:function(){var e=qu(ei)[0],n=Tt().memoizedState;return[e,n]},useMutableSource:Kf,useSyncExternalStore:qf,useId:hd,unstable_isNewReconciler:!1};function Dt(e,n){if(e&&e.defaultProps){n=O({},n),e=e.defaultProps;for(var o in e)n[o]===void 0&&(n[o]=e[o]);return n}return n}function ea(e,n,o,s){n=e.memoizedState,o=o(s,n),o=o==null?n:O({},n,o),e.memoizedState=o,e.lanes===0&&(e.updateQueue.baseState=o)}var Ps={isMounted:function(e){return(e=e._reactInternals)?Gt(e)===e:!1},enqueueSetState:function(e,n,o){e=e._reactInternals;var s=ut(),c=On(e),d=hn(s,c);d.payload=n,o!=null&&(d.callback=o),n=Rn(e,d,c),n!==null&&(Ht(n,e,c,s),ws(n,e,c))},enqueueReplaceState:function(e,n,o){e=e._reactInternals;var s=ut(),c=On(e),d=hn(s,c);d.tag=1,d.payload=n,o!=null&&(d.callback=o),n=Rn(e,d,c),n!==null&&(Ht(n,e,c,s),ws(n,e,c))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var o=ut(),s=On(e),c=hn(o,s);c.tag=2,n!=null&&(c.callback=n),n=Rn(e,c,s),n!==null&&(Ht(n,e,s,o),ws(n,e,s))}};function yd(e,n,o,s,c,d,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,d,x):n.prototype&&n.prototype.isPureReactComponent?!Vo(o,s)||!Vo(c,d):!0}function vd(e,n,o){var s=!1,c=Tn,d=n.contextType;return typeof d=="object"&&d!==null?d=It(d):(c=dt(n)?nr:nt.current,s=n.contextTypes,d=(s=s!=null)?Ur(e,c):Tn),n=new n(o,d),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Ps,e.stateNode=n,n._reactInternals=e,s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=c,e.__reactInternalMemoizedMaskedChildContext=d),n}function xd(e,n,o,s){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,s),n.state!==e&&Ps.enqueueReplaceState(n,n.state,null)}function ta(e,n,o,s){var c=e.stateNode;c.props=o,c.state=e.memoizedState,c.refs={},Vu(e);var d=n.contextType;typeof d=="object"&&d!==null?c.context=It(d):(d=dt(n)?nr:nt.current,c.context=Ur(e,d)),c.state=e.memoizedState,d=n.getDerivedStateFromProps,typeof d=="function"&&(ea(e,n,d,o),c.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(n=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),n!==c.state&&Ps.enqueueReplaceState(c,c.state,null),Ss(e,o,c,s),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308)}function Zr(e,n){try{var o="",s=n;do o+=ue(s),s=s.return;while(s);var c=o}catch(d){c=`
|
|
39
|
+
Error generating stack: `+d.message+`
|
|
40
|
+
`+d.stack}return{value:e,source:n,stack:c,digest:null}}function na(e,n,o){return{value:e,source:null,stack:o??null,digest:n??null}}function ra(e,n){try{console.error(n.value)}catch(o){setTimeout(function(){throw o})}}var Vm=typeof WeakMap=="function"?WeakMap:Map;function wd(e,n,o){o=hn(-1,o),o.tag=3,o.payload={element:null};var s=n.value;return o.callback=function(){As||(As=!0,va=s),ra(e,n)},o}function Sd(e,n,o){o=hn(-1,o),o.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var c=n.value;o.payload=function(){return s(c)},o.callback=function(){ra(e,n)}}var d=e.stateNode;return d!==null&&typeof d.componentDidCatch=="function"&&(o.callback=function(){ra(e,n),typeof s!="function"&&(Dn===null?Dn=new Set([this]):Dn.add(this));var x=n.stack;this.componentDidCatch(n.value,{componentStack:x!==null?x:""})}),o}function _d(e,n,o){var s=e.pingCache;if(s===null){s=e.pingCache=new Vm;var c=new Set;s.set(n,c)}else c=s.get(n),c===void 0&&(c=new Set,s.set(n,c));c.has(o)||(c.add(o),e=ty.bind(null,e,n,o),n.then(e,e))}function Ed(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function kd(e,n,o,s,c){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(n=hn(-1,1),n.tag=2,Rn(o,n,1))),o.lanes|=1),e):(e.flags|=65536,e.lanes=c,e)}var Bm=P.ReactCurrentOwner,ht=!1;function lt(e,n,o,s){n.child=e===null?Uf(n,null,o,s):Qr(n,e.child,o,s)}function Nd(e,n,o,s,c){o=o.render;var d=n.ref;return Kr(n,c),s=Qu(e,n,o,s,d,c),o=Gu(),e!==null&&!ht?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~c,pn(e,n,c)):(je&&o&&Tu(n),n.flags|=1,lt(e,n,s,c),n.child)}function Cd(e,n,o,s,c){if(e===null){var d=o.type;return typeof d=="function"&&!Na(d)&&d.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(n.tag=15,n.type=d,Md(e,n,d,s,c)):(e=Vs(o.type,null,s,n,n.mode,c),e.ref=n.ref,e.return=n,n.child=e)}if(d=e.child,(e.lanes&c)===0){var x=d.memoizedProps;if(o=o.compare,o=o!==null?o:Vo,o(x,s)&&e.ref===n.ref)return pn(e,n,c)}return n.flags|=1,e=Fn(d,s),e.ref=n.ref,e.return=n,n.child=e}function Md(e,n,o,s,c){if(e!==null){var d=e.memoizedProps;if(Vo(d,s)&&e.ref===n.ref)if(ht=!1,n.pendingProps=s=d,(e.lanes&c)!==0)(e.flags&131072)!==0&&(ht=!0);else return n.lanes=e.lanes,pn(e,n,c)}return oa(e,n,o,s,c)}function Pd(e,n,o){var s=n.pendingProps,c=s.children,d=e!==null?e.memoizedState:null;if(s.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},$e(eo,Et),Et|=o;else{if((o&1073741824)===0)return e=d!==null?d.baseLanes|o:o,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,$e(eo,Et),Et|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},s=d!==null?d.baseLanes:o,$e(eo,Et),Et|=s}else d!==null?(s=d.baseLanes|o,n.memoizedState=null):s=o,$e(eo,Et),Et|=s;return lt(e,n,c,o),n.child}function zd(e,n){var o=n.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(n.flags|=512,n.flags|=2097152)}function oa(e,n,o,s,c){var d=dt(o)?nr:nt.current;return d=Ur(n,d),Kr(n,c),o=Qu(e,n,o,s,d,c),s=Gu(),e!==null&&!ht?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~c,pn(e,n,c)):(je&&s&&Tu(n),n.flags|=1,lt(e,n,o,c),n.child)}function Id(e,n,o,s,c){if(dt(o)){var d=!0;ds(n)}else d=!1;if(Kr(n,c),n.stateNode===null)Is(e,n),vd(n,o,s),ta(n,o,s,c),s=!0;else if(e===null){var x=n.stateNode,I=n.memoizedProps;x.props=I;var L=x.context,G=o.contextType;typeof G=="object"&&G!==null?G=It(G):(G=dt(o)?nr:nt.current,G=Ur(n,G));var re=o.getDerivedStateFromProps,se=typeof re=="function"||typeof x.getSnapshotBeforeUpdate=="function";se||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(I!==s||L!==G)&&xd(n,x,s,G),$n=!1;var te=n.memoizedState;x.state=te,Ss(n,s,x,c),L=n.memoizedState,I!==s||te!==L||ft.current||$n?(typeof re=="function"&&(ea(n,o,re,s),L=n.memoizedState),(I=$n||yd(n,o,I,s,te,L,G))?(se||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(n.flags|=4194308)):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=s,n.memoizedState=L),x.props=s,x.state=L,x.context=G,s=I):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{x=n.stateNode,Yf(e,n),I=n.memoizedProps,G=n.type===n.elementType?I:Dt(n.type,I),x.props=G,se=n.pendingProps,te=x.context,L=o.contextType,typeof L=="object"&&L!==null?L=It(L):(L=dt(o)?nr:nt.current,L=Ur(n,L));var fe=o.getDerivedStateFromProps;(re=typeof fe=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(I!==se||te!==L)&&xd(n,x,s,L),$n=!1,te=n.memoizedState,x.state=te,Ss(n,s,x,c);var pe=n.memoizedState;I!==se||te!==pe||ft.current||$n?(typeof fe=="function"&&(ea(n,o,fe,s),pe=n.memoizedState),(G=$n||yd(n,o,G,s,te,pe,L)||!1)?(re||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(s,pe,L),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(s,pe,L)),typeof x.componentDidUpdate=="function"&&(n.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof x.componentDidUpdate!="function"||I===e.memoizedProps&&te===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||I===e.memoizedProps&&te===e.memoizedState||(n.flags|=1024),n.memoizedProps=s,n.memoizedState=pe),x.props=s,x.state=pe,x.context=L,s=G):(typeof x.componentDidUpdate!="function"||I===e.memoizedProps&&te===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||I===e.memoizedProps&&te===e.memoizedState||(n.flags|=1024),s=!1)}return ia(e,n,o,s,d,c)}function ia(e,n,o,s,c,d){zd(e,n);var x=(n.flags&128)!==0;if(!s&&!x)return c&&Af(n,o,!1),pn(e,n,d);s=n.stateNode,Bm.current=n;var I=x&&typeof o.getDerivedStateFromError!="function"?null:s.render();return n.flags|=1,e!==null&&x?(n.child=Qr(n,e.child,null,d),n.child=Qr(n,null,I,d)):lt(e,n,I,d),n.memoizedState=s.state,c&&Af(n,o,!0),n.child}function Td(e){var n=e.stateNode;n.pendingContext?$f(e,n.pendingContext,n.pendingContext!==n.context):n.context&&$f(e,n.context,!1),Bu(e,n.containerInfo)}function Ld(e,n,o,s,c){return Xr(),Au(c),n.flags|=256,lt(e,n,o,s),n.child}var sa={dehydrated:null,treeContext:null,retryLane:0};function la(e){return{baseLanes:e,cachePool:null,transitions:null}}function $d(e,n,o){var s=n.pendingProps,c=He.current,d=!1,x=(n.flags&128)!==0,I;if((I=x)||(I=e!==null&&e.memoizedState===null?!1:(c&2)!==0),I?(d=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(c|=1),$e(He,c&1),e===null)return Ru(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((n.mode&1)===0?n.lanes=1:e.data==="$!"?n.lanes=8:n.lanes=1073741824,null):(x=s.children,e=s.fallback,d?(s=n.mode,d=n.child,x={mode:"hidden",children:x},(s&1)===0&&d!==null?(d.childLanes=0,d.pendingProps=x):d=Bs(x,s,0,null),e=dr(e,s,o,null),d.return=n,e.return=n,d.sibling=e,n.child=d,n.child.memoizedState=la(o),n.memoizedState=sa,e):ua(n,x));if(c=e.memoizedState,c!==null&&(I=c.dehydrated,I!==null))return bm(e,n,x,s,I,c,o);if(d){d=s.fallback,x=n.mode,c=e.child,I=c.sibling;var L={mode:"hidden",children:s.children};return(x&1)===0&&n.child!==c?(s=n.child,s.childLanes=0,s.pendingProps=L,n.deletions=null):(s=Fn(c,L),s.subtreeFlags=c.subtreeFlags&14680064),I!==null?d=Fn(I,d):(d=dr(d,x,o,null),d.flags|=2),d.return=n,s.return=n,s.sibling=d,n.child=s,s=d,d=n.child,x=e.child.memoizedState,x=x===null?la(o):{baseLanes:x.baseLanes|o,cachePool:null,transitions:x.transitions},d.memoizedState=x,d.childLanes=e.childLanes&~o,n.memoizedState=sa,s}return d=e.child,e=d.sibling,s=Fn(d,{mode:"visible",children:s.children}),(n.mode&1)===0&&(s.lanes=o),s.return=n,s.sibling=null,e!==null&&(o=n.deletions,o===null?(n.deletions=[e],n.flags|=16):o.push(e)),n.child=s,n.memoizedState=null,s}function ua(e,n){return n=Bs({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function zs(e,n,o,s){return s!==null&&Au(s),Qr(n,e.child,null,o),e=ua(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function bm(e,n,o,s,c,d,x){if(o)return n.flags&256?(n.flags&=-257,s=na(Error(i(422))),zs(e,n,x,s)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(d=s.fallback,c=n.mode,s=Bs({mode:"visible",children:s.children},c,0,null),d=dr(d,c,x,null),d.flags|=2,s.return=n,d.return=n,s.sibling=d,n.child=s,(n.mode&1)!==0&&Qr(n,e.child,null,x),n.child.memoizedState=la(x),n.memoizedState=sa,d);if((n.mode&1)===0)return zs(e,n,x,null);if(c.data==="$!"){if(s=c.nextSibling&&c.nextSibling.dataset,s)var I=s.dgst;return s=I,d=Error(i(419)),s=na(d,s,void 0),zs(e,n,x,s)}if(I=(x&e.childLanes)!==0,ht||I){if(s=Ge,s!==null){switch(x&-x){case 4:c=2;break;case 16:c=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:c=32;break;case 536870912:c=268435456;break;default:c=0}c=(c&(s.suspendedLanes|x))!==0?0:c,c!==0&&c!==d.retryLane&&(d.retryLane=c,dn(e,c),Ht(s,e,c,-1))}return ka(),s=na(Error(i(421))),zs(e,n,x,s)}return c.data==="$?"?(n.flags|=128,n.child=e.child,n=ny.bind(null,e),c._reactRetry=n,null):(e=d.treeContext,_t=zn(c.nextSibling),St=n,je=!0,At=null,e!==null&&(Pt[zt++]=cn,Pt[zt++]=fn,Pt[zt++]=rr,cn=e.id,fn=e.overflow,rr=n),n=ua(n,s.children),n.flags|=4096,n)}function Rd(e,n,o){e.lanes|=n;var s=e.alternate;s!==null&&(s.lanes|=n),Hu(e.return,n,o)}function aa(e,n,o,s,c){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:o,tailMode:c}:(d.isBackwards=n,d.rendering=null,d.renderingStartTime=0,d.last=s,d.tail=o,d.tailMode=c)}function Ad(e,n,o){var s=n.pendingProps,c=s.revealOrder,d=s.tail;if(lt(e,n,s.children,o),s=He.current,(s&2)!==0)s=s&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Rd(e,o,n);else if(e.tag===19)Rd(e,o,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}s&=1}if($e(He,s),(n.mode&1)===0)n.memoizedState=null;else switch(c){case"forwards":for(o=n.child,c=null;o!==null;)e=o.alternate,e!==null&&_s(e)===null&&(c=o),o=o.sibling;o=c,o===null?(c=n.child,n.child=null):(c=o.sibling,o.sibling=null),aa(n,!1,c,o,d);break;case"backwards":for(o=null,c=n.child,n.child=null;c!==null;){if(e=c.alternate,e!==null&&_s(e)===null){n.child=c;break}e=c.sibling,c.sibling=o,o=c,c=e}aa(n,!0,o,null,d);break;case"together":aa(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Is(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function pn(e,n,o){if(e!==null&&(n.dependencies=e.dependencies),ur|=n.lanes,(o&n.childLanes)===0)return null;if(e!==null&&n.child!==e.child)throw Error(i(153));if(n.child!==null){for(e=n.child,o=Fn(e,e.pendingProps),n.child=o,o.return=n;e.sibling!==null;)e=e.sibling,o=o.sibling=Fn(e,e.pendingProps),o.return=n;o.sibling=null}return n.child}function Um(e,n,o){switch(n.tag){case 3:Td(n),Xr();break;case 5:Gf(n);break;case 1:dt(n.type)&&ds(n);break;case 4:Bu(n,n.stateNode.containerInfo);break;case 10:var s=n.type._context,c=n.memoizedProps.value;$e(vs,s._currentValue),s._currentValue=c;break;case 13:if(s=n.memoizedState,s!==null)return s.dehydrated!==null?($e(He,He.current&1),n.flags|=128,null):(o&n.child.childLanes)!==0?$d(e,n,o):($e(He,He.current&1),e=pn(e,n,o),e!==null?e.sibling:null);$e(He,He.current&1);break;case 19:if(s=(o&n.childLanes)!==0,(e.flags&128)!==0){if(s)return Ad(e,n,o);n.flags|=128}if(c=n.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),$e(He,He.current),s)break;return null;case 22:case 23:return n.lanes=0,Pd(e,n,o)}return pn(e,n,o)}var Dd,ca,jd,Od;Dd=function(e,n){for(var o=n.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},ca=function(){},jd=function(e,n,o,s){var c=e.memoizedProps;if(c!==s){e=n.stateNode,sr(qt.current);var d=null;switch(o){case"input":c=Ee(e,c),s=Ee(e,s),d=[];break;case"select":c=O({},c,{value:void 0}),s=O({},s,{value:void 0}),d=[];break;case"textarea":c=on(e,c),s=on(e,s),d=[];break;default:typeof c.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=as)}xo(o,s);var x;o=null;for(G in c)if(!s.hasOwnProperty(G)&&c.hasOwnProperty(G)&&c[G]!=null)if(G==="style"){var I=c[G];for(x in I)I.hasOwnProperty(x)&&(o||(o={}),o[x]="")}else G!=="dangerouslySetInnerHTML"&&G!=="children"&&G!=="suppressContentEditableWarning"&&G!=="suppressHydrationWarning"&&G!=="autoFocus"&&(u.hasOwnProperty(G)?d||(d=[]):(d=d||[]).push(G,null));for(G in s){var L=s[G];if(I=c!=null?c[G]:void 0,s.hasOwnProperty(G)&&L!==I&&(L!=null||I!=null))if(G==="style")if(I){for(x in I)!I.hasOwnProperty(x)||L&&L.hasOwnProperty(x)||(o||(o={}),o[x]="");for(x in L)L.hasOwnProperty(x)&&I[x]!==L[x]&&(o||(o={}),o[x]=L[x])}else o||(d||(d=[]),d.push(G,o)),o=L;else G==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,I=I?I.__html:void 0,L!=null&&I!==L&&(d=d||[]).push(G,L)):G==="children"?typeof L!="string"&&typeof L!="number"||(d=d||[]).push(G,""+L):G!=="suppressContentEditableWarning"&&G!=="suppressHydrationWarning"&&(u.hasOwnProperty(G)?(L!=null&&G==="onScroll"&&Re("scroll",e),d||I===L||(d=[])):(d=d||[]).push(G,L))}o&&(d=d||[]).push("style",o);var G=d;(n.updateQueue=G)&&(n.flags|=4)}},Od=function(e,n,o,s){o!==s&&(n.flags|=4)};function ni(e,n){if(!je)switch(e.tailMode){case"hidden":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var s=null;o!==null;)o.alternate!==null&&(s=o),o=o.sibling;s===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function ot(e){var n=e.alternate!==null&&e.alternate.child===e.child,o=0,s=0;if(n)for(var c=e.child;c!==null;)o|=c.lanes|c.childLanes,s|=c.subtreeFlags&14680064,s|=c.flags&14680064,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)o|=c.lanes|c.childLanes,s|=c.subtreeFlags,s|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=s,e.childLanes=o,n}function Wm(e,n,o){var s=n.pendingProps;switch(Lu(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(n),null;case 1:return dt(n.type)&&fs(),ot(n),null;case 3:return s=n.stateNode,qr(),Ae(ft),Ae(nt),Wu(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(ms(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,At!==null&&(Sa(At),At=null))),ca(e,n),ot(n),null;case 5:bu(n);var c=sr(qo.current);if(o=n.type,e!==null&&n.stateNode!=null)jd(e,n,o,s,c),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!s){if(n.stateNode===null)throw Error(i(166));return ot(n),null}if(e=sr(qt.current),ms(n)){s=n.stateNode,o=n.type;var d=n.memoizedProps;switch(s[Kt]=n,s[Yo]=d,e=(n.mode&1)!==0,o){case"dialog":Re("cancel",s),Re("close",s);break;case"iframe":case"object":case"embed":Re("load",s);break;case"video":case"audio":for(c=0;c<bo.length;c++)Re(bo[c],s);break;case"source":Re("error",s);break;case"img":case"image":case"link":Re("error",s),Re("load",s);break;case"details":Re("toggle",s);break;case"input":Ne(s,d),Re("invalid",s);break;case"select":s._wrapperState={wasMultiple:!!d.multiple},Re("invalid",s);break;case"textarea":Xt(s,d),Re("invalid",s)}xo(o,d),c=null;for(var x in d)if(d.hasOwnProperty(x)){var I=d[x];x==="children"?typeof I=="string"?s.textContent!==I&&(d.suppressHydrationWarning!==!0&&us(s.textContent,I,e),c=["children",I]):typeof I=="number"&&s.textContent!==""+I&&(d.suppressHydrationWarning!==!0&&us(s.textContent,I,e),c=["children",""+I]):u.hasOwnProperty(x)&&I!=null&&x==="onScroll"&&Re("scroll",s)}switch(o){case"input":xe(s),st(s,d,!0);break;case"textarea":xe(s),ct(s);break;case"select":case"option":break;default:typeof d.onClick=="function"&&(s.onclick=as)}s=c,n.updateQueue=s,s!==null&&(n.flags|=4)}else{x=c.nodeType===9?c:c.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ct(o)),e==="http://www.w3.org/1999/xhtml"?o==="script"?(e=x.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=x.createElement(o,{is:s.is}):(e=x.createElement(o),o==="select"&&(x=e,s.multiple?x.multiple=!0:s.size&&(x.size=s.size))):e=x.createElementNS(e,o),e[Kt]=n,e[Yo]=s,Dd(e,n,!1,!1),n.stateNode=e;e:{switch(x=wo(o,s),o){case"dialog":Re("cancel",e),Re("close",e),c=s;break;case"iframe":case"object":case"embed":Re("load",e),c=s;break;case"video":case"audio":for(c=0;c<bo.length;c++)Re(bo[c],e);c=s;break;case"source":Re("error",e),c=s;break;case"img":case"image":case"link":Re("error",e),Re("load",e),c=s;break;case"details":Re("toggle",e),c=s;break;case"input":Ne(e,s),c=Ee(e,s),Re("invalid",e);break;case"option":c=s;break;case"select":e._wrapperState={wasMultiple:!!s.multiple},c=O({},s,{value:void 0}),Re("invalid",e);break;case"textarea":Xt(e,s),c=on(e,s),Re("invalid",e);break;default:c=s}xo(o,c),I=c;for(d in I)if(I.hasOwnProperty(d)){var L=I[d];d==="style"?$i(e,L):d==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,L!=null&&Mr(e,L)):d==="children"?typeof L=="string"?(o!=="textarea"||L!=="")&&sn(e,L):typeof L=="number"&&sn(e,""+L):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(u.hasOwnProperty(d)?L!=null&&d==="onScroll"&&Re("scroll",e):L!=null&&_(e,d,L,x))}switch(o){case"input":xe(e),st(e,s,!1);break;case"textarea":xe(e),ct(e);break;case"option":s.value!=null&&e.setAttribute("value",""+Q(s.value));break;case"select":e.multiple=!!s.multiple,d=s.value,d!=null?tt(e,!!s.multiple,d,!1):s.defaultValue!=null&&tt(e,!!s.multiple,s.defaultValue,!0);break;default:typeof c.onClick=="function"&&(e.onclick=as)}switch(o){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}}s&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return ot(n),null;case 6:if(e&&n.stateNode!=null)Od(e,n,e.memoizedProps,s);else{if(typeof s!="string"&&n.stateNode===null)throw Error(i(166));if(o=sr(qo.current),sr(qt.current),ms(n)){if(s=n.stateNode,o=n.memoizedProps,s[Kt]=n,(d=s.nodeValue!==o)&&(e=St,e!==null))switch(e.tag){case 3:us(s.nodeValue,o,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&us(s.nodeValue,o,(e.mode&1)!==0)}d&&(n.flags|=4)}else s=(o.nodeType===9?o:o.ownerDocument).createTextNode(s),s[Kt]=n,n.stateNode=s}return ot(n),null;case 13:if(Ae(He),s=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(je&&_t!==null&&(n.mode&1)!==0&&(n.flags&128)===0)Vf(),Xr(),n.flags|=98560,d=!1;else if(d=ms(n),s!==null&&s.dehydrated!==null){if(e===null){if(!d)throw Error(i(318));if(d=n.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(i(317));d[Kt]=n}else Xr(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ot(n),d=!1}else At!==null&&(Sa(At),At=null),d=!0;if(!d)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=o,n):(s=s!==null,s!==(e!==null&&e.memoizedState!==null)&&s&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||(He.current&1)!==0?Xe===0&&(Xe=3):ka())),n.updateQueue!==null&&(n.flags|=4),ot(n),null);case 4:return qr(),ca(e,n),e===null&&Uo(n.stateNode.containerInfo),ot(n),null;case 10:return Ou(n.type._context),ot(n),null;case 17:return dt(n.type)&&fs(),ot(n),null;case 19:if(Ae(He),d=n.memoizedState,d===null)return ot(n),null;if(s=(n.flags&128)!==0,x=d.rendering,x===null)if(s)ni(d,!1);else{if(Xe!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(x=_s(e),x!==null){for(n.flags|=128,ni(d,!1),s=x.updateQueue,s!==null&&(n.updateQueue=s,n.flags|=4),n.subtreeFlags=0,s=o,o=n.child;o!==null;)d=o,e=s,d.flags&=14680066,x=d.alternate,x===null?(d.childLanes=0,d.lanes=e,d.child=null,d.subtreeFlags=0,d.memoizedProps=null,d.memoizedState=null,d.updateQueue=null,d.dependencies=null,d.stateNode=null):(d.childLanes=x.childLanes,d.lanes=x.lanes,d.child=x.child,d.subtreeFlags=0,d.deletions=null,d.memoizedProps=x.memoizedProps,d.memoizedState=x.memoizedState,d.updateQueue=x.updateQueue,d.type=x.type,e=x.dependencies,d.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),o=o.sibling;return $e(He,He.current&1|2),n.child}e=e.sibling}d.tail!==null&&Oe()>to&&(n.flags|=128,s=!0,ni(d,!1),n.lanes=4194304)}else{if(!s)if(e=_s(x),e!==null){if(n.flags|=128,s=!0,o=e.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),ni(d,!0),d.tail===null&&d.tailMode==="hidden"&&!x.alternate&&!je)return ot(n),null}else 2*Oe()-d.renderingStartTime>to&&o!==1073741824&&(n.flags|=128,s=!0,ni(d,!1),n.lanes=4194304);d.isBackwards?(x.sibling=n.child,n.child=x):(o=d.last,o!==null?o.sibling=x:n.child=x,d.last=x)}return d.tail!==null?(n=d.tail,d.rendering=n,d.tail=n.sibling,d.renderingStartTime=Oe(),n.sibling=null,o=He.current,$e(He,s?o&1|2:o&1),n):(ot(n),null);case 22:case 23:return Ea(),s=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(n.flags|=8192),s&&(n.mode&1)!==0?(Et&1073741824)!==0&&(ot(n),n.subtreeFlags&6&&(n.flags|=8192)):ot(n),null;case 24:return null;case 25:return null}throw Error(i(156,n.tag))}function Ym(e,n){switch(Lu(n),n.tag){case 1:return dt(n.type)&&fs(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return qr(),Ae(ft),Ae(nt),Wu(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return bu(n),null;case 13:if(Ae(He),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(i(340));Xr()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Ae(He),null;case 4:return qr(),null;case 10:return Ou(n.type._context),null;case 22:case 23:return Ea(),null;case 24:return null;default:return null}}var Ts=!1,it=!1,Xm=typeof WeakSet=="function"?WeakSet:Set,de=null;function Jr(e,n){var o=e.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(s){Be(e,n,s)}else o.current=null}function fa(e,n,o){try{o()}catch(s){Be(e,n,s)}}var Hd=!1;function Qm(e,n){if(Eu=qi,e=yf(),gu(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var s=o.getSelection&&o.getSelection();if(s&&s.rangeCount!==0){o=s.anchorNode;var c=s.anchorOffset,d=s.focusNode;s=s.focusOffset;try{o.nodeType,d.nodeType}catch{o=null;break e}var x=0,I=-1,L=-1,G=0,re=0,se=e,te=null;t:for(;;){for(var fe;se!==o||c!==0&&se.nodeType!==3||(I=x+c),se!==d||s!==0&&se.nodeType!==3||(L=x+s),se.nodeType===3&&(x+=se.nodeValue.length),(fe=se.firstChild)!==null;)te=se,se=fe;for(;;){if(se===e)break t;if(te===o&&++G===c&&(I=x),te===d&&++re===s&&(L=x),(fe=se.nextSibling)!==null)break;se=te,te=se.parentNode}se=fe}o=I===-1||L===-1?null:{start:I,end:L}}else o=null}o=o||{start:0,end:0}}else o=null;for(ku={focusedElem:e,selectionRange:o},qi=!1,de=n;de!==null;)if(n=de,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,de=e;else for(;de!==null;){n=de;try{var pe=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(pe!==null){var ge=pe.memoizedProps,be=pe.memoizedState,U=n.stateNode,j=U.getSnapshotBeforeUpdate(n.elementType===n.type?ge:Dt(n.type,ge),be);U.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var W=n.stateNode.containerInfo;W.nodeType===1?W.textContent="":W.nodeType===9&&W.documentElement&&W.removeChild(W.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(le){Be(n,n.return,le)}if(e=n.sibling,e!==null){e.return=n.return,de=e;break}de=n.return}return pe=Hd,Hd=!1,pe}function ri(e,n,o){var s=n.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&e)===e){var d=c.destroy;c.destroy=void 0,d!==void 0&&fa(n,o,d)}c=c.next}while(c!==s)}}function Ls(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var s=o.create;o.destroy=s()}o=o.next}while(o!==n)}}function da(e){var n=e.ref;if(n!==null){var o=e.stateNode;switch(e.tag){case 5:e=o;break;default:e=o}typeof n=="function"?n(e):n.current=e}}function Fd(e){var n=e.alternate;n!==null&&(e.alternate=null,Fd(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Kt],delete n[Yo],delete n[Pu],delete n[Im],delete n[Tm])),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 Vd(e){return e.tag===5||e.tag===3||e.tag===4}function Bd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vd(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 ha(e,n,o){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?o.nodeType===8?o.parentNode.insertBefore(e,n):o.insertBefore(e,n):(o.nodeType===8?(n=o.parentNode,n.insertBefore(e,o)):(n=o,n.appendChild(e)),o=o._reactRootContainer,o!=null||n.onclick!==null||(n.onclick=as));else if(s!==4&&(e=e.child,e!==null))for(ha(e,n,o),e=e.sibling;e!==null;)ha(e,n,o),e=e.sibling}function pa(e,n,o){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?o.insertBefore(e,n):o.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(pa(e,n,o),e=e.sibling;e!==null;)pa(e,n,o),e=e.sibling}var Ze=null,jt=!1;function An(e,n,o){for(o=o.child;o!==null;)bd(e,n,o),o=o.sibling}function bd(e,n,o){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(Tr,o)}catch{}switch(o.tag){case 5:it||Jr(o,n);case 6:var s=Ze,c=jt;Ze=null,An(e,n,o),Ze=s,jt=c,Ze!==null&&(jt?(e=Ze,o=o.stateNode,e.nodeType===8?e.parentNode.removeChild(o):e.removeChild(o)):Ze.removeChild(o.stateNode));break;case 18:Ze!==null&&(jt?(e=Ze,o=o.stateNode,e.nodeType===8?Mu(e.parentNode,o):e.nodeType===1&&Mu(e,o),Ao(e)):Mu(Ze,o.stateNode));break;case 4:s=Ze,c=jt,Ze=o.stateNode.containerInfo,jt=!0,An(e,n,o),Ze=s,jt=c;break;case 0:case 11:case 14:case 15:if(!it&&(s=o.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){c=s=s.next;do{var d=c,x=d.destroy;d=d.tag,x!==void 0&&((d&2)!==0||(d&4)!==0)&&fa(o,n,x),c=c.next}while(c!==s)}An(e,n,o);break;case 1:if(!it&&(Jr(o,n),s=o.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=o.memoizedProps,s.state=o.memoizedState,s.componentWillUnmount()}catch(I){Be(o,n,I)}An(e,n,o);break;case 21:An(e,n,o);break;case 22:o.mode&1?(it=(s=it)||o.memoizedState!==null,An(e,n,o),it=s):An(e,n,o);break;default:An(e,n,o)}}function Ud(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new Xm),n.forEach(function(s){var c=ry.bind(null,e,s);o.has(s)||(o.add(s),s.then(c,c))})}}function Ot(e,n){var o=n.deletions;if(o!==null)for(var s=0;s<o.length;s++){var c=o[s];try{var d=e,x=n,I=x;e:for(;I!==null;){switch(I.tag){case 5:Ze=I.stateNode,jt=!1;break e;case 3:Ze=I.stateNode.containerInfo,jt=!0;break e;case 4:Ze=I.stateNode.containerInfo,jt=!0;break e}I=I.return}if(Ze===null)throw Error(i(160));bd(d,x,c),Ze=null,jt=!1;var L=c.alternate;L!==null&&(L.return=null),c.return=null}catch(G){Be(c,n,G)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)Wd(n,e),n=n.sibling}function Wd(e,n){var o=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ot(n,e),Jt(e),s&4){try{ri(3,e,e.return),Ls(3,e)}catch(ge){Be(e,e.return,ge)}try{ri(5,e,e.return)}catch(ge){Be(e,e.return,ge)}}break;case 1:Ot(n,e),Jt(e),s&512&&o!==null&&Jr(o,o.return);break;case 5:if(Ot(n,e),Jt(e),s&512&&o!==null&&Jr(o,o.return),e.flags&32){var c=e.stateNode;try{sn(c,"")}catch(ge){Be(e,e.return,ge)}}if(s&4&&(c=e.stateNode,c!=null)){var d=e.memoizedProps,x=o!==null?o.memoizedProps:d,I=e.type,L=e.updateQueue;if(e.updateQueue=null,L!==null)try{I==="input"&&d.type==="radio"&&d.name!=null&&Me(c,d),wo(I,x);var G=wo(I,d);for(x=0;x<L.length;x+=2){var re=L[x],se=L[x+1];re==="style"?$i(c,se):re==="dangerouslySetInnerHTML"?Mr(c,se):re==="children"?sn(c,se):_(c,re,se,G)}switch(I){case"input":Te(c,d);break;case"textarea":Qt(c,d);break;case"select":var te=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!d.multiple;var fe=d.value;fe!=null?tt(c,!!d.multiple,fe,!1):te!==!!d.multiple&&(d.defaultValue!=null?tt(c,!!d.multiple,d.defaultValue,!0):tt(c,!!d.multiple,d.multiple?[]:"",!1))}c[Yo]=d}catch(ge){Be(e,e.return,ge)}}break;case 6:if(Ot(n,e),Jt(e),s&4){if(e.stateNode===null)throw Error(i(162));c=e.stateNode,d=e.memoizedProps;try{c.nodeValue=d}catch(ge){Be(e,e.return,ge)}}break;case 3:if(Ot(n,e),Jt(e),s&4&&o!==null&&o.memoizedState.isDehydrated)try{Ao(n.containerInfo)}catch(ge){Be(e,e.return,ge)}break;case 4:Ot(n,e),Jt(e);break;case 13:Ot(n,e),Jt(e),c=e.child,c.flags&8192&&(d=c.memoizedState!==null,c.stateNode.isHidden=d,!d||c.alternate!==null&&c.alternate.memoizedState!==null||(ya=Oe())),s&4&&Ud(e);break;case 22:if(re=o!==null&&o.memoizedState!==null,e.mode&1?(it=(G=it)||re,Ot(n,e),it=G):Ot(n,e),Jt(e),s&8192){if(G=e.memoizedState!==null,(e.stateNode.isHidden=G)&&!re&&(e.mode&1)!==0)for(de=e,re=e.child;re!==null;){for(se=de=re;de!==null;){switch(te=de,fe=te.child,te.tag){case 0:case 11:case 14:case 15:ri(4,te,te.return);break;case 1:Jr(te,te.return);var pe=te.stateNode;if(typeof pe.componentWillUnmount=="function"){s=te,o=te.return;try{n=s,pe.props=n.memoizedProps,pe.state=n.memoizedState,pe.componentWillUnmount()}catch(ge){Be(s,o,ge)}}break;case 5:Jr(te,te.return);break;case 22:if(te.memoizedState!==null){Qd(se);continue}}fe!==null?(fe.return=te,de=fe):Qd(se)}re=re.sibling}e:for(re=null,se=e;;){if(se.tag===5){if(re===null){re=se;try{c=se.stateNode,G?(d=c.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none"):(I=se.stateNode,L=se.memoizedProps.style,x=L!=null&&L.hasOwnProperty("display")?L.display:null,I.style.display=Li("display",x))}catch(ge){Be(e,e.return,ge)}}}else if(se.tag===6){if(re===null)try{se.stateNode.nodeValue=G?"":se.memoizedProps}catch(ge){Be(e,e.return,ge)}}else if((se.tag!==22&&se.tag!==23||se.memoizedState===null||se===e)&&se.child!==null){se.child.return=se,se=se.child;continue}if(se===e)break e;for(;se.sibling===null;){if(se.return===null||se.return===e)break e;re===se&&(re=null),se=se.return}re===se&&(re=null),se.sibling.return=se.return,se=se.sibling}}break;case 19:Ot(n,e),Jt(e),s&4&&Ud(e);break;case 21:break;default:Ot(n,e),Jt(e)}}function Jt(e){var n=e.flags;if(n&2){try{e:{for(var o=e.return;o!==null;){if(Vd(o)){var s=o;break e}o=o.return}throw Error(i(160))}switch(s.tag){case 5:var c=s.stateNode;s.flags&32&&(sn(c,""),s.flags&=-33);var d=Bd(e);pa(e,d,c);break;case 3:case 4:var x=s.stateNode.containerInfo,I=Bd(e);ha(e,I,x);break;default:throw Error(i(161))}}catch(L){Be(e,e.return,L)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Gm(e,n,o){de=e,Yd(e)}function Yd(e,n,o){for(var s=(e.mode&1)!==0;de!==null;){var c=de,d=c.child;if(c.tag===22&&s){var x=c.memoizedState!==null||Ts;if(!x){var I=c.alternate,L=I!==null&&I.memoizedState!==null||it;I=Ts;var G=it;if(Ts=x,(it=L)&&!G)for(de=c;de!==null;)x=de,L=x.child,x.tag===22&&x.memoizedState!==null?Gd(c):L!==null?(L.return=x,de=L):Gd(c);for(;d!==null;)de=d,Yd(d),d=d.sibling;de=c,Ts=I,it=G}Xd(e)}else(c.subtreeFlags&8772)!==0&&d!==null?(d.return=c,de=d):Xd(e)}}function Xd(e){for(;de!==null;){var n=de;if((n.flags&8772)!==0){var o=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:it||Ls(5,n);break;case 1:var s=n.stateNode;if(n.flags&4&&!it)if(o===null)s.componentDidMount();else{var c=n.elementType===n.type?o.memoizedProps:Dt(n.type,o.memoizedProps);s.componentDidUpdate(c,o.memoizedState,s.__reactInternalSnapshotBeforeUpdate)}var d=n.updateQueue;d!==null&&Qf(n,d,s);break;case 3:var x=n.updateQueue;if(x!==null){if(o=null,n.child!==null)switch(n.child.tag){case 5:o=n.child.stateNode;break;case 1:o=n.child.stateNode}Qf(n,x,o)}break;case 5:var I=n.stateNode;if(o===null&&n.flags&4){o=I;var L=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":L.autoFocus&&o.focus();break;case"img":L.src&&(o.src=L.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var G=n.alternate;if(G!==null){var re=G.memoizedState;if(re!==null){var se=re.dehydrated;se!==null&&Ao(se)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(i(163))}it||n.flags&512&&da(n)}catch(te){Be(n,n.return,te)}}if(n===e){de=null;break}if(o=n.sibling,o!==null){o.return=n.return,de=o;break}de=n.return}}function Qd(e){for(;de!==null;){var n=de;if(n===e){de=null;break}var o=n.sibling;if(o!==null){o.return=n.return,de=o;break}de=n.return}}function Gd(e){for(;de!==null;){var n=de;try{switch(n.tag){case 0:case 11:case 15:var o=n.return;try{Ls(4,n)}catch(L){Be(n,o,L)}break;case 1:var s=n.stateNode;if(typeof s.componentDidMount=="function"){var c=n.return;try{s.componentDidMount()}catch(L){Be(n,c,L)}}var d=n.return;try{da(n)}catch(L){Be(n,d,L)}break;case 5:var x=n.return;try{da(n)}catch(L){Be(n,x,L)}}}catch(L){Be(n,n.return,L)}if(n===e){de=null;break}var I=n.sibling;if(I!==null){I.return=n.return,de=I;break}de=n.return}}var Km=Math.ceil,$s=P.ReactCurrentDispatcher,ga=P.ReactCurrentOwner,Lt=P.ReactCurrentBatchConfig,Pe=0,Ge=null,Ue=null,Je=0,Et=0,eo=In(0),Xe=0,oi=null,ur=0,Rs=0,ma=0,ii=null,pt=null,ya=0,to=1/0,gn=null,As=!1,va=null,Dn=null,Ds=!1,jn=null,js=0,si=0,xa=null,Os=-1,Hs=0;function ut(){return(Pe&6)!==0?Oe():Os!==-1?Os:Os=Oe()}function On(e){return(e.mode&1)===0?1:(Pe&2)!==0&&Je!==0?Je&-Je:$m.transition!==null?(Hs===0&&(Hs=Qi()),Hs):(e=Le,e!==0||(e=window.event,e=e===void 0?16:Kc(e.type)),e)}function Ht(e,n,o,s){if(50<si)throw si=0,xa=null,Error(i(185));er(e,o,s),((Pe&2)===0||e!==Ge)&&(e===Ge&&((Pe&2)===0&&(Rs|=o),Xe===4&&Hn(e,Je)),gt(e,s),o===1&&Pe===0&&(n.mode&1)===0&&(to=Oe()+500,hs&&Ln()))}function gt(e,n){var o=e.callbackNode;Xi(e,n);var s=ln(e,e===Ge?Je:0);if(s===0)o!==null&&bi(o),e.callbackNode=null,e.callbackPriority=0;else if(n=s&-s,e.callbackPriority!==n){if(o!=null&&bi(o),n===1)e.tag===0?Lm(qd.bind(null,e)):Df(qd.bind(null,e)),Pm(function(){(Pe&6)===0&&Ln()}),o=null;else{switch(Bc(s)){case 1:o=zo;break;case 4:o=Wi;break;case 16:o=Ir;break;case 536870912:o=Yi;break;default:o=Ir}o=ih(o,Kd.bind(null,e))}e.callbackPriority=n,e.callbackNode=o}}function Kd(e,n){if(Os=-1,Hs=0,(Pe&6)!==0)throw Error(i(327));var o=e.callbackNode;if(no()&&e.callbackNode!==o)return null;var s=ln(e,e===Ge?Je:0);if(s===0)return null;if((s&30)!==0||(s&e.expiredLanes)!==0||n)n=Fs(e,s);else{n=s;var c=Pe;Pe|=2;var d=Jd();(Ge!==e||Je!==n)&&(gn=null,to=Oe()+500,cr(e,n));do try{Jm();break}catch(I){Zd(e,I)}while(!0);ju(),$s.current=d,Pe=c,Ue!==null?n=0:(Ge=null,Je=0,n=Xe)}if(n!==0){if(n===2&&(c=Io(e),c!==0&&(s=c,n=wa(e,c))),n===1)throw o=oi,cr(e,0),Hn(e,s),gt(e,Oe()),o;if(n===6)Hn(e,s);else{if(c=e.current.alternate,(s&30)===0&&!qm(c)&&(n=Fs(e,s),n===2&&(d=Io(e),d!==0&&(s=d,n=wa(e,d))),n===1))throw o=oi,cr(e,0),Hn(e,s),gt(e,Oe()),o;switch(e.finishedWork=c,e.finishedLanes=s,n){case 0:case 1:throw Error(i(345));case 2:fr(e,pt,gn);break;case 3:if(Hn(e,s),(s&130023424)===s&&(n=ya+500-Oe(),10<n)){if(ln(e,0)!==0)break;if(c=e.suspendedLanes,(c&s)!==s){ut(),e.pingedLanes|=e.suspendedLanes&c;break}e.timeoutHandle=Cu(fr.bind(null,e,pt,gn),n);break}fr(e,pt,gn);break;case 4:if(Hn(e,s),(s&4194240)===s)break;for(n=e.eventTimes,c=-1;0<s;){var x=31-xt(s);d=1<<x,x=n[x],x>c&&(c=x),s&=~d}if(s=c,s=Oe()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*Km(s/1960))-s,10<s){e.timeoutHandle=Cu(fr.bind(null,e,pt,gn),s);break}fr(e,pt,gn);break;case 5:fr(e,pt,gn);break;default:throw Error(i(329))}}}return gt(e,Oe()),e.callbackNode===o?Kd.bind(null,e):null}function wa(e,n){var o=ii;return e.current.memoizedState.isDehydrated&&(cr(e,n).flags|=256),e=Fs(e,n),e!==2&&(n=pt,pt=o,n!==null&&Sa(n)),e}function Sa(e){pt===null?pt=e:pt.push.apply(pt,e)}function qm(e){for(var n=e;;){if(n.flags&16384){var o=n.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var s=0;s<o.length;s++){var c=o[s],d=c.getSnapshot;c=c.value;try{if(!Rt(d(),c))return!1}catch{return!1}}}if(o=n.child,n.subtreeFlags&16384&&o!==null)o.return=n,n=o;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Hn(e,n){for(n&=~ma,n&=~Rs,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var o=31-xt(n),s=1<<o;e[o]=-1,n&=~s}}function qd(e){if((Pe&6)!==0)throw Error(i(327));no();var n=ln(e,0);if((n&1)===0)return gt(e,Oe()),null;var o=Fs(e,n);if(e.tag!==0&&o===2){var s=Io(e);s!==0&&(n=s,o=wa(e,s))}if(o===1)throw o=oi,cr(e,0),Hn(e,n),gt(e,Oe()),o;if(o===6)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,fr(e,pt,gn),gt(e,Oe()),null}function _a(e,n){var o=Pe;Pe|=1;try{return e(n)}finally{Pe=o,Pe===0&&(to=Oe()+500,hs&&Ln())}}function ar(e){jn!==null&&jn.tag===0&&(Pe&6)===0&&no();var n=Pe;Pe|=1;var o=Lt.transition,s=Le;try{if(Lt.transition=null,Le=1,e)return e()}finally{Le=s,Lt.transition=o,Pe=n,(Pe&6)===0&&Ln()}}function Ea(){Et=eo.current,Ae(eo)}function cr(e,n){e.finishedWork=null,e.finishedLanes=0;var o=e.timeoutHandle;if(o!==-1&&(e.timeoutHandle=-1,Mm(o)),Ue!==null)for(o=Ue.return;o!==null;){var s=o;switch(Lu(s),s.tag){case 1:s=s.type.childContextTypes,s!=null&&fs();break;case 3:qr(),Ae(ft),Ae(nt),Wu();break;case 5:bu(s);break;case 4:qr();break;case 13:Ae(He);break;case 19:Ae(He);break;case 10:Ou(s.type._context);break;case 22:case 23:Ea()}o=o.return}if(Ge=e,Ue=e=Fn(e.current,null),Je=Et=n,Xe=0,oi=null,ma=Rs=ur=0,pt=ii=null,ir!==null){for(n=0;n<ir.length;n++)if(o=ir[n],s=o.interleaved,s!==null){o.interleaved=null;var c=s.next,d=o.pending;if(d!==null){var x=d.next;d.next=c,s.next=x}o.pending=s}ir=null}return e}function Zd(e,n){do{var o=Ue;try{if(ju(),Es.current=Ms,ks){for(var s=Fe.memoizedState;s!==null;){var c=s.queue;c!==null&&(c.pending=null),s=s.next}ks=!1}if(lr=0,Qe=Ye=Fe=null,Zo=!1,Jo=0,ga.current=null,o===null||o.return===null){Xe=1,oi=n,Ue=null;break}e:{var d=e,x=o.return,I=o,L=n;if(n=Je,I.flags|=32768,L!==null&&typeof L=="object"&&typeof L.then=="function"){var G=L,re=I,se=re.tag;if((re.mode&1)===0&&(se===0||se===11||se===15)){var te=re.alternate;te?(re.updateQueue=te.updateQueue,re.memoizedState=te.memoizedState,re.lanes=te.lanes):(re.updateQueue=null,re.memoizedState=null)}var fe=Ed(x);if(fe!==null){fe.flags&=-257,kd(fe,x,I,d,n),fe.mode&1&&_d(d,G,n),n=fe,L=G;var pe=n.updateQueue;if(pe===null){var ge=new Set;ge.add(L),n.updateQueue=ge}else pe.add(L);break e}else{if((n&1)===0){_d(d,G,n),ka();break e}L=Error(i(426))}}else if(je&&I.mode&1){var be=Ed(x);if(be!==null){(be.flags&65536)===0&&(be.flags|=256),kd(be,x,I,d,n),Au(Zr(L,I));break e}}d=L=Zr(L,I),Xe!==4&&(Xe=2),ii===null?ii=[d]:ii.push(d),d=x;do{switch(d.tag){case 3:d.flags|=65536,n&=-n,d.lanes|=n;var U=wd(d,L,n);Xf(d,U);break e;case 1:I=L;var j=d.type,W=d.stateNode;if((d.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||W!==null&&typeof W.componentDidCatch=="function"&&(Dn===null||!Dn.has(W)))){d.flags|=65536,n&=-n,d.lanes|=n;var le=Sd(d,I,n);Xf(d,le);break e}}d=d.return}while(d!==null)}th(o)}catch(me){n=me,Ue===o&&o!==null&&(Ue=o=o.return);continue}break}while(!0)}function Jd(){var e=$s.current;return $s.current=Ms,e===null?Ms:e}function ka(){(Xe===0||Xe===3||Xe===2)&&(Xe=4),Ge===null||(ur&268435455)===0&&(Rs&268435455)===0||Hn(Ge,Je)}function Fs(e,n){var o=Pe;Pe|=2;var s=Jd();(Ge!==e||Je!==n)&&(gn=null,cr(e,n));do try{Zm();break}catch(c){Zd(e,c)}while(!0);if(ju(),Pe=o,$s.current=s,Ue!==null)throw Error(i(261));return Ge=null,Je=0,Xe}function Zm(){for(;Ue!==null;)eh(Ue)}function Jm(){for(;Ue!==null&&!Xl();)eh(Ue)}function eh(e){var n=oh(e.alternate,e,Et);e.memoizedProps=e.pendingProps,n===null?th(e):Ue=n,ga.current=null}function th(e){var n=e;do{var o=n.alternate;if(e=n.return,(n.flags&32768)===0){if(o=Wm(o,n,Et),o!==null){Ue=o;return}}else{if(o=Ym(o,n),o!==null){o.flags&=32767,Ue=o;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Xe=6,Ue=null;return}}if(n=n.sibling,n!==null){Ue=n;return}Ue=n=e}while(n!==null);Xe===0&&(Xe=5)}function fr(e,n,o){var s=Le,c=Lt.transition;try{Lt.transition=null,Le=1,ey(e,n,o,s)}finally{Lt.transition=c,Le=s}return null}function ey(e,n,o,s){do no();while(jn!==null);if((Pe&6)!==0)throw Error(i(327));o=e.finishedWork;var c=e.finishedLanes;if(o===null)return null;if(e.finishedWork=null,e.finishedLanes=0,o===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var d=o.lanes|o.childLanes;if(tu(e,d),e===Ge&&(Ue=Ge=null,Je=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||Ds||(Ds=!0,ih(Ir,function(){return no(),null})),d=(o.flags&15990)!==0,(o.subtreeFlags&15990)!==0||d){d=Lt.transition,Lt.transition=null;var x=Le;Le=1;var I=Pe;Pe|=4,ga.current=null,Qm(e,o),Wd(o,e),wm(ku),qi=!!Eu,ku=Eu=null,e.current=o,Gm(o),Ui(),Pe=I,Le=x,Lt.transition=d}else e.current=o;if(Ds&&(Ds=!1,jn=e,js=c),d=e.pendingLanes,d===0&&(Dn=null),Kl(o.stateNode),gt(e,Oe()),n!==null)for(s=e.onRecoverableError,o=0;o<n.length;o++)c=n[o],s(c.value,{componentStack:c.stack,digest:c.digest});if(As)throw As=!1,e=va,va=null,e;return(js&1)!==0&&e.tag!==0&&no(),d=e.pendingLanes,(d&1)!==0?e===xa?si++:(si=0,xa=e):si=0,Ln(),null}function no(){if(jn!==null){var e=Bc(js),n=Lt.transition,o=Le;try{if(Lt.transition=null,Le=16>e?16:e,jn===null)var s=!1;else{if(e=jn,jn=null,js=0,(Pe&6)!==0)throw Error(i(331));var c=Pe;for(Pe|=4,de=e.current;de!==null;){var d=de,x=d.child;if((de.flags&16)!==0){var I=d.deletions;if(I!==null){for(var L=0;L<I.length;L++){var G=I[L];for(de=G;de!==null;){var re=de;switch(re.tag){case 0:case 11:case 15:ri(8,re,d)}var se=re.child;if(se!==null)se.return=re,de=se;else for(;de!==null;){re=de;var te=re.sibling,fe=re.return;if(Fd(re),re===G){de=null;break}if(te!==null){te.return=fe,de=te;break}de=fe}}}var pe=d.alternate;if(pe!==null){var ge=pe.child;if(ge!==null){pe.child=null;do{var be=ge.sibling;ge.sibling=null,ge=be}while(ge!==null)}}de=d}}if((d.subtreeFlags&2064)!==0&&x!==null)x.return=d,de=x;else e:for(;de!==null;){if(d=de,(d.flags&2048)!==0)switch(d.tag){case 0:case 11:case 15:ri(9,d,d.return)}var U=d.sibling;if(U!==null){U.return=d.return,de=U;break e}de=d.return}}var j=e.current;for(de=j;de!==null;){x=de;var W=x.child;if((x.subtreeFlags&2064)!==0&&W!==null)W.return=x,de=W;else e:for(x=j;de!==null;){if(I=de,(I.flags&2048)!==0)try{switch(I.tag){case 0:case 11:case 15:Ls(9,I)}}catch(me){Be(I,I.return,me)}if(I===x){de=null;break e}var le=I.sibling;if(le!==null){le.return=I.return,de=le;break e}de=I.return}}if(Pe=c,Ln(),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(Tr,e)}catch{}s=!0}return s}finally{Le=o,Lt.transition=n}}return!1}function nh(e,n,o){n=Zr(o,n),n=wd(e,n,1),e=Rn(e,n,1),n=ut(),e!==null&&(er(e,1,n),gt(e,n))}function Be(e,n,o){if(e.tag===3)nh(e,e,o);else for(;n!==null;){if(n.tag===3){nh(n,e,o);break}else if(n.tag===1){var s=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Dn===null||!Dn.has(s))){e=Zr(o,e),e=Sd(n,e,1),n=Rn(n,e,1),e=ut(),n!==null&&(er(n,1,e),gt(n,e));break}}n=n.return}}function ty(e,n,o){var s=e.pingCache;s!==null&&s.delete(n),n=ut(),e.pingedLanes|=e.suspendedLanes&o,Ge===e&&(Je&o)===o&&(Xe===4||Xe===3&&(Je&130023424)===Je&&500>Oe()-ya?cr(e,0):ma|=o),gt(e,n)}function rh(e,n){n===0&&((e.mode&1)===0?n=1:(n=$r,$r<<=1,($r&130023424)===0&&($r=4194304)));var o=ut();e=dn(e,n),e!==null&&(er(e,n,o),gt(e,o))}function ny(e){var n=e.memoizedState,o=0;n!==null&&(o=n.retryLane),rh(e,o)}function ry(e,n){var o=0;switch(e.tag){case 13:var s=e.stateNode,c=e.memoizedState;c!==null&&(o=c.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(i(314))}s!==null&&s.delete(n),rh(e,o)}var oh;oh=function(e,n,o){if(e!==null)if(e.memoizedProps!==n.pendingProps||ft.current)ht=!0;else{if((e.lanes&o)===0&&(n.flags&128)===0)return ht=!1,Um(e,n,o);ht=(e.flags&131072)!==0}else ht=!1,je&&(n.flags&1048576)!==0&&jf(n,gs,n.index);switch(n.lanes=0,n.tag){case 2:var s=n.type;Is(e,n),e=n.pendingProps;var c=Ur(n,nt.current);Kr(n,o),c=Qu(null,n,s,e,c,o);var d=Gu();return n.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,dt(s)?(d=!0,ds(n)):d=!1,n.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,Vu(n),c.updater=Ps,n.stateNode=c,c._reactInternals=n,ta(n,s,e,o),n=ia(null,n,s,!0,d,o)):(n.tag=0,je&&d&&Tu(n),lt(null,n,c,o),n=n.child),n;case 16:s=n.elementType;e:{switch(Is(e,n),e=n.pendingProps,c=s._init,s=c(s._payload),n.type=s,c=n.tag=iy(s),e=Dt(s,e),c){case 0:n=oa(null,n,s,e,o);break e;case 1:n=Id(null,n,s,e,o);break e;case 11:n=Nd(null,n,s,e,o);break e;case 14:n=Cd(null,n,s,Dt(s.type,e),o);break e}throw Error(i(306,s,""))}return n;case 0:return s=n.type,c=n.pendingProps,c=n.elementType===s?c:Dt(s,c),oa(e,n,s,c,o);case 1:return s=n.type,c=n.pendingProps,c=n.elementType===s?c:Dt(s,c),Id(e,n,s,c,o);case 3:e:{if(Td(n),e===null)throw Error(i(387));s=n.pendingProps,d=n.memoizedState,c=d.element,Yf(e,n),Ss(n,s,null,o);var x=n.memoizedState;if(s=x.element,d.isDehydrated)if(d={element:s,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},n.updateQueue.baseState=d,n.memoizedState=d,n.flags&256){c=Zr(Error(i(423)),n),n=Ld(e,n,s,o,c);break e}else if(s!==c){c=Zr(Error(i(424)),n),n=Ld(e,n,s,o,c);break e}else for(_t=zn(n.stateNode.containerInfo.firstChild),St=n,je=!0,At=null,o=Uf(n,null,s,o),n.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Xr(),s===c){n=pn(e,n,o);break e}lt(e,n,s,o)}n=n.child}return n;case 5:return Gf(n),e===null&&Ru(n),s=n.type,c=n.pendingProps,d=e!==null?e.memoizedProps:null,x=c.children,Nu(s,c)?x=null:d!==null&&Nu(s,d)&&(n.flags|=32),zd(e,n),lt(e,n,x,o),n.child;case 6:return e===null&&Ru(n),null;case 13:return $d(e,n,o);case 4:return Bu(n,n.stateNode.containerInfo),s=n.pendingProps,e===null?n.child=Qr(n,null,s,o):lt(e,n,s,o),n.child;case 11:return s=n.type,c=n.pendingProps,c=n.elementType===s?c:Dt(s,c),Nd(e,n,s,c,o);case 7:return lt(e,n,n.pendingProps,o),n.child;case 8:return lt(e,n,n.pendingProps.children,o),n.child;case 12:return lt(e,n,n.pendingProps.children,o),n.child;case 10:e:{if(s=n.type._context,c=n.pendingProps,d=n.memoizedProps,x=c.value,$e(vs,s._currentValue),s._currentValue=x,d!==null)if(Rt(d.value,x)){if(d.children===c.children&&!ft.current){n=pn(e,n,o);break e}}else for(d=n.child,d!==null&&(d.return=n);d!==null;){var I=d.dependencies;if(I!==null){x=d.child;for(var L=I.firstContext;L!==null;){if(L.context===s){if(d.tag===1){L=hn(-1,o&-o),L.tag=2;var G=d.updateQueue;if(G!==null){G=G.shared;var re=G.pending;re===null?L.next=L:(L.next=re.next,re.next=L),G.pending=L}}d.lanes|=o,L=d.alternate,L!==null&&(L.lanes|=o),Hu(d.return,o,n),I.lanes|=o;break}L=L.next}}else if(d.tag===10)x=d.type===n.type?null:d.child;else if(d.tag===18){if(x=d.return,x===null)throw Error(i(341));x.lanes|=o,I=x.alternate,I!==null&&(I.lanes|=o),Hu(x,o,n),x=d.sibling}else x=d.child;if(x!==null)x.return=d;else for(x=d;x!==null;){if(x===n){x=null;break}if(d=x.sibling,d!==null){d.return=x.return,x=d;break}x=x.return}d=x}lt(e,n,c.children,o),n=n.child}return n;case 9:return c=n.type,s=n.pendingProps.children,Kr(n,o),c=It(c),s=s(c),n.flags|=1,lt(e,n,s,o),n.child;case 14:return s=n.type,c=Dt(s,n.pendingProps),c=Dt(s.type,c),Cd(e,n,s,c,o);case 15:return Md(e,n,n.type,n.pendingProps,o);case 17:return s=n.type,c=n.pendingProps,c=n.elementType===s?c:Dt(s,c),Is(e,n),n.tag=1,dt(s)?(e=!0,ds(n)):e=!1,Kr(n,o),vd(n,s,c),ta(n,s,c,o),ia(null,n,s,!0,e,o);case 19:return Ad(e,n,o);case 22:return Pd(e,n,o)}throw Error(i(156,n.tag))};function ih(e,n){return Bi(e,n)}function oy(e,n,o,s){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $t(e,n,o,s){return new oy(e,n,o,s)}function Na(e){return e=e.prototype,!(!e||!e.isReactComponent)}function iy(e){if(typeof e=="function")return Na(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ee)return 11;if(e===B)return 14}return 2}function Fn(e,n){var o=e.alternate;return o===null?(o=$t(e.tag,n,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=n,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&14680064,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,n=e.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function Vs(e,n,o,s,c,d){var x=2;if(s=e,typeof e=="function")Na(e)&&(x=1);else if(typeof e=="string")x=5;else e:switch(e){case V:return dr(o.children,c,d,n);case Y:x=8,c|=8;break;case X:return e=$t(12,o,n,c|2),e.elementType=X,e.lanes=d,e;case Z:return e=$t(13,o,n,c),e.elementType=Z,e.lanes=d,e;case C:return e=$t(19,o,n,c),e.elementType=C,e.lanes=d,e;case b:return Bs(o,c,d,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case J:x=10;break e;case q:x=9;break e;case ee:x=11;break e;case B:x=14;break e;case F:x=16,s=null;break e}throw Error(i(130,e==null?e:typeof e,""))}return n=$t(x,o,n,c),n.elementType=e,n.type=s,n.lanes=d,n}function dr(e,n,o,s){return e=$t(7,e,s,n),e.lanes=o,e}function Bs(e,n,o,s){return e=$t(22,e,s,n),e.elementType=b,e.lanes=o,e.stateNode={isHidden:!1},e}function Ca(e,n,o){return e=$t(6,e,null,n),e.lanes=o,e}function Ma(e,n,o){return n=$t(4,e.children!==null?e.children:[],e.key,n),n.lanes=o,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function sy(e,n,o,s,c){this.tag=n,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=Jn(0),this.expirationTimes=Jn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jn(0),this.identifierPrefix=s,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Pa(e,n,o,s,c,d,x,I,L){return e=new sy(e,n,o,I,L),n===1?(n=1,d===!0&&(n|=8)):n=0,d=$t(3,null,null,n),e.current=d,d.stateNode=e,d.memoizedState={element:s,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},Vu(d),e}function ly(e,n,o){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:s==null?null:""+s,children:e,containerInfo:n,implementation:o}}function sh(e){if(!e)return Tn;e=e._reactInternals;e:{if(Gt(e)!==e||e.tag!==1)throw Error(i(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(dt(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(i(171))}if(e.tag===1){var o=e.type;if(dt(o))return Rf(e,o,n)}return n}function lh(e,n,o,s,c,d,x,I,L){return e=Pa(o,s,!0,e,c,d,x,I,L),e.context=sh(null),o=e.current,s=ut(),c=On(o),d=hn(s,c),d.callback=n??null,Rn(o,d,c),e.current.lanes=c,er(e,c,s),gt(e,s),e}function bs(e,n,o,s){var c=n.current,d=ut(),x=On(c);return o=sh(o),n.context===null?n.context=o:n.pendingContext=o,n=hn(d,x),n.payload={element:e},s=s===void 0?null:s,s!==null&&(n.callback=s),e=Rn(c,n,x),e!==null&&(Ht(e,c,x,d),ws(e,c,x)),x}function Us(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 uh(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<n?o:n}}function za(e,n){uh(e,n),(e=e.alternate)&&uh(e,n)}function uy(){return null}var ah=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ia(e){this._internalRoot=e}Ws.prototype.render=Ia.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(i(409));bs(e,n,null,null)},Ws.prototype.unmount=Ia.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;ar(function(){bs(null,e,null,null)}),n[un]=null}};function Ws(e){this._internalRoot=e}Ws.prototype.unstable_scheduleHydration=function(e){if(e){var n=Wc();e={blockedOn:null,target:e,priority:n};for(var o=0;o<Cn.length&&n!==0&&n<Cn[o].priority;o++);Cn.splice(o,0,e),o===0&&Qc(e)}};function Ta(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ys(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ch(){}function ay(e,n,o,s,c){if(c){if(typeof s=="function"){var d=s;s=function(){var G=Us(x);d.call(G)}}var x=lh(n,s,e,0,null,!1,!1,"",ch);return e._reactRootContainer=x,e[un]=x.current,Uo(e.nodeType===8?e.parentNode:e),ar(),x}for(;c=e.lastChild;)e.removeChild(c);if(typeof s=="function"){var I=s;s=function(){var G=Us(L);I.call(G)}}var L=Pa(e,0,!1,null,null,!1,!1,"",ch);return e._reactRootContainer=L,e[un]=L.current,Uo(e.nodeType===8?e.parentNode:e),ar(function(){bs(n,L,o,s)}),L}function Xs(e,n,o,s,c){var d=o._reactRootContainer;if(d){var x=d;if(typeof c=="function"){var I=c;c=function(){var L=Us(x);I.call(L)}}bs(n,x,e,c)}else x=ay(o,n,e,c,s);return Us(x)}bc=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var o=Zn(n.pendingLanes);o!==0&&(Rr(n,o|1),gt(n,Oe()),(Pe&6)===0&&(to=Oe()+500,Ln()))}break;case 13:ar(function(){var s=dn(e,1);if(s!==null){var c=ut();Ht(s,e,1,c)}}),za(e,1)}},nu=function(e){if(e.tag===13){var n=dn(e,134217728);if(n!==null){var o=ut();Ht(n,e,134217728,o)}za(e,134217728)}},Uc=function(e){if(e.tag===13){var n=On(e),o=dn(e,n);if(o!==null){var s=ut();Ht(o,e,n,s)}za(e,n)}},Wc=function(){return Le},Yc=function(e,n){var o=Le;try{return Le=e,n()}finally{Le=o}},Eo=function(e,n,o){switch(n){case"input":if(Te(e,o),n=o.name,o.type==="radio"&&n!=null){for(o=e;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<o.length;n++){var s=o[n];if(s!==e&&s.form===e.form){var c=cs(s);if(!c)throw Error(i(90));ye(s),Te(s,c)}}}break;case"textarea":Qt(e,o);break;case"select":n=o.value,n!=null&&tt(e,!!o.multiple,n,!1)}},ji=_a,Oi=ar;var cy={usingClientEntryPoint:!1,Events:[Xo,Br,cs,Ai,Di,_a]},li={findFiberByHostInstance:tr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},fy={bundleType:li.bundleType,version:li.version,rendererPackageName:li.rendererPackageName,rendererConfig:li.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:P.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Fi(e),e===null?null:e.stateNode},findFiberByHostInstance:li.findFiberByHostInstance||uy,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 Qs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qs.isDisabled&&Qs.supportsFiber)try{Tr=Qs.inject(fy),vt=Qs}catch{}}return mt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cy,mt.createPortal=function(e,n){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ta(n))throw Error(i(200));return ly(e,n,null,o)},mt.createRoot=function(e,n){if(!Ta(e))throw Error(i(299));var o=!1,s="",c=ah;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(c=n.onRecoverableError)),n=Pa(e,1,!1,null,null,o,!1,s,c),e[un]=n.current,Uo(e.nodeType===8?e.parentNode:e),new Ia(n)},mt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=Fi(n),e=e===null?null:e.stateNode,e},mt.flushSync=function(e){return ar(e)},mt.hydrate=function(e,n,o){if(!Ys(n))throw Error(i(200));return Xs(null,e,n,!0,o)},mt.hydrateRoot=function(e,n,o){if(!Ta(e))throw Error(i(405));var s=o!=null&&o.hydratedSources||null,c=!1,d="",x=ah;if(o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(d=o.identifierPrefix),o.onRecoverableError!==void 0&&(x=o.onRecoverableError)),n=lh(n,null,e,1,o??null,c,!1,d,x),e[un]=n.current,Uo(e),s)for(e=0;e<s.length;e++)o=s[e],c=o._getVersion,c=c(o._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[o,c]:n.mutableSourceEagerHydrationData.push(o,c);return new Ws(n)},mt.render=function(e,n,o){if(!Ys(n))throw Error(i(200));return Xs(null,e,n,!1,o)},mt.unmountComponentAtNode=function(e){if(!Ys(e))throw Error(i(40));return e._reactRootContainer?(ar(function(){Xs(null,null,e,!1,function(){e._reactRootContainer=null,e[un]=null})}),!0):!1},mt.unstable_batchedUpdates=_a,mt.unstable_renderSubtreeIntoContainer=function(e,n,o,s){if(!Ys(o))throw Error(i(200));if(e==null||e._reactInternals===void 0)throw Error(i(38));return Xs(e,n,o,!1,s)},mt.version="18.3.1-next-f1338f8080-20240426",mt}var vh;function Dp(){if(vh)return Ra.exports;vh=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),Ra.exports=xy(),Ra.exports}var xh;function wy(){if(xh)return Gs;xh=1;var t=Dp();return Gs.createRoot=t.createRoot,Gs.hydrateRoot=t.hydrateRoot,Gs}var Sy=wy();function We(t){if(typeof t=="string"||typeof t=="number")return""+t;let r="";if(Array.isArray(t))for(let i=0,l;i<t.length;i++)(l=We(t[i]))!==""&&(r+=(r&&" ")+l);else for(let i in t)t[i]&&(r+=(r&&" ")+i);return r}var _y={value:()=>{}};function Cl(){for(var t=0,r=arguments.length,i={},l;t<r;++t){if(!(l=arguments[t]+"")||l in i||/[\s.]/.test(l))throw new Error("illegal type: "+l);i[l]=[]}return new ll(i)}function ll(t){this._=t}function Ey(t,r){return t.trim().split(/^|\s+/).map(function(i){var l="",u=i.indexOf(".");if(u>=0&&(l=i.slice(u+1),i=i.slice(0,u)),i&&!r.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:l}})}ll.prototype=Cl.prototype={constructor:ll,on:function(t,r){var i=this._,l=Ey(t+"",i),u,a=-1,f=l.length;if(arguments.length<2){for(;++a<f;)if((u=(t=l[a]).type)&&(u=ky(i[u],t.name)))return u;return}if(r!=null&&typeof r!="function")throw new Error("invalid callback: "+r);for(;++a<f;)if(u=(t=l[a]).type)i[u]=wh(i[u],t.name,r);else if(r==null)for(u in i)i[u]=wh(i[u],t.name,null);return this},copy:function(){var t={},r=this._;for(var i in r)t[i]=r[i].slice();return new ll(t)},call:function(t,r){if((u=arguments.length-2)>0)for(var i=new Array(u),l=0,u,a;l<u;++l)i[l]=arguments[l+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=this._[t],l=0,u=a.length;l<u;++l)a[l].value.apply(r,i)},apply:function(t,r,i){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var l=this._[t],u=0,a=l.length;u<a;++u)l[u].value.apply(r,i)}};function ky(t,r){for(var i=0,l=t.length,u;i<l;++i)if((u=t[i]).name===r)return u.value}function wh(t,r,i){for(var l=0,u=t.length;l<u;++l)if(t[l].name===r){t[l]=_y,t=t.slice(0,l).concat(t.slice(l+1));break}return i!=null&&t.push({name:r,value:i}),t}var nc="http://www.w3.org/1999/xhtml",Sh={svg:"http://www.w3.org/2000/svg",xhtml:nc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ml(t){var r=t+="",i=r.indexOf(":");return i>=0&&(r=t.slice(0,i))!=="xmlns"&&(t=t.slice(i+1)),Sh.hasOwnProperty(r)?{space:Sh[r],local:t}:t}function Ny(t){return function(){var r=this.ownerDocument,i=this.namespaceURI;return i===nc&&r.documentElement.namespaceURI===nc?r.createElement(t):r.createElementNS(i,t)}}function Cy(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function jp(t){var r=Ml(t);return(r.local?Cy:Ny)(r)}function My(){}function yc(t){return t==null?My:function(){return this.querySelector(t)}}function Py(t){typeof t!="function"&&(t=yc(t));for(var r=this._groups,i=r.length,l=new Array(i),u=0;u<i;++u)for(var a=r[u],f=a.length,h=l[u]=new Array(f),p,g,y=0;y<f;++y)(p=a[y])&&(g=t.call(p,p.__data__,y,a))&&("__data__"in p&&(g.__data__=p.__data__),h[y]=g);return new Nt(l,this._parents)}function zy(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Iy(){return[]}function Op(t){return t==null?Iy:function(){return this.querySelectorAll(t)}}function Ty(t){return function(){return zy(t.apply(this,arguments))}}function Ly(t){typeof t=="function"?t=Ty(t):t=Op(t);for(var r=this._groups,i=r.length,l=[],u=[],a=0;a<i;++a)for(var f=r[a],h=f.length,p,g=0;g<h;++g)(p=f[g])&&(l.push(t.call(p,p.__data__,g,f)),u.push(p));return new Nt(l,u)}function Hp(t){return function(){return this.matches(t)}}function Fp(t){return function(r){return r.matches(t)}}var $y=Array.prototype.find;function Ry(t){return function(){return $y.call(this.children,t)}}function Ay(){return this.firstElementChild}function Dy(t){return this.select(t==null?Ay:Ry(typeof t=="function"?t:Fp(t)))}var jy=Array.prototype.filter;function Oy(){return Array.from(this.children)}function Hy(t){return function(){return jy.call(this.children,t)}}function Fy(t){return this.selectAll(t==null?Oy:Hy(typeof t=="function"?t:Fp(t)))}function Vy(t){typeof t!="function"&&(t=Hp(t));for(var r=this._groups,i=r.length,l=new Array(i),u=0;u<i;++u)for(var a=r[u],f=a.length,h=l[u]=[],p,g=0;g<f;++g)(p=a[g])&&t.call(p,p.__data__,g,a)&&h.push(p);return new Nt(l,this._parents)}function Vp(t){return new Array(t.length)}function By(){return new Nt(this._enter||this._groups.map(Vp),this._parents)}function hl(t,r){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=r}hl.prototype={constructor:hl,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,r){return this._parent.insertBefore(t,r)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function by(t){return function(){return t}}function Uy(t,r,i,l,u,a){for(var f=0,h,p=r.length,g=a.length;f<g;++f)(h=r[f])?(h.__data__=a[f],l[f]=h):i[f]=new hl(t,a[f]);for(;f<p;++f)(h=r[f])&&(u[f]=h)}function Wy(t,r,i,l,u,a,f){var h,p,g=new Map,y=r.length,v=a.length,m=new Array(y),w;for(h=0;h<y;++h)(p=r[h])&&(m[h]=w=f.call(p,p.__data__,h,r)+"",g.has(w)?u[h]=p:g.set(w,p));for(h=0;h<v;++h)w=f.call(t,a[h],h,a)+"",(p=g.get(w))?(l[h]=p,p.__data__=a[h],g.delete(w)):i[h]=new hl(t,a[h]);for(h=0;h<y;++h)(p=r[h])&&g.get(m[h])===p&&(u[h]=p)}function Yy(t){return t.__data__}function Xy(t,r){if(!arguments.length)return Array.from(this,Yy);var i=r?Wy:Uy,l=this._parents,u=this._groups;typeof t!="function"&&(t=by(t));for(var a=u.length,f=new Array(a),h=new Array(a),p=new Array(a),g=0;g<a;++g){var y=l[g],v=u[g],m=v.length,w=Qy(t.call(y,y&&y.__data__,g,l)),S=w.length,M=h[g]=new Array(S),N=f[g]=new Array(S),E=p[g]=new Array(m);i(y,v,M,N,E,w,r);for(var T=0,_=0,P,H;T<S;++T)if(P=M[T]){for(T>=_&&(_=T+1);!(H=N[_])&&++_<S;);P._next=H||null}}return f=new Nt(f,l),f._enter=h,f._exit=p,f}function Qy(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Gy(){return new Nt(this._exit||this._groups.map(Vp),this._parents)}function Ky(t,r,i){var l=this.enter(),u=this,a=this.exit();return typeof t=="function"?(l=t(l),l&&(l=l.selection())):l=l.append(t+""),r!=null&&(u=r(u),u&&(u=u.selection())),i==null?a.remove():i(a),l&&u?l.merge(u).order():u}function qy(t){for(var r=t.selection?t.selection():t,i=this._groups,l=r._groups,u=i.length,a=l.length,f=Math.min(u,a),h=new Array(u),p=0;p<f;++p)for(var g=i[p],y=l[p],v=g.length,m=h[p]=new Array(v),w,S=0;S<v;++S)(w=g[S]||y[S])&&(m[S]=w);for(;p<u;++p)h[p]=i[p];return new Nt(h,this._parents)}function Zy(){for(var t=this._groups,r=-1,i=t.length;++r<i;)for(var l=t[r],u=l.length-1,a=l[u],f;--u>=0;)(f=l[u])&&(a&&f.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(f,a),a=f);return this}function Jy(t){t||(t=ev);function r(v,m){return v&&m?t(v.__data__,m.__data__):!v-!m}for(var i=this._groups,l=i.length,u=new Array(l),a=0;a<l;++a){for(var f=i[a],h=f.length,p=u[a]=new Array(h),g,y=0;y<h;++y)(g=f[y])&&(p[y]=g);p.sort(r)}return new Nt(u,this._parents).order()}function ev(t,r){return t<r?-1:t>r?1:t>=r?0:NaN}function tv(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function nv(){return Array.from(this)}function rv(){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var l=t[r],u=0,a=l.length;u<a;++u){var f=l[u];if(f)return f}return null}function ov(){let t=0;for(const r of this)++t;return t}function iv(){return!this.node()}function sv(t){for(var r=this._groups,i=0,l=r.length;i<l;++i)for(var u=r[i],a=0,f=u.length,h;a<f;++a)(h=u[a])&&t.call(h,h.__data__,a,u);return this}function lv(t){return function(){this.removeAttribute(t)}}function uv(t){return function(){this.removeAttributeNS(t.space,t.local)}}function av(t,r){return function(){this.setAttribute(t,r)}}function cv(t,r){return function(){this.setAttributeNS(t.space,t.local,r)}}function fv(t,r){return function(){var i=r.apply(this,arguments);i==null?this.removeAttribute(t):this.setAttribute(t,i)}}function dv(t,r){return function(){var i=r.apply(this,arguments);i==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}function hv(t,r){var i=Ml(t);if(arguments.length<2){var l=this.node();return i.local?l.getAttributeNS(i.space,i.local):l.getAttribute(i)}return this.each((r==null?i.local?uv:lv:typeof r=="function"?i.local?dv:fv:i.local?cv:av)(i,r))}function Bp(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function pv(t){return function(){this.style.removeProperty(t)}}function gv(t,r,i){return function(){this.style.setProperty(t,r,i)}}function mv(t,r,i){return function(){var l=r.apply(this,arguments);l==null?this.style.removeProperty(t):this.style.setProperty(t,l,i)}}function yv(t,r,i){return arguments.length>1?this.each((r==null?pv:typeof r=="function"?mv:gv)(t,r,i??"")):ao(this.node(),t)}function ao(t,r){return t.style.getPropertyValue(r)||Bp(t).getComputedStyle(t,null).getPropertyValue(r)}function vv(t){return function(){delete this[t]}}function xv(t,r){return function(){this[t]=r}}function wv(t,r){return function(){var i=r.apply(this,arguments);i==null?delete this[t]:this[t]=i}}function Sv(t,r){return arguments.length>1?this.each((r==null?vv:typeof r=="function"?wv:xv)(t,r)):this.node()[t]}function bp(t){return t.trim().split(/^|\s+/)}function vc(t){return t.classList||new Up(t)}function Up(t){this._node=t,this._names=bp(t.getAttribute("class")||"")}Up.prototype={add:function(t){var r=this._names.indexOf(t);r<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var r=this._names.indexOf(t);r>=0&&(this._names.splice(r,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Wp(t,r){for(var i=vc(t),l=-1,u=r.length;++l<u;)i.add(r[l])}function Yp(t,r){for(var i=vc(t),l=-1,u=r.length;++l<u;)i.remove(r[l])}function _v(t){return function(){Wp(this,t)}}function Ev(t){return function(){Yp(this,t)}}function kv(t,r){return function(){(r.apply(this,arguments)?Wp:Yp)(this,t)}}function Nv(t,r){var i=bp(t+"");if(arguments.length<2){for(var l=vc(this.node()),u=-1,a=i.length;++u<a;)if(!l.contains(i[u]))return!1;return!0}return this.each((typeof r=="function"?kv:r?_v:Ev)(i,r))}function Cv(){this.textContent=""}function Mv(t){return function(){this.textContent=t}}function Pv(t){return function(){var r=t.apply(this,arguments);this.textContent=r??""}}function zv(t){return arguments.length?this.each(t==null?Cv:(typeof t=="function"?Pv:Mv)(t)):this.node().textContent}function Iv(){this.innerHTML=""}function Tv(t){return function(){this.innerHTML=t}}function Lv(t){return function(){var r=t.apply(this,arguments);this.innerHTML=r??""}}function $v(t){return arguments.length?this.each(t==null?Iv:(typeof t=="function"?Lv:Tv)(t)):this.node().innerHTML}function Rv(){this.nextSibling&&this.parentNode.appendChild(this)}function Av(){return this.each(Rv)}function Dv(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function jv(){return this.each(Dv)}function Ov(t){var r=typeof t=="function"?t:jp(t);return this.select(function(){return this.appendChild(r.apply(this,arguments))})}function Hv(){return null}function Fv(t,r){var i=typeof t=="function"?t:jp(t),l=r==null?Hv:typeof r=="function"?r:yc(r);return this.select(function(){return this.insertBefore(i.apply(this,arguments),l.apply(this,arguments)||null)})}function Vv(){var t=this.parentNode;t&&t.removeChild(this)}function Bv(){return this.each(Vv)}function bv(){var t=this.cloneNode(!1),r=this.parentNode;return r?r.insertBefore(t,this.nextSibling):t}function Uv(){var t=this.cloneNode(!0),r=this.parentNode;return r?r.insertBefore(t,this.nextSibling):t}function Wv(t){return this.select(t?Uv:bv)}function Yv(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Xv(t){return function(r){t.call(this,r,this.__data__)}}function Qv(t){return t.trim().split(/^|\s+/).map(function(r){var i="",l=r.indexOf(".");return l>=0&&(i=r.slice(l+1),r=r.slice(0,l)),{type:r,name:i}})}function Gv(t){return function(){var r=this.__on;if(r){for(var i=0,l=-1,u=r.length,a;i<u;++i)a=r[i],(!t.type||a.type===t.type)&&a.name===t.name?this.removeEventListener(a.type,a.listener,a.options):r[++l]=a;++l?r.length=l:delete this.__on}}}function Kv(t,r,i){return function(){var l=this.__on,u,a=Xv(r);if(l){for(var f=0,h=l.length;f<h;++f)if((u=l[f]).type===t.type&&u.name===t.name){this.removeEventListener(u.type,u.listener,u.options),this.addEventListener(u.type,u.listener=a,u.options=i),u.value=r;return}}this.addEventListener(t.type,a,i),u={type:t.type,name:t.name,value:r,listener:a,options:i},l?l.push(u):this.__on=[u]}}function qv(t,r,i){var l=Qv(t+""),u,a=l.length,f;if(arguments.length<2){var h=this.node().__on;if(h){for(var p=0,g=h.length,y;p<g;++p)for(u=0,y=h[p];u<a;++u)if((f=l[u]).type===y.type&&f.name===y.name)return y.value}return}for(h=r?Kv:Gv,u=0;u<a;++u)this.each(h(l[u],r,i));return this}function Xp(t,r,i){var l=Bp(t),u=l.CustomEvent;typeof u=="function"?u=new u(r,i):(u=l.document.createEvent("Event"),i?(u.initEvent(r,i.bubbles,i.cancelable),u.detail=i.detail):u.initEvent(r,!1,!1)),t.dispatchEvent(u)}function Zv(t,r){return function(){return Xp(this,t,r)}}function Jv(t,r){return function(){return Xp(this,t,r.apply(this,arguments))}}function ex(t,r){return this.each((typeof r=="function"?Jv:Zv)(t,r))}function*tx(){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var l=t[r],u=0,a=l.length,f;u<a;++u)(f=l[u])&&(yield f)}var Qp=[null];function Nt(t,r){this._groups=t,this._parents=r}function Ci(){return new Nt([[document.documentElement]],Qp)}function nx(){return this}Nt.prototype=Ci.prototype={constructor:Nt,select:Py,selectAll:Ly,selectChild:Dy,selectChildren:Fy,filter:Vy,data:Xy,enter:By,exit:Gy,join:Ky,merge:qy,selection:nx,order:Zy,sort:Jy,call:tv,nodes:nv,node:rv,size:ov,empty:iv,each:sv,attr:hv,style:yv,property:Sv,classed:Nv,text:zv,html:$v,raise:Av,lower:jv,append:Ov,insert:Fv,remove:Bv,clone:Wv,datum:Yv,on:qv,dispatch:ex,[Symbol.iterator]:tx};function kt(t){return typeof t=="string"?new Nt([[document.querySelector(t)]],[document.documentElement]):new Nt([[t]],Qp)}var rx=0;function _h(){this._="@"+(++rx).toString(36)}_h.prototype={constructor:_h,get:function(t){for(var r=this._;!(r in t);)if(!(t=t.parentNode))return;return t[r]},set:function(t,r){return t[this._]=r},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};function ox(t){let r;for(;r=t.sourceEvent;)t=r;return t}function Ft(t,r){if(t=ox(t),r===void 0&&(r=t.currentTarget),r){var i=r.ownerSVGElement||r;if(i.createSVGPoint){var l=i.createSVGPoint();return l.x=t.clientX,l.y=t.clientY,l=l.matrixTransform(r.getScreenCTM().inverse()),[l.x,l.y]}if(r.getBoundingClientRect){var u=r.getBoundingClientRect();return[t.clientX-u.left-r.clientLeft,t.clientY-u.top-r.clientTop]}}return[t.pageX,t.pageY]}const ix={passive:!1},mi={capture:!0,passive:!1};function ja(t){t.stopImmediatePropagation()}function io(t){t.preventDefault(),t.stopImmediatePropagation()}function Gp(t){var r=t.document.documentElement,i=kt(t).on("dragstart.drag",io,mi);"onselectstart"in r?i.on("selectstart.drag",io,mi):(r.__noselect=r.style.MozUserSelect,r.style.MozUserSelect="none")}function Kp(t,r){var i=t.document.documentElement,l=kt(t).on("dragstart.drag",null);r&&(l.on("click.drag",io,mi),setTimeout(function(){l.on("click.drag",null)},0)),"onselectstart"in i?l.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}var Ks=t=>()=>t;function rc(t,{sourceEvent:r,subject:i,target:l,identifier:u,active:a,x:f,y:h,dx:p,dy:g,dispatch:y}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},subject:{value:i,enumerable:!0,configurable:!0},target:{value:l,enumerable:!0,configurable:!0},identifier:{value:u,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:f,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:p,enumerable:!0,configurable:!0},dy:{value:g,enumerable:!0,configurable:!0},_:{value:y}})}rc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function sx(t){return!t.ctrlKey&&!t.button}function lx(){return this.parentNode}function ux(t,r){return r??{x:t.x,y:t.y}}function ax(){return navigator.maxTouchPoints||"ontouchstart"in this}function qp(){var t=sx,r=lx,i=ux,l=ax,u={},a=Cl("start","drag","end"),f=0,h,p,g,y,v=0;function m(P){P.on("mousedown.drag",w).filter(l).on("touchstart.drag",N).on("touchmove.drag",E,ix).on("touchend.drag touchcancel.drag",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function w(P,H){if(!(y||!t.call(this,P,H))){var D=_(this,r.call(this,P,H),P,H,"mouse");D&&(kt(P.view).on("mousemove.drag",S,mi).on("mouseup.drag",M,mi),Gp(P.view),ja(P),g=!1,h=P.clientX,p=P.clientY,D("start",P))}}function S(P){if(io(P),!g){var H=P.clientX-h,D=P.clientY-p;g=H*H+D*D>v}u.mouse("drag",P)}function M(P){kt(P.view).on("mousemove.drag mouseup.drag",null),Kp(P.view,g),io(P),u.mouse("end",P)}function N(P,H){if(t.call(this,P,H)){var D=P.changedTouches,V=r.call(this,P,H),Y=D.length,X,J;for(X=0;X<Y;++X)(J=_(this,V,P,H,D[X].identifier,D[X]))&&(ja(P),J("start",P,D[X]))}}function E(P){var H=P.changedTouches,D=H.length,V,Y;for(V=0;V<D;++V)(Y=u[H[V].identifier])&&(io(P),Y("drag",P,H[V]))}function T(P){var H=P.changedTouches,D=H.length,V,Y;for(y&&clearTimeout(y),y=setTimeout(function(){y=null},500),V=0;V<D;++V)(Y=u[H[V].identifier])&&(ja(P),Y("end",P,H[V]))}function _(P,H,D,V,Y,X){var J=a.copy(),q=Ft(X||D,H),ee,Z,C;if((C=i.call(P,new rc("beforestart",{sourceEvent:D,target:m,identifier:Y,active:f,x:q[0],y:q[1],dx:0,dy:0,dispatch:J}),V))!=null)return ee=C.x-q[0]||0,Z=C.y-q[1]||0,function B(F,b,R){var $=q,O;switch(F){case"start":u[Y]=B,O=f++;break;case"end":delete u[Y],--f;case"drag":q=Ft(R||b,H),O=f;break}J.call(F,P,new rc(F,{sourceEvent:b,subject:C,target:m,identifier:Y,active:O,x:q[0]+ee,y:q[1]+Z,dx:q[0]-$[0],dy:q[1]-$[1],dispatch:J}),V)}}return m.filter=function(P){return arguments.length?(t=typeof P=="function"?P:Ks(!!P),m):t},m.container=function(P){return arguments.length?(r=typeof P=="function"?P:Ks(P),m):r},m.subject=function(P){return arguments.length?(i=typeof P=="function"?P:Ks(P),m):i},m.touchable=function(P){return arguments.length?(l=typeof P=="function"?P:Ks(!!P),m):l},m.on=function(){var P=a.on.apply(a,arguments);return P===a?m:P},m.clickDistance=function(P){return arguments.length?(v=(P=+P)*P,m):Math.sqrt(v)},m}function vo(t,r,i){t.prototype=r.prototype=i,i.constructor=t}function Mi(t,r){var i=Object.create(t.prototype);for(var l in r)i[l]=r[l];return i}function Xn(){}var Sr=.7,co=1/Sr,so="\\s*([+-]?\\d+)\\s*",yi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",tn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",cx=/^#([0-9a-f]{3,8})$/,fx=new RegExp(`^rgb\\(${so},${so},${so}\\)$`),dx=new RegExp(`^rgb\\(${tn},${tn},${tn}\\)$`),hx=new RegExp(`^rgba\\(${so},${so},${so},${yi}\\)$`),px=new RegExp(`^rgba\\(${tn},${tn},${tn},${yi}\\)$`),gx=new RegExp(`^hsl\\(${yi},${tn},${tn}\\)$`),mx=new RegExp(`^hsla\\(${yi},${tn},${tn},${yi}\\)$`),Eh={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};vo(Xn,_r,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:kh,formatHex:kh,formatHex8:yx,formatHsl:vx,formatRgb:Nh,toString:Nh});function kh(){return this.rgb().formatHex()}function yx(){return this.rgb().formatHex8()}function vx(){return Zp(this).formatHsl()}function Nh(){return this.rgb().formatRgb()}function _r(t){var r,i;return t=(t+"").trim().toLowerCase(),(r=cx.exec(t))?(i=r[1].length,r=parseInt(r[1],16),i===6?Ch(r):i===3?new qe(r>>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):i===8?qs(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):i===4?qs(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=fx.exec(t))?new qe(r[1],r[2],r[3],1):(r=dx.exec(t))?new qe(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=hx.exec(t))?qs(r[1],r[2],r[3],r[4]):(r=px.exec(t))?qs(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=gx.exec(t))?zh(r[1],r[2]/100,r[3]/100,1):(r=mx.exec(t))?zh(r[1],r[2]/100,r[3]/100,r[4]):Eh.hasOwnProperty(t)?Ch(Eh[t]):t==="transparent"?new qe(NaN,NaN,NaN,0):null}function Ch(t){return new qe(t>>16&255,t>>8&255,t&255,1)}function qs(t,r,i,l){return l<=0&&(t=r=i=NaN),new qe(t,r,i,l)}function xc(t){return t instanceof Xn||(t=_r(t)),t?(t=t.rgb(),new qe(t.r,t.g,t.b,t.opacity)):new qe}function oc(t,r,i,l){return arguments.length===1?xc(t):new qe(t,r,i,l??1)}function qe(t,r,i,l){this.r=+t,this.g=+r,this.b=+i,this.opacity=+l}vo(qe,oc,Mi(Xn,{brighter(t){return t=t==null?co:Math.pow(co,t),new qe(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Sr:Math.pow(Sr,t),new qe(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new qe(vr(this.r),vr(this.g),vr(this.b),pl(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:Mh,formatHex:Mh,formatHex8:xx,formatRgb:Ph,toString:Ph}));function Mh(){return`#${yr(this.r)}${yr(this.g)}${yr(this.b)}`}function xx(){return`#${yr(this.r)}${yr(this.g)}${yr(this.b)}${yr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ph(){const t=pl(this.opacity);return`${t===1?"rgb(":"rgba("}${vr(this.r)}, ${vr(this.g)}, ${vr(this.b)}${t===1?")":`, ${t})`}`}function pl(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function vr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function yr(t){return t=vr(t),(t<16?"0":"")+t.toString(16)}function zh(t,r,i,l){return l<=0?t=r=i=NaN:i<=0||i>=1?t=r=NaN:r<=0&&(t=NaN),new Vt(t,r,i,l)}function Zp(t){if(t instanceof Vt)return new Vt(t.h,t.s,t.l,t.opacity);if(t instanceof Xn||(t=_r(t)),!t)return new Vt;if(t instanceof Vt)return t;t=t.rgb();var r=t.r/255,i=t.g/255,l=t.b/255,u=Math.min(r,i,l),a=Math.max(r,i,l),f=NaN,h=a-u,p=(a+u)/2;return h?(r===a?f=(i-l)/h+(i<l)*6:i===a?f=(l-r)/h+2:f=(r-i)/h+4,h/=p<.5?a+u:2-a-u,f*=60):h=p>0&&p<1?0:f,new Vt(f,h,p,t.opacity)}function wx(t,r,i,l){return arguments.length===1?Zp(t):new Vt(t,r,i,l??1)}function Vt(t,r,i,l){this.h=+t,this.s=+r,this.l=+i,this.opacity=+l}vo(Vt,wx,Mi(Xn,{brighter(t){return t=t==null?co:Math.pow(co,t),new Vt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Sr:Math.pow(Sr,t),new Vt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,r=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,l=i+(i<.5?i:1-i)*r,u=2*i-l;return new qe(Oa(t>=240?t-240:t+120,u,l),Oa(t,u,l),Oa(t<120?t+240:t-120,u,l),this.opacity)},clamp(){return new Vt(Ih(this.h),Zs(this.s),Zs(this.l),pl(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 t=pl(this.opacity);return`${t===1?"hsl(":"hsla("}${Ih(this.h)}, ${Zs(this.s)*100}%, ${Zs(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Ih(t){return t=(t||0)%360,t<0?t+360:t}function Zs(t){return Math.max(0,Math.min(1,t||0))}function Oa(t,r,i){return(t<60?r+(i-r)*t/60:t<180?i:t<240?r+(i-r)*(240-t)/60:r)*255}const Jp=Math.PI/180,e0=180/Math.PI,gl=18,t0=.96422,n0=1,r0=.82521,o0=4/29,lo=6/29,i0=3*lo*lo,Sx=lo*lo*lo;function s0(t){if(t instanceof nn)return new nn(t.l,t.a,t.b,t.opacity);if(t instanceof yn)return l0(t);t instanceof qe||(t=xc(t));var r=Ba(t.r),i=Ba(t.g),l=Ba(t.b),u=Ha((.2225045*r+.7168786*i+.0606169*l)/n0),a,f;return r===i&&i===l?a=f=u:(a=Ha((.4360747*r+.3850649*i+.1430804*l)/t0),f=Ha((.0139322*r+.0971045*i+.7141733*l)/r0)),new nn(116*u-16,500*(a-u),200*(u-f),t.opacity)}function _x(t,r,i,l){return arguments.length===1?s0(t):new nn(t,r,i,l??1)}function nn(t,r,i,l){this.l=+t,this.a=+r,this.b=+i,this.opacity=+l}vo(nn,_x,Mi(Xn,{brighter(t){return new nn(this.l+gl*(t??1),this.a,this.b,this.opacity)},darker(t){return new nn(this.l-gl*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,r=isNaN(this.a)?t:t+this.a/500,i=isNaN(this.b)?t:t-this.b/200;return r=t0*Fa(r),t=n0*Fa(t),i=r0*Fa(i),new qe(Va(3.1338561*r-1.6168667*t-.4906146*i),Va(-.9787684*r+1.9161415*t+.033454*i),Va(.0719453*r-.2289914*t+1.4052427*i),this.opacity)}}));function Ha(t){return t>Sx?Math.pow(t,1/3):t/i0+o0}function Fa(t){return t>lo?t*t*t:i0*(t-o0)}function Va(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ba(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ex(t){if(t instanceof yn)return new yn(t.h,t.c,t.l,t.opacity);if(t instanceof nn||(t=s0(t)),t.a===0&&t.b===0)return new yn(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var r=Math.atan2(t.b,t.a)*e0;return new yn(r<0?r+360:r,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function kx(t,r,i,l){return arguments.length===1?Ex(t):new yn(t,r,i,l??1)}function yn(t,r,i,l){this.h=+t,this.c=+r,this.l=+i,this.opacity=+l}function l0(t){if(isNaN(t.h))return new nn(t.l,0,0,t.opacity);var r=t.h*Jp;return new nn(t.l,Math.cos(r)*t.c,Math.sin(r)*t.c,t.opacity)}vo(yn,kx,Mi(Xn,{brighter(t){return new yn(this.h,this.c,this.l+gl*(t??1),this.opacity)},darker(t){return new yn(this.h,this.c,this.l-gl*(t??1),this.opacity)},rgb(){return l0(this).rgb()}}));var u0=-.14861,wc=1.78277,Sc=-.29227,Pl=-.90649,vi=1.97294,Th=vi*Pl,Lh=vi*wc,$h=wc*Sc-Pl*u0;function Nx(t){if(t instanceof xr)return new xr(t.h,t.s,t.l,t.opacity);t instanceof qe||(t=xc(t));var r=t.r/255,i=t.g/255,l=t.b/255,u=($h*l+Th*r-Lh*i)/($h+Th-Lh),a=l-u,f=(vi*(i-u)-Sc*a)/Pl,h=Math.sqrt(f*f+a*a)/(vi*u*(1-u)),p=h?Math.atan2(f,a)*e0-120:NaN;return new xr(p<0?p+360:p,h,u,t.opacity)}function ic(t,r,i,l){return arguments.length===1?Nx(t):new xr(t,r,i,l??1)}function xr(t,r,i,l){this.h=+t,this.s=+r,this.l=+i,this.opacity=+l}vo(xr,ic,Mi(Xn,{brighter(t){return t=t==null?co:Math.pow(co,t),new xr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Sr:Math.pow(Sr,t),new xr(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Jp,r=+this.l,i=isNaN(this.s)?0:this.s*r*(1-r),l=Math.cos(t),u=Math.sin(t);return new qe(255*(r+i*(u0*l+wc*u)),255*(r+i*(Sc*l+Pl*u)),255*(r+i*(vi*l)),this.opacity)}}));var zl=t=>()=>t;function a0(t,r){return function(i){return t+i*r}}function Cx(t,r,i){return t=Math.pow(t,i),r=Math.pow(r,i)-t,i=1/i,function(l){return Math.pow(t+l*r,i)}}function Mx(t,r){var i=r-t;return i?a0(t,i>180||i<-180?i-360*Math.round(i/360):i):zl(isNaN(t)?r:t)}function Px(t){return(t=+t)==1?uo:function(r,i){return i-r?Cx(r,i,t):zl(isNaN(r)?i:r)}}function uo(t,r){var i=r-t;return i?a0(t,i):zl(isNaN(t)?r:t)}var ml=(function t(r){var i=Px(r);function l(u,a){var f=i((u=oc(u)).r,(a=oc(a)).r),h=i(u.g,a.g),p=i(u.b,a.b),g=uo(u.opacity,a.opacity);return function(y){return u.r=f(y),u.g=h(y),u.b=p(y),u.opacity=g(y),u+""}}return l.gamma=t,l})(1);function zx(t,r){r||(r=[]);var i=t?Math.min(r.length,t.length):0,l=r.slice(),u;return function(a){for(u=0;u<i;++u)l[u]=t[u]*(1-a)+r[u]*a;return l}}function Ix(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Tx(t,r){var i=r?r.length:0,l=t?Math.min(i,t.length):0,u=new Array(l),a=new Array(i),f;for(f=0;f<l;++f)u[f]=pi(t[f],r[f]);for(;f<i;++f)a[f]=r[f];return function(h){for(f=0;f<l;++f)a[f]=u[f](h);return a}}function Lx(t,r){var i=new Date;return t=+t,r=+r,function(l){return i.setTime(t*(1-l)+r*l),i}}function en(t,r){return t=+t,r=+r,function(i){return t*(1-i)+r*i}}function $x(t,r){var i={},l={},u;(t===null||typeof t!="object")&&(t={}),(r===null||typeof r!="object")&&(r={});for(u in r)u in t?i[u]=pi(t[u],r[u]):l[u]=r[u];return function(a){for(u in i)l[u]=i[u](a);return l}}var sc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ba=new RegExp(sc.source,"g");function Rx(t){return function(){return t}}function Ax(t){return function(r){return t(r)+""}}function c0(t,r){var i=sc.lastIndex=ba.lastIndex=0,l,u,a,f=-1,h=[],p=[];for(t=t+"",r=r+"";(l=sc.exec(t))&&(u=ba.exec(r));)(a=u.index)>i&&(a=r.slice(i,a),h[f]?h[f]+=a:h[++f]=a),(l=l[0])===(u=u[0])?h[f]?h[f]+=u:h[++f]=u:(h[++f]=null,p.push({i:f,x:en(l,u)})),i=ba.lastIndex;return i<r.length&&(a=r.slice(i),h[f]?h[f]+=a:h[++f]=a),h.length<2?p[0]?Ax(p[0].x):Rx(r):(r=p.length,function(g){for(var y=0,v;y<r;++y)h[(v=p[y]).i]=v.x(g);return h.join("")})}function pi(t,r){var i=typeof r,l;return r==null||i==="boolean"?zl(r):(i==="number"?en:i==="string"?(l=_r(r))?(r=l,ml):c0:r instanceof _r?ml:r instanceof Date?Lx:Ix(r)?zx:Array.isArray(r)?Tx:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?$x:en)(t,r)}var Rh=180/Math.PI,lc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function f0(t,r,i,l,u,a){var f,h,p;return(f=Math.sqrt(t*t+r*r))&&(t/=f,r/=f),(p=t*i+r*l)&&(i-=t*p,l-=r*p),(h=Math.sqrt(i*i+l*l))&&(i/=h,l/=h,p/=h),t*l<r*i&&(t=-t,r=-r,p=-p,f=-f),{translateX:u,translateY:a,rotate:Math.atan2(r,t)*Rh,skewX:Math.atan(p)*Rh,scaleX:f,scaleY:h}}var Js;function Dx(t){const r=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return r.isIdentity?lc:f0(r.a,r.b,r.c,r.d,r.e,r.f)}function jx(t){return t==null||(Js||(Js=document.createElementNS("http://www.w3.org/2000/svg","g")),Js.setAttribute("transform",t),!(t=Js.transform.baseVal.consolidate()))?lc:(t=t.matrix,f0(t.a,t.b,t.c,t.d,t.e,t.f))}function d0(t,r,i,l){function u(g){return g.length?g.pop()+" ":""}function a(g,y,v,m,w,S){if(g!==v||y!==m){var M=w.push("translate(",null,r,null,i);S.push({i:M-4,x:en(g,v)},{i:M-2,x:en(y,m)})}else(v||m)&&w.push("translate("+v+r+m+i)}function f(g,y,v,m){g!==y?(g-y>180?y+=360:y-g>180&&(g+=360),m.push({i:v.push(u(v)+"rotate(",null,l)-2,x:en(g,y)})):y&&v.push(u(v)+"rotate("+y+l)}function h(g,y,v,m){g!==y?m.push({i:v.push(u(v)+"skewX(",null,l)-2,x:en(g,y)}):y&&v.push(u(v)+"skewX("+y+l)}function p(g,y,v,m,w,S){if(g!==v||y!==m){var M=w.push(u(w)+"scale(",null,",",null,")");S.push({i:M-4,x:en(g,v)},{i:M-2,x:en(y,m)})}else(v!==1||m!==1)&&w.push(u(w)+"scale("+v+","+m+")")}return function(g,y){var v=[],m=[];return g=t(g),y=t(y),a(g.translateX,g.translateY,y.translateX,y.translateY,v,m),f(g.rotate,y.rotate,v,m),h(g.skewX,y.skewX,v,m),p(g.scaleX,g.scaleY,y.scaleX,y.scaleY,v,m),g=y=null,function(w){for(var S=-1,M=m.length,N;++S<M;)v[(N=m[S]).i]=N.x(w);return v.join("")}}}var Ox=d0(Dx,"px, ","px)","deg)"),Hx=d0(jx,", ",")",")"),Fx=1e-12;function Ah(t){return((t=Math.exp(t))+1/t)/2}function Vx(t){return((t=Math.exp(t))-1/t)/2}function Bx(t){return((t=Math.exp(2*t))-1)/(t+1)}var ul=(function t(r,i,l){function u(a,f){var h=a[0],p=a[1],g=a[2],y=f[0],v=f[1],m=f[2],w=y-h,S=v-p,M=w*w+S*S,N,E;if(M<Fx)E=Math.log(m/g)/r,N=function(V){return[h+V*w,p+V*S,g*Math.exp(r*V*E)]};else{var T=Math.sqrt(M),_=(m*m-g*g+l*M)/(2*g*i*T),P=(m*m-g*g-l*M)/(2*m*i*T),H=Math.log(Math.sqrt(_*_+1)-_),D=Math.log(Math.sqrt(P*P+1)-P);E=(D-H)/r,N=function(V){var Y=V*E,X=Ah(H),J=g/(i*T)*(X*Bx(r*Y+H)-Vx(H));return[h+J*w,p+J*S,g*X/Ah(r*Y+H)]}}return N.duration=Math.abs(E)*1e3*r/Math.SQRT2,N}return u.rho=function(a){var f=Math.max(.001,+a),h=f*f,p=h*h;return t(f,h,p)},u})(Math.SQRT2,2,4);function h0(t){return(function r(i){i=+i;function l(u,a){var f=t((u=ic(u)).h,(a=ic(a)).h),h=uo(u.s,a.s),p=uo(u.l,a.l),g=uo(u.opacity,a.opacity);return function(y){return u.h=f(y),u.s=h(y),u.l=p(Math.pow(y,i)),u.opacity=g(y),u+""}}return l.gamma=r,l})(1)}h0(Mx);h0(uo);var fo=0,di=0,ai=0,p0=1e3,yl,hi,vl=0,Er=0,Il=0,xi=typeof performance=="object"&&performance.now?performance:Date,g0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function _c(){return Er||(g0(bx),Er=xi.now()+Il)}function bx(){Er=0}function xl(){this._call=this._time=this._next=null}xl.prototype=m0.prototype={constructor:xl,restart:function(t,r,i){if(typeof t!="function")throw new TypeError("callback is not a function");i=(i==null?_c():+i)+(r==null?0:+r),!this._next&&hi!==this&&(hi?hi._next=this:yl=this,hi=this),this._call=t,this._time=i,uc()},stop:function(){this._call&&(this._call=null,this._time=1/0,uc())}};function m0(t,r,i){var l=new xl;return l.restart(t,r,i),l}function Ux(){_c(),++fo;for(var t=yl,r;t;)(r=Er-t._time)>=0&&t._call.call(void 0,r),t=t._next;--fo}function Dh(){Er=(vl=xi.now())+Il,fo=di=0;try{Ux()}finally{fo=0,Yx(),Er=0}}function Wx(){var t=xi.now(),r=t-vl;r>p0&&(Il-=r,vl=t)}function Yx(){for(var t,r=yl,i,l=1/0;r;)r._call?(l>r._time&&(l=r._time),t=r,r=r._next):(i=r._next,r._next=null,r=t?t._next=i:yl=i);hi=t,uc(l)}function uc(t){if(!fo){di&&(di=clearTimeout(di));var r=t-Er;r>24?(t<1/0&&(di=setTimeout(Dh,Math.ceil(t-xi.now()-Il)+1)),ai&&(ai=clearInterval(ai))):(ai||(vl=xi.now(),ai=setInterval(Wx,p0)),fo=1,g0(Dh))}}function jh(t,r,i){var l=new xl;return r=r==null?0:+r,l.restart(u=>{l.stop(),t(u+r)},r,i),l}function Xx(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Ec=3;(function t(r){r=+r;function i(l){return Math.pow(l,r)}return i.exponent=t,i})(Ec);(function t(r){r=+r;function i(l){return 1-Math.pow(1-l,r)}return i.exponent=t,i})(Ec);(function t(r){r=+r;function i(l){return((l*=2)<=1?Math.pow(l,r):2-Math.pow(2-l,r))/2}return i.exponent=t,i})(Ec);function wl(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}var kc=1.70158;(function t(r){r=+r;function i(l){return(l=+l)*l*(r*(l-1)+l)}return i.overshoot=t,i})(kc);(function t(r){r=+r;function i(l){return--l*l*((l+1)*r+l)+1}return i.overshoot=t,i})(kc);(function t(r){r=+r;function i(l){return((l*=2)<1?l*l*((r+1)*l-r):(l-=2)*l*((r+1)*l+r)+2)/2}return i.overshoot=t,i})(kc);var ho=2*Math.PI,Nc=1,Cc=.3;(function t(r,i){var l=Math.asin(1/(r=Math.max(1,r)))*(i/=ho);function u(a){return r*wl(- --a)*Math.sin((l-a)/i)}return u.amplitude=function(a){return t(a,i*ho)},u.period=function(a){return t(r,a)},u})(Nc,Cc);(function t(r,i){var l=Math.asin(1/(r=Math.max(1,r)))*(i/=ho);function u(a){return 1-r*wl(a=+a)*Math.sin((a+l)/i)}return u.amplitude=function(a){return t(a,i*ho)},u.period=function(a){return t(r,a)},u})(Nc,Cc);(function t(r,i){var l=Math.asin(1/(r=Math.max(1,r)))*(i/=ho);function u(a){return((a=a*2-1)<0?r*wl(-a)*Math.sin((l-a)/i):2-r*wl(a)*Math.sin((l+a)/i))/2}return u.amplitude=function(a){return t(a,i*ho)},u.period=function(a){return t(r,a)},u})(Nc,Cc);var Qx=Cl("start","end","cancel","interrupt"),Gx=[],y0=0,Oh=1,ac=2,al=3,Hh=4,cc=5,cl=6;function Tl(t,r,i,l,u,a){var f=t.__transition;if(!f)t.__transition={};else if(i in f)return;Kx(t,i,{name:r,index:l,group:u,on:Qx,tween:Gx,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:y0})}function Mc(t,r){var i=Wt(t,r);if(i.state>y0)throw new Error("too late; already scheduled");return i}function rn(t,r){var i=Wt(t,r);if(i.state>al)throw new Error("too late; already running");return i}function Wt(t,r){var i=t.__transition;if(!i||!(i=i[r]))throw new Error("transition not found");return i}function Kx(t,r,i){var l=t.__transition,u;l[r]=i,i.timer=m0(a,0,i.time);function a(g){i.state=Oh,i.timer.restart(f,i.delay,i.time),i.delay<=g&&f(g-i.delay)}function f(g){var y,v,m,w;if(i.state!==Oh)return p();for(y in l)if(w=l[y],w.name===i.name){if(w.state===al)return jh(f);w.state===Hh?(w.state=cl,w.timer.stop(),w.on.call("interrupt",t,t.__data__,w.index,w.group),delete l[y]):+y<r&&(w.state=cl,w.timer.stop(),w.on.call("cancel",t,t.__data__,w.index,w.group),delete l[y])}if(jh(function(){i.state===al&&(i.state=Hh,i.timer.restart(h,i.delay,i.time),h(g))}),i.state=ac,i.on.call("start",t,t.__data__,i.index,i.group),i.state===ac){for(i.state=al,u=new Array(m=i.tween.length),y=0,v=-1;y<m;++y)(w=i.tween[y].value.call(t,t.__data__,i.index,i.group))&&(u[++v]=w);u.length=v+1}}function h(g){for(var y=g<i.duration?i.ease.call(null,g/i.duration):(i.timer.restart(p),i.state=cc,1),v=-1,m=u.length;++v<m;)u[v].call(t,y);i.state===cc&&(i.on.call("end",t,t.__data__,i.index,i.group),p())}function p(){i.state=cl,i.timer.stop(),delete l[r];for(var g in l)return;delete t.__transition}}function fl(t,r){var i=t.__transition,l,u,a=!0,f;if(i){r=r==null?null:r+"";for(f in i){if((l=i[f]).name!==r){a=!1;continue}u=l.state>ac&&l.state<cc,l.state=cl,l.timer.stop(),l.on.call(u?"interrupt":"cancel",t,t.__data__,l.index,l.group),delete i[f]}a&&delete t.__transition}}function qx(t){return this.each(function(){fl(this,t)})}function Zx(t,r){var i,l;return function(){var u=rn(this,t),a=u.tween;if(a!==i){l=i=a;for(var f=0,h=l.length;f<h;++f)if(l[f].name===r){l=l.slice(),l.splice(f,1);break}}u.tween=l}}function Jx(t,r,i){var l,u;if(typeof i!="function")throw new Error;return function(){var a=rn(this,t),f=a.tween;if(f!==l){u=(l=f).slice();for(var h={name:r,value:i},p=0,g=u.length;p<g;++p)if(u[p].name===r){u[p]=h;break}p===g&&u.push(h)}a.tween=u}}function e1(t,r){var i=this._id;if(t+="",arguments.length<2){for(var l=Wt(this.node(),i).tween,u=0,a=l.length,f;u<a;++u)if((f=l[u]).name===t)return f.value;return null}return this.each((r==null?Zx:Jx)(i,t,r))}function Pc(t,r,i){var l=t._id;return t.each(function(){var u=rn(this,l);(u.value||(u.value={}))[r]=i.apply(this,arguments)}),function(u){return Wt(u,l).value[r]}}function v0(t,r){var i;return(typeof r=="number"?en:r instanceof _r?ml:(i=_r(r))?(r=i,ml):c0)(t,r)}function t1(t){return function(){this.removeAttribute(t)}}function n1(t){return function(){this.removeAttributeNS(t.space,t.local)}}function r1(t,r,i){var l,u=i+"",a;return function(){var f=this.getAttribute(t);return f===u?null:f===l?a:a=r(l=f,i)}}function o1(t,r,i){var l,u=i+"",a;return function(){var f=this.getAttributeNS(t.space,t.local);return f===u?null:f===l?a:a=r(l=f,i)}}function i1(t,r,i){var l,u,a;return function(){var f,h=i(this),p;return h==null?void this.removeAttribute(t):(f=this.getAttribute(t),p=h+"",f===p?null:f===l&&p===u?a:(u=p,a=r(l=f,h)))}}function s1(t,r,i){var l,u,a;return function(){var f,h=i(this),p;return h==null?void this.removeAttributeNS(t.space,t.local):(f=this.getAttributeNS(t.space,t.local),p=h+"",f===p?null:f===l&&p===u?a:(u=p,a=r(l=f,h)))}}function l1(t,r){var i=Ml(t),l=i==="transform"?Hx:v0;return this.attrTween(t,typeof r=="function"?(i.local?s1:i1)(i,l,Pc(this,"attr."+t,r)):r==null?(i.local?n1:t1)(i):(i.local?o1:r1)(i,l,r))}function u1(t,r){return function(i){this.setAttribute(t,r.call(this,i))}}function a1(t,r){return function(i){this.setAttributeNS(t.space,t.local,r.call(this,i))}}function c1(t,r){var i,l;function u(){var a=r.apply(this,arguments);return a!==l&&(i=(l=a)&&a1(t,a)),i}return u._value=r,u}function f1(t,r){var i,l;function u(){var a=r.apply(this,arguments);return a!==l&&(i=(l=a)&&u1(t,a)),i}return u._value=r,u}function d1(t,r){var i="attr."+t;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(r==null)return this.tween(i,null);if(typeof r!="function")throw new Error;var l=Ml(t);return this.tween(i,(l.local?c1:f1)(l,r))}function h1(t,r){return function(){Mc(this,t).delay=+r.apply(this,arguments)}}function p1(t,r){return r=+r,function(){Mc(this,t).delay=r}}function g1(t){var r=this._id;return arguments.length?this.each((typeof t=="function"?h1:p1)(r,t)):Wt(this.node(),r).delay}function m1(t,r){return function(){rn(this,t).duration=+r.apply(this,arguments)}}function y1(t,r){return r=+r,function(){rn(this,t).duration=r}}function v1(t){var r=this._id;return arguments.length?this.each((typeof t=="function"?m1:y1)(r,t)):Wt(this.node(),r).duration}function x1(t,r){if(typeof r!="function")throw new Error;return function(){rn(this,t).ease=r}}function w1(t){var r=this._id;return arguments.length?this.each(x1(r,t)):Wt(this.node(),r).ease}function S1(t,r){return function(){var i=r.apply(this,arguments);if(typeof i!="function")throw new Error;rn(this,t).ease=i}}function _1(t){if(typeof t!="function")throw new Error;return this.each(S1(this._id,t))}function E1(t){typeof t!="function"&&(t=Hp(t));for(var r=this._groups,i=r.length,l=new Array(i),u=0;u<i;++u)for(var a=r[u],f=a.length,h=l[u]=[],p,g=0;g<f;++g)(p=a[g])&&t.call(p,p.__data__,g,a)&&h.push(p);return new xn(l,this._parents,this._name,this._id)}function k1(t){if(t._id!==this._id)throw new Error;for(var r=this._groups,i=t._groups,l=r.length,u=i.length,a=Math.min(l,u),f=new Array(l),h=0;h<a;++h)for(var p=r[h],g=i[h],y=p.length,v=f[h]=new Array(y),m,w=0;w<y;++w)(m=p[w]||g[w])&&(v[w]=m);for(;h<l;++h)f[h]=r[h];return new xn(f,this._parents,this._name,this._id)}function N1(t){return(t+"").trim().split(/^|\s+/).every(function(r){var i=r.indexOf(".");return i>=0&&(r=r.slice(0,i)),!r||r==="start"})}function C1(t,r,i){var l,u,a=N1(r)?Mc:rn;return function(){var f=a(this,t),h=f.on;h!==l&&(u=(l=h).copy()).on(r,i),f.on=u}}function M1(t,r){var i=this._id;return arguments.length<2?Wt(this.node(),i).on.on(t):this.each(C1(i,t,r))}function P1(t){return function(){var r=this.parentNode;for(var i in this.__transition)if(+i!==t)return;r&&r.removeChild(this)}}function z1(){return this.on("end.remove",P1(this._id))}function I1(t){var r=this._name,i=this._id;typeof t!="function"&&(t=yc(t));for(var l=this._groups,u=l.length,a=new Array(u),f=0;f<u;++f)for(var h=l[f],p=h.length,g=a[f]=new Array(p),y,v,m=0;m<p;++m)(y=h[m])&&(v=t.call(y,y.__data__,m,h))&&("__data__"in y&&(v.__data__=y.__data__),g[m]=v,Tl(g[m],r,i,m,g,Wt(y,i)));return new xn(a,this._parents,r,i)}function T1(t){var r=this._name,i=this._id;typeof t!="function"&&(t=Op(t));for(var l=this._groups,u=l.length,a=[],f=[],h=0;h<u;++h)for(var p=l[h],g=p.length,y,v=0;v<g;++v)if(y=p[v]){for(var m=t.call(y,y.__data__,v,p),w,S=Wt(y,i),M=0,N=m.length;M<N;++M)(w=m[M])&&Tl(w,r,i,M,m,S);a.push(m),f.push(y)}return new xn(a,f,r,i)}var L1=Ci.prototype.constructor;function $1(){return new L1(this._groups,this._parents)}function R1(t,r){var i,l,u;return function(){var a=ao(this,t),f=(this.style.removeProperty(t),ao(this,t));return a===f?null:a===i&&f===l?u:u=r(i=a,l=f)}}function x0(t){return function(){this.style.removeProperty(t)}}function A1(t,r,i){var l,u=i+"",a;return function(){var f=ao(this,t);return f===u?null:f===l?a:a=r(l=f,i)}}function D1(t,r,i){var l,u,a;return function(){var f=ao(this,t),h=i(this),p=h+"";return h==null&&(p=h=(this.style.removeProperty(t),ao(this,t))),f===p?null:f===l&&p===u?a:(u=p,a=r(l=f,h))}}function j1(t,r){var i,l,u,a="style."+r,f="end."+a,h;return function(){var p=rn(this,t),g=p.on,y=p.value[a]==null?h||(h=x0(r)):void 0;(g!==i||u!==y)&&(l=(i=g).copy()).on(f,u=y),p.on=l}}function O1(t,r,i){var l=(t+="")=="transform"?Ox:v0;return r==null?this.styleTween(t,R1(t,l)).on("end.style."+t,x0(t)):typeof r=="function"?this.styleTween(t,D1(t,l,Pc(this,"style."+t,r))).each(j1(this._id,t)):this.styleTween(t,A1(t,l,r),i).on("end.style."+t,null)}function H1(t,r,i){return function(l){this.style.setProperty(t,r.call(this,l),i)}}function F1(t,r,i){var l,u;function a(){var f=r.apply(this,arguments);return f!==u&&(l=(u=f)&&H1(t,f,i)),l}return a._value=r,a}function V1(t,r,i){var l="style."+(t+="");if(arguments.length<2)return(l=this.tween(l))&&l._value;if(r==null)return this.tween(l,null);if(typeof r!="function")throw new Error;return this.tween(l,F1(t,r,i??""))}function B1(t){return function(){this.textContent=t}}function b1(t){return function(){var r=t(this);this.textContent=r??""}}function U1(t){return this.tween("text",typeof t=="function"?b1(Pc(this,"text",t)):B1(t==null?"":t+""))}function W1(t){return function(r){this.textContent=t.call(this,r)}}function Y1(t){var r,i;function l(){var u=t.apply(this,arguments);return u!==i&&(r=(i=u)&&W1(u)),r}return l._value=t,l}function X1(t){var r="text";if(arguments.length<1)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,Y1(t))}function Q1(){for(var t=this._name,r=this._id,i=w0(),l=this._groups,u=l.length,a=0;a<u;++a)for(var f=l[a],h=f.length,p,g=0;g<h;++g)if(p=f[g]){var y=Wt(p,r);Tl(p,t,i,g,f,{time:y.time+y.delay+y.duration,delay:0,duration:y.duration,ease:y.ease})}return new xn(l,this._parents,t,i)}function G1(){var t,r,i=this,l=i._id,u=i.size();return new Promise(function(a,f){var h={value:f},p={value:function(){--u===0&&a()}};i.each(function(){var g=rn(this,l),y=g.on;y!==t&&(r=(t=y).copy(),r._.cancel.push(h),r._.interrupt.push(h),r._.end.push(p)),g.on=r}),u===0&&a()})}var K1=0;function xn(t,r,i,l){this._groups=t,this._parents=r,this._name=i,this._id=l}function w0(){return++K1}var mn=Ci.prototype;xn.prototype={constructor:xn,select:I1,selectAll:T1,selectChild:mn.selectChild,selectChildren:mn.selectChildren,filter:E1,merge:k1,selection:$1,transition:Q1,call:mn.call,nodes:mn.nodes,node:mn.node,size:mn.size,empty:mn.empty,each:mn.each,on:M1,attr:l1,attrTween:d1,style:O1,styleTween:V1,text:U1,textTween:X1,remove:z1,tween:e1,delay:g1,duration:v1,ease:w1,easeVarying:_1,end:G1,[Symbol.iterator]:mn[Symbol.iterator]};var q1={time:null,delay:0,duration:250,ease:Xx};function Z1(t,r){for(var i;!(i=t.__transition)||!(i=i[r]);)if(!(t=t.parentNode))throw new Error(`transition ${r} not found`);return i}function J1(t){var r,i;t instanceof xn?(r=t._id,t=t._name):(r=w0(),(i=q1).time=_c(),t=t==null?null:t+"");for(var l=this._groups,u=l.length,a=0;a<u;++a)for(var f=l[a],h=f.length,p,g=0;g<h;++g)(p=f[g])&&Tl(p,t,r,g,f,i||Z1(p,r));return new xn(l,this._parents,t,r)}Ci.prototype.interrupt=qx;Ci.prototype.transition=J1;var el=t=>()=>t;function ew(t,{sourceEvent:r,target:i,transform:l,dispatch:u}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:l,enumerable:!0,configurable:!0},_:{value:u}})}function vn(t,r,i){this.k=t,this.x=r,this.y=i}vn.prototype={constructor:vn,scale:function(t){return t===1?this:new vn(this.k*t,this.x,this.y)},translate:function(t,r){return t===0&r===0?this:new vn(this.k,this.x+this.k*t,this.y+this.k*r)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ll=new vn(1,0,0);S0.prototype=vn.prototype;function S0(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Ll;return t.__zoom}function Ua(t){t.stopImmediatePropagation()}function ci(t){t.preventDefault(),t.stopImmediatePropagation()}function tw(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function nw(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Fh(){return this.__zoom||Ll}function rw(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function ow(){return navigator.maxTouchPoints||"ontouchstart"in this}function iw(t,r,i){var l=t.invertX(r[0][0])-i[0][0],u=t.invertX(r[1][0])-i[1][0],a=t.invertY(r[0][1])-i[0][1],f=t.invertY(r[1][1])-i[1][1];return t.translate(u>l?(l+u)/2:Math.min(0,l)||Math.max(0,u),f>a?(a+f)/2:Math.min(0,a)||Math.max(0,f))}function _0(){var t=tw,r=nw,i=iw,l=rw,u=ow,a=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],h=250,p=ul,g=Cl("start","zoom","end"),y,v,m,w=500,S=150,M=0,N=10;function E(C){C.property("__zoom",Fh).on("wheel.zoom",Y,{passive:!1}).on("mousedown.zoom",X).on("dblclick.zoom",J).filter(u).on("touchstart.zoom",q).on("touchmove.zoom",ee).on("touchend.zoom touchcancel.zoom",Z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}E.transform=function(C,B,F,b){var R=C.selection?C.selection():C;R.property("__zoom",Fh),C!==R?H(C,B,F,b):R.interrupt().each(function(){D(this,arguments).event(b).start().zoom(null,typeof B=="function"?B.apply(this,arguments):B).end()})},E.scaleBy=function(C,B,F,b){E.scaleTo(C,function(){var R=this.__zoom.k,$=typeof B=="function"?B.apply(this,arguments):B;return R*$},F,b)},E.scaleTo=function(C,B,F,b){E.transform(C,function(){var R=r.apply(this,arguments),$=this.__zoom,O=F==null?P(R):typeof F=="function"?F.apply(this,arguments):F,k=$.invert(O),A=typeof B=="function"?B.apply(this,arguments):B;return i(_(T($,A),O,k),R,f)},F,b)},E.translateBy=function(C,B,F,b){E.transform(C,function(){return i(this.__zoom.translate(typeof B=="function"?B.apply(this,arguments):B,typeof F=="function"?F.apply(this,arguments):F),r.apply(this,arguments),f)},null,b)},E.translateTo=function(C,B,F,b,R){E.transform(C,function(){var $=r.apply(this,arguments),O=this.__zoom,k=b==null?P($):typeof b=="function"?b.apply(this,arguments):b;return i(Ll.translate(k[0],k[1]).scale(O.k).translate(typeof B=="function"?-B.apply(this,arguments):-B,typeof F=="function"?-F.apply(this,arguments):-F),$,f)},b,R)};function T(C,B){return B=Math.max(a[0],Math.min(a[1],B)),B===C.k?C:new vn(B,C.x,C.y)}function _(C,B,F){var b=B[0]-F[0]*C.k,R=B[1]-F[1]*C.k;return b===C.x&&R===C.y?C:new vn(C.k,b,R)}function P(C){return[(+C[0][0]+ +C[1][0])/2,(+C[0][1]+ +C[1][1])/2]}function H(C,B,F,b){C.on("start.zoom",function(){D(this,arguments).event(b).start()}).on("interrupt.zoom end.zoom",function(){D(this,arguments).event(b).end()}).tween("zoom",function(){var R=this,$=arguments,O=D(R,$).event(b),k=r.apply(R,$),A=F==null?P(k):typeof F=="function"?F.apply(R,$):F,oe=Math.max(k[1][0]-k[0][0],k[1][1]-k[0][1]),ne=R.__zoom,ue=typeof B=="function"?B.apply(R,$):B,ce=p(ne.invert(A).concat(oe/ne.k),ue.invert(A).concat(oe/ue.k));return function(ae){if(ae===1)ae=ue;else{var Q=ce(ae),ie=oe/Q[2];ae=new vn(ie,A[0]-Q[0]*ie,A[1]-Q[1]*ie)}O.zoom(null,ae)}})}function D(C,B,F){return!F&&C.__zooming||new V(C,B)}function V(C,B){this.that=C,this.args=B,this.active=0,this.sourceEvent=null,this.extent=r.apply(C,B),this.taps=0}V.prototype={event:function(C){return C&&(this.sourceEvent=C),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(C,B){return this.mouse&&C!=="mouse"&&(this.mouse[1]=B.invert(this.mouse[0])),this.touch0&&C!=="touch"&&(this.touch0[1]=B.invert(this.touch0[0])),this.touch1&&C!=="touch"&&(this.touch1[1]=B.invert(this.touch1[0])),this.that.__zoom=B,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(C){var B=kt(this.that).datum();g.call(C,this.that,new ew(C,{sourceEvent:this.sourceEvent,target:E,transform:this.that.__zoom,dispatch:g}),B)}};function Y(C,...B){if(!t.apply(this,arguments))return;var F=D(this,B).event(C),b=this.__zoom,R=Math.max(a[0],Math.min(a[1],b.k*Math.pow(2,l.apply(this,arguments)))),$=Ft(C);if(F.wheel)(F.mouse[0][0]!==$[0]||F.mouse[0][1]!==$[1])&&(F.mouse[1]=b.invert(F.mouse[0]=$)),clearTimeout(F.wheel);else{if(b.k===R)return;F.mouse=[$,b.invert($)],fl(this),F.start()}ci(C),F.wheel=setTimeout(O,S),F.zoom("mouse",i(_(T(b,R),F.mouse[0],F.mouse[1]),F.extent,f));function O(){F.wheel=null,F.end()}}function X(C,...B){if(m||!t.apply(this,arguments))return;var F=C.currentTarget,b=D(this,B,!0).event(C),R=kt(C.view).on("mousemove.zoom",A,!0).on("mouseup.zoom",oe,!0),$=Ft(C,F),O=C.clientX,k=C.clientY;Gp(C.view),Ua(C),b.mouse=[$,this.__zoom.invert($)],fl(this),b.start();function A(ne){if(ci(ne),!b.moved){var ue=ne.clientX-O,ce=ne.clientY-k;b.moved=ue*ue+ce*ce>M}b.event(ne).zoom("mouse",i(_(b.that.__zoom,b.mouse[0]=Ft(ne,F),b.mouse[1]),b.extent,f))}function oe(ne){R.on("mousemove.zoom mouseup.zoom",null),Kp(ne.view,b.moved),ci(ne),b.event(ne).end()}}function J(C,...B){if(t.apply(this,arguments)){var F=this.__zoom,b=Ft(C.changedTouches?C.changedTouches[0]:C,this),R=F.invert(b),$=F.k*(C.shiftKey?.5:2),O=i(_(T(F,$),b,R),r.apply(this,B),f);ci(C),h>0?kt(this).transition().duration(h).call(H,O,b,C):kt(this).call(E.transform,O,b,C)}}function q(C,...B){if(t.apply(this,arguments)){var F=C.touches,b=F.length,R=D(this,B,C.changedTouches.length===b).event(C),$,O,k,A;for(Ua(C),O=0;O<b;++O)k=F[O],A=Ft(k,this),A=[A,this.__zoom.invert(A),k.identifier],R.touch0?!R.touch1&&R.touch0[2]!==A[2]&&(R.touch1=A,R.taps=0):(R.touch0=A,$=!0,R.taps=1+!!y);y&&(y=clearTimeout(y)),$&&(R.taps<2&&(v=A[0],y=setTimeout(function(){y=null},w)),fl(this),R.start())}}function ee(C,...B){if(this.__zooming){var F=D(this,B).event(C),b=C.changedTouches,R=b.length,$,O,k,A;for(ci(C),$=0;$<R;++$)O=b[$],k=Ft(O,this),F.touch0&&F.touch0[2]===O.identifier?F.touch0[0]=k:F.touch1&&F.touch1[2]===O.identifier&&(F.touch1[0]=k);if(O=F.that.__zoom,F.touch1){var oe=F.touch0[0],ne=F.touch0[1],ue=F.touch1[0],ce=F.touch1[1],ae=(ae=ue[0]-oe[0])*ae+(ae=ue[1]-oe[1])*ae,Q=(Q=ce[0]-ne[0])*Q+(Q=ce[1]-ne[1])*Q;O=T(O,Math.sqrt(ae/Q)),k=[(oe[0]+ue[0])/2,(oe[1]+ue[1])/2],A=[(ne[0]+ce[0])/2,(ne[1]+ce[1])/2]}else if(F.touch0)k=F.touch0[0],A=F.touch0[1];else return;F.zoom("touch",i(_(O,k,A),F.extent,f))}}function Z(C,...B){if(this.__zooming){var F=D(this,B).event(C),b=C.changedTouches,R=b.length,$,O;for(Ua(C),m&&clearTimeout(m),m=setTimeout(function(){m=null},w),$=0;$<R;++$)O=b[$],F.touch0&&F.touch0[2]===O.identifier?delete F.touch0:F.touch1&&F.touch1[2]===O.identifier&&delete F.touch1;if(F.touch1&&!F.touch0&&(F.touch0=F.touch1,delete F.touch1),F.touch0)F.touch0[1]=this.__zoom.invert(F.touch0[0]);else if(F.end(),F.taps===2&&(O=Ft(O,this),Math.hypot(v[0]-O[0],v[1]-O[1])<N)){var k=kt(this).on("dblclick.zoom");k&&k.apply(this,arguments)}}}return E.wheelDelta=function(C){return arguments.length?(l=typeof C=="function"?C:el(+C),E):l},E.filter=function(C){return arguments.length?(t=typeof C=="function"?C:el(!!C),E):t},E.touchable=function(C){return arguments.length?(u=typeof C=="function"?C:el(!!C),E):u},E.extent=function(C){return arguments.length?(r=typeof C=="function"?C:el([[+C[0][0],+C[0][1]],[+C[1][0],+C[1][1]]]),E):r},E.scaleExtent=function(C){return arguments.length?(a[0]=+C[0],a[1]=+C[1],E):[a[0],a[1]]},E.translateExtent=function(C){return arguments.length?(f[0][0]=+C[0][0],f[1][0]=+C[1][0],f[0][1]=+C[0][1],f[1][1]=+C[1][1],E):[[f[0][0],f[0][1]],[f[1][0],f[1][1]]]},E.constrain=function(C){return arguments.length?(i=C,E):i},E.duration=function(C){return arguments.length?(h=+C,E):h},E.interpolate=function(C){return arguments.length?(p=C,E):p},E.on=function(){var C=g.on.apply(g,arguments);return C===g?E:C},E.clickDistance=function(C){return arguments.length?(M=(C=+C)*C,E):Math.sqrt(M)},E.tapDistance=function(C){return arguments.length?(N=+C,E):N},E}const Ut={error001:(t="react")=>`Seems like you have not used ${t==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${t}flow.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:t=>`Node type "${t}" not found. Using fallback type "default".`,error004:()=>"The 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:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,{id:r,sourceHandle:i,targetHandle:l})=>`Couldn't create edge for ${t} handle id: "${t==="source"?i:l}", edge id: ${r}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(t="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${t}/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.",error016:t=>`Edge with id "${t}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},wi=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],E0=["Enter"," ","Escape"],k0={"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:t,x:r,y:i})=>`Moved selected node ${t}. New position, x: ${r}, y: ${i}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var po;(function(t){t.Strict="strict",t.Loose="loose"})(po||(po={}));var wr;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(wr||(wr={}));var Si;(function(t){t.Partial="partial",t.Full="full"})(Si||(Si={}));const N0={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Wn;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(Wn||(Wn={}));var Sl;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(Sl||(Sl={}));var we;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(we||(we={}));const Vh={[we.Left]:we.Right,[we.Right]:we.Left,[we.Top]:we.Bottom,[we.Bottom]:we.Top},C0=t=>!!t&&typeof t=="object"&&"id"in t&&"source"in t&&"target"in t,sw=t=>!!t&&typeof t=="object"&&"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),zc=t=>!!t&&typeof t=="object"&&"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),Pi=(t,r=[0,0])=>{const{width:i,height:l}=Yt(t),u=t.origin??r,a=i*u[0],f=l*u[1];return{x:t.position.x-a,y:t.position.y-f}},lw=(t,r={nodeOrigin:[0,0]})=>{if(t.length===0)return{x:0,y:0,width:0,height:0};let i=!1;const l=t.reduce((u,a)=>{const f=typeof a=="string";let h=!r.nodeLookup&&!f?a:void 0;return r.nodeLookup&&(h=f?r.nodeLookup.get(a):zc(a)?a:r.nodeLookup.get(a.id)),h?(i=!0,$l(u,_l(h,r.nodeOrigin))):u},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return i?Rl(l):{x:0,y:0,width:0,height:0}},zi=(t,r={})=>{let i={x:1/0,y:1/0,x2:-1/0,y2:-1/0},l=!1;return t.forEach(u=>{(r.filter===void 0||r.filter(u))&&(i=$l(i,_l(u)),l=!0)}),l?Rl(i):{x:0,y:0,width:0,height:0}},Ic=(t,r,[i,l,u]=[0,0,1],a=!1,f=!1)=>{const h=(r.x-i)/u,p=(r.y-l)/u,g=r.width/u,y=r.height/u,v=[];for(const m of t.values()){const{measured:w,selectable:S=!0,hidden:M=!1}=m;if(f&&!S||M)continue;const N=w.width??m.width??m.initialWidth??0,E=w.height??m.height??m.initialHeight??0,{x:T,y:_}=m.internals.positionAbsolute,P=I0(h,p,g,y,T,_,N,E),H=N*E,D=a&&P>0;(!m.internals.handleBounds||D||P>=H||m.dragging)&&v.push(m)}return v},uw=(t,r)=>{const i=new Set;return t.forEach(l=>{i.add(l.id)}),r.filter(l=>i.has(l.source)||i.has(l.target))};function aw(t,r){const i=new Map,l=r!=null&&r.nodes?new Set(r.nodes.map(u=>u.id)):null;return t.forEach(u=>{let a;if(r!=null&&r.includeHiddenNodes){const{width:f,height:h}=Yt(u);a=f>0&&h>0}else a=!!(u.measured.width&&u.measured.height&&!u.hidden);a&&(!l||l.has(u.id))&&i.set(u.id,u)}),i}async function cw({nodes:t,width:r,height:i,panZoom:l,minZoom:u,maxZoom:a},f){if(t.size===0)return!0;const h=aw(t,f),p=zi(h),g=Lc(p,r,i,(f==null?void 0:f.minZoom)??u,(f==null?void 0:f.maxZoom)??a,(f==null?void 0:f.padding)??.1);return await l.setViewport(g,{duration:f==null?void 0:f.duration,ease:f==null?void 0:f.ease,interpolate:f==null?void 0:f.interpolate}),!0}function M0({nodeId:t,nextPosition:r,nodeLookup:i,nodeOrigin:l=[0,0],nodeExtent:u,onError:a}){const f=i.get(t),h=f.parentId?i.get(f.parentId):void 0,{x:p,y:g}=h?h.internals.positionAbsolute:{x:0,y:0},y=f.origin??l;let v=f.extent||u;if(f.extent==="parent"&&!f.expandParent)if(!h)a==null||a("005",Ut.error005());else{const{width:w,height:S}=Yt(h);w&&S&&(v=[[p,g],[p+w,g+S]])}else h&&Nr(f.extent)&&(v=[[f.extent[0][0]+p,f.extent[0][1]+g],[f.extent[1][0]+p,f.extent[1][1]+g]]);const m=Nr(v)?kr(r,v,f.measured):r;return(f.measured.width===void 0||f.measured.height===void 0)&&(a==null||a("015",Ut.error015())),{position:{x:m.x-p+(f.measured.width??0)*y[0],y:m.y-g+(f.measured.height??0)*y[1]},positionAbsolute:m}}async function fw({nodesToRemove:t=[],edgesToRemove:r=[],nodes:i,edges:l,onBeforeDelete:u}){const a=new Set(t.map(m=>m.id)),f=[];for(const m of i){if(m.deletable===!1)continue;const w=a.has(m.id),S=!w&&m.parentId&&f.find(M=>M.id===m.parentId);(w||S)&&f.push(m)}const h=new Set(r.map(m=>m.id)),p=l.filter(m=>m.deletable!==!1),y=uw(f,p);for(const m of p)h.has(m.id)&&!y.find(S=>S.id===m.id)&&y.push(m);if(!u)return{edges:y,nodes:f};const v=await u({nodes:f,edges:y});return typeof v=="boolean"?v?{edges:y,nodes:f}:{edges:[],nodes:[]}:v}const go=(t,r=0,i=1)=>Math.min(Math.max(t,r),i),kr=(t={x:0,y:0},r,i)=>({x:go(t.x,r[0][0],r[1][0]-((i==null?void 0:i.width)??0)),y:go(t.y,r[0][1],r[1][1]-((i==null?void 0:i.height)??0))});function P0(t,r,i){const{width:l,height:u}=Yt(i),{x:a,y:f}=i.internals.positionAbsolute;return kr(t,[[a,f],[a+l,f+u]],r)}const Bh=(t,r,i)=>t<r?go(Math.abs(t-r),1,r)/r:t>i?-go(Math.abs(t-i),1,r)/r:0,Tc=(t,r,i=15,l=40)=>{const u=Bh(t.x,l,r.width-l)*i,a=Bh(t.y,l,r.height-l)*i;return[u,a]},$l=(t,r)=>({x:Math.min(t.x,r.x),y:Math.min(t.y,r.y),x2:Math.max(t.x2,r.x2),y2:Math.max(t.y2,r.y2)}),fc=({x:t,y:r,width:i,height:l})=>({x:t,y:r,x2:t+i,y2:r+l}),Rl=({x:t,y:r,x2:i,y2:l})=>({x:t,y:r,width:i-t,height:l-r}),_i=(t,r=[0,0])=>{var u,a;const{x:i,y:l}=zc(t)?t.internals.positionAbsolute:Pi(t,r);return{x:i,y:l,width:((u=t.measured)==null?void 0:u.width)??t.width??t.initialWidth??0,height:((a=t.measured)==null?void 0:a.height)??t.height??t.initialHeight??0}},_l=(t,r=[0,0])=>{var u,a;const{x:i,y:l}=zc(t)?t.internals.positionAbsolute:Pi(t,r);return{x:i,y:l,x2:i+(((u=t.measured)==null?void 0:u.width)??t.width??t.initialWidth??0),y2:l+(((a=t.measured)==null?void 0:a.height)??t.height??t.initialHeight??0)}},z0=(t,r)=>Rl($l(fc(t),fc(r))),I0=(t,r,i,l,u,a,f,h)=>{const p=Math.max(0,Math.min(t+i,u+f)-Math.max(t,u)),g=Math.max(0,Math.min(r+l,a+h)-Math.max(r,a));return Math.ceil(p*g)},El=(t,r)=>I0(t.x,t.y,t.width,t.height,r.x,r.y,r.width,r.height),bh=t=>Bt(t.width)&&Bt(t.height)&&Bt(t.x)&&Bt(t.y),Bt=t=>!isNaN(t)&&isFinite(t),T0=(t,r)=>(i,l)=>{},Ii=(t,r=[1,1])=>({x:r[0]*Math.round(t.x/r[0]),y:r[1]*Math.round(t.y/r[1])}),Ti=({x:t,y:r},[i,l,u],a=!1,f=[1,1])=>{const h={x:(t-i)/u,y:(r-l)/u};return a?Ii(h,f):h},mo=({x:t,y:r},[i,l,u])=>({x:t*u+i,y:r*u+l});function ro(t,r){if(typeof t=="number")return Math.floor((r-r/(1+t))*.5);if(typeof t=="string"&&t.endsWith("px")){const i=parseFloat(t);if(!Number.isNaN(i))return Math.floor(i)}if(typeof t=="string"&&t.endsWith("%")){const i=parseFloat(t);if(!Number.isNaN(i))return Math.floor(r*i*.01)}return console.error(`The padding value "${t}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function dw(t,r,i){if(typeof t=="string"||typeof t=="number"){const l=ro(t,i),u=ro(t,r);return{top:l,right:u,bottom:l,left:u,x:u*2,y:l*2}}if(typeof t=="object"){const l=ro(t.top??t.y??0,i),u=ro(t.bottom??t.y??0,i),a=ro(t.left??t.x??0,r),f=ro(t.right??t.x??0,r);return{top:l,right:f,bottom:u,left:a,x:a+f,y:l+u}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function hw(t,r,i,l,u,a){const{x:f,y:h}=mo(t,[r,i,l]),{x:p,y:g}=mo({x:t.x+t.width,y:t.y+t.height},[r,i,l]),y=u-p,v=a-g;return{left:Math.floor(f),top:Math.floor(h),right:Math.floor(y),bottom:Math.floor(v)}}const Lc=(t,r,i,l,u,a)=>{const f=dw(a,r,i),h=(r-f.x)/t.width,p=(i-f.y)/t.height,g=Math.min(h,p),y=go(g,l,u),v=t.x+t.width/2,m=t.y+t.height/2,w=r/2-v*y,S=i/2-m*y,M=hw(t,w,S,y,r,i),N={left:Math.min(M.left-f.left,0),top:Math.min(M.top-f.top,0),right:Math.min(M.right-f.right,0),bottom:Math.min(M.bottom-f.bottom,0)};return{x:w-N.left+N.right,y:S-N.top+N.bottom,zoom:y}},Ei=()=>{var t;return typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)==null?void 0:t.indexOf("Mac"))>=0};function Nr(t){return t!=null&&t!=="parent"}function Yt(t){var r,i;return{width:((r=t.measured)==null?void 0:r.width)??t.width??t.initialWidth??0,height:((i=t.measured)==null?void 0:i.height)??t.height??t.initialHeight??0}}function L0(t){var r,i;return(((r=t.measured)==null?void 0:r.width)??t.width??t.initialWidth)!==void 0&&(((i=t.measured)==null?void 0:i.height)??t.height??t.initialHeight)!==void 0}function $0(t,r={width:0,height:0},i,l,u){const a={...t},f=l.get(i);if(f){const h=f.origin||u;a.x+=f.internals.positionAbsolute.x-(r.width??0)*h[0],a.y+=f.internals.positionAbsolute.y-(r.height??0)*h[1]}return a}function Uh(t,r){if(t.size!==r.size)return!1;for(const i of t)if(!r.has(i))return!1;return!0}function pw(){let t,r;return{promise:new Promise((l,u)=>{t=l,r=u}),resolve:t,reject:r}}function gw(t){return{...k0,...t||{}}}function R0(t){return t===null?null:t?"valid":"invalid"}function gi(t,{snapGrid:r=[0,0],snapToGrid:i=!1,transform:l,containerBounds:u}){const{x:a,y:f}=bt(t),h=Ti({x:a-((u==null?void 0:u.left)??0),y:f-((u==null?void 0:u.top)??0)},l),{x:p,y:g}=i?Ii(h,r):h;return{xSnapped:p,ySnapped:g,...h}}const $c=t=>({width:t.offsetWidth,height:t.offsetHeight}),A0=t=>{var r;return((r=t==null?void 0:t.getRootNode)==null?void 0:r.call(t))||(window==null?void 0:window.document)},mw=["INPUT","SELECT","TEXTAREA"];function D0(t){var l,u;const r=((u=(l=t.composedPath)==null?void 0:l.call(t))==null?void 0:u[0])||t.target;return(r==null?void 0:r.nodeType)!==1?!1:mw.includes(r.nodeName)||r.hasAttribute("contenteditable")||!!r.closest(".nokey")}const j0=t=>"clientX"in t,bt=(t,r)=>{var a,f;const i=j0(t),l=i?t.clientX:(a=t.touches)==null?void 0:a[0].clientX,u=i?t.clientY:(f=t.touches)==null?void 0:f[0].clientY;return{x:l-((r==null?void 0:r.left)??0),y:u-((r==null?void 0:r.top)??0)}},Wh=(t,r,i,l,u)=>{const a=r.querySelectorAll(`.${t}`);return!a||!a.length?null:Array.from(a).map(f=>{const h=f.getBoundingClientRect();return{id:f.getAttribute("data-handleid"),type:t,nodeId:u,position:f.getAttribute("data-handlepos"),x:(h.left-i.left)/l,y:(h.top-i.top)/l,...$c(f)}})};function O0({sourceX:t,sourceY:r,targetX:i,targetY:l,sourceControlX:u,sourceControlY:a,targetControlX:f,targetControlY:h}){const p=t*.125+u*.375+f*.375+i*.125,g=r*.125+a*.375+h*.375+l*.125,y=Math.abs(p-t),v=Math.abs(g-r);return[p,g,y,v]}function tl(t,r){return t>=0?.5*t:r*25*Math.sqrt(-t)}function Yh({pos:t,x1:r,y1:i,x2:l,y2:u,c:a}){switch(t){case we.Left:return[r-tl(r-l,a),i];case we.Right:return[r+tl(l-r,a),i];case we.Top:return[r,i-tl(i-u,a)];case we.Bottom:return[r,i+tl(u-i,a)]}}function H0({sourceX:t,sourceY:r,sourcePosition:i=we.Bottom,targetX:l,targetY:u,targetPosition:a=we.Top,curvature:f=.25}){const[h,p]=Yh({pos:i,x1:t,y1:r,x2:l,y2:u,c:f}),[g,y]=Yh({pos:a,x1:l,y1:u,x2:t,y2:r,c:f}),[v,m,w,S]=O0({sourceX:t,sourceY:r,targetX:l,targetY:u,sourceControlX:h,sourceControlY:p,targetControlX:g,targetControlY:y});return[`M${t},${r} C${h},${p} ${g},${y} ${l},${u}`,v,m,w,S]}function F0({sourceX:t,sourceY:r,targetX:i,targetY:l}){const u=Math.abs(i-t)/2,a=i<t?i+u:i-u,f=Math.abs(l-r)/2,h=l<r?l+f:l-f;return[a,h,u,f]}function yw({sourceNode:t,targetNode:r,selected:i=!1,zIndex:l=0,elevateOnSelect:u=!1,zIndexMode:a="basic"}){if(a==="manual")return l;const f=u&&i?l+1e3:l,h=Math.max(t.parentId||u&&t.selected?t.internals.z:0,r.parentId||u&&r.selected?r.internals.z:0);return f+h}function vw({sourceNode:t,targetNode:r,width:i,height:l,transform:u}){const a=$l(_l(t),_l(r));a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);const f={x:-u[0]/u[2],y:-u[1]/u[2],width:i/u[2],height:l/u[2]};return El(f,Rl(a))>0}const xw=({source:t,sourceHandle:r,target:i,targetHandle:l})=>`xy-edge__${t}${r||""}-${i}${l||""}`,ww=(t,r)=>r.some(i=>i.source===t.source&&i.target===t.target&&(i.sourceHandle===t.sourceHandle||!i.sourceHandle&&!t.sourceHandle)&&(i.targetHandle===t.targetHandle||!i.targetHandle&&!t.targetHandle)),Sw=(t,r,i={})=>{var a;if(!t.source||!t.target)return(a=i.onError)==null||a.call(i,"006",Ut.error006()),r;const l=i.getEdgeId||xw;let u;return C0(t)?u={...t}:u={...t,id:l(t)},ww(u,r)?r:(u.sourceHandle===null&&delete u.sourceHandle,u.targetHandle===null&&delete u.targetHandle,r.concat(u))};function V0({sourceX:t,sourceY:r,targetX:i,targetY:l}){const[u,a,f,h]=F0({sourceX:t,sourceY:r,targetX:i,targetY:l});return[`M ${t},${r}L ${i},${l}`,u,a,f,h]}const Xh={[we.Left]:{x:-1,y:0},[we.Right]:{x:1,y:0},[we.Top]:{x:0,y:-1},[we.Bottom]:{x:0,y:1}},_w=({source:t,sourcePosition:r=we.Bottom,target:i})=>r===we.Left||r===we.Right?t.x<i.x?{x:1,y:0}:{x:-1,y:0}:t.y<i.y?{x:0,y:1}:{x:0,y:-1},Qh=(t,r)=>Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2)),Ew=(t,r,i)=>t.x===r.x&&r.x===i.x&&(r.y-t.y)*(i.y-r.y)>=0||t.y===r.y&&r.y===i.y&&(r.x-t.x)*(i.x-r.x)>=0;function kw({source:t,sourcePosition:r=we.Bottom,target:i,targetPosition:l=we.Top,center:u,offset:a,stepPosition:f}){const h=Xh[r],p=Xh[l],g={x:t.x+h.x*a,y:t.y+h.y*a},y={x:i.x+p.x*a,y:i.y+p.y*a},v=_w({source:g,sourcePosition:r,target:y}),m=v.x!==0?"x":"y",w=v[m];let S=[],M,N;const E={x:0,y:0},T={x:0,y:0},[,,_,P]=F0({sourceX:t.x,sourceY:t.y,targetX:i.x,targetY:i.y});if(h[m]*p[m]===-1){m==="x"?(M=u.x??g.x+(y.x-g.x)*f,N=u.y??(g.y+y.y)/2):(M=u.x??(g.x+y.x)/2,N=u.y??g.y+(y.y-g.y)*f);const Y=[{x:M,y:g.y},{x:M,y:y.y}],X=[{x:g.x,y:N},{x:y.x,y:N}];h[m]===w?S=m==="x"?Y:X:S=m==="x"?X:Y}else{const Y=[{x:g.x,y:y.y}],X=[{x:y.x,y:g.y}];if(m==="x"?S=h.x===w?X:Y:S=h.y===w?Y:X,r===l){const C=Math.abs(t[m]-i[m]);if(C<=a){const B=Math.min(a-1,a-C);h[m]===w?E[m]=(g[m]>t[m]?-1:1)*B:T[m]=(y[m]>i[m]?-1:1)*B}}if(r!==l){const C=m==="x"?"y":"x",B=h[m]===p[C],F=g[C]>y[C],b=g[C]<y[C];(h[m]===1&&(!B&&F||B&&b)||h[m]!==1&&(!B&&b||B&&F))&&(S=m==="x"?Y:X)}const J={x:g.x+E.x,y:g.y+E.y},q={x:y.x+T.x,y:y.y+T.y},ee=Math.max(Math.abs(J.x-S[0].x),Math.abs(q.x-S[0].x)),Z=Math.max(Math.abs(J.y-S[0].y),Math.abs(q.y-S[0].y));ee>=Z?(M=(J.x+q.x)/2,N=S[0].y):(M=S[0].x,N=(J.y+q.y)/2)}const H={x:g.x+E.x,y:g.y+E.y},D={x:y.x+T.x,y:y.y+T.y},V=[];for(const Y of[t,H,...S,D,i]){const[X,J]=V.slice(-2);J&&Ew(X,J,Y)&&V.pop(),V.push(Y)}return[V,M,N,_,P]}function Nw(t,r,i,l){const u=Math.min(Qh(t,r)/2,Qh(r,i)/2,l),{x:a,y:f}=r;if(t.x===a&&a===i.x||t.y===f&&f===i.y)return`L${a} ${f}`;if(t.y===f){const g=t.x<i.x?-1:1,y=t.y<i.y?1:-1;return`L ${a+u*g},${f}Q ${a},${f} ${a},${f+u*y}`}const h=t.x<i.x?1:-1,p=t.y<i.y?-1:1;return`L ${a},${f+u*p}Q ${a},${f} ${a+u*h},${f}`}function dc({sourceX:t,sourceY:r,sourcePosition:i=we.Bottom,targetX:l,targetY:u,targetPosition:a=we.Top,borderRadius:f=5,centerX:h,centerY:p,offset:g=20,stepPosition:y=.5}){const[v,m,w,S,M]=kw({source:{x:t,y:r},sourcePosition:i,target:{x:l,y:u},targetPosition:a,center:{x:h,y:p},offset:g,stepPosition:y});let N=`M${v[0].x} ${v[0].y}`;for(let E=1;E<v.length-1;E++)N+=Nw(v[E-1],v[E],v[E+1],f);return N+=`L${v[v.length-1].x} ${v[v.length-1].y}`,[N,m,w,S,M]}function Gh(t){var r;return t&&!!(t.internals.handleBounds||(r=t.handles)!=null&&r.length)&&!!(t.measured.width||t.width||t.initialWidth)}function Cw(t){var v;const{sourceNode:r,targetNode:i}=t;if(!Gh(r)||!Gh(i))return null;const l=r.internals.handleBounds||Kh(r.handles),u=i.internals.handleBounds||Kh(i.handles),a=qh((l==null?void 0:l.source)??[],t.sourceHandle),f=qh(t.connectionMode===po.Strict?(u==null?void 0:u.target)??[]:((u==null?void 0:u.target)??[]).concat((u==null?void 0:u.source)??[]),t.targetHandle);if(!a||!f)return(v=t.onError)==null||v.call(t,"008",Ut.error008(a?"target":"source",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;const h=(a==null?void 0:a.position)||we.Bottom,p=(f==null?void 0:f.position)||we.Top,g=Cr(r,a,h),y=Cr(i,f,p);return{sourceX:g.x,sourceY:g.y,targetX:y.x,targetY:y.y,sourcePosition:h,targetPosition:p}}function Kh(t){if(!t)return null;const r=[],i=[];for(const l of t)l.width=l.width??1,l.height=l.height??1,l.type==="source"?r.push(l):l.type==="target"&&i.push(l);return{source:r,target:i}}function Cr(t,r,i=we.Left,l=!1){const u=((r==null?void 0:r.x)??0)+t.internals.positionAbsolute.x,a=((r==null?void 0:r.y)??0)+t.internals.positionAbsolute.y,{width:f,height:h}=r??Yt(t);if(l)return{x:u+f/2,y:a+h/2};switch((r==null?void 0:r.position)??i){case we.Top:return{x:u+f/2,y:a};case we.Right:return{x:u+f,y:a+h/2};case we.Bottom:return{x:u+f/2,y:a+h};case we.Left:return{x:u,y:a+h/2}}}function qh(t,r){return t&&(r?t.find(i=>i.id===r):t[0])||null}function hc(t,r){return t?typeof t=="string"?t:`${r?`${r}__`:""}${Object.keys(t).sort().map(l=>`${l}=${t[l]}`).join("&")}`:""}function Mw(t,{id:r,defaultColor:i,defaultMarkerStart:l,defaultMarkerEnd:u}){const a=new Set;return t.reduce((f,h)=>([h.markerStart||l,h.markerEnd||u].forEach(p=>{if(p&&typeof p=="object"){const g=hc(p,r);a.has(g)||(f.push({id:g,color:p.color||i,...p}),a.add(g))}}),f),[]).sort((f,h)=>f.id.localeCompare(h.id))}const B0=1e3,Pw=10,Rc={nodeOrigin:[0,0],nodeExtent:wi,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},zw={...Rc,checkEquality:!0};function Ac(t,r){const i={...t};for(const l in r)r[l]!==void 0&&(i[l]=r[l]);return i}function Iw(t,r,i){const l=Ac(Rc,i);for(const u of t.values())if(u.parentId)jc(u,t,r,l);else{const a=Pi(u,l.nodeOrigin),f=Nr(u.extent)?u.extent:l.nodeExtent,h=kr(a,f,Yt(u));u.internals.positionAbsolute=h}}function Tw(t,r){if(!t.handles)return t.measured?r==null?void 0:r.internals.handleBounds:void 0;const i=[],l=[];for(const u of t.handles){const a={id:u.id,width:u.width??1,height:u.height??1,nodeId:t.id,x:u.x,y:u.y,position:u.position,type:u.type};u.type==="source"?i.push(a):u.type==="target"&&l.push(a)}return{source:i,target:l}}function Dc(t){return t==="manual"}function pc(t,r,i,l={}){var y,v;const u=Ac(zw,l),a={i:0},f=new Map(r),h=u!=null&&u.elevateNodesOnSelect&&!Dc(u.zIndexMode)?B0:0;let p=t.length>0,g=!1;r.clear(),i.clear();for(const m of t){let w=f.get(m.id);if(u.checkEquality&&m===(w==null?void 0:w.internals.userNode))r.set(m.id,w);else{const S=Pi(m,u.nodeOrigin),M=Nr(m.extent)?m.extent:u.nodeExtent,N=kr(S,M,Yt(m));w={...u.defaults,...m,measured:{width:(y=m.measured)==null?void 0:y.width,height:(v=m.measured)==null?void 0:v.height},internals:{positionAbsolute:N,handleBounds:Tw(m,w),z:b0(m,h,u.zIndexMode),userNode:m}},r.set(m.id,w)}(w.measured===void 0||w.measured.width===void 0||w.measured.height===void 0)&&!w.hidden&&(p=!1),m.parentId&&jc(w,r,i,l,a),g||(g=m.selected??!1)}return{nodesInitialized:p,hasSelectedNodes:g}}function Lw(t,r){if(!t.parentId)return;const i=r.get(t.parentId);i?i.set(t.id,t):r.set(t.parentId,new Map([[t.id,t]]))}function jc(t,r,i,l,u){const{elevateNodesOnSelect:a,nodeOrigin:f,nodeExtent:h,zIndexMode:p}=Ac(Rc,l),g=t.parentId,y=r.get(g);if(!y){console.warn(`Parent node ${g} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}Lw(t,i),u&&!y.parentId&&y.internals.rootParentIndex===void 0&&p==="auto"&&(y.internals.rootParentIndex=++u.i,y.internals.z=y.internals.z+u.i*Pw),u&&y.internals.rootParentIndex!==void 0&&(u.i=y.internals.rootParentIndex);const v=a&&!Dc(p)?B0:0,{x:m,y:w,z:S}=$w(t,y,f,h,v,p),{positionAbsolute:M}=t.internals,N=m!==M.x||w!==M.y;(N||S!==t.internals.z)&&r.set(t.id,{...t,internals:{...t.internals,positionAbsolute:N?{x:m,y:w}:M,z:S}})}function b0(t,r,i){const l=Bt(t.zIndex)?t.zIndex:0;return Dc(i)?l:l+(t.selected?r:0)}function $w(t,r,i,l,u,a){const{x:f,y:h}=r.internals.positionAbsolute,p=Yt(t),g=Pi(t,i),y=Nr(t.extent)?kr(g,t.extent,p):g;let v=kr({x:f+y.x,y:h+y.y},l,p);t.extent==="parent"&&(v=P0(v,p,r));const m=b0(t,u,a),w=r.internals.z??0;return{x:v.x,y:v.y,z:w>=m?w+1:m}}function Oc(t,r,i,l=[0,0]){var f;const u=[],a=new Map;for(const h of t){const p=r.get(h.parentId);if(!p)continue;const g=((f=a.get(h.parentId))==null?void 0:f.expandedRect)??_i(p),y=z0(g,h.rect);a.set(h.parentId,{expandedRect:y,parent:p})}return a.size>0&&a.forEach(({expandedRect:h,parent:p},g)=>{var _;const y=p.internals.positionAbsolute,v=Yt(p),m=p.origin??l,w=h.x<y.x?Math.round(Math.abs(y.x-h.x)):0,S=h.y<y.y?Math.round(Math.abs(y.y-h.y)):0,M=Math.max(v.width,Math.round(h.width)),N=Math.max(v.height,Math.round(h.height)),E=(M-v.width)*m[0],T=(N-v.height)*m[1];(w>0||S>0||E||T)&&(u.push({id:g,type:"position",position:{x:p.position.x-w+E,y:p.position.y-S+T}}),(_=i.get(g))==null||_.forEach(P=>{t.some(H=>H.id===P.id)||u.push({id:P.id,type:"position",position:{x:P.position.x+w,y:P.position.y+S}})})),(v.width<h.width||v.height<h.height||w||S)&&u.push({id:g,type:"dimensions",setAttributes:!0,dimensions:{width:M+(w?m[0]*w-E:0),height:N+(S?m[1]*S-T:0)}})}),u}function Rw(t,r,i,l,u,a,f){const h=l==null?void 0:l.querySelector(".xyflow__viewport");let p=!1;if(!h)return{changes:[],updatedInternals:p};const g=[],y=window.getComputedStyle(h),{m22:v}=new window.DOMMatrixReadOnly(y.transform),m=[];for(const w of t.values()){const S=r.get(w.id);if(!S)continue;if(S.hidden){r.set(S.id,{...S,internals:{...S.internals,handleBounds:void 0}}),p=!0;continue}const M=$c(w.nodeElement),N=S.measured.width!==M.width||S.measured.height!==M.height;if(!!(M.width&&M.height&&(N||!S.internals.handleBounds||w.force))){const T=w.nodeElement.getBoundingClientRect(),_=Nr(S.extent)?S.extent:a;let{positionAbsolute:P}=S.internals;if(S.parentId&&S.extent==="parent"){const D=r.get(S.parentId);D&&(P=P0(P,M,D))}else _&&(P=kr(P,_,M));const H={...S,measured:M,internals:{...S.internals,positionAbsolute:P,handleBounds:{source:Wh("source",w.nodeElement,T,v,S.id),target:Wh("target",w.nodeElement,T,v,S.id)}}};r.set(S.id,H),S.parentId&&jc(H,r,i,{nodeOrigin:u,zIndexMode:f}),p=!0,N&&(g.push({id:S.id,type:"dimensions",dimensions:M}),S.expandParent&&S.parentId&&m.push({id:S.id,parentId:S.parentId,rect:_i(H,u)}))}}if(m.length>0){const w=Oc(m,r,i,u);g.push(...w)}return{changes:g,updatedInternals:p}}async function Aw({delta:t,panZoom:r,transform:i,translateExtent:l,width:u,height:a}){if(!r||!t.x&&!t.y)return!1;const f=await r.setViewportConstrained({x:i[0]+t.x,y:i[1]+t.y,zoom:i[2]},[[0,0],[u,a]],l);return!!f&&(f.x!==i[0]||f.y!==i[1]||f.k!==i[2])}function Zh(t,r,i,l,u,a){let f=u;const h=l.get(f)||new Map;l.set(f,h.set(i,r)),f=`${u}-${t}`;const p=l.get(f)||new Map;if(l.set(f,p.set(i,r)),a){f=`${u}-${t}-${a}`;const g=l.get(f)||new Map;l.set(f,g.set(i,r))}}function U0(t,r,i){t.clear(),r.clear();for(const l of i){const{source:u,target:a,sourceHandle:f=null,targetHandle:h=null}=l,p={edgeId:l.id,source:u,target:a,sourceHandle:f,targetHandle:h},g=`${u}-${f}--${a}-${h}`,y=`${a}-${h}--${u}-${f}`;Zh("source",p,y,t,u,f),Zh("target",p,g,t,a,h),r.set(l.id,l)}}function W0(t,r){if(!t.parentId)return!1;const i=r.get(t.parentId);return i?i.selected?!0:W0(i,r):!1}function Jh(t,r,i){var u;let l=t;do{if((u=l==null?void 0:l.matches)!=null&&u.call(l,r))return!0;if(l===i)return!1;l=l==null?void 0:l.parentElement}while(l);return!1}function Dw(t,r,i,l,u){const a=new Map;for(const[f,h]of t)if((u?h.id===l:h.selected||h.id===l)&&(u||!h.parentId||!W0(h,t))&&(h.draggable||r&&typeof h.draggable>"u")){const g=t.get(f);g&&a.set(f,{id:f,position:g.position||{x:0,y:0},distance:{x:i.x-g.internals.positionAbsolute.x,y:i.y-g.internals.positionAbsolute.y},extent:g.extent,parentId:g.parentId,origin:g.origin,expandParent:g.expandParent,internals:{positionAbsolute:g.internals.positionAbsolute||{x:0,y:0}},measured:{width:g.measured.width??0,height:g.measured.height??0}})}return a}function Wa({nodeId:t,dragItems:r,nodeLookup:i,dragging:l=!0}){var f,h,p;const u=[];for(const[g,y]of r){const v=(f=i.get(g))==null?void 0:f.internals.userNode;v&&u.push({...v,position:y.position,dragging:l})}if(!t)return[u[0],u];const a=(h=i.get(t))==null?void 0:h.internals.userNode;return[a?{...a,position:((p=r.get(t))==null?void 0:p.position)||a.position,dragging:l}:u[0],u]}function jw({dragItems:t,snapGrid:r,x:i,y:l}){const u=t.values().next().value;if(!u)return null;const a={x:i-u.distance.x,y:l-u.distance.y},f=Ii(a,r);return{x:f.x-a.x,y:f.y-a.y}}function Ow({onNodeMouseDown:t,getStoreItems:r,onDragStart:i,onDrag:l,onDragStop:u}){let a={x:null,y:null},f=0,h=new Map,p=!1,g={x:0,y:0},y=null,v=!1,m=null,w=!1,S=!1,M=null;function N({noDragClassName:T,handleSelector:_,domNode:P,isSelectable:H,nodeId:D,nodeClickDistance:V=0}){m=kt(P);function Y({x:ee,y:Z}){const{nodeLookup:C,nodeExtent:B,snapGrid:F,snapToGrid:b,nodeOrigin:R,onNodeDrag:$,onSelectionDrag:O,onError:k,updateNodePositions:A}=r();a={x:ee,y:Z};let oe=!1;const ne=h.size>1,ue=ne&&B?fc(zi(h)):null,ce=ne&&b?jw({dragItems:h,snapGrid:F,x:ee,y:Z}):null;for(const[ae,Q]of h){if(!C.has(ae))continue;let ie={x:ee-Q.distance.x,y:Z-Q.distance.y};b&&(ie=ce?{x:Math.round(ie.x+ce.x),y:Math.round(ie.y+ce.y)}:Ii(ie,F));let he=null;if(ne&&B&&!Q.extent&&ue){const{positionAbsolute:ve}=Q.internals,Ee=ve.x-ue.x+B[0][0],Ne=ve.x+Q.measured.width-ue.x2+B[1][0],Me=ve.y-ue.y+B[0][1],Te=ve.y+Q.measured.height-ue.y2+B[1][1];he=[[Ee,Me],[Ne,Te]]}const{position:xe,positionAbsolute:ye}=M0({nodeId:ae,nextPosition:ie,nodeLookup:C,nodeExtent:he||B,nodeOrigin:R,onError:k});oe=oe||Q.position.x!==xe.x||Q.position.y!==xe.y,Q.position=xe,Q.internals.positionAbsolute=ye}if(S=S||oe,!!oe&&(A(h,!0),M&&(l||$||!D&&O))){const[ae,Q]=Wa({nodeId:D,dragItems:h,nodeLookup:C});l==null||l(M,h,ae,Q),$==null||$(M,ae,Q),D||O==null||O(M,Q)}}async function X(){if(!y)return;const{transform:ee,panBy:Z,autoPanSpeed:C,autoPanOnNodeDrag:B}=r();if(!B){p=!1,cancelAnimationFrame(f);return}const[F,b]=Tc(g,y,C);(F!==0||b!==0)&&(a.x=(a.x??0)-F/ee[2],a.y=(a.y??0)-b/ee[2],await Z({x:F,y:b})&&Y(a)),f=requestAnimationFrame(X)}function J(ee){var ue,ce;const{nodeLookup:Z,multiSelectionActive:C,nodesDraggable:B,transform:F,snapGrid:b,snapToGrid:R,selectNodesOnDrag:$,onNodeDragStart:O,onSelectionDragStart:k,unselectNodesAndEdges:A}=r();v=!0;const oe=!!D&&!C&&!((ue=Z.get(D))!=null&&ue.selected);(!$||!H)&&!C&&D&&((ce=Z.get(D))!=null&&ce.selected||A()),H&&$&&D&&(t==null||t(D));const ne=gi(ee.sourceEvent,{transform:F,snapGrid:b,snapToGrid:R,containerBounds:y});if(a=ne,h=Dw(Z,B,ne,D,oe),h.size>0&&(i||O||!D&&k)){const[ae,Q]=Wa({nodeId:D,dragItems:h,nodeLookup:Z});i==null||i(ee.sourceEvent,h,ae,Q),O==null||O(ee.sourceEvent,ae,Q),D||k==null||k(ee.sourceEvent,Q)}}const q=qp().clickDistance(V).on("start",ee=>{const{domNode:Z,nodeDragThreshold:C,transform:B,snapGrid:F,snapToGrid:b}=r();y=(Z==null?void 0:Z.getBoundingClientRect())||null,w=!1,S=!1,M=ee.sourceEvent,C===0&&J(ee),a=gi(ee.sourceEvent,{transform:B,snapGrid:F,snapToGrid:b,containerBounds:y}),g=bt(ee.sourceEvent,y)}).on("drag",ee=>{const{autoPanOnNodeDrag:Z,transform:C,snapGrid:B,snapToGrid:F,nodeDragThreshold:b,nodeLookup:R}=r(),$=gi(ee.sourceEvent,{transform:C,snapGrid:B,snapToGrid:F,containerBounds:y});if(M=ee.sourceEvent,(ee.sourceEvent.type==="touchmove"&&ee.sourceEvent.touches.length>1||D&&!R.has(D))&&(w=!0),!w){if(!p&&Z&&v&&(p=!0,X()),!v){const O=bt(ee.sourceEvent,y),k=O.x-g.x,A=O.y-g.y;Math.sqrt(k*k+A*A)>b&&J(ee)}(a.x!==$.xSnapped||a.y!==$.ySnapped)&&h&&v&&(g=bt(ee.sourceEvent,y),Y($))}}).on("end",ee=>{if(!v||w){w&&h.size>0&&r().updateNodePositions(h,!1);return}if(p=!1,v=!1,cancelAnimationFrame(f),h.size>0){const{nodeLookup:Z,updateNodePositions:C,onNodeDragStop:B,onSelectionDragStop:F}=r();if(S&&(C(h,!1),S=!1),u||B||!D&&F){const[b,R]=Wa({nodeId:D,dragItems:h,nodeLookup:Z,dragging:!1});u==null||u(ee.sourceEvent,h,b,R),B==null||B(ee.sourceEvent,b,R),D||F==null||F(ee.sourceEvent,R)}}}).filter(ee=>{const Z=ee.target;return!ee.button&&(!T||!Jh(Z,`.${T}`,P))&&(!_||Jh(Z,_,P))});m.call(q)}function E(){m==null||m.on(".drag",null)}return{update:N,destroy:E}}function Hw(t,r,i){const l=[],u={x:t.x-i,y:t.y-i,width:i*2,height:i*2};for(const a of r.values())El(u,_i(a))>0&&l.push(a);return l}const Fw=250;function Vw(t,r,i,l){var h,p;let u=[],a=1/0;const f=Hw(t,i,r+Fw);for(const g of f){const y=[...((h=g.internals.handleBounds)==null?void 0:h.source)??[],...((p=g.internals.handleBounds)==null?void 0:p.target)??[]];for(const v of y){if(l.nodeId===v.nodeId&&l.type===v.type&&l.id===v.id)continue;const{x:m,y:w}=Cr(g,v,v.position,!0),S=Math.sqrt(Math.pow(m-t.x,2)+Math.pow(w-t.y,2));S>r||(S<a?(u=[{...v,x:m,y:w}],a=S):S===a&&u.push({...v,x:m,y:w}))}}if(!u.length)return null;if(u.length>1){const g=l.type==="source"?"target":"source";return u.find(y=>y.type===g)??u[0]}return u[0]}function Y0(t,r,i,l,u,a=!1){var g,y,v;const f=l.get(t);if(!f)return null;const h=u==="strict"?(g=f.internals.handleBounds)==null?void 0:g[r]:[...((y=f.internals.handleBounds)==null?void 0:y.source)??[],...((v=f.internals.handleBounds)==null?void 0:v.target)??[]],p=(i?h==null?void 0:h.find(m=>m.id===i):h==null?void 0:h[0])??null;return p&&a?{...p,...Cr(f,p,p.position,!0)}:p}function X0(t,r){return t||(r!=null&&r.classList.contains("target")?"target":r!=null&&r.classList.contains("source")?"source":null)}function Bw(t,r){let i=null;return r?i=!0:t&&!r&&(i=!1),i}const Q0=()=>!0;function bw(t,{connectionMode:r,connectionRadius:i,handleId:l,nodeId:u,edgeUpdaterType:a,isTarget:f,domNode:h,nodeLookup:p,lib:g,autoPanOnConnect:y,flowId:v,panBy:m,cancelConnection:w,onConnectStart:S,onConnect:M,onConnectEnd:N,isValidConnection:E=Q0,onReconnectEnd:T,updateConnection:_,getTransform:P,getFromHandle:H,autoPanSpeed:D,dragThreshold:V=1,handleDomNode:Y}){const X=A0(t.target);let J=0,q;const{x:ee,y:Z}=bt(t),C=X0(a,Y),B=h==null?void 0:h.getBoundingClientRect();let F=!1;if(!B||!C)return;const b=Y0(u,C,l,p,r);if(!b)return;let R=bt(t,B),$=!1,O=null,k=!1,A=null;function oe(){if(!y||!B)return;const[xe,ye]=Tc(R,B,D);m({x:xe,y:ye}),J=requestAnimationFrame(oe)}const ne={...b,nodeId:u,type:C,position:b.position},ue=p.get(u);let ae={inProgress:!0,isValid:null,from:Cr(ue,ne,we.Left,!0),fromHandle:ne,fromPosition:ne.position,fromNode:ue,to:R,toHandle:null,toPosition:Vh[ne.position],toNode:null,pointer:R};function Q(){F=!0,_(ae),S==null||S(t,{nodeId:u,handleId:l,handleType:C})}V===0&&Q();function ie(xe){if(!F){const{x:Te,y:st}=bt(xe),at=Te-ee,et=st-Z;if(!(at*at+et*et>V*V))return;Q()}if(!H()||!ne){he(xe);return}const ye=P();R=bt(xe,B),q=Vw(Ti(R,ye,!1,[1,1]),i,p,ne),$||(oe(),$=!0);const ve=G0(xe,{handle:q,connectionMode:r,fromNodeId:u,fromHandleId:l,fromType:f?"target":"source",isValidConnection:E,doc:X,lib:g,flowId:v,nodeLookup:p});A=ve.handleDomNode,O=ve.connection,k=Bw(!!q,ve.isValid);const Ee=p.get(u),Ne=Ee?Cr(Ee,ne,we.Left,!0):ae.from,Me={...ae,from:Ne,isValid:k,to:ve.toHandle&&k?mo({x:ve.toHandle.x,y:ve.toHandle.y},ye):R,toHandle:ve.toHandle,toPosition:k&&ve.toHandle?ve.toHandle.position:Vh[ne.position],toNode:ve.toHandle?p.get(ve.toHandle.nodeId):null,pointer:R};_(Me),ae=Me}function he(xe){if(!("touches"in xe&&xe.touches.length>0)){if(F){(q||A)&&O&&k&&(M==null||M(O));const{inProgress:ye,...ve}=ae,Ee={...ve,toPosition:ae.toHandle?ae.toPosition:null};N==null||N(xe,Ee),a&&(T==null||T(xe,Ee))}w(),cancelAnimationFrame(J),$=!1,k=!1,O=null,A=null,X.removeEventListener("mousemove",ie),X.removeEventListener("mouseup",he),X.removeEventListener("touchmove",ie),X.removeEventListener("touchend",he)}}X.addEventListener("mousemove",ie),X.addEventListener("mouseup",he),X.addEventListener("touchmove",ie),X.addEventListener("touchend",he)}function G0(t,{handle:r,connectionMode:i,fromNodeId:l,fromHandleId:u,fromType:a,doc:f,lib:h,flowId:p,isValidConnection:g=Q0,nodeLookup:y}){const v=a==="target",m=r?f.querySelector(`.${h}-flow__handle[data-id="${p}-${r==null?void 0:r.nodeId}-${r==null?void 0:r.id}-${r==null?void 0:r.type}"]`):null,{x:w,y:S}=bt(t),M=f.elementFromPoint(w,S),N=M!=null&&M.classList.contains(`${h}-flow__handle`)?M:m,E={handleDomNode:N,isValid:!1,connection:null,toHandle:null};if(N){const T=X0(void 0,N),_=N.getAttribute("data-nodeid"),P=N.getAttribute("data-handleid"),H=N.classList.contains("connectable"),D=N.classList.contains("connectableend");if(!_||!T)return E;const V={source:v?_:l,sourceHandle:v?P:u,target:v?l:_,targetHandle:v?u:P};E.connection=V;const X=H&&D&&(i===po.Strict?v&&T==="source"||!v&&T==="target":_!==l||P!==u);E.isValid=X&&g(V),E.toHandle=Y0(_,T,P,y,i,!0)}return E}const gc={onPointerDown:bw,isValid:G0};function Uw({domNode:t,panZoom:r,getTransform:i,getViewScale:l}){const u=kt(t);function a({translateExtent:h,width:p,height:g,zoomStep:y=1,pannable:v=!0,zoomable:m=!0,inversePan:w=!1}){const S=_=>{if(_.sourceEvent.type!=="wheel"||!r)return;const P=i(),H=_.sourceEvent.ctrlKey&&Ei()?10:1,D=-_.sourceEvent.deltaY*(_.sourceEvent.deltaMode===1?.05:_.sourceEvent.deltaMode?1:.002)*y,V=P[2]*Math.pow(2,D*H);r.scaleTo(V)};let M=[0,0];const N=_=>{(_.sourceEvent.type==="mousedown"||_.sourceEvent.type==="touchstart")&&(M=[_.sourceEvent.clientX??_.sourceEvent.touches[0].clientX,_.sourceEvent.clientY??_.sourceEvent.touches[0].clientY])},E=_=>{const P=i();if(_.sourceEvent.type!=="mousemove"&&_.sourceEvent.type!=="touchmove"||!r)return;const H=[_.sourceEvent.clientX??_.sourceEvent.touches[0].clientX,_.sourceEvent.clientY??_.sourceEvent.touches[0].clientY],D=[H[0]-M[0],H[1]-M[1]];M=H;const V=l()*Math.max(P[2],Math.log(P[2]))*(w?-1:1),Y={x:P[0]-D[0]*V,y:P[1]-D[1]*V},X=[[0,0],[p,g]];r.setViewportConstrained({x:Y.x,y:Y.y,zoom:P[2]},X,h)},T=_0().on("start",N).on("zoom",v?E:null).on("zoom.wheel",m?S:null);u.call(T,{})}function f(){u.on("zoom",null)}return{update:a,destroy:f,pointer:Ft}}const Al=t=>({x:t.x,y:t.y,zoom:t.k}),Ya=({x:t,y:r,zoom:i})=>Ll.translate(t,r).scale(i),Un=(t,r)=>t.target.closest(`.${r}`),K0=(t,r)=>r===2&&Array.isArray(t)&&t.includes(2),Ww=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,Xa=(t,r=0,i=Ww,l=()=>{})=>{const u=typeof r=="number"&&r>0;return u||l(),u?t.transition().duration(r).ease(i).on("end",l):t},q0=t=>{const r=t.ctrlKey&&Ei()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*r};function Yw({zoomPanValues:t,noWheelClassName:r,d3Selection:i,d3Zoom:l,panOnScrollMode:u,panOnScrollSpeed:a,zoomOnPinch:f,onPanZoomStart:h,onPanZoom:p,onPanZoomEnd:g}){return y=>{if(Un(y,r))return y.ctrlKey&&y.preventDefault(),!1;y.preventDefault(),y.stopImmediatePropagation();const v=i.property("__zoom").k||1;if(y.ctrlKey&&f){const N=Ft(y),E=q0(y),T=v*Math.pow(2,E);l.scaleTo(i,T,N,y);return}const m=y.deltaMode===1?20:1;let w=u===wr.Vertical?0:y.deltaX*m,S=u===wr.Horizontal?0:y.deltaY*m;!Ei()&&y.shiftKey&&u!==wr.Vertical&&(w=y.deltaY*m,S=0),l.translateBy(i,-(w/v)*a,-(S/v)*a,{internal:!0});const M=Al(i.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?p==null||p(y,M):(t.isPanScrolling=!0,h==null||h(y,M)),t.panScrollTimeout=setTimeout(()=>{g==null||g(y,M),t.isPanScrolling=!1},150)}}function Xw({noWheelClassName:t,preventScrolling:r,d3ZoomHandler:i}){return function(l,u){const a=l.type==="wheel",f=!r&&a&&!l.ctrlKey,h=Un(l,t);if(l.ctrlKey&&a&&h&&l.preventDefault(),f||h)return null;l.preventDefault(),i.call(this,l,u)}}function Qw({zoomPanValues:t,onDraggingChange:r,onPanZoomStart:i}){return l=>{var a,f,h;if((a=l.sourceEvent)!=null&&a.internal)return;const u=Al(l.transform);t.mouseButton=((f=l.sourceEvent)==null?void 0:f.button)||0,t.isZoomingOrPanning=!0,t.prevViewport=u,((h=l.sourceEvent)==null?void 0:h.type)==="mousedown"&&r(!0),i&&(i==null||i(l.sourceEvent,u))}}function Gw({zoomPanValues:t,panOnDrag:r,onPaneContextMenu:i,onTransformChange:l,onPanZoom:u}){return a=>{var f,h;t.usedRightMouseButton=!!(i&&K0(r,t.mouseButton??0)),(f=a.sourceEvent)!=null&&f.sync||l([a.transform.x,a.transform.y,a.transform.k]),u&&!((h=a.sourceEvent)!=null&&h.internal)&&(u==null||u(a.sourceEvent,Al(a.transform)))}}function Kw({zoomPanValues:t,panOnDrag:r,panOnScroll:i,onDraggingChange:l,onPanZoomEnd:u,onPaneContextMenu:a}){return f=>{var h;if(!((h=f.sourceEvent)!=null&&h.internal)&&(t.isZoomingOrPanning=!1,a&&K0(r,t.mouseButton??0)&&!t.usedRightMouseButton&&f.sourceEvent&&a(f.sourceEvent),t.usedRightMouseButton=!1,l(!1),u)){const p=Al(f.transform);t.prevViewport=p,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{u==null||u(f.sourceEvent,p)},i?150:0)}}}function qw({panActivationKeyPressed:t,zoomActivationKeyPressed:r,zoomOnScroll:i,zoomOnPinch:l,panOnDrag:u,panOnScroll:a,zoomOnDoubleClick:f,userSelectionActive:h,noWheelClassName:p,noPanClassName:g,lib:y,connectionInProgress:v}){return m=>{var E;const w=r||i,S=l&&m.ctrlKey,M=m.type==="wheel";if(m.button===1&&m.type==="mousedown"&&(Un(m,`${y}-flow__node`)||Un(m,`${y}-flow__edge`)||Un(m,`${y}-flow__selection`)||Un(m,`${y}-flow__nodesselection`)))return!0;if(!u&&!w&&!a&&!f&&!l||h||v&&!M||Un(m,p)&&M||Un(m,g)&&(!M||a&&M&&!r)||!l&&m.ctrlKey&&M)return!1;if(!l&&m.type==="touchstart"&&((E=m.touches)==null?void 0:E.length)>1)return m.preventDefault(),!1;if(!w&&!a&&!S&&M||!u&&(m.type==="mousedown"||m.type==="touchstart")||Array.isArray(u)&&!u.includes(m.button)&&m.type==="mousedown")return!1;const N=Array.isArray(u)&&u.includes(m.button)||!m.button||m.button<=1;return(!m.ctrlKey||M||t)&&N}}function Zw({domNode:t,minZoom:r,maxZoom:i,translateExtent:l,viewport:u,onPanZoom:a,onPanZoomStart:f,onPanZoomEnd:h,onDraggingChange:p}){const g={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},y=t.getBoundingClientRect();let v=[[0,0],[y.width,y.height]];const m=typeof ResizeObserver<"u"?new ResizeObserver(Z=>{const C=Z[0];C!=null&&C.contentRect&&(v=[[0,0],[C.contentRect.width,C.contentRect.height]])}):null;m==null||m.observe(t);const w=_0().extent(()=>v).scaleExtent([r,i]).translateExtent(l),S=kt(t).call(w);P({x:u.x,y:u.y,zoom:go(u.zoom,r,i)},[[0,0],[y.width,y.height]],l);const M=S.on("wheel.zoom"),N=S.on("dblclick.zoom");w.wheelDelta(q0);async function E(Z,C){return S?new Promise(B=>{w==null||w.interpolate((C==null?void 0:C.interpolate)==="linear"?pi:ul).transform(Xa(S,C==null?void 0:C.duration,C==null?void 0:C.ease,()=>B(!0)),Z)}):!1}function T({noWheelClassName:Z,noPanClassName:C,onPaneContextMenu:B,userSelectionActive:F,panOnScroll:b,panOnDrag:R,panOnScrollMode:$,panOnScrollSpeed:O,preventScrolling:k,zoomOnPinch:A,zoomOnScroll:oe,zoomOnDoubleClick:ne,panActivationKeyPressed:ue=!1,zoomActivationKeyPressed:ce,lib:ae,onTransformChange:Q,connectionInProgress:ie,paneClickDistance:he,selectionOnDrag:xe}){F&&!g.isZoomingOrPanning&&w.on("zoom",null);const ye=b&&!ce&&!F;w.clickDistance(xe?1/0:!Bt(he)||he<0?0:he);const ve=ye?Yw({zoomPanValues:g,noWheelClassName:Z,d3Selection:S,d3Zoom:w,panOnScrollMode:$,panOnScrollSpeed:O,zoomOnPinch:A,onPanZoomStart:f,onPanZoom:a,onPanZoomEnd:h}):Xw({noWheelClassName:Z,preventScrolling:k,d3ZoomHandler:M});S.on("wheel.zoom",ve,{passive:!1});const Ee=Qw({zoomPanValues:g,onDraggingChange:p,onPanZoomStart:f});w.on("start",Ee);const Ne=Gw({zoomPanValues:g,panOnDrag:R,onPaneContextMenu:!!B,onPanZoom:a,onTransformChange:Q});w.on("zoom",Ne);const Me=Kw({zoomPanValues:g,panOnDrag:R,panOnScroll:b,onPaneContextMenu:B,onPanZoomEnd:h,onDraggingChange:p});w.on("end",Me);const Te=qw({panActivationKeyPressed:ue,zoomActivationKeyPressed:ce,panOnDrag:R,zoomOnScroll:oe,panOnScroll:b,zoomOnDoubleClick:ne,zoomOnPinch:A,userSelectionActive:F,noPanClassName:C,noWheelClassName:Z,lib:ae,connectionInProgress:ie});w.filter(Te),ne?S.on("dblclick.zoom",N):S.on("dblclick.zoom",null)}function _(){w.on("zoom",null),m==null||m.disconnect()}async function P(Z,C,B){const F=Ya(Z),b=w==null?void 0:w.constrain()(F,C,B);return b&&await E(b),b}async function H(Z,C){const B=Ya(Z);return await E(B,C),B}function D(Z){if(S){const C=Ya(Z),B=S.property("__zoom");(B.k!==Z.zoom||B.x!==Z.x||B.y!==Z.y)&&(w==null||w.transform(S,C,null,{sync:!0}))}}function V(){const Z=S?S0(S.node()):{x:0,y:0,k:1};return{x:Z.x,y:Z.y,zoom:Z.k}}async function Y(Z,C){return S?new Promise(B=>{w==null||w.interpolate((C==null?void 0:C.interpolate)==="linear"?pi:ul).scaleTo(Xa(S,C==null?void 0:C.duration,C==null?void 0:C.ease,()=>B(!0)),Z)}):!1}async function X(Z,C){return S?new Promise(B=>{w==null||w.interpolate((C==null?void 0:C.interpolate)==="linear"?pi:ul).scaleBy(Xa(S,C==null?void 0:C.duration,C==null?void 0:C.ease,()=>B(!0)),Z)}):!1}function J(Z){w==null||w.scaleExtent(Z)}function q(Z){w==null||w.translateExtent(Z)}function ee(Z){const C=!Bt(Z)||Z<0?0:Z;w==null||w.clickDistance(C)}return{update:T,destroy:_,setViewport:H,setViewportConstrained:P,getViewport:V,scaleTo:Y,scaleBy:X,setScaleExtent:J,setTranslateExtent:q,syncViewport:D,setClickDistance:ee}}var yo;(function(t){t.Line="line",t.Handle="handle"})(yo||(yo={}));function Jw({width:t,prevWidth:r,height:i,prevHeight:l,affectsX:u,affectsY:a}){const f=t-r,h=i-l,p=[f>0?1:f<0?-1:0,h>0?1:h<0?-1:0];return f&&u&&(p[0]=p[0]*-1),h&&a&&(p[1]=p[1]*-1),p}function ep(t){const r=t.includes("right")||t.includes("left"),i=t.includes("bottom")||t.includes("top"),l=t.includes("left"),u=t.includes("top");return{isHorizontal:r,isVertical:i,affectsX:l,affectsY:u}}function Bn(t,r){return Math.max(0,r-t)}function bn(t,r){return Math.max(0,t-r)}function nl(t,r,i){return Math.max(0,r-t,t-i)}function tp(t,r){return t?!r:r}function eS(t,r,i,l,u,a,f,h){let{affectsX:p,affectsY:g}=r;const{isHorizontal:y,isVertical:v}=r,m=y&&v,{xSnapped:w,ySnapped:S}=i,{minWidth:M,maxWidth:N,minHeight:E,maxHeight:T}=l,{x:_,y:P,width:H,height:D,aspectRatio:V}=t;let Y=Math.floor(y?w-t.pointerX:0),X=Math.floor(v?S-t.pointerY:0);const J=H+(p?-Y:Y),q=D+(g?-X:X),ee=-a[0]*H,Z=-a[1]*D;let C=nl(J,M,N),B=nl(q,E,T);if(f){let R=0,$=0;p&&Y<0?R=Bn(_+Y+ee,f[0][0]):!p&&Y>0&&(R=bn(_+J+ee,f[1][0])),g&&X<0?$=Bn(P+X+Z,f[0][1]):!g&&X>0&&($=bn(P+q+Z,f[1][1])),C=Math.max(C,R),B=Math.max(B,$)}if(h){let R=0,$=0;p&&Y>0?R=bn(_+Y,h[0][0]):!p&&Y<0&&(R=Bn(_+J,h[1][0])),g&&X>0?$=bn(P+X,h[0][1]):!g&&X<0&&($=Bn(P+q,h[1][1])),C=Math.max(C,R),B=Math.max(B,$)}if(u){if(y){const R=nl(J/V,E,T)*V;if(C=Math.max(C,R),f){let $=0;!p&&!g||p&&!g&&m?$=bn(P+Z+J/V,f[1][1])*V:$=Bn(P+Z+(p?Y:-Y)/V,f[0][1])*V,C=Math.max(C,$)}if(h){let $=0;!p&&!g||p&&!g&&m?$=Bn(P+J/V,h[1][1])*V:$=bn(P+(p?Y:-Y)/V,h[0][1])*V,C=Math.max(C,$)}}if(v){const R=nl(q*V,M,N)/V;if(B=Math.max(B,R),f){let $=0;!p&&!g||g&&!p&&m?$=bn(_+q*V+ee,f[1][0])/V:$=Bn(_+(g?X:-X)*V+ee,f[0][0])/V,B=Math.max(B,$)}if(h){let $=0;!p&&!g||g&&!p&&m?$=Bn(_+q*V,h[1][0])/V:$=bn(_+(g?X:-X)*V,h[0][0])/V,B=Math.max(B,$)}}}X=X+(X<0?B:-B),Y=Y+(Y<0?C:-C),u&&(m?J>q*V?X=(tp(p,g)?-Y:Y)/V:Y=(tp(p,g)?-X:X)*V:y?(X=Y/V,g=p):(Y=X*V,p=g));const F=p?_+Y:_,b=g?P+X:P;return{width:H+(p?-Y:Y),height:D+(g?-X:X),x:a[0]*Y*(p?-1:1)+F,y:a[1]*X*(g?-1:1)+b}}const Z0={width:0,height:0,x:0,y:0},tS={...Z0,pointerX:0,pointerY:0,aspectRatio:1};function nS(t,r,i){const l=r.position.x+t.position.x,u=r.position.y+t.position.y,a=t.measured.width??0,f=t.measured.height??0,h=i[0]*a,p=i[1]*f;return[[l-h,u-p],[l+a-h,u+f-p]]}function rS({domNode:t,nodeId:r,getStoreItems:i,onChange:l,onEnd:u}){const a=kt(t);let f={controlDirection:ep("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function h({controlPosition:g,boundaries:y,keepAspectRatio:v,resizeDirection:m,onResizeStart:w,onResize:S,onResizeEnd:M,shouldResize:N}){let E={...Z0},T={...tS};f={boundaries:y,resizeDirection:m,keepAspectRatio:v,controlDirection:ep(g)};let _,P=null,H=[],D,V,Y;const X=qp().on("start",J=>{const{nodeLookup:q,transform:ee,snapGrid:Z,snapToGrid:C,nodeOrigin:B,paneDomNode:F}=i();if(_=q.get(r),!_)return;P=(F==null?void 0:F.getBoundingClientRect())??null;const{xSnapped:b,ySnapped:R}=gi(J.sourceEvent,{transform:ee,snapGrid:Z,snapToGrid:C,containerBounds:P});E={width:_.measured.width??0,height:_.measured.height??0,x:_.position.x??0,y:_.position.y??0},T={...E,pointerX:b,pointerY:R,aspectRatio:E.width/E.height},D=void 0,V=Nr(_.extent)?_.extent:void 0,_.parentId&&(_.extent==="parent"||_.expandParent)&&(D=q.get(_.parentId)),D&&_.extent==="parent"&&(V=[[0,0],[D.measured.width,D.measured.height]]),H=[],Y=void 0;for(const[$,O]of q)if(O.parentId===r&&(H.push({id:$,position:{...O.position},extent:O.extent}),O.extent==="parent"||O.expandParent)){const k=nS(O,_,O.origin??B);Y?Y=[[Math.min(k[0][0],Y[0][0]),Math.min(k[0][1],Y[0][1])],[Math.max(k[1][0],Y[1][0]),Math.max(k[1][1],Y[1][1])]]:Y=k}w==null||w(J,{...E})}).on("drag",J=>{const{transform:q,snapGrid:ee,snapToGrid:Z,nodeOrigin:C}=i(),B=gi(J.sourceEvent,{transform:q,snapGrid:ee,snapToGrid:Z,containerBounds:P}),F=[];if(!_)return;const{x:b,y:R,width:$,height:O}=E,k={},A=_.origin??C,{width:oe,height:ne,x:ue,y:ce}=eS(T,f.controlDirection,B,f.boundaries,f.keepAspectRatio,A,V,Y),ae=oe!==$,Q=ne!==O,ie=ue!==b&&ae,he=ce!==R&&Q;if(!ie&&!he&&!ae&&!Q)return;const xe={prevValues:{...E},startX:T.x,startY:T.y,childNodes:H.map(Ne=>({...Ne,position:{...Ne.position}}))};if((ie||he||A[0]===1||A[1]===1)&&(k.x=ie?ue:E.x,k.y=he?ce:E.y,E.x=k.x,E.y=k.y,H.length>0)){const Ne=ue-b,Me=ce-R;for(const Te of H)Te.position={x:Te.position.x-Ne+A[0]*(oe-$),y:Te.position.y-Me+A[1]*(ne-O)},F.push(Te)}if((ae||Q)&&(k.width=ae&&(!f.resizeDirection||f.resizeDirection==="horizontal")?oe:E.width,k.height=Q&&(!f.resizeDirection||f.resizeDirection==="vertical")?ne:E.height,E.width=k.width,E.height=k.height),D&&_.expandParent){const Ne=A[0]*(k.width??0);k.x&&k.x<Ne&&(E.x=Ne,T.x=T.x-(k.x-Ne));const Me=A[1]*(k.height??0);k.y&&k.y<Me&&(E.y=Me,T.y=T.y-(k.y-Me))}const ye=Jw({width:E.width,prevWidth:$,height:E.height,prevHeight:O,affectsX:f.controlDirection.affectsX,affectsY:f.controlDirection.affectsY}),ve={...E,direction:ye};if((N==null?void 0:N(J,ve))===!1){E=xe.prevValues,T.x=xe.startX,T.y=xe.startY,H.forEach((Ne,Me)=>{Ne.position=xe.childNodes[Me].position});return}S==null||S(J,ve),l(k,F)}).on("end",J=>{M==null||M(J,{...E}),u==null||u({...E})});a.call(X)}function p(){a.on(".drag",null)}return{update:h,destroy:p}}var Qa={exports:{}},Ga={},Ka={exports:{}},qa={};/**
|
|
41
|
+
* @license React
|
|
42
|
+
* use-sync-external-store-shim.production.js
|
|
43
|
+
*
|
|
44
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the MIT license found in the
|
|
47
|
+
* LICENSE file in the root directory of this source tree.
|
|
48
|
+
*/var np;function oS(){if(np)return qa;np=1;var t=Ni();function r(v,m){return v===m&&(v!==0||1/v===1/m)||v!==v&&m!==m}var i=typeof Object.is=="function"?Object.is:r,l=t.useState,u=t.useEffect,a=t.useLayoutEffect,f=t.useDebugValue;function h(v,m){var w=m(),S=l({inst:{value:w,getSnapshot:m}}),M=S[0].inst,N=S[1];return a(function(){M.value=w,M.getSnapshot=m,p(M)&&N({inst:M})},[v,w,m]),u(function(){return p(M)&&N({inst:M}),v(function(){p(M)&&N({inst:M})})},[v]),f(w),w}function p(v){var m=v.getSnapshot;v=v.value;try{var w=m();return!i(v,w)}catch{return!0}}function g(v,m){return m()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:h;return qa.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y,qa}var rp;function iS(){return rp||(rp=1,Ka.exports=oS()),Ka.exports}/**
|
|
49
|
+
* @license React
|
|
50
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/var op;function sS(){if(op)return Ga;op=1;var t=Ni(),r=iS();function i(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var l=typeof Object.is=="function"?Object.is:i,u=r.useSyncExternalStore,a=t.useRef,f=t.useEffect,h=t.useMemo,p=t.useDebugValue;return Ga.useSyncExternalStoreWithSelector=function(g,y,v,m,w){var S=a(null);if(S.current===null){var M={hasValue:!1,value:null};S.current=M}else M=S.current;S=h(function(){function E(D){if(!T){if(T=!0,_=D,D=m(D),w!==void 0&&M.hasValue){var V=M.value;if(w(V,D))return P=V}return P=D}if(V=P,l(_,D))return V;var Y=m(D);return w!==void 0&&w(V,Y)?(_=D,V):(_=D,P=Y)}var T=!1,_,P,H=v===void 0?null:v;return[function(){return E(y())},H===null?void 0:function(){return E(H())}]},[y,v,m,w]);var N=u(g,S[0],S[1]);return f(function(){M.hasValue=!0,M.value=N},[N]),p(N),N},Ga}var ip;function lS(){return ip||(ip=1,Qa.exports=sS()),Qa.exports}var uS=lS();const aS=Ap(uS),cS={},sp=t=>{let r;const i=new Set,l=(y,v)=>{const m=typeof y=="function"?y(r):y;if(!Object.is(m,r)){const w=r;r=v??(typeof m!="object"||m===null)?m:Object.assign({},r,m),i.forEach(S=>S(r,w))}},u=()=>r,p={setState:l,getState:u,getInitialState:()=>g,subscribe:y=>(i.add(y),()=>i.delete(y)),destroy:()=>{(cS?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),i.clear()}},g=r=t(l,u,p);return p},fS=t=>t?sp(t):sp,{useDebugValue:dS}=my,{useSyncExternalStoreWithSelector:hS}=aS,pS=t=>t;function J0(t,r=pS,i){const l=hS(t.subscribe,t.getState,t.getServerState||t.getInitialState,r,i);return dS(l),l}const lp=(t,r)=>{const i=fS(t),l=(u,a=r)=>J0(i,u,a);return Object.assign(l,i),l},gS=(t,r)=>t?lp(t,r):lp;function Ve(t,r){if(Object.is(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(const[l,u]of t)if(!Object.is(u,r.get(l)))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(const l of t)if(!r.has(l))return!1;return!0}const i=Object.keys(t);if(i.length!==Object.keys(r).length)return!1;for(const l of i)if(!Object.prototype.hasOwnProperty.call(r,l)||!Object.is(t[l],r[l]))return!1;return!0}Dp();const Dl=K.createContext(null),mS=Dl.Provider,eg=Ut.error001("react");function ze(t,r){const i=K.useContext(Dl);if(i===null)throw new Error(eg);return J0(i,t,r)}function De(){const t=K.useContext(Dl);if(t===null)throw new Error(eg);return K.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe}),[t])}const up={display:"none"},yS={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},tg="react-flow__node-desc",ng="react-flow__edge-desc",vS="react-flow__aria-live",xS=t=>t.ariaLiveMessage,wS=t=>t.ariaLabelConfig;function SS({rfId:t}){const r=ze(xS);return z.jsx("div",{id:`${vS}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:yS,children:r})}function _S({rfId:t,disableKeyboardA11y:r}){const i=ze(wS);return z.jsxs(z.Fragment,{children:[z.jsx("div",{id:`${tg}-${t}`,style:up,children:r?i["node.a11yDescription.default"]:i["node.a11yDescription.keyboardDisabled"]}),z.jsx("div",{id:`${ng}-${t}`,style:up,children:i["edge.a11yDescription.default"]}),!r&&z.jsx(SS,{rfId:t})]})}const jl=K.forwardRef(({position:t="top-left",children:r,className:i,style:l,...u},a)=>{const f=`${t}`.split("-");return z.jsx("div",{className:We(["react-flow__panel",i,...f]),style:l,ref:a,...u,children:r})});jl.displayName="Panel";const ap="https://reactflow.dev?utm_source=attribution";function ES({proOptions:t,position:r="bottom-right"}){return K.useEffect(()=>{},[]),t!=null&&t.hideAttribution?null:z.jsx(jl,{position:r,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${ap}`,children:z.jsx("a",{href:ap,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const kS=t=>{const r=[],i=[];for(const[,l]of t.nodeLookup)l.selected&&r.push(l.internals.userNode);for(const[,l]of t.edgeLookup)l.selected&&i.push(l);return{selectedNodes:r,selectedEdges:i}},rl=t=>t.id;function NS(t,r){return Ve(t.selectedNodes.map(rl),r.selectedNodes.map(rl))&&Ve(t.selectedEdges.map(rl),r.selectedEdges.map(rl))}function CS({onSelectionChange:t}){const r=De(),{selectedNodes:i,selectedEdges:l}=ze(kS,NS);return K.useEffect(()=>{const u={nodes:i,edges:l};t==null||t(u),r.getState().onSelectionChangeHandlers.forEach(a=>a(u))},[i,l,t]),null}const MS=t=>!!t.onSelectionChangeHandlers;function PS({onSelectionChange:t}){const r=ze(MS);return t||r?z.jsx(CS,{onSelectionChange:t}):null}const rg=[0,0],zS={x:0,y:0,zoom:1},IS=["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"],cp=[...IS,"rfId"],TS=t=>({setNodes:t.setNodes,setEdges:t.setEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges}),fp={translateExtent:wi,nodeOrigin:rg,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function LS(t){const{setNodes:r,setEdges:i,setMinZoom:l,setMaxZoom:u,setTranslateExtent:a,setNodeExtent:f,reset:h,setDefaultNodesAndEdges:p}=ze(TS,Ve),g=De();K.useEffect(()=>(p(t.defaultNodes,t.defaultEdges),()=>{y.current=fp,h()}),[]);const y=K.useRef(fp);return K.useEffect(()=>{for(const v of cp){const m=t[v],w=y.current[v];m!==w&&(typeof t[v]>"u"||(v==="nodes"?r(m):v==="edges"?i(m):v==="minZoom"?l(m):v==="maxZoom"?u(m):v==="translateExtent"?a(m):v==="nodeExtent"?f(m):v==="ariaLabelConfig"?g.setState({ariaLabelConfig:gw(m)}):v==="fitView"?g.setState({fitViewQueued:m}):v==="fitViewOptions"?g.setState({fitViewOptions:m}):g.setState({[v]:m})))}y.current=t},cp.map(v=>t[v])),null}function dp(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function $S(t){var l;const[r,i]=K.useState(t==="system"?null:t);return K.useEffect(()=>{if(t!=="system"){i(t);return}const u=dp(),a=()=>i(u!=null&&u.matches?"dark":"light");return a(),u==null||u.addEventListener("change",a),()=>{u==null||u.removeEventListener("change",a)}},[t]),r!==null?r:(l=dp())!=null&&l.matches?"dark":"light"}const hp=typeof document<"u"?document:null;function ki(t=null,r={target:hp,actInsideInputWithModifier:!0}){const[i,l]=K.useState(!1),u=K.useRef(!1),a=K.useRef(new Set([])),[f,h]=K.useMemo(()=>{if(t!==null){const g=(Array.isArray(t)?t:[t]).filter(v=>typeof v=="string").map(v=>v.replace(/\+/g,`
|
|
57
|
+
`).replace(`
|
|
58
|
+
|
|
59
|
+
`,`
|
|
60
|
+
+`).split(`
|
|
61
|
+
`)),y=g.reduce((v,m)=>v.concat(...m),[]);return[g,y]}return[[],[]]},[t]);return K.useEffect(()=>{const p=(r==null?void 0:r.target)??hp,g=(r==null?void 0:r.actInsideInputWithModifier)??!0;if(t!==null){const y=w=>{var N,E;if(u.current=w.ctrlKey||w.metaKey||w.shiftKey||w.altKey,(!u.current||u.current&&!g)&&D0(w))return!1;const M=gp(w.code,h);if(a.current.add(w[M]),pp(f,a.current,!1)){const T=((E=(N=w.composedPath)==null?void 0:N.call(w))==null?void 0:E[0])||w.target,_=(T==null?void 0:T.nodeName)==="BUTTON"||(T==null?void 0:T.nodeName)==="A";r.preventDefault!==!1&&(u.current||!_)&&w.preventDefault(),l(!0)}},v=w=>{const S=gp(w.code,h);pp(f,a.current,!0)?(l(!1),a.current.clear()):a.current.delete(w[S]),w.key==="Meta"&&a.current.clear(),u.current=!1},m=()=>{a.current.clear(),l(!1)};return p==null||p.addEventListener("keydown",y),p==null||p.addEventListener("keyup",v),window.addEventListener("blur",m),window.addEventListener("contextmenu",m),()=>{p==null||p.removeEventListener("keydown",y),p==null||p.removeEventListener("keyup",v),window.removeEventListener("blur",m),window.removeEventListener("contextmenu",m)}}},[t,l]),i}function pp(t,r,i){return t.filter(l=>i||l.length===r.size).some(l=>l.every(u=>r.has(u)))}function gp(t,r){return r.includes(t)?"code":"key"}const RS=()=>{const t=De();return K.useMemo(()=>({zoomIn:async r=>{const{panZoom:i}=t.getState();return i?i.scaleBy(1.2,r):!1},zoomOut:async r=>{const{panZoom:i}=t.getState();return i?i.scaleBy(1/1.2,r):!1},zoomTo:async(r,i)=>{const{panZoom:l}=t.getState();return l?l.scaleTo(r,i):!1},getZoom:()=>t.getState().transform[2],setViewport:async(r,i)=>{const{transform:[l,u,a],panZoom:f}=t.getState();return f?(await f.setViewport({x:r.x??l,y:r.y??u,zoom:r.zoom??a},i),!0):!1},getViewport:()=>{const[r,i,l]=t.getState().transform;return{x:r,y:i,zoom:l}},setCenter:async(r,i,l)=>t.getState().setCenter(r,i,l),fitBounds:async(r,i)=>{const{width:l,height:u,minZoom:a,maxZoom:f,panZoom:h}=t.getState(),p=Lc(r,l,u,a,f,(i==null?void 0:i.padding)??.1);return h?(await h.setViewport(p,{duration:i==null?void 0:i.duration,ease:i==null?void 0:i.ease,interpolate:i==null?void 0:i.interpolate}),!0):!1},screenToFlowPosition:(r,i={})=>{const{transform:l,snapGrid:u,snapToGrid:a,domNode:f}=t.getState();if(!f)return r;const{x:h,y:p}=f.getBoundingClientRect(),g={x:r.x-h,y:r.y-p},y=i.snapGrid??u,v=i.snapToGrid??a;return Ti(g,l,v,y)},flowToScreenPosition:r=>{const{transform:i,domNode:l}=t.getState();if(!l)return r;const{x:u,y:a}=l.getBoundingClientRect(),f=mo(r,i);return{x:f.x+u,y:f.y+a}}}),[])};function og(t,r){const i=[],l=new Map,u=[];for(const a of t)if(a.type==="add"){u.push(a);continue}else if(a.type==="remove"||a.type==="replace")l.set(a.id,[a]);else{const f=l.get(a.id);f?f.push(a):l.set(a.id,[a])}for(const a of r){const f=l.get(a.id);if(!f){i.push(a);continue}if(f[0].type==="remove")continue;if(f[0].type==="replace"){i.push({...f[0].item});continue}const h={...a};for(const p of f)AS(p,h);i.push(h)}return u.length&&u.forEach(a=>{a.index!==void 0?i.splice(a.index,0,{...a.item}):i.push({...a.item})}),i}function AS(t,r){switch(t.type){case"select":{r.selected=t.selected;break}case"position":{typeof t.position<"u"&&(r.position=t.position),typeof t.dragging<"u"&&(r.dragging=t.dragging);break}case"dimensions":{typeof t.dimensions<"u"&&(r.measured={...t.dimensions},t.setAttributes&&((t.setAttributes===!0||t.setAttributes==="width")&&(r.width=t.dimensions.width),(t.setAttributes===!0||t.setAttributes==="height")&&(r.height=t.dimensions.height))),typeof t.resizing=="boolean"&&(r.resizing=t.resizing);break}}}function DS(t,r){return og(t,r)}function jS(t,r){return og(t,r)}function pr(t,r){return{id:t,type:"select",selected:r}}function oo(t,r=new Set){const i=[];for(const[l,u]of t){const a=r.has(l);!(u.selected===void 0&&!a)&&u.selected!==a&&i.push(pr(u.id,a))}return i}function mp({items:t=[],lookup:r}){var u;const i=[],l=new Map(t.map(a=>[a.id,a]));for(const[a,f]of t.entries()){const h=r.get(f.id),p=((u=h==null?void 0:h.internals)==null?void 0:u.userNode)??h;p!==void 0&&p!==f&&i.push({id:f.id,item:f,type:"replace"}),p===void 0&&i.push({item:f,type:"add",index:a})}for(const[a]of r)l.get(a)===void 0&&i.push({id:a,type:"remove"});return i}function yp(t){return{id:t.id,type:"remove"}}const OS=T0();function HS(t,r,i={}){return Sw(t,r,{...i,onError:i.onError??OS})}const vp=t=>sw(t),FS=t=>C0(t);function ig(t){return K.forwardRef(t)}const sg=typeof window<"u"?K.useLayoutEffect:K.useEffect;function xp(t){const[r,i]=K.useState(BigInt(0)),[l]=K.useState(()=>VS(()=>i(u=>u+BigInt(1))));return sg(()=>{const u=l.get();u.length&&(t(u),l.reset())},[r]),l}function VS(t){let r=[];return{get:()=>r,reset:()=>{r=[]},push:i=>{r.push(i),t()}}}const lg=K.createContext(null);function BS({children:t}){const r=De(),i=K.useCallback(h=>{const{nodes:p=[],setNodes:g,hasDefaultNodes:y,onNodesChange:v,nodeLookup:m,fitViewQueued:w,onNodesChangeMiddlewareMap:S}=r.getState();let M=p;for(const E of h)M=typeof E=="function"?E(M):E;let N=mp({items:M,lookup:m});for(const E of S.values())N=E(N);y&&g(M),N.length>0?v==null||v(N):w&&window.requestAnimationFrame(()=>{const{fitViewQueued:E,nodes:T,setNodes:_}=r.getState();E&&_(T)})},[]),l=xp(i),u=K.useCallback(h=>{const{edges:p=[],setEdges:g,hasDefaultEdges:y,onEdgesChange:v,edgeLookup:m}=r.getState();let w=p;for(const S of h)w=typeof S=="function"?S(w):S;y?g(w):v&&v(mp({items:w,lookup:m}))},[]),a=xp(u),f=K.useMemo(()=>({nodeQueue:l,edgeQueue:a}),[]);return z.jsx(lg.Provider,{value:f,children:t})}function bS(){const t=K.useContext(lg);if(!t)throw new Error("useBatchContext must be used within a BatchProvider");return t}const US=t=>!!t.panZoom;function Hc(){const t=RS(),r=De(),i=bS(),l=ze(US),u=K.useMemo(()=>{const a=v=>r.getState().nodeLookup.get(v),f=v=>{i.nodeQueue.push(v)},h=v=>{i.edgeQueue.push(v)},p=v=>{var E,T;const{nodeLookup:m,nodeOrigin:w}=r.getState(),S=vp(v)?v:m.get(v.id),M=S.parentId?$0(S.position,S.measured,S.parentId,m,w):S.position,N={...S,position:M,width:((E=S.measured)==null?void 0:E.width)??S.width,height:((T=S.measured)==null?void 0:T.height)??S.height};return _i(N,S.parentId?void 0:w)},g=(v,m,w={replace:!1})=>{f(S=>S.map(M=>{if(M.id===v){const N=typeof m=="function"?m(M):m;return w.replace&&vp(N)?N:{...M,...N}}return M}))},y=(v,m,w={replace:!1})=>{h(S=>S.map(M=>{if(M.id===v){const N=typeof m=="function"?m(M):m;return w.replace&&FS(N)?N:{...M,...N}}return M}))};return{getNodes:()=>r.getState().nodes.map(v=>({...v})),getNode:v=>{var m;return(m=a(v))==null?void 0:m.internals.userNode},getInternalNode:a,getEdges:()=>{const{edges:v=[]}=r.getState();return v.map(m=>({...m}))},getEdge:v=>r.getState().edgeLookup.get(v),setNodes:f,setEdges:h,addNodes:v=>{const m=Array.isArray(v)?v:[v];i.nodeQueue.push(w=>[...w,...m])},addEdges:v=>{const m=Array.isArray(v)?v:[v];i.edgeQueue.push(w=>[...w,...m])},toObject:()=>{const{nodes:v=[],edges:m=[],transform:w}=r.getState(),[S,M,N]=w;return{nodes:v.map(E=>({...E})),edges:m.map(E=>({...E})),viewport:{x:S,y:M,zoom:N}}},deleteElements:async({nodes:v=[],edges:m=[]})=>{const{nodes:w,edges:S,onNodesDelete:M,onEdgesDelete:N,triggerNodeChanges:E,triggerEdgeChanges:T,onDelete:_,onBeforeDelete:P}=r.getState(),{nodes:H,edges:D}=await fw({nodesToRemove:v,edgesToRemove:m,nodes:w,edges:S,onBeforeDelete:P}),V=D.length>0,Y=H.length>0;if(V){const X=D.map(yp);N==null||N(D),T(X)}if(Y){const X=H.map(yp);M==null||M(H),E(X)}return(Y||V)&&(_==null||_({nodes:H,edges:D})),{deletedNodes:H,deletedEdges:D}},getIntersectingNodes:(v,m=!0,w)=>{const S=bh(v),M=S?v:p(v),N=w!==void 0;if(!M)return[];const{nodeOrigin:E}=r.getState();return(w||r.getState().nodes).filter(T=>{const _=r.getState().nodeLookup.get(T.id);if(_&&!S&&(T.id===v.id||!_.internals.positionAbsolute))return!1;const P=_i(N?T:_,E),H=El(P,M);return m&&H>0||H>=P.width*P.height||H>=M.width*M.height})},isNodeIntersecting:(v,m,w=!0)=>{const M=bh(v)?v:p(v);if(!M)return!1;const N=El(M,m);return w&&N>0||N>=m.width*m.height||N>=M.width*M.height},updateNode:g,updateNodeData:(v,m,w={replace:!1})=>{g(v,S=>{const M=typeof m=="function"?m(S):m;return w.replace?{...S,data:M}:{...S,data:{...S.data,...M}}},w)},updateEdge:y,updateEdgeData:(v,m,w={replace:!1})=>{y(v,S=>{const M=typeof m=="function"?m(S):m;return w.replace?{...S,data:M}:{...S,data:{...S.data,...M}}},w)},getNodesBounds:v=>{const{nodeLookup:m,nodeOrigin:w}=r.getState();return lw(v,{nodeLookup:m,nodeOrigin:w})},getHandleConnections:({type:v,id:m,nodeId:w})=>{var S;return Array.from(((S=r.getState().connectionLookup.get(`${w}-${v}${m?`-${m}`:""}`))==null?void 0:S.values())??[])},getNodeConnections:({type:v,handleId:m,nodeId:w})=>{var S;return Array.from(((S=r.getState().connectionLookup.get(`${w}${v?m?`-${v}-${m}`:`-${v}`:""}`))==null?void 0:S.values())??[])},fitView:async v=>{const m=r.getState().fitViewResolver??pw();return r.setState({fitViewQueued:!0,fitViewOptions:v,fitViewResolver:m}),i.nodeQueue.push(w=>[...w]),m.promise}}},[]);return K.useMemo(()=>({...u,...t,viewportInitialized:l}),[l])}const wp=t=>t.selected,WS=typeof window<"u"?window:void 0;function YS({deleteKeyCode:t,multiSelectionKeyCode:r}){const i=De(),{deleteElements:l}=Hc(),u=ki(t,{actInsideInputWithModifier:!1}),a=ki(r,{target:WS});K.useEffect(()=>{if(u){const{edges:f,nodes:h}=i.getState();l({nodes:h.filter(wp),edges:f.filter(wp)}),i.setState({nodesSelectionActive:!1})}},[u]),K.useEffect(()=>{i.setState({multiSelectionActive:a})},[a])}function XS(t){const r=De();K.useEffect(()=>{const i=()=>{var u,a,f,h;if(!t.current||!(((a=(u=t.current).checkVisibility)==null?void 0:a.call(u))??!0))return!1;const l=$c(t.current);(l.height===0||l.width===0)&&((h=(f=r.getState()).onError)==null||h.call(f,"004",Ut.error004())),r.setState({width:l.width||500,height:l.height||500})};if(t.current){i(),window.addEventListener("resize",i);const l=new ResizeObserver(()=>i());return l.observe(t.current),()=>{window.removeEventListener("resize",i),l.disconnect()}}},[])}const Ol={position:"absolute",width:"100%",height:"100%",top:0,left:0},QS=t=>({userSelectionActive:t.userSelectionActive,lib:t.lib,connectionInProgress:t.connection.inProgress});function GS({onPaneContextMenu:t,zoomOnScroll:r=!0,zoomOnPinch:i=!0,panOnScroll:l=!1,panActivationKeyPressed:u,panOnScrollSpeed:a=.5,panOnScrollMode:f=wr.Free,zoomOnDoubleClick:h=!0,panOnDrag:p=!0,defaultViewport:g,translateExtent:y,minZoom:v,maxZoom:m,zoomActivationKeyCode:w,preventScrolling:S=!0,children:M,noWheelClassName:N,noPanClassName:E,onViewportChange:T,isControlledViewport:_,paneClickDistance:P,selectionOnDrag:H}){const D=De(),V=K.useRef(null),{userSelectionActive:Y,lib:X,connectionInProgress:J}=ze(QS,Ve),q=ki(w),ee=K.useRef();XS(V);const Z=K.useCallback(C=>{T==null||T({x:C[0],y:C[1],zoom:C[2]}),_||D.setState({transform:C})},[T,_]);return K.useEffect(()=>{if(V.current){ee.current=Zw({domNode:V.current,minZoom:v,maxZoom:m,translateExtent:y,viewport:g,onDraggingChange:b=>D.setState(R=>R.paneDragging===b?R:{paneDragging:b}),onPanZoomStart:(b,R)=>{const{onViewportChangeStart:$,onMoveStart:O}=D.getState();O==null||O(b,R),$==null||$(R)},onPanZoom:(b,R)=>{const{onViewportChange:$,onMove:O}=D.getState();O==null||O(b,R),$==null||$(R)},onPanZoomEnd:(b,R)=>{const{onViewportChangeEnd:$,onMoveEnd:O}=D.getState();O==null||O(b,R),$==null||$(R)}});const{x:C,y:B,zoom:F}=ee.current.getViewport();return D.setState({panZoom:ee.current,transform:[C,B,F],domNode:V.current.closest(".react-flow")}),()=>{var b;(b=ee.current)==null||b.destroy()}}},[]),K.useEffect(()=>{var C;(C=ee.current)==null||C.update({onPaneContextMenu:t,zoomOnScroll:r,zoomOnPinch:i,panOnScroll:l,panActivationKeyPressed:u,panOnScrollSpeed:a,panOnScrollMode:f,zoomOnDoubleClick:h,panOnDrag:p,zoomActivationKeyPressed:q,preventScrolling:S,noPanClassName:E,userSelectionActive:Y,noWheelClassName:N,lib:X,onTransformChange:Z,connectionInProgress:J,selectionOnDrag:H,paneClickDistance:P})},[t,r,i,l,u,a,f,h,p,q,S,E,Y,N,X,Z,J,H,P]),z.jsx("div",{className:"react-flow__renderer",ref:V,style:Ol,children:M})}const KS=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function qS(){const{userSelectionActive:t,userSelectionRect:r}=ze(KS,Ve);return t&&r?z.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:r.width,height:r.height,transform:`translate(${r.x}px, ${r.y}px)`}}):null}const Za=(t,r)=>i=>{i.target===r.current&&(t==null||t(i))},ZS=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,dragging:t.paneDragging,panBy:t.panBy,autoPanSpeed:t.autoPanSpeed});function JS({isSelecting:t,selectionKeyPressed:r,selectionMode:i=Si.Full,panOnDrag:l,autoPanOnSelection:u,paneClickDistance:a,selectionOnDrag:f,onSelectionStart:h,onSelectionEnd:p,onPaneClick:g,onPaneContextMenu:y,onPaneScroll:v,onPaneMouseEnter:m,onPaneMouseMove:w,onPaneMouseLeave:S,children:M}){const N=K.useRef(0),E=De(),{userSelectionActive:T,elementsSelectable:_,dragging:P,panBy:H,autoPanSpeed:D}=ze(ZS,Ve),V=_&&(t||T),Y=K.useRef(null),X=K.useRef(),J=K.useRef(new Set),q=K.useRef(new Set),ee=K.useRef(!1),Z=K.useRef(!1),C=K.useRef({x:0,y:0}),B=K.useRef(!1),F=Q=>{if(Z.current||ee.current||E.getState().connection.inProgress){Z.current=!1,ee.current=!1;return}const{connectionClickStartHandle:ie,connection:he,onClickConnectEnd:xe,resetSelectedElements:ye}=E.getState();if(ie){const ve=structuredClone(he);delete ve.inProgress,ve.toPosition=ve.toHandle?ve.toHandle.position:null,xe==null||xe(Q.nativeEvent,ve),E.setState({connectionClickStartHandle:null})}g==null||g(Q),ye(),E.setState({nodesSelectionActive:!1})},b=Q=>{if(Array.isArray(l)&&(l!=null&&l.includes(2))){Q.preventDefault();return}y==null||y(Q)},R=v?Q=>v(Q):void 0,$=Q=>{Z.current&&(Q.stopPropagation(),Z.current=!1)},O=Q=>{var Te,st;if(Q.pointerType==="touch"&&l!==!1&&!r)return;const{domNode:ie,transform:he}=E.getState();if(X.current=ie==null?void 0:ie.getBoundingClientRect(),!X.current)return;const xe=Q.target===Y.current;if(!xe&&!!Q.target.closest(".nokey")||!t||!(f&&xe||r)||Q.button!==0||!Q.isPrimary)return;(st=(Te=Q.target)==null?void 0:Te.setPointerCapture)==null||st.call(Te,Q.pointerId),Z.current=!1;const{x:Ee,y:Ne}=bt(Q.nativeEvent,X.current),Me=Ti({x:Ee,y:Ne},he);E.setState({userSelectionRect:{width:0,height:0,startX:Me.x,startY:Me.y,x:Ee,y:Ne}}),xe||(Q.stopPropagation(),Q.preventDefault())};function k(Q,ie){const{userSelectionRect:he}=E.getState();if(!he)return;const{transform:xe,nodeLookup:ye,edgeLookup:ve,connectionLookup:Ee,triggerNodeChanges:Ne,triggerEdgeChanges:Me,defaultEdgeOptions:Te}=E.getState(),st={x:he.startX,y:he.startY},{x:at,y:et}=mo(st,xe),tt={startX:st.x,startY:st.y,x:Q<at?Q:at,y:ie<et?ie:et,width:Math.abs(Q-at),height:Math.abs(ie-et)},on=J.current,Xt=q.current;J.current=new Set(Ic(ye,tt,xe,i===Si.Partial,!0).map(ct=>ct.id)),q.current=new Set;const Qt=(Te==null?void 0:Te.selectable)??!0;for(const ct of J.current){const Ct=Ee.get(ct);if(Ct)for(const{edgeId:yt}of Ct.values()){const Mt=ve.get(yt);Mt&&(Mt.selectable??Qt)&&q.current.add(yt)}}if(!Uh(on,J.current)){const ct=oo(ye,J.current);Ne(ct)}if(!Uh(Xt,q.current)){const ct=oo(ve,q.current);Me(ct)}E.setState({userSelectionRect:tt,userSelectionActive:!0,nodesSelectionActive:!1})}function A(){if(!u||!X.current)return;const[Q,ie]=Tc(C.current,X.current,D);H({x:Q,y:ie}).then(he=>{if(!Z.current||!he){N.current=requestAnimationFrame(A);return}const{x:xe,y:ye}=C.current;k(xe,ye),N.current=requestAnimationFrame(A)})}const oe=()=>{cancelAnimationFrame(N.current),N.current=0,B.current=!1};K.useEffect(()=>()=>oe(),[]);const ne=Q=>{const{userSelectionRect:ie,transform:he,resetSelectedElements:xe}=E.getState();if(!X.current||!ie)return;const{x:ye,y:ve}=bt(Q.nativeEvent,X.current);C.current={x:ye,y:ve};const Ee=mo({x:ie.startX,y:ie.startY},he);if(!Z.current){const Ne=r?0:a;if(Math.hypot(ye-Ee.x,ve-Ee.y)<=Ne)return;xe(),h==null||h(Q)}Z.current=!0,B.current||(A(),B.current=!0),k(ye,ve)},ue=Q=>{var ie,he;if(!V){Q.target===Y.current&&E.getState().connection.inProgress&&(ee.current=!0);return}Q.button===0&&((he=(ie=Q.target)==null?void 0:ie.releasePointerCapture)==null||he.call(ie,Q.pointerId),!T&&Q.target===Y.current&&E.getState().userSelectionRect&&(F==null||F(Q)),E.setState({userSelectionActive:!1,userSelectionRect:null}),Z.current&&(p==null||p(Q),E.setState({nodesSelectionActive:J.current.size>0})),oe())},ce=Q=>{var ie,he;(he=(ie=Q.target)==null?void 0:ie.releasePointerCapture)==null||he.call(ie,Q.pointerId),oe()},ae=l===!0||Array.isArray(l)&&l.includes(0);return z.jsxs("div",{className:We(["react-flow__pane",{draggable:ae,dragging:P,selection:t}]),onClick:V?void 0:Za(F,Y),onContextMenu:Za(b,Y),onWheel:Za(R,Y),onPointerEnter:V?void 0:m,onPointerMove:V?ne:w,onPointerUp:ue,onPointerCancel:V?ce:void 0,onPointerDownCapture:V?O:void 0,onClickCapture:V?$:void 0,onPointerLeave:S,ref:Y,style:Ol,children:[M,z.jsx(qS,{})]})}function mc({id:t,store:r,unselect:i=!1,nodeRef:l}){const{addSelectedNodes:u,unselectNodesAndEdges:a,multiSelectionActive:f,nodeLookup:h,onError:p}=r.getState(),g=h.get(t);if(!g){p==null||p("012",Ut.error012(t));return}r.setState({nodesSelectionActive:!1}),g.selected?(i||g.selected&&f)&&(a({nodes:[g],edges:[]}),requestAnimationFrame(()=>{var y;return(y=l==null?void 0:l.current)==null?void 0:y.blur()})):u([t])}function ug({nodeRef:t,disabled:r=!1,noDragClassName:i,handleSelector:l,nodeId:u,isSelectable:a,nodeClickDistance:f}){const h=De(),[p,g]=K.useState(!1),y=K.useRef();return K.useEffect(()=>{if(!r)return y.current=Ow({getStoreItems:()=>h.getState(),onNodeMouseDown:v=>{mc({id:v,store:h,nodeRef:t})},onDragStart:()=>{g(!0)},onDragStop:()=>{g(!1)}}),()=>{var v;(v=y.current)==null||v.destroy(),y.current=void 0}},[r,h,t]),K.useEffect(()=>{r||!t.current||!y.current||y.current.update({noDragClassName:i,handleSelector:l,domNode:t.current,isSelectable:a,nodeId:u,nodeClickDistance:f})},[i,l,r,a,t,u,f]),p}const e2=t=>r=>r.selected&&(r.draggable||t&&typeof r.draggable>"u");function ag(){const t=De();return K.useCallback(i=>{const{nodeExtent:l,snapToGrid:u,snapGrid:a,nodesDraggable:f,onError:h,updateNodePositions:p,nodeLookup:g,nodeOrigin:y}=t.getState(),v=new Map,m=e2(f),w=u?a[0]:5,S=u?a[1]:5,M=i.direction.x*w*i.factor,N=i.direction.y*S*i.factor;for(const[,E]of g){if(!m(E))continue;let T={x:E.internals.positionAbsolute.x+M,y:E.internals.positionAbsolute.y+N};u&&(T=Ii(T,a));const{position:_,positionAbsolute:P}=M0({nodeId:E.id,nextPosition:T,nodeLookup:g,nodeExtent:l,nodeOrigin:y,onError:h});E.position=_,E.internals.positionAbsolute=P,v.set(E.id,E)}p(v)},[])}const Fc=K.createContext(null),t2=Fc.Provider;Fc.Consumer;const cg=()=>K.useContext(Fc),n2=t=>({connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName,rfId:t.rfId}),fg=K.createContext(null);function r2({children:t}){const r=ze(n2,Ve);return z.jsx(fg.Provider,{value:r,children:t})}function o2(){const t=K.useContext(fg);if(!t)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return t}const i2={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},s2=(t,r,i)=>l=>{const{connectionClickStartHandle:u,connectionMode:a,connection:f}=l,{fromHandle:h,toHandle:p,isValid:g}=f;if(!h&&!u)return i2;const y=(p==null?void 0:p.nodeId)===t&&(p==null?void 0:p.id)===r&&(p==null?void 0:p.type)===i;return{connectingFrom:(h==null?void 0:h.nodeId)===t&&(h==null?void 0:h.id)===r&&(h==null?void 0:h.type)===i,connectingTo:y,clickConnecting:(u==null?void 0:u.nodeId)===t&&(u==null?void 0:u.id)===r&&(u==null?void 0:u.type)===i,isPossibleEndHandle:a===po.Strict?(h==null?void 0:h.type)!==i:t!==(h==null?void 0:h.nodeId)||r!==(h==null?void 0:h.id),connectionInProcess:!!h,clickConnectionInProcess:!!u,valid:y&&g}};function l2({type:t="source",position:r=we.Top,isValidConnection:i,isConnectable:l=!0,isConnectableStart:u=!0,isConnectableEnd:a=!0,id:f,onConnect:h,children:p,className:g,onMouseDown:y,onTouchStart:v,...m},w){var B,F;const S=f||null,M=t==="target",N=De(),E=cg(),{connectOnClick:T,noPanClassName:_,rfId:P}=o2(),{connectingFrom:H,connectingTo:D,clickConnecting:V,isPossibleEndHandle:Y,connectionInProcess:X,clickConnectionInProcess:J,valid:q}=ze(s2(E,S,t),Ve);E||(F=(B=N.getState()).onError)==null||F.call(B,"010",Ut.error010());const ee=b=>{const{defaultEdgeOptions:R,onConnect:$,hasDefaultEdges:O}=N.getState(),k={...R,...b};if(O){const{edges:A,setEdges:oe,onError:ne}=N.getState();oe(HS(k,A,{onError:ne}))}$==null||$(k),h==null||h(k)},Z=b=>{if(!E)return;const R=j0(b.nativeEvent);if(u&&(R&&b.button===0||!R)){const $=N.getState();gc.onPointerDown(b.nativeEvent,{handleDomNode:b.currentTarget,autoPanOnConnect:$.autoPanOnConnect,connectionMode:$.connectionMode,connectionRadius:$.connectionRadius,domNode:$.domNode,nodeLookup:$.nodeLookup,lib:$.lib,isTarget:M,handleId:S,nodeId:E,flowId:$.rfId,panBy:$.panBy,cancelConnection:$.cancelConnection,onConnectStart:$.onConnectStart,onConnectEnd:(...O)=>{var k,A;return(A=(k=N.getState()).onConnectEnd)==null?void 0:A.call(k,...O)},updateConnection:$.updateConnection,onConnect:ee,isValidConnection:i||((...O)=>{var k,A;return((A=(k=N.getState()).isValidConnection)==null?void 0:A.call(k,...O))??!0}),getTransform:()=>N.getState().transform,getFromHandle:()=>N.getState().connection.fromHandle,autoPanSpeed:$.autoPanSpeed,dragThreshold:$.connectionDragThreshold})}R?y==null||y(b):v==null||v(b)},C=b=>{const{onClickConnectStart:R,onClickConnectEnd:$,connectionClickStartHandle:O,connectionMode:k,isValidConnection:A,lib:oe,rfId:ne,nodeLookup:ue,connection:ce}=N.getState();if(!E||!O&&!u)return;if(!O){R==null||R(b.nativeEvent,{nodeId:E,handleId:S,handleType:t}),N.setState({connectionClickStartHandle:{nodeId:E,type:t,id:S}});return}const ae=A0(b.target),Q=i||A,{connection:ie,isValid:he}=gc.isValid(b.nativeEvent,{handle:{nodeId:E,id:S,type:t},connectionMode:k,fromNodeId:O.nodeId,fromHandleId:O.id||null,fromType:O.type,isValidConnection:Q,flowId:ne,doc:ae,lib:oe,nodeLookup:ue});he&&ie&&ee(ie);const xe=structuredClone(ce);delete xe.inProgress,xe.toPosition=xe.toHandle?xe.toHandle.position:null,$==null||$(b,xe),N.setState({connectionClickStartHandle:null})};return z.jsx("div",{"data-handleid":S,"data-nodeid":E,"data-handlepos":r,"data-id":`${P}-${E}-${S}-${t}`,className:We(["react-flow__handle",`react-flow__handle-${r}`,"nodrag",_,g,{source:!M,target:M,connectable:l,connectablestart:u,connectableend:a,clickconnecting:V,connectingfrom:H,connectingto:D,valid:q,connectionindicator:l&&(!X||Y)&&(X||J?a:u)}]),onMouseDown:Z,onTouchStart:Z,onClick:T?C:void 0,ref:w,...m,children:p})}const kl=K.memo(ig(l2));function u2({data:t,isConnectable:r,sourcePosition:i=we.Bottom}){return z.jsxs(z.Fragment,{children:[t==null?void 0:t.label,z.jsx(kl,{type:"source",position:i,isConnectable:r})]})}function a2({data:t,isConnectable:r,targetPosition:i=we.Top,sourcePosition:l=we.Bottom}){return z.jsxs(z.Fragment,{children:[z.jsx(kl,{type:"target",position:i,isConnectable:r}),t==null?void 0:t.label,z.jsx(kl,{type:"source",position:l,isConnectable:r})]})}function c2(){return null}function f2({data:t,isConnectable:r,targetPosition:i=we.Top}){return z.jsxs(z.Fragment,{children:[z.jsx(kl,{type:"target",position:i,isConnectable:r}),t==null?void 0:t.label]})}const Nl={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Sp={input:u2,default:a2,output:f2,group:c2};function d2(t){var r,i,l,u;return t.internals.handleBounds===void 0?{width:t.width??t.initialWidth??((r=t.style)==null?void 0:r.width),height:t.height??t.initialHeight??((i=t.style)==null?void 0:i.height)}:{width:t.width??((l=t.style)==null?void 0:l.width),height:t.height??((u=t.style)==null?void 0:u.height)}}const h2=t=>{const{width:r,height:i,x:l,y:u}=zi(t.nodeLookup,{filter:a=>!!a.selected});return{width:Bt(r)?r:null,height:Bt(i)?i:null,userSelectionActive:t.userSelectionActive,transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]}) translate(${l}px,${u}px)`}};function p2({onSelectionContextMenu:t,noPanClassName:r,disableKeyboardA11y:i}){const l=De(),{width:u,height:a,transformString:f,userSelectionActive:h}=ze(h2,Ve),p=ag(),g=K.useRef(null);K.useEffect(()=>{var w;i||(w=g.current)==null||w.focus({preventScroll:!0})},[i]);const y=!h&&u!==null&&a!==null;if(ug({nodeRef:g,disabled:!y}),!y)return null;const v=t?w=>{const S=l.getState().nodes.filter(M=>M.selected);t(w,S)}:void 0,m=w=>{Object.prototype.hasOwnProperty.call(Nl,w.key)&&(w.preventDefault(),p({direction:Nl[w.key],factor:w.shiftKey?4:1}))};return z.jsx("div",{className:We(["react-flow__nodesselection","react-flow__container",r]),style:{transform:f},children:z.jsx("div",{ref:g,className:"react-flow__nodesselection-rect",onContextMenu:v,tabIndex:i?void 0:-1,onKeyDown:i?void 0:m,style:{width:u,height:a}})})}const _p=typeof window<"u"?window:void 0,g2=t=>({nodesSelectionActive:t.nodesSelectionActive,userSelectionActive:t.userSelectionActive});function dg({children:t,onPaneClick:r,onPaneMouseEnter:i,onPaneMouseMove:l,onPaneMouseLeave:u,onPaneContextMenu:a,onPaneScroll:f,paneClickDistance:h,deleteKeyCode:p,selectionKeyCode:g,selectionOnDrag:y,selectionMode:v,onSelectionStart:m,onSelectionEnd:w,multiSelectionKeyCode:S,panActivationKeyCode:M,zoomActivationKeyCode:N,elementsSelectable:E,zoomOnScroll:T,zoomOnPinch:_,panOnScroll:P,panOnScrollSpeed:H,panOnScrollMode:D,zoomOnDoubleClick:V,panOnDrag:Y,autoPanOnSelection:X,defaultViewport:J,translateExtent:q,minZoom:ee,maxZoom:Z,preventScrolling:C,onSelectionContextMenu:B,noWheelClassName:F,noPanClassName:b,disableKeyboardA11y:R,onViewportChange:$,isControlledViewport:O}){const{nodesSelectionActive:k,userSelectionActive:A}=ze(g2,Ve),oe=ki(g,{target:_p}),ne=ki(M,{target:_p}),ue=ne||Y,ce=ne||P,ae=y&&ue!==!0,Q=oe||A||ae;return YS({deleteKeyCode:p,multiSelectionKeyCode:S}),z.jsx(GS,{onPaneContextMenu:a,elementsSelectable:E,zoomOnScroll:T,zoomOnPinch:_,panOnScroll:ce,panActivationKeyPressed:ne,panOnScrollSpeed:H,panOnScrollMode:D,zoomOnDoubleClick:V,panOnDrag:!oe&&ue,defaultViewport:J,translateExtent:q,minZoom:ee,maxZoom:Z,zoomActivationKeyCode:N,preventScrolling:C,noWheelClassName:F,noPanClassName:b,onViewportChange:$,isControlledViewport:O,paneClickDistance:h,selectionOnDrag:ae,children:z.jsxs(JS,{onSelectionStart:m,onSelectionEnd:w,onPaneClick:r,onPaneMouseEnter:i,onPaneMouseMove:l,onPaneMouseLeave:u,onPaneContextMenu:a,onPaneScroll:f,panOnDrag:ue,autoPanOnSelection:X,isSelecting:!!Q,selectionMode:v,selectionKeyPressed:oe,paneClickDistance:h,selectionOnDrag:ae,children:[t,k&&z.jsx(p2,{onSelectionContextMenu:B,noPanClassName:b,disableKeyboardA11y:R})]})})}dg.displayName="FlowRenderer";const m2=K.memo(dg),y2=t=>r=>t?Ic(r.nodeLookup,{x:0,y:0,width:r.width,height:r.height},r.transform,!0).map(i=>i.id):Array.from(r.nodeLookup.keys());function v2(t){return ze(K.useCallback(y2(t),[t]),Ve)}const x2=t=>t.updateNodeInternals;function w2(){const t=ze(x2),[r]=K.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(i=>{const l=new Map;i.forEach(u=>{const a=u.target.getAttribute("data-id");l.set(a,{id:a,nodeElement:u.target,force:!0})}),t(l)}));return K.useEffect(()=>()=>{r==null||r.disconnect()},[r]),r}function S2({node:t,nodeType:r,hasDimensions:i,resizeObserver:l}){const u=De(),a=K.useRef(null),f=K.useRef(null),h=K.useRef(t.sourcePosition),p=K.useRef(t.targetPosition),g=K.useRef(r),y=i&&!!t.internals.handleBounds;return K.useEffect(()=>{a.current&&!t.hidden&&(!y||f.current!==a.current)&&(f.current&&(l==null||l.unobserve(f.current)),l==null||l.observe(a.current),f.current=a.current)},[y,t.hidden]),K.useEffect(()=>()=>{f.current&&(l==null||l.unobserve(f.current),f.current=null)},[]),K.useEffect(()=>{if(a.current){const v=g.current!==r,m=h.current!==t.sourcePosition,w=p.current!==t.targetPosition;(v||m||w)&&(g.current=r,h.current=t.sourcePosition,p.current=t.targetPosition,u.getState().updateNodeInternals(new Map([[t.id,{id:t.id,nodeElement:a.current,force:!0}]])))}},[t.id,r,t.sourcePosition,t.targetPosition]),a}function _2({id:t,onClick:r,onMouseEnter:i,onMouseMove:l,onMouseLeave:u,onContextMenu:a,onDoubleClick:f,nodesDraggable:h,elementsSelectable:p,nodesConnectable:g,nodesFocusable:y,resizeObserver:v,noDragClassName:m,noPanClassName:w,disableKeyboardA11y:S,rfId:M,nodeTypes:N,nodeClickDistance:E,onError:T}){const{node:_,internals:P,isParent:H}=ze(Q=>{const ie=Q.nodeLookup.get(t),he=Q.parentLookup.has(t);return{node:ie,internals:ie.internals,isParent:he}},Ve);let D=_.type||"default",V=(N==null?void 0:N[D])||Sp[D];V===void 0&&(T==null||T("003",Ut.error003(D)),D="default",V=(N==null?void 0:N.default)||Sp.default);const Y=!!(_.draggable||h&&typeof _.draggable>"u"),X=!!(_.selectable||p&&typeof _.selectable>"u"),J=!!(_.connectable||g&&typeof _.connectable>"u"),q=!!(_.focusable||y&&typeof _.focusable>"u"),ee=De(),Z=L0(_),C=S2({node:_,nodeType:D,hasDimensions:Z,resizeObserver:v}),B=ug({nodeRef:C,disabled:_.hidden||!Y,noDragClassName:m,handleSelector:_.dragHandle,nodeId:t,isSelectable:X,nodeClickDistance:E}),F=ag();if(_.hidden)return null;const b=Yt(_),R=d2(_),$=X||Y||r||i||l||u,O=i?Q=>i(Q,{...P.userNode}):void 0,k=l?Q=>l(Q,{...P.userNode}):void 0,A=u?Q=>u(Q,{...P.userNode}):void 0,oe=a?Q=>a(Q,{...P.userNode}):void 0,ne=f?Q=>f(Q,{...P.userNode}):void 0,ue=Q=>{const{selectNodesOnDrag:ie,nodeDragThreshold:he}=ee.getState();X&&(!ie||!Y||he>0)&&mc({id:t,store:ee,nodeRef:C}),r&&r(Q,{...P.userNode})},ce=Q=>{if(!(D0(Q.nativeEvent)||S)){if(E0.includes(Q.key)&&X){const ie=Q.key==="Escape";mc({id:t,store:ee,unselect:ie,nodeRef:C})}else if(Y&&_.selected&&Object.prototype.hasOwnProperty.call(Nl,Q.key)){Q.preventDefault();const{ariaLabelConfig:ie}=ee.getState();ee.setState({ariaLiveMessage:ie["node.a11yDescription.ariaLiveMessage"]({direction:Q.key.replace("Arrow","").toLowerCase(),x:~~P.positionAbsolute.x,y:~~P.positionAbsolute.y})}),F({direction:Nl[Q.key],factor:Q.shiftKey?4:1})}}},ae=()=>{var Ee;if(S||!((Ee=C.current)!=null&&Ee.matches(":focus-visible")))return;const{transform:Q,width:ie,height:he,autoPanOnNodeFocus:xe,setCenter:ye}=ee.getState();if(!xe)return;Ic(new Map([[t,_]]),{x:0,y:0,width:ie,height:he},Q,!0).length>0||ye(_.position.x+b.width/2,_.position.y+b.height/2,{zoom:Q[2]})};return z.jsx("div",{className:We(["react-flow__node",`react-flow__node-${D}`,{[w]:Y},_.className,{selected:_.selected,selectable:X,parent:H,draggable:Y,dragging:B}]),ref:C,style:{zIndex:P.z,transform:`translate(${P.positionAbsolute.x}px,${P.positionAbsolute.y}px)`,pointerEvents:$?"all":"none",visibility:Z?"visible":"hidden",..._.style,...R},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:O,onMouseMove:k,onMouseLeave:A,onContextMenu:oe,onClick:ue,onDoubleClick:ne,onKeyDown:q?ce:void 0,tabIndex:q?0:void 0,onFocus:q?ae:void 0,role:_.ariaRole??(q?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${tg}-${M}`,"aria-label":_.ariaLabel,..._.domAttributes,children:z.jsx(t2,{value:t,children:z.jsx(V,{id:t,data:_.data,type:D,positionAbsoluteX:P.positionAbsolute.x,positionAbsoluteY:P.positionAbsolute.y,selected:_.selected??!1,selectable:X,draggable:Y,deletable:_.deletable??!0,isConnectable:J,sourcePosition:_.sourcePosition,targetPosition:_.targetPosition,dragging:B,dragHandle:_.dragHandle,zIndex:P.z,parentId:_.parentId,...b})})})}var E2=K.memo(_2);const k2=t=>({nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,onError:t.onError});function hg(t){const{nodesConnectable:r,nodesFocusable:i,elementsSelectable:l,onError:u}=ze(k2,Ve),a=v2(t.onlyRenderVisibleElements),f=w2();return z.jsx("div",{className:"react-flow__nodes",style:Ol,children:a.map(h=>z.jsx(E2,{id:h,nodeTypes:t.nodeTypes,nodeExtent:t.nodeExtent,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,rfId:t.rfId,disableKeyboardA11y:t.disableKeyboardA11y,resizeObserver:f,nodesDraggable:t.nodesDraggable??!0,nodesConnectable:r,nodesFocusable:i,elementsSelectable:l,nodeClickDistance:t.nodeClickDistance,onError:u},h))})}hg.displayName="NodeRenderer";const N2=K.memo(hg);function C2(t){return ze(K.useCallback(i=>{if(!t)return i.edges.map(u=>u.id);const l=[];if(i.width&&i.height)for(const u of i.edges){const a=i.nodeLookup.get(u.source),f=i.nodeLookup.get(u.target);a&&f&&vw({sourceNode:a,targetNode:f,width:i.width,height:i.height,transform:i.transform})&&l.push(u.id)}return l},[t]),Ve)}const M2=({color:t="none",strokeWidth:r=1})=>{const i={strokeWidth:r,...t&&{stroke:t}};return z.jsx("polyline",{className:"arrow",style:i,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},P2=({color:t="none",strokeWidth:r=1})=>{const i={strokeWidth:r,...t&&{stroke:t,fill:t}};return z.jsx("polyline",{className:"arrowclosed",style:i,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Ep={[Sl.Arrow]:M2,[Sl.ArrowClosed]:P2};function z2(t){const r=De();return K.useMemo(()=>{var u,a;return Object.prototype.hasOwnProperty.call(Ep,t)?Ep[t]:((a=(u=r.getState()).onError)==null||a.call(u,"009",Ut.error009(t)),null)},[t])}const I2=({id:t,type:r,color:i,width:l=12.5,height:u=12.5,markerUnits:a="strokeWidth",strokeWidth:f,orient:h="auto-start-reverse"})=>{const p=z2(r);return p?z.jsx("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${l}`,markerHeight:`${u}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:h,refX:"0",refY:"0",children:z.jsx(p,{color:i,strokeWidth:f})}):null},pg=({defaultColor:t,rfId:r})=>{const i=ze(a=>a.edges),l=ze(a=>a.defaultEdgeOptions),u=K.useMemo(()=>Mw(i,{id:r,defaultColor:t,defaultMarkerStart:l==null?void 0:l.markerStart,defaultMarkerEnd:l==null?void 0:l.markerEnd}),[i,l,r,t]);return u.length?z.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:z.jsx("defs",{children:u.map(a=>z.jsx(I2,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};pg.displayName="MarkerDefinitions";var T2=K.memo(pg);function gg({x:t,y:r,label:i,labelStyle:l,labelShowBg:u=!0,labelBgStyle:a,labelBgPadding:f=[2,4],labelBgBorderRadius:h=2,children:p,className:g,...y}){const[v,m]=K.useState({x:1,y:0,width:0,height:0}),w=We(["react-flow__edge-textwrapper",g]),S=K.useRef(null);return K.useEffect(()=>{if(S.current){const M=S.current.getBBox();m({x:M.x,y:M.y,width:M.width,height:M.height})}},[i]),i?z.jsxs("g",{transform:`translate(${t-v.width/2} ${r-v.height/2})`,className:w,visibility:v.width?"visible":"hidden",...y,children:[u&&z.jsx("rect",{width:v.width+2*f[0],x:-f[0],y:-f[1],height:v.height+2*f[1],className:"react-flow__edge-textbg",style:a,rx:h,ry:h}),z.jsx("text",{className:"react-flow__edge-text",y:v.height/2,dy:"0.3em",ref:S,style:l,children:i}),p]}):null}gg.displayName="EdgeText";const L2=K.memo(gg);function Hl({path:t,labelX:r,labelY:i,label:l,labelStyle:u,labelShowBg:a,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:p,interactionWidth:g=20,...y}){return z.jsxs(z.Fragment,{children:[z.jsx("path",{...y,d:t,fill:"none",className:We(["react-flow__edge-path",y.className])}),g?z.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:g,className:"react-flow__edge-interaction"}):null,l&&Bt(r)&&Bt(i)?z.jsx(L2,{x:r,y:i,label:l,labelStyle:u,labelShowBg:a,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:p}):null]})}function kp({pos:t,x1:r,y1:i,x2:l,y2:u}){return t===we.Left||t===we.Right?[.5*(r+l),i]:[r,.5*(i+u)]}function mg({sourceX:t,sourceY:r,sourcePosition:i=we.Bottom,targetX:l,targetY:u,targetPosition:a=we.Top}){const[f,h]=kp({pos:i,x1:t,y1:r,x2:l,y2:u}),[p,g]=kp({pos:a,x1:l,y1:u,x2:t,y2:r}),[y,v,m,w]=O0({sourceX:t,sourceY:r,targetX:l,targetY:u,sourceControlX:f,sourceControlY:h,targetControlX:p,targetControlY:g});return[`M${t},${r} C${f},${h} ${p},${g} ${l},${u}`,y,v,m,w]}function yg(t){return K.memo(({id:r,sourceX:i,sourceY:l,targetX:u,targetY:a,sourcePosition:f,targetPosition:h,label:p,labelStyle:g,labelShowBg:y,labelBgStyle:v,labelBgPadding:m,labelBgBorderRadius:w,style:S,markerEnd:M,markerStart:N,interactionWidth:E})=>{const[T,_,P]=mg({sourceX:i,sourceY:l,sourcePosition:f,targetX:u,targetY:a,targetPosition:h}),H=t.isInternal?void 0:r;return z.jsx(Hl,{id:H,path:T,labelX:_,labelY:P,label:p,labelStyle:g,labelShowBg:y,labelBgStyle:v,labelBgPadding:m,labelBgBorderRadius:w,style:S,markerEnd:M,markerStart:N,interactionWidth:E})})}const $2=yg({isInternal:!1}),vg=yg({isInternal:!0});$2.displayName="SimpleBezierEdge";vg.displayName="SimpleBezierEdgeInternal";function xg(t){return K.memo(({id:r,sourceX:i,sourceY:l,targetX:u,targetY:a,label:f,labelStyle:h,labelShowBg:p,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:v,style:m,sourcePosition:w=we.Bottom,targetPosition:S=we.Top,markerEnd:M,markerStart:N,pathOptions:E,interactionWidth:T})=>{const[_,P,H]=dc({sourceX:i,sourceY:l,sourcePosition:w,targetX:u,targetY:a,targetPosition:S,borderRadius:E==null?void 0:E.borderRadius,offset:E==null?void 0:E.offset,stepPosition:E==null?void 0:E.stepPosition}),D=t.isInternal?void 0:r;return z.jsx(Hl,{id:D,path:_,labelX:P,labelY:H,label:f,labelStyle:h,labelShowBg:p,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:v,style:m,markerEnd:M,markerStart:N,interactionWidth:T})})}const wg=xg({isInternal:!1}),Sg=xg({isInternal:!0});wg.displayName="SmoothStepEdge";Sg.displayName="SmoothStepEdgeInternal";function _g(t){return K.memo(({id:r,...i})=>{var u;const l=t.isInternal?void 0:r;return z.jsx(wg,{...i,id:l,pathOptions:K.useMemo(()=>{var a;return{borderRadius:0,offset:(a=i.pathOptions)==null?void 0:a.offset}},[(u=i.pathOptions)==null?void 0:u.offset])})})}const R2=_g({isInternal:!1}),Eg=_g({isInternal:!0});R2.displayName="StepEdge";Eg.displayName="StepEdgeInternal";function kg(t){return K.memo(({id:r,sourceX:i,sourceY:l,targetX:u,targetY:a,label:f,labelStyle:h,labelShowBg:p,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:v,style:m,markerEnd:w,markerStart:S,interactionWidth:M})=>{const[N,E,T]=V0({sourceX:i,sourceY:l,targetX:u,targetY:a}),_=t.isInternal?void 0:r;return z.jsx(Hl,{id:_,path:N,labelX:E,labelY:T,label:f,labelStyle:h,labelShowBg:p,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:v,style:m,markerEnd:w,markerStart:S,interactionWidth:M})})}const A2=kg({isInternal:!1}),Ng=kg({isInternal:!0});A2.displayName="StraightEdge";Ng.displayName="StraightEdgeInternal";function Cg(t){return K.memo(({id:r,sourceX:i,sourceY:l,targetX:u,targetY:a,sourcePosition:f=we.Bottom,targetPosition:h=we.Top,label:p,labelStyle:g,labelShowBg:y,labelBgStyle:v,labelBgPadding:m,labelBgBorderRadius:w,style:S,markerEnd:M,markerStart:N,pathOptions:E,interactionWidth:T})=>{const[_,P,H]=H0({sourceX:i,sourceY:l,sourcePosition:f,targetX:u,targetY:a,targetPosition:h,curvature:E==null?void 0:E.curvature}),D=t.isInternal?void 0:r;return z.jsx(Hl,{id:D,path:_,labelX:P,labelY:H,label:p,labelStyle:g,labelShowBg:y,labelBgStyle:v,labelBgPadding:m,labelBgBorderRadius:w,style:S,markerEnd:M,markerStart:N,interactionWidth:T})})}const D2=Cg({isInternal:!1}),Mg=Cg({isInternal:!0});D2.displayName="BezierEdge";Mg.displayName="BezierEdgeInternal";const Np={default:Mg,straight:Ng,step:Eg,smoothstep:Sg,simplebezier:vg},Cp={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},j2=(t,r,i)=>i===we.Left?t-r:i===we.Right?t+r:t,O2=(t,r,i)=>i===we.Top?t-r:i===we.Bottom?t+r:t,Mp="react-flow__edgeupdater";function Pp({position:t,centerX:r,centerY:i,radius:l=10,onMouseDown:u,onMouseEnter:a,onMouseOut:f,type:h}){return z.jsx("circle",{onMouseDown:u,onMouseEnter:a,onMouseOut:f,className:We([Mp,`${Mp}-${h}`]),cx:j2(r,l,t),cy:O2(i,l,t),r:l,stroke:"transparent",fill:"transparent"})}function H2({isReconnectable:t,reconnectRadius:r,edge:i,sourceX:l,sourceY:u,targetX:a,targetY:f,sourcePosition:h,targetPosition:p,onReconnect:g,onReconnectStart:y,onReconnectEnd:v,setReconnecting:m,setUpdateHover:w}){const S=De(),M=(P,H)=>{if(P.button!==0)return;const{autoPanOnConnect:D,domNode:V,connectionMode:Y,connectionRadius:X,lib:J,onConnectStart:q,cancelConnection:ee,nodeLookup:Z,rfId:C,panBy:B,updateConnection:F}=S.getState(),b=H.type==="target",R=(k,A)=>{m(!1),v==null||v(k,i,H.type,A)},$=k=>g==null?void 0:g(i,k),O=(k,A)=>{m(!0),y==null||y(P,i,H.type),q==null||q(k,A)};gc.onPointerDown(P.nativeEvent,{autoPanOnConnect:D,connectionMode:Y,connectionRadius:X,domNode:V,handleId:H.id,nodeId:H.nodeId,nodeLookup:Z,isTarget:b,edgeUpdaterType:H.type,lib:J,flowId:C,cancelConnection:ee,panBy:B,isValidConnection:(...k)=>{var A,oe;return((oe=(A=S.getState()).isValidConnection)==null?void 0:oe.call(A,...k))??!0},onConnect:$,onConnectStart:O,onConnectEnd:(...k)=>{var A,oe;return(oe=(A=S.getState()).onConnectEnd)==null?void 0:oe.call(A,...k)},onReconnectEnd:R,updateConnection:F,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,dragThreshold:S.getState().connectionDragThreshold,handleDomNode:P.currentTarget})},N=P=>M(P,{nodeId:i.target,id:i.targetHandle??null,type:"target"}),E=P=>M(P,{nodeId:i.source,id:i.sourceHandle??null,type:"source"}),T=()=>w(!0),_=()=>w(!1);return z.jsxs(z.Fragment,{children:[(t===!0||t==="source")&&z.jsx(Pp,{position:h,centerX:l,centerY:u,radius:r,onMouseDown:N,onMouseEnter:T,onMouseOut:_,type:"source"}),(t===!0||t==="target")&&z.jsx(Pp,{position:p,centerX:a,centerY:f,radius:r,onMouseDown:E,onMouseEnter:T,onMouseOut:_,type:"target"})]})}function F2({id:t,edgesFocusable:r,edgesReconnectable:i,elementsSelectable:l,onClick:u,onDoubleClick:a,onContextMenu:f,onMouseEnter:h,onMouseMove:p,onMouseLeave:g,reconnectRadius:y,onReconnect:v,onReconnectStart:m,onReconnectEnd:w,rfId:S,edgeTypes:M,noPanClassName:N,onError:E,disableKeyboardA11y:T}){let _=ze(ye=>ye.edgeLookup.get(t));const P=ze(ye=>ye.defaultEdgeOptions);_=P?{...P,..._}:_;let H=_.type||"default",D=(M==null?void 0:M[H])||Np[H];D===void 0&&(E==null||E("011",Ut.error011(H)),H="default",D=(M==null?void 0:M.default)||Np.default);const V=!!(_.focusable||r&&typeof _.focusable>"u"),Y=typeof v<"u"&&(_.reconnectable||i&&typeof _.reconnectable>"u"),X=!!(_.selectable||l&&typeof _.selectable>"u"),J=K.useRef(null),[q,ee]=K.useState(!1),[Z,C]=K.useState(!1),B=De(),{zIndex:F=_.zIndex,sourceX:b,sourceY:R,targetX:$,targetY:O,sourcePosition:k,targetPosition:A}=ze(K.useCallback(ye=>{const ve=ye.nodeLookup.get(_.source),Ee=ye.nodeLookup.get(_.target);if(!ve||!Ee)return Cp;const Ne=Cw({id:t,sourceNode:ve,targetNode:Ee,sourceHandle:_.sourceHandle||null,targetHandle:_.targetHandle||null,connectionMode:ye.connectionMode,onError:E}),Me=yw({selected:_.selected,zIndex:_.zIndex,sourceNode:ve,targetNode:Ee,elevateOnSelect:ye.elevateEdgesOnSelect,zIndexMode:ye.zIndexMode});return{...Ne||Cp,zIndex:Me}},[_.source,_.target,_.sourceHandle,_.targetHandle,_.selected,_.zIndex,E]),Ve),oe=K.useMemo(()=>_.markerStart?`url('#${hc(_.markerStart,S)}')`:void 0,[_.markerStart,S]),ne=K.useMemo(()=>_.markerEnd?`url('#${hc(_.markerEnd,S)}')`:void 0,[_.markerEnd,S]);if(_.hidden||b===null||R===null||$===null||O===null)return null;const ue=ye=>{var Me;const{addSelectedEdges:ve,unselectNodesAndEdges:Ee,multiSelectionActive:Ne}=B.getState();X&&(B.setState({nodesSelectionActive:!1}),_.selected&&Ne?(Ee({nodes:[],edges:[_]}),(Me=J.current)==null||Me.blur()):ve([t])),u&&u(ye,_)},ce=a?ye=>{a(ye,{..._})}:void 0,ae=f?ye=>{f(ye,{..._})}:void 0,Q=h?ye=>{h(ye,{..._})}:void 0,ie=p?ye=>{p(ye,{..._})}:void 0,he=g?ye=>{g(ye,{..._})}:void 0,xe=ye=>{var ve;if(!T&&E0.includes(ye.key)&&X){const{unselectNodesAndEdges:Ee,addSelectedEdges:Ne}=B.getState();ye.key==="Escape"?((ve=J.current)==null||ve.blur(),Ee({edges:[_]})):Ne([t])}};return z.jsx("svg",{style:{zIndex:F},children:z.jsxs("g",{className:We(["react-flow__edge",`react-flow__edge-${H}`,_.className,N,{selected:_.selected,animated:_.animated,inactive:!X&&!u,updating:q,selectable:X}]),onClick:ue,onDoubleClick:ce,onContextMenu:ae,onMouseEnter:Q,onMouseMove:ie,onMouseLeave:he,onKeyDown:V?xe:void 0,tabIndex:V?0:void 0,role:_.ariaRole??(V?"group":"img"),"aria-roledescription":"edge","data-id":t,"data-testid":`rf__edge-${t}`,"aria-label":_.ariaLabel===null?void 0:_.ariaLabel||`Edge from ${_.source} to ${_.target}`,"aria-describedby":V?`${ng}-${S}`:void 0,ref:J,..._.domAttributes,children:[!Z&&z.jsx(D,{id:t,source:_.source,target:_.target,type:_.type,selected:_.selected,animated:_.animated,selectable:X,deletable:_.deletable??!0,label:_.label,labelStyle:_.labelStyle,labelShowBg:_.labelShowBg,labelBgStyle:_.labelBgStyle,labelBgPadding:_.labelBgPadding,labelBgBorderRadius:_.labelBgBorderRadius,sourceX:b,sourceY:R,targetX:$,targetY:O,sourcePosition:k,targetPosition:A,data:_.data,style:_.style,sourceHandleId:_.sourceHandle,targetHandleId:_.targetHandle,markerStart:oe,markerEnd:ne,pathOptions:"pathOptions"in _?_.pathOptions:void 0,interactionWidth:_.interactionWidth}),Y&&z.jsx(H2,{edge:_,isReconnectable:Y,reconnectRadius:y,onReconnect:v,onReconnectStart:m,onReconnectEnd:w,sourceX:b,sourceY:R,targetX:$,targetY:O,sourcePosition:k,targetPosition:A,setUpdateHover:ee,setReconnecting:C})]})})}var V2=K.memo(F2);const B2=t=>({edgesFocusable:t.edgesFocusable,edgesReconnectable:t.edgesReconnectable,elementsSelectable:t.elementsSelectable,connectionMode:t.connectionMode,onError:t.onError});function Pg({defaultMarkerColor:t,onlyRenderVisibleElements:r,rfId:i,edgeTypes:l,noPanClassName:u,onReconnect:a,onEdgeContextMenu:f,onEdgeMouseEnter:h,onEdgeMouseMove:p,onEdgeMouseLeave:g,onEdgeClick:y,reconnectRadius:v,onEdgeDoubleClick:m,onReconnectStart:w,onReconnectEnd:S,disableKeyboardA11y:M}){const{edgesFocusable:N,edgesReconnectable:E,elementsSelectable:T,onError:_}=ze(B2,Ve),P=C2(r);return z.jsxs("div",{className:"react-flow__edges",children:[z.jsx(T2,{defaultColor:t,rfId:i}),P.map(H=>z.jsx(V2,{id:H,edgesFocusable:N,edgesReconnectable:E,elementsSelectable:T,noPanClassName:u,onReconnect:a,onContextMenu:f,onMouseEnter:h,onMouseMove:p,onMouseLeave:g,onClick:y,reconnectRadius:v,onDoubleClick:m,onReconnectStart:w,onReconnectEnd:S,rfId:i,onError:_,edgeTypes:l,disableKeyboardA11y:M},H))]})}Pg.displayName="EdgeRenderer";const b2=K.memo(Pg),zp=t=>`translate(${t[0]}px,${t[1]}px) scale(${t[2]})`;function U2({children:t}){const r=De(),i=K.useRef(null),[l]=K.useState(()=>r.getState().transform);return sg(()=>{let u=null;const a=()=>{const f=r.getState().transform;u&&f[0]===u[0]&&f[1]===u[1]&&f[2]===u[2]||(u=f,i.current&&(i.current.style.transform=zp(f)))};return a(),r.subscribe(a)},[r]),z.jsx("div",{ref:i,className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:zp(l)},children:t})}function W2(t){const r=Hc(),i=K.useRef(!1);K.useEffect(()=>{!i.current&&r.viewportInitialized&&t&&(setTimeout(()=>t(r),1),i.current=!0)},[t,r.viewportInitialized])}const Y2=t=>{var r;return(r=t.panZoom)==null?void 0:r.syncViewport};function X2(t){const r=ze(Y2),i=De();return K.useEffect(()=>{t&&(r==null||r(t),i.setState({transform:[t.x,t.y,t.zoom]}))},[t,r]),null}function Q2(t){return t.connection.inProgress?{...t.connection,to:Ti(t.connection.to,t.transform)}:{...t.connection}}function G2(t){return Q2}function K2(t){const r=G2();return ze(r,Ve)}const q2=t=>({nodesConnectable:t.nodesConnectable,isValid:t.connection.isValid,inProgress:t.connection.inProgress,width:t.width,height:t.height});function Z2({containerStyle:t,style:r,type:i,component:l}){const{nodesConnectable:u,width:a,height:f,isValid:h,inProgress:p}=ze(q2,Ve);return!(a&&u&&p)?null:z.jsx("svg",{style:t,width:a,height:f,className:"react-flow__connectionline react-flow__container",children:z.jsx("g",{className:We(["react-flow__connection",R0(h)]),children:z.jsx(zg,{style:r,type:i,CustomComponent:l,isValid:h})})})}const zg=({style:t,type:r=Wn.Bezier,CustomComponent:i,isValid:l})=>{const{inProgress:u,from:a,fromNode:f,fromHandle:h,fromPosition:p,to:g,toNode:y,toHandle:v,toPosition:m,pointer:w}=K2();if(!u)return;if(i)return z.jsx(i,{connectionLineType:r,connectionLineStyle:t,fromNode:f,fromHandle:h,fromX:a.x,fromY:a.y,toX:g.x,toY:g.y,fromPosition:p,toPosition:m,connectionStatus:R0(l),toNode:y,toHandle:v,pointer:w});let S="";const M={sourceX:a.x,sourceY:a.y,sourcePosition:p,targetX:g.x,targetY:g.y,targetPosition:m};switch(r){case Wn.Bezier:[S]=H0(M);break;case Wn.SimpleBezier:[S]=mg(M);break;case Wn.Step:[S]=dc({...M,borderRadius:0});break;case Wn.SmoothStep:[S]=dc(M);break;default:[S]=V0(M)}return z.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:t})};zg.displayName="ConnectionLine";const J2={};function Ip(t=J2){K.useRef(t),De(),K.useEffect(()=>{},[t])}function e_(){De(),K.useRef(!1),K.useEffect(()=>{},[])}function Ig({nodeTypes:t,edgeTypes:r,onInit:i,onNodeClick:l,onEdgeClick:u,onNodeDoubleClick:a,onEdgeDoubleClick:f,onNodeMouseEnter:h,onNodeMouseMove:p,onNodeMouseLeave:g,onNodeContextMenu:y,onSelectionContextMenu:v,onSelectionStart:m,onSelectionEnd:w,connectionLineType:S,connectionLineStyle:M,connectionLineComponent:N,connectionLineContainerStyle:E,selectionKeyCode:T,selectionOnDrag:_,selectionMode:P,multiSelectionKeyCode:H,panActivationKeyCode:D,zoomActivationKeyCode:V,deleteKeyCode:Y,onlyRenderVisibleElements:X,elementsSelectable:J,defaultViewport:q,translateExtent:ee,minZoom:Z,maxZoom:C,preventScrolling:B,defaultMarkerColor:F,zoomOnScroll:b,zoomOnPinch:R,panOnScroll:$,panOnScrollSpeed:O,panOnScrollMode:k,zoomOnDoubleClick:A,panOnDrag:oe,autoPanOnSelection:ne,onPaneClick:ue,onPaneMouseEnter:ce,onPaneMouseMove:ae,onPaneMouseLeave:Q,onPaneScroll:ie,onPaneContextMenu:he,paneClickDistance:xe,nodeClickDistance:ye,onEdgeContextMenu:ve,onEdgeMouseEnter:Ee,onEdgeMouseMove:Ne,onEdgeMouseLeave:Me,reconnectRadius:Te,onReconnect:st,onReconnectStart:at,onReconnectEnd:et,noDragClassName:tt,noWheelClassName:on,noPanClassName:Xt,disableKeyboardA11y:Qt,nodeExtent:ct,rfId:Ct,viewport:yt,onViewportChange:Mt,nodesDraggable:Mr}){return Ip(t),Ip(r),e_(),W2(i),X2(yt),z.jsx(m2,{onPaneClick:ue,onPaneMouseEnter:ce,onPaneMouseMove:ae,onPaneMouseLeave:Q,onPaneContextMenu:he,onPaneScroll:ie,paneClickDistance:xe,deleteKeyCode:Y,selectionKeyCode:T,selectionOnDrag:_,selectionMode:P,onSelectionStart:m,onSelectionEnd:w,multiSelectionKeyCode:H,panActivationKeyCode:D,zoomActivationKeyCode:V,elementsSelectable:J,zoomOnScroll:b,zoomOnPinch:R,zoomOnDoubleClick:A,panOnScroll:$,panOnScrollSpeed:O,panOnScrollMode:k,panOnDrag:oe,autoPanOnSelection:ne,defaultViewport:q,translateExtent:ee,minZoom:Z,maxZoom:C,onSelectionContextMenu:v,preventScrolling:B,noDragClassName:tt,noWheelClassName:on,noPanClassName:Xt,disableKeyboardA11y:Qt,onViewportChange:Mt,isControlledViewport:!!yt,children:z.jsxs(U2,{children:[z.jsx(b2,{edgeTypes:r,onEdgeClick:u,onEdgeDoubleClick:f,onReconnect:st,onReconnectStart:at,onReconnectEnd:et,onlyRenderVisibleElements:X,onEdgeContextMenu:ve,onEdgeMouseEnter:Ee,onEdgeMouseMove:Ne,onEdgeMouseLeave:Me,reconnectRadius:Te,defaultMarkerColor:F,noPanClassName:Xt,disableKeyboardA11y:Qt,rfId:Ct}),z.jsx(Z2,{style:M,type:S,component:N,containerStyle:E}),z.jsx("div",{className:"react-flow__edgelabel-renderer"}),z.jsx(N2,{nodeTypes:t,onNodeClick:l,onNodeDoubleClick:a,onNodeMouseEnter:h,onNodeMouseMove:p,onNodeMouseLeave:g,onNodeContextMenu:y,nodeClickDistance:ye,onlyRenderVisibleElements:X,noPanClassName:Xt,noDragClassName:tt,disableKeyboardA11y:Qt,nodeExtent:ct,rfId:Ct,nodesDraggable:Mr}),z.jsx("div",{className:"react-flow__viewport-portal"})]})})}Ig.displayName="GraphView";const t_=K.memo(Ig),n_=T0(),Tp=({nodes:t,edges:r,defaultNodes:i,defaultEdges:l,width:u,height:a,fitView:f,fitViewOptions:h,minZoom:p=.5,maxZoom:g=2,nodeOrigin:y,nodeExtent:v,zIndexMode:m="basic"}={})=>{const w=new Map,S=new Map,M=new Map,N=new Map,E=l??r??[],T=i??t??[],_=y??[0,0],P=v??wi;U0(M,N,E);const{nodesInitialized:H}=pc(T,w,S,{nodeOrigin:_,nodeExtent:P,zIndexMode:m});let D=[0,0,1];if(f&&u&&a){const V=zi(w,{filter:q=>!!((q.width||q.initialWidth)&&(q.height||q.initialHeight))}),{x:Y,y:X,zoom:J}=Lc(V,u,a,p,g,(h==null?void 0:h.padding)??.1);D=[Y,X,J]}return{rfId:"1",width:u??0,height:a??0,transform:D,nodes:T,nodesInitialized:H,nodeLookup:w,parentLookup:S,edges:E,edgeLookup:N,connectionLookup:M,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:i!==void 0,hasDefaultEdges:l!==void 0,panZoom:null,minZoom:p,maxZoom:g,translateExtent:wi,nodeExtent:P,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:po.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:_,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:f??!1,fitViewOptions:h,fitViewResolver:null,connection:{...N0},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:n_,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:k0,zIndexMode:m,defaultEdgeOptions:void 0,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map,onNodesDelete:void 0,onEdgesDelete:void 0,onDelete:void 0,onBeforeDelete:void 0,onViewportChangeStart:void 0,onViewportChange:void 0,onViewportChangeEnd:void 0,onNodeDragStart:void 0,onNodeDrag:void 0,onNodeDragStop:void 0,onSelectionDragStart:void 0,onSelectionDrag:void 0,onSelectionDragStop:void 0,onMoveStart:void 0,onMove:void 0,onMoveEnd:void 0,onConnect:void 0,onConnectStart:void 0,onConnectEnd:void 0,onClickConnectStart:void 0,onClickConnectEnd:void 0}},r_=({nodes:t,edges:r,defaultNodes:i,defaultEdges:l,width:u,height:a,fitView:f,fitViewOptions:h,minZoom:p,maxZoom:g,nodeOrigin:y,nodeExtent:v,zIndexMode:m})=>gS((w,S)=>{async function M(){const{nodeLookup:N,panZoom:E,fitViewOptions:T,fitViewResolver:_,width:P,height:H,minZoom:D,maxZoom:V}=S();E&&(await cw({nodes:N,width:P,height:H,panZoom:E,minZoom:D,maxZoom:V},T),_==null||_.resolve(!0),w({fitViewResolver:null}))}return{...Tp({nodes:t,edges:r,width:u,height:a,fitView:f,fitViewOptions:h,minZoom:p,maxZoom:g,nodeOrigin:y,nodeExtent:v,defaultNodes:i,defaultEdges:l,zIndexMode:m}),setNodes:N=>{const{nodeLookup:E,parentLookup:T,nodeOrigin:_,nodeExtent:P,elevateNodesOnSelect:H,fitViewQueued:D,zIndexMode:V,nodesSelectionActive:Y}=S(),{nodesInitialized:X,hasSelectedNodes:J}=pc(N,E,T,{nodeOrigin:_,nodeExtent:P,elevateNodesOnSelect:H,checkEquality:!0,zIndexMode:V}),q=Y&&J;D&&X?(M(),w({nodes:N,nodesInitialized:X,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:q})):w({nodes:N,nodesInitialized:X,nodesSelectionActive:q})},setEdges:N=>{const{connectionLookup:E,edgeLookup:T}=S();U0(E,T,N),w({edges:N})},setDefaultNodesAndEdges:(N,E)=>{if(N){const{setNodes:T}=S();T(N),w({hasDefaultNodes:!0})}if(E){const{setEdges:T}=S();T(E),w({hasDefaultEdges:!0})}},updateNodeInternals:N=>{const{triggerNodeChanges:E,nodeLookup:T,parentLookup:_,domNode:P,nodeOrigin:H,nodeExtent:D,debug:V,fitViewQueued:Y,zIndexMode:X}=S(),{changes:J,updatedInternals:q}=Rw(N,T,_,P,H,D,X);q&&(Iw(T,_,{nodeOrigin:H,nodeExtent:D,zIndexMode:X}),Y?(M(),w({fitViewQueued:!1,fitViewOptions:void 0})):w({}),(J==null?void 0:J.length)>0&&(V&&console.log("React Flow: trigger node changes",J),E==null||E(J)))},updateNodePositions:(N,E=!1)=>{const T=[];let _=[];const{nodeLookup:P,triggerNodeChanges:H,connection:D,updateConnection:V,onNodesChangeMiddlewareMap:Y}=S();for(const[X,J]of N){const q=P.get(X),ee=!!(q!=null&&q.expandParent&&(q!=null&&q.parentId)&&(J!=null&&J.position)),Z={id:X,type:"position",position:ee?{x:Math.max(0,J.position.x),y:Math.max(0,J.position.y)}:J.position,dragging:E};if(q&&D.inProgress&&D.fromNode.id===q.id){const C=Cr(q,D.fromHandle,we.Left,!0);V({...D,from:C})}ee&&q.parentId&&T.push({id:X,parentId:q.parentId,rect:{...J.internals.positionAbsolute,width:J.measured.width??0,height:J.measured.height??0}}),_.push(Z)}if(T.length>0){const{parentLookup:X,nodeOrigin:J}=S(),q=Oc(T,P,X,J);_.push(...q)}for(const X of Y.values())_=X(_);H(_)},triggerNodeChanges:N=>{const{onNodesChange:E,setNodes:T,nodes:_,hasDefaultNodes:P,debug:H}=S();if(N!=null&&N.length){if(P){const D=DS(N,_);T(D)}H&&console.log("React Flow: trigger node changes",N),E==null||E(N)}},triggerEdgeChanges:N=>{const{onEdgesChange:E,setEdges:T,edges:_,hasDefaultEdges:P,debug:H}=S();if(N!=null&&N.length){if(P){const D=jS(N,_);T(D)}H&&console.log("React Flow: trigger edge changes",N),E==null||E(N)}},addSelectedNodes:N=>{const{multiSelectionActive:E,edgeLookup:T,nodeLookup:_,triggerNodeChanges:P,triggerEdgeChanges:H}=S();if(E){const D=N.map(V=>pr(V,!0));P(D);return}P(oo(_,new Set([...N]))),H(oo(T))},addSelectedEdges:N=>{const{multiSelectionActive:E,edgeLookup:T,nodeLookup:_,triggerNodeChanges:P,triggerEdgeChanges:H}=S();if(E){const D=N.map(V=>pr(V,!0));H(D);return}H(oo(T,new Set([...N]))),P(oo(_,new Set))},unselectNodesAndEdges:({nodes:N,edges:E}={})=>{const{edges:T,nodes:_,nodeLookup:P,triggerNodeChanges:H,triggerEdgeChanges:D}=S(),V=N||_,Y=E||T,X=[];for(const q of V)q.selected&&X.push(pr(q.id,!1));const J=[];for(const q of Y)q.selected&&J.push(pr(q.id,!1));H(X),D(J)},setMinZoom:N=>{const{panZoom:E,maxZoom:T}=S();E==null||E.setScaleExtent([N,T]),w({minZoom:N})},setMaxZoom:N=>{const{panZoom:E,minZoom:T}=S();E==null||E.setScaleExtent([T,N]),w({maxZoom:N})},setTranslateExtent:N=>{var E;(E=S().panZoom)==null||E.setTranslateExtent(N),w({translateExtent:N})},resetSelectedElements:()=>{const{edges:N,nodes:E,triggerNodeChanges:T,triggerEdgeChanges:_,elementsSelectable:P}=S();if(!P)return;const H=E.reduce((V,Y)=>Y.selected?[...V,pr(Y.id,!1)]:V,[]),D=N.reduce((V,Y)=>Y.selected?[...V,pr(Y.id,!1)]:V,[]);T(H),_(D)},setNodeExtent:N=>{const{nodes:E,nodeLookup:T,parentLookup:_,nodeOrigin:P,elevateNodesOnSelect:H,nodeExtent:D,zIndexMode:V}=S();N[0][0]===D[0][0]&&N[0][1]===D[0][1]&&N[1][0]===D[1][0]&&N[1][1]===D[1][1]||(pc(E,T,_,{nodeOrigin:P,nodeExtent:N,elevateNodesOnSelect:H,checkEquality:!1,zIndexMode:V}),w({nodeExtent:N}))},panBy:N=>{const{transform:E,width:T,height:_,panZoom:P,translateExtent:H}=S();return Aw({delta:N,panZoom:P,transform:E,translateExtent:H,width:T,height:_})},setCenter:async(N,E,T)=>{const{width:_,height:P,maxZoom:H,panZoom:D}=S();if(!D)return!1;const V=typeof(T==null?void 0:T.zoom)<"u"?T.zoom:H;return await D.setViewport({x:_/2-N*V,y:P/2-E*V,zoom:V},{duration:T==null?void 0:T.duration,ease:T==null?void 0:T.ease,interpolate:T==null?void 0:T.interpolate}),!0},cancelConnection:()=>{w({connection:{...N0}})},updateConnection:N=>{w({connection:N})},reset:()=>w({...Tp()})}},Object.is);function o_({initialNodes:t,initialEdges:r,defaultNodes:i,defaultEdges:l,initialWidth:u,initialHeight:a,initialMinZoom:f,initialMaxZoom:h,initialFitViewOptions:p,fitView:g,nodeOrigin:y,nodeExtent:v,zIndexMode:m,children:w}){const[S]=K.useState(()=>r_({nodes:t,edges:r,defaultNodes:i,defaultEdges:l,width:u,height:a,fitView:g,minZoom:f,maxZoom:h,fitViewOptions:p,nodeOrigin:y,nodeExtent:v,zIndexMode:m}));return z.jsx(mS,{value:S,children:z.jsx(BS,{children:z.jsx(r2,{children:w})})})}function i_({children:t,nodes:r,edges:i,defaultNodes:l,defaultEdges:u,width:a,height:f,fitView:h,fitViewOptions:p,minZoom:g,maxZoom:y,nodeOrigin:v,nodeExtent:m,zIndexMode:w}){return K.useContext(Dl)?z.jsx(z.Fragment,{children:t}):z.jsx(o_,{initialNodes:r,initialEdges:i,defaultNodes:l,defaultEdges:u,initialWidth:a,initialHeight:f,fitView:h,initialFitViewOptions:p,initialMinZoom:g,initialMaxZoom:y,nodeOrigin:v,nodeExtent:m,zIndexMode:w,children:t})}const s_={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function l_({nodes:t,edges:r,defaultNodes:i,defaultEdges:l,className:u,nodeTypes:a,edgeTypes:f,onNodeClick:h,onEdgeClick:p,onInit:g,onMove:y,onMoveStart:v,onMoveEnd:m,onConnect:w,onConnectStart:S,onConnectEnd:M,onClickConnectStart:N,onClickConnectEnd:E,onNodeMouseEnter:T,onNodeMouseMove:_,onNodeMouseLeave:P,onNodeContextMenu:H,onNodeDoubleClick:D,onNodeDragStart:V,onNodeDrag:Y,onNodeDragStop:X,onNodesDelete:J,onEdgesDelete:q,onDelete:ee,onSelectionChange:Z,onSelectionDragStart:C,onSelectionDrag:B,onSelectionDragStop:F,onSelectionContextMenu:b,onSelectionStart:R,onSelectionEnd:$,onBeforeDelete:O,connectionMode:k,connectionLineType:A=Wn.Bezier,connectionLineStyle:oe,connectionLineComponent:ne,connectionLineContainerStyle:ue,deleteKeyCode:ce="Backspace",selectionKeyCode:ae="Shift",selectionOnDrag:Q=!1,selectionMode:ie=Si.Full,panActivationKeyCode:he="Space",multiSelectionKeyCode:xe=Ei()?"Meta":"Control",zoomActivationKeyCode:ye=Ei()?"Meta":"Control",snapToGrid:ve,snapGrid:Ee,onlyRenderVisibleElements:Ne=!1,selectNodesOnDrag:Me,nodesDraggable:Te,autoPanOnNodeFocus:st,nodesConnectable:at,nodesFocusable:et,nodeOrigin:tt=rg,edgesFocusable:on,edgesReconnectable:Xt,elementsSelectable:Qt=!0,defaultViewport:ct=zS,minZoom:Ct=.5,maxZoom:yt=2,translateExtent:Mt=wi,preventScrolling:Mr=!0,nodeExtent:sn,defaultMarkerColor:Qn="#b1b1b7",zoomOnScroll:Fl=!0,zoomOnPinch:Li=!0,panOnScroll:$i=!1,panOnScrollSpeed:Vl=.5,panOnScrollMode:xo=wr.Free,zoomOnDoubleClick:wo=!0,panOnDrag:So=!0,onPaneClick:_o,onPaneMouseEnter:Eo,onPaneMouseMove:Sn,onPaneMouseLeave:_n,onPaneScroll:Ri,onPaneContextMenu:Ai,paneClickDistance:Di=1,nodeClickDistance:ji=0,children:Oi,onReconnect:ko,onReconnectStart:Hi,onReconnectEnd:Gn,onEdgeContextMenu:No,onEdgeDoubleClick:Kn,onEdgeMouseEnter:Bl,onEdgeMouseMove:qn,onEdgeMouseLeave:Pr,reconnectRadius:zr=10,onNodesChange:Co,onEdgesChange:bl,noDragClassName:Ul="nodrag",noWheelClassName:Wl="nowheel",noPanClassName:Gt="nopan",fitView:Mo,fitViewOptions:Po,connectOnClick:Yl,attributionPosition:Fi,proOptions:Vi,defaultEdgeOptions:Bi,elevateNodesOnSelect:bi=!0,elevateEdgesOnSelect:Xl=!1,disableKeyboardA11y:Ui=!1,autoPanOnConnect:Oe,autoPanOnNodeDrag:Ql,autoPanOnSelection:zo=!0,autoPanSpeed:Wi,connectionRadius:Ir,isValidConnection:Gl,onError:Yi,style:Tr,id:vt,nodeDragThreshold:Kl,connectionDragThreshold:xt,viewport:ql,onViewportChange:Zl,width:Jl,height:Lr,colorMode:$r="light",debug:Zn,onScroll:ln,ariaLabelConfig:eu,zIndexMode:Xi="basic",...Io},Qi){const Jn=vt||"1",er=$S($r),tu=K.useCallback(Rr=>{Rr.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),ln==null||ln(Rr)},[ln]);return z.jsx("div",{"data-testid":"rf__wrapper",...Io,onScroll:tu,style:{...Tr,...s_},ref:Qi,className:We(["react-flow",u,er]),id:vt,role:"application",children:z.jsxs(i_,{nodes:t,edges:r,width:Jl,height:Lr,fitView:Mo,fitViewOptions:Po,minZoom:Ct,maxZoom:yt,nodeOrigin:tt,nodeExtent:sn,zIndexMode:Xi,children:[z.jsx(LS,{nodes:t,edges:r,defaultNodes:i,defaultEdges:l,onConnect:w,onConnectStart:S,onConnectEnd:M,onClickConnectStart:N,onClickConnectEnd:E,nodesDraggable:Te,autoPanOnNodeFocus:st,nodesConnectable:at,nodesFocusable:et,edgesFocusable:on,edgesReconnectable:Xt,elementsSelectable:Qt,elevateNodesOnSelect:bi,elevateEdgesOnSelect:Xl,minZoom:Ct,maxZoom:yt,nodeExtent:sn,onNodesChange:Co,onEdgesChange:bl,snapToGrid:ve,snapGrid:Ee,connectionMode:k,translateExtent:Mt,connectOnClick:Yl,defaultEdgeOptions:Bi,fitView:Mo,fitViewOptions:Po,onNodesDelete:J,onEdgesDelete:q,onDelete:ee,onNodeDragStart:V,onNodeDrag:Y,onNodeDragStop:X,onSelectionDrag:B,onSelectionDragStart:C,onSelectionDragStop:F,onMove:y,onMoveStart:v,onMoveEnd:m,noPanClassName:Gt,nodeOrigin:tt,rfId:Jn,autoPanOnConnect:Oe,autoPanOnNodeDrag:Ql,autoPanSpeed:Wi,onError:Yi,connectionRadius:Ir,isValidConnection:Gl,selectNodesOnDrag:Me,nodeDragThreshold:Kl,connectionDragThreshold:xt,onBeforeDelete:O,debug:Zn,ariaLabelConfig:eu,zIndexMode:Xi}),z.jsx(t_,{onInit:g,onNodeClick:h,onEdgeClick:p,onNodeMouseEnter:T,onNodeMouseMove:_,onNodeMouseLeave:P,onNodeContextMenu:H,onNodeDoubleClick:D,nodeTypes:a,edgeTypes:f,connectionLineType:A,connectionLineStyle:oe,connectionLineComponent:ne,connectionLineContainerStyle:ue,selectionKeyCode:ae,selectionOnDrag:Q,selectionMode:ie,deleteKeyCode:ce,multiSelectionKeyCode:xe,panActivationKeyCode:he,zoomActivationKeyCode:ye,onlyRenderVisibleElements:Ne,defaultViewport:ct,translateExtent:Mt,minZoom:Ct,maxZoom:yt,preventScrolling:Mr,zoomOnScroll:Fl,zoomOnPinch:Li,zoomOnDoubleClick:wo,panOnScroll:$i,panOnScrollSpeed:Vl,panOnScrollMode:xo,panOnDrag:So,autoPanOnSelection:zo,onPaneClick:_o,onPaneMouseEnter:Eo,onPaneMouseMove:Sn,onPaneMouseLeave:_n,onPaneScroll:Ri,onPaneContextMenu:Ai,paneClickDistance:Di,nodeClickDistance:ji,onSelectionContextMenu:b,onSelectionStart:R,onSelectionEnd:$,onReconnect:ko,onReconnectStart:Hi,onReconnectEnd:Gn,onEdgeContextMenu:No,onEdgeDoubleClick:Kn,onEdgeMouseEnter:Bl,onEdgeMouseMove:qn,onEdgeMouseLeave:Pr,reconnectRadius:zr,defaultMarkerColor:Qn,noDragClassName:Ul,noWheelClassName:Wl,noPanClassName:Gt,rfId:Jn,disableKeyboardA11y:Ui,nodeExtent:sn,viewport:ql,onViewportChange:Zl,nodesDraggable:Te}),z.jsx(PS,{onSelectionChange:Z}),Oi,z.jsx(ES,{proOptions:Vi,position:Fi}),z.jsx(_S,{rfId:Jn,disableKeyboardA11y:Ui})]})})}var u_=ig(l_);function a_({dimensions:t,lineWidth:r,variant:i,className:l}){return z.jsx("path",{strokeWidth:r,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`,className:We(["react-flow__background-pattern",i,l])})}function c_({radius:t,className:r}){return z.jsx("circle",{cx:t,cy:t,r:t,className:We(["react-flow__background-pattern","dots",r])})}var Yn;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(Yn||(Yn={}));const f_={[Yn.Dots]:1,[Yn.Lines]:1,[Yn.Cross]:6},d_=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function Tg({id:t,variant:r=Yn.Dots,gap:i=20,size:l,lineWidth:u=1,offset:a=0,color:f,bgColor:h,style:p,className:g,patternClassName:y}){const v=K.useRef(null),{transform:m,patternId:w}=ze(d_,Ve),S=l||f_[r],M=r===Yn.Dots,N=r===Yn.Cross,E=Array.isArray(i)?i:[i,i],T=[E[0]*m[2]||1,E[1]*m[2]||1],_=S*m[2],P=Array.isArray(a)?a:[a,a],H=N?[_,_]:T,D=[P[0]*m[2]+H[0]/2,P[1]*m[2]+H[1]/2],V=`${w}${t||""}`;return z.jsxs("svg",{className:We(["react-flow__background",g]),style:{...p,...Ol,"--xy-background-color-props":h,"--xy-background-pattern-color-props":f},ref:v,"data-testid":"rf__background",children:[z.jsx("pattern",{id:V,x:m[0]%T[0],y:m[1]%T[1],width:T[0],height:T[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${D[0]},-${D[1]})`,children:M?z.jsx(c_,{radius:_/2,className:y}):z.jsx(a_,{dimensions:H,lineWidth:u,variant:r,className:y})}),z.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${V})`})]})}Tg.displayName="Background";const h_=K.memo(Tg);function p_(){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:z.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function g_(){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:z.jsx("path",{d:"M0 0h32v4.2H0z"})})}function m_(){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:z.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 y_(){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:z.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 v_(){return z.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:z.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 ol({children:t,className:r,...i}){return z.jsx("button",{type:"button",className:We(["react-flow__controls-button",r]),...i,children:t})}const x_=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom,ariaLabelConfig:t.ariaLabelConfig});function Lg({style:t,showZoom:r=!0,showFitView:i=!0,showInteractive:l=!0,fitViewOptions:u,onZoomIn:a,onZoomOut:f,onFitView:h,onInteractiveChange:p,className:g,children:y,position:v="bottom-left",orientation:m="vertical","aria-label":w}){const S=De(),{isInteractive:M,minZoomReached:N,maxZoomReached:E,ariaLabelConfig:T}=ze(x_,Ve),{zoomIn:_,zoomOut:P,fitView:H}=Hc(),D=()=>{_(),a==null||a()},V=()=>{P(),f==null||f()},Y=()=>{H(u),h==null||h()},X=()=>{S.setState({nodesDraggable:!M,nodesConnectable:!M,elementsSelectable:!M}),p==null||p(!M)},J=m==="horizontal"?"horizontal":"vertical";return z.jsxs(jl,{className:We(["react-flow__controls",J,g]),position:v,style:t,"data-testid":"rf__controls","aria-label":w??T["controls.ariaLabel"],children:[r&&z.jsxs(z.Fragment,{children:[z.jsx(ol,{onClick:D,className:"react-flow__controls-zoomin",title:T["controls.zoomIn.ariaLabel"],"aria-label":T["controls.zoomIn.ariaLabel"],disabled:E,children:z.jsx(p_,{})}),z.jsx(ol,{onClick:V,className:"react-flow__controls-zoomout",title:T["controls.zoomOut.ariaLabel"],"aria-label":T["controls.zoomOut.ariaLabel"],disabled:N,children:z.jsx(g_,{})})]}),i&&z.jsx(ol,{className:"react-flow__controls-fitview",onClick:Y,title:T["controls.fitView.ariaLabel"],"aria-label":T["controls.fitView.ariaLabel"],children:z.jsx(m_,{})}),l&&z.jsx(ol,{className:"react-flow__controls-interactive",onClick:X,title:T["controls.interactive.ariaLabel"],"aria-label":T["controls.interactive.ariaLabel"],children:M?z.jsx(v_,{}):z.jsx(y_,{})}),y]})}Lg.displayName="Controls";const w_=K.memo(Lg);function S_({id:t,x:r,y:i,width:l,height:u,style:a,color:f,strokeColor:h,strokeWidth:p,className:g,borderRadius:y,shapeRendering:v,selected:m,onClick:w}){const{background:S,backgroundColor:M}=a||{},N=f||S||M;return z.jsx("rect",{className:We(["react-flow__minimap-node",{selected:m},g]),x:r,y:i,rx:y,ry:y,width:l,height:u,style:{fill:N,stroke:h,strokeWidth:p},shapeRendering:v,onClick:w?E=>w(E,t):void 0})}const __=K.memo(S_),E_=t=>t.nodes.map(r=>r.id),Ja=t=>t instanceof Function?t:()=>t;function k_({nodeStrokeColor:t,nodeColor:r,nodeClassName:i="",nodeBorderRadius:l=5,nodeStrokeWidth:u,nodeComponent:a=__,onClick:f}){const h=ze(E_,Ve),p=Ja(r),g=Ja(t),y=Ja(i),v=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return z.jsx(z.Fragment,{children:h.map(m=>z.jsx(C_,{id:m,nodeColorFunc:p,nodeStrokeColorFunc:g,nodeClassNameFunc:y,nodeBorderRadius:l,nodeStrokeWidth:u,NodeComponent:a,onClick:f,shapeRendering:v},m))})}function N_({id:t,nodeColorFunc:r,nodeStrokeColorFunc:i,nodeClassNameFunc:l,nodeBorderRadius:u,nodeStrokeWidth:a,shapeRendering:f,NodeComponent:h,onClick:p}){const{node:g,x:y,y:v,width:m,height:w}=ze(S=>{const M=S.nodeLookup.get(t);if(!M)return{node:void 0,x:0,y:0,width:0,height:0};const N=M.internals.userNode,{x:E,y:T}=M.internals.positionAbsolute,{width:_,height:P}=Yt(N);return{node:N,x:E,y:T,width:_,height:P}},Ve);return!g||g.hidden||!L0(g)?null:z.jsx(h,{x:y,y:v,width:m,height:w,style:g.style,selected:!!g.selected,className:l(g),color:r(g),borderRadius:u,strokeColor:i(g),strokeWidth:a,shapeRendering:f,onClick:p,id:g.id})}const C_=K.memo(N_);var M_=K.memo(k_);const P_=200,z_=150,I_=t=>!t.hidden,T_=t=>{const r={x:-t.transform[0]/t.transform[2],y:-t.transform[1]/t.transform[2],width:t.width/t.transform[2],height:t.height/t.transform[2]};let i=!1;for(const l of t.nodeLookup.values())if(!l.hidden){i=!0;break}return{viewBB:r,boundingRect:i?z0(zi(t.nodeLookup,{filter:I_}),r):r,rfId:t.rfId,panZoom:t.panZoom,translateExtent:t.translateExtent,flowWidth:t.width,flowHeight:t.height,ariaLabelConfig:t.ariaLabelConfig}},Lp=(t,r)=>t.x===r.x&&t.y===r.y&&t.width===r.width&&t.height===r.height,L_=(t,r)=>Lp(t.viewBB,r.viewBB)&&Lp(t.boundingRect,r.boundingRect)&&t.rfId===r.rfId&&t.panZoom===r.panZoom&&t.translateExtent===r.translateExtent&&t.flowWidth===r.flowWidth&&t.flowHeight===r.flowHeight&&t.ariaLabelConfig===r.ariaLabelConfig,$_="react-flow__minimap-desc";function $g({style:t,className:r,nodeStrokeColor:i,nodeColor:l,nodeClassName:u="",nodeBorderRadius:a=5,nodeStrokeWidth:f,nodeComponent:h,bgColor:p,maskColor:g,maskStrokeColor:y,maskStrokeWidth:v,position:m="bottom-right",onClick:w,onNodeClick:S,pannable:M=!1,zoomable:N=!1,ariaLabel:E,inversePan:T,zoomStep:_=1,offsetScale:P=5}){const H=De(),D=K.useRef(null),{boundingRect:V,panZoom:Y,viewBB:X,rfId:J,translateExtent:q,flowWidth:ee,flowHeight:Z,ariaLabelConfig:C}=ze(T_,L_),B=(t==null?void 0:t.width)??P_,F=(t==null?void 0:t.height)??z_,b=V.width/B,R=V.height/F,$=Math.max(b,R),O=$*B,k=$*F,A=P*$,oe=V.x-(O-V.width)/2-A,ne=V.y-(k-V.height)/2-A,ue=O+A*2,ce=k+A*2,ae=`${$_}-${J}`,Q=K.useRef(0),ie=K.useRef();Q.current=$,K.useEffect(()=>{const Ee=H.getState().panZoom;if(D.current&&Ee)return ie.current=Uw({domNode:D.current,panZoom:Ee,getTransform:()=>H.getState().transform,getViewScale:()=>Q.current}),()=>{var Ne;(Ne=ie.current)==null||Ne.destroy()}},[Y]),K.useEffect(()=>{var Ee;(Ee=ie.current)==null||Ee.update({translateExtent:q,width:ee,height:Z,inversePan:T,pannable:M,zoomStep:_,zoomable:N})},[M,N,T,_,q,ee,Z]);const he=w?Ee=>{var Te;const[Ne,Me]=((Te=ie.current)==null?void 0:Te.pointer(Ee))||[0,0];w(Ee,{x:Ne,y:Me})}:void 0,xe=K.useCallback((Ee,Ne)=>{const Me=H.getState().nodeLookup.get(Ne).internals.userNode;S==null||S(Ee,Me)},[S]),ye=S?xe:void 0,ve=E??C["minimap.ariaLabel"];return z.jsx(jl,{position:m,style:{...t,"--xy-minimap-background-color-props":typeof p=="string"?p:void 0,"--xy-minimap-mask-background-color-props":typeof g=="string"?g:void 0,"--xy-minimap-mask-stroke-color-props":typeof y=="string"?y:void 0,"--xy-minimap-mask-stroke-width-props":typeof v=="number"?v*$:void 0,"--xy-minimap-node-background-color-props":typeof l=="string"?l:void 0,"--xy-minimap-node-stroke-color-props":typeof i=="string"?i:void 0,"--xy-minimap-node-stroke-width-props":typeof f=="number"?f:void 0},className:We(["react-flow__minimap",r]),"data-testid":"rf__minimap",children:z.jsxs("svg",{width:B,height:F,viewBox:`${oe} ${ne} ${ue} ${ce}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ae,ref:D,onClick:he,children:[ve&&z.jsx("title",{id:ae,children:ve}),z.jsx(M_,{onClick:ye,nodeColor:l,nodeStrokeColor:i,nodeBorderRadius:a,nodeClassName:u,nodeStrokeWidth:f,nodeComponent:h}),z.jsx("path",{className:"react-flow__minimap-mask",d:`M${oe-A},${ne-A}h${ue+A*2}v${ce+A*2}h${-ue-A*2}z
|
|
62
|
+
M${X.x},${X.y}h${X.width}v${X.height}h${-X.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}$g.displayName="MiniMap";K.memo($g);const R_=t=>r=>t?`${Math.max(1/r.transform[2],1)}`:void 0,A_={[yo.Line]:"right",[yo.Handle]:"bottom-right"};function D_({nodeId:t,position:r,variant:i=yo.Handle,className:l,style:u=void 0,children:a,color:f,minWidth:h=10,minHeight:p=10,maxWidth:g=Number.MAX_VALUE,maxHeight:y=Number.MAX_VALUE,keepAspectRatio:v=!1,resizeDirection:m,autoScale:w=!0,shouldResize:S,onResizeStart:M,onResize:N,onResizeEnd:E}){const T=cg(),_=typeof t=="string"?t:T,P=De(),H=K.useRef(null),D=i===yo.Handle,V=ze(K.useCallback(R_(D&&w),[D,w]),Ve),Y=K.useRef(null),X=r??A_[i];K.useEffect(()=>{if(!(!H.current||!_))return Y.current||(Y.current=rS({domNode:H.current,nodeId:_,getStoreItems:()=>{const{nodeLookup:q,transform:ee,snapGrid:Z,snapToGrid:C,nodeOrigin:B,domNode:F}=P.getState();return{nodeLookup:q,transform:ee,snapGrid:Z,snapToGrid:C,nodeOrigin:B,paneDomNode:F}},onChange:(q,ee)=>{const{triggerNodeChanges:Z,nodeLookup:C,parentLookup:B,nodeOrigin:F}=P.getState(),b=[],R={x:q.x,y:q.y},$=C.get(_);if($&&$.expandParent&&$.parentId){const O=$.origin??F,k=q.width??$.measured.width??0,A=q.height??$.measured.height??0,oe={id:$.id,parentId:$.parentId,rect:{width:k,height:A,...$0({x:q.x??$.position.x,y:q.y??$.position.y},{width:k,height:A},$.parentId,C,O)}},ne=Oc([oe],C,B,F);b.push(...ne),R.x=q.x?Math.max(O[0]*k,q.x):void 0,R.y=q.y?Math.max(O[1]*A,q.y):void 0}if(R.x!==void 0&&R.y!==void 0){const O={id:_,type:"position",position:{...R}};b.push(O)}if(q.width!==void 0&&q.height!==void 0){const k={id:_,type:"dimensions",resizing:!0,setAttributes:m?m==="horizontal"?"width":"height":!0,dimensions:{width:q.width,height:q.height}};b.push(k)}for(const O of ee){const k={...O,type:"position"};b.push(k)}Z(b)},onEnd:({width:q,height:ee})=>{const Z={id:_,type:"dimensions",resizing:!1,dimensions:{width:q,height:ee}};P.getState().triggerNodeChanges([Z])}})),Y.current.update({controlPosition:X,boundaries:{minWidth:h,minHeight:p,maxWidth:g,maxHeight:y},keepAspectRatio:v,resizeDirection:m,onResizeStart:M,onResize:N,onResizeEnd:E,shouldResize:S}),()=>{var q;(q=Y.current)==null||q.destroy()}},[X,h,p,g,y,v,M,N,E,S]);const J=X.split("-");return z.jsx("div",{className:We(["react-flow__resize-control","nodrag",...J,i,l]),ref:H,style:{...u,scale:V,...f&&{[D?"backgroundColor":"borderColor"]:f}},children:a})}K.memo(D_);/**
|
|
63
|
+
* @license lucide-react v0.468.0 - ISC
|
|
64
|
+
*
|
|
65
|
+
* This source code is licensed under the ISC license.
|
|
66
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
+
*/const j_=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Rg=(...t)=>t.filter((r,i,l)=>!!r&&r.trim()!==""&&l.indexOf(r)===i).join(" ").trim();/**
|
|
68
|
+
* @license lucide-react v0.468.0 - ISC
|
|
69
|
+
*
|
|
70
|
+
* This source code is licensed under the ISC license.
|
|
71
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
+
*/var O_={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
73
|
+
* @license lucide-react v0.468.0 - ISC
|
|
74
|
+
*
|
|
75
|
+
* This source code is licensed under the ISC license.
|
|
76
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
+
*/const H_=K.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:u="",children:a,iconNode:f,...h},p)=>K.createElement("svg",{ref:p,...O_,width:r,height:r,stroke:t,strokeWidth:l?Number(i)*24/Number(r):i,className:Rg("lucide",u),...h},[...f.map(([g,y])=>K.createElement(g,y)),...Array.isArray(a)?a:[a]]));/**
|
|
78
|
+
* @license lucide-react v0.468.0 - ISC
|
|
79
|
+
*
|
|
80
|
+
* This source code is licensed under the ISC license.
|
|
81
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
+
*/const wn=(t,r)=>{const i=K.forwardRef(({className:l,...u},a)=>K.createElement(H_,{ref:a,iconNode:r,className:Rg(`lucide-${j_(t)}`,l),...u}));return i.displayName=`${t}`,i};/**
|
|
83
|
+
* @license lucide-react v0.468.0 - ISC
|
|
84
|
+
*
|
|
85
|
+
* This source code is licensed under the ISC license.
|
|
86
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
+
*/const ec=wn("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
88
|
+
* @license lucide-react v0.468.0 - ISC
|
|
89
|
+
*
|
|
90
|
+
* This source code is licensed under the ISC license.
|
|
91
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
+
*/const il=wn("CircleDollarSign",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]]);/**
|
|
93
|
+
* @license lucide-react v0.468.0 - ISC
|
|
94
|
+
*
|
|
95
|
+
* This source code is licensed under the ISC license.
|
|
96
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
+
*/const F_=wn("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
98
|
+
* @license lucide-react v0.468.0 - ISC
|
|
99
|
+
*
|
|
100
|
+
* This source code is licensed under the ISC license.
|
|
101
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
+
*/const $p=wn("HeartPulse",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]]);/**
|
|
103
|
+
* @license lucide-react v0.468.0 - ISC
|
|
104
|
+
*
|
|
105
|
+
* This source code is licensed under the ISC license.
|
|
106
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
+
*/const V_=wn("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);/**
|
|
108
|
+
* @license lucide-react v0.468.0 - ISC
|
|
109
|
+
*
|
|
110
|
+
* This source code is licensed under the ISC license.
|
|
111
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
+
*/const tc=wn("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
113
|
+
* @license lucide-react v0.468.0 - ISC
|
|
114
|
+
*
|
|
115
|
+
* This source code is licensed under the ISC license.
|
|
116
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
+
*/const B_=wn("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
118
|
+
* @license lucide-react v0.468.0 - ISC
|
|
119
|
+
*
|
|
120
|
+
* This source code is licensed under the ISC license.
|
|
121
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
+
*/const b_=wn("Stethoscope",[["path",{d:"M11 2v2",key:"1539x4"}],["path",{d:"M5 2v2",key:"1yf1q8"}],["path",{d:"M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1",key:"rb5t3r"}],["path",{d:"M8 15a6 6 0 0 0 12 0v-3",key:"x18d4x"}],["circle",{cx:"20",cy:"10",r:"2",key:"ts1r5v"}]]);/**
|
|
123
|
+
* @license lucide-react v0.468.0 - ISC
|
|
124
|
+
*
|
|
125
|
+
* This source code is licensed under the ISC license.
|
|
126
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
+
*/const U_=wn("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]),W_=new URLSearchParams(location.hash.slice(1)).get("token")??"",gr=t=>`$${t.toFixed(2)}`,Vc={en:{dashboard:"Dashboard",diagnoses:"Diagnoses",finops:"FinOps",graph:"Graph",health:"Health Score",savings:"Potential savings",spend:"Spend",runRate:"Run rate",cache:"Cache hit",treat:"Treat",dry:"Preview",trend:"Recovery dynamics",none:"No complaints. The patient is healthy.",noLogs:"No session logs found.",prognosis:"Prognosis",rx:"Prescription",manual:"Manual treatment",model:"Model",cost:"Cost",requests:"Requests",mo:"/mo"}},fi=Object.keys(Vc),dl={resuscitation:{dot:"bg-red-500",ring:"border-red-500/40",label:{en:"Resuscitation"}},therapy:{dot:"bg-amber-500",ring:"border-amber-500/40",label:{en:"Therapy"}},preventive:{dot:"bg-emerald-500",ring:"border-emerald-500/40",label:{en:"Preventive"}}},Y_=t=>t>=90?"text-emerald-500":t>=70?"text-amber-500":"text-red-500";async function sl(t,r){const i=await fetch(t,{...r,headers:{"x-ctxmedic-token":W_,...r==null?void 0:r.headers}}),l=await i.json();if(!i.ok)throw new Error(l.error??i.statusText);return l}function mr({children:t,className:r=""}){return z.jsx("section",{className:`rounded-xl border border-slate-200 bg-white p-5 dark:border-slate-800 dark:bg-slate-900 ${r}`,children:t})}function hr({icon:t,label:r,value:i,accent:l=""}){return z.jsxs(mr,{children:[z.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-500 dark:text-slate-400",children:[t,r]}),z.jsx("div",{className:`mt-2 text-3xl font-semibold tabular-nums ${l}`,children:i})]})}function X_({visits:t}){const r=t.slice(-30);if(r.length<2)return z.jsx("p",{className:"text-sm text-slate-500",children:"—"});const i=600,l=120,u=h=>h/(r.length-1)*i,a=h=>l-h/100*l,f=r.map((h,p)=>`${p?"L":"M"}${u(p).toFixed(1)},${a(h.healthScore).toFixed(1)}`).join(" ");return z.jsxs("svg",{viewBox:`0 0 ${i} ${l}`,className:"h-32 w-full",role:"img","aria-label":"Health Score history",children:[z.jsx("path",{d:f,fill:"none",stroke:"currentColor",strokeWidth:"2.5",className:"text-sky-500"}),r.map((h,p)=>z.jsx("circle",{cx:u(p),cy:a(h.healthScore),r:"3.5",className:"fill-sky-500",children:z.jsx("title",{children:`${h.at.slice(0,16).replace("T"," ")}: ${h.healthScore}`})},h.at))]})}function Rp({d:t,lang:r,onTreat:i}){const l=Vc[r],u=dl[t.triage];return z.jsxs(mr,{className:`border-l-4 ${u.ring}`,children:[z.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[z.jsxs("div",{children:[z.jsxs("div",{className:"flex items-center gap-2 text-xs font-medium uppercase tracking-wide text-slate-500",children:[z.jsx("span",{className:`h-2 w-2 rounded-full ${u.dot}`}),u.label[r]," · ",t.rx.id," · ",z.jsx("code",{children:t.code})]}),z.jsx("h3",{className:"mt-1 text-lg font-semibold",children:t.diagnosis}),z.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-300",children:t.summary})]}),z.jsx("div",{className:"flex gap-2",children:t.rx.autoFix?z.jsxs(z.Fragment,{children:[z.jsx("button",{onClick:()=>i(t.rx.id,!0),className:"rounded-lg border border-slate-300 px-3 py-1.5 text-sm hover:bg-slate-100 dark:border-slate-700 dark:hover:bg-slate-800",children:l.dry}),z.jsxs("button",{onClick:()=>i(t.rx.id,!1),className:"flex items-center gap-1.5 rounded-lg bg-sky-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-sky-700",children:[z.jsx(U_,{size:14}),l.treat]})]}):z.jsx("span",{className:"rounded-lg bg-slate-100 px-3 py-1.5 text-sm text-slate-500 dark:bg-slate-800",children:l.manual})})]}),z.jsx("dl",{className:"mt-4 grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[10rem_1fr]",children:t.vitals.map(a=>z.jsxs("div",{className:"contents",children:[z.jsx("dt",{className:"text-slate-500",children:a.label}),z.jsx("dd",{className:"break-all font-mono text-xs leading-5",children:a.value})]},a.label))}),z.jsxs("p",{className:"mt-3 text-sm",children:[z.jsxs("span",{className:"font-medium",children:[l.prognosis,": "]}),t.prognosis]}),z.jsxs("p",{className:"mt-1 text-sm",children:[z.jsx("span",{className:"font-medium",children:"Rx: "}),t.rx.action,(t.rx.healthGain>0||t.rx.monthlySavingsUsd)&&z.jsxs("span",{className:"ml-2 text-emerald-600 dark:text-emerald-400",children:[t.rx.healthGain>0&&`+${t.rx.healthGain}`," ",t.rx.monthlySavingsUsd?`${gr(t.rx.monthlySavingsUsd)}${l.mo}`:""]})]})]})}function Q_({data:t}){const{nodes:r,edges:i}=K.useMemo(()=>{const l=h=>h==="harness"?0:h==="target"?2:1,u=[0,0,0],a=t.nodes.map(h=>{const p=l(h.kind),g=u[p]++*64,y=h.broken?"#ef4444":h.kind==="harness"?"#0284c7":h.kind==="target"?"#7c3aed":"#64748b";return{id:h.id,position:{x:p*340,y:g},data:{label:`${h.label}${h.tokens?` · ${h.tokens.toLocaleString("en")} tok`:""}`},style:{border:`1.5px solid ${y}`,borderRadius:8,fontSize:11,width:280,background:"var(--node-bg, white)"}}}),f=t.edges.map((h,p)=>({id:`e${p}`,source:h.source,target:h.target,animated:h.kind==="symlink",label:h.kind==="loads"?void 0:h.kind,style:{stroke:h.kind==="duplicate"?"#f59e0b":h.kind==="symlink"?"#7c3aed":"#94a3b8",strokeDasharray:h.kind==="duplicate"?"6 4":void 0}}));return{nodes:a,edges:f}},[t]);return z.jsx("div",{className:"h-[70vh] overflow-hidden rounded-xl border border-slate-200 bg-white text-slate-900 dark:border-slate-800",children:z.jsxs(u_,{nodes:r,edges:i,fitView:!0,minZoom:.1,children:[z.jsx(h_,{}),z.jsx(w_,{})]})})}function G_(){const[t,r]=K.useState(()=>fi.find(_=>navigator.language.startsWith(_))??"en"),[i,l]=K.useState("dashboard"),[u,a]=K.useState(null),[f,h]=K.useState([]),[p,g]=K.useState(null),[y,v]=K.useState(!1),[m,w]=K.useState(null),S=Vc[t],M=K.useCallback(async(_=!1)=>{v(!0);try{a(await sl(`/api/checkup?lang=${t}${_?"&record=1":""}`)),h(await sl("/api/history"))}catch(P){w(P.message)}finally{v(!1)}},[t]);K.useEffect(()=>void M(!0),[]),K.useEffect(()=>void(u&&M()),[t]),K.useEffect(()=>void(i==="graph"&&!p&&sl("/api/graph").then(g).catch(_=>w(_.message))),[i,p]);const N=async(_,P)=>{if(!(!P&&!confirm(`${S.treat} ${_}? Originals are backed up to .ctxmedic/backups.`)))try{const H=await sl(`/api/treat/${_}${P?"?dryRun=1":""}`,{method:"POST"});w(H.manual??`${P?"Preview":"Done"}:
|
|
128
|
+
${H.applied.join(`
|
|
129
|
+
`)}${!P&&H.backupDir?`
|
|
130
|
+
Backup: ${H.backupDir}`:""}`),P||(g(null),await M(!0))}catch(H){w(H.message)}},E=u==null?void 0:u.finops,T=[["dashboard",z.jsx($p,{size:16})],["diagnoses",z.jsx(b_,{size:16})],["finops",z.jsx(il,{size:16})],["graph",z.jsx(F_,{size:16})]];return z.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-6 sm:px-6",children:[z.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-3",children:[z.jsxs("div",{children:[z.jsxs("h1",{className:"flex items-center gap-2 text-xl font-semibold",children:["🩺 ctxmedic ",z.jsx("span",{className:"text-sm font-normal text-slate-500",children:u==null?void 0:u.version})]}),z.jsx("p",{className:"truncate text-sm text-slate-500",children:u==null?void 0:u.patient.root})]}),z.jsxs("div",{className:"flex items-center gap-2",children:[fi.length>1&&z.jsxs("button",{onClick:()=>r(fi[(fi.indexOf(t)+1)%fi.length]),className:"flex items-center gap-1 rounded-lg border border-slate-300 px-3 py-1.5 text-sm dark:border-slate-700","aria-label":"Switch language",children:[z.jsx(V_,{size:14}),t.toUpperCase()]}),z.jsx("button",{onClick:()=>M(!0),disabled:y,className:"flex items-center gap-1 rounded-lg border border-slate-300 px-3 py-1.5 text-sm dark:border-slate-700","aria-label":"Re-run checkup",children:y?z.jsx(tc,{size:14,className:"animate-spin"}):z.jsx(B_,{size:14})})]})]}),z.jsx("nav",{className:"mt-5 flex gap-1 overflow-x-auto border-b border-slate-200 dark:border-slate-800",children:T.map(([_,P])=>z.jsxs("button",{onClick:()=>l(_),className:`flex items-center gap-1.5 whitespace-nowrap border-b-2 px-3 py-2 text-sm ${i===_?"border-sky-500 font-medium":"border-transparent text-slate-500 hover:text-slate-800 dark:hover:text-slate-200"}`,children:[P,S[_],_==="diagnoses"&&u?z.jsx("span",{className:"rounded-full bg-slate-200 px-1.5 text-xs dark:bg-slate-800",children:u.diagnoses.length}):null]},_))}),m&&z.jsxs("div",{role:"status",className:"mt-4 flex items-start justify-between gap-3 whitespace-pre-wrap rounded-lg border border-sky-300 bg-sky-50 p-3 font-mono text-xs dark:border-sky-800 dark:bg-sky-950",children:[m,z.jsx("button",{onClick:()=>w(null),"aria-label":"Dismiss",children:"✕"})]}),u?z.jsxs("main",{className:"mt-5 space-y-4",children:[i==="dashboard"&&z.jsxs(z.Fragment,{children:[z.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[z.jsx(hr,{icon:z.jsx($p,{size:16}),label:S.health,value:`${u.healthScore}/100`,accent:Y_(u.healthScore)}),z.jsx(hr,{icon:z.jsx(il,{size:16}),label:S.savings,value:`${gr(u.potentialMonthlySavingsUsd)}${S.mo}`,accent:"text-emerald-500"}),z.jsx(hr,{icon:z.jsx(ec,{size:16}),label:S.runRate,value:E!=null&&E.sessions?`${gr(E.monthlyRunRateUsd)}${S.mo}`:"—"}),z.jsx(hr,{icon:z.jsx(ec,{size:16}),label:S.cache,value:(E==null?void 0:E.cacheHitRatio)!=null?`${Math.round(E.cacheHitRatio*100)}%`:"—"})]}),z.jsxs(mr,{children:[z.jsx("p",{className:"text-lg italic",children:u.opinion}),z.jsxs("div",{className:"mt-3 flex flex-wrap gap-4 text-sm",children:[Object.keys(dl).map(_=>z.jsxs("span",{className:"flex items-center gap-1.5",children:[z.jsx("span",{className:`h-2.5 w-2.5 rounded-full ${dl[_].dot}`}),dl[_].label[t],": ",z.jsx("b",{children:u.counts[_]})]},_)),z.jsx("span",{className:"text-slate-500",children:u.patient.harnesses.join(", ")})]})]}),z.jsxs(mr,{children:[z.jsx("h2",{className:"mb-2 font-medium",children:S.trend}),z.jsx(X_,{visits:f})]})]}),i==="diagnoses"&&(u.diagnoses.length?u.diagnoses.map(_=>z.jsx(Rp,{d:_,lang:t,onTreat:N},_.rx.id)):z.jsx(mr,{children:S.none})),i==="finops"&&(E!=null&&E.sessions?z.jsxs(z.Fragment,{children:[z.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[z.jsx(hr,{icon:z.jsx(il,{size:16}),label:`${S.spend} (${E.periodDays}d)`,value:gr(E.costUsd)}),z.jsx(hr,{icon:z.jsx(ec,{size:16}),label:S.runRate,value:`${gr(E.monthlyRunRateUsd)}${S.mo}`}),z.jsx(hr,{icon:z.jsx(il,{size:16}),label:S.savings,value:`${gr(E.potentialMonthlySavingsUsd)}${S.mo}`,accent:"text-emerald-500"})]}),z.jsxs(mr,{className:"overflow-x-auto",children:[z.jsxs("table",{className:"w-full text-sm",children:[z.jsx("thead",{className:"text-left text-slate-500",children:z.jsxs("tr",{children:[z.jsx("th",{className:"py-1",children:S.model}),z.jsx("th",{className:"text-right",children:S.requests}),z.jsx("th",{className:"text-right",children:S.cost}),z.jsx("th",{className:"w-1/3"})]})}),z.jsx("tbody",{children:E.byModel.map(_=>{var P;return z.jsxs("tr",{className:"border-t border-slate-100 dark:border-slate-800",children:[z.jsx("td",{className:"py-1.5 font-mono text-xs",children:_.model}),z.jsx("td",{className:"text-right tabular-nums",children:_.steps.toLocaleString("en")}),z.jsx("td",{className:"text-right tabular-nums",children:gr(_.costUsd)}),z.jsx("td",{className:"pl-3",children:z.jsx("div",{className:"h-2 rounded bg-sky-500",style:{width:`${_.costUsd/(((P=E.byModel[0])==null?void 0:P.costUsd)||1)*100}%`}})})]},_.model)})})]}),z.jsxs("p",{className:"mt-2 text-xs text-slate-500",children:["Prices as of ",E.pricingAsOf,". Token counts come from local session logs; nothing leaves this machine."]})]}),u.diagnoses.filter(_=>_.code.startsWith("FIN_")).map(_=>z.jsx(Rp,{d:_,lang:t,onTreat:N},_.rx.id))]}):z.jsx(mr,{children:S.noLogs})),i==="graph"&&(p?z.jsx(Q_,{data:p}):z.jsx("div",{className:"flex justify-center py-20",children:z.jsx(tc,{className:"animate-spin"})}))]}):z.jsx("div",{className:"mt-20 flex justify-center text-slate-500",children:z.jsx(tc,{className:"animate-spin"})})]})}Sy.createRoot(document.getElementById("root")).render(z.jsx(K.StrictMode,{children:z.jsx(G_,{})}));
|