@arch-atlas/server 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/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +177 -0
- package/dist/index.js.map +1 -0
- package/dist/web/assets/index-B_cJr-f3.css +1 -0
- package/dist/web/assets/index-BxU0SF6N.js +195 -0
- package/dist/web/index.html +16 -0
- package/package.json +35 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&o(u)}).observe(document,{childList:!0,subtree:!0});function r(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function o(s){if(s.ep)return;s.ep=!0;const l=r(s);fetch(s.href,l)}})();function oy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bc={exports:{}},Vo={},Oc={exports:{}},Te={};/**
|
|
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 ym;function lS(){if(ym)return Te;ym=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.iterator;function v(N){return N===null||typeof N!="object"?null:(N=m&&N[m]||N["@@iterator"],typeof N=="function"?N:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,_={};function C(N,j,te){this.props=N,this.context=j,this.refs=_,this.updater=te||x}C.prototype.isReactComponent={},C.prototype.setState=function(N,j){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,j,"setState")},C.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function E(){}E.prototype=C.prototype;function M(N,j,te){this.props=N,this.context=j,this.refs=_,this.updater=te||x}var k=M.prototype=new E;k.constructor=M,w(k,C.prototype),k.isPureReactComponent=!0;var P=Array.isArray,R=Object.prototype.hasOwnProperty,D={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function F(N,j,te){var ie,le={},ce=null,ue=null;if(j!=null)for(ie in j.ref!==void 0&&(ue=j.ref),j.key!==void 0&&(ce=""+j.key),j)R.call(j,ie)&&!O.hasOwnProperty(ie)&&(le[ie]=j[ie]);var Q=arguments.length-2;if(Q===1)le.children=te;else if(1<Q){for(var oe=Array(Q),me=0;me<Q;me++)oe[me]=arguments[me+2];le.children=oe}if(N&&N.defaultProps)for(ie in Q=N.defaultProps,Q)le[ie]===void 0&&(le[ie]=Q[ie]);return{$$typeof:e,type:N,key:ce,ref:ue,props:le,_owner:D.current}}function K(N,j){return{$$typeof:e,type:N.type,key:j,ref:N.ref,props:N.props,_owner:N._owner}}function J(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function q(N){var j={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(te){return j[te]})}var ee=/\/+/g;function Z(N,j){return typeof N=="object"&&N!==null&&N.key!=null?q(""+N.key):j.toString(36)}function A(N,j,te,ie,le){var ce=typeof N;(ce==="undefined"||ce==="boolean")&&(N=null);var ue=!1;if(N===null)ue=!0;else switch(ce){case"string":case"number":ue=!0;break;case"object":switch(N.$$typeof){case e:case t:ue=!0}}if(ue)return ue=N,le=le(ue),N=ie===""?"."+Z(ue,0):ie,P(le)?(te="",N!=null&&(te=N.replace(ee,"$&/")+"/"),A(le,j,te,"",function(me){return me})):le!=null&&(J(le)&&(le=K(le,te+(!le.key||ue&&ue.key===le.key?"":(""+le.key).replace(ee,"$&/")+"/")+N)),j.push(le)),1;if(ue=0,ie=ie===""?".":ie+":",P(N))for(var Q=0;Q<N.length;Q++){ce=N[Q];var oe=ie+Z(ce,Q);ue+=A(ce,j,te,oe,le)}else if(oe=v(N),typeof oe=="function")for(N=oe.call(N),Q=0;!(ce=N.next()).done;)ce=ce.value,oe=ie+Z(ce,Q++),ue+=A(ce,j,te,oe,le);else if(ce==="object")throw j=String(N),Error("Objects are not valid as a React child (found: "+(j==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":j)+"). If you meant to render a collection of children, use an array instead.");return ue}function W(N,j,te){if(N==null)return N;var ie=[],le=0;return A(N,ie,"","",function(ce){return j.call(te,ce,le++)}),ie}function H(N){if(N._status===-1){var j=N._result;j=j(),j.then(function(te){(N._status===0||N._status===-1)&&(N._status=1,N._result=te)},function(te){(N._status===0||N._status===-1)&&(N._status=2,N._result=te)}),N._status===-1&&(N._status=0,N._result=j)}if(N._status===1)return N._result.default;throw N._result}var $={current:null},I={transition:null},z={ReactCurrentDispatcher:$,ReactCurrentBatchConfig:I,ReactCurrentOwner:D};function U(){throw Error("act(...) is not supported in production builds of React.")}return Te.Children={map:W,forEach:function(N,j,te){W(N,function(){j.apply(this,arguments)},te)},count:function(N){var j=0;return W(N,function(){j++}),j},toArray:function(N){return W(N,function(j){return j})||[]},only:function(N){if(!J(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},Te.Component=C,Te.Fragment=r,Te.Profiler=s,Te.PureComponent=M,Te.StrictMode=o,Te.Suspense=d,Te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=z,Te.act=U,Te.cloneElement=function(N,j,te){if(N==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+N+".");var ie=w({},N.props),le=N.key,ce=N.ref,ue=N._owner;if(j!=null){if(j.ref!==void 0&&(ce=j.ref,ue=D.current),j.key!==void 0&&(le=""+j.key),N.type&&N.type.defaultProps)var Q=N.type.defaultProps;for(oe in j)R.call(j,oe)&&!O.hasOwnProperty(oe)&&(ie[oe]=j[oe]===void 0&&Q!==void 0?Q[oe]:j[oe])}var oe=arguments.length-2;if(oe===1)ie.children=te;else if(1<oe){Q=Array(oe);for(var me=0;me<oe;me++)Q[me]=arguments[me+2];ie.children=Q}return{$$typeof:e,type:N.type,key:le,ref:ce,props:ie,_owner:ue}},Te.createContext=function(N){return N={$$typeof:u,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},N.Provider={$$typeof:l,_context:N},N.Consumer=N},Te.createElement=F,Te.createFactory=function(N){var j=F.bind(null,N);return j.type=N,j},Te.createRef=function(){return{current:null}},Te.forwardRef=function(N){return{$$typeof:f,render:N}},Te.isValidElement=J,Te.lazy=function(N){return{$$typeof:g,_payload:{_status:-1,_result:N},_init:H}},Te.memo=function(N,j){return{$$typeof:p,type:N,compare:j===void 0?null:j}},Te.startTransition=function(N){var j=I.transition;I.transition={};try{N()}finally{I.transition=j}},Te.unstable_act=U,Te.useCallback=function(N,j){return $.current.useCallback(N,j)},Te.useContext=function(N){return $.current.useContext(N)},Te.useDebugValue=function(){},Te.useDeferredValue=function(N){return $.current.useDeferredValue(N)},Te.useEffect=function(N,j){return $.current.useEffect(N,j)},Te.useId=function(){return $.current.useId()},Te.useImperativeHandle=function(N,j,te){return $.current.useImperativeHandle(N,j,te)},Te.useInsertionEffect=function(N,j){return $.current.useInsertionEffect(N,j)},Te.useLayoutEffect=function(N,j){return $.current.useLayoutEffect(N,j)},Te.useMemo=function(N,j){return $.current.useMemo(N,j)},Te.useReducer=function(N,j,te){return $.current.useReducer(N,j,te)},Te.useRef=function(N){return $.current.useRef(N)},Te.useState=function(N){return $.current.useState(N)},Te.useSyncExternalStore=function(N,j,te){return $.current.useSyncExternalStore(N,j,te)},Te.useTransition=function(){return $.current.useTransition()},Te.version="18.3.1",Te}var vm;function hs(){return vm||(vm=1,Oc.exports=lS()),Oc.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 xm;function uS(){if(xm)return Vo;xm=1;var e=hs(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(f,d,p){var g,m={},v=null,x=null;p!==void 0&&(v=""+p),d.key!==void 0&&(v=""+d.key),d.ref!==void 0&&(x=d.ref);for(g in d)o.call(d,g)&&!l.hasOwnProperty(g)&&(m[g]=d[g]);if(f&&f.defaultProps)for(g in d=f.defaultProps,d)m[g]===void 0&&(m[g]=d[g]);return{$$typeof:t,type:f,key:v,ref:x,props:m,_owner:s.current}}return Vo.Fragment=r,Vo.jsx=u,Vo.jsxs=u,Vo}var wm;function cS(){return wm||(wm=1,Bc.exports=uS()),Bc.exports}var T=cS(),L=hs();const Oo=oy(L);var Oa={},$c={exports:{}},_t={},Hc={exports:{}},Uc={};/**
|
|
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 Sm;function fS(){return Sm||(Sm=1,(function(e){function t(I,z){var U=I.length;I.push(z);e:for(;0<U;){var N=U-1>>>1,j=I[N];if(0<s(j,z))I[N]=z,I[U]=j,U=N;else break e}}function r(I){return I.length===0?null:I[0]}function o(I){if(I.length===0)return null;var z=I[0],U=I.pop();if(U!==z){I[0]=U;e:for(var N=0,j=I.length,te=j>>>1;N<te;){var ie=2*(N+1)-1,le=I[ie],ce=ie+1,ue=I[ce];if(0>s(le,U))ce<j&&0>s(ue,le)?(I[N]=ue,I[ce]=U,N=ce):(I[N]=le,I[ie]=U,N=ie);else if(ce<j&&0>s(ue,U))I[N]=ue,I[ce]=U,N=ce;else break e}}return z}function s(I,z){var U=I.sortIndex-z.sortIndex;return U!==0?U:I.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var d=[],p=[],g=1,m=null,v=3,x=!1,w=!1,_=!1,C=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(I){for(var z=r(p);z!==null;){if(z.callback===null)o(p);else if(z.startTime<=I)o(p),z.sortIndex=z.expirationTime,t(d,z);else break;z=r(p)}}function P(I){if(_=!1,k(I),!w)if(r(d)!==null)w=!0,H(R);else{var z=r(p);z!==null&&$(P,z.startTime-I)}}function R(I,z){w=!1,_&&(_=!1,E(F),F=-1),x=!0;var U=v;try{for(k(z),m=r(d);m!==null&&(!(m.expirationTime>z)||I&&!q());){var N=m.callback;if(typeof N=="function"){m.callback=null,v=m.priorityLevel;var j=N(m.expirationTime<=z);z=e.unstable_now(),typeof j=="function"?m.callback=j:m===r(d)&&o(d),k(z)}else o(d);m=r(d)}if(m!==null)var te=!0;else{var ie=r(p);ie!==null&&$(P,ie.startTime-z),te=!1}return te}finally{m=null,v=U,x=!1}}var D=!1,O=null,F=-1,K=5,J=-1;function q(){return!(e.unstable_now()-J<K)}function ee(){if(O!==null){var I=e.unstable_now();J=I;var z=!0;try{z=O(!0,I)}finally{z?Z():(D=!1,O=null)}}else D=!1}var Z;if(typeof M=="function")Z=function(){M(ee)};else if(typeof MessageChannel<"u"){var A=new MessageChannel,W=A.port2;A.port1.onmessage=ee,Z=function(){W.postMessage(null)}}else Z=function(){C(ee,0)};function H(I){O=I,D||(D=!0,Z())}function $(I,z){F=C(function(){I(e.unstable_now())},z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(I){I.callback=null},e.unstable_continueExecution=function(){w||x||(w=!0,H(R))},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return r(d)},e.unstable_next=function(I){switch(v){case 1:case 2:case 3:var z=3;break;default:z=v}var U=v;v=z;try{return I()}finally{v=U}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(I,z){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var U=v;v=I;try{return z()}finally{v=U}},e.unstable_scheduleCallback=function(I,z,U){var N=e.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?N+U:N):U=N,I){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=U+j,I={id:g++,callback:z,priorityLevel:I,startTime:U,expirationTime:j,sortIndex:-1},U>N?(I.sortIndex=U,t(p,I),r(d)===null&&I===r(p)&&(_?(E(F),F=-1):_=!0,$(P,U-N))):(I.sortIndex=j,t(d,I),w||x||(w=!0,H(R))),I},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(I){var z=v;return function(){var U=v;v=z;try{return I.apply(this,arguments)}finally{v=U}}}})(Uc)),Uc}var km;function dS(){return km||(km=1,Hc.exports=fS()),Hc.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 Em;function hS(){if(Em)return _t;Em=1;var e=hs(),t=dS();function r(n){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+n,a=1;a<arguments.length;a++)i+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+n+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,s={};function l(n,i){u(n,i),u(n+"Capture",i)}function u(n,i){for(s[n]=i,n=0;n<i.length;n++)o.add(i[n])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,p=/^[: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]*$/,g={},m={};function v(n){return d.call(m,n)?!0:d.call(g,n)?!1:p.test(n)?m[n]=!0:(g[n]=!0,!1)}function x(n,i,a,c){if(a!==null&&a.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return c?!1:a!==null?!a.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function w(n,i,a,c){if(i===null||typeof i>"u"||x(n,i,a,c))return!0;if(c)return!1;if(a!==null)switch(a.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function _(n,i,a,c,h,y,S){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=c,this.attributeNamespace=h,this.mustUseProperty=a,this.propertyName=n,this.type=i,this.sanitizeURL=y,this.removeEmptyString=S}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){C[n]=new _(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var i=n[0];C[i]=new _(i,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){C[n]=new _(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){C[n]=new _(n,2,!1,n,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(n){C[n]=new _(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){C[n]=new _(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){C[n]=new _(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){C[n]=new _(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){C[n]=new _(n,5,!1,n.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function M(n){return n[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(n){var i=n.replace(E,M);C[i]=new _(i,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var i=n.replace(E,M);C[i]=new _(i,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var i=n.replace(E,M);C[i]=new _(i,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){C[n]=new _(n,1,!1,n.toLowerCase(),null,!1,!1)}),C.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){C[n]=new _(n,1,!1,n.toLowerCase(),null,!0,!0)});function k(n,i,a,c){var h=C.hasOwnProperty(i)?C[i]:null;(h!==null?h.type!==0:c||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(w(i,a,h,c)&&(a=null),c||h===null?v(i)&&(a===null?n.removeAttribute(i):n.setAttribute(i,""+a)):h.mustUseProperty?n[h.propertyName]=a===null?h.type===3?!1:"":a:(i=h.attributeName,c=h.attributeNamespace,a===null?n.removeAttribute(i):(h=h.type,a=h===3||h===4&&a===!0?"":""+a,c?n.setAttributeNS(c,i,a):n.setAttribute(i,a))))}var P=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,R=Symbol.for("react.element"),D=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),K=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"),A=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),$=Symbol.for("react.offscreen"),I=Symbol.iterator;function z(n){return n===null||typeof n!="object"?null:(n=I&&n[I]||n["@@iterator"],typeof n=="function"?n:null)}var U=Object.assign,N;function j(n){if(N===void 0)try{throw Error()}catch(a){var i=a.stack.trim().match(/\n( *(at )?)/);N=i&&i[1]||""}return`
|
|
34
|
+
`+N+n}var te=!1;function ie(n,i){if(!n||te)return"";te=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(G){var c=G}Reflect.construct(n,[],i)}else{try{i.call()}catch(G){c=G}n.call(i.prototype)}else{try{throw Error()}catch(G){c=G}n()}}catch(G){if(G&&c&&typeof G.stack=="string"){for(var h=G.stack.split(`
|
|
35
|
+
`),y=c.stack.split(`
|
|
36
|
+
`),S=h.length-1,b=y.length-1;1<=S&&0<=b&&h[S]!==y[b];)b--;for(;1<=S&&0<=b;S--,b--)if(h[S]!==y[b]){if(S!==1||b!==1)do if(S--,b--,0>b||h[S]!==y[b]){var V=`
|
|
37
|
+
`+h[S].replace(" at new "," at ");return n.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",n.displayName)),V}while(1<=S&&0<=b);break}}}finally{te=!1,Error.prepareStackTrace=a}return(n=n?n.displayName||n.name:"")?j(n):""}function le(n){switch(n.tag){case 5:return j(n.type);case 16:return j("Lazy");case 13:return j("Suspense");case 19:return j("SuspenseList");case 0:case 2:case 15:return n=ie(n.type,!1),n;case 11:return n=ie(n.type.render,!1),n;case 1:return n=ie(n.type,!0),n;default:return""}}function ce(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case O:return"Fragment";case D:return"Portal";case K:return"Profiler";case F:return"StrictMode";case Z:return"Suspense";case A:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case q:return(n.displayName||"Context")+".Consumer";case J:return(n._context.displayName||"Context")+".Provider";case ee:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case W:return i=n.displayName||null,i!==null?i:ce(n.type)||"Memo";case H:i=n._payload,n=n._init;try{return ce(n(i))}catch{}}return null}function ue(n){var i=n.type;switch(n.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=i.render,n=n.displayName||n.name||"",i.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ce(i);case 8:return i===F?"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 i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function Q(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function oe(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function me(n){var i=oe(n)?"checked":"value",a=Object.getOwnPropertyDescriptor(n.constructor.prototype,i),c=""+n[i];if(!n.hasOwnProperty(i)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var h=a.get,y=a.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return h.call(this)},set:function(S){c=""+S,y.call(this,S)}}),Object.defineProperty(n,i,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(S){c=""+S},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function we(n){n._valueTracker||(n._valueTracker=me(n))}function ve(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var a=i.getValue(),c="";return n&&(c=oe(n)?n.checked?"true":"false":n.value),n=c,n!==a?(i.setValue(n),!0):!1}function ge(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function _e(n,i){var a=i.checked;return U({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??n._wrapperState.initialChecked})}function Pe(n,i){var a=i.defaultValue==null?"":i.defaultValue,c=i.checked!=null?i.checked:i.defaultChecked;a=Q(i.value!=null?i.value:a),n._wrapperState={initialChecked:c,initialValue:a,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function Ne(n,i){i=i.checked,i!=null&&k(n,"checked",i,!1)}function Ie(n,i){Ne(n,i);var a=Q(i.value),c=i.type;if(a!=null)c==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=""+a):n.value!==""+a&&(n.value=""+a);else if(c==="submit"||c==="reset"){n.removeAttribute("value");return}i.hasOwnProperty("value")?vt(n,i.type,a):i.hasOwnProperty("defaultValue")&&vt(n,i.type,Q(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(n.defaultChecked=!!i.defaultChecked)}function mt(n,i,a){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var c=i.type;if(!(c!=="submit"&&c!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+n._wrapperState.initialValue,a||i===n.value||(n.value=i),n.defaultValue=i}a=n.name,a!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,a!==""&&(n.name=a)}function vt(n,i,a){(i!=="number"||ge(n.ownerDocument)!==n)&&(a==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+a&&(n.defaultValue=""+a))}var at=Array.isArray;function lt(n,i,a,c){if(n=n.options,i){i={};for(var h=0;h<a.length;h++)i["$"+a[h]]=!0;for(a=0;a<n.length;a++)h=i.hasOwnProperty("$"+n[a].value),n[a].selected!==h&&(n[a].selected=h),h&&c&&(n[a].defaultSelected=!0)}else{for(a=""+Q(a),i=null,h=0;h<n.length;h++){if(n[h].value===a){n[h].selected=!0,c&&(n[h].defaultSelected=!0);return}i!==null||n[h].disabled||(i=n[h])}i!==null&&(i.selected=!0)}}function En(n,i){if(i.dangerouslySetInnerHTML!=null)throw Error(r(91));return U({},i,{value:void 0,defaultValue:void 0,children:""+n._wrapperState.initialValue})}function ln(n,i){var a=i.value;if(a==null){if(a=i.children,i=i.defaultValue,a!=null){if(i!=null)throw Error(r(92));if(at(a)){if(1<a.length)throw Error(r(93));a=a[0]}i=a}i==null&&(i=""),a=i}n._wrapperState={initialValue:Q(a)}}function un(n,i){var a=Q(i.value),c=Q(i.defaultValue);a!=null&&(a=""+a,a!==n.value&&(n.value=a),i.defaultValue==null&&n.defaultValue!==a&&(n.defaultValue=a)),c!=null&&(n.defaultValue=""+c)}function xt(n){var i=n.textContent;i===n._wrapperState.initialValue&&i!==""&&i!==null&&(n.value=i)}function zt(n){switch(n){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 Pt(n,i){return n==null||n==="http://www.w3.org/1999/xhtml"?zt(i):n==="http://www.w3.org/2000/svg"&&i==="foreignObject"?"http://www.w3.org/1999/xhtml":n}var Ft,Gr=(function(n){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(i,a,c,h){MSApp.execUnsafeLocalFunction(function(){return n(i,a,c,h)})}:n})(function(n,i){if(n.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in n)n.innerHTML=i;else{for(Ft=Ft||document.createElement("div"),Ft.innerHTML="<svg>"+i.valueOf().toString()+"</svg>",i=Ft.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;i.firstChild;)n.appendChild(i.firstChild)}});function Cn(n,i){if(i){var a=n.firstChild;if(a&&a===n.lastChild&&a.nodeType===3){a.nodeValue=i;return}}n.textContent=i}var mr={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},Yl=["Webkit","ms","Moz","O"];Object.keys(mr).forEach(function(n){Yl.forEach(function(i){i=i+n.charAt(0).toUpperCase()+n.substring(1),mr[i]=mr[n]})});function Cs(n,i,a){return i==null||typeof i=="boolean"||i===""?"":a||typeof i!="number"||i===0||mr.hasOwnProperty(n)&&mr[n]?(""+i).trim():i+"px"}function _s(n,i){n=n.style;for(var a in i)if(i.hasOwnProperty(a)){var c=a.indexOf("--")===0,h=Cs(a,i[a],c);a==="float"&&(a="cssFloat"),c?n.setProperty(a,h):n[a]=h}}var Gl=U({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 Ki(n,i){if(i){if(Gl[n]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(r(137,n));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(r(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(r(61))}if(i.style!=null&&typeof i.style!="object")throw Error(r(62))}}function Yi(n,i){if(n.indexOf("-")===-1)return typeof i.is=="string";switch(n){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 Gi=null;function Qi(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var qi=null,On=null,$n=null;function Ts(n){if(n=ko(n)){if(typeof qi!="function")throw Error(r(280));var i=n.stateNode;i&&(i=na(i),qi(n.stateNode,n.type,i))}}function Ps(n){On?$n?$n.push(n):$n=[n]:On=n}function Ms(){if(On){var n=On,i=$n;if($n=On=null,Ts(n),i)for(n=0;n<i.length;n++)Ts(i[n])}}function Ns(n,i){return n(i)}function As(){}var Zi=!1;function bs(n,i,a){if(Zi)return n(i,a);Zi=!0;try{return Ns(n,i,a)}finally{Zi=!1,(On!==null||$n!==null)&&(As(),Ms())}}function gr(n,i){var a=n.stateNode;if(a===null)return null;var c=na(a);if(c===null)return null;a=c[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(a&&typeof a!="function")throw Error(r(231,i,typeof a));return a}var Ji=!1;if(f)try{var yr={};Object.defineProperty(yr,"passive",{get:function(){Ji=!0}}),window.addEventListener("test",yr,yr),window.removeEventListener("test",yr,yr)}catch{Ji=!1}function Ql(n,i,a,c,h,y,S,b,V){var G=Array.prototype.slice.call(arguments,3);try{i.apply(a,G)}catch(re){this.onError(re)}}var vr=!1,Qr=null,qr=!1,eo=null,ql={onError:function(n){vr=!0,Qr=n}};function Zl(n,i,a,c,h,y,S,b,V){vr=!1,Qr=null,Ql.apply(ql,arguments)}function Jl(n,i,a,c,h,y,S,b,V){if(Zl.apply(this,arguments),vr){if(vr){var G=Qr;vr=!1,Qr=null}else throw Error(r(198));qr||(qr=!0,eo=G)}}function cn(n){var i=n,a=n;if(n.alternate)for(;i.return;)i=i.return;else{n=i;do i=n,(i.flags&4098)!==0&&(a=i.return),n=i.return;while(n)}return i.tag===3?a:null}function to(n){if(n.tag===13){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function no(n){if(cn(n)!==n)throw Error(r(188))}function eu(n){var i=n.alternate;if(!i){if(i=cn(n),i===null)throw Error(r(188));return i!==n?null:n}for(var a=n,c=i;;){var h=a.return;if(h===null)break;var y=h.alternate;if(y===null){if(c=h.return,c!==null){a=c;continue}break}if(h.child===y.child){for(y=h.child;y;){if(y===a)return no(h),n;if(y===c)return no(h),i;y=y.sibling}throw Error(r(188))}if(a.return!==c.return)a=h,c=y;else{for(var S=!1,b=h.child;b;){if(b===a){S=!0,a=h,c=y;break}if(b===c){S=!0,c=h,a=y;break}b=b.sibling}if(!S){for(b=y.child;b;){if(b===a){S=!0,a=y,c=h;break}if(b===c){S=!0,c=y,a=h;break}b=b.sibling}if(!S)throw Error(r(189))}}if(a.alternate!==c)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?n:i}function Rs(n){return n=eu(n),n!==null?Ds(n):null}function Ds(n){if(n.tag===5||n.tag===6)return n;for(n=n.child;n!==null;){var i=Ds(n);if(i!==null)return i;n=n.sibling}return null}var Is=t.unstable_scheduleCallback,Ls=t.unstable_cancelCallback,tu=t.unstable_shouldYield,js=t.unstable_requestPaint,Oe=t.unstable_now,nu=t.unstable_getCurrentPriorityLevel,ro=t.unstable_ImmediatePriority,Vs=t.unstable_UserBlockingPriority,Zr=t.unstable_NormalPriority,ru=t.unstable_LowPriority,zs=t.unstable_IdlePriority,Jr=null,Mt=null;function iu(n){if(Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(Jr,n,void 0,(n.current.flags&128)===128)}catch{}}var Nt=Math.clz32?Math.clz32:au,ou=Math.log,su=Math.LN2;function au(n){return n>>>=0,n===0?32:31-(ou(n)/su|0)|0}var ei=64,ti=4194304;function xr(n){switch(n&-n){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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function _n(n,i){var a=n.pendingLanes;if(a===0)return 0;var c=0,h=n.suspendedLanes,y=n.pingedLanes,S=a&268435455;if(S!==0){var b=S&~h;b!==0?c=xr(b):(y&=S,y!==0&&(c=xr(y)))}else S=a&~h,S!==0?c=xr(S):y!==0&&(c=xr(y));if(c===0)return 0;if(i!==0&&i!==c&&(i&h)===0&&(h=c&-c,y=i&-i,h>=y||h===16&&(y&4194240)!==0))return i;if((c&4)!==0&&(c|=a&16),i=n.entangledLanes,i!==0)for(n=n.entanglements,i&=c;0<i;)a=31-Nt(i),h=1<<a,c|=n[a],i&=~h;return c}function lu(n,i){switch(n){case 1:case 2:case 4:return i+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 i+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 Fs(n,i){for(var a=n.suspendedLanes,c=n.pingedLanes,h=n.expirationTimes,y=n.pendingLanes;0<y;){var S=31-Nt(y),b=1<<S,V=h[S];V===-1?((b&a)===0||(b&c)!==0)&&(h[S]=lu(b,i)):V<=i&&(n.expiredLanes|=b),y&=~b}}function io(n){return n=n.pendingLanes&-1073741825,n!==0?n:n&1073741824?1073741824:0}function Bs(){var n=ei;return ei<<=1,(ei&4194240)===0&&(ei=64),n}function wr(n){for(var i=[],a=0;31>a;a++)i.push(n);return i}function Sr(n,i,a){n.pendingLanes|=i,i!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,i=31-Nt(i),n[i]=a}function uu(n,i){var a=n.pendingLanes&~i;n.pendingLanes=i,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=i,n.mutableReadLanes&=i,n.entangledLanes&=i,i=n.entanglements;var c=n.eventTimes;for(n=n.expirationTimes;0<a;){var h=31-Nt(a),y=1<<h;i[h]=0,c[h]=-1,n[h]=-1,a&=~y}}function ni(n,i){var a=n.entangledLanes|=i;for(n=n.entanglements;a;){var c=31-Nt(a),h=1<<c;h&i|n[c]&i&&(n[c]|=i),a&=~h}}var De=0;function Gd(n){return n&=-n,1<n?4<n?(n&268435455)!==0?16:536870912:4:1}var Qd,cu,qd,Zd,Jd,fu=!1,Os=[],Hn=null,Un=null,Wn=null,oo=new Map,so=new Map,Xn=[],A1="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 eh(n,i){switch(n){case"focusin":case"focusout":Hn=null;break;case"dragenter":case"dragleave":Un=null;break;case"mouseover":case"mouseout":Wn=null;break;case"pointerover":case"pointerout":oo.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":so.delete(i.pointerId)}}function ao(n,i,a,c,h,y){return n===null||n.nativeEvent!==y?(n={blockedOn:i,domEventName:a,eventSystemFlags:c,nativeEvent:y,targetContainers:[h]},i!==null&&(i=ko(i),i!==null&&cu(i)),n):(n.eventSystemFlags|=c,i=n.targetContainers,h!==null&&i.indexOf(h)===-1&&i.push(h),n)}function b1(n,i,a,c,h){switch(i){case"focusin":return Hn=ao(Hn,n,i,a,c,h),!0;case"dragenter":return Un=ao(Un,n,i,a,c,h),!0;case"mouseover":return Wn=ao(Wn,n,i,a,c,h),!0;case"pointerover":var y=h.pointerId;return oo.set(y,ao(oo.get(y)||null,n,i,a,c,h)),!0;case"gotpointercapture":return y=h.pointerId,so.set(y,ao(so.get(y)||null,n,i,a,c,h)),!0}return!1}function th(n){var i=kr(n.target);if(i!==null){var a=cn(i);if(a!==null){if(i=a.tag,i===13){if(i=to(a),i!==null){n.blockedOn=i,Jd(n.priority,function(){qd(a)});return}}else if(i===3&&a.stateNode.current.memoizedState.isDehydrated){n.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}n.blockedOn=null}function $s(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var a=hu(n.domEventName,n.eventSystemFlags,i[0],n.nativeEvent);if(a===null){a=n.nativeEvent;var c=new a.constructor(a.type,a);Gi=c,a.target.dispatchEvent(c),Gi=null}else return i=ko(a),i!==null&&cu(i),n.blockedOn=a,!1;i.shift()}return!0}function nh(n,i,a){$s(n)&&a.delete(i)}function R1(){fu=!1,Hn!==null&&$s(Hn)&&(Hn=null),Un!==null&&$s(Un)&&(Un=null),Wn!==null&&$s(Wn)&&(Wn=null),oo.forEach(nh),so.forEach(nh)}function lo(n,i){n.blockedOn===i&&(n.blockedOn=null,fu||(fu=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,R1)))}function uo(n){function i(h){return lo(h,n)}if(0<Os.length){lo(Os[0],n);for(var a=1;a<Os.length;a++){var c=Os[a];c.blockedOn===n&&(c.blockedOn=null)}}for(Hn!==null&&lo(Hn,n),Un!==null&&lo(Un,n),Wn!==null&&lo(Wn,n),oo.forEach(i),so.forEach(i),a=0;a<Xn.length;a++)c=Xn[a],c.blockedOn===n&&(c.blockedOn=null);for(;0<Xn.length&&(a=Xn[0],a.blockedOn===null);)th(a),a.blockedOn===null&&Xn.shift()}var ri=P.ReactCurrentBatchConfig,Hs=!0;function D1(n,i,a,c){var h=De,y=ri.transition;ri.transition=null;try{De=1,du(n,i,a,c)}finally{De=h,ri.transition=y}}function I1(n,i,a,c){var h=De,y=ri.transition;ri.transition=null;try{De=4,du(n,i,a,c)}finally{De=h,ri.transition=y}}function du(n,i,a,c){if(Hs){var h=hu(n,i,a,c);if(h===null)Au(n,i,c,Us,a),eh(n,c);else if(b1(h,n,i,a,c))c.stopPropagation();else if(eh(n,c),i&4&&-1<A1.indexOf(n)){for(;h!==null;){var y=ko(h);if(y!==null&&Qd(y),y=hu(n,i,a,c),y===null&&Au(n,i,c,Us,a),y===h)break;h=y}h!==null&&c.stopPropagation()}else Au(n,i,c,null,a)}}var Us=null;function hu(n,i,a,c){if(Us=null,n=Qi(c),n=kr(n),n!==null)if(i=cn(n),i===null)n=null;else if(a=i.tag,a===13){if(n=to(i),n!==null)return n;n=null}else if(a===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null);return Us=n,null}function rh(n){switch(n){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(nu()){case ro:return 1;case Vs:return 4;case Zr:case ru:return 16;case zs:return 536870912;default:return 16}default:return 16}}var Kn=null,pu=null,Ws=null;function ih(){if(Ws)return Ws;var n,i=pu,a=i.length,c,h="value"in Kn?Kn.value:Kn.textContent,y=h.length;for(n=0;n<a&&i[n]===h[n];n++);var S=a-n;for(c=1;c<=S&&i[a-c]===h[y-c];c++);return Ws=h.slice(n,1<c?1-c:void 0)}function Xs(n){var i=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&i===13&&(n=13)):n=i,n===10&&(n=13),32<=n||n===13?n:0}function Ks(){return!0}function oh(){return!1}function At(n){function i(a,c,h,y,S){this._reactName=a,this._targetInst=h,this.type=c,this.nativeEvent=y,this.target=S,this.currentTarget=null;for(var b in n)n.hasOwnProperty(b)&&(a=n[b],this[b]=a?a(y):y[b]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Ks:oh,this.isPropagationStopped=oh,this}return U(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ks)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ks)},persist:function(){},isPersistent:Ks}),i}var ii={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mu=At(ii),co=U({},ii,{view:0,detail:0}),L1=At(co),gu,yu,fo,Ys=U({},co,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xu,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==fo&&(fo&&n.type==="mousemove"?(gu=n.screenX-fo.screenX,yu=n.screenY-fo.screenY):yu=gu=0,fo=n),gu)},movementY:function(n){return"movementY"in n?n.movementY:yu}}),sh=At(Ys),j1=U({},Ys,{dataTransfer:0}),V1=At(j1),z1=U({},co,{relatedTarget:0}),vu=At(z1),F1=U({},ii,{animationName:0,elapsedTime:0,pseudoElement:0}),B1=At(F1),O1=U({},ii,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),$1=At(O1),H1=U({},ii,{data:0}),ah=At(H1),U1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},W1={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"},X1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function K1(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=X1[n])?!!i[n]:!1}function xu(){return K1}var Y1=U({},co,{key:function(n){if(n.key){var i=U1[n.key]||n.key;if(i!=="Unidentified")return i}return n.type==="keypress"?(n=Xs(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?W1[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xu,charCode:function(n){return n.type==="keypress"?Xs(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Xs(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),G1=At(Y1),Q1=U({},Ys,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lh=At(Q1),q1=U({},co,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xu}),Z1=At(q1),J1=U({},ii,{propertyName:0,elapsedTime:0,pseudoElement:0}),ew=At(J1),tw=U({},Ys,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),nw=At(tw),rw=[9,13,27,32],wu=f&&"CompositionEvent"in window,ho=null;f&&"documentMode"in document&&(ho=document.documentMode);var iw=f&&"TextEvent"in window&&!ho,uh=f&&(!wu||ho&&8<ho&&11>=ho),ch=" ",fh=!1;function dh(n,i){switch(n){case"keyup":return rw.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hh(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var oi=!1;function ow(n,i){switch(n){case"compositionend":return hh(i);case"keypress":return i.which!==32?null:(fh=!0,ch);case"textInput":return n=i.data,n===ch&&fh?null:n;default:return null}}function sw(n,i){if(oi)return n==="compositionend"||!wu&&dh(n,i)?(n=ih(),Ws=pu=Kn=null,oi=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return uh&&i.locale!=="ko"?null:i.data;default:return null}}var aw={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 ph(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!aw[n.type]:i==="textarea"}function mh(n,i,a,c){Ps(c),i=Js(i,"onChange"),0<i.length&&(a=new mu("onChange","change",null,a,c),n.push({event:a,listeners:i}))}var po=null,mo=null;function lw(n){Dh(n,0)}function Gs(n){var i=ci(n);if(ve(i))return n}function uw(n,i){if(n==="change")return i}var gh=!1;if(f){var Su;if(f){var ku="oninput"in document;if(!ku){var yh=document.createElement("div");yh.setAttribute("oninput","return;"),ku=typeof yh.oninput=="function"}Su=ku}else Su=!1;gh=Su&&(!document.documentMode||9<document.documentMode)}function vh(){po&&(po.detachEvent("onpropertychange",xh),mo=po=null)}function xh(n){if(n.propertyName==="value"&&Gs(mo)){var i=[];mh(i,mo,n,Qi(n)),bs(lw,i)}}function cw(n,i,a){n==="focusin"?(vh(),po=i,mo=a,po.attachEvent("onpropertychange",xh)):n==="focusout"&&vh()}function fw(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Gs(mo)}function dw(n,i){if(n==="click")return Gs(i)}function hw(n,i){if(n==="input"||n==="change")return Gs(i)}function pw(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var Yt=typeof Object.is=="function"?Object.is:pw;function go(n,i){if(Yt(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;var a=Object.keys(n),c=Object.keys(i);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var h=a[c];if(!d.call(i,h)||!Yt(n[h],i[h]))return!1}return!0}function wh(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Sh(n,i){var a=wh(n);n=0;for(var c;a;){if(a.nodeType===3){if(c=n+a.textContent.length,n<=i&&c>=i)return{node:a,offset:i-n};n=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=wh(a)}}function kh(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?kh(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function Eh(){for(var n=window,i=ge();i instanceof n.HTMLIFrameElement;){try{var a=typeof i.contentWindow.location.href=="string"}catch{a=!1}if(a)n=i.contentWindow;else break;i=ge(n.document)}return i}function Eu(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}function mw(n){var i=Eh(),a=n.focusedElem,c=n.selectionRange;if(i!==a&&a&&a.ownerDocument&&kh(a.ownerDocument.documentElement,a)){if(c!==null&&Eu(a)){if(i=c.start,n=c.end,n===void 0&&(n=i),"selectionStart"in a)a.selectionStart=i,a.selectionEnd=Math.min(n,a.value.length);else if(n=(i=a.ownerDocument||document)&&i.defaultView||window,n.getSelection){n=n.getSelection();var h=a.textContent.length,y=Math.min(c.start,h);c=c.end===void 0?y:Math.min(c.end,h),!n.extend&&y>c&&(h=c,c=y,y=h),h=Sh(a,y);var S=Sh(a,c);h&&S&&(n.rangeCount!==1||n.anchorNode!==h.node||n.anchorOffset!==h.offset||n.focusNode!==S.node||n.focusOffset!==S.offset)&&(i=i.createRange(),i.setStart(h.node,h.offset),n.removeAllRanges(),y>c?(n.addRange(i),n.extend(S.node,S.offset)):(i.setEnd(S.node,S.offset),n.addRange(i)))}}for(i=[],n=a;n=n.parentNode;)n.nodeType===1&&i.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<i.length;a++)n=i[a],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var gw=f&&"documentMode"in document&&11>=document.documentMode,si=null,Cu=null,yo=null,_u=!1;function Ch(n,i,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;_u||si==null||si!==ge(c)||(c=si,"selectionStart"in c&&Eu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),yo&&go(yo,c)||(yo=c,c=Js(Cu,"onSelect"),0<c.length&&(i=new mu("onSelect","select",null,i,a),n.push({event:i,listeners:c}),i.target=si)))}function Qs(n,i){var a={};return a[n.toLowerCase()]=i.toLowerCase(),a["Webkit"+n]="webkit"+i,a["Moz"+n]="moz"+i,a}var ai={animationend:Qs("Animation","AnimationEnd"),animationiteration:Qs("Animation","AnimationIteration"),animationstart:Qs("Animation","AnimationStart"),transitionend:Qs("Transition","TransitionEnd")},Tu={},_h={};f&&(_h=document.createElement("div").style,"AnimationEvent"in window||(delete ai.animationend.animation,delete ai.animationiteration.animation,delete ai.animationstart.animation),"TransitionEvent"in window||delete ai.transitionend.transition);function qs(n){if(Tu[n])return Tu[n];if(!ai[n])return n;var i=ai[n],a;for(a in i)if(i.hasOwnProperty(a)&&a in _h)return Tu[n]=i[a];return n}var Th=qs("animationend"),Ph=qs("animationiteration"),Mh=qs("animationstart"),Nh=qs("transitionend"),Ah=new Map,bh="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 Yn(n,i){Ah.set(n,i),l(i,[n])}for(var Pu=0;Pu<bh.length;Pu++){var Mu=bh[Pu],yw=Mu.toLowerCase(),vw=Mu[0].toUpperCase()+Mu.slice(1);Yn(yw,"on"+vw)}Yn(Th,"onAnimationEnd"),Yn(Ph,"onAnimationIteration"),Yn(Mh,"onAnimationStart"),Yn("dblclick","onDoubleClick"),Yn("focusin","onFocus"),Yn("focusout","onBlur"),Yn(Nh,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vo="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(" "),xw=new Set("cancel close invalid load scroll toggle".split(" ").concat(vo));function Rh(n,i,a){var c=n.type||"unknown-event";n.currentTarget=a,Jl(c,i,void 0,n),n.currentTarget=null}function Dh(n,i){i=(i&4)!==0;for(var a=0;a<n.length;a++){var c=n[a],h=c.event;c=c.listeners;e:{var y=void 0;if(i)for(var S=c.length-1;0<=S;S--){var b=c[S],V=b.instance,G=b.currentTarget;if(b=b.listener,V!==y&&h.isPropagationStopped())break e;Rh(h,b,G),y=V}else for(S=0;S<c.length;S++){if(b=c[S],V=b.instance,G=b.currentTarget,b=b.listener,V!==y&&h.isPropagationStopped())break e;Rh(h,b,G),y=V}}}if(qr)throw n=eo,qr=!1,eo=null,n}function je(n,i){var a=i[ju];a===void 0&&(a=i[ju]=new Set);var c=n+"__bubble";a.has(c)||(Ih(i,n,2,!1),a.add(c))}function Nu(n,i,a){var c=0;i&&(c|=4),Ih(a,n,c,i)}var Zs="_reactListening"+Math.random().toString(36).slice(2);function xo(n){if(!n[Zs]){n[Zs]=!0,o.forEach(function(a){a!=="selectionchange"&&(xw.has(a)||Nu(a,!1,n),Nu(a,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[Zs]||(i[Zs]=!0,Nu("selectionchange",!1,i))}}function Ih(n,i,a,c){switch(rh(i)){case 1:var h=D1;break;case 4:h=I1;break;default:h=du}a=h.bind(null,i,a,n),h=void 0,!Ji||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(h=!0),c?h!==void 0?n.addEventListener(i,a,{capture:!0,passive:h}):n.addEventListener(i,a,!0):h!==void 0?n.addEventListener(i,a,{passive:h}):n.addEventListener(i,a,!1)}function Au(n,i,a,c,h){var y=c;if((i&1)===0&&(i&2)===0&&c!==null)e:for(;;){if(c===null)return;var S=c.tag;if(S===3||S===4){var b=c.stateNode.containerInfo;if(b===h||b.nodeType===8&&b.parentNode===h)break;if(S===4)for(S=c.return;S!==null;){var V=S.tag;if((V===3||V===4)&&(V=S.stateNode.containerInfo,V===h||V.nodeType===8&&V.parentNode===h))return;S=S.return}for(;b!==null;){if(S=kr(b),S===null)return;if(V=S.tag,V===5||V===6){c=y=S;continue e}b=b.parentNode}}c=c.return}bs(function(){var G=y,re=Qi(a),se=[];e:{var ne=Ah.get(n);if(ne!==void 0){var fe=mu,he=n;switch(n){case"keypress":if(Xs(a)===0)break e;case"keydown":case"keyup":fe=G1;break;case"focusin":he="focus",fe=vu;break;case"focusout":he="blur",fe=vu;break;case"beforeblur":case"afterblur":fe=vu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=sh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=V1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=Z1;break;case Th:case Ph:case Mh:fe=B1;break;case Nh:fe=ew;break;case"scroll":fe=L1;break;case"wheel":fe=nw;break;case"copy":case"cut":case"paste":fe=$1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=lh}var pe=(i&4)!==0,Ye=!pe&&n==="scroll",X=pe?ne!==null?ne+"Capture":null:ne;pe=[];for(var B=G,Y;B!==null;){Y=B;var ae=Y.stateNode;if(Y.tag===5&&ae!==null&&(Y=ae,X!==null&&(ae=gr(B,X),ae!=null&&pe.push(wo(B,ae,Y)))),Ye)break;B=B.return}0<pe.length&&(ne=new fe(ne,he,null,a,re),se.push({event:ne,listeners:pe}))}}if((i&7)===0){e:{if(ne=n==="mouseover"||n==="pointerover",fe=n==="mouseout"||n==="pointerout",ne&&a!==Gi&&(he=a.relatedTarget||a.fromElement)&&(kr(he)||he[Tn]))break e;if((fe||ne)&&(ne=re.window===re?re:(ne=re.ownerDocument)?ne.defaultView||ne.parentWindow:window,fe?(he=a.relatedTarget||a.toElement,fe=G,he=he?kr(he):null,he!==null&&(Ye=cn(he),he!==Ye||he.tag!==5&&he.tag!==6)&&(he=null)):(fe=null,he=G),fe!==he)){if(pe=sh,ae="onMouseLeave",X="onMouseEnter",B="mouse",(n==="pointerout"||n==="pointerover")&&(pe=lh,ae="onPointerLeave",X="onPointerEnter",B="pointer"),Ye=fe==null?ne:ci(fe),Y=he==null?ne:ci(he),ne=new pe(ae,B+"leave",fe,a,re),ne.target=Ye,ne.relatedTarget=Y,ae=null,kr(re)===G&&(pe=new pe(X,B+"enter",he,a,re),pe.target=Y,pe.relatedTarget=Ye,ae=pe),Ye=ae,fe&&he)t:{for(pe=fe,X=he,B=0,Y=pe;Y;Y=li(Y))B++;for(Y=0,ae=X;ae;ae=li(ae))Y++;for(;0<B-Y;)pe=li(pe),B--;for(;0<Y-B;)X=li(X),Y--;for(;B--;){if(pe===X||X!==null&&pe===X.alternate)break t;pe=li(pe),X=li(X)}pe=null}else pe=null;fe!==null&&Lh(se,ne,fe,pe,!1),he!==null&&Ye!==null&&Lh(se,Ye,he,pe,!0)}}e:{if(ne=G?ci(G):window,fe=ne.nodeName&&ne.nodeName.toLowerCase(),fe==="select"||fe==="input"&&ne.type==="file")var ye=uw;else if(ph(ne))if(gh)ye=hw;else{ye=fw;var Se=cw}else(fe=ne.nodeName)&&fe.toLowerCase()==="input"&&(ne.type==="checkbox"||ne.type==="radio")&&(ye=dw);if(ye&&(ye=ye(n,G))){mh(se,ye,a,re);break e}Se&&Se(n,ne,G),n==="focusout"&&(Se=ne._wrapperState)&&Se.controlled&&ne.type==="number"&&vt(ne,"number",ne.value)}switch(Se=G?ci(G):window,n){case"focusin":(ph(Se)||Se.contentEditable==="true")&&(si=Se,Cu=G,yo=null);break;case"focusout":yo=Cu=si=null;break;case"mousedown":_u=!0;break;case"contextmenu":case"mouseup":case"dragend":_u=!1,Ch(se,a,re);break;case"selectionchange":if(gw)break;case"keydown":case"keyup":Ch(se,a,re)}var ke;if(wu)e:{switch(n){case"compositionstart":var Ce="onCompositionStart";break e;case"compositionend":Ce="onCompositionEnd";break e;case"compositionupdate":Ce="onCompositionUpdate";break e}Ce=void 0}else oi?dh(n,a)&&(Ce="onCompositionEnd"):n==="keydown"&&a.keyCode===229&&(Ce="onCompositionStart");Ce&&(uh&&a.locale!=="ko"&&(oi||Ce!=="onCompositionStart"?Ce==="onCompositionEnd"&&oi&&(ke=ih()):(Kn=re,pu="value"in Kn?Kn.value:Kn.textContent,oi=!0)),Se=Js(G,Ce),0<Se.length&&(Ce=new ah(Ce,n,null,a,re),se.push({event:Ce,listeners:Se}),ke?Ce.data=ke:(ke=hh(a),ke!==null&&(Ce.data=ke)))),(ke=iw?ow(n,a):sw(n,a))&&(G=Js(G,"onBeforeInput"),0<G.length&&(re=new ah("onBeforeInput","beforeinput",null,a,re),se.push({event:re,listeners:G}),re.data=ke))}Dh(se,i)})}function wo(n,i,a){return{instance:n,listener:i,currentTarget:a}}function Js(n,i){for(var a=i+"Capture",c=[];n!==null;){var h=n,y=h.stateNode;h.tag===5&&y!==null&&(h=y,y=gr(n,a),y!=null&&c.unshift(wo(n,y,h)),y=gr(n,i),y!=null&&c.push(wo(n,y,h))),n=n.return}return c}function li(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5);return n||null}function Lh(n,i,a,c,h){for(var y=i._reactName,S=[];a!==null&&a!==c;){var b=a,V=b.alternate,G=b.stateNode;if(V!==null&&V===c)break;b.tag===5&&G!==null&&(b=G,h?(V=gr(a,y),V!=null&&S.unshift(wo(a,V,b))):h||(V=gr(a,y),V!=null&&S.push(wo(a,V,b)))),a=a.return}S.length!==0&&n.push({event:i,listeners:S})}var ww=/\r\n?/g,Sw=/\u0000|\uFFFD/g;function jh(n){return(typeof n=="string"?n:""+n).replace(ww,`
|
|
38
|
+
`).replace(Sw,"")}function ea(n,i,a){if(i=jh(i),jh(n)!==i&&a)throw Error(r(425))}function ta(){}var bu=null,Ru=null;function Du(n,i){return n==="textarea"||n==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Iu=typeof setTimeout=="function"?setTimeout:void 0,kw=typeof clearTimeout=="function"?clearTimeout:void 0,Vh=typeof Promise=="function"?Promise:void 0,Ew=typeof queueMicrotask=="function"?queueMicrotask:typeof Vh<"u"?function(n){return Vh.resolve(null).then(n).catch(Cw)}:Iu;function Cw(n){setTimeout(function(){throw n})}function Lu(n,i){var a=i,c=0;do{var h=a.nextSibling;if(n.removeChild(a),h&&h.nodeType===8)if(a=h.data,a==="/$"){if(c===0){n.removeChild(h),uo(i);return}c--}else a!=="$"&&a!=="$?"&&a!=="$!"||c++;a=h}while(a);uo(i)}function Gn(n){for(;n!=null;n=n.nextSibling){var i=n.nodeType;if(i===1||i===3)break;if(i===8){if(i=n.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return n}function zh(n){n=n.previousSibling;for(var i=0;n;){if(n.nodeType===8){var a=n.data;if(a==="$"||a==="$!"||a==="$?"){if(i===0)return n;i--}else a==="/$"&&i++}n=n.previousSibling}return null}var ui=Math.random().toString(36).slice(2),fn="__reactFiber$"+ui,So="__reactProps$"+ui,Tn="__reactContainer$"+ui,ju="__reactEvents$"+ui,_w="__reactListeners$"+ui,Tw="__reactHandles$"+ui;function kr(n){var i=n[fn];if(i)return i;for(var a=n.parentNode;a;){if(i=a[Tn]||a[fn]){if(a=i.alternate,i.child!==null||a!==null&&a.child!==null)for(n=zh(n);n!==null;){if(a=n[fn])return a;n=zh(n)}return i}n=a,a=n.parentNode}return null}function ko(n){return n=n[fn]||n[Tn],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function ci(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(r(33))}function na(n){return n[So]||null}var Vu=[],fi=-1;function Qn(n){return{current:n}}function Ve(n){0>fi||(n.current=Vu[fi],Vu[fi]=null,fi--)}function Le(n,i){fi++,Vu[fi]=n.current,n.current=i}var qn={},ut=Qn(qn),wt=Qn(!1),Er=qn;function di(n,i){var a=n.type.contextTypes;if(!a)return qn;var c=n.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===i)return c.__reactInternalMemoizedMaskedChildContext;var h={},y;for(y in a)h[y]=i[y];return c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=i,n.__reactInternalMemoizedMaskedChildContext=h),h}function St(n){return n=n.childContextTypes,n!=null}function ra(){Ve(wt),Ve(ut)}function Fh(n,i,a){if(ut.current!==qn)throw Error(r(168));Le(ut,i),Le(wt,a)}function Bh(n,i,a){var c=n.stateNode;if(i=i.childContextTypes,typeof c.getChildContext!="function")return a;c=c.getChildContext();for(var h in c)if(!(h in i))throw Error(r(108,ue(n)||"Unknown",h));return U({},a,c)}function ia(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||qn,Er=ut.current,Le(ut,n),Le(wt,wt.current),!0}function Oh(n,i,a){var c=n.stateNode;if(!c)throw Error(r(169));a?(n=Bh(n,i,Er),c.__reactInternalMemoizedMergedChildContext=n,Ve(wt),Ve(ut),Le(ut,n)):Ve(wt),Le(wt,a)}var Pn=null,oa=!1,zu=!1;function $h(n){Pn===null?Pn=[n]:Pn.push(n)}function Pw(n){oa=!0,$h(n)}function Zn(){if(!zu&&Pn!==null){zu=!0;var n=0,i=De;try{var a=Pn;for(De=1;n<a.length;n++){var c=a[n];do c=c(!0);while(c!==null)}Pn=null,oa=!1}catch(h){throw Pn!==null&&(Pn=Pn.slice(n+1)),Is(ro,Zn),h}finally{De=i,zu=!1}}return null}var hi=[],pi=0,sa=null,aa=0,Bt=[],Ot=0,Cr=null,Mn=1,Nn="";function _r(n,i){hi[pi++]=aa,hi[pi++]=sa,sa=n,aa=i}function Hh(n,i,a){Bt[Ot++]=Mn,Bt[Ot++]=Nn,Bt[Ot++]=Cr,Cr=n;var c=Mn;n=Nn;var h=32-Nt(c)-1;c&=~(1<<h),a+=1;var y=32-Nt(i)+h;if(30<y){var S=h-h%5;y=(c&(1<<S)-1).toString(32),c>>=S,h-=S,Mn=1<<32-Nt(i)+h|a<<h|c,Nn=y+n}else Mn=1<<y|a<<h|c,Nn=n}function Fu(n){n.return!==null&&(_r(n,1),Hh(n,1,0))}function Bu(n){for(;n===sa;)sa=hi[--pi],hi[pi]=null,aa=hi[--pi],hi[pi]=null;for(;n===Cr;)Cr=Bt[--Ot],Bt[Ot]=null,Nn=Bt[--Ot],Bt[Ot]=null,Mn=Bt[--Ot],Bt[Ot]=null}var bt=null,Rt=null,Be=!1,Gt=null;function Uh(n,i){var a=Wt(5,null,null,0);a.elementType="DELETED",a.stateNode=i,a.return=n,i=n.deletions,i===null?(n.deletions=[a],n.flags|=16):i.push(a)}function Wh(n,i){switch(n.tag){case 5:var a=n.type;return i=i.nodeType!==1||a.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(n.stateNode=i,bt=n,Rt=Gn(i.firstChild),!0):!1;case 6:return i=n.pendingProps===""||i.nodeType!==3?null:i,i!==null?(n.stateNode=i,bt=n,Rt=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(a=Cr!==null?{id:Mn,overflow:Nn}:null,n.memoizedState={dehydrated:i,treeContext:a,retryLane:1073741824},a=Wt(18,null,null,0),a.stateNode=i,a.return=n,n.child=a,bt=n,Rt=null,!0):!1;default:return!1}}function Ou(n){return(n.mode&1)!==0&&(n.flags&128)===0}function $u(n){if(Be){var i=Rt;if(i){var a=i;if(!Wh(n,i)){if(Ou(n))throw Error(r(418));i=Gn(a.nextSibling);var c=bt;i&&Wh(n,i)?Uh(c,a):(n.flags=n.flags&-4097|2,Be=!1,bt=n)}}else{if(Ou(n))throw Error(r(418));n.flags=n.flags&-4097|2,Be=!1,bt=n}}}function Xh(n){for(n=n.return;n!==null&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;bt=n}function la(n){if(n!==bt)return!1;if(!Be)return Xh(n),Be=!0,!1;var i;if((i=n.tag!==3)&&!(i=n.tag!==5)&&(i=n.type,i=i!=="head"&&i!=="body"&&!Du(n.type,n.memoizedProps)),i&&(i=Rt)){if(Ou(n))throw Kh(),Error(r(418));for(;i;)Uh(n,i),i=Gn(i.nextSibling)}if(Xh(n),n.tag===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));e:{for(n=n.nextSibling,i=0;n;){if(n.nodeType===8){var a=n.data;if(a==="/$"){if(i===0){Rt=Gn(n.nextSibling);break e}i--}else a!=="$"&&a!=="$!"&&a!=="$?"||i++}n=n.nextSibling}Rt=null}}else Rt=bt?Gn(n.stateNode.nextSibling):null;return!0}function Kh(){for(var n=Rt;n;)n=Gn(n.nextSibling)}function mi(){Rt=bt=null,Be=!1}function Hu(n){Gt===null?Gt=[n]:Gt.push(n)}var Mw=P.ReactCurrentBatchConfig;function Eo(n,i,a){if(n=a.ref,n!==null&&typeof n!="function"&&typeof n!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(r(309));var c=a.stateNode}if(!c)throw Error(r(147,n));var h=c,y=""+n;return i!==null&&i.ref!==null&&typeof i.ref=="function"&&i.ref._stringRef===y?i.ref:(i=function(S){var b=h.refs;S===null?delete b[y]:b[y]=S},i._stringRef=y,i)}if(typeof n!="string")throw Error(r(284));if(!a._owner)throw Error(r(290,n))}return n}function ua(n,i){throw n=Object.prototype.toString.call(i),Error(r(31,n==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":n))}function Yh(n){var i=n._init;return i(n._payload)}function Gh(n){function i(X,B){if(n){var Y=X.deletions;Y===null?(X.deletions=[B],X.flags|=16):Y.push(B)}}function a(X,B){if(!n)return null;for(;B!==null;)i(X,B),B=B.sibling;return null}function c(X,B){for(X=new Map;B!==null;)B.key!==null?X.set(B.key,B):X.set(B.index,B),B=B.sibling;return X}function h(X,B){return X=sr(X,B),X.index=0,X.sibling=null,X}function y(X,B,Y){return X.index=Y,n?(Y=X.alternate,Y!==null?(Y=Y.index,Y<B?(X.flags|=2,B):Y):(X.flags|=2,B)):(X.flags|=1048576,B)}function S(X){return n&&X.alternate===null&&(X.flags|=2),X}function b(X,B,Y,ae){return B===null||B.tag!==6?(B=Ic(Y,X.mode,ae),B.return=X,B):(B=h(B,Y),B.return=X,B)}function V(X,B,Y,ae){var ye=Y.type;return ye===O?re(X,B,Y.props.children,ae,Y.key):B!==null&&(B.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===H&&Yh(ye)===B.type)?(ae=h(B,Y.props),ae.ref=Eo(X,B,Y),ae.return=X,ae):(ae=Da(Y.type,Y.key,Y.props,null,X.mode,ae),ae.ref=Eo(X,B,Y),ae.return=X,ae)}function G(X,B,Y,ae){return B===null||B.tag!==4||B.stateNode.containerInfo!==Y.containerInfo||B.stateNode.implementation!==Y.implementation?(B=Lc(Y,X.mode,ae),B.return=X,B):(B=h(B,Y.children||[]),B.return=X,B)}function re(X,B,Y,ae,ye){return B===null||B.tag!==7?(B=Dr(Y,X.mode,ae,ye),B.return=X,B):(B=h(B,Y),B.return=X,B)}function se(X,B,Y){if(typeof B=="string"&&B!==""||typeof B=="number")return B=Ic(""+B,X.mode,Y),B.return=X,B;if(typeof B=="object"&&B!==null){switch(B.$$typeof){case R:return Y=Da(B.type,B.key,B.props,null,X.mode,Y),Y.ref=Eo(X,null,B),Y.return=X,Y;case D:return B=Lc(B,X.mode,Y),B.return=X,B;case H:var ae=B._init;return se(X,ae(B._payload),Y)}if(at(B)||z(B))return B=Dr(B,X.mode,Y,null),B.return=X,B;ua(X,B)}return null}function ne(X,B,Y,ae){var ye=B!==null?B.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number")return ye!==null?null:b(X,B,""+Y,ae);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case R:return Y.key===ye?V(X,B,Y,ae):null;case D:return Y.key===ye?G(X,B,Y,ae):null;case H:return ye=Y._init,ne(X,B,ye(Y._payload),ae)}if(at(Y)||z(Y))return ye!==null?null:re(X,B,Y,ae,null);ua(X,Y)}return null}function fe(X,B,Y,ae,ye){if(typeof ae=="string"&&ae!==""||typeof ae=="number")return X=X.get(Y)||null,b(B,X,""+ae,ye);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case R:return X=X.get(ae.key===null?Y:ae.key)||null,V(B,X,ae,ye);case D:return X=X.get(ae.key===null?Y:ae.key)||null,G(B,X,ae,ye);case H:var Se=ae._init;return fe(X,B,Y,Se(ae._payload),ye)}if(at(ae)||z(ae))return X=X.get(Y)||null,re(B,X,ae,ye,null);ua(B,ae)}return null}function he(X,B,Y,ae){for(var ye=null,Se=null,ke=B,Ce=B=0,rt=null;ke!==null&&Ce<Y.length;Ce++){ke.index>Ce?(rt=ke,ke=null):rt=ke.sibling;var Re=ne(X,ke,Y[Ce],ae);if(Re===null){ke===null&&(ke=rt);break}n&&ke&&Re.alternate===null&&i(X,ke),B=y(Re,B,Ce),Se===null?ye=Re:Se.sibling=Re,Se=Re,ke=rt}if(Ce===Y.length)return a(X,ke),Be&&_r(X,Ce),ye;if(ke===null){for(;Ce<Y.length;Ce++)ke=se(X,Y[Ce],ae),ke!==null&&(B=y(ke,B,Ce),Se===null?ye=ke:Se.sibling=ke,Se=ke);return Be&&_r(X,Ce),ye}for(ke=c(X,ke);Ce<Y.length;Ce++)rt=fe(ke,X,Ce,Y[Ce],ae),rt!==null&&(n&&rt.alternate!==null&&ke.delete(rt.key===null?Ce:rt.key),B=y(rt,B,Ce),Se===null?ye=rt:Se.sibling=rt,Se=rt);return n&&ke.forEach(function(ar){return i(X,ar)}),Be&&_r(X,Ce),ye}function pe(X,B,Y,ae){var ye=z(Y);if(typeof ye!="function")throw Error(r(150));if(Y=ye.call(Y),Y==null)throw Error(r(151));for(var Se=ye=null,ke=B,Ce=B=0,rt=null,Re=Y.next();ke!==null&&!Re.done;Ce++,Re=Y.next()){ke.index>Ce?(rt=ke,ke=null):rt=ke.sibling;var ar=ne(X,ke,Re.value,ae);if(ar===null){ke===null&&(ke=rt);break}n&&ke&&ar.alternate===null&&i(X,ke),B=y(ar,B,Ce),Se===null?ye=ar:Se.sibling=ar,Se=ar,ke=rt}if(Re.done)return a(X,ke),Be&&_r(X,Ce),ye;if(ke===null){for(;!Re.done;Ce++,Re=Y.next())Re=se(X,Re.value,ae),Re!==null&&(B=y(Re,B,Ce),Se===null?ye=Re:Se.sibling=Re,Se=Re);return Be&&_r(X,Ce),ye}for(ke=c(X,ke);!Re.done;Ce++,Re=Y.next())Re=fe(ke,X,Ce,Re.value,ae),Re!==null&&(n&&Re.alternate!==null&&ke.delete(Re.key===null?Ce:Re.key),B=y(Re,B,Ce),Se===null?ye=Re:Se.sibling=Re,Se=Re);return n&&ke.forEach(function(aS){return i(X,aS)}),Be&&_r(X,Ce),ye}function Ye(X,B,Y,ae){if(typeof Y=="object"&&Y!==null&&Y.type===O&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case R:e:{for(var ye=Y.key,Se=B;Se!==null;){if(Se.key===ye){if(ye=Y.type,ye===O){if(Se.tag===7){a(X,Se.sibling),B=h(Se,Y.props.children),B.return=X,X=B;break e}}else if(Se.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===H&&Yh(ye)===Se.type){a(X,Se.sibling),B=h(Se,Y.props),B.ref=Eo(X,Se,Y),B.return=X,X=B;break e}a(X,Se);break}else i(X,Se);Se=Se.sibling}Y.type===O?(B=Dr(Y.props.children,X.mode,ae,Y.key),B.return=X,X=B):(ae=Da(Y.type,Y.key,Y.props,null,X.mode,ae),ae.ref=Eo(X,B,Y),ae.return=X,X=ae)}return S(X);case D:e:{for(Se=Y.key;B!==null;){if(B.key===Se)if(B.tag===4&&B.stateNode.containerInfo===Y.containerInfo&&B.stateNode.implementation===Y.implementation){a(X,B.sibling),B=h(B,Y.children||[]),B.return=X,X=B;break e}else{a(X,B);break}else i(X,B);B=B.sibling}B=Lc(Y,X.mode,ae),B.return=X,X=B}return S(X);case H:return Se=Y._init,Ye(X,B,Se(Y._payload),ae)}if(at(Y))return he(X,B,Y,ae);if(z(Y))return pe(X,B,Y,ae);ua(X,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"?(Y=""+Y,B!==null&&B.tag===6?(a(X,B.sibling),B=h(B,Y),B.return=X,X=B):(a(X,B),B=Ic(Y,X.mode,ae),B.return=X,X=B),S(X)):a(X,B)}return Ye}var gi=Gh(!0),Qh=Gh(!1),ca=Qn(null),fa=null,yi=null,Uu=null;function Wu(){Uu=yi=fa=null}function Xu(n){var i=ca.current;Ve(ca),n._currentValue=i}function Ku(n,i,a){for(;n!==null;){var c=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),n===a)break;n=n.return}}function vi(n,i){fa=n,Uu=yi=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&i)!==0&&(kt=!0),n.firstContext=null)}function $t(n){var i=n._currentValue;if(Uu!==n)if(n={context:n,memoizedValue:i,next:null},yi===null){if(fa===null)throw Error(r(308));yi=n,fa.dependencies={lanes:0,firstContext:n}}else yi=yi.next=n;return i}var Tr=null;function Yu(n){Tr===null?Tr=[n]:Tr.push(n)}function qh(n,i,a,c){var h=i.interleaved;return h===null?(a.next=a,Yu(i)):(a.next=h.next,h.next=a),i.interleaved=a,An(n,c)}function An(n,i){n.lanes|=i;var a=n.alternate;for(a!==null&&(a.lanes|=i),a=n,n=n.return;n!==null;)n.childLanes|=i,a=n.alternate,a!==null&&(a.childLanes|=i),a=n,n=n.return;return a.tag===3?a.stateNode:null}var Jn=!1;function Gu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Zh(n,i){n=n.updateQueue,i.updateQueue===n&&(i.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function bn(n,i){return{eventTime:n,lane:i,tag:0,payload:null,callback:null,next:null}}function er(n,i,a){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(Ae&2)!==0){var h=c.pending;return h===null?i.next=i:(i.next=h.next,h.next=i),c.pending=i,An(n,a)}return h=c.interleaved,h===null?(i.next=i,Yu(c)):(i.next=h.next,h.next=i),c.interleaved=i,An(n,a)}function da(n,i,a){if(i=i.updateQueue,i!==null&&(i=i.shared,(a&4194240)!==0)){var c=i.lanes;c&=n.pendingLanes,a|=c,i.lanes=a,ni(n,a)}}function Jh(n,i){var a=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var h=null,y=null;if(a=a.firstBaseUpdate,a!==null){do{var S={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};y===null?h=y=S:y=y.next=S,a=a.next}while(a!==null);y===null?h=y=i:y=y.next=i}else h=y=i;a={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:y,shared:c.shared,effects:c.effects},n.updateQueue=a;return}n=a.lastBaseUpdate,n===null?a.firstBaseUpdate=i:n.next=i,a.lastBaseUpdate=i}function ha(n,i,a,c){var h=n.updateQueue;Jn=!1;var y=h.firstBaseUpdate,S=h.lastBaseUpdate,b=h.shared.pending;if(b!==null){h.shared.pending=null;var V=b,G=V.next;V.next=null,S===null?y=G:S.next=G,S=V;var re=n.alternate;re!==null&&(re=re.updateQueue,b=re.lastBaseUpdate,b!==S&&(b===null?re.firstBaseUpdate=G:b.next=G,re.lastBaseUpdate=V))}if(y!==null){var se=h.baseState;S=0,re=G=V=null,b=y;do{var ne=b.lane,fe=b.eventTime;if((c&ne)===ne){re!==null&&(re=re.next={eventTime:fe,lane:0,tag:b.tag,payload:b.payload,callback:b.callback,next:null});e:{var he=n,pe=b;switch(ne=i,fe=a,pe.tag){case 1:if(he=pe.payload,typeof he=="function"){se=he.call(fe,se,ne);break e}se=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=pe.payload,ne=typeof he=="function"?he.call(fe,se,ne):he,ne==null)break e;se=U({},se,ne);break e;case 2:Jn=!0}}b.callback!==null&&b.lane!==0&&(n.flags|=64,ne=h.effects,ne===null?h.effects=[b]:ne.push(b))}else fe={eventTime:fe,lane:ne,tag:b.tag,payload:b.payload,callback:b.callback,next:null},re===null?(G=re=fe,V=se):re=re.next=fe,S|=ne;if(b=b.next,b===null){if(b=h.shared.pending,b===null)break;ne=b,b=ne.next,ne.next=null,h.lastBaseUpdate=ne,h.shared.pending=null}}while(!0);if(re===null&&(V=se),h.baseState=V,h.firstBaseUpdate=G,h.lastBaseUpdate=re,i=h.shared.interleaved,i!==null){h=i;do S|=h.lane,h=h.next;while(h!==i)}else y===null&&(h.shared.lanes=0);Nr|=S,n.lanes=S,n.memoizedState=se}}function ep(n,i,a){if(n=i.effects,i.effects=null,n!==null)for(i=0;i<n.length;i++){var c=n[i],h=c.callback;if(h!==null){if(c.callback=null,c=a,typeof h!="function")throw Error(r(191,h));h.call(c)}}}var Co={},dn=Qn(Co),_o=Qn(Co),To=Qn(Co);function Pr(n){if(n===Co)throw Error(r(174));return n}function Qu(n,i){switch(Le(To,i),Le(_o,n),Le(dn,Co),n=i.nodeType,n){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:Pt(null,"");break;default:n=n===8?i.parentNode:i,i=n.namespaceURI||null,n=n.tagName,i=Pt(i,n)}Ve(dn),Le(dn,i)}function xi(){Ve(dn),Ve(_o),Ve(To)}function tp(n){Pr(To.current);var i=Pr(dn.current),a=Pt(i,n.type);i!==a&&(Le(_o,n),Le(dn,a))}function qu(n){_o.current===n&&(Ve(dn),Ve(_o))}var $e=Qn(0);function pa(n){for(var i=n;i!==null;){if(i.tag===13){var a=i.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Zu=[];function Ju(){for(var n=0;n<Zu.length;n++)Zu[n]._workInProgressVersionPrimary=null;Zu.length=0}var ma=P.ReactCurrentDispatcher,ec=P.ReactCurrentBatchConfig,Mr=0,He=null,Je=null,tt=null,ga=!1,Po=!1,Mo=0,Nw=0;function ct(){throw Error(r(321))}function tc(n,i){if(i===null)return!1;for(var a=0;a<i.length&&a<n.length;a++)if(!Yt(n[a],i[a]))return!1;return!0}function nc(n,i,a,c,h,y){if(Mr=y,He=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,ma.current=n===null||n.memoizedState===null?Dw:Iw,n=a(c,h),Po){y=0;do{if(Po=!1,Mo=0,25<=y)throw Error(r(301));y+=1,tt=Je=null,i.updateQueue=null,ma.current=Lw,n=a(c,h)}while(Po)}if(ma.current=xa,i=Je!==null&&Je.next!==null,Mr=0,tt=Je=He=null,ga=!1,i)throw Error(r(300));return n}function rc(){var n=Mo!==0;return Mo=0,n}function hn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tt===null?He.memoizedState=tt=n:tt=tt.next=n,tt}function Ht(){if(Je===null){var n=He.alternate;n=n!==null?n.memoizedState:null}else n=Je.next;var i=tt===null?He.memoizedState:tt.next;if(i!==null)tt=i,Je=n;else{if(n===null)throw Error(r(310));Je=n,n={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},tt===null?He.memoizedState=tt=n:tt=tt.next=n}return tt}function No(n,i){return typeof i=="function"?i(n):i}function ic(n){var i=Ht(),a=i.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=n;var c=Je,h=c.baseQueue,y=a.pending;if(y!==null){if(h!==null){var S=h.next;h.next=y.next,y.next=S}c.baseQueue=h=y,a.pending=null}if(h!==null){y=h.next,c=c.baseState;var b=S=null,V=null,G=y;do{var re=G.lane;if((Mr&re)===re)V!==null&&(V=V.next={lane:0,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),c=G.hasEagerState?G.eagerState:n(c,G.action);else{var se={lane:re,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null};V===null?(b=V=se,S=c):V=V.next=se,He.lanes|=re,Nr|=re}G=G.next}while(G!==null&&G!==y);V===null?S=c:V.next=b,Yt(c,i.memoizedState)||(kt=!0),i.memoizedState=c,i.baseState=S,i.baseQueue=V,a.lastRenderedState=c}if(n=a.interleaved,n!==null){h=n;do y=h.lane,He.lanes|=y,Nr|=y,h=h.next;while(h!==n)}else h===null&&(a.lanes=0);return[i.memoizedState,a.dispatch]}function oc(n){var i=Ht(),a=i.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=n;var c=a.dispatch,h=a.pending,y=i.memoizedState;if(h!==null){a.pending=null;var S=h=h.next;do y=n(y,S.action),S=S.next;while(S!==h);Yt(y,i.memoizedState)||(kt=!0),i.memoizedState=y,i.baseQueue===null&&(i.baseState=y),a.lastRenderedState=y}return[y,c]}function np(){}function rp(n,i){var a=He,c=Ht(),h=i(),y=!Yt(c.memoizedState,h);if(y&&(c.memoizedState=h,kt=!0),c=c.queue,sc(sp.bind(null,a,c,n),[n]),c.getSnapshot!==i||y||tt!==null&&tt.memoizedState.tag&1){if(a.flags|=2048,Ao(9,op.bind(null,a,c,h,i),void 0,null),nt===null)throw Error(r(349));(Mr&30)!==0||ip(a,i,h)}return h}function ip(n,i,a){n.flags|=16384,n={getSnapshot:i,value:a},i=He.updateQueue,i===null?(i={lastEffect:null,stores:null},He.updateQueue=i,i.stores=[n]):(a=i.stores,a===null?i.stores=[n]:a.push(n))}function op(n,i,a,c){i.value=a,i.getSnapshot=c,ap(i)&&lp(n)}function sp(n,i,a){return a(function(){ap(i)&&lp(n)})}function ap(n){var i=n.getSnapshot;n=n.value;try{var a=i();return!Yt(n,a)}catch{return!0}}function lp(n){var i=An(n,1);i!==null&&Jt(i,n,1,-1)}function up(n){var i=hn();return typeof n=="function"&&(n=n()),i.memoizedState=i.baseState=n,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:n},i.queue=n,n=n.dispatch=Rw.bind(null,He,n),[i.memoizedState,n]}function Ao(n,i,a,c){return n={tag:n,create:i,destroy:a,deps:c,next:null},i=He.updateQueue,i===null?(i={lastEffect:null,stores:null},He.updateQueue=i,i.lastEffect=n.next=n):(a=i.lastEffect,a===null?i.lastEffect=n.next=n:(c=a.next,a.next=n,n.next=c,i.lastEffect=n)),n}function cp(){return Ht().memoizedState}function ya(n,i,a,c){var h=hn();He.flags|=n,h.memoizedState=Ao(1|i,a,void 0,c===void 0?null:c)}function va(n,i,a,c){var h=Ht();c=c===void 0?null:c;var y=void 0;if(Je!==null){var S=Je.memoizedState;if(y=S.destroy,c!==null&&tc(c,S.deps)){h.memoizedState=Ao(i,a,y,c);return}}He.flags|=n,h.memoizedState=Ao(1|i,a,y,c)}function fp(n,i){return ya(8390656,8,n,i)}function sc(n,i){return va(2048,8,n,i)}function dp(n,i){return va(4,2,n,i)}function hp(n,i){return va(4,4,n,i)}function pp(n,i){if(typeof i=="function")return n=n(),i(n),function(){i(null)};if(i!=null)return n=n(),i.current=n,function(){i.current=null}}function mp(n,i,a){return a=a!=null?a.concat([n]):null,va(4,4,pp.bind(null,i,n),a)}function ac(){}function gp(n,i){var a=Ht();i=i===void 0?null:i;var c=a.memoizedState;return c!==null&&i!==null&&tc(i,c[1])?c[0]:(a.memoizedState=[n,i],n)}function yp(n,i){var a=Ht();i=i===void 0?null:i;var c=a.memoizedState;return c!==null&&i!==null&&tc(i,c[1])?c[0]:(n=n(),a.memoizedState=[n,i],n)}function vp(n,i,a){return(Mr&21)===0?(n.baseState&&(n.baseState=!1,kt=!0),n.memoizedState=a):(Yt(a,i)||(a=Bs(),He.lanes|=a,Nr|=a,n.baseState=!0),i)}function Aw(n,i){var a=De;De=a!==0&&4>a?a:4,n(!0);var c=ec.transition;ec.transition={};try{n(!1),i()}finally{De=a,ec.transition=c}}function xp(){return Ht().memoizedState}function bw(n,i,a){var c=ir(n);if(a={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null},wp(n))Sp(i,a);else if(a=qh(n,i,a,c),a!==null){var h=yt();Jt(a,n,c,h),kp(a,i,c)}}function Rw(n,i,a){var c=ir(n),h={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null};if(wp(n))Sp(i,h);else{var y=n.alternate;if(n.lanes===0&&(y===null||y.lanes===0)&&(y=i.lastRenderedReducer,y!==null))try{var S=i.lastRenderedState,b=y(S,a);if(h.hasEagerState=!0,h.eagerState=b,Yt(b,S)){var V=i.interleaved;V===null?(h.next=h,Yu(i)):(h.next=V.next,V.next=h),i.interleaved=h;return}}catch{}finally{}a=qh(n,i,h,c),a!==null&&(h=yt(),Jt(a,n,c,h),kp(a,i,c))}}function wp(n){var i=n.alternate;return n===He||i!==null&&i===He}function Sp(n,i){Po=ga=!0;var a=n.pending;a===null?i.next=i:(i.next=a.next,a.next=i),n.pending=i}function kp(n,i,a){if((a&4194240)!==0){var c=i.lanes;c&=n.pendingLanes,a|=c,i.lanes=a,ni(n,a)}}var xa={readContext:$t,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useInsertionEffect:ct,useLayoutEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useMutableSource:ct,useSyncExternalStore:ct,useId:ct,unstable_isNewReconciler:!1},Dw={readContext:$t,useCallback:function(n,i){return hn().memoizedState=[n,i===void 0?null:i],n},useContext:$t,useEffect:fp,useImperativeHandle:function(n,i,a){return a=a!=null?a.concat([n]):null,ya(4194308,4,pp.bind(null,i,n),a)},useLayoutEffect:function(n,i){return ya(4194308,4,n,i)},useInsertionEffect:function(n,i){return ya(4,2,n,i)},useMemo:function(n,i){var a=hn();return i=i===void 0?null:i,n=n(),a.memoizedState=[n,i],n},useReducer:function(n,i,a){var c=hn();return i=a!==void 0?a(i):i,c.memoizedState=c.baseState=i,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:i},c.queue=n,n=n.dispatch=bw.bind(null,He,n),[c.memoizedState,n]},useRef:function(n){var i=hn();return n={current:n},i.memoizedState=n},useState:up,useDebugValue:ac,useDeferredValue:function(n){return hn().memoizedState=n},useTransition:function(){var n=up(!1),i=n[0];return n=Aw.bind(null,n[1]),hn().memoizedState=n,[i,n]},useMutableSource:function(){},useSyncExternalStore:function(n,i,a){var c=He,h=hn();if(Be){if(a===void 0)throw Error(r(407));a=a()}else{if(a=i(),nt===null)throw Error(r(349));(Mr&30)!==0||ip(c,i,a)}h.memoizedState=a;var y={value:a,getSnapshot:i};return h.queue=y,fp(sp.bind(null,c,y,n),[n]),c.flags|=2048,Ao(9,op.bind(null,c,y,a,i),void 0,null),a},useId:function(){var n=hn(),i=nt.identifierPrefix;if(Be){var a=Nn,c=Mn;a=(c&~(1<<32-Nt(c)-1)).toString(32)+a,i=":"+i+"R"+a,a=Mo++,0<a&&(i+="H"+a.toString(32)),i+=":"}else a=Nw++,i=":"+i+"r"+a.toString(32)+":";return n.memoizedState=i},unstable_isNewReconciler:!1},Iw={readContext:$t,useCallback:gp,useContext:$t,useEffect:sc,useImperativeHandle:mp,useInsertionEffect:dp,useLayoutEffect:hp,useMemo:yp,useReducer:ic,useRef:cp,useState:function(){return ic(No)},useDebugValue:ac,useDeferredValue:function(n){var i=Ht();return vp(i,Je.memoizedState,n)},useTransition:function(){var n=ic(No)[0],i=Ht().memoizedState;return[n,i]},useMutableSource:np,useSyncExternalStore:rp,useId:xp,unstable_isNewReconciler:!1},Lw={readContext:$t,useCallback:gp,useContext:$t,useEffect:sc,useImperativeHandle:mp,useInsertionEffect:dp,useLayoutEffect:hp,useMemo:yp,useReducer:oc,useRef:cp,useState:function(){return oc(No)},useDebugValue:ac,useDeferredValue:function(n){var i=Ht();return Je===null?i.memoizedState=n:vp(i,Je.memoizedState,n)},useTransition:function(){var n=oc(No)[0],i=Ht().memoizedState;return[n,i]},useMutableSource:np,useSyncExternalStore:rp,useId:xp,unstable_isNewReconciler:!1};function Qt(n,i){if(n&&n.defaultProps){i=U({},i),n=n.defaultProps;for(var a in n)i[a]===void 0&&(i[a]=n[a]);return i}return i}function lc(n,i,a,c){i=n.memoizedState,a=a(c,i),a=a==null?i:U({},i,a),n.memoizedState=a,n.lanes===0&&(n.updateQueue.baseState=a)}var wa={isMounted:function(n){return(n=n._reactInternals)?cn(n)===n:!1},enqueueSetState:function(n,i,a){n=n._reactInternals;var c=yt(),h=ir(n),y=bn(c,h);y.payload=i,a!=null&&(y.callback=a),i=er(n,y,h),i!==null&&(Jt(i,n,h,c),da(i,n,h))},enqueueReplaceState:function(n,i,a){n=n._reactInternals;var c=yt(),h=ir(n),y=bn(c,h);y.tag=1,y.payload=i,a!=null&&(y.callback=a),i=er(n,y,h),i!==null&&(Jt(i,n,h,c),da(i,n,h))},enqueueForceUpdate:function(n,i){n=n._reactInternals;var a=yt(),c=ir(n),h=bn(a,c);h.tag=2,i!=null&&(h.callback=i),i=er(n,h,c),i!==null&&(Jt(i,n,c,a),da(i,n,c))}};function Ep(n,i,a,c,h,y,S){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,y,S):i.prototype&&i.prototype.isPureReactComponent?!go(a,c)||!go(h,y):!0}function Cp(n,i,a){var c=!1,h=qn,y=i.contextType;return typeof y=="object"&&y!==null?y=$t(y):(h=St(i)?Er:ut.current,c=i.contextTypes,y=(c=c!=null)?di(n,h):qn),i=new i(a,y),n.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=wa,n.stateNode=i,i._reactInternals=n,c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=h,n.__reactInternalMemoizedMaskedChildContext=y),i}function _p(n,i,a,c){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(a,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(a,c),i.state!==n&&wa.enqueueReplaceState(i,i.state,null)}function uc(n,i,a,c){var h=n.stateNode;h.props=a,h.state=n.memoizedState,h.refs={},Gu(n);var y=i.contextType;typeof y=="object"&&y!==null?h.context=$t(y):(y=St(i)?Er:ut.current,h.context=di(n,y)),h.state=n.memoizedState,y=i.getDerivedStateFromProps,typeof y=="function"&&(lc(n,i,y,a),h.state=n.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(i=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),i!==h.state&&wa.enqueueReplaceState(h,h.state,null),ha(n,a,h,c),h.state=n.memoizedState),typeof h.componentDidMount=="function"&&(n.flags|=4194308)}function wi(n,i){try{var a="",c=i;do a+=le(c),c=c.return;while(c);var h=a}catch(y){h=`
|
|
39
|
+
Error generating stack: `+y.message+`
|
|
40
|
+
`+y.stack}return{value:n,source:i,stack:h,digest:null}}function cc(n,i,a){return{value:n,source:null,stack:a??null,digest:i??null}}function fc(n,i){try{console.error(i.value)}catch(a){setTimeout(function(){throw a})}}var jw=typeof WeakMap=="function"?WeakMap:Map;function Tp(n,i,a){a=bn(-1,a),a.tag=3,a.payload={element:null};var c=i.value;return a.callback=function(){Pa||(Pa=!0,Tc=c),fc(n,i)},a}function Pp(n,i,a){a=bn(-1,a),a.tag=3;var c=n.type.getDerivedStateFromError;if(typeof c=="function"){var h=i.value;a.payload=function(){return c(h)},a.callback=function(){fc(n,i)}}var y=n.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(a.callback=function(){fc(n,i),typeof c!="function"&&(nr===null?nr=new Set([this]):nr.add(this));var S=i.stack;this.componentDidCatch(i.value,{componentStack:S!==null?S:""})}),a}function Mp(n,i,a){var c=n.pingCache;if(c===null){c=n.pingCache=new jw;var h=new Set;c.set(i,h)}else h=c.get(i),h===void 0&&(h=new Set,c.set(i,h));h.has(a)||(h.add(a),n=Qw.bind(null,n,i,a),i.then(n,n))}function Np(n){do{var i;if((i=n.tag===13)&&(i=n.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return n;n=n.return}while(n!==null);return null}function Ap(n,i,a,c,h){return(n.mode&1)===0?(n===i?n.flags|=65536:(n.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(i=bn(-1,1),i.tag=2,er(a,i,1))),a.lanes|=1),n):(n.flags|=65536,n.lanes=h,n)}var Vw=P.ReactCurrentOwner,kt=!1;function gt(n,i,a,c){i.child=n===null?Qh(i,null,a,c):gi(i,n.child,a,c)}function bp(n,i,a,c,h){a=a.render;var y=i.ref;return vi(i,h),c=nc(n,i,a,c,y,h),a=rc(),n!==null&&!kt?(i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~h,Rn(n,i,h)):(Be&&a&&Fu(i),i.flags|=1,gt(n,i,c,h),i.child)}function Rp(n,i,a,c,h){if(n===null){var y=a.type;return typeof y=="function"&&!Dc(y)&&y.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(i.tag=15,i.type=y,Dp(n,i,y,c,h)):(n=Da(a.type,null,c,i,i.mode,h),n.ref=i.ref,n.return=i,i.child=n)}if(y=n.child,(n.lanes&h)===0){var S=y.memoizedProps;if(a=a.compare,a=a!==null?a:go,a(S,c)&&n.ref===i.ref)return Rn(n,i,h)}return i.flags|=1,n=sr(y,c),n.ref=i.ref,n.return=i,i.child=n}function Dp(n,i,a,c,h){if(n!==null){var y=n.memoizedProps;if(go(y,c)&&n.ref===i.ref)if(kt=!1,i.pendingProps=c=y,(n.lanes&h)!==0)(n.flags&131072)!==0&&(kt=!0);else return i.lanes=n.lanes,Rn(n,i,h)}return dc(n,i,a,c,h)}function Ip(n,i,a){var c=i.pendingProps,h=c.children,y=n!==null?n.memoizedState:null;if(c.mode==="hidden")if((i.mode&1)===0)i.memoizedState={baseLanes:0,cachePool:null,transitions:null},Le(ki,Dt),Dt|=a;else{if((a&1073741824)===0)return n=y!==null?y.baseLanes|a:a,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:n,cachePool:null,transitions:null},i.updateQueue=null,Le(ki,Dt),Dt|=n,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=y!==null?y.baseLanes:a,Le(ki,Dt),Dt|=c}else y!==null?(c=y.baseLanes|a,i.memoizedState=null):c=a,Le(ki,Dt),Dt|=c;return gt(n,i,h,a),i.child}function Lp(n,i){var a=i.ref;(n===null&&a!==null||n!==null&&n.ref!==a)&&(i.flags|=512,i.flags|=2097152)}function dc(n,i,a,c,h){var y=St(a)?Er:ut.current;return y=di(i,y),vi(i,h),a=nc(n,i,a,c,y,h),c=rc(),n!==null&&!kt?(i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~h,Rn(n,i,h)):(Be&&c&&Fu(i),i.flags|=1,gt(n,i,a,h),i.child)}function jp(n,i,a,c,h){if(St(a)){var y=!0;ia(i)}else y=!1;if(vi(i,h),i.stateNode===null)ka(n,i),Cp(i,a,c),uc(i,a,c,h),c=!0;else if(n===null){var S=i.stateNode,b=i.memoizedProps;S.props=b;var V=S.context,G=a.contextType;typeof G=="object"&&G!==null?G=$t(G):(G=St(a)?Er:ut.current,G=di(i,G));var re=a.getDerivedStateFromProps,se=typeof re=="function"||typeof S.getSnapshotBeforeUpdate=="function";se||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(b!==c||V!==G)&&_p(i,S,c,G),Jn=!1;var ne=i.memoizedState;S.state=ne,ha(i,c,S,h),V=i.memoizedState,b!==c||ne!==V||wt.current||Jn?(typeof re=="function"&&(lc(i,a,re,c),V=i.memoizedState),(b=Jn||Ep(i,a,b,c,ne,V,G))?(se||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(i.flags|=4194308)):(typeof S.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=V),S.props=c,S.state=V,S.context=G,c=b):(typeof S.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{S=i.stateNode,Zh(n,i),b=i.memoizedProps,G=i.type===i.elementType?b:Qt(i.type,b),S.props=G,se=i.pendingProps,ne=S.context,V=a.contextType,typeof V=="object"&&V!==null?V=$t(V):(V=St(a)?Er:ut.current,V=di(i,V));var fe=a.getDerivedStateFromProps;(re=typeof fe=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(b!==se||ne!==V)&&_p(i,S,c,V),Jn=!1,ne=i.memoizedState,S.state=ne,ha(i,c,S,h);var he=i.memoizedState;b!==se||ne!==he||wt.current||Jn?(typeof fe=="function"&&(lc(i,a,fe,c),he=i.memoizedState),(G=Jn||Ep(i,a,G,c,ne,he,V)||!1)?(re||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(c,he,V),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(c,he,V)),typeof S.componentDidUpdate=="function"&&(i.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof S.componentDidUpdate!="function"||b===n.memoizedProps&&ne===n.memoizedState||(i.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||b===n.memoizedProps&&ne===n.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=he),S.props=c,S.state=he,S.context=V,c=G):(typeof S.componentDidUpdate!="function"||b===n.memoizedProps&&ne===n.memoizedState||(i.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||b===n.memoizedProps&&ne===n.memoizedState||(i.flags|=1024),c=!1)}return hc(n,i,a,c,y,h)}function hc(n,i,a,c,h,y){Lp(n,i);var S=(i.flags&128)!==0;if(!c&&!S)return h&&Oh(i,a,!1),Rn(n,i,y);c=i.stateNode,Vw.current=i;var b=S&&typeof a.getDerivedStateFromError!="function"?null:c.render();return i.flags|=1,n!==null&&S?(i.child=gi(i,n.child,null,y),i.child=gi(i,null,b,y)):gt(n,i,b,y),i.memoizedState=c.state,h&&Oh(i,a,!0),i.child}function Vp(n){var i=n.stateNode;i.pendingContext?Fh(n,i.pendingContext,i.pendingContext!==i.context):i.context&&Fh(n,i.context,!1),Qu(n,i.containerInfo)}function zp(n,i,a,c,h){return mi(),Hu(h),i.flags|=256,gt(n,i,a,c),i.child}var pc={dehydrated:null,treeContext:null,retryLane:0};function mc(n){return{baseLanes:n,cachePool:null,transitions:null}}function Fp(n,i,a){var c=i.pendingProps,h=$e.current,y=!1,S=(i.flags&128)!==0,b;if((b=S)||(b=n!==null&&n.memoizedState===null?!1:(h&2)!==0),b?(y=!0,i.flags&=-129):(n===null||n.memoizedState!==null)&&(h|=1),Le($e,h&1),n===null)return $u(i),n=i.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?((i.mode&1)===0?i.lanes=1:n.data==="$!"?i.lanes=8:i.lanes=1073741824,null):(S=c.children,n=c.fallback,y?(c=i.mode,y=i.child,S={mode:"hidden",children:S},(c&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=S):y=Ia(S,c,0,null),n=Dr(n,c,a,null),y.return=i,n.return=i,y.sibling=n,i.child=y,i.child.memoizedState=mc(a),i.memoizedState=pc,n):gc(i,S));if(h=n.memoizedState,h!==null&&(b=h.dehydrated,b!==null))return zw(n,i,S,c,b,h,a);if(y){y=c.fallback,S=i.mode,h=n.child,b=h.sibling;var V={mode:"hidden",children:c.children};return(S&1)===0&&i.child!==h?(c=i.child,c.childLanes=0,c.pendingProps=V,i.deletions=null):(c=sr(h,V),c.subtreeFlags=h.subtreeFlags&14680064),b!==null?y=sr(b,y):(y=Dr(y,S,a,null),y.flags|=2),y.return=i,c.return=i,c.sibling=y,i.child=c,c=y,y=i.child,S=n.child.memoizedState,S=S===null?mc(a):{baseLanes:S.baseLanes|a,cachePool:null,transitions:S.transitions},y.memoizedState=S,y.childLanes=n.childLanes&~a,i.memoizedState=pc,c}return y=n.child,n=y.sibling,c=sr(y,{mode:"visible",children:c.children}),(i.mode&1)===0&&(c.lanes=a),c.return=i,c.sibling=null,n!==null&&(a=i.deletions,a===null?(i.deletions=[n],i.flags|=16):a.push(n)),i.child=c,i.memoizedState=null,c}function gc(n,i){return i=Ia({mode:"visible",children:i},n.mode,0,null),i.return=n,n.child=i}function Sa(n,i,a,c){return c!==null&&Hu(c),gi(i,n.child,null,a),n=gc(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}function zw(n,i,a,c,h,y,S){if(a)return i.flags&256?(i.flags&=-257,c=cc(Error(r(422))),Sa(n,i,S,c)):i.memoizedState!==null?(i.child=n.child,i.flags|=128,null):(y=c.fallback,h=i.mode,c=Ia({mode:"visible",children:c.children},h,0,null),y=Dr(y,h,S,null),y.flags|=2,c.return=i,y.return=i,c.sibling=y,i.child=c,(i.mode&1)!==0&&gi(i,n.child,null,S),i.child.memoizedState=mc(S),i.memoizedState=pc,y);if((i.mode&1)===0)return Sa(n,i,S,null);if(h.data==="$!"){if(c=h.nextSibling&&h.nextSibling.dataset,c)var b=c.dgst;return c=b,y=Error(r(419)),c=cc(y,c,void 0),Sa(n,i,S,c)}if(b=(S&n.childLanes)!==0,kt||b){if(c=nt,c!==null){switch(S&-S){case 4:h=2;break;case 16:h=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:h=32;break;case 536870912:h=268435456;break;default:h=0}h=(h&(c.suspendedLanes|S))!==0?0:h,h!==0&&h!==y.retryLane&&(y.retryLane=h,An(n,h),Jt(c,n,h,-1))}return Rc(),c=cc(Error(r(421))),Sa(n,i,S,c)}return h.data==="$?"?(i.flags|=128,i.child=n.child,i=qw.bind(null,n),h._reactRetry=i,null):(n=y.treeContext,Rt=Gn(h.nextSibling),bt=i,Be=!0,Gt=null,n!==null&&(Bt[Ot++]=Mn,Bt[Ot++]=Nn,Bt[Ot++]=Cr,Mn=n.id,Nn=n.overflow,Cr=i),i=gc(i,c.children),i.flags|=4096,i)}function Bp(n,i,a){n.lanes|=i;var c=n.alternate;c!==null&&(c.lanes|=i),Ku(n.return,i,a)}function yc(n,i,a,c,h){var y=n.memoizedState;y===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:h}:(y.isBackwards=i,y.rendering=null,y.renderingStartTime=0,y.last=c,y.tail=a,y.tailMode=h)}function Op(n,i,a){var c=i.pendingProps,h=c.revealOrder,y=c.tail;if(gt(n,i,c.children,a),c=$e.current,(c&2)!==0)c=c&1|2,i.flags|=128;else{if(n!==null&&(n.flags&128)!==0)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Bp(n,a,i);else if(n.tag===19)Bp(n,a,i);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===i)break e;for(;n.sibling===null;){if(n.return===null||n.return===i)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}c&=1}if(Le($e,c),(i.mode&1)===0)i.memoizedState=null;else switch(h){case"forwards":for(a=i.child,h=null;a!==null;)n=a.alternate,n!==null&&pa(n)===null&&(h=a),a=a.sibling;a=h,a===null?(h=i.child,i.child=null):(h=a.sibling,a.sibling=null),yc(i,!1,h,a,y);break;case"backwards":for(a=null,h=i.child,i.child=null;h!==null;){if(n=h.alternate,n!==null&&pa(n)===null){i.child=h;break}n=h.sibling,h.sibling=a,a=h,h=n}yc(i,!0,a,null,y);break;case"together":yc(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function ka(n,i){(i.mode&1)===0&&n!==null&&(n.alternate=null,i.alternate=null,i.flags|=2)}function Rn(n,i,a){if(n!==null&&(i.dependencies=n.dependencies),Nr|=i.lanes,(a&i.childLanes)===0)return null;if(n!==null&&i.child!==n.child)throw Error(r(153));if(i.child!==null){for(n=i.child,a=sr(n,n.pendingProps),i.child=a,a.return=i;n.sibling!==null;)n=n.sibling,a=a.sibling=sr(n,n.pendingProps),a.return=i;a.sibling=null}return i.child}function Fw(n,i,a){switch(i.tag){case 3:Vp(i),mi();break;case 5:tp(i);break;case 1:St(i.type)&&ia(i);break;case 4:Qu(i,i.stateNode.containerInfo);break;case 10:var c=i.type._context,h=i.memoizedProps.value;Le(ca,c._currentValue),c._currentValue=h;break;case 13:if(c=i.memoizedState,c!==null)return c.dehydrated!==null?(Le($e,$e.current&1),i.flags|=128,null):(a&i.child.childLanes)!==0?Fp(n,i,a):(Le($e,$e.current&1),n=Rn(n,i,a),n!==null?n.sibling:null);Le($e,$e.current&1);break;case 19:if(c=(a&i.childLanes)!==0,(n.flags&128)!==0){if(c)return Op(n,i,a);i.flags|=128}if(h=i.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),Le($e,$e.current),c)break;return null;case 22:case 23:return i.lanes=0,Ip(n,i,a)}return Rn(n,i,a)}var $p,vc,Hp,Up;$p=function(n,i){for(var a=i.child;a!==null;){if(a.tag===5||a.tag===6)n.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},vc=function(){},Hp=function(n,i,a,c){var h=n.memoizedProps;if(h!==c){n=i.stateNode,Pr(dn.current);var y=null;switch(a){case"input":h=_e(n,h),c=_e(n,c),y=[];break;case"select":h=U({},h,{value:void 0}),c=U({},c,{value:void 0}),y=[];break;case"textarea":h=En(n,h),c=En(n,c),y=[];break;default:typeof h.onClick!="function"&&typeof c.onClick=="function"&&(n.onclick=ta)}Ki(a,c);var S;a=null;for(G in h)if(!c.hasOwnProperty(G)&&h.hasOwnProperty(G)&&h[G]!=null)if(G==="style"){var b=h[G];for(S in b)b.hasOwnProperty(S)&&(a||(a={}),a[S]="")}else G!=="dangerouslySetInnerHTML"&&G!=="children"&&G!=="suppressContentEditableWarning"&&G!=="suppressHydrationWarning"&&G!=="autoFocus"&&(s.hasOwnProperty(G)?y||(y=[]):(y=y||[]).push(G,null));for(G in c){var V=c[G];if(b=h!=null?h[G]:void 0,c.hasOwnProperty(G)&&V!==b&&(V!=null||b!=null))if(G==="style")if(b){for(S in b)!b.hasOwnProperty(S)||V&&V.hasOwnProperty(S)||(a||(a={}),a[S]="");for(S in V)V.hasOwnProperty(S)&&b[S]!==V[S]&&(a||(a={}),a[S]=V[S])}else a||(y||(y=[]),y.push(G,a)),a=V;else G==="dangerouslySetInnerHTML"?(V=V?V.__html:void 0,b=b?b.__html:void 0,V!=null&&b!==V&&(y=y||[]).push(G,V)):G==="children"?typeof V!="string"&&typeof V!="number"||(y=y||[]).push(G,""+V):G!=="suppressContentEditableWarning"&&G!=="suppressHydrationWarning"&&(s.hasOwnProperty(G)?(V!=null&&G==="onScroll"&&je("scroll",n),y||b===V||(y=[])):(y=y||[]).push(G,V))}a&&(y=y||[]).push("style",a);var G=y;(i.updateQueue=G)&&(i.flags|=4)}},Up=function(n,i,a,c){a!==c&&(i.flags|=4)};function bo(n,i){if(!Be)switch(n.tailMode){case"hidden":i=n.tail;for(var a=null;i!==null;)i.alternate!==null&&(a=i),i=i.sibling;a===null?n.tail=null:a.sibling=null;break;case"collapsed":a=n.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function ft(n){var i=n.alternate!==null&&n.alternate.child===n.child,a=0,c=0;if(i)for(var h=n.child;h!==null;)a|=h.lanes|h.childLanes,c|=h.subtreeFlags&14680064,c|=h.flags&14680064,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)a|=h.lanes|h.childLanes,c|=h.subtreeFlags,c|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=c,n.childLanes=a,i}function Bw(n,i,a){var c=i.pendingProps;switch(Bu(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ft(i),null;case 1:return St(i.type)&&ra(),ft(i),null;case 3:return c=i.stateNode,xi(),Ve(wt),Ve(ut),Ju(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(n===null||n.child===null)&&(la(i)?i.flags|=4:n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Gt!==null&&(Nc(Gt),Gt=null))),vc(n,i),ft(i),null;case 5:qu(i);var h=Pr(To.current);if(a=i.type,n!==null&&i.stateNode!=null)Hp(n,i,a,c,h),n.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!c){if(i.stateNode===null)throw Error(r(166));return ft(i),null}if(n=Pr(dn.current),la(i)){c=i.stateNode,a=i.type;var y=i.memoizedProps;switch(c[fn]=i,c[So]=y,n=(i.mode&1)!==0,a){case"dialog":je("cancel",c),je("close",c);break;case"iframe":case"object":case"embed":je("load",c);break;case"video":case"audio":for(h=0;h<vo.length;h++)je(vo[h],c);break;case"source":je("error",c);break;case"img":case"image":case"link":je("error",c),je("load",c);break;case"details":je("toggle",c);break;case"input":Pe(c,y),je("invalid",c);break;case"select":c._wrapperState={wasMultiple:!!y.multiple},je("invalid",c);break;case"textarea":ln(c,y),je("invalid",c)}Ki(a,y),h=null;for(var S in y)if(y.hasOwnProperty(S)){var b=y[S];S==="children"?typeof b=="string"?c.textContent!==b&&(y.suppressHydrationWarning!==!0&&ea(c.textContent,b,n),h=["children",b]):typeof b=="number"&&c.textContent!==""+b&&(y.suppressHydrationWarning!==!0&&ea(c.textContent,b,n),h=["children",""+b]):s.hasOwnProperty(S)&&b!=null&&S==="onScroll"&&je("scroll",c)}switch(a){case"input":we(c),mt(c,y,!0);break;case"textarea":we(c),xt(c);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(c.onclick=ta)}c=h,i.updateQueue=c,c!==null&&(i.flags|=4)}else{S=h.nodeType===9?h:h.ownerDocument,n==="http://www.w3.org/1999/xhtml"&&(n=zt(a)),n==="http://www.w3.org/1999/xhtml"?a==="script"?(n=S.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild)):typeof c.is=="string"?n=S.createElement(a,{is:c.is}):(n=S.createElement(a),a==="select"&&(S=n,c.multiple?S.multiple=!0:c.size&&(S.size=c.size))):n=S.createElementNS(n,a),n[fn]=i,n[So]=c,$p(n,i,!1,!1),i.stateNode=n;e:{switch(S=Yi(a,c),a){case"dialog":je("cancel",n),je("close",n),h=c;break;case"iframe":case"object":case"embed":je("load",n),h=c;break;case"video":case"audio":for(h=0;h<vo.length;h++)je(vo[h],n);h=c;break;case"source":je("error",n),h=c;break;case"img":case"image":case"link":je("error",n),je("load",n),h=c;break;case"details":je("toggle",n),h=c;break;case"input":Pe(n,c),h=_e(n,c),je("invalid",n);break;case"option":h=c;break;case"select":n._wrapperState={wasMultiple:!!c.multiple},h=U({},c,{value:void 0}),je("invalid",n);break;case"textarea":ln(n,c),h=En(n,c),je("invalid",n);break;default:h=c}Ki(a,h),b=h;for(y in b)if(b.hasOwnProperty(y)){var V=b[y];y==="style"?_s(n,V):y==="dangerouslySetInnerHTML"?(V=V?V.__html:void 0,V!=null&&Gr(n,V)):y==="children"?typeof V=="string"?(a!=="textarea"||V!=="")&&Cn(n,V):typeof V=="number"&&Cn(n,""+V):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(s.hasOwnProperty(y)?V!=null&&y==="onScroll"&&je("scroll",n):V!=null&&k(n,y,V,S))}switch(a){case"input":we(n),mt(n,c,!1);break;case"textarea":we(n),xt(n);break;case"option":c.value!=null&&n.setAttribute("value",""+Q(c.value));break;case"select":n.multiple=!!c.multiple,y=c.value,y!=null?lt(n,!!c.multiple,y,!1):c.defaultValue!=null&<(n,!!c.multiple,c.defaultValue,!0);break;default:typeof h.onClick=="function"&&(n.onclick=ta)}switch(a){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}}c&&(i.flags|=4)}i.ref!==null&&(i.flags|=512,i.flags|=2097152)}return ft(i),null;case 6:if(n&&i.stateNode!=null)Up(n,i,n.memoizedProps,c);else{if(typeof c!="string"&&i.stateNode===null)throw Error(r(166));if(a=Pr(To.current),Pr(dn.current),la(i)){if(c=i.stateNode,a=i.memoizedProps,c[fn]=i,(y=c.nodeValue!==a)&&(n=bt,n!==null))switch(n.tag){case 3:ea(c.nodeValue,a,(n.mode&1)!==0);break;case 5:n.memoizedProps.suppressHydrationWarning!==!0&&ea(c.nodeValue,a,(n.mode&1)!==0)}y&&(i.flags|=4)}else c=(a.nodeType===9?a:a.ownerDocument).createTextNode(c),c[fn]=i,i.stateNode=c}return ft(i),null;case 13:if(Ve($e),c=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(Be&&Rt!==null&&(i.mode&1)!==0&&(i.flags&128)===0)Kh(),mi(),i.flags|=98560,y=!1;else if(y=la(i),c!==null&&c.dehydrated!==null){if(n===null){if(!y)throw Error(r(318));if(y=i.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[fn]=i}else mi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;ft(i),y=!1}else Gt!==null&&(Nc(Gt),Gt=null),y=!0;if(!y)return i.flags&65536?i:null}return(i.flags&128)!==0?(i.lanes=a,i):(c=c!==null,c!==(n!==null&&n.memoizedState!==null)&&c&&(i.child.flags|=8192,(i.mode&1)!==0&&(n===null||($e.current&1)!==0?et===0&&(et=3):Rc())),i.updateQueue!==null&&(i.flags|=4),ft(i),null);case 4:return xi(),vc(n,i),n===null&&xo(i.stateNode.containerInfo),ft(i),null;case 10:return Xu(i.type._context),ft(i),null;case 17:return St(i.type)&&ra(),ft(i),null;case 19:if(Ve($e),y=i.memoizedState,y===null)return ft(i),null;if(c=(i.flags&128)!==0,S=y.rendering,S===null)if(c)bo(y,!1);else{if(et!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(S=pa(n),S!==null){for(i.flags|=128,bo(y,!1),c=S.updateQueue,c!==null&&(i.updateQueue=c,i.flags|=4),i.subtreeFlags=0,c=a,a=i.child;a!==null;)y=a,n=c,y.flags&=14680066,S=y.alternate,S===null?(y.childLanes=0,y.lanes=n,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=S.childLanes,y.lanes=S.lanes,y.child=S.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=S.memoizedProps,y.memoizedState=S.memoizedState,y.updateQueue=S.updateQueue,y.type=S.type,n=S.dependencies,y.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),a=a.sibling;return Le($e,$e.current&1|2),i.child}n=n.sibling}y.tail!==null&&Oe()>Ei&&(i.flags|=128,c=!0,bo(y,!1),i.lanes=4194304)}else{if(!c)if(n=pa(S),n!==null){if(i.flags|=128,c=!0,a=n.updateQueue,a!==null&&(i.updateQueue=a,i.flags|=4),bo(y,!0),y.tail===null&&y.tailMode==="hidden"&&!S.alternate&&!Be)return ft(i),null}else 2*Oe()-y.renderingStartTime>Ei&&a!==1073741824&&(i.flags|=128,c=!0,bo(y,!1),i.lanes=4194304);y.isBackwards?(S.sibling=i.child,i.child=S):(a=y.last,a!==null?a.sibling=S:i.child=S,y.last=S)}return y.tail!==null?(i=y.tail,y.rendering=i,y.tail=i.sibling,y.renderingStartTime=Oe(),i.sibling=null,a=$e.current,Le($e,c?a&1|2:a&1),i):(ft(i),null);case 22:case 23:return bc(),c=i.memoizedState!==null,n!==null&&n.memoizedState!==null!==c&&(i.flags|=8192),c&&(i.mode&1)!==0?(Dt&1073741824)!==0&&(ft(i),i.subtreeFlags&6&&(i.flags|=8192)):ft(i),null;case 24:return null;case 25:return null}throw Error(r(156,i.tag))}function Ow(n,i){switch(Bu(i),i.tag){case 1:return St(i.type)&&ra(),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return xi(),Ve(wt),Ve(ut),Ju(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 5:return qu(i),null;case 13:if(Ve($e),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(r(340));mi()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return Ve($e),null;case 4:return xi(),null;case 10:return Xu(i.type._context),null;case 22:case 23:return bc(),null;case 24:return null;default:return null}}var Ea=!1,dt=!1,$w=typeof WeakSet=="function"?WeakSet:Set,de=null;function Si(n,i){var a=n.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(c){Xe(n,i,c)}else a.current=null}function xc(n,i,a){try{a()}catch(c){Xe(n,i,c)}}var Wp=!1;function Hw(n,i){if(bu=Hs,n=Eh(),Eu(n)){if("selectionStart"in n)var a={start:n.selectionStart,end:n.selectionEnd};else e:{a=(a=n.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var h=c.anchorOffset,y=c.focusNode;c=c.focusOffset;try{a.nodeType,y.nodeType}catch{a=null;break e}var S=0,b=-1,V=-1,G=0,re=0,se=n,ne=null;t:for(;;){for(var fe;se!==a||h!==0&&se.nodeType!==3||(b=S+h),se!==y||c!==0&&se.nodeType!==3||(V=S+c),se.nodeType===3&&(S+=se.nodeValue.length),(fe=se.firstChild)!==null;)ne=se,se=fe;for(;;){if(se===n)break t;if(ne===a&&++G===h&&(b=S),ne===y&&++re===c&&(V=S),(fe=se.nextSibling)!==null)break;se=ne,ne=se.parentNode}se=fe}a=b===-1||V===-1?null:{start:b,end:V}}else a=null}a=a||{start:0,end:0}}else a=null;for(Ru={focusedElem:n,selectionRange:a},Hs=!1,de=i;de!==null;)if(i=de,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,de=n;else for(;de!==null;){i=de;try{var he=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(he!==null){var pe=he.memoizedProps,Ye=he.memoizedState,X=i.stateNode,B=X.getSnapshotBeforeUpdate(i.elementType===i.type?pe:Qt(i.type,pe),Ye);X.__reactInternalSnapshotBeforeUpdate=B}break;case 3:var Y=i.stateNode.containerInfo;Y.nodeType===1?Y.textContent="":Y.nodeType===9&&Y.documentElement&&Y.removeChild(Y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ae){Xe(i,i.return,ae)}if(n=i.sibling,n!==null){n.return=i.return,de=n;break}de=i.return}return he=Wp,Wp=!1,he}function Ro(n,i,a){var c=i.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var h=c=c.next;do{if((h.tag&n)===n){var y=h.destroy;h.destroy=void 0,y!==void 0&&xc(i,a,y)}h=h.next}while(h!==c)}}function Ca(n,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&n)===n){var c=a.create;a.destroy=c()}a=a.next}while(a!==i)}}function wc(n){var i=n.ref;if(i!==null){var a=n.stateNode;switch(n.tag){case 5:n=a;break;default:n=a}typeof i=="function"?i(n):i.current=n}}function Xp(n){var i=n.alternate;i!==null&&(n.alternate=null,Xp(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&(delete i[fn],delete i[So],delete i[ju],delete i[_w],delete i[Tw])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function Kp(n){return n.tag===5||n.tag===3||n.tag===4}function Yp(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Kp(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Sc(n,i,a){var c=n.tag;if(c===5||c===6)n=n.stateNode,i?a.nodeType===8?a.parentNode.insertBefore(n,i):a.insertBefore(n,i):(a.nodeType===8?(i=a.parentNode,i.insertBefore(n,a)):(i=a,i.appendChild(n)),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=ta));else if(c!==4&&(n=n.child,n!==null))for(Sc(n,i,a),n=n.sibling;n!==null;)Sc(n,i,a),n=n.sibling}function kc(n,i,a){var c=n.tag;if(c===5||c===6)n=n.stateNode,i?a.insertBefore(n,i):a.appendChild(n);else if(c!==4&&(n=n.child,n!==null))for(kc(n,i,a),n=n.sibling;n!==null;)kc(n,i,a),n=n.sibling}var it=null,qt=!1;function tr(n,i,a){for(a=a.child;a!==null;)Gp(n,i,a),a=a.sibling}function Gp(n,i,a){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(Jr,a)}catch{}switch(a.tag){case 5:dt||Si(a,i);case 6:var c=it,h=qt;it=null,tr(n,i,a),it=c,qt=h,it!==null&&(qt?(n=it,a=a.stateNode,n.nodeType===8?n.parentNode.removeChild(a):n.removeChild(a)):it.removeChild(a.stateNode));break;case 18:it!==null&&(qt?(n=it,a=a.stateNode,n.nodeType===8?Lu(n.parentNode,a):n.nodeType===1&&Lu(n,a),uo(n)):Lu(it,a.stateNode));break;case 4:c=it,h=qt,it=a.stateNode.containerInfo,qt=!0,tr(n,i,a),it=c,qt=h;break;case 0:case 11:case 14:case 15:if(!dt&&(c=a.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){h=c=c.next;do{var y=h,S=y.destroy;y=y.tag,S!==void 0&&((y&2)!==0||(y&4)!==0)&&xc(a,i,S),h=h.next}while(h!==c)}tr(n,i,a);break;case 1:if(!dt&&(Si(a,i),c=a.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=a.memoizedProps,c.state=a.memoizedState,c.componentWillUnmount()}catch(b){Xe(a,i,b)}tr(n,i,a);break;case 21:tr(n,i,a);break;case 22:a.mode&1?(dt=(c=dt)||a.memoizedState!==null,tr(n,i,a),dt=c):tr(n,i,a);break;default:tr(n,i,a)}}function Qp(n){var i=n.updateQueue;if(i!==null){n.updateQueue=null;var a=n.stateNode;a===null&&(a=n.stateNode=new $w),i.forEach(function(c){var h=Zw.bind(null,n,c);a.has(c)||(a.add(c),c.then(h,h))})}}function Zt(n,i){var a=i.deletions;if(a!==null)for(var c=0;c<a.length;c++){var h=a[c];try{var y=n,S=i,b=S;e:for(;b!==null;){switch(b.tag){case 5:it=b.stateNode,qt=!1;break e;case 3:it=b.stateNode.containerInfo,qt=!0;break e;case 4:it=b.stateNode.containerInfo,qt=!0;break e}b=b.return}if(it===null)throw Error(r(160));Gp(y,S,h),it=null,qt=!1;var V=h.alternate;V!==null&&(V.return=null),h.return=null}catch(G){Xe(h,i,G)}}if(i.subtreeFlags&12854)for(i=i.child;i!==null;)qp(i,n),i=i.sibling}function qp(n,i){var a=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(Zt(i,n),pn(n),c&4){try{Ro(3,n,n.return),Ca(3,n)}catch(pe){Xe(n,n.return,pe)}try{Ro(5,n,n.return)}catch(pe){Xe(n,n.return,pe)}}break;case 1:Zt(i,n),pn(n),c&512&&a!==null&&Si(a,a.return);break;case 5:if(Zt(i,n),pn(n),c&512&&a!==null&&Si(a,a.return),n.flags&32){var h=n.stateNode;try{Cn(h,"")}catch(pe){Xe(n,n.return,pe)}}if(c&4&&(h=n.stateNode,h!=null)){var y=n.memoizedProps,S=a!==null?a.memoizedProps:y,b=n.type,V=n.updateQueue;if(n.updateQueue=null,V!==null)try{b==="input"&&y.type==="radio"&&y.name!=null&&Ne(h,y),Yi(b,S);var G=Yi(b,y);for(S=0;S<V.length;S+=2){var re=V[S],se=V[S+1];re==="style"?_s(h,se):re==="dangerouslySetInnerHTML"?Gr(h,se):re==="children"?Cn(h,se):k(h,re,se,G)}switch(b){case"input":Ie(h,y);break;case"textarea":un(h,y);break;case"select":var ne=h._wrapperState.wasMultiple;h._wrapperState.wasMultiple=!!y.multiple;var fe=y.value;fe!=null?lt(h,!!y.multiple,fe,!1):ne!==!!y.multiple&&(y.defaultValue!=null?lt(h,!!y.multiple,y.defaultValue,!0):lt(h,!!y.multiple,y.multiple?[]:"",!1))}h[So]=y}catch(pe){Xe(n,n.return,pe)}}break;case 6:if(Zt(i,n),pn(n),c&4){if(n.stateNode===null)throw Error(r(162));h=n.stateNode,y=n.memoizedProps;try{h.nodeValue=y}catch(pe){Xe(n,n.return,pe)}}break;case 3:if(Zt(i,n),pn(n),c&4&&a!==null&&a.memoizedState.isDehydrated)try{uo(i.containerInfo)}catch(pe){Xe(n,n.return,pe)}break;case 4:Zt(i,n),pn(n);break;case 13:Zt(i,n),pn(n),h=n.child,h.flags&8192&&(y=h.memoizedState!==null,h.stateNode.isHidden=y,!y||h.alternate!==null&&h.alternate.memoizedState!==null||(_c=Oe())),c&4&&Qp(n);break;case 22:if(re=a!==null&&a.memoizedState!==null,n.mode&1?(dt=(G=dt)||re,Zt(i,n),dt=G):Zt(i,n),pn(n),c&8192){if(G=n.memoizedState!==null,(n.stateNode.isHidden=G)&&!re&&(n.mode&1)!==0)for(de=n,re=n.child;re!==null;){for(se=de=re;de!==null;){switch(ne=de,fe=ne.child,ne.tag){case 0:case 11:case 14:case 15:Ro(4,ne,ne.return);break;case 1:Si(ne,ne.return);var he=ne.stateNode;if(typeof he.componentWillUnmount=="function"){c=ne,a=ne.return;try{i=c,he.props=i.memoizedProps,he.state=i.memoizedState,he.componentWillUnmount()}catch(pe){Xe(c,a,pe)}}break;case 5:Si(ne,ne.return);break;case 22:if(ne.memoizedState!==null){em(se);continue}}fe!==null?(fe.return=ne,de=fe):em(se)}re=re.sibling}e:for(re=null,se=n;;){if(se.tag===5){if(re===null){re=se;try{h=se.stateNode,G?(y=h.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(b=se.stateNode,V=se.memoizedProps.style,S=V!=null&&V.hasOwnProperty("display")?V.display:null,b.style.display=Cs("display",S))}catch(pe){Xe(n,n.return,pe)}}}else if(se.tag===6){if(re===null)try{se.stateNode.nodeValue=G?"":se.memoizedProps}catch(pe){Xe(n,n.return,pe)}}else if((se.tag!==22&&se.tag!==23||se.memoizedState===null||se===n)&&se.child!==null){se.child.return=se,se=se.child;continue}if(se===n)break e;for(;se.sibling===null;){if(se.return===null||se.return===n)break e;re===se&&(re=null),se=se.return}re===se&&(re=null),se.sibling.return=se.return,se=se.sibling}}break;case 19:Zt(i,n),pn(n),c&4&&Qp(n);break;case 21:break;default:Zt(i,n),pn(n)}}function pn(n){var i=n.flags;if(i&2){try{e:{for(var a=n.return;a!==null;){if(Kp(a)){var c=a;break e}a=a.return}throw Error(r(160))}switch(c.tag){case 5:var h=c.stateNode;c.flags&32&&(Cn(h,""),c.flags&=-33);var y=Yp(n);kc(n,y,h);break;case 3:case 4:var S=c.stateNode.containerInfo,b=Yp(n);Sc(n,b,S);break;default:throw Error(r(161))}}catch(V){Xe(n,n.return,V)}n.flags&=-3}i&4096&&(n.flags&=-4097)}function Uw(n,i,a){de=n,Zp(n)}function Zp(n,i,a){for(var c=(n.mode&1)!==0;de!==null;){var h=de,y=h.child;if(h.tag===22&&c){var S=h.memoizedState!==null||Ea;if(!S){var b=h.alternate,V=b!==null&&b.memoizedState!==null||dt;b=Ea;var G=dt;if(Ea=S,(dt=V)&&!G)for(de=h;de!==null;)S=de,V=S.child,S.tag===22&&S.memoizedState!==null?tm(h):V!==null?(V.return=S,de=V):tm(h);for(;y!==null;)de=y,Zp(y),y=y.sibling;de=h,Ea=b,dt=G}Jp(n)}else(h.subtreeFlags&8772)!==0&&y!==null?(y.return=h,de=y):Jp(n)}}function Jp(n){for(;de!==null;){var i=de;if((i.flags&8772)!==0){var a=i.alternate;try{if((i.flags&8772)!==0)switch(i.tag){case 0:case 11:case 15:dt||Ca(5,i);break;case 1:var c=i.stateNode;if(i.flags&4&&!dt)if(a===null)c.componentDidMount();else{var h=i.elementType===i.type?a.memoizedProps:Qt(i.type,a.memoizedProps);c.componentDidUpdate(h,a.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}var y=i.updateQueue;y!==null&&ep(i,y,c);break;case 3:var S=i.updateQueue;if(S!==null){if(a=null,i.child!==null)switch(i.child.tag){case 5:a=i.child.stateNode;break;case 1:a=i.child.stateNode}ep(i,S,a)}break;case 5:var b=i.stateNode;if(a===null&&i.flags&4){a=b;var V=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":V.autoFocus&&a.focus();break;case"img":V.src&&(a.src=V.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var G=i.alternate;if(G!==null){var re=G.memoizedState;if(re!==null){var se=re.dehydrated;se!==null&&uo(se)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}dt||i.flags&512&&wc(i)}catch(ne){Xe(i,i.return,ne)}}if(i===n){de=null;break}if(a=i.sibling,a!==null){a.return=i.return,de=a;break}de=i.return}}function em(n){for(;de!==null;){var i=de;if(i===n){de=null;break}var a=i.sibling;if(a!==null){a.return=i.return,de=a;break}de=i.return}}function tm(n){for(;de!==null;){var i=de;try{switch(i.tag){case 0:case 11:case 15:var a=i.return;try{Ca(4,i)}catch(V){Xe(i,a,V)}break;case 1:var c=i.stateNode;if(typeof c.componentDidMount=="function"){var h=i.return;try{c.componentDidMount()}catch(V){Xe(i,h,V)}}var y=i.return;try{wc(i)}catch(V){Xe(i,y,V)}break;case 5:var S=i.return;try{wc(i)}catch(V){Xe(i,S,V)}}}catch(V){Xe(i,i.return,V)}if(i===n){de=null;break}var b=i.sibling;if(b!==null){b.return=i.return,de=b;break}de=i.return}}var Ww=Math.ceil,_a=P.ReactCurrentDispatcher,Ec=P.ReactCurrentOwner,Ut=P.ReactCurrentBatchConfig,Ae=0,nt=null,qe=null,ot=0,Dt=0,ki=Qn(0),et=0,Do=null,Nr=0,Ta=0,Cc=0,Io=null,Et=null,_c=0,Ei=1/0,Dn=null,Pa=!1,Tc=null,nr=null,Ma=!1,rr=null,Na=0,Lo=0,Pc=null,Aa=-1,ba=0;function yt(){return(Ae&6)!==0?Oe():Aa!==-1?Aa:Aa=Oe()}function ir(n){return(n.mode&1)===0?1:(Ae&2)!==0&&ot!==0?ot&-ot:Mw.transition!==null?(ba===0&&(ba=Bs()),ba):(n=De,n!==0||(n=window.event,n=n===void 0?16:rh(n.type)),n)}function Jt(n,i,a,c){if(50<Lo)throw Lo=0,Pc=null,Error(r(185));Sr(n,a,c),((Ae&2)===0||n!==nt)&&(n===nt&&((Ae&2)===0&&(Ta|=a),et===4&&or(n,ot)),Ct(n,c),a===1&&Ae===0&&(i.mode&1)===0&&(Ei=Oe()+500,oa&&Zn()))}function Ct(n,i){var a=n.callbackNode;Fs(n,i);var c=_n(n,n===nt?ot:0);if(c===0)a!==null&&Ls(a),n.callbackNode=null,n.callbackPriority=0;else if(i=c&-c,n.callbackPriority!==i){if(a!=null&&Ls(a),i===1)n.tag===0?Pw(rm.bind(null,n)):$h(rm.bind(null,n)),Ew(function(){(Ae&6)===0&&Zn()}),a=null;else{switch(Gd(c)){case 1:a=ro;break;case 4:a=Vs;break;case 16:a=Zr;break;case 536870912:a=zs;break;default:a=Zr}a=fm(a,nm.bind(null,n))}n.callbackPriority=i,n.callbackNode=a}}function nm(n,i){if(Aa=-1,ba=0,(Ae&6)!==0)throw Error(r(327));var a=n.callbackNode;if(Ci()&&n.callbackNode!==a)return null;var c=_n(n,n===nt?ot:0);if(c===0)return null;if((c&30)!==0||(c&n.expiredLanes)!==0||i)i=Ra(n,c);else{i=c;var h=Ae;Ae|=2;var y=om();(nt!==n||ot!==i)&&(Dn=null,Ei=Oe()+500,br(n,i));do try{Yw();break}catch(b){im(n,b)}while(!0);Wu(),_a.current=y,Ae=h,qe!==null?i=0:(nt=null,ot=0,i=et)}if(i!==0){if(i===2&&(h=io(n),h!==0&&(c=h,i=Mc(n,h))),i===1)throw a=Do,br(n,0),or(n,c),Ct(n,Oe()),a;if(i===6)or(n,c);else{if(h=n.current.alternate,(c&30)===0&&!Xw(h)&&(i=Ra(n,c),i===2&&(y=io(n),y!==0&&(c=y,i=Mc(n,y))),i===1))throw a=Do,br(n,0),or(n,c),Ct(n,Oe()),a;switch(n.finishedWork=h,n.finishedLanes=c,i){case 0:case 1:throw Error(r(345));case 2:Rr(n,Et,Dn);break;case 3:if(or(n,c),(c&130023424)===c&&(i=_c+500-Oe(),10<i)){if(_n(n,0)!==0)break;if(h=n.suspendedLanes,(h&c)!==c){yt(),n.pingedLanes|=n.suspendedLanes&h;break}n.timeoutHandle=Iu(Rr.bind(null,n,Et,Dn),i);break}Rr(n,Et,Dn);break;case 4:if(or(n,c),(c&4194240)===c)break;for(i=n.eventTimes,h=-1;0<c;){var S=31-Nt(c);y=1<<S,S=i[S],S>h&&(h=S),c&=~y}if(c=h,c=Oe()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*Ww(c/1960))-c,10<c){n.timeoutHandle=Iu(Rr.bind(null,n,Et,Dn),c);break}Rr(n,Et,Dn);break;case 5:Rr(n,Et,Dn);break;default:throw Error(r(329))}}}return Ct(n,Oe()),n.callbackNode===a?nm.bind(null,n):null}function Mc(n,i){var a=Io;return n.current.memoizedState.isDehydrated&&(br(n,i).flags|=256),n=Ra(n,i),n!==2&&(i=Et,Et=a,i!==null&&Nc(i)),n}function Nc(n){Et===null?Et=n:Et.push.apply(Et,n)}function Xw(n){for(var i=n;;){if(i.flags&16384){var a=i.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var c=0;c<a.length;c++){var h=a[c],y=h.getSnapshot;h=h.value;try{if(!Yt(y(),h))return!1}catch{return!1}}}if(a=i.child,i.subtreeFlags&16384&&a!==null)a.return=i,i=a;else{if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function or(n,i){for(i&=~Cc,i&=~Ta,n.suspendedLanes|=i,n.pingedLanes&=~i,n=n.expirationTimes;0<i;){var a=31-Nt(i),c=1<<a;n[a]=-1,i&=~c}}function rm(n){if((Ae&6)!==0)throw Error(r(327));Ci();var i=_n(n,0);if((i&1)===0)return Ct(n,Oe()),null;var a=Ra(n,i);if(n.tag!==0&&a===2){var c=io(n);c!==0&&(i=c,a=Mc(n,c))}if(a===1)throw a=Do,br(n,0),or(n,i),Ct(n,Oe()),a;if(a===6)throw Error(r(345));return n.finishedWork=n.current.alternate,n.finishedLanes=i,Rr(n,Et,Dn),Ct(n,Oe()),null}function Ac(n,i){var a=Ae;Ae|=1;try{return n(i)}finally{Ae=a,Ae===0&&(Ei=Oe()+500,oa&&Zn())}}function Ar(n){rr!==null&&rr.tag===0&&(Ae&6)===0&&Ci();var i=Ae;Ae|=1;var a=Ut.transition,c=De;try{if(Ut.transition=null,De=1,n)return n()}finally{De=c,Ut.transition=a,Ae=i,(Ae&6)===0&&Zn()}}function bc(){Dt=ki.current,Ve(ki)}function br(n,i){n.finishedWork=null,n.finishedLanes=0;var a=n.timeoutHandle;if(a!==-1&&(n.timeoutHandle=-1,kw(a)),qe!==null)for(a=qe.return;a!==null;){var c=a;switch(Bu(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&ra();break;case 3:xi(),Ve(wt),Ve(ut),Ju();break;case 5:qu(c);break;case 4:xi();break;case 13:Ve($e);break;case 19:Ve($e);break;case 10:Xu(c.type._context);break;case 22:case 23:bc()}a=a.return}if(nt=n,qe=n=sr(n.current,null),ot=Dt=i,et=0,Do=null,Cc=Ta=Nr=0,Et=Io=null,Tr!==null){for(i=0;i<Tr.length;i++)if(a=Tr[i],c=a.interleaved,c!==null){a.interleaved=null;var h=c.next,y=a.pending;if(y!==null){var S=y.next;y.next=h,c.next=S}a.pending=c}Tr=null}return n}function im(n,i){do{var a=qe;try{if(Wu(),ma.current=xa,ga){for(var c=He.memoizedState;c!==null;){var h=c.queue;h!==null&&(h.pending=null),c=c.next}ga=!1}if(Mr=0,tt=Je=He=null,Po=!1,Mo=0,Ec.current=null,a===null||a.return===null){et=1,Do=i,qe=null;break}e:{var y=n,S=a.return,b=a,V=i;if(i=ot,b.flags|=32768,V!==null&&typeof V=="object"&&typeof V.then=="function"){var G=V,re=b,se=re.tag;if((re.mode&1)===0&&(se===0||se===11||se===15)){var ne=re.alternate;ne?(re.updateQueue=ne.updateQueue,re.memoizedState=ne.memoizedState,re.lanes=ne.lanes):(re.updateQueue=null,re.memoizedState=null)}var fe=Np(S);if(fe!==null){fe.flags&=-257,Ap(fe,S,b,y,i),fe.mode&1&&Mp(y,G,i),i=fe,V=G;var he=i.updateQueue;if(he===null){var pe=new Set;pe.add(V),i.updateQueue=pe}else he.add(V);break e}else{if((i&1)===0){Mp(y,G,i),Rc();break e}V=Error(r(426))}}else if(Be&&b.mode&1){var Ye=Np(S);if(Ye!==null){(Ye.flags&65536)===0&&(Ye.flags|=256),Ap(Ye,S,b,y,i),Hu(wi(V,b));break e}}y=V=wi(V,b),et!==4&&(et=2),Io===null?Io=[y]:Io.push(y),y=S;do{switch(y.tag){case 3:y.flags|=65536,i&=-i,y.lanes|=i;var X=Tp(y,V,i);Jh(y,X);break e;case 1:b=V;var B=y.type,Y=y.stateNode;if((y.flags&128)===0&&(typeof B.getDerivedStateFromError=="function"||Y!==null&&typeof Y.componentDidCatch=="function"&&(nr===null||!nr.has(Y)))){y.flags|=65536,i&=-i,y.lanes|=i;var ae=Pp(y,b,i);Jh(y,ae);break e}}y=y.return}while(y!==null)}am(a)}catch(ye){i=ye,qe===a&&a!==null&&(qe=a=a.return);continue}break}while(!0)}function om(){var n=_a.current;return _a.current=xa,n===null?xa:n}function Rc(){(et===0||et===3||et===2)&&(et=4),nt===null||(Nr&268435455)===0&&(Ta&268435455)===0||or(nt,ot)}function Ra(n,i){var a=Ae;Ae|=2;var c=om();(nt!==n||ot!==i)&&(Dn=null,br(n,i));do try{Kw();break}catch(h){im(n,h)}while(!0);if(Wu(),Ae=a,_a.current=c,qe!==null)throw Error(r(261));return nt=null,ot=0,et}function Kw(){for(;qe!==null;)sm(qe)}function Yw(){for(;qe!==null&&!tu();)sm(qe)}function sm(n){var i=cm(n.alternate,n,Dt);n.memoizedProps=n.pendingProps,i===null?am(n):qe=i,Ec.current=null}function am(n){var i=n;do{var a=i.alternate;if(n=i.return,(i.flags&32768)===0){if(a=Bw(a,i,Dt),a!==null){qe=a;return}}else{if(a=Ow(a,i),a!==null){a.flags&=32767,qe=a;return}if(n!==null)n.flags|=32768,n.subtreeFlags=0,n.deletions=null;else{et=6,qe=null;return}}if(i=i.sibling,i!==null){qe=i;return}qe=i=n}while(i!==null);et===0&&(et=5)}function Rr(n,i,a){var c=De,h=Ut.transition;try{Ut.transition=null,De=1,Gw(n,i,a,c)}finally{Ut.transition=h,De=c}return null}function Gw(n,i,a,c){do Ci();while(rr!==null);if((Ae&6)!==0)throw Error(r(327));a=n.finishedWork;var h=n.finishedLanes;if(a===null)return null;if(n.finishedWork=null,n.finishedLanes=0,a===n.current)throw Error(r(177));n.callbackNode=null,n.callbackPriority=0;var y=a.lanes|a.childLanes;if(uu(n,y),n===nt&&(qe=nt=null,ot=0),(a.subtreeFlags&2064)===0&&(a.flags&2064)===0||Ma||(Ma=!0,fm(Zr,function(){return Ci(),null})),y=(a.flags&15990)!==0,(a.subtreeFlags&15990)!==0||y){y=Ut.transition,Ut.transition=null;var S=De;De=1;var b=Ae;Ae|=4,Ec.current=null,Hw(n,a),qp(a,n),mw(Ru),Hs=!!bu,Ru=bu=null,n.current=a,Uw(a),js(),Ae=b,De=S,Ut.transition=y}else n.current=a;if(Ma&&(Ma=!1,rr=n,Na=h),y=n.pendingLanes,y===0&&(nr=null),iu(a.stateNode),Ct(n,Oe()),i!==null)for(c=n.onRecoverableError,a=0;a<i.length;a++)h=i[a],c(h.value,{componentStack:h.stack,digest:h.digest});if(Pa)throw Pa=!1,n=Tc,Tc=null,n;return(Na&1)!==0&&n.tag!==0&&Ci(),y=n.pendingLanes,(y&1)!==0?n===Pc?Lo++:(Lo=0,Pc=n):Lo=0,Zn(),null}function Ci(){if(rr!==null){var n=Gd(Na),i=Ut.transition,a=De;try{if(Ut.transition=null,De=16>n?16:n,rr===null)var c=!1;else{if(n=rr,rr=null,Na=0,(Ae&6)!==0)throw Error(r(331));var h=Ae;for(Ae|=4,de=n.current;de!==null;){var y=de,S=y.child;if((de.flags&16)!==0){var b=y.deletions;if(b!==null){for(var V=0;V<b.length;V++){var G=b[V];for(de=G;de!==null;){var re=de;switch(re.tag){case 0:case 11:case 15:Ro(8,re,y)}var se=re.child;if(se!==null)se.return=re,de=se;else for(;de!==null;){re=de;var ne=re.sibling,fe=re.return;if(Xp(re),re===G){de=null;break}if(ne!==null){ne.return=fe,de=ne;break}de=fe}}}var he=y.alternate;if(he!==null){var pe=he.child;if(pe!==null){he.child=null;do{var Ye=pe.sibling;pe.sibling=null,pe=Ye}while(pe!==null)}}de=y}}if((y.subtreeFlags&2064)!==0&&S!==null)S.return=y,de=S;else e:for(;de!==null;){if(y=de,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:Ro(9,y,y.return)}var X=y.sibling;if(X!==null){X.return=y.return,de=X;break e}de=y.return}}var B=n.current;for(de=B;de!==null;){S=de;var Y=S.child;if((S.subtreeFlags&2064)!==0&&Y!==null)Y.return=S,de=Y;else e:for(S=B;de!==null;){if(b=de,(b.flags&2048)!==0)try{switch(b.tag){case 0:case 11:case 15:Ca(9,b)}}catch(ye){Xe(b,b.return,ye)}if(b===S){de=null;break e}var ae=b.sibling;if(ae!==null){ae.return=b.return,de=ae;break e}de=b.return}}if(Ae=h,Zn(),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(Jr,n)}catch{}c=!0}return c}finally{De=a,Ut.transition=i}}return!1}function lm(n,i,a){i=wi(a,i),i=Tp(n,i,1),n=er(n,i,1),i=yt(),n!==null&&(Sr(n,1,i),Ct(n,i))}function Xe(n,i,a){if(n.tag===3)lm(n,n,a);else for(;i!==null;){if(i.tag===3){lm(i,n,a);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(nr===null||!nr.has(c))){n=wi(a,n),n=Pp(i,n,1),i=er(i,n,1),n=yt(),i!==null&&(Sr(i,1,n),Ct(i,n));break}}i=i.return}}function Qw(n,i,a){var c=n.pingCache;c!==null&&c.delete(i),i=yt(),n.pingedLanes|=n.suspendedLanes&a,nt===n&&(ot&a)===a&&(et===4||et===3&&(ot&130023424)===ot&&500>Oe()-_c?br(n,0):Cc|=a),Ct(n,i)}function um(n,i){i===0&&((n.mode&1)===0?i=1:(i=ti,ti<<=1,(ti&130023424)===0&&(ti=4194304)));var a=yt();n=An(n,i),n!==null&&(Sr(n,i,a),Ct(n,a))}function qw(n){var i=n.memoizedState,a=0;i!==null&&(a=i.retryLane),um(n,a)}function Zw(n,i){var a=0;switch(n.tag){case 13:var c=n.stateNode,h=n.memoizedState;h!==null&&(a=h.retryLane);break;case 19:c=n.stateNode;break;default:throw Error(r(314))}c!==null&&c.delete(i),um(n,a)}var cm;cm=function(n,i,a){if(n!==null)if(n.memoizedProps!==i.pendingProps||wt.current)kt=!0;else{if((n.lanes&a)===0&&(i.flags&128)===0)return kt=!1,Fw(n,i,a);kt=(n.flags&131072)!==0}else kt=!1,Be&&(i.flags&1048576)!==0&&Hh(i,aa,i.index);switch(i.lanes=0,i.tag){case 2:var c=i.type;ka(n,i),n=i.pendingProps;var h=di(i,ut.current);vi(i,a),h=nc(null,i,c,n,h,a);var y=rc();return i.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,St(c)?(y=!0,ia(i)):y=!1,i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,Gu(i),h.updater=wa,i.stateNode=h,h._reactInternals=i,uc(i,c,n,a),i=hc(null,i,c,!0,y,a)):(i.tag=0,Be&&y&&Fu(i),gt(null,i,h,a),i=i.child),i;case 16:c=i.elementType;e:{switch(ka(n,i),n=i.pendingProps,h=c._init,c=h(c._payload),i.type=c,h=i.tag=eS(c),n=Qt(c,n),h){case 0:i=dc(null,i,c,n,a);break e;case 1:i=jp(null,i,c,n,a);break e;case 11:i=bp(null,i,c,n,a);break e;case 14:i=Rp(null,i,c,Qt(c.type,n),a);break e}throw Error(r(306,c,""))}return i;case 0:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:Qt(c,h),dc(n,i,c,h,a);case 1:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:Qt(c,h),jp(n,i,c,h,a);case 3:e:{if(Vp(i),n===null)throw Error(r(387));c=i.pendingProps,y=i.memoizedState,h=y.element,Zh(n,i),ha(i,c,null,a);var S=i.memoizedState;if(c=S.element,y.isDehydrated)if(y={element:c,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},i.updateQueue.baseState=y,i.memoizedState=y,i.flags&256){h=wi(Error(r(423)),i),i=zp(n,i,c,a,h);break e}else if(c!==h){h=wi(Error(r(424)),i),i=zp(n,i,c,a,h);break e}else for(Rt=Gn(i.stateNode.containerInfo.firstChild),bt=i,Be=!0,Gt=null,a=Qh(i,null,c,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(mi(),c===h){i=Rn(n,i,a);break e}gt(n,i,c,a)}i=i.child}return i;case 5:return tp(i),n===null&&$u(i),c=i.type,h=i.pendingProps,y=n!==null?n.memoizedProps:null,S=h.children,Du(c,h)?S=null:y!==null&&Du(c,y)&&(i.flags|=32),Lp(n,i),gt(n,i,S,a),i.child;case 6:return n===null&&$u(i),null;case 13:return Fp(n,i,a);case 4:return Qu(i,i.stateNode.containerInfo),c=i.pendingProps,n===null?i.child=gi(i,null,c,a):gt(n,i,c,a),i.child;case 11:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:Qt(c,h),bp(n,i,c,h,a);case 7:return gt(n,i,i.pendingProps,a),i.child;case 8:return gt(n,i,i.pendingProps.children,a),i.child;case 12:return gt(n,i,i.pendingProps.children,a),i.child;case 10:e:{if(c=i.type._context,h=i.pendingProps,y=i.memoizedProps,S=h.value,Le(ca,c._currentValue),c._currentValue=S,y!==null)if(Yt(y.value,S)){if(y.children===h.children&&!wt.current){i=Rn(n,i,a);break e}}else for(y=i.child,y!==null&&(y.return=i);y!==null;){var b=y.dependencies;if(b!==null){S=y.child;for(var V=b.firstContext;V!==null;){if(V.context===c){if(y.tag===1){V=bn(-1,a&-a),V.tag=2;var G=y.updateQueue;if(G!==null){G=G.shared;var re=G.pending;re===null?V.next=V:(V.next=re.next,re.next=V),G.pending=V}}y.lanes|=a,V=y.alternate,V!==null&&(V.lanes|=a),Ku(y.return,a,i),b.lanes|=a;break}V=V.next}}else if(y.tag===10)S=y.type===i.type?null:y.child;else if(y.tag===18){if(S=y.return,S===null)throw Error(r(341));S.lanes|=a,b=S.alternate,b!==null&&(b.lanes|=a),Ku(S,a,i),S=y.sibling}else S=y.child;if(S!==null)S.return=y;else for(S=y;S!==null;){if(S===i){S=null;break}if(y=S.sibling,y!==null){y.return=S.return,S=y;break}S=S.return}y=S}gt(n,i,h.children,a),i=i.child}return i;case 9:return h=i.type,c=i.pendingProps.children,vi(i,a),h=$t(h),c=c(h),i.flags|=1,gt(n,i,c,a),i.child;case 14:return c=i.type,h=Qt(c,i.pendingProps),h=Qt(c.type,h),Rp(n,i,c,h,a);case 15:return Dp(n,i,i.type,i.pendingProps,a);case 17:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:Qt(c,h),ka(n,i),i.tag=1,St(c)?(n=!0,ia(i)):n=!1,vi(i,a),Cp(i,c,h),uc(i,c,h,a),hc(null,i,c,!0,n,a);case 19:return Op(n,i,a);case 22:return Ip(n,i,a)}throw Error(r(156,i.tag))};function fm(n,i){return Is(n,i)}function Jw(n,i,a,c){this.tag=n,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wt(n,i,a,c){return new Jw(n,i,a,c)}function Dc(n){return n=n.prototype,!(!n||!n.isReactComponent)}function eS(n){if(typeof n=="function")return Dc(n)?1:0;if(n!=null){if(n=n.$$typeof,n===ee)return 11;if(n===W)return 14}return 2}function sr(n,i){var a=n.alternate;return a===null?(a=Wt(n.tag,i,n.key,n.mode),a.elementType=n.elementType,a.type=n.type,a.stateNode=n.stateNode,a.alternate=n,n.alternate=a):(a.pendingProps=i,a.type=n.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=n.flags&14680064,a.childLanes=n.childLanes,a.lanes=n.lanes,a.child=n.child,a.memoizedProps=n.memoizedProps,a.memoizedState=n.memoizedState,a.updateQueue=n.updateQueue,i=n.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=n.sibling,a.index=n.index,a.ref=n.ref,a}function Da(n,i,a,c,h,y){var S=2;if(c=n,typeof n=="function")Dc(n)&&(S=1);else if(typeof n=="string")S=5;else e:switch(n){case O:return Dr(a.children,h,y,i);case F:S=8,h|=8;break;case K:return n=Wt(12,a,i,h|2),n.elementType=K,n.lanes=y,n;case Z:return n=Wt(13,a,i,h),n.elementType=Z,n.lanes=y,n;case A:return n=Wt(19,a,i,h),n.elementType=A,n.lanes=y,n;case $:return Ia(a,h,y,i);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case J:S=10;break e;case q:S=9;break e;case ee:S=11;break e;case W:S=14;break e;case H:S=16,c=null;break e}throw Error(r(130,n==null?n:typeof n,""))}return i=Wt(S,a,i,h),i.elementType=n,i.type=c,i.lanes=y,i}function Dr(n,i,a,c){return n=Wt(7,n,c,i),n.lanes=a,n}function Ia(n,i,a,c){return n=Wt(22,n,c,i),n.elementType=$,n.lanes=a,n.stateNode={isHidden:!1},n}function Ic(n,i,a){return n=Wt(6,n,null,i),n.lanes=a,n}function Lc(n,i,a){return i=Wt(4,n.children!==null?n.children:[],n.key,i),i.lanes=a,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}function tS(n,i,a,c,h){this.tag=i,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=wr(0),this.expirationTimes=wr(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wr(0),this.identifierPrefix=c,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function jc(n,i,a,c,h,y,S,b,V){return n=new tS(n,i,a,b,V),i===1?(i=1,y===!0&&(i|=8)):i=0,y=Wt(3,null,null,i),n.current=y,y.stateNode=n,y.memoizedState={element:c,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},Gu(y),n}function nS(n,i,a){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:c==null?null:""+c,children:n,containerInfo:i,implementation:a}}function dm(n){if(!n)return qn;n=n._reactInternals;e:{if(cn(n)!==n||n.tag!==1)throw Error(r(170));var i=n;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(St(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(i!==null);throw Error(r(171))}if(n.tag===1){var a=n.type;if(St(a))return Bh(n,a,i)}return i}function hm(n,i,a,c,h,y,S,b,V){return n=jc(a,c,!0,n,h,y,S,b,V),n.context=dm(null),a=n.current,c=yt(),h=ir(a),y=bn(c,h),y.callback=i??null,er(a,y,h),n.current.lanes=h,Sr(n,h,c),Ct(n,c),n}function La(n,i,a,c){var h=i.current,y=yt(),S=ir(h);return a=dm(a),i.context===null?i.context=a:i.pendingContext=a,i=bn(y,S),i.payload={element:n},c=c===void 0?null:c,c!==null&&(i.callback=c),n=er(h,i,S),n!==null&&(Jt(n,h,S,y),da(n,h,S)),S}function ja(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 5:return n.child.stateNode;default:return n.child.stateNode}}function pm(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var a=n.retryLane;n.retryLane=a!==0&&a<i?a:i}}function Vc(n,i){pm(n,i),(n=n.alternate)&&pm(n,i)}function rS(){return null}var mm=typeof reportError=="function"?reportError:function(n){console.error(n)};function zc(n){this._internalRoot=n}Va.prototype.render=zc.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(r(409));La(n,i,null,null)},Va.prototype.unmount=zc.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var i=n.containerInfo;Ar(function(){La(null,n,null,null)}),i[Tn]=null}};function Va(n){this._internalRoot=n}Va.prototype.unstable_scheduleHydration=function(n){if(n){var i=Zd();n={blockedOn:null,target:n,priority:i};for(var a=0;a<Xn.length&&i!==0&&i<Xn[a].priority;a++);Xn.splice(a,0,n),a===0&&th(n)}};function Fc(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function za(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11&&(n.nodeType!==8||n.nodeValue!==" react-mount-point-unstable "))}function gm(){}function iS(n,i,a,c,h){if(h){if(typeof c=="function"){var y=c;c=function(){var G=ja(S);y.call(G)}}var S=hm(i,c,n,0,null,!1,!1,"",gm);return n._reactRootContainer=S,n[Tn]=S.current,xo(n.nodeType===8?n.parentNode:n),Ar(),S}for(;h=n.lastChild;)n.removeChild(h);if(typeof c=="function"){var b=c;c=function(){var G=ja(V);b.call(G)}}var V=jc(n,0,!1,null,null,!1,!1,"",gm);return n._reactRootContainer=V,n[Tn]=V.current,xo(n.nodeType===8?n.parentNode:n),Ar(function(){La(i,V,a,c)}),V}function Fa(n,i,a,c,h){var y=a._reactRootContainer;if(y){var S=y;if(typeof h=="function"){var b=h;h=function(){var V=ja(S);b.call(V)}}La(i,S,n,h)}else S=iS(a,i,n,h,c);return ja(S)}Qd=function(n){switch(n.tag){case 3:var i=n.stateNode;if(i.current.memoizedState.isDehydrated){var a=xr(i.pendingLanes);a!==0&&(ni(i,a|1),Ct(i,Oe()),(Ae&6)===0&&(Ei=Oe()+500,Zn()))}break;case 13:Ar(function(){var c=An(n,1);if(c!==null){var h=yt();Jt(c,n,1,h)}}),Vc(n,1)}},cu=function(n){if(n.tag===13){var i=An(n,134217728);if(i!==null){var a=yt();Jt(i,n,134217728,a)}Vc(n,134217728)}},qd=function(n){if(n.tag===13){var i=ir(n),a=An(n,i);if(a!==null){var c=yt();Jt(a,n,i,c)}Vc(n,i)}},Zd=function(){return De},Jd=function(n,i){var a=De;try{return De=n,i()}finally{De=a}},qi=function(n,i,a){switch(i){case"input":if(Ie(n,a),i=a.name,a.type==="radio"&&i!=null){for(a=n;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),i=0;i<a.length;i++){var c=a[i];if(c!==n&&c.form===n.form){var h=na(c);if(!h)throw Error(r(90));ve(c),Ie(c,h)}}}break;case"textarea":un(n,a);break;case"select":i=a.value,i!=null&<(n,!!a.multiple,i,!1)}},Ns=Ac,As=Ar;var oS={usingClientEntryPoint:!1,Events:[ko,ci,na,Ps,Ms,Ac]},jo={findFiberByHostInstance:kr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},sS={bundleType:jo.bundleType,version:jo.version,rendererPackageName:jo.rendererPackageName,rendererConfig:jo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:P.ReactCurrentDispatcher,findHostInstanceByFiber:function(n){return n=Rs(n),n===null?null:n.stateNode},findFiberByHostInstance:jo.findFiberByHostInstance||rS,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 Ba=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ba.isDisabled&&Ba.supportsFiber)try{Jr=Ba.inject(sS),Mt=Ba}catch{}}return _t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oS,_t.createPortal=function(n,i){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Fc(i))throw Error(r(200));return nS(n,i,null,a)},_t.createRoot=function(n,i){if(!Fc(n))throw Error(r(299));var a=!1,c="",h=mm;return i!=null&&(i.unstable_strictMode===!0&&(a=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onRecoverableError!==void 0&&(h=i.onRecoverableError)),i=jc(n,1,!1,null,null,a,!1,c,h),n[Tn]=i.current,xo(n.nodeType===8?n.parentNode:n),new zc(i)},_t.findDOMNode=function(n){if(n==null)return null;if(n.nodeType===1)return n;var i=n._reactInternals;if(i===void 0)throw typeof n.render=="function"?Error(r(188)):(n=Object.keys(n).join(","),Error(r(268,n)));return n=Rs(i),n=n===null?null:n.stateNode,n},_t.flushSync=function(n){return Ar(n)},_t.hydrate=function(n,i,a){if(!za(i))throw Error(r(200));return Fa(null,n,i,!0,a)},_t.hydrateRoot=function(n,i,a){if(!Fc(n))throw Error(r(405));var c=a!=null&&a.hydratedSources||null,h=!1,y="",S=mm;if(a!=null&&(a.unstable_strictMode===!0&&(h=!0),a.identifierPrefix!==void 0&&(y=a.identifierPrefix),a.onRecoverableError!==void 0&&(S=a.onRecoverableError)),i=hm(i,null,n,1,a??null,h,!1,y,S),n[Tn]=i.current,xo(n),c)for(n=0;n<c.length;n++)a=c[n],h=a._getVersion,h=h(a._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[a,h]:i.mutableSourceEagerHydrationData.push(a,h);return new Va(i)},_t.render=function(n,i,a){if(!za(i))throw Error(r(200));return Fa(null,n,i,!1,a)},_t.unmountComponentAtNode=function(n){if(!za(n))throw Error(r(40));return n._reactRootContainer?(Ar(function(){Fa(null,null,n,!1,function(){n._reactRootContainer=null,n[Tn]=null})}),!0):!1},_t.unstable_batchedUpdates=Ac,_t.unstable_renderSubtreeIntoContainer=function(n,i,a,c){if(!za(a))throw Error(r(200));if(n==null||n._reactInternals===void 0)throw Error(r(38));return Fa(n,i,a,!1,c)},_t.version="18.3.1-next-f1338f8080-20240426",_t}var Cm;function sy(){if(Cm)return $c.exports;Cm=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),$c.exports=hS(),$c.exports}var _m;function pS(){if(_m)return Oa;_m=1;var e=sy();return Oa.createRoot=e.createRoot,Oa.hydrateRoot=e.hydrateRoot,Oa}var mS=pS();/**
|
|
41
|
+
* @license lucide-react v0.469.0 - ISC
|
|
42
|
+
*
|
|
43
|
+
* This source code is licensed under the ISC license.
|
|
44
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
+
*/const gS=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ay=(...e)=>e.filter((t,r,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===r).join(" ").trim();/**
|
|
46
|
+
* @license lucide-react v0.469.0 - ISC
|
|
47
|
+
*
|
|
48
|
+
* This source code is licensed under the ISC license.
|
|
49
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
+
*/var yS={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"};/**
|
|
51
|
+
* @license lucide-react v0.469.0 - ISC
|
|
52
|
+
*
|
|
53
|
+
* This source code is licensed under the ISC license.
|
|
54
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
+
*/const vS=L.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:s="",children:l,iconNode:u,...f},d)=>L.createElement("svg",{ref:d,...yS,width:t,height:t,stroke:e,strokeWidth:o?Number(r)*24/Number(t):r,className:ay("lucide",s),...f},[...u.map(([p,g])=>L.createElement(p,g)),...Array.isArray(l)?l:[l]]));/**
|
|
56
|
+
* @license lucide-react v0.469.0 - ISC
|
|
57
|
+
*
|
|
58
|
+
* This source code is licensed under the ISC license.
|
|
59
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
+
*/const Qe=(e,t)=>{const r=L.forwardRef(({className:o,...s},l)=>L.createElement(vS,{ref:l,iconNode:t,className:ay(`lucide-${gS(e)}`,o),...s}));return r.displayName=`${e}`,r};/**
|
|
61
|
+
* @license lucide-react v0.469.0 - ISC
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the ISC license.
|
|
64
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/const xS=Qe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
66
|
+
* @license lucide-react v0.469.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/const Tm=Qe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
71
|
+
* @license lucide-react v0.469.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const Pm=Qe("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
|
|
76
|
+
* @license lucide-react v0.469.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const wS=Qe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
81
|
+
* @license lucide-react v0.469.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const SS=Qe("FolderTree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);/**
|
|
86
|
+
* @license lucide-react v0.469.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const kS=Qe("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
91
|
+
* @license lucide-react v0.469.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const cl=Qe("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"}]]);/**
|
|
96
|
+
* @license lucide-react v0.469.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const ES=Qe("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
|
101
|
+
* @license lucide-react v0.469.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const vf=Qe("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
|
|
106
|
+
* @license lucide-react v0.469.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const ly=Qe("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/**
|
|
111
|
+
* @license lucide-react v0.469.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const CS=Qe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
116
|
+
* @license lucide-react v0.469.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const Mm=Qe("Navigation",[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]]);/**
|
|
121
|
+
* @license lucide-react v0.469.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const Gf=Qe("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
|
|
126
|
+
* @license lucide-react v0.469.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const _S=Qe("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/**
|
|
131
|
+
* @license lucide-react v0.469.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const TS=Qe("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
|
|
136
|
+
* @license lucide-react v0.469.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const PS=Qe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
141
|
+
* @license lucide-react v0.469.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const MS=Qe("Skull",[["path",{d:"m12.5 17-.5-1-.5 1h1z",key:"3me087"}],["path",{d:"M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z",key:"1o5pge"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}]]);/**
|
|
146
|
+
* @license lucide-react v0.469.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const NS=Qe("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
|
151
|
+
* @license lucide-react v0.469.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const uy=Qe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
156
|
+
* @license lucide-react v0.469.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const cy=Qe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
161
|
+
* @license lucide-react v0.469.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const tl=Qe("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Nm=e=>{let t;const r=new Set,o=(p,g)=>{const m=typeof p=="function"?p(t):p;if(!Object.is(m,t)){const v=t;t=g??(typeof m!="object"||m===null)?m:Object.assign({},t,m),r.forEach(x=>x(t,v))}},s=()=>t,f={setState:o,getState:s,getInitialState:()=>d,subscribe:p=>(r.add(p),()=>r.delete(p))},d=t=e(o,s,f);return f},AS=(e=>e?Nm(e):Nm),bS=e=>e;function RS(e,t=bS){const r=Oo.useSyncExternalStore(e.subscribe,Oo.useCallback(()=>t(e.getState()),[e,t]),Oo.useCallback(()=>t(e.getInitialState()),[e,t]));return Oo.useDebugValue(r),r}const Am=e=>{const t=AS(e),r=o=>RS(t,o);return Object.assign(r,t),r},DS=(e=>e?Am(e):Am),Me=DS((e,t)=>({graph:null,loading:!0,scanning:!1,selectedNodeId:null,viewMode:"graph",panelTab:"inspector",searchQuery:"",searchResults:[],filterKind:"all",showCircular:!0,sidebarOpen:!0,theme:typeof localStorage<"u"?localStorage.getItem("arch-atlas-theme")??"dark":"dark",setGraph:r=>e({graph:r,loading:!1,scanning:!1}),setLoading:r=>e({loading:r}),setScanning:r=>e({scanning:r}),selectNode:r=>e({selectedNodeId:r}),setViewMode:r=>e({viewMode:r}),setPanelTab:r=>e({panelTab:r}),setSearchQuery:r=>e({searchQuery:r}),setSearchResults:r=>e({searchResults:r}),setFilterKind:r=>e({filterKind:r}),toggleCircular:()=>e(r=>({showCircular:!r.showCircular})),toggleSidebar:()=>e(r=>({sidebarOpen:!r.sidebarOpen})),setTheme:r=>{localStorage.setItem("arch-atlas-theme",r),e({theme:r})},toggleTheme:()=>{const r=t().theme==="dark"?"light":"dark";localStorage.setItem("arch-atlas-theme",r),e({theme:r})},getSelectedNode:()=>{const{graph:r,selectedNodeId:o}=t();return!r||!o?null:r.nodes.find(s=>s.id===o)??null}}));function IS(){const e=Me(o=>o.setGraph),t=Me(o=>o.setLoading),r=Me(o=>o.setScanning);L.useEffect(()=>{let o=null;async function s(){t(!0);try{const f=await(await fetch("/api/graph")).json();e(f)}catch(u){console.error("Failed to fetch graph:",u),t(!1)}}s();const l=window.location.protocol==="https:"?"wss:":"ws:";return o=new WebSocket(`${l}//${window.location.host}/ws`),o.onmessage=u=>{const f=JSON.parse(u.data);f.type==="scanning"?r(!0):f.type==="graph-update"&&e(f.data)},o.onerror=()=>{},()=>o==null?void 0:o.close()},[e,t,r])}async function LS(e){return(await fetch(`/api/search?q=${encodeURIComponent(e)}`)).json()}async function jS(e){const t=e.startsWith("file:")?e.slice(5):e;return(await fetch(`/api/file/${encodeURIComponent(t)}`)).json()}const Qf=L.createContext({});function qf(e){const t=L.useRef(null);return t.current===null&&(t.current=e()),t.current}const Nl=L.createContext(null),Zf=L.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class VS extends L.Component{getSnapshotBeforeUpdate(t){const r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){const o=this.props.sizeRef.current;o.height=r.offsetHeight||0,o.width=r.offsetWidth||0,o.top=r.offsetTop,o.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function zS({children:e,isPresent:t}){const r=L.useId(),o=L.useRef(null),s=L.useRef({width:0,height:0,top:0,left:0}),{nonce:l}=L.useContext(Zf);return L.useInsertionEffect(()=>{const{width:u,height:f,top:d,left:p}=s.current;if(t||!o.current||!u||!f)return;o.current.dataset.motionPopId=r;const g=document.createElement("style");return l&&(g.nonce=l),document.head.appendChild(g),g.sheet&&g.sheet.insertRule(`
|
|
166
|
+
[data-motion-pop-id="${r}"] {
|
|
167
|
+
position: absolute !important;
|
|
168
|
+
width: ${u}px !important;
|
|
169
|
+
height: ${f}px !important;
|
|
170
|
+
top: ${d}px !important;
|
|
171
|
+
left: ${p}px !important;
|
|
172
|
+
}
|
|
173
|
+
`),()=>{document.head.removeChild(g)}},[t]),T.jsx(VS,{isPresent:t,childRef:o,sizeRef:s,children:L.cloneElement(e,{ref:o})})}const FS=({children:e,initial:t,isPresent:r,onExitComplete:o,custom:s,presenceAffectsLayout:l,mode:u})=>{const f=qf(BS),d=L.useId(),p=L.useCallback(m=>{f.set(m,!0);for(const v of f.values())if(!v)return;o&&o()},[f,o]),g=L.useMemo(()=>({id:d,initial:t,isPresent:r,custom:s,onExitComplete:p,register:m=>(f.set(m,!1),()=>f.delete(m))}),l?[Math.random(),p]:[r,p]);return L.useMemo(()=>{f.forEach((m,v)=>f.set(v,!1))},[r]),L.useEffect(()=>{!r&&!f.size&&o&&o()},[r]),u==="popLayout"&&(e=T.jsx(zS,{isPresent:r,children:e})),T.jsx(Nl.Provider,{value:g,children:e})};function BS(){return new Map}function fy(e=!0){const t=L.useContext(Nl);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:o,register:s}=t,l=L.useId();L.useEffect(()=>{e&&s(l)},[e]);const u=L.useCallback(()=>e&&o&&o(l),[l,o,e]);return!r&&o?[!1,u]:[!0]}const $a=e=>e.key||"";function bm(e){const t=[];return L.Children.forEach(e,r=>{L.isValidElement(r)&&t.push(r)}),t}const Jf=typeof window<"u",dy=Jf?L.useLayoutEffect:L.useEffect,OS=({children:e,custom:t,initial:r=!0,onExitComplete:o,presenceAffectsLayout:s=!0,mode:l="sync",propagate:u=!1})=>{const[f,d]=fy(u),p=L.useMemo(()=>bm(e),[e]),g=u&&!f?[]:p.map($a),m=L.useRef(!0),v=L.useRef(p),x=qf(()=>new Map),[w,_]=L.useState(p),[C,E]=L.useState(p);dy(()=>{m.current=!1,v.current=p;for(let P=0;P<C.length;P++){const R=$a(C[P]);g.includes(R)?x.delete(R):x.get(R)!==!0&&x.set(R,!1)}},[C,g.length,g.join("-")]);const M=[];if(p!==w){let P=[...p];for(let R=0;R<C.length;R++){const D=C[R],O=$a(D);g.includes(O)||(P.splice(R,0,D),M.push(D))}l==="wait"&&M.length&&(P=M),E(bm(P)),_(p);return}const{forceRender:k}=L.useContext(Qf);return T.jsx(T.Fragment,{children:C.map(P=>{const R=$a(P),D=u&&!f?!1:p===C||g.includes(R),O=()=>{if(x.has(R))x.set(R,!0);else return;let F=!0;x.forEach(K=>{K||(F=!1)}),F&&(k==null||k(),E(v.current),u&&(d==null||d()),o&&o())};return T.jsx(FS,{isPresent:D,initial:!m.current||r?void 0:!1,custom:D?void 0:t,presenceAffectsLayout:s,mode:l,onExitComplete:D?void 0:O,children:P},R)})})},Lt=e=>e;let hy=Lt;function ed(e){let t;return()=>(t===void 0&&(t=e()),t)}const Li=(e,t,r)=>{const o=t-e;return o===0?1:(r-e)/o},jn=e=>e*1e3,Vn=e=>e/1e3,$S={useManualTiming:!1};function HS(e){let t=new Set,r=new Set,o=!1,s=!1;const l=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function f(p){l.has(p)&&(d.schedule(p),e()),p(u)}const d={schedule:(p,g=!1,m=!1)=>{const x=m&&o?t:r;return g&&l.add(p),x.has(p)||x.add(p),p},cancel:p=>{r.delete(p),l.delete(p)},process:p=>{if(u=p,o){s=!0;return}o=!0,[t,r]=[r,t],t.forEach(f),t.clear(),o=!1,s&&(s=!1,d.process(p))}};return d}const Ha=["read","resolveKeyframes","update","preRender","render","postRender"],US=40;function py(e,t){let r=!1,o=!0;const s={delta:0,timestamp:0,isProcessing:!1},l=()=>r=!0,u=Ha.reduce((E,M)=>(E[M]=HS(l),E),{}),{read:f,resolveKeyframes:d,update:p,preRender:g,render:m,postRender:v}=u,x=()=>{const E=performance.now();r=!1,s.delta=o?1e3/60:Math.max(Math.min(E-s.timestamp,US),1),s.timestamp=E,s.isProcessing=!0,f.process(s),d.process(s),p.process(s),g.process(s),m.process(s),v.process(s),s.isProcessing=!1,r&&t&&(o=!1,e(x))},w=()=>{r=!0,o=!0,s.isProcessing||e(x)};return{schedule:Ha.reduce((E,M)=>{const k=u[M];return E[M]=(P,R=!1,D=!1)=>(r||w(),k.schedule(P,R,D)),E},{}),cancel:E=>{for(let M=0;M<Ha.length;M++)u[Ha[M]].cancel(E)},state:s,steps:u}}const{schedule:ze,cancel:dr,state:st,steps:Wc}=py(typeof requestAnimationFrame<"u"?requestAnimationFrame:Lt,!0),my=L.createContext({strict:!1}),Rm={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ji={};for(const e in Rm)ji[e]={isEnabled:t=>Rm[e].some(r=>!!t[r])};function WS(e){for(const t in e)ji[t]={...ji[t],...e[t]}}const XS=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function fl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||XS.has(e)}let gy=e=>!fl(e);function KS(e){e&&(gy=t=>t.startsWith("on")?!fl(t):e(t))}try{KS(require("@emotion/is-prop-valid").default)}catch{}function YS(e,t,r){const o={};for(const s in e)s==="values"&&typeof e.values=="object"||(gy(s)||r===!0&&fl(s)||!t&&!fl(s)||e.draggable&&s.startsWith("onDrag"))&&(o[s]=e[s]);return o}function GS(e){if(typeof Proxy>"u")return e;const t=new Map,r=(...o)=>e(...o);return new Proxy(r,{get:(o,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const Al=L.createContext({});function Jo(e){return typeof e=="string"||Array.isArray(e)}function bl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const td=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],nd=["initial",...td];function Rl(e){return bl(e.animate)||nd.some(t=>Jo(e[t]))}function yy(e){return!!(Rl(e)||e.variants)}function QS(e,t){if(Rl(e)){const{initial:r,animate:o}=e;return{initial:r===!1||Jo(r)?r:void 0,animate:Jo(o)?o:void 0}}return e.inherit!==!1?t:{}}function qS(e){const{initial:t,animate:r}=QS(e,L.useContext(Al));return L.useMemo(()=>({initial:t,animate:r}),[Dm(t),Dm(r)])}function Dm(e){return Array.isArray(e)?e.join(" "):e}const ZS=Symbol.for("motionComponentSymbol");function Ti(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function JS(e,t,r){return L.useCallback(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),r&&(typeof r=="function"?r(o):Ti(r)&&(r.current=o))},[t])}const rd=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),e2="framerAppearId",vy="data-"+rd(e2),{schedule:id}=py(queueMicrotask,!1),xy=L.createContext({});function t2(e,t,r,o,s){var l,u;const{visualElement:f}=L.useContext(Al),d=L.useContext(my),p=L.useContext(Nl),g=L.useContext(Zf).reducedMotion,m=L.useRef(null);o=o||d.renderer,!m.current&&o&&(m.current=o(e,{visualState:t,parent:f,props:r,presenceContext:p,blockInitialAnimation:p?p.initial===!1:!1,reducedMotionConfig:g}));const v=m.current,x=L.useContext(xy);v&&!v.projection&&s&&(v.type==="html"||v.type==="svg")&&n2(m.current,r,s,x);const w=L.useRef(!1);L.useInsertionEffect(()=>{v&&w.current&&v.update(r,p)});const _=r[vy],C=L.useRef(!!_&&!(!((l=window.MotionHandoffIsComplete)===null||l===void 0)&&l.call(window,_))&&((u=window.MotionHasOptimisedAnimation)===null||u===void 0?void 0:u.call(window,_)));return dy(()=>{v&&(w.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),id.render(v.render),C.current&&v.animationState&&v.animationState.animateChanges())}),L.useEffect(()=>{v&&(!C.current&&v.animationState&&v.animationState.animateChanges(),C.current&&(queueMicrotask(()=>{var E;(E=window.MotionHandoffMarkAsComplete)===null||E===void 0||E.call(window,_)}),C.current=!1))}),v}function n2(e,t,r,o){const{layoutId:s,layout:l,drag:u,dragConstraints:f,layoutScroll:d,layoutRoot:p}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:wy(e.parent)),e.projection.setOptions({layoutId:s,layout:l,alwaysMeasureLayout:!!u||f&&Ti(f),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:o,layoutScroll:d,layoutRoot:p})}function wy(e){if(e)return e.options.allowProjection!==!1?e.projection:wy(e.parent)}function r2({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:o,Component:s}){var l,u;e&&WS(e);function f(p,g){let m;const v={...L.useContext(Zf),...p,layoutId:i2(p)},{isStatic:x}=v,w=qS(p),_=o(p,x);if(!x&&Jf){o2();const C=s2(v);m=C.MeasureLayout,w.visualElement=t2(s,_,v,t,C.ProjectionNode)}return T.jsxs(Al.Provider,{value:w,children:[m&&w.visualElement?T.jsx(m,{visualElement:w.visualElement,...v}):null,r(s,p,JS(_,w.visualElement,g),_,x,w.visualElement)]})}f.displayName=`motion.${typeof s=="string"?s:`create(${(u=(l=s.displayName)!==null&&l!==void 0?l:s.name)!==null&&u!==void 0?u:""})`}`;const d=L.forwardRef(f);return d[ZS]=s,d}function i2({layoutId:e}){const t=L.useContext(Qf).id;return t&&e!==void 0?t+"-"+e:e}function o2(e,t){L.useContext(my).strict}function s2(e){const{drag:t,layout:r}=ji;if(!t&&!r)return{};const o={...t,...r};return{MeasureLayout:t!=null&&t.isEnabled(e)||r!=null&&r.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const a2=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function od(e){return typeof e!="string"||e.includes("-")?!1:!!(a2.indexOf(e)>-1||/[A-Z]/u.test(e))}function Im(e){const t=[{},{}];return e==null||e.values.forEach((r,o)=>{t[0][o]=r.get(),t[1][o]=r.getVelocity()}),t}function sd(e,t,r,o){if(typeof t=="function"){const[s,l]=Im(o);t=t(r!==void 0?r:e.custom,s,l)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,l]=Im(o);t=t(r!==void 0?r:e.custom,s,l)}return t}const xf=e=>Array.isArray(e),l2=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),u2=e=>xf(e)?e[e.length-1]||0:e,pt=e=>!!(e&&e.getVelocity);function nl(e){const t=pt(e)?e.get():e;return l2(t)?t.toValue():t}function c2({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:r},o,s,l){const u={latestValues:f2(o,s,l,e),renderState:t()};return r&&(u.onMount=f=>r({props:o,current:f,...u}),u.onUpdate=f=>r(f)),u}const Sy=e=>(t,r)=>{const o=L.useContext(Al),s=L.useContext(Nl),l=()=>c2(e,t,o,s);return r?l():qf(l)};function f2(e,t,r,o){const s={},l=o(e,{});for(const v in l)s[v]=nl(l[v]);let{initial:u,animate:f}=e;const d=Rl(e),p=yy(e);t&&p&&!d&&e.inherit!==!1&&(u===void 0&&(u=t.initial),f===void 0&&(f=t.animate));let g=r?r.initial===!1:!1;g=g||u===!1;const m=g?f:u;if(m&&typeof m!="boolean"&&!bl(m)){const v=Array.isArray(m)?m:[m];for(let x=0;x<v.length;x++){const w=sd(e,v[x]);if(w){const{transitionEnd:_,transition:C,...E}=w;for(const M in E){let k=E[M];if(Array.isArray(k)){const P=g?k.length-1:0;k=k[P]}k!==null&&(s[M]=k)}for(const M in _)s[M]=_[M]}}}return s}const Wi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Yr=new Set(Wi),ky=e=>t=>typeof t=="string"&&t.startsWith(e),Ey=ky("--"),d2=ky("var(--"),ad=e=>d2(e)?h2.test(e.split("/*")[0].trim()):!1,h2=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Cy=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Fn=(e,t,r)=>r>t?t:r<e?e:r,Xi={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},es={...Xi,transform:e=>Fn(0,1,e)},Ua={...Xi,default:1},ps=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),cr=ps("deg"),vn=ps("%"),Ee=ps("px"),p2=ps("vh"),m2=ps("vw"),Lm={...vn,parse:e=>vn.parse(e)/100,transform:e=>vn.transform(e*100)},g2={borderWidth:Ee,borderTopWidth:Ee,borderRightWidth:Ee,borderBottomWidth:Ee,borderLeftWidth:Ee,borderRadius:Ee,radius:Ee,borderTopLeftRadius:Ee,borderTopRightRadius:Ee,borderBottomRightRadius:Ee,borderBottomLeftRadius:Ee,width:Ee,maxWidth:Ee,height:Ee,maxHeight:Ee,top:Ee,right:Ee,bottom:Ee,left:Ee,padding:Ee,paddingTop:Ee,paddingRight:Ee,paddingBottom:Ee,paddingLeft:Ee,margin:Ee,marginTop:Ee,marginRight:Ee,marginBottom:Ee,marginLeft:Ee,backgroundPositionX:Ee,backgroundPositionY:Ee},y2={rotate:cr,rotateX:cr,rotateY:cr,rotateZ:cr,scale:Ua,scaleX:Ua,scaleY:Ua,scaleZ:Ua,skew:cr,skewX:cr,skewY:cr,distance:Ee,translateX:Ee,translateY:Ee,translateZ:Ee,x:Ee,y:Ee,z:Ee,perspective:Ee,transformPerspective:Ee,opacity:es,originX:Lm,originY:Lm,originZ:Ee},jm={...Xi,transform:Math.round},ld={...g2,...y2,zIndex:jm,size:Ee,fillOpacity:es,strokeOpacity:es,numOctaves:jm},v2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},x2=Wi.length;function w2(e,t,r){let o="",s=!0;for(let l=0;l<x2;l++){const u=Wi[l],f=e[u];if(f===void 0)continue;let d=!0;if(typeof f=="number"?d=f===(u.startsWith("scale")?1:0):d=parseFloat(f)===0,!d||r){const p=Cy(f,ld[u]);if(!d){s=!1;const g=v2[u]||u;o+=`${g}(${p}) `}r&&(t[u]=p)}}return o=o.trim(),r?o=r(t,s?"":o):s&&(o="none"),o}function ud(e,t,r){const{style:o,vars:s,transformOrigin:l}=e;let u=!1,f=!1;for(const d in t){const p=t[d];if(Yr.has(d)){u=!0;continue}else if(Ey(d)){s[d]=p;continue}else{const g=Cy(p,ld[d]);d.startsWith("origin")?(f=!0,l[d]=g):o[d]=g}}if(t.transform||(u||r?o.transform=w2(t,e.transform,r):o.transform&&(o.transform="none")),f){const{originX:d="50%",originY:p="50%",originZ:g=0}=l;o.transformOrigin=`${d} ${p} ${g}`}}const S2={offset:"stroke-dashoffset",array:"stroke-dasharray"},k2={offset:"strokeDashoffset",array:"strokeDasharray"};function E2(e,t,r=1,o=0,s=!0){e.pathLength=1;const l=s?S2:k2;e[l.offset]=Ee.transform(-o);const u=Ee.transform(t),f=Ee.transform(r);e[l.array]=`${u} ${f}`}function Vm(e,t,r){return typeof e=="string"?e:Ee.transform(t+r*e)}function C2(e,t,r){const o=Vm(t,e.x,e.width),s=Vm(r,e.y,e.height);return`${o} ${s}`}function cd(e,{attrX:t,attrY:r,attrScale:o,originX:s,originY:l,pathLength:u,pathSpacing:f=1,pathOffset:d=0,...p},g,m){if(ud(e,p,m),g){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:v,style:x,dimensions:w}=e;v.transform&&(w&&(x.transform=v.transform),delete v.transform),w&&(s!==void 0||l!==void 0||x.transform)&&(x.transformOrigin=C2(w,s!==void 0?s:.5,l!==void 0?l:.5)),t!==void 0&&(v.x=t),r!==void 0&&(v.y=r),o!==void 0&&(v.scale=o),u!==void 0&&E2(v,u,f,d,!1)}const fd=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),_y=()=>({...fd(),attrs:{}}),dd=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Ty(e,{style:t,vars:r},o,s){Object.assign(e.style,t,s&&s.getProjectionStyles(o));for(const l in r)e.style.setProperty(l,r[l])}const Py=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function My(e,t,r,o){Ty(e,t,void 0,o);for(const s in t.attrs)e.setAttribute(Py.has(s)?s:rd(s),t.attrs[s])}const dl={};function _2(e){Object.assign(dl,e)}function Ny(e,{layout:t,layoutId:r}){return Yr.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!dl[e]||e==="opacity")}function hd(e,t,r){var o;const{style:s}=e,l={};for(const u in s)(pt(s[u])||t.style&&pt(t.style[u])||Ny(u,e)||((o=r==null?void 0:r.getValue(u))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(l[u]=s[u]);return l}function Ay(e,t,r){const o=hd(e,t,r);for(const s in e)if(pt(e[s])||pt(t[s])){const l=Wi.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;o[l]=e[s]}return o}function T2(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const zm=["x","y","width","height","cx","cy","r"],P2={useVisualState:Sy({scrapeMotionValuesFromProps:Ay,createRenderState:_y,onUpdate:({props:e,prevProps:t,current:r,renderState:o,latestValues:s})=>{if(!r)return;let l=!!e.drag;if(!l){for(const f in s)if(Yr.has(f)){l=!0;break}}if(!l)return;let u=!t;if(t)for(let f=0;f<zm.length;f++){const d=zm[f];e[d]!==t[d]&&(u=!0)}u&&ze.read(()=>{T2(r,o),ze.render(()=>{cd(o,s,dd(r.tagName),e.transformTemplate),My(r,o)})})}})},M2={useVisualState:Sy({scrapeMotionValuesFromProps:hd,createRenderState:fd})};function by(e,t,r){for(const o in t)!pt(t[o])&&!Ny(o,r)&&(e[o]=t[o])}function N2({transformTemplate:e},t){return L.useMemo(()=>{const r=fd();return ud(r,t,e),Object.assign({},r.vars,r.style)},[t])}function A2(e,t){const r=e.style||{},o={};return by(o,r,e),Object.assign(o,N2(e,t)),o}function b2(e,t){const r={},o=A2(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}function R2(e,t,r,o){const s=L.useMemo(()=>{const l=_y();return cd(l,t,dd(o),e.transformTemplate),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};by(l,e.style,e),s.style={...l,...s.style}}return s}function D2(e=!1){return(r,o,s,{latestValues:l},u)=>{const d=(od(r)?R2:b2)(o,l,u,r),p=YS(o,typeof r=="string",e),g=r!==L.Fragment?{...p,...d,ref:s}:{},{children:m}=o,v=L.useMemo(()=>pt(m)?m.get():m,[m]);return L.createElement(r,{...g,children:v})}}function I2(e,t){return function(o,{forwardMotionProps:s}={forwardMotionProps:!1}){const u={...od(o)?P2:M2,preloadedFeatures:e,useRender:D2(s),createVisualElement:t,Component:o};return r2(u)}}function Ry(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let o=0;o<r;o++)if(t[o]!==e[o])return!1;return!0}function Dl(e,t,r){const o=e.getProps();return sd(o,t,r!==void 0?r:o.custom,e)}const L2=ed(()=>window.ScrollTimeline!==void 0);class j2{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,r){for(let o=0;o<this.animations.length;o++)this.animations[o][t]=r}attachTimeline(t,r){const o=this.animations.map(s=>{if(L2()&&s.attachTimeline)return s.attachTimeline(t);if(typeof r=="function")return r(s)});return()=>{o.forEach((s,l)=>{s&&s(),this.animations[l].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let r=0;r<this.animations.length;r++)t=Math.max(t,this.animations[r].duration);return t}runAll(t){this.animations.forEach(r=>r[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class V2 extends j2{then(t,r){return Promise.all(this.animations).then(t).catch(r)}}function pd(e,t){return e?e[t]||e.default||e:void 0}const wf=2e4;function Dy(e){let t=0;const r=50;let o=e.next(t);for(;!o.done&&t<wf;)t+=r,o=e.next(t);return t>=wf?1/0:t}function md(e){return typeof e=="function"}function Fm(e,t){e.timeline=t,e.onfinish=null}const gd=e=>Array.isArray(e)&&typeof e[0]=="number",z2={linearEasing:void 0};function F2(e,t){const r=ed(e);return()=>{var o;return(o=z2[t])!==null&&o!==void 0?o:r()}}const hl=F2(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Iy=(e,t,r=10)=>{let o="";const s=Math.max(Math.round(t/r),2);for(let l=0;l<s;l++)o+=e(Li(0,s-1,l))+", ";return`linear(${o.substring(0,o.length-2)})`};function Ly(e){return!!(typeof e=="function"&&hl()||!e||typeof e=="string"&&(e in Sf||hl())||gd(e)||Array.isArray(e)&&e.every(Ly))}const $o=([e,t,r,o])=>`cubic-bezier(${e}, ${t}, ${r}, ${o})`,Sf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$o([0,.65,.55,1]),circOut:$o([.55,0,1,.45]),backIn:$o([.31,.01,.66,-.59]),backOut:$o([.33,1.53,.69,.99])};function jy(e,t){if(e)return typeof e=="function"&&hl()?Iy(e,t):gd(e)?$o(e):Array.isArray(e)?e.map(r=>jy(r,t)||Sf.easeOut):Sf[e]}const en={x:!1,y:!1};function Vy(){return en.x||en.y}function B2(e,t,r){var o;if(e instanceof Element)return[e];if(typeof e=="string"){let s=document;const l=(o=void 0)!==null&&o!==void 0?o:s.querySelectorAll(e);return l?Array.from(l):[]}return Array.from(e)}function zy(e,t){const r=B2(e),o=new AbortController,s={passive:!0,...t,signal:o.signal};return[r,s,()=>o.abort()]}function Bm(e){return t=>{t.pointerType==="touch"||Vy()||e(t)}}function O2(e,t,r={}){const[o,s,l]=zy(e,r),u=Bm(f=>{const{target:d}=f,p=t(f);if(typeof p!="function"||!d)return;const g=Bm(m=>{p(m),d.removeEventListener("pointerleave",g)});d.addEventListener("pointerleave",g,s)});return o.forEach(f=>{f.addEventListener("pointerenter",u,s)}),l}const Fy=(e,t)=>t?e===t?!0:Fy(e,t.parentElement):!1,yd=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,$2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function H2(e){return $2.has(e.tagName)||e.tabIndex!==-1}const Ho=new WeakSet;function Om(e){return t=>{t.key==="Enter"&&e(t)}}function Xc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const U2=(e,t)=>{const r=e.currentTarget;if(!r)return;const o=Om(()=>{if(Ho.has(r))return;Xc(r,"down");const s=Om(()=>{Xc(r,"up")}),l=()=>Xc(r,"cancel");r.addEventListener("keyup",s,t),r.addEventListener("blur",l,t)});r.addEventListener("keydown",o,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",o),t)};function $m(e){return yd(e)&&!Vy()}function W2(e,t,r={}){const[o,s,l]=zy(e,r),u=f=>{const d=f.currentTarget;if(!$m(f)||Ho.has(d))return;Ho.add(d);const p=t(f),g=(x,w)=>{window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",v),!(!$m(x)||!Ho.has(d))&&(Ho.delete(d),typeof p=="function"&&p(x,{success:w}))},m=x=>{g(x,r.useGlobalTarget||Fy(d,x.target))},v=x=>{g(x,!1)};window.addEventListener("pointerup",m,s),window.addEventListener("pointercancel",v,s)};return o.forEach(f=>{!H2(f)&&f.getAttribute("tabindex")===null&&(f.tabIndex=0),(r.useGlobalTarget?window:f).addEventListener("pointerdown",u,s),f.addEventListener("focus",p=>U2(p,s),s)}),l}function X2(e){return e==="x"||e==="y"?en[e]?null:(en[e]=!0,()=>{en[e]=!1}):en.x||en.y?null:(en.x=en.y=!0,()=>{en.x=en.y=!1})}const By=new Set(["width","height","top","left","right","bottom",...Wi]);let rl;function K2(){rl=void 0}const xn={now:()=>(rl===void 0&&xn.set(st.isProcessing||$S.useManualTiming?st.timestamp:performance.now()),rl),set:e=>{rl=e,queueMicrotask(K2)}};function vd(e,t){e.indexOf(t)===-1&&e.push(t)}function xd(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}class wd{constructor(){this.subscriptions=[]}add(t){return vd(this.subscriptions,t),()=>xd(this.subscriptions,t)}notify(t,r,o){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,r,o);else for(let l=0;l<s;l++){const u=this.subscriptions[l];u&&u(t,r,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Oy(e,t){return t?e*(1e3/t):0}const Hm=30,Y2=e=>!isNaN(parseFloat(e));class G2{constructor(t,r={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,s=!0)=>{const l=xn.now();this.updatedAt!==l&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=xn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Y2(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new wd);const o=this.events[t].add(r);return t==="change"?()=>{o(),ze.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t,r=!0){!r||!this.passiveEffect?this.updateAndNotify(t,r):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,r,o){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=xn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Hm)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,Hm);return Oy(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ts(e,t){return new G2(e,t)}function Q2(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,ts(r))}function q2(e,t){const r=Dl(e,t);let{transitionEnd:o={},transition:s={},...l}=r||{};l={...l,...o};for(const u in l){const f=u2(l[u]);Q2(e,u,f)}}function Z2(e){return!!(pt(e)&&e.add)}function kf(e,t){const r=e.getValue("willChange");if(Z2(r))return r.add(t)}function $y(e){return e.props[vy]}const Hy=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,J2=1e-7,ek=12;function tk(e,t,r,o,s){let l,u,f=0;do u=t+(r-t)/2,l=Hy(u,o,s)-e,l>0?r=u:t=u;while(Math.abs(l)>J2&&++f<ek);return u}function ms(e,t,r,o){if(e===t&&r===o)return Lt;const s=l=>tk(l,0,1,e,r);return l=>l===0||l===1?l:Hy(s(l),t,o)}const Uy=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Wy=e=>t=>1-e(1-t),Xy=ms(.33,1.53,.69,.99),Sd=Wy(Xy),Ky=Uy(Sd),Yy=e=>(e*=2)<1?.5*Sd(e):.5*(2-Math.pow(2,-10*(e-1))),kd=e=>1-Math.sin(Math.acos(e)),Gy=Wy(kd),Qy=Uy(kd),qy=e=>/^0[^.\s]+$/u.test(e);function nk(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||qy(e):!0}const Ko=e=>Math.round(e*1e5)/1e5,Ed=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function rk(e){return e==null}const ik=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Cd=(e,t)=>r=>!!(typeof r=="string"&&ik.test(r)&&r.startsWith(e)||t&&!rk(r)&&Object.prototype.hasOwnProperty.call(r,t)),Zy=(e,t,r)=>o=>{if(typeof o!="string")return o;const[s,l,u,f]=o.match(Ed);return{[e]:parseFloat(s),[t]:parseFloat(l),[r]:parseFloat(u),alpha:f!==void 0?parseFloat(f):1}},ok=e=>Fn(0,255,e),Kc={...Xi,transform:e=>Math.round(ok(e))},zr={test:Cd("rgb","red"),parse:Zy("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:o=1})=>"rgba("+Kc.transform(e)+", "+Kc.transform(t)+", "+Kc.transform(r)+", "+Ko(es.transform(o))+")"};function sk(e){let t="",r="",o="",s="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),o=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),o=e.substring(3,4),s=e.substring(4,5),t+=t,r+=r,o+=o,s+=s),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(o,16),alpha:s?parseInt(s,16)/255:1}}const Ef={test:Cd("#"),parse:sk,transform:zr.transform},Pi={test:Cd("hsl","hue"),parse:Zy("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:o=1})=>"hsla("+Math.round(e)+", "+vn.transform(Ko(t))+", "+vn.transform(Ko(r))+", "+Ko(es.transform(o))+")"},ht={test:e=>zr.test(e)||Ef.test(e)||Pi.test(e),parse:e=>zr.test(e)?zr.parse(e):Pi.test(e)?Pi.parse(e):Ef.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?zr.transform(e):Pi.transform(e)},ak=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function lk(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Ed))===null||t===void 0?void 0:t.length)||0)+(((r=e.match(ak))===null||r===void 0?void 0:r.length)||0)>0}const Jy="number",ev="color",uk="var",ck="var(",Um="${}",fk=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ns(e){const t=e.toString(),r=[],o={color:[],number:[],var:[]},s=[];let l=0;const f=t.replace(fk,d=>(ht.test(d)?(o.color.push(l),s.push(ev),r.push(ht.parse(d))):d.startsWith(ck)?(o.var.push(l),s.push(uk),r.push(d)):(o.number.push(l),s.push(Jy),r.push(parseFloat(d))),++l,Um)).split(Um);return{values:r,split:f,indexes:o,types:s}}function tv(e){return ns(e).values}function nv(e){const{split:t,types:r}=ns(e),o=t.length;return s=>{let l="";for(let u=0;u<o;u++)if(l+=t[u],s[u]!==void 0){const f=r[u];f===Jy?l+=Ko(s[u]):f===ev?l+=ht.transform(s[u]):l+=s[u]}return l}}const dk=e=>typeof e=="number"?0:e;function hk(e){const t=tv(e);return nv(e)(t.map(dk))}const hr={test:lk,parse:tv,createTransformer:nv,getAnimatableNone:hk},pk=new Set(["brightness","contrast","saturate","opacity"]);function mk(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=r.match(Ed)||[];if(!o)return e;const s=r.replace(o,"");let l=pk.has(t)?1:0;return o!==r&&(l*=100),t+"("+l+s+")"}const gk=/\b([a-z-]*)\(.*?\)/gu,Cf={...hr,getAnimatableNone:e=>{const t=e.match(gk);return t?t.map(mk).join(" "):e}},yk={...ld,color:ht,backgroundColor:ht,outlineColor:ht,fill:ht,stroke:ht,borderColor:ht,borderTopColor:ht,borderRightColor:ht,borderBottomColor:ht,borderLeftColor:ht,filter:Cf,WebkitFilter:Cf},_d=e=>yk[e];function rv(e,t){let r=_d(e);return r!==Cf&&(r=hr),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const vk=new Set(["auto","none","0"]);function xk(e,t,r){let o=0,s;for(;o<e.length&&!s;){const l=e[o];typeof l=="string"&&!vk.has(l)&&ns(l).values.length&&(s=e[o]),o++}if(s&&r)for(const l of t)e[l]=rv(r,s)}const Wm=e=>e===Xi||e===Ee,Xm=(e,t)=>parseFloat(e.split(", ")[t]),Km=(e,t)=>(r,{transform:o})=>{if(o==="none"||!o)return 0;const s=o.match(/^matrix3d\((.+)\)$/u);if(s)return Xm(s[1],t);{const l=o.match(/^matrix\((.+)\)$/u);return l?Xm(l[1],e):0}},wk=new Set(["x","y","z"]),Sk=Wi.filter(e=>!wk.has(e));function kk(e){const t=[];return Sk.forEach(r=>{const o=e.getValue(r);o!==void 0&&(t.push([r,o.get()]),o.set(r.startsWith("scale")?1:0))}),t}const Vi={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Km(4,13),y:Km(5,14)};Vi.translateX=Vi.x;Vi.translateY=Vi.y;const Br=new Set;let _f=!1,Tf=!1;function iv(){if(Tf){const e=Array.from(Br).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),r=new Map;t.forEach(o=>{const s=kk(o);s.length&&(r.set(o,s),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const s=r.get(o);s&&s.forEach(([l,u])=>{var f;(f=o.getValue(l))===null||f===void 0||f.set(u)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}Tf=!1,_f=!1,Br.forEach(e=>e.complete()),Br.clear()}function ov(){Br.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Tf=!0)})}function Ek(){ov(),iv()}class Td{constructor(t,r,o,s,l,u=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=o,this.motionValue=s,this.element=l,this.isAsync=u}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Br.add(this),_f||(_f=!0,ze.read(ov),ze.resolveKeyframes(iv))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:o,motionValue:s}=this;for(let l=0;l<t.length;l++)if(t[l]===null)if(l===0){const u=s==null?void 0:s.get(),f=t[t.length-1];if(u!==void 0)t[0]=u;else if(o&&r){const d=o.readValue(r,f);d!=null&&(t[0]=d)}t[0]===void 0&&(t[0]=f),s&&u===void 0&&s.set(t[0])}else t[l]=t[l-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Br.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Br.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const sv=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Ck=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function _k(e){const t=Ck.exec(e);if(!t)return[,];const[,r,o,s]=t;return[`--${r??o}`,s]}function av(e,t,r=1){const[o,s]=_k(e);if(!o)return;const l=window.getComputedStyle(t).getPropertyValue(o);if(l){const u=l.trim();return sv(u)?parseFloat(u):u}return ad(s)?av(s,t,r+1):s}const lv=e=>t=>t.test(e),Tk={test:e=>e==="auto",parse:e=>e},uv=[Xi,Ee,vn,cr,m2,p2,Tk],Ym=e=>uv.find(lv(e));class cv extends Td{constructor(t,r,o,s,l){super(t,r,o,s,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:o}=this;if(!r||!r.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let p=t[d];if(typeof p=="string"&&(p=p.trim(),ad(p))){const g=av(p,r.current);g!==void 0&&(t[d]=g),d===t.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!By.has(o)||t.length!==2)return;const[s,l]=t,u=Ym(s),f=Ym(l);if(u!==f)if(Wm(u)&&Wm(f))for(let d=0;d<t.length;d++){const p=t[d];typeof p=="string"&&(t[d]=parseFloat(p))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,o=[];for(let s=0;s<t.length;s++)nk(t[s])&&o.push(s);o.length&&xk(t,o,r)}measureInitialState(){const{element:t,unresolvedKeyframes:r,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Vi[o](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;const s=r[r.length-1];s!==void 0&&t.getValue(o,s).jump(s,!1)}measureEndState(){var t;const{element:r,name:o,unresolvedKeyframes:s}=this;if(!r||!r.current)return;const l=r.getValue(o);l&&l.jump(this.measuredOrigin,!1);const u=s.length-1,f=s[u];s[u]=Vi[o](r.measureViewportBox(),window.getComputedStyle(r.current)),f!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=f),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([d,p])=>{r.getValue(d).set(p)}),this.resolveNoneKeyframes()}}const Gm=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(hr.test(e)||e==="0")&&!e.startsWith("url("));function Pk(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function Mk(e,t,r,o){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const l=e[e.length-1],u=Gm(s,t),f=Gm(l,t);return!u||!f?!1:Pk(e)||(r==="spring"||md(r))&&o}const Nk=e=>e!==null;function Il(e,{repeat:t,repeatType:r="loop"},o){const s=e.filter(Nk),l=t&&r!=="loop"&&t%2===1?0:s.length-1;return!l||o===void 0?s[l]:o}const Ak=40;class fv{constructor({autoplay:t=!0,delay:r=0,type:o="keyframes",repeat:s=0,repeatDelay:l=0,repeatType:u="loop",...f}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=xn.now(),this.options={autoplay:t,delay:r,type:o,repeat:s,repeatDelay:l,repeatType:u,...f},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Ak?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Ek(),this._resolved}onKeyframesResolved(t,r){this.resolvedAt=xn.now(),this.hasAttemptedResolve=!0;const{name:o,type:s,velocity:l,delay:u,onComplete:f,onUpdate:d,isGenerator:p}=this.options;if(!p&&!Mk(t,o,s,l))if(u)this.options.duration=0;else{d&&d(Il(t,this.options,r)),f&&f(),this.resolveFinishedPromise();return}const g=this.initPlayback(t,r);g!==!1&&(this._resolved={keyframes:t,finalKeyframe:r,...g},this.onPostResolved())}onPostResolved(){}then(t,r){return this.currentFinishedPromise.then(t,r)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Ue=(e,t,r)=>e+(t-e)*r;function Yc(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function bk({hue:e,saturation:t,lightness:r,alpha:o}){e/=360,t/=100,r/=100;let s=0,l=0,u=0;if(!t)s=l=u=r;else{const f=r<.5?r*(1+t):r+t-r*t,d=2*r-f;s=Yc(d,f,e+1/3),l=Yc(d,f,e),u=Yc(d,f,e-1/3)}return{red:Math.round(s*255),green:Math.round(l*255),blue:Math.round(u*255),alpha:o}}function pl(e,t){return r=>r>0?t:e}const Gc=(e,t,r)=>{const o=e*e,s=r*(t*t-o)+o;return s<0?0:Math.sqrt(s)},Rk=[Ef,zr,Pi],Dk=e=>Rk.find(t=>t.test(e));function Qm(e){const t=Dk(e);if(!t)return!1;let r=t.parse(e);return t===Pi&&(r=bk(r)),r}const qm=(e,t)=>{const r=Qm(e),o=Qm(t);if(!r||!o)return pl(e,t);const s={...r};return l=>(s.red=Gc(r.red,o.red,l),s.green=Gc(r.green,o.green,l),s.blue=Gc(r.blue,o.blue,l),s.alpha=Ue(r.alpha,o.alpha,l),zr.transform(s))},Ik=(e,t)=>r=>t(e(r)),gs=(...e)=>e.reduce(Ik),Pf=new Set(["none","hidden"]);function Lk(e,t){return Pf.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function jk(e,t){return r=>Ue(e,t,r)}function Pd(e){return typeof e=="number"?jk:typeof e=="string"?ad(e)?pl:ht.test(e)?qm:Fk:Array.isArray(e)?dv:typeof e=="object"?ht.test(e)?qm:Vk:pl}function dv(e,t){const r=[...e],o=r.length,s=e.map((l,u)=>Pd(l)(l,t[u]));return l=>{for(let u=0;u<o;u++)r[u]=s[u](l);return r}}function Vk(e,t){const r={...e,...t},o={};for(const s in r)e[s]!==void 0&&t[s]!==void 0&&(o[s]=Pd(e[s])(e[s],t[s]));return s=>{for(const l in o)r[l]=o[l](s);return r}}function zk(e,t){var r;const o=[],s={color:0,var:0,number:0};for(let l=0;l<t.values.length;l++){const u=t.types[l],f=e.indexes[u][s[u]],d=(r=e.values[f])!==null&&r!==void 0?r:0;o[l]=d,s[u]++}return o}const Fk=(e,t)=>{const r=hr.createTransformer(t),o=ns(e),s=ns(t);return o.indexes.var.length===s.indexes.var.length&&o.indexes.color.length===s.indexes.color.length&&o.indexes.number.length>=s.indexes.number.length?Pf.has(e)&&!s.values.length||Pf.has(t)&&!o.values.length?Lk(e,t):gs(dv(zk(o,s),s.values),r):pl(e,t)};function hv(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Ue(e,t,r):Pd(e)(e,t)}const Bk=5;function pv(e,t,r){const o=Math.max(t-Bk,0);return Oy(r-e(o),t-o)}const Ke={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Qc=.001;function Ok({duration:e=Ke.duration,bounce:t=Ke.bounce,velocity:r=Ke.velocity,mass:o=Ke.mass}){let s,l,u=1-t;u=Fn(Ke.minDamping,Ke.maxDamping,u),e=Fn(Ke.minDuration,Ke.maxDuration,Vn(e)),u<1?(s=p=>{const g=p*u,m=g*e,v=g-r,x=Mf(p,u),w=Math.exp(-m);return Qc-v/x*w},l=p=>{const m=p*u*e,v=m*r+r,x=Math.pow(u,2)*Math.pow(p,2)*e,w=Math.exp(-m),_=Mf(Math.pow(p,2),u);return(-s(p)+Qc>0?-1:1)*((v-x)*w)/_}):(s=p=>{const g=Math.exp(-p*e),m=(p-r)*e+1;return-Qc+g*m},l=p=>{const g=Math.exp(-p*e),m=(r-p)*(e*e);return g*m});const f=5/e,d=Hk(s,l,f);if(e=jn(e),isNaN(d))return{stiffness:Ke.stiffness,damping:Ke.damping,duration:e};{const p=Math.pow(d,2)*o;return{stiffness:p,damping:u*2*Math.sqrt(o*p),duration:e}}}const $k=12;function Hk(e,t,r){let o=r;for(let s=1;s<$k;s++)o=o-e(o)/t(o);return o}function Mf(e,t){return e*Math.sqrt(1-t*t)}const Uk=["duration","bounce"],Wk=["stiffness","damping","mass"];function Zm(e,t){return t.some(r=>e[r]!==void 0)}function Xk(e){let t={velocity:Ke.velocity,stiffness:Ke.stiffness,damping:Ke.damping,mass:Ke.mass,isResolvedFromDuration:!1,...e};if(!Zm(e,Wk)&&Zm(e,Uk))if(e.visualDuration){const r=e.visualDuration,o=2*Math.PI/(r*1.2),s=o*o,l=2*Fn(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:Ke.mass,stiffness:s,damping:l}}else{const r=Ok(e);t={...t,...r,mass:Ke.mass},t.isResolvedFromDuration=!0}return t}function mv(e=Ke.visualDuration,t=Ke.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:s}=r;const l=r.keyframes[0],u=r.keyframes[r.keyframes.length-1],f={done:!1,value:l},{stiffness:d,damping:p,mass:g,duration:m,velocity:v,isResolvedFromDuration:x}=Xk({...r,velocity:-Vn(r.velocity||0)}),w=v||0,_=p/(2*Math.sqrt(d*g)),C=u-l,E=Vn(Math.sqrt(d/g)),M=Math.abs(C)<5;o||(o=M?Ke.restSpeed.granular:Ke.restSpeed.default),s||(s=M?Ke.restDelta.granular:Ke.restDelta.default);let k;if(_<1){const R=Mf(E,_);k=D=>{const O=Math.exp(-_*E*D);return u-O*((w+_*E*C)/R*Math.sin(R*D)+C*Math.cos(R*D))}}else if(_===1)k=R=>u-Math.exp(-E*R)*(C+(w+E*C)*R);else{const R=E*Math.sqrt(_*_-1);k=D=>{const O=Math.exp(-_*E*D),F=Math.min(R*D,300);return u-O*((w+_*E*C)*Math.sinh(F)+R*C*Math.cosh(F))/R}}const P={calculatedDuration:x&&m||null,next:R=>{const D=k(R);if(x)f.done=R>=m;else{let O=0;_<1&&(O=R===0?jn(w):pv(k,R,D));const F=Math.abs(O)<=o,K=Math.abs(u-D)<=s;f.done=F&&K}return f.value=f.done?u:D,f},toString:()=>{const R=Math.min(Dy(P),wf),D=Iy(O=>P.next(R*O).value,R,30);return R+"ms "+D}};return P}function Jm({keyframes:e,velocity:t=0,power:r=.8,timeConstant:o=325,bounceDamping:s=10,bounceStiffness:l=500,modifyTarget:u,min:f,max:d,restDelta:p=.5,restSpeed:g}){const m=e[0],v={done:!1,value:m},x=F=>f!==void 0&&F<f||d!==void 0&&F>d,w=F=>f===void 0?d:d===void 0||Math.abs(f-F)<Math.abs(d-F)?f:d;let _=r*t;const C=m+_,E=u===void 0?C:u(C);E!==C&&(_=E-m);const M=F=>-_*Math.exp(-F/o),k=F=>E+M(F),P=F=>{const K=M(F),J=k(F);v.done=Math.abs(K)<=p,v.value=v.done?E:J};let R,D;const O=F=>{x(v.value)&&(R=F,D=mv({keyframes:[v.value,w(v.value)],velocity:pv(k,F,v.value),damping:s,stiffness:l,restDelta:p,restSpeed:g}))};return O(0),{calculatedDuration:null,next:F=>{let K=!1;return!D&&R===void 0&&(K=!0,P(F),O(F)),R!==void 0&&F>=R?D.next(F-R):(!K&&P(F),v)}}}const Kk=ms(.42,0,1,1),Yk=ms(0,0,.58,1),gv=ms(.42,0,.58,1),Gk=e=>Array.isArray(e)&&typeof e[0]!="number",Qk={linear:Lt,easeIn:Kk,easeInOut:gv,easeOut:Yk,circIn:kd,circInOut:Qy,circOut:Gy,backIn:Sd,backInOut:Ky,backOut:Xy,anticipate:Yy},eg=e=>{if(gd(e)){hy(e.length===4);const[t,r,o,s]=e;return ms(t,r,o,s)}else if(typeof e=="string")return Qk[e];return e};function qk(e,t,r){const o=[],s=r||hv,l=e.length-1;for(let u=0;u<l;u++){let f=s(e[u],e[u+1]);if(t){const d=Array.isArray(t)?t[u]||Lt:t;f=gs(d,f)}o.push(f)}return o}function Zk(e,t,{clamp:r=!0,ease:o,mixer:s}={}){const l=e.length;if(hy(l===t.length),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const u=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const f=qk(t,o,s),d=f.length,p=g=>{if(u&&g<e[0])return t[0];let m=0;if(d>1)for(;m<e.length-2&&!(g<e[m+1]);m++);const v=Li(e[m],e[m+1],g);return f[m](v)};return r?g=>p(Fn(e[0],e[l-1],g)):p}function Jk(e,t){const r=e[e.length-1];for(let o=1;o<=t;o++){const s=Li(0,t,o);e.push(Ue(r,1,s))}}function eE(e){const t=[0];return Jk(t,e.length-1),t}function tE(e,t){return e.map(r=>r*t)}function nE(e,t){return e.map(()=>t||gv).splice(0,e.length-1)}function ml({duration:e=300,keyframes:t,times:r,ease:o="easeInOut"}){const s=Gk(o)?o.map(eg):eg(o),l={done:!1,value:t[0]},u=tE(r&&r.length===t.length?r:eE(t),e),f=Zk(u,t,{ease:Array.isArray(s)?s:nE(t,s)});return{calculatedDuration:e,next:d=>(l.value=f(d),l.done=d>=e,l)}}const rE=e=>{const t=({timestamp:r})=>e(r);return{start:()=>ze.update(t,!0),stop:()=>dr(t),now:()=>st.isProcessing?st.timestamp:xn.now()}},iE={decay:Jm,inertia:Jm,tween:ml,keyframes:ml,spring:mv},oE=e=>e/100;class Md extends fv{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:d}=this.options;d&&d()};const{name:r,motionValue:o,element:s,keyframes:l}=this.options,u=(s==null?void 0:s.KeyframeResolver)||Td,f=(d,p)=>this.onKeyframesResolved(d,p);this.resolver=new u(l,f,r,o,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:l,velocity:u=0}=this.options,f=md(r)?r:iE[r]||ml;let d,p;f!==ml&&typeof t[0]!="number"&&(d=gs(oE,hv(t[0],t[1])),t=[0,100]);const g=f({...this.options,keyframes:t});l==="mirror"&&(p=f({...this.options,keyframes:[...t].reverse(),velocity:-u})),g.calculatedDuration===null&&(g.calculatedDuration=Dy(g));const{calculatedDuration:m}=g,v=m+s,x=v*(o+1)-s;return{generator:g,mirroredGenerator:p,mapPercentToKeyframes:d,calculatedDuration:m,resolvedDuration:v,totalDuration:x}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,r=!1){const{resolved:o}=this;if(!o){const{keyframes:F}=this.options;return{done:!0,value:F[F.length-1]}}const{finalKeyframe:s,generator:l,mirroredGenerator:u,mapPercentToKeyframes:f,keyframes:d,calculatedDuration:p,totalDuration:g,resolvedDuration:m}=o;if(this.startTime===null)return l.next(0);const{delay:v,repeat:x,repeatType:w,repeatDelay:_,onUpdate:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-g/this.speed,this.startTime)),r?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const E=this.currentTime-v*(this.speed>=0?1:-1),M=this.speed>=0?E<0:E>g;this.currentTime=Math.max(E,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=g);let k=this.currentTime,P=l;if(x){const F=Math.min(this.currentTime,g)/m;let K=Math.floor(F),J=F%1;!J&&F>=1&&(J=1),J===1&&K--,K=Math.min(K,x+1),!!(K%2)&&(w==="reverse"?(J=1-J,_&&(J-=_/m)):w==="mirror"&&(P=u)),k=Fn(0,1,J)*m}const R=M?{done:!1,value:d[0]}:P.next(k);f&&(R.value=f(R.value));let{done:D}=R;!M&&p!==null&&(D=this.speed>=0?this.currentTime>=g:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return O&&s!==void 0&&(R.value=Il(d,this.options,s)),C&&C(R.value),O&&this.finish(),R}get duration(){const{resolved:t}=this;return t?Vn(t.calculatedDuration):0}get time(){return Vn(this.currentTime)}set time(t){t=jn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Vn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=rE,onPlay:r,startTime:o}=this.options;this.driver||(this.driver=t(l=>this.tick(l))),r&&r();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const sE=new Set(["opacity","clipPath","filter","transform"]);function aE(e,t,r,{delay:o=0,duration:s=300,repeat:l=0,repeatType:u="loop",ease:f="easeInOut",times:d}={}){const p={[t]:r};d&&(p.offset=d);const g=jy(f,s);return Array.isArray(g)&&(p.easing=g),e.animate(p,{delay:o,duration:s,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:l+1,direction:u==="reverse"?"alternate":"normal"})}const lE=ed(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),gl=10,uE=2e4;function cE(e){return md(e.type)||e.type==="spring"||!Ly(e.ease)}function fE(e,t){const r=new Md({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:e[0]};const s=[];let l=0;for(;!o.done&&l<uE;)o=r.sample(l),s.push(o.value),l+=gl;return{times:void 0,keyframes:s,duration:l-gl,ease:"linear"}}const yv={anticipate:Yy,backInOut:Ky,circInOut:Qy};function dE(e){return e in yv}class tg extends fv{constructor(t){super(t);const{name:r,motionValue:o,element:s,keyframes:l}=this.options;this.resolver=new cv(l,(u,f)=>this.onKeyframesResolved(u,f),r,o,s),this.resolver.scheduleResolve()}initPlayback(t,r){let{duration:o=300,times:s,ease:l,type:u,motionValue:f,name:d,startTime:p}=this.options;if(!f.owner||!f.owner.current)return!1;if(typeof l=="string"&&hl()&&dE(l)&&(l=yv[l]),cE(this.options)){const{onComplete:m,onUpdate:v,motionValue:x,element:w,..._}=this.options,C=fE(t,_);t=C.keyframes,t.length===1&&(t[1]=t[0]),o=C.duration,s=C.times,l=C.ease,u="keyframes"}const g=aE(f.owner.current,d,t,{...this.options,duration:o,times:s,ease:l});return g.startTime=p??this.calcStartTime(),this.pendingTimeline?(Fm(g,this.pendingTimeline),this.pendingTimeline=void 0):g.onfinish=()=>{const{onComplete:m}=this.options;f.set(Il(t,this.options,r)),m&&m(),this.cancel(),this.resolveFinishedPromise()},{animation:g,duration:o,times:s,type:u,ease:l,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:r}=t;return Vn(r)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:r}=t;return Vn(r.currentTime||0)}set time(t){const{resolved:r}=this;if(!r)return;const{animation:o}=r;o.currentTime=jn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:r}=t;return r.playbackRate}set speed(t){const{resolved:r}=this;if(!r)return;const{animation:o}=r;o.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:r}=t;return r.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:r}=t;return r.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:r}=this;if(!r)return Lt;const{animation:o}=r;Fm(o,t)}return Lt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:r}=t;r.playState==="finished"&&this.updateFinishedPromise(),r.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:r}=t;r.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:r,keyframes:o,duration:s,type:l,ease:u,times:f}=t;if(r.playState==="idle"||r.playState==="finished")return;if(this.time){const{motionValue:p,onUpdate:g,onComplete:m,element:v,...x}=this.options,w=new Md({...x,keyframes:o,duration:s,type:l,ease:u,times:f,isGenerator:!0}),_=jn(this.time);p.setWithVelocity(w.sample(_-gl).value,w.sample(_).value,gl)}const{onStop:d}=this.options;d&&d(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:r,name:o,repeatDelay:s,repeatType:l,damping:u,type:f}=t;if(!r||!r.owner||!(r.owner.current instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:p}=r.owner.getProps();return lE()&&o&&sE.has(o)&&!d&&!p&&!s&&l!=="mirror"&&u!==0&&f!=="inertia"}}const hE={type:"spring",stiffness:500,damping:25,restSpeed:10},pE=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),mE={type:"keyframes",duration:.8},gE={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},yE=(e,{keyframes:t})=>t.length>2?mE:Yr.has(e)?e.startsWith("scale")?pE(t[1]):hE:gE;function vE({when:e,delay:t,delayChildren:r,staggerChildren:o,staggerDirection:s,repeat:l,repeatType:u,repeatDelay:f,from:d,elapsed:p,...g}){return!!Object.keys(g).length}const Nd=(e,t,r,o={},s,l)=>u=>{const f=pd(o,e)||{},d=f.delay||o.delay||0;let{elapsed:p=0}=o;p=p-jn(d);let g={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...f,delay:-p,onUpdate:v=>{t.set(v),f.onUpdate&&f.onUpdate(v)},onComplete:()=>{u(),f.onComplete&&f.onComplete()},name:e,motionValue:t,element:l?void 0:s};vE(f)||(g={...g,...yE(e,g)}),g.duration&&(g.duration=jn(g.duration)),g.repeatDelay&&(g.repeatDelay=jn(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let m=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(g.duration=0,g.delay===0&&(m=!0)),m&&!l&&t.get()!==void 0){const v=Il(g.keyframes,f);if(v!==void 0)return ze.update(()=>{g.onUpdate(v),g.onComplete()}),new V2([])}return!l&&tg.supports(g)?new tg(g):new Md(g)};function xE({protectedKeys:e,needsAnimating:t},r){const o=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,o}function vv(e,t,{delay:r=0,transitionOverride:o,type:s}={}){var l;let{transition:u=e.getDefaultTransition(),transitionEnd:f,...d}=t;o&&(u=o);const p=[],g=s&&e.animationState&&e.animationState.getState()[s];for(const m in d){const v=e.getValue(m,(l=e.latestValues[m])!==null&&l!==void 0?l:null),x=d[m];if(x===void 0||g&&xE(g,m))continue;const w={delay:r,...pd(u||{},m)};let _=!1;if(window.MotionHandoffAnimation){const E=$y(e);if(E){const M=window.MotionHandoffAnimation(E,m,ze);M!==null&&(w.startTime=M,_=!0)}}kf(e,m),v.start(Nd(m,v,x,e.shouldReduceMotion&&By.has(m)?{type:!1}:w,e,_));const C=v.animation;C&&p.push(C)}return f&&Promise.all(p).then(()=>{ze.update(()=>{f&&q2(e,f)})}),p}function Nf(e,t,r={}){var o;const s=Dl(e,t,r.type==="exit"?(o=e.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:l=e.getDefaultTransition()||{}}=s||{};r.transitionOverride&&(l=r.transitionOverride);const u=s?()=>Promise.all(vv(e,s,r)):()=>Promise.resolve(),f=e.variantChildren&&e.variantChildren.size?(p=0)=>{const{delayChildren:g=0,staggerChildren:m,staggerDirection:v}=l;return wE(e,t,g+p,m,v,r)}:()=>Promise.resolve(),{when:d}=l;if(d){const[p,g]=d==="beforeChildren"?[u,f]:[f,u];return p().then(()=>g())}else return Promise.all([u(),f(r.delay)])}function wE(e,t,r=0,o=0,s=1,l){const u=[],f=(e.variantChildren.size-1)*o,d=s===1?(p=0)=>p*o:(p=0)=>f-p*o;return Array.from(e.variantChildren).sort(SE).forEach((p,g)=>{p.notify("AnimationStart",t),u.push(Nf(p,t,{...l,delay:r+d(g)}).then(()=>p.notify("AnimationComplete",t)))}),Promise.all(u)}function SE(e,t){return e.sortNodePosition(t)}function kE(e,t,r={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const s=t.map(l=>Nf(e,l,r));o=Promise.all(s)}else if(typeof t=="string")o=Nf(e,t,r);else{const s=typeof t=="function"?Dl(e,t,r.custom):t;o=Promise.all(vv(e,s,r))}return o.then(()=>{e.notify("AnimationComplete",t)})}const EE=nd.length;function xv(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?xv(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<EE;r++){const o=nd[r],s=e.props[o];(Jo(s)||s===!1)&&(t[o]=s)}return t}const CE=[...td].reverse(),_E=td.length;function TE(e){return t=>Promise.all(t.map(({animation:r,options:o})=>kE(e,r,o)))}function PE(e){let t=TE(e),r=ng(),o=!0;const s=d=>(p,g)=>{var m;const v=Dl(e,g,d==="exit"?(m=e.presenceContext)===null||m===void 0?void 0:m.custom:void 0);if(v){const{transition:x,transitionEnd:w,..._}=v;p={...p,..._,...w}}return p};function l(d){t=d(e)}function u(d){const{props:p}=e,g=xv(e.parent)||{},m=[],v=new Set;let x={},w=1/0;for(let C=0;C<_E;C++){const E=CE[C],M=r[E],k=p[E]!==void 0?p[E]:g[E],P=Jo(k),R=E===d?M.isActive:null;R===!1&&(w=C);let D=k===g[E]&&k!==p[E]&&P;if(D&&o&&e.manuallyAnimateOnMount&&(D=!1),M.protectedKeys={...x},!M.isActive&&R===null||!k&&!M.prevProp||bl(k)||typeof k=="boolean")continue;const O=ME(M.prevProp,k);let F=O||E===d&&M.isActive&&!D&&P||C>w&&P,K=!1;const J=Array.isArray(k)?k:[k];let q=J.reduce(s(E),{});R===!1&&(q={});const{prevResolvedValues:ee={}}=M,Z={...ee,...q},A=$=>{F=!0,v.has($)&&(K=!0,v.delete($)),M.needsAnimating[$]=!0;const I=e.getValue($);I&&(I.liveStyle=!1)};for(const $ in Z){const I=q[$],z=ee[$];if(x.hasOwnProperty($))continue;let U=!1;xf(I)&&xf(z)?U=!Ry(I,z):U=I!==z,U?I!=null?A($):v.add($):I!==void 0&&v.has($)?A($):M.protectedKeys[$]=!0}M.prevProp=k,M.prevResolvedValues=q,M.isActive&&(x={...x,...q}),o&&e.blockInitialAnimation&&(F=!1),F&&(!(D&&O)||K)&&m.push(...J.map($=>({animation:$,options:{type:E}})))}if(v.size){const C={};v.forEach(E=>{const M=e.getBaseTarget(E),k=e.getValue(E);k&&(k.liveStyle=!0),C[E]=M??null}),m.push({animation:C})}let _=!!m.length;return o&&(p.initial===!1||p.initial===p.animate)&&!e.manuallyAnimateOnMount&&(_=!1),o=!1,_?t(m):Promise.resolve()}function f(d,p){var g;if(r[d].isActive===p)return Promise.resolve();(g=e.variantChildren)===null||g===void 0||g.forEach(v=>{var x;return(x=v.animationState)===null||x===void 0?void 0:x.setActive(d,p)}),r[d].isActive=p;const m=u(d);for(const v in r)r[v].protectedKeys={};return m}return{animateChanges:u,setActive:f,setAnimateFunction:l,getState:()=>r,reset:()=>{r=ng(),o=!0}}}function ME(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ry(t,e):!1}function Ir(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ng(){return{animate:Ir(!0),whileInView:Ir(),whileHover:Ir(),whileTap:Ir(),whileDrag:Ir(),whileFocus:Ir(),exit:Ir()}}class pr{constructor(t){this.isMounted=!1,this.node=t}update(){}}class NE extends pr{constructor(t){super(t),t.animationState||(t.animationState=PE(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();bl(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let AE=0;class bE extends pr{constructor(){super(...arguments),this.id=AE++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const s=this.node.animationState.setActive("exit",!t);r&&!t&&s.then(()=>r(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const RE={animation:{Feature:NE},exit:{Feature:bE}};function rs(e,t,r,o={passive:!0}){return e.addEventListener(t,r,o),()=>e.removeEventListener(t,r)}function ys(e){return{point:{x:e.pageX,y:e.pageY}}}const DE=e=>t=>yd(t)&&e(t,ys(t));function Yo(e,t,r,o){return rs(e,t,DE(r),o)}const rg=(e,t)=>Math.abs(e-t);function IE(e,t){const r=rg(e.x,t.x),o=rg(e.y,t.y);return Math.sqrt(r**2+o**2)}class wv{constructor(t,r,{transformPagePoint:o,contextWindow:s,dragSnapToOrigin:l=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Zc(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,x=IE(m.offset,{x:0,y:0})>=3;if(!v&&!x)return;const{point:w}=m,{timestamp:_}=st;this.history.push({...w,timestamp:_});const{onStart:C,onMove:E}=this.handlers;v||(C&&C(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),E&&E(this.lastMoveEvent,m)},this.handlePointerMove=(m,v)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=qc(v,this.transformPagePoint),ze.update(this.updatePoint,!0)},this.handlePointerUp=(m,v)=>{this.end();const{onEnd:x,onSessionEnd:w,resumeAnimation:_}=this.handlers;if(this.dragSnapToOrigin&&_&&_(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const C=Zc(m.type==="pointercancel"?this.lastMoveEventInfo:qc(v,this.transformPagePoint),this.history);this.startEvent&&x&&x(m,C),w&&w(m,C)},!yd(t))return;this.dragSnapToOrigin=l,this.handlers=r,this.transformPagePoint=o,this.contextWindow=s||window;const u=ys(t),f=qc(u,this.transformPagePoint),{point:d}=f,{timestamp:p}=st;this.history=[{...d,timestamp:p}];const{onSessionStart:g}=r;g&&g(t,Zc(f,this.history)),this.removeListeners=gs(Yo(this.contextWindow,"pointermove",this.handlePointerMove),Yo(this.contextWindow,"pointerup",this.handlePointerUp),Yo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),dr(this.updatePoint)}}function qc(e,t){return t?{point:t(e.point)}:e}function ig(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Zc({point:e},t){return{point:e,delta:ig(e,Sv(t)),offset:ig(e,LE(t)),velocity:jE(t,.1)}}function LE(e){return e[0]}function Sv(e){return e[e.length-1]}function jE(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,o=null;const s=Sv(e);for(;r>=0&&(o=e[r],!(s.timestamp-o.timestamp>jn(t)));)r--;if(!o)return{x:0,y:0};const l=Vn(s.timestamp-o.timestamp);if(l===0)return{x:0,y:0};const u={x:(s.x-o.x)/l,y:(s.y-o.y)/l};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}const kv=1e-4,VE=1-kv,zE=1+kv,Ev=.01,FE=0-Ev,BE=0+Ev;function jt(e){return e.max-e.min}function OE(e,t,r){return Math.abs(e-t)<=r}function og(e,t,r,o=.5){e.origin=o,e.originPoint=Ue(t.min,t.max,e.origin),e.scale=jt(r)/jt(t),e.translate=Ue(r.min,r.max,e.origin)-e.originPoint,(e.scale>=VE&&e.scale<=zE||isNaN(e.scale))&&(e.scale=1),(e.translate>=FE&&e.translate<=BE||isNaN(e.translate))&&(e.translate=0)}function Go(e,t,r,o){og(e.x,t.x,r.x,o?o.originX:void 0),og(e.y,t.y,r.y,o?o.originY:void 0)}function sg(e,t,r){e.min=r.min+t.min,e.max=e.min+jt(t)}function $E(e,t,r){sg(e.x,t.x,r.x),sg(e.y,t.y,r.y)}function ag(e,t,r){e.min=t.min-r.min,e.max=e.min+jt(t)}function Qo(e,t,r){ag(e.x,t.x,r.x),ag(e.y,t.y,r.y)}function HE(e,{min:t,max:r},o){return t!==void 0&&e<t?e=o?Ue(t,e,o.min):Math.max(e,t):r!==void 0&&e>r&&(e=o?Ue(r,e,o.max):Math.min(e,r)),e}function lg(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function UE(e,{top:t,left:r,bottom:o,right:s}){return{x:lg(e.x,r,s),y:lg(e.y,t,o)}}function ug(e,t){let r=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,o]=[o,r]),{min:r,max:o}}function WE(e,t){return{x:ug(e.x,t.x),y:ug(e.y,t.y)}}function XE(e,t){let r=.5;const o=jt(e),s=jt(t);return s>o?r=Li(t.min,t.max-o,e.min):o>s&&(r=Li(e.min,e.max-s,t.min)),Fn(0,1,r)}function KE(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const Af=.35;function YE(e=Af){return e===!1?e=0:e===!0&&(e=Af),{x:cg(e,"left","right"),y:cg(e,"top","bottom")}}function cg(e,t,r){return{min:fg(e,t),max:fg(e,r)}}function fg(e,t){return typeof e=="number"?e:e[t]||0}const dg=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mi=()=>({x:dg(),y:dg()}),hg=()=>({min:0,max:0}),Ge=()=>({x:hg(),y:hg()});function Kt(e){return[e("x"),e("y")]}function Cv({top:e,left:t,right:r,bottom:o}){return{x:{min:t,max:r},y:{min:e,max:o}}}function GE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function QE(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:o.y,right:o.x}}function Jc(e){return e===void 0||e===1}function bf({scale:e,scaleX:t,scaleY:r}){return!Jc(e)||!Jc(t)||!Jc(r)}function Lr(e){return bf(e)||_v(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function _v(e){return pg(e.x)||pg(e.y)}function pg(e){return e&&e!=="0%"}function yl(e,t,r){const o=e-r,s=t*o;return r+s}function mg(e,t,r,o,s){return s!==void 0&&(e=yl(e,s,o)),yl(e,r,o)+t}function Rf(e,t=0,r=1,o,s){e.min=mg(e.min,t,r,o,s),e.max=mg(e.max,t,r,o,s)}function Tv(e,{x:t,y:r}){Rf(e.x,t.translate,t.scale,t.originPoint),Rf(e.y,r.translate,r.scale,r.originPoint)}const gg=.999999999999,yg=1.0000000000001;function qE(e,t,r,o=!1){const s=r.length;if(!s)return;t.x=t.y=1;let l,u;for(let f=0;f<s;f++){l=r[f],u=l.projectionDelta;const{visualElement:d}=l.options;d&&d.props.style&&d.props.style.display==="contents"||(o&&l.options.layoutScroll&&l.scroll&&l!==l.root&&Ai(e,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),u&&(t.x*=u.x.scale,t.y*=u.y.scale,Tv(e,u)),o&&Lr(l.latestValues)&&Ai(e,l.latestValues))}t.x<yg&&t.x>gg&&(t.x=1),t.y<yg&&t.y>gg&&(t.y=1)}function Ni(e,t){e.min=e.min+t,e.max=e.max+t}function vg(e,t,r,o,s=.5){const l=Ue(e.min,e.max,s);Rf(e,t,r,l,o)}function Ai(e,t){vg(e.x,t.x,t.scaleX,t.scale,t.originX),vg(e.y,t.y,t.scaleY,t.scale,t.originY)}function Pv(e,t){return Cv(QE(e.getBoundingClientRect(),t))}function ZE(e,t,r){const o=Pv(e,r),{scroll:s}=t;return s&&(Ni(o.x,s.offset.x),Ni(o.y,s.offset.y)),o}const Mv=({current:e})=>e?e.ownerDocument.defaultView:null,JE=new WeakMap;class eC{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ge(),this.visualElement=t}start(t,{snapToCursor:r=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const s=g=>{const{dragSnapToOrigin:m}=this.getProps();m?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(ys(g).point)},l=(g,m)=>{const{drag:v,dragPropagation:x,onDragStart:w}=this.getProps();if(v&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=X2(v),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Kt(C=>{let E=this.getAxisMotionValue(C).get()||0;if(vn.test(E)){const{projection:M}=this.visualElement;if(M&&M.layout){const k=M.layout.layoutBox[C];k&&(E=jt(k)*(parseFloat(E)/100))}}this.originPoint[C]=E}),w&&ze.postRender(()=>w(g,m)),kf(this.visualElement,"transform");const{animationState:_}=this.visualElement;_&&_.setActive("whileDrag",!0)},u=(g,m)=>{const{dragPropagation:v,dragDirectionLock:x,onDirectionLock:w,onDrag:_}=this.getProps();if(!v&&!this.openDragLock)return;const{offset:C}=m;if(x&&this.currentDirection===null){this.currentDirection=tC(C),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",m.point,C),this.updateAxis("y",m.point,C),this.visualElement.render(),_&&_(g,m)},f=(g,m)=>this.stop(g,m),d=()=>Kt(g=>{var m;return this.getAnimationState(g)==="paused"&&((m=this.getAxisMotionValue(g).animation)===null||m===void 0?void 0:m.play())}),{dragSnapToOrigin:p}=this.getProps();this.panSession=new wv(t,{onSessionStart:s,onStart:l,onMove:u,onSessionEnd:f,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,contextWindow:Mv(this.visualElement)})}stop(t,r){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:l}=this.getProps();l&&ze.postRender(()=>l(t,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,o){const{drag:s}=this.getProps();if(!o||!Wa(t,s,this.currentDirection))return;const l=this.getAxisMotionValue(t);let u=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(u=HE(u,this.constraints[t],this.elastic[t])),l.set(u)}resolveConstraints(){var t;const{dragConstraints:r,dragElastic:o}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,l=this.constraints;r&&Ti(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&s?this.constraints=UE(s.layoutBox,r):this.constraints=!1,this.elastic=YE(o),l!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Kt(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=KE(s.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Ti(t))return!1;const o=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const l=ZE(o,s.root,this.visualElement.getTransformPagePoint());let u=WE(s.layout.layoutBox,l);if(r){const f=r(GE(u));this.hasMutatedConstraints=!!f,f&&(u=Cv(f))}return u}startAnimation(t){const{drag:r,dragMomentum:o,dragElastic:s,dragTransition:l,dragSnapToOrigin:u,onDragTransitionEnd:f}=this.getProps(),d=this.constraints||{},p=Kt(g=>{if(!Wa(g,r,this.currentDirection))return;let m=d&&d[g]||{};u&&(m={min:0,max:0});const v=s?200:1e6,x=s?40:1e7,w={type:"inertia",velocity:o?t[g]:0,bounceStiffness:v,bounceDamping:x,timeConstant:750,restDelta:1,restSpeed:10,...l,...m};return this.startAxisValueAnimation(g,w)});return Promise.all(p).then(f)}startAxisValueAnimation(t,r){const o=this.getAxisMotionValue(t);return kf(this.visualElement,t),o.start(Nd(t,o,0,r,this.visualElement,!1))}stopAnimation(){Kt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Kt(t=>{var r;return(r=this.getAxisMotionValue(t).animation)===null||r===void 0?void 0:r.pause()})}getAnimationState(t){var r;return(r=this.getAxisMotionValue(t).animation)===null||r===void 0?void 0:r.state}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),s=o[r];return s||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){Kt(r=>{const{drag:o}=this.getProps();if(!Wa(r,o,this.currentDirection))return;const{projection:s}=this.visualElement,l=this.getAxisMotionValue(r);if(s&&s.layout){const{min:u,max:f}=s.layout.layoutBox[r];l.set(t[r]-Ue(u,f,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:o}=this.visualElement;if(!Ti(r)||!o||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Kt(u=>{const f=this.getAxisMotionValue(u);if(f&&this.constraints!==!1){const d=f.get();s[u]=XE({min:d,max:d},this.constraints[u])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),Kt(u=>{if(!Wa(u,t,null))return;const f=this.getAxisMotionValue(u),{min:d,max:p}=this.constraints[u];f.set(Ue(d,p,s[u]))})}addListeners(){if(!this.visualElement.current)return;JE.set(this.visualElement,this);const t=this.visualElement.current,r=Yo(t,"pointerdown",d=>{const{drag:p,dragListener:g=!0}=this.getProps();p&&g&&this.start(d)}),o=()=>{const{dragConstraints:d}=this.getProps();Ti(d)&&d.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,l=s.addEventListener("measure",o);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),ze.read(o);const u=rs(window,"resize",()=>this.scalePositionWithinConstraints()),f=s.addEventListener("didUpdate",(({delta:d,hasLayoutChanged:p})=>{this.isDragging&&p&&(Kt(g=>{const m=this.getAxisMotionValue(g);m&&(this.originPoint[g]+=d[g].translate,m.set(m.get()+d[g].translate))}),this.visualElement.render())}));return()=>{u(),r(),l(),f&&f()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:o=!1,dragPropagation:s=!1,dragConstraints:l=!1,dragElastic:u=Af,dragMomentum:f=!0}=t;return{...t,drag:r,dragDirectionLock:o,dragPropagation:s,dragConstraints:l,dragElastic:u,dragMomentum:f}}}function Wa(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function tC(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class nC extends pr{constructor(t){super(t),this.removeGroupControls=Lt,this.removeListeners=Lt,this.controls=new eC(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Lt}unmount(){this.removeGroupControls(),this.removeListeners()}}const xg=e=>(t,r)=>{e&&ze.postRender(()=>e(t,r))};class rC extends pr{constructor(){super(...arguments),this.removePointerDownListener=Lt}onPointerDown(t){this.session=new wv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Mv(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:o,onPanEnd:s}=this.node.getProps();return{onSessionStart:xg(t),onStart:xg(r),onMove:o,onEnd:(l,u)=>{delete this.session,s&&ze.postRender(()=>s(l,u))}}}mount(){this.removePointerDownListener=Yo(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const il={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function wg(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const zo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ee.test(e))e=parseFloat(e);else return e;const r=wg(e,t.target.x),o=wg(e,t.target.y);return`${r}% ${o}%`}},iC={correct:(e,{treeScale:t,projectionDelta:r})=>{const o=e,s=hr.parse(e);if(s.length>5)return o;const l=hr.createTransformer(e),u=typeof s[0]!="number"?1:0,f=r.x.scale*t.x,d=r.y.scale*t.y;s[0+u]/=f,s[1+u]/=d;const p=Ue(f,d,.5);return typeof s[2+u]=="number"&&(s[2+u]/=p),typeof s[3+u]=="number"&&(s[3+u]/=p),l(s)}};class oC extends L.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:o,layoutId:s}=this.props,{projection:l}=t;_2(sC),l&&(r.group&&r.group.add(l),o&&o.register&&s&&o.register(l),l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,onExitComplete:()=>this.safeToRemove()})),il.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:o,drag:s,isPresent:l}=this.props,u=o.projection;return u&&(u.isPresent=l,s||t.layoutDependency!==r||r===void 0?u.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?u.promote():u.relegate()||ze.postRender(()=>{const f=u.getStack();(!f||!f.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),id.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:o}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(s),o&&o.deregister&&o.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Nv(e){const[t,r]=fy(),o=L.useContext(Qf);return T.jsx(oC,{...e,layoutGroup:o,switchLayoutGroup:L.useContext(xy),isPresent:t,safeToRemove:r})}const sC={borderRadius:{...zo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:zo,borderTopRightRadius:zo,borderBottomLeftRadius:zo,borderBottomRightRadius:zo,boxShadow:iC};function aC(e,t,r){const o=pt(e)?e:ts(e);return o.start(Nd("",o,t,r)),o.animation}function lC(e){return e instanceof SVGElement&&e.tagName!=="svg"}const uC=(e,t)=>e.depth-t.depth;class cC{constructor(){this.children=[],this.isDirty=!1}add(t){vd(this.children,t),this.isDirty=!0}remove(t){xd(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(uC),this.isDirty=!1,this.children.forEach(t)}}function fC(e,t){const r=xn.now(),o=({timestamp:s})=>{const l=s-r;l>=t&&(dr(o),e(l-t))};return ze.read(o,!0),()=>dr(o)}const Av=["TopLeft","TopRight","BottomLeft","BottomRight"],dC=Av.length,Sg=e=>typeof e=="string"?parseFloat(e):e,kg=e=>typeof e=="number"||Ee.test(e);function hC(e,t,r,o,s,l){s?(e.opacity=Ue(0,r.opacity!==void 0?r.opacity:1,pC(o)),e.opacityExit=Ue(t.opacity!==void 0?t.opacity:1,0,mC(o))):l&&(e.opacity=Ue(t.opacity!==void 0?t.opacity:1,r.opacity!==void 0?r.opacity:1,o));for(let u=0;u<dC;u++){const f=`border${Av[u]}Radius`;let d=Eg(t,f),p=Eg(r,f);if(d===void 0&&p===void 0)continue;d||(d=0),p||(p=0),d===0||p===0||kg(d)===kg(p)?(e[f]=Math.max(Ue(Sg(d),Sg(p),o),0),(vn.test(p)||vn.test(d))&&(e[f]+="%")):e[f]=p}(t.rotate||r.rotate)&&(e.rotate=Ue(t.rotate||0,r.rotate||0,o))}function Eg(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const pC=bv(0,.5,Gy),mC=bv(.5,.95,Lt);function bv(e,t,r){return o=>o<e?0:o>t?1:r(Li(e,t,o))}function Cg(e,t){e.min=t.min,e.max=t.max}function Xt(e,t){Cg(e.x,t.x),Cg(e.y,t.y)}function _g(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Tg(e,t,r,o,s){return e-=t,e=yl(e,1/r,o),s!==void 0&&(e=yl(e,1/s,o)),e}function gC(e,t=0,r=1,o=.5,s,l=e,u=e){if(vn.test(t)&&(t=parseFloat(t),t=Ue(u.min,u.max,t/100)-u.min),typeof t!="number")return;let f=Ue(l.min,l.max,o);e===l&&(f-=t),e.min=Tg(e.min,t,r,f,s),e.max=Tg(e.max,t,r,f,s)}function Pg(e,t,[r,o,s],l,u){gC(e,t[r],t[o],t[s],t.scale,l,u)}const yC=["x","scaleX","originX"],vC=["y","scaleY","originY"];function Mg(e,t,r,o){Pg(e.x,t,yC,r?r.x:void 0,o?o.x:void 0),Pg(e.y,t,vC,r?r.y:void 0,o?o.y:void 0)}function Ng(e){return e.translate===0&&e.scale===1}function Rv(e){return Ng(e.x)&&Ng(e.y)}function Ag(e,t){return e.min===t.min&&e.max===t.max}function xC(e,t){return Ag(e.x,t.x)&&Ag(e.y,t.y)}function bg(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Dv(e,t){return bg(e.x,t.x)&&bg(e.y,t.y)}function Rg(e){return jt(e.x)/jt(e.y)}function Dg(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class wC{constructor(){this.members=[]}add(t){vd(this.members,t),t.scheduleRender()}remove(t){if(xd(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(s=>t===s);if(r===0)return!1;let o;for(let s=r;s>=0;s--){const l=this.members[s];if(l.isPresent!==!1){o=l;break}}return o?(this.promote(o),!0):!1}promote(t,r){const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,r&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:o}=t;r.onExitComplete&&r.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function SC(e,t,r){let o="";const s=e.x.translate/t.x,l=e.y.translate/t.y,u=(r==null?void 0:r.z)||0;if((s||l||u)&&(o=`translate3d(${s}px, ${l}px, ${u}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:p,rotate:g,rotateX:m,rotateY:v,skewX:x,skewY:w}=r;p&&(o=`perspective(${p}px) ${o}`),g&&(o+=`rotate(${g}deg) `),m&&(o+=`rotateX(${m}deg) `),v&&(o+=`rotateY(${v}deg) `),x&&(o+=`skewX(${x}deg) `),w&&(o+=`skewY(${w}deg) `)}const f=e.x.scale*t.x,d=e.y.scale*t.y;return(f!==1||d!==1)&&(o+=`scale(${f}, ${d})`),o||"none"}const jr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Uo=typeof window<"u"&&window.MotionDebug!==void 0,ef=["","X","Y","Z"],kC={visibility:"hidden"},Ig=1e3;let EC=0;function tf(e,t,r,o){const{latestValues:s}=t;s[e]&&(r[e]=s[e],t.setStaticValue(e,0),o&&(o[e]=0))}function Iv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=$y(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:s,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",ze,!(s||l))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&Iv(o)}function Lv({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:o,resetTransform:s}){return class{constructor(u={},f=t==null?void 0:t()){this.id=EC++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Uo&&(jr.totalNodes=jr.resolvedTargetDeltas=jr.recalculatedProjection=0),this.nodes.forEach(TC),this.nodes.forEach(bC),this.nodes.forEach(RC),this.nodes.forEach(PC),Uo&&window.MotionDebug.record(jr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new cC)}addEventListener(u,f){return this.eventHandlers.has(u)||this.eventHandlers.set(u,new wd),this.eventHandlers.get(u).add(f)}notifyListeners(u,...f){const d=this.eventHandlers.get(u);d&&d.notify(...f)}hasListeners(u){return this.eventHandlers.has(u)}mount(u,f=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=lC(u),this.instance=u;const{layoutId:d,layout:p,visualElement:g}=this.options;if(g&&!g.current&&g.mount(u),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),f&&(p||d)&&(this.isLayoutDirty=!0),e){let m;const v=()=>this.root.updateBlockedByResize=!1;e(u,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=fC(v,250),il.hasAnimatedSinceResize&&(il.hasAnimatedSinceResize=!1,this.nodes.forEach(jg))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&g&&(d||p)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:x,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const _=this.options.transition||g.getDefaultTransition()||VC,{onLayoutAnimationStart:C,onLayoutAnimationComplete:E}=g.getProps(),M=!this.targetLayout||!Dv(this.targetLayout,w)||x,k=!v&&x;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||k||v&&(M||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,k);const P={...pd(_,"layout"),onPlay:C,onComplete:E};(g.shouldReduceMotion||this.options.layoutRoot)&&(P.delay=0,P.type=!1),this.startAnimation(P)}else v||jg(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,dr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(DC),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Iv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g<this.path.length;g++){const m=this.path[g];m.shouldResetTransform=!0,m.updateScroll("snapshot"),m.options.layoutRoot&&m.willUpdate(!1)}const{layoutId:f,layout:d}=this.options;if(f===void 0&&!d)return;const p=this.getTransformTemplate();this.prevTransformTemplateValue=p?p(this.latestValues,""):void 0,this.updateSnapshot(),u&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Lg);return}this.isUpdating||this.nodes.forEach(NC),this.isUpdating=!1,this.nodes.forEach(AC),this.nodes.forEach(CC),this.nodes.forEach(_C),this.clearAllSnapshots();const f=xn.now();st.delta=Fn(0,1e3/60,f-st.timestamp),st.timestamp=f,st.isProcessing=!0,Wc.update.process(st),Wc.preRender.process(st),Wc.render.process(st),st.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,id.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(MC),this.sharedNodes.forEach(IC)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ze.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ze.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let d=0;d<this.path.length;d++)this.path[d].updateScroll();const u=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ge(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:f}=this.options;f&&f.notify("LayoutMeasure",this.layout.layoutBox,u?u.layoutBox:void 0)}updateScroll(u="measure"){let f=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===u&&(f=!1),f){const d=o(this.instance);this.scroll={animationId:this.root.animationId,phase:u,isRoot:d,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!s)return;const u=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,f=this.projectionDelta&&!Rv(this.projectionDelta),d=this.getTransformTemplate(),p=d?d(this.latestValues,""):void 0,g=p!==this.prevTransformTemplateValue;u&&(f||Lr(this.latestValues)||g)&&(s(this.instance,p),this.shouldResetTransform=!1,this.scheduleRender())}measure(u=!0){const f=this.measurePageBox();let d=this.removeElementScroll(f);return u&&(d=this.removeTransform(d)),zC(d),{animationId:this.root.animationId,measuredBox:f,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:f}=this.options;if(!f)return Ge();const d=f.measureViewportBox();if(!(((u=this.scroll)===null||u===void 0?void 0:u.wasRoot)||this.path.some(FC))){const{scroll:g}=this.root;g&&(Ni(d.x,g.offset.x),Ni(d.y,g.offset.y))}return d}removeElementScroll(u){var f;const d=Ge();if(Xt(d,u),!((f=this.scroll)===null||f===void 0)&&f.wasRoot)return d;for(let p=0;p<this.path.length;p++){const g=this.path[p],{scroll:m,options:v}=g;g!==this.root&&m&&v.layoutScroll&&(m.wasRoot&&Xt(d,u),Ni(d.x,m.offset.x),Ni(d.y,m.offset.y))}return d}applyTransform(u,f=!1){const d=Ge();Xt(d,u);for(let p=0;p<this.path.length;p++){const g=this.path[p];!f&&g.options.layoutScroll&&g.scroll&&g!==g.root&&Ai(d,{x:-g.scroll.offset.x,y:-g.scroll.offset.y}),Lr(g.latestValues)&&Ai(d,g.latestValues)}return Lr(this.latestValues)&&Ai(d,this.latestValues),d}removeTransform(u){const f=Ge();Xt(f,u);for(let d=0;d<this.path.length;d++){const p=this.path[d];if(!p.instance||!Lr(p.latestValues))continue;bf(p.latestValues)&&p.updateSnapshot();const g=Ge(),m=p.measurePageBox();Xt(g,m),Mg(f,p.latestValues,p.snapshot?p.snapshot.layoutBox:void 0,g)}return Lr(this.latestValues)&&Mg(f,this.latestValues),f}setTargetDelta(u){this.targetDelta=u,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(u){this.options={...this.options,...u,crossfade:u.crossfade!==void 0?u.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==st.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(u=!1){var f;const d=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=d.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=d.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=d.isSharedProjectionDirty);const p=!!this.resumingFrom||this!==d;if(!(u||p&&this.isSharedProjectionDirty||this.isProjectionDirty||!((f=this.parent)===null||f===void 0)&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:v}=this.options;if(!(!this.layout||!(m||v))){if(this.resolvedRelativeTargetAt=st.timestamp,!this.targetDelta&&!this.relativeTarget){const x=this.getClosestProjectingParent();x&&x.layout&&this.animationProgress!==1?(this.relativeParent=x,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ge(),this.relativeTargetOrigin=Ge(),Qo(this.relativeTargetOrigin,this.layout.layoutBox,x.layout.layoutBox),Xt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Ge(),this.targetWithTransforms=Ge()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),$E(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Xt(this.target,this.layout.layoutBox),Tv(this.target,this.targetDelta)):Xt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const x=this.getClosestProjectingParent();x&&!!x.resumingFrom==!!this.resumingFrom&&!x.options.layoutScroll&&x.target&&this.animationProgress!==1?(this.relativeParent=x,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ge(),this.relativeTargetOrigin=Ge(),Qo(this.relativeTargetOrigin,this.target,x.target),Xt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Uo&&jr.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||bf(this.parent.latestValues)||_v(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var u;const f=this.getLead(),d=!!this.resumingFrom||this!==f;let p=!0;if((this.isProjectionDirty||!((u=this.parent)===null||u===void 0)&&u.isProjectionDirty)&&(p=!1),d&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(p=!1),this.resolvedRelativeTargetAt===st.timestamp&&(p=!1),p)return;const{layout:g,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(g||m))return;Xt(this.layoutCorrected,this.layout.layoutBox);const v=this.treeScale.x,x=this.treeScale.y;qE(this.layoutCorrected,this.treeScale,this.path,d),f.layout&&!f.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(f.target=f.layout.layoutBox,f.targetWithTransforms=Ge());const{target:w}=f;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(_g(this.prevProjectionDelta.x,this.projectionDelta.x),_g(this.prevProjectionDelta.y,this.projectionDelta.y)),Go(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==v||this.treeScale.y!==x||!Dg(this.projectionDelta.x,this.prevProjectionDelta.x)||!Dg(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w)),Uo&&jr.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(u=!0){var f;if((f=this.options.visualElement)===null||f===void 0||f.scheduleRender(),u){const d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Mi(),this.projectionDelta=Mi(),this.projectionDeltaWithTransform=Mi()}setAnimationOrigin(u,f=!1){const d=this.snapshot,p=d?d.latestValues:{},g={...this.latestValues},m=Mi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!f;const v=Ge(),x=d?d.source:void 0,w=this.layout?this.layout.source:void 0,_=x!==w,C=this.getStack(),E=!C||C.members.length<=1,M=!!(_&&!E&&this.options.crossfade===!0&&!this.path.some(jC));this.animationProgress=0;let k;this.mixTargetDelta=P=>{const R=P/1e3;Vg(m.x,u.x,R),Vg(m.y,u.y,R),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Qo(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),LC(this.relativeTarget,this.relativeTargetOrigin,v,R),k&&xC(this.relativeTarget,k)&&(this.isProjectionDirty=!1),k||(k=Ge()),Xt(k,this.relativeTarget)),_&&(this.animationValues=g,hC(g,p,this.latestValues,R,M,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=R},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(dr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ze.update(()=>{il.hasAnimatedSinceResize=!0,this.currentAnimation=aC(0,Ig,{...u,onUpdate:f=>{this.mixTargetDelta(f),u.onUpdate&&u.onUpdate(f)},onComplete:()=>{u.onComplete&&u.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ig),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead();let{targetWithTransforms:f,target:d,layout:p,latestValues:g}=u;if(!(!f||!d||!p)){if(this!==u&&this.layout&&p&&jv(this.options.animationType,this.layout.layoutBox,p.layoutBox)){d=this.target||Ge();const m=jt(this.layout.layoutBox.x);d.x.min=u.target.x.min,d.x.max=d.x.min+m;const v=jt(this.layout.layoutBox.y);d.y.min=u.target.y.min,d.y.max=d.y.min+v}Xt(f,d),Ai(f,g),Go(this.projectionDeltaWithTransform,this.layoutCorrected,f,g)}}registerSharedNode(u,f){this.sharedNodes.has(u)||this.sharedNodes.set(u,new wC),this.sharedNodes.get(u).add(f);const p=f.options.initialPromotionConfig;f.promote({transition:p?p.transition:void 0,preserveFollowOpacity:p&&p.shouldPreserveFollowOpacity?p.shouldPreserveFollowOpacity(f):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){var u;const{layoutId:f}=this.options;return f?((u=this.getStack())===null||u===void 0?void 0:u.lead)||this:this}getPrevLead(){var u;const{layoutId:f}=this.options;return f?(u=this.getStack())===null||u===void 0?void 0:u.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:f,preserveFollowOpacity:d}={}){const p=this.getStack();p&&p.promote(this,d),u&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let f=!1;const{latestValues:d}=u;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(f=!0),!f)return;const p={};d.z&&tf("z",u,p,this.animationValues);for(let g=0;g<ef.length;g++)tf(`rotate${ef[g]}`,u,p,this.animationValues),tf(`skew${ef[g]}`,u,p,this.animationValues);u.render();for(const g in p)u.setStaticValue(g,p[g]),this.animationValues&&(this.animationValues[g]=p[g]);u.scheduleRender()}getProjectionStyles(u){var f,d;if(!this.instance||this.isSVG)return;if(!this.isVisible)return kC;const p={visibility:""},g=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,p.opacity="",p.pointerEvents=nl(u==null?void 0:u.pointerEvents)||"",p.transform=g?g(this.latestValues,""):"none",p;const m=this.getLead();if(!this.projectionDelta||!this.layout||!m.target){const _={};return this.options.layoutId&&(_.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,_.pointerEvents=nl(u==null?void 0:u.pointerEvents)||""),this.hasProjected&&!Lr(this.latestValues)&&(_.transform=g?g({},""):"none",this.hasProjected=!1),_}const v=m.animationValues||m.latestValues;this.applyTransformsToTarget(),p.transform=SC(this.projectionDeltaWithTransform,this.treeScale,v),g&&(p.transform=g(v,p.transform));const{x,y:w}=this.projectionDelta;p.transformOrigin=`${x.origin*100}% ${w.origin*100}% 0`,m.animationValues?p.opacity=m===this?(d=(f=v.opacity)!==null&&f!==void 0?f:this.latestValues.opacity)!==null&&d!==void 0?d:1:this.preserveOpacity?this.latestValues.opacity:v.opacityExit:p.opacity=m===this?v.opacity!==void 0?v.opacity:"":v.opacityExit!==void 0?v.opacityExit:0;for(const _ in dl){if(v[_]===void 0)continue;const{correct:C,applyTo:E}=dl[_],M=p.transform==="none"?v[_]:C(v[_],m);if(E){const k=E.length;for(let P=0;P<k;P++)p[E[P]]=M}else p[_]=M}return this.options.layoutId&&(p.pointerEvents=m===this?nl(u==null?void 0:u.pointerEvents)||"":"none"),p}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(u=>{var f;return(f=u.currentAnimation)===null||f===void 0?void 0:f.stop()}),this.root.nodes.forEach(Lg),this.root.sharedNodes.clear()}}}function CC(e){e.updateLayout()}function _C(e){var t;const r=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:s}=e.layout,{animationType:l}=e.options,u=r.source!==e.layout.source;l==="size"?Kt(m=>{const v=u?r.measuredBox[m]:r.layoutBox[m],x=jt(v);v.min=o[m].min,v.max=v.min+x}):jv(l,r.layoutBox,o)&&Kt(m=>{const v=u?r.measuredBox[m]:r.layoutBox[m],x=jt(o[m]);v.max=v.min+x,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+x)});const f=Mi();Go(f,o,r.layoutBox);const d=Mi();u?Go(d,e.applyTransform(s,!0),r.measuredBox):Go(d,o,r.layoutBox);const p=!Rv(f);let g=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:v,layout:x}=m;if(v&&x){const w=Ge();Qo(w,r.layoutBox,v.layoutBox);const _=Ge();Qo(_,o,x.layoutBox),Dv(w,_)||(g=!0),m.options.layoutRoot&&(e.relativeTarget=_,e.relativeTargetOrigin=w,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:r,delta:d,layoutDelta:f,hasLayoutChanged:p,hasRelativeTargetChanged:g})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function TC(e){Uo&&jr.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function PC(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function MC(e){e.clearSnapshot()}function Lg(e){e.clearMeasurements()}function NC(e){e.isLayoutDirty=!1}function AC(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function jg(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function bC(e){e.resolveTargetDelta()}function RC(e){e.calcProjection()}function DC(e){e.resetSkewAndRotation()}function IC(e){e.removeLeadSnapshot()}function Vg(e,t,r){e.translate=Ue(t.translate,0,r),e.scale=Ue(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function zg(e,t,r,o){e.min=Ue(t.min,r.min,o),e.max=Ue(t.max,r.max,o)}function LC(e,t,r,o){zg(e.x,t.x,r.x,o),zg(e.y,t.y,r.y,o)}function jC(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const VC={duration:.45,ease:[.4,0,.1,1]},Fg=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Bg=Fg("applewebkit/")&&!Fg("chrome/")?Math.round:Lt;function Og(e){e.min=Bg(e.min),e.max=Bg(e.max)}function zC(e){Og(e.x),Og(e.y)}function jv(e,t,r){return e==="position"||e==="preserve-aspect"&&!OE(Rg(t),Rg(r),.2)}function FC(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const BC=Lv({attachResizeListener:(e,t)=>rs(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),nf={current:void 0},Vv=Lv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!nf.current){const e=new BC({});e.mount(window),e.setOptions({layoutScroll:!0}),nf.current=e}return nf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),OC={pan:{Feature:rC},drag:{Feature:nC,ProjectionNode:Vv,MeasureLayout:Nv}};function $g(e,t,r){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",r==="Start");const s="onHover"+r,l=o[s];l&&ze.postRender(()=>l(t,ys(t)))}class $C extends pr{mount(){const{current:t}=this.node;t&&(this.unmount=O2(t,r=>($g(this.node,r,"Start"),o=>$g(this.node,o,"End"))))}unmount(){}}class HC extends pr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=gs(rs(this.node.current,"focus",()=>this.onFocus()),rs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Hg(e,t,r){const{props:o}=e;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",r==="Start");const s="onTap"+(r==="End"?"":r),l=o[s];l&&ze.postRender(()=>l(t,ys(t)))}class UC extends pr{mount(){const{current:t}=this.node;t&&(this.unmount=W2(t,r=>(Hg(this.node,r,"Start"),(o,{success:s})=>Hg(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Df=new WeakMap,rf=new WeakMap,WC=e=>{const t=Df.get(e.target);t&&t(e)},XC=e=>{e.forEach(WC)};function KC({root:e,...t}){const r=e||document;rf.has(r)||rf.set(r,{});const o=rf.get(r),s=JSON.stringify(t);return o[s]||(o[s]=new IntersectionObserver(XC,{root:e,...t})),o[s]}function YC(e,t,r){const o=KC(t);return Df.set(e,r),o.observe(e),()=>{Df.delete(e),o.unobserve(e)}}const GC={some:0,all:1};class QC extends pr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:o,amount:s="some",once:l}=t,u={root:r?r.current:void 0,rootMargin:o,threshold:typeof s=="number"?s:GC[s]},f=d=>{const{isIntersecting:p}=d;if(this.isInView===p||(this.isInView=p,l&&!p&&this.hasEnteredView))return;p&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",p);const{onViewportEnter:g,onViewportLeave:m}=this.node.getProps(),v=p?g:m;v&&v(d)};return YC(this.node.current,u,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(qC(t,r))&&this.startObserver()}unmount(){}}function qC({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const ZC={inView:{Feature:QC},tap:{Feature:UC},focus:{Feature:HC},hover:{Feature:$C}},JC={layout:{ProjectionNode:Vv,MeasureLayout:Nv}},If={current:null},zv={current:!1};function e_(){if(zv.current=!0,!!Jf)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>If.current=e.matches;e.addListener(t),t()}else If.current=!1}const t_=[...uv,ht,hr],n_=e=>t_.find(lv(e)),Ug=new WeakMap;function r_(e,t,r){for(const o in t){const s=t[o],l=r[o];if(pt(s))e.addValue(o,s);else if(pt(l))e.addValue(o,ts(s,{owner:e}));else if(l!==s)if(e.hasValue(o)){const u=e.getValue(o);u.liveStyle===!0?u.jump(s):u.hasAnimated||u.set(s)}else{const u=e.getStaticValue(o);e.addValue(o,ts(u!==void 0?u:s,{owner:e}))}}for(const o in r)t[o]===void 0&&e.removeValue(o);return t}const Wg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class i_{scrapeMotionValuesFromProps(t,r,o){return{}}constructor({parent:t,props:r,presenceContext:o,reducedMotionConfig:s,blockInitialAnimation:l,visualState:u},f={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Td,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const x=xn.now();this.renderScheduledAt<x&&(this.renderScheduledAt=x,ze.render(this.render,!1,!0))};const{latestValues:d,renderState:p,onUpdate:g}=u;this.onUpdate=g,this.latestValues=d,this.baseTarget={...d},this.initialValues=r.initial?{...d}:{},this.renderState=p,this.parent=t,this.props=r,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=f,this.blockInitialAnimation=!!l,this.isControllingVariants=Rl(r),this.isVariantNode=yy(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:m,...v}=this.scrapeMotionValuesFromProps(r,{},this);for(const x in v){const w=v[x];d[x]!==void 0&&pt(w)&&w.set(d[x],!1)}}mount(t){this.current=t,Ug.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),zv.current||e_(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:If.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Ug.delete(this.current),this.projection&&this.projection.unmount(),dr(this.notifyUpdate),dr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const o=Yr.has(t),s=r.on("change",f=>{this.latestValues[t]=f,this.props.onUpdate&&ze.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),l=r.on("renderRequest",this.scheduleRender);let u;window.MotionCheckAppearSync&&(u=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{s(),l(),u&&u(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ji){const r=ji[t];if(!r)continue;const{isEnabled:o,Feature:s}=r;if(!this.features[t]&&s&&o(this.props)&&(this.features[t]=new s(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ge()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let o=0;o<Wg.length;o++){const s=Wg[o];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const l="on"+s,u=t[l];u&&(this.propEventSubscriptions[s]=this.on(s,u))}this.prevMotionValues=r_(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){const o=this.values.get(t);r!==o&&(o&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let o=this.values.get(t);return o===void 0&&r!==void 0&&(o=ts(r===null?void 0:r,{owner:this}),this.addValue(t,o)),o}readValue(t,r){var o;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(o=this.getBaseTargetFromProps(this.props,t))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(sv(s)||qy(s))?s=parseFloat(s):!n_(s)&&hr.test(r)&&(s=rv(t,r)),this.setBaseTarget(t,pt(s)?s.get():s)),pt(s)?s.get():s}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var r;const{initial:o}=this.props;let s;if(typeof o=="string"||typeof o=="object"){const u=sd(this.props,o,(r=this.presenceContext)===null||r===void 0?void 0:r.custom);u&&(s=u[t])}if(o&&s!==void 0)return s;const l=this.getBaseTargetFromProps(this.props,t);return l!==void 0&&!pt(l)?l:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new wd),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}}class Fv extends i_{constructor(){super(...arguments),this.KeyframeResolver=cv}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:o}){delete r[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;pt(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}function o_(e){return window.getComputedStyle(e)}class s_ extends Fv{constructor(){super(...arguments),this.type="html",this.renderInstance=Ty}readValueFromInstance(t,r){if(Yr.has(r)){const o=_d(r);return o&&o.default||0}else{const o=o_(t),s=(Ey(r)?o.getPropertyValue(r):o[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:r}){return Pv(t,r)}build(t,r,o){ud(t,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,r,o){return hd(t,r,o)}}class a_ extends Fv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ge}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Yr.has(r)){const o=_d(r);return o&&o.default||0}return r=Py.has(r)?r:rd(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,o){return Ay(t,r,o)}build(t,r,o){cd(t,r,this.isSVGTag,o.transformTemplate)}renderInstance(t,r,o,s){My(t,r,o,s)}mount(t){this.isSVGTag=dd(t.tagName),super.mount(t)}}const l_=(e,t)=>od(e)?new a_(t):new s_(t,{allowProjection:e!==L.Fragment}),u_=I2({...RE,...ZC,...OC,...JC},l_),Ll=GS(u_),c_=[{id:"graph",label:"Architecture",icon:ly},{id:"navigation",label:"Navigation",icon:vf},{id:"packages",label:"Packages",icon:Gf},{id:"dead-code",label:"Dead Code",icon:MS},{id:"folders",label:"Folders",icon:SS}];function f_(){const e=Me(l=>l.viewMode),t=Me(l=>l.setViewMode),r=Me(l=>l.sidebarOpen),o=Me(l=>l.toggleSidebar),s=Me(l=>l.graph);return r?T.jsxs(Ll.aside,{initial:{x:-240},animate:{x:0},style:{width:240,background:"var(--bg-glass)",backdropFilter:"blur(16px)",borderRight:"1px solid var(--border)",display:"flex",flexDirection:"column",flexShrink:0},children:[T.jsxs("div",{style:{padding:"16px",borderBottom:"1px solid var(--border)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[T.jsxs("div",{children:[T.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Project"}),T.jsx("div",{style:{fontSize:14,fontWeight:600,marginTop:2},children:(s==null?void 0:s.config.name)??"..."}),T.jsx("div",{style:{fontSize:11,color:"var(--accent)",marginTop:2},children:(s==null?void 0:s.config.type)??""})]}),T.jsx("button",{onClick:o,style:{background:"none",border:"none",cursor:"pointer",color:"var(--text-muted)"},children:T.jsx(_S,{size:16})})]}),T.jsx("nav",{style:{padding:"8px",flex:1},children:c_.map(({id:l,label:u,icon:f})=>T.jsxs("button",{onClick:()=>t(l),style:{display:"flex",alignItems:"center",gap:10,width:"100%",padding:"10px 12px",background:e===l?"rgba(139, 92, 246, 0.15)":"transparent",border:e===l?"1px solid rgba(139, 92, 246, 0.3)":"1px solid transparent",borderRadius:"var(--radius-sm)",cursor:"pointer",color:e===l?"var(--accent-hover)":"var(--text-secondary)",fontSize:13,fontWeight:500,marginBottom:4,transition:"all 0.15s"},children:[T.jsx(f,{size:16}),u]},l))}),s&&T.jsxs("div",{style:{padding:"16px",borderTop:"1px solid var(--border)"},children:[T.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginBottom:8},children:"STATS"}),[["Files",s.stats.totalFiles],["Components",s.stats.totalComponents],["Screens",s.stats.totalScreens],["Hooks",s.stats.totalHooks],["Packages",s.stats.totalPackages]].map(([l,u])=>T.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:12,marginBottom:4},children:[T.jsx("span",{style:{color:"var(--text-muted)"},children:l}),T.jsx("span",{style:{fontWeight:600,color:"var(--text-primary)"},children:u})]},String(l))),T.jsxs("div",{style:{fontSize:10,color:"var(--text-muted)",marginTop:8},children:["Scanned in ",s.stats.scanDurationMs,"ms"]})]})]}):T.jsx("button",{onClick:o,style:{position:"absolute",left:12,top:72,zIndex:10,background:"var(--bg-glass)",backdropFilter:"blur(12px)",border:"1px solid var(--border)",borderRadius:"var(--radius-sm)",padding:8,cursor:"pointer",color:"var(--text-secondary)"},children:T.jsx(TS,{size:18})})}const Xg={component:"#8B5CF6",screen:"#3B82F6",hook:"#F59E0B",package:"#EC4899",route:"#06B6D4",file:"#6B7280",provider:"#10B981",asset:"#F472B6"};function d_(){const e=Me(d=>d.searchQuery),t=Me(d=>d.searchResults),r=Me(d=>d.setSearchQuery),o=Me(d=>d.setSearchResults),s=Me(d=>d.selectNode),[l,u]=L.useState(!1);L.useEffect(()=>{if(!e){o([]);return}const d=setTimeout(async()=>{const p=await LS(e);o(p)},200);return()=>clearTimeout(d)},[e,o]);const f=L.useCallback(d=>{s(d),r(""),o([]),u(!1)},[s,r,o]);return T.jsxs("div",{style:{position:"relative",flex:1,maxWidth:480},children:[T.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,background:"var(--bg-tertiary)",border:`1px solid ${l?"var(--accent)":"var(--border)"}`,borderRadius:"var(--radius-sm)",padding:"8px 12px",transition:"border-color 0.2s"},children:[T.jsx(PS,{size:16,style:{color:"var(--text-muted)",flexShrink:0}}),T.jsx("input",{type:"text",placeholder:"Search components, screens, hooks, packages...",value:e,onChange:d=>r(d.target.value),onFocus:()=>u(!0),onBlur:()=>setTimeout(()=>u(!1),200),style:{flex:1,background:"transparent",border:"none",outline:"none",color:"var(--text-primary)",fontSize:14,fontFamily:"var(--font-sans)"}}),e&&T.jsx("button",{onClick:()=>{r(""),o([])},style:{background:"none",border:"none",cursor:"pointer",color:"var(--text-muted)"},children:T.jsx(cy,{size:14})})]}),T.jsx(OS,{children:l&&t.length>0&&T.jsx(Ll.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},style:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:"var(--radius-sm)",boxShadow:"var(--shadow)",zIndex:100,maxHeight:320,overflow:"auto"},children:t.map(d=>T.jsxs("button",{onClick:()=>f(d.id),style:{display:"flex",alignItems:"center",gap:10,width:"100%",padding:"10px 14px",background:"transparent",border:"none",borderBottom:"1px solid var(--border)",cursor:"pointer",textAlign:"left"},onMouseEnter:p=>{p.currentTarget.style.background="var(--bg-tertiary)"},onMouseLeave:p=>{p.currentTarget.style.background="transparent"},children:[T.jsx("span",{style:{fontSize:10,fontWeight:600,padding:"2px 6px",borderRadius:4,background:`${Xg[d.kind]??"#374151"}20`,color:Xg[d.kind]??"#9CA3AF",textTransform:"uppercase"},children:d.kind}),T.jsxs("div",{children:[T.jsx("div",{style:{fontSize:13,fontWeight:500,color:"var(--text-primary)"},children:d.label}),d.path&&T.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",fontFamily:"var(--font-mono)"},children:d.path})]})]},d.id))})})]})}function Ze(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let r=0,o;r<e.length;r++)(o=Ze(e[r]))!==""&&(t+=(t&&" ")+o);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}var h_={value:()=>{}};function jl(){for(var e=0,t=arguments.length,r={},o;e<t;++e){if(!(o=arguments[e]+"")||o in r||/[\s.]/.test(o))throw new Error("illegal type: "+o);r[o]=[]}return new ol(r)}function ol(e){this._=e}function p_(e,t){return e.trim().split(/^|\s+/).map(function(r){var o="",s=r.indexOf(".");if(s>=0&&(o=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:o}})}ol.prototype=jl.prototype={constructor:ol,on:function(e,t){var r=this._,o=p_(e+"",r),s,l=-1,u=o.length;if(arguments.length<2){for(;++l<u;)if((s=(e=o[l]).type)&&(s=m_(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++l<u;)if(s=(e=o[l]).type)r[s]=Kg(r[s],e.name,t);else if(t==null)for(s in r)r[s]=Kg(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new ol(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),o=0,s,l;o<s;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(l=this._[e],o=0,s=l.length;o<s;++o)l[o].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],s=0,l=o.length;s<l;++s)o[s].value.apply(t,r)}};function m_(e,t){for(var r=0,o=e.length,s;r<o;++r)if((s=e[r]).name===t)return s.value}function Kg(e,t,r){for(var o=0,s=e.length;o<s;++o)if(e[o].name===t){e[o]=h_,e=e.slice(0,o).concat(e.slice(o+1));break}return r!=null&&e.push({name:t,value:r}),e}var Lf="http://www.w3.org/1999/xhtml";const Yg={svg:"http://www.w3.org/2000/svg",xhtml:Lf,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Vl(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Yg.hasOwnProperty(t)?{space:Yg[t],local:e}:e}function g_(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Lf&&t.documentElement.namespaceURI===Lf?t.createElement(e):t.createElementNS(r,e)}}function y_(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Bv(e){var t=Vl(e);return(t.local?y_:g_)(t)}function v_(){}function Ad(e){return e==null?v_:function(){return this.querySelector(e)}}function x_(e){typeof e!="function"&&(e=Ad(e));for(var t=this._groups,r=t.length,o=new Array(r),s=0;s<r;++s)for(var l=t[s],u=l.length,f=o[s]=new Array(u),d,p,g=0;g<u;++g)(d=l[g])&&(p=e.call(d,d.__data__,g,l))&&("__data__"in d&&(p.__data__=d.__data__),f[g]=p);return new Vt(o,this._parents)}function w_(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function S_(){return[]}function Ov(e){return e==null?S_:function(){return this.querySelectorAll(e)}}function k_(e){return function(){return w_(e.apply(this,arguments))}}function E_(e){typeof e=="function"?e=k_(e):e=Ov(e);for(var t=this._groups,r=t.length,o=[],s=[],l=0;l<r;++l)for(var u=t[l],f=u.length,d,p=0;p<f;++p)(d=u[p])&&(o.push(e.call(d,d.__data__,p,u)),s.push(d));return new Vt(o,s)}function $v(e){return function(){return this.matches(e)}}function Hv(e){return function(t){return t.matches(e)}}var C_=Array.prototype.find;function __(e){return function(){return C_.call(this.children,e)}}function T_(){return this.firstElementChild}function P_(e){return this.select(e==null?T_:__(typeof e=="function"?e:Hv(e)))}var M_=Array.prototype.filter;function N_(){return Array.from(this.children)}function A_(e){return function(){return M_.call(this.children,e)}}function b_(e){return this.selectAll(e==null?N_:A_(typeof e=="function"?e:Hv(e)))}function R_(e){typeof e!="function"&&(e=$v(e));for(var t=this._groups,r=t.length,o=new Array(r),s=0;s<r;++s)for(var l=t[s],u=l.length,f=o[s]=[],d,p=0;p<u;++p)(d=l[p])&&e.call(d,d.__data__,p,l)&&f.push(d);return new Vt(o,this._parents)}function Uv(e){return new Array(e.length)}function D_(){return new Vt(this._enter||this._groups.map(Uv),this._parents)}function vl(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}vl.prototype={constructor:vl,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function I_(e){return function(){return e}}function L_(e,t,r,o,s,l){for(var u=0,f,d=t.length,p=l.length;u<p;++u)(f=t[u])?(f.__data__=l[u],o[u]=f):r[u]=new vl(e,l[u]);for(;u<d;++u)(f=t[u])&&(s[u]=f)}function j_(e,t,r,o,s,l,u){var f,d,p=new Map,g=t.length,m=l.length,v=new Array(g),x;for(f=0;f<g;++f)(d=t[f])&&(v[f]=x=u.call(d,d.__data__,f,t)+"",p.has(x)?s[f]=d:p.set(x,d));for(f=0;f<m;++f)x=u.call(e,l[f],f,l)+"",(d=p.get(x))?(o[f]=d,d.__data__=l[f],p.delete(x)):r[f]=new vl(e,l[f]);for(f=0;f<g;++f)(d=t[f])&&p.get(v[f])===d&&(s[f]=d)}function V_(e){return e.__data__}function z_(e,t){if(!arguments.length)return Array.from(this,V_);var r=t?j_:L_,o=this._parents,s=this._groups;typeof e!="function"&&(e=I_(e));for(var l=s.length,u=new Array(l),f=new Array(l),d=new Array(l),p=0;p<l;++p){var g=o[p],m=s[p],v=m.length,x=F_(e.call(g,g&&g.__data__,p,o)),w=x.length,_=f[p]=new Array(w),C=u[p]=new Array(w),E=d[p]=new Array(v);r(g,m,_,C,E,x,t);for(var M=0,k=0,P,R;M<w;++M)if(P=_[M]){for(M>=k&&(k=M+1);!(R=C[k])&&++k<w;);P._next=R||null}}return u=new Vt(u,o),u._enter=f,u._exit=d,u}function F_(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function B_(){return new Vt(this._exit||this._groups.map(Uv),this._parents)}function O_(e,t,r){var o=this.enter(),s=this,l=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?l.remove():r(l),o&&s?o.merge(s).order():s}function $_(e){for(var t=e.selection?e.selection():e,r=this._groups,o=t._groups,s=r.length,l=o.length,u=Math.min(s,l),f=new Array(s),d=0;d<u;++d)for(var p=r[d],g=o[d],m=p.length,v=f[d]=new Array(m),x,w=0;w<m;++w)(x=p[w]||g[w])&&(v[w]=x);for(;d<s;++d)f[d]=r[d];return new Vt(f,this._parents)}function H_(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var o=e[t],s=o.length-1,l=o[s],u;--s>=0;)(u=o[s])&&(l&&u.compareDocumentPosition(l)^4&&l.parentNode.insertBefore(u,l),l=u);return this}function U_(e){e||(e=W_);function t(m,v){return m&&v?e(m.__data__,v.__data__):!m-!v}for(var r=this._groups,o=r.length,s=new Array(o),l=0;l<o;++l){for(var u=r[l],f=u.length,d=s[l]=new Array(f),p,g=0;g<f;++g)(p=u[g])&&(d[g]=p);d.sort(t)}return new Vt(s,this._parents).order()}function W_(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function X_(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function K_(){return Array.from(this)}function Y_(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var o=e[t],s=0,l=o.length;s<l;++s){var u=o[s];if(u)return u}return null}function G_(){let e=0;for(const t of this)++e;return e}function Q_(){return!this.node()}function q_(e){for(var t=this._groups,r=0,o=t.length;r<o;++r)for(var s=t[r],l=0,u=s.length,f;l<u;++l)(f=s[l])&&e.call(f,f.__data__,l,s);return this}function Z_(e){return function(){this.removeAttribute(e)}}function J_(e){return function(){this.removeAttributeNS(e.space,e.local)}}function eT(e,t){return function(){this.setAttribute(e,t)}}function tT(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function nT(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function rT(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function iT(e,t){var r=Vl(e);if(arguments.length<2){var o=this.node();return r.local?o.getAttributeNS(r.space,r.local):o.getAttribute(r)}return this.each((t==null?r.local?J_:Z_:typeof t=="function"?r.local?rT:nT:r.local?tT:eT)(r,t))}function Wv(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function oT(e){return function(){this.style.removeProperty(e)}}function sT(e,t,r){return function(){this.style.setProperty(e,t,r)}}function aT(e,t,r){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,r)}}function lT(e,t,r){return arguments.length>1?this.each((t==null?oT:typeof t=="function"?aT:sT)(e,t,r??"")):zi(this.node(),e)}function zi(e,t){return e.style.getPropertyValue(t)||Wv(e).getComputedStyle(e,null).getPropertyValue(t)}function uT(e){return function(){delete this[e]}}function cT(e,t){return function(){this[e]=t}}function fT(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function dT(e,t){return arguments.length>1?this.each((t==null?uT:typeof t=="function"?fT:cT)(e,t)):this.node()[e]}function Xv(e){return e.trim().split(/^|\s+/)}function bd(e){return e.classList||new Kv(e)}function Kv(e){this._node=e,this._names=Xv(e.getAttribute("class")||"")}Kv.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Yv(e,t){for(var r=bd(e),o=-1,s=t.length;++o<s;)r.add(t[o])}function Gv(e,t){for(var r=bd(e),o=-1,s=t.length;++o<s;)r.remove(t[o])}function hT(e){return function(){Yv(this,e)}}function pT(e){return function(){Gv(this,e)}}function mT(e,t){return function(){(t.apply(this,arguments)?Yv:Gv)(this,e)}}function gT(e,t){var r=Xv(e+"");if(arguments.length<2){for(var o=bd(this.node()),s=-1,l=r.length;++s<l;)if(!o.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?mT:t?hT:pT)(r,t))}function yT(){this.textContent=""}function vT(e){return function(){this.textContent=e}}function xT(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function wT(e){return arguments.length?this.each(e==null?yT:(typeof e=="function"?xT:vT)(e)):this.node().textContent}function ST(){this.innerHTML=""}function kT(e){return function(){this.innerHTML=e}}function ET(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function CT(e){return arguments.length?this.each(e==null?ST:(typeof e=="function"?ET:kT)(e)):this.node().innerHTML}function _T(){this.nextSibling&&this.parentNode.appendChild(this)}function TT(){return this.each(_T)}function PT(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function MT(){return this.each(PT)}function NT(e){var t=typeof e=="function"?e:Bv(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function AT(){return null}function bT(e,t){var r=typeof e=="function"?e:Bv(e),o=t==null?AT:typeof t=="function"?t:Ad(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),o.apply(this,arguments)||null)})}function RT(){var e=this.parentNode;e&&e.removeChild(this)}function DT(){return this.each(RT)}function IT(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function LT(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function jT(e){return this.select(e?LT:IT)}function VT(e){return arguments.length?this.property("__data__",e):this.node().__data__}function zT(e){return function(t){e.call(this,t,this.__data__)}}function FT(e){return e.trim().split(/^|\s+/).map(function(t){var r="",o=t.indexOf(".");return o>=0&&(r=t.slice(o+1),t=t.slice(0,o)),{type:t,name:r}})}function BT(e){return function(){var t=this.__on;if(t){for(var r=0,o=-1,s=t.length,l;r<s;++r)l=t[r],(!e.type||l.type===e.type)&&l.name===e.name?this.removeEventListener(l.type,l.listener,l.options):t[++o]=l;++o?t.length=o:delete this.__on}}}function OT(e,t,r){return function(){var o=this.__on,s,l=zT(t);if(o){for(var u=0,f=o.length;u<f;++u)if((s=o[u]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=l,s.options=r),s.value=t;return}}this.addEventListener(e.type,l,r),s={type:e.type,name:e.name,value:t,listener:l,options:r},o?o.push(s):this.__on=[s]}}function $T(e,t,r){var o=FT(e+""),s,l=o.length,u;if(arguments.length<2){var f=this.node().__on;if(f){for(var d=0,p=f.length,g;d<p;++d)for(s=0,g=f[d];s<l;++s)if((u=o[s]).type===g.type&&u.name===g.name)return g.value}return}for(f=t?OT:BT,s=0;s<l;++s)this.each(f(o[s],t,r));return this}function Qv(e,t,r){var o=Wv(e),s=o.CustomEvent;typeof s=="function"?s=new s(t,r):(s=o.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function HT(e,t){return function(){return Qv(this,e,t)}}function UT(e,t){return function(){return Qv(this,e,t.apply(this,arguments))}}function WT(e,t){return this.each((typeof t=="function"?UT:HT)(e,t))}function*XT(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var o=e[t],s=0,l=o.length,u;s<l;++s)(u=o[s])&&(yield u)}var qv=[null];function Vt(e,t){this._groups=e,this._parents=t}function vs(){return new Vt([[document.documentElement]],qv)}function KT(){return this}Vt.prototype=vs.prototype={constructor:Vt,select:x_,selectAll:E_,selectChild:P_,selectChildren:b_,filter:R_,data:z_,enter:D_,exit:B_,join:O_,merge:$_,selection:KT,order:H_,sort:U_,call:X_,nodes:K_,node:Y_,size:G_,empty:Q_,each:q_,attr:iT,style:lT,property:dT,classed:gT,text:wT,html:CT,raise:TT,lower:MT,append:NT,insert:bT,remove:DT,clone:jT,datum:VT,on:$T,dispatch:WT,[Symbol.iterator]:XT};function It(e){return typeof e=="string"?new Vt([[document.querySelector(e)]],[document.documentElement]):new Vt([[e]],qv)}function YT(e){let t;for(;t=e.sourceEvent;)e=t;return e}function tn(e,t){if(e=YT(e),t===void 0&&(t=e.currentTarget),t){var r=t.ownerSVGElement||t;if(r.createSVGPoint){var o=r.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}}return[e.pageX,e.pageY]}const GT={passive:!1},is={capture:!0,passive:!1};function of(e){e.stopImmediatePropagation()}function Di(e){e.preventDefault(),e.stopImmediatePropagation()}function Zv(e){var t=e.document.documentElement,r=It(e).on("dragstart.drag",Di,is);"onselectstart"in t?r.on("selectstart.drag",Di,is):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Jv(e,t){var r=e.document.documentElement,o=It(e).on("dragstart.drag",null);t&&(o.on("click.drag",Di,is),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in r?o.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const Xa=e=>()=>e;function jf(e,{sourceEvent:t,subject:r,target:o,identifier:s,active:l,x:u,y:f,dx:d,dy:p,dispatch:g}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:l,enumerable:!0,configurable:!0},x:{value:u,enumerable:!0,configurable:!0},y:{value:f,enumerable:!0,configurable:!0},dx:{value:d,enumerable:!0,configurable:!0},dy:{value:p,enumerable:!0,configurable:!0},_:{value:g}})}jf.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function QT(e){return!e.ctrlKey&&!e.button}function qT(){return this.parentNode}function ZT(e,t){return t??{x:e.x,y:e.y}}function JT(){return navigator.maxTouchPoints||"ontouchstart"in this}function ex(){var e=QT,t=qT,r=ZT,o=JT,s={},l=jl("start","drag","end"),u=0,f,d,p,g,m=0;function v(P){P.on("mousedown.drag",x).filter(o).on("touchstart.drag",C).on("touchmove.drag",E,GT).on("touchend.drag touchcancel.drag",M).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function x(P,R){if(!(g||!e.call(this,P,R))){var D=k(this,t.call(this,P,R),P,R,"mouse");D&&(It(P.view).on("mousemove.drag",w,is).on("mouseup.drag",_,is),Zv(P.view),of(P),p=!1,f=P.clientX,d=P.clientY,D("start",P))}}function w(P){if(Di(P),!p){var R=P.clientX-f,D=P.clientY-d;p=R*R+D*D>m}s.mouse("drag",P)}function _(P){It(P.view).on("mousemove.drag mouseup.drag",null),Jv(P.view,p),Di(P),s.mouse("end",P)}function C(P,R){if(e.call(this,P,R)){var D=P.changedTouches,O=t.call(this,P,R),F=D.length,K,J;for(K=0;K<F;++K)(J=k(this,O,P,R,D[K].identifier,D[K]))&&(of(P),J("start",P,D[K]))}}function E(P){var R=P.changedTouches,D=R.length,O,F;for(O=0;O<D;++O)(F=s[R[O].identifier])&&(Di(P),F("drag",P,R[O]))}function M(P){var R=P.changedTouches,D=R.length,O,F;for(g&&clearTimeout(g),g=setTimeout(function(){g=null},500),O=0;O<D;++O)(F=s[R[O].identifier])&&(of(P),F("end",P,R[O]))}function k(P,R,D,O,F,K){var J=l.copy(),q=tn(K||D,R),ee,Z,A;if((A=r.call(P,new jf("beforestart",{sourceEvent:D,target:v,identifier:F,active:u,x:q[0],y:q[1],dx:0,dy:0,dispatch:J}),O))!=null)return ee=A.x-q[0]||0,Z=A.y-q[1]||0,function W(H,$,I){var z=q,U;switch(H){case"start":s[F]=W,U=u++;break;case"end":delete s[F],--u;case"drag":q=tn(I||$,R),U=u;break}J.call(H,P,new jf(H,{sourceEvent:$,subject:A,target:v,identifier:F,active:U,x:q[0]+ee,y:q[1]+Z,dx:q[0]-z[0],dy:q[1]-z[1],dispatch:J}),O)}}return v.filter=function(P){return arguments.length?(e=typeof P=="function"?P:Xa(!!P),v):e},v.container=function(P){return arguments.length?(t=typeof P=="function"?P:Xa(P),v):t},v.subject=function(P){return arguments.length?(r=typeof P=="function"?P:Xa(P),v):r},v.touchable=function(P){return arguments.length?(o=typeof P=="function"?P:Xa(!!P),v):o},v.on=function(){var P=l.on.apply(l,arguments);return P===l?v:P},v.clickDistance=function(P){return arguments.length?(m=(P=+P)*P,v):Math.sqrt(m)},v}function Rd(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function tx(e,t){var r=Object.create(e.prototype);for(var o in t)r[o]=t[o];return r}function xs(){}var os=.7,xl=1/os,Ii="\\s*([+-]?\\d+)\\s*",ss="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",wn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",eP=/^#([0-9a-f]{3,8})$/,tP=new RegExp(`^rgb\\(${Ii},${Ii},${Ii}\\)$`),nP=new RegExp(`^rgb\\(${wn},${wn},${wn}\\)$`),rP=new RegExp(`^rgba\\(${Ii},${Ii},${Ii},${ss}\\)$`),iP=new RegExp(`^rgba\\(${wn},${wn},${wn},${ss}\\)$`),oP=new RegExp(`^hsl\\(${ss},${wn},${wn}\\)$`),sP=new RegExp(`^hsla\\(${ss},${wn},${wn},${ss}\\)$`),Gg={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};Rd(xs,Hr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Qg,formatHex:Qg,formatHex8:aP,formatHsl:lP,formatRgb:qg,toString:qg});function Qg(){return this.rgb().formatHex()}function aP(){return this.rgb().formatHex8()}function lP(){return nx(this).formatHsl()}function qg(){return this.rgb().formatRgb()}function Hr(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=eP.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Zg(t):r===3?new Tt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Ka(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Ka(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=tP.exec(e))?new Tt(t[1],t[2],t[3],1):(t=nP.exec(e))?new Tt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=rP.exec(e))?Ka(t[1],t[2],t[3],t[4]):(t=iP.exec(e))?Ka(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=oP.exec(e))?t0(t[1],t[2]/100,t[3]/100,1):(t=sP.exec(e))?t0(t[1],t[2]/100,t[3]/100,t[4]):Gg.hasOwnProperty(e)?Zg(Gg[e]):e==="transparent"?new Tt(NaN,NaN,NaN,0):null}function Zg(e){return new Tt(e>>16&255,e>>8&255,e&255,1)}function Ka(e,t,r,o){return o<=0&&(e=t=r=NaN),new Tt(e,t,r,o)}function uP(e){return e instanceof xs||(e=Hr(e)),e?(e=e.rgb(),new Tt(e.r,e.g,e.b,e.opacity)):new Tt}function Vf(e,t,r,o){return arguments.length===1?uP(e):new Tt(e,t,r,o??1)}function Tt(e,t,r,o){this.r=+e,this.g=+t,this.b=+r,this.opacity=+o}Rd(Tt,Vf,tx(xs,{brighter(e){return e=e==null?xl:Math.pow(xl,e),new Tt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?os:Math.pow(os,e),new Tt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Tt(Or(this.r),Or(this.g),Or(this.b),wl(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:Jg,formatHex:Jg,formatHex8:cP,formatRgb:e0,toString:e0}));function Jg(){return`#${Fr(this.r)}${Fr(this.g)}${Fr(this.b)}`}function cP(){return`#${Fr(this.r)}${Fr(this.g)}${Fr(this.b)}${Fr((isNaN(this.opacity)?1:this.opacity)*255)}`}function e0(){const e=wl(this.opacity);return`${e===1?"rgb(":"rgba("}${Or(this.r)}, ${Or(this.g)}, ${Or(this.b)}${e===1?")":`, ${e})`}`}function wl(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Or(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Fr(e){return e=Or(e),(e<16?"0":"")+e.toString(16)}function t0(e,t,r,o){return o<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new nn(e,t,r,o)}function nx(e){if(e instanceof nn)return new nn(e.h,e.s,e.l,e.opacity);if(e instanceof xs||(e=Hr(e)),!e)return new nn;if(e instanceof nn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,o=e.b/255,s=Math.min(t,r,o),l=Math.max(t,r,o),u=NaN,f=l-s,d=(l+s)/2;return f?(t===l?u=(r-o)/f+(r<o)*6:r===l?u=(o-t)/f+2:u=(t-r)/f+4,f/=d<.5?l+s:2-l-s,u*=60):f=d>0&&d<1?0:u,new nn(u,f,d,e.opacity)}function fP(e,t,r,o){return arguments.length===1?nx(e):new nn(e,t,r,o??1)}function nn(e,t,r,o){this.h=+e,this.s=+t,this.l=+r,this.opacity=+o}Rd(nn,fP,tx(xs,{brighter(e){return e=e==null?xl:Math.pow(xl,e),new nn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?os:Math.pow(os,e),new nn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,o=r+(r<.5?r:1-r)*t,s=2*r-o;return new Tt(sf(e>=240?e-240:e+120,s,o),sf(e,s,o),sf(e<120?e+240:e-120,s,o),this.opacity)},clamp(){return new nn(n0(this.h),Ya(this.s),Ya(this.l),wl(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=wl(this.opacity);return`${e===1?"hsl(":"hsla("}${n0(this.h)}, ${Ya(this.s)*100}%, ${Ya(this.l)*100}%${e===1?")":`, ${e})`}`}}));function n0(e){return e=(e||0)%360,e<0?e+360:e}function Ya(e){return Math.max(0,Math.min(1,e||0))}function sf(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Dd=e=>()=>e;function dP(e,t){return function(r){return e+r*t}}function hP(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(o){return Math.pow(e+o*t,r)}}function pP(e){return(e=+e)==1?rx:function(t,r){return r-t?hP(t,r,e):Dd(isNaN(t)?r:t)}}function rx(e,t){var r=t-e;return r?dP(e,r):Dd(isNaN(e)?t:e)}const Sl=(function e(t){var r=pP(t);function o(s,l){var u=r((s=Vf(s)).r,(l=Vf(l)).r),f=r(s.g,l.g),d=r(s.b,l.b),p=rx(s.opacity,l.opacity);return function(g){return s.r=u(g),s.g=f(g),s.b=d(g),s.opacity=p(g),s+""}}return o.gamma=e,o})(1);function mP(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,o=t.slice(),s;return function(l){for(s=0;s<r;++s)o[s]=e[s]*(1-l)+t[s]*l;return o}}function gP(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function yP(e,t){var r=t?t.length:0,o=e?Math.min(r,e.length):0,s=new Array(o),l=new Array(r),u;for(u=0;u<o;++u)s[u]=qo(e[u],t[u]);for(;u<r;++u)l[u]=t[u];return function(f){for(u=0;u<o;++u)l[u]=s[u](f);return l}}function vP(e,t){var r=new Date;return e=+e,t=+t,function(o){return r.setTime(e*(1-o)+t*o),r}}function yn(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function xP(e,t){var r={},o={},s;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(s in t)s in e?r[s]=qo(e[s],t[s]):o[s]=t[s];return function(l){for(s in r)o[s]=r[s](l);return o}}var zf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,af=new RegExp(zf.source,"g");function wP(e){return function(){return e}}function SP(e){return function(t){return e(t)+""}}function ix(e,t){var r=zf.lastIndex=af.lastIndex=0,o,s,l,u=-1,f=[],d=[];for(e=e+"",t=t+"";(o=zf.exec(e))&&(s=af.exec(t));)(l=s.index)>r&&(l=t.slice(r,l),f[u]?f[u]+=l:f[++u]=l),(o=o[0])===(s=s[0])?f[u]?f[u]+=s:f[++u]=s:(f[++u]=null,d.push({i:u,x:yn(o,s)})),r=af.lastIndex;return r<t.length&&(l=t.slice(r),f[u]?f[u]+=l:f[++u]=l),f.length<2?d[0]?SP(d[0].x):wP(t):(t=d.length,function(p){for(var g=0,m;g<t;++g)f[(m=d[g]).i]=m.x(p);return f.join("")})}function qo(e,t){var r=typeof t,o;return t==null||r==="boolean"?Dd(t):(r==="number"?yn:r==="string"?(o=Hr(t))?(t=o,Sl):ix:t instanceof Hr?Sl:t instanceof Date?vP:gP(t)?mP:Array.isArray(t)?yP:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?xP:yn)(e,t)}var r0=180/Math.PI,Ff={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ox(e,t,r,o,s,l){var u,f,d;return(u=Math.sqrt(e*e+t*t))&&(e/=u,t/=u),(d=e*r+t*o)&&(r-=e*d,o-=t*d),(f=Math.sqrt(r*r+o*o))&&(r/=f,o/=f,d/=f),e*o<t*r&&(e=-e,t=-t,d=-d,u=-u),{translateX:s,translateY:l,rotate:Math.atan2(t,e)*r0,skewX:Math.atan(d)*r0,scaleX:u,scaleY:f}}var Ga;function kP(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ff:ox(t.a,t.b,t.c,t.d,t.e,t.f)}function EP(e){return e==null||(Ga||(Ga=document.createElementNS("http://www.w3.org/2000/svg","g")),Ga.setAttribute("transform",e),!(e=Ga.transform.baseVal.consolidate()))?Ff:(e=e.matrix,ox(e.a,e.b,e.c,e.d,e.e,e.f))}function sx(e,t,r,o){function s(p){return p.length?p.pop()+" ":""}function l(p,g,m,v,x,w){if(p!==m||g!==v){var _=x.push("translate(",null,t,null,r);w.push({i:_-4,x:yn(p,m)},{i:_-2,x:yn(g,v)})}else(m||v)&&x.push("translate("+m+t+v+r)}function u(p,g,m,v){p!==g?(p-g>180?g+=360:g-p>180&&(p+=360),v.push({i:m.push(s(m)+"rotate(",null,o)-2,x:yn(p,g)})):g&&m.push(s(m)+"rotate("+g+o)}function f(p,g,m,v){p!==g?v.push({i:m.push(s(m)+"skewX(",null,o)-2,x:yn(p,g)}):g&&m.push(s(m)+"skewX("+g+o)}function d(p,g,m,v,x,w){if(p!==m||g!==v){var _=x.push(s(x)+"scale(",null,",",null,")");w.push({i:_-4,x:yn(p,m)},{i:_-2,x:yn(g,v)})}else(m!==1||v!==1)&&x.push(s(x)+"scale("+m+","+v+")")}return function(p,g){var m=[],v=[];return p=e(p),g=e(g),l(p.translateX,p.translateY,g.translateX,g.translateY,m,v),u(p.rotate,g.rotate,m,v),f(p.skewX,g.skewX,m,v),d(p.scaleX,p.scaleY,g.scaleX,g.scaleY,m,v),p=g=null,function(x){for(var w=-1,_=v.length,C;++w<_;)m[(C=v[w]).i]=C.x(x);return m.join("")}}}var CP=sx(kP,"px, ","px)","deg)"),_P=sx(EP,", ",")",")"),TP=1e-12;function i0(e){return((e=Math.exp(e))+1/e)/2}function PP(e){return((e=Math.exp(e))-1/e)/2}function MP(e){return((e=Math.exp(2*e))-1)/(e+1)}const sl=(function e(t,r,o){function s(l,u){var f=l[0],d=l[1],p=l[2],g=u[0],m=u[1],v=u[2],x=g-f,w=m-d,_=x*x+w*w,C,E;if(_<TP)E=Math.log(v/p)/t,C=function(O){return[f+O*x,d+O*w,p*Math.exp(t*O*E)]};else{var M=Math.sqrt(_),k=(v*v-p*p+o*_)/(2*p*r*M),P=(v*v-p*p-o*_)/(2*v*r*M),R=Math.log(Math.sqrt(k*k+1)-k),D=Math.log(Math.sqrt(P*P+1)-P);E=(D-R)/t,C=function(O){var F=O*E,K=i0(R),J=p/(r*M)*(K*MP(t*F+R)-PP(R));return[f+J*x,d+J*w,p*K/i0(t*F+R)]}}return C.duration=E*1e3*t/Math.SQRT2,C}return s.rho=function(l){var u=Math.max(.001,+l),f=u*u,d=f*f;return e(u,f,d)},s})(Math.SQRT2,2,4);var Fi=0,Wo=0,Fo=0,ax=1e3,kl,Xo,El=0,Ur=0,zl=0,as=typeof performance=="object"&&performance.now?performance:Date,lx=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Id(){return Ur||(lx(NP),Ur=as.now()+zl)}function NP(){Ur=0}function Cl(){this._call=this._time=this._next=null}Cl.prototype=ux.prototype={constructor:Cl,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Id():+r)+(t==null?0:+t),!this._next&&Xo!==this&&(Xo?Xo._next=this:kl=this,Xo=this),this._call=e,this._time=r,Bf()},stop:function(){this._call&&(this._call=null,this._time=1/0,Bf())}};function ux(e,t,r){var o=new Cl;return o.restart(e,t,r),o}function AP(){Id(),++Fi;for(var e=kl,t;e;)(t=Ur-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Fi}function o0(){Ur=(El=as.now())+zl,Fi=Wo=0;try{AP()}finally{Fi=0,RP(),Ur=0}}function bP(){var e=as.now(),t=e-El;t>ax&&(zl-=t,El=e)}function RP(){for(var e,t=kl,r,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:kl=r);Xo=e,Bf(o)}function Bf(e){if(!Fi){Wo&&(Wo=clearTimeout(Wo));var t=e-Ur;t>24?(e<1/0&&(Wo=setTimeout(o0,e-as.now()-zl)),Fo&&(Fo=clearInterval(Fo))):(Fo||(El=as.now(),Fo=setInterval(bP,ax)),Fi=1,lx(o0))}}function s0(e,t,r){var o=new Cl;return t=t==null?0:+t,o.restart(s=>{o.stop(),e(s+t)},t,r),o}var DP=jl("start","end","cancel","interrupt"),IP=[],cx=0,a0=1,Of=2,al=3,l0=4,$f=5,ll=6;function Fl(e,t,r,o,s,l){var u=e.__transition;if(!u)e.__transition={};else if(r in u)return;LP(e,r,{name:t,index:o,group:s,on:DP,tween:IP,time:l.time,delay:l.delay,duration:l.duration,ease:l.ease,timer:null,state:cx})}function Ld(e,t){var r=an(e,t);if(r.state>cx)throw new Error("too late; already scheduled");return r}function Sn(e,t){var r=an(e,t);if(r.state>al)throw new Error("too late; already running");return r}function an(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function LP(e,t,r){var o=e.__transition,s;o[t]=r,r.timer=ux(l,0,r.time);function l(p){r.state=a0,r.timer.restart(u,r.delay,r.time),r.delay<=p&&u(p-r.delay)}function u(p){var g,m,v,x;if(r.state!==a0)return d();for(g in o)if(x=o[g],x.name===r.name){if(x.state===al)return s0(u);x.state===l0?(x.state=ll,x.timer.stop(),x.on.call("interrupt",e,e.__data__,x.index,x.group),delete o[g]):+g<t&&(x.state=ll,x.timer.stop(),x.on.call("cancel",e,e.__data__,x.index,x.group),delete o[g])}if(s0(function(){r.state===al&&(r.state=l0,r.timer.restart(f,r.delay,r.time),f(p))}),r.state=Of,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Of){for(r.state=al,s=new Array(v=r.tween.length),g=0,m=-1;g<v;++g)(x=r.tween[g].value.call(e,e.__data__,r.index,r.group))&&(s[++m]=x);s.length=m+1}}function f(p){for(var g=p<r.duration?r.ease.call(null,p/r.duration):(r.timer.restart(d),r.state=$f,1),m=-1,v=s.length;++m<v;)s[m].call(e,g);r.state===$f&&(r.on.call("end",e,e.__data__,r.index,r.group),d())}function d(){r.state=ll,r.timer.stop(),delete o[t];for(var p in o)return;delete e.__transition}}function ul(e,t){var r=e.__transition,o,s,l=!0,u;if(r){t=t==null?null:t+"";for(u in r){if((o=r[u]).name!==t){l=!1;continue}s=o.state>Of&&o.state<$f,o.state=ll,o.timer.stop(),o.on.call(s?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete r[u]}l&&delete e.__transition}}function jP(e){return this.each(function(){ul(this,e)})}function VP(e,t){var r,o;return function(){var s=Sn(this,e),l=s.tween;if(l!==r){o=r=l;for(var u=0,f=o.length;u<f;++u)if(o[u].name===t){o=o.slice(),o.splice(u,1);break}}s.tween=o}}function zP(e,t,r){var o,s;if(typeof r!="function")throw new Error;return function(){var l=Sn(this,e),u=l.tween;if(u!==o){s=(o=u).slice();for(var f={name:t,value:r},d=0,p=s.length;d<p;++d)if(s[d].name===t){s[d]=f;break}d===p&&s.push(f)}l.tween=s}}function FP(e,t){var r=this._id;if(e+="",arguments.length<2){for(var o=an(this.node(),r).tween,s=0,l=o.length,u;s<l;++s)if((u=o[s]).name===e)return u.value;return null}return this.each((t==null?VP:zP)(r,e,t))}function jd(e,t,r){var o=e._id;return e.each(function(){var s=Sn(this,o);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return an(s,o).value[t]}}function fx(e,t){var r;return(typeof t=="number"?yn:t instanceof Hr?Sl:(r=Hr(t))?(t=r,Sl):ix)(e,t)}function BP(e){return function(){this.removeAttribute(e)}}function OP(e){return function(){this.removeAttributeNS(e.space,e.local)}}function $P(e,t,r){var o,s=r+"",l;return function(){var u=this.getAttribute(e);return u===s?null:u===o?l:l=t(o=u,r)}}function HP(e,t,r){var o,s=r+"",l;return function(){var u=this.getAttributeNS(e.space,e.local);return u===s?null:u===o?l:l=t(o=u,r)}}function UP(e,t,r){var o,s,l;return function(){var u,f=r(this),d;return f==null?void this.removeAttribute(e):(u=this.getAttribute(e),d=f+"",u===d?null:u===o&&d===s?l:(s=d,l=t(o=u,f)))}}function WP(e,t,r){var o,s,l;return function(){var u,f=r(this),d;return f==null?void this.removeAttributeNS(e.space,e.local):(u=this.getAttributeNS(e.space,e.local),d=f+"",u===d?null:u===o&&d===s?l:(s=d,l=t(o=u,f)))}}function XP(e,t){var r=Vl(e),o=r==="transform"?_P:fx;return this.attrTween(e,typeof t=="function"?(r.local?WP:UP)(r,o,jd(this,"attr."+e,t)):t==null?(r.local?OP:BP)(r):(r.local?HP:$P)(r,o,t))}function KP(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function YP(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function GP(e,t){var r,o;function s(){var l=t.apply(this,arguments);return l!==o&&(r=(o=l)&&YP(e,l)),r}return s._value=t,s}function QP(e,t){var r,o;function s(){var l=t.apply(this,arguments);return l!==o&&(r=(o=l)&&KP(e,l)),r}return s._value=t,s}function qP(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var o=Vl(e);return this.tween(r,(o.local?GP:QP)(o,t))}function ZP(e,t){return function(){Ld(this,e).delay=+t.apply(this,arguments)}}function JP(e,t){return t=+t,function(){Ld(this,e).delay=t}}function eM(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ZP:JP)(t,e)):an(this.node(),t).delay}function tM(e,t){return function(){Sn(this,e).duration=+t.apply(this,arguments)}}function nM(e,t){return t=+t,function(){Sn(this,e).duration=t}}function rM(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?tM:nM)(t,e)):an(this.node(),t).duration}function iM(e,t){if(typeof t!="function")throw new Error;return function(){Sn(this,e).ease=t}}function oM(e){var t=this._id;return arguments.length?this.each(iM(t,e)):an(this.node(),t).ease}function sM(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Sn(this,e).ease=r}}function aM(e){if(typeof e!="function")throw new Error;return this.each(sM(this._id,e))}function lM(e){typeof e!="function"&&(e=$v(e));for(var t=this._groups,r=t.length,o=new Array(r),s=0;s<r;++s)for(var l=t[s],u=l.length,f=o[s]=[],d,p=0;p<u;++p)(d=l[p])&&e.call(d,d.__data__,p,l)&&f.push(d);return new Bn(o,this._parents,this._name,this._id)}function uM(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,o=t.length,s=r.length,l=Math.min(o,s),u=new Array(o),f=0;f<l;++f)for(var d=t[f],p=r[f],g=d.length,m=u[f]=new Array(g),v,x=0;x<g;++x)(v=d[x]||p[x])&&(m[x]=v);for(;f<o;++f)u[f]=t[f];return new Bn(u,this._parents,this._name,this._id)}function cM(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function fM(e,t,r){var o,s,l=cM(t)?Ld:Sn;return function(){var u=l(this,e),f=u.on;f!==o&&(s=(o=f).copy()).on(t,r),u.on=s}}function dM(e,t){var r=this._id;return arguments.length<2?an(this.node(),r).on.on(e):this.each(fM(r,e,t))}function hM(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function pM(){return this.on("end.remove",hM(this._id))}function mM(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Ad(e));for(var o=this._groups,s=o.length,l=new Array(s),u=0;u<s;++u)for(var f=o[u],d=f.length,p=l[u]=new Array(d),g,m,v=0;v<d;++v)(g=f[v])&&(m=e.call(g,g.__data__,v,f))&&("__data__"in g&&(m.__data__=g.__data__),p[v]=m,Fl(p[v],t,r,v,p,an(g,r)));return new Bn(l,this._parents,t,r)}function gM(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Ov(e));for(var o=this._groups,s=o.length,l=[],u=[],f=0;f<s;++f)for(var d=o[f],p=d.length,g,m=0;m<p;++m)if(g=d[m]){for(var v=e.call(g,g.__data__,m,d),x,w=an(g,r),_=0,C=v.length;_<C;++_)(x=v[_])&&Fl(x,t,r,_,v,w);l.push(v),u.push(g)}return new Bn(l,u,t,r)}var yM=vs.prototype.constructor;function vM(){return new yM(this._groups,this._parents)}function xM(e,t){var r,o,s;return function(){var l=zi(this,e),u=(this.style.removeProperty(e),zi(this,e));return l===u?null:l===r&&u===o?s:s=t(r=l,o=u)}}function dx(e){return function(){this.style.removeProperty(e)}}function wM(e,t,r){var o,s=r+"",l;return function(){var u=zi(this,e);return u===s?null:u===o?l:l=t(o=u,r)}}function SM(e,t,r){var o,s,l;return function(){var u=zi(this,e),f=r(this),d=f+"";return f==null&&(d=f=(this.style.removeProperty(e),zi(this,e))),u===d?null:u===o&&d===s?l:(s=d,l=t(o=u,f))}}function kM(e,t){var r,o,s,l="style."+t,u="end."+l,f;return function(){var d=Sn(this,e),p=d.on,g=d.value[l]==null?f||(f=dx(t)):void 0;(p!==r||s!==g)&&(o=(r=p).copy()).on(u,s=g),d.on=o}}function EM(e,t,r){var o=(e+="")=="transform"?CP:fx;return t==null?this.styleTween(e,xM(e,o)).on("end.style."+e,dx(e)):typeof t=="function"?this.styleTween(e,SM(e,o,jd(this,"style."+e,t))).each(kM(this._id,e)):this.styleTween(e,wM(e,o,t),r).on("end.style."+e,null)}function CM(e,t,r){return function(o){this.style.setProperty(e,t.call(this,o),r)}}function _M(e,t,r){var o,s;function l(){var u=t.apply(this,arguments);return u!==s&&(o=(s=u)&&CM(e,u,r)),o}return l._value=t,l}function TM(e,t,r){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,_M(e,t,r??""))}function PM(e){return function(){this.textContent=e}}function MM(e){return function(){var t=e(this);this.textContent=t??""}}function NM(e){return this.tween("text",typeof e=="function"?MM(jd(this,"text",e)):PM(e==null?"":e+""))}function AM(e){return function(t){this.textContent=e.call(this,t)}}function bM(e){var t,r;function o(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&AM(s)),t}return o._value=e,o}function RM(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,bM(e))}function DM(){for(var e=this._name,t=this._id,r=hx(),o=this._groups,s=o.length,l=0;l<s;++l)for(var u=o[l],f=u.length,d,p=0;p<f;++p)if(d=u[p]){var g=an(d,t);Fl(d,e,r,p,u,{time:g.time+g.delay+g.duration,delay:0,duration:g.duration,ease:g.ease})}return new Bn(o,this._parents,e,r)}function IM(){var e,t,r=this,o=r._id,s=r.size();return new Promise(function(l,u){var f={value:u},d={value:function(){--s===0&&l()}};r.each(function(){var p=Sn(this,o),g=p.on;g!==e&&(t=(e=g).copy(),t._.cancel.push(f),t._.interrupt.push(f),t._.end.push(d)),p.on=t}),s===0&&l()})}var LM=0;function Bn(e,t,r,o){this._groups=e,this._parents=t,this._name=r,this._id=o}function hx(){return++LM}var In=vs.prototype;Bn.prototype={constructor:Bn,select:mM,selectAll:gM,selectChild:In.selectChild,selectChildren:In.selectChildren,filter:lM,merge:uM,selection:vM,transition:DM,call:In.call,nodes:In.nodes,node:In.node,size:In.size,empty:In.empty,each:In.each,on:dM,attr:XP,attrTween:qP,style:EM,styleTween:TM,text:NM,textTween:RM,remove:pM,tween:FP,delay:eM,duration:rM,ease:oM,easeVarying:aM,end:IM,[Symbol.iterator]:In[Symbol.iterator]};function jM(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var VM={time:null,delay:0,duration:250,ease:jM};function zM(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function FM(e){var t,r;e instanceof Bn?(t=e._id,e=e._name):(t=hx(),(r=VM).time=Id(),e=e==null?null:e+"");for(var o=this._groups,s=o.length,l=0;l<s;++l)for(var u=o[l],f=u.length,d,p=0;p<f;++p)(d=u[p])&&Fl(d,e,t,p,u,r||zM(d,t));return new Bn(o,this._parents,e,t)}vs.prototype.interrupt=jP;vs.prototype.transition=FM;const Qa=e=>()=>e;function BM(e,{sourceEvent:t,target:r,transform:o,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:s}})}function Ln(e,t,r){this.k=e,this.x=t,this.y=r}Ln.prototype={constructor:Ln,scale:function(e){return e===1?this:new Ln(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ln(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Bl=new Ln(1,0,0);px.prototype=Ln.prototype;function px(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Bl;return e.__zoom}function lf(e){e.stopImmediatePropagation()}function Bo(e){e.preventDefault(),e.stopImmediatePropagation()}function OM(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function $M(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function u0(){return this.__zoom||Bl}function HM(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function UM(){return navigator.maxTouchPoints||"ontouchstart"in this}function WM(e,t,r){var o=e.invertX(t[0][0])-r[0][0],s=e.invertX(t[1][0])-r[1][0],l=e.invertY(t[0][1])-r[0][1],u=e.invertY(t[1][1])-r[1][1];return e.translate(s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s),u>l?(l+u)/2:Math.min(0,l)||Math.max(0,u))}function mx(){var e=OM,t=$M,r=WM,o=HM,s=UM,l=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],f=250,d=sl,p=jl("start","zoom","end"),g,m,v,x=500,w=150,_=0,C=10;function E(A){A.property("__zoom",u0).on("wheel.zoom",F,{passive:!1}).on("mousedown.zoom",K).on("dblclick.zoom",J).filter(s).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(A,W,H,$){var I=A.selection?A.selection():A;I.property("__zoom",u0),A!==I?R(A,W,H,$):I.interrupt().each(function(){D(this,arguments).event($).start().zoom(null,typeof W=="function"?W.apply(this,arguments):W).end()})},E.scaleBy=function(A,W,H,$){E.scaleTo(A,function(){var I=this.__zoom.k,z=typeof W=="function"?W.apply(this,arguments):W;return I*z},H,$)},E.scaleTo=function(A,W,H,$){E.transform(A,function(){var I=t.apply(this,arguments),z=this.__zoom,U=H==null?P(I):typeof H=="function"?H.apply(this,arguments):H,N=z.invert(U),j=typeof W=="function"?W.apply(this,arguments):W;return r(k(M(z,j),U,N),I,u)},H,$)},E.translateBy=function(A,W,H,$){E.transform(A,function(){return r(this.__zoom.translate(typeof W=="function"?W.apply(this,arguments):W,typeof H=="function"?H.apply(this,arguments):H),t.apply(this,arguments),u)},null,$)},E.translateTo=function(A,W,H,$,I){E.transform(A,function(){var z=t.apply(this,arguments),U=this.__zoom,N=$==null?P(z):typeof $=="function"?$.apply(this,arguments):$;return r(Bl.translate(N[0],N[1]).scale(U.k).translate(typeof W=="function"?-W.apply(this,arguments):-W,typeof H=="function"?-H.apply(this,arguments):-H),z,u)},$,I)};function M(A,W){return W=Math.max(l[0],Math.min(l[1],W)),W===A.k?A:new Ln(W,A.x,A.y)}function k(A,W,H){var $=W[0]-H[0]*A.k,I=W[1]-H[1]*A.k;return $===A.x&&I===A.y?A:new Ln(A.k,$,I)}function P(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function R(A,W,H,$){A.on("start.zoom",function(){D(this,arguments).event($).start()}).on("interrupt.zoom end.zoom",function(){D(this,arguments).event($).end()}).tween("zoom",function(){var I=this,z=arguments,U=D(I,z).event($),N=t.apply(I,z),j=H==null?P(N):typeof H=="function"?H.apply(I,z):H,te=Math.max(N[1][0]-N[0][0],N[1][1]-N[0][1]),ie=I.__zoom,le=typeof W=="function"?W.apply(I,z):W,ce=d(ie.invert(j).concat(te/ie.k),le.invert(j).concat(te/le.k));return function(ue){if(ue===1)ue=le;else{var Q=ce(ue),oe=te/Q[2];ue=new Ln(oe,j[0]-Q[0]*oe,j[1]-Q[1]*oe)}U.zoom(null,ue)}})}function D(A,W,H){return!H&&A.__zooming||new O(A,W)}function O(A,W){this.that=A,this.args=W,this.active=0,this.sourceEvent=null,this.extent=t.apply(A,W),this.taps=0}O.prototype={event:function(A){return A&&(this.sourceEvent=A),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(A,W){return this.mouse&&A!=="mouse"&&(this.mouse[1]=W.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=W.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=W.invert(this.touch1[0])),this.that.__zoom=W,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var W=It(this.that).datum();p.call(A,this.that,new BM(A,{sourceEvent:this.sourceEvent,target:E,transform:this.that.__zoom,dispatch:p}),W)}};function F(A,...W){if(!e.apply(this,arguments))return;var H=D(this,W).event(A),$=this.__zoom,I=Math.max(l[0],Math.min(l[1],$.k*Math.pow(2,o.apply(this,arguments)))),z=tn(A);if(H.wheel)(H.mouse[0][0]!==z[0]||H.mouse[0][1]!==z[1])&&(H.mouse[1]=$.invert(H.mouse[0]=z)),clearTimeout(H.wheel);else{if($.k===I)return;H.mouse=[z,$.invert(z)],ul(this),H.start()}Bo(A),H.wheel=setTimeout(U,w),H.zoom("mouse",r(k(M($,I),H.mouse[0],H.mouse[1]),H.extent,u));function U(){H.wheel=null,H.end()}}function K(A,...W){if(v||!e.apply(this,arguments))return;var H=A.currentTarget,$=D(this,W,!0).event(A),I=It(A.view).on("mousemove.zoom",j,!0).on("mouseup.zoom",te,!0),z=tn(A,H),U=A.clientX,N=A.clientY;Zv(A.view),lf(A),$.mouse=[z,this.__zoom.invert(z)],ul(this),$.start();function j(ie){if(Bo(ie),!$.moved){var le=ie.clientX-U,ce=ie.clientY-N;$.moved=le*le+ce*ce>_}$.event(ie).zoom("mouse",r(k($.that.__zoom,$.mouse[0]=tn(ie,H),$.mouse[1]),$.extent,u))}function te(ie){I.on("mousemove.zoom mouseup.zoom",null),Jv(ie.view,$.moved),Bo(ie),$.event(ie).end()}}function J(A,...W){if(e.apply(this,arguments)){var H=this.__zoom,$=tn(A.changedTouches?A.changedTouches[0]:A,this),I=H.invert($),z=H.k*(A.shiftKey?.5:2),U=r(k(M(H,z),$,I),t.apply(this,W),u);Bo(A),f>0?It(this).transition().duration(f).call(R,U,$,A):It(this).call(E.transform,U,$,A)}}function q(A,...W){if(e.apply(this,arguments)){var H=A.touches,$=H.length,I=D(this,W,A.changedTouches.length===$).event(A),z,U,N,j;for(lf(A),U=0;U<$;++U)N=H[U],j=tn(N,this),j=[j,this.__zoom.invert(j),N.identifier],I.touch0?!I.touch1&&I.touch0[2]!==j[2]&&(I.touch1=j,I.taps=0):(I.touch0=j,z=!0,I.taps=1+!!g);g&&(g=clearTimeout(g)),z&&(I.taps<2&&(m=j[0],g=setTimeout(function(){g=null},x)),ul(this),I.start())}}function ee(A,...W){if(this.__zooming){var H=D(this,W).event(A),$=A.changedTouches,I=$.length,z,U,N,j;for(Bo(A),z=0;z<I;++z)U=$[z],N=tn(U,this),H.touch0&&H.touch0[2]===U.identifier?H.touch0[0]=N:H.touch1&&H.touch1[2]===U.identifier&&(H.touch1[0]=N);if(U=H.that.__zoom,H.touch1){var te=H.touch0[0],ie=H.touch0[1],le=H.touch1[0],ce=H.touch1[1],ue=(ue=le[0]-te[0])*ue+(ue=le[1]-te[1])*ue,Q=(Q=ce[0]-ie[0])*Q+(Q=ce[1]-ie[1])*Q;U=M(U,Math.sqrt(ue/Q)),N=[(te[0]+le[0])/2,(te[1]+le[1])/2],j=[(ie[0]+ce[0])/2,(ie[1]+ce[1])/2]}else if(H.touch0)N=H.touch0[0],j=H.touch0[1];else return;H.zoom("touch",r(k(U,N,j),H.extent,u))}}function Z(A,...W){if(this.__zooming){var H=D(this,W).event(A),$=A.changedTouches,I=$.length,z,U;for(lf(A),v&&clearTimeout(v),v=setTimeout(function(){v=null},x),z=0;z<I;++z)U=$[z],H.touch0&&H.touch0[2]===U.identifier?delete H.touch0:H.touch1&&H.touch1[2]===U.identifier&&delete H.touch1;if(H.touch1&&!H.touch0&&(H.touch0=H.touch1,delete H.touch1),H.touch0)H.touch0[1]=this.__zoom.invert(H.touch0[0]);else if(H.end(),H.taps===2&&(U=tn(U,this),Math.hypot(m[0]-U[0],m[1]-U[1])<C)){var N=It(this).on("dblclick.zoom");N&&N.apply(this,arguments)}}}return E.wheelDelta=function(A){return arguments.length?(o=typeof A=="function"?A:Qa(+A),E):o},E.filter=function(A){return arguments.length?(e=typeof A=="function"?A:Qa(!!A),E):e},E.touchable=function(A){return arguments.length?(s=typeof A=="function"?A:Qa(!!A),E):s},E.extent=function(A){return arguments.length?(t=typeof A=="function"?A:Qa([[+A[0][0],+A[0][1]],[+A[1][0],+A[1][1]]]),E):t},E.scaleExtent=function(A){return arguments.length?(l[0]=+A[0],l[1]=+A[1],E):[l[0],l[1]]},E.translateExtent=function(A){return arguments.length?(u[0][0]=+A[0][0],u[1][0]=+A[1][0],u[0][1]=+A[0][1],u[1][1]=+A[1][1],E):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},E.constrain=function(A){return arguments.length?(r=A,E):r},E.duration=function(A){return arguments.length?(f=+A,E):f},E.interpolate=function(A){return arguments.length?(d=A,E):d},E.on=function(){var A=p.on.apply(p,arguments);return A===p?E:A},E.clickDistance=function(A){return arguments.length?(_=(A=+A)*A,E):Math.sqrt(_)},E.tapDistance=function(A){return arguments.length?(C=+A,E):C},E}const sn={error001:(e="react")=>`Seems like you have not used ${e==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${e}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:e=>`Node type "${e}" 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:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:r,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?r:o}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},ls=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],gx=["Enter"," ","Escape"],yx={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:r})=>`Moved selected node ${e}. New position, x: ${t}, y: ${r}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Bi;(function(e){e.Strict="strict",e.Loose="loose"})(Bi||(Bi={}));var $r;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})($r||($r={}));var us;(function(e){e.Partial="partial",e.Full="full"})(us||(us={}));const vx={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var fr;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(fr||(fr={}));var _l;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(_l||(_l={}));var xe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(xe||(xe={}));const c0={[xe.Left]:xe.Right,[xe.Right]:xe.Left,[xe.Top]:xe.Bottom,[xe.Bottom]:xe.Top};function xx(e){return e===null?null:e?"valid":"invalid"}const wx=e=>!!e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e,XM=e=>!!e&&typeof e=="object"&&"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Vd=e=>!!e&&typeof e=="object"&&"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),ws=(e,t=[0,0])=>{const{width:r,height:o}=kn(e),s=e.origin??t,l=r*s[0],u=o*s[1];return{x:e.position.x-l,y:e.position.y-u}},KM=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const r=e.reduce((o,s)=>{const l=typeof s=="string";let u=!t.nodeLookup&&!l?s:void 0;t.nodeLookup&&(u=l?t.nodeLookup.get(s):Vd(s)?s:t.nodeLookup.get(s.id));const f=u?Tl(u,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Ol(o,f)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return $l(r)},Ss=(e,t={})=>{let r={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(s=>{(t.filter===void 0||t.filter(s))&&(r=Ol(r,Tl(s)),o=!0)}),o?$l(r):{x:0,y:0,width:0,height:0}},zd=(e,t,[r,o,s]=[0,0,1],l=!1,u=!1)=>{const f=(t.x-r)/s,d=(t.y-o)/s,p=t.width/s,g=t.height/s,m=[];for(const v of e.values()){const{measured:x,selectable:w=!0,hidden:_=!1}=v;if(u&&!w||_)continue;const C=x.width??v.width??v.initialWidth??0,E=x.height??v.height??v.initialHeight??0,{x:M,y:k}=v.internals.positionAbsolute,P=Cx(f,d,p,g,M,k,C,E),R=C*E,D=l&&P>0;(!v.internals.handleBounds||D||P>=R||v.dragging)&&m.push(v)}return m},YM=(e,t)=>{const r=new Set;return e.forEach(o=>{r.add(o.id)}),t.filter(o=>r.has(o.source)||r.has(o.target))};function GM(e,t){const r=new Map,o=t!=null&&t.nodes?new Set(t.nodes.map(s=>s.id)):null;return e.forEach(s=>{let l;if(t!=null&&t.includeHiddenNodes){const{width:u,height:f}=kn(s);l=u>0&&f>0}else l=!!(s.measured.width&&s.measured.height&&!s.hidden);l&&(!o||o.has(s.id))&&r.set(s.id,s)}),r}async function QM({nodes:e,width:t,height:r,panZoom:o,minZoom:s,maxZoom:l},u){if(e.size===0)return!0;const f=GM(e,u),d=Ss(f),p=Bd(d,t,r,(u==null?void 0:u.minZoom)??s,(u==null?void 0:u.maxZoom)??l,(u==null?void 0:u.padding)??.1);return await o.setViewport(p,{duration:u==null?void 0:u.duration,ease:u==null?void 0:u.ease,interpolate:u==null?void 0:u.interpolate}),!0}function Sx({nodeId:e,nextPosition:t,nodeLookup:r,nodeOrigin:o=[0,0],nodeExtent:s,onError:l}){const u=r.get(e),f=u.parentId?r.get(u.parentId):void 0,{x:d,y:p}=f?f.internals.positionAbsolute:{x:0,y:0},g=u.origin??o;let m=u.extent||s;if(u.extent==="parent"&&!u.expandParent)if(!f)l==null||l("005",sn.error005());else{const x=f.measured.width,w=f.measured.height;x&&w&&(m=[[d,p],[d+x,p+w]])}else f&&Xr(u.extent)&&(m=[[u.extent[0][0]+d,u.extent[0][1]+p],[u.extent[1][0]+d,u.extent[1][1]+p]]);const v=Xr(m)?Wr(t,m,u.measured):t;return(u.measured.width===void 0||u.measured.height===void 0)&&(l==null||l("015",sn.error015())),{position:{x:v.x-d+(u.measured.width??0)*g[0],y:v.y-p+(u.measured.height??0)*g[1]},positionAbsolute:v}}async function qM({nodesToRemove:e=[],edgesToRemove:t=[],nodes:r,edges:o,onBeforeDelete:s}){const l=new Set(e.map(v=>v.id)),u=[];for(const v of r){if(v.deletable===!1)continue;const x=l.has(v.id),w=!x&&v.parentId&&u.find(_=>_.id===v.parentId);(x||w)&&u.push(v)}const f=new Set(t.map(v=>v.id)),d=o.filter(v=>v.deletable!==!1),g=YM(u,d);for(const v of d)f.has(v.id)&&!g.find(w=>w.id===v.id)&&g.push(v);if(!s)return{edges:g,nodes:u};const m=await s({nodes:u,edges:g});return typeof m=="boolean"?m?{edges:g,nodes:u}:{edges:[],nodes:[]}:m}const Oi=(e,t=0,r=1)=>Math.min(Math.max(e,t),r),Wr=(e={x:0,y:0},t,r)=>({x:Oi(e.x,t[0][0],t[1][0]-((r==null?void 0:r.width)??0)),y:Oi(e.y,t[0][1],t[1][1]-((r==null?void 0:r.height)??0))});function kx(e,t,r){const{width:o,height:s}=kn(r),{x:l,y:u}=r.internals.positionAbsolute;return Wr(e,[[l,u],[l+o,u+s]],t)}const f0=(e,t,r)=>e<t?Oi(Math.abs(e-t),1,t)/t:e>r?-Oi(Math.abs(e-r),1,t)/t:0,Fd=(e,t,r=15,o=40)=>{const s=f0(e.x,o,t.width-o)*r,l=f0(e.y,o,t.height-o)*r;return[s,l]},Ol=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Hf=({x:e,y:t,width:r,height:o})=>({x:e,y:t,x2:e+r,y2:t+o}),$l=({x:e,y:t,x2:r,y2:o})=>({x:e,y:t,width:r-e,height:o-t}),cs=(e,t=[0,0])=>{var s,l;const{x:r,y:o}=Vd(e)?e.internals.positionAbsolute:ws(e,t);return{x:r,y:o,width:((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0,height:((l=e.measured)==null?void 0:l.height)??e.height??e.initialHeight??0}},Tl=(e,t=[0,0])=>{var s,l;const{x:r,y:o}=Vd(e)?e.internals.positionAbsolute:ws(e,t);return{x:r,y:o,x2:r+(((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0),y2:o+(((l=e.measured)==null?void 0:l.height)??e.height??e.initialHeight??0)}},Ex=(e,t)=>$l(Ol(Hf(e),Hf(t))),Cx=(e,t,r,o,s,l,u,f)=>{const d=Math.max(0,Math.min(e+r,s+u)-Math.max(e,s)),p=Math.max(0,Math.min(t+o,l+f)-Math.max(t,l));return Math.ceil(d*p)},Pl=(e,t)=>Cx(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),d0=e=>rn(e.width)&&rn(e.height)&&rn(e.x)&&rn(e.y),rn=e=>!isNaN(e)&&isFinite(e),_x=(e,t)=>(r,o)=>{},ks=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Es=({x:e,y:t},[r,o,s],l=!1,u=[1,1])=>{const f={x:(e-r)/s,y:(t-o)/s};return l?ks(f,u):f},$i=({x:e,y:t},[r,o,s])=>({x:e*s+r,y:t*s+o});function _i(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(r)}if(typeof e=="string"&&e.endsWith("%")){const r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(t*r*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function ZM(e,t,r){if(typeof e=="string"||typeof e=="number"){const o=_i(e,r),s=_i(e,t);return{top:o,right:s,bottom:o,left:s,x:s*2,y:o*2}}if(typeof e=="object"){const o=_i(e.top??e.y??0,r),s=_i(e.bottom??e.y??0,r),l=_i(e.left??e.x??0,t),u=_i(e.right??e.x??0,t);return{top:o,right:u,bottom:s,left:l,x:l+u,y:o+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function JM(e,t,r,o,s,l){const{x:u,y:f}=$i(e,[t,r,o]),{x:d,y:p}=$i({x:e.x+e.width,y:e.y+e.height},[t,r,o]),g=s-d,m=l-p;return{left:Math.floor(u),top:Math.floor(f),right:Math.floor(g),bottom:Math.floor(m)}}const Bd=(e,t,r,o,s,l)=>{const u=ZM(l,t,r),f=(t-u.x)/e.width,d=(r-u.y)/e.height,p=Math.min(f,d),g=Oi(p,o,s),m=e.x+e.width/2,v=e.y+e.height/2,x=t/2-m*g,w=r/2-v*g,_=JM(e,x,w,g,t,r),C={left:Math.min(_.left-u.left,0),top:Math.min(_.top-u.top,0),right:Math.min(_.right-u.right,0),bottom:Math.min(_.bottom-u.bottom,0)};return{x:x-C.left+C.right,y:w-C.top+C.bottom,zoom:g}},fs=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Xr(e){return e!=null&&e!=="parent"}function kn(e){var t,r;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((r=e.measured)==null?void 0:r.height)??e.height??e.initialHeight??0}}function Tx(e){var t,r;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((r=e.measured)==null?void 0:r.height)??e.height??e.initialHeight)!==void 0}function Px(e,t={width:0,height:0},r,o,s){const l={...e},u=o.get(r);if(u){const f=u.origin||s;l.x+=u.internals.positionAbsolute.x-(t.width??0)*f[0],l.y+=u.internals.positionAbsolute.y-(t.height??0)*f[1]}return l}function h0(e,t){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}function eN(){let e,t;return{promise:new Promise((o,s)=>{e=o,t=s}),resolve:e,reject:t}}function tN(e){return{...yx,...e||{}}}function Zo(e,{snapGrid:t=[0,0],snapToGrid:r=!1,transform:o,containerBounds:s}){const{x:l,y:u}=on(e),f=Es({x:l-((s==null?void 0:s.left)??0),y:u-((s==null?void 0:s.top)??0)},o),{x:d,y:p}=r?ks(f,t):f;return{xSnapped:d,ySnapped:p,...f}}const Od=e=>({width:e.offsetWidth,height:e.offsetHeight}),Mx=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},nN=["INPUT","SELECT","TEXTAREA"];function Nx(e){var o,s;const t=((s=(o=e.composedPath)==null?void 0:o.call(e))==null?void 0:s[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:nN.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Ax=e=>"clientX"in e,on=(e,t)=>{var l,u;const r=Ax(e),o=r?e.clientX:(l=e.touches)==null?void 0:l[0].clientX,s=r?e.clientY:(u=e.touches)==null?void 0:u[0].clientY;return{x:o-((t==null?void 0:t.left)??0),y:s-((t==null?void 0:t.top)??0)}},p0=(e,t,r,o,s)=>{const l=t.querySelectorAll(`.${e}`);return!l||!l.length?null:Array.from(l).map(u=>{const f=u.getBoundingClientRect();return{id:u.getAttribute("data-handleid"),type:e,nodeId:s,position:u.getAttribute("data-handlepos"),x:(f.left-r.left)/o,y:(f.top-r.top)/o,...Od(u)}})};function bx({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:s,sourceControlY:l,targetControlX:u,targetControlY:f}){const d=e*.125+s*.375+u*.375+r*.125,p=t*.125+l*.375+f*.375+o*.125,g=Math.abs(d-e),m=Math.abs(p-t);return[d,p,g,m]}function qa(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function m0({pos:e,x1:t,y1:r,x2:o,y2:s,c:l}){switch(e){case xe.Left:return[t-qa(t-o,l),r];case xe.Right:return[t+qa(o-t,l),r];case xe.Top:return[t,r-qa(r-s,l)];case xe.Bottom:return[t,r+qa(s-r,l)]}}function Rx({sourceX:e,sourceY:t,sourcePosition:r=xe.Bottom,targetX:o,targetY:s,targetPosition:l=xe.Top,curvature:u=.25}){const[f,d]=m0({pos:r,x1:e,y1:t,x2:o,y2:s,c:u}),[p,g]=m0({pos:l,x1:o,y1:s,x2:e,y2:t,c:u}),[m,v,x,w]=bx({sourceX:e,sourceY:t,targetX:o,targetY:s,sourceControlX:f,sourceControlY:d,targetControlX:p,targetControlY:g});return[`M${e},${t} C${f},${d} ${p},${g} ${o},${s}`,m,v,x,w]}function Dx({sourceX:e,sourceY:t,targetX:r,targetY:o}){const s=Math.abs(r-e)/2,l=r<e?r+s:r-s,u=Math.abs(o-t)/2,f=o<t?o+u:o-u;return[l,f,s,u]}function rN({sourceNode:e,targetNode:t,selected:r=!1,zIndex:o=0,elevateOnSelect:s=!1,zIndexMode:l="basic"}){if(l==="manual")return o;const u=s&&r?o+1e3:o,f=Math.max(e.parentId||s&&e.selected?e.internals.z:0,t.parentId||s&&t.selected?t.internals.z:0);return u+f}function iN({sourceNode:e,targetNode:t,width:r,height:o,transform:s}){const l=Ol(Tl(e),Tl(t));l.x===l.x2&&(l.x2+=1),l.y===l.y2&&(l.y2+=1);const u={x:-s[0]/s[2],y:-s[1]/s[2],width:r/s[2],height:o/s[2]};return Pl(u,$l(l))>0}const oN=({source:e,sourceHandle:t,target:r,targetHandle:o})=>`xy-edge__${e}${t||""}-${r}${o||""}`,sN=(e,t)=>t.some(r=>r.source===e.source&&r.target===e.target&&(r.sourceHandle===e.sourceHandle||!r.sourceHandle&&!e.sourceHandle)&&(r.targetHandle===e.targetHandle||!r.targetHandle&&!e.targetHandle)),aN=(e,t,r={})=>{var l;if(!e.source||!e.target)return(l=r.onError)==null||l.call(r,"006",sn.error006()),t;const o=r.getEdgeId||oN;let s;return wx(e)?s={...e}:s={...e,id:o(e)},sN(s,t)?t:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,t.concat(s))};function Ix({sourceX:e,sourceY:t,targetX:r,targetY:o}){const[s,l,u,f]=Dx({sourceX:e,sourceY:t,targetX:r,targetY:o});return[`M ${e},${t}L ${r},${o}`,s,l,u,f]}const g0={[xe.Left]:{x:-1,y:0},[xe.Right]:{x:1,y:0},[xe.Top]:{x:0,y:-1},[xe.Bottom]:{x:0,y:1}},lN=({source:e,sourcePosition:t=xe.Bottom,target:r})=>t===xe.Left||t===xe.Right?e.x<r.x?{x:1,y:0}:{x:-1,y:0}:e.y<r.y?{x:0,y:1}:{x:0,y:-1},y0=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function uN({source:e,sourcePosition:t=xe.Bottom,target:r,targetPosition:o=xe.Top,center:s,offset:l,stepPosition:u}){const f=g0[t],d=g0[o],p={x:e.x+f.x*l,y:e.y+f.y*l},g={x:r.x+d.x*l,y:r.y+d.y*l},m=lN({source:p,sourcePosition:t,target:g}),v=m.x!==0?"x":"y",x=m[v];let w=[],_,C;const E={x:0,y:0},M={x:0,y:0},[,,k,P]=Dx({sourceX:e.x,sourceY:e.y,targetX:r.x,targetY:r.y});if(f[v]*d[v]===-1){v==="x"?(_=s.x??p.x+(g.x-p.x)*u,C=s.y??(p.y+g.y)/2):(_=s.x??(p.x+g.x)/2,C=s.y??p.y+(g.y-p.y)*u);const F=[{x:_,y:p.y},{x:_,y:g.y}],K=[{x:p.x,y:C},{x:g.x,y:C}];f[v]===x?w=v==="x"?F:K:w=v==="x"?K:F}else{const F=[{x:p.x,y:g.y}],K=[{x:g.x,y:p.y}];if(v==="x"?w=f.x===x?K:F:w=f.y===x?F:K,t===o){const A=Math.abs(e[v]-r[v]);if(A<=l){const W=Math.min(l-1,l-A);f[v]===x?E[v]=(p[v]>e[v]?-1:1)*W:M[v]=(g[v]>r[v]?-1:1)*W}}if(t!==o){const A=v==="x"?"y":"x",W=f[v]===d[A],H=p[A]>g[A],$=p[A]<g[A];(f[v]===1&&(!W&&H||W&&$)||f[v]!==1&&(!W&&$||W&&H))&&(w=v==="x"?F:K)}const J={x:p.x+E.x,y:p.y+E.y},q={x:g.x+M.x,y:g.y+M.y},ee=Math.max(Math.abs(J.x-w[0].x),Math.abs(q.x-w[0].x)),Z=Math.max(Math.abs(J.y-w[0].y),Math.abs(q.y-w[0].y));ee>=Z?(_=(J.x+q.x)/2,C=w[0].y):(_=w[0].x,C=(J.y+q.y)/2)}const R={x:p.x+E.x,y:p.y+E.y},D={x:g.x+M.x,y:g.y+M.y};return[[e,...R.x!==w[0].x||R.y!==w[0].y?[R]:[],...w,...D.x!==w[w.length-1].x||D.y!==w[w.length-1].y?[D]:[],r],_,C,k,P]}function cN(e,t,r,o){const s=Math.min(y0(e,t)/2,y0(t,r)/2,o),{x:l,y:u}=t;if(e.x===l&&l===r.x||e.y===u&&u===r.y)return`L${l} ${u}`;if(e.y===u){const p=e.x<r.x?-1:1,g=e.y<r.y?1:-1;return`L ${l+s*p},${u}Q ${l},${u} ${l},${u+s*g}`}const f=e.x<r.x?1:-1,d=e.y<r.y?-1:1;return`L ${l},${u+s*d}Q ${l},${u} ${l+s*f},${u}`}function Uf({sourceX:e,sourceY:t,sourcePosition:r=xe.Bottom,targetX:o,targetY:s,targetPosition:l=xe.Top,borderRadius:u=5,centerX:f,centerY:d,offset:p=20,stepPosition:g=.5}){const[m,v,x,w,_]=uN({source:{x:e,y:t},sourcePosition:r,target:{x:o,y:s},targetPosition:l,center:{x:f,y:d},offset:p,stepPosition:g});let C=`M${m[0].x} ${m[0].y}`;for(let E=1;E<m.length-1;E++)C+=cN(m[E-1],m[E],m[E+1],u);return C+=`L${m[m.length-1].x} ${m[m.length-1].y}`,[C,v,x,w,_]}function v0(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function fN(e){var m;const{sourceNode:t,targetNode:r}=e;if(!v0(t)||!v0(r))return null;const o=t.internals.handleBounds||x0(t.handles),s=r.internals.handleBounds||x0(r.handles),l=w0((o==null?void 0:o.source)??[],e.sourceHandle),u=w0(e.connectionMode===Bi.Strict?(s==null?void 0:s.target)??[]:((s==null?void 0:s.target)??[]).concat((s==null?void 0:s.source)??[]),e.targetHandle);if(!l||!u)return(m=e.onError)==null||m.call(e,"008",sn.error008(l?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const f=(l==null?void 0:l.position)||xe.Bottom,d=(u==null?void 0:u.position)||xe.Top,p=Kr(t,l,f),g=Kr(r,u,d);return{sourceX:p.x,sourceY:p.y,targetX:g.x,targetY:g.y,sourcePosition:f,targetPosition:d}}function x0(e){if(!e)return null;const t=[],r=[];for(const o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?t.push(o):o.type==="target"&&r.push(o);return{source:t,target:r}}function Kr(e,t,r=xe.Left,o=!1){const s=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,l=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:u,height:f}=t??kn(e);if(o)return{x:s+u/2,y:l+f/2};switch((t==null?void 0:t.position)??r){case xe.Top:return{x:s+u/2,y:l};case xe.Right:return{x:s+u,y:l+f/2};case xe.Bottom:return{x:s+u/2,y:l+f};case xe.Left:return{x:s,y:l+f/2}}}function w0(e,t){return e&&(t?e.find(r=>r.id===t):e[0])||null}function Wf(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function dN(e,{id:t,defaultColor:r,defaultMarkerStart:o,defaultMarkerEnd:s}){const l=new Set;return e.reduce((u,f)=>([f.markerStart||o,f.markerEnd||s].forEach(d=>{if(d&&typeof d=="object"){const p=Wf(d,t);l.has(p)||(u.push({id:p,color:d.color||r,...d}),l.add(p))}}),u),[]).sort((u,f)=>u.id.localeCompare(f.id))}const Lx=1e3,hN=10,$d={nodeOrigin:[0,0],nodeExtent:ls,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},pN={...$d,checkEquality:!0};function Hd(e,t){const r={...e};for(const o in t)t[o]!==void 0&&(r[o]=t[o]);return r}function mN(e,t,r){const o=Hd($d,r);for(const s of e.values())if(s.parentId)Wd(s,e,t,o);else{const l=ws(s,o.nodeOrigin),u=Xr(s.extent)?s.extent:o.nodeExtent,f=Wr(l,u,kn(s));s.internals.positionAbsolute=f}}function gN(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const r=[],o=[];for(const s of e.handles){const l={id:s.id,width:s.width??1,height:s.height??1,nodeId:e.id,x:s.x,y:s.y,position:s.position,type:s.type};s.type==="source"?r.push(l):s.type==="target"&&o.push(l)}return{source:r,target:o}}function Ud(e){return e==="manual"}function Xf(e,t,r,o={}){var g,m;const s=Hd(pN,o),l={i:0},u=new Map(t),f=s!=null&&s.elevateNodesOnSelect&&!Ud(s.zIndexMode)?Lx:0;let d=e.length>0,p=!1;t.clear(),r.clear();for(const v of e){let x=u.get(v.id);if(s.checkEquality&&v===(x==null?void 0:x.internals.userNode))t.set(v.id,x);else{const w=ws(v,s.nodeOrigin),_=Xr(v.extent)?v.extent:s.nodeExtent,C=Wr(w,_,kn(v));x={...s.defaults,...v,measured:{width:(g=v.measured)==null?void 0:g.width,height:(m=v.measured)==null?void 0:m.height},internals:{positionAbsolute:C,handleBounds:gN(v,x),z:jx(v,f,s.zIndexMode),userNode:v}},t.set(v.id,x)}(x.measured===void 0||x.measured.width===void 0||x.measured.height===void 0)&&!x.hidden&&(d=!1),v.parentId&&Wd(x,t,r,o,l),p||(p=v.selected??!1)}return{nodesInitialized:d,hasSelectedNodes:p}}function yN(e,t){if(!e.parentId)return;const r=t.get(e.parentId);r?r.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Wd(e,t,r,o,s){const{elevateNodesOnSelect:l,nodeOrigin:u,nodeExtent:f,zIndexMode:d}=Hd($d,o),p=e.parentId,g=t.get(p);if(!g){console.warn(`Parent node ${p} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}yN(e,r),s&&!g.parentId&&g.internals.rootParentIndex===void 0&&d==="auto"&&(g.internals.rootParentIndex=++s.i,g.internals.z=g.internals.z+s.i*hN),s&&g.internals.rootParentIndex!==void 0&&(s.i=g.internals.rootParentIndex);const m=l&&!Ud(d)?Lx:0,{x:v,y:x,z:w}=vN(e,g,u,f,m,d),{positionAbsolute:_}=e.internals,C=v!==_.x||x!==_.y;(C||w!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:C?{x:v,y:x}:_,z:w}})}function jx(e,t,r){const o=rn(e.zIndex)?e.zIndex:0;return Ud(r)?o:o+(e.selected?t:0)}function vN(e,t,r,o,s,l){const{x:u,y:f}=t.internals.positionAbsolute,d=kn(e),p=ws(e,r),g=Xr(e.extent)?Wr(p,e.extent,d):p;let m=Wr({x:u+g.x,y:f+g.y},o,d);e.extent==="parent"&&(m=kx(m,d,t));const v=jx(e,s,l),x=t.internals.z??0;return{x:m.x,y:m.y,z:x>=v?x+1:v}}function Xd(e,t,r,o=[0,0]){var u;const s=[],l=new Map;for(const f of e){const d=t.get(f.parentId);if(!d)continue;const p=((u=l.get(f.parentId))==null?void 0:u.expandedRect)??cs(d),g=Ex(p,f.rect);l.set(f.parentId,{expandedRect:g,parent:d})}return l.size>0&&l.forEach(({expandedRect:f,parent:d},p)=>{var k;const g=d.internals.positionAbsolute,m=kn(d),v=d.origin??o,x=f.x<g.x?Math.round(Math.abs(g.x-f.x)):0,w=f.y<g.y?Math.round(Math.abs(g.y-f.y)):0,_=Math.max(m.width,Math.round(f.width)),C=Math.max(m.height,Math.round(f.height)),E=(_-m.width)*v[0],M=(C-m.height)*v[1];(x>0||w>0||E||M)&&(s.push({id:p,type:"position",position:{x:d.position.x-x+E,y:d.position.y-w+M}}),(k=r.get(p))==null||k.forEach(P=>{e.some(R=>R.id===P.id)||s.push({id:P.id,type:"position",position:{x:P.position.x+x,y:P.position.y+w}})})),(m.width<f.width||m.height<f.height||x||w)&&s.push({id:p,type:"dimensions",setAttributes:!0,dimensions:{width:_+(x?v[0]*x-E:0),height:C+(w?v[1]*w-M:0)}})}),s}function xN(e,t,r,o,s,l,u){const f=o==null?void 0:o.querySelector(".xyflow__viewport");let d=!1;if(!f)return{changes:[],updatedInternals:d};const p=[],g=window.getComputedStyle(f),{m22:m}=new window.DOMMatrixReadOnly(g.transform),v=[];for(const x of e.values()){const w=t.get(x.id);if(!w)continue;if(w.hidden){t.set(w.id,{...w,internals:{...w.internals,handleBounds:void 0}}),d=!0;continue}const _=Od(x.nodeElement),C=w.measured.width!==_.width||w.measured.height!==_.height;if(!!(_.width&&_.height&&(C||!w.internals.handleBounds||x.force))){const M=x.nodeElement.getBoundingClientRect(),k=Xr(w.extent)?w.extent:l;let{positionAbsolute:P}=w.internals;if(w.parentId&&w.extent==="parent"){const D=t.get(w.parentId);D&&(P=kx(P,_,D))}else k&&(P=Wr(P,k,_));const R={...w,measured:_,internals:{...w.internals,positionAbsolute:P,handleBounds:{source:p0("source",x.nodeElement,M,m,w.id),target:p0("target",x.nodeElement,M,m,w.id)}}};t.set(w.id,R),w.parentId&&Wd(R,t,r,{nodeOrigin:s,zIndexMode:u}),d=!0,C&&(p.push({id:w.id,type:"dimensions",dimensions:_}),w.expandParent&&w.parentId&&v.push({id:w.id,parentId:w.parentId,rect:cs(R,s)}))}}if(v.length>0){const x=Xd(v,t,r,s);p.push(...x)}return{changes:p,updatedInternals:d}}async function wN({delta:e,panZoom:t,transform:r,translateExtent:o,width:s,height:l}){if(!t||!e.x&&!e.y)return!1;const u=await t.setViewportConstrained({x:r[0]+e.x,y:r[1]+e.y,zoom:r[2]},[[0,0],[s,l]],o);return!!u&&(u.x!==r[0]||u.y!==r[1]||u.k!==r[2])}function S0(e,t,r,o,s,l){let u=s;const f=o.get(u)||new Map;o.set(u,f.set(r,t)),u=`${s}-${e}`;const d=o.get(u)||new Map;if(o.set(u,d.set(r,t)),l){u=`${s}-${e}-${l}`;const p=o.get(u)||new Map;o.set(u,p.set(r,t))}}function Vx(e,t,r){e.clear(),t.clear();for(const o of r){const{source:s,target:l,sourceHandle:u=null,targetHandle:f=null}=o,d={edgeId:o.id,source:s,target:l,sourceHandle:u,targetHandle:f},p=`${s}-${u}--${l}-${f}`,g=`${l}-${f}--${s}-${u}`;S0("source",d,g,e,s,u),S0("target",d,p,e,l,f),t.set(o.id,o)}}function zx(e,t){if(!e.parentId)return!1;const r=t.get(e.parentId);return r?r.selected?!0:zx(r,t):!1}function k0(e,t,r){var s;let o=e;do{if((s=o==null?void 0:o.matches)!=null&&s.call(o,t))return!0;if(o===r)return!1;o=o==null?void 0:o.parentElement}while(o);return!1}function SN(e,t,r,o){const s=new Map;for(const[l,u]of e)if((u.selected||u.id===o)&&(!u.parentId||!zx(u,e))&&(u.draggable||t&&typeof u.draggable>"u")){const f=e.get(l);f&&s.set(l,{id:l,position:f.position||{x:0,y:0},distance:{x:r.x-f.internals.positionAbsolute.x,y:r.y-f.internals.positionAbsolute.y},extent:f.extent,parentId:f.parentId,origin:f.origin,expandParent:f.expandParent,internals:{positionAbsolute:f.internals.positionAbsolute||{x:0,y:0}},measured:{width:f.measured.width??0,height:f.measured.height??0}})}return s}function uf({nodeId:e,dragItems:t,nodeLookup:r,dragging:o=!0}){var u,f,d;const s=[];for(const[p,g]of t){const m=(u=r.get(p))==null?void 0:u.internals.userNode;m&&s.push({...m,position:g.position,dragging:o})}if(!e)return[s[0],s];const l=(f=r.get(e))==null?void 0:f.internals.userNode;return[l?{...l,position:((d=t.get(e))==null?void 0:d.position)||l.position,dragging:o}:s[0],s]}function kN({dragItems:e,snapGrid:t,x:r,y:o}){const s=e.values().next().value;if(!s)return null;const l={x:r-s.distance.x,y:o-s.distance.y},u=ks(l,t);return{x:u.x-l.x,y:u.y-l.y}}function EN({onNodeMouseDown:e,getStoreItems:t,onDragStart:r,onDrag:o,onDragStop:s}){let l={x:null,y:null},u=0,f=new Map,d=!1,p={x:0,y:0},g=null,m=!1,v=null,x=!1,w=!1,_=null;function C({noDragClassName:M,handleSelector:k,domNode:P,isSelectable:R,nodeId:D,nodeClickDistance:O=0}){v=It(P);function F({x:ee,y:Z}){const{nodeLookup:A,nodeExtent:W,snapGrid:H,snapToGrid:$,nodeOrigin:I,onNodeDrag:z,onSelectionDrag:U,onError:N,updateNodePositions:j}=t();l={x:ee,y:Z};let te=!1;const ie=f.size>1,le=ie&&W?Hf(Ss(f)):null,ce=ie&&$?kN({dragItems:f,snapGrid:H,x:ee,y:Z}):null;for(const[ue,Q]of f){if(!A.has(ue))continue;let oe={x:ee-Q.distance.x,y:Z-Q.distance.y};$&&(oe=ce?{x:Math.round(oe.x+ce.x),y:Math.round(oe.y+ce.y)}:ks(oe,H));let me=null;if(ie&&W&&!Q.extent&&le){const{positionAbsolute:ge}=Q.internals,_e=ge.x-le.x+W[0][0],Pe=ge.x+Q.measured.width-le.x2+W[1][0],Ne=ge.y-le.y+W[0][1],Ie=ge.y+Q.measured.height-le.y2+W[1][1];me=[[_e,Ne],[Pe,Ie]]}const{position:we,positionAbsolute:ve}=Sx({nodeId:ue,nextPosition:oe,nodeLookup:A,nodeExtent:me||W,nodeOrigin:I,onError:N});te=te||Q.position.x!==we.x||Q.position.y!==we.y,Q.position=we,Q.internals.positionAbsolute=ve}if(w=w||te,!!te&&(j(f,!0),_&&(o||z||!D&&U))){const[ue,Q]=uf({nodeId:D,dragItems:f,nodeLookup:A});o==null||o(_,f,ue,Q),z==null||z(_,ue,Q),D||U==null||U(_,Q)}}async function K(){if(!g)return;const{transform:ee,panBy:Z,autoPanSpeed:A,autoPanOnNodeDrag:W}=t();if(!W){d=!1,cancelAnimationFrame(u);return}const[H,$]=Fd(p,g,A);(H!==0||$!==0)&&(l.x=(l.x??0)-H/ee[2],l.y=(l.y??0)-$/ee[2],await Z({x:H,y:$})&&F(l)),u=requestAnimationFrame(K)}function J(ee){var ie;const{nodeLookup:Z,multiSelectionActive:A,nodesDraggable:W,transform:H,snapGrid:$,snapToGrid:I,selectNodesOnDrag:z,onNodeDragStart:U,onSelectionDragStart:N,unselectNodesAndEdges:j}=t();m=!0,(!z||!R)&&!A&&D&&((ie=Z.get(D))!=null&&ie.selected||j()),R&&z&&D&&(e==null||e(D));const te=Zo(ee.sourceEvent,{transform:H,snapGrid:$,snapToGrid:I,containerBounds:g});if(l=te,f=SN(Z,W,te,D),f.size>0&&(r||U||!D&&N)){const[le,ce]=uf({nodeId:D,dragItems:f,nodeLookup:Z});r==null||r(ee.sourceEvent,f,le,ce),U==null||U(ee.sourceEvent,le,ce),D||N==null||N(ee.sourceEvent,ce)}}const q=ex().clickDistance(O).on("start",ee=>{const{domNode:Z,nodeDragThreshold:A,transform:W,snapGrid:H,snapToGrid:$}=t();g=(Z==null?void 0:Z.getBoundingClientRect())||null,x=!1,w=!1,_=ee.sourceEvent,A===0&&J(ee),l=Zo(ee.sourceEvent,{transform:W,snapGrid:H,snapToGrid:$,containerBounds:g}),p=on(ee.sourceEvent,g)}).on("drag",ee=>{const{autoPanOnNodeDrag:Z,transform:A,snapGrid:W,snapToGrid:H,nodeDragThreshold:$,nodeLookup:I}=t(),z=Zo(ee.sourceEvent,{transform:A,snapGrid:W,snapToGrid:H,containerBounds:g});if(_=ee.sourceEvent,(ee.sourceEvent.type==="touchmove"&&ee.sourceEvent.touches.length>1||D&&!I.has(D))&&(x=!0),!x){if(!d&&Z&&m&&(d=!0,K()),!m){const U=on(ee.sourceEvent,g),N=U.x-p.x,j=U.y-p.y;Math.sqrt(N*N+j*j)>$&&J(ee)}(l.x!==z.xSnapped||l.y!==z.ySnapped)&&f&&m&&(p=on(ee.sourceEvent,g),F(z))}}).on("end",ee=>{if(!m||x){x&&f.size>0&&t().updateNodePositions(f,!1);return}if(d=!1,m=!1,cancelAnimationFrame(u),f.size>0){const{nodeLookup:Z,updateNodePositions:A,onNodeDragStop:W,onSelectionDragStop:H}=t();if(w&&(A(f,!1),w=!1),s||W||!D&&H){const[$,I]=uf({nodeId:D,dragItems:f,nodeLookup:Z,dragging:!1});s==null||s(ee.sourceEvent,f,$,I),W==null||W(ee.sourceEvent,$,I),D||H==null||H(ee.sourceEvent,I)}}}).filter(ee=>{const Z=ee.target;return!ee.button&&(!M||!k0(Z,`.${M}`,P))&&(!k||k0(Z,k,P))});v.call(q)}function E(){v==null||v.on(".drag",null)}return{update:C,destroy:E}}function CN(e,t,r){const o=[],s={x:e.x-r,y:e.y-r,width:r*2,height:r*2};for(const l of t.values())Pl(s,cs(l))>0&&o.push(l);return o}const _N=250;function TN(e,t,r,o){var f,d;let s=[],l=1/0;const u=CN(e,r,t+_N);for(const p of u){const g=[...((f=p.internals.handleBounds)==null?void 0:f.source)??[],...((d=p.internals.handleBounds)==null?void 0:d.target)??[]];for(const m of g){if(o.nodeId===m.nodeId&&o.type===m.type&&o.id===m.id)continue;const{x:v,y:x}=Kr(p,m,m.position,!0),w=Math.sqrt(Math.pow(v-e.x,2)+Math.pow(x-e.y,2));w>t||(w<l?(s=[{...m,x:v,y:x}],l=w):w===l&&s.push({...m,x:v,y:x}))}}if(!s.length)return null;if(s.length>1){const p=o.type==="source"?"target":"source";return s.find(g=>g.type===p)??s[0]}return s[0]}function Fx(e,t,r,o,s,l=!1){var p,g,m;const u=o.get(e);if(!u)return null;const f=s==="strict"?(p=u.internals.handleBounds)==null?void 0:p[t]:[...((g=u.internals.handleBounds)==null?void 0:g.source)??[],...((m=u.internals.handleBounds)==null?void 0:m.target)??[]],d=(r?f==null?void 0:f.find(v=>v.id===r):f==null?void 0:f[0])??null;return d&&l?{...d,...Kr(u,d,d.position,!0)}:d}function Bx(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function PN(e,t){let r=null;return t?r=!0:e&&!t&&(r=!1),r}const Ox=()=>!0;function MN(e,{connectionMode:t,connectionRadius:r,handleId:o,nodeId:s,edgeUpdaterType:l,isTarget:u,domNode:f,nodeLookup:d,lib:p,autoPanOnConnect:g,flowId:m,panBy:v,cancelConnection:x,onConnectStart:w,onConnect:_,onConnectEnd:C,isValidConnection:E=Ox,onReconnectEnd:M,updateConnection:k,getTransform:P,getFromHandle:R,autoPanSpeed:D,dragThreshold:O=1,handleDomNode:F}){const K=Mx(e.target);let J=0,q;const{x:ee,y:Z}=on(e),A=Bx(l,F),W=f==null?void 0:f.getBoundingClientRect();let H=!1;if(!W||!A)return;const $=Fx(s,A,o,d,t);if(!$)return;let I=on(e,W),z=!1,U=null,N=!1,j=null;function te(){if(!g||!W)return;const[we,ve]=Fd(I,W,D);v({x:we,y:ve}),J=requestAnimationFrame(te)}const ie={...$,nodeId:s,type:A,position:$.position},le=d.get(s);let ue={inProgress:!0,isValid:null,from:Kr(le,ie,xe.Left,!0),fromHandle:ie,fromPosition:ie.position,fromNode:le,to:I,toHandle:null,toPosition:c0[ie.position],toNode:null,pointer:I};function Q(){H=!0,k(ue),w==null||w(e,{nodeId:s,handleId:o,handleType:A})}O===0&&Q();function oe(we){if(!H){const{x:Ie,y:mt}=on(we),vt=Ie-ee,at=mt-Z;if(!(vt*vt+at*at>O*O))return;Q()}if(!R()||!ie){me(we);return}const ve=P();I=on(we,W),q=TN(Es(I,ve,!1,[1,1]),r,d,ie),z||(te(),z=!0);const ge=$x(we,{handle:q,connectionMode:t,fromNodeId:s,fromHandleId:o,fromType:u?"target":"source",isValidConnection:E,doc:K,lib:p,flowId:m,nodeLookup:d});j=ge.handleDomNode,U=ge.connection,N=PN(!!q,ge.isValid);const _e=d.get(s),Pe=_e?Kr(_e,ie,xe.Left,!0):ue.from,Ne={...ue,from:Pe,isValid:N,to:ge.toHandle&&N?$i({x:ge.toHandle.x,y:ge.toHandle.y},ve):I,toHandle:ge.toHandle,toPosition:N&&ge.toHandle?ge.toHandle.position:c0[ie.position],toNode:ge.toHandle?d.get(ge.toHandle.nodeId):null,pointer:I};k(Ne),ue=Ne}function me(we){if(!("touches"in we&&we.touches.length>0)){if(H){(q||j)&&U&&N&&(_==null||_(U));const{inProgress:ve,...ge}=ue,_e={...ge,toPosition:ue.toHandle?ue.toPosition:null};C==null||C(we,_e),l&&(M==null||M(we,_e))}x(),cancelAnimationFrame(J),z=!1,N=!1,U=null,j=null,K.removeEventListener("mousemove",oe),K.removeEventListener("mouseup",me),K.removeEventListener("touchmove",oe),K.removeEventListener("touchend",me)}}K.addEventListener("mousemove",oe),K.addEventListener("mouseup",me),K.addEventListener("touchmove",oe),K.addEventListener("touchend",me)}function $x(e,{handle:t,connectionMode:r,fromNodeId:o,fromHandleId:s,fromType:l,doc:u,lib:f,flowId:d,isValidConnection:p=Ox,nodeLookup:g}){const m=l==="target",v=t?u.querySelector(`.${f}-flow__handle[data-id="${d}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x,y:w}=on(e),_=u.elementFromPoint(x,w),C=_!=null&&_.classList.contains(`${f}-flow__handle`)?_:v,E={handleDomNode:C,isValid:!1,connection:null,toHandle:null};if(C){const M=Bx(void 0,C),k=C.getAttribute("data-nodeid"),P=C.getAttribute("data-handleid"),R=C.classList.contains("connectable"),D=C.classList.contains("connectableend");if(!k||!M)return E;const O={source:m?k:o,sourceHandle:m?P:s,target:m?o:k,targetHandle:m?s:P};E.connection=O;const K=R&&D&&(r===Bi.Strict?m&&M==="source"||!m&&M==="target":k!==o||P!==s);E.isValid=K&&p(O),E.toHandle=Fx(k,M,P,g,r,!0)}return E}const Kf={onPointerDown:MN,isValid:$x};function NN({domNode:e,panZoom:t,getTransform:r,getViewScale:o}){const s=It(e);function l({translateExtent:f,width:d,height:p,zoomStep:g=1,pannable:m=!0,zoomable:v=!0,inversePan:x=!1}){const w=k=>{if(k.sourceEvent.type!=="wheel"||!t)return;const P=r(),R=k.sourceEvent.ctrlKey&&fs()?10:1,D=-k.sourceEvent.deltaY*(k.sourceEvent.deltaMode===1?.05:k.sourceEvent.deltaMode?1:.002)*g,O=P[2]*Math.pow(2,D*R);t.scaleTo(O)};let _=[0,0];const C=k=>{(k.sourceEvent.type==="mousedown"||k.sourceEvent.type==="touchstart")&&(_=[k.sourceEvent.clientX??k.sourceEvent.touches[0].clientX,k.sourceEvent.clientY??k.sourceEvent.touches[0].clientY])},E=k=>{const P=r();if(k.sourceEvent.type!=="mousemove"&&k.sourceEvent.type!=="touchmove"||!t)return;const R=[k.sourceEvent.clientX??k.sourceEvent.touches[0].clientX,k.sourceEvent.clientY??k.sourceEvent.touches[0].clientY],D=[R[0]-_[0],R[1]-_[1]];_=R;const O=o()*Math.max(P[2],Math.log(P[2]))*(x?-1:1),F={x:P[0]-D[0]*O,y:P[1]-D[1]*O},K=[[0,0],[d,p]];t.setViewportConstrained({x:F.x,y:F.y,zoom:P[2]},K,f)},M=mx().on("start",C).on("zoom",m?E:null).on("zoom.wheel",v?w:null);s.call(M,{})}function u(){s.on("zoom",null)}return{update:l,destroy:u,pointer:tn}}const Hl=e=>({x:e.x,y:e.y,zoom:e.k}),cf=({x:e,y:t,zoom:r})=>Bl.translate(e,t).scale(r),bi=(e,t)=>e.target.closest(`.${t}`),Hx=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),AN=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,ff=(e,t=0,r=AN,o=()=>{})=>{const s=typeof t=="number"&&t>0;return s||o(),s?e.transition().duration(t).ease(r).on("end",o):e},Ux=e=>{const t=e.ctrlKey&&fs()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function bN({zoomPanValues:e,noWheelClassName:t,d3Selection:r,d3Zoom:o,panOnScrollMode:s,panOnScrollSpeed:l,zoomOnPinch:u,onPanZoomStart:f,onPanZoom:d,onPanZoomEnd:p}){return g=>{if(bi(g,t))return g.ctrlKey&&g.preventDefault(),!1;g.preventDefault(),g.stopImmediatePropagation();const m=r.property("__zoom").k||1;if(g.ctrlKey&&u){const C=tn(g),E=Ux(g),M=m*Math.pow(2,E);o.scaleTo(r,M,C,g);return}const v=g.deltaMode===1?20:1;let x=s===$r.Vertical?0:g.deltaX*v,w=s===$r.Horizontal?0:g.deltaY*v;!fs()&&g.shiftKey&&s!==$r.Vertical&&(x=g.deltaY*v,w=0),o.translateBy(r,-(x/m)*l,-(w/m)*l,{internal:!0});const _=Hl(r.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?d==null||d(g,_):(e.isPanScrolling=!0,f==null||f(g,_)),e.panScrollTimeout=setTimeout(()=>{p==null||p(g,_),e.isPanScrolling=!1},150)}}function RN({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:r}){return function(o,s){const l=o.type==="wheel",u=!t&&l&&!o.ctrlKey,f=bi(o,e);if(o.ctrlKey&&l&&f&&o.preventDefault(),u||f)return null;o.preventDefault(),r.call(this,o,s)}}function DN({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:r}){return o=>{var l,u,f;if((l=o.sourceEvent)!=null&&l.internal)return;const s=Hl(o.transform);e.mouseButton=((u=o.sourceEvent)==null?void 0:u.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=s,((f=o.sourceEvent)==null?void 0:f.type)==="mousedown"&&t(!0),r&&(r==null||r(o.sourceEvent,s))}}function IN({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:r,onTransformChange:o,onPanZoom:s}){return l=>{var u,f;e.usedRightMouseButton=!!(r&&Hx(t,e.mouseButton??0)),(u=l.sourceEvent)!=null&&u.sync||o([l.transform.x,l.transform.y,l.transform.k]),s&&!((f=l.sourceEvent)!=null&&f.internal)&&(s==null||s(l.sourceEvent,Hl(l.transform)))}}function LN({zoomPanValues:e,panOnDrag:t,panOnScroll:r,onDraggingChange:o,onPanZoomEnd:s,onPaneContextMenu:l}){return u=>{var f;if(!((f=u.sourceEvent)!=null&&f.internal)&&(e.isZoomingOrPanning=!1,l&&Hx(t,e.mouseButton??0)&&!e.usedRightMouseButton&&u.sourceEvent&&l(u.sourceEvent),e.usedRightMouseButton=!1,o(!1),s)){const d=Hl(u.transform);e.prevViewport=d,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(u.sourceEvent,d)},r?150:0)}}}function jN({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:r,panOnDrag:o,panOnScroll:s,zoomOnDoubleClick:l,userSelectionActive:u,noWheelClassName:f,noPanClassName:d,lib:p,connectionInProgress:g}){return m=>{var C;const v=e||t,x=r&&m.ctrlKey,w=m.type==="wheel";if(m.button===1&&m.type==="mousedown"&&(bi(m,`${p}-flow__node`)||bi(m,`${p}-flow__edge`)))return!0;if(!o&&!v&&!s&&!l&&!r||u||g&&!w||bi(m,f)&&w||bi(m,d)&&(!w||s&&w&&!e)||!r&&m.ctrlKey&&w)return!1;if(!r&&m.type==="touchstart"&&((C=m.touches)==null?void 0:C.length)>1)return m.preventDefault(),!1;if(!v&&!s&&!x&&w||!o&&(m.type==="mousedown"||m.type==="touchstart")||Array.isArray(o)&&!o.includes(m.button)&&m.type==="mousedown")return!1;const _=Array.isArray(o)&&o.includes(m.button)||!m.button||m.button<=1;return(!m.ctrlKey||w)&&_}}function VN({domNode:e,minZoom:t,maxZoom:r,translateExtent:o,viewport:s,onPanZoom:l,onPanZoomStart:u,onPanZoomEnd:f,onDraggingChange:d}){const p={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},g=e.getBoundingClientRect();let m=[[0,0],[g.width,g.height]];const v=typeof ResizeObserver<"u"?new ResizeObserver(Z=>{const A=Z[0];A&&(m=[[0,0],[A.contentRect.width,A.contentRect.height]])}):null;v==null||v.observe(e);const x=mx().extent(()=>m).scaleExtent([t,r]).translateExtent(o),w=It(e).call(x);P({x:s.x,y:s.y,zoom:Oi(s.zoom,t,r)},[[0,0],[g.width,g.height]],o);const _=w.on("wheel.zoom"),C=w.on("dblclick.zoom");x.wheelDelta(Ux);async function E(Z,A){return w?new Promise(W=>{x==null||x.interpolate((A==null?void 0:A.interpolate)==="linear"?qo:sl).transform(ff(w,A==null?void 0:A.duration,A==null?void 0:A.ease,()=>W(!0)),Z)}):!1}function M({noWheelClassName:Z,noPanClassName:A,onPaneContextMenu:W,userSelectionActive:H,panOnScroll:$,panOnDrag:I,panOnScrollMode:z,panOnScrollSpeed:U,preventScrolling:N,zoomOnPinch:j,zoomOnScroll:te,zoomOnDoubleClick:ie,zoomActivationKeyPressed:le,lib:ce,onTransformChange:ue,connectionInProgress:Q,paneClickDistance:oe,selectionOnDrag:me}){H&&!p.isZoomingOrPanning&&k();const we=$&&!le&&!H;x.clickDistance(me?1/0:!rn(oe)||oe<0?0:oe);const ve=we?bN({zoomPanValues:p,noWheelClassName:Z,d3Selection:w,d3Zoom:x,panOnScrollMode:z,panOnScrollSpeed:U,zoomOnPinch:j,onPanZoomStart:u,onPanZoom:l,onPanZoomEnd:f}):RN({noWheelClassName:Z,preventScrolling:N,d3ZoomHandler:_});w.on("wheel.zoom",ve,{passive:!1});const ge=DN({zoomPanValues:p,onDraggingChange:d,onPanZoomStart:u});x.on("start",ge);const _e=IN({zoomPanValues:p,panOnDrag:I,onPaneContextMenu:!!W,onPanZoom:l,onTransformChange:ue});x.on("zoom",_e);const Pe=LN({zoomPanValues:p,panOnDrag:I,panOnScroll:$,onPaneContextMenu:W,onPanZoomEnd:f,onDraggingChange:d});x.on("end",Pe);const Ne=jN({zoomActivationKeyPressed:le,panOnDrag:I,zoomOnScroll:te,panOnScroll:$,zoomOnDoubleClick:ie,zoomOnPinch:j,userSelectionActive:H,noPanClassName:A,noWheelClassName:Z,lib:ce,connectionInProgress:Q});x.filter(Ne),ie?w.on("dblclick.zoom",C):w.on("dblclick.zoom",null)}function k(){x.on("zoom",null)}async function P(Z,A,W){const H=cf(Z),$=x==null?void 0:x.constrain()(H,A,W);return $&&await E($),$}async function R(Z,A){const W=cf(Z);return await E(W,A),W}function D(Z){if(w){const A=cf(Z),W=w.property("__zoom");(W.k!==Z.zoom||W.x!==Z.x||W.y!==Z.y)&&(x==null||x.transform(w,A,null,{sync:!0}))}}function O(){const Z=w?px(w.node()):{x:0,y:0,k:1};return{x:Z.x,y:Z.y,zoom:Z.k}}async function F(Z,A){return w?new Promise(W=>{x==null||x.interpolate((A==null?void 0:A.interpolate)==="linear"?qo:sl).scaleTo(ff(w,A==null?void 0:A.duration,A==null?void 0:A.ease,()=>W(!0)),Z)}):!1}async function K(Z,A){return w?new Promise(W=>{x==null||x.interpolate((A==null?void 0:A.interpolate)==="linear"?qo:sl).scaleBy(ff(w,A==null?void 0:A.duration,A==null?void 0:A.ease,()=>W(!0)),Z)}):!1}function J(Z){x==null||x.scaleExtent(Z)}function q(Z){x==null||x.translateExtent(Z)}function ee(Z){const A=!rn(Z)||Z<0?0:Z;x==null||x.clickDistance(A)}return{update:M,destroy:k,setViewport:R,setViewportConstrained:P,getViewport:O,scaleTo:F,scaleBy:K,setScaleExtent:J,setTranslateExtent:q,syncViewport:D,setClickDistance:ee}}var Hi;(function(e){e.Line="line",e.Handle="handle"})(Hi||(Hi={}));function zN({width:e,prevWidth:t,height:r,prevHeight:o,affectsX:s,affectsY:l}){const u=e-t,f=r-o,d=[u>0?1:u<0?-1:0,f>0?1:f<0?-1:0];return u&&s&&(d[0]=d[0]*-1),f&&l&&(d[1]=d[1]*-1),d}function E0(e){const t=e.includes("right")||e.includes("left"),r=e.includes("bottom")||e.includes("top"),o=e.includes("left"),s=e.includes("top");return{isHorizontal:t,isVertical:r,affectsX:o,affectsY:s}}function lr(e,t){return Math.max(0,t-e)}function ur(e,t){return Math.max(0,e-t)}function Za(e,t,r){return Math.max(0,t-e,e-r)}function C0(e,t){return e?!t:t}function FN(e,t,r,o,s,l,u,f){let{affectsX:d,affectsY:p}=t;const{isHorizontal:g,isVertical:m}=t,v=g&&m,{xSnapped:x,ySnapped:w}=r,{minWidth:_,maxWidth:C,minHeight:E,maxHeight:M}=o,{x:k,y:P,width:R,height:D,aspectRatio:O}=e;let F=Math.floor(g?x-e.pointerX:0),K=Math.floor(m?w-e.pointerY:0);const J=R+(d?-F:F),q=D+(p?-K:K),ee=-l[0]*R,Z=-l[1]*D;let A=Za(J,_,C),W=Za(q,E,M);if(u){let I=0,z=0;d&&F<0?I=lr(k+F+ee,u[0][0]):!d&&F>0&&(I=ur(k+J+ee,u[1][0])),p&&K<0?z=lr(P+K+Z,u[0][1]):!p&&K>0&&(z=ur(P+q+Z,u[1][1])),A=Math.max(A,I),W=Math.max(W,z)}if(f){let I=0,z=0;d&&F>0?I=ur(k+F,f[0][0]):!d&&F<0&&(I=lr(k+J,f[1][0])),p&&K>0?z=ur(P+K,f[0][1]):!p&&K<0&&(z=lr(P+q,f[1][1])),A=Math.max(A,I),W=Math.max(W,z)}if(s){if(g){const I=Za(J/O,E,M)*O;if(A=Math.max(A,I),u){let z=0;!d&&!p||d&&!p&&v?z=ur(P+Z+J/O,u[1][1])*O:z=lr(P+Z+(d?F:-F)/O,u[0][1])*O,A=Math.max(A,z)}if(f){let z=0;!d&&!p||d&&!p&&v?z=lr(P+J/O,f[1][1])*O:z=ur(P+(d?F:-F)/O,f[0][1])*O,A=Math.max(A,z)}}if(m){const I=Za(q*O,_,C)/O;if(W=Math.max(W,I),u){let z=0;!d&&!p||p&&!d&&v?z=ur(k+q*O+ee,u[1][0])/O:z=lr(k+(p?K:-K)*O+ee,u[0][0])/O,W=Math.max(W,z)}if(f){let z=0;!d&&!p||p&&!d&&v?z=lr(k+q*O,f[1][0])/O:z=ur(k+(p?K:-K)*O,f[0][0])/O,W=Math.max(W,z)}}}K=K+(K<0?W:-W),F=F+(F<0?A:-A),s&&(v?J>q*O?K=(C0(d,p)?-F:F)/O:F=(C0(d,p)?-K:K)*O:g?(K=F/O,p=d):(F=K*O,d=p));const H=d?k+F:k,$=p?P+K:P;return{width:R+(d?-F:F),height:D+(p?-K:K),x:l[0]*F*(d?-1:1)+H,y:l[1]*K*(p?-1:1)+$}}const Wx={width:0,height:0,x:0,y:0},BN={...Wx,pointerX:0,pointerY:0,aspectRatio:1};function ON(e,t,r){const o=t.position.x+e.position.x,s=t.position.y+e.position.y,l=e.measured.width??0,u=e.measured.height??0,f=r[0]*l,d=r[1]*u;return[[o-f,s-d],[o+l-f,s+u-d]]}function $N({domNode:e,nodeId:t,getStoreItems:r,onChange:o,onEnd:s}){const l=It(e);let u={controlDirection:E0("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function f({controlPosition:p,boundaries:g,keepAspectRatio:m,resizeDirection:v,onResizeStart:x,onResize:w,onResizeEnd:_,shouldResize:C}){let E={...Wx},M={...BN};u={boundaries:g,resizeDirection:v,keepAspectRatio:m,controlDirection:E0(p)};let k,P=null,R=[],D,O,F,K=!1;const J=ex().on("start",q=>{const{nodeLookup:ee,transform:Z,snapGrid:A,snapToGrid:W,nodeOrigin:H,paneDomNode:$}=r();if(k=ee.get(t),!k)return;P=($==null?void 0:$.getBoundingClientRect())??null;const{xSnapped:I,ySnapped:z}=Zo(q.sourceEvent,{transform:Z,snapGrid:A,snapToGrid:W,containerBounds:P});E={width:k.measured.width??0,height:k.measured.height??0,x:k.position.x??0,y:k.position.y??0},M={...E,pointerX:I,pointerY:z,aspectRatio:E.width/E.height},D=void 0,O=Xr(k.extent)?k.extent:void 0,k.parentId&&(k.extent==="parent"||k.expandParent)&&(D=ee.get(k.parentId)),D&&k.extent==="parent"&&(O=[[0,0],[D.measured.width,D.measured.height]]),R=[],F=void 0;for(const[U,N]of ee)if(N.parentId===t&&(R.push({id:U,position:{...N.position},extent:N.extent}),N.extent==="parent"||N.expandParent)){const j=ON(N,k,N.origin??H);F?F=[[Math.min(j[0][0],F[0][0]),Math.min(j[0][1],F[0][1])],[Math.max(j[1][0],F[1][0]),Math.max(j[1][1],F[1][1])]]:F=j}x==null||x(q,{...E})}).on("drag",q=>{const{transform:ee,snapGrid:Z,snapToGrid:A,nodeOrigin:W}=r(),H=Zo(q.sourceEvent,{transform:ee,snapGrid:Z,snapToGrid:A,containerBounds:P}),$=[];if(!k)return;const{x:I,y:z,width:U,height:N}=E,j={},te=k.origin??W,{width:ie,height:le,x:ce,y:ue}=FN(M,u.controlDirection,H,u.boundaries,u.keepAspectRatio,te,O,F),Q=ie!==U,oe=le!==N,me=ce!==I&&Q,we=ue!==z&&oe;if(!me&&!we&&!Q&&!oe)return;if((me||we||te[0]===1||te[1]===1)&&(j.x=me?ce:E.x,j.y=we?ue:E.y,E.x=j.x,E.y=j.y,R.length>0)){const Pe=ce-I,Ne=ue-z;for(const Ie of R)Ie.position={x:Ie.position.x-Pe+te[0]*(ie-U),y:Ie.position.y-Ne+te[1]*(le-N)},$.push(Ie)}if((Q||oe)&&(j.width=Q&&(!u.resizeDirection||u.resizeDirection==="horizontal")?ie:E.width,j.height=oe&&(!u.resizeDirection||u.resizeDirection==="vertical")?le:E.height,E.width=j.width,E.height=j.height),D&&k.expandParent){const Pe=te[0]*(j.width??0);j.x&&j.x<Pe&&(E.x=Pe,M.x=M.x-(j.x-Pe));const Ne=te[1]*(j.height??0);j.y&&j.y<Ne&&(E.y=Ne,M.y=M.y-(j.y-Ne))}const ve=zN({width:E.width,prevWidth:U,height:E.height,prevHeight:N,affectsX:u.controlDirection.affectsX,affectsY:u.controlDirection.affectsY}),ge={...E,direction:ve};(C==null?void 0:C(q,ge))!==!1&&(K=!0,w==null||w(q,ge),o(j,$))}).on("end",q=>{K&&(_==null||_(q,{...E}),s==null||s({...E}),K=!1)});l.call(J)}function d(){l.on(".drag",null)}return{update:f,destroy:d}}var df={exports:{}},hf={},pf={exports:{}},mf={};/**
|
|
174
|
+
* @license React
|
|
175
|
+
* use-sync-external-store-shim.production.js
|
|
176
|
+
*
|
|
177
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the MIT license found in the
|
|
180
|
+
* LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/var _0;function HN(){if(_0)return mf;_0=1;var e=hs();function t(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}var r=typeof Object.is=="function"?Object.is:t,o=e.useState,s=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function f(m,v){var x=v(),w=o({inst:{value:x,getSnapshot:v}}),_=w[0].inst,C=w[1];return l(function(){_.value=x,_.getSnapshot=v,d(_)&&C({inst:_})},[m,x,v]),s(function(){return d(_)&&C({inst:_}),m(function(){d(_)&&C({inst:_})})},[m]),u(x),x}function d(m){var v=m.getSnapshot;m=m.value;try{var x=v();return!r(m,x)}catch{return!0}}function p(m,v){return v()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:f;return mf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,mf}var T0;function UN(){return T0||(T0=1,pf.exports=HN()),pf.exports}/**
|
|
182
|
+
* @license React
|
|
183
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
184
|
+
*
|
|
185
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the MIT license found in the
|
|
188
|
+
* LICENSE file in the root directory of this source tree.
|
|
189
|
+
*/var P0;function WN(){if(P0)return hf;P0=1;var e=hs(),t=UN();function r(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var o=typeof Object.is=="function"?Object.is:r,s=t.useSyncExternalStore,l=e.useRef,u=e.useEffect,f=e.useMemo,d=e.useDebugValue;return hf.useSyncExternalStoreWithSelector=function(p,g,m,v,x){var w=l(null);if(w.current===null){var _={hasValue:!1,value:null};w.current=_}else _=w.current;w=f(function(){function E(D){if(!M){if(M=!0,k=D,D=v(D),x!==void 0&&_.hasValue){var O=_.value;if(x(O,D))return P=O}return P=D}if(O=P,o(k,D))return O;var F=v(D);return x!==void 0&&x(O,F)?(k=D,O):(k=D,P=F)}var M=!1,k,P,R=m===void 0?null:m;return[function(){return E(g())},R===null?void 0:function(){return E(R())}]},[g,m,v,x]);var C=s(p,w[0],w[1]);return u(function(){_.hasValue=!0,_.value=C},[C]),d(C),C},hf}var M0;function XN(){return M0||(M0=1,df.exports=WN()),df.exports}var KN=XN();const YN=oy(KN),GN={},N0=e=>{let t;const r=new Set,o=(g,m)=>{const v=typeof g=="function"?g(t):g;if(!Object.is(v,t)){const x=t;t=m??(typeof v!="object"||v===null)?v:Object.assign({},t,v),r.forEach(w=>w(t,x))}},s=()=>t,d={setState:o,getState:s,getInitialState:()=>p,subscribe:g=>(r.add(g),()=>r.delete(g)),destroy:()=>{(GN?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},p=t=e(o,s,d);return d},QN=e=>e?N0(e):N0,{useDebugValue:qN}=Oo,{useSyncExternalStoreWithSelector:ZN}=YN,JN=e=>e;function Xx(e,t=JN,r){const o=ZN(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return qN(o),o}const A0=(e,t)=>{const r=QN(e),o=(s,l=t)=>Xx(r,s,l);return Object.assign(o,r),o},eA=(e,t)=>e?A0(e,t):A0;function We(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[o,s]of e)if(!Object.is(s,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const o of e)if(!t.has(o))return!1;return!0}const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(const o of r)if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1;return!0}sy();const Ul=L.createContext(null),tA=Ul.Provider,Kx=sn.error001("react");function be(e,t){const r=L.useContext(Ul);if(r===null)throw new Error(Kx);return Xx(r,e,t)}function Fe(){const e=L.useContext(Ul);if(e===null)throw new Error(Kx);return L.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const b0={display:"none"},nA={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Yx="react-flow__node-desc",Gx="react-flow__edge-desc",rA="react-flow__aria-live",iA=e=>e.ariaLiveMessage,oA=e=>e.ariaLabelConfig;function sA({rfId:e}){const t=be(iA);return T.jsx("div",{id:`${rA}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:nA,children:t})}function aA({rfId:e,disableKeyboardA11y:t}){const r=be(oA);return T.jsxs(T.Fragment,{children:[T.jsx("div",{id:`${Yx}-${e}`,style:b0,children:t?r["node.a11yDescription.default"]:r["node.a11yDescription.keyboardDisabled"]}),T.jsx("div",{id:`${Gx}-${e}`,style:b0,children:r["edge.a11yDescription.default"]}),!t&&T.jsx(sA,{rfId:e})]})}const Wl=L.forwardRef(({position:e="top-left",children:t,className:r,style:o,...s},l)=>{const u=`${e}`.split("-");return T.jsx("div",{className:Ze(["react-flow__panel",r,...u]),style:o,ref:l,...s,children:t})});Wl.displayName="Panel";const R0="https://reactflow.dev?utm_source=attribution";function lA({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:T.jsx(Wl,{position:t,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${R0}`,children:T.jsx("a",{href:R0,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const uA=e=>{const t=[],r=[];for(const[,o]of e.nodeLookup)o.selected&&t.push(o.internals.userNode);for(const[,o]of e.edgeLookup)o.selected&&r.push(o);return{selectedNodes:t,selectedEdges:r}},Ja=e=>e.id;function cA(e,t){return We(e.selectedNodes.map(Ja),t.selectedNodes.map(Ja))&&We(e.selectedEdges.map(Ja),t.selectedEdges.map(Ja))}function fA({onSelectionChange:e}){const t=Fe(),{selectedNodes:r,selectedEdges:o}=be(uA,cA);return L.useEffect(()=>{const s={nodes:r,edges:o};e==null||e(s),t.getState().onSelectionChangeHandlers.forEach(l=>l(s))},[r,o,e]),null}const dA=e=>!!e.onSelectionChangeHandlers;function hA({onSelectionChange:e}){const t=be(dA);return e||t?T.jsx(fA,{onSelectionChange:e}):null}const Qx=[0,0],pA={x:0,y:0,zoom:1},mA=["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"],D0=[...mA,"rfId"],gA=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),I0={translateExtent:ls,nodeOrigin:Qx,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function yA(e){const{setNodes:t,setEdges:r,setMinZoom:o,setMaxZoom:s,setTranslateExtent:l,setNodeExtent:u,reset:f,setDefaultNodesAndEdges:d}=be(gA,We),p=Fe();L.useEffect(()=>(d(e.defaultNodes,e.defaultEdges),()=>{g.current=I0,f()}),[]);const g=L.useRef(I0);return L.useEffect(()=>{for(const m of D0){const v=e[m],x=g.current[m];v!==x&&(typeof e[m]>"u"||(m==="nodes"?t(v):m==="edges"?r(v):m==="minZoom"?o(v):m==="maxZoom"?s(v):m==="translateExtent"?l(v):m==="nodeExtent"?u(v):m==="ariaLabelConfig"?p.setState({ariaLabelConfig:tN(v)}):m==="fitView"?p.setState({fitViewQueued:v}):m==="fitViewOptions"?p.setState({fitViewOptions:v}):p.setState({[m]:v})))}g.current=e},D0.map(m=>e[m])),null}function L0(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function vA(e){var o;const[t,r]=L.useState(e==="system"?null:e);return L.useEffect(()=>{if(e!=="system"){r(e);return}const s=L0(),l=()=>r(s!=null&&s.matches?"dark":"light");return l(),s==null||s.addEventListener("change",l),()=>{s==null||s.removeEventListener("change",l)}},[e]),t!==null?t:(o=L0())!=null&&o.matches?"dark":"light"}const j0=typeof document<"u"?document:null;function ds(e=null,t={target:j0,actInsideInputWithModifier:!0}){const[r,o]=L.useState(!1),s=L.useRef(!1),l=L.useRef(new Set([])),[u,f]=L.useMemo(()=>{if(e!==null){const p=(Array.isArray(e)?e:[e]).filter(m=>typeof m=="string").map(m=>m.replace("+",`
|
|
190
|
+
`).replace(`
|
|
191
|
+
|
|
192
|
+
`,`
|
|
193
|
+
+`).split(`
|
|
194
|
+
`)),g=p.reduce((m,v)=>m.concat(...v),[]);return[p,g]}return[[],[]]},[e]);return L.useEffect(()=>{const d=(t==null?void 0:t.target)??j0,p=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const g=x=>{var C,E;if(s.current=x.ctrlKey||x.metaKey||x.shiftKey||x.altKey,(!s.current||s.current&&!p)&&Nx(x))return!1;const _=z0(x.code,f);if(l.current.add(x[_]),V0(u,l.current,!1)){const M=((E=(C=x.composedPath)==null?void 0:C.call(x))==null?void 0:E[0])||x.target,k=(M==null?void 0:M.nodeName)==="BUTTON"||(M==null?void 0:M.nodeName)==="A";t.preventDefault!==!1&&(s.current||!k)&&x.preventDefault(),o(!0)}},m=x=>{const w=z0(x.code,f);V0(u,l.current,!0)?(o(!1),l.current.clear()):l.current.delete(x[w]),x.key==="Meta"&&l.current.clear(),s.current=!1},v=()=>{l.current.clear(),o(!1)};return d==null||d.addEventListener("keydown",g),d==null||d.addEventListener("keyup",m),window.addEventListener("blur",v),window.addEventListener("contextmenu",v),()=>{d==null||d.removeEventListener("keydown",g),d==null||d.removeEventListener("keyup",m),window.removeEventListener("blur",v),window.removeEventListener("contextmenu",v)}}},[e,o]),r}function V0(e,t,r){return e.filter(o=>r||o.length===t.size).some(o=>o.every(s=>t.has(s)))}function z0(e,t){return t.includes(e)?"code":"key"}const xA=()=>{const e=Fe();return L.useMemo(()=>({zoomIn:async t=>{const{panZoom:r}=e.getState();return r?r.scaleBy(1.2,t):!1},zoomOut:async t=>{const{panZoom:r}=e.getState();return r?r.scaleBy(1/1.2,t):!1},zoomTo:async(t,r)=>{const{panZoom:o}=e.getState();return o?o.scaleTo(t,r):!1},getZoom:()=>e.getState().transform[2],setViewport:async(t,r)=>{const{transform:[o,s,l],panZoom:u}=e.getState();return u?(await u.setViewport({x:t.x??o,y:t.y??s,zoom:t.zoom??l},r),!0):!1},getViewport:()=>{const[t,r,o]=e.getState().transform;return{x:t,y:r,zoom:o}},setCenter:async(t,r,o)=>e.getState().setCenter(t,r,o),fitBounds:async(t,r)=>{const{width:o,height:s,minZoom:l,maxZoom:u,panZoom:f}=e.getState(),d=Bd(t,o,s,l,u,(r==null?void 0:r.padding)??.1);return f?(await f.setViewport(d,{duration:r==null?void 0:r.duration,ease:r==null?void 0:r.ease,interpolate:r==null?void 0:r.interpolate}),!0):!1},screenToFlowPosition:(t,r={})=>{const{transform:o,snapGrid:s,snapToGrid:l,domNode:u}=e.getState();if(!u)return t;const{x:f,y:d}=u.getBoundingClientRect(),p={x:t.x-f,y:t.y-d},g=r.snapGrid??s,m=r.snapToGrid??l;return Es(p,o,m,g)},flowToScreenPosition:t=>{const{transform:r,domNode:o}=e.getState();if(!o)return t;const{x:s,y:l}=o.getBoundingClientRect(),u=$i(t,r);return{x:u.x+s,y:u.y+l}}}),[])};function qx(e,t){const r=[],o=new Map,s=[];for(const l of e)if(l.type==="add"){s.push(l);continue}else if(l.type==="remove"||l.type==="replace")o.set(l.id,[l]);else{const u=o.get(l.id);u?u.push(l):o.set(l.id,[l])}for(const l of t){const u=o.get(l.id);if(!u){r.push(l);continue}if(u[0].type==="remove")continue;if(u[0].type==="replace"){r.push({...u[0].item});continue}const f={...l};for(const d of u)wA(d,f);r.push(f)}return s.length&&s.forEach(l=>{l.index!==void 0?r.splice(l.index,0,{...l.item}):r.push({...l.item})}),r}function wA(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function Zx(e,t){return qx(e,t)}function Jx(e,t){return qx(e,t)}function Vr(e,t){return{id:e,type:"select",selected:t}}function Ri(e,t=new Set,r=!1){const o=[];for(const[s,l]of e){const u=t.has(s);!(l.selected===void 0&&!u)&&l.selected!==u&&(r&&(l.selected=u),o.push(Vr(l.id,u)))}return o}function F0({items:e=[],lookup:t}){var s;const r=[],o=new Map(e.map(l=>[l.id,l]));for(const[l,u]of e.entries()){const f=t.get(u.id),d=((s=f==null?void 0:f.internals)==null?void 0:s.userNode)??f;d!==void 0&&d!==u&&r.push({id:u.id,item:u,type:"replace"}),d===void 0&&r.push({item:u,type:"add",index:l})}for(const[l]of t)o.get(l)===void 0&&r.push({id:l,type:"remove"});return r}function B0(e){return{id:e.id,type:"remove"}}const SA=_x();function kA(e,t,r={}){return aN(e,t,{...r,onError:r.onError??SA})}const O0=e=>XM(e),EA=e=>wx(e);function e1(e){return L.forwardRef(e)}const t1=typeof window<"u"?L.useLayoutEffect:L.useEffect;function $0(e){const[t,r]=L.useState(BigInt(0)),[o]=L.useState(()=>CA(()=>r(s=>s+BigInt(1))));return t1(()=>{const s=o.get();s.length&&(e(s),o.reset())},[t]),o}function CA(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:r=>{t.push(r),e()}}}const n1=L.createContext(null);function _A({children:e}){const t=Fe(),r=L.useCallback(f=>{const{nodes:d=[],setNodes:p,hasDefaultNodes:g,onNodesChange:m,nodeLookup:v,fitViewQueued:x,onNodesChangeMiddlewareMap:w}=t.getState();let _=d;for(const E of f)_=typeof E=="function"?E(_):E;let C=F0({items:_,lookup:v});for(const E of w.values())C=E(C);g&&p(_),C.length>0?m==null||m(C):x&&window.requestAnimationFrame(()=>{const{fitViewQueued:E,nodes:M,setNodes:k}=t.getState();E&&k(M)})},[]),o=$0(r),s=L.useCallback(f=>{const{edges:d=[],setEdges:p,hasDefaultEdges:g,onEdgesChange:m,edgeLookup:v}=t.getState();let x=d;for(const w of f)x=typeof w=="function"?w(x):w;g?p(x):m&&m(F0({items:x,lookup:v}))},[]),l=$0(s),u=L.useMemo(()=>({nodeQueue:o,edgeQueue:l}),[]);return T.jsx(n1.Provider,{value:u,children:e})}function TA(){const e=L.useContext(n1);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const PA=e=>!!e.panZoom;function Kd(){const e=xA(),t=Fe(),r=TA(),o=be(PA),s=L.useMemo(()=>{const l=m=>t.getState().nodeLookup.get(m),u=m=>{r.nodeQueue.push(m)},f=m=>{r.edgeQueue.push(m)},d=m=>{var E,M;const{nodeLookup:v,nodeOrigin:x}=t.getState(),w=O0(m)?m:v.get(m.id),_=w.parentId?Px(w.position,w.measured,w.parentId,v,x):w.position,C={...w,position:_,width:((E=w.measured)==null?void 0:E.width)??w.width,height:((M=w.measured)==null?void 0:M.height)??w.height};return cs(C)},p=(m,v,x={replace:!1})=>{u(w=>w.map(_=>{if(_.id===m){const C=typeof v=="function"?v(_):v;return x.replace&&O0(C)?C:{..._,...C}}return _}))},g=(m,v,x={replace:!1})=>{f(w=>w.map(_=>{if(_.id===m){const C=typeof v=="function"?v(_):v;return x.replace&&EA(C)?C:{..._,...C}}return _}))};return{getNodes:()=>t.getState().nodes.map(m=>({...m})),getNode:m=>{var v;return(v=l(m))==null?void 0:v.internals.userNode},getInternalNode:l,getEdges:()=>{const{edges:m=[]}=t.getState();return m.map(v=>({...v}))},getEdge:m=>t.getState().edgeLookup.get(m),setNodes:u,setEdges:f,addNodes:m=>{const v=Array.isArray(m)?m:[m];r.nodeQueue.push(x=>[...x,...v])},addEdges:m=>{const v=Array.isArray(m)?m:[m];r.edgeQueue.push(x=>[...x,...v])},toObject:()=>{const{nodes:m=[],edges:v=[],transform:x}=t.getState(),[w,_,C]=x;return{nodes:m.map(E=>({...E})),edges:v.map(E=>({...E})),viewport:{x:w,y:_,zoom:C}}},deleteElements:async({nodes:m=[],edges:v=[]})=>{const{nodes:x,edges:w,onNodesDelete:_,onEdgesDelete:C,triggerNodeChanges:E,triggerEdgeChanges:M,onDelete:k,onBeforeDelete:P}=t.getState(),{nodes:R,edges:D}=await qM({nodesToRemove:m,edgesToRemove:v,nodes:x,edges:w,onBeforeDelete:P}),O=D.length>0,F=R.length>0;if(O){const K=D.map(B0);C==null||C(D),M(K)}if(F){const K=R.map(B0);_==null||_(R),E(K)}return(F||O)&&(k==null||k({nodes:R,edges:D})),{deletedNodes:R,deletedEdges:D}},getIntersectingNodes:(m,v=!0,x)=>{const w=d0(m),_=w?m:d(m),C=x!==void 0;return _?(x||t.getState().nodes).filter(E=>{const M=t.getState().nodeLookup.get(E.id);if(M&&!w&&(E.id===m.id||!M.internals.positionAbsolute))return!1;const k=cs(C?E:M),P=Pl(k,_);return v&&P>0||P>=k.width*k.height||P>=_.width*_.height}):[]},isNodeIntersecting:(m,v,x=!0)=>{const _=d0(m)?m:d(m);if(!_)return!1;const C=Pl(_,v);return x&&C>0||C>=v.width*v.height||C>=_.width*_.height},updateNode:p,updateNodeData:(m,v,x={replace:!1})=>{p(m,w=>{const _=typeof v=="function"?v(w):v;return x.replace?{...w,data:_}:{...w,data:{...w.data,..._}}},x)},updateEdge:g,updateEdgeData:(m,v,x={replace:!1})=>{g(m,w=>{const _=typeof v=="function"?v(w):v;return x.replace?{...w,data:_}:{...w,data:{...w.data,..._}}},x)},getNodesBounds:m=>{const{nodeLookup:v,nodeOrigin:x}=t.getState();return KM(m,{nodeLookup:v,nodeOrigin:x})},getHandleConnections:({type:m,id:v,nodeId:x})=>{var w;return Array.from(((w=t.getState().connectionLookup.get(`${x}-${m}${v?`-${v}`:""}`))==null?void 0:w.values())??[])},getNodeConnections:({type:m,handleId:v,nodeId:x})=>{var w;return Array.from(((w=t.getState().connectionLookup.get(`${x}${m?v?`-${m}-${v}`:`-${m}`:""}`))==null?void 0:w.values())??[])},fitView:async m=>{const v=t.getState().fitViewResolver??eN();return t.setState({fitViewQueued:!0,fitViewOptions:m,fitViewResolver:v}),r.nodeQueue.push(x=>[...x]),v.promise}}},[]);return L.useMemo(()=>({...s,...e,viewportInitialized:o}),[o])}const H0=e=>e.selected,MA=typeof window<"u"?window:void 0;function NA({deleteKeyCode:e,multiSelectionKeyCode:t}){const r=Fe(),{deleteElements:o}=Kd(),s=ds(e,{actInsideInputWithModifier:!1}),l=ds(t,{target:MA});L.useEffect(()=>{if(s){const{edges:u,nodes:f}=r.getState();o({nodes:f.filter(H0),edges:u.filter(H0)}),r.setState({nodesSelectionActive:!1})}},[s]),L.useEffect(()=>{r.setState({multiSelectionActive:l})},[l])}function AA(e){const t=Fe();L.useEffect(()=>{const r=()=>{var s,l,u,f;if(!e.current||!(((l=(s=e.current).checkVisibility)==null?void 0:l.call(s))??!0))return!1;const o=Od(e.current);(o.height===0||o.width===0)&&((f=(u=t.getState()).onError)==null||f.call(u,"004",sn.error004())),t.setState({width:o.width||500,height:o.height||500})};if(e.current){r(),window.addEventListener("resize",r);const o=new ResizeObserver(()=>r());return o.observe(e.current),()=>{window.removeEventListener("resize",r),o&&e.current&&o.unobserve(e.current)}}},[])}const Xl={position:"absolute",width:"100%",height:"100%",top:0,left:0},bA=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function RA({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:r=!0,panOnScroll:o=!1,panOnScrollSpeed:s=.5,panOnScrollMode:l=$r.Free,zoomOnDoubleClick:u=!0,panOnDrag:f=!0,defaultViewport:d,translateExtent:p,minZoom:g,maxZoom:m,zoomActivationKeyCode:v,preventScrolling:x=!0,children:w,noWheelClassName:_,noPanClassName:C,onViewportChange:E,isControlledViewport:M,paneClickDistance:k,selectionOnDrag:P}){const R=Fe(),D=L.useRef(null),{userSelectionActive:O,lib:F,connectionInProgress:K}=be(bA,We),J=ds(v),q=L.useRef();AA(D);const ee=L.useCallback(Z=>{E==null||E({x:Z[0],y:Z[1],zoom:Z[2]}),M||R.setState({transform:Z})},[E,M]);return L.useEffect(()=>{if(D.current){q.current=VN({domNode:D.current,minZoom:g,maxZoom:m,translateExtent:p,viewport:d,onDraggingChange:H=>R.setState($=>$.paneDragging===H?$:{paneDragging:H}),onPanZoomStart:(H,$)=>{const{onViewportChangeStart:I,onMoveStart:z}=R.getState();z==null||z(H,$),I==null||I($)},onPanZoom:(H,$)=>{const{onViewportChange:I,onMove:z}=R.getState();z==null||z(H,$),I==null||I($)},onPanZoomEnd:(H,$)=>{const{onViewportChangeEnd:I,onMoveEnd:z}=R.getState();z==null||z(H,$),I==null||I($)}});const{x:Z,y:A,zoom:W}=q.current.getViewport();return R.setState({panZoom:q.current,transform:[Z,A,W],domNode:D.current.closest(".react-flow")}),()=>{var H;(H=q.current)==null||H.destroy()}}},[]),L.useEffect(()=>{var Z;(Z=q.current)==null||Z.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:r,panOnScroll:o,panOnScrollSpeed:s,panOnScrollMode:l,zoomOnDoubleClick:u,panOnDrag:f,zoomActivationKeyPressed:J,preventScrolling:x,noPanClassName:C,userSelectionActive:O,noWheelClassName:_,lib:F,onTransformChange:ee,connectionInProgress:K,selectionOnDrag:P,paneClickDistance:k})},[e,t,r,o,s,l,u,f,J,x,C,O,_,F,ee,K,P,k]),T.jsx("div",{className:"react-flow__renderer",ref:D,style:Xl,children:w})}const DA=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function IA(){const{userSelectionActive:e,userSelectionRect:t}=be(DA,We);return e&&t?T.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const gf=(e,t)=>r=>{r.target===t.current&&(e==null||e(r))},LA=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function jA({isSelecting:e,selectionKeyPressed:t,selectionMode:r=us.Full,panOnDrag:o,autoPanOnSelection:s,paneClickDistance:l,selectionOnDrag:u,onSelectionStart:f,onSelectionEnd:d,onPaneClick:p,onPaneContextMenu:g,onPaneScroll:m,onPaneMouseEnter:v,onPaneMouseMove:x,onPaneMouseLeave:w,children:_}){const C=L.useRef(0),E=Fe(),{userSelectionActive:M,elementsSelectable:k,dragging:P,panBy:R,autoPanSpeed:D}=be(LA,We),O=k&&(e||M),F=L.useRef(null),K=L.useRef(),J=L.useRef(new Set),q=L.useRef(new Set),ee=L.useRef(!1),Z=L.useRef(!1),A=L.useRef({x:0,y:0}),W=L.useRef(!1),H=Q=>{if(Z.current||ee.current||E.getState().connection.inProgress){Z.current=!1,ee.current=!1;return}p==null||p(Q),E.getState().resetSelectedElements(),E.setState({nodesSelectionActive:!1})},$=Q=>{if(Array.isArray(o)&&(o!=null&&o.includes(2))){Q.preventDefault();return}g==null||g(Q)},I=m?Q=>m(Q):void 0,z=Q=>{Z.current&&(Q.stopPropagation(),Z.current=!1)},U=Q=>{var Ie,mt;const{domNode:oe,transform:me}=E.getState();if(K.current=oe==null?void 0:oe.getBoundingClientRect(),!K.current)return;const we=Q.target===F.current;if(!we&&!!Q.target.closest(".nokey")||!e||!(u&&we||t)||Q.button!==0||!Q.isPrimary)return;(mt=(Ie=Q.target)==null?void 0:Ie.setPointerCapture)==null||mt.call(Ie,Q.pointerId),Z.current=!1;const{x:_e,y:Pe}=on(Q.nativeEvent,K.current),Ne=Es({x:_e,y:Pe},me);E.setState({userSelectionRect:{width:0,height:0,startX:Ne.x,startY:Ne.y,x:_e,y:Pe}}),we||(Q.stopPropagation(),Q.preventDefault())};function N(Q,oe){const{userSelectionRect:me}=E.getState();if(!me)return;const{transform:we,nodeLookup:ve,edgeLookup:ge,connectionLookup:_e,triggerNodeChanges:Pe,triggerEdgeChanges:Ne,defaultEdgeOptions:Ie}=E.getState(),mt={x:me.startX,y:me.startY},{x:vt,y:at}=$i(mt,we),lt={startX:mt.x,startY:mt.y,x:Q<vt?Q:vt,y:oe<at?oe:at,width:Math.abs(Q-vt),height:Math.abs(oe-at)},En=J.current,ln=q.current;J.current=new Set(zd(ve,lt,we,r===us.Partial,!0).map(xt=>xt.id)),q.current=new Set;const un=(Ie==null?void 0:Ie.selectable)??!0;for(const xt of J.current){const zt=_e.get(xt);if(zt)for(const{edgeId:Pt}of zt.values()){const Ft=ge.get(Pt);Ft&&(Ft.selectable??un)&&q.current.add(Pt)}}if(!h0(En,J.current)){const xt=Ri(ve,J.current,!0);Pe(xt)}if(!h0(ln,q.current)){const xt=Ri(ge,q.current);Ne(xt)}E.setState({userSelectionRect:lt,userSelectionActive:!0,nodesSelectionActive:!1})}function j(){if(!s||!K.current)return;const[Q,oe]=Fd(A.current,K.current,D);R({x:Q,y:oe}).then(me=>{if(!Z.current||!me){C.current=requestAnimationFrame(j);return}const{x:we,y:ve}=A.current;N(we,ve),C.current=requestAnimationFrame(j)})}const te=()=>{cancelAnimationFrame(C.current),C.current=0,W.current=!1};L.useEffect(()=>()=>te(),[]);const ie=Q=>{const{userSelectionRect:oe,transform:me,resetSelectedElements:we}=E.getState();if(!K.current||!oe)return;const{x:ve,y:ge}=on(Q.nativeEvent,K.current);A.current={x:ve,y:ge};const _e=$i({x:oe.startX,y:oe.startY},me);if(!Z.current){const Pe=t?0:l;if(Math.hypot(ve-_e.x,ge-_e.y)<=Pe)return;we(),f==null||f(Q)}Z.current=!0,W.current||(j(),W.current=!0),N(ve,ge)},le=Q=>{var oe,me;if(!O){Q.target===F.current&&E.getState().connection.inProgress&&(ee.current=!0);return}Q.button===0&&((me=(oe=Q.target)==null?void 0:oe.releasePointerCapture)==null||me.call(oe,Q.pointerId),!M&&Q.target===F.current&&E.getState().userSelectionRect&&(H==null||H(Q)),E.setState({userSelectionActive:!1,userSelectionRect:null}),Z.current&&(d==null||d(Q),E.setState({nodesSelectionActive:J.current.size>0})),te())},ce=Q=>{var oe,me;(me=(oe=Q.target)==null?void 0:oe.releasePointerCapture)==null||me.call(oe,Q.pointerId),te()},ue=o===!0||Array.isArray(o)&&o.includes(0);return T.jsxs("div",{className:Ze(["react-flow__pane",{draggable:ue,dragging:P,selection:e}]),onClick:O?void 0:gf(H,F),onContextMenu:gf($,F),onWheel:gf(I,F),onPointerEnter:O?void 0:v,onPointerMove:O?ie:x,onPointerUp:le,onPointerCancel:O?ce:void 0,onPointerDownCapture:O?U:void 0,onClickCapture:O?z:void 0,onPointerLeave:w,ref:F,style:Xl,children:[_,T.jsx(IA,{})]})}function Yf({id:e,store:t,unselect:r=!1,nodeRef:o}){const{addSelectedNodes:s,unselectNodesAndEdges:l,multiSelectionActive:u,nodeLookup:f,onError:d}=t.getState(),p=f.get(e);if(!p){d==null||d("012",sn.error012(e));return}t.setState({nodesSelectionActive:!1}),p.selected?(r||p.selected&&u)&&(l({nodes:[p],edges:[]}),requestAnimationFrame(()=>{var g;return(g=o==null?void 0:o.current)==null?void 0:g.blur()})):s([e])}function r1({nodeRef:e,disabled:t=!1,noDragClassName:r,handleSelector:o,nodeId:s,isSelectable:l,nodeClickDistance:u}){const f=Fe(),[d,p]=L.useState(!1),g=L.useRef();return L.useEffect(()=>{if(!t)return g.current=EN({getStoreItems:()=>f.getState(),onNodeMouseDown:m=>{Yf({id:m,store:f,nodeRef:e})},onDragStart:()=>{p(!0)},onDragStop:()=>{p(!1)}}),()=>{var m;(m=g.current)==null||m.destroy(),g.current=void 0}},[t,f,e]),L.useEffect(()=>{t||!e.current||!g.current||g.current.update({noDragClassName:r,handleSelector:o,domNode:e.current,isSelectable:l,nodeId:s,nodeClickDistance:u})},[r,o,t,l,e,s,u]),d}const VA=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function i1(){const e=Fe();return L.useCallback(r=>{const{nodeExtent:o,snapToGrid:s,snapGrid:l,nodesDraggable:u,onError:f,updateNodePositions:d,nodeLookup:p,nodeOrigin:g}=e.getState(),m=new Map,v=VA(u),x=s?l[0]:5,w=s?l[1]:5,_=r.direction.x*x*r.factor,C=r.direction.y*w*r.factor;for(const[,E]of p){if(!v(E))continue;let M={x:E.internals.positionAbsolute.x+_,y:E.internals.positionAbsolute.y+C};s&&(M=ks(M,l));const{position:k,positionAbsolute:P}=Sx({nodeId:E.id,nextPosition:M,nodeLookup:p,nodeExtent:o,nodeOrigin:g,onError:f});E.position=k,E.internals.positionAbsolute=P,m.set(E.id,E)}d(m)},[])}const Yd=L.createContext(null),zA=Yd.Provider;Yd.Consumer;const o1=()=>L.useContext(Yd),FA=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),s1=L.createContext(null);function BA({children:e}){const t=be(FA,We);return T.jsx(s1.Provider,{value:t,children:e})}function OA(){const e=L.useContext(s1);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const $A={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},HA=(e,t,r)=>o=>{const{connectionClickStartHandle:s,connectionMode:l,connection:u}=o,{fromHandle:f,toHandle:d,isValid:p}=u;if(!f&&!s)return $A;const g=(d==null?void 0:d.nodeId)===e&&(d==null?void 0:d.id)===t&&(d==null?void 0:d.type)===r;return{connectingFrom:(f==null?void 0:f.nodeId)===e&&(f==null?void 0:f.id)===t&&(f==null?void 0:f.type)===r,connectingTo:g,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===t&&(s==null?void 0:s.type)===r,isPossibleEndHandle:l===Bi.Strict?(f==null?void 0:f.type)!==r:e!==(f==null?void 0:f.nodeId)||t!==(f==null?void 0:f.id),connectionInProcess:!!f,clickConnectionInProcess:!!s,valid:g&&p}};function UA({type:e="source",position:t=xe.Top,isValidConnection:r,isConnectable:o=!0,isConnectableStart:s=!0,isConnectableEnd:l=!0,id:u,onConnect:f,children:d,className:p,onMouseDown:g,onTouchStart:m,...v},x){var W,H;const w=u||null,_=e==="target",C=Fe(),E=o1(),{connectOnClick:M,noPanClassName:k,rfId:P}=OA(),{connectingFrom:R,connectingTo:D,clickConnecting:O,isPossibleEndHandle:F,connectionInProcess:K,clickConnectionInProcess:J,valid:q}=be(HA(E,w,e),We);E||(H=(W=C.getState()).onError)==null||H.call(W,"010",sn.error010());const ee=$=>{const{defaultEdgeOptions:I,onConnect:z,hasDefaultEdges:U}=C.getState(),N={...I,...$};if(U){const{edges:j,setEdges:te,onError:ie}=C.getState();te(kA(N,j,{onError:ie}))}z==null||z(N),f==null||f(N)},Z=$=>{if(!E)return;const I=Ax($.nativeEvent);if(s&&(I&&$.button===0||!I)){const z=C.getState();Kf.onPointerDown($.nativeEvent,{handleDomNode:$.currentTarget,autoPanOnConnect:z.autoPanOnConnect,connectionMode:z.connectionMode,connectionRadius:z.connectionRadius,domNode:z.domNode,nodeLookup:z.nodeLookup,lib:z.lib,isTarget:_,handleId:w,nodeId:E,flowId:z.rfId,panBy:z.panBy,cancelConnection:z.cancelConnection,onConnectStart:z.onConnectStart,onConnectEnd:(...U)=>{var N,j;return(j=(N=C.getState()).onConnectEnd)==null?void 0:j.call(N,...U)},updateConnection:z.updateConnection,onConnect:ee,isValidConnection:r||((...U)=>{var N,j;return((j=(N=C.getState()).isValidConnection)==null?void 0:j.call(N,...U))??!0}),getTransform:()=>C.getState().transform,getFromHandle:()=>C.getState().connection.fromHandle,autoPanSpeed:z.autoPanSpeed,dragThreshold:z.connectionDragThreshold})}I?g==null||g($):m==null||m($)},A=$=>{const{onClickConnectStart:I,onClickConnectEnd:z,connectionClickStartHandle:U,connectionMode:N,isValidConnection:j,lib:te,rfId:ie,nodeLookup:le,connection:ce}=C.getState();if(!E||!U&&!s)return;if(!U){I==null||I($.nativeEvent,{nodeId:E,handleId:w,handleType:e}),C.setState({connectionClickStartHandle:{nodeId:E,type:e,id:w}});return}const ue=Mx($.target),Q=r||j,{connection:oe,isValid:me}=Kf.isValid($.nativeEvent,{handle:{nodeId:E,id:w,type:e},connectionMode:N,fromNodeId:U.nodeId,fromHandleId:U.id||null,fromType:U.type,isValidConnection:Q,flowId:ie,doc:ue,lib:te,nodeLookup:le});me&&oe&&ee(oe);const we=structuredClone(ce);delete we.inProgress,we.toPosition=we.toHandle?we.toHandle.position:null,z==null||z($,we),C.setState({connectionClickStartHandle:null})};return T.jsx("div",{"data-handleid":w,"data-nodeid":E,"data-handlepos":t,"data-id":`${P}-${E}-${w}-${e}`,className:Ze(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",k,p,{source:!_,target:_,connectable:o,connectablestart:s,connectableend:l,clickconnecting:O,connectingfrom:R,connectingto:D,valid:q,connectionindicator:o&&(!K||F)&&(K||J?l:s)}]),onMouseDown:Z,onTouchStart:Z,onClick:M?A:void 0,ref:x,...v,children:d})}const Ui=L.memo(e1(UA));function WA({data:e,isConnectable:t,sourcePosition:r=xe.Bottom}){return T.jsxs(T.Fragment,{children:[e==null?void 0:e.label,T.jsx(Ui,{type:"source",position:r,isConnectable:t})]})}function XA({data:e,isConnectable:t,targetPosition:r=xe.Top,sourcePosition:o=xe.Bottom}){return T.jsxs(T.Fragment,{children:[T.jsx(Ui,{type:"target",position:r,isConnectable:t}),e==null?void 0:e.label,T.jsx(Ui,{type:"source",position:o,isConnectable:t})]})}function KA(){return null}function YA({data:e,isConnectable:t,targetPosition:r=xe.Top}){return T.jsxs(T.Fragment,{children:[T.jsx(Ui,{type:"target",position:r,isConnectable:t}),e==null?void 0:e.label]})}const Ml={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},U0={input:WA,default:XA,output:YA,group:KA};function GA(e){var t,r,o,s;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((r=e.style)==null?void 0:r.height)}:{width:e.width??((o=e.style)==null?void 0:o.width),height:e.height??((s=e.style)==null?void 0:s.height)}}const QA=e=>{const{width:t,height:r,x:o,y:s}=Ss(e.nodeLookup,{filter:l=>!!l.selected});return{width:rn(t)?t:null,height:rn(r)?r:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${s}px)`}};function qA({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:r}){const o=Fe(),{width:s,height:l,transformString:u,userSelectionActive:f}=be(QA,We),d=i1(),p=L.useRef(null);L.useEffect(()=>{var x;r||(x=p.current)==null||x.focus({preventScroll:!0})},[r]);const g=!f&&s!==null&&l!==null;if(r1({nodeRef:p,disabled:!g}),!g)return null;const m=e?x=>{const w=o.getState().nodes.filter(_=>_.selected);e(x,w)}:void 0,v=x=>{Object.prototype.hasOwnProperty.call(Ml,x.key)&&(x.preventDefault(),d({direction:Ml[x.key],factor:x.shiftKey?4:1}))};return T.jsx("div",{className:Ze(["react-flow__nodesselection","react-flow__container",t]),style:{transform:u},children:T.jsx("div",{ref:p,className:"react-flow__nodesselection-rect",onContextMenu:m,tabIndex:r?void 0:-1,onKeyDown:r?void 0:v,style:{width:s,height:l}})})}const W0=typeof window<"u"?window:void 0,ZA=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function a1({children:e,onPaneClick:t,onPaneMouseEnter:r,onPaneMouseMove:o,onPaneMouseLeave:s,onPaneContextMenu:l,onPaneScroll:u,paneClickDistance:f,deleteKeyCode:d,selectionKeyCode:p,selectionOnDrag:g,selectionMode:m,onSelectionStart:v,onSelectionEnd:x,multiSelectionKeyCode:w,panActivationKeyCode:_,zoomActivationKeyCode:C,elementsSelectable:E,zoomOnScroll:M,zoomOnPinch:k,panOnScroll:P,panOnScrollSpeed:R,panOnScrollMode:D,zoomOnDoubleClick:O,panOnDrag:F,autoPanOnSelection:K,defaultViewport:J,translateExtent:q,minZoom:ee,maxZoom:Z,preventScrolling:A,onSelectionContextMenu:W,noWheelClassName:H,noPanClassName:$,disableKeyboardA11y:I,onViewportChange:z,isControlledViewport:U}){const{nodesSelectionActive:N,userSelectionActive:j}=be(ZA,We),te=ds(p,{target:W0}),ie=ds(_,{target:W0}),le=ie||F,ce=ie||P,ue=g&&le!==!0,Q=te||j||ue;return NA({deleteKeyCode:d,multiSelectionKeyCode:w}),T.jsx(RA,{onPaneContextMenu:l,elementsSelectable:E,zoomOnScroll:M,zoomOnPinch:k,panOnScroll:ce,panOnScrollSpeed:R,panOnScrollMode:D,zoomOnDoubleClick:O,panOnDrag:!te&&le,defaultViewport:J,translateExtent:q,minZoom:ee,maxZoom:Z,zoomActivationKeyCode:C,preventScrolling:A,noWheelClassName:H,noPanClassName:$,onViewportChange:z,isControlledViewport:U,paneClickDistance:f,selectionOnDrag:ue,children:T.jsxs(jA,{onSelectionStart:v,onSelectionEnd:x,onPaneClick:t,onPaneMouseEnter:r,onPaneMouseMove:o,onPaneMouseLeave:s,onPaneContextMenu:l,onPaneScroll:u,panOnDrag:le,autoPanOnSelection:K,isSelecting:!!Q,selectionMode:m,selectionKeyPressed:te,paneClickDistance:f,selectionOnDrag:ue,children:[e,N&&T.jsx(qA,{onSelectionContextMenu:W,noPanClassName:$,disableKeyboardA11y:I})]})})}a1.displayName="FlowRenderer";const JA=L.memo(a1),e3=e=>t=>e?zd(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(r=>r.id):Array.from(t.nodeLookup.keys());function t3(e){return be(L.useCallback(e3(e),[e]),We)}const n3=e=>e.updateNodeInternals;function r3(){const e=be(n3),[t]=L.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(r=>{const o=new Map;r.forEach(s=>{const l=s.target.getAttribute("data-id");o.set(l,{id:l,nodeElement:s.target,force:!0})}),e(o)}));return L.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function i3({node:e,nodeType:t,hasDimensions:r,resizeObserver:o}){const s=Fe(),l=L.useRef(null),u=L.useRef(null),f=L.useRef(e.sourcePosition),d=L.useRef(e.targetPosition),p=L.useRef(t),g=r&&!!e.internals.handleBounds;return L.useEffect(()=>{l.current&&!e.hidden&&(!g||u.current!==l.current)&&(u.current&&(o==null||o.unobserve(u.current)),o==null||o.observe(l.current),u.current=l.current)},[g,e.hidden]),L.useEffect(()=>()=>{u.current&&(o==null||o.unobserve(u.current),u.current=null)},[]),L.useEffect(()=>{if(l.current){const m=p.current!==t,v=f.current!==e.sourcePosition,x=d.current!==e.targetPosition;(m||v||x)&&(p.current=t,f.current=e.sourcePosition,d.current=e.targetPosition,s.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:l.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),l}function o3({id:e,onClick:t,onMouseEnter:r,onMouseMove:o,onMouseLeave:s,onContextMenu:l,onDoubleClick:u,nodesDraggable:f,elementsSelectable:d,nodesConnectable:p,nodesFocusable:g,resizeObserver:m,noDragClassName:v,noPanClassName:x,disableKeyboardA11y:w,rfId:_,nodeTypes:C,nodeClickDistance:E,onError:M}){const{node:k,internals:P,isParent:R}=be(Q=>{const oe=Q.nodeLookup.get(e),me=Q.parentLookup.has(e);return{node:oe,internals:oe.internals,isParent:me}},We);let D=k.type||"default",O=(C==null?void 0:C[D])||U0[D];O===void 0&&(M==null||M("003",sn.error003(D)),D="default",O=(C==null?void 0:C.default)||U0.default);const F=!!(k.draggable||f&&typeof k.draggable>"u"),K=!!(k.selectable||d&&typeof k.selectable>"u"),J=!!(k.connectable||p&&typeof k.connectable>"u"),q=!!(k.focusable||g&&typeof k.focusable>"u"),ee=Fe(),Z=Tx(k),A=i3({node:k,nodeType:D,hasDimensions:Z,resizeObserver:m}),W=r1({nodeRef:A,disabled:k.hidden||!F,noDragClassName:v,handleSelector:k.dragHandle,nodeId:e,isSelectable:K,nodeClickDistance:E}),H=i1();if(k.hidden)return null;const $=kn(k),I=GA(k),z=K||F||t||r||o||s,U=r?Q=>r(Q,{...P.userNode}):void 0,N=o?Q=>o(Q,{...P.userNode}):void 0,j=s?Q=>s(Q,{...P.userNode}):void 0,te=l?Q=>l(Q,{...P.userNode}):void 0,ie=u?Q=>u(Q,{...P.userNode}):void 0,le=Q=>{const{selectNodesOnDrag:oe,nodeDragThreshold:me}=ee.getState();K&&(!oe||!F||me>0)&&Yf({id:e,store:ee,nodeRef:A}),t&&t(Q,{...P.userNode})},ce=Q=>{if(!(Nx(Q.nativeEvent)||w)){if(gx.includes(Q.key)&&K){const oe=Q.key==="Escape";Yf({id:e,store:ee,unselect:oe,nodeRef:A})}else if(F&&k.selected&&Object.prototype.hasOwnProperty.call(Ml,Q.key)){Q.preventDefault();const{ariaLabelConfig:oe}=ee.getState();ee.setState({ariaLiveMessage:oe["node.a11yDescription.ariaLiveMessage"]({direction:Q.key.replace("Arrow","").toLowerCase(),x:~~P.positionAbsolute.x,y:~~P.positionAbsolute.y})}),H({direction:Ml[Q.key],factor:Q.shiftKey?4:1})}}},ue=()=>{var _e;if(w||!((_e=A.current)!=null&&_e.matches(":focus-visible")))return;const{transform:Q,width:oe,height:me,autoPanOnNodeFocus:we,setCenter:ve}=ee.getState();if(!we)return;zd(new Map([[e,k]]),{x:0,y:0,width:oe,height:me},Q,!0).length>0||ve(k.position.x+$.width/2,k.position.y+$.height/2,{zoom:Q[2]})};return T.jsx("div",{className:Ze(["react-flow__node",`react-flow__node-${D}`,{[x]:F},k.className,{selected:k.selected,selectable:K,parent:R,draggable:F,dragging:W}]),ref:A,style:{zIndex:P.z,transform:`translate(${P.positionAbsolute.x}px,${P.positionAbsolute.y}px)`,pointerEvents:z?"all":"none",visibility:Z?"visible":"hidden",...k.style,...I},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:U,onMouseMove:N,onMouseLeave:j,onContextMenu:te,onClick:le,onDoubleClick:ie,onKeyDown:q?ce:void 0,tabIndex:q?0:void 0,onFocus:q?ue:void 0,role:k.ariaRole??(q?"group":void 0),"aria-roledescription":"node","aria-describedby":w?void 0:`${Yx}-${_}`,"aria-label":k.ariaLabel,...k.domAttributes,children:T.jsx(zA,{value:e,children:T.jsx(O,{id:e,data:k.data,type:D,positionAbsoluteX:P.positionAbsolute.x,positionAbsoluteY:P.positionAbsolute.y,selected:k.selected??!1,selectable:K,draggable:F,deletable:k.deletable??!0,isConnectable:J,sourcePosition:k.sourcePosition,targetPosition:k.targetPosition,dragging:W,dragHandle:k.dragHandle,zIndex:P.z,parentId:k.parentId,...$})})})}var s3=L.memo(o3);const a3=e=>({nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function l1(e){const{nodesConnectable:t,nodesFocusable:r,elementsSelectable:o,onError:s}=be(a3,We),l=t3(e.onlyRenderVisibleElements),u=r3();return T.jsx("div",{className:"react-flow__nodes",style:Xl,children:l.map(f=>T.jsx(s3,{id:f,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:u,nodesDraggable:e.nodesDraggable??!0,nodesConnectable:t,nodesFocusable:r,elementsSelectable:o,nodeClickDistance:e.nodeClickDistance,onError:s},f))})}l1.displayName="NodeRenderer";const l3=L.memo(l1);function u3(e){return be(L.useCallback(r=>{if(!e)return r.edges.map(s=>s.id);const o=[];if(r.width&&r.height)for(const s of r.edges){const l=r.nodeLookup.get(s.source),u=r.nodeLookup.get(s.target);l&&u&&iN({sourceNode:l,targetNode:u,width:r.width,height:r.height,transform:r.transform})&&o.push(s.id)}return o},[e]),We)}const c3=({color:e="none",strokeWidth:t=1})=>{const r={strokeWidth:t,...e&&{stroke:e}};return T.jsx("polyline",{className:"arrow",style:r,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},f3=({color:e="none",strokeWidth:t=1})=>{const r={strokeWidth:t,...e&&{stroke:e,fill:e}};return T.jsx("polyline",{className:"arrowclosed",style:r,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},X0={[_l.Arrow]:c3,[_l.ArrowClosed]:f3};function d3(e){const t=Fe();return L.useMemo(()=>{var s,l;return Object.prototype.hasOwnProperty.call(X0,e)?X0[e]:((l=(s=t.getState()).onError)==null||l.call(s,"009",sn.error009(e)),null)},[e])}const h3=({id:e,type:t,color:r,width:o=12.5,height:s=12.5,markerUnits:l="strokeWidth",strokeWidth:u,orient:f="auto-start-reverse"})=>{const d=d3(t);return d?T.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:l,orient:f,refX:"0",refY:"0",children:T.jsx(d,{color:r,strokeWidth:u})}):null},u1=({defaultColor:e,rfId:t})=>{const r=be(l=>l.edges),o=be(l=>l.defaultEdgeOptions),s=L.useMemo(()=>dN(r,{id:t,defaultColor:e,defaultMarkerStart:o==null?void 0:o.markerStart,defaultMarkerEnd:o==null?void 0:o.markerEnd}),[r,o,t,e]);return s.length?T.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:T.jsx("defs",{children:s.map(l=>T.jsx(h3,{id:l.id,type:l.type,color:l.color,width:l.width,height:l.height,markerUnits:l.markerUnits,strokeWidth:l.strokeWidth,orient:l.orient},l.id))})}):null};u1.displayName="MarkerDefinitions";var p3=L.memo(u1);function c1({x:e,y:t,label:r,labelStyle:o,labelShowBg:s=!0,labelBgStyle:l,labelBgPadding:u=[2,4],labelBgBorderRadius:f=2,children:d,className:p,...g}){const[m,v]=L.useState({x:1,y:0,width:0,height:0}),x=Ze(["react-flow__edge-textwrapper",p]),w=L.useRef(null);return L.useEffect(()=>{if(w.current){const _=w.current.getBBox();v({x:_.x,y:_.y,width:_.width,height:_.height})}},[r]),r?T.jsxs("g",{transform:`translate(${e-m.width/2} ${t-m.height/2})`,className:x,visibility:m.width?"visible":"hidden",...g,children:[s&&T.jsx("rect",{width:m.width+2*u[0],x:-u[0],y:-u[1],height:m.height+2*u[1],className:"react-flow__edge-textbg",style:l,rx:f,ry:f}),T.jsx("text",{className:"react-flow__edge-text",y:m.height/2,dy:"0.3em",ref:w,style:o,children:r}),d]}):null}c1.displayName="EdgeText";const m3=L.memo(c1);function Kl({path:e,labelX:t,labelY:r,label:o,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:d,interactionWidth:p=20,...g}){return T.jsxs(T.Fragment,{children:[T.jsx("path",{...g,d:e,fill:"none",className:Ze(["react-flow__edge-path",g.className])}),p?T.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:p,className:"react-flow__edge-interaction"}):null,o&&rn(t)&&rn(r)?T.jsx(m3,{x:t,y:r,label:o,labelStyle:s,labelShowBg:l,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:d}):null]})}function K0({pos:e,x1:t,y1:r,x2:o,y2:s}){return e===xe.Left||e===xe.Right?[.5*(t+o),r]:[t,.5*(r+s)]}function f1({sourceX:e,sourceY:t,sourcePosition:r=xe.Bottom,targetX:o,targetY:s,targetPosition:l=xe.Top}){const[u,f]=K0({pos:r,x1:e,y1:t,x2:o,y2:s}),[d,p]=K0({pos:l,x1:o,y1:s,x2:e,y2:t}),[g,m,v,x]=bx({sourceX:e,sourceY:t,targetX:o,targetY:s,sourceControlX:u,sourceControlY:f,targetControlX:d,targetControlY:p});return[`M${e},${t} C${u},${f} ${d},${p} ${o},${s}`,g,m,v,x]}function d1(e){return L.memo(({id:t,sourceX:r,sourceY:o,targetX:s,targetY:l,sourcePosition:u,targetPosition:f,label:d,labelStyle:p,labelShowBg:g,labelBgStyle:m,labelBgPadding:v,labelBgBorderRadius:x,style:w,markerEnd:_,markerStart:C,interactionWidth:E})=>{const[M,k,P]=f1({sourceX:r,sourceY:o,sourcePosition:u,targetX:s,targetY:l,targetPosition:f}),R=e.isInternal?void 0:t;return T.jsx(Kl,{id:R,path:M,labelX:k,labelY:P,label:d,labelStyle:p,labelShowBg:g,labelBgStyle:m,labelBgPadding:v,labelBgBorderRadius:x,style:w,markerEnd:_,markerStart:C,interactionWidth:E})})}const g3=d1({isInternal:!1}),h1=d1({isInternal:!0});g3.displayName="SimpleBezierEdge";h1.displayName="SimpleBezierEdgeInternal";function p1(e){return L.memo(({id:t,sourceX:r,sourceY:o,targetX:s,targetY:l,label:u,labelStyle:f,labelShowBg:d,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:m,style:v,sourcePosition:x=xe.Bottom,targetPosition:w=xe.Top,markerEnd:_,markerStart:C,pathOptions:E,interactionWidth:M})=>{const[k,P,R]=Uf({sourceX:r,sourceY:o,sourcePosition:x,targetX:s,targetY:l,targetPosition:w,borderRadius:E==null?void 0:E.borderRadius,offset:E==null?void 0:E.offset,stepPosition:E==null?void 0:E.stepPosition}),D=e.isInternal?void 0:t;return T.jsx(Kl,{id:D,path:k,labelX:P,labelY:R,label:u,labelStyle:f,labelShowBg:d,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:m,style:v,markerEnd:_,markerStart:C,interactionWidth:M})})}const m1=p1({isInternal:!1}),g1=p1({isInternal:!0});m1.displayName="SmoothStepEdge";g1.displayName="SmoothStepEdgeInternal";function y1(e){return L.memo(({id:t,...r})=>{var s;const o=e.isInternal?void 0:t;return T.jsx(m1,{...r,id:o,pathOptions:L.useMemo(()=>{var l;return{borderRadius:0,offset:(l=r.pathOptions)==null?void 0:l.offset}},[(s=r.pathOptions)==null?void 0:s.offset])})})}const y3=y1({isInternal:!1}),v1=y1({isInternal:!0});y3.displayName="StepEdge";v1.displayName="StepEdgeInternal";function x1(e){return L.memo(({id:t,sourceX:r,sourceY:o,targetX:s,targetY:l,label:u,labelStyle:f,labelShowBg:d,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:m,style:v,markerEnd:x,markerStart:w,interactionWidth:_})=>{const[C,E,M]=Ix({sourceX:r,sourceY:o,targetX:s,targetY:l}),k=e.isInternal?void 0:t;return T.jsx(Kl,{id:k,path:C,labelX:E,labelY:M,label:u,labelStyle:f,labelShowBg:d,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:m,style:v,markerEnd:x,markerStart:w,interactionWidth:_})})}const v3=x1({isInternal:!1}),w1=x1({isInternal:!0});v3.displayName="StraightEdge";w1.displayName="StraightEdgeInternal";function S1(e){return L.memo(({id:t,sourceX:r,sourceY:o,targetX:s,targetY:l,sourcePosition:u=xe.Bottom,targetPosition:f=xe.Top,label:d,labelStyle:p,labelShowBg:g,labelBgStyle:m,labelBgPadding:v,labelBgBorderRadius:x,style:w,markerEnd:_,markerStart:C,pathOptions:E,interactionWidth:M})=>{const[k,P,R]=Rx({sourceX:r,sourceY:o,sourcePosition:u,targetX:s,targetY:l,targetPosition:f,curvature:E==null?void 0:E.curvature}),D=e.isInternal?void 0:t;return T.jsx(Kl,{id:D,path:k,labelX:P,labelY:R,label:d,labelStyle:p,labelShowBg:g,labelBgStyle:m,labelBgPadding:v,labelBgBorderRadius:x,style:w,markerEnd:_,markerStart:C,interactionWidth:M})})}const x3=S1({isInternal:!1}),k1=S1({isInternal:!0});x3.displayName="BezierEdge";k1.displayName="BezierEdgeInternal";const Y0={default:k1,straight:w1,step:v1,smoothstep:g1,simplebezier:h1},G0={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},w3=(e,t,r)=>r===xe.Left?e-t:r===xe.Right?e+t:e,S3=(e,t,r)=>r===xe.Top?e-t:r===xe.Bottom?e+t:e,Q0="react-flow__edgeupdater";function q0({position:e,centerX:t,centerY:r,radius:o=10,onMouseDown:s,onMouseEnter:l,onMouseOut:u,type:f}){return T.jsx("circle",{onMouseDown:s,onMouseEnter:l,onMouseOut:u,className:Ze([Q0,`${Q0}-${f}`]),cx:w3(t,o,e),cy:S3(r,o,e),r:o,stroke:"transparent",fill:"transparent"})}function k3({isReconnectable:e,reconnectRadius:t,edge:r,sourceX:o,sourceY:s,targetX:l,targetY:u,sourcePosition:f,targetPosition:d,onReconnect:p,onReconnectStart:g,onReconnectEnd:m,setReconnecting:v,setUpdateHover:x}){const w=Fe(),_=(P,R)=>{if(P.button!==0)return;const{autoPanOnConnect:D,domNode:O,connectionMode:F,connectionRadius:K,lib:J,onConnectStart:q,cancelConnection:ee,nodeLookup:Z,rfId:A,panBy:W,updateConnection:H}=w.getState(),$=R.type==="target",I=(N,j)=>{v(!1),m==null||m(N,r,R.type,j)},z=N=>p==null?void 0:p(r,N),U=(N,j)=>{v(!0),g==null||g(P,r,R.type),q==null||q(N,j)};Kf.onPointerDown(P.nativeEvent,{autoPanOnConnect:D,connectionMode:F,connectionRadius:K,domNode:O,handleId:R.id,nodeId:R.nodeId,nodeLookup:Z,isTarget:$,edgeUpdaterType:R.type,lib:J,flowId:A,cancelConnection:ee,panBy:W,isValidConnection:(...N)=>{var j,te;return((te=(j=w.getState()).isValidConnection)==null?void 0:te.call(j,...N))??!0},onConnect:z,onConnectStart:U,onConnectEnd:(...N)=>{var j,te;return(te=(j=w.getState()).onConnectEnd)==null?void 0:te.call(j,...N)},onReconnectEnd:I,updateConnection:H,getTransform:()=>w.getState().transform,getFromHandle:()=>w.getState().connection.fromHandle,dragThreshold:w.getState().connectionDragThreshold,handleDomNode:P.currentTarget})},C=P=>_(P,{nodeId:r.target,id:r.targetHandle??null,type:"target"}),E=P=>_(P,{nodeId:r.source,id:r.sourceHandle??null,type:"source"}),M=()=>x(!0),k=()=>x(!1);return T.jsxs(T.Fragment,{children:[(e===!0||e==="source")&&T.jsx(q0,{position:f,centerX:o,centerY:s,radius:t,onMouseDown:C,onMouseEnter:M,onMouseOut:k,type:"source"}),(e===!0||e==="target")&&T.jsx(q0,{position:d,centerX:l,centerY:u,radius:t,onMouseDown:E,onMouseEnter:M,onMouseOut:k,type:"target"})]})}function E3({id:e,edgesFocusable:t,edgesReconnectable:r,elementsSelectable:o,onClick:s,onDoubleClick:l,onContextMenu:u,onMouseEnter:f,onMouseMove:d,onMouseLeave:p,reconnectRadius:g,onReconnect:m,onReconnectStart:v,onReconnectEnd:x,rfId:w,edgeTypes:_,noPanClassName:C,onError:E,disableKeyboardA11y:M}){let k=be(ve=>ve.edgeLookup.get(e));const P=be(ve=>ve.defaultEdgeOptions);k=P?{...P,...k}:k;let R=k.type||"default",D=(_==null?void 0:_[R])||Y0[R];D===void 0&&(E==null||E("011",sn.error011(R)),R="default",D=(_==null?void 0:_.default)||Y0.default);const O=!!(k.focusable||t&&typeof k.focusable>"u"),F=typeof m<"u"&&(k.reconnectable||r&&typeof k.reconnectable>"u"),K=!!(k.selectable||o&&typeof k.selectable>"u"),J=L.useRef(null),[q,ee]=L.useState(!1),[Z,A]=L.useState(!1),W=Fe(),{zIndex:H=k.zIndex,sourceX:$,sourceY:I,targetX:z,targetY:U,sourcePosition:N,targetPosition:j}=be(L.useCallback(ve=>{const ge=ve.nodeLookup.get(k.source),_e=ve.nodeLookup.get(k.target);if(!ge||!_e)return G0;const Pe=fN({id:e,sourceNode:ge,targetNode:_e,sourceHandle:k.sourceHandle||null,targetHandle:k.targetHandle||null,connectionMode:ve.connectionMode,onError:E}),Ne=rN({selected:k.selected,zIndex:k.zIndex,sourceNode:ge,targetNode:_e,elevateOnSelect:ve.elevateEdgesOnSelect,zIndexMode:ve.zIndexMode});return{...Pe||G0,zIndex:Ne}},[k.source,k.target,k.sourceHandle,k.targetHandle,k.selected,k.zIndex]),We),te=L.useMemo(()=>k.markerStart?`url('#${Wf(k.markerStart,w)}')`:void 0,[k.markerStart,w]),ie=L.useMemo(()=>k.markerEnd?`url('#${Wf(k.markerEnd,w)}')`:void 0,[k.markerEnd,w]);if(k.hidden||$===null||I===null||z===null||U===null)return null;const le=ve=>{var Ne;const{addSelectedEdges:ge,unselectNodesAndEdges:_e,multiSelectionActive:Pe}=W.getState();K&&(W.setState({nodesSelectionActive:!1}),k.selected&&Pe?(_e({nodes:[],edges:[k]}),(Ne=J.current)==null||Ne.blur()):ge([e])),s&&s(ve,k)},ce=l?ve=>{l(ve,{...k})}:void 0,ue=u?ve=>{u(ve,{...k})}:void 0,Q=f?ve=>{f(ve,{...k})}:void 0,oe=d?ve=>{d(ve,{...k})}:void 0,me=p?ve=>{p(ve,{...k})}:void 0,we=ve=>{var ge;if(!M&&gx.includes(ve.key)&&K){const{unselectNodesAndEdges:_e,addSelectedEdges:Pe}=W.getState();ve.key==="Escape"?((ge=J.current)==null||ge.blur(),_e({edges:[k]})):Pe([e])}};return T.jsx("svg",{style:{zIndex:H},children:T.jsxs("g",{className:Ze(["react-flow__edge",`react-flow__edge-${R}`,k.className,C,{selected:k.selected,animated:k.animated,inactive:!K&&!s,updating:q,selectable:K}]),onClick:le,onDoubleClick:ce,onContextMenu:ue,onMouseEnter:Q,onMouseMove:oe,onMouseLeave:me,onKeyDown:O?we:void 0,tabIndex:O?0:void 0,role:k.ariaRole??(O?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":k.ariaLabel===null?void 0:k.ariaLabel||`Edge from ${k.source} to ${k.target}`,"aria-describedby":O?`${Gx}-${w}`:void 0,ref:J,...k.domAttributes,children:[!Z&&T.jsx(D,{id:e,source:k.source,target:k.target,type:k.type,selected:k.selected,animated:k.animated,selectable:K,deletable:k.deletable??!0,label:k.label,labelStyle:k.labelStyle,labelShowBg:k.labelShowBg,labelBgStyle:k.labelBgStyle,labelBgPadding:k.labelBgPadding,labelBgBorderRadius:k.labelBgBorderRadius,sourceX:$,sourceY:I,targetX:z,targetY:U,sourcePosition:N,targetPosition:j,data:k.data,style:k.style,sourceHandleId:k.sourceHandle,targetHandleId:k.targetHandle,markerStart:te,markerEnd:ie,pathOptions:"pathOptions"in k?k.pathOptions:void 0,interactionWidth:k.interactionWidth}),F&&T.jsx(k3,{edge:k,isReconnectable:F,reconnectRadius:g,onReconnect:m,onReconnectStart:v,onReconnectEnd:x,sourceX:$,sourceY:I,targetX:z,targetY:U,sourcePosition:N,targetPosition:j,setUpdateHover:ee,setReconnecting:A})]})})}var C3=L.memo(E3);const _3=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function E1({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:r,edgeTypes:o,noPanClassName:s,onReconnect:l,onEdgeContextMenu:u,onEdgeMouseEnter:f,onEdgeMouseMove:d,onEdgeMouseLeave:p,onEdgeClick:g,reconnectRadius:m,onEdgeDoubleClick:v,onReconnectStart:x,onReconnectEnd:w,disableKeyboardA11y:_}){const{edgesFocusable:C,edgesReconnectable:E,elementsSelectable:M,onError:k}=be(_3,We),P=u3(t);return T.jsxs("div",{className:"react-flow__edges",children:[T.jsx(p3,{defaultColor:e,rfId:r}),P.map(R=>T.jsx(C3,{id:R,edgesFocusable:C,edgesReconnectable:E,elementsSelectable:M,noPanClassName:s,onReconnect:l,onContextMenu:u,onMouseEnter:f,onMouseMove:d,onMouseLeave:p,onClick:g,reconnectRadius:m,onDoubleClick:v,onReconnectStart:x,onReconnectEnd:w,rfId:r,onError:k,edgeTypes:o,disableKeyboardA11y:_},R))]})}E1.displayName="EdgeRenderer";const T3=L.memo(E1),Z0=e=>`translate(${e[0]}px,${e[1]}px) scale(${e[2]})`;function P3({children:e}){const t=Fe(),r=L.useRef(null),[o]=L.useState(()=>t.getState().transform);return t1(()=>{let s=null;const l=()=>{const u=t.getState().transform;s&&u[0]===s[0]&&u[1]===s[1]&&u[2]===s[2]||(s=u,r.current&&(r.current.style.transform=Z0(u)))};return l(),t.subscribe(l)},[t]),T.jsx("div",{ref:r,className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:Z0(o)},children:e})}function M3(e){const t=Kd(),r=L.useRef(!1);L.useEffect(()=>{!r.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),r.current=!0)},[e,t.viewportInitialized])}const N3=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function A3(e){const t=be(N3),r=Fe();return L.useEffect(()=>{e&&(t==null||t(e),r.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function b3(e){return e.connection.inProgress?{...e.connection,to:Es(e.connection.to,e.transform)}:{...e.connection}}function R3(e){return b3}function D3(e){const t=R3();return be(t,We)}const I3=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function L3({containerStyle:e,style:t,type:r,component:o}){const{nodesConnectable:s,width:l,height:u,isValid:f,inProgress:d}=be(I3,We);return!(l&&s&&d)?null:T.jsx("svg",{style:e,width:l,height:u,className:"react-flow__connectionline react-flow__container",children:T.jsx("g",{className:Ze(["react-flow__connection",xx(f)]),children:T.jsx(C1,{style:t,type:r,CustomComponent:o,isValid:f})})})}const C1=({style:e,type:t=fr.Bezier,CustomComponent:r,isValid:o})=>{const{inProgress:s,from:l,fromNode:u,fromHandle:f,fromPosition:d,to:p,toNode:g,toHandle:m,toPosition:v,pointer:x}=D3();if(!s)return;if(r)return T.jsx(r,{connectionLineType:t,connectionLineStyle:e,fromNode:u,fromHandle:f,fromX:l.x,fromY:l.y,toX:p.x,toY:p.y,fromPosition:d,toPosition:v,connectionStatus:xx(o),toNode:g,toHandle:m,pointer:x});let w="";const _={sourceX:l.x,sourceY:l.y,sourcePosition:d,targetX:p.x,targetY:p.y,targetPosition:v};switch(t){case fr.Bezier:[w]=Rx(_);break;case fr.SimpleBezier:[w]=f1(_);break;case fr.Step:[w]=Uf({..._,borderRadius:0});break;case fr.SmoothStep:[w]=Uf(_);break;default:[w]=Ix(_)}return T.jsx("path",{d:w,fill:"none",className:"react-flow__connection-path",style:e})};C1.displayName="ConnectionLine";const j3={};function J0(e=j3){L.useRef(e),Fe(),L.useEffect(()=>{},[e])}function V3(){Fe(),L.useRef(!1),L.useEffect(()=>{},[])}function _1({nodeTypes:e,edgeTypes:t,onInit:r,onNodeClick:o,onEdgeClick:s,onNodeDoubleClick:l,onEdgeDoubleClick:u,onNodeMouseEnter:f,onNodeMouseMove:d,onNodeMouseLeave:p,onNodeContextMenu:g,onSelectionContextMenu:m,onSelectionStart:v,onSelectionEnd:x,connectionLineType:w,connectionLineStyle:_,connectionLineComponent:C,connectionLineContainerStyle:E,selectionKeyCode:M,selectionOnDrag:k,selectionMode:P,multiSelectionKeyCode:R,panActivationKeyCode:D,zoomActivationKeyCode:O,deleteKeyCode:F,onlyRenderVisibleElements:K,elementsSelectable:J,defaultViewport:q,translateExtent:ee,minZoom:Z,maxZoom:A,preventScrolling:W,defaultMarkerColor:H,zoomOnScroll:$,zoomOnPinch:I,panOnScroll:z,panOnScrollSpeed:U,panOnScrollMode:N,zoomOnDoubleClick:j,panOnDrag:te,autoPanOnSelection:ie,onPaneClick:le,onPaneMouseEnter:ce,onPaneMouseMove:ue,onPaneMouseLeave:Q,onPaneScroll:oe,onPaneContextMenu:me,paneClickDistance:we,nodeClickDistance:ve,onEdgeContextMenu:ge,onEdgeMouseEnter:_e,onEdgeMouseMove:Pe,onEdgeMouseLeave:Ne,reconnectRadius:Ie,onReconnect:mt,onReconnectStart:vt,onReconnectEnd:at,noDragClassName:lt,noWheelClassName:En,noPanClassName:ln,disableKeyboardA11y:un,nodeExtent:xt,rfId:zt,viewport:Pt,onViewportChange:Ft,nodesDraggable:Gr}){return J0(e),J0(t),V3(),M3(r),A3(Pt),T.jsx(JA,{onPaneClick:le,onPaneMouseEnter:ce,onPaneMouseMove:ue,onPaneMouseLeave:Q,onPaneContextMenu:me,onPaneScroll:oe,paneClickDistance:we,deleteKeyCode:F,selectionKeyCode:M,selectionOnDrag:k,selectionMode:P,onSelectionStart:v,onSelectionEnd:x,multiSelectionKeyCode:R,panActivationKeyCode:D,zoomActivationKeyCode:O,elementsSelectable:J,zoomOnScroll:$,zoomOnPinch:I,zoomOnDoubleClick:j,panOnScroll:z,panOnScrollSpeed:U,panOnScrollMode:N,panOnDrag:te,autoPanOnSelection:ie,defaultViewport:q,translateExtent:ee,minZoom:Z,maxZoom:A,onSelectionContextMenu:m,preventScrolling:W,noDragClassName:lt,noWheelClassName:En,noPanClassName:ln,disableKeyboardA11y:un,onViewportChange:Ft,isControlledViewport:!!Pt,children:T.jsxs(P3,{children:[T.jsx(T3,{edgeTypes:t,onEdgeClick:s,onEdgeDoubleClick:u,onReconnect:mt,onReconnectStart:vt,onReconnectEnd:at,onlyRenderVisibleElements:K,onEdgeContextMenu:ge,onEdgeMouseEnter:_e,onEdgeMouseMove:Pe,onEdgeMouseLeave:Ne,reconnectRadius:Ie,defaultMarkerColor:H,noPanClassName:ln,disableKeyboardA11y:un,rfId:zt}),T.jsx(L3,{style:_,type:w,component:C,containerStyle:E}),T.jsx("div",{className:"react-flow__edgelabel-renderer"}),T.jsx(l3,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:l,onNodeMouseEnter:f,onNodeMouseMove:d,onNodeMouseLeave:p,onNodeContextMenu:g,nodeClickDistance:ve,onlyRenderVisibleElements:K,noPanClassName:ln,noDragClassName:lt,disableKeyboardA11y:un,nodeExtent:xt,rfId:zt,nodesDraggable:Gr}),T.jsx("div",{className:"react-flow__viewport-portal"})]})})}_1.displayName="GraphView";const z3=L.memo(_1),F3=_x(),ey=({nodes:e,edges:t,defaultNodes:r,defaultEdges:o,width:s,height:l,fitView:u,fitViewOptions:f,minZoom:d=.5,maxZoom:p=2,nodeOrigin:g,nodeExtent:m,zIndexMode:v="basic"}={})=>{const x=new Map,w=new Map,_=new Map,C=new Map,E=o??t??[],M=r??e??[],k=g??[0,0],P=m??ls;Vx(_,C,E);const{nodesInitialized:R}=Xf(M,x,w,{nodeOrigin:k,nodeExtent:P,zIndexMode:v});let D=[0,0,1];if(u&&s&&l){const O=Ss(x,{filter:q=>!!((q.width||q.initialWidth)&&(q.height||q.initialHeight))}),{x:F,y:K,zoom:J}=Bd(O,s,l,d,p,(f==null?void 0:f.padding)??.1);D=[F,K,J]}return{rfId:"1",width:s??0,height:l??0,transform:D,nodes:M,nodesInitialized:R,nodeLookup:x,parentLookup:w,edges:E,edgeLookup:C,connectionLookup:_,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:r!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:d,maxZoom:p,translateExtent:ls,nodeExtent:P,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Bi.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:k,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:u??!1,fitViewOptions:f,fitViewResolver:null,connection:{...vx},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:F3,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:yx,zIndexMode:v,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},B3=({nodes:e,edges:t,defaultNodes:r,defaultEdges:o,width:s,height:l,fitView:u,fitViewOptions:f,minZoom:d,maxZoom:p,nodeOrigin:g,nodeExtent:m,zIndexMode:v})=>eA((x,w)=>{async function _(){const{nodeLookup:C,panZoom:E,fitViewOptions:M,fitViewResolver:k,width:P,height:R,minZoom:D,maxZoom:O}=w();E&&(await QM({nodes:C,width:P,height:R,panZoom:E,minZoom:D,maxZoom:O},M),k==null||k.resolve(!0),x({fitViewResolver:null}))}return{...ey({nodes:e,edges:t,width:s,height:l,fitView:u,fitViewOptions:f,minZoom:d,maxZoom:p,nodeOrigin:g,nodeExtent:m,defaultNodes:r,defaultEdges:o,zIndexMode:v}),setNodes:C=>{const{nodeLookup:E,parentLookup:M,nodeOrigin:k,elevateNodesOnSelect:P,fitViewQueued:R,zIndexMode:D,nodesSelectionActive:O}=w(),{nodesInitialized:F,hasSelectedNodes:K}=Xf(C,E,M,{nodeOrigin:k,nodeExtent:m,elevateNodesOnSelect:P,checkEquality:!0,zIndexMode:D}),J=O&&K;R&&F?(_(),x({nodes:C,nodesInitialized:F,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:J})):x({nodes:C,nodesInitialized:F,nodesSelectionActive:J})},setEdges:C=>{const{connectionLookup:E,edgeLookup:M}=w();Vx(E,M,C),x({edges:C})},setDefaultNodesAndEdges:(C,E)=>{if(C){const{setNodes:M}=w();M(C),x({hasDefaultNodes:!0})}if(E){const{setEdges:M}=w();M(E),x({hasDefaultEdges:!0})}},updateNodeInternals:C=>{const{triggerNodeChanges:E,nodeLookup:M,parentLookup:k,domNode:P,nodeOrigin:R,nodeExtent:D,debug:O,fitViewQueued:F,zIndexMode:K}=w(),{changes:J,updatedInternals:q}=xN(C,M,k,P,R,D,K);q&&(mN(M,k,{nodeOrigin:R,nodeExtent:D,zIndexMode:K}),F?(_(),x({fitViewQueued:!1,fitViewOptions:void 0})):x({}),(J==null?void 0:J.length)>0&&(O&&console.log("React Flow: trigger node changes",J),E==null||E(J)))},updateNodePositions:(C,E=!1)=>{const M=[];let k=[];const{nodeLookup:P,triggerNodeChanges:R,connection:D,updateConnection:O,onNodesChangeMiddlewareMap:F}=w();for(const[K,J]of C){const q=P.get(K),ee=!!(q!=null&&q.expandParent&&(q!=null&&q.parentId)&&(J!=null&&J.position)),Z={id:K,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 A=Kr(q,D.fromHandle,xe.Left,!0);O({...D,from:A})}ee&&q.parentId&&M.push({id:K,parentId:q.parentId,rect:{...J.internals.positionAbsolute,width:J.measured.width??0,height:J.measured.height??0}}),k.push(Z)}if(M.length>0){const{parentLookup:K,nodeOrigin:J}=w(),q=Xd(M,P,K,J);k.push(...q)}for(const K of F.values())k=K(k);R(k)},triggerNodeChanges:C=>{const{onNodesChange:E,setNodes:M,nodes:k,hasDefaultNodes:P,debug:R}=w();if(C!=null&&C.length){if(P){const D=Zx(C,k);M(D)}R&&console.log("React Flow: trigger node changes",C),E==null||E(C)}},triggerEdgeChanges:C=>{const{onEdgesChange:E,setEdges:M,edges:k,hasDefaultEdges:P,debug:R}=w();if(C!=null&&C.length){if(P){const D=Jx(C,k);M(D)}R&&console.log("React Flow: trigger edge changes",C),E==null||E(C)}},addSelectedNodes:C=>{const{multiSelectionActive:E,edgeLookup:M,nodeLookup:k,triggerNodeChanges:P,triggerEdgeChanges:R}=w();if(E){const D=C.map(O=>Vr(O,!0));P(D);return}P(Ri(k,new Set([...C]),!0)),R(Ri(M))},addSelectedEdges:C=>{const{multiSelectionActive:E,edgeLookup:M,nodeLookup:k,triggerNodeChanges:P,triggerEdgeChanges:R}=w();if(E){const D=C.map(O=>Vr(O,!0));R(D);return}R(Ri(M,new Set([...C]))),P(Ri(k,new Set,!0))},unselectNodesAndEdges:({nodes:C,edges:E}={})=>{const{edges:M,nodes:k,nodeLookup:P,triggerNodeChanges:R,triggerEdgeChanges:D}=w(),O=C||k,F=E||M,K=[];for(const q of O){if(!q.selected)continue;const ee=P.get(q.id);ee&&(ee.selected=!1),K.push(Vr(q.id,!1))}const J=[];for(const q of F)q.selected&&J.push(Vr(q.id,!1));R(K),D(J)},setMinZoom:C=>{const{panZoom:E,maxZoom:M}=w();E==null||E.setScaleExtent([C,M]),x({minZoom:C})},setMaxZoom:C=>{const{panZoom:E,minZoom:M}=w();E==null||E.setScaleExtent([M,C]),x({maxZoom:C})},setTranslateExtent:C=>{var E;(E=w().panZoom)==null||E.setTranslateExtent(C),x({translateExtent:C})},resetSelectedElements:()=>{const{edges:C,nodes:E,triggerNodeChanges:M,triggerEdgeChanges:k,elementsSelectable:P}=w();if(!P)return;const R=E.reduce((O,F)=>F.selected?[...O,Vr(F.id,!1)]:O,[]),D=C.reduce((O,F)=>F.selected?[...O,Vr(F.id,!1)]:O,[]);M(R),k(D)},setNodeExtent:C=>{const{nodes:E,nodeLookup:M,parentLookup:k,nodeOrigin:P,elevateNodesOnSelect:R,nodeExtent:D,zIndexMode:O}=w();C[0][0]===D[0][0]&&C[0][1]===D[0][1]&&C[1][0]===D[1][0]&&C[1][1]===D[1][1]||(Xf(E,M,k,{nodeOrigin:P,nodeExtent:C,elevateNodesOnSelect:R,checkEquality:!1,zIndexMode:O}),x({nodeExtent:C}))},panBy:C=>{const{transform:E,width:M,height:k,panZoom:P,translateExtent:R}=w();return wN({delta:C,panZoom:P,transform:E,translateExtent:R,width:M,height:k})},setCenter:async(C,E,M)=>{const{width:k,height:P,maxZoom:R,panZoom:D}=w();if(!D)return!1;const O=typeof(M==null?void 0:M.zoom)<"u"?M.zoom:R;return await D.setViewport({x:k/2-C*O,y:P/2-E*O,zoom:O},{duration:M==null?void 0:M.duration,ease:M==null?void 0:M.ease,interpolate:M==null?void 0:M.interpolate}),!0},cancelConnection:()=>{x({connection:{...vx}})},updateConnection:C=>{x({connection:C})},reset:()=>x({...ey()})}},Object.is);function O3({initialNodes:e,initialEdges:t,defaultNodes:r,defaultEdges:o,initialWidth:s,initialHeight:l,initialMinZoom:u,initialMaxZoom:f,initialFitViewOptions:d,fitView:p,nodeOrigin:g,nodeExtent:m,zIndexMode:v,children:x}){const[w]=L.useState(()=>B3({nodes:e,edges:t,defaultNodes:r,defaultEdges:o,width:s,height:l,fitView:p,minZoom:u,maxZoom:f,fitViewOptions:d,nodeOrigin:g,nodeExtent:m,zIndexMode:v}));return T.jsx(tA,{value:w,children:T.jsx(_A,{children:T.jsx(BA,{children:x})})})}function $3({children:e,nodes:t,edges:r,defaultNodes:o,defaultEdges:s,width:l,height:u,fitView:f,fitViewOptions:d,minZoom:p,maxZoom:g,nodeOrigin:m,nodeExtent:v,zIndexMode:x}){return L.useContext(Ul)?T.jsx(T.Fragment,{children:e}):T.jsx(O3,{initialNodes:t,initialEdges:r,defaultNodes:o,defaultEdges:s,initialWidth:l,initialHeight:u,fitView:f,initialFitViewOptions:d,initialMinZoom:p,initialMaxZoom:g,nodeOrigin:m,nodeExtent:v,zIndexMode:x,children:e})}const H3={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function U3({nodes:e,edges:t,defaultNodes:r,defaultEdges:o,className:s,nodeTypes:l,edgeTypes:u,onNodeClick:f,onEdgeClick:d,onInit:p,onMove:g,onMoveStart:m,onMoveEnd:v,onConnect:x,onConnectStart:w,onConnectEnd:_,onClickConnectStart:C,onClickConnectEnd:E,onNodeMouseEnter:M,onNodeMouseMove:k,onNodeMouseLeave:P,onNodeContextMenu:R,onNodeDoubleClick:D,onNodeDragStart:O,onNodeDrag:F,onNodeDragStop:K,onNodesDelete:J,onEdgesDelete:q,onDelete:ee,onSelectionChange:Z,onSelectionDragStart:A,onSelectionDrag:W,onSelectionDragStop:H,onSelectionContextMenu:$,onSelectionStart:I,onSelectionEnd:z,onBeforeDelete:U,connectionMode:N,connectionLineType:j=fr.Bezier,connectionLineStyle:te,connectionLineComponent:ie,connectionLineContainerStyle:le,deleteKeyCode:ce="Backspace",selectionKeyCode:ue="Shift",selectionOnDrag:Q=!1,selectionMode:oe=us.Full,panActivationKeyCode:me="Space",multiSelectionKeyCode:we=fs()?"Meta":"Control",zoomActivationKeyCode:ve=fs()?"Meta":"Control",snapToGrid:ge,snapGrid:_e,onlyRenderVisibleElements:Pe=!1,selectNodesOnDrag:Ne,nodesDraggable:Ie,autoPanOnNodeFocus:mt,nodesConnectable:vt,nodesFocusable:at,nodeOrigin:lt=Qx,edgesFocusable:En,edgesReconnectable:ln,elementsSelectable:un=!0,defaultViewport:xt=pA,minZoom:zt=.5,maxZoom:Pt=2,translateExtent:Ft=ls,preventScrolling:Gr=!0,nodeExtent:Cn,defaultMarkerColor:mr="#b1b1b7",zoomOnScroll:Yl=!0,zoomOnPinch:Cs=!0,panOnScroll:_s=!1,panOnScrollSpeed:Gl=.5,panOnScrollMode:Ki=$r.Free,zoomOnDoubleClick:Yi=!0,panOnDrag:Gi=!0,onPaneClick:Qi,onPaneMouseEnter:qi,onPaneMouseMove:On,onPaneMouseLeave:$n,onPaneScroll:Ts,onPaneContextMenu:Ps,paneClickDistance:Ms=1,nodeClickDistance:Ns=0,children:As,onReconnect:Zi,onReconnectStart:bs,onReconnectEnd:gr,onEdgeContextMenu:Ji,onEdgeDoubleClick:yr,onEdgeMouseEnter:Ql,onEdgeMouseMove:vr,onEdgeMouseLeave:Qr,reconnectRadius:qr=10,onNodesChange:eo,onEdgesChange:ql,noDragClassName:Zl="nodrag",noWheelClassName:Jl="nowheel",noPanClassName:cn="nopan",fitView:to,fitViewOptions:no,connectOnClick:eu,attributionPosition:Rs,proOptions:Ds,defaultEdgeOptions:Is,elevateNodesOnSelect:Ls=!0,elevateEdgesOnSelect:tu=!1,disableKeyboardA11y:js=!1,autoPanOnConnect:Oe,autoPanOnNodeDrag:nu,autoPanOnSelection:ro=!0,autoPanSpeed:Vs,connectionRadius:Zr,isValidConnection:ru,onError:zs,style:Jr,id:Mt,nodeDragThreshold:iu,connectionDragThreshold:Nt,viewport:ou,onViewportChange:su,width:au,height:ei,colorMode:ti="light",debug:xr,onScroll:_n,ariaLabelConfig:lu,zIndexMode:Fs="basic",...io},Bs){const wr=Mt||"1",Sr=vA(ti),uu=L.useCallback(ni=>{ni.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),_n==null||_n(ni)},[_n]);return T.jsx("div",{"data-testid":"rf__wrapper",...io,onScroll:uu,style:{...Jr,...H3},ref:Bs,className:Ze(["react-flow",s,Sr]),id:Mt,role:"application",children:T.jsxs($3,{nodes:e,edges:t,width:au,height:ei,fitView:to,fitViewOptions:no,minZoom:zt,maxZoom:Pt,nodeOrigin:lt,nodeExtent:Cn,zIndexMode:Fs,children:[T.jsx(yA,{nodes:e,edges:t,defaultNodes:r,defaultEdges:o,onConnect:x,onConnectStart:w,onConnectEnd:_,onClickConnectStart:C,onClickConnectEnd:E,nodesDraggable:Ie,autoPanOnNodeFocus:mt,nodesConnectable:vt,nodesFocusable:at,edgesFocusable:En,edgesReconnectable:ln,elementsSelectable:un,elevateNodesOnSelect:Ls,elevateEdgesOnSelect:tu,minZoom:zt,maxZoom:Pt,nodeExtent:Cn,onNodesChange:eo,onEdgesChange:ql,snapToGrid:ge,snapGrid:_e,connectionMode:N,translateExtent:Ft,connectOnClick:eu,defaultEdgeOptions:Is,fitView:to,fitViewOptions:no,onNodesDelete:J,onEdgesDelete:q,onDelete:ee,onNodeDragStart:O,onNodeDrag:F,onNodeDragStop:K,onSelectionDrag:W,onSelectionDragStart:A,onSelectionDragStop:H,onMove:g,onMoveStart:m,onMoveEnd:v,noPanClassName:cn,nodeOrigin:lt,rfId:wr,autoPanOnConnect:Oe,autoPanOnNodeDrag:nu,autoPanSpeed:Vs,onError:zs,connectionRadius:Zr,isValidConnection:ru,selectNodesOnDrag:Ne,nodeDragThreshold:iu,connectionDragThreshold:Nt,onBeforeDelete:U,debug:xr,ariaLabelConfig:lu,zIndexMode:Fs}),T.jsx(z3,{onInit:p,onNodeClick:f,onEdgeClick:d,onNodeMouseEnter:M,onNodeMouseMove:k,onNodeMouseLeave:P,onNodeContextMenu:R,onNodeDoubleClick:D,nodeTypes:l,edgeTypes:u,connectionLineType:j,connectionLineStyle:te,connectionLineComponent:ie,connectionLineContainerStyle:le,selectionKeyCode:ue,selectionOnDrag:Q,selectionMode:oe,deleteKeyCode:ce,multiSelectionKeyCode:we,panActivationKeyCode:me,zoomActivationKeyCode:ve,onlyRenderVisibleElements:Pe,defaultViewport:xt,translateExtent:Ft,minZoom:zt,maxZoom:Pt,preventScrolling:Gr,zoomOnScroll:Yl,zoomOnPinch:Cs,zoomOnDoubleClick:Yi,panOnScroll:_s,panOnScrollSpeed:Gl,panOnScrollMode:Ki,panOnDrag:Gi,autoPanOnSelection:ro,onPaneClick:Qi,onPaneMouseEnter:qi,onPaneMouseMove:On,onPaneMouseLeave:$n,onPaneScroll:Ts,onPaneContextMenu:Ps,paneClickDistance:Ms,nodeClickDistance:Ns,onSelectionContextMenu:$,onSelectionStart:I,onSelectionEnd:z,onReconnect:Zi,onReconnectStart:bs,onReconnectEnd:gr,onEdgeContextMenu:Ji,onEdgeDoubleClick:yr,onEdgeMouseEnter:Ql,onEdgeMouseMove:vr,onEdgeMouseLeave:Qr,reconnectRadius:qr,defaultMarkerColor:mr,noDragClassName:Zl,noWheelClassName:Jl,noPanClassName:cn,rfId:wr,disableKeyboardA11y:js,nodeExtent:Cn,viewport:ou,onViewportChange:su,nodesDraggable:Ie}),T.jsx(hA,{onSelectionChange:Z}),As,T.jsx(lA,{proOptions:Ds,position:Rs}),T.jsx(aA,{rfId:wr,disableKeyboardA11y:js})]})})}var W3=e1(U3);function X3(e){const[t,r]=L.useState(e),o=L.useCallback(s=>r(l=>Zx(s,l)),[]);return[t,r,o]}function K3(e){const[t,r]=L.useState(e),o=L.useCallback(s=>r(l=>Jx(s,l)),[]);return[t,r,o]}function Y3({dimensions:e,lineWidth:t,variant:r,className:o}){return T.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Ze(["react-flow__background-pattern",r,o])})}function G3({radius:e,className:t}){return T.jsx("circle",{cx:e,cy:e,r:e,className:Ze(["react-flow__background-pattern","dots",t])})}var zn;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(zn||(zn={}));const Q3={[zn.Dots]:1,[zn.Lines]:1,[zn.Cross]:6},q3=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function T1({id:e,variant:t=zn.Dots,gap:r=20,size:o,lineWidth:s=1,offset:l=0,color:u,bgColor:f,style:d,className:p,patternClassName:g}){const m=L.useRef(null),{transform:v,patternId:x}=be(q3,We),w=o||Q3[t],_=t===zn.Dots,C=t===zn.Cross,E=Array.isArray(r)?r:[r,r],M=[E[0]*v[2]||1,E[1]*v[2]||1],k=w*v[2],P=Array.isArray(l)?l:[l,l],R=C?[k,k]:M,D=[P[0]*v[2]||1+R[0]/2,P[1]*v[2]||1+R[1]/2],O=`${x}${e||""}`;return T.jsxs("svg",{className:Ze(["react-flow__background",p]),style:{...d,...Xl,"--xy-background-color-props":f,"--xy-background-pattern-color-props":u},ref:m,"data-testid":"rf__background",children:[T.jsx("pattern",{id:O,x:v[0]%M[0],y:v[1]%M[1],width:M[0],height:M[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${D[0]},-${D[1]})`,children:_?T.jsx(G3,{radius:k/2,className:g}):T.jsx(Y3,{dimensions:R,lineWidth:s,variant:t,className:g})}),T.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${O})`})]})}T1.displayName="Background";const Z3=L.memo(T1);function J3(){return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:T.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function eb(){return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:T.jsx("path",{d:"M0 0h32v4.2H0z"})})}function tb(){return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:T.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 nb(){return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:T.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 rb(){return T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:T.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 el({children:e,className:t,...r}){return T.jsx("button",{type:"button",className:Ze(["react-flow__controls-button",t]),...r,children:e})}const ib=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function P1({style:e,showZoom:t=!0,showFitView:r=!0,showInteractive:o=!0,fitViewOptions:s,onZoomIn:l,onZoomOut:u,onFitView:f,onInteractiveChange:d,className:p,children:g,position:m="bottom-left",orientation:v="vertical","aria-label":x}){const w=Fe(),{isInteractive:_,minZoomReached:C,maxZoomReached:E,ariaLabelConfig:M}=be(ib,We),{zoomIn:k,zoomOut:P,fitView:R}=Kd(),D=()=>{k(),l==null||l()},O=()=>{P(),u==null||u()},F=()=>{R(s),f==null||f()},K=()=>{w.setState({nodesDraggable:!_,nodesConnectable:!_,elementsSelectable:!_}),d==null||d(!_)},J=v==="horizontal"?"horizontal":"vertical";return T.jsxs(Wl,{className:Ze(["react-flow__controls",J,p]),position:m,style:e,"data-testid":"rf__controls","aria-label":x??M["controls.ariaLabel"],children:[t&&T.jsxs(T.Fragment,{children:[T.jsx(el,{onClick:D,className:"react-flow__controls-zoomin",title:M["controls.zoomIn.ariaLabel"],"aria-label":M["controls.zoomIn.ariaLabel"],disabled:E,children:T.jsx(J3,{})}),T.jsx(el,{onClick:O,className:"react-flow__controls-zoomout",title:M["controls.zoomOut.ariaLabel"],"aria-label":M["controls.zoomOut.ariaLabel"],disabled:C,children:T.jsx(eb,{})})]}),r&&T.jsx(el,{className:"react-flow__controls-fitview",onClick:F,title:M["controls.fitView.ariaLabel"],"aria-label":M["controls.fitView.ariaLabel"],children:T.jsx(tb,{})}),o&&T.jsx(el,{className:"react-flow__controls-interactive",onClick:K,title:M["controls.interactive.ariaLabel"],"aria-label":M["controls.interactive.ariaLabel"],children:_?T.jsx(rb,{}):T.jsx(nb,{})}),g]})}P1.displayName="Controls";const ob=L.memo(P1);function sb({id:e,x:t,y:r,width:o,height:s,style:l,color:u,strokeColor:f,strokeWidth:d,className:p,borderRadius:g,shapeRendering:m,selected:v,onClick:x}){const{background:w,backgroundColor:_}=l||{},C=u||w||_;return T.jsx("rect",{className:Ze(["react-flow__minimap-node",{selected:v},p]),x:t,y:r,rx:g,ry:g,width:o,height:s,style:{fill:C,stroke:f,strokeWidth:d},shapeRendering:m,onClick:x?E=>x(E,e):void 0})}const ab=L.memo(sb),lb=e=>e.nodes.map(t=>t.id),yf=e=>e instanceof Function?e:()=>e;function ub({nodeStrokeColor:e,nodeColor:t,nodeClassName:r="",nodeBorderRadius:o=5,nodeStrokeWidth:s,nodeComponent:l=ab,onClick:u}){const f=be(lb,We),d=yf(t),p=yf(e),g=yf(r),m=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return T.jsx(T.Fragment,{children:f.map(v=>T.jsx(fb,{id:v,nodeColorFunc:d,nodeStrokeColorFunc:p,nodeClassNameFunc:g,nodeBorderRadius:o,nodeStrokeWidth:s,NodeComponent:l,onClick:u,shapeRendering:m},v))})}function cb({id:e,nodeColorFunc:t,nodeStrokeColorFunc:r,nodeClassNameFunc:o,nodeBorderRadius:s,nodeStrokeWidth:l,shapeRendering:u,NodeComponent:f,onClick:d}){const{node:p,x:g,y:m,width:v,height:x}=be(w=>{const _=w.nodeLookup.get(e);if(!_)return{node:void 0,x:0,y:0,width:0,height:0};const C=_.internals.userNode,{x:E,y:M}=_.internals.positionAbsolute,{width:k,height:P}=kn(C);return{node:C,x:E,y:M,width:k,height:P}},We);return!p||p.hidden||!Tx(p)?null:T.jsx(f,{x:g,y:m,width:v,height:x,style:p.style,selected:!!p.selected,className:o(p),color:t(p),borderRadius:s,strokeColor:r(p),strokeWidth:l,shapeRendering:u,onClick:d,id:p.id})}const fb=L.memo(cb);var db=L.memo(ub);const hb=200,pb=150,mb=e=>!e.hidden,gb=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?Ex(Ss(e.nodeLookup,{filter:mb}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},ty=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,yb=(e,t)=>ty(e.viewBB,t.viewBB)&&ty(e.boundingRect,t.boundingRect)&&e.rfId===t.rfId&&e.panZoom===t.panZoom&&e.translateExtent===t.translateExtent&&e.flowWidth===t.flowWidth&&e.flowHeight===t.flowHeight&&e.ariaLabelConfig===t.ariaLabelConfig,vb="react-flow__minimap-desc";function M1({style:e,className:t,nodeStrokeColor:r,nodeColor:o,nodeClassName:s="",nodeBorderRadius:l=5,nodeStrokeWidth:u,nodeComponent:f,bgColor:d,maskColor:p,maskStrokeColor:g,maskStrokeWidth:m,position:v="bottom-right",onClick:x,onNodeClick:w,pannable:_=!1,zoomable:C=!1,ariaLabel:E,inversePan:M,zoomStep:k=1,offsetScale:P=5}){const R=Fe(),D=L.useRef(null),{boundingRect:O,viewBB:F,rfId:K,panZoom:J,translateExtent:q,flowWidth:ee,flowHeight:Z,ariaLabelConfig:A}=be(gb,yb),W=(e==null?void 0:e.width)??hb,H=(e==null?void 0:e.height)??pb,$=O.width/W,I=O.height/H,z=Math.max($,I),U=z*W,N=z*H,j=P*z,te=O.x-(U-O.width)/2-j,ie=O.y-(N-O.height)/2-j,le=U+j*2,ce=N+j*2,ue=`${vb}-${K}`,Q=L.useRef(0),oe=L.useRef();Q.current=z,L.useEffect(()=>{if(D.current&&J)return oe.current=NN({domNode:D.current,panZoom:J,getTransform:()=>R.getState().transform,getViewScale:()=>Q.current}),()=>{var ge;(ge=oe.current)==null||ge.destroy()}},[J]),L.useEffect(()=>{var ge;(ge=oe.current)==null||ge.update({translateExtent:q,width:ee,height:Z,inversePan:M,pannable:_,zoomStep:k,zoomable:C})},[_,C,M,k,q,ee,Z]);const me=x?ge=>{var Ne;const[_e,Pe]=((Ne=oe.current)==null?void 0:Ne.pointer(ge))||[0,0];x(ge,{x:_e,y:Pe})}:void 0,we=w?L.useCallback((ge,_e)=>{const Pe=R.getState().nodeLookup.get(_e).internals.userNode;w(ge,Pe)},[]):void 0,ve=E??A["minimap.ariaLabel"];return T.jsx(Wl,{position:v,style:{...e,"--xy-minimap-background-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-background-color-props":typeof p=="string"?p:void 0,"--xy-minimap-mask-stroke-color-props":typeof g=="string"?g:void 0,"--xy-minimap-mask-stroke-width-props":typeof m=="number"?m*z:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-width-props":typeof u=="number"?u:void 0},className:Ze(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:T.jsxs("svg",{width:W,height:H,viewBox:`${te} ${ie} ${le} ${ce}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ue,ref:D,onClick:me,children:[ve&&T.jsx("title",{id:ue,children:ve}),T.jsx(db,{onClick:we,nodeColor:o,nodeStrokeColor:r,nodeBorderRadius:l,nodeClassName:s,nodeStrokeWidth:u,nodeComponent:f}),T.jsx("path",{className:"react-flow__minimap-mask",d:`M${te-j},${ie-j}h${le+j*2}v${ce+j*2}h${-le-j*2}z
|
|
195
|
+
M${F.x},${F.y}h${F.width}v${F.height}h${-F.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}M1.displayName="MiniMap";const xb=L.memo(M1),wb=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,Sb={[Hi.Line]:"right",[Hi.Handle]:"bottom-right"};function kb({nodeId:e,position:t,variant:r=Hi.Handle,className:o,style:s=void 0,children:l,color:u,minWidth:f=10,minHeight:d=10,maxWidth:p=Number.MAX_VALUE,maxHeight:g=Number.MAX_VALUE,keepAspectRatio:m=!1,resizeDirection:v,autoScale:x=!0,shouldResize:w,onResizeStart:_,onResize:C,onResizeEnd:E}){const M=o1(),k=typeof e=="string"?e:M,P=Fe(),R=L.useRef(null),D=r===Hi.Handle,O=be(L.useCallback(wb(D&&x),[D,x]),We),F=L.useRef(null),K=t??Sb[r];L.useEffect(()=>{if(!(!R.current||!k))return F.current||(F.current=$N({domNode:R.current,nodeId:k,getStoreItems:()=>{const{nodeLookup:q,transform:ee,snapGrid:Z,snapToGrid:A,nodeOrigin:W,domNode:H}=P.getState();return{nodeLookup:q,transform:ee,snapGrid:Z,snapToGrid:A,nodeOrigin:W,paneDomNode:H}},onChange:(q,ee)=>{const{triggerNodeChanges:Z,nodeLookup:A,parentLookup:W,nodeOrigin:H}=P.getState(),$=[],I={x:q.x,y:q.y},z=A.get(k);if(z&&z.expandParent&&z.parentId){const U=z.origin??H,N=q.width??z.measured.width??0,j=q.height??z.measured.height??0,te={id:z.id,parentId:z.parentId,rect:{width:N,height:j,...Px({x:q.x??z.position.x,y:q.y??z.position.y},{width:N,height:j},z.parentId,A,U)}},ie=Xd([te],A,W,H);$.push(...ie),I.x=q.x?Math.max(U[0]*N,q.x):void 0,I.y=q.y?Math.max(U[1]*j,q.y):void 0}if(I.x!==void 0&&I.y!==void 0){const U={id:k,type:"position",position:{...I}};$.push(U)}if(q.width!==void 0&&q.height!==void 0){const N={id:k,type:"dimensions",resizing:!0,setAttributes:v?v==="horizontal"?"width":"height":!0,dimensions:{width:q.width,height:q.height}};$.push(N)}for(const U of ee){const N={...U,type:"position"};$.push(N)}Z($)},onEnd:({width:q,height:ee})=>{const Z={id:k,type:"dimensions",resizing:!1,dimensions:{width:q,height:ee}};P.getState().triggerNodeChanges([Z])}})),F.current.update({controlPosition:K,boundaries:{minWidth:f,minHeight:d,maxWidth:p,maxHeight:g},keepAspectRatio:m,resizeDirection:v,onResizeStart:_,onResize:C,onResizeEnd:E,shouldResize:w}),()=>{var q;(q=F.current)==null||q.destroy()}},[K,f,d,p,g,m,_,C,E,w]);const J=K.split("-");return T.jsx("div",{className:Ze(["react-flow__resize-control","nodrag",...J,r,o]),ref:R,style:{...s,scale:O,...u&&{[D?"backgroundColor":"borderColor"]:u}},children:l})}L.memo(kb);const ny={file:{icon:Pm,color:"#6B7280",bg:"rgba(107, 114, 128, 0.15)"},component:{icon:Pm,color:"#8B5CF6",bg:"rgba(139, 92, 246, 0.15)"},screen:{icon:vf,color:"#3B82F6",bg:"rgba(59, 130, 246, 0.15)"},hook:{icon:tl,color:"#F59E0B",bg:"rgba(245, 158, 11, 0.15)"},provider:{icon:cl,color:"#10B981",bg:"rgba(16, 185, 129, 0.15)"},context:{icon:cl,color:"#10B981",bg:"rgba(16, 185, 129, 0.12)"},package:{icon:Gf,color:"#EC4899",bg:"rgba(236, 72, 153, 0.15)"},asset:{icon:ES,color:"#F472B6",bg:"rgba(244, 114, 182, 0.15)"},route:{icon:Mm,color:"#06B6D4",bg:"rgba(6, 182, 212, 0.15)"},navigator:{icon:Mm,color:"#06B6D4",bg:"rgba(6, 182, 212, 0.12)"},folder:{icon:kS,color:"#71717A",bg:"rgba(113, 113, 122, 0.15)"},layer:{icon:vf,color:"#A78BFA",bg:"rgba(167, 139, 250, 0.1)"}};function Eb(e){return e>.7?"rgba(139, 92, 246, 0.8)":e>.4?"rgba(139, 92, 246, 0.4)":e>.1?"rgba(139, 92, 246, 0.2)":"var(--node-border-default)"}const N1=L.memo(({data:e,selected:t})=>{const r=e,o=ny[r.kind]??ny.file,s=o.icon,l=r.heat??0,u=r.isDimmed??!1,f=r.isConnected??!1,d=t?o.color:f?"var(--accent)":Eb(l);return T.jsxs(T.Fragment,{children:[T.jsx(Ui,{type:"target",position:xe.Top,style:{opacity:0}}),T.jsxs(Ll.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:u?"var(--node-dimmed-opacity)":1},transition:{duration:.2},style:{background:r.kind==="layer"?"transparent":o.bg,border:`1px solid ${d}`,borderRadius:r.kind==="layer"?16:10,padding:r.kind==="layer"?"12px 20px":"10px 14px",minWidth:r.kind==="layer"?160:120,backdropFilter:"blur(8px)",boxShadow:t?`0 0 20px ${o.color}40`:f?"0 0 12px var(--accent-glow)":"0 2px 8px var(--node-shadow)",cursor:"pointer",position:"relative",transition:"opacity 0.2s, box-shadow 0.2s, border-color 0.2s"},children:[r.isCircular&&T.jsx(uy,{size:12,style:{position:"absolute",top:-6,right:-6,color:"#EF4444"}}),T.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[T.jsx(s,{size:14,style:{color:o.color,flexShrink:0}}),T.jsx("span",{style:{fontSize:12,fontWeight:600,color:"var(--text-primary)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:140},children:r.label})]}),r.path&&r.kind!=="layer"&&T.jsx("div",{style:{fontSize:10,color:"var(--text-muted)",marginTop:4,fontFamily:"var(--font-mono)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:140},children:r.path})]}),T.jsx(Ui,{type:"source",position:xe.Bottom,style:{opacity:0}})]})});N1.displayName="ArchNode";const Cb={arch:N1},ry={navigation:0,presentation:200,business:400,state:600,networking:800,storage:1e3,utilities:1200,assets:1400,unknown:1600};function _b(e,t){const r=e.filter(f=>f.kind==="layer"),o=e.filter(f=>f.kind!=="layer"&&f.kind!=="package"),s=e.filter(f=>f.kind==="package"),l=new Map;for(const f of o){const d=f.layer??"unknown";l.has(d)||l.set(d,[]),l.get(d).push(f)}const u=[];for(const f of r){const d=f.layer??"unknown";u.push({...f,position:{x:-200,y:ry[d]??0}})}for(const[f,d]of l){const p=ry[f]??0,g=Math.ceil(Math.sqrt(d.length));d.forEach((m,v)=>{const x=v%g,w=Math.floor(v/g);u.push({...m,position:m.position??{x:x*200+50,y:p+w*100}})})}return s.forEach((f,d)=>{u.push({...f,position:{x:1200,y:d*80}})}),u}function Tb(e,t){return t?e.source===t?"outgoing":e.target===t?"incoming":"none":"none"}function Pb(e,t,r,o){return t&&r?{stroke:"var(--danger)",strokeWidth:e!=="none"?3:2,opacity:o&&e==="none"?.25:1}:e==="outgoing"?{stroke:"var(--edge-outgoing)",strokeWidth:2.5,opacity:1}:e==="incoming"?{stroke:"var(--edge-incoming)",strokeWidth:2.5,opacity:1}:o?{stroke:"var(--edge-dimmed)",strokeWidth:1,opacity:.2}:{stroke:"var(--edge-default)",strokeWidth:1,opacity:1}}function Mb(){const e=Me(C=>C.graph),t=Me(C=>C.selectedNodeId),r=Me(C=>C.selectNode),o=Me(C=>C.filterKind),s=Me(C=>C.showCircular),l=t?(e==null?void 0:e.nodes.find(C=>C.id===t))??null:null,[u,f,d]=X3([]),[p,g,m]=K3([]),v=L.useMemo(()=>{if(!e)return null;if(o==="all")return e;const C=e.nodes.filter(k=>k.kind===o||k.kind==="layer"),E=new Set(C.map(k=>k.id)),M=e.edges.filter(k=>E.has(k.source)&&E.has(k.target));return{...e,nodes:C,edges:M}},[e,o]),x=L.useMemo(()=>{if(!t||!v)return new Set;const C=new Set([t]);for(const E of v.edges)E.source===t&&C.add(E.target),E.target===t&&C.add(E.source);return C},[t,v]);L.useEffect(()=>{if(!v)return;const C=_b(v.nodes,v.edges),E=!!t;f(C.map(M=>{const k=M.id===t,P=x.has(M.id),R=E&&!P;return{id:M.id,type:"arch",position:M.position??{x:0,y:0},zIndex:k?10:P?5:0,data:{label:M.label,kind:M.kind,path:M.path,layer:M.layer,heat:M.heat,meta:M.meta,isDimmed:R,isConnected:P&&!k,isCircular:v.edges.some(D=>D.isCircular&&(D.source===M.id||D.target===M.id))},selected:k}})),g(v.edges.map(M=>{const k=Tb(M,t),P=k!=="none",R=Pb(k,!!M.isCircular,s,E);return{id:M.id,source:M.source,target:M.target,animated:P&&k==="outgoing",zIndex:P?10:0,style:R,label:P?M.label:void 0,labelStyle:{fill:k==="outgoing"?"var(--edge-outgoing)":"var(--edge-incoming)",fontSize:10,fontWeight:600},labelBgStyle:{fill:"var(--bg-secondary)",fillOpacity:.9},labelBgPadding:[6,4],labelBgBorderRadius:4}}))},[v,t,s,x,f,g]);const w=L.useCallback((C,E)=>r(E.id),[r]),_=L.useCallback(()=>r(null),[r]);return e?T.jsxs("div",{style:{width:"100%",height:"100%",position:"relative"},children:[t&&l&&T.jsxs("div",{style:{position:"absolute",bottom:16,left:16,zIndex:20,background:"var(--bg-glass)",backdropFilter:"blur(12px)",border:"1px solid var(--border)",borderRadius:"var(--radius-sm)",padding:"10px 14px",fontSize:12,boxShadow:"var(--shadow)",display:"flex",flexDirection:"column",gap:6},children:[T.jsx("div",{style:{fontWeight:600,color:"var(--text-primary)"},children:l.label}),T.jsxs("div",{style:{display:"flex",gap:16},children:[T.jsx(iy,{color:"var(--edge-outgoing)",label:"Imports"}),T.jsx(iy,{color:"var(--edge-incoming)",label:"Imported by"})]})]}),T.jsxs(W3,{nodes:u,edges:p,onNodesChange:d,onEdgesChange:m,onNodeClick:w,onPaneClick:_,nodeTypes:Cb,fitView:!0,fitViewOptions:{padding:.2},minZoom:.1,maxZoom:2,proOptions:{hideAttribution:!0},children:[T.jsx(Z3,{variant:zn.Dots,gap:20,size:1,color:"var(--bg-dots)"}),T.jsx(ob,{showInteractive:!1}),T.jsx(xb,{nodeColor:C=>{var k;const E=(k=C.data)==null?void 0:k.kind;return{component:"#8B5CF6",screen:"#3B82F6",hook:"#F59E0B",package:"#EC4899",route:"#06B6D4",layer:"#A78BFA"}[E??""]??"#374151"},maskColor:"var(--minimap-mask)"})]})]}):null}function iy({color:e,label:t}){return T.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[T.jsx("div",{style:{width:20,height:3,borderRadius:2,background:e}}),T.jsx("span",{style:{color:"var(--text-muted)"},children:t})]})}function Nb(){const e=Me(r=>r.graph),t=Me(r=>r.selectNode);return e!=null&&e.routes.length?T.jsxs("div",{style:{padding:32,overflow:"auto",height:"100%"},children:[T.jsx("h2",{style:{fontSize:20,fontWeight:700,marginBottom:8},children:"Navigation Flow"}),T.jsxs("p",{style:{color:"var(--text-muted)",fontSize:13,marginBottom:32},children:[e.config.type==="expo-router"?"Expo Router":"React Navigation"," — ",e.routes.length," routes"]}),T.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:0},children:e.routes.filter(r=>r.type==="screen"||r.type==="expo-router").map((r,o)=>T.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[T.jsxs("button",{onClick:()=>t(r.id),style:{background:"rgba(6, 182, 212, 0.15)",border:"1px solid rgba(6, 182, 212, 0.3)",borderRadius:12,padding:"14px 28px",cursor:"pointer",color:"var(--text-primary)",fontSize:14,fontWeight:600,minWidth:180,textAlign:"center",transition:"all 0.15s"},onMouseEnter:s=>{s.currentTarget.style.borderColor="#06B6D4"},onMouseLeave:s=>{s.currentTarget.style.borderColor="rgba(6, 182, 212, 0.3)"},children:[r.name,T.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4,fontFamily:"var(--font-mono)"},children:r.path})]}),o<e.routes.length-1&&T.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",padding:"8px 0"},children:[T.jsx("div",{style:{width:1,height:20,background:"var(--border)"}}),T.jsx(wS,{size:14,style:{color:"var(--text-muted)",transform:"rotate(90deg)"}})]})]},r.id))})]}):T.jsx("div",{style:{padding:40,color:"var(--text-muted)",textAlign:"center"},children:"No navigation routes detected. Supports Expo Router and React Navigation."})}function Ab(){const e=Me(o=>o.graph),t=Me(o=>o.selectNode);if(!(e!=null&&e.packages.length))return null;const r=Math.max(...e.packages.map(o=>o.files.length));return T.jsxs("div",{style:{padding:24,overflow:"auto",height:"100%"},children:[T.jsx("h2",{style:{fontSize:20,fontWeight:700,marginBottom:24},children:"Package Explorer"}),T.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:e.packages.slice(0,50).map(o=>T.jsxs("button",{onClick:()=>t(`pkg:${o.name.split("/")[0]}`),style:{display:"flex",alignItems:"center",gap:16,padding:"12px 16px",background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:"var(--radius-sm)",cursor:"pointer",textAlign:"left",transition:"border-color 0.15s"},onMouseEnter:s=>{s.currentTarget.style.borderColor="var(--border-hover)"},onMouseLeave:s=>{s.currentTarget.style.borderColor="var(--border)"},children:[T.jsxs("div",{style:{flex:1},children:[T.jsx("div",{style:{fontSize:13,fontWeight:600,color:"var(--text-primary)",fontFamily:"var(--font-mono)"},children:o.name}),T.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:[o.consumers.slice(0,3).join(", "),o.consumers.length>3&&` +${o.consumers.length-3}`]})]}),T.jsxs("div",{style:{textAlign:"right"},children:[T.jsx("div",{style:{fontSize:16,fontWeight:700,color:"#EC4899"},children:o.files.length}),T.jsx("div",{style:{fontSize:10,color:"var(--text-muted)"},children:"files"})]}),T.jsx("div",{style:{width:80,height:6,background:"var(--bg-tertiary)",borderRadius:3,overflow:"hidden"},children:T.jsx("div",{style:{width:`${o.files.length/r*100}%`,height:"100%",background:"#EC4899",borderRadius:3}})})]},o.name))})]})}function bb(){const e=Me(r=>r.graph),t=Me(r=>r.selectNode);return e?T.jsxs("div",{style:{padding:24,overflow:"auto",height:"100%"},children:[T.jsx("h2",{style:{fontSize:20,fontWeight:700,marginBottom:8},children:"Dead Code & Issues"}),T.jsxs("p",{style:{color:"var(--text-muted)",fontSize:13,marginBottom:24},children:[e.deadCode.length," unused files · ",e.circularDependencies.length," circular dependencies"]}),e.circularDependencies.length>0&&T.jsxs("section",{style:{marginBottom:32},children:[T.jsxs("h3",{style:{fontSize:14,fontWeight:600,color:"#EF4444",marginBottom:12,display:"flex",alignItems:"center",gap:6},children:[T.jsx(uy,{size:14})," Circular Dependencies"]}),e.circularDependencies.map((r,o)=>T.jsx("div",{style:{padding:"12px 16px",background:"rgba(239, 68, 68, 0.08)",border:"1px solid rgba(239, 68, 68, 0.2)",borderRadius:"var(--radius-sm)",marginBottom:8,fontFamily:"var(--font-mono)",fontSize:12},children:r.files.map((s,l)=>T.jsxs("span",{children:[l>0&&T.jsx("span",{style:{color:"#EF4444"},children:" → "}),T.jsx("span",{style:{color:"var(--text-primary)"},children:s.split("/").pop()})]},s))},o))]}),T.jsxs("section",{children:[T.jsx("h3",{style:{fontSize:14,fontWeight:600,color:"var(--text-primary)",marginBottom:12},children:"Unused Files"}),e.deadCode.length===0?T.jsx("p",{style:{color:"var(--text-muted)",fontSize:13},children:"No dead code detected."}):e.deadCode.map(r=>T.jsxs("button",{onClick:()=>t(r.id),style:{display:"flex",alignItems:"center",gap:12,width:"100%",padding:"10px 14px",background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:"var(--radius-sm)",cursor:"pointer",marginBottom:6,textAlign:"left",color:"var(--text-primary)",fontFamily:"inherit"},children:[T.jsx("span",{style:{fontSize:10,fontWeight:600,padding:"2px 6px",borderRadius:4,background:"rgba(239, 68, 68, 0.15)",color:"#EF4444",textTransform:"uppercase",flexShrink:0},children:r.kind}),T.jsxs("div",{style:{minWidth:0},children:[T.jsx("div",{style:{fontSize:13,fontWeight:500,color:"var(--text-primary)"},children:r.path}),T.jsx("div",{style:{fontSize:11,color:"var(--text-muted)"},children:r.reason})]})]},r.id))]})]}):null}function Rb(){const e=Me(r=>r.graph);if(!(e!=null&&e.folders.length))return null;const t=Math.max(...e.folders.map(r=>r.complexity));return T.jsxs("div",{style:{padding:24,overflow:"auto",height:"100%"},children:[T.jsx("h2",{style:{fontSize:20,fontWeight:700,marginBottom:24},children:"Folder Heatmap"}),T.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))",gap:12},children:e.folders.slice(0,40).map(r=>{const o=r.complexity/t;return T.jsxs("div",{style:{padding:"16px",background:`rgba(139, 92, 246, ${o*.15})`,border:`1px solid rgba(139, 92, 246, ${o*.3+.1})`,borderRadius:"var(--radius-sm)"},children:[T.jsx("div",{style:{fontSize:13,fontWeight:600,fontFamily:"var(--font-mono)",marginBottom:8,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r.path||"/"}),T.jsx("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[["Files",r.fileCount],["Lines",r.complexity],["Deps",r.dependencyCount],["Coupling",r.coupling]].map(([s,l])=>T.jsxs("div",{children:[T.jsx("div",{style:{fontSize:10,color:"var(--text-muted)"},children:s}),T.jsx("div",{style:{fontSize:16,fontWeight:700},children:l})]},String(s)))})]},r.path)})})]})}function Db(){const e=Me(o=>o.viewMode),t=Me(o=>o.loading),r=Me(o=>o.scanning);return t?T.jsxs("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",gap:16},children:[T.jsx("div",{style:{width:40,height:40,border:"2px solid var(--border)",borderTopColor:"var(--accent)",borderRadius:"50%",animation:"spin 0.8s linear infinite"}}),T.jsx("div",{style:{color:"var(--text-secondary)",fontSize:14},children:"Scanning project architecture..."}),T.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"})]}):T.jsxs("div",{style:{flex:1,position:"relative",overflow:"hidden"},children:[r&&T.jsx("div",{style:{position:"absolute",top:12,left:"50%",transform:"translateX(-50%)",zIndex:20,background:"var(--bg-glass)",backdropFilter:"blur(12px)",border:"1px solid var(--border)",borderRadius:20,padding:"6px 16px",fontSize:12,color:"var(--accent)"},children:"Updating graph..."}),e==="graph"&&T.jsx(Mb,{}),e==="navigation"&&T.jsx(Nb,{}),e==="packages"&&T.jsx(Ab,{}),e==="dead-code"&&T.jsx(bb,{}),e==="folders"&&T.jsx(Rb,{})]})}function Ib(){var p,g;const e=Me(m=>m.selectedNodeId),t=Me(m=>m.graph),r=Me(m=>m.selectNode),[o,s]=L.useState(null),l=e?(t==null?void 0:t.nodes.find(m=>m.id===e))??null:null;if(L.useEffect(()=>{if(!l){s(null);return}if(l.kind==="package"||!l.path){s(null);return}let m=!1;return jS(l.id).then(v=>{m||s(v!=null&&v.error?null:v)}),()=>{m=!0}},[l==null?void 0:l.id,l==null?void 0:l.path,l==null?void 0:l.kind]),!l)return T.jsx("div",{style:{width:320,background:"var(--bg-glass)",backdropFilter:"blur(16px)",borderLeft:"1px solid var(--border)",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--text-muted)",fontSize:13,flexShrink:0},children:"Select a node to inspect"});const u=l.kind==="package",f=u?t==null?void 0:t.packages.find(m=>m.name===l.label||l.id===`pkg:${m.name}`):null,d=u?null:t==null?void 0:t.files.find(m=>m.id===l.id);return T.jsxs(Ll.aside,{initial:{x:320},animate:{x:0},style:{width:320,background:"var(--bg-glass)",backdropFilter:"blur(16px)",borderLeft:"1px solid var(--border)",display:"flex",flexDirection:"column",flexShrink:0,overflow:"hidden"},children:[T.jsxs("div",{style:{padding:"16px",borderBottom:"1px solid var(--border)",display:"flex",alignItems:"flex-start",justifyContent:"space-between"},children:[T.jsxs("div",{children:[T.jsx("div",{style:{fontSize:10,fontWeight:600,textTransform:"uppercase",color:"var(--accent)",letterSpacing:"0.05em"},children:l.kind}),T.jsx("div",{style:{fontSize:18,fontWeight:700,marginTop:4},children:l.label}),l.path&&T.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",fontFamily:"var(--font-mono)",marginTop:4,wordBreak:"break-all"},children:l.path})]}),T.jsx("button",{onClick:()=>r(null),style:{background:"none",border:"none",cursor:"pointer",color:"var(--text-muted)"},children:T.jsx(cy,{size:16})})]}),T.jsxs("div",{style:{flex:1,overflow:"auto",padding:"16px"},children:[u&&f&&T.jsxs(T.Fragment,{children:[T.jsx(mn,{title:"Used In",icon:Gf,count:f.files.length,children:f.consumers.slice(0,8).map(m=>T.jsx(gn,{label:m},m))}),T.jsx(mn,{title:"Features Used",icon:tl,children:f.symbols.slice(0,12).map(m=>T.jsx(gn,{label:m,mono:!0},m))})]}),o&&!u&&T.jsxs(T.Fragment,{children:[o.importedBy&&o.importedBy.length>0&&T.jsx(mn,{title:"Imported By",icon:xS,count:o.importedBy.length,children:o.importedBy.map(m=>T.jsx(gn,{label:m.label,sub:m.path,onClick:()=>r(m.id)},m.id))}),o.imports&&o.imports.length>0&&T.jsx(mn,{title:"Imports",icon:Tm,count:o.imports.length,children:o.imports.slice(0,15).map(m=>T.jsx(gn,{label:m.source,sub:m.specifiers.join(", "),mono:!0},m.source))}),((p=o.file)==null?void 0:p.hooks)&&o.file.hooks.length>0&&T.jsx(mn,{title:"Hooks",icon:tl,count:o.file.hooks.length,children:o.file.hooks.map(m=>T.jsx(gn,{label:m.name,badge:m.isCustom?"custom":"react"},m.name))}),((g=o.file)==null?void 0:g.contexts)&&o.file.contexts.length>0&&T.jsx(mn,{title:"Contexts",icon:cl,children:o.file.contexts.map(m=>T.jsx(gn,{label:m.name},m.name))})]}),!o&&d&&!u&&T.jsxs(T.Fragment,{children:[d.hooks.length>0&&T.jsx(mn,{title:"Hooks",icon:tl,count:d.hooks.length,children:d.hooks.map(m=>T.jsx(gn,{label:m.name,badge:m.isCustom?"custom":"react"},m.name))}),d.imports.length>0&&T.jsx(mn,{title:"Imports",icon:Tm,count:d.imports.length,children:d.imports.slice(0,15).map(m=>T.jsx(gn,{label:m.source,sub:m.specifiers.join(", "),mono:!0},m.source))}),d.contexts.length>0&&T.jsx(mn,{title:"Contexts",icon:cl,children:d.contexts.map(m=>T.jsx(gn,{label:m.name},m.name))})]}),l.meta&&T.jsx(mn,{title:"Metadata",children:Object.entries(l.meta).slice(0,6).map(([m,v])=>T.jsx(gn,{label:m,sub:String(v)},m))})]})]})}function mn({title:e,icon:t,count:r,children:o}){return T.jsxs("div",{style:{marginBottom:20},children:[T.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:8},children:[t&&T.jsx(t,{size:12,style:{color:"var(--text-muted)"}}),T.jsx("span",{style:{fontSize:11,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em"},children:e}),r!==void 0&&T.jsx("span",{style:{fontSize:10,background:"var(--bg-tertiary)",padding:"1px 6px",borderRadius:10,color:"var(--text-muted)"},children:r})]}),o]})}function gn({label:e,sub:t,mono:r,badge:o,onClick:s}){return T.jsxs("div",{onClick:s,style:{padding:"6px 8px",borderRadius:6,cursor:s?"pointer":"default",marginBottom:2,transition:"background 0.15s"},onMouseEnter:l=>{s&&(l.currentTarget.style.background="var(--bg-tertiary)")},onMouseLeave:l=>{l.currentTarget.style.background="transparent"},children:[T.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[T.jsx("span",{style:{fontSize:12,fontWeight:500,color:"var(--text-primary)",fontFamily:r?"var(--font-mono)":"var(--font-sans)"},children:e}),o&&T.jsx("span",{style:{fontSize:9,padding:"1px 5px",borderRadius:4,background:o==="custom"?"rgba(245,158,11,0.2)":"rgba(59,130,246,0.2)",color:o==="custom"?"#F59E0B":"#3B82F6"},children:o})]}),t&&T.jsx("div",{style:{fontSize:10,color:"var(--text-muted)",marginTop:2,fontFamily:"var(--font-mono)"},children:t})]})}function Lb(){const e=Me(o=>o.theme),t=Me(o=>o.toggleTheme),r=e==="dark";return T.jsx("button",{onClick:t,title:r?"Switch to light mode":"Switch to dark mode","aria-label":r?"Switch to light mode":"Switch to dark mode",style:{display:"flex",alignItems:"center",justifyContent:"center",width:36,height:36,background:"var(--bg-tertiary)",border:"1px solid var(--border)",borderRadius:"var(--radius-sm)",cursor:"pointer",color:"var(--text-secondary)",flexShrink:0,transition:"all 0.15s"},onMouseEnter:o=>{o.currentTarget.style.borderColor="var(--border-hover)",o.currentTarget.style.color="var(--text-primary)"},onMouseLeave:o=>{o.currentTarget.style.borderColor="var(--border)",o.currentTarget.style.color="var(--text-secondary)"},children:r?T.jsx(NS,{size:16}):T.jsx(CS,{size:16})})}function jb(){IS();const e=Me(r=>r.scanning),t=Me(r=>r.theme);return L.useEffect(()=>{document.documentElement.setAttribute("data-theme",t)},[t]),T.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100vh",background:"var(--bg-primary)"},children:[T.jsxs("header",{style:{height:56,display:"flex",alignItems:"center",gap:16,padding:"0 16px",borderBottom:"1px solid var(--border)",background:"var(--bg-glass)",backdropFilter:"blur(16px)",flexShrink:0,zIndex:10},children:[T.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,flexShrink:0},children:[T.jsx("div",{style:{width:32,height:32,background:"linear-gradient(135deg, #8B5CF6, #3B82F6)",borderRadius:8,display:"flex",alignItems:"center",justifyContent:"center"},children:T.jsx(ly,{size:16,color:"white"})}),T.jsxs("div",{children:[T.jsx("div",{style:{fontSize:14,fontWeight:700,lineHeight:1},children:"Arch Atlas"}),T.jsx("div",{style:{fontSize:10,color:"var(--text-muted)"},children:"Architecture Explorer"})]})]}),T.jsx(d_,{}),T.jsx(Lb,{}),e&&T.jsxs("div",{style:{fontSize:11,color:"var(--accent)",flexShrink:0,display:"flex",alignItems:"center",gap:6},children:[T.jsx("div",{style:{width:6,height:6,borderRadius:"50%",background:"var(--accent)",animation:"pulse 1s ease infinite"}}),"Live",T.jsx("style",{children:"@keyframes pulse { 0%,100% { opacity:1 } 50% { opacity:0.3 } }"})]})]}),T.jsxs("div",{style:{display:"flex",flex:1,overflow:"hidden"},children:[T.jsx(f_,{}),T.jsx(Db,{}),T.jsx(Ib,{})]})]})}mS.createRoot(document.getElementById("root")).render(T.jsx(L.StrictMode,{children:T.jsx(jb,{})}));
|